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 00000000..07e4170e Binary files /dev/null and b/src/assets/images/Qian.png differ 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 @@ -->