guhongwei 2 年之前
父节点
当前提交
e2056a64c9
共有 2 个文件被更改,包括 8 次插入6 次删除
  1. 2 2
      src/views/system/module/index.vue
  2. 6 4
      src/views/system/module/menus.vue

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

@@ -73,8 +73,8 @@ const toSearch = (e) => {
 // 状态
 const getDict = (e, model) => {
   if (model == 'is_use') {
-    let data = is_useList.value.find((i) => i.dict_value == e);
-    if (data) return data.dict_label;
+    let data = is_useList.value.find((i) => i.value == e);
+    if (data) return data.label;
     else return '暂无';
   }
 };

+ 6 - 4
src/views/system/module/menus.vue

@@ -18,15 +18,16 @@
             <template #type>
               <el-option v-for="(i, index) in typeList" :key="`t${index}`" :label="i.label" :value="i.value"></el-option>
             </template>
-            <!--     <template #parent_id>
-              <el-option v-for="(i, index) in getOneDimensionList()" :key="`m${index}`" :label="i.name" :value="i._id"></el-option>
-            </template>
             <template #icon>
-              <el-option v-for="i in iconList" :key="i.dict_value" :label="i.dict_label" :value="i.dict_value">
+              <el-option v-for="i in iconList" :key="i.value" :label="i.label" :value="i.value">
                 <span style="float: left" :class="['iconfont', i.dict_label]"></span>
                 <span style="float: right; color: #8492a6; font-size: 13px">{{ i.dict_label }}</span>
               </el-option>
             </template>
+            <!--     <template #parent_id>
+              <el-option v-for="(i, index) in getOneDimensionList()" :key="`m${index}`" :label="i.name" :value="i._id"></el-option>
+            </template>
+          
             <template #status>
               <el-radio-group v-model="form.status">
                 <el-radio label="0">使用</el-radio>
@@ -78,6 +79,7 @@ const typeList: Ref<any> = ref([
   { label: '菜单', value: '1' },
   { label: '子页面', value: '2' }
 ]);
+const iconList: Ref<any> = ref([]);
 // 请求
 onMounted(async () => {
   let id = route.query.id;