From ed377b4ce58913e0d4f33b221906495a3503196f Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 21 Aug 2023 09:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E5=91=8A=E8=AD=A6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/alert.js | 18 ++ src/assets/styles/self-defined.scss | 24 ++ src/views/model/alert/addalertconfig.vue | 258 +++++++++++++++++ src/views/model/alert/index.vue | 19 +- src/views/model/alert/noalertdevices.vue | 273 ++++++++++++++++++ .../{paramalert.vue => noalertparams.vue} | 168 +++-------- src/views/model/params/index.vue | 28 +- 7 files changed, 640 insertions(+), 148 deletions(-) create mode 100644 src/views/model/alert/addalertconfig.vue create mode 100644 src/views/model/alert/noalertdevices.vue rename src/views/model/alert/{paramalert.vue => noalertparams.vue} (63%) diff --git a/src/api/model/alert.js b/src/api/model/alert.js index 7d14fe0..d1ecbeb 100644 --- a/src/api/model/alert.js +++ b/src/api/model/alert.js @@ -69,3 +69,21 @@ export function getNoAlertDevice(query) { params: query }) } + +// 查询警告设备列表 +export function getParamsAlert(query) { + return request({ + url: '/model/dcBusiAlertDevcie/alertDeviceParam', + method: 'post', + params: query + }) +} + +// 查询未添加警告设备列表 +export function getParamsNoAlert(query) { + return request({ + url: '/model/dcBusiAlertDevcie/noAlertDeviceParam', + method: 'post', + params: query + }) +} diff --git a/src/assets/styles/self-defined.scss b/src/assets/styles/self-defined.scss index 6164f11..3721e53 100644 --- a/src/assets/styles/self-defined.scss +++ b/src/assets/styles/self-defined.scss @@ -91,6 +91,8 @@ } } + + .marginbottom{ margin-bottom: 0 !important; } @@ -145,4 +147,26 @@ text-align: center!important; } +} + +.width80percent{ + width: 80%; +} + +.displayinlineblock{ + display: inline-block; +} + +.margintop20{ + margin-top:20px; +} + +.marginleft0{ + margin-left:0px; +} + +.sundivright10percent{ + >div{ + right:10%!important; + } } \ No newline at end of file diff --git a/src/views/model/alert/addalertconfig.vue b/src/views/model/alert/addalertconfig.vue new file mode 100644 index 0000000..13b7f3c --- /dev/null +++ b/src/views/model/alert/addalertconfig.vue @@ -0,0 +1,258 @@ + + + + + diff --git a/src/views/model/alert/index.vue b/src/views/model/alert/index.vue index e9aef0d..c409ff9 100644 --- a/src/views/model/alert/index.vue +++ b/src/views/model/alert/index.vue @@ -500,14 +500,17 @@ function handleSelectionChange(selection) { /** 新增按钮操作 */ function handleAdd() { - loading.value = true; - getNoAlertDevice().then(response=>{ - noAlertDeviceList.value = response.rows; - loading.value = false; - }); - reset(); - open.value = true; - title.value = "添加设备信息"; + // loading.value = true; + // getNoAlertDevice().then(response=>{ + // noAlertDeviceList.value = response.rows; + // loading.value = false; + // }); + // reset(); + // open.value = true; + router.push({ + path:"addalert" + }) + title.value = "添加设备参数告警配置"; } /** 提交按钮 */ diff --git a/src/views/model/alert/noalertdevices.vue b/src/views/model/alert/noalertdevices.vue new file mode 100644 index 0000000..ced14e5 --- /dev/null +++ b/src/views/model/alert/noalertdevices.vue @@ -0,0 +1,273 @@ + + + diff --git a/src/views/model/alert/paramalert.vue b/src/views/model/alert/noalertparams.vue similarity index 63% rename from src/views/model/alert/paramalert.vue rename to src/views/model/alert/noalertparams.vue index fbbd9be..246823d 100644 --- a/src/views/model/alert/paramalert.vue +++ b/src/views/model/alert/noalertparams.vue @@ -25,9 +25,7 @@ @keyup.enter="handleQuery" /> - -
- + + +
- - 新增 - - + + - + - + + - - - - - - - - - + + + + + +
- diff --git a/src/views/model/params/index.vue b/src/views/model/params/index.vue index f0be379..044481a 100644 --- a/src/views/model/params/index.vue +++ b/src/views/model/params/index.vue @@ -220,7 +220,7 @@ - + @@ -368,6 +368,7 @@ const partionDisabled = ref(false); const paramClassCodeSeleted = ref(""); const deviceUuid = router.currentRoute._value.query.deviceUuid; const deviceCode = router.currentRoute._value.query.deviceCode; +const deviceUuidDisabled = ref(true); const contrlFlag = ref([ {label: '可控', value: true, elTagType: 'default', elTagClass: null}, {label: '不可控', value: false, elTagType: 'default', elTagClass: null} @@ -430,15 +431,6 @@ const data = reactive({ enabled: [ { required: true, message: "是否有效不能为空", trigger: "change" } ], - // setDefautvalue: [ - // { required: true, message: "设置值不能为空", trigger: "blur" } - // ], - // setAdjustvalue: [ - // { required: true, message: "偏移量不能为空", trigger: "blur" } - // ], - // validateScope: [ - // { required: true, message: "验证范围;0.0-100.00不能为空", trigger: "blur" } - // ], globalCode: [ { required: true, message: "全局统一编码不能为空", trigger: "blur" } ], @@ -613,8 +605,8 @@ function checkedParamModel(val){ if(item.id == val){ paramClassCodeSeleted.value = item.paramClassCode; if(form.value.partion !== undefined && form.value.partion !== null && form.value.partion !== ""){ - form.value.paramCode = form.value.partion+deviceCode+paramClassCodeSeleted.value; - form.value.globalCode = deviceUuid + "-" + form.value.partion + deviceCode + paramClassCodeSeleted.value; + form.value.paramCode = form.value.partion+form.value.deviceUuid+paramClassCodeSeleted.value; + form.value.globalCode = form.value.deviceUuid + "-" + form.value.partion + form.value.deviceUuid + paramClassCodeSeleted.value; }else{ hintMessage.value = "请选择分区"; } @@ -634,14 +626,20 @@ function toggleCollapse() { function partionChange(val){ if(paramClassCodeSeleted.value !== ""){ - form.value.paramCode = form.value.partion+deviceCode+paramClassCodeSeleted.value; - form.value.globalCode = deviceUuid + "-" + form.value.partion + deviceCode + paramClassCodeSeleted.value; + form.value.paramCode = form.value.partion+form.value.deviceUuid+paramClassCodeSeleted.value; + form.value.globalCode = form.value.deviceUuid + "-" + form.value.partion + form.value.deviceUuid + paramClassCodeSeleted.value; }else{ hintMessage.value = "请选择参数模版"; } } +function avilileEdit(){ + if( deviceUuid === undefined || deviceUuid === null){ + deviceUuidDisabled.value = false; + } +} + getList(); getParamModel(); - +avilileEdit();