desc: 调整剧本加载,删除城市注释

This commit is contained in:
zyy 2019-08-01 15:19:24 +08:00
parent 4be4c87327
commit ff9e69585d
9 changed files with 965 additions and 869 deletions

View File

@ -2,39 +2,46 @@ import request from '@/utils/request';
/** 分页查找仿真任务*/ /** 分页查找仿真任务*/
export function getQuestPageList(params) { export function getQuestPageList(params) {
return request({ return request({
url: `/api/quest/paging`, url: `/api/quest/paging`,
method: 'get', method: 'get',
params: params params: params
}); });
} }
/** 创建任务 */ /** 创建任务 */
export function createQuest(data) { export function createQuest(data) {
return request({ return request({
url: `/api/quest`, url: `/api/quest`,
method: 'post', method: 'post',
data data
}); });
} }
/** 根据任务id删除任务 */ /** 根据任务id删除任务 */
export function deleteQuest(id) { export function deleteQuest(id) {
return request({ return request({
url: `/api/quest/${id}`, url: `/api/quest/${id}`,
method: 'delete' method: 'delete'
}); });
} }
/** 根据id查询任务基础信息 */ /** 根据id查询任务基础信息 */
export function getQuestById(id) { export function getQuestById(id) {
return request({ return request({
url: `/api/quest/${id}`, url: `/api/quest/${id}`,
method: 'get', method: 'get'
}); });
}
/** 根据id查询任务基础信息 */
export function getQuestByIdList(id) {
return request({
url: `/api/quest/${id}/detail`,
method: 'get'
});
} }
/** 更新任务基本信息 */ /** 更新任务基本信息 */
export function updateQuest(id, data) { export function updateQuest(id, data) {
return request({ return request({
url: `/api/quest/${id}`, url: `/api/quest/${id}`,
method: 'put', method: 'put',
data data
}); });
} }

View File

@ -1,8 +1,9 @@
const mapDeviceStyle = { const mapDeviceStyle = {
// '01': 'chengdu_04',
'02': 'fuzhou_01', '02': 'fuzhou_01',
'03': 'bejing_01', '03': 'bejing_01',
'04': 'chengdu_03', '04': 'chengdu_03',
'05': 'batong_01' '05': 'batong_01' // 暂时没有画北京八通线
}; };
export function selectSkinStyle(code) { export function selectSkinStyle(code) {

View File

@ -1,14 +1,14 @@
export function getBaseUrl() { export function getBaseUrl() {
let BASE_API let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud' // BASE_API = 'https://joylink.club/jlcloud'
BASE_API = 'https://test.joylink.club/jlcloud' BASE_API = 'https://test.joylink.club/jlcloud'
// BASE_API = 'http://192.168.3.5:9010' // 袁琪 // BASE_API = 'http://192.168.3.5:9010' // 袁琪
// BASE_API = 'http://192.168.3.6:9010' // 旭强 // BASE_API = 'http://192.168.3.6:9010'; // 旭强
// BASE_API = 'http://192.168.3.4:9010' // 琰培 // BASE_API = 'http://192.168.3.4:9010' // 琰培
} else { } else {
BASE_API = process.env.VUE_APP_BASE_API BASE_API = process.env.VUE_APP_BASE_API;
} }
return BASE_API return BASE_API;
} }

View File

@ -1,137 +1,211 @@
<template> <template>
<el-dialog title="任务列表" :visible.sync="show" top="50px" width="70%" :before-doClose="doClose" <div>
:close-on-click-modal="false"> <el-dialog
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList"> title="任务列表"
</QueryListPage> :visible.sync="show"
top="50px"
width="70%"
:before-do-close="doClose"
:close-on-click-modal="false"
:z-index="2000"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog> </el-dialog>
<el-dialog
title="角色选择"
:visible.sync="roleShow"
top="50px"
width="350px"
:before-do-close="roleDoClose"
:close-on-click-modal="false"
:z-index="5000"
>
<div>
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="50px">
<el-form-item label="角色" prop="role">
<el-select v-model="form.role" placeholder="请选择">
<el-option
v-for="item in memberList"
:key="item.id"
:label="item.name"
:value="item.id"
:disabled="item.role != 'Dispatcher'"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="roleDoClose"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { getQuestPageList } from '@/api/quest'; import { getQuestPageList, getQuestByIdList } from '@/api/quest';
import { getSkinStyleList } from '@/api/management/mapskin' import { getSkinStyleList } from '@/api/management/mapskin';
export default { export default {
name: 'addQuest', name: 'AddQuest',
props: { props: {
trainings: { trainings: {
type: Array, type: Array,
}, default: () => {
detail: { return [];
type: Object, }
} },
}, detail: {
data() { type: Object,
return { default: () => {
show: false, return {};
skinCodeList: [], }
pagerConfig: { }
pageSize: 'pageSize', },
pageIndex: 'pageNum' data() {
}, return {
queryForm: { show: false,
labelWidth: '80px', roleShow: false,
reset: false, skinCodeList: [],
show: false, pagerConfig: {
queryObject: { pageSize: 'pageSize',
pageIndex: 'pageNum'
},
row: {},
memberList: [],
form: {
role: ''
},
rules: {
role: [
{ required: true, message: '请选择', trigger: 'change' }
]
},
queryForm: {
labelWidth: '80px',
reset: false,
show: false,
queryObject: {
} }
}, },
queryList: { queryList: {
query: this.listQuest, query: this.listQuest,
selectCheckShow: false, selectCheckShow: false,
indexShow: true, indexShow: true,
columns: [ columns: [
{ {
title: '任务名称', title: '任务名称',
prop: 'name' prop: 'name'
}, },
{ {
title: '皮肤类型', title: '皮肤类型',
prop: 'skinCode', prop: 'skinCode',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name']) }, columnValue: (row) => { return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
tagType: (row) => { return 'success' } tagType: (row) => { return 'success'; }
}, },
{ {
title: '创建时间', title: '创建时间',
prop: 'createTime', prop: 'createTime'
}, },
{ {
type: 'button', type: 'button',
title: '操作', title: '操作',
width: '250', width: '250',
buttons: [ buttons: [
{ {
name: '加载任务', name: '加载剧本',
type: 'primary', type: 'primary',
handleClick: this.handleLoad handleClick: this.handleLoad
}, }
] ]
} }
], ],
actions: [ actions: [
] ]
}, },
currentModel: {} currentModel: {}
} };
}, },
created() { created() {
this.loadInitData(); this.loadInitData();
}, },
methods: { methods: {
doShow() { doShow() {
this.show = true; this.show = true;
this.reloadTable(); this.reloadTable();
}, },
doClose() { doClose() {
this.show = false; this.show = false;
}, },
listQuest(params) { listQuest(params) {
params['skinCode'] = this.$route.query.skinStyle; params['skinCode'] = this.$route.query.skinStyle;
return getQuestPageList(params); return getQuestPageList(params);
}, },
convertList(FromList, ToList, ChecktypeFunction) { convertList(FromList, ToList, ChecktypeFunction) {
if (FromList) { if (FromList) {
ToList.length = 0; ToList.length = 0;
FromList.forEach(elem => { FromList.forEach(elem => {
if (ChecktypeFunction(elem)) { if (ChecktypeFunction(elem)) {
ToList.push({ value: elem.code, label: elem.name }); ToList.push({ value: elem.code, label: elem.name });
} }
}); });
} }
}, },
async loadInitData() { async loadInitData() {
// //
this.skinCodeList = []; this.skinCodeList = [];
getSkinStyleList().then(response => { getSkinStyleList().then(response => {
this.skinCodeList = response.data; this.skinCodeList = response.data;
}) });
}, },
convertField(fieldValue, enumList, converFormat) { convertField(fieldValue, enumList, converFormat) {
if (converFormat && converFormat.length >= 2) { if (converFormat && converFormat.length >= 2) {
let value = converFormat[0]; const value = converFormat[0];
let label = converFormat[1]; const label = converFormat[1];
for (let i = 0; enumList && i < enumList.length; i++) { for (let i = 0; i < enumList.length; i++) {
if ('' + fieldValue === '' + enumList[i][value]) { if ('' + fieldValue === '' + enumList[i][value]) {
return enumList[i][label]; return enumList[i][label];
} }
} }
} }
}, },
async handleLoad(index, row) {
this.row = row;
const res = await getQuestByIdList(row.id);
if (res.code == 200) {
this.memberList = res.data.memberVOList;
this.memberList.unshift({id: '', name: '观众', role: 'Dispatcher'});
}
this.roleShow = true;
},
handleLoad(index, row) { reloadTable() {
this.$emit('selectQuest', row); if (this.queryList && this.queryList.reload) {
this.doClose(); this.queryList.reload();
}, }
},
reloadTable() { confirm() {
if (this.queryList && this.queryList.reload) { this.$refs['ruleForm'].validate((valid) => {
this.queryList.reload(); if (valid) {
} this.$emit('selectQuest', this.row, this.form.role);
}, this.doClose();
} this.roleDoClose();
} }
</script> });
},
roleDoClose() {
this.$refs['ruleForm'].resetFields();
this.roleShow = false;
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,145 +1,149 @@
<template> <template>
<div class="schema" :style="{top: offset+'px'}"> <div class="schema" :style="{top: offset+'px'}">
<el-select size="small" v-model="swch" v-if="isScript" @change="switchMode" placeholder="请选择产品类型"> <el-select v-if="isScript" v-model="swch" size="small" placeholder="请选择产品类型" @change="switchMode">
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value"> <el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
</el-option> </el-select>
</el-select>
<el-button-group> <el-button-group>
<el-button size="small" @click="viewRunQuest" v-if="isDemon" :disabled="viewDisabled" type="success">加载任务 <el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">加载剧本
</el-button> </el-button>
<el-button size="small" @click="viewRunPlan" v-if="runing" :disabled="viewDisabled">运行图预览</el-button> <el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">运行图预览</el-button>
<el-button size="small" @click="loadRunPlan" v-if="!runing && !isPlan" :disabled="viewDisabled" <el-button
type="warning">运行图加载</el-button> v-if="!runing && !isPlan"
<el-button size="small" @click="setFault" v-if="mode==OperateMode.FAULT" type="danger">故障设置</el-button> size="small"
</el-button-group> :disabled="viewDisabled"
type="warning"
@click="loadRunPlan"
>运行图加载</el-button>
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">故障设置</el-button>
</el-button-group>
<el-radio-group size="small" v-model="mode" v-if="!isPlan" @change="changeOperateMode(mode)"> <el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-button class="mode" :label="OperateMode.NORMAL">正常操作</el-radio-button> <el-radio-button class="mode" :label="OperateMode.NORMAL">正常操作</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">故障操作</el-radio-button> <el-radio-button class="mode" :label="OperateMode.FAULT">故障操作</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode, TrainingMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { getStationListBySkinStyle, queryRunPlan } from '@/api/runplan'; import { getStationListBySkinStyle, queryRunPlan } from '@/api/runplan';
import { getEveryDayRunPlanData } from '@/api/simulation'; import { getEveryDayRunPlanData } from '@/api/simulation';
export default { export default {
name: 'MenuSchema', name: 'MenuSchema',
props: { props: {
group: { group: {
type: String, type: String,
required: true required: true
}, },
offset: { offset: {
type: Number, type: Number,
required: true required: true
} }
}, },
data() { data() {
return { return {
mode: OperateMode.NORMAL, mode: OperateMode.NORMAL,
OperateMode: OperateMode, OperateMode: OperateMode,
viewDisabled: true, viewDisabled: true,
runing: false, runing: false,
swch: '02', swch: '02',
swchList: [ swchList: [
{ value: '01', name: '现地' }, { value: '01', name: '现地' },
{ value: '02', name: '行调' }, { value: '02', name: '行调' }
] ]
} };
}, },
computed: { computed: {
...mapGetters('runPlan', [ ...mapGetters('runPlan', [
'stations', 'stations'
]), ]),
isPlan() { isPlan() {
return this.$route.params.mode === 'plan'; return this.$route.params.mode === 'plan';
}, },
isScript() { isScript() {
return this.$route.params.mode === 'script'; return this.$route.params.mode === 'script';
}, },
isDemon() { isDemon() {
return this.$route.params.mode === 'demon'; return this.$route.params.mode === 'demon';
}, }
}, },
watch: { watch: {
'$store.state.training.started': function (val) { '$store.state.training.started': function (val) {
this.setRuning(val); this.setRuning(val);
}, },
'$store.state.training.switchcount': async function () { '$store.state.training.switchcount': async function () {
if (this.group) { if (this.group) {
let started = this.$store.state.training.started; const started = this.$store.state.training.started;
if (started) { if (started) {
await this.loadRunData(this.$route.query); await this.loadRunData(this.$route.query);
} }
} }
}, }
}, },
async mounted() { async mounted() {
await this.loadRunData(this.$route.query); await this.loadRunData(this.$route.query);
}, },
methods: { methods: {
loadRunData(opt) { loadRunData(opt) {
this.$store.dispatch('runPlan/clear').then(() => { this.$store.dispatch('runPlan/clear').then(() => {
if (opt && opt.skinStyle) { if (opt && opt.skinStyle) {
this.viewDisabled = true; this.viewDisabled = true;
getStationListBySkinStyle(opt.skinStyle).then(response => { getStationListBySkinStyle(opt.skinStyle).then(response => {
this.$store.dispatch('runPlan/setStations', response.data).then(() => { this.$store.dispatch('runPlan/setStations', response.data).then(() => {
if (this.$route.params.mode == 'plan') { if (this.$route.params.mode == 'plan') {
// //
queryRunPlan(this.$route.query.planId).then(resp => { queryRunPlan(this.$route.query.planId).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data); this.$store.dispatch('runPlan/setPlanData', resp.data);
this.viewDisabled = false; this.viewDisabled = false;
}).catch(error => { }).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []); this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(`获取运行图数据失败`); this.$messageBox(`获取运行图数据失败`);
}) });
} else { } else {
getEveryDayRunPlanData(this.group).then(resp => { getEveryDayRunPlanData(this.group).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data); this.$store.dispatch('runPlan/setPlanData', resp.data);
this.viewDisabled = false; this.viewDisabled = false;
}).catch(error => { }).catch(error => {
this.$store.dispatch('runPlan/setPlanData', []); this.$store.dispatch('runPlan/setPlanData', []);
if (error.code == 30001) { if (error.code == 30001) {
this.$messageBox(`今日运行图未加载`); this.$messageBox(`今日运行图未加载`);
} else { } else {
this.$messageBox(`获取运行图数据失败`); this.$messageBox(`获取运行图数据失败`);
} }
}) });
} }
}) });
}).catch(error => { }).catch(() => {
this.$messageBox(`获取车站列表失败`); this.$messageBox(`获取车站列表失败`);
}); });
} }
}) });
}, },
changeOperateMode(handle) { changeOperateMode(handle) {
this.$store.dispatch('training/changeOperateMode', { mode: handle }); this.$store.dispatch('training/changeOperateMode', { mode: handle });
}, },
setRuning(run) { setRuning(run) {
this.runing = run; this.runing = run;
}, },
setFault() { setFault() {
this.$emit('faultChooseShow') this.$emit('faultChooseShow');
}, },
loadRunPlan() { loadRunPlan() {
this.$emit('runPlanLoadShow'); this.$emit('runPlanLoadShow');
}, },
viewRunPlan() { viewRunPlan() {
this.$emit('runPlanViewShow'); this.$emit('runPlanViewShow');
}, },
viewRunQuest() { viewRunQuest() {
this.$emit('runQuestLoadShow'); this.$emit('runQuestLoadShow');
}, },
switchMode(swch) { switchMode(swch) {
this.$emit('switchMode', swch); this.$emit('switchMode', swch);
} }
} }
} };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.schema { .schema {
@ -152,4 +156,4 @@
/deep/ .el-button+.el-button { /deep/ .el-button+.el-button {
margin-left: 0px; margin-left: 0px;
} }
</style> </style>

View File

@ -1,85 +1,84 @@
<template> <template>
<div class="reminder-drag" v-drag> <div v-drag class="reminder-drag">
<div class="reminder-box" ref="drapBox"> <div ref="drapBox" class="reminder-box">
<div class="tip-title"> <div class="tip-title">
<i class="icon el-icon-minus" @click="shrink" v-show="isShrink"></i> <i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
<i class="icon el-icon-plus" @click="shrink" v-show="!isShrink"></i> <i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
<p style="color: #fff;" v-if="isShrink"> <p v-if="isShrink" style="color: #fff;">
<span>{{ formModel.name }}</span> <span>{{ formModel.name }}</span>
</p> </p>
</div> </div>
<div class="tip-body-box" ref="dragBody"> <div ref="dragBody" class="tip-body-box">
<div class="tip-body"> <div class="tip-body">
<el-scrollbar wrapClass="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<p class="list-item"> <p class="list-item">
<span class="list-label">任务描述</span> <span class="list-label">任务描述</span>
<span class="list-elem">{{ formModel.description }}</span> <span class="list-elem">{{ formModel.description }}</span>
</p> </p>
</el-scrollbar> </el-scrollbar>
</div>
<div class="drag-right"></div>
<div class="drag-left"></div>
<div class="drag-bottom"></div>
<div class="drag-top"></div>
</div>
</div> </div>
<div class="drag-right" />
<div class="drag-left" />
<div class="drag-bottom" />
<div class="drag-top" />
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { getQuestById } from '@/api/quest';
import { getQuestById } from '@/api/quest';
export default { export default {
name: 'TipQuestDetail', name: 'TipQuestDetail',
props: { props: {
questId: { questId: {
type: Number, type: Number,
required: true required: true
} }
}, },
data() { data() {
return { return {
isShrink: true, isShrink: true,
formModel: { formModel: {
name: '', name: '',
description: '' description: ''
} }
} };
}, },
computed: { computed: {
}, },
watch: { watch: {
'questId': function (val) { 'questId': function (val) {
this.loadInitData(val); this.loadInitData(val);
} }
}, },
mounted() { }, mounted() { },
methods: { methods: {
loadInitData(questId) { loadInitData(questId) {
if (questId) { if (questId) {
getQuestById(questId).then(resp => { getQuestById(questId).then(resp => {
this.formModel = resp.data; this.formModel = resp.data;
}).catch(error => { }).catch(() => {
this.$messageBox('获取任务信息失败'); this.$messageBox('获取任务信息失败');
}); });
} }
}, },
shrink() { shrink() {
let height = this.$refs.dragBody.offsetHeight + 40; const height = this.$refs.dragBody.offsetHeight + 40;
let top = this.$refs.drapBox.style.top; const top = this.$refs.drapBox.style.top;
if (this.isShrink) { if (this.isShrink) {
this.$refs.drapBox.style.height = '40px'; this.$refs.drapBox.style.height = '40px';
this.$refs.drapBox.style.top = ''; this.$refs.drapBox.style.top = '';
this.isShrink = false; this.isShrink = false;
} else { } else {
this.$refs.drapBox.style.height = height + 'px'; this.$refs.drapBox.style.height = height + 'px';
this.$refs.drapBox.style.top = top; this.$refs.drapBox.style.top = top;
this.isShrink = true; this.isShrink = true;
} }
} }
} }
} };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
@ -201,4 +200,4 @@
} }
} }
} }
</style> </style>

View File

@ -215,11 +215,11 @@ export default {
}, },
initLoadData() { initLoadData() {
this.cityList = []; this.cityList = [];
// this.$Dictionary.cityType().then(list => { this.$Dictionary.cityType().then(list => {
// this.cityList = list; this.cityList = list;
// }).catch(() => { }).catch(() => {
// this.$messageBox(''); this.$messageBox('加载城市列表失败');
// }); });
this.skinStyleList = []; this.skinStyleList = [];
getSkinStyleList().then(response => { getSkinStyleList().then(response => {

View File

@ -1,15 +1,15 @@
'use strict' ;
// import { getBasePathConfig } from '@/utils/baseUrl' // import { getBasePathConfig } from '@/utils/baseUrl'
const path = require('path') const path = require('path');
const defaultSettings = require('./src/settings.js') const defaultSettings = require('./src/settings.js');
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir) return path.join(__dirname, dir);
} }
const name = defaultSettings.title // page title const name = defaultSettings.title; // page title
const port = 9527 // dev port const port = 9527; // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/ // All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = { module.exports = {
@ -56,14 +56,14 @@ module.exports = {
} }
}, },
chainWebpack(config) { chainWebpack(config) {
config.plugins.delete('preload') // TODO: need test config.plugins.delete('preload'); // TODO: need test
config.plugins.delete('prefetch') // TODO: need test config.plugins.delete('prefetch'); // TODO: need test
// set svg-sprite-loader // set svg-sprite-loader
config.module config.module
.rule('svg') .rule('svg')
.exclude.add(resolve('src/icons')) .exclude.add(resolve('src/icons'))
.end() .end();
config.module config.module
.rule('icons') .rule('icons')
.test(/\.svg$/) .test(/\.svg$/)
@ -74,7 +74,7 @@ module.exports = {
.options({ .options({
symbolId: 'icon-[name]' symbolId: 'icon-[name]'
}) })
.end() .end();
// set preserveWhitespace // set preserveWhitespace
config.module config.module
@ -82,16 +82,16 @@ module.exports = {
.use('vue-loader') .use('vue-loader')
.loader('vue-loader') .loader('vue-loader')
.tap(options => { .tap(options => {
options.compilerOptions.preserveWhitespace = true options.compilerOptions.preserveWhitespace = true;
return options return options;
}) })
.end() .end();
config config
// https://webpack.js.org/configuration/devtool/#development // https://webpack.js.org/configuration/devtool/#development
.when(process.env.NODE_ENV === 'development', .when(process.env.NODE_ENV === 'development',
config => config.devtool('cheap-source-map') config => config.devtool('cheap-source-map')
) );
config config
.when(process.env.NODE_ENV !== 'development', .when(process.env.NODE_ENV !== 'development',
@ -103,7 +103,7 @@ module.exports = {
// `runtime` must same as runtimeChunk name. default is `runtime` // `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/ inline: /runtime\..*\.js$/
}]) }])
.end() .end();
config config
.optimization.splitChunks({ .optimization.splitChunks({
chunks: 'all', chunks: 'all',
@ -127,9 +127,9 @@ module.exports = {
reuseExistingChunk: true reuseExistingChunk: true
} }
} }
}) });
config.optimization.runtimeChunk('single') config.optimization.runtimeChunk('single');
} }
) );
} }
} };