Переглянути джерело

feat: 调整party Ids筛选项

Jack Zhou 2 тижнів тому
батько
коміт
0b12fd25a5

+ 9 - 7
src/views/TemplateManagement/src/TemplateManagement.vue

@@ -70,6 +70,7 @@ const changeData = (val: string[]) => {
 interface ListItem {
   label: string
   id: string
+  code: string
 }
 
 const options = ref<ListItem[]>([])
@@ -92,6 +93,7 @@ const remoteMethod = (query: string) => {
       if (!newController.signal.aborted && res.code === 200) {
         options.value = (res.data || []).map((item) => ({
           id: item.id,
+          code: item.code,
           label: item.label
         }))
       }
@@ -185,13 +187,13 @@ onUnmounted(() => {
           >
             <el-option
               v-for="item in options"
-              :key="item.id + item.label"
-              :label="item.id"
-              :value="item.id"
+              :key="item.code"
+              :label="item.code"
+              :value="item.code"
             >
               <div class="select-option">
-                <el-checkbox :model-value="queryData.party_id.includes(item.id)">
-                  <span class="text-ellipsis" style="width: 260px">{{ item.id }}</span>
+                <el-checkbox :model-value="queryData.party_id.includes(item.code)">
+                  <span class="text-ellipsis" style="width: 240px">{{ item.code }}</span>
                 </el-checkbox>
               </div>
             </el-option>
@@ -238,8 +240,8 @@ onUnmounted(() => {
 .party-id-tips-filter {
   flex: 1;
   height: 30px;
-  width: 320px;
-  max-width: 320px;
+  width: 280px;
+  max-width: 280px;
   margin-right: 8px;
   :deep(.el-tag) {
     max-width: 220px !important;