Merge branch 'test' of git.cloud.tencent.com:joylink/jl-nclient into test
This commit is contained in:
commit
dcd5c7bf1e
@ -82,13 +82,13 @@ export function rejectedLessonRelease(data, id) {
|
||||
});
|
||||
}
|
||||
|
||||
// /** 普通用户申请课程发布和撤销申请 */
|
||||
// export function releaseOrCancel(id, status) {
|
||||
// return request({
|
||||
// url: `/api/review/lesson/releaseOrCancel/${id}/${status}`,
|
||||
// method: 'get'
|
||||
// });
|
||||
// }
|
||||
/** 普通用户申请课程发布和撤销申请 */
|
||||
export function releaseOrCancel(id, status) {
|
||||
return request({
|
||||
url: `/api/review/lesson/releaseOrCancel/${id}/${status}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 管理员获取需审核的剧本列表 ok */
|
||||
export function reviewScriptList(params) {
|
||||
|
@ -8,11 +8,10 @@ export function getPublishLessonList() {
|
||||
});
|
||||
}
|
||||
/** 获取发布列表树*/
|
||||
export function getPublishLessonTree(params) {
|
||||
export function getPublishLessonTree(id) {
|
||||
return request({
|
||||
url: '/api/lesson/tree',
|
||||
method: 'get',
|
||||
params: params || {}
|
||||
url: `/api/lesson/${id}/tree`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -102,3 +102,11 @@ export function getLessonNameByMapIdAndLessonId(model) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
export function getLessonDrftList(params) {
|
||||
return request({
|
||||
url: `/api/lessonDraft`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
@ -1,14 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 获取考试列表树*/
|
||||
export function getCourseLessonTree(params) {
|
||||
return request({
|
||||
url: '/api/exam/tree',
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 创建对应课程考题 */
|
||||
export function setCourseList(data) {
|
||||
return request({
|
||||
|
@ -1,10 +1,11 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
export function getTrainingSystemList(cityCode) {
|
||||
export function getTrainingSystemList(cityCode, params) {
|
||||
/** 根据cityCode后去对应地图及其子系统 */
|
||||
return request({
|
||||
url: `/api/mapSystem/city/${cityCode}`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
@ -57,3 +58,30 @@ export function getMapSystemPageList(params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
export function createMapSubSystem(data) {
|
||||
/** 创建地图系统 */
|
||||
return request({
|
||||
url: `/api/mapSystem`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function updateSubSystem(id, data) {
|
||||
/** 查询子系统信息 */
|
||||
return request({
|
||||
url: `/api/mapSystem/${id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteSubSystem(id) {
|
||||
/** 删除地图系统 */
|
||||
return request({
|
||||
url: `/api/mapSystem/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -100,5 +100,8 @@ export default {
|
||||
publishScriptSuccess: 'Publish Script Success',
|
||||
publishScriptFailed: 'Publish Script Failed',
|
||||
releaseScriptTip: 'This action will apply to release script, whether to continue?',
|
||||
revokeScriptTip: 'This action will undo release script, whether to continue?'
|
||||
revokeScriptTip: 'This action will undo release script, whether to continue?',
|
||||
inputScriptName: 'Please input script name',
|
||||
selectMap: 'Please select map',
|
||||
inputScriptDescription: 'Please input script description'
|
||||
};
|
||||
|
@ -5,5 +5,26 @@ export default {
|
||||
name: 'Name',
|
||||
type: 'Type',
|
||||
updateData: 'Modify',
|
||||
generate: 'Generate'
|
||||
generate: 'Generate',
|
||||
selectMap: 'Please select map',
|
||||
generateSuccess: 'The subsystem under the map is generated successfully!',
|
||||
generateFail: 'The subsystem under the map failed to generate!',
|
||||
inputName: 'Please input subsystem name',
|
||||
selectType: 'Please select type',
|
||||
selectPrdName: 'Please select product name',
|
||||
createSubSystem: 'Commission SubSystem',
|
||||
modifySubSystem: 'Modify SubSystem',
|
||||
commission: 'Commission',
|
||||
customized: 'Project',
|
||||
selectProject: 'Please select project',
|
||||
createMapSystemSuccess: 'Create map system success',
|
||||
createMapSystemFail: 'Create map system failed',
|
||||
getSubSystemInfoFail: 'Get subsystem infomation failed',
|
||||
updateMapSystemSuccess: 'Update map system success',
|
||||
updateMapSystemFail: 'Update map system failed',
|
||||
generation: 'One-click Generation',
|
||||
deleteData: 'Delete',
|
||||
deleteMapSystemSuccess: 'Delete map system success',
|
||||
deleteMapSystemFail: 'Delete map system fail',
|
||||
deleteMapSystemTip: 'This action will apply to delete map system, whether to continue?'
|
||||
};
|
||||
|
@ -101,5 +101,8 @@ export default {
|
||||
publishScriptSuccess: '发布成功',
|
||||
publishScriptFailed: '发布失败',
|
||||
releaseScriptTip: '此操作将申请发布剧本, 是否继续?',
|
||||
revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?'
|
||||
revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?',
|
||||
inputScriptName: '请输入剧本',
|
||||
selectMap: '请选择地图',
|
||||
inputScriptDescription: '请输入剧本描述'
|
||||
};
|
||||
|
@ -5,5 +5,27 @@ export default {
|
||||
name: '名称',
|
||||
type: '类型',
|
||||
updateData: '更新',
|
||||
generate: '生成'
|
||||
generate: '生成',
|
||||
selectMap: '请选择地图',
|
||||
generateSuccess: '生成该地图下子系统成功!',
|
||||
generateFail: '生成该地图下子系统失败!',
|
||||
inputName: '请输入子系统名称',
|
||||
selectType: '请选择类型',
|
||||
selectPrdName: '请选择产品名称',
|
||||
createSubSystem: '定制子系统',
|
||||
modifySubSystem: '修改子系统',
|
||||
commission: '定制',
|
||||
customized: '项目',
|
||||
selectProject: '请选择项目',
|
||||
createMapSystemSuccess: '创建地图系统成功',
|
||||
createMapSystemFail: '创建地图系统失败',
|
||||
getSubSystemInfoFail: '获取子系统信息失败',
|
||||
updateMapSystemSuccess: '更新地图系统成功',
|
||||
updateMapSystemFail: '更新地图系统失败',
|
||||
generation: '一键生成',
|
||||
deleteData: '删除',
|
||||
deleteMapSystemSuccess: '删除地图系统成功',
|
||||
deleteMapSystemFail: '删除地图系统失败',
|
||||
deleteMapSystemTip: '此操作将删除地图系统, 是否继续?'
|
||||
|
||||
};
|
||||
|
@ -250,6 +250,7 @@ class StationStand extends Group {
|
||||
/** 中心+车站扣车*/
|
||||
standAndCenterDetainTrain() {
|
||||
this.detain && this.detain.show();
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
||||
}
|
||||
|
||||
/** 人工设置停战时间*/
|
||||
|
@ -107,11 +107,7 @@ export default {
|
||||
}
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operate && this.operate.operateCode) {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
return this.dialogShow ? getDomIdByOperation(this.operate.operateNext) : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -135,29 +131,10 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: this.operate.operateCode != null,
|
||||
type: this.operate.type,
|
||||
operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
if (this.operate.val) {
|
||||
operate['val'] = this.operate.val;
|
||||
}
|
||||
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$emit('checkOver');
|
||||
this.$emit('checkOver', this.operate);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<password-box ref="password" @checkOver="doClose" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -79,10 +79,6 @@ export default {
|
||||
return '信号封锁';
|
||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
return '信号解封';
|
||||
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return '进路收人工控';
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return '进路交自动控';
|
||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
}
|
||||
@ -138,17 +134,26 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
this.unlock();
|
||||
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路收人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.atsAutoControl();
|
||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: data.type,
|
||||
operation: data.operateNext
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) { this.doClose(); }
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
|
||||
},
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
@ -174,7 +179,6 @@ export default {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
@ -194,7 +198,6 @@ export default {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
@ -204,7 +207,7 @@ export default {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation
|
||||
operateNext: OperationEvent.Signal.humanTrainRoute.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -213,7 +216,6 @@ export default {
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
@ -233,7 +235,6 @@ export default {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
@ -243,7 +244,7 @@ export default {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.lock.menu.operation,
|
||||
operateCode: OperationEvent.Signal.lock.confirm.operation
|
||||
operateNext: OperationEvent.Signal.lock.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -259,7 +260,7 @@ export default {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
operateCode: OperationEvent.Signal.unlock.confirm.operation
|
||||
operateNext: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -270,51 +271,6 @@ export default {
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
// 进路收人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
operateCode: OperationEvent.Signal.humanControl.confirm.operation,
|
||||
val: this.operateCode
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
// this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
// send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
operateCode: OperationEvent.Signal.atsAutoControl.confirm.operation,
|
||||
val: this.operateCode
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
// this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
|
@ -45,7 +45,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -149,6 +149,25 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: data.type,
|
||||
operation: data.operateNext
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
@ -179,7 +198,7 @@ export default {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
operateCode: OperationEvent.Signal.guide.confirm.operation
|
||||
operateNext: OperationEvent.Signal.guide.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -27,7 +27,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -129,6 +129,22 @@ export default {
|
||||
this.fault();
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: data.type,
|
||||
operation: data.operateNext
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
@ -192,10 +208,9 @@ export default {
|
||||
// 区故解
|
||||
fault() {
|
||||
const operate = {
|
||||
// send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
operateCode: OperationEvent.Section.fault.confirm.operation
|
||||
operateNext: OperationEvent.Section.fault.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -31,7 +31,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -153,6 +153,22 @@ export default {
|
||||
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: data.type,
|
||||
operation: data.operateNext
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
@ -311,11 +327,11 @@ export default {
|
||||
});
|
||||
},
|
||||
// 打开密码输入框
|
||||
openPasswordBox(operation, code) {
|
||||
openPasswordBox(operation, operateNext) {
|
||||
const operate = {
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: operation,
|
||||
operateCode: code
|
||||
operateNext: operateNext
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
|
@ -1,25 +1,20 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="580px"
|
||||
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="列车:" prop="trainCode">
|
||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
|
||||
:value="item.code"></el-option>
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.groupNumber"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="列车车次:" prop="tripNumber">
|
||||
<el-select v-model="tripNumber" filterable placeholder="列车车次">
|
||||
<el-option v-for="no in trainNoList" :key="no" :label="no" :value="no"></el-option>
|
||||
</el-select>
|
||||
<div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="列车方向:" prop="direction">
|
||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
|
||||
</el-option>
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||
</el-select>
|
||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||
</el-form-item>
|
||||
@ -31,7 +26,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -40,7 +35,7 @@
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
@ -67,7 +62,7 @@
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
selected: null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -89,22 +84,22 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (Object.keys(map || {}).length) {
|
||||
getPublishTrainList(map.skinCode).then(response => {
|
||||
this.trainList = response.data;
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取列车列表失败`);
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
|
||||
console.log(this.map);
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
|
||||
@ -121,38 +116,38 @@
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
val: '' + this.direction + '::' + this.trainCode
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,38 +1,33 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div class="el-dialog-div">
|
||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form" label-position="left">
|
||||
<el-row>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-form-item>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
||||
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber"
|
||||
:value="train.oldGroupNumber">
|
||||
</el-option>
|
||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item label="新车组号" prop="newGroupNumber">
|
||||
<el-select v-model="addModel.newGroupNumber">
|
||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber"
|
||||
:value="train.newGroupNumber">
|
||||
</el-option>
|
||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -69,17 +64,17 @@
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber:'',
|
||||
newGroupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
newGroupNumber: [
|
||||
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
||||
],
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -95,20 +90,20 @@
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改车组号'
|
||||
return '修改车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
@ -121,8 +116,8 @@
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber:'',
|
||||
}
|
||||
newGroupNumber: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
@ -139,11 +134,11 @@
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -151,30 +146,29 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
|
@ -97,13 +97,13 @@
|
||||
<center><b>工</b><b>控</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button id="mbm_clear" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown('mbm_clear')">
|
||||
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
|
||||
<span style="color: black">
|
||||
<center><b>清</b></center>
|
||||
<center><b>除</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="doClose" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -146,6 +146,9 @@ export default {
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
@ -165,8 +168,19 @@ export default {
|
||||
this.resetPosition();
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
type: 'mbm',
|
||||
operation: data.operateNext
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
resetPosition() {
|
||||
this.$nextTick(() => {
|
||||
@ -199,31 +213,50 @@ export default {
|
||||
}
|
||||
},
|
||||
buttonDown(operation) {
|
||||
if (operation != 'mbm_clear') {
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
type: 'mbm',
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (operation == this.Signal.humanTrainRoute.button.operation) { // 总人解操作 显示密码窗
|
||||
operate['operateCode'] = this.Signal.humanTrainRoute.button.operation;
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
} else if (operation == this.Section.fault.button.operation) { // 区故解操作 显示密码窗
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
} else if (operation == this.Switch.unlock.button.operation) { // 道岔解锁操作 显示密码窗
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
} else if (operation == this.MixinCommand.unblock.button.operation) { // 解封操作 显示密码窗
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
OperateHandler.cleanOperates(); // 清空操作组
|
||||
const operate = {
|
||||
type: 'mbm',
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
OperateHandler.cleanOperates(); // 清空操作组
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
if (this.$store.state.menuOperation.buttonOperation) {
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
const model = this.$store.state.menuOperation.selected; // 选择设备
|
||||
if (model._type) {
|
||||
const deviceType = MapDeviceType[model._type];
|
||||
const modelData = deepAssign({}, model);
|
||||
@ -240,7 +273,12 @@ export default {
|
||||
if (valid) {
|
||||
if (response) {
|
||||
this.tempData = response.data;
|
||||
// console.log(this.tempData, '步骤数据');
|
||||
}
|
||||
if (this.operation == this.Signal.guide.button.operation) { // 引导进路操作 显示密码窗
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.operation = '0';
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm train-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="370px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag class="fuzhou-01__systerm train-control" :title="title" :visible.sync="show" width="370px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-form ref="form" size="small" label-width="120px" :model="formModel" :rules="rules">
|
||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
|
||||
<el-select
|
||||
@ -32,7 +22,6 @@
|
||||
:id="domIdTrainType"
|
||||
v-model="formModel.trainType"
|
||||
style="margin-left: 15px;"
|
||||
:disabled="trainTypeIsDisabled"
|
||||
@change="trainTypeChange"
|
||||
>
|
||||
<el-radio :label="'01'">{{ $t('menu.planTrain') }}</el-radio>
|
||||
@ -40,35 +29,49 @@
|
||||
<el-radio :label="'03'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="serviceNumber">
|
||||
<el-form-item v-if="formModel.trainType == '01'" prop="serviceNumber">
|
||||
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
|
||||
<el-input
|
||||
:id="domIdServerNo"
|
||||
v-model="formModel.serviceNumber"
|
||||
:disabled="serverNoIsDisabled"
|
||||
@change="serverNoChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-input
|
||||
:id="domIdTrainNo"
|
||||
v-model="formModel.tripNumber"
|
||||
:disabled="trainNoIsDisabled"
|
||||
@change="trainNoChange"
|
||||
maxlength="4"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="targetCode">
|
||||
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="targetCode">
|
||||
<el-input
|
||||
:id="domIdTargetCode"
|
||||
v-model="formModel.targetCode"
|
||||
:disabled="targetCodeIsDisabled"
|
||||
@change="targetCodeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.trainType == '03'" :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
|
||||
<el-select
|
||||
:id="domIdTrainNumber"
|
||||
v-model="formModel.groupNumber"
|
||||
filterable
|
||||
:disabled="trainNumberIsDisabled"
|
||||
@change="trainNumberChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="istargetCode" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
@ -85,6 +88,7 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
@ -134,10 +138,10 @@ export default {
|
||||
return false;
|
||||
},
|
||||
serverNoIsDisabled() {
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
targetCodeIsDisabled() {
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
trainNumberIsDisabled() {
|
||||
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||
@ -145,12 +149,12 @@ export default {
|
||||
}
|
||||
return '';
|
||||
},
|
||||
trainTypeIsDisabled() {
|
||||
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return true;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
// trainTypeIsDisabled() {
|
||||
// if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||
// return true;
|
||||
// }
|
||||
// return '';
|
||||
// },
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -236,6 +240,19 @@ export default {
|
||||
return this.$t('menu.menuTrain.editTrainId');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
istargetCode() {
|
||||
if (this.formModel.serviceNumber && this.formModel.targetCode) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'formModel.tripNumber': function(val) {
|
||||
if (val.length == 4) {
|
||||
this.trainNoChange(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -262,10 +279,11 @@ export default {
|
||||
this.formModel = {
|
||||
groupNumber: model.groupNumber,
|
||||
tripNumber: model.tripNumber,
|
||||
trainType: '01',
|
||||
serviceNumber: model.serviceNumber,
|
||||
targetCode: model.targetCode
|
||||
trainType: model.type,
|
||||
serviceNumber: '',
|
||||
targetCode: ''
|
||||
};
|
||||
debugger;
|
||||
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
@ -318,27 +336,9 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
serverNoChange(serviceNumber) {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
val: `${serviceNumber}`,
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.addTrainId.serverNoChange.operation;
|
||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.editTrainId.serverNoChange.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
trainNoChange(tripNumber) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
val: `${tripNumber}`,
|
||||
operation: ''
|
||||
@ -349,28 +349,17 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
targetCodeChange(targetCode) {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
val: `${targetCode}`,
|
||||
operation: ''
|
||||
OperateHandler.backStep(1);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
console.log(valid, response, 111);
|
||||
if (valid && response.data) {
|
||||
this.formModel = {
|
||||
groupNumber: this.formModel.groupNumber,
|
||||
tripNumber: tripNumber,
|
||||
trainType: '01',
|
||||
serviceNumber: response.data.serviceNumber,
|
||||
targetCode: response.data.tripNumber
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.addTrainId.targetCodeChange.operation;
|
||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.editTrainId.targetCodeChange.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
@ -424,7 +413,7 @@ export default {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
messages: [this.$t('tip.editTrainIdTip')],
|
||||
val: this.formModel.tripNumber
|
||||
val: `01::${this.formModel.tripNumber}`
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -1,16 +1,5 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm route-create"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="580px"
|
||||
label-position="top"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag class="fuzhou-01__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
||||
@ -50,7 +39,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
// import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -104,18 +93,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (Object.keys(map || {}).length) {
|
||||
getPublishTrainList(map.skinCode).then(response => {
|
||||
this.trainList = response.data;
|
||||
}).catch(() => {
|
||||
if (map.trainList.length) {
|
||||
this.trainList = map.trainList;
|
||||
} else {
|
||||
this.$messageBox(this.$t('error.getTrainListFailed'));
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
|
||||
console.log(this.map, 111);
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
|
||||
|
@ -240,12 +240,16 @@ export const MenuDisabledState = {
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const device = getCurrentStateObject();
|
||||
if (store.state.training.prdType == '02') {
|
||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
|
||||
if (store.state.training.prdType == '02') { // 中心行调模式
|
||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
||||
return true;
|
||||
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
|
||||
} else { // 现地模式
|
||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
||||
return true;
|
||||
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -254,11 +258,15 @@ export const MenuDisabledState = {
|
||||
cancelDetainTrain() {
|
||||
const device = getCurrentStateObject();
|
||||
if (store.state.training.prdType == '02') {
|
||||
if (device && device.holdStatus != deviceState.StationStand.holdStatus.State03) {
|
||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
||||
return false;
|
||||
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State03) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (device && device.holdStatus != deviceState.StationStand.holdStatus.State02) {
|
||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
||||
return false;
|
||||
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State02) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ function getRouteInfo(to) {
|
||||
loginPath = loginScreenPage;
|
||||
getTokenInfo = getScreenToken;
|
||||
clientId = LoginParams.DaPing.clientId;
|
||||
} else if (/^\/design/.test(toRoutePath) || /^\/scriptDisplay/.test(toRoutePath) || /^\/publish/.test(toRoutePath) || /^\/orderauthor/.test(toRoutePath) || /^\/system/.test(toRoutePath) || /^\/display\/manage/.test(toRoutePath) || /^\/apply/.test(toRoutePath)) {
|
||||
} else if (/^\/design/.test(toRoutePath) || /^\/scriptDisplay/.test(toRoutePath) || /^\/publish/.test(toRoutePath) || /^\/orderauthor/.test(toRoutePath) || /^\/system/.test(toRoutePath)|| /^\/display\/record/.test(toRoutePath) || /^\/display\/manage/.test(toRoutePath) || /^\/apply/.test(toRoutePath)) {
|
||||
loginPath = loginDesignPage;
|
||||
getTokenInfo = getDesignToken;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
|
@ -43,8 +43,10 @@ import ScriptDisplay from '@/views/scriptManage/display/index';
|
||||
|
||||
import TeachDetail from '@/views/teach/detail/index';
|
||||
import TeachPractical from '@/views/teach/practical/index';
|
||||
import TeachHome from '@/views/teach/index';
|
||||
import Pay from '@/views/components/pay/index';
|
||||
import ExamDetail from '@/views/exam/detail/examDetail';
|
||||
import ExamHome from '@/views/exam/index';
|
||||
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
|
||||
import ExamResult from '@/views/exam/result';
|
||||
|
||||
@ -251,7 +253,9 @@ export const UrlConfig = {
|
||||
trainingPlatformHome: '/trainingPlatform/home',
|
||||
prodDetail: '/trainingPlatform/detail',
|
||||
teachDetail: '/trainingPlatform/teach',
|
||||
teachHome: '/trainingPlatform/teachHome',
|
||||
examDetail: '/trainingPlatform/exam',
|
||||
examHome: '/trainingPlatform/examHome',
|
||||
examRuleManage: '/trainingPlatform/examRule/manage',
|
||||
examRuleDraft: '/trainingPlatform/examRule/Draft',
|
||||
course: '/trainingPlatform/course',
|
||||
@ -307,7 +311,7 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/edit',
|
||||
path: '/design/jlmap3d/edit',
|
||||
component: Jlmap3dedit,
|
||||
hidden: true
|
||||
},
|
||||
@ -610,11 +614,21 @@ export const asyncRouter = [
|
||||
component: DemonstrationDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'teachHome/:subSystem',
|
||||
component: TeachHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'teach/:subSystem',
|
||||
component: TeachDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'examHome/:subSystem',
|
||||
component: ExamHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'exam/:examId',
|
||||
component: ExamDetail,
|
||||
|
@ -107,7 +107,11 @@ export default {
|
||||
productType: [
|
||||
{ enlabel: 'Lesson System', label: '教学系统', value: 'Lesson'},
|
||||
{ enlabel: 'Exam System', label: '考试系统', value: 'Exam'},
|
||||
{ enlabel: 'Simulation System', label: '仿真系统', value: 'Simulation'}
|
||||
{ enlabel: 'Simulation System', label: '仿真系统', value: 'Simulation'},
|
||||
{ enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan'}
|
||||
],
|
||||
customeredProductType: [
|
||||
{ enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -139,6 +139,10 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '000',
|
||||
domId: '_Tips-Cancel-Menu'
|
||||
},
|
||||
clearMbm: {
|
||||
operation: '00012',
|
||||
domId: '_Tips-mbm_clear{TOP}'
|
||||
}
|
||||
},
|
||||
// 关闭对话框
|
||||
@ -1094,7 +1098,7 @@ export const OperationEvent = {
|
||||
event: '2',
|
||||
button: {
|
||||
operation: '4020',
|
||||
domId: '_Tips-Section-Fault-Mbm'
|
||||
domId: '_Tips-Section-Fault-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '402',
|
||||
@ -1868,7 +1872,7 @@ export const OperationEvent = {
|
||||
},
|
||||
// 修改列车识别号
|
||||
editTrainId: {
|
||||
event: '2',
|
||||
event: { query: '9', confirm: '2' },
|
||||
menu: {
|
||||
operation: '702',
|
||||
domId: '_Tips-Train-EditTrainId-Menu'
|
||||
|
@ -1,26 +0,0 @@
|
||||
export default {
|
||||
ConstSelect: {
|
||||
// 剧本录制模块枚举
|
||||
deviceType: [
|
||||
{label: '进路', value: 'Route'},
|
||||
{label: '区段', value: 'Section'},
|
||||
{label: '信号机', value: 'Signal'},
|
||||
{label: '站台', value: 'StationStand'},
|
||||
{label: '集中站', value: 'Station'},
|
||||
{label: '控制模式', value: 'StationControl'},
|
||||
{label: '道岔', value: 'Switch'},
|
||||
{label: '列车', value: 'Train'}
|
||||
],
|
||||
// 行为触发条件类型
|
||||
triggerType: [
|
||||
{label: '对话', value: 'Conversation'},
|
||||
{label: '设备', value: 'DeviceCondition'},
|
||||
{label: '无', value: 'None'}
|
||||
],
|
||||
// 动作类型
|
||||
actionType: [
|
||||
{label: '对话', value: 'Conversation'},
|
||||
{label: '指令', value: 'Command'}
|
||||
]
|
||||
}
|
||||
};
|
@ -87,7 +87,7 @@ Vue.prototype.$convertSpecifiedField = function(dataDict, enumList, key, value,
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
|
||||
if (FromList) {
|
||||
|
@ -6,8 +6,10 @@
|
||||
// {id: "5", trainingType: "02", name: "信号机名称"}
|
||||
// {id: "6", trainingType: "02", name: "信号机编号"}
|
||||
// {id: "7", trainingType: "03", name: "道岔名称"}
|
||||
// {id: "17", trainingType: "03", name: "道岔编码"}
|
||||
// {id: "8", trainingType: "04", name: "物理区段名称"}
|
||||
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
|
||||
// {id: "18", trainingType: "04", name: "逻辑区段编码"}
|
||||
// {id: "10", trainingType: "05", name: "车站名称"}
|
||||
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
|
||||
// {id: "12", trainingType: "05", name: "站台行驶方向"}
|
||||
@ -1296,6 +1298,21 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0201',
|
||||
skinCode: '04',
|
||||
trainingName: '办理进路({3} 进路)',
|
||||
trainingRemark: '办理进路功能',
|
||||
trainingType: '02',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', val: '{6}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', val: '{6}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1311,6 +1328,22 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
// {
|
||||
// maxDuration: 15,
|
||||
// minDuration: 8,
|
||||
// operateType: '0207',
|
||||
// skinCode: '04',
|
||||
// trainingName: '引导进路({3})',
|
||||
// trainingRemark: '进路办理信号引导',
|
||||
// trainingType: '02',
|
||||
// productTypes: ['01'],
|
||||
// stepVOList: [
|
||||
// { deviceType: 'mbm', orderNum: 1, operateCode: '3080', tip: '鼠标左键点击【引导进路】' },
|
||||
// { deviceType: '04', orderNum: 2, operateCode: '3080', tip: '鼠标左键点击【{5}】', val: '{6}' }, // 进路编号值不正确
|
||||
// { deviceType: 'mbm', orderNum: 3, operateCode: '0011', tip: '输入密码123456,点击【确定】按钮' },
|
||||
// { deviceType: '04', orderNum: 4, operateCode: '3080', tip: '鼠标左键点击【{5}】', val: '{6}' }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1325,6 +1358,20 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0202',
|
||||
skinCode: '04',
|
||||
trainingName: '总取消({3} 进路)',
|
||||
trainingRemark: '总取消功能',
|
||||
trainingType: '02',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '3030', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3030', tip: '鼠标左键点击【{5}】按钮', val: '{6}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1340,6 +1387,21 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0215', // 新增数据字典code
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
trainingType: '02',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '3050', tip: '鼠标左键点击【总人解】' },
|
||||
{ deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3050', tip: '鼠标左键点击【{5}】', val: '{6}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
@ -1369,6 +1431,20 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3061', tip: '输入密码123456,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0203',
|
||||
skinCode: '04',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁功能',
|
||||
trainingType: '02',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', val: '{6}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1384,6 +1460,21 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: '输入密码123456,点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0204',
|
||||
skinCode: '04',
|
||||
trainingName: '信号解封({5})',
|
||||
trainingRemark: '信号解封功能',
|
||||
trainingType: '02',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
|
||||
{ deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', val: '{6}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1399,6 +1490,20 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0208',
|
||||
skinCode: '04',
|
||||
trainingName: '人工控({5})',
|
||||
trainingRemark: '人工控',
|
||||
trainingType: '02',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{3}】', val: '{4}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1414,6 +1519,20 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0209',
|
||||
skinCode: '04',
|
||||
trainingName: '自动控({5})',
|
||||
trainingRemark: '自动控',
|
||||
trainingType: '02',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{3}】', val: '{4}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1432,7 +1551,7 @@ export const OperationList = {
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0305', // 0312 新增定位字典
|
||||
operateType: '0312', // 0312 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到定位({7})',
|
||||
trainingRemark: '单操到定位({15})',
|
||||
@ -1446,7 +1565,21 @@ export const OperationList = {
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0305', // 0313 新增定位字典
|
||||
operateType: '0313',
|
||||
skinCode: '04',
|
||||
trainingName: '单操到定位({7})',
|
||||
trainingRemark: '单操到定位({7})',
|
||||
trainingType: '03',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键菜单选择【道岔定操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0313', // 0313 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到反位({7})',
|
||||
trainingRemark: '单操到反位({7})',
|
||||
@ -1457,6 +1590,20 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0313',
|
||||
skinCode: '04',
|
||||
trainingName: '单操到反位({7})',
|
||||
trainingRemark: '单操到反位({7})',
|
||||
trainingType: '03',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键菜单选择【道岔反操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1479,10 +1626,10 @@ export const OperationList = {
|
||||
trainingName: '道岔单锁({7})',
|
||||
trainingRemark: '道岔单锁功能',
|
||||
trainingType: '03',
|
||||
productTypes: ['01'],
|
||||
productTypes: ['01'], // 现地操作
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', val: '{8}' }
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', val: '{17}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1499,6 +1646,21 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '104', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0305',
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解锁({7})',
|
||||
trainingRemark: '道岔解锁功能',
|
||||
trainingType: '03',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键菜单选择【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1514,6 +1676,20 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1051', tip: '输入密码123456,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0305',
|
||||
skinCode: '04',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁功能',
|
||||
trainingType: '03',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -1529,6 +1705,21 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1062', tip: '输入密码123456,点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0305',
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解封({7})',
|
||||
trainingRemark: '道岔解封功能',
|
||||
trainingType: '03',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 20,
|
||||
minDuration: 10,
|
||||
@ -1560,6 +1751,22 @@ export const OperationList = {
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4023', tip: '输入密码123456,点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0401',
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: '04',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'mbm', orderNum: 1, operateCode: '4020', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{9}】', val: '{18}' },
|
||||
{ deviceType: 'mbm', orderNum: 4, operateCode: '00012', tip: '鼠标左键点击【清除】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15, // 自动生成实训失败
|
||||
minDuration: 8,
|
||||
|
@ -407,7 +407,7 @@ function handleButtonFault(operates) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
// over: true,
|
||||
operation: SectionOperation.fault.event
|
||||
};
|
||||
}
|
||||
|
@ -105,22 +105,19 @@ export default {
|
||||
function handleButtonArrangementRoute(operates) {
|
||||
if (operates.length === 2) {
|
||||
const operate = operates[1];
|
||||
if (operate.type === SignalType && operate.code &&
|
||||
operate.model && operate.model._viewVal) {
|
||||
if (operate.type == SignalType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
operation: SignalOperation.arrangementRoute.event.query,
|
||||
val: operate.model._viewVal
|
||||
operation: SignalOperation.arrangementRoute.event.query
|
||||
// val: operate.model._viewVal
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
} else if (operates.length >= 3) {
|
||||
const operateBeg = operates[1];
|
||||
const operateEnd = operates[operates.length - 1];
|
||||
if (operateEnd.type === SignalType && operateEnd.code &&
|
||||
operateEnd.model && operateBeg.val === operateEnd.model._viewVal &&
|
||||
operateEnd.tempData && operateEnd.tempData.length) {
|
||||
const operateBeg = operates[1]; // 起始信号灯
|
||||
const operateEnd = operates[operates.length - 1]; // 终端信号灯
|
||||
if (operateEnd.type == SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) {
|
||||
for (let i = 0; i < operateEnd.tempData.length; i++) {
|
||||
const elem = operateEnd.tempData[i];
|
||||
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
|
||||
@ -128,8 +125,8 @@ function handleButtonArrangementRoute(operates) {
|
||||
type: operateEnd.type,
|
||||
code: operateEnd.code,
|
||||
over: true,
|
||||
operation: SignalOperation.arrangementRoute.event.confirm,
|
||||
val: elem.code
|
||||
operation: SignalOperation.arrangementRoute.event.confirm
|
||||
// val: elem.code
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -139,6 +136,38 @@ function handleButtonArrangementRoute(operates) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 排列进路 操作
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuArrangementRoute(operates) {
|
||||
if (operates.length == 1) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === SignalType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
operation: SignalOperation.arrangementRoute.event.query
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
} else if (operates.length >= 3) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === SignalType && operates[0].code && (operates[operates.length - 2].val || operates[operates.length - 3].val)) {
|
||||
return {
|
||||
over: true,
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
operation: SignalOperation.arrangementRoute.event.confirm,
|
||||
val: operates[operates.length - 2].val || operates[operates.length - 3].val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理点击按钮 取消进路 操作
|
||||
* @param {*} operates
|
||||
@ -184,6 +213,7 @@ function handleButtonReopenSignal(operates) {
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleButtonHumanTrainRoute(operates) {
|
||||
debugger;
|
||||
if (operates.length >= 2) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === SignalType && operate.code) {
|
||||
@ -245,38 +275,6 @@ function handleMenuStoppage(operates) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 排列进路 操作
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuArrangementRoute(operates) {
|
||||
if (operates.length == 1) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === SignalType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
operation: SignalOperation.arrangementRoute.event.query
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
} else if (operates.length >= 3) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === SignalType && operates[0].code && (operates[operates.length - 2].val || operates[operates.length - 3].val)) {
|
||||
return {
|
||||
over: true,
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
operation: SignalOperation.arrangementRoute.event.confirm,
|
||||
val: operates[operates.length - 2].val || operates[operates.length - 3].val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 取消进路 操作
|
||||
* @param {*} operates
|
||||
@ -661,16 +659,32 @@ function handleButtonSetAutoInterlock(operates) {
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleButtonGuideRoute(operates) {
|
||||
if (operates.length >= 2) {
|
||||
if (operates.length == 2) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === SignalType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
operation: SignalOperation.guide.event.confirm
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
} else if (operates.length >= 3) {
|
||||
const operateBeg = operates[1];
|
||||
const operateEnd = operates[operates.length - 1];
|
||||
if (operateEnd.type === SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) {
|
||||
for (let i = 0; i < operateEnd.tempData.length; i++) {
|
||||
const elem = operateEnd.tempData[i];
|
||||
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
|
||||
return {
|
||||
type: operateEnd.type,
|
||||
code: operateEnd.code,
|
||||
over: true,
|
||||
operation: SignalOperation.guide.event.confirm
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
|
@ -114,14 +114,25 @@ function handleMenuAddTrainId(operates) {
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuEditTrainId(operates) {
|
||||
if (operates.length >= 1) {
|
||||
if (operates.length == 2) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
operation: TrainOperation.editTrainId.event.query,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
} else if (operates.length > 2) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
over: true,
|
||||
operation: TrainOperation.editTrainId.event,
|
||||
operation: TrainOperation.editTrainId.event.confirm,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
|
@ -14,6 +14,10 @@ OperateHandler.prototype = {
|
||||
/** 操作组 */
|
||||
operates: [],
|
||||
|
||||
backStep: function(num) {
|
||||
this.operates = this.operates.slice(0, num);
|
||||
},
|
||||
|
||||
/** 清空操作组 */
|
||||
cleanOperates: function () {
|
||||
this.operates.splice(0, this.operates.length);
|
||||
|
@ -4,6 +4,7 @@ import { getToken, setToken, removeToken, removeScreenToken, setScreenToken, get
|
||||
import { getUserConfigInfo } from '@/api/management/user';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import { creatSubscribe, perpetualTopic } from '@/utils/stomp';
|
||||
import Cookies from 'js-cookie';
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
@ -174,10 +175,10 @@ const user = {
|
||||
FedLogOut({ commit }, clientId) {
|
||||
return new Promise(resolve => {
|
||||
if (clientId == LoginParams.DaPing.clientId) {
|
||||
commit('SET_TOKENDESIGN', '');
|
||||
commit('SET_TOKENSCREEN', '');
|
||||
removeScreenToken();
|
||||
} else if (clientId == LoginParams.Design.clientId) {
|
||||
commit('SET_TOKENSCREEN', '');
|
||||
commit('SET_TOKENDESIGN', '');
|
||||
removeDesignToken();
|
||||
}
|
||||
// else if (clientId == LoginParams.LianJiHua.clientId) {
|
||||
@ -201,6 +202,10 @@ const user = {
|
||||
commit('SET_ROLES', []);
|
||||
commit('SET_ID', '');
|
||||
removeSessionStorage('design');
|
||||
Cookies.remove('UserDesignName');
|
||||
Cookies.remove('UserDesignToken');
|
||||
Cookies.remove('UserName');
|
||||
Cookies.remove('UserToken');
|
||||
handleRemoveToken();
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
|
@ -18,8 +18,7 @@
|
||||
formModel:{
|
||||
id:'',
|
||||
explanation:'',
|
||||
},
|
||||
isShow: false,
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@ -60,7 +59,6 @@
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.isShow = false;
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
this.active = 0;
|
||||
const type = this.$route.query.permissionType;
|
||||
if (type === PermissionType.LESSON) {
|
||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.query.subSystem}`});
|
||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.query.subSystem}`, query: {lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, prdCode: this.$route.query.prdCode}});
|
||||
} else if (type === PermissionType.EXAM) {
|
||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`});
|
||||
} else if (type === PermissionType.SCREEN) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<h1 class="title">
|
||||
城市轨道交通设计平台
|
||||
<img :src="logo" alt="" class="logo-img">
|
||||
<!-- <img :src="logo" alt="" class="logo-img"> -->
|
||||
</h1>
|
||||
<div class="card-box">
|
||||
<el-carousel :interval="4000" type="card" height="380px">
|
||||
|
@ -187,7 +187,7 @@ export default {
|
||||
}
|
||||
},
|
||||
jlmap3d() {
|
||||
this.$router.push({ path: '/jlmap3d/edit', query: { mapid: this.editModel.id } });
|
||||
this.$router.push({ path: '/design/jlmap3d/edit', query: { mapid: this.editModel.id } });
|
||||
},
|
||||
importf() {
|
||||
const loading = this.$loading({
|
||||
|
@ -83,7 +83,7 @@ import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import Vue from 'vue';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import {loadDraftScript} from '@/api/designPlatform'
|
||||
import {loadDraftScript} from '@/api/designPlatform';
|
||||
|
||||
// 三维
|
||||
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
@ -151,8 +151,7 @@ export default {
|
||||
'canvasHeight'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'mapDeviceStatus'
|
||||
'map'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'offsetStationCode'
|
||||
@ -202,7 +201,7 @@ export default {
|
||||
},
|
||||
isPlan() {
|
||||
return this.mode === 'plan';
|
||||
},
|
||||
}
|
||||
// isDrive() {
|
||||
// return this.prdType == '04';
|
||||
// },
|
||||
@ -481,28 +480,28 @@ export default {
|
||||
},
|
||||
async runAddRolesLoadShow() {
|
||||
// this.$refs.addQuest.doShow();
|
||||
let row={id:this.$route.query.scriptId}
|
||||
const row={id: this.$route.query.scriptId};
|
||||
this.$refs.addQuest.handleLoad(1, row);
|
||||
},
|
||||
// 选择脚本
|
||||
async selectQuest(row, id, mapLocation, roleName) {
|
||||
try {
|
||||
let prdType="";
|
||||
let prdType='';
|
||||
switch (roleName) {
|
||||
case 'Attendant': {
|
||||
prdType="01";
|
||||
prdType='01';
|
||||
break;
|
||||
}
|
||||
case 'Dispatcher': {
|
||||
prdType="02";
|
||||
prdType='02';
|
||||
break;
|
||||
}
|
||||
case 'Driver': {
|
||||
prdType="04";
|
||||
prdType='04';
|
||||
break;
|
||||
}
|
||||
case 'Repair': {
|
||||
prdType="";
|
||||
prdType='';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -21,10 +21,10 @@
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
>
|
||||
<span slot-scope="{ node, data }">
|
||||
<span v-if="node.data.valid" class="el-icon-goods" />
|
||||
<span slot-scope="{ node }">
|
||||
<span v-if="valid||node.data.trial" class="el-icon-goods" />
|
||||
<span v-else class="el-icon-sold-out" />
|
||||
<span :style="{color: node.data.valid?'green':'black'}"> {{ node.label }}</span>
|
||||
<span :style="{color: node.data.trial||valid ?'green':'black'}"> {{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
@ -47,16 +47,16 @@
|
||||
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
|
||||
<el-button v-if="isAddRule" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button type="primary" @click="backLessonList">返回课程列表</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
// import { getCourseLessonDetail } from '@/api/management/exam';
|
||||
import { getCourseLessonDetail } from '@/api/management/exam';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailView',
|
||||
@ -81,7 +81,8 @@ export default {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
expandList: []
|
||||
expandList: [],
|
||||
valid: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -110,28 +111,29 @@ export default {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.EffectiveTypeList = list;
|
||||
});
|
||||
this.loadInitPage(this.$route.query.prodId, this.$route.query.type);
|
||||
this.loadInitPage();
|
||||
},
|
||||
methods: {
|
||||
loadInitPage() {
|
||||
if (this.$route.params.subSystem) {
|
||||
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
||||
if (resp.data.lesson) {
|
||||
getCourseLessonDetail({lessonId: this.$route.query.lessonId}).then(resp =>{
|
||||
if (resp.data) {
|
||||
this.courseModel = {
|
||||
id: resp.data.lesson.id,
|
||||
name: resp.data.lesson.name,
|
||||
id: resp.data.id,
|
||||
name: resp.data.name,
|
||||
pmsList: resp.data.permissionList || [],
|
||||
prdCode: resp.data.lesson.prdCode,
|
||||
mapId: resp.data.lesson.mapId,
|
||||
prdCode: resp.data.prdCode,
|
||||
mapId: resp.data.mapId,
|
||||
PermissionType: PermissionType.EXAM,
|
||||
treeList: resp.data.tree
|
||||
treeList: resp.data.examDefinitionList
|
||||
};
|
||||
}
|
||||
this.getExpandList(this.courseModel.id);
|
||||
}).catch((error)=>{
|
||||
this.$messageBox('获取考试信息失败!'+error);
|
||||
});
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length >0) {
|
||||
this.valid = true;
|
||||
}
|
||||
this.getExpandList(this.courseModel.id);
|
||||
}).catch(()=>{
|
||||
this.$messageBox('获取考试信息失败!');
|
||||
});
|
||||
},
|
||||
buy() {
|
||||
this.loading = true;
|
||||
@ -162,8 +164,7 @@ export default {
|
||||
}
|
||||
},
|
||||
clickEvent(obj, node, data) {
|
||||
if (obj.type === 'Exam') {
|
||||
if (obj.valid) {
|
||||
if (this.valid || obj.trial) {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem }});
|
||||
} else {
|
||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||
@ -173,8 +174,6 @@ export default {
|
||||
this.buy();
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
@ -197,6 +196,9 @@ export default {
|
||||
if (expand instanceof Array) {
|
||||
this.expandList = expand;
|
||||
}
|
||||
},
|
||||
backLessonList() {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -215,7 +215,7 @@ export default {
|
||||
}
|
||||
},
|
||||
back() {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`});
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
69
src/views/exam/index.vue
Normal file
69
src/views/exam/index.vue
Normal file
@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<div style="height: 100%; padding-bottom: 20px">
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>考试系统</b>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-loading="loading">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="课程"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="remarks"
|
||||
show-overflow-tooltip
|
||||
label="说明"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">
|
||||
进入考试
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
|
||||
export default {
|
||||
name: 'ExamHome',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitPage();
|
||||
},
|
||||
methods: {
|
||||
loadInitPage() {
|
||||
if (this.$route.params.subSystem) {
|
||||
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
||||
if (resp.data) {
|
||||
this.tableData = resp.data.lessonList;
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.$messageBox('获取考试信息失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
goLesson(row) {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
48
src/views/lesson/details.vue
Normal file
48
src/views/lesson/details.vue
Normal file
@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeList"
|
||||
node-key="id"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
:span="22"
|
||||
:filter-node-method="filterNode"
|
||||
:default-expanded-keys="expandList"
|
||||
@node-click="clickEvent"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
<transition>
|
||||
<router-view :style="{ position:'relative', left:widthLeft+'px', width: (width - widthLeft)+'px'}" :product-list="productList" />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLessonTree } from '@/api/jmap/lessondraft';
|
||||
export default {
|
||||
name: 'LessonDetail',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
return this.$store.state.app.width - 481 - this.widthLeft;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height - 90;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initPageData();
|
||||
},
|
||||
methods: {
|
||||
initPageData() {
|
||||
getLessonTree(this.$route.query.lessonId);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -10,85 +10,86 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-loading="loading">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
row-key="id"
|
||||
border
|
||||
default-expand-all
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
border
|
||||
:label="this.$t('lesson.lesson')"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="this.$t('global.status')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handlerStatus(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="explanation"
|
||||
show-overflow-tooltip
|
||||
:label="this.$t('lesson.rejectReason')"
|
||||
/>
|
||||
<el-table-column
|
||||
width="500"
|
||||
:label="this.$t('global.operate')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.status!=='1'"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="createChapter(scope.row)"
|
||||
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.status==='1'"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="goDetail(scope.row)"
|
||||
>
|
||||
{{ $t('lesson.review') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
@click="treeSort(scope.row)"
|
||||
>{{ $t('lesson.contentSorting') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="editLesson(scope.row)"
|
||||
>{{ $t('lesson.editCourse') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="publish(scope.row)"
|
||||
>{{ hasRelease?$t('global.release'):$t('lesson.applicationForRelease') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="deleteLesson(scope.row)"
|
||||
>{{ $t('global.delete') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.status ==='1'"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="revertLesson(scope.row)"
|
||||
>
|
||||
{{ $t('lesson.withdraw') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--<el-table-->
|
||||
<!--:data="tableData"-->
|
||||
<!--row-key="id"-->
|
||||
<!--border-->
|
||||
<!--default-expand-all-->
|
||||
<!--:tree-props="{children: 'children', hasChildren: 'hasChildren'}"-->
|
||||
<!-->-->
|
||||
<!--<el-table-column-->
|
||||
<!--prop="name"-->
|
||||
<!--border-->
|
||||
<!--:label="this.$t('lesson.lesson')"-->
|
||||
<!--/>-->
|
||||
<!--<el-table-column-->
|
||||
<!--:label="this.$t('global.status')"-->
|
||||
<!-->-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<span>{{ handlerStatus(scope.row) }}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column-->
|
||||
<!--prop="explanation"-->
|
||||
<!--show-overflow-tooltip-->
|
||||
<!--:label="this.$t('lesson.rejectReason')"-->
|
||||
<!--/>-->
|
||||
<!--<el-table-column-->
|
||||
<!--width="500"-->
|
||||
<!--:label="this.$t('global.operate')"-->
|
||||
<!-->-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-button-->
|
||||
<!--v-if="scope.row.status!=='1'"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--@click="createChapter(scope.row)"-->
|
||||
<!-->{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-if="scope.row.status==='1'"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--@click="goDetail(scope.row)"-->
|
||||
<!-->-->
|
||||
<!--{{ $t('lesson.review') }}-->
|
||||
<!--</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--plain-->
|
||||
<!--@click="treeSort(scope.row)"-->
|
||||
<!-->{{ $t('lesson.contentSorting') }}</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="info"-->
|
||||
<!--@click="editLesson(scope.row)"-->
|
||||
<!-->{{ $t('lesson.editCourse') }}</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--@click="publish(scope.row)"-->
|
||||
<!-->{{ hasRelease?$t('global.release'):$t('lesson.applicationForRelease') }}</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="danger"-->
|
||||
<!--@click="deleteLesson(scope.row)"-->
|
||||
<!-->{{ $t('global.delete') }}</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-if="scope.row.status ==='1'"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="danger"-->
|
||||
<!--@click="revertLesson(scope.row)"-->
|
||||
<!-->-->
|
||||
<!--{{ $t('lesson.withdraw') }}-->
|
||||
<!--</el-button>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--</el-table>-->
|
||||
<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" />
|
||||
</el-card>
|
||||
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||
@ -98,11 +99,13 @@
|
||||
|
||||
<script>
|
||||
import { releaseOrCancel } from '@/api/designPlatform';
|
||||
import { getLessonDrftList } from '@/api/jmap/lessondraft';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import PublishCreate from './lessoncategory/edit/create';
|
||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||
import { delLesson, getLessonTree } from '@/api/jmap/lessondraft';
|
||||
import LessonDetail from '@/views/approval/lesson/detail';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
export default {
|
||||
name: 'LessonHome',
|
||||
@ -115,7 +118,98 @@ export default {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false,
|
||||
showEdit: false
|
||||
showEdit: false,
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
show: false
|
||||
},
|
||||
queryList: {
|
||||
query: getLessonDrftList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '课程名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '课程说明',
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => {
|
||||
return this.$convertField(row.status, ConstConfig.ConstSelect.releaseReview, ['value', 'label']);
|
||||
},
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '驳回说明',
|
||||
prop: 'explanation'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '400',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('lesson.contentSorting'),
|
||||
handleClick: this.treeSort,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status!=='1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('global.release'),
|
||||
handleClick: this.publish,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status ==='0'&&this.hasRelease;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('lesson.applicationForRelease'),
|
||||
handleClick: this.publish,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status ==='0'&& !this.hasRelease;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.deleteLesson,
|
||||
type: 'danger',
|
||||
showControl: (row) => {
|
||||
return row.status !=='1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('lesson.withdraw'),
|
||||
handleClick: this.revertLesson,
|
||||
type: 'danger',
|
||||
showControl: (row) => {
|
||||
return row.status ==='1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '课程详情',
|
||||
handleClick: this.goDetail,
|
||||
type: 'primary'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
/* { text: this.$t('global.create'), btnCode: 'employee_insert', handler: this.handleCreateRunPlan }*/
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -133,8 +227,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loading = true;
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
@ -185,8 +277,7 @@ export default {
|
||||
return lessonStatus;
|
||||
},
|
||||
refresh() {
|
||||
this.loading = true;
|
||||
this.loadInitData();
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
editLesson(row) {
|
||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/lessonEdit`, query: {id: row.id, skinCode: row.code}} );
|
||||
@ -199,28 +290,28 @@ export default {
|
||||
this.$refs.publishCreate.doShow();
|
||||
});
|
||||
},
|
||||
publish(row) {
|
||||
publish(index, row) {
|
||||
row.skinCode = this.$route.params.skinCode;
|
||||
row.cityCode = this.$route.query.cityCode;
|
||||
this.$refs.publishLesson.doShow(row);
|
||||
},
|
||||
deleteLesson(row) {
|
||||
deleteLesson(index, row) {
|
||||
delLesson(row).then(response => {
|
||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||
this.loading = true;
|
||||
this.loadInitData();
|
||||
this.refresh();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.failDelete'));
|
||||
});
|
||||
},
|
||||
createChapter(row) {
|
||||
createChapter(index, row) {
|
||||
if (row.type === 'Lesson') {
|
||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
||||
} else if (row.type === 'Chapter') {
|
||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`, query: {id: row.id, lessonId: row.parentId}} );
|
||||
}
|
||||
},
|
||||
treeSort(row) {
|
||||
treeSort(index, row) {
|
||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: row});
|
||||
},
|
||||
taskManage() {
|
||||
@ -232,7 +323,7 @@ export default {
|
||||
operationManage() {
|
||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});
|
||||
},
|
||||
revertLesson(row) {
|
||||
revertLesson(index, row) {
|
||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
@ -241,16 +332,16 @@ export default {
|
||||
releaseOrCancel(row.id, '0').then(response => {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
||||
this.refuse();
|
||||
this.refresh();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
||||
this.refuse();
|
||||
this.refresh();
|
||||
});
|
||||
});
|
||||
},
|
||||
goDetail(row) {
|
||||
this.$refs.lessonDetail.show(row.id);
|
||||
goDetail(index, row) {
|
||||
// this.$refs.lessonDetail.show(row.id);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,28 +1,47 @@
|
||||
<template>
|
||||
<el-card class="map-list-main" v-loading="loading">
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('lesson.courseList') }}</span>
|
||||
<el-button type="text" @click="publishCreate" style="float: right; padding: 3px 0">{{$t('lesson.createNewCoursesFromRelease')}}</el-button>
|
||||
<el-button type="text" style="float: right; padding: 3px 0" @click="publishCreate">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
|
||||
</div>
|
||||
<el-input :placeholder="this.$t('global.filteringKeywords')" v-model="filterText" clearable> </el-input>
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
|
||||
<el-tree ref="lessonTree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode"
|
||||
@node-contextmenu="showContextMenu" draggable :allow-drop="allowDrop" :allow-drag="allowDrag"
|
||||
@node-drag-end="handleDragEnd" expand-on-click-node highlight-current @node-click="clickEvent" :span=22>
|
||||
<span slot-scope="{ node, data }">
|
||||
<span v-if="node.data.type === 'skin'" class="el-icon-news"></span>
|
||||
<span v-if="node.data.type === 'lesson'" class="el-icon-tickets"></span>
|
||||
<span v-if="node.data.type === 'chapter'" class="el-icon-document"></span>
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
|
||||
<el-tree
|
||||
ref="lessonTree"
|
||||
:data="treeData"
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
draggable
|
||||
:allow-drop="allowDrop"
|
||||
:allow-drag="allowDrag"
|
||||
expand-on-click-node
|
||||
highlight-current
|
||||
:span="22"
|
||||
@node-contextmenu="showContextMenu"
|
||||
@node-drag-end="handleDragEnd"
|
||||
@node-click="clickEvent"
|
||||
>
|
||||
<span slot-scope="{ node }">
|
||||
<span v-if="node.data.type === 'skin'" class="el-icon-news" />
|
||||
<span v-if="node.data.type === 'lesson'" class="el-icon-tickets" />
|
||||
<span v-if="node.data.type === 'chapter'" class="el-icon-document" />
|
||||
<span> {{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
<tree-operate-menu ref="treeOperateMenu" :point="point" :selected="selected" @refresh="refresh"
|
||||
@lessonCreate="lessonCreate" @chapterCreate="chapterCreate" @treeSort="treeSort"></tree-operate-menu>
|
||||
<tree-operate-menu
|
||||
ref="treeOperateMenu"
|
||||
:point="point"
|
||||
:selected="selected"
|
||||
@refresh="refresh"
|
||||
@lessonCreate="lessonCreate"
|
||||
@chapterCreate="chapterCreate"
|
||||
@treeSort="treeSort"
|
||||
/>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { getLessonTree, dragSortLessonChapter } from '@/api/jmap/lessondraft'
|
||||
import { getLessonTree, dragSortLessonChapter } from '@/api/jmap/lessondraft';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import TreeOperateMenu from './operateMenu';
|
||||
import FilterCity from '@/views/components/filterCity';
|
||||
@ -30,7 +49,7 @@
|
||||
export default {
|
||||
name: 'TrainingOperate',
|
||||
components: {
|
||||
TreeOperateMenu,
|
||||
TreeOperateMenu
|
||||
},
|
||||
props: {
|
||||
height: {
|
||||
@ -53,7 +72,7 @@
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
@ -80,9 +99,9 @@
|
||||
},
|
||||
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
||||
if (draggingNode && dropNode && dropType !== 'none') {
|
||||
let lesson = this.getLeesonId(dropNode);
|
||||
let lessonId = lesson.data.id;
|
||||
let model = {
|
||||
const lesson = this.getLeesonId(dropNode);
|
||||
const lessonId = lesson.data.id;
|
||||
const model = {
|
||||
location: dropType,
|
||||
sourceId: draggingNode.data.id,
|
||||
sourceType: draggingNode.data.type,
|
||||
@ -90,14 +109,13 @@
|
||||
targetType: dropNode.data.type,
|
||||
lessonId: lessonId,
|
||||
chapterId: dropNode.parent.data.id
|
||||
}
|
||||
let that = this;
|
||||
};
|
||||
dragSortLessonChapter(model).then(response => {
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
getLeesonId(node) {
|
||||
if (null !== node.parent.parent) {
|
||||
if (node.parent.parent !== null) {
|
||||
return this.getLeesonId(node.parent);
|
||||
} else {
|
||||
return node;
|
||||
@ -109,10 +127,10 @@
|
||||
this.point = {
|
||||
x: e.clientX,
|
||||
y: e.clientY
|
||||
}
|
||||
};
|
||||
this.node = node;
|
||||
this.selected = obj;
|
||||
let menu = DeviceMenu.Lesson;
|
||||
const menu = DeviceMenu.Lesson;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
@ -139,7 +157,7 @@
|
||||
this.$emit('treeSort', this.node);
|
||||
},
|
||||
convertTreeData(list) {
|
||||
let tree = [];
|
||||
const tree = [];
|
||||
if (list && list.length) {
|
||||
/* 去除列表的training节点*/
|
||||
list.forEach(elem => {
|
||||
@ -147,7 +165,7 @@
|
||||
if (elem.type !== 'training') {
|
||||
tree.push(elem);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
return tree;
|
||||
},
|
||||
@ -156,13 +174,13 @@
|
||||
getLessonTree().then(response => {
|
||||
this.treeData = this.convertTreeData(response.data);
|
||||
this.$nextTick(() => { this.loading = false; });
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
|
@ -66,15 +66,16 @@ export default {
|
||||
if (data.id == item.id) {
|
||||
tree = [elem];
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return tree;
|
||||
},
|
||||
initData(data) {
|
||||
getLessonTree({ mapId: '' }).then(response => {
|
||||
this.treeData = this.convertTreeData(response.data, data);
|
||||
getLessonTree(data.id).then(response => {
|
||||
// this.treeData = this.convertTreeData(response.data, data);
|
||||
this.treeData = response.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
});
|
||||
@ -95,7 +96,7 @@ export default {
|
||||
if (node.parent.data.type === 'lesson') {
|
||||
return node.parent.data.id;
|
||||
} else {
|
||||
return this.getLeesonId(node.parent)
|
||||
return this.getLeesonId(node.parent);
|
||||
}
|
||||
},
|
||||
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
||||
|
308
src/views/lesson/trainingrecord/category/draft.vue
Normal file
308
src/views/lesson/trainingrecord/category/draft.vue
Normal file
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="operation.title" :visible.sync="dialogShow" width="30%" :before-close="close">
|
||||
<el-form ref="form" :model="operateModel" label-width="120px" :rules="rules" size="mini">
|
||||
<el-form-item :label="this.$t('lesson.trainingName')+':'" prop="name">
|
||||
<el-input v-model="operateModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
|
||||
<el-select v-model="operateModel.prdCode" placeholder="" :disabled="true">
|
||||
<el-option
|
||||
v-for="option in productTypesList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.trainingType')+':'" prop="type">
|
||||
<el-select v-model="operateModel.type" placeholder="" :disabled="true">
|
||||
<el-option
|
||||
v-for="option in trainTypesList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.operationType')+':'">
|
||||
<el-select v-model="operateModel.operateType">
|
||||
<el-option
|
||||
v-for="(option, index) in operationList"
|
||||
:key="index"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.minTime')" prop="minDuration">
|
||||
<el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.maxTime')" prop="maxDuration">
|
||||
<el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.trainingDescription')" prop="remarks">
|
||||
<el-input
|
||||
v-model="operateModel.remarks"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 4}"
|
||||
:placeholder="this.$t('rules.pleaseEnterContent')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="handleDeal">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addTraining, updateTraining, getTrainingDetail } from '@/api/jmap/training';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'TreeDraft',
|
||||
props: {
|
||||
node: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var minDurations = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(value)) {
|
||||
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, 100);
|
||||
};
|
||||
var maxDurations = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(value)) {
|
||||
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||
} else {
|
||||
if (value < this.operateModel.minDuration) {
|
||||
callback(new Error(this.$t('rules.greaterThanMinTime')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
};
|
||||
return {
|
||||
dialogShow: false,
|
||||
productTypesList: [],
|
||||
trainTypesList: [],
|
||||
operationList: [],
|
||||
trainingOperateTypeMap: {},
|
||||
operation: {
|
||||
title: '',
|
||||
event: ''
|
||||
},
|
||||
operateModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
type: '',
|
||||
prdCode: '',
|
||||
skinCode: '',
|
||||
operateType: '',
|
||||
maxDuration: 0,
|
||||
minDuration: 0,
|
||||
remarks: ''
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.inputTrainingName'), trigger: 'change' }
|
||||
],
|
||||
minDuration: [
|
||||
{ required: true, validator: minDurations, trigger: 'blur' }
|
||||
],
|
||||
maxDuration: [
|
||||
{ required: true, validator: maxDurations, trigger: 'blur' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: this.$t('rules.inputTrainingRemark'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
watch: {
|
||||
node: function (val, old) {
|
||||
this.initLoadData();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$Dictionary.trainingType().then(list => {
|
||||
this.trainTypesList = list;
|
||||
});
|
||||
this.operationList = [];
|
||||
this.$Dictionary.stationControl().then(list => {
|
||||
this.trainingOperateTypeMap['01'] = list; // 控制权实训
|
||||
});
|
||||
this.$Dictionary.signalOperation().then(list => {
|
||||
this.trainingOperateTypeMap['02'] = list; // 信号机实训
|
||||
});
|
||||
this.$Dictionary.switchOperation().then(list => {
|
||||
this.trainingOperateTypeMap['03'] = list; // 道岔实训
|
||||
});
|
||||
this.$Dictionary.sectionOperation().then(list => {
|
||||
this.trainingOperateTypeMap['04'] = list; // 区段实训
|
||||
});
|
||||
this.$Dictionary.stationStandOperation().then(list => {
|
||||
this.trainingOperateTypeMap['05'] = list; // 站台实训
|
||||
});
|
||||
this.$Dictionary.trainPlanOperation().then(list => {
|
||||
this.trainingOperateTypeMap['06'] = list; // 行车计划实训
|
||||
});
|
||||
this.$Dictionary.trainOperation().then(list => {
|
||||
this.trainingOperateTypeMap['07'] = list; // 列车实训
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initLoadData() {
|
||||
const node = this.node;
|
||||
if (this.$refs && this.$refs.form) {
|
||||
this.$refs['form'].resetFields();
|
||||
}
|
||||
if (node && node.data) {
|
||||
switch (node.data.type) {
|
||||
case 'TrainingType':
|
||||
if (node.parent) {
|
||||
this.operateModel.type = node.data.id;
|
||||
this.operateModel.prdCode = node.parent.data.id;
|
||||
this.operateModel.skinCode = node.parent.parent.data.id;
|
||||
this.productTypesList = [{
|
||||
code: node.parent.data.id,
|
||||
name: node.parent.data.name
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
this.operateModel.id = '';
|
||||
this.operateModel.name = '';
|
||||
this.operateModel.minDuration = '';
|
||||
this.operateModel.maxDuration = '';
|
||||
this.operateModel.remarks = '';
|
||||
this.operateModel.operateType = '';
|
||||
this.operationList = this.trainingOperateTypeMap[node.data.id] || [];
|
||||
break;
|
||||
case 'Training':
|
||||
if (node.parent && node.parent.parent) {
|
||||
this.operateModel.type = node.parent.data.id;
|
||||
this.operateModel.prdCode = node.parent.parent.data.id;
|
||||
this.operateModel.skinCode = node.parent.parent.parent.data.id;
|
||||
this.operationList = this.trainingOperateTypeMap[node.parent.data.id] || [];
|
||||
this.productTypesList = [{
|
||||
code: node.parent.parent.data.id,
|
||||
name: node.parent.parent.data.name
|
||||
}];
|
||||
}
|
||||
|
||||
this.operateModel.id = node.data.id;
|
||||
this.operateModel.name = node.data.name;
|
||||
getTrainingDetail(node.data.id).then(response => {
|
||||
this.operateModel.minDuration = response.data.minDuration;
|
||||
this.operateModel.maxDuration = response.data.maxDuration;
|
||||
this.operateModel.operateType = response.data.operateType;
|
||||
this.operateModel.remarks = response.data.remarks;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.obtainStepDataFailed'));
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
show(data) {
|
||||
this.operation = data;
|
||||
this.initLoadData();
|
||||
this.dialogShow = true;
|
||||
},
|
||||
close() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleDeal() {
|
||||
const operation = this.operation;
|
||||
if (operation) {
|
||||
const event = operation.event;
|
||||
switch (event) {
|
||||
case '01': this.addTraining(); break;
|
||||
case '02': this.edtTraining(); break;
|
||||
}
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogShow = false;
|
||||
this.operateModel = {
|
||||
id: '',
|
||||
name: '',
|
||||
type: '',
|
||||
prdCode: '',
|
||||
skinCode: '',
|
||||
operateType: '',
|
||||
maxDuration: 0,
|
||||
minDuration: 0,
|
||||
remarks: ''
|
||||
};
|
||||
this.$refs['form'].resetFields();
|
||||
},
|
||||
addTraining() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
name: this.operateModel.name,
|
||||
type: this.operateModel.type,
|
||||
prdCode: this.operateModel.prdCode,
|
||||
skinCode: this.operateModel.skinCode,
|
||||
operateType: this.operateModel.operateType,
|
||||
minDuration: this.operateModel.minDuration,
|
||||
maxDuration: this.operateModel.maxDuration,
|
||||
remarks: this.operateModel.remarks
|
||||
};
|
||||
addTraining(data).then(response => {
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
||||
this.close();
|
||||
this.$message.success(this.$t('tip.addTrainingSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.addTrainingFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
edtTraining() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
id: this.operateModel.id,
|
||||
name: this.operateModel.name,
|
||||
type: this.operateModel.type,
|
||||
prdCode: this.operateModel.prdCode,
|
||||
skinCode: this.operateModel.skinCode,
|
||||
operateType: this.operateModel.operateType,
|
||||
minDuration: this.operateModel.minDuration,
|
||||
maxDuration: this.operateModel.maxDuration,
|
||||
remarks: this.operateModel.remarks
|
||||
};
|
||||
updateTraining(data).then(response => {
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
||||
this.close();
|
||||
this.$message.success(this.$t('tip.updateTrainingSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.updateTrainingFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<!--<training-draft ref="draft" :node="node" @refresh="refresh" />-->
|
||||
<training-draft ref="draft" :node="node" @refresh="refresh" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -9,13 +9,13 @@
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
// import TrainingDraft from '../../draft';
|
||||
import TrainingDraft from './draft';
|
||||
|
||||
export default {
|
||||
name: 'TrainingOperateMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
// TrainingDraft
|
||||
TrainingDraft
|
||||
},
|
||||
props: {
|
||||
point: {
|
||||
@ -54,10 +54,10 @@ export default {
|
||||
node: function (val, old) {
|
||||
if (val && val.data) {
|
||||
switch (val.data.type) {
|
||||
case 'trainingType':
|
||||
case 'TrainingType':
|
||||
this.menu = this.menuCreate;
|
||||
break;
|
||||
case 'training':
|
||||
case 'Training':
|
||||
this.menu = this.menuEdit;
|
||||
break;
|
||||
}
|
||||
|
@ -19,16 +19,16 @@
|
||||
@node-click="clickEvent"
|
||||
>
|
||||
<div slot-scope="{ node: nodeScop }">
|
||||
<span v-if="nodeScop.data.type == 'skin'" class="el-icon-news"></span>
|
||||
<span v-else-if="nodeScop.data.type == 'prd'" class="el-icon-tickets"></span>
|
||||
<span v-if="nodeScop.data.type == 'skin'" class="el-icon-news" />
|
||||
<span v-else-if="nodeScop.data.type == 'prd'" class="el-icon-tickets" />
|
||||
<span
|
||||
v-else-if="nodeScop.data.type == 'trainingType'"
|
||||
class="el-icon-document"
|
||||
></span>
|
||||
/>
|
||||
<span
|
||||
v-else-if="nodeScop.data.type == 'training'"
|
||||
class="el-icon-edit-outline"
|
||||
></span>
|
||||
/>
|
||||
<span> {{ nodeScop.label }}</span>
|
||||
</div>
|
||||
</el-tree>
|
||||
@ -91,6 +91,7 @@ export default {
|
||||
}
|
||||
},
|
||||
showContextMenu(e, obj, node, vueElem) {
|
||||
|
||||
if (obj && obj.type === 'TrainingType' || obj.type === 'Training') {
|
||||
e.preventDefault();
|
||||
this.point = {
|
||||
|
@ -63,10 +63,10 @@ export default {
|
||||
label: this.$t('map.deleteObj'),
|
||||
handler: this.deleteObj
|
||||
},
|
||||
// {
|
||||
// label: this.$t('map.jlmap3d'),
|
||||
// handler: this.jlmap3d
|
||||
// }
|
||||
{
|
||||
label: this.$t('map.jlmap3d'),
|
||||
handler: this.jlmap3d
|
||||
}
|
||||
],
|
||||
menuNormal: [],
|
||||
menu: []
|
||||
|
@ -95,23 +95,23 @@ export default {
|
||||
computed: {
|
||||
title() {
|
||||
if (this.node && this.node.data) {
|
||||
if (this.node.data.type === 'skin') {
|
||||
if (this.node.data.type === 'Skin') {
|
||||
return this.$t('map.createProductCategories');
|
||||
} else if (this.node.data.type === 'prd' ||
|
||||
this.node.data.type === 'prd') {
|
||||
} else if (this.node.data.type === 'Prd' ||
|
||||
this.node.data.type === 'Prd') {
|
||||
return this.$t('map.editTraining');
|
||||
}
|
||||
}
|
||||
return this.$t('map.selectOperation');
|
||||
},
|
||||
isCreate() {
|
||||
return this.node && this.node.data.type === 'skin';
|
||||
return this.node && this.node.data.type === 'Skin';
|
||||
},
|
||||
isUpdate() {
|
||||
return this.node && this.node.data.type === 'prd';
|
||||
return this.node && this.node.data.type === 'Prd';
|
||||
},
|
||||
isDelete() {
|
||||
return this.node && this.node.data.type === 'prd';
|
||||
return this.node && this.node.data.type === 'Prd';
|
||||
},
|
||||
isShowTrainTypes() {
|
||||
return this.addModel.prdType != '03' && this.addModel.prdType != '04';
|
||||
|
@ -17,10 +17,10 @@
|
||||
@node-click="clickEvent"
|
||||
>
|
||||
<span slot-scope="{ node }">
|
||||
<span v-if="node.data.type == 'skin'" class="el-icon-news"></span>
|
||||
<span v-if="node.data.type == 'prd'" class="el-icon-tickets"></span>
|
||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-document"></span>
|
||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit"></span>
|
||||
<span v-if="node.data.type == 'skin'" class="el-icon-news" />
|
||||
<span v-if="node.data.type == 'prd'" class="el-icon-tickets" />
|
||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-document" />
|
||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit" />
|
||||
<span> {{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
|
@ -76,7 +76,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||
import { getExamLessonDetail, updateExamRules } from '@/api/management/exam';
|
||||
|
||||
export default {
|
||||
@ -268,7 +268,7 @@ export default {
|
||||
|
||||
},
|
||||
refresh() {
|
||||
getPublishLessonTree({ mapId: '' }).then(response => {
|
||||
getPublishLessonList().then(response => {
|
||||
this.options = response.data;
|
||||
if (parseInt(this.$route.params.lessonId)) {
|
||||
this.form.region = this.$route.params.lessonId;
|
||||
|
@ -32,7 +32,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||
import RuleFrom from './rule';
|
||||
import ExamFrom from './examFrom';
|
||||
|
||||
@ -72,7 +72,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
getPublishLessonTree({ mapId: '' }).then(response => {
|
||||
getPublishLessonList().then(response => {
|
||||
this.OrganizationList = response.data;
|
||||
this.OrganizationList.forEach(elem => {
|
||||
if (elem.id == this.$route.params.lessonId) {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { getExamList, deleteExam, setExamEfficacy, setExamEffectivey } from '@/api/management/exam';
|
||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
|
||||
export default {
|
||||
@ -197,7 +197,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.queryForm.queryObject.lessonId.config.data.length = 0;
|
||||
getPublishLessonTree({ mapId: '' }).then(response => {
|
||||
getPublishLessonList().then(response => {
|
||||
this.OrganizationList = response.data;
|
||||
this.OrganizationList.forEach(elem => {
|
||||
if (elem.id == this.$route.query.lessonId) {
|
||||
|
@ -1,147 +0,0 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="mapListTitle">{{ $t('scriptRecord.mapList') }}</span>
|
||||
<el-button type="primary" size="small" @click="addScript" class="addScript">{{ $t('scriptRecord.addScript') }}</el-button>
|
||||
</div>
|
||||
<el-select v-model="mapSelect" size="medium" class="mapSelect" @change="mapSelectChange">
|
||||
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<!-- <div class="addScript" @click="addScript">
|
||||
<i class="el-icon-plus" style="color:#409eff;font-size:16px;"></i>
|
||||
<span class="addScriptText">添加剧本</span>
|
||||
</div> -->
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px', width:'100%',margin:'5px 0 0 0' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeList"
|
||||
node-key="id"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
:span="22"
|
||||
@node-click="clickEvent"
|
||||
@node-contextmenu="showContextMenu"
|
||||
>
|
||||
<span slot-scope="{ node:tnode, data }">
|
||||
<span
|
||||
class="el-icon-tickets"
|
||||
:style="{color: data.valid ? 'green':''}"
|
||||
></span>
|
||||
<span :style="{color: data.valid ? 'green':''}"> {{ tnode.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import localStore from 'storejs';
|
||||
import { getQuestPageList,createQuest,deleteQuest,updateQuest} from '@/api/quest';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'ScriptTree',
|
||||
props: {
|
||||
height: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
mapList:[],
|
||||
mapSelect:"",
|
||||
treeData: [],
|
||||
treeList: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
methods:{
|
||||
loadInitData() {
|
||||
this.loading=true;
|
||||
this.mapList = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapList = response.data;
|
||||
this.loading = false;
|
||||
this.mapSelect=localStore.get("script_mapId") || this.mapList[0].id;
|
||||
if(localStore.get("script_mapId")){
|
||||
this.$store.dispatch('scriptRecord/updateScriptId',localStore.get("script_mapId"));
|
||||
}
|
||||
this.getQuestPageList(this.mapSelect);
|
||||
})
|
||||
},
|
||||
mapSelectChange(id){
|
||||
this.loading = true;
|
||||
localStore.set("script_mapId", id);
|
||||
this.$store.dispatch('scriptRecord/updateScriptId',id);
|
||||
this.getQuestPageList(id);
|
||||
},
|
||||
async getQuestPageList(id){
|
||||
let response=await getQuestPageList(id);
|
||||
this.loading = false;
|
||||
this.treeList=response.data;
|
||||
},
|
||||
showContextMenu(e, obj, node, vueElem) {
|
||||
if (obj) {
|
||||
this.node = node;
|
||||
this.selected = obj;
|
||||
}
|
||||
},
|
||||
clickEvent(obj, data, ele) {
|
||||
// setSessionStorage('scriptId', obj.id);
|
||||
this.$router.push({ path: `${UrlConfig.script.detail}/${obj.id}` });
|
||||
},
|
||||
addScript(){
|
||||
this.refresh(null);
|
||||
this.$router.push({ path: `${UrlConfig.script.prefix}` });
|
||||
},
|
||||
refresh(data) {
|
||||
let that=this;
|
||||
if(data)
|
||||
{
|
||||
let currentMapId=this.mapSelect;
|
||||
if(currentMapId!=data.mapId)
|
||||
{
|
||||
this.mapSelect=data.mapId;
|
||||
}
|
||||
this.getQuestPageList(this.mapSelect).then(function(){
|
||||
that.$refs.tree.setCurrentKey(data.scriptId);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getQuestPageList(this.mapSelect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.mapListTitle{
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding: 8px 0px;
|
||||
}
|
||||
.mapSelect {
|
||||
width:100%;
|
||||
}
|
||||
.addScript{
|
||||
float: right;
|
||||
display: inline-block;
|
||||
}
|
||||
.addScriptText{
|
||||
color:#409eff;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
@ -25,8 +25,7 @@
|
||||
name: '',
|
||||
mapId: '',
|
||||
description:''
|
||||
},
|
||||
isShow: false,
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@ -48,20 +47,17 @@
|
||||
rules() {
|
||||
let crules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入剧本', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'blur' },
|
||||
],
|
||||
mapId: [
|
||||
{ required: true, message: '请选择地图', trigger: 'change' },
|
||||
{ required: true, message: this.$t('scriptRecord.selectMap'), trigger: 'change' },
|
||||
],
|
||||
description:[
|
||||
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
return crules
|
||||
},
|
||||
// title() {
|
||||
// return '创建剧本'
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
@ -101,7 +97,6 @@
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.isShow = false;
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
|
@ -1,56 +1,10 @@
|
||||
<template>
|
||||
<el-card :style="{height: height+'px'}">
|
||||
|
||||
<div class="scriptHeader">
|
||||
<div class="scriptList">{{$t('scriptRecord.scriptList')}}</div>
|
||||
<el-button size="small" type="primary" @click="handleCreate" class="createScript">{{$t('scriptRecord.scriptCreate')}}</el-button>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;display: inline-block;"/>
|
||||
<!-- <el-table
|
||||
:data="tableData"
|
||||
stripe
|
||||
border
|
||||
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="150">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('scriptRecord.scriptName')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="description"
|
||||
:label="$t('scriptRecord.scriptDescription')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('scriptRecord.status')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{covertData(scope.row)}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="explanation"
|
||||
:label="$t('scriptRecord.revokeReason')"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('scriptRecord.operate')"
|
||||
width="400"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" type="success" @click="drawUp(scope.$index, scope.row)" v-if="!(scope.row.status==1)">{{$t('scriptRecord.scriptRecord')}}</el-button>
|
||||
<el-button size="small" type="primary" @click="handleModify(scope.$index, scope.row)" v-if="!(scope.row.status==1)">{{$t('scriptRecord.scriptModify')}}</el-button>
|
||||
<el-button size="small" type="danger" @click="deleteScript(scope.$index, scope.row)" v-if="!(scope.row.status==1)">{{$t('scriptRecord.scriptDelete')}}</el-button>
|
||||
<el-button size="small" type="primary" @click="publishScript(scope.$index, scope.row)" v-if="scope.row.status==0" v-html="covertButtonname()"></el-button>
|
||||
<el-button size="small" type="primary" @click="revokeScript(scope.$index, scope.row)" v-if="scope.row.status==1">{{$t('scriptRecord.applyRevoke')}}</el-button>
|
||||
<el-button size="small" type="success" @click="previewScript(scope.$index, scope.row)" v-if="scope.row.status==1">{{$t('scriptRecord.preview')}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<script-publish ref='publishScript' @reloadTable="reloadTable" @create="handleConfirmPublish" :title="$t('scriptRecord.publishScript')">
|
||||
</script-publish>
|
||||
<create-script ref='createScript' @reloadTable="reloadTable" @create="handleConfirmCreate" :title="$t('scriptRecord.createScript')">
|
||||
@ -244,12 +198,21 @@ export default {
|
||||
covertData(row){
|
||||
let releaseReview=ConstConfig.ConstSelect.releaseReview;
|
||||
let lastData=Object.assign({}, row);
|
||||
if(Cookies.get("user_lang")=="en"){
|
||||
releaseReview.forEach(function(element){
|
||||
let rolename=element.value;
|
||||
if(lastData.status==rolename){
|
||||
lastData.status=element.enlabel;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
releaseReview.forEach(function(element){
|
||||
let rolename=element.value;
|
||||
if(lastData.status==rolename){
|
||||
lastData.status=element.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
return lastData.status;
|
||||
// let explanation=lastData.explanation?'{ 说明:'+lastData.explanation+'}':'';
|
||||
// return lastData.status+explanation;
|
||||
@ -310,7 +273,6 @@ export default {
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
|
||||
// skinCode=02&group=16-128-757&prdType=02&mapId=18&code=JLFZZX-1&goodsId=&try=0
|
||||
}
|
||||
}
|
||||
|
@ -1,60 +0,0 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div v-show="treeShow" class="list" :style="{width: widthLeft+'px'}">
|
||||
<script-tree ref="scriptTree" :height="height" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view @refresh="refresh" />
|
||||
</transition>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ScriptTree from './category/tree';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
|
||||
export default {
|
||||
name: 'Script',
|
||||
components: {
|
||||
ScriptTree,
|
||||
drapLeft
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
treeShow: true,
|
||||
widthLeft: 450
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
refresh(data) {
|
||||
this.$refs.scriptTree.refresh(data);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
@ -3,11 +3,6 @@
|
||||
<el-card class="conversitionCard">
|
||||
<div class="addConversition">{{ $t('scriptRecord.addConversition') }}</div>
|
||||
<el-form ref="modalData" size="mini" :model="modalData" :rules="rules" label-width="100px" class="conversitionInfo" label-position="right">
|
||||
<!-- <el-form-item label="动作类型" class="conditionVO" prop="actionVO.type" >
|
||||
<el-select v-model="modalData.actionVO.type " placeholder="请选择动作类型" @change="changeType" :disabled="deviceTypeReadOnly||isPause">
|
||||
<el-option v-for="actionType in actionTypeList" :key="actionType.label" :label="actionType.label" :value="actionType.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<div>
|
||||
<div class="itemGroup">
|
||||
<el-form-item :label="$t('scriptRecord.narrator')" class="conditionVO" prop="actionVO.memberId">
|
||||
@ -68,8 +63,6 @@
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import Cookies from 'js-cookie';
|
||||
import DeviceTypeDic from '@/scripts/DeviceTypeDic';
|
||||
// import CommandForm from "./commandForm";
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptPlayMember} from '@/api/simulation';
|
||||
export default {
|
||||
@ -130,7 +123,6 @@
|
||||
isNotModify:true,
|
||||
modifying:false,
|
||||
adding:false,
|
||||
actionTypeList:DeviceTypeDic.ConstSelect.actionType,
|
||||
isJinLu:false,
|
||||
stationList:[],
|
||||
memberList:[],
|
||||
@ -182,7 +174,6 @@
|
||||
let lastData=JSON.stringify(resp.data);
|
||||
roleTypeList.forEach(function(element){
|
||||
let rolename=element.value;
|
||||
// lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
|
||||
if(Cookies.get("user_lang")=="en"){
|
||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
|
||||
}else{
|
||||
|
157
src/views/systemGenerate/create.vue
Normal file
157
src/views/systemGenerate/create.vue
Normal file
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
|
||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||
export default {
|
||||
name: 'OnceGenerate',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
mapList: [],
|
||||
disabled:null,
|
||||
productList:[],
|
||||
mapInfoList:[],
|
||||
projectList:[],
|
||||
typeList:[],
|
||||
formModel:{
|
||||
mapId:'',
|
||||
name: "",
|
||||
prdCode: "",
|
||||
type: "",
|
||||
id:null,
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
props: {
|
||||
title: String,
|
||||
operateType:String
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
let form={};
|
||||
if(this.operateType=="add"){
|
||||
form={
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true,options: this.projectList},
|
||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true,options: this.mapList,change:true,onChange:this.changeMap},
|
||||
{ prop: 'prdCode', label: this.$t('systemGenerate.prdName'), type: 'select', required: true,options:this.productList},
|
||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true,},
|
||||
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true,options: this.typeList},
|
||||
]
|
||||
}
|
||||
}
|
||||
else{
|
||||
form={
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true,},
|
||||
]
|
||||
}
|
||||
}
|
||||
return form
|
||||
},
|
||||
rules() {
|
||||
let crules ={};
|
||||
if(this.operateType=="add"){
|
||||
crules ={customized:[
|
||||
{ required: true, message: this.$t('systemGenerate.selectProject'), trigger: 'change'},
|
||||
],
|
||||
mapId:[
|
||||
{ required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'},
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' },
|
||||
],
|
||||
type:[
|
||||
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'},
|
||||
],
|
||||
prdCode:[
|
||||
{ required: true, message: this.$t('systemGenerate.selectPrdName'), trigger: 'change'},
|
||||
]
|
||||
}
|
||||
}else{
|
||||
crules ={
|
||||
name: [
|
||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' },
|
||||
],
|
||||
};
|
||||
}
|
||||
return crules
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
loadInitData(){
|
||||
this.projectList=[{value:'xty',label:'西铁院'}];
|
||||
let customeredProductType=ConstConfig.ConstSelect.customeredProductType;
|
||||
if(Cookies.get("user_lang")=="en"){
|
||||
customeredProductType.forEach(elem => {
|
||||
this.typeList.push({ value: elem.value, label: elem.enlabel });
|
||||
});
|
||||
}else{
|
||||
customeredProductType.forEach(elem => {
|
||||
this.typeList.push({ value: elem.value, label: elem.label });
|
||||
});
|
||||
}
|
||||
listPublishMap().then(response => {
|
||||
this.mapInfoList=response.data;
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||
})
|
||||
},
|
||||
changeMap(index){
|
||||
this.productList=[];
|
||||
let mapInfo=this.mapInfoList.find(elem=>{
|
||||
return elem.id==index;
|
||||
});
|
||||
|
||||
getCommodityMapProduct(mapInfo.skinCode).then((response) => {
|
||||
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name } });
|
||||
this.formModel.prdCode="";
|
||||
});
|
||||
},
|
||||
doShow(data) {
|
||||
if(data){
|
||||
this.formModel.name=data.name;
|
||||
this.formModel.id=data.id;
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
doCreate() {
|
||||
let self = this
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose()
|
||||
})
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
padding: 25px 55px 20px 20px;
|
||||
}
|
||||
/deep/ .el-dialog--center .el-dialog__body .el-input{
|
||||
width:200px !important;
|
||||
}
|
||||
</style>
|
75
src/views/systemGenerate/generate.vue
Normal file
75
src/views/systemGenerate/generate.vue
Normal file
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
|
||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listPublishMap } from '@/api/jmap/map'
|
||||
export default {
|
||||
name: 'OnceGenerate',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
mapList: [],
|
||||
formModel:{
|
||||
mapId:'',
|
||||
},
|
||||
title: this.$t('systemGenerate.generation')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
let form={
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true,options: this.mapList},
|
||||
]
|
||||
}
|
||||
return form
|
||||
},
|
||||
rules() {
|
||||
let crules ={
|
||||
mapId:[
|
||||
{ required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'},
|
||||
]
|
||||
}
|
||||
return crules
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
listPublishMap().then(response => {
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||
})
|
||||
},
|
||||
doShow() {
|
||||
this.dialogVisible = true
|
||||
},
|
||||
doCreate() {
|
||||
let self = this
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose()
|
||||
})
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
padding: 25px 55px 20px 30px;
|
||||
}
|
||||
</style>
|
@ -1,30 +1,19 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<!-- <div slot="header" style="text-align: center;">
|
||||
<b>地图子系统生成</b>
|
||||
</div> -->
|
||||
<QueryListPage ref="subSystemListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<!-- <div style="margin:50px" :style="{ height: height - 160 +'px' }">
|
||||
<el-select v-model="mapId" clearable placeholder="请选择地图">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" @click="generate">生成</el-button>
|
||||
</div> -->
|
||||
|
||||
<once-generate ref="generate" @create="generateMapSystem"></once-generate>
|
||||
<createMapSystem ref="createMapSystem" :title="$t('systemGenerate.createSubSystem')" @create="handleCreate" operateType="add"></createMapSystem>
|
||||
<createMapSystem ref="modifyMapSystem" :title="$t('systemGenerate.modifySubSystem')" @create="handleModify" operateType="modify"></createMapSystem>
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Cookies from 'js-cookie';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { generateMapSystem,getMapSystemPageList } from '@/api/trainingPlatform';
|
||||
import { generateMapSystem,getMapSystemPageList,createMapSubSystem,getSubSystemInfo,updateSubSystem,deleteSubSystem} from '@/api/trainingPlatform';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import OnceGenerate from './generate';
|
||||
import createMapSystem from './create';
|
||||
|
||||
export default {
|
||||
name: 'SystemGenerate',
|
||||
@ -97,24 +86,27 @@
|
||||
handleClick: this.updateData,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('systemGenerate.deleteData'),
|
||||
handleClick: this.deleteData,
|
||||
type: 'danger',
|
||||
showControl:(row) => { return Boolean(row.customized) },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd },
|
||||
{ text: this.$t('systemGenerate.commission'), handler: this.handleAdd },
|
||||
{ text: this.$t('systemGenerate.generate'), handler: this.generate }
|
||||
]
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
// created(){
|
||||
// listPublishMap().then(response=>{
|
||||
// response.data.forEach(elem => {
|
||||
// this.mapList.push({ value: elem.id, label: elem.name });
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
components: {
|
||||
OnceGenerate,
|
||||
createMapSystem
|
||||
},
|
||||
mounted(){
|
||||
this.loadInitData();
|
||||
},
|
||||
@ -125,10 +117,51 @@
|
||||
},
|
||||
methods: {
|
||||
updateData(index,row){
|
||||
|
||||
getSubSystemInfo(row.id).then(response => {
|
||||
this.$refs.modifyMapSystem.doShow(response.data);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('systemGenerate.getSubSystemInfoFail'));
|
||||
});
|
||||
},
|
||||
deleteData(index,row){
|
||||
this.$confirm(this.$t('systemGenerate.deleteMapSystemTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteSubSystem(row.id).then(response => {
|
||||
this.$message.success(this.$t('systemGenerate.deleteMapSystemSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('systemGenerate.deleteMapSystemFail'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleCreate(data){
|
||||
delete data.id;
|
||||
createMapSubSystem(data).then(response => {
|
||||
this.$message.success(this.$t('systemGenerate.createMapSystemSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('systemGenerate.createMapSystemFail'));
|
||||
});
|
||||
},
|
||||
handleModify(data){
|
||||
let datainfo={'name':data.name};
|
||||
updateSubSystem(data.id,datainfo).then(response => {
|
||||
this.$message.success(this.$t('systemGenerate.updateMapSystemSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('systemGenerate.updateMapSystemFail'));
|
||||
});
|
||||
},
|
||||
handleAdd(){
|
||||
|
||||
this.$refs.createMapSystem.doShow();
|
||||
},
|
||||
reloadTable(){
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
async loadInitData() {
|
||||
try {
|
||||
@ -150,28 +183,22 @@
|
||||
this.queryForm.queryObject.type.config.data.push({ value: elem.value, label: elem.label });
|
||||
this.prdTypeList.push({ value: elem.value, label: elem.label });
|
||||
});
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
generate() {
|
||||
this.$refs.generate.doShow();
|
||||
},
|
||||
generateMapSystem(data) {
|
||||
generateMapSystem(data.mapId).then(response => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('systemGenerate.generateSuccess'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('systemGenerate.generateFail'));
|
||||
});
|
||||
},
|
||||
// generate() {
|
||||
// if(!this.mapId){this.$messageBox('请选择要生成子系统的地图!'); return;}
|
||||
// this.$confirm('此操作将生成该地图下子系统,是否继续?', this.$t('tip.hint'), {
|
||||
// confirmButtonText: this.$t('tip.confirm'),
|
||||
// cancelButtonText: this.$t('tip.cancel'),
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// generateMapSystem(this.mapId).then(response => {
|
||||
// this.$message.success('生成该地图下子系统成功!');
|
||||
// }).catch(() => {
|
||||
// this.$messageBox('生成该地图下子系统失败!');
|
||||
// });
|
||||
// }).catch(() => { });
|
||||
// },
|
||||
queryFunction(params) {
|
||||
return getMapSystemPageList(params);
|
||||
},
|
||||
|
@ -4,11 +4,6 @@
|
||||
<b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px" :style="{ height: height - 190 +'px' }">
|
||||
<p style="font-size: 14px; margin-bottom: 20px"> {{ $t('teach.courseDescription') }}:
|
||||
<span style="color: #808080 !important;">
|
||||
{{ courseModel.remarks }}
|
||||
</span>
|
||||
</p>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
|
||||
<div :style="{ height: height - 270 +'px' }">
|
||||
@ -22,18 +17,15 @@
|
||||
highlight-current
|
||||
:default-expanded-keys="expandList"
|
||||
:span="22"
|
||||
@node-click="clickEvent"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<span v-if="node.data.valid" class="el-icon-goods" :style="{color: 'green'}"> {{ node.label }}</span>
|
||||
<span v-else class="el-icon-sold-out"> {{ node.label }}</span>
|
||||
<span>
|
||||
<el-button v-if="node.data.type ==='Training'&&node.data.valid" type="text" size="mini" @click="startTraining(data)">开始实训</el-button>
|
||||
<el-button v-if="node.data.type ==='Lesson'&& !node.data.valid" type="text" size="mini" @click="buy(node)">购买</el-button>
|
||||
<span slot-scope="{ node }">
|
||||
<span v-if="node.data.type === 'Training'" class="el-icon-goods" />
|
||||
<span v-if="node.data.valid" :style="{color: 'green'}"> {{ node.label }}</span>
|
||||
<span v-else> {{ node.label }}</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -51,16 +43,19 @@
|
||||
<el-button type="success" @click="buy">{{ $t('teach.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button>
|
||||
<el-button type="primary" @click="backLessonList">返回课程列表</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import { trainingNotify } from '@/api/simulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'LessonDetail',
|
||||
@ -76,10 +71,6 @@ export default {
|
||||
courseModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
skinCode: '',
|
||||
price: 0,
|
||||
remarks: '',
|
||||
detail: [],
|
||||
pmsList: []
|
||||
},
|
||||
activeName: 'first',
|
||||
@ -111,20 +102,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initLoadPage() {
|
||||
if (this.$route.params.subSystem) {
|
||||
getSubSystemDetail(this.$route.params.subSystem).then(response => {
|
||||
if (response.data.lesson) {
|
||||
getPublishLessonTree(this.$route.query.lessonId).then(response => {
|
||||
if (response.data.tree && response.data.tree.length>0) {
|
||||
this.courseModel = {
|
||||
id: response.data.lesson.id,
|
||||
name: response.data.lesson.name,
|
||||
price: response.data.lesson.price,
|
||||
remarks: response.data.lesson.remarks,
|
||||
detail: response.data.lesson.chapters,
|
||||
pmsList: response.data.lesson.pmsList || [],
|
||||
prdCode: response.data.lesson.prdCode,
|
||||
mapId: response.data.lesson.mapId,
|
||||
skinCode: response.data.lesson.skinCode,
|
||||
id: response.data.tree[0].id,
|
||||
name: response.data.tree[0].name,
|
||||
pmsList: response.data.permissionList || [],
|
||||
treeList: response.data.tree,
|
||||
prdCode: this.$route.query.prdCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
PermissionType: PermissionType.LESSON
|
||||
};
|
||||
}
|
||||
@ -132,7 +118,6 @@ export default {
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
transfer() {
|
||||
this.loading = false;
|
||||
@ -148,10 +133,20 @@ export default {
|
||||
this.$refs.limitList.distribute(this.courseModel);
|
||||
}
|
||||
},
|
||||
/* clickEvent(obj, node, ele) {
|
||||
clickEvent(obj, node, ele) {
|
||||
if (obj && obj.type==='Training') {
|
||||
if (obj.valid) {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${obj.id}/${this.courseModel.id}`});
|
||||
this.loading = true;
|
||||
trainingNotify({ trainingId: obj.id }).then(resp => {
|
||||
const query = {
|
||||
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId
|
||||
};
|
||||
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
@ -161,7 +156,7 @@ export default {
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
},*/
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
@ -169,7 +164,7 @@ export default {
|
||||
buy() {
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
|
||||
{ permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
{ permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdCode: this.$route.query.prdCode, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem }
|
||||
});
|
||||
},
|
||||
nodeExpand(obj, node, ele) {
|
||||
@ -207,6 +202,9 @@ export default {
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
},
|
||||
backLessonList() {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
75
src/views/teach/index.vue
Normal file
75
src/views/teach/index.vue
Normal file
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div style="height: 100%; padding-bottom: 20px;">
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>教学系统</b>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-loading="loading">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="课程"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="remarks"
|
||||
show-overflow-tooltip
|
||||
label="说明"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">
|
||||
进入课程
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'TeachHome',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route(newVal) {
|
||||
this.loadInitPage();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitPage();
|
||||
},
|
||||
methods: {
|
||||
loadInitPage() {
|
||||
if (this.$route.params.subSystem) {
|
||||
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
||||
if (resp.data) {
|
||||
this.tableData = resp.data.lessonList;
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.$messageBox('获取课程信息失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
goLesson(row) {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdCode: row.prdCode}});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -3,8 +3,10 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('global.mapList') }}</span>
|
||||
</div>
|
||||
<filter-city v-if="project!=='xty' " ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<el-input v-if="project!=='xty' " v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<!-- v-if="project!=='xty' " -->
|
||||
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<!-- v-if="project!=='xty' " -->
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-(project?50:125)) +'px' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
@ -85,9 +87,9 @@ export default {
|
||||
beforeDestroy () {
|
||||
},
|
||||
mounted() {
|
||||
if (this.project === 'xty') {
|
||||
this.projectInitData('18');
|
||||
}
|
||||
// if (this.project === 'xty') {
|
||||
// this.projectInitData('18');
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
@ -116,12 +118,14 @@ export default {
|
||||
getSubSystemInfo(obj.id).then(resp => {
|
||||
switch (resp.data.type) {
|
||||
case 'Exam':
|
||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.course}/${obj.id}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${obj.id}`});
|
||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.examHome}/${obj.id}`);
|
||||
// this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${obj.id}`});
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${obj.id}`});
|
||||
break;
|
||||
case 'Lesson':
|
||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachDetail}/${obj.id}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${obj.id}`});
|
||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
|
||||
// this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${obj.id}`});
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`});
|
||||
break;
|
||||
case 'Simulation':
|
||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
||||
@ -144,7 +148,11 @@ export default {
|
||||
this.treeList = [];
|
||||
this.filterSelect = filterSelect;
|
||||
try {
|
||||
const res = await getTrainingSystemList(filterSelect);
|
||||
let params={};
|
||||
if(this.project === 'xty'){
|
||||
params={'customized':'xty'};
|
||||
}
|
||||
const res = await getTrainingSystemList(filterSelect,params);
|
||||
res.data.forEach(item =>{
|
||||
item.key = item.id + item.type;
|
||||
item.children && item.children.forEach(childrenItem => {
|
||||
@ -164,24 +172,25 @@ export default {
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
},
|
||||
async projectInitData(mapId) {
|
||||
this.loading = true;
|
||||
this.treeList = [];
|
||||
try {
|
||||
const resp = await getTrainingSystemListByMapId(mapId);
|
||||
this.treeList = resp.data;
|
||||
this.loading = false;
|
||||
this.getExpandList(this.filterSelect);
|
||||
this.$nextTick(() => {
|
||||
const checkId = localStore.get('trainingPlatformCheckId'+this.filterSelect+this.account) || null;
|
||||
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
||||
this.loading = false;
|
||||
});
|
||||
} catch (e) {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.failedToGetSystemData'));
|
||||
}
|
||||
},
|
||||
// async projectInitData(mapId) {
|
||||
// this.loading = true;
|
||||
// this.treeList = [];
|
||||
// try {
|
||||
// debugger;
|
||||
// const resp = await getTrainingSystemListByMapId(mapId);
|
||||
// this.treeList = resp.data;
|
||||
// this.loading = false;
|
||||
// this.getExpandList(this.filterSelect);
|
||||
// this.$nextTick(() => {
|
||||
// const checkId = localStore.get('trainingPlatformCheckId'+this.filterSelect+this.account) || null;
|
||||
// this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
||||
// this.loading = false;
|
||||
// });
|
||||
// } catch (e) {
|
||||
// this.loading = false;
|
||||
// this.$messageBox(this.$t('error.failedToGetSystemData'));
|
||||
// }
|
||||
// },
|
||||
nodeExpand(obj, node, ele) {
|
||||
const key = obj.id;
|
||||
this.expandList = this.expandList.filter(item => item!==key);
|
||||
|
Loading…
Reference in New Issue
Block a user