Parcourir la source

sop通知规则中通知角色和通知模板之间创建选择时加关联判断

wyn il y a 2 mois
Parent
commit
75b3451701

+ 9 - 2
src/views/sopm/sop/NotificationRules.vue

@@ -189,9 +189,16 @@ const getNotifyData = async () => {
       //   .join('<br/>')  // ✅ 多行显示,用 <br/> 拼接
 
       const detailDisplay = (item.notifyConfigDetailRespVOList || [])
-        .filter(d => d.isClient == 1) // 过滤当事人
+        .filter(d => d.status == 1) // 过滤当事人
         .map(d => {
-          const role = `${d.roleName || '未知角色'}(当事人)`; // 这里就直接拼接了
+          // const role = `${d.roleName || '未知角色'}(当事人)`; // 这里就直接拼接了
+          // return `${role}:${d.notifyTemplateName || '-'}`;
+          let role;
+          if (d.isClient == 1) {
+            role = `${d.roleName || '未知角色'}(当事人)`;
+          } else {
+            role = `${d.roleName || '未知角色'}`;
+          }
           return `${role}:${d.notifyTemplateName || '-'}`;
         })
         .join('<br/>');

+ 3 - 2
src/views/sopm/sop/NotificationUpdate.vue

@@ -132,7 +132,7 @@
         </el-table-column>
         <el-table-column label="仅通知当事人" align="center" width="110">
           <template #default="scope">
-            <el-switch v-model="scope.row.isClient" :active-value="1" :inactive-value="0" />
+            <el-switch v-model="scope.row.isClient" :active-value="1" :inactive-value="0" :disabled="scope.row.status !== 1"/>
           </template>
         </el-table-column>
         <el-table-column label="通知模板" align="center">
@@ -140,7 +140,8 @@
             <span>{{ scope.row.notifyTemplateName }}</span>
             <i
               style="margin-left: 8px; color: #409eff; cursor: pointer; font-style: normal"
-              @click="changeTemplate(scope.row)"
+              :style="{ color: scope.row.status !== 1 ? '#ccc' : '#409eff', pointerEvents: scope.row.status !== 1 ? 'none' : 'auto' }"
+              @click="scope.row.status == 1 && changeTemplate(scope.row)"
             >
               {{ scope.row.notifyTemplateName ? '更换' : '选择' }}
             </i>