问题:仿真系统添加“运行图编制工作站”的路由和操作

This commit is contained in:
lVAL 2021-02-18 13:37:54 +08:00
parent 88e0c99135
commit f482a4cf71
6 changed files with 23 additions and 10 deletions

View File

@ -601,6 +601,11 @@ export const asyncRouter = [
path: 'draftTeach/:subSystem',
component: DraftLessonManage,
hidden: true
},
{ // 运行图设计
path: 'runPlan/:mapId',
component: PlanMonitorDetail,
hidden: true
},
{ // 试卷列表
path: 'course/:subSystem',

View File

@ -189,6 +189,7 @@ export const UrlConfig = {
trainingPlatform: {
prodDetail: '/trainingPlatform/detail',
teachDetail: '/trainingPlatform/teach',
runPlan: '/trainingPlatform/runPlan',
teachHome: '/trainingPlatform/teachHome',
examHome: '/trainingPlatform/examHome',
course: '/trainingPlatform/course',

View File

@ -2,10 +2,10 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://api.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.129:9000'; // 旭强
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
BASE_API = 'http://192.168.8.119:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -94,18 +94,15 @@ export default {
clickEvent(obj, data, ele) {
switch (obj.type) {
case 'scriptDesign': {
setSessionStorage('designType', 'scriptDesign');
const query = {lineCode:obj.lineCode};
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?`, query});
break;
}
case 'lessonDesign': {
setSessionStorage('designType', 'lessonDesign');
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}` });
break;
}
case 'runPlanDesign': {
setSessionStorage('designType', 'runPlanDesign');
this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}` });
break;
}
@ -118,7 +115,6 @@ export default {
break;
}
case 'ibpDesign': {
setSessionStorage('designType', 'ibpDesign');
this.$router.push({ path: `${UrlConfig.design.ibpHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });
break;
}

View File

@ -36,7 +36,7 @@
<el-button v-if="scope.row.status !=='1'" size="mini" class="button_box" type="success" @click="handleConfirm(scope.row)">{{ $t('planMonitor.load') }}</el-button>
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)">{{ $t('planMonitor.modifyName') }}</el-button>
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">{{ $t('global.delete') }}</el-button>
<el-button v-if="isCreate && scope.row.status ==='0'" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button>
<el-button v-if="isCreate && scope.row.status ==='0' && hasRelease" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button>
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)">{{ $t('planMonitor.preview') }}</el-button>
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="danger" @click="handelRevert(scope.row)">{{ $t('planMonitor.revoke') }}</el-button>
</template>

View File

@ -39,6 +39,7 @@
</template>
<script>
import { getTrainingSystemList, getSubSystemInfo, getSubSystemByProjectCode } from '@/api/trainingPlatform';
import { getPublishMapInfo } from '@/api/jmap/map';
import { UrlConfig } from '@/scripts/ConstDic';
import FilterCity from '@/views/components/filterCity';
import localStore from 'storejs';
@ -95,6 +96,7 @@ export default {
ele.expanded = true;
}
}
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId + this.project, obj.key);
this.mapId = obj.key.split('-')[0];
if ( obj.type === 'Map') {
@ -120,9 +122,18 @@ export default {
this.toNextPage(isReplace, router);
break;
case 'Simulation':
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
router = { path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}};
this.toNextPage(isReplace, router);
if (resp.data.prdType == '08') {
//
getPublishMapInfo(this.mapId).then(rest => {
this.setLocalRoute(`${UrlConfig.trainingPlatform.runPlan}/${this.mapId}?lineCode=${rest.data.lineCode}`);
router = { path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: { lineCode: rest.data.lineCode}};
this.toNextPage(isReplace, router);
});
} else {
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
router = { path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}};
this.toNextPage(isReplace, router);
}
break;
}
}).catch((error) => {