Browse Source

查看规则

CzRger 2 months ago
parent
commit
54d01c4688

+ 5 - 0
src/style/cus.scss

@@ -693,6 +693,11 @@ em {
       color: #ffffff !important;
     }
   }
+  &.is-disabled {
+    .el-select__selected-item:not(.is-transparent) > span {
+      -webkit-text-fill-color: #FFFFFF;
+    }
+  }
 }
 .el-radio-group {
   .el-radio__label {

+ 2 - 1
src/views/web/archive/detail.vue

@@ -9,7 +9,7 @@
     :loading="state.loading"
   >
     <div class="__cus-dialog-form">
-      <CusForm ref="ref_form" label-width="110px">
+      <CusForm ref="ref_form" label-width="110px" :form-view="!noViewCpt">
         <el-col :span="11">
           <CusFormColumn
             :span="24"
@@ -116,6 +116,7 @@ const state: any = reactive({
   },
 })
 const ref_form = ref()
+const noViewCpt = computed(() => props.transfer?.mode !== 'view')
 const titleCpt = computed(() => {
   let t = '查看船舶档案'
   switch (props.transfer.mode) {

+ 13 - 1
src/views/web/config/index.vue

@@ -43,7 +43,12 @@
         >
           <template #default="{ node, data }">
         <span class="custom-tree-node">
-          <span>{{ node.label }}</span>
+          <template v-if="node.level > 1">
+            <span class="__hover" @click.stop="onViewRule(data)">{{ node.label }}</span>
+          </template>
+          <template v-else>
+            <span>{{ node.label }}</span>
+          </template>
           <span class="tree-buttons">
             <template v-if="node.level > 1">
               <div class="tree-button __hover" v-if="!data.enabled" @click.stop="onEditRule(data)">
@@ -296,6 +301,13 @@ const onAddRule = (row) => {
   }
   state.ruleDetail.show = true
 }
+const onViewRule = (row) => {
+  state.ruleDetail.transfer = {
+    mode: 'view',
+    id: row.id,
+  }
+  state.ruleDetail.show = true
+}
 const onEditRule = (row) => {
   state.ruleDetail.transfer = {
     mode: 'edit',

+ 2 - 1
src/views/web/config/rule-detail.vue

@@ -9,7 +9,7 @@
     :loading="state.loading"
   >
     <div class="__cus-dialog-form">
-      <CusForm ref="ref_form" label-width="100px">
+      <CusForm ref="ref_form" label-width="100px" :form-view="!noViewCpt">
         <div class="__cus-title_1">场景设定</div>
         <el-col :span="12">
           <CusFormColumn
@@ -143,6 +143,7 @@ const state: any = reactive({
   paramList: [],
 })
 const ref_form = ref()
+const noViewCpt = computed(() => props.transfer?.mode !== 'view')
 const titleCpt = computed(() => {
   let t = '查看预警规则'
   switch (props.transfer.mode) {