|
@@ -55,11 +55,10 @@
|
|
|
|
|
|
<div class="myTabsBox myTabsBoxThreeTabs">
|
|
<div class="myTabsBox myTabsBoxThreeTabs">
|
|
<el-button
|
|
<el-button
|
|
- v-bind:class="{ addBtn: true, disabled: activeName === '1' }"
|
|
|
|
|
|
+ v-bind:class="{ addBtn: true}"
|
|
icon="el-icon-circle-plus-outline"
|
|
icon="el-icon-circle-plus-outline"
|
|
@click="addOne"
|
|
@click="addOne"
|
|
type="primary"
|
|
type="primary"
|
|
- :disabled="activeName === '1'"
|
|
|
|
>新增</el-button
|
|
>新增</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -82,11 +81,10 @@ import searchLayout from "@/components/grid/searchLayout";
|
|
import tableList from "@/components/grid/TableList";
|
|
import tableList from "@/components/grid/TableList";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: "algorithmsLibraryList", // 算法库列表
|
|
|
|
|
|
+ name: "algorithmsLibraryList", // 平台算法
|
|
components: { searchLayout, tableList },
|
|
components: { searchLayout, tableList },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- activeName: "2",
|
|
|
|
searchParams: {
|
|
searchParams: {
|
|
//搜索参数
|
|
//搜索参数
|
|
algorithmCode: "", // ID
|
|
algorithmCode: "", // ID
|
|
@@ -96,6 +94,15 @@ export default {
|
|
uploadMode: "", // 私有类型
|
|
uploadMode: "", // 私有类型
|
|
},
|
|
},
|
|
validationStatusList: [],
|
|
validationStatusList: [],
|
|
|
|
+ getDataWay:{
|
|
|
|
+
|
|
|
|
+ //加载表格数据
|
|
|
|
+ dataType: "url",
|
|
|
|
+ type: "post",
|
|
|
|
+ // firstRequest: false,
|
|
|
|
+ data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
|
|
|
|
+ param: {},
|
|
|
|
+ },
|
|
columns: [
|
|
columns: [
|
|
//表格列
|
|
//表格列
|
|
{
|
|
{
|
|
@@ -126,42 +133,10 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- getDataWay() {
|
|
|
|
- if (this.activeName === "2" || this.activeName === "3") {
|
|
|
|
- // 私有
|
|
|
|
- return {
|
|
|
|
- //加载表格数据
|
|
|
|
- dataType: "url",
|
|
|
|
- type: "post",
|
|
|
|
- // firstRequest: false,
|
|
|
|
- data: this.$api.algorithmsLibrary.selectAlgorithmList,
|
|
|
|
- param: {},
|
|
|
|
- };
|
|
|
|
- } else {
|
|
|
|
- // 公有
|
|
|
|
- return {
|
|
|
|
- //加载表格数据
|
|
|
|
- dataType: "url",
|
|
|
|
- type: "post",
|
|
|
|
- // firstRequest: false,
|
|
|
|
- data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
|
|
|
|
- param: {},
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
doSearch() {
|
|
doSearch() {
|
|
- if (this.activeName === "2") {
|
|
|
|
- // 私有导入
|
|
|
|
- this.searchParams.uploadMode = "1";
|
|
|
|
- } else if (this.activeName === "3") {
|
|
|
|
- // 私有仓库
|
|
|
|
- this.searchParams.uploadMode = "2";
|
|
|
|
- } else {
|
|
|
|
- // 公有
|
|
|
|
- this.searchParams.uploadMode = "";
|
|
|
|
- }
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.refreshList(this.searchParams);
|
|
this.refreshList(this.searchParams);
|
|
});
|
|
});
|
|
@@ -182,33 +157,11 @@ export default {
|
|
};
|
|
};
|
|
this.doSearch();
|
|
this.doSearch();
|
|
},
|
|
},
|
|
- pageControl(data) {
|
|
|
|
- this.activeName = data.name;
|
|
|
|
- this.doSearch();
|
|
|
|
- },
|
|
|
|
addOne() {
|
|
addOne() {
|
|
- if (this.activeName === "2") {
|
|
|
|
- // 私有导入
|
|
|
|
- this.$router.push({ path: "/exportAlgorithms" });
|
|
|
|
- } else {
|
|
|
|
- // 私有仓库
|
|
|
|
- this.$router.push({ path: "/gitAlgorithms" });
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
editRow(row) {
|
|
editRow(row) {
|
|
- if (row.uploadMode === "1") {
|
|
|
|
- // 私有导入
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/exportAlgorithms",
|
|
|
|
- query: { id: row.id, share: row.share },
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- // 私有仓库
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/gitAlgorithms",
|
|
|
|
- query: { id: row.id, share: row.share },
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
delOne(row) {
|
|
delOne(row) {
|
|
this.$confirm("确认是否删除?", "提示", {
|
|
this.$confirm("确认是否删除?", "提示", {
|
|
@@ -274,4 +227,7 @@ export default {
|
|
top: 45px;
|
|
top: 45px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.myTabsBox{
|
|
|
|
+ min-height:99px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|