产品分化 设计平台调整

This commit is contained in:
joylink_cuiweidong 2019-09-30 10:46:29 +08:00
parent 2e1f6739eb
commit c7b5188d74
5 changed files with 238 additions and 126 deletions

View File

@ -16,3 +16,11 @@ export function getUserMapTree(cityCode) {
method: 'get'
});
}
/** 运行图*/
export function getRpListByUserMapId(mapId) {
return request({
url: `/api/runPlan/draft/user/${mapId}/list`,
method: 'get'
});
}

View File

@ -408,7 +408,7 @@ export const asyncRouter = [
hidden: true
},
{
path: 'runPlan/detail/:lessonId',
path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail,
hidden: true
},
@ -472,7 +472,7 @@ export const asyncRouter = [
hidden: true
},
{
path: 'runPlan/detail/:lessonId',
path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail,
hidden: true
},

View File

@ -142,16 +142,16 @@
name:'地图设计',
type:'mapDesign'
},
{
id:'2',
name:'课程设计',
type:'lessonDesign'
},
{
id:'3',
name:'剧本设计',
type:'scriptDesign'
},
// {
// id:'2',
// name:'',
// type:'lessonDesign'
// },
// {
// id:'3',
// name:'',
// type:'scriptDesign'
// },
{
id:'4',
name:'运行图设计',
@ -160,7 +160,7 @@
]
// }
});
this.treeData = res.data;
this.treeList = this.filterText
? res.data.filter(elem => { return elem.name.includes(this.filterText); })

View File

@ -1,6 +1,6 @@
<template>
<el-card>
<div slot="header" style="text-align: center;">
<el-card :style="{height: height+'px'}">
<!-- <div slot="header" style="text-align: center;">
<span class=" title">{{ $t('global.line')+courseModel.name }}</span>
</div>
<div style="margin:50px; overflow-x: auto;" :style="{ height: height - 150 +'px' }">
@ -19,110 +19,204 @@
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
<el-button type="primary" @click="start">{{ $t('planMonitor.offlineMappingSoftware') }}</el-button>
</p>
</div>
</div> -->
<div class="runPlanHeader">
<div class="runPlanList">运行图列表</div>
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan">创建运行图</el-button>
</div>
<el-table :data="runPlanList" height="350" stripe
border
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
<el-table-column prop="name" label="运行图名称" />
<el-table-column prop="createTime" label="创建日期" width="180" />
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" class="button_box" @click="handleConfirm(scope.row)">加载</el-button>
<el-button size="mini" class="button_box" @click="handleEdit(scope.row)">修改名称</el-button>
<el-button size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</template>
<script>
import { getPublishMapInfo } from '@/api/jmap/map';
import { PermissionType } from '@/scripts/ConstDic';
import { UrlConfig } from '@/router/index';
import LimitList from '@/views/components/limits/index';
// import { getPublishMapInfo } from '@/api/jmap/map';
// import { PermissionType } from '@/scripts/ConstDic';
// import { UrlConfig } from '@/router/index';
// import LimitList from '@/views/components/limits/index';
// export default {
// name: 'ExamDetailList',
// components: {
// LimitList
// },
// filters: {
// },
// data() {
// return {
// courseModel: {
// mapId: '',
// name: '',
// skinCode: '',
// updateTime: '',
// pmsList: []
// },
// EffectiveTypeList: [],
// screenList: []
// };
// },
// computed: {
// hasPermssion() {
// let isShow = false;
// this.courseModel.pmsList.forEach(item => {
// if (item.canDistribute) {
// isShow = true;
// }
// });
// return isShow;
// },
// height() {
// return this.$store.state.app.height;
// }
// },
// watch: {
// $route(newVal) {
// this.initLoadPage();
// }
// },
// async mounted() {
// this.$Dictionary.effectiveType().then(list => {
// this.EffectiveTypeList = list;
// });
// await this.getScreenLists();
// this.initLoadPage();
// },
// methods: {
// async getScreenLists() {
// },
// async initLoadPage() {
// const that = this;
// const data = { id: this.$route.params.lessonId };
// if (parseInt(data.id)) {
// try {
// const res = await getPublishMapInfo(data.id);
// this.tryUser = 0;
// that.courseModel = {
// name: res.data.name,
// mapId: res.data.id,
// skinCode: res.data.skinCode,
// updateTime: res.data.updateTime,
// pmsList: that.screenList || [],
// PermissionType: PermissionType.PLAN
// };
// this.$store.dispatch('training/setPrdType', res.data.prdType);
// } catch (error) {
// this.$messageBox(this.$t('error.refreshFailed'));
// }
// }
// },
// buy() {
// this.$router.push({
// path: `${UrlConfig.plan.pay}/${this.$route.params.lessonId}`,
// query: { permissionType: PermissionType.SCREEN, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId }
// });
// },
// transfer() {
// if (this.$refs) {
// this.$refs.limitList.transfer(this.courseModel);
// }
// },
// distribute() {
// if (this.$refs) {
// this.$refs.limitList.distribute(this.courseModel);
// }
// },
// jump() {
// const query = {
// skinCode: this.courseModel.skinCode, mapId: this.courseModel.mapId
// };
// this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
// },
// start() {
// this.jump();
// }
// }
// };
import { getRpListByUserMapId} from '@/api/designPlatform';
import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
export default {
name: 'ExamDetailList',
name: 'userRunPlanList',
components: {
LimitList
// LimitList
},
filters: {
},
data() {
return {
courseModel: {
mapId: '',
name: '',
skinCode: '',
updateTime: '',
pmsList: []
},
EffectiveTypeList: [],
screenList: []
dialogShow: false,
loading: false,
// height: 260,
// planId: '',
// planName: '',
type: 'add',
// defaultShowKeys: [],
runPlanList: [],
runPlanDict: {}
// defaultProps: {
// label: 'name'
// }
};
},
computed: {
hasPermssion() {
let isShow = false;
this.courseModel.pmsList.forEach(item => {
if (item.canDistribute) {
isShow = true;
}
});
return isShow;
},
height() {
return this.$store.state.app.height;
return this.$store.state.app.height - 50;
}
},
watch: {
$route(newVal) {
this.initLoadPage();
}
mounted(){
this.getRunPlanList();
},
async mounted() {
this.$Dictionary.effectiveType().then(list => {
this.EffectiveTypeList = list;
});
await this.getScreenLists();
this.initLoadPage();
},
methods: {
async getScreenLists() {
methods:{
getRunPlanList() {
if(/^\/design\/userlist/.test(this.$route.fullPath)){
debugger;
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
this.runPlanList = resp.data;
this.runPlanList.forEach(elem => {
this.runPlanDict[elem.id] = elem.name;
});
// this.dialogShow = true;
}).catch(() => {
this.$messageBox(this.$t('planMonitor.openRunPlan.getRunPlanListFail'));
});
}
else{
debugger;
getRpListByMapId(this.$route.params.mapId).then((resp) => {
this.runPlanList = resp.data;
this.runPlanList.forEach(elem => {
this.runPlanDict[elem.id] = elem.name;
});
// this.dialogShow = true;
}).catch(() => {
this.$messageBox(this.$t('planMonitor.openRunPlan.getRunPlanListFail'));
});
}
},
async initLoadPage() {
const that = this;
const data = { id: this.$route.params.lessonId };
if (parseInt(data.id)) {
try {
const res = await getPublishMapInfo(data.id);
this.tryUser = 0;
that.courseModel = {
name: res.data.name,
mapId: res.data.id,
skinCode: res.data.skinCode,
updateTime: res.data.updateTime,
pmsList: that.screenList || [],
PermissionType: PermissionType.PLAN
};
this.$store.dispatch('training/setPrdType', res.data.prdType);
} catch (error) {
this.$messageBox(this.$t('error.refreshFailed'));
}
}
handleCreate(){
},
buy() {
this.$router.push({
path: `${UrlConfig.plan.pay}/${this.$route.params.lessonId}`,
query: { permissionType: PermissionType.SCREEN, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId }
});
handleConfirm(){
},
transfer() {
if (this.$refs) {
this.$refs.limitList.transfer(this.courseModel);
}
handleEdit(){
},
distribute() {
if (this.$refs) {
this.$refs.limitList.distribute(this.courseModel);
}
},
jump() {
const query = {
skinCode: this.courseModel.skinCode, mapId: this.courseModel.mapId
};
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
},
start() {
this.jump();
handleDelete(){
}
}
};
@ -136,39 +230,49 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.title {
font-weight: bold
}
// .title {
// font-weight: bold
// }
.time-item {
font-size: 24px;
color: black !important;
}
// .time-item {
// font-size: 24px;
// color: black !important;
// }
.time-label {
display: -moz-inline-box;
display: inline-block;
text-align: right;
margin-left: 14px;
}
// .time-label {
// display: -moz-inline-box;
// display: inline-block;
// text-align: right;
// margin-left: 14px;
// }
.time-elem {
color: rgb(90, 89, 89) !important;
}
// .time-elem {
// color: rgb(90, 89, 89) !important;
// }
.list-item {
font-size: 16px;
margin-bottom: 20px;
}
// .list-item {
// font-size: 16px;
// margin-bottom: 20px;
// }
.list-label {
display: -moz-inline-box;
display: inline-block;
text-align: right;
/* width: 160px; */
}
// .list-label {
// display: -moz-inline-box;
// display: inline-block;
// text-align: right;
// /* width: 160px; */
// }
.list-elem {
color: #808080 !important;
}
// .list-elem {
// color: #808080 !important;
// }
.createRunPlan{
display:inline-block;float:right;margin-right:20px;
}
.runPlanHeader{
display:inline-block;margin-top:40px;width: 90%;margin-left:5%;
}
.runPlanList{
display:inline-block;padding:7px 0px
}
</style>

View File

@ -103,7 +103,7 @@ export default {
},
methods: {
loadInitData(){
this.getQuestPageList(this.$route.params.mapId,)
this.getQuestPageList(this.$route.params.mapId)
},
async getQuestPageList(id){
let response=await getQuestPageList(id);