From e970531b2373ec1309675e282be31ba8f21e841a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9A=B4=E7=82=B3=E6=9E=97?= <15237758276@163.com> Date: Fri, 18 Oct 2024 15:17:52 +0800 Subject: [PATCH] no message --- src/components/Crud/CRUD.operation.vue | 85 ++++++++++++++++++++++++- src/views/base-data/workPoint/index.vue | 81 ++++++++++++++++++----- 2 files changed, 147 insertions(+), 19 deletions(-) diff --git a/src/components/Crud/CRUD.operation.vue b/src/components/Crud/CRUD.operation.vue index e56d4b2..dd7c3ed 100644 --- a/src/components/Crud/CRUD.operation.vue +++ b/src/components/Crud/CRUD.operation.vue @@ -83,7 +83,7 @@ /> - + + + 列表显示 + 排序 + + + + 全选 + + + {{ item.label }} + + + + + + 全选 + + + {{ item.label }} + + + + { + ++totalCount + selectedCount += column.sortable ? 1 : 0 + }) + if (selectedCount === 0) { + this.crud.notify('请至少选择一列', CRUD.NOTIFICATION_TYPE.WARNING) + this.$nextTick(function () { + item.sortable = true + }) + return + } + this.allColumnsSelected = selectedCount === totalCount + this.allColumnsSelectedIndeterminate = selectedCount !== totalCount && selectedCount !== 0 + this.updateColumnVisible(item) + /*const columns = [] + this.tableColumns.forEach(column => { + if(column.visible==false){ + columns.push(column.property) + } + console.log("-"+column.property+"--"+column.visible) + }) + const post_table_config = { + value: JSON.stringify(columns), + tableType: this.tableKey + } + + crudTableConfig.add(post_table_config)*/ + //this.postToTableConfig(); + }, postToTableConfig() { this.updateTableColumns(); const columns = [] diff --git a/src/views/base-data/workPoint/index.vue b/src/views/base-data/workPoint/index.vue index 59babdf..b152bd9 100644 --- a/src/views/base-data/workPoint/index.vue +++ b/src/views/base-data/workPoint/index.vue @@ -32,26 +32,47 @@ - + + + :label="item.code" + :value="item"> + - + + :label="item.code" + :value="item"> + @@ -85,15 +106,30 @@ - + - {{ scope.row.upPoint.code}} + + + {{ item.code }} + + - - + - {{ scope.row.downPoint.code}} + + + {{ item.code }} + + @@ -126,14 +162,14 @@ import pagination from '@crud/Pagination' import {queryAreaList} from "@/api/area"; import {getPoints} from "@/api/point"; -const defaultForm = { id: null, code: null, name: null, area: null, upNumber: null, upPoint: null, downNumber: null, downPoint: null, agvNumber: null, maxNumber: null, backNumber: null, maxStockNumber: null, deptId: null, description: null, enabled: null, createBy: null, updateBy: null, createTime: null, updateTime: null } +const defaultForm = { id: null, code: null, name: null, area: null, upNumber: null, upPoint: [], downNumber: null, downPoint: [], agvNumber: null, maxNumber: null, backNumber: null, maxStockNumber: null, deptId: null, description: null, enabled: null, createBy: null, updateBy: null, createTime: null, updateTime: null } export default { name: 'WorkPoint', components: { pagination, crudOperation, rrOperation, udOperation }, mixins: [presenter(), header(), form(defaultForm), crud()], dicts: ['base_staus'], cruds() { - return CRUD({ title: 'workPoint', url: 'api/workPoint', idField: 'id', sort: 'id,desc', crudMethod: { ...crudWorkPoint }}) + return CRUD({ title: '工作站', url: 'api/workPoint', idField: 'id', sort: 'id,desc', crudMethod: { ...crudWorkPoint }}) }, data() { return { @@ -185,9 +221,22 @@ export default { }) }, getPoint() { - getPoints(0).then(res => { + getPoints(null).then(res => { this.points = res }) + }, + remoteMethod(query) { + if (query !== '') { + this.loading = true; + setTimeout(() => { + this.loading = false; + getPoints(query).then(res => { + this.points = res + }) + }, 200); + } else { + this.points = []; + } } } }