From 33188481bf840735ec83be22d17eb1021ffbc837 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 22 Nov 2023 14:27:30 +0800 Subject: [PATCH 01/17] update login --- src/assets/styles/login.scss | 112 ++++++++++++++++++++++++++--------- src/views/login.vue | 38 ++++-------- 2 files changed, 95 insertions(+), 55 deletions(-) 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/views/login.vue b/src/views/login.vue index 2bc0c033..2f229f11 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -71,29 +71,11 @@ cnbm_logo + style="" + class="cnbm_logo" /> 中建材智能自动化研究院有限公司 -

- MES -

+

MES

@@ -193,9 +175,9 @@ style=" cursor: pointer; color: #0b58ff; - font-size: 18px; - line-height: 66px; - padding-right: 12px; + font-size: calc(12 * 0.12vh); + line-height: calc(54 * 0.12vh); + padding-right: calc(10 * 0.12vh); "> 获取验证码 @@ -215,7 +197,11 @@ :loading="loading" size="medium" type="primary" - style="width: 100%; height: 66px; font-size: 18px" + style=" + width: 100%; + height: calc(52 * 0.12vh); + font-size: calc(14 * 0.12vh); + " @click.native.prevent="getCode"> 登 录 登 录 中... @@ -349,7 +335,7 @@ export default { }; }, created() { - document.body.style['min-height'] = '1024px'; + // document.body.style['min-height'] = '1024px'; // 租户开关 this.tenantEnable = getTenantEnable(); if (this.tenantEnable) { From cd55b4c8602e5b1e2403b255a098e22d55a54fa5 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 22 Nov 2023 14:41:53 +0800 Subject: [PATCH 02/17] update --- .../equipment/timing-diagram/output/index.vue | 2 +- .../equipment/timing-diagram/status/index.vue | 100 ++++++++++++------ 2 files changed, 66 insertions(+), 36 deletions(-) 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 @@ --> diff --git a/src/views/equipment/analysis/Statistics/index.vue b/src/views/equipment/analysis/Statistics/index.vue index ae8e2374..4f5b9e91 100644 --- a/src/views/equipment/analysis/Statistics/index.vue +++ b/src/views/equipment/analysis/Statistics/index.vue @@ -28,59 +28,96 @@ diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index 9e3e9611..cc49a574 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -237,6 +237,7 @@ export default { label: '工厂', placeholder: '请选择工厂', param: 'factoryId', + filterable: true, selectOptions: [], }, { @@ -244,6 +245,7 @@ export default { label: '产线', placeholder: '请选择产线', param: 'lineId', + filterable: true, selectOptions: [], }, // 选项切换 diff --git a/src/views/equipment/base/alarm/Record/index.vue b/src/views/equipment/base/alarm/Record/index.vue index 82e066d7..9cb27907 100644 --- a/src/views/equipment/base/alarm/Record/index.vue +++ b/src/views/equipment/base/alarm/Record/index.vue @@ -310,7 +310,7 @@ export default { this.$modal .confirm('是否确认删除记录"' + row.name + '"?') .then(function () { - return this.delete({ id }); + return this.del({ id }); }) .then(() => { this.getList(); diff --git a/src/views/equipment/base/config/AlarmGroup/index.vue b/src/views/equipment/base/config/AlarmGroup/index.vue index f94945c1..f32f10f5 100644 --- a/src/views/equipment/base/config/AlarmGroup/index.vue +++ b/src/views/equipment/base/config/AlarmGroup/index.vue @@ -198,26 +198,23 @@ export default { prop: 'createTime', label: '添加时间', fixed: true, - width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { width: 240, prop: 'code', label: '报警编码' }, + { prop: 'code', label: '报警编码' }, { - width: 100, prop: 'type', label: '报警类型', filter: (val) => val != null ? ['-', '字符型', '布尔型', '-'][val] : '-', }, { - width: 90, prop: 'grade', label: '报警级别', filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL), }, - { width: 180, prop: 'alarmCode', label: '设备报警编码' }, - { width: 128, prop: 'plcParamName', label: '参数列名' }, - { width: 128, prop: 'alarmContent', label: '报警内容' }, + { prop: 'alarmCode', label: '设备报警编码' }, + { prop: 'plcParamName', label: '参数列名' }, + { prop: 'alarmContent', label: '报警内容' }, ], alarmForm: { id: undefined, diff --git a/src/views/equipment/base/inspection/Content/index.vue b/src/views/equipment/base/inspection/Content/index.vue index a8f23062..e79cf7b7 100644 --- a/src/views/equipment/base/inspection/Content/index.vue +++ b/src/views/equipment/base/inspection/Content/index.vue @@ -52,7 +52,7 @@ import moment from 'moment'; import basicPageMixin from '@/mixins/lb/basicPageMixin'; import { publicFormatter } from '@/utils/dict'; -import { deleteCheck } from "@/api/equipment/base/inspection/settings"; +import { deleteCheck } from '@/api/equipment/base/inspection/settings'; const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); @@ -128,15 +128,21 @@ export default { label: '巡检内容编号', prop: 'code', url: '/base/equipment-check/getCode', - rules: [{ required: true, message: '巡检内容编号不能为空', trigger: 'blur' }], + rules: [ + { + required: true, + message: '巡检内容编号不能为空', + trigger: 'blur', + }, + ], }, - ], - [ { input: true, label: '巡检项目', prop: 'program', - rules: [{ required: true, message: '巡检项目不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '巡检项目不能为空', trigger: 'blur' }, + ], }, ], [ @@ -144,10 +150,10 @@ export default { input: true, label: '巡检内容', prop: 'content', - rules: [{ required: true, message: '巡检内容不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '巡检内容不能为空', trigger: 'blur' }, + ], }, - ], - [ { input: true, label: '备注', @@ -168,7 +174,7 @@ export default { code: '', program: '', id: undefined, - content: '' + content: '', }, basePath: '/base/equipment-check', mode: null, @@ -271,10 +277,10 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除巡检项目名称为"' + row.program + '"的数据项?') + .confirm('是否确认删除该巡检项目?') .then(function () { - // return this.delete({ id }); - return deleteCheck(id) + // return this.del({ id }); + return deleteCheck(id); }) .then(() => { this.getList(); diff --git a/src/views/equipment/base/inspection/Record/index.vue b/src/views/equipment/base/inspection/Record/index.vue index 98a9604d..35a09628 100644 --- a/src/views/equipment/base/inspection/Record/index.vue +++ b/src/views/equipment/base/inspection/Record/index.vue @@ -105,6 +105,7 @@ export default { label: '设备', placeholder: '请选择设备', param: 'equipmentId', + filterable: true }, // 开始结束时间 { diff --git a/src/views/equipment/base/inspection/Settings/index.vue b/src/views/equipment/base/inspection/Settings/index.vue index 422c146b..d7207dc0 100644 --- a/src/views/equipment/base/inspection/Settings/index.vue +++ b/src/views/equipment/base/inspection/Settings/index.vue @@ -54,7 +54,6 @@ + + diff --git a/src/views/equipment/monitor/StatusAndParams/index.vue b/src/views/equipment/monitor/StatusAndParams/index.vue index d34c5fa6..5bb0dedc 100644 --- a/src/views/equipment/monitor/StatusAndParams/index.vue +++ b/src/views/equipment/monitor/StatusAndParams/index.vue @@ -1,10 +1,7 @@ diff --git a/src/views/equipment/base/spareParts/Config/index.vue b/src/views/equipment/base/spareParts/Config/index.vue index 71b323b2..d76d9616 100644 --- a/src/views/equipment/base/spareParts/Config/index.vue +++ b/src/views/equipment/base/spareParts/Config/index.vue @@ -60,8 +60,9 @@ import { publicFormatter } from '@/utils/dict'; import Editor from '@/components/Editor'; import addSparts from './addSparts.vue'; import { deleteConfig } from '@/api/equipment/base/spare-parts/config' +import htmls from './htmls.vue' -const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); +// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); export default { name: 'EquipmentSparePartsConfig', @@ -111,7 +112,7 @@ export default { { prop: 'equipmentCode', label: '设备编码' }, { prop: 'responsible', label: '负责人' }, // { prop: 'unit', label: '单位', filter: publicFormatter('unit_dict') }, - { prop: 'description', label: '描述' }, + { prop: 'description', label: '描述', subcomponent: htmls }, { prop: 'sparePartNumber', label: '备品备件数量' }, // { prop: 'remark', label: '备注' }, ], From 54b63a7f537699815c83ad07647c563953a4d95c Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 24 Nov 2023 10:41:11 +0800 Subject: [PATCH 11/17] update drawer and edit --- .../components/BasicDrawer.vue | 56 +++++---- .../AlarmGroup/components/BasicDrawer.vue | 113 ++++++++++++------ .../base/config/AlarmGroup/index.vue | 18 ++- .../BindGroup/components/BasicDrawer.vue | 110 +++++++++++------ .../equipment/base/config/BindGroup/index.vue | 45 +++++-- .../DataCollection/CollectionConfig.vue | 30 ++++- .../DataCollection/components/BasicDrawer.vue | 51 ++++++-- 7 files changed, 290 insertions(+), 133 deletions(-) diff --git a/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue b/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue index f38fb47d..b1b27230 100644 --- a/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue +++ b/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue @@ -166,13 +166,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' }, + ], }, ], [ @@ -419,35 +423,35 @@ 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.attrFormSubmitting = false; + }); }, closeAttrForm() { diff --git a/src/views/equipment/base/config/AlarmGroup/components/BasicDrawer.vue b/src/views/equipment/base/config/AlarmGroup/components/BasicDrawer.vue index f12d707c..079f999e 100644 --- a/src/views/equipment/base/config/AlarmGroup/components/BasicDrawer.vue +++ b/src/views/equipment/base/config/AlarmGroup/components/BasicDrawer.vue @@ -12,7 +12,7 @@ :wrapper-closable="false" class="drawer" custom-class="mes-drawer" - size="60%" + :size="size || '50%'" @closed="$emit('destroy')"> {{ @@ -42,7 +42,8 @@ :dataForm="form" :rows="formRows" /> --> - + +
+ + + + + + + + + + + + + + +
- -
+
添加报警 @@ -84,7 +111,7 @@
@@ -163,7 +192,7 @@ const SmallTitle = { export default { components: { SmallTitle, DialogForm, BaseInfoForm }, - props: ['sections', 'defaultMode', 'dataId'], // dataId 作为一个通用的存放id的字段 + props: ['sections', 'defaultMode', 'dataId', 'size'], // dataId 作为一个通用的存放id的字段 data() { return { mode: '', @@ -191,7 +220,9 @@ export default { label: '报警编码', // 自动生成 prop: 'code', url: '/base/equipment-group-alarm/getCode', - rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '报警编码不能为空', trigger: 'blur' }, + ], }, { select: true, @@ -205,13 +236,17 @@ export default { input: true, label: '参数列名', // 在实时数据库的列名 prop: 'plcParamName', - rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '参数列名不能为空', trigger: 'blur' }, + ], }, { input: true, label: '报警内容', prop: 'alarmContent', - rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '报警内容不能为空', trigger: 'blur' }, + ], }, ], [ @@ -223,7 +258,9 @@ export default { { label: '布尔型', value: 2 }, { label: '字符型', value: 1 }, ], - rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '报警类型不能为空', trigger: 'blur' }, + ], }, { input: true, @@ -322,7 +359,7 @@ export default { handleSave() { this.$refs['form'][0].validate(async (valid) => { if (valid) { - const isEdit = this.mode == 'edit'; + const isEdit = !this.mode.includes('detail'); await this.$axios({ url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'], method: isEdit ? 'put' : 'post', @@ -403,32 +440,32 @@ 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, - }); - - 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, }); - } - this.attrFormSubmitting = false; + + if (res.code == 0) { + this.closeAttrForm(); + this.$message({ + message: `${isEdit ? '更新' : '创建'}成功`, + type: 'success', + duration: 1500, + onClose: () => { + this.getAttrList(); + }, + }); + } + this.attrFormSubmitting = false; + }); }, closeAttrForm() { diff --git a/src/views/equipment/base/config/AlarmGroup/index.vue b/src/views/equipment/base/config/AlarmGroup/index.vue index f32f10f5..61cc4027 100644 --- a/src/views/equipment/base/config/AlarmGroup/index.vue +++ b/src/views/equipment/base/config/AlarmGroup/index.vue @@ -45,6 +45,7 @@ {{ @@ -42,7 +42,7 @@ :dataForm="form" :rows="formRows" /> --> - +
+ + + + + + + + + + + + + +
- -
+
添加属性 @@ -84,7 +109,7 @@ 取消 - - + + 保存 +
@@ -163,7 +190,7 @@ const SmallTitle = { export default { components: { SmallTitle, DialogForm, BaseInfoForm }, - props: ['sections', 'defaultMode', 'dataId'], // dataId 作为一个通用的存放id的字段 + props: ['sections', 'defaultMode', 'dataId', 'size'], // dataId 作为一个通用的存放id的字段 data() { return { mode: '', @@ -191,7 +218,9 @@ export default { label: '报警编码', // 自动生成 prop: 'code', url: '/base/equipment-group-alarm/getCode', - rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '报警编码不能为空', trigger: 'blur' }, + ], }, { select: true, @@ -201,7 +230,9 @@ export default { { label: '布尔型', value: 2 }, { label: '字符型', value: 1 }, ], - rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '报警类型不能为空', trigger: 'blur' }, + ], }, ], [ @@ -222,13 +253,17 @@ export default { input: true, label: '参数列名', // 在实时数据库的列名 prop: 'plcParamName', - rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '参数列名不能为空', trigger: 'blur' }, + ], }, { input: true, label: '报警内容', prop: 'alarmContent', - rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }], + rules: [ + { required: true, message: '报警内容不能为空', trigger: 'blur' }, + ], }, ], ], @@ -322,7 +357,7 @@ export default { handleSave() { this.$refs['form'][0].validate(async (valid) => { if (valid) { - const isEdit = this.mode == 'edit'; + const isEdit = !this.mode.includes('detail'); await this.$axios({ url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'], method: isEdit ? 'put' : 'post', @@ -403,33 +438,32 @@ export default { }, // 提交属性表 - async submitAttrForm() { - this.$refs['attrForm'].validate((valid) => { + submitAttrForm() { + this.$refs['attrForm'].validate(async (valid) => { if (!valid) { return; } - }); - console.log('this.attrform', this.attrForm); - 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, - }); - - 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, }); - } - this.attrFormSubmitting = false; + + if (res.code == 0) { + this.closeAttrForm(); + this.$message({ + message: `${isEdit ? '更新' : '创建'}成功`, + type: 'success', + duration: 1500, + onClose: () => { + this.getAttrList(); + }, + }); + } + this.attrFormSubmitting = false; + }); }, closeAttrForm() { diff --git a/src/views/equipment/base/config/BindGroup/index.vue b/src/views/equipment/base/config/BindGroup/index.vue index 12b94408..81c2295d 100644 --- a/src/views/equipment/base/config/BindGroup/index.vue +++ b/src/views/equipment/base/config/BindGroup/index.vue @@ -45,6 +45,7 @@ {{ @@ -42,7 +42,8 @@ v-model="form" :rows="formRows" /> --> - + +
+ + + + + + + + + + + + + + +
- -
+
添加属性 @@ -86,7 +113,7 @@ 取消 - - + + 保存 +
@@ -164,7 +193,7 @@ const SmallTitle = { export default { components: { SmallTitle, DialogForm: BaseInfoForm, BaseInfoForm }, - props: ['sections', 'defaultMode', 'infoData'], + props: ['sections', 'defaultMode', 'infoData', 'size'], data() { return { mode: '', @@ -412,7 +441,7 @@ export default { handleSave() { this.$refs['form'][0].validate(async (valid) => { if (valid) { - const isEdit = this.mode == 'edit'; + const isEdit = !this.mode.includes('detail'); await this.$axios({ url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'], method: isEdit ? 'put' : 'post', From 601387184e259d9671bdb62bae5f9dd935750714 Mon Sep 17 00:00:00 2001 From: zwq Date: Fri, 24 Nov 2023 14:32:58 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=93=E5=BA=93bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warehouse/chart/BarChart.vue | 6 +++--- .../end-material/warehouseRealtimeLocation/index.vue | 1 - .../out-material/warehouseRealtimeLocation/index.vue | 1 - .../package-material/warehouseRealtimeLocation/index.vue | 1 - .../part-material/warehouseRealtimeLocation/index.vue | 1 - .../raw-material/warehouseRealtimeLocation/index.vue | 1 - 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/views/warehouse/chart/BarChart.vue b/src/views/warehouse/chart/BarChart.vue index 01e64a95..73b32257 100644 --- a/src/views/warehouse/chart/BarChart.vue +++ b/src/views/warehouse/chart/BarChart.vue @@ -1,5 +1,5 @@ diff --git a/src/views/equipment/monitor/StatusAndParams/index.vue b/src/views/equipment/monitor/StatusAndParams/index.vue index 5bb0dedc..e3f0fe1d 100644 --- a/src/views/equipment/monitor/StatusAndParams/index.vue +++ b/src/views/equipment/monitor/StatusAndParams/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/equipment/base/alarm/Record/SmallTitle.vue b/src/views/equipment/base/alarm/Record/SmallTitle.vue index 93b4a18f..f1f3ecbb 100644 --- a/src/views/equipment/base/alarm/Record/SmallTitle.vue +++ b/src/views/equipment/base/alarm/Record/SmallTitle.vue @@ -40,7 +40,7 @@ $pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px); $mgr: 8px; @each $size, $height in $pxls { .#{$size}-title { - font-size: 18px; + font-size: $height; line-height: $height; color: #000; font-weight: 500; @@ -53,7 +53,7 @@ $mgr: 8px; width: 4px; height: $height + 2px; border-radius: 1px; - margin-right: $mgr; + margin-right: 4px; background-color: #0b58ff; } } diff --git a/src/views/equipment/base/alarm/Record/add-or-updata.vue b/src/views/equipment/base/alarm/Record/add-or-updata.vue deleted file mode 100644 index 77a5123b..00000000 --- a/src/views/equipment/base/alarm/Record/add-or-updata.vue +++ /dev/null @@ -1,195 +0,0 @@ - - - - diff --git a/src/views/equipment/base/alarm/Record/index.vue b/src/views/equipment/base/alarm/Record/index.vue index 9cb27907..12b40011 100644 --- a/src/views/equipment/base/alarm/Record/index.vue +++ b/src/views/equipment/base/alarm/Record/index.vue @@ -45,20 +45,23 @@ :disabled="mode == 'detail'" :has-files="false" :rows="rows" /> --> - +