diff --git a/package.json b/package.json index 666b32dc3..e1bd92899 100644 --- a/package.json +++ b/package.json @@ -1,93 +1,94 @@ { - "name": "vue-admin-template", - "version": "4.1.0", - "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", - "author": "Pan ", - "license": "MIT", - "scripts": { - "start": "vue-cli-service serve --open", - "dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve", - "build": "vue-cli-service build --mode production", - "test": "vue-cli-service build --mode staging", - "local": "vue-cli-service build --mode", - "preview": "node build/index.js --preview", - "lint": "eslint --ext .js,.vue src", - "test:unit": "jest --clearCache && vue-cli-service test:unit", - "test:ci": "npm run lint && npm run test:unit", - "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" - }, - "dependencies": { - "axios": "0.18.0", - "echarts": "^4.7.0", - "element-ui": "^2.12.0", - "file-saver": "^1.3.3", - "js-cookie": "2.2.0", - "js-md5": "^0.7.3", - "lodash": "^4.17.11", - "normalize.css": "7.0.0", - "nprogress": "^0.2.0", - "path-to-regexp": "2.4.0", - "qrcode.vue": "^1.6.2", - "qs": "^6.9.3", - "quill-emoji": "^0.1.8", - "quill-image-extend-module": "^1.1.2", - "recordrtc": "^5.5.9", - "script-loader": "^0.7.2", - "sessionstorage": "^0.1.0", - "stompjs": "^2.3.3", - "storejs": "^1.0.25", - "three": "^0.107.0", - "video.js": "^7.8.4", - "vue": "^2.6.10", - "vue-i18n": "^8.12.0", - "vue-quill-editor": "^3.0.6", - "vue-router": "^3.1.6", - "vuedraggable": "^2.24.3", - "vuex": "^3.1.0", - "xlsx": "^0.14.2", - "zrender": "^4.0.4" - }, - "devDependencies": { - "@babel/core": "7.0.0", - "@babel/register": "7.0.0", - "@vue/cli-plugin-babel": "3.6.0", - "@vue/cli-plugin-eslint": "3.6.0", - "@vue/cli-plugin-unit-jest": "3.6.3", - "@vue/cli-service": "3.6.0", - "@vue/test-utils": "1.0.0-beta.29", - "autoprefixer": "^9.5.1", - "babel-core": "7.0.0-bridge.0", - "babel-eslint": "10.0.1", - "babel-jest": "23.6.0", - "babel-plugin-syntax-dynamic-import": "^6.18.0", - "babel-preset-env": "1.6.1", - "babel-preset-stage-2": "6.24.1", - "chalk": "2.4.2", - "compression-webpack-plugin": "^3.1.0", - "connect": "3.6.6", - "copy-webpack-plugin": "^4.5.2", - "eslint": "5.15.3", - "eslint-plugin-vue": "5.2.2", - "file-loader": "^3.0.1", - "html-webpack-plugin": "3.2.0", - "mockjs": "1.0.1-beta3", - "node-sass": "^4.9.0", - "runjs": "^4.3.2", - "sass-loader": "^7.1.0", - "script-ext-html-webpack-plugin": "2.1.3", - "script-loader": "^0.7.2", - "serve-static": "^1.13.2", - "svg-sprite-loader": "4.1.3", - "svgo": "1.2.2", - "vue-template-compiler": "^2.6.11" - }, - "engines": { - "node": ">=8.9", - "npm": ">= 3.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 8" - ] + "name": "vue-admin-template", + "version": "4.1.0", + "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", + "author": "Pan ", + "license": "MIT", + "scripts": { + "start": "vue-cli-service serve --open", + "dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve", + "build": "vue-cli-service build --mode production", + "test": "vue-cli-service build --mode staging", + "local": "vue-cli-service build --mode", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src", + "test:unit": "jest --clearCache && vue-cli-service test:unit", + "test:ci": "npm run lint && npm run test:unit", + "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" + }, + "dependencies": { + "axios": "0.18.0", + "echarts": "^4.7.0", + "element-ui": "^2.12.0", + "file-saver": "^1.3.3", + "js-cookie": "2.2.0", + "js-md5": "^0.7.3", + "lodash": "^4.17.11", + "normalize.css": "7.0.0", + "nprogress": "^0.2.0", + "path-to-regexp": "2.4.0", + "qrcode.vue": "^1.6.2", + "qs": "^6.9.3", + "quill-emoji": "^0.1.8", + "quill-image-extend-module": "^1.1.2", + "recordrtc": "^5.5.9", + "script-loader": "^0.7.2", + "sessionstorage": "^0.1.0", + "stompjs": "^2.3.3", + "storejs": "^1.0.25", + "three": "^0.107.0", + "video.js": "^7.8.4", + "vue": "^2.6.10", + "vue-i18n": "^8.12.0", + "vue-quill-editor": "^3.0.6", + "vue-router": "^3.1.6", + "vuedraggable": "^2.24.3", + "vuex": "^3.1.0", + "wangeditor": "^4.6.17", + "xlsx": "^0.14.2", + "zrender": "^4.0.4" + }, + "devDependencies": { + "@babel/core": "7.0.0", + "@babel/register": "7.0.0", + "@vue/cli-plugin-babel": "3.6.0", + "@vue/cli-plugin-eslint": "3.6.0", + "@vue/cli-plugin-unit-jest": "3.6.3", + "@vue/cli-service": "3.6.0", + "@vue/test-utils": "1.0.0-beta.29", + "autoprefixer": "^9.5.1", + "babel-core": "7.0.0-bridge.0", + "babel-eslint": "10.0.1", + "babel-jest": "23.6.0", + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-preset-env": "1.6.1", + "babel-preset-stage-2": "6.24.1", + "chalk": "2.4.2", + "compression-webpack-plugin": "^3.1.0", + "connect": "3.6.6", + "copy-webpack-plugin": "^4.5.2", + "eslint": "5.15.3", + "eslint-plugin-vue": "5.2.2", + "file-loader": "^3.0.1", + "html-webpack-plugin": "3.2.0", + "mockjs": "1.0.1-beta3", + "node-sass": "^4.9.0", + "runjs": "^4.3.2", + "sass-loader": "^7.1.0", + "script-ext-html-webpack-plugin": "2.1.3", + "script-loader": "^0.7.2", + "serve-static": "^1.13.2", + "svg-sprite-loader": "4.1.3", + "svgo": "1.2.2", + "vue-template-compiler": "^2.6.11" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 8" + ] } diff --git a/src/api/editor.js b/src/api/editor.js new file mode 100644 index 000000000..2fa1e80b6 --- /dev/null +++ b/src/api/editor.js @@ -0,0 +1,68 @@ +import request from '@/utils/request'; +// 获取文章列表 +export function getDoc() { + return request({ + url: `/api/doc`, + method: 'get' + }); +} +// 获取发布内容 +export function getDocById(id) { + return request({ + url: `/api/doc/${id}`, + method: 'get' + }); +} +// 获取草稿列表 +export function getDocDraft() { + return request({ + url: `/api/doc/draft`, + method: 'get' + }); +} +// 创建 +export function postDocDraft(data) { + return request({ + url: `/api/doc/draft`, + method: 'post', + data + }); +} +// 获取草稿数据id +export function getDocDraftById(id) { + return request({ + url: `/api/doc/draft/${id}`, + method: 'get' + }); +} +// 更新草稿数据 +export function putDocDraftById(id, data) { + return request({ + url: `/api/doc/draft/${id}`, + method: 'put', + data + }); +} +// 删除草稿数据 +export function deleteDocDraftById(id) { + return request({ + url: `/api/doc/draft/${id}`, + method: 'delete' + }); +} +// 保存内容根据id +export function putDocDraftByIdData(id, data) { + return request({ + url: `/api/doc/draft/${id}/data`, + method: 'put', + data + }); +} +// 草稿发布 +export function putDocDraftByIdPublish(id) { + return request({ + url: `/api/doc/draft/${id}/publish`, + method: 'put' + }); +} + diff --git a/src/api/upload.js b/src/api/upload.js new file mode 100644 index 000000000..806bb8d7e --- /dev/null +++ b/src/api/upload.js @@ -0,0 +1,25 @@ +import request from '@/utils/request'; + +export const productIdentify = '00001&appSecret=joylink00001'; + +export const pictureUrl = `/api/upload/PICTURE?appId=${productIdentify}`; +// export const modelUrl = `/api/upload/model?appId=${productIdentify}`; + +// export const attachmentUrl = `/api/upload/attachment?appId=${productIdentify}`; +// export const meansUrl = `/api/upload/means?appId=${productIdentify}`; +// export const regulationUrl = `/api/upload/regulation?appId=${productIdentify}`; + +export function getUrl(relatedUrl) { + return `${process.env.VUE_APP_UPLOAD_API}${relatedUrl}`; +} + +export function uploadFile(url, data) { + return request({ + headers: { + 'Content-Type': 'multipart/form-data' + }, + url, + method: 'post', + data: data + }); +} diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index 1868243a4..d73f59f5a 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -91,5 +91,6 @@ export default { publishIBPManage:'publish IBP Manage', publishISCSManage:'publish ISCS Manage', voiceTraining: 'Voice Training', - mapGroup: 'Map Group' + mapGroup: 'Map Group', + drawingMange:'Drawing Mange' }; diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js index eadca6adb..06c69bbe2 100644 --- a/src/i18n/langs/zh/router.js +++ b/src/i18n/langs/zh/router.js @@ -4,6 +4,9 @@ export default { designhomePage: '公共地图', designUserPage: '个人地图', newDesignUserPage: '地图绘制', + newDesignEditor: '编辑器', + newDesignEditorList: '图文列表', + newDesignDraftEditorList: '文章草稿', mapManage: '地图管理', skinManage: '皮肤管理', @@ -96,5 +99,6 @@ export default { publishIBPManage:'发布IBP盘管理', publishISCSManage:'发布ISCS管理', voiceTraining: '语音训练', - mapGroup: '地图分组' + mapGroup: '地图分组', + drawingMange:'图纸管理' }; diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 6a24d028d..8bd2b7f69 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -500,7 +500,6 @@ class Jlmap { oDevice['cutOff'] = sectionA.cutOff; } } - this.$painter.update(oDevice); } else if (elem.deviceType == 'SECTION') { const oDevice = this.mapDevice[code]; diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js index 5f0c5edd2..5f8c3c671 100644 --- a/src/jmapNew/painter.js +++ b/src/jmapNew/painter.js @@ -6,6 +6,7 @@ import transitionDeviceStatus from './constant/stateTransition'; import shapefactory from './shape/factory'; import TransformHandle from './transformHandle'; import TransformHandleScreen from './transformHandleScreen'; +import deviceRender from './constant/deviceRender'; class Painter { constructor(jmap) { @@ -136,6 +137,8 @@ class Painter { const overlapTrainList = this.checkTrainOverlap(device); overlapTrainList.forEach((item, index) => { const trainDevice = this.$jmap.getDeviceByCode(item); + trainDevice._type = deviceRender['Train']._type; + trainDevice.zlevel = deviceRender['Train'].zlevel; trainDevice.overLapIndex = index; trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance); this.add(trainDevice); @@ -223,7 +226,7 @@ class Painter { getShapeTipPoint(instance, opts) { if (instance) { var point = instance.getShapeTipPoint(opts); - if (point) { + if (point) { // 矩阵变换 var transPoint = instance.transformCoordToGlobal(point.x, point.y); return { diff --git a/src/jmapNew/shape/SignalButton/index.js b/src/jmapNew/shape/SignalButton/index.js index e1d8d15e1..6e6abfc47 100644 --- a/src/jmapNew/shape/SignalButton/index.js +++ b/src/jmapNew/shape/SignalButton/index.js @@ -131,6 +131,18 @@ export default class SignalButton extends Group { setShowMode() { } setShowStation(stationCode) { + if (!stationCode || this.model.stationCode === stationCode) { + this.eachChild(item => { + item.show(); + }); + this.isShowShape = true; + this.setState(this.model); + } else { + this.eachChild(item => { + item.hide(); + }); + this.isShowShape = false; + } } getAnchorPoint() { } diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index f15a3da63..db5c0e5bf 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -60,7 +60,6 @@ export default class Train extends Group { this._computed(); const model = this.model; const style = this.style; - if (this.point) { this.trainB = new TrainBody({ zlevel: this.zlevel, @@ -151,7 +150,7 @@ export default class Train extends Group { this.triangle = new ETriangle({ style: this.style, zlevel: this.zlevel, - z: 10, + z: 15, right: this.model.right, point: { x: this.startX, y: this.startY } }); diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index 411b27c86..e18bbe945 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -76,9 +76,9 @@