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) {
|
export function releaseOrCancel(id, status) {
|
||||||
// return request({
|
return request({
|
||||||
// url: `/api/review/lesson/releaseOrCancel/${id}/${status}`,
|
url: `/api/review/lesson/releaseOrCancel/${id}/${status}`,
|
||||||
// method: 'get'
|
method: 'get'
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/** 管理员获取需审核的剧本列表 ok */
|
/** 管理员获取需审核的剧本列表 ok */
|
||||||
export function reviewScriptList(params) {
|
export function reviewScriptList(params) {
|
||||||
|
@ -8,11 +8,10 @@ export function getPublishLessonList() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 获取发布列表树*/
|
/** 获取发布列表树*/
|
||||||
export function getPublishLessonTree(params) {
|
export function getPublishLessonTree(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/lesson/tree',
|
url: `/api/lesson/${id}/tree`,
|
||||||
method: 'get',
|
method: 'get'
|
||||||
params: params || {}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,3 +102,11 @@ export function getLessonNameByMapIdAndLessonId(model) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getLessonDrftList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/lessonDraft`,
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
/** 获取考试列表树*/
|
|
||||||
export function getCourseLessonTree(params) {
|
|
||||||
return request({
|
|
||||||
url: '/api/exam/tree',
|
|
||||||
method: 'get',
|
|
||||||
params: params
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 创建对应课程考题 */
|
/** 创建对应课程考题 */
|
||||||
export function setCourseList(data) {
|
export function setCourseList(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
export function getTrainingSystemList(cityCode) {
|
export function getTrainingSystemList(cityCode, params) {
|
||||||
/** 根据cityCode后去对应地图及其子系统 */
|
/** 根据cityCode后去对应地图及其子系统 */
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSystem/city/${cityCode}`,
|
url: `/api/mapSystem/city/${cityCode}`,
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,3 +58,30 @@ export function getMapSystemPageList(params) {
|
|||||||
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'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -454,7 +454,7 @@ export default {
|
|||||||
return this.choose;
|
return this.choose;
|
||||||
},
|
},
|
||||||
refresh(flag) {
|
refresh(flag) {
|
||||||
if (flag){
|
if (flag) {
|
||||||
this.commitQuery();
|
this.commitQuery();
|
||||||
}
|
}
|
||||||
this.queryList.data = [...this.queryList.data];
|
this.queryList.data = [...this.queryList.data];
|
||||||
|
@ -100,5 +100,8 @@ export default {
|
|||||||
publishScriptSuccess: 'Publish Script Success',
|
publishScriptSuccess: 'Publish Script Success',
|
||||||
publishScriptFailed: 'Publish Script Failed',
|
publishScriptFailed: 'Publish Script Failed',
|
||||||
releaseScriptTip: 'This action will apply to release script, whether to continue?',
|
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',
|
name: 'Name',
|
||||||
type: 'Type',
|
type: 'Type',
|
||||||
updateData: 'Modify',
|
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: '发布成功',
|
publishScriptSuccess: '发布成功',
|
||||||
publishScriptFailed: '发布失败',
|
publishScriptFailed: '发布失败',
|
||||||
releaseScriptTip: '此操作将申请发布剧本, 是否继续?',
|
releaseScriptTip: '此操作将申请发布剧本, 是否继续?',
|
||||||
revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?'
|
revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?',
|
||||||
|
inputScriptName: '请输入剧本',
|
||||||
|
selectMap: '请选择地图',
|
||||||
|
inputScriptDescription: '请输入剧本描述'
|
||||||
};
|
};
|
||||||
|
@ -5,5 +5,27 @@ export default {
|
|||||||
name: '名称',
|
name: '名称',
|
||||||
type: '类型',
|
type: '类型',
|
||||||
updateData: '更新',
|
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() {
|
standAndCenterDetainTrain() {
|
||||||
this.detain && this.detain.show();
|
this.detain && this.detain.show();
|
||||||
|
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 人工设置停战时间*/
|
/** 人工设置停战时间*/
|
||||||
|
@ -107,11 +107,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
if (this.operate && this.operate.operateCode) {
|
return this.dialogShow ? getDomIdByOperation(this.operate.operateNext) : '';
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
|
|
||||||
} else {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -135,29 +131,10 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
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) {
|
if (this.passwordCheck === this.correctPassword) {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$emit('checkOver', this.operate);
|
||||||
this.loading = false;
|
|
||||||
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$emit('checkOver');
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.inputClear();
|
this.inputClear();
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.showMistake = true;
|
this.showMistake = true;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl" />
|
<confirm-control ref="confirmControl" />
|
||||||
<password-box ref="password" @checkOver="doClose" />
|
<password-box ref="password" @checkOver="passWordCommit" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -79,10 +79,6 @@ export default {
|
|||||||
return '信号封锁';
|
return '信号封锁';
|
||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
return '信号解封';
|
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) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
return '信号关灯';
|
return '信号关灯';
|
||||||
}
|
}
|
||||||
@ -138,17 +134,26 @@ export default {
|
|||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
this.unlock();
|
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) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
this.signalClose();
|
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() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.training.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
@ -174,7 +179,6 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -194,7 +198,6 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -204,7 +207,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
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 }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -213,7 +216,6 @@ export default {
|
|||||||
this.$refs.password.doShow(operate);
|
this.$refs.password.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -233,7 +235,6 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -243,7 +244,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.lock.menu.operation,
|
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 }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -259,7 +260,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
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 }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -270,51 +271,6 @@ export default {
|
|||||||
}).catch(() => {
|
}).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() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -149,6 +149,25 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
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() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
@ -179,7 +198,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
operation: OperationEvent.Signal.guide.menu.operation,
|
||||||
operateCode: OperationEvent.Signal.guide.confirm.operation
|
operateNext: OperationEvent.Signal.guide.confirm.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -129,6 +129,22 @@ export default {
|
|||||||
this.fault();
|
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() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -192,10 +208,9 @@ export default {
|
|||||||
// 区故解
|
// 区故解
|
||||||
fault() {
|
fault() {
|
||||||
const operate = {
|
const operate = {
|
||||||
// send: true,
|
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.fault.menu.operation,
|
operation: OperationEvent.Section.fault.menu.operation,
|
||||||
operateCode: OperationEvent.Section.fault.confirm.operation
|
operateNext: OperationEvent.Section.fault.confirm.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -153,6 +153,22 @@ export default {
|
|||||||
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
|
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() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -311,11 +327,11 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 打开密码输入框
|
// 打开密码输入框
|
||||||
openPasswordBox(operation, code) {
|
openPasswordBox(operation, operateNext) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: operation,
|
operation: operation,
|
||||||
operateCode: code
|
operateNext: operateNext
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="580px"
|
<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">
|
||||||
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
|
||||||
v-dialogDrag>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item label="列车:" prop="trainCode">
|
<el-form-item label="列车:" prop="trainCode">
|
||||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
|
<el-option
|
||||||
:value="item.code"></el-option>
|
v-for="item in trainList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.groupNumber"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-form-item label="列车方向:" prop="direction">
|
||||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
<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 v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -31,18 +26,18 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
@ -67,7 +62,7 @@
|
|||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
direction: '',
|
direction: '',
|
||||||
selected: null
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -89,22 +84,22 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
if (Object.keys(map || {}).length) {
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
getPublishTrainList(map.skinCode).then(response => {
|
||||||
this.trainList = response.data;
|
this.trainList = response.data;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(`获取列车列表失败`);
|
this.$messageBox(`获取列车列表失败`);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
console.log(this.map);
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
this.loadInitData(this.map);
|
||||||
|
|
||||||
@ -121,38 +116,38 @@
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,38 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<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">
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||||
<el-row>
|
<el-form-item>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
||||||
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
||||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber"
|
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
|
||||||
:value="train.oldGroupNumber">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item label="新车组号" prop="newGroupNumber">
|
<el-form-item label="新车组号" prop="newGroupNumber">
|
||||||
<el-select v-model="addModel.newGroupNumber">
|
<el-select v-model="addModel.newGroupNumber">
|
||||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber"
|
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
|
||||||
:value="train.newGroupNumber">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -51,12 +46,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainEditNumber',
|
name: 'TrainEditNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -66,20 +61,20 @@
|
|||||||
trainList: [],
|
trainList: [],
|
||||||
selected: null,
|
selected: null,
|
||||||
addModel: {
|
addModel: {
|
||||||
stationName:'',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
oldGroupNumber:'',
|
oldGroupNumber: '',
|
||||||
newGroupNumber:'',
|
newGroupNumber: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
newGroupNumber: [
|
newGroupNumber: [
|
||||||
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -95,34 +90,34 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '修改车组号'
|
return '修改车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
if (map) {
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
getPublishTrainList(map.skinCode).then(resp => {
|
||||||
this.trainList = resp.data;
|
this.trainList = resp.data;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
this.$messageBox(`获取列车车组号失败`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel ={
|
||||||
stationName:'',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
oldGroupNumber:'',
|
oldGroupNumber: '',
|
||||||
newGroupNumber:'',
|
newGroupNumber: ''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -139,11 +134,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -151,30 +146,29 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
});
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -97,13 +97,13 @@
|
|||||||
<center><b>工</b><b>控</b></center>
|
<center><b>工</b><b>控</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</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">
|
<span style="color: black">
|
||||||
<center><b>清</b></center>
|
<center><b>清</b></center>
|
||||||
<center><b>除</b></center>
|
<center><b>除</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<password-box ref="password" @checkOver="doClose" />
|
<password-box ref="password" @checkOver="passWordCommit" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -146,6 +146,9 @@ export default {
|
|||||||
MixinCommand() {
|
MixinCommand() {
|
||||||
return OperationEvent.MixinCommand;
|
return OperationEvent.MixinCommand;
|
||||||
},
|
},
|
||||||
|
Command() {
|
||||||
|
return OperationEvent.Command;
|
||||||
|
},
|
||||||
isShowBtn() {
|
isShowBtn() {
|
||||||
return this.$store.state.training.prdType == '01';
|
return this.$store.state.training.prdType == '01';
|
||||||
}
|
}
|
||||||
@ -165,8 +168,19 @@ export default {
|
|||||||
this.resetPosition();
|
this.resetPosition();
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
resetPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@ -199,31 +213,50 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttonDown(operation) {
|
buttonDown(operation) {
|
||||||
if (operation != 'mbm_clear') {
|
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'mbm',
|
type: 'mbm',
|
||||||
operation: operation
|
operation: operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.operation = operation;
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (operation == this.Signal.humanTrainRoute.button.operation) { // 总人解操作 显示密码窗
|
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.$refs.password.doShow(operate);
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} 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/setButtonOperation', null);
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
OperateHandler.cleanOperates(); // 清空操作组
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectedChange() {
|
selectedChange() {
|
||||||
// 按钮按下时
|
// 按钮按下时
|
||||||
if (this.$store.state.menuOperation.buttonOperation) {
|
if (this.$store.state.menuOperation.buttonOperation) {
|
||||||
const model = this.$store.state.menuOperation.selected;
|
const model = this.$store.state.menuOperation.selected; // 选择设备
|
||||||
if (model._type) {
|
if (model._type) {
|
||||||
const deviceType = MapDeviceType[model._type];
|
const deviceType = MapDeviceType[model._type];
|
||||||
const modelData = deepAssign({}, model);
|
const modelData = deepAssign({}, model);
|
||||||
@ -240,7 +273,12 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (response) {
|
if (response) {
|
||||||
this.tempData = response.data;
|
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>
|
<template>
|
||||||
<el-dialog
|
<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">
|
||||||
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 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-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
|
||||||
<el-select
|
<el-select
|
||||||
@ -32,46 +22,59 @@
|
|||||||
:id="domIdTrainType"
|
:id="domIdTrainType"
|
||||||
v-model="formModel.trainType"
|
v-model="formModel.trainType"
|
||||||
style="margin-left: 15px;"
|
style="margin-left: 15px;"
|
||||||
:disabled="trainTypeIsDisabled"
|
|
||||||
@change="trainTypeChange"
|
@change="trainTypeChange"
|
||||||
>
|
>
|
||||||
<el-radio :label="'01'">{{$t('menu.planTrain')}}</el-radio>
|
<el-radio :label="'01'">{{ $t('menu.planTrain') }}</el-radio>
|
||||||
<el-radio :label="'02'">{{$t('menu.headCodeTrain')}}</el-radio>
|
<el-radio :label="'02'">{{ $t('menu.headCodeTrain') }}</el-radio>
|
||||||
<el-radio :label="'03'" style="margin-top:5px;">{{$t('menu.artificialTrain')}}</el-radio>
|
<el-radio :label="'03'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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>
|
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
|
||||||
<el-input
|
<el-input
|
||||||
:id="domIdServerNo"
|
:id="domIdServerNo"
|
||||||
v-model="formModel.serviceNumber"
|
v-model="formModel.serviceNumber"
|
||||||
:disabled="serverNoIsDisabled"
|
:disabled="serverNoIsDisabled"
|
||||||
@change="serverNoChange"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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
|
<el-input
|
||||||
:id="domIdTrainNo"
|
:id="domIdTrainNo"
|
||||||
v-model="formModel.tripNumber"
|
v-model="formModel.tripNumber"
|
||||||
:disabled="trainNoIsDisabled"
|
:disabled="trainNoIsDisabled"
|
||||||
@change="trainNoChange"
|
maxlength="4"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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
|
<el-input
|
||||||
:id="domIdTargetCode"
|
:id="domIdTargetCode"
|
||||||
v-model="formModel.targetCode"
|
v-model="formModel.targetCode"
|
||||||
:disabled="targetCodeIsDisabled"
|
:disabled="targetCodeIsDisabled"
|
||||||
@change="targetCodeChange"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-form>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10" :offset="2">
|
<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>
|
||||||
<el-col :span="8" :offset="4">
|
<el-col :span="8" :offset="4">
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{$t('global.cancel')}}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-train ref="confirmTrain" />
|
<confirm-train ref="confirmTrain" />
|
||||||
@ -85,6 +88,7 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainControl',
|
name: 'TrainControl',
|
||||||
@ -134,10 +138,10 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
serverNoIsDisabled() {
|
serverNoIsDisabled() {
|
||||||
return false;
|
return true;
|
||||||
},
|
},
|
||||||
targetCodeIsDisabled() {
|
targetCodeIsDisabled() {
|
||||||
return false;
|
return true;
|
||||||
},
|
},
|
||||||
trainNumberIsDisabled() {
|
trainNumberIsDisabled() {
|
||||||
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
@ -145,12 +149,12 @@ export default {
|
|||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
trainTypeIsDisabled() {
|
// trainTypeIsDisabled() {
|
||||||
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
// if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
return '';
|
// return '';
|
||||||
},
|
// },
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
@ -236,6 +240,19 @@ export default {
|
|||||||
return this.$t('menu.menuTrain.editTrainId');
|
return this.$t('menu.menuTrain.editTrainId');
|
||||||
}
|
}
|
||||||
return '';
|
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() {
|
mounted() {
|
||||||
@ -262,10 +279,11 @@ export default {
|
|||||||
this.formModel = {
|
this.formModel = {
|
||||||
groupNumber: model.groupNumber,
|
groupNumber: model.groupNumber,
|
||||||
tripNumber: model.tripNumber,
|
tripNumber: model.tripNumber,
|
||||||
trainType: '01',
|
trainType: model.type,
|
||||||
serviceNumber: model.serviceNumber,
|
serviceNumber: '',
|
||||||
targetCode: model.targetCode
|
targetCode: ''
|
||||||
};
|
};
|
||||||
|
debugger;
|
||||||
|
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
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) {
|
trainNoChange(tripNumber) {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
val: `${tripNumber}`,
|
val: `${tripNumber}`,
|
||||||
operation: ''
|
operation: ''
|
||||||
@ -349,28 +349,17 @@ export default {
|
|||||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||||
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
||||||
}
|
}
|
||||||
|
OperateHandler.backStep(1);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
console.log(valid, response, 111);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
if (valid && response.data) {
|
||||||
}
|
this.formModel = {
|
||||||
});
|
groupNumber: this.formModel.groupNumber,
|
||||||
},
|
tripNumber: tripNumber,
|
||||||
targetCodeChange(targetCode) {
|
trainType: '01',
|
||||||
const operate = {
|
serviceNumber: response.data.serviceNumber,
|
||||||
type: MapDeviceType.Train.type,
|
targetCode: response.data.tripNumber
|
||||||
val: `${targetCode}`,
|
|
||||||
operation: ''
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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 });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -424,7 +413,7 @@ export default {
|
|||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||||
messages: [this.$t('tip.editTrainIdTip')],
|
messages: [this.$t('tip.editTrainIdTip')],
|
||||||
val: this.formModel.tripNumber
|
val: `01::${this.formModel.tripNumber}`
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<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">
|
||||||
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"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
||||||
@ -50,7 +39,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
// import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -104,18 +93,16 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
if (map.trainList.length) {
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
this.trainList = map.trainList;
|
||||||
this.trainList = response.data;
|
} else {
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(this.$t('error.getTrainListFailed'));
|
this.$messageBox(this.$t('error.getTrainListFailed'));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
console.log(this.map, 111);
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
this.loadInitData(this.map);
|
||||||
|
|
||||||
|
@ -240,12 +240,16 @@ export const MenuDisabledState = {
|
|||||||
// 设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
const device = getCurrentStateObject();
|
const device = getCurrentStateObject();
|
||||||
if (store.state.training.prdType == '02') {
|
if (store.state.training.prdType == '02') { // 中心行调模式
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
|
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
||||||
|
return true;
|
||||||
|
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else { // 现地模式
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
|
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
||||||
|
return true;
|
||||||
|
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,11 +258,15 @@ export const MenuDisabledState = {
|
|||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
const device = getCurrentStateObject();
|
const device = getCurrentStateObject();
|
||||||
if (store.state.training.prdType == '02') {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ function getRouteInfo(to) {
|
|||||||
loginPath = loginScreenPage;
|
loginPath = loginScreenPage;
|
||||||
getTokenInfo = getScreenToken;
|
getTokenInfo = getScreenToken;
|
||||||
clientId = LoginParams.DaPing.clientId;
|
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;
|
loginPath = loginDesignPage;
|
||||||
getTokenInfo = getDesignToken;
|
getTokenInfo = getDesignToken;
|
||||||
clientId = LoginParams.Design.clientId;
|
clientId = LoginParams.Design.clientId;
|
||||||
|
@ -43,8 +43,10 @@ import ScriptDisplay from '@/views/scriptManage/display/index';
|
|||||||
|
|
||||||
import TeachDetail from '@/views/teach/detail/index';
|
import TeachDetail from '@/views/teach/detail/index';
|
||||||
import TeachPractical from '@/views/teach/practical/index';
|
import TeachPractical from '@/views/teach/practical/index';
|
||||||
|
import TeachHome from '@/views/teach/index';
|
||||||
import Pay from '@/views/components/pay/index';
|
import Pay from '@/views/components/pay/index';
|
||||||
import ExamDetail from '@/views/exam/detail/examDetail';
|
import ExamDetail from '@/views/exam/detail/examDetail';
|
||||||
|
import ExamHome from '@/views/exam/index';
|
||||||
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
|
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
|
||||||
import ExamResult from '@/views/exam/result';
|
import ExamResult from '@/views/exam/result';
|
||||||
|
|
||||||
@ -251,7 +253,9 @@ export const UrlConfig = {
|
|||||||
trainingPlatformHome: '/trainingPlatform/home',
|
trainingPlatformHome: '/trainingPlatform/home',
|
||||||
prodDetail: '/trainingPlatform/detail',
|
prodDetail: '/trainingPlatform/detail',
|
||||||
teachDetail: '/trainingPlatform/teach',
|
teachDetail: '/trainingPlatform/teach',
|
||||||
|
teachHome: '/trainingPlatform/teachHome',
|
||||||
examDetail: '/trainingPlatform/exam',
|
examDetail: '/trainingPlatform/exam',
|
||||||
|
examHome: '/trainingPlatform/examHome',
|
||||||
examRuleManage: '/trainingPlatform/examRule/manage',
|
examRuleManage: '/trainingPlatform/examRule/manage',
|
||||||
examRuleDraft: '/trainingPlatform/examRule/Draft',
|
examRuleDraft: '/trainingPlatform/examRule/Draft',
|
||||||
course: '/trainingPlatform/course',
|
course: '/trainingPlatform/course',
|
||||||
@ -307,7 +311,7 @@ export const constantRoutes = [
|
|||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/jlmap3d/edit',
|
path: '/design/jlmap3d/edit',
|
||||||
component: Jlmap3dedit,
|
component: Jlmap3dedit,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
@ -610,11 +614,21 @@ export const asyncRouter = [
|
|||||||
component: DemonstrationDetail,
|
component: DemonstrationDetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'teachHome/:subSystem',
|
||||||
|
component: TeachHome,
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'teach/:subSystem',
|
path: 'teach/:subSystem',
|
||||||
component: TeachDetail,
|
component: TeachDetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'examHome/:subSystem',
|
||||||
|
component: ExamHome,
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'exam/:examId',
|
path: 'exam/:examId',
|
||||||
component: ExamDetail,
|
component: ExamDetail,
|
||||||
|
@ -107,7 +107,11 @@ export default {
|
|||||||
productType: [
|
productType: [
|
||||||
{ enlabel: 'Lesson System', label: '教学系统', value: 'Lesson'},
|
{ enlabel: 'Lesson System', label: '教学系统', value: 'Lesson'},
|
||||||
{ enlabel: 'Exam System', label: '考试系统', value: 'Exam'},
|
{ 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: {
|
menu: {
|
||||||
operation: '000',
|
operation: '000',
|
||||||
domId: '_Tips-Cancel-Menu'
|
domId: '_Tips-Cancel-Menu'
|
||||||
|
},
|
||||||
|
clearMbm: {
|
||||||
|
operation: '00012',
|
||||||
|
domId: '_Tips-mbm_clear{TOP}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 关闭对话框
|
// 关闭对话框
|
||||||
@ -1094,7 +1098,7 @@ export const OperationEvent = {
|
|||||||
event: '2',
|
event: '2',
|
||||||
button: {
|
button: {
|
||||||
operation: '4020',
|
operation: '4020',
|
||||||
domId: '_Tips-Section-Fault-Mbm'
|
domId: '_Tips-Section-Fault-Mbm{TOP}'
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
operation: '402',
|
operation: '402',
|
||||||
@ -1868,7 +1872,7 @@ export const OperationEvent = {
|
|||||||
},
|
},
|
||||||
// 修改列车识别号
|
// 修改列车识别号
|
||||||
editTrainId: {
|
editTrainId: {
|
||||||
event: '2',
|
event: { query: '9', confirm: '2' },
|
||||||
menu: {
|
menu: {
|
||||||
operation: '702',
|
operation: '702',
|
||||||
domId: '_Tips-Train-EditTrainId-Menu'
|
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) {
|
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
|
||||||
if (FromList) {
|
if (FromList) {
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
// {id: "5", trainingType: "02", name: "信号机名称"}
|
// {id: "5", trainingType: "02", name: "信号机名称"}
|
||||||
// {id: "6", trainingType: "02", name: "信号机编号"}
|
// {id: "6", trainingType: "02", name: "信号机编号"}
|
||||||
// {id: "7", trainingType: "03", name: "道岔名称"}
|
// {id: "7", trainingType: "03", name: "道岔名称"}
|
||||||
|
// {id: "17", trainingType: "03", name: "道岔编码"}
|
||||||
// {id: "8", trainingType: "04", name: "物理区段名称"}
|
// {id: "8", trainingType: "04", name: "物理区段名称"}
|
||||||
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
|
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
|
||||||
|
// {id: "18", trainingType: "04", name: "逻辑区段编码"}
|
||||||
// {id: "10", trainingType: "05", name: "车站名称"}
|
// {id: "10", trainingType: "05", name: "车站名称"}
|
||||||
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
|
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
|
||||||
// {id: "12", trainingType: "05", name: "站台行驶方向"}
|
// {id: "12", trainingType: "05", name: "站台行驶方向"}
|
||||||
@ -1296,6 +1298,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1311,6 +1328,22 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1325,6 +1358,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1340,6 +1387,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456,点击【确定】按钮' }
|
{ 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,
|
maxDuration: 8,
|
||||||
minDuration: 5,
|
minDuration: 5,
|
||||||
@ -1369,6 +1431,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '3061', tip: '输入密码123456,点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1384,6 +1460,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: '输入密码123456,点击【确认】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1399,6 +1490,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1414,6 +1519,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1432,7 +1551,7 @@ export const OperationList = {
|
|||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: '0305', // 0312 新增定位字典
|
operateType: '0312', // 0312 新增定位字典
|
||||||
skinCode: '04',
|
skinCode: '04',
|
||||||
trainingName: '单操到定位({7})',
|
trainingName: '单操到定位({7})',
|
||||||
trainingRemark: '单操到定位({15})',
|
trainingRemark: '单操到定位({15})',
|
||||||
@ -1446,7 +1565,21 @@ export const OperationList = {
|
|||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
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',
|
skinCode: '04',
|
||||||
trainingName: '单操到反位({7})',
|
trainingName: '单操到反位({7})',
|
||||||
trainingRemark: '单操到反位({7})',
|
trainingRemark: '单操到反位({7})',
|
||||||
@ -1457,6 +1590,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1479,10 +1626,10 @@ export const OperationList = {
|
|||||||
trainingName: '道岔单锁({7})',
|
trainingName: '道岔单锁({7})',
|
||||||
trainingRemark: '道岔单锁功能',
|
trainingRemark: '道岔单锁功能',
|
||||||
trainingType: '03',
|
trainingType: '03',
|
||||||
productTypes: ['01'],
|
productTypes: ['01'], // 现地操作
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' },
|
{ 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: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1514,6 +1676,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '02', orderNum: 3, operateCode: '1051', tip: '输入密码123456,点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1529,6 +1705,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '02', orderNum: 3, operateCode: '1062', tip: '输入密码123456,点击【确认】按钮' }
|
{ 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,
|
maxDuration: 20,
|
||||||
minDuration: 10,
|
minDuration: 10,
|
||||||
@ -1560,6 +1751,22 @@ export const OperationList = {
|
|||||||
{ deviceType: '03', orderNum: 3, operateCode: '4023', tip: '输入密码123456,点击【确认】按钮' }
|
{ 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, // 自动生成实训失败
|
maxDuration: 15, // 自动生成实训失败
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
|
@ -407,7 +407,7 @@ function handleButtonFault(operates) {
|
|||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operate.code,
|
code: operate.code,
|
||||||
over: true,
|
// over: true,
|
||||||
operation: SectionOperation.fault.event
|
operation: SectionOperation.fault.event
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -105,22 +105,19 @@ export default {
|
|||||||
function handleButtonArrangementRoute(operates) {
|
function handleButtonArrangementRoute(operates) {
|
||||||
if (operates.length === 2) {
|
if (operates.length === 2) {
|
||||||
const operate = operates[1];
|
const operate = operates[1];
|
||||||
if (operate.type === SignalType && operate.code &&
|
if (operate.type == SignalType && operate.code) {
|
||||||
operate.model && operate.model._viewVal) {
|
|
||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operate.code,
|
code: operate.code,
|
||||||
operation: SignalOperation.arrangementRoute.event.query,
|
operation: SignalOperation.arrangementRoute.event.query
|
||||||
val: operate.model._viewVal
|
// val: operate.model._viewVal
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return { error: true };
|
return { error: true };
|
||||||
} else if (operates.length >= 3) {
|
} else if (operates.length >= 3) {
|
||||||
const operateBeg = operates[1];
|
const operateBeg = operates[1]; // 起始信号灯
|
||||||
const operateEnd = operates[operates.length - 1];
|
const operateEnd = operates[operates.length - 1]; // 终端信号灯
|
||||||
if (operateEnd.type === SignalType && operateEnd.code &&
|
if (operateEnd.type == SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) {
|
||||||
operateEnd.model && operateBeg.val === operateEnd.model._viewVal &&
|
|
||||||
operateEnd.tempData && operateEnd.tempData.length) {
|
|
||||||
for (let i = 0; i < operateEnd.tempData.length; i++) {
|
for (let i = 0; i < operateEnd.tempData.length; i++) {
|
||||||
const elem = operateEnd.tempData[i];
|
const elem = operateEnd.tempData[i];
|
||||||
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
|
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
|
||||||
@ -128,8 +125,8 @@ function handleButtonArrangementRoute(operates) {
|
|||||||
type: operateEnd.type,
|
type: operateEnd.type,
|
||||||
code: operateEnd.code,
|
code: operateEnd.code,
|
||||||
over: true,
|
over: true,
|
||||||
operation: SignalOperation.arrangementRoute.event.confirm,
|
operation: SignalOperation.arrangementRoute.event.confirm
|
||||||
val: elem.code
|
// val: elem.code
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,6 +136,38 @@ function handleButtonArrangementRoute(operates) {
|
|||||||
return null;
|
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
|
* @param {*} operates
|
||||||
@ -184,6 +213,7 @@ function handleButtonReopenSignal(operates) {
|
|||||||
* @param {*} operates
|
* @param {*} operates
|
||||||
*/
|
*/
|
||||||
function handleButtonHumanTrainRoute(operates) {
|
function handleButtonHumanTrainRoute(operates) {
|
||||||
|
debugger;
|
||||||
if (operates.length >= 2) {
|
if (operates.length >= 2) {
|
||||||
const operate = operates[operates.length - 1];
|
const operate = operates[operates.length - 1];
|
||||||
if (operate.type === SignalType && operate.code) {
|
if (operate.type === SignalType && operate.code) {
|
||||||
@ -245,38 +275,6 @@ function handleMenuStoppage(operates) {
|
|||||||
return null;
|
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
|
* @param {*} operates
|
||||||
@ -661,16 +659,32 @@ function handleButtonSetAutoInterlock(operates) {
|
|||||||
* @param {*} operates
|
* @param {*} operates
|
||||||
*/
|
*/
|
||||||
function handleButtonGuideRoute(operates) {
|
function handleButtonGuideRoute(operates) {
|
||||||
if (operates.length >= 2) {
|
if (operates.length == 2) {
|
||||||
const operate = operates[operates.length - 1];
|
const operate = operates[operates.length - 1];
|
||||||
if (operate.type === SignalType && operate.code) {
|
if (operate.type === SignalType && operate.code) {
|
||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operate.code,
|
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,
|
over: true,
|
||||||
operation: SignalOperation.guide.event.confirm
|
operation: SignalOperation.guide.event.confirm
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return { error: true };
|
return { error: true };
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -114,14 +114,25 @@ function handleMenuAddTrainId(operates) {
|
|||||||
* @param {*} operates
|
* @param {*} operates
|
||||||
*/
|
*/
|
||||||
function handleMenuEditTrainId(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];
|
const operate = operates[operates.length - 1];
|
||||||
if (operate.type === TrainType && operate.val) {
|
if (operate.type === TrainType && operate.val) {
|
||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operates[0].code,
|
code: operates[0].code,
|
||||||
over: true,
|
over: true,
|
||||||
operation: TrainOperation.editTrainId.event,
|
operation: TrainOperation.editTrainId.event.confirm,
|
||||||
val: operate.val
|
val: operate.val
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,10 @@ OperateHandler.prototype = {
|
|||||||
/** 操作组 */
|
/** 操作组 */
|
||||||
operates: [],
|
operates: [],
|
||||||
|
|
||||||
|
backStep: function(num) {
|
||||||
|
this.operates = this.operates.slice(0, num);
|
||||||
|
},
|
||||||
|
|
||||||
/** 清空操作组 */
|
/** 清空操作组 */
|
||||||
cleanOperates: function () {
|
cleanOperates: function () {
|
||||||
this.operates.splice(0, this.operates.length);
|
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 { getUserConfigInfo } from '@/api/management/user';
|
||||||
import { LoginParams } from '@/utils/login';
|
import { LoginParams } from '@/utils/login';
|
||||||
import { creatSubscribe, perpetualTopic } from '@/utils/stomp';
|
import { creatSubscribe, perpetualTopic } from '@/utils/stomp';
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
@ -174,10 +175,10 @@ const user = {
|
|||||||
FedLogOut({ commit }, clientId) {
|
FedLogOut({ commit }, clientId) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if (clientId == LoginParams.DaPing.clientId) {
|
if (clientId == LoginParams.DaPing.clientId) {
|
||||||
commit('SET_TOKENDESIGN', '');
|
commit('SET_TOKENSCREEN', '');
|
||||||
removeScreenToken();
|
removeScreenToken();
|
||||||
} else if (clientId == LoginParams.Design.clientId) {
|
} else if (clientId == LoginParams.Design.clientId) {
|
||||||
commit('SET_TOKENSCREEN', '');
|
commit('SET_TOKENDESIGN', '');
|
||||||
removeDesignToken();
|
removeDesignToken();
|
||||||
}
|
}
|
||||||
// else if (clientId == LoginParams.LianJiHua.clientId) {
|
// else if (clientId == LoginParams.LianJiHua.clientId) {
|
||||||
@ -201,6 +202,10 @@ const user = {
|
|||||||
commit('SET_ROLES', []);
|
commit('SET_ROLES', []);
|
||||||
commit('SET_ID', '');
|
commit('SET_ID', '');
|
||||||
removeSessionStorage('design');
|
removeSessionStorage('design');
|
||||||
|
Cookies.remove('UserDesignName');
|
||||||
|
Cookies.remove('UserDesignToken');
|
||||||
|
Cookies.remove('UserName');
|
||||||
|
Cookies.remove('UserToken');
|
||||||
handleRemoveToken();
|
handleRemoveToken();
|
||||||
resolve();
|
resolve();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
formModel:{
|
formModel:{
|
||||||
id:'',
|
id:'',
|
||||||
explanation:'',
|
explanation:'',
|
||||||
},
|
}
|
||||||
isShow: false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -60,7 +59,6 @@
|
|||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
this.isShow = false;
|
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ export default {
|
|||||||
this.active = 0;
|
this.active = 0;
|
||||||
const type = this.$route.query.permissionType;
|
const type = this.$route.query.permissionType;
|
||||||
if (type === PermissionType.LESSON) {
|
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) {
|
} else if (type === PermissionType.EXAM) {
|
||||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`});
|
this.$router.replace({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`});
|
||||||
} else if (type === PermissionType.SCREEN) {
|
} else if (type === PermissionType.SCREEN) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
城市轨道交通设计平台
|
城市轨道交通设计平台
|
||||||
<img :src="logo" alt="" class="logo-img">
|
<!-- <img :src="logo" alt="" class="logo-img"> -->
|
||||||
</h1>
|
</h1>
|
||||||
<div class="card-box">
|
<div class="card-box">
|
||||||
<el-carousel :interval="4000" type="card" height="380px">
|
<el-carousel :interval="4000" type="card" height="380px">
|
||||||
|
@ -187,7 +187,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
jlmap3d() {
|
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() {
|
importf() {
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
|
@ -83,7 +83,7 @@ import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import {loadDraftScript} from '@/api/designPlatform'
|
import {loadDraftScript} from '@/api/designPlatform';
|
||||||
|
|
||||||
// 三维
|
// 三维
|
||||||
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||||
@ -141,8 +141,8 @@ export default {
|
|||||||
'04': '02', // 司机 => 行调
|
'04': '02', // 司机 => 行调
|
||||||
'05': '' // 派班 => null
|
'05': '' // 派班 => null
|
||||||
},
|
},
|
||||||
isDrive:this.prdType == '04',
|
isDrive: this.prdType == '04',
|
||||||
isShowScheduling:this.prdType == '05'
|
isShowScheduling: this.prdType == '05'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -151,8 +151,7 @@ export default {
|
|||||||
'canvasHeight'
|
'canvasHeight'
|
||||||
]),
|
]),
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'map',
|
'map'
|
||||||
'mapDeviceStatus'
|
|
||||||
]),
|
]),
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
'offsetStationCode'
|
'offsetStationCode'
|
||||||
@ -202,7 +201,7 @@ export default {
|
|||||||
},
|
},
|
||||||
isPlan() {
|
isPlan() {
|
||||||
return this.mode === 'plan';
|
return this.mode === 'plan';
|
||||||
},
|
}
|
||||||
// isDrive() {
|
// isDrive() {
|
||||||
// return this.prdType == '04';
|
// return this.prdType == '04';
|
||||||
// },
|
// },
|
||||||
@ -226,7 +225,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
'$store.state.training.prdType':function(val){
|
'$store.state.training.prdType': function(val) {
|
||||||
// this.prdType=val;
|
// this.prdType=val;
|
||||||
this.isDrive=(val == '04');
|
this.isDrive=(val == '04');
|
||||||
this.isShowScheduling=(val == '05');
|
this.isShowScheduling=(val == '05');
|
||||||
@ -479,30 +478,30 @@ export default {
|
|||||||
async runQuestLoadShow() {
|
async runQuestLoadShow() {
|
||||||
this.$refs.addQuest.doShow();
|
this.$refs.addQuest.doShow();
|
||||||
},
|
},
|
||||||
async runAddRolesLoadShow(){
|
async runAddRolesLoadShow() {
|
||||||
// this.$refs.addQuest.doShow();
|
// this.$refs.addQuest.doShow();
|
||||||
let row={id:this.$route.query.scriptId}
|
const row={id: this.$route.query.scriptId};
|
||||||
this.$refs.addQuest.handleLoad(1, row);
|
this.$refs.addQuest.handleLoad(1, row);
|
||||||
},
|
},
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
async selectQuest(row, id,mapLocation,roleName) {
|
async selectQuest(row, id, mapLocation, roleName) {
|
||||||
try {
|
try {
|
||||||
let prdType="";
|
let prdType='';
|
||||||
switch(roleName){
|
switch (roleName) {
|
||||||
case 'Attendant':{
|
case 'Attendant': {
|
||||||
prdType="01";
|
prdType='01';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Dispatcher':{
|
case 'Dispatcher': {
|
||||||
prdType="02";
|
prdType='02';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Driver':{
|
case 'Driver': {
|
||||||
prdType="04";
|
prdType='04';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Repair':{
|
case 'Repair': {
|
||||||
prdType="";
|
prdType='';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -510,7 +509,7 @@ export default {
|
|||||||
const res = await loadDraftScript(row.id, id, this.group);
|
const res = await loadDraftScript(row.id, id, this.group);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.questId = parseInt(row.id);
|
this.questId = parseInt(row.id);
|
||||||
if(mapLocation){
|
if (mapLocation) {
|
||||||
const newMapLocation={'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
const newMapLocation={'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||||
}
|
}
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
@node-expand="nodeExpand"
|
@node-expand="nodeExpand"
|
||||||
@node-collapse="nodeCollapse"
|
@node-collapse="nodeCollapse"
|
||||||
>
|
>
|
||||||
<span slot-scope="{ node, data }">
|
<span slot-scope="{ node }">
|
||||||
<span v-if="node.data.valid" class="el-icon-goods" />
|
<span v-if="valid||node.data.trial" class="el-icon-goods" />
|
||||||
<span v-else class="el-icon-sold-out" />
|
<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>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</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="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</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 v-if="isAddRule" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||||
|
<el-button type="primary" @click="backLessonList">返回课程列表</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import { getCourseLessonDetail } from '@/api/management/exam';
|
import { getCourseLessonDetail } from '@/api/management/exam';
|
||||||
import { PermissionType } from '@/scripts/ConstDic';
|
import { PermissionType } from '@/scripts/ConstDic';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import LimitList from '@/views/components/limits/index';
|
import LimitList from '@/views/components/limits/index';
|
||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamDetailView',
|
name: 'ExamDetailView',
|
||||||
@ -81,7 +81,8 @@ export default {
|
|||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
},
|
},
|
||||||
expandList: []
|
expandList: [],
|
||||||
|
valid: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -110,28 +111,29 @@ export default {
|
|||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.EffectiveTypeList = list;
|
this.EffectiveTypeList = list;
|
||||||
});
|
});
|
||||||
this.loadInitPage(this.$route.query.prodId, this.$route.query.type);
|
this.loadInitPage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitPage() {
|
loadInitPage() {
|
||||||
if (this.$route.params.subSystem) {
|
getCourseLessonDetail({lessonId: this.$route.query.lessonId}).then(resp =>{
|
||||||
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
if (resp.data) {
|
||||||
if (resp.data.lesson) {
|
|
||||||
this.courseModel = {
|
this.courseModel = {
|
||||||
id: resp.data.lesson.id,
|
id: resp.data.id,
|
||||||
name: resp.data.lesson.name,
|
name: resp.data.name,
|
||||||
pmsList: resp.data.permissionList || [],
|
pmsList: resp.data.permissionList || [],
|
||||||
prdCode: resp.data.lesson.prdCode,
|
prdCode: resp.data.prdCode,
|
||||||
mapId: resp.data.lesson.mapId,
|
mapId: resp.data.mapId,
|
||||||
PermissionType: PermissionType.EXAM,
|
PermissionType: PermissionType.EXAM,
|
||||||
treeList: resp.data.tree
|
treeList: resp.data.examDefinitionList
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.getExpandList(this.courseModel.id);
|
if (this.courseModel.pmsList && this.courseModel.pmsList.length >0) {
|
||||||
}).catch((error)=>{
|
this.valid = true;
|
||||||
this.$messageBox('获取考试信息失败!'+error);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
this.getExpandList(this.courseModel.id);
|
||||||
|
}).catch(()=>{
|
||||||
|
this.$messageBox('获取考试信息失败!');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
buy() {
|
buy() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -162,8 +164,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickEvent(obj, node, data) {
|
clickEvent(obj, node, data) {
|
||||||
if (obj.type === 'Exam') {
|
if (this.valid || obj.trial) {
|
||||||
if (obj.valid) {
|
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem }});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem }});
|
||||||
} else {
|
} else {
|
||||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||||
@ -173,8 +174,6 @@ export default {
|
|||||||
this.buy();
|
this.buy();
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
@ -197,6 +196,9 @@ export default {
|
|||||||
if (expand instanceof Array) {
|
if (expand instanceof Array) {
|
||||||
this.expandList = expand;
|
this.expandList = expand;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
backLessonList() {
|
||||||
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -215,7 +215,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
back() {
|
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>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card v-loading="loading">
|
<el-card v-loading="loading">
|
||||||
<el-table
|
<!--<el-table-->
|
||||||
:data="tableData"
|
<!--:data="tableData"-->
|
||||||
row-key="id"
|
<!--row-key="id"-->
|
||||||
border
|
<!--border-->
|
||||||
default-expand-all
|
<!--default-expand-all-->
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
<!--:tree-props="{children: 'children', hasChildren: 'hasChildren'}"-->
|
||||||
>
|
<!-->-->
|
||||||
<el-table-column
|
<!--<el-table-column-->
|
||||||
prop="name"
|
<!--prop="name"-->
|
||||||
border
|
<!--border-->
|
||||||
:label="this.$t('lesson.lesson')"
|
<!--:label="this.$t('lesson.lesson')"-->
|
||||||
/>
|
<!--/>-->
|
||||||
<el-table-column
|
<!--<el-table-column-->
|
||||||
:label="this.$t('global.status')"
|
<!--:label="this.$t('global.status')"-->
|
||||||
>
|
<!-->-->
|
||||||
<template slot-scope="scope">
|
<!--<template slot-scope="scope">-->
|
||||||
<span>{{ handlerStatus(scope.row) }}</span>
|
<!--<span>{{ handlerStatus(scope.row) }}</span>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
</el-table-column>
|
<!--</el-table-column>-->
|
||||||
<el-table-column
|
<!--<el-table-column-->
|
||||||
prop="explanation"
|
<!--prop="explanation"-->
|
||||||
show-overflow-tooltip
|
<!--show-overflow-tooltip-->
|
||||||
:label="this.$t('lesson.rejectReason')"
|
<!--:label="this.$t('lesson.rejectReason')"-->
|
||||||
/>
|
<!--/>-->
|
||||||
<el-table-column
|
<!--<el-table-column-->
|
||||||
width="500"
|
<!--width="500"-->
|
||||||
:label="this.$t('global.operate')"
|
<!--:label="this.$t('global.operate')"-->
|
||||||
>
|
<!-->-->
|
||||||
<template slot-scope="scope">
|
<!--<template slot-scope="scope">-->
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
v-if="scope.row.status!=='1'"
|
<!--v-if="scope.row.status!=='1'"-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="primary"
|
<!--type="primary"-->
|
||||||
@click="createChapter(scope.row)"
|
<!--@click="createChapter(scope.row)"-->
|
||||||
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>
|
<!-->{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>-->
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
v-if="scope.row.status==='1'"
|
<!--v-if="scope.row.status==='1'"-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="primary"
|
<!--type="primary"-->
|
||||||
@click="goDetail(scope.row)"
|
<!--@click="goDetail(scope.row)"-->
|
||||||
>
|
<!-->-->
|
||||||
{{ $t('lesson.review') }}
|
<!--{{ $t('lesson.review') }}-->
|
||||||
</el-button>
|
<!--</el-button>-->
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
|
<!--v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="primary"
|
<!--type="primary"-->
|
||||||
plain
|
<!--plain-->
|
||||||
@click="treeSort(scope.row)"
|
<!--@click="treeSort(scope.row)"-->
|
||||||
>{{ $t('lesson.contentSorting') }}</el-button>
|
<!-->{{ $t('lesson.contentSorting') }}</el-button>-->
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
<!--v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="info"
|
<!--type="info"-->
|
||||||
@click="editLesson(scope.row)"
|
<!--@click="editLesson(scope.row)"-->
|
||||||
>{{ $t('lesson.editCourse') }}</el-button>
|
<!-->{{ $t('lesson.editCourse') }}</el-button>-->
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
<!--v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="primary"
|
<!--type="primary"-->
|
||||||
@click="publish(scope.row)"
|
<!--@click="publish(scope.row)"-->
|
||||||
>{{ hasRelease?$t('global.release'):$t('lesson.applicationForRelease') }}</el-button>
|
<!-->{{ hasRelease?$t('global.release'):$t('lesson.applicationForRelease') }}</el-button>-->
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
<!--v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="danger"
|
<!--type="danger"-->
|
||||||
@click="deleteLesson(scope.row)"
|
<!--@click="deleteLesson(scope.row)"-->
|
||||||
>{{ $t('global.delete') }}</el-button>
|
<!-->{{ $t('global.delete') }}</el-button>-->
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
v-if="scope.row.status ==='1'"
|
<!--v-if="scope.row.status ==='1'"-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="danger"
|
<!--type="danger"-->
|
||||||
@click="revertLesson(scope.row)"
|
<!--@click="revertLesson(scope.row)"-->
|
||||||
>
|
<!-->-->
|
||||||
{{ $t('lesson.withdraw') }}
|
<!--{{ $t('lesson.withdraw') }}-->
|
||||||
</el-button>
|
<!--</el-button>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
</el-table-column>
|
<!--</el-table-column>-->
|
||||||
</el-table>
|
<!--</el-table>-->
|
||||||
|
<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
<publish-create ref="publishCreate" @refresh="refresh" />
|
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||||
@ -98,11 +99,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { releaseOrCancel } from '@/api/designPlatform';
|
import { releaseOrCancel } from '@/api/designPlatform';
|
||||||
|
import { getLessonDrftList } from '@/api/jmap/lessondraft';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import PublishCreate from './lessoncategory/edit/create';
|
import PublishCreate from './lessoncategory/edit/create';
|
||||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||||
import { delLesson, getLessonTree } from '@/api/jmap/lessondraft';
|
import { delLesson, getLessonTree } from '@/api/jmap/lessondraft';
|
||||||
import LessonDetail from '@/views/approval/lesson/detail';
|
import LessonDetail from '@/views/approval/lesson/detail';
|
||||||
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonHome',
|
name: 'LessonHome',
|
||||||
@ -115,7 +118,98 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
loading: false,
|
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: {
|
computed: {
|
||||||
@ -133,8 +227,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loading = true;
|
|
||||||
this.loadInitData();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
@ -185,8 +277,7 @@ export default {
|
|||||||
return lessonStatus;
|
return lessonStatus;
|
||||||
},
|
},
|
||||||
refresh() {
|
refresh() {
|
||||||
this.loading = true;
|
this.$refs.queryListPage.refresh(true);
|
||||||
this.loadInitData();
|
|
||||||
},
|
},
|
||||||
editLesson(row) {
|
editLesson(row) {
|
||||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/lessonEdit`, query: {id: row.id, skinCode: row.code}} );
|
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();
|
this.$refs.publishCreate.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
publish(row) {
|
publish(index, row) {
|
||||||
row.skinCode = this.$route.params.skinCode;
|
row.skinCode = this.$route.params.skinCode;
|
||||||
row.cityCode = this.$route.query.cityCode;
|
row.cityCode = this.$route.query.cityCode;
|
||||||
this.$refs.publishLesson.doShow(row);
|
this.$refs.publishLesson.doShow(row);
|
||||||
},
|
},
|
||||||
deleteLesson(row) {
|
deleteLesson(index, row) {
|
||||||
delLesson(row).then(response => {
|
delLesson(row).then(response => {
|
||||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.loadInitData();
|
this.refresh();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.failDelete'));
|
this.$messageBox(this.$t('tip.failDelete'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createChapter(row) {
|
createChapter(index, row) {
|
||||||
if (row.type === 'Lesson') {
|
if (row.type === 'Lesson') {
|
||||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
||||||
} else if (row.type === 'Chapter') {
|
} else if (row.type === 'Chapter') {
|
||||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`, query: {id: row.id, lessonId: row.parentId}} );
|
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});
|
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: row});
|
||||||
},
|
},
|
||||||
taskManage() {
|
taskManage() {
|
||||||
@ -232,7 +323,7 @@ export default {
|
|||||||
operationManage() {
|
operationManage() {
|
||||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});
|
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'), {
|
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
@ -241,16 +332,16 @@ export default {
|
|||||||
releaseOrCancel(row.id, '0').then(response => {
|
releaseOrCancel(row.id, '0').then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
||||||
this.refuse();
|
this.refresh();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
||||||
this.refuse();
|
this.refresh();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goDetail(row) {
|
goDetail(index, row) {
|
||||||
this.$refs.lessonDetail.show(row.id);
|
// this.$refs.lessonDetail.show(row.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,36 +1,55 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card class="map-list-main" v-loading="loading">
|
<el-card v-loading="loading" class="map-list-main">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>{{$t('lesson.courseList')}}</span>
|
<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>
|
</div>
|
||||||
<el-input :placeholder="this.$t('global.filteringKeywords')" v-model="filterText" clearable> </el-input>
|
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
|
||||||
<el-tree ref="lessonTree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode"
|
<el-tree
|
||||||
@node-contextmenu="showContextMenu" draggable :allow-drop="allowDrop" :allow-drag="allowDrag"
|
ref="lessonTree"
|
||||||
@node-drag-end="handleDragEnd" expand-on-click-node highlight-current @node-click="clickEvent" :span=22>
|
:data="treeData"
|
||||||
<span slot-scope="{ node, data }">
|
:props="defaultProps"
|
||||||
<span v-if="node.data.type === 'skin'" class="el-icon-news"></span>
|
:filter-node-method="filterNode"
|
||||||
<span v-if="node.data.type === 'lesson'" class="el-icon-tickets"></span>
|
draggable
|
||||||
<span v-if="node.data.type === 'chapter'" class="el-icon-document"></span>
|
: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> {{ node.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<tree-operate-menu ref="treeOperateMenu" :point="point" :selected="selected" @refresh="refresh"
|
<tree-operate-menu
|
||||||
@lessonCreate="lessonCreate" @chapterCreate="chapterCreate" @treeSort="treeSort"></tree-operate-menu>
|
ref="treeOperateMenu"
|
||||||
|
:point="point"
|
||||||
|
:selected="selected"
|
||||||
|
@refresh="refresh"
|
||||||
|
@lessonCreate="lessonCreate"
|
||||||
|
@chapterCreate="chapterCreate"
|
||||||
|
@treeSort="treeSort"
|
||||||
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getLessonTree, dragSortLessonChapter } from '@/api/jmap/lessondraft'
|
import { getLessonTree, dragSortLessonChapter } from '@/api/jmap/lessondraft';
|
||||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import TreeOperateMenu from './operateMenu';
|
import TreeOperateMenu from './operateMenu';
|
||||||
import FilterCity from '@/views/components/filterCity';
|
import FilterCity from '@/views/components/filterCity';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainingOperate',
|
name: 'TrainingOperate',
|
||||||
components: {
|
components: {
|
||||||
TreeOperateMenu,
|
TreeOperateMenu
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
height: {
|
height: {
|
||||||
@ -53,7 +72,7 @@
|
|||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
filterText(val) {
|
filterText(val) {
|
||||||
@ -80,9 +99,9 @@
|
|||||||
},
|
},
|
||||||
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
||||||
if (draggingNode && dropNode && dropType !== 'none') {
|
if (draggingNode && dropNode && dropType !== 'none') {
|
||||||
let lesson = this.getLeesonId(dropNode);
|
const lesson = this.getLeesonId(dropNode);
|
||||||
let lessonId = lesson.data.id;
|
const lessonId = lesson.data.id;
|
||||||
let model = {
|
const model = {
|
||||||
location: dropType,
|
location: dropType,
|
||||||
sourceId: draggingNode.data.id,
|
sourceId: draggingNode.data.id,
|
||||||
sourceType: draggingNode.data.type,
|
sourceType: draggingNode.data.type,
|
||||||
@ -90,14 +109,13 @@
|
|||||||
targetType: dropNode.data.type,
|
targetType: dropNode.data.type,
|
||||||
lessonId: lessonId,
|
lessonId: lessonId,
|
||||||
chapterId: dropNode.parent.data.id
|
chapterId: dropNode.parent.data.id
|
||||||
}
|
};
|
||||||
let that = this;
|
|
||||||
dragSortLessonChapter(model).then(response => {
|
dragSortLessonChapter(model).then(response => {
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getLeesonId(node) {
|
getLeesonId(node) {
|
||||||
if (null !== node.parent.parent) {
|
if (node.parent.parent !== null) {
|
||||||
return this.getLeesonId(node.parent);
|
return this.getLeesonId(node.parent);
|
||||||
} else {
|
} else {
|
||||||
return node;
|
return node;
|
||||||
@ -109,10 +127,10 @@
|
|||||||
this.point = {
|
this.point = {
|
||||||
x: e.clientX,
|
x: e.clientX,
|
||||||
y: e.clientY
|
y: e.clientY
|
||||||
}
|
};
|
||||||
this.node = node;
|
this.node = node;
|
||||||
this.selected = obj;
|
this.selected = obj;
|
||||||
let menu = DeviceMenu.Lesson;
|
const menu = DeviceMenu.Lesson;
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -139,15 +157,15 @@
|
|||||||
this.$emit('treeSort', this.node);
|
this.$emit('treeSort', this.node);
|
||||||
},
|
},
|
||||||
convertTreeData(list) {
|
convertTreeData(list) {
|
||||||
let tree = [];
|
const tree = [];
|
||||||
if (list && list.length) {
|
if (list && list.length) {
|
||||||
/*去除列表的training节点*/
|
/* 去除列表的training节点*/
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
elem.children = this.convertTreeData(elem.children);
|
elem.children = this.convertTreeData(elem.children);
|
||||||
if (elem.type !== 'training') {
|
if (elem.type !== 'training') {
|
||||||
tree.push(elem);
|
tree.push(elem);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
return tree;
|
return tree;
|
||||||
},
|
},
|
||||||
@ -156,13 +174,13 @@
|
|||||||
getLessonTree().then(response => {
|
getLessonTree().then(response => {
|
||||||
this.treeData = this.convertTreeData(response.data);
|
this.treeData = this.convertTreeData(response.data);
|
||||||
this.$nextTick(() => { this.loading = false; });
|
this.$nextTick(() => { this.loading = false; });
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.refreshFailed'));
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.el-tree-node.is-current>.el-tree-node__content {
|
.el-tree-node.is-current>.el-tree-node__content {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="draft">
|
<div class="draft">
|
||||||
<el-button type="primary" @click="goBack">{{$t('global.back')}}</el-button>
|
<el-button type="primary" @click="goBack">{{ $t('global.back') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -61,20 +61,21 @@ export default {
|
|||||||
let tree = [];
|
let tree = [];
|
||||||
if (data && list && list.length) {
|
if (data && list && list.length) {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
if (elem.children){
|
if (elem.children) {
|
||||||
elem.children.forEach( item => {
|
elem.children.forEach( item => {
|
||||||
if (data.id == item.id) {
|
if (data.id == item.id) {
|
||||||
tree = [elem];
|
tree = [elem];
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return tree;
|
return tree;
|
||||||
},
|
},
|
||||||
initData(data) {
|
initData(data) {
|
||||||
getLessonTree({ mapId: '' }).then(response => {
|
getLessonTree(data.id).then(response => {
|
||||||
this.treeData = this.convertTreeData(response.data, data);
|
// this.treeData = this.convertTreeData(response.data, data);
|
||||||
|
this.treeData = response.data;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.refreshFailed'));
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
});
|
});
|
||||||
@ -92,10 +93,10 @@ export default {
|
|||||||
return draggingNode && (draggingNode.data.type === 'chapter' || draggingNode.data.type === 'training');
|
return draggingNode && (draggingNode.data.type === 'chapter' || draggingNode.data.type === 'training');
|
||||||
},
|
},
|
||||||
getLeesonId(node) {
|
getLeesonId(node) {
|
||||||
if (node.parent.data.type === 'lesson'){
|
if (node.parent.data.type === 'lesson') {
|
||||||
return node.parent.data.id;
|
return node.parent.data.id;
|
||||||
}else {
|
} else {
|
||||||
return this.getLeesonId(node.parent)
|
return this.getLeesonId(node.parent);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
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>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<!--<training-draft ref="draft" :node="node" @refresh="refresh" />-->
|
<training-draft ref="draft" :node="node" @refresh="refresh" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -9,13 +9,13 @@
|
|||||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
// import TrainingDraft from '../../draft';
|
import TrainingDraft from './draft';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainingOperateMenu',
|
name: 'TrainingOperateMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
// TrainingDraft
|
TrainingDraft
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
point: {
|
point: {
|
||||||
@ -54,10 +54,10 @@ export default {
|
|||||||
node: function (val, old) {
|
node: function (val, old) {
|
||||||
if (val && val.data) {
|
if (val && val.data) {
|
||||||
switch (val.data.type) {
|
switch (val.data.type) {
|
||||||
case 'trainingType':
|
case 'TrainingType':
|
||||||
this.menu = this.menuCreate;
|
this.menu = this.menuCreate;
|
||||||
break;
|
break;
|
||||||
case 'training':
|
case 'Training':
|
||||||
this.menu = this.menuEdit;
|
this.menu = this.menuEdit;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,16 @@
|
|||||||
@node-click="clickEvent"
|
@node-click="clickEvent"
|
||||||
>
|
>
|
||||||
<div slot-scope="{ node: nodeScop }">
|
<div slot-scope="{ node: nodeScop }">
|
||||||
<span v-if="nodeScop.data.type == 'skin'" class="el-icon-news"></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>
|
<span v-else-if="nodeScop.data.type == 'prd'" class="el-icon-tickets" />
|
||||||
<span
|
<span
|
||||||
v-else-if="nodeScop.data.type == 'trainingType'"
|
v-else-if="nodeScop.data.type == 'trainingType'"
|
||||||
class="el-icon-document"
|
class="el-icon-document"
|
||||||
></span>
|
/>
|
||||||
<span
|
<span
|
||||||
v-else-if="nodeScop.data.type == 'training'"
|
v-else-if="nodeScop.data.type == 'training'"
|
||||||
class="el-icon-edit-outline"
|
class="el-icon-edit-outline"
|
||||||
></span>
|
/>
|
||||||
<span> {{ nodeScop.label }}</span>
|
<span> {{ nodeScop.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
@ -91,6 +91,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
showContextMenu(e, obj, node, vueElem) {
|
showContextMenu(e, obj, node, vueElem) {
|
||||||
|
|
||||||
if (obj && obj.type === 'TrainingType' || obj.type === 'Training') {
|
if (obj && obj.type === 'TrainingType' || obj.type === 'Training') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.point = {
|
this.point = {
|
||||||
|
@ -63,10 +63,10 @@ export default {
|
|||||||
label: this.$t('map.deleteObj'),
|
label: this.$t('map.deleteObj'),
|
||||||
handler: this.deleteObj
|
handler: this.deleteObj
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// label: this.$t('map.jlmap3d'),
|
label: this.$t('map.jlmap3d'),
|
||||||
// handler: this.jlmap3d
|
handler: this.jlmap3d
|
||||||
// }
|
}
|
||||||
],
|
],
|
||||||
menuNormal: [],
|
menuNormal: [],
|
||||||
menu: []
|
menu: []
|
||||||
|
@ -95,23 +95,23 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
if (this.node && this.node.data) {
|
if (this.node && this.node.data) {
|
||||||
if (this.node.data.type === 'skin') {
|
if (this.node.data.type === 'Skin') {
|
||||||
return this.$t('map.createProductCategories');
|
return this.$t('map.createProductCategories');
|
||||||
} else if (this.node.data.type === 'prd' ||
|
} else if (this.node.data.type === 'Prd' ||
|
||||||
this.node.data.type === 'prd') {
|
this.node.data.type === 'Prd') {
|
||||||
return this.$t('map.editTraining');
|
return this.$t('map.editTraining');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.$t('map.selectOperation');
|
return this.$t('map.selectOperation');
|
||||||
},
|
},
|
||||||
isCreate() {
|
isCreate() {
|
||||||
return this.node && this.node.data.type === 'skin';
|
return this.node && this.node.data.type === 'Skin';
|
||||||
},
|
},
|
||||||
isUpdate() {
|
isUpdate() {
|
||||||
return this.node && this.node.data.type === 'prd';
|
return this.node && this.node.data.type === 'Prd';
|
||||||
},
|
},
|
||||||
isDelete() {
|
isDelete() {
|
||||||
return this.node && this.node.data.type === 'prd';
|
return this.node && this.node.data.type === 'Prd';
|
||||||
},
|
},
|
||||||
isShowTrainTypes() {
|
isShowTrainTypes() {
|
||||||
return this.addModel.prdType != '03' && this.addModel.prdType != '04';
|
return this.addModel.prdType != '03' && this.addModel.prdType != '04';
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
@node-click="clickEvent"
|
@node-click="clickEvent"
|
||||||
>
|
>
|
||||||
<span slot-scope="{ node }">
|
<span slot-scope="{ node }">
|
||||||
<span v-if="node.data.type == 'skin'" class="el-icon-news"></span>
|
<span v-if="node.data.type == 'skin'" class="el-icon-news" />
|
||||||
<span v-if="node.data.type == 'prd'" class="el-icon-tickets"></span>
|
<span v-if="node.data.type == 'prd'" class="el-icon-tickets" />
|
||||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-document"></span>
|
<span v-if="node.data.type == 'trainingType'" class="el-icon-document" />
|
||||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit"></span>
|
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit" />
|
||||||
<span> {{ node.label }}</span>
|
<span> {{ node.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
style="float: left; width: calc(100% - 80px);"
|
style="float: left; width: calc(100% - 80px);"
|
||||||
:disabled="isEdit"
|
:disabled="isEdit"
|
||||||
/>
|
/>
|
||||||
<span style="width:80px; display: block;float: left; text-align: center;"> {{$t('publish.durationMinutes')}}</span>
|
<span style="width:80px; display: block;float: left; text-align: center;"> {{ $t('publish.durationMinutes') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('publish.testDate')">
|
<el-form-item :label="$t('publish.testDate')">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
@ -59,8 +59,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="trialShow" :label="$t('publish.whetherToTry')" required>
|
<el-form-item v-if="trialShow" :label="$t('publish.whetherToTry')" required>
|
||||||
<el-radio-group v-model="trial">
|
<el-radio-group v-model="trial">
|
||||||
<el-radio label="1">{{$t('publish.trialNo')}}</el-radio>
|
<el-radio label="1">{{ $t('publish.trialNo') }}</el-radio>
|
||||||
<el-radio label="2">{{$t('publish.trialYes')}}</el-radio>
|
<el-radio label="2">{{ $t('publish.trialYes') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('publish.testDescription')" prop="desc">
|
<el-form-item :label="$t('publish.testDescription')" prop="desc">
|
||||||
@ -76,7 +76,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||||
import { getExamLessonDetail, updateExamRules } from '@/api/management/exam';
|
import { getExamLessonDetail, updateExamRules } from '@/api/management/exam';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -268,7 +268,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
refresh() {
|
refresh() {
|
||||||
getPublishLessonTree({ mapId: '' }).then(response => {
|
getPublishLessonList().then(response => {
|
||||||
this.options = response.data;
|
this.options = response.data;
|
||||||
if (parseInt(this.$route.params.lessonId)) {
|
if (parseInt(this.$route.params.lessonId)) {
|
||||||
this.form.region = this.$route.params.lessonId;
|
this.form.region = this.$route.params.lessonId;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||||
import RuleFrom from './rule';
|
import RuleFrom from './rule';
|
||||||
import ExamFrom from './examFrom';
|
import ExamFrom from './examFrom';
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
getPublishLessonTree({ mapId: '' }).then(response => {
|
getPublishLessonList().then(response => {
|
||||||
this.OrganizationList = response.data;
|
this.OrganizationList = response.data;
|
||||||
this.OrganizationList.forEach(elem => {
|
this.OrganizationList.forEach(elem => {
|
||||||
if (elem.id == this.$route.params.lessonId) {
|
if (elem.id == this.$route.params.lessonId) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getExamList, deleteExam, setExamEfficacy, setExamEffectivey } from '@/api/management/exam';
|
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';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -197,7 +197,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.queryForm.queryObject.lessonId.config.data.length = 0;
|
this.queryForm.queryObject.lessonId.config.data.length = 0;
|
||||||
getPublishLessonTree({ mapId: '' }).then(response => {
|
getPublishLessonList().then(response => {
|
||||||
this.OrganizationList = response.data;
|
this.OrganizationList = response.data;
|
||||||
this.OrganizationList.forEach(elem => {
|
this.OrganizationList.forEach(elem => {
|
||||||
if (elem.id == this.$route.query.lessonId) {
|
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: '',
|
name: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
description:''
|
description:''
|
||||||
},
|
}
|
||||||
isShow: false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -48,20 +47,17 @@
|
|||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
let crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入剧本', trigger: 'blur' },
|
{ required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'blur' },
|
||||||
],
|
],
|
||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: '请选择地图', trigger: 'change' },
|
{ required: true, message: this.$t('scriptRecord.selectMap'), trigger: 'change' },
|
||||||
],
|
],
|
||||||
description:[
|
description:[
|
||||||
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
|
{ required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'blur' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return crules
|
return crules
|
||||||
},
|
},
|
||||||
// title() {
|
|
||||||
// return '创建剧本'
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
@ -101,7 +97,6 @@
|
|||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
this.isShow = false;
|
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,56 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card :style="{height: height+'px'}">
|
<el-card :style="{height: height+'px'}">
|
||||||
|
|
||||||
<div class="scriptHeader">
|
<div class="scriptHeader">
|
||||||
<div class="scriptList">{{$t('scriptRecord.scriptList')}}</div>
|
<div class="scriptList">{{$t('scriptRecord.scriptList')}}</div>
|
||||||
<el-button size="small" type="primary" @click="handleCreate" class="createScript">{{$t('scriptRecord.scriptCreate')}}</el-button>
|
<el-button size="small" type="primary" @click="handleCreate" class="createScript">{{$t('scriptRecord.scriptCreate')}}</el-button>
|
||||||
</div>
|
</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;"/>
|
<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 ref='publishScript' @reloadTable="reloadTable" @create="handleConfirmPublish" :title="$t('scriptRecord.publishScript')">
|
||||||
</script-publish>
|
</script-publish>
|
||||||
<create-script ref='createScript' @reloadTable="reloadTable" @create="handleConfirmCreate" :title="$t('scriptRecord.createScript')">
|
<create-script ref='createScript' @reloadTable="reloadTable" @create="handleConfirmCreate" :title="$t('scriptRecord.createScript')">
|
||||||
@ -243,13 +197,22 @@ export default {
|
|||||||
},
|
},
|
||||||
covertData(row){
|
covertData(row){
|
||||||
let releaseReview=ConstConfig.ConstSelect.releaseReview;
|
let releaseReview=ConstConfig.ConstSelect.releaseReview;
|
||||||
let lastData=Object.assign({}, row) ;
|
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){
|
releaseReview.forEach(function(element){
|
||||||
let rolename=element.value;
|
let rolename=element.value;
|
||||||
if(lastData.status==rolename){
|
if(lastData.status==rolename){
|
||||||
lastData.status=element.label;
|
lastData.status=element.label;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
return lastData.status;
|
return lastData.status;
|
||||||
// let explanation=lastData.explanation?'{ 说明:'+lastData.explanation+'}':'';
|
// let explanation=lastData.explanation?'{ 说明:'+lastData.explanation+'}':'';
|
||||||
// return lastData.status+explanation;
|
// return lastData.status+explanation;
|
||||||
@ -310,7 +273,6 @@ export default {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// skinCode=02&group=16-128-757&prdType=02&mapId=18&code=JLFZZX-1&goodsId=&try=0
|
// 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">
|
<el-card class="conversitionCard">
|
||||||
<div class="addConversition">{{ $t('scriptRecord.addConversition') }}</div>
|
<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 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>
|
||||||
<div class="itemGroup">
|
<div class="itemGroup">
|
||||||
<el-form-item :label="$t('scriptRecord.narrator')" class="conditionVO" prop="actionVO.memberId">
|
<el-form-item :label="$t('scriptRecord.narrator')" class="conditionVO" prop="actionVO.memberId">
|
||||||
@ -68,8 +63,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import DeviceTypeDic from '@/scripts/DeviceTypeDic';
|
|
||||||
// import CommandForm from "./commandForm";
|
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptPlayMember} from '@/api/simulation';
|
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptPlayMember} from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
@ -130,7 +123,6 @@
|
|||||||
isNotModify:true,
|
isNotModify:true,
|
||||||
modifying:false,
|
modifying:false,
|
||||||
adding:false,
|
adding:false,
|
||||||
actionTypeList:DeviceTypeDic.ConstSelect.actionType,
|
|
||||||
isJinLu:false,
|
isJinLu:false,
|
||||||
stationList:[],
|
stationList:[],
|
||||||
memberList:[],
|
memberList:[],
|
||||||
@ -182,7 +174,6 @@
|
|||||||
let lastData=JSON.stringify(resp.data);
|
let lastData=JSON.stringify(resp.data);
|
||||||
roleTypeList.forEach(function(element){
|
roleTypeList.forEach(function(element){
|
||||||
let rolename=element.value;
|
let rolename=element.value;
|
||||||
// lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
|
|
||||||
if(Cookies.get("user_lang")=="en"){
|
if(Cookies.get("user_lang")=="en"){
|
||||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
|
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
|
||||||
}else{
|
}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>
|
<template>
|
||||||
<el-card>
|
<el-card>
|
||||||
<!-- <div slot="header" style="text-align: center;">
|
|
||||||
<b>地图子系统生成</b>
|
|
||||||
</div> -->
|
|
||||||
<QueryListPage ref="subSystemListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="subSystemListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<!-- <div style="margin:50px" :style="{ height: height - 160 +'px' }">
|
<once-generate ref="generate" @create="generateMapSystem"></once-generate>
|
||||||
<el-select v-model="mapId" clearable placeholder="请选择地图">
|
<createMapSystem ref="createMapSystem" :title="$t('systemGenerate.createSubSystem')" @create="handleCreate" operateType="add"></createMapSystem>
|
||||||
<el-option
|
<createMapSystem ref="modifyMapSystem" :title="$t('systemGenerate.modifySubSystem')" @create="handleModify" operateType="modify"></createMapSystem>
|
||||||
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> -->
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
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 ConstConfig from '@/scripts/ConstConfig';
|
||||||
|
import OnceGenerate from './generate';
|
||||||
|
import createMapSystem from './create';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SystemGenerate',
|
name: 'SystemGenerate',
|
||||||
@ -97,24 +86,27 @@
|
|||||||
handleClick: this.updateData,
|
handleClick: this.updateData,
|
||||||
type: ''
|
type: ''
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: this.$t('systemGenerate.deleteData'),
|
||||||
|
handleClick: this.deleteData,
|
||||||
|
type: 'danger',
|
||||||
|
showControl:(row) => { return Boolean(row.customized) },
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
actions: [
|
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 }
|
{ text: this.$t('systemGenerate.generate'), handler: this.generate }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// created(){
|
components: {
|
||||||
// listPublishMap().then(response=>{
|
OnceGenerate,
|
||||||
// response.data.forEach(elem => {
|
createMapSystem
|
||||||
// this.mapList.push({ value: elem.id, label: elem.name });
|
},
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
mounted(){
|
mounted(){
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
@ -125,10 +117,51 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateData(index,row){
|
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(){
|
handleAdd(){
|
||||||
|
this.$refs.createMapSystem.doShow();
|
||||||
|
},
|
||||||
|
reloadTable(){
|
||||||
|
if (this.queryList && this.queryList.reload) {
|
||||||
|
this.queryList.reload();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
try {
|
try {
|
||||||
@ -150,28 +183,22 @@
|
|||||||
this.queryForm.queryObject.type.config.data.push({ value: elem.value, label: elem.label });
|
this.queryForm.queryObject.type.config.data.push({ value: elem.value, label: elem.label });
|
||||||
this.prdTypeList.push({ value: elem.value, label: elem.label });
|
this.prdTypeList.push({ value: elem.value, label: elem.label });
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
generate() {
|
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) {
|
queryFunction(params) {
|
||||||
return getMapSystemPageList(params);
|
return getMapSystemPageList(params);
|
||||||
},
|
},
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
<b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b>
|
<b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin:50px" :style="{ height: height - 190 +'px' }">
|
<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-tabs v-model="activeName">
|
||||||
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
|
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
|
||||||
<div :style="{ height: height - 270 +'px' }">
|
<div :style="{ height: height - 270 +'px' }">
|
||||||
@ -22,18 +17,15 @@
|
|||||||
highlight-current
|
highlight-current
|
||||||
:default-expanded-keys="expandList"
|
:default-expanded-keys="expandList"
|
||||||
:span="22"
|
:span="22"
|
||||||
|
@node-click="clickEvent"
|
||||||
@node-expand="nodeExpand"
|
@node-expand="nodeExpand"
|
||||||
@node-collapse="nodeCollapse"
|
@node-collapse="nodeCollapse"
|
||||||
>
|
>
|
||||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
<span slot-scope="{ node }">
|
||||||
<span v-if="node.data.valid" class="el-icon-goods" :style="{color: 'green'}"> {{ node.label }}</span>
|
<span v-if="node.data.type === 'Training'" class="el-icon-goods" />
|
||||||
<span v-else class="el-icon-sold-out"> {{ node.label }}</span>
|
<span v-if="node.data.valid" :style="{color: 'green'}"> {{ node.label }}</span>
|
||||||
<span>
|
<span v-else> {{ node.label }}</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>
|
</span>
|
||||||
</span>
|
|
||||||
|
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
@ -51,16 +43,19 @@
|
|||||||
<el-button type="success" @click="buy">{{ $t('teach.buy') }}</el-button>
|
<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="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
|
||||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</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>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||||
import { PermissionType } from '@/scripts/ConstDic';
|
import { PermissionType } from '@/scripts/ConstDic';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import LimitList from '@/views/components/limits/index';
|
import LimitList from '@/views/components/limits/index';
|
||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
|
import { trainingNotify } from '@/api/simulation';
|
||||||
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonDetail',
|
name: 'LessonDetail',
|
||||||
@ -76,10 +71,6 @@ export default {
|
|||||||
courseModel: {
|
courseModel: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
skinCode: '',
|
|
||||||
price: 0,
|
|
||||||
remarks: '',
|
|
||||||
detail: [],
|
|
||||||
pmsList: []
|
pmsList: []
|
||||||
},
|
},
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
@ -111,20 +102,15 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
if (this.$route.params.subSystem) {
|
getPublishLessonTree(this.$route.query.lessonId).then(response => {
|
||||||
getSubSystemDetail(this.$route.params.subSystem).then(response => {
|
if (response.data.tree && response.data.tree.length>0) {
|
||||||
if (response.data.lesson) {
|
|
||||||
this.courseModel = {
|
this.courseModel = {
|
||||||
id: response.data.lesson.id,
|
id: response.data.tree[0].id,
|
||||||
name: response.data.lesson.name,
|
name: response.data.tree[0].name,
|
||||||
price: response.data.lesson.price,
|
pmsList: response.data.permissionList || [],
|
||||||
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,
|
|
||||||
treeList: response.data.tree,
|
treeList: response.data.tree,
|
||||||
|
prdCode: this.$route.query.prdCode,
|
||||||
|
mapId: this.$route.query.mapId,
|
||||||
PermissionType: PermissionType.LESSON
|
PermissionType: PermissionType.LESSON
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -132,7 +118,6 @@ export default {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
},
|
||||||
transfer() {
|
transfer() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -148,10 +133,20 @@ export default {
|
|||||||
this.$refs.limitList.distribute(this.courseModel);
|
this.$refs.limitList.distribute(this.courseModel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* clickEvent(obj, node, ele) {
|
clickEvent(obj, node, ele) {
|
||||||
if (obj && obj.type==='Training') {
|
if (obj && obj.type==='Training') {
|
||||||
if (obj.valid) {
|
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 {
|
} else {
|
||||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
@ -161,7 +156,7 @@ export default {
|
|||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},*/
|
},
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.name.indexOf(value) !== -1;
|
return data.name.indexOf(value) !== -1;
|
||||||
@ -169,7 +164,7 @@ export default {
|
|||||||
buy() {
|
buy() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
|
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) {
|
nodeExpand(obj, node, ele) {
|
||||||
@ -207,6 +202,9 @@ export default {
|
|||||||
}).catch(() => { });
|
}).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">
|
<div slot="header" class="clearfix">
|
||||||
<span>{{ $t('global.mapList') }}</span>
|
<span>{{ $t('global.mapList') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<filter-city v-if="project!=='xty' " ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
<!-- v-if="project!=='xty' " -->
|
||||||
<el-input v-if="project!=='xty' " v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
<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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-(project?50:125)) +'px' }">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
@ -85,9 +87,9 @@ export default {
|
|||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.project === 'xty') {
|
// if (this.project === 'xty') {
|
||||||
this.projectInitData('18');
|
// this.projectInitData('18');
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
@ -116,12 +118,14 @@ export default {
|
|||||||
getSubSystemInfo(obj.id).then(resp => {
|
getSubSystemInfo(obj.id).then(resp => {
|
||||||
switch (resp.data.type) {
|
switch (resp.data.type) {
|
||||||
case 'Exam':
|
case 'Exam':
|
||||||
this.setLocalRoute(`${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.course}/${obj.id}`});
|
||||||
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${obj.id}`});
|
||||||
break;
|
break;
|
||||||
case 'Lesson':
|
case 'Lesson':
|
||||||
this.setLocalRoute(`${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.teachDetail}/${obj.id}`});
|
||||||
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`});
|
||||||
break;
|
break;
|
||||||
case 'Simulation':
|
case 'Simulation':
|
||||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
||||||
@ -144,7 +148,11 @@ export default {
|
|||||||
this.treeList = [];
|
this.treeList = [];
|
||||||
this.filterSelect = filterSelect;
|
this.filterSelect = filterSelect;
|
||||||
try {
|
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 =>{
|
res.data.forEach(item =>{
|
||||||
item.key = item.id + item.type;
|
item.key = item.id + item.type;
|
||||||
item.children && item.children.forEach(childrenItem => {
|
item.children && item.children.forEach(childrenItem => {
|
||||||
@ -164,24 +172,25 @@ export default {
|
|||||||
this.$messageBox(this.$t('error.refreshFailed'));
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async projectInitData(mapId) {
|
// async projectInitData(mapId) {
|
||||||
this.loading = true;
|
// this.loading = true;
|
||||||
this.treeList = [];
|
// this.treeList = [];
|
||||||
try {
|
// try {
|
||||||
const resp = await getTrainingSystemListByMapId(mapId);
|
// debugger;
|
||||||
this.treeList = resp.data;
|
// const resp = await getTrainingSystemListByMapId(mapId);
|
||||||
this.loading = false;
|
// this.treeList = resp.data;
|
||||||
this.getExpandList(this.filterSelect);
|
// this.loading = false;
|
||||||
this.$nextTick(() => {
|
// this.getExpandList(this.filterSelect);
|
||||||
const checkId = localStore.get('trainingPlatformCheckId'+this.filterSelect+this.account) || null;
|
// this.$nextTick(() => {
|
||||||
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
// const checkId = localStore.get('trainingPlatformCheckId'+this.filterSelect+this.account) || null;
|
||||||
this.loading = false;
|
// this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
||||||
});
|
// this.loading = false;
|
||||||
} catch (e) {
|
// });
|
||||||
this.loading = false;
|
// } catch (e) {
|
||||||
this.$messageBox(this.$t('error.failedToGetSystemData'));
|
// this.loading = false;
|
||||||
}
|
// this.$messageBox(this.$t('error.failedToGetSystemData'));
|
||||||
},
|
// }
|
||||||
|
// },
|
||||||
nodeExpand(obj, node, ele) {
|
nodeExpand(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item!==key);
|
||||||
|
@ -13,14 +13,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import demonList from './demonList';
|
import demonList from './demonList';
|
||||||
import drapLeft from '@/views/components/drapLeft/index';
|
import drapLeft from '@/views/components/drapLeft/index';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainingPlatform',
|
name: 'TrainingPlatform',
|
||||||
components: {
|
components: {
|
||||||
demonList,
|
demonList,
|
||||||
@ -51,9 +51,9 @@
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const againEnter = getSessionStorage('againEnter') || null;
|
const againEnter = getSessionStorage('againEnter') || null;
|
||||||
if (!againEnter){
|
if (!againEnter) {
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
setSessionStorage('againEnter',true);
|
setSessionStorage('againEnter', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.widthLeft = Number(localStore.get('LeftWidth'))?Number(localStore.get('LeftWidth')):450;
|
this.widthLeft = Number(localStore.get('LeftWidth'))?Number(localStore.get('LeftWidth')):450;
|
||||||
@ -66,7 +66,7 @@
|
|||||||
this.widthLeft = Number(width);
|
this.widthLeft = Number(width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
Loading…
Reference in New Issue
Block a user