From 901fa60bc42916d23d9f3f9e68eb00c6b31261fe Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 18 Dec 2020 15:37:35 +0800 Subject: [PATCH 01/27] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=81=93=E5=B2=94?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Section/index.js | 4 +- .../newMapdraft/mapoperate/section/index.vue | 5 +- .../newMapdraft/mapoperate/switch/create.vue | 287 +++++++++++++++--- 3 files changed, 256 insertions(+), 40 deletions(-) diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index c90bf65ba..09daa9ba4 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -246,12 +246,12 @@ export default class Section extends Group { // 哈尔滨线路 道岔相关区段设置 默认颜色 if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) { const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; - if (switchModel.normalPosition != 0) { // 定位情况 + if (switchModel && switchModel.normalPosition != 0) { // 定位情况 const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor }); const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode]; sectionB && sectionB.instance && sectionB.instance.setState(sectionB, true); - } else if (switchModel.normalPosition == 0) { // 反位情况 + } else if (switchModel && switchModel.normalPosition == 0) { // 反位情况 const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode]; sectionB && sectionB.instance && sectionB.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor }); const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 3cc9ff847..744d487e9 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -501,10 +501,7 @@ export default { model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5; } const changeSectionList = this.handleOtherSectionChange(model); - // let changeStandList = []; - // if (this.editModel.stationCode != this.selected.stationCode) { // 优化 const changeStandList = this.handleRelevanceStand(model); - // } models = [...changeSectionList, ...changeStandList]; this.$emit('updateMapModel', models); @@ -512,8 +509,10 @@ export default { this.oldLeftSectionCode = model.leftSectionCode; this.oldRightSectionCode = model.rightSectionCode; this.field = ''; + this.$emit('deviceSelect', ''); // 清空属性 } else { this.$message('还有属性未填写,修改未生效!'); + this.$emit('deviceSelect', ''); } }); }, diff --git a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue index 832eb1a4b..99abca947 100644 --- a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue @@ -23,6 +23,8 @@ export default { methods:{ create() { // 一键生成道岔 const createArr = []; // 创建model列表 + // const changeSectionLists = []; + // const changeSectionList = this.changeSectionsAttr(); // 找道岔中心点 const changeSectionList = this.changeSectionAttr(); // 找道岔中心点 changeSectionList.forEach(section => { if (section['typeModel'] && section['typeModel'] == 'start') { // 右侧关联关系为空 且 道岔区段 @@ -35,7 +37,7 @@ export default { if (this.handleResetPoint(item.points)) { sectionEnd = item.points[item.points.length - 1]; } else { - sectionEnd = item.points[0]; + sectionEnd = item.points.length == 2 ? item.points[0] : item.points[item.points.length - 2]; } if ((sectionEnd.y == section.points[section.points.length - 1].y) || (sectionEnd.x == section.points[section.points.length - 1].x)) { // 是否水平拿第二个点判断 sectionB = item; @@ -50,13 +52,13 @@ export default { if (this.handleResetPoint(section.points)) { intersection = section.points[section.points.length - 1]; } else { - intersection = section.points[0]; + intersection = section.points.length == 2 ? section.points[0] : section.points[section.points.length - 2]; } let skew; if (this.handleResetPoint(sectionC.points)) { skew = sectionC.points[sectionC.points.length - 1]; } else { - skew = sectionC.points[0]; + skew = sectionC.points.length == 2 ? sectionC.points[0] : sectionC.points[sectionC.points.length - 2]; } const data = { code: getUID('W', [...this.switchList, ...createArr]), @@ -91,7 +93,7 @@ export default { list.forEach(item => { let sectionStart; if (this.handleResetPoint(item.points)) { - sectionStart = item.points[0]; + sectionStart = item.points.length == 2 ? item.points[0] : item.points[item.points.length - 2]; } else { sectionStart = item.points[item.points.length - 1]; } @@ -106,13 +108,13 @@ export default { const switchModel = getModel('Switch'); let intersection; if (this.handleResetPoint(section.points)) { - intersection = section.points[0]; + intersection = section.points.length == 2 ? section.points[0] : section.points[section.points.length - 2]; } else { intersection = section.points[section.points.length - 1]; } let skew; if (this.handleResetPoint(sectionC.points)) { - skew = sectionC.points[0]; + skew = sectionC.points.length == 2 ? sectionC.points[0] : sectionC.points[sectionC.points.length - 2]; } else { skew = sectionC.points[sectionC.points.length - 1]; } @@ -140,6 +142,92 @@ export default { !swch && createArr.push(model); // 已有的道岔不在创建 } } + // if (item['typeModel'] == 'start') { // 右侧关联关系为空 且 道岔区段 + // const section = item.A; + // const sectionB = item.B; + // const sectionC = item.C; + // if (section.code && sectionB.code && sectionC.code) { + // const uname = 'W' + section.name.replace('T', ''); + // const switchModel = getModel('Switch'); + // let intersection; + // if (this.handleResetPoint(section.points)) { + // intersection = section.points[section.points.length - 1]; + // } else { + // intersection = section.points.length == 2 ? section.points[0] : section.points[section.points.length - 2]; + // } + // let skew; + // if (this.handleResetPoint(sectionC.points)) { + // skew = sectionC.points[sectionC.points.length - 1]; + // } else { + // skew = sectionC.points.length == 2 ? sectionC.points[0] : sectionC.points[sectionC.points.length - 2]; + // } + // const data = { + // code: getUID('W', [...this.switchList, ...createArr]), + // name: uname, + // nameShow: true, + // timeoutShow: true, + // sectionACode: section.code, + // sectionBCode: sectionB.code, + // sectionCCode: sectionC.code, + // turnTime: 3, + // intersection: { + // x: intersection.x, + // y: intersection.y + // }, + // skew: { + // x: skew.x, + // y: skew.y + // }, + // normalPosition: 1 // 默认状态定位 + // }; + // const model = Object.assign(switchModel, data); + // const swch = this.findSwitchData(model.sectionACode, model.sectionBCode, model.sectionCCode); + // !swch && createArr.push(model); // 已有的道岔不在创建 + // } + // } + // if (item['typeModel'] == 'end') { // 左侧关联关系为空 且 道岔区段 + // const section = item.A; + // const sectionB = item.B; + // const sectionC = item.C; + // if (section.code && sectionB.code && sectionC.code) { + // const uname = 'W' + section.name.replace('T', ''); + // const switchModel = getModel('Switch'); + // let intersection; + // if (this.handleResetPoint(section.points)) { + // intersection = section.points.length == 2 ? section.points[0] : section.points[section.points.length - 2]; + // } else { + // intersection = section.points[section.points.length - 1]; + // } + // let skew; + // if (this.handleResetPoint(sectionC.points)) { + // skew = sectionC.points.length == 2 ? sectionC.points[0] : sectionC.points[sectionC.points.length - 2]; + // } else { + // skew = sectionC.points[sectionC.points.length - 1]; + // } + // const data = { + // code: getUID('W', [...this.switchList, ...createArr]), + // name: uname, + // nameShow: true, + // timeoutShow: true, + // sectionACode: section.code, + // sectionBCode: sectionB.code, + // sectionCCode: sectionC.code, + // turnTime: 3, + // intersection: { + // x: intersection.x, + // y: intersection.y + // }, + // skew: { + // x: skew.x, + // y: skew.y + // }, + // normalPosition: 1 // 默认状态定位 + // }; + // const model = Object.assign(switchModel, data); + // const swch = this.findSwitchData(model.sectionACode, model.sectionBCode, model.sectionCCode); + // !swch && createArr.push(model); // 已有的道岔不在创建 + // } + // } } }); this.$confirm(this.$t('tip.confirmBatchGeneration'), this.$t('tip.hint'), { @@ -147,6 +235,8 @@ export default { cancelButtonText: this.$t('tip.cancel'), type: 'warning' }).then((res) => { + // console.log(createArr, changeSectionLists); + // debugger; const modelsList = this.createSwitchSection(createArr, changeSectionList); modelsList.forEach(item => { createArr.push(item); @@ -157,6 +247,133 @@ export default { this.$message( this.$t('tip.cancelGeneration')); }); }, + findArr(arr) { + if (arr[0].slope !== arr[1].slope && arr[0].slope !== arr[2].slope) { + return arr[0]; + } + for (var i = 0, len = arr.length; i < len; i++) { + if (arr[i].slope !== arr[0].slope) { + return arr[i]; + } + } + }, + // 修改区段属性 + // changeSectionsAttr() { + // const pointMap = {}; + // const ponitMapNew = {}; + // this.sectionList.forEach(item=> { + // if (item.type == '01' || item.type == '03') { + // const ponits = item.points; + // const startKey = ponits[0].x + '-' + ponits[0].y; + // const endKey = ponits[ponits.length - 1].x + '-' + ponits[ponits.length - 1].y; + // if (pointMap[startKey]) { + // pointMap[startKey].count++; + // pointMap[startKey].lists.push(item); + // if (pointMap[startKey].count >= 2) { ponitMapNew[startKey] = pointMap[startKey]; } + // } else { + // pointMap[startKey] = {count: 0, lists: [item]}; + // } + // if (pointMap[endKey]) { + // pointMap[endKey].count++; + // pointMap[endKey].lists.push(item); + // if (pointMap[endKey].count >= 2) { ponitMapNew[endKey] = pointMap[endKey]; } + // } else { + // pointMap[endKey] = {count: 0, lists: [item]}; + // } + // } + // }); + // const keys = Object.keys(ponitMapNew); + // const switchSections = []; + // keys.forEach(key => { + // if (ponitMapNew[key].count == 2) { + // const slopeList = []; + // ponitMapNew[key].lists.forEach(sectionModel => { + // let slope = ''; + // const points = sectionModel.points; + // const startKey = points[0].x + '-' + points[0].y; + // const endKey = points[points.length - 1].x + '-' + points[points.length - 1].y; + // if (key == startKey) { + // slope = ( points[1].y - points[0].y ) / ( points[1].x - points[0].x ); + // } + // if (key == endKey) { + // slope = ( points[points.length - 1].y - points[points.length - 2].y ) / ( points[points.length - 1].x - points[points.length - 2].x ); + // } + // slopeList.push({slope: slope, code: sectionModel.code, model: sectionModel}); + // }); + // const arr = []; + // let A, B; + // const sectionModelC = this.findArr(slopeList); + // slopeList.forEach(ele => { + // if (ele.slope != sectionModelC.slope) { + // arr.push(ele); + // } + // }); + // const C = sectionModelC.model; + // const pointsC = C.points; + // arr.forEach(item => { + // const sectionModel = item.model; + // const points = sectionModel.points; + // const startKey = points[0].x + '-' + points[0].y; + // const endKey = points[points.length - 1].x + '-' + points[points.length - 1].y; + // const startKeyC = pointsC[0].x + '-' + pointsC[0].y; + // const endKeyC = pointsC[pointsC.length - 1].x + '-' + pointsC[pointsC.length - 1].y; + // let pointC = null; + // if (key == startKeyC) { + // pointC = JSON.parse(JSON.stringify(pointsC[1])); + // } + // if (key == endKeyC) { + // pointC = JSON.parse(JSON.stringify(pointsC[pointsC.length - 2])); + // } + // let acuteAngle; + // if (key == startKey) { + // acuteAngle = this.handleAngle([points[1], points[0], pointC]); + // } + // if (key == endKey) { + // acuteAngle = this.handleAngle([points[points.length - 2], points[points.length - 1], pointC]); + // } + // if (acuteAngle) { + // B = item.model; + // } else { + // A = item.model; + // } + // }); + // let typeModel; + // if (key == A.points[A.points.length - 1].x + '-' + A.points[A.points.length - 1].y) { + // A.rightSectionCode = ''; + // A.sepTypeRight = '00'; // 分隔符 + // B.leftSectionCode = ''; + // B.sepTypeLeft = '00'; + // C.leftSectionCode = ''; + // C.sepTypeLeft = '00'; + // typeModel = 'start'; + // } + // if (key == A.points[0].x + '-' + A.points[0].y) { + // A.leftSectionCode = ''; + // A.sepTypeLeft = '00'; // 分隔符 + // B.rightSectionCode = ''; + // B.sepTypeRight = '00'; + // C.rightSectionCode = ''; + // C.sepTypeRight = '00'; + // typeModel = 'end'; + // } + // A.type = '03'; + // B.type = '03'; + // C.type = '03'; + // switchSections.push({A: A, B: B, C: C, typeModel: typeModel }); + // } + // }); + // console.log(switchSections); + // return switchSections; + // }, + // handleAngle(points) { + // const A = points[0]; + // const B = points[1]; + // const C = points[2]; + // var AB = Math.sqrt(Math.pow(A.x - B.x, 2) + Math.pow(A.y - B.y, 2)); + // var AC = Math.sqrt(Math.pow(A.x - C.x, 2) + Math.pow(A.y - C.y, 2)); + // var BC = Math.sqrt(Math.pow(B.x - C.x, 2) + Math.pow(B.y - C.y, 2)); + // return Math.pow(AB, 2) + Math.pow(BC, 2) > Math.pow(AC, 2); + // }, findSectionA(pointX, pointY, lists, code) { const list = []; lists.forEach(item => { @@ -208,19 +425,19 @@ export default { }, // 重置坐标点 handleResetPoint(points) { - return (points[points.length - 1].x >= points[0].x) && (points[points.length - 1].y >= points[0].y); + return points[points.length - 1].x >= points[points.length - 2].x; }, // 修改区段属性 changeSectionAttr() { const changeSectionList = []; // 改变的区段列表 this.sectionList.forEach(section => { - if (section.type == '01') { + if (section.type == '01' || section.type == '03') { const oneSection = section.points[section.points.length - 1]; const oneSectionStar = section.points[0]; let countA = 0; let countB = 0; this.sectionList.forEach(elem => { - if (elem.type == '01' && section.code != elem.code) { + if ((elem.type == '01' || section.type == '03') && section.code != elem.code) { let twoSection, twoSectionEnd; if (this.handleResetPoint(elem.points)) { twoSection = elem.points[0]; @@ -276,34 +493,34 @@ export default { }); return changeSectionList; }, - checkAddListA(points, code) { // 判断是否添加list (暂时不用) - let flag = false; - this.sectionList.forEach(section => { - section.points.forEach((point, index) => { - if (index > 0 && section.code != code) { - if (point.x == points.x && point.y == points.y) { - flag = true; - } - } - }); + // checkAddListA(points, code) { // 判断是否添加list (暂时不用) + // let flag = false; + // this.sectionList.forEach(section => { + // section.points.forEach((point, index) => { + // if (index > 0 && section.code != code) { + // if (point.x == points.x && point.y == points.y) { + // flag = true; + // } + // } + // }); - }); - return flag; - }, - checkAddListB(points, code) { // 判断是否添加list (暂时不用) - let flag = false; - this.sectionList.forEach(section => { - section.points.forEach((point, index) => { - if (index == 0 && section.code != code) { - if (point.x == points.x && point.y == points.y) { - flag = true; - } - } - }); + // }); + // return flag; + // }, + // checkAddListB(points, code) { // 判断是否添加list (暂时不用) + // let flag = false; + // this.sectionList.forEach(section => { + // section.points.forEach((point, index) => { + // if (index == 0 && section.code != code) { + // if (point.x == points.x && point.y == points.y) { + // flag = true; + // } + // } + // }); - }); - return flag; - }, + // }); + // return flag; + // }, // 一键生成道岔计轴区段 createSwitchSection(list, sectionLists) { const models = []; From a3e8c7cecc1de55e819e4a27d2d4961b545d2c6b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 18 Dec 2020 16:12:39 +0800 Subject: [PATCH 02/27] =?UTF-8?q?=E5=8D=97=E4=BA=AC=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E7=BA=BF=E8=B7=AF=20=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/bejing_01.js | 3 ++- src/jmapNew/config/skinCode/chengdu_01.js | 3 ++- src/jmapNew/config/skinCode/chengdu_03.js | 3 ++- src/jmapNew/config/skinCode/foshan_01.js | 3 ++- src/jmapNew/config/skinCode/fuzhou_01.js | 3 ++- src/jmapNew/config/skinCode/haerbin_01.js | 8 -------- src/jmapNew/config/skinCode/nanjing_02.js | 11 +++++++---- src/jmapNew/config/skinCode/ningbo_01.js | 3 ++- src/jmapNew/config/skinCode/ningbo_03.js | 3 ++- src/jmapNew/config/skinCode/race_01.js | 3 ++- src/jmapNew/config/skinCode/xian_01.js | 3 ++- src/jmapNew/config/skinCode/xian_02.js | 3 ++- .../newEditTool/menus/editPlanningTrain.vue | 1 - 13 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 5c0308133..ba81a2ab9 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -116,7 +116,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.5, // 分隔符宽度 + width: 1.5, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 1.5, // 尽头分隔符宽度 endColor: '#7F7F7F', // 尽头分隔符颜色 color: '#7F7F7F', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 53f27194f..db773e7d4 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -124,7 +124,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.5, // 分隔符宽度 + width: 1.5, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 1.5, // 尽头分隔符宽度 endColor: '#FFFFFF', // 尽头分隔符颜色 color: 'white', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 773aaceab..57704e3ae 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -124,7 +124,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.5, // 分隔符宽度 + width: 1.5, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 1.5, // 尽头分隔符宽度 endColor: '#FFFFFF', // 尽头分隔符颜色 color: '#FFFFFF', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index 72e90c9ab..3495f782f 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -108,7 +108,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.2, // 分隔符宽度 + width: 1.2, // 物理区段分隔符宽度 + logicWidth:1.2, // 逻辑区段分隔符宽度 endWidth: 3.5, // 尽头分隔符宽度 endColor: '#3F3F3F', // 尽头分隔符颜色 color: '#3149C3', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 40cc992db..f660b2029 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -108,7 +108,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.2, // 分隔符宽度 + width: 1.2, // 物理区段分隔符宽度 + logicWidth:1.2, // 逻辑区段分隔符宽度 endWidth: 3.5, // 尽头分隔符宽度 endColor: '#3F3F3F', // 尽头分隔符颜色 color: '#3149C3', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index ea1d37e3e..e03202233 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -128,14 +128,6 @@ class SkinCode extends defaultStyle { drogueWidth: 15, // 浮标宽度 drogueHeight: 12 // 浮标高度 }, - separator: { - z: 3, // 分割符层级 - width: 1.2, // 分隔符宽度 - endWidth: 3.5, // 尽头分隔符宽度 - endColor: '#3F3F3F', // 尽头分隔符颜色 - color: '#3149C3', // 区段边界符颜色 - halfHeight: 5 // 区段分隔符高度的一半 - }, trainPosition:{ display: false // 列车实时位置显示 } diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index ea1d37e3e..c4582b1de 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -1,12 +1,13 @@ import defaultStyle from '../defaultStyle'; import deviceType from '../../constant/deviceType'; +import { TRUE } from 'node-sass'; class SkinCode extends defaultStyle { constructor() { super(); this.fontFamily = '宋体'; this[deviceType.Section] = { - elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionBlock', 'speedLimitName'], + elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionBlock', 'separator', 'speedLimitName'], active: { routeColor: false // 进路触发颜色 }, @@ -130,11 +131,13 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.2, // 分隔符宽度 + width: 3, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 3.5, // 尽头分隔符宽度 endColor: '#3F3F3F', // 尽头分隔符颜色 - color: '#3149C3', // 区段边界符颜色 - halfHeight: 5 // 区段分隔符高度的一半 + color: '#000', // 区段边界符颜色 + halfHeight: 5, // 区段分隔符高度的一半 + isLikeT:true // 特殊类型尽头分隔 类似与右躺着的T }, trainPosition:{ display: false // 列车实时位置显示 diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index a8b58e64c..b48886de3 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -108,7 +108,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.5, // 分隔符宽度 + width: 1.5, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 1.5, // 尽头分隔符宽度 endColor: '#FFFFFF', // 尽头分隔符颜色 color: 'white', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index 75bb13fa9..3558f207a 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -139,7 +139,8 @@ class SkinCode extends defaultStyle { }, separator: { z: -1, // 分割符层级 - width: 1.5, // 分隔符宽度 + width: 1.5, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 1.5, // 尽头分隔符宽度 endColor: '#000000', // 尽头分隔符颜色 color: '#000000', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/race_01.js b/src/jmapNew/config/skinCode/race_01.js index 5c4ab8f49..c83780e49 100644 --- a/src/jmapNew/config/skinCode/race_01.js +++ b/src/jmapNew/config/skinCode/race_01.js @@ -132,7 +132,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.5, // 分隔符宽度 + width: 1.5, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 1.5, // 尽头分隔符宽度 endColor: '#7F7F7F', // 尽头分隔符颜色 color: '#7F7F7F', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index e3fda6713..7cfa54363 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -116,7 +116,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.2, // 分隔符宽度 + width: 1.2, // 物理区段分隔符宽度 + logicWidth:1.2, // 逻辑区段分隔符宽度 endWidth: 3.5, // 尽头分隔符宽度 endColor: '#3F3F3F', // 尽头分隔符颜色 color: '#3149C3', // 区段边界符颜色 diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index c5d687bb4..c502f542f 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -125,7 +125,8 @@ class SkinCode extends defaultStyle { }, separator: { z: 3, // 分割符层级 - width: 1.5, // 分隔符宽度 + width: 1.5, // 物理区段分隔符宽度 + logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 1.5, // 尽头分隔符宽度 endColor: '#FFFFFF', // 尽头分隔符颜色 color: '#AAA9A9', // 区段边界符颜色 diff --git a/src/views/planMonitor/newEditTool/menus/editPlanningTrain.vue b/src/views/planMonitor/newEditTool/menus/editPlanningTrain.vue index 1c5bf1265..aee91358e 100644 --- a/src/views/planMonitor/newEditTool/menus/editPlanningTrain.vue +++ b/src/views/planMonitor/newEditTool/menus/editPlanningTrain.vue @@ -111,7 +111,6 @@ export default { SDTNumber: `${this.model.serviceNumber}${tripNumber}` }; getRoutingBySDTNumber(model).then(resp => { - debugger; const taskObj = { id:index + 1, tripNumber: tripNumber, From 465e6a5d08f4d88090f8293da984ff46e2e34d14 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 18 Dec 2020 16:28:42 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E5=8D=97=E4=BA=AC=E4=BA=8C=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E5=8C=BA=E6=AE=B5=E7=BB=98=E5=9B=BE=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/nanjing_02.js | 3 +- src/jmapNew/shape/Section/ESeparator.js | 70 +++++++++++++++++++---- 2 files changed, 60 insertions(+), 13 deletions(-) diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 2fb9b3b27..2396a087d 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -1,6 +1,5 @@ import defaultStyle from '../defaultStyle'; import deviceType from '../../constant/deviceType'; -import { TRUE } from 'node-sass'; class SkinCode extends defaultStyle { constructor() { @@ -134,7 +133,7 @@ class SkinCode extends defaultStyle { width: 3, // 物理区段分隔符宽度 logicWidth:1.5, // 逻辑区段分隔符宽度 endWidth: 3.5, // 尽头分隔符宽度 - endColor: '#3F3F3F', // 尽头分隔符颜色 + endColor: '#C0C0C0', // 尽头分隔符颜色 color: '#000', // 区段边界符颜色 halfHeight: 5, // 区段分隔符高度的一半 isLikeT:true // 特殊类型尽头分隔 类似与右躺着的T diff --git a/src/jmapNew/shape/Section/ESeparator.js b/src/jmapNew/shape/Section/ESeparator.js index f9bd91589..b7739d9d7 100644 --- a/src/jmapNew/shape/Section/ESeparator.js +++ b/src/jmapNew/shape/Section/ESeparator.js @@ -28,7 +28,8 @@ export default class ESeparator extends Group { y: model.points[0].y }, sepType: model.sepTypeLeft, - drict: -1 // 方向 + drict: -1, // 方向 + type:model.type // 区段类型 }); /** 创建右侧分隔符*/ @@ -40,25 +41,27 @@ export default class ESeparator extends Group { y: model.points[model.points.length - 1].y }, sepType: model.sepTypeRight, - drict: 1 // 方向 + drict: 1, // 方向 + type:model.type // 区段类型 }); this.add(this.lPartition); this.add(this.rPartition); } } - createModel(modelData, points, lineWidth, stroke) { + createModel(modelData, points, lineWidth, stroke, rotation) { const partition = new Polyline({ zlevel: this.zlevel, z: this.z, origin: [modelData.point.x, modelData.point.y], - rotation: Math.PI * 2 - Math.atan2(modelData.traingle.absy, modelData.traingle.absx) * modelData.traingle.drictx * modelData.traingle.dricty, + rotation: rotation || Math.PI * 2 - Math.atan2(modelData.traingle.absy, modelData.traingle.absx) * modelData.traingle.drictx * modelData.traingle.dricty, shape: { points: points }, style: { lineWidth: lineWidth || this.style.Section.separator.width, stroke: stroke || this.style.Section.separator.color + // fill:stroke || this.style.Section.separator.color } }); return partition; @@ -112,11 +115,46 @@ export default class ESeparator extends Group { if (modelData && style && modelData.traingle) { let partition = null; if (type === '01') { // 普通分割 - const points = [ + let points = []; + const lineWidth = 0; + // const tanRate = modelData.traingle.getTanRate(); + // if (modelData.type == '03' && tanRate != 0 && tanRate != 1) { + // points = [ + // [modelData.point.x, + // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2], + // [modelData.point.x - modelData.drict * (style.Section.separator.halfHeight) / tanRate, + // modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2], + // [modelData.point.x, + // modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2], + // [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) / tanRate, + // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2], + // [modelData.point.x, + // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2] + // // 待处理 + // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, + // // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], + // // [modelData.point.x + (style.Section.separator.halfHeight) / modelData.traingle.getCosRate() / 2, + // // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], + // // [modelData.point.x, modelData.point.y] + // // [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getSinRate(), + // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate()] + // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, + // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], + // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, + // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2] + // ]; + // console.log(points, '11111111111111111'); + // lineWidth = 1; + // const stroke = style.Section.separator.color; + // partition = this.createModel(modelData, points, lineWidth, stroke); + // } else { + points = [ [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)], [modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)] ]; + // lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width; partition = this.createModel(modelData, points); + // } } else if (type === '02') { // 单侧分割符 const points = [ [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight), modelData.point.y - (style.Section.separator.halfHeight * 1.5)], @@ -125,12 +163,22 @@ export default class ESeparator extends Group { ]; partition = this.createModel(modelData, points); } else if (type === '03') { // 尽头分隔符 - const points = [ - [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) * 1.2, modelData.point.y - (style.Section.separator.halfHeight * 1.2)], - [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight * 1.2)], - [modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight * 1.2)], - [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) * 1.2, modelData.point.y + (style.Section.separator.halfHeight * 1.2)] - ]; + let points = []; + if (style.Section.separator.isLikeT) { + points = [ + [modelData.point.x + modelData.drict * style.Section.separator.width, modelData.point.y], + [modelData.point.x + modelData.drict * (style.Section.separator.width + style.Section.separator.halfHeight * 1.2), modelData.point.y], + [modelData.point.x + modelData.drict * (style.Section.separator.width + style.Section.separator.halfHeight * 1.2), modelData.point.y - style.Section.separator.halfHeight * 1.2], + [modelData.point.x + modelData.drict * (style.Section.separator.width + style.Section.separator.halfHeight * 1.2), modelData.point.y + style.Section.separator.halfHeight * 1.2] + ]; + } else { + points = [ + [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) * 1.2, modelData.point.y - (style.Section.separator.halfHeight * 1.2)], + [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight * 1.2)], + [modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight * 1.2)], + [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) * 1.2, modelData.point.y + (style.Section.separator.halfHeight * 1.2)] + ]; + } const lineWidth = style.Section.separator.endWidth; const stroke = style.Section.separator.endColor; partition = this.createModel(modelData, points, lineWidth, stroke); From 9ba280bc03f451405c9f5ecc181601a5ada7f65b Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 18 Dec 2020 17:20:09 +0800 Subject: [PATCH 04/27] =?UTF-8?q?=E5=8D=97=E9=93=81=E9=99=A2=E4=B8=93?= =?UTF-8?q?=E4=B8=9A=E7=89=88=E9=85=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue | 2 +- src/scripts/ProjectConfig.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue index a7c2c3146..11ee4744d 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue @@ -65,7 +65,7 @@
新的车次号:
-
请输入正确的车次号
+
请输入正确的车次号
自动排列:
diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index b558e9b92..06b9ea07c 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -489,7 +489,7 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台 designsdy: '/login?project=sdy', ntyl: '/design/login?project=ntyl', designntyl: '/login?project=ntyl', - ntyc: '/design/login?project=ntyl', + ntyc: '/design/login?project=ntyc', designntyc: '/login?project=ntyc' }; export const ProjectList = [ From 0cb19a5ee90f5bc6506ebe5b72a754cff7b4f062 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 18 Dec 2020 17:45:27 +0800 Subject: [PATCH 05/27] =?UTF-8?q?=E5=AD=90=E7=B3=BB=E7=BB=9F=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=8C=89=E9=92=AE=E6=94=BE=E5=BC=80=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 ++-- src/views/system/systemGenerate/index.vue | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 798608c73..c0569ef83 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // 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.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.129:9000'; // 旭强 // BASE_API = 'http://192.168.8.119:9000'; // 张赛 - BASE_API = 'http://192.168.8.110:9000'; // 杜康 + // BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/system/systemGenerate/index.vue b/src/views/system/systemGenerate/index.vue index 8e1b085d9..1836c4154 100644 --- a/src/views/system/systemGenerate/index.vue +++ b/src/views/system/systemGenerate/index.vue @@ -94,7 +94,6 @@ export default { name: this.$t('systemGenerate.deleteData'), handleClick: this.deleteData, type: 'danger', - showControl: (row) => { return Boolean(row.customized); } } ] } From fa7380f8ad9b3ce4485fddf799ef1c62108b0462 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 18 Dec 2020 17:51:54 +0800 Subject: [PATCH 06/27] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/planMonitor/detail.vue | 6 +++++- src/views/planMonitor/editTool/menuBar.vue | 6 +++++- .../editTool/routingoperate/routeConfig.vue | 13 +++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/views/planMonitor/detail.vue b/src/views/planMonitor/detail.vue index a537dee71..8308e2891 100644 --- a/src/views/planMonitor/detail.vue +++ b/src/views/planMonitor/detail.vue @@ -250,7 +250,11 @@ export default { }).then(() => { if (this.hasRelease) { publishRunPlan(row.id, {runPlanName: name}).then(resp => { - this.$message.success(this.$t('tip.publishRunPlanSuccess')); + if (resp.data.length <= 0) { + this.$message.success(this.$t('tip.publishRunPlanSuccess')); + } else { + this.$messageBox(`${this.$t('tip.publishRunPlanFail')}: ${resp.data[0]}`); + } this.refresh(); }).catch(() => { this.$messageBox(this.$t('tip.publishRunPlanFail')); diff --git a/src/views/planMonitor/editTool/menuBar.vue b/src/views/planMonitor/editTool/menuBar.vue index a20557791..24075a0ec 100644 --- a/src/views/planMonitor/editTool/menuBar.vue +++ b/src/views/planMonitor/editTool/menuBar.vue @@ -612,7 +612,11 @@ export default { type: 'warning' }).then(() => { publishRunPlan(param.planId, {runPlanName: param.planName}).then(resp => { - this.$message.success(this.$t('tip.publishRunPlanSuccess')); + if (resp.data.length <= 0) { + this.$message.success(this.$t('tip.publishRunPlanSuccess')); + } else { + this.$messageBox(`${this.$t('tip.publishRunPlanFail')}: ${resp.data[0]}`); + } }).catch(() => { this.$messageBox(this.$t('tip.publishRunPlanFail')); }); diff --git a/src/views/planMonitor/editTool/routingoperate/routeConfig.vue b/src/views/planMonitor/editTool/routingoperate/routeConfig.vue index 97524b3c8..afe856e72 100644 --- a/src/views/planMonitor/editTool/routingoperate/routeConfig.vue +++ b/src/views/planMonitor/editTool/routingoperate/routeConfig.vue @@ -11,7 +11,7 @@ - + - {{ $t('map.activate') }} + >{{ $t('map.activate') }} --> @@ -40,7 +40,8 @@ >{{ $t('map.activate') }} - + + - {{ $t('map.activate') }} + >{{ $t('map.activate') }} --> From 4a350e9706c45bcc309424dcd645406e80d4badc Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 18 Dec 2020 19:08:34 +0800 Subject: [PATCH 07/27] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/systemGenerate/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/systemGenerate/index.vue b/src/views/system/systemGenerate/index.vue index 1836c4154..be0cc8e9a 100644 --- a/src/views/system/systemGenerate/index.vue +++ b/src/views/system/systemGenerate/index.vue @@ -93,7 +93,7 @@ export default { { name: this.$t('systemGenerate.deleteData'), handleClick: this.deleteData, - type: 'danger', + type: 'danger' } ] } From 1915215083e8e2023906fa1f017eaa20c4b815d6 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Fri, 18 Dec 2020 21:18:57 +0800 Subject: [PATCH 08/27] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=B6=8A=E6=88=98=20?= =?UTF-8?q?=E9=9D=9E=E5=AE=89=E5=85=A8=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/haerbin_01/menus/menuButton.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index 556527037..213398e91 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -795,7 +795,7 @@ export default { { name: '扣车', cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false }, { name: '取消扣车', cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, operate: OperationEvent.StationStand.cancelDetainTrain.menuButton, show: false }, { name: '越站', cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, operate: OperationEvent.StationStand.setJumpStop.menuButton, show: false }, - { name: '取消越站', cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, operate: OperationEvent.StationStand.cancelJumpStop.menuButton, show: false, securityCommand: true } + { name: '取消越站', cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, operate: OperationEvent.StationStand.cancelJumpStop.menuButton, show: false } ]; this.directionRodParamList = [ { name: '切换左向', cmdType: CMD.DirectionRod.CMD_DIRECTION_CHANGE, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false }, From baffbf36c8d5ef643278217c5a040e4a491725cc Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Sun, 20 Dec 2020 10:55:34 +0800 Subject: [PATCH 09/27] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8D=97=E4=BA=AC?= =?UTF-8?q?=E4=BA=8C=E5=8F=B7=E7=BA=BF=E7=BA=BF=E8=B7=AF=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/mapsystemNew/common/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/newMap/mapsystemNew/common/index.vue b/src/views/newMap/mapsystemNew/common/index.vue index 530745f23..a93ed5595 100644 --- a/src/views/newMap/mapsystemNew/common/index.vue +++ b/src/views/newMap/mapsystemNew/common/index.vue @@ -115,7 +115,7 @@ export default { this.selected = device; this.$store.dispatch('menuOperation/setSelected', {device: device, subType: em.subType}); this.$store.dispatch('menuOperation/setLeftClickCount'); - if (this.$route.query.lineCode == '07') { + if (this.$route.query.lineCode == '07' || this.$route.query.lineCode == '14') { this.$store.dispatch('menuOperation/setMenuChange', {device: device, subType: em.subType}); } this.$store.dispatch('training/emitTipFresh'); From 9d7493707352e6a9b9431d12bf7554c28c05b1e6 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 21 Dec 2020 09:25:17 +0800 Subject: [PATCH 10/27] =?UTF-8?q?=E5=AE=81=E6=B3=A2=E4=BA=8C=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/nanjing_02.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 2396a087d..33651d5df 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -688,7 +688,7 @@ class SkinCode extends defaultStyle { }, travelSigns: { trainTravelLeftSignsOffset: { x:3, y: 3}, - trainTravelRightSignsOffset: { x: 62, y: 3} + trainTravelRightSignsOffset: { x: 65, y: 3} }, delayTime: { trainDelayTimeOffset: { x:5, y: 14} @@ -708,14 +708,14 @@ class SkinCode extends defaultStyle { trainServer: { serviceNumberPrefix: '000', // 服务号(表号)前缀 defaultServiceNumber: 'BBB', // 默认服务号(表号) - trainServerOffset: { x: 33, y: 3 }, // 列车服务号偏移 + trainServerOffset: { x: 36, y: 3 }, // 列车服务号偏移 fontColor: '#00C300' }, trainTarget: { tripNumberPrefix: '00', // 车次号前缀 defaultDirectionCode: '', // 默认车次号1 defaultTripNumber: 'CC', // 默认车次号2 - trainTargetOffset: { x: 53, y: 3 }, // 列车车次号偏移 + trainTargetOffset: { x: 56, y: 3 }, // 列车车次号偏移 fontColor: '#00C300' }, trainTargetNumber: { From ffa572eb244d0fc34393c38c9f05ad7b123fe43f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 21 Dec 2020 11:01:33 +0800 Subject: [PATCH 11/27] =?UTF-8?q?=E5=8D=97=E9=93=81=E9=99=A216=E7=AB=99?= =?UTF-8?q?=E7=BA=BF=E8=B7=AF=EF=BC=88=E8=A5=BF=E9=97=A8=E5=AD=90=EF=BC=89?= =?UTF-8?q?=20=E7=BA=BF=E8=B7=AF=E9=85=8D=E7=BD=AE=E4=B8=8E=E7=BB=98?= =?UTF-8?q?=E5=9B=BE=20=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/nanjing_02.js | 1 + src/jmapNew/shape/Section/ESeparator.js | 59 ++++++++--------------- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 2396a087d..579887383 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -136,6 +136,7 @@ class SkinCode extends defaultStyle { endColor: '#C0C0C0', // 尽头分隔符颜色 color: '#000', // 区段边界符颜色 halfHeight: 5, // 区段分隔符高度的一半 + sepical:true, // 特殊类型 道岔C区段 分隔符为横向 isLikeT:true // 特殊类型尽头分隔 类似与右躺着的T }, trainPosition:{ diff --git a/src/jmapNew/shape/Section/ESeparator.js b/src/jmapNew/shape/Section/ESeparator.js index b7739d9d7..5121db447 100644 --- a/src/jmapNew/shape/Section/ESeparator.js +++ b/src/jmapNew/shape/Section/ESeparator.js @@ -116,45 +116,26 @@ export default class ESeparator extends Group { let partition = null; if (type === '01') { // 普通分割 let points = []; - const lineWidth = 0; - // const tanRate = modelData.traingle.getTanRate(); - // if (modelData.type == '03' && tanRate != 0 && tanRate != 1) { - // points = [ - // [modelData.point.x, - // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x - modelData.drict * (style.Section.separator.halfHeight) / tanRate, - // modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x, - // modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) / tanRate, - // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x, - // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2] - // // 待处理 - // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, - // // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], - // // [modelData.point.x + (style.Section.separator.halfHeight) / modelData.traingle.getCosRate() / 2, - // // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], - // // [modelData.point.x, modelData.point.y] - // // [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getSinRate(), - // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate()] - // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, - // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], - // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, - // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2] - // ]; - // console.log(points, '11111111111111111'); - // lineWidth = 1; - // const stroke = style.Section.separator.color; - // partition = this.createModel(modelData, points, lineWidth, stroke); - // } else { - points = [ - [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)], - [modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)] - ]; - // lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width; - partition = this.createModel(modelData, points); - // } + let lineWidth = 0; + const tanRate = modelData.traingle.getTanRate(); + if (style.Section.separator.sepical && modelData.type == '03' && tanRate != 0 && tanRate != 1) { + // 转换坐标系计算 + const dataDirection = modelData.traingle.getRotation() > 0 ? 1 : -1; + points = [ + [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(), + modelData.point.y + dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()], + [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(), + modelData.point.y - dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()] + ]; + partition = this.createModel(modelData, points); + } else { + points = [ + [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)], + [modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)] + ]; + lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width; + partition = this.createModel(modelData, points, lineWidth); + } } else if (type === '02') { // 单侧分割符 const points = [ [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight), modelData.point.y - (style.Section.separator.halfHeight * 1.5)], From 01ed2bee996e5fa6b121ee769baa1b4c4c6c3323 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 21 Dec 2020 13:52:36 +0800 Subject: [PATCH 12/27] =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E6=9C=BA=E7=81=AF?= =?UTF-8?q?=E6=9F=B1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Signal/ESigPost.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jmapNew/shape/Signal/ESigPost.js b/src/jmapNew/shape/Signal/ESigPost.js index 3f1fc12f2..6e5ef608c 100644 --- a/src/jmapNew/shape/Signal/ESigPost.js +++ b/src/jmapNew/shape/Signal/ESigPost.js @@ -79,6 +79,7 @@ class ESigPost extends Group { setColor(color) { if (color) { this.ver && this.ver.setStyle({ stroke: color }); + this.ver && this.ver.setStyle({ fill: color }); this.hor && this.hor.setStyle({ stroke: color }); } } From 5f00a9852605c4dbed78ccf192002f3f4b640574 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 21 Dec 2020 13:52:45 +0800 Subject: [PATCH 13/27] =?UTF-8?q?=E7=AE=AD=E5=A4=B4=E7=BB=98=E5=9B=BE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Arrow/index.js | 44 +++++-------------- .../haerbin_01/menus/menuDialog/logDetail.vue | 4 +- 2 files changed, 13 insertions(+), 35 deletions(-) diff --git a/src/jmapNew/shape/Arrow/index.js b/src/jmapNew/shape/Arrow/index.js index 377e50953..c21a2e453 100644 --- a/src/jmapNew/shape/Arrow/index.js +++ b/src/jmapNew/shape/Arrow/index.js @@ -1,4 +1,3 @@ -import Line from 'zrender/src/graphic/shape/Line'; import Group from 'zrender/src/container/Group'; import {isShowThePrdType} from '../../utils/handlePath'; import Polygon from 'zrender/src/graphic/shape/Polygon'; @@ -24,36 +23,25 @@ export default class Arrow extends Group { create() { const model = this.model; - this.triangle = new Polygon({ + this.arrow = new Polygon({ zlevel: this.zlevel, z: this.z, shape: { points: [ [model.position.x, model.position.y], - [model.position.x + model.triangleLength, model.position.y + model.triangleHeight / 2], - [model.position.x + model.triangleLength, model.position.y - model.triangleHeight / 2] + [model.position.x + model.triangleLength, model.position.y - model.triangleHeight / 2], + [model.position.x + model.triangleLength, model.position.y - model.lineWidth / 2], + [model.position.x + model.length, model.position.y - model.lineWidth / 2], + [model.position.x + model.length, model.position.y + model.lineWidth / 2], + [model.position.x + model.triangleLength, model.position.y + model.lineWidth / 2], + [model.position.x + model.triangleLength, model.position.y + model.triangleHeight / 2] ] }, style: { fill: model.color } }); - this.line = new Line({ - zlevel: this.zlevel, - z: this.z, - shape: { - x1: model.position.x + model.triangleLength, - y1: model.position.y, - x2: model.position.x + model.length, - y2: model.position.y - }, - style: { - lineWidth: model.lineWidth, - stroke: model.color - } - }); - this.add(this.triangle); - this.add(this.line); + this.add(this.arrow); } setState(model) { @@ -64,26 +52,18 @@ export default class Arrow extends Group { const showMode = this.model.showMode; const showConditions = this.model.showConditions; if (!showConditions || showConditions === '01' || showMode === showConditions) { - this.eachChild((child) => { - child.show(); - }); + this.arrow.show(); } else { - this.eachChild((child) => { - child.hide(); - }); + this.arrow.hide(); } } setShowStation(stationCode) { if (!stationCode || this.model.stationCode === stationCode) { - this.eachChild((child) => { - child.show(); - }); + this.arrow.show(); this.isShowShape = true; this.setState(this.model); } else { - this.eachChild((child) => { - child.hide(); - }); + this.arrow.hide(); this.isShowShape = false; } } diff --git a/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue b/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue index 49d097474..b3cf77c06 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue @@ -183,10 +183,8 @@ export default { } }; - - From 0f6090c5767bf0071e4e2c44902cf3180d705cf4 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Mon, 21 Dec 2020 14:09:50 +0800 Subject: [PATCH 14/27] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/ConstConfig.js | 4 +- src/views/lesson/trainingRule/addEdit.vue | 83 +++-------------------- 2 files changed, 11 insertions(+), 76 deletions(-) diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index d63ce2e41..9d5e6dde8 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -169,8 +169,8 @@ export default { ControlConvertMenu: {enlabel: 'Control mode training', label:'控制模式实训'}, LimitControl: {enlabel: 'Control mode limit', label:'全线限速实训'}, TrainWindow: {enlabel: 'TrainWindow training', label:'车次窗实训'}, - Driver:{enlabel: 'Driver training', label:'司机实训'}, - DirectionRod:{enlabel: 'Direction rod training', label:'方向杆实训'} + Driver: {enlabel: 'Driver training', label:'司机实训'}, + DirectionRod: {enlabel: 'Direction rod training', label:'方向杆实训'} }, interfaceErrorConfig: { '500000': { type: '权限错误:', message: '您尚未有该操作权限!'}, diff --git a/src/views/lesson/trainingRule/addEdit.vue b/src/views/lesson/trainingRule/addEdit.vue index f453c575b..c36ef7229 100644 --- a/src/views/lesson/trainingRule/addEdit.vue +++ b/src/views/lesson/trainingRule/addEdit.vue @@ -11,6 +11,9 @@