From 85f4a5e1b0a99ee9e9e46a48a20f48a59dd7c0ab Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Wed, 9 Sep 2020 11:25:31 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=B3=BB=E7=BB=9F=E9=80=9A?=
=?UTF-8?q?=E7=9F=A5=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/langs/en/router.js | 1 +
src/i18n/langs/zh/router.js | 1 +
src/router/index_Common.js | 8 +
src/scripts/DictionaryData.js | 6 +
.../mapoperate/section/batchSettings.vue | 51 +++----
.../newMapdraft/mapoperate/section/index.vue | 44 +++---
src/views/system/notification/index.vue | 140 ++++++++++++++++++
7 files changed, 204 insertions(+), 47 deletions(-)
create mode 100644 src/views/system/notification/index.vue
diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js
index d9474d1a2..39e32f2bd 100644
--- a/src/i18n/langs/en/router.js
+++ b/src/i18n/langs/en/router.js
@@ -70,6 +70,7 @@ export default {
runGraphReleaseApplication: 'Run graph release application',
subsystemGeneration: 'Subsystem generation',
newsBulletin: 'New bulletin',
+ notificationBulletin: 'Systematic notification',
commandDictionary: 'Command dictionary',
configLine: 'Line management',
deviceManage: 'Device management',
diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js
index e46828125..e08cd0830 100644
--- a/src/i18n/langs/zh/router.js
+++ b/src/i18n/langs/zh/router.js
@@ -71,6 +71,7 @@ export default {
runGraphReleaseApplication: '运行图发布申请',
subsystemGeneration: '子系统生成',
newsBulletin: '消息公告',
+ notificationBulletin: '系统通知',
commandDictionary: '指令字典',
configLine: '线路管理',
deviceManage: '设备管理',
diff --git a/src/router/index_Common.js b/src/router/index_Common.js
index bfe7135f2..72224f52d 100644
--- a/src/router/index_Common.js
+++ b/src/router/index_Common.js
@@ -44,6 +44,7 @@ const News = () => import('@/views/system/news/index');
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
const configLine = () => import('@/views/system/configLine/index');
+const Notification = () => import('@/views/system/notification/index');
const IscsSystem = () => import('@/views/iscs/iscsSystem/index');
const IscsDraw = () => import('@/views/iscs/iscsDraw/index');
@@ -813,6 +814,13 @@ export const asyncRouter = [
i18n: 'router.newsBulletin'
}
},
+ { // 系统通知
+ path: 'notification',
+ component: Notification,
+ meta: {
+ i18n: 'router.notificationBulletin'
+ }
+ },
{ // 命令管理
path: 'commands',
component: CommandDictionary,
diff --git a/src/scripts/DictionaryData.js b/src/scripts/DictionaryData.js
index 12ae0e84c..48d4c0cc6 100644
--- a/src/scripts/DictionaryData.js
+++ b/src/scripts/DictionaryData.js
@@ -86,6 +86,12 @@ function loadDictionary() {
_LimitOperation: [],
+ _SystemInform: [], // 通知类型
+
+ systemInform: function () {
+ return queryData('system_inform', this, '_SystemInform');
+ },
+
regionTypeList: function () {
return queryData('region_type_list', this, '_RegionTypeList');
},
diff --git a/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue b/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue
index 0375de47c..e3f9a04e7 100644
--- a/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue
@@ -2,13 +2,13 @@
-
-
+
+
{{ $t('global.set') }}
@@ -124,10 +124,10 @@ export default {
data() {
return {
activeName: '',
- form: {
- leftDistance: 0,
- rightDistance: 0
- },
+ // form: {
+ // leftDistance: 0,
+ // rightDistance: 0
+ // },
formModel: {
modelList: [],
trainPosType: ''
@@ -168,7 +168,8 @@ export default {
'sectionList',
'stationList',
'switchList',
- 'stationStandList'
+ 'stationStandList',
+ 'trainModelList'
])
},
methods:{
@@ -178,25 +179,25 @@ export default {
batchSettings() {
this.tipInfoList = [];
const models = [];
- if (this.form.leftDistance || this.form.rightDistance) {
- this.sectionList.forEach(section => {
- if (section.transferTrack || section.reentryTrack || section.standTrack) {
- if (section.lengthFact < this.form.leftDistance || section.lengthFact < this.form.rightDistance ) {
- this.tipInfoList.push(`${section.name}[${section.code}]${this.$t('map.failedToSetParkingPointOffset')}`);
- } else {
- const model = deepAssign({}, section);
- model.leftStopPointOffset = this.form.leftDistance;
- model.rightStopPointOffset = model.lengthFact - this.form.rightDistance;
- models.push(model);
- }
+ this.sectionList.forEach(section => {
+ if (section.transferTrack || section.reentryTrack || section.standTrack) {
+ const trainModel = this.trainModelList[0];
+ if (section.lengthFact < trainModel.length ) {
+ this.tipInfoList.push(`${section.name}[${section.code}]${this.$t('map.failedToSetParkingPointOffset')}`);
+ } else {
+ const model = deepAssign({}, section);
+ const difference = (section.lengthFact - trainModel.length) / 2;
+ model.leftStopPointOffset = Math.floor(difference);
+ model.rightStopPointOffset = model.leftStopPointOffset + trainModel.length;
+ models.push(model);
}
- });
- this.$emit('updateMapModel', models);
- if (this.tipInfoList.length) {
- this.$emit('tipInfoHandle', this.tipInfoList);
- } else {
- this.$message.success(this.$t('tip.stopPointOffsetTip'));
}
+ });
+ this.$emit('updateMapModel', models);
+ if (this.tipInfoList.length) {
+ this.$emit('tipInfoHandle', this.tipInfoList);
+ } else {
+ this.$message.success(this.$t('tip.stopPointOffsetTip'));
}
},
setPositionType() {
diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue
index 52c44d02a..c5915e111 100644
--- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue
@@ -221,20 +221,20 @@ export default {
callback();
}
};
- var validateLeftStopPointOffset = (rule, value, callback) => {
- if (value != this.editModel.rightStopPointOffset) {
- callback();
- } else {
- callback(new Error('不能与右侧停车点一致'));
- }
- };
- var validateRightStopPointOffset = (rule, value, callback) => {
- if (value != this.editModel.leftStopPointOffset) {
- callback();
- } else {
- callback(new Error('不能与左侧停车点一致'));
- }
- };
+ // var validateLeftStopPointOffset = (rule, value, callback) => {
+ // if (value != this.editModel.rightStopPointOffset) {
+ // callback();
+ // } else {
+ // callback(new Error('不能与右侧停车点一致'));
+ // }
+ // };
+ // var validateRightStopPointOffset = (rule, value, callback) => {
+ // if (value != this.editModel.leftStopPointOffset) {
+ // callback();
+ // } else {
+ // callback(new Error('不能与左侧停车点一致'));
+ // }
+ // };
const rules = {
code: [
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
@@ -245,14 +245,14 @@ export default {
type: [
{ required: true, message: this.$t('rules.pleaseEnterSectionType'), trigger: 'blur' }
],
- leftStopPointOffset: [
- { required: true, message: this.$t('rules.pleaseEnterLeftStopPointOffset'), trigger: 'blur' },
- { validator: validateLeftStopPointOffset, trigger: 'blur' }
- ],
- rightStopPointOffset: [
- { required: true, message: this.$t('rules.rightStopPointOffset'), trigger: 'blur' },
- { validator: validateRightStopPointOffset, trigger: 'blur' }
- ],
+ // leftStopPointOffset: [
+ // { required: true, message: this.$t('rules.pleaseEnterLeftStopPointOffset'), trigger: 'blur' },
+ // { validator: validateLeftStopPointOffset, trigger: 'blur' }
+ // ],
+ // rightStopPointOffset: [
+ // { required: true, message: this.$t('rules.rightStopPointOffset'), trigger: 'blur' },
+ // { validator: validateRightStopPointOffset, trigger: 'blur' }
+ // ],
'destinationCodePoint.x': [
{ required: true, message: this.$t('rules.destinationCodePointX'), trigger: 'blur' }
],
diff --git a/src/views/system/notification/index.vue b/src/views/system/notification/index.vue
new file mode 100644
index 000000000..29d66217b
--- /dev/null
+++ b/src/views/system/notification/index.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+ {{ $t('system.push') }}
+
+
+
+
+
+
+