瀏覽代碼

Merge branch 'feature_241128_lujl' of http://git.cestong.com.cn/cecf/observe-admin into feature_241128_lujl

lujialiang 1 周之前
父節點
當前提交
44be06f7e4
共有 1 個文件被更改,包括 8 次插入12 次删除
  1. 8 12
      src/views/admin/sys-menu/modules/menu-operate-modal.vue

+ 8 - 12
src/views/admin/sys-menu/modules/menu-operate-modal.vue

@@ -7,7 +7,6 @@ import { fetchAddMenu, fetchGetMenuDetail, fetchGetMenuList, fetchGetSysApiList,
 import { getLocalIcons } from '@/utils/icon';
 import { SimpleScrollbar } from '@sa/materials';
 import { computed, nextTick, reactive, ref, watch } from 'vue';
-import { useRouteStore } from '@/store/modules/route';
 // import {
 //   getLayoutAndPage,
 //   getPathParamFromRoutePath,
@@ -24,7 +23,6 @@ defineOptions({
 });
 const menuOptions = ref([])
 const sysapiList = ref([])
-const routeStore = useRouteStore();
 export type OperateType = AntDesign.TableOperateType | 'addChild';
 interface Option {
   label: string;
@@ -107,11 +105,10 @@ function createDefaultModel(): Model {
   };
 }
 
-type RuleKey = Extract<keyof Model, 'title' | 'path' >;
+type RuleKey = Extract<keyof Model, 'title' >;
 
 const rules: Record<RuleKey, App.Global.FormRule> = {
-  title: defaultRequiredRule,
-  path: defaultRequiredRule
+  title: defaultRequiredRule
 };
 
 const isEdit = computed(() => props.operateType === 'edit');
@@ -257,7 +254,6 @@ async function handleSubmit() {
   } else {
     window.$message?.error(res.msg || '更新失败!');
   }
-  await routeStore.initAuthRoute();
 
   closeDrawer();
   emit('submitted');
@@ -356,7 +352,7 @@ watch(visible, () => {
               </AFormItem>
             </ACol>
 
-            <!-- <ACol :lg="12" :xs="24" v-if="model.menuType == 'M' || model.menuType == 'C'">
+            <ACol :lg="12" :xs="24" v-if="model.menuType == 'M' || model.menuType == 'C'">
               <AFormItem  name="menuName" >
                 <template #label>
                   <span class="marginRight5">{{ $t('page.manage.menu.routeName') }}</span>
@@ -379,14 +375,14 @@ watch(visible, () => {
                 </template>
                 <AInput v-model:value="model.component"  :placeholder="$t('page.manage.menu.form.routePath')" allowClear/>
               </AFormItem>
-            </ACol> -->
+            </ACol>
 
             <ACol :lg="12" :xs="24"  v-if="model.menuType != 'F'">
               <AFormItem label="路由地址" name="path">
                 <AInput v-model:value="model.path" placeholder="请输入路由地址" allowClear/>
               </AFormItem>
             </ACol>
-            <!-- <ACol :lg="12" :xs="24"  v-if="showLayout">
+            <ACol :lg="12" :xs="24"  v-if="showLayout">
               <AFormItem :label="$t('page.manage.menu.layout')" name="layout">
                 <ASelect
                   v-model:value="model.layout"
@@ -395,7 +391,7 @@ watch(visible, () => {
                   allowClear
                 />
               </AFormItem>
-            </ACol> -->
+            </ACol>
 
             <!-- <ACol :lg="12" :xs="24">
               <AFormItem :label="$t('page.manage.menu.i18nKey')" name="i18nKey">
@@ -445,7 +441,7 @@ watch(visible, () => {
                 </ARadioGroup>
               </AFormItem>
             </ACol>
-            <!-- <ACol :lg="12" :xs="24"  v-if="model.menuType == 'M' || model.menuType == 'C'">
+            <ACol :lg="12" :xs="24"  v-if="model.menuType == 'M' || model.menuType == 'C'">
               <AFormItem  name="isFrame">
                 <template #label>
                   <span class="marginRight5">{{ $t('page.manage.menu.href') }}</span>
@@ -459,7 +455,7 @@ watch(visible, () => {
                   <ARadio value="1">{{ $t('common.yesOrNo.no') }}</ARadio>
                 </ARadioGroup>
               </AFormItem>
-            </ACol> -->
+            </ACol>
 
             <ACol :lg="12" :xs="24" v-if="model.menuType == 'F' || model.menuType == 'C'" >
               <AFormItem name="component">