From ff9e69585d92016e1d28dd9ccae0b57b1e84de52 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 1 Aug 2019 15:19:24 +0800 Subject: [PATCH] =?UTF-8?q?desc:=20=E8=B0=83=E6=95=B4=E5=89=A7=E6=9C=AC?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=EF=BC=8C=E5=88=A0=E9=99=A4=E5=9F=8E=E5=B8=82?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quest.js | 53 +- src/jmap/config/deviceStyle.js | 3 +- src/utils/baseUrl.js | 8 +- src/views/display/demon/addQuest.vue | 324 +++++--- src/views/display/index.vue | 969 +++++++++++----------- src/views/display/menuSchema.vue | 278 ++++--- src/views/display/tipQuestDetail.vue | 151 ++-- src/views/map/mapdraft/mapmanage/edit.vue | 10 +- vue.config.js | 38 +- 9 files changed, 965 insertions(+), 869 deletions(-) diff --git a/src/api/quest.js b/src/api/quest.js index 6491751e3..690ec938f 100644 --- a/src/api/quest.js +++ b/src/api/quest.js @@ -2,39 +2,46 @@ import request from '@/utils/request'; /** 分页查找仿真任务*/ export function getQuestPageList(params) { - return request({ - url: `/api/quest/paging`, - method: 'get', - params: params - }); + return request({ + url: `/api/quest/paging`, + method: 'get', + params: params + }); } /** 创建任务 */ export function createQuest(data) { - return request({ - url: `/api/quest`, - method: 'post', - data - }); + return request({ + url: `/api/quest`, + method: 'post', + data + }); } /** 根据任务id删除任务 */ export function deleteQuest(id) { - return request({ - url: `/api/quest/${id}`, - method: 'delete' - }); + return request({ + url: `/api/quest/${id}`, + method: 'delete' + }); } /** 根据id查询任务基础信息 */ export function getQuestById(id) { - return request({ - url: `/api/quest/${id}`, - method: 'get', - }); + return request({ + url: `/api/quest/${id}`, + method: 'get' + }); +} +/** 根据id查询任务基础信息 */ +export function getQuestByIdList(id) { + return request({ + url: `/api/quest/${id}/detail`, + method: 'get' + }); } /** 更新任务基本信息 */ export function updateQuest(id, data) { - return request({ - url: `/api/quest/${id}`, - method: 'put', - data - }); + return request({ + url: `/api/quest/${id}`, + method: 'put', + data + }); } diff --git a/src/jmap/config/deviceStyle.js b/src/jmap/config/deviceStyle.js index 207dcb820..93bc1b125 100644 --- a/src/jmap/config/deviceStyle.js +++ b/src/jmap/config/deviceStyle.js @@ -1,8 +1,9 @@ const mapDeviceStyle = { + // '01': 'chengdu_04', '02': 'fuzhou_01', '03': 'bejing_01', '04': 'chengdu_03', - '05': 'batong_01' + '05': 'batong_01' // 暂时没有画北京八通线 }; export function selectSkinStyle(code) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index d4448b37e..3f8bc9aeb 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -1,14 +1,14 @@ export function getBaseUrl() { - let BASE_API + let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud' BASE_API = 'https://test.joylink.club/jlcloud' // 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' // 琰培 } else { - BASE_API = process.env.VUE_APP_BASE_API + BASE_API = process.env.VUE_APP_BASE_API; } - return BASE_API + return BASE_API; } diff --git a/src/views/display/demon/addQuest.vue b/src/views/display/demon/addQuest.vue index 6c93cd7e4..d66c957cc 100644 --- a/src/views/display/demon/addQuest.vue +++ b/src/views/display/demon/addQuest.vue @@ -1,137 +1,211 @@ \ No newline at end of file + confirm() { + this.$refs['ruleForm'].validate((valid) => { + if (valid) { + this.$emit('selectQuest', this.row, this.form.role); + this.doClose(); + this.roleDoClose(); + } + }); + }, + + roleDoClose() { + this.$refs['ruleForm'].resetFields(); + this.roleShow = false; + } + } +}; + diff --git a/src/views/display/index.vue b/src/views/display/index.vue index 640b6570c..f7ce253bd 100644 --- a/src/views/display/index.vue +++ b/src/views/display/index.vue @@ -1,525 +1,536 @@ \ No newline at end of file + diff --git a/src/views/display/menuSchema.vue b/src/views/display/menuSchema.vue index 4876d3757..c6e58933f 100644 --- a/src/views/display/menuSchema.vue +++ b/src/views/display/menuSchema.vue @@ -1,145 +1,149 @@ \ No newline at end of file + diff --git a/src/views/display/tipQuestDetail.vue b/src/views/display/tipQuestDetail.vue index e46d91c86..61a6d5944 100644 --- a/src/views/display/tipQuestDetail.vue +++ b/src/views/display/tipQuestDetail.vue @@ -1,85 +1,84 @@ \ No newline at end of file + diff --git a/src/views/map/mapdraft/mapmanage/edit.vue b/src/views/map/mapdraft/mapmanage/edit.vue index facdba2f5..f02838695 100644 --- a/src/views/map/mapdraft/mapmanage/edit.vue +++ b/src/views/map/mapdraft/mapmanage/edit.vue @@ -215,11 +215,11 @@ export default { }, initLoadData() { this.cityList = []; - // this.$Dictionary.cityType().then(list => { - // this.cityList = list; - // }).catch(() => { - // this.$messageBox('加载城市列表失败'); - // }); + this.$Dictionary.cityType().then(list => { + this.cityList = list; + }).catch(() => { + this.$messageBox('加载城市列表失败'); + }); this.skinStyleList = []; getSkinStyleList().then(response => { diff --git a/vue.config.js b/vue.config.js index d17fb6992..7ad04f226 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,15 +1,15 @@ -'use strict' +; // import { getBasePathConfig } from '@/utils/baseUrl' -const path = require('path') -const defaultSettings = require('./src/settings.js') +const path = require('path'); +const defaultSettings = require('./src/settings.js'); function resolve(dir) { - return path.join(__dirname, dir) + return path.join(__dirname, dir); } -const name = defaultSettings.title // page title -const port = 9527 // dev port +const name = defaultSettings.title; // page title +const port = 9527; // dev port // All configuration item explanations can be find in https://cli.vuejs.org/config/ module.exports = { @@ -56,14 +56,14 @@ module.exports = { } }, chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test + config.plugins.delete('preload'); // TODO: need test + config.plugins.delete('prefetch'); // TODO: need test // set svg-sprite-loader config.module .rule('svg') .exclude.add(resolve('src/icons')) - .end() + .end(); config.module .rule('icons') .test(/\.svg$/) @@ -74,7 +74,7 @@ module.exports = { .options({ symbolId: 'icon-[name]' }) - .end() + .end(); // set preserveWhitespace config.module @@ -82,16 +82,16 @@ module.exports = { .use('vue-loader') .loader('vue-loader') .tap(options => { - options.compilerOptions.preserveWhitespace = true - return options + options.compilerOptions.preserveWhitespace = true; + return options; }) - .end() + .end(); config // https://webpack.js.org/configuration/devtool/#development .when(process.env.NODE_ENV === 'development', config => config.devtool('cheap-source-map') - ) + ); config .when(process.env.NODE_ENV !== 'development', @@ -103,7 +103,7 @@ module.exports = { // `runtime` must same as runtimeChunk name. default is `runtime` inline: /runtime\..*\.js$/ }]) - .end() + .end(); config .optimization.splitChunks({ chunks: 'all', @@ -127,9 +127,9 @@ module.exports = { reuseExistingChunk: true } } - }) - config.optimization.runtimeChunk('single') + }); + config.optimization.runtimeChunk('single'); } - ) + ); } -} +};