From b5a93f7ce1b0954c1150c769a58468c7d5b75624 Mon Sep 17 00:00:00 2001
From: ival <610568032@qq.com>
Date: Wed, 21 Aug 2019 13:48:06 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/langs/en/error.js | 3 +-
src/i18n/langs/en/global.js | 5 +-
src/i18n/langs/en/map.js | 4 +-
src/i18n/langs/en/permission.js | 14 ++-
src/i18n/langs/en/rules.js | 8 +-
src/i18n/langs/en/tip.js | 2 +-
src/i18n/langs/zh/error.js | 5 +-
src/i18n/langs/zh/global.js | 5 +-
src/i18n/langs/zh/map.js | 4 +-
src/i18n/langs/zh/permission.js | 14 ++-
src/i18n/langs/zh/rules.js | 7 +-
.../mapedit/mapoperate/train/create.vue | 50 +++++----
.../mapedit/mapoperate/train/trainmodel.vue | 8 +-
src/views/package/draft/canDistribute.vue | 102 ++++++++++--------
src/views/package/draft/editRule.vue | 36 +++----
src/views/package/draft/ruleForm.vue | 38 +++----
16 files changed, 185 insertions(+), 120 deletions(-)
diff --git a/src/i18n/langs/en/error.js b/src/i18n/langs/en/error.js
index 8fd8babc0..ccf3eba0d 100644
--- a/src/i18n/langs/en/error.js
+++ b/src/i18n/langs/en/error.js
@@ -55,6 +55,7 @@ export default {
batchCreateFailed: 'Batch build operation definition failed',
createOperateRuleFailed: 'Failed to create operation definition',
createOperateStepFailed: 'The create action step failed',
- updateOperateStepFailed: 'The update action step failed'
+ updateOperateStepFailed: 'The update action step failed',
+ packagePermissionFailed: 'Packaging authority failed'
};
diff --git a/src/i18n/langs/en/global.js b/src/i18n/langs/en/global.js
index af2bc94f8..aa803d972 100644
--- a/src/i18n/langs/en/global.js
+++ b/src/i18n/langs/en/global.js
@@ -96,5 +96,8 @@ export default {
distributePermission: 'Distribute permission',
transferQRCode: 'Transfer QRCode',
minutes: 'minutes',
- minute: 'minute'
+ minute: 'minute',
+ totoal: 'Totoal',
+ publishPermission: 'The public authority',
+ specialPermission: 'Special permission'
};
diff --git a/src/i18n/langs/en/map.js b/src/i18n/langs/en/map.js
index 35b0f72ad..bdc7ba4fb 100644
--- a/src/i18n/langs/en/map.js
+++ b/src/i18n/langs/en/map.js
@@ -488,6 +488,8 @@ export default {
switchBCode: 'Switch number 2',
switchACodeNum: 'Switch ID 1:',
- switchBCodeNum: 'Switch ID 2:'
+ switchBCodeNum: 'Switch ID 2:',
+
+ wellDelTrianModel: 'Deleting the train model will delete the associated class cars together, please confirm whether to continue?'
};
diff --git a/src/i18n/langs/en/permission.js b/src/i18n/langs/en/permission.js
index 465458765..ca199e6b8 100644
--- a/src/i18n/langs/en/permission.js
+++ b/src/i18n/langs/en/permission.js
@@ -15,5 +15,17 @@ export default {
startTime: 'Start Time',
endTime: 'End Time',
belonger: 'Owner',
- userList: 'User List'
+ userList: 'User List',
+ customPackageRules: 'Custom packaging rules',
+ addRules: 'Add rules',
+ package: 'Pack',
+ getQrcode: 'Get qr code',
+ hasExitRule: 'This type rule already exists',
+ pleaseAddRule: 'Please add rules',
+ selectDate: 'Select time',
+ addPermissionPackageRule: 'Add authority packaging rules',
+ editPermissionPackageRule: 'edit authority packaging rule',
+ restPermissionMaxNumber: '(maximum number of remaining permissions: {0})',
+ pleaseSelectTransferPermission: 'Select transfer permissions'
+
};
diff --git a/src/i18n/langs/en/rules.js b/src/i18n/langs/en/rules.js
index 0298e1a0c..2baded317 100644
--- a/src/i18n/langs/en/rules.js
+++ b/src/i18n/langs/en/rules.js
@@ -217,5 +217,11 @@ export default {
inputSkinType: 'Please select skin type',
inputOperateCode: 'Please enter the step code',
inputStepNo: 'Please enter the step number',
- inputStepTips: 'Please enter step number. Please enter step prompt'
+ inputStepTips: 'Please enter step number. Please enter step prompt',
+ selectMapName: 'Please select a map name',
+ selectMapProductName: 'Please select map product name',
+ inputTime: 'Please enter time',
+ inputPermissionNumber: 'Please enter the number of permissions',
+ permissionNumberGreater0: 'The number of permissions must be greater than 0'
+
};
diff --git a/src/i18n/langs/en/tip.js b/src/i18n/langs/en/tip.js
index 7c32a30b0..0261b8ee6 100644
--- a/src/i18n/langs/en/tip.js
+++ b/src/i18n/langs/en/tip.js
@@ -5,7 +5,7 @@ export default {
creatingFailed: 'Create a failure',
confirmDeletion: 'Confirm deletion?',
confirmBatchGeneration: 'Is batch generation confirmed?',
- hint: 'hint',
+ hint: 'Tips',
cancelledDelete: 'Cancelled delete',
cancelGeneration: 'Batch generation has been cancelled',
diff --git a/src/i18n/langs/zh/error.js b/src/i18n/langs/zh/error.js
index c184ffcb5..af63b7142 100644
--- a/src/i18n/langs/zh/error.js
+++ b/src/i18n/langs/zh/error.js
@@ -55,6 +55,7 @@ export default {
batchCreateFailed: '批量生成操作定义失败',
createOperateRuleFailed: '创建操作定义失败',
createOperateStepFailed: '创建操作步骤失败',
- updateOperateStepFailed: '更新操作步骤失败'
-
+ updateOperateStepFailed: '更新操作步骤失败',
+ packagePermissionFailed: '打包权限失败'
};
+
diff --git a/src/i18n/langs/zh/global.js b/src/i18n/langs/zh/global.js
index 52d07c21c..45c9f0812 100644
--- a/src/i18n/langs/zh/global.js
+++ b/src/i18n/langs/zh/global.js
@@ -97,5 +97,8 @@ export default {
distributePermission: '权限分发',
transferQRCode: '权限转赠',
minutes: '分钟',
- minute: '分钟'
+ minute: '分钟',
+ totoal: '总数',
+ publishPermission: '公用权限',
+ specialPermission: '专用权限'
};
diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js
index ec46dd6da..de8a3581d 100644
--- a/src/i18n/langs/zh/map.js
+++ b/src/i18n/langs/zh/map.js
@@ -490,6 +490,8 @@ export default {
switchBCode: '道岔2编号',
switchACodeNum: '道岔ID 1:',
- switchBCodeNum: '道岔ID 2:'
+ switchBCodeNum: '道岔ID 2:',
+
+ wellDelTrianModel: '删除车模型会将关联的类车一起删除,请确认是否继续?'
};
diff --git a/src/i18n/langs/zh/permission.js b/src/i18n/langs/zh/permission.js
index 1bdac6211..3e99db472 100644
--- a/src/i18n/langs/zh/permission.js
+++ b/src/i18n/langs/zh/permission.js
@@ -15,5 +15,17 @@ export default {
startTime: '开始时间',
endTime: '结束时间',
belonger: '归属人',
- userList: '用户列表'
+ userList: '用户列表',
+ customPackageRules: '定制打包规则',
+ addRules: '添加规则',
+ package: '打包',
+ getQrcode: '获取二维码',
+ hasExitRule: '已存在此类型规则',
+ pleaseAddRule: '请添加规则',
+ selectDate: '选择时间',
+ addPermissionPackageRule: '增加权限打包规则',
+ editPermissionPackageRule: '编辑权限打包规则',
+ restPermissionMaxNumber: '(剩余最大权限个数:{0})',
+ pleaseSelectTransferPermission: '选择转赠权限'
+
};
diff --git a/src/i18n/langs/zh/rules.js b/src/i18n/langs/zh/rules.js
index 0a2c0e519..7cec90d9e 100644
--- a/src/i18n/langs/zh/rules.js
+++ b/src/i18n/langs/zh/rules.js
@@ -224,6 +224,11 @@ export default {
inputTrainingRemark: '请输入实训说明',
inputOperateCode: '请输入步骤操作码',
inputStepNo: '请输入步骤序号',
- inputStepTips: '请输入步骤提示信息'
+ inputStepTips: '请输入步骤提示信息',
+ selectMapName: '请选择地图名称',
+ selectMapProductName: '请选择地图产品名称',
+ inputTime: '请输入时间',
+ inputPermissionNumber: '请输入权限个数',
+ permissionNumberGreater0: '权限个数必须大于0'
};
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue b/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue
index 743f58480..7df1e22fb 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue
@@ -109,31 +109,35 @@ export default {
this.$emit('dispatch', { callback: 'delTrainMode', params: code});
},
handleConfirm() {
- const list = [];
+ this.$refs['form'].validate((valid) => {
+ if (valid) {
+ const list = [];
- switch (this.mode) {
- case '01':
- list.push({
- _type: 'Train',
- code: getUID('Train'),
- modelCode: this.addModel.modelCode,
- groupNumber: this.addModel.groupNumber
- });
- break;
- case '02':
- for (var num = this.addModel.range.beg; num <= this.addModel.range.end; num++) {
- list.push({
- _type: 'Train',
- code: getUID('Train'),
- modelCode: this.addModel.modelCode,
- groupNumber: ('000'+num).slice(-3)
- });
+ switch (this.mode) {
+ case '01':
+ list.push({
+ _type: 'Train',
+ code: getUID('Train'),
+ modelCode: this.addModel.modelCode,
+ groupNumber: this.addModel.groupNumber
+ });
+ break;
+ case '02':
+ for (var num = this.addModel.range.beg; num <= this.addModel.range.end; num++) {
+ list.push({
+ _type: 'Train',
+ code: getUID('Train'),
+ modelCode: this.addModel.modelCode,
+ groupNumber: ('000'+num).slice(-3)
+ });
+ }
+ break;
+ }
+
+ this.$emit('dispatch', { callback: 'create', params: list});
+ this.doClose();
}
- break;
- }
-
- this.$emit('dispatch', { callback: 'create', params: list});
- this.doClose();
+ });
}
}
};
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/train/trainmodel.vue b/src/views/map/mapdraft/mapedit/mapoperate/train/trainmodel.vue
index b209ca46d..b1922bfde 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/train/trainmodel.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/train/trainmodel.vue
@@ -156,7 +156,13 @@ export default {
} else if (this.isUpt) {
this.operateTrainModel({ model: this.formModel, type: 'UPT' });
} else if (this.isDel) {
- this.operateTrainModel({ model: this.formModel, type: 'DEL'});
+ this.$confirm(this.$t('map.wellDelTrianModel'), this.$t('global.tips'), {
+ confirmButtonText: this.$t('global.confirm'),
+ cancelButtonText: this.$t('global.cancel'),
+ type: 'warning'
+ }).then(() => {
+ this.operateTrainModel({ model: this.formModel, type: 'DEL'});
+ }).catch(() => { });
}
this.doClose();
}
diff --git a/src/views/package/draft/canDistribute.vue b/src/views/package/draft/canDistribute.vue
index 8dfec5c53..b74356b19 100644
--- a/src/views/package/draft/canDistribute.vue
+++ b/src/views/package/draft/canDistribute.vue
@@ -1,51 +1,59 @@
-