From eb7b9a2edd20d32f70042e8d8ac8b189ae9e13cf Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Wed, 13 Nov 2019 11:17:46 +0800
Subject: [PATCH 1/6] =?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/display/index.vue | 36 +-----------------
src/views/display/menuDemon.vue | 4 +-
src/views/display/menuSchema.vue | 63 +++++++++++++++++++++-----------
3 files changed, 44 insertions(+), 59 deletions(-)
diff --git a/src/views/display/index.vue b/src/views/display/index.vue
index 39342ecf4..ef64d1c80 100644
--- a/src/views/display/index.vue
+++ b/src/views/display/index.vue
@@ -34,12 +34,8 @@
ref="menuSchema"
:offset="offset"
:group="group"
- @runPlanLoadShow="runPlanLoadShow"
- @runPlanViewShow="runPlanViewShow"
- @faultChooseShow="faultChooseShow"
- @runQuestLoadShow="runQuestLoadShow"
- @runAddRolesLoadShow="runAddRolesLoadShow"
@switchMode="switchMode"
+ @selectQuest="selectQuest"
/>
@@ -48,18 +44,11 @@
-
-
-
-
diff --git a/src/store/modules/runplan.js b/src/store/modules/runplan.js
index d0af9b925..491789fa0 100644
--- a/src/store/modules/runplan.js
+++ b/src/store/modules/runplan.js
@@ -1,145 +1,145 @@
const runPlan = {
- namespaced: true,
+ namespaced: true,
- state: {
- stations: [], // 车站列表
- planData: {}, // 运行图原始数据
- editData: {}, // 运行图编辑数据
- updateData: {}, // 运行图更新数据
- planSizeCount: 0, // 运行图canvas 大小变更标识
- planLoadedCount: 0, // 运行图数据更新
- planUpdateCount: 0, // 运行图更新标识
- selected: {}, // 选择的对象
- width: 800, // 运行图canvas 容器 宽度
- height: 600, // 运行图canvas 容器 高度
- refreshCount: 0 // 刷新页面重新加载
- },
- getters: {
- stations: (state) => {
- return state.stations || [];
- },
- convertPlanData: (state) => () => {
- const data = { serviceNumberDataList: [] };
- const serviceNumberList = Object.keys(state.editData).sort((a, b) => {
- return state.editData[a].oldIndex - state.editData[b].oldIndex;
- });
+ state: {
+ stations: [], // 车站列表
+ planData: {}, // 运行图原始数据
+ editData: {}, // 运行图编辑数据
+ updateData: {}, // 运行图更新数据
+ planSizeCount: 0, // 运行图canvas 大小变更标识
+ planLoadedCount: 0, // 运行图数据更新
+ planUpdateCount: 0, // 运行图更新标识
+ selected: {}, // 选择的对象
+ width: 800, // 运行图canvas 容器 宽度
+ height: 600, // 运行图canvas 容器 高度
+ refreshCount: 0 // 刷新页面重新加载
+ },
+ getters: {
+ stations: (state) => {
+ return state.stations || [];
+ },
+ convertPlanData: (state) => () => {
+ const data = { serviceNumberDataList: [] };
+ const serviceNumberList = Object.keys(state.editData).sort((a, b) => {
+ return state.editData[a].oldIndex - state.editData[b].oldIndex;
+ });
- serviceNumberList.forEach(serviceNumber => {
- const serviceObj = {
- serviceNumber: serviceNumber,
- tripNumberDataList: []
- };
+ serviceNumberList.forEach(serviceNumber => {
+ const serviceObj = {
+ serviceNumber: serviceNumber,
+ tripNumberDataList: []
+ };
- if (state.editData[serviceNumber].backup) {
- serviceObj['backup'] = state.editData[serviceNumber].backup;
- }
+ if (state.editData[serviceNumber].backup) {
+ serviceObj['backup'] = state.editData[serviceNumber].backup;
+ }
- const trainMap = state.editData[serviceNumber].trainMap;
- const tripNumberList = Object.keys(trainMap).sort((a, b) => {
- return trainMap[a].oldIndex - trainMap[b].oldIndex;
- });
+ const trainMap = state.editData[serviceNumber].trainMap;
+ const tripNumberList = Object.keys(trainMap).sort((a, b) => {
+ return trainMap[a].oldIndex - trainMap[b].oldIndex;
+ });
- tripNumberList.forEach(tripNumber => {
- serviceObj.tripNumberDataList.push(trainMap[tripNumber]);
- });
+ tripNumberList.forEach(tripNumber => {
+ serviceObj.tripNumberDataList.push(trainMap[tripNumber]);
+ });
- data.serviceNumberDataList.push(serviceObj);
- });
+ data.serviceNumberDataList.push(serviceObj);
+ });
- return data;
- }
- },
- mutations: {
- setWidth: (state, width) => {
- state.width = width;
- state.planSizeCount += 1;
- },
- setHeight: (state, height) => {
- state.height = height;
- state.planSizeCount += 1;
- },
- setStations: (state, stations) => {
- state.stations = stations;
- },
- setPlanData: (state, data) => {
- state.planData = data;
- state.editData = {};
- if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
- const serviceList = data.serviceNumberDataList;
- serviceList.forEach((service, i) => {
- const trainList = service.tripNumberDataList;
- state.editData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
- trainList.forEach((train, j) => {
- state.editData[service.serviceNumber].trainMap[`${train.directionCode}${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList };
- });
- });
- }
- state.planLoadedCount++;
- },
- setSelected: (state, selected) => {
- state.selected = selected;
- },
- addserviceNumber: (state, serviceNumber) => {
- const serviceObj = state.planData[serviceNumber];
- if (serviceObj) {
- const oldIndex = serviceObj.oldIndex;
- state.planData[serviceNumber] = { oldIndex, serviceNumber, trainMap: {} };
- state.planLoadedCount++;
- }
- },
- updateRunPlanData: (state, data) => {
- state.updateData = data;
- state.planUpdateCount++;
- },
- clear: (state) => {
- state.stations = [];
- state.planData = {};
- state.editData = {};
- state.selected = {};
- },
- refresh: (state) => {
- state.refreshCount++;
- }
- },
- actions: {
- /** 设置运行图大小*/
- resize({ commit }, opt) {
- if (opt.width) {
- commit('setWidth', opt.width);
- }
- if (opt.height) {
- commit('setHeight', opt.height);
- }
- },
- /** 设置stations数据 */
- setStations: ({ commit }, mapModel) => {
- commit('setStations', mapModel);
- },
- /** 设置运行图数据 */
- setPlanData: ({ commit }, data) => {
- commit('setPlanData', data);
- },
- /** 增加服务号*/
- addserviceNumber: ({ commit }, serviceNumber) => {
- commit('addserviceNumber', serviceNumber);
- },
- /** 选择车次*/
- setSelected: ({ commit }, selected) => {
- commit('setSelected', selected);
- },
- /** 更新数据*/
- updateRunPlanData: ({ commit }, data) => {
- commit('updateRunPlanData', data);
- },
- /** 清空数据*/
- clear: ({ commit }) => {
- commit('clear');
- },
- /** 刷新页面*/
- refresh: ({commit}) => {
- commit('refresh');
- }
- }
+ return data;
+ }
+ },
+ mutations: {
+ setWidth: (state, width) => {
+ state.width = width;
+ state.planSizeCount += 1;
+ },
+ setHeight: (state, height) => {
+ state.height = height;
+ state.planSizeCount += 1;
+ },
+ setStations: (state, stations) => {
+ state.stations = stations;
+ },
+ setPlanData: (state, data) => {
+ state.planData = data;
+ state.editData = {};
+ if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
+ const serviceList = data.serviceNumberDataList;
+ serviceList.forEach((service, i) => {
+ const trainList = service.tripNumberDataList;
+ state.editData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
+ trainList.forEach((train, j) => {
+ state.editData[service.serviceNumber].trainMap[`${train.directionCode}${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList };
+ });
+ });
+ }
+ state.planLoadedCount++;
+ },
+ setSelected: (state, selected) => {
+ state.selected = selected;
+ },
+ addserviceNumber: (state, serviceNumber) => {
+ const serviceObj = state.planData[serviceNumber];
+ if (serviceObj) {
+ const oldIndex = serviceObj.oldIndex;
+ state.planData[serviceNumber] = { oldIndex, serviceNumber, trainMap: {} };
+ state.planLoadedCount++;
+ }
+ },
+ updateRunPlanData: (state, data) => {
+ state.updateData = data;
+ state.planUpdateCount++;
+ },
+ clear: (state) => {
+ state.stations = [];
+ state.planData = {};
+ state.editData = {};
+ state.selected = {};
+ },
+ refresh: (state) => {
+ state.refreshCount++;
+ }
+ },
+ actions: {
+ /** 设置运行图大小*/
+ resize({ commit }, opt) {
+ if (opt.width) {
+ commit('setWidth', opt.width);
+ }
+ if (opt.height) {
+ commit('setHeight', opt.height);
+ }
+ },
+ /** 设置stations数据 */
+ setStations: ({ commit }, mapModel) => {
+ commit('setStations', mapModel);
+ },
+ /** 设置运行图数据 */
+ setPlanData: ({ commit }, data) => {
+ commit('setPlanData', data);
+ },
+ /** 增加服务号*/
+ addserviceNumber: ({ commit }, serviceNumber) => {
+ commit('addserviceNumber', serviceNumber);
+ },
+ /** 选择车次*/
+ setSelected: ({ commit }, selected) => {
+ commit('setSelected', selected);
+ },
+ /** 更新数据*/
+ updateRunPlanData: ({ commit }, data) => {
+ commit('updateRunPlanData', data);
+ },
+ /** 清空数据*/
+ clear: ({ commit }) => {
+ commit('clear');
+ },
+ /** 刷新页面*/
+ refresh: ({commit}) => {
+ commit('refresh');
+ }
+ }
};
export default runPlan;
diff --git a/src/views/exam/detail/courseDetail.vue b/src/views/exam/detail/courseDetail.vue
index 274ee4a74..7edbeab30 100644
--- a/src/views/exam/detail/courseDetail.vue
+++ b/src/views/exam/detail/courseDetail.vue
@@ -46,7 +46,7 @@
{{ $t('exam.buy') }}
{{ $t('exam.distributePermission') }}
{{ $t('global.transferQRCode') }}
- {{ $t('exam.viewCoursePapers') }}
+ {{ $t('exam.viewCoursePapers') }}
{{ $t('exam.returnCourseList') }}
@@ -152,10 +152,14 @@ export default {
},
checkCourse() {
this.loading = true;
- this.$router.push({
- path: `${UrlConfig.trainingPlatform.examRuleManage}`,
- query: { lessonId: this.courseModel.id }
- });
+ if (this.isAddRule) {
+ this.$router.push({
+ path: `${UrlConfig.trainingPlatform.examRuleManage}`,
+ query: { lessonId: this.courseModel.id }
+ });
+ } else {
+ this.$messageBox(this.$t('tip.notViewTheCoursePaper'));
+ }
},
transfer() { // 转增
this.loading = false;
diff --git a/src/views/orderauthor/permission/index.vue b/src/views/orderauthor/permission/index.vue
index 3aa320641..28c024879 100644
--- a/src/views/orderauthor/permission/index.vue
+++ b/src/views/orderauthor/permission/index.vue
@@ -70,7 +70,7 @@ export default {
tagType: (row) => {
switch (row.canDistribute) {
case true: return 'success';
- case false: return 'warning';
+ case false: return 'danger';
}
}
},
@@ -82,7 +82,7 @@ export default {
tagType: (row) => {
switch (row.forever) {
case true: return 'success';
- case false: return 'warning';
+ case false: return 'danger';
}
}
},
@@ -143,6 +143,12 @@ export default {
type: '',
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04'); }
},
+ {
+ name: this.$t('orderAuthor.distributionAttribution'),
+ handleClick: this.handleBelongs,
+ type: '',
+ showControl: (row) => { return row.amount !== row.remains; }
+ },
{
name: this.$t('orderAuthor.recovery'),
handleClick: this.handleRestore,
@@ -175,7 +181,7 @@ export default {
});
},
formatterDate(row, porpInfo) {
- return row[porpInfo.property] ? row[porpInfo.property] : '---';
+ return row[porpInfo.property] ? row[porpInfo.property] : this.$t('global.perpetual');
},
queryFunction(params) {
return listPackagePermission(params);
@@ -235,6 +241,9 @@ export default {
this.reloadTable();
});
}).catch(() => { });
+ },
+ handleBelongs(index, row) {
+ this.$router.push({ path: `/orderauthor/rules/manage`, query: {distributeId: row.id}});
}
}
};
diff --git a/src/views/orderauthor/rules/belong.vue b/src/views/orderauthor/rules/belong.vue
new file mode 100644
index 000000000..2d4248f4f
--- /dev/null
+++ b/src/views/orderauthor/rules/belong.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/orderauthor/rules/index.vue b/src/views/orderauthor/rules/index.vue
index 7c98e0ca0..cd83bdccd 100644
--- a/src/views/orderauthor/rules/index.vue
+++ b/src/views/orderauthor/rules/index.vue
@@ -2,21 +2,26 @@
+
From 1cb0383aac36c5f6f848a2b61bcf77a4793532fb Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 13 Nov 2019 14:42:59 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=B3=A8=E9=94=80?=
=?UTF-8?q?=E4=B8=AA=E4=BA=BA=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E7=9A=84=E6=9D=83=E9=99=90=E6=89=93=E5=8C=85=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/package/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/package/index.vue b/src/views/package/index.vue
index aef8841a9..e0e7531ae 100644
--- a/src/views/package/index.vue
+++ b/src/views/package/index.vue
@@ -120,7 +120,7 @@ export default {
}
],
actions: [
- { text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack }
+ // { text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack } //后端逻辑调整,暂时注销该功能。
]
}
};
From 9d8a3270d8b644dc47be6c306e7ba702b5d9d93e Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Wed, 13 Nov 2019 14:57:08 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E6=9D=83=E9=99=90=E8=BD=AC=E8=B5=A0?=
=?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/i18n/langs/en/error.js | 3 ++-
src/i18n/langs/zh/error.js | 3 ++-
src/views/components/limits/distribute.vue | 4 ++++
src/views/components/limits/transfer.vue | 4 ++++
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/i18n/langs/en/error.js b/src/i18n/langs/en/error.js
index b9231de7a..11024cbd7 100644
--- a/src/i18n/langs/en/error.js
+++ b/src/i18n/langs/en/error.js
@@ -104,5 +104,6 @@ export default {
getRealDeviceListFailed: 'Get real device list failed!',
deleteRealDeviceFailed: 'Delete real device failed!',
checkTheValidityFirst: 'Please check the validity first!',
- permissionAtLeast:'At least one of the number of permissions is more than 0'
+ permissionAtLeast:'At least one of the number of permissions is more than 0',
+ permissionTimeError:'End time must be more than start time'
};
diff --git a/src/i18n/langs/zh/error.js b/src/i18n/langs/zh/error.js
index ed1c8c26a..98c43a7eb 100644
--- a/src/i18n/langs/zh/error.js
+++ b/src/i18n/langs/zh/error.js
@@ -104,5 +104,6 @@ export default {
getRealDeviceListFailed: '获取真实设备列表失败!',
deleteRealDeviceFailed: '删除真实设备失败!',
checkTheValidityFirst: '请先进行有效性检查!',
- permissionAtLeast:'至少有一种权限的数量大于0'
+ permissionAtLeast:'至少有一种权限的数量大于0',
+ permissionTimeError:'结束时间必须大于开始时间'
};
diff --git a/src/views/components/limits/distribute.vue b/src/views/components/limits/distribute.vue
index 2c6eb4cf1..37db6237f 100644
--- a/src/views/components/limits/distribute.vue
+++ b/src/views/components/limits/distribute.vue
@@ -221,6 +221,10 @@ export default {
}
model.userPermissionAndAmountVOList.push({'userPermissionId':data.id, 'amount':data.chooseNumber});
});
+ if (model.endTime <= model.startTime) {
+ this.$messageBox( this.$t('error.permissionTimeError'));
+ return false;
+ }
if (count <= 0) {
this.$messageBox( this.$t('error.permissionAtLeast'));
return false;
diff --git a/src/views/components/limits/transfer.vue b/src/views/components/limits/transfer.vue
index f8cdd2119..3b8b1a271 100644
--- a/src/views/components/limits/transfer.vue
+++ b/src/views/components/limits/transfer.vue
@@ -222,6 +222,10 @@ export default {
}
model.userPermissionAndAmountVOList.push({'userPermissionId':data.id, 'amount':data.chooseNumber});
});
+ if (model.endTime <= model.startTime) {
+ this.$messageBox( this.$t('error.permissionTimeError'));
+ return false;
+ }
if (count <= 0) {
this.$messageBox( this.$t('error.permissionAtLeast'));
return false;
From 38c002166ddfc76a62652052306ac604ed7f5419 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 14 Nov 2019 09:02:18 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E5=88=86=E5=8F=91=E8=BD=AC=E5=A2=9E?=
=?UTF-8?q?=E6=97=A5=E6=9C=9F=E4=B8=8D=E8=83=BD=E9=80=89=E6=8B=A9=E4=BB=8A?=
=?UTF-8?q?=E5=A4=A9=E4=B9=8B=E5=89=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/components/limits/distribute.vue | 6 ++++++
src/views/components/limits/transfer.vue | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/views/components/limits/distribute.vue b/src/views/components/limits/distribute.vue
index 2c6eb4cf1..e55f893fd 100644
--- a/src/views/components/limits/distribute.vue
+++ b/src/views/components/limits/distribute.vue
@@ -10,6 +10,7 @@
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
+ :picker-options="pickerOptions"
@change="changeSelectDate"
/>
@@ -76,6 +77,11 @@ export default {
name: 'GiveLesson',
data() {
return {
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
+ }
+ },
dialogVisible: false,
closable:false,
isDisabled:true,
diff --git a/src/views/components/limits/transfer.vue b/src/views/components/limits/transfer.vue
index f8cdd2119..e746eb2b4 100644
--- a/src/views/components/limits/transfer.vue
+++ b/src/views/components/limits/transfer.vue
@@ -10,6 +10,7 @@
type="daterange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
+ :picker-options="pickerOptions"
@change="changeSelectDate"
/>
@@ -76,6 +77,11 @@ export default {
name: 'TansferPermission',
data() {
return {
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
+ }
+ },
dialogVisible: false,
closable:false,
isDisabled:true,
@@ -151,7 +157,6 @@ export default {
}
},
methods: {
-
setTotalMax() {
let endTime;
let startTime;