prdType 接口调整

This commit is contained in:
joylink_cuiweidong 2019-12-27 19:36:29 +08:00
parent 0486d0211b
commit 40bc4840e7
6 changed files with 45 additions and 39 deletions

View File

@ -69,9 +69,9 @@ export function runDiagramIsStart(group) {
* 仿真系统CBTC
* @param {*} mapId
*/
export function simulationNotify({ mapId, mapPrdId }) {
export function simulationNotify({ mapId, prdType }) {
return request({
url: `/api/simulation/${mapId}/${mapPrdId}`,
url: `/api/simulation/${mapId}/${prdType}`,
method: 'get'
});
}

View File

@ -143,7 +143,7 @@ export default {
cityCode: row.cityCode,
mapId: row.mapId,
name: row.name,
prdId: row.prdId
prdType: row.prdType
};
adminPublishLesson(params, row.id).then(response => {
this.$message.success(this.$t('tip.coursePublishSuccessful'));

View File

@ -93,7 +93,7 @@ export default {
endTime: '',
date: ''
},
prdId: '',
prdType: '',
mapId: '',
numberMessage: '',
PermissionType: '',
@ -175,7 +175,7 @@ export default {
changeSelectDate() {
if (this.formModel.date) {
this.isLoading = true;
const data = {mapId:this.mapId, prdId:this.prdId, startTime:this.formModel.date[0], endTime:this.formModel.date[1], type:this.PermissionType};
const data = {mapId:this.mapId, prdType:this.prdType, startTime:this.formModel.date[0], endTime:this.formModel.date[1], type:this.PermissionType};
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
data.lessonId = this.formModel.lessonId;
}
@ -205,7 +205,7 @@ export default {
if (data) {
this.formModel.lessonId = data.id;
this.formModel.lessonName = data.name;
this.prdId = data.prdId;
this.prdType = data.prdType;
this.mapId = data.mapId;
this.PermissionType = data.PermissionType;
this.setTotalMax();

View File

@ -101,7 +101,7 @@ export default {
};
if (this.$route.query.permissionType != '04') {
data['mapId'] = this.$route.query.mapId;
data['prdId'] = this.$route.query.prdId;
data['prdType'] = this.$route.query.prdType;
data['lessonId'] = this.$route.query.lessonId;
}
getCommodityDetailByParams(data).then(response => {

View File

@ -47,7 +47,7 @@ export default {
loading: true,
disabled: false,
currentLessonId: '',
currentPrdId: '',
currentPrdType: '',
productList: [],
courseModel: {
id: '',
@ -56,7 +56,6 @@ export default {
lineCode: '',
remarks: '',
prdType: '',
prdId: '',
pmsList: []
},
jointShow: false,
@ -105,22 +104,19 @@ export default {
this.tryUser = 0;
this.loading = false;
const remarksList = {'01':'ATS现地工作站原理级仿真实训课程', '02':'ATS行调工作站原理级仿真实训课程', '03':'各岗位应急综合演练', '04':'桌面版模拟驾驶系统', '05':'派班工作站主要是供车辆段/停车场派班员进行派班操作,可以自动生成派班计划,极大的简化了派班计划管理的复杂性'};
if (resp.data.mapPrd) {
this.courseModel = {
id: resp.data.id,
name: resp.data.name,
mapId: this.mapId,
lineCode: res.data.lineCode,
remarks: remarksList[resp.data.prdType],
prdType: resp.data.prdType,
// prdId: resp.data.mapPrd.id,
pmsList: resp.data.permissionList || [],
PermissionType: PermissionType.SIMULATION
};
this.currentPrdId = resp.data.mapPrd.id;
if (resp.data.prdType === '03') {
this.getJointTrainingList();
}
this.courseModel = {
id: resp.data.id,
name: resp.data.name,
mapId: this.mapId,
lineCode: res.data.lineCode,
remarks: remarksList[resp.data.prdType],
prdType: resp.data.prdType,
pmsList: resp.data.permissionList || [],
PermissionType: PermissionType.SIMULATION
};
this.currentPrdType = resp.data.prdType;
if (resp.data.prdType === '03') {
this.getJointTrainingList();
}
if (!this.courseModel.pmsList) {
this.tryUser = 1;
@ -144,7 +140,7 @@ export default {
}
} catch (error) {
this.loading = false;
this.$messageBox(this.$t('error.refreshFailed'));
this.$messageBox(this.$t('error.refreshFailed') + error);
}
},
async getJointTrainingList() {
@ -172,7 +168,7 @@ export default {
this.disabled = true;
const param = {
mapId: Number(this.mapId),
prdId: this.courseModel.prdId
prdType: this.courseModel.prdType
};
const res = await postCreateRoom(param);
if (res && res.code == 200) {
@ -219,9 +215,9 @@ export default {
jumpScheduling() {
this.disabled = true;
setTimeout(() => {
const data = { mapId: this.courseModel.mapId, prdId: this.currentPrdId };
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
schedulingNotify(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen();
}).catch(error => {
@ -233,9 +229,9 @@ export default {
jump() {
this.disabled = true;
setTimeout(() => {
const data = { mapId: this.courseModel.mapId, mapPrdId: this.currentPrdId };
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
simulationNotify(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen();
}).catch(error => {
@ -249,7 +245,7 @@ export default {
// setTimeout(() => {
// this.$router.push({
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
// query: { permissionType: PermissionType.SIMULATION, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
// query: { permissionType: PermissionType.SIMULATION, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
// });
// }, 100);
this.$messageBox(this.$t('global.buyingTips'));

View File

@ -4,6 +4,8 @@
</div>
</template>
<script>
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
import { getExistingSimulation, deleteExistingSimulation } from '@/api/simulation';
export default {
name: 'SimulationManage',
@ -81,8 +83,12 @@ export default {
}
},
{
title: this.$t('system.productName'),
prop: 'mapPrdVO.name'
title: this.$t('system.prdType'),
prop: 'prdType',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.prdType, this.prdTypeList, ['value', 'label']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('system.isSuspend'),
@ -137,12 +143,16 @@ export default {
currentModel: {}
};
},
computed:{
prdTypeList() {
const productTypeList = ConstConfig.ConstSelect.prdType;
return Cookies.get('user_lang') == 'en'
? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
: productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
}
},
created() {
this.$Dictionary.productType().then(list => {
list.forEach(elem => {
this.queryForm.queryObject.prdType.config.data.push({ value: elem.code, label: elem.name });
});
});
this.queryForm.queryObject.prdType.config.data = this.prdTypeList;
},
methods: {
listJoiningTogether(sessionList) {