Преглед изворни кода

Merge branch 'wyf-dev' into 'all'

fix: 修改新建报警配置的默认自定义提醒内容

See merge request skyeye/skyeye_frontend/skyeye-admin!147
yunfeng wu пре 1 година
родитељ
комит
64e70b7d6b
1 измењених фајлова са 13 додато и 11 уклоњено
  1. 13 11
      src/views/message/alarm-config/AlarmConfig.vue

+ 13 - 11
src/views/message/alarm-config/AlarmConfig.vue

@@ -108,7 +108,7 @@
                           maxlength="200"
                           resize="none"
                           :autosize="true"
-                          :placeholder="remark"
+                          :placeholder="REMARK_PLACEHOLDER"
                           show-word-limit
                           type="textarea"
                         />
@@ -154,7 +154,7 @@
     FormRules,
   } from 'element-plus';
   import { InfoFilled } from '@element-plus/icons-vue';
-  import { ref, watch, onMounted, computed } from 'vue';
+  import { ref, watch, onMounted } from 'vue';
   import { useUserStore } from '@/store/modules/user';
   import { useRouter, useRoute } from 'vue-router';
   import {
@@ -187,14 +187,16 @@
   const hasInit = ref(false);
   const AlarmTypes = ref<AvailableAlarmType[]>([]);
 
-  const remark = computed(() => {
-    return (
-      '您好,智能检测到该车间发生【' +
-      (AlarmTypes.value.find((it) => it.id === alarmConfigForm.value.violationType)?.name ||
-        '请选择类型') +
-      '】违规问题,请及时关注并前往处理!'
-    );
-  });
+  // const remark = computed(() => {
+  //   return (
+  //     '您好,智能检测到该车间发生【' +
+  //     (AlarmTypes.value.find((it) => it.id === alarmConfigForm.value.violationType)?.name ||
+  //       '请选择类型') +
+  //     '】违规问题,请及时关注并前往处理!'
+  //   );
+  // });
+
+  const REMARK_PLACEHOLDER = '请及时关注!';
 
   const alarmConfigForm = ref<AlarmConfigForm>({
     violationType: undefined,
@@ -375,7 +377,7 @@
             alarmConfigForm.value.pushPhaseVOList.forEach((vo) => {
               submitConfigForm.value.pushPhaseVOList.find(
                 (it) => it.pushPhase === vo.pushPhase,
-              )!.content = vo.content || remark.value;
+              )!.content = vo.content || REMARK_PLACEHOLDER;
             });
             switch (route.query.operationType) {
               case '1':