diff --git a/src/assets/styles/login.scss b/src/assets/styles/login.scss index bea1fe9d..4df69394 100644 --- a/src/assets/styles/login.scss +++ b/src/assets/styles/login.scss @@ -37,6 +37,9 @@ $tabWidth: $tabW * 1px; $rowHeight: $rowH * 1px; $buttonHeight: $buttonH * 1px; +// 1080px 高度为基准的 1px +$base1px: 0.15vh; // 1px / 1080px; + // - - - - - 页面基础设置 .container { .login-code { @@ -87,7 +90,7 @@ $buttonHeight: $buttonH * 1px; width: 100%; height: 100%; background-color: #ffffff; - // box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07); + // box-shadow: 0px calc(16 * 0.12vh) 40px rgba(0, 0, 0, 0.07); // border-radius: 20px; // 定位 position: relative; @@ -100,6 +103,7 @@ $buttonHeight: $buttonH * 1px; // 元素 // width: $picWidth; height: $picHeight; + // height: 10vh; background-image: url($picImage); background-repeat: no-repeat; background-size: 100% 100%; @@ -118,7 +122,7 @@ $buttonHeight: $buttonH * 1px; } .field { position: relative; - margin-top: 8%; + margin-top: 14vh; flex: 2; // width: 800px; display: flex; @@ -130,17 +134,36 @@ $buttonHeight: $buttonH * 1px; text-align: center; clear: both; position: relative; - top: -36px; - height: 128px; + top: calc(-32 * $base1px); + height: calc(128 * $base1px); .title { margin: 0; - margin-left: 32px; + margin-left: calc(28 * 0.12vh); font-weight: 400; user-select: none; color: #000; - font-size: 36px; - line-height: 54px; + font-size: calc(28 * 0.12vh); + line-height: calc(40 * 0.12vh); + letter-spacing: calc(2 * 0.12vh); + + .cnbm_logo { + height: calc(40 * 0.12vh); + width: calc(40 * 0.12vh); + position: relative; + top: calc(8 * 0.12vh); + right: calc(8 * 0.12vh); + } + } + + .sub-title { + margin: 0; + margin-left: calc(28 * 0.12vh); + font-weight: 400; + user-select: none; + color: #000; + font-size: calc(28 * 0.12vh); + line-height: calc(48 * 0.12vh); letter-spacing: 2px; } } @@ -159,10 +182,10 @@ $buttonHeight: $buttonH * 1px; .footer { user-select: none; // 元素 - margin: 12px 0; - height: 16px; - line-height: 16px; - font-size: 12px; + margin: calc(12 * 0.12vh) 0; + height: calc(16 * 0.12vh); + line-height: calc(16 * 0.12vh); + font-size: calc(12 * 0.12vh); color: #8c8c8c; a, @@ -176,12 +199,8 @@ $buttonHeight: $buttonH * 1px; .form { margin-top: 0; box-sizing: border-box; - // width: $formWidth; width: 100%; - // - - - tab - :deep(.el-tabs__nav) { - // background: #f0f3; - } + :deep(.el-tabs__content) { padding: 20px 0 0; } @@ -189,12 +208,13 @@ $buttonHeight: $buttonH * 1px; user-select: none; // 元素 width: $tabWidth; - height: $rowHeight; + // height: $rowHeight; + height: calc(54 * 0.12vh); padding: 0; // 文字 line-height: $rowHeight; color: #666666; - font-size: 18px; + font-size: calc(14 * 0.12vh); font-weight: 400; text-align: center; } @@ -210,7 +230,8 @@ $buttonHeight: $buttonH * 1px; :deep(.el-input__inner) { // 元素 width: 100%; - height: $rowHeight; + // height: $rowHeight; + height: calc(72 * 0.12vh); background: #f5f5f5; border: 0; border-radius: 28px; @@ -280,7 +301,7 @@ $buttonHeight: $buttonH * 1px; margin-bottom: 20px; // 文字 line-height: 26px; - font-size: 20px; + font-size: calc(18 * 0.12vh); color: #ffffff; } .button-active { @@ -299,13 +320,14 @@ $buttonHeight: $buttonH * 1px; :deep(.el-input__inner) { // 元素 width: 420px; - height: 66px; + height: calc(52 * 0.12vh); + // height: 66px; color: #262626; - font-size: 18px; + font-size: calc(14 * 0.12vh); } :deep(.el-checkbox__label) { - font-size: 18px; - line-height: 14px; + font-size: calc(14 * 0.12vh); + line-height: calc(12 * 0.12vh); } } } @@ -314,19 +336,42 @@ $buttonHeight: $buttonH * 1px; @media screen and (min-width: 1920px) { .container { .content { - .field { flex: initial; - width: 800px; + // width: 800px; + width: 40vw; + } + } + } +} + +@media screen and (min-height: 1024px) { + .container { + .content { + .field { + margin-top: 16vh; + } + } + } +} + +@media screen and (max-height: 1024px) { + .container { + .content { + .field { + margin-top: 8vh; } } } } + @media screen and (min-width: 599px) and (max-width: 1366px) { .container { - min-width: 599px; + // min-width: 599px; + min-width: 42vw; + .content { // width: 710px; // height: 397px; @@ -337,6 +382,7 @@ $buttonHeight: $buttonH * 1px; display: none; } .field { + // margin-top: 6vh; // width: calc(710px - 314px); // left: 314px; // justify-content: center; @@ -363,6 +409,14 @@ $buttonHeight: $buttonH * 1px; } } +// @media screen and (max-height: 1080px) { +// .container { +// .field { +// transform: scale(0.74); +// } +// } +// } + /* ===== MOBILE DESIGN ===== */ $mobileW: 375; $mobileH: 812; @@ -503,7 +557,7 @@ $iconBgImage: '../assets/images/icon.png'; .footer { // 元素 - font-size: 12px; + font-size: calc(12 * 0.12vh); font-family: PingFang SC; font-weight: 400; line-height: 17px; @@ -511,7 +565,7 @@ $iconBgImage: '../assets/images/icon.png'; opacity: 0.6; // 定位 // position: absolute; - bottom: -32px; + bottom: -calc(32 * 0.12vh); } } } diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 53655af5..3c92a2f4 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -347,6 +347,8 @@ export default { console.log('setting code: ', response.data); // 处理输入框数据 this.form[opt.prop] = response.data; + // 更新下外部的 dataForm,防止code字段有数据也报空的bug + this.$emit('update', this.form) } }); } diff --git a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue index ac03952d..1e7de18e 100644 --- a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue +++ b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue @@ -61,7 +61,7 @@ rows: drawerBaseInfoRows, }, { - name: '属性列表', + name: '采集参数', key: 'attrs', props: drawerListProps, url: '/base/equipment-plc-param/page', @@ -75,18 +75,26 @@ pageSize: 10, }, tableBtn: [ - this.$auth.hasPermi('equipment:collection-config-param:update') - ? { - type: 'edit', - btnName: '修改', - } - : undefined, - this.$auth.hasPermi('equipment:collection-config-param:delete') - ? { - type: 'delete', - btnName: '删除', - } - : undefined, + { + type: 'edit', + btnName: '修改', + }, + { + type: 'delete', + btnName: '删除', + }, + // this.$auth.hasPermi('equipment:collection-config-param:update') + // ? { + // type: 'edit', + // btnName: '修改', + // } + // : undefined, + // this.$auth.hasPermi('equipment:collection-config-param:delete') + // ? { + // type: 'delete', + // btnName: '删除', + // } + // : undefined, ].filter((v) => v), allowAdd: true, }, @@ -106,7 +114,6 @@ import { getEquipmentPlcConnectPage, exportEquipmentPlcConnectExcel, } from '@/api/base/equipmentPlcConnect'; -import moment from 'moment'; import basicPageMixin from '@/mixins/lb/basicPageMixin'; // import './http'; import BasicDrawer from './components/BasicDrawer.vue'; @@ -182,13 +189,15 @@ export default { placeholder: '请选择设备', param: 'equipmentId', selectOptions: [], + filterable: true }, { type: 'select', - label: '编码', - placeholder: '请选择编码', + label: '关联表编码', + placeholder: '请选择关联表编码', param: 'plcId', selectOptions: [], + filterable: true }, { type: 'button', @@ -224,7 +233,9 @@ export default { prop: 'plcId', labelKey: `plcTableName`, url: '/base/equipment-plc/listAll', - rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '关联表名不能为空', trigger: 'blur' }, + ], bind: { filterable: true, }, @@ -236,7 +247,9 @@ export default { label: '设备', prop: 'equipmentId', url: '/base/core-equipment/page?pageNo=1&pageSize=99', - rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '设备不能为空', trigger: 'blur' }, + ], bind: { filterable: true, }, @@ -262,7 +275,9 @@ export default { input: true, label: '设备名', prop: 'equipmentName', - rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '设备名不能为空', trigger: 'blur' }, + ], // bind: { // disabled: this.editMode == 'detail', // some condition, like detail mode... // } @@ -296,7 +311,8 @@ export default { label: '生产参数类型', filter: (val) => val != null - ? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val] + // ? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val] + ? ['', '进口计数', '出口计数', '损耗计数', '无类型', ''][val] : '-', }, { diff --git a/src/views/equipment/base/config/DataCollection/TableConfig.vue b/src/views/equipment/base/config/DataCollection/TableConfig.vue index 42e204f5..2f9dda7a 100644 --- a/src/views/equipment/base/config/DataCollection/TableConfig.vue +++ b/src/views/equipment/base/config/DataCollection/TableConfig.vue @@ -59,7 +59,6 @@ import { getEquipmentPlcPage, exportEquipmentPlcExcel, } from '@/api/base/equipmentPlc'; -import moment from 'moment'; import basicPageMixin from '@/mixins/lb/basicPageMixin'; const switchBtn = { @@ -352,7 +351,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?') + .confirm('是否确认删除该配置?') .then(function () { return deleteEquipmentPlc(id); }) diff --git a/src/views/equipment/base/config/DataCollection/components/BasicDrawer.vue b/src/views/equipment/base/config/DataCollection/components/BasicDrawer.vue index 45983d2b..3b27c92c 100644 --- a/src/views/equipment/base/config/DataCollection/components/BasicDrawer.vue +++ b/src/views/equipment/base/config/DataCollection/components/BasicDrawer.vue @@ -194,13 +194,17 @@ export default { input: true, label: '参数列名', prop: 'plcParamName', - rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '参数列名不能为空', trigger: 'blur' }, + ], }, { input: true, label: '参数名称', prop: 'name', - rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '参数名称不能为空', trigger: 'blur' }, + ], }, ], [ @@ -230,19 +234,35 @@ export default { { label: '工艺参数', value: 2 }, { label: '报警参数', value: 3 }, ], - rules: [{ required: true, message: '设备参数类型不能为空', trigger: 'blur' }], + rules: [ + { + required: true, + message: '设备参数类型不能为空', + trigger: 'blur', + }, + ], }, { select: true, label: '生产参数类型', prop: 'production_param_type', options: [ - { label: '进片数量', value: 1 }, - { label: '出片数量', value: 2 }, - { label: '破损数量', value: 3 }, + // { label: '进片数量', value: 1 }, + // { label: '出片数量', value: 2 }, + // { label: '破损数量', value: 3 }, + // { label: '无类型', value: 4 }, + { label: '进口计数', value: 1 }, + { label: '出口计数', value: 2 }, + { label: '损耗计数', value: 3 }, { label: '无类型', value: 4 }, ], - rules: [{ required: true, message: '生产参数类型不能为空', trigger: 'blur' }], + rules: [ + { + required: true, + message: '生产参数类型不能为空', + trigger: 'blur', + }, + ], }, ], [ @@ -305,6 +325,7 @@ export default { infoQuery: null, // 基本信息的请求 attrFormSubmitting: false, attrListLoading: false, + shouldRefreshPageView: false, }; }, computed: { @@ -323,10 +344,12 @@ export default { }); }, tableBtn() { - return this.mode == 'detail' ? [] : this.sections[1].tableBtn; + return this.sections[1].tableBtn; + // return this.mode == 'detail' ? [] : this.sections[1].tableBtn; }, }, mounted() { + this.shouldRefreshPageView = false; this.mode = this.defaultMode || 'detail'; for (const section of this.sections) { // 请求具体信息 @@ -403,6 +426,9 @@ export default { }, handleCancel() { + if (this.shouldRefreshPageView) { + this.$emit('refreshDataList'); + } this.visible = false; }, @@ -426,7 +452,7 @@ export default { remark: '', alarmContent: '', }; - this.attrTitle = '添加设备绑定信息'; + this.attrTitle = '添加参数绑定信息'; this.attrFormVisible = true; }, @@ -439,14 +465,14 @@ export default { }); if (res.code == 0) { this.attrForm = res.data; - this.attrTitle = '编辑设备绑定信息'; + this.attrTitle = '编辑参数绑定信息'; this.attrFormVisible = true; } }, // 删除属性 handleDeleteAttr(attrId) { - this.$confirm('确定删除该分组报警?', '提示', { + this.$confirm('确定删除该参数?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', @@ -458,6 +484,7 @@ export default { params: { id: attrId }, }); if (res.code == 0) { + this.shouldRefreshPageView = true; this.$message({ message: '删除成功', type: 'success', @@ -472,35 +499,37 @@ export default { }, // 提交属性表 - async submitAttrForm() { - this.$refs['attrForm'].validate((valid) => { + submitAttrForm() { + this.$refs['attrForm'].validate(async (valid) => { if (!valid) { return; } - }); - const isEdit = this.attrForm.id != null; - this.attrFormSubmitting = true; - const res = await this.$axios({ - url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate, - method: isEdit ? 'put' : 'post', - data: { - ...this.attrForm, - connectId: this.infoData.id, - }, - }); - if (res.code == 0) { - this.closeAttrForm(); - this.$message({ - message: `${isEdit ? '更新' : '创建'}成功`, - type: 'success', - duration: 1500, - onClose: () => { - this.getAttrList(); + const isEdit = this.attrForm.id != null; + this.attrFormSubmitting = true; + const res = await this.$axios({ + url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate, + method: isEdit ? 'put' : 'post', + data: { + ...this.attrForm, + connectId: this.infoData.id, }, }); - } - this.attrFormSubmitting = false; + + if (res.code == 0) { + this.closeAttrForm(); + this.$message({ + message: `${isEdit ? '更新' : '创建'}成功`, + type: 'success', + duration: 1500, + onClose: () => { + this.getAttrList(); + this.shouldRefreshPageView = true; + }, + }); + } + this.attrFormSubmitting = false; + }); }, closeAttrForm() { @@ -509,7 +538,7 @@ export default { handleClick(raw) { if (raw.type === 'delete') { - this.$confirm(`确定删除该报警?`, '提示', { + this.$confirm(`确定删除该参数?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue index 953eafec..8c989b09 100644 --- a/src/views/equipment/timing-diagram/output/index.vue +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -482,7 +482,7 @@ export default { async submitForm() { const { code, data } = await this.$axios({ - url: '/analysis/equipment-analysis/quantity', + url: '/monitoring/equipment-monitor/quantity-series', method: 'get', params: this.queryParams, }); diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index 0fffc390..872c977b 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -6,19 +6,29 @@ -->