diff --git a/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue b/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue index e3596f2d..73dd804b 100644 --- a/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue +++ b/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue @@ -10,8 +10,11 @@ + :size.sync="page.size" border @getList="getTableData" tableSize="mini"> + @@ -37,6 +40,7 @@ export default { default: () => [ {prop: 'label', label: "应用名称"}, {prop: 'project', label: "项目/框架"}, + {prop: 'category', label: "分类"}, {prop: 'name', label: "模块名"}, ] }, @@ -49,6 +53,7 @@ export default { page: {total: 0, current: 1, size: 10}, search: {}, tableData: [], + selectAll: false } }, computed: { @@ -75,6 +80,7 @@ export default { if (res?.data) { const list = res.data.records || res.data || [] list.map(e => { + e.category = e.libPath.replace(/^\/[^\/]+\/([^\/]+)\/.+/, '$1') if (/\/project\//.test(e.libPath)) { e.project = e.libPath.replace(/.*project\/([^\/]+)\/.+/, '$1') } else if (/\/core\//.test(e.libPath)) { @@ -99,6 +105,14 @@ export default { } else { this.$emit("change", row.checked ? row[nodeKey] : '') } + }, + handleCheckAll(v) { + const {nodeKey} = this + let selected = this.tableData.map(e => { + e.checked = v + return e + }).filter(e => e.checked)?.map(e => e[nodeKey]) || [] + this.$emit("change", selected) } }, created() {