From 073a83dbc06df14ef6d93c4b57a0f16f6b4d3595 Mon Sep 17 00:00:00 2001 From: yyhouc <792163605@qq.com> Date: Tue, 11 Apr 2023 10:05:38 +0800 Subject: [PATCH] submit --- src/api/system/dictbiz.js | 87 +++++++++++++++++ src/router/route.js | 67 ++++++------- src/views/system/dic/dialog.vue | 160 ++++++++++---------------------- src/views/system/dic/index.vue | 35 +++---- vite.config.js | 2 +- 5 files changed, 182 insertions(+), 169 deletions(-) create mode 100644 src/api/system/dictbiz.js diff --git a/src/api/system/dictbiz.js b/src/api/system/dictbiz.js new file mode 100644 index 0000000..48cae53 --- /dev/null +++ b/src/api/system/dictbiz.js @@ -0,0 +1,87 @@ +import request from '/@/utils/request'; +var model = 'kn-setting'; +export const getList = (params) => { + return request({ + url: '/api/'+model+'/dict-biz/list', + method: 'get', + params: { + ...params, + } + }) +} + +export const getParentList = (current, size, params) => { + return request({ + url: '/api/'+model+'/dict-biz/parent-list', + method: 'get', + params: { + ...params, + current, + size, + } + }) +} + +export const getChildList = (current, size, parentId, params) => { + return request({ + url: '/api/'+model+'/dict-biz/child-list', + method: 'get', + params: { + ...params, + current, + size, + parentId: parentId, + } + }) +} + +export const remove = (ids) => { + return request({ + url: '/api/'+model+'/dict-biz/remove', + method: 'post', + params: { + ids, + } + }) +} + +export const add = (row) => { + return request({ + url: '/api/'+model+'/dict-biz/submit', + method: 'post', + data: row + }) +} + +export const update = (row) => { + return request({ + url: '/api/'+model+'/dict-biz/submit', + method: 'post', + data: row + }) +} + + +export const getDict = (id) => { + return request({ + url: '/api/'+model+'/dict-biz/detail', + method: 'get', + params: { + id, + } + }) +} +export const getDictTree = () => { + return request({ + url: '/api/'+model+'/dict-biz/tree?code=DICT', + method: 'get' + }) +} + +export const getDictionary = (params) => { + return request({ + url: '/api/'+model+'/dict-biz/dictionary', + method: 'get', + params, + }) +} diff --git a/src/router/route.js b/src/router/route.js index 9f1fdb5..d786fe5 100644 --- a/src/router/route.js +++ b/src/router/route.js @@ -226,22 +226,23 @@ export const dynamicRoutes = [ // }, // ], // }, - // { - // path: '/system', - // name: 'system', - // component: () => import('/@/layout/routerView/parent.vue'), - // redirect: '/system/menu', - // meta: { - // title: '系统设置', - // isLink: '', - // isHide: false, - // isKeepAlive: true, - // isAffix: false, - // isIframe: false, - // roles: ['admin'], - // icon: 'iconfont icon-xitongshezhi', - // }, - // children: [ + { + path: '/system', + name: 'system', + component: () => import('/@/layout/routerView/parent.vue'), + redirect: '/system/menu', + meta: { + title: '系统设置', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + roles: ['admin'], + // icon: 'iconfont icon-xitongshezhi', + zh:"系统设置" + }, + children: [ // { // path: '/system/menu', // name: 'systemMenu', @@ -302,23 +303,23 @@ export const dynamicRoutes = [ // icon: 'ele-OfficeBuilding', // }, // }, - // { - // path: '/system/dic', - // name: 'systemDic', - // component: () => import('/@/views/system/dic/index.vue'), - // meta: { - // title: '字典管理', - // isLink: '', - // isHide: false, - // isKeepAlive: true, - // isAffix: false, - // isIframe: false, - // roles: ['admin'], - // icon: 'ele-SetUp', - // }, - // }, - // ], - // }, + { + path: '/system/dic', + name: 'systemDic', + component: () => import('/@/views/system/dic/index.vue'), + meta: { + title: '字典管理', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + roles: ['admin'], + // icon: 'ele-SetUp', + }, + }, + ], + }, ], }, ]; diff --git a/src/views/system/dic/dialog.vue b/src/views/system/dic/dialog.vue index e6fd117..46aabaa 100644 --- a/src/views/system/dic/dialog.vue +++ b/src/views/system/dic/dialog.vue @@ -1,133 +1,65 @@