From 82263ebb91cd2fd4fcc1d52d204ceefef4ab334f Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Tue, 23 Jan 2024 17:32:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E7=BA=BF=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/main.js | 3 +- .../productManagement/workorder_online.vue | 48 +++++++++++-------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 24a0a16..fea5625 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "vue-seamless-scroll": "^1.1.23", "vuedraggable": "^2.20.0", "vuex": "3.6.0", - "vxe-table": "^3.6.13", + "vxe-table": "^3.7.8", "xe-utils": "^3.5.11", "xlsx": "^0.18.5" }, diff --git a/src/main.js b/src/main.js index c1fcd23..0cd9de0 100644 --- a/src/main.js +++ b/src/main.js @@ -39,8 +39,8 @@ import UploadFile from '@/components/FileUpload/index'; import DictData from '@/components/DictData' import VXETable from 'vxe-table' + import 'vxe-table/lib/style.css' -import "@/vxe.scss" import dataV from '@jiaminghi/data-view' @@ -90,6 +90,7 @@ Vue.use(Element, { }) Vue.use(VXETable) + Vue.use(dataV) Vue.use(AFTableColumn) diff --git a/src/views/productManagement/workorder_online.vue b/src/views/productManagement/workorder_online.vue index e16adef..73a0bac 100644 --- a/src/views/productManagement/workorder_online.vue +++ b/src/views/productManagement/workorder_online.vue @@ -29,29 +29,31 @@ show-overflow ref="xTable" v-loading="loading_1" + :cell-style="rowClassName" height="800" - :row-config="{ isHover: true, useKey: true, keyField: 'sort' }" + :row-config="{ isHover: true, useKey: true }" + :column-config="{ useKey: true }" :data="workorder_table_data" > - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -110,8 +112,6 @@ export default { this.loading_1 = false this.workorder_table_data = res.data.item1 this.pagination.total = res.data.item2 - - } }) }, @@ -127,7 +127,6 @@ export default { }, //todo 取消上线 cancelitem(row) { - this.$modal .confirm('是否确认取消生产工单名称为' + row.productDescription + '"的数据项?') .then(function () { @@ -140,6 +139,15 @@ export default { } }) }, + //todo 更改单元格格式 + rowClassName(item) { + if (item.row.status > 0) { + return { + backgroundColor: '#FFFF00', + } + } + return null + }, }, } @@ -147,7 +155,7 @@ export default {