Ver Fonte

fix: 回归修复 — RegistrationConfirm/LockCountdown的revaluate事件名typo修正、el-tag类型注解

- RegistrationConfirm.vue: $emit('reevaluate') → $emit('revaluate')(与defineEmits一致)
- index.vue: @reevaluate → @revaluate(事件名匹配LockCountdown/RegistrationConfirm的emit)
- CandidateList.vue: titleTagType 返回值类型收窄为el-tag支持的TagType联合型
- CommandStatus.vue: statusTagType/riskTagType 新增TagType类型声明
ligao há 1 semana atrás
pai
commit
ed4ad4c308

+ 1 - 1
src/views/system/v2Chat/CandidateList.vue

@@ -144,7 +144,7 @@ function displayIndex(list: CandidateDisplay[], idx: number): string {
   return labels[n - 1] ?? String(n);
 }
 
-function titleTagType(title: string): string {
+function titleTagType(title: string): '' | 'success' | 'info' | 'warning' | 'primary' | 'danger' {
   if (title.includes('主任')) return 'danger';
   if (title.includes('副主任')) return 'warning';
   return 'info';

+ 6 - 4
src/views/system/v2Chat/CommandStatus.vue

@@ -231,8 +231,10 @@ function isVersionConflict(e: any): boolean {
 }
 
 // ---- computed ----
-const statusTagType = computed(() => {
-  const map: Record<string, string> = {
+type TagType = '' | 'success' | 'info' | 'warning' | 'primary' | 'danger';
+
+const statusTagType = computed<TagType>(() => {
+  const map: Record<string, TagType> = {
     PREPARED: 'info',
     AWAITING_CONFIRMATION: 'warning',
     EXECUTING: 'warning',
@@ -245,8 +247,8 @@ const statusTagType = computed(() => {
   return map[props.command?.status ?? ''] ?? 'info';
 });
 
-const riskTagType = computed(() => {
-  const map: Record<string, string> = { L0: '', L1: 'warning', L2: 'danger', L3: 'danger' };
+const riskTagType = computed<TagType>(() => {
+  const map: Record<string, TagType> = { L0: '', L1: 'warning', L2: 'danger', L3: 'danger' };
   return map[props.command?.riskLevel ?? ''] ?? '';
 });
 

+ 1 - 1
src/views/system/v2Chat/RegistrationConfirm.vue

@@ -84,7 +84,7 @@
       sub-title="号源可能已被释放,请重新查询"
     >
       <template #extra>
-        <el-button type="primary" @click="$emit('reevaluate')">重新查询</el-button>
+        <el-button type="primary" @click="$emit('revaluate')">重新查询</el-button>
       </template>
     </el-result>
 

+ 2 - 2
src/views/system/v2Chat/index.vue

@@ -180,7 +180,7 @@
           :command="lockCommand"
           @confirm="onLockConfirm"
           @cancel="onLockCancel"
-          @reevaluate="onLockReevaluate"
+          @revaluate="onLockReevaluate"
         />
 
         <!-- 挂号确认 -->
@@ -191,7 +191,7 @@
           @update="onCommandUpdate"
           @retry="onRegistrationRetry"
           @cancel="onRegistrationCancel"
-          @reevaluate="onRegistrationReevaluate"
+          @revaluate="onRegistrationReevaluate"
         />
 
         <!-- Command 确认面板(回退,非主链路时使用) -->