From af5e0333ed91ca0830f7875c7a8745d2f8d69666 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 10 Oct 2023 15:30:37 +0800 Subject: [PATCH] update ui --- src/assets/icons/svg/Confirm.svg | 12 + src/assets/icons/svg/Qian.svg | 14 + src/assets/images/Qian.png | Bin 0 -> 612 bytes src/layout/components/AppMain.vue | 2 +- .../components/BasicDrawer.vue | 531 ++++++++++++++++++ src/views/base/equipmentPlcConnect/index.vue | 190 ++++++- .../efficiency/components/pieChart.vue | 7 +- .../equipment/analysis/efficiency/index.vue | 21 +- .../equipment/timing-diagram/status/chart.js | 35 +- .../equipmentProcessAmount/index.vue | 23 +- .../qualityInspectionBoxBtn/dialogForm.vue | 14 +- .../base/qualityInspectionBoxBtn/index.vue | 6 +- 12 files changed, 789 insertions(+), 66 deletions(-) create mode 100644 src/assets/icons/svg/Confirm.svg create mode 100644 src/assets/icons/svg/Qian.svg create mode 100644 src/assets/images/Qian.png create mode 100644 src/views/base/equipmentPlcConnect/components/BasicDrawer.vue diff --git a/src/assets/icons/svg/Confirm.svg b/src/assets/icons/svg/Confirm.svg new file mode 100644 index 00000000..6b284c96 --- /dev/null +++ b/src/assets/icons/svg/Confirm.svg @@ -0,0 +1,12 @@ + + + 选择 + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/Qian.svg b/src/assets/icons/svg/Qian.svg new file mode 100644 index 00000000..997993cb --- /dev/null +++ b/src/assets/icons/svg/Qian.svg @@ -0,0 +1,14 @@ + + + 菜单 + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/Qian.png b/src/assets/images/Qian.png new file mode 100644 index 0000000000000000000000000000000000000000..07e4170e1cbeb87541ca2cdc6f47f838d26965b3 GIT binary patch literal 612 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA#=yX+z;$YDu$^mSxl*x1kgCy^D%w@8if zO!M_+&;qhK7#Q0#8CZZUMj(~~Vg?4L1x#=eg9Xe8Hc0Zve?K#z;_IF+jv*PWZzFw! z4jG8}HMw6j{&Jl8%2K^Kf})X?tg)7-PGwuXdU31w@` zPu{GS@4r8O`gF6O$1-t@q!x>p5qA+B>^eZoixu?m21C zjMrb!hnsZ@Tsyt#$<{jIS<`oHy3Bi&RiQ!6RGw}21&iPFm!GoL-?L=O8~^9q-kZqs zX)KMJv~}vn*e}HbKkF)Z)vTONq*S-xewq}T{Y-)D@CNl3ivm#@*NeHZ29v*ZqkpBY>^KPHyha%2Rm6bs7yYUWy{wlt9C(C#_iyScbj zwA}(-879gKIdrU_m+Cl$Q){crIAm7FbSV!pL*xzhOO!<$35e;&(eO0t~Z{yuv5 zzS|K>4Np1_2(fsX8>TF@OIf&F)#%zUU1O>fnNNJM(e^PDJgfljCHWyCg zwHKG{f8D{Lv|!7#t^*U^N;_3B&%LGe_J8(;;Pjeykem<-_9`n o#H{&6Hd`_J$pksU8;UG-j1yk>zfQU`uM`y3p00i_>zopr068A@#{d8T literal 0 HcmV?d00001 diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index a14aba84..15c86487 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -32,7 +32,7 @@ export default { min-height: calc(100vh - 56px); min-width: calc(100vh - 280px); position: relative; - overflow: hidden; + overflow: visible; margin: 8px 14px 0px 16px; border-radius: 8px; background-color: #fff; diff --git a/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue b/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue new file mode 100644 index 00000000..740f6b71 --- /dev/null +++ b/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue @@ -0,0 +1,531 @@ + + + + + + + diff --git a/src/views/base/equipmentPlcConnect/index.vue b/src/views/base/equipmentPlcConnect/index.vue index 5d7e72d9..f64f05cc 100644 --- a/src/views/base/equipmentPlcConnect/index.vue +++ b/src/views/base/equipmentPlcConnect/index.vue @@ -40,6 +40,53 @@ @confirm="submitForm"> + + + @@ -55,11 +102,13 @@ import { import moment from 'moment'; import basicPageMixin from '@/mixins/lb/basicPageMixin'; // import './http'; +import BasicDrawer from './components/BasicDrawer.vue'; +import { publicFormatter } from '@/utils/dict'; export default { name: 'EquipmentPlcConnect', mixins: [basicPageMixin], - components: {}, + components: { BasicDrawer }, data() { return { searchBarKeys: ['equipmentId', 'plcId'], @@ -78,6 +127,10 @@ export default { // : undefined, // ].filter((v) => v), tableBtn: [ + { + type: 'detail', + btnName: '参数绑定', + }, { type: 'edit', btnName: '修改', @@ -107,32 +160,32 @@ export default { { prop: 'plcTableName', label: '关联表名' }, { prop: 'plcName', label: '标识名称' }, { prop: 'bindingParameters', label: '绑定参数数量' }, - { - _action: 'params-bind', - label: '查看绑定', - subcomponent: { - props: ['injectData'], - render: function (h) { - const _this = this; - return h( - 'el-button', - { - props: { type: 'text' }, - on: { - click: function () { - console.log('inejctdata', _this.injectData); - _this.$emit('emitData', { - action: _this.injectData._action, - payload: _this.injectData, - }); - }, - }, - }, - '查看绑定' - ); - }, - }, - }, + // { + // _action: 'params-bind', + // label: '查看绑定', + // subcomponent: { + // props: ['injectData'], + // render: function (h) { + // const _this = this; + // return h( + // 'el-button', + // { + // props: { type: 'text' }, + // on: { + // click: function () { + // console.log('inejctdata', _this.injectData); + // _this.$emit('emitData', { + // action: _this.injectData._action, + // payload: _this.injectData, + // }); + // }, + // }, + // }, + // '查看绑定' + // ); + // }, + // }, + // }, ], searchBarFormConfig: [ { @@ -185,8 +238,8 @@ export default { url: '/base/equipment-plc/listAll', rules: [{ required: true, message: '不能为空', trigger: 'blur' }], bind: { - filterable: true - } + filterable: true, + }, }, ], [ @@ -197,8 +250,8 @@ export default { url: '/base/equipment/page?pageNo=1&pageSize=99', rules: [{ required: true, message: '不能为空', trigger: 'blur' }], bind: { - filterable: true - } + filterable: true, + }, }, ], ], @@ -212,6 +265,52 @@ export default { }, // 表单参数 form: {}, + // 查看绑定配置 + editVisible: false, + editMode: '', + drawerBaseInfoRows: [ + [ + { + input: true, + label: '设备名', + prop: 'equipmentName', + rules: [{ required: true, message: '不能为空', trigger: 'blur' }], + // bind: { + // disabled: this.editMode == 'detail', // some condition, like detail mode... + // } + }, + { + input: true, + label: '关联表名', + prop: 'plcTableName', + // url: '/base/equipment/getCode', + }, + ], + ], + drawerListProps: [ + { prop: 'plcParamName', label: '参数列名' }, + { prop: 'name', label: '参数名称' }, + { + prop: 'unit', + label: '单位', + filter: publicFormatter('unit_dict'), + }, + { + prop: 'collection', + label: '是否采集', + filter: (val) => (val != null ? ['否', '是'][val] : '-'), + }, + { prop: 'minValue', label: '最小值' }, + { prop: 'maxValue', label: '最大值' }, + { prop: 'defaultValue', label: '标准值' }, + { prop: 'description', label: '描述' }, + { prop: 'remark', label: '备注' }, + ], + alarmForm: { + id: undefined, + equipmentName: undefined, + plcTableName: undefined, + }, }; }, created() { @@ -353,6 +452,34 @@ export default { }); }); }, + + // 查看报警 + handleDetail(row) { + // debugger; + const { + id, + bindingParameters, + equipmentCode, + equipmentId, + equipmentName, + plcCode, + plcId, + plcName, + plcTableName, + productionLine, + workshopSection, + } = row; + // 打开抽屉 + this.editMode = 'detail'; + this.alarmForm.id = id; + this.alarmForm.plcTableName = plcTableName; // 关联表名 + this.alarmForm.equipmentName = equipmentName; + this.editVisible = true; + this.$nextTick(() => { + this.$refs['drawer'].init(); + }); + }, + /** 删除按钮操作 */ handleDelete(row) { const id = row.id; @@ -367,6 +494,7 @@ export default { }) .catch(() => {}); }, + /** 导出按钮操作 */ handleExport() { // 处理查询参数 diff --git a/src/views/equipment/analysis/efficiency/components/pieChart.vue b/src/views/equipment/analysis/efficiency/components/pieChart.vue index e051f341..249e5b3b 100644 --- a/src/views/equipment/analysis/efficiency/components/pieChart.vue +++ b/src/views/equipment/analysis/efficiency/components/pieChart.vue @@ -6,10 +6,11 @@ -->