Commit 70f859f6 by 姜雷

修改服务类型获取

parent 3b4d2c11
VUE_APP_BASE_URL=/systemManageShell/
VUE_APP_LIB_BASE_URL=/systemManageShell/
VUE_APP_CUSTOMER_MENU_CODE=0001
VUE_APP_BASE_MENU_CODE=0002
VUE_APP_SYSTEM_MENU_CODE=0003
......
......@@ -5,7 +5,7 @@
"author": "kuangshu <252019869@qq.com>",
"private": true,
"scripts": {
"dev": "vue-cli-service serve --port 8891",
"dev": "vue-cli-service serve ./src/develop.js --port 8891",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "vue-cli-service build --modern",
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"></script>
<link
rel="stylesheet"
href="<%= VUE_APP_LIB_MANAGER %>/customerManage/lib/customerManage.css"
/>
<link
rel="stylesheet"
href="<%= VUE_APP_LIB_MANAGER %>/baseManage/lib/baseManage.css"
/>
<link
rel="stylesheet"
href="<%= VUE_APP_LIB_MANAGER %>/systemManage/lib/systemManage.css"
/>
<title>系统管理</title>
</head>
<body>
<noscript>
<strong
>We're sorry but hello-world doesn't work properly without JavaScript
enabled. Please enable it to continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script src="<%= VUE_APP_LIB_MANAGER %>/customerManage/lib/customerManage.umd.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/baseManage/lib/baseManage.umd.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/systemManage/lib/systemManage.umd.js"></script>
</html>
......@@ -8,6 +8,11 @@
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %><%= VUE_APP_LIB_BASE_URL %>lib/manageShell.umd.js"></script>
<link
rel="stylesheet"
href="<%= VUE_APP_LIB_MANAGER %><%= VUE_APP_LIB_BASE_URL %>lib/manageShell.css"
/>
<script src="<%= VUE_APP_LIB_MANAGER %>/customerManage/lib/customerManage.umd.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/baseManage/lib/baseManage.umd.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/systemManage/lib/systemManage.umd.js"></script>
......
......@@ -8,8 +8,8 @@
<el-option
v-for="(item, index) in serviceTypeLists[ServiceType]"
:key="index"
:value="item.id"
:label="item.serviceName"
:value="item.value"
:label="item.name"
></el-option>
</el-select>
</template>
......
......@@ -27,15 +27,19 @@ const actions = {
return fetchServiceList({
params: { serviceType },
}).then(res => {
const { selfService } = res;
commit(SERVICE_TYPE_LIST, { list: selfService, index: serviceType });
commit(FETCH_STATE, false);
console.log(res);
const { data } = res;
commit(SERVICE_TYPE_LIST, { list: data, index: serviceType });
commit(FETCH_STATE, { value: false, index: serviceType });
});
},
};
const mutations = {
[SERVICE_TYPE_LIST](state, { list, index }) {
console.log(index, list);
state.lists[index] = list;
},
[FETCH_STATE](state, { value, index }) {
......
import System from './lib/main';
window.manageShell = { default: System };
setTimeout(() => {
let allAasyncRouterMap = [
...customerManage.default,
...baseManage.default,
...systemManage.default,
];
System.createSystem({
basePath: process.env.VUE_APP_BASE_URL,
routers: allAasyncRouterMap,
routeFilter: (routes, allRoute) => {
if (allRoute && allRoute.length) {
let addRoute = System.utils.route.formatRouteLink(allRoute);
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
if (element.children) {
routes = routes.concat(element.children);
}
}
}
return {
allRoute,
routes,
};
},
});
}, 1000);
import System from './lib/main';
let allAasyncRouterMap = [
...customerManage.default,
...baseManage.default,
...systemManage.default,
];
const System = manageShell.default;
System.createSystem({
basePath: process.env.VUE_APP_BASE_URL,
routers: allAasyncRouterMap,
......
......@@ -8,6 +8,7 @@ let isLib = (() => {
return false;
}
})();
console.log(process.env.NODE_ENV == 'development');
module.exports = {
publicPath: process.env.VUE_APP_BASE_URL,
......@@ -21,4 +22,12 @@ module.exports = {
},
],
},
chainWebpack: config => {
config.plugin('html').tap(args => {
if (process.env.NODE_ENV == 'development') {
args[0].template = Path.join('public', 'develop.html');
}
return args;
});
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment