Merge branch 'dev_product' of https://git.cloud.tencent.com/joylink/jl-nclient into dev_product
This commit is contained in:
commit
588c886f3b
@ -193,6 +193,7 @@ export const UrlConfig = {
|
|||||||
scriptHome: '/design/script/home'
|
scriptHome: '/design/script/home'
|
||||||
},
|
},
|
||||||
designUser: {
|
designUser: {
|
||||||
|
prefix: '/design/userlist/home',
|
||||||
scriptHome: '/design/userlist/script/home',
|
scriptHome: '/design/userlist/script/home',
|
||||||
mapDraw: '/design/userlist/map/draw',
|
mapDraw: '/design/userlist/map/draw',
|
||||||
lessonHome: '/design/userlist/lesson/home',
|
lessonHome: '/design/userlist/lesson/home',
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'runPlanDesign': {
|
case 'runPlanDesign': {
|
||||||
this.$router.push({ path: `${UrlConfig.design.runPlan}/${this.mapId}` });
|
this.$router.push({ path: `${UrlConfig.design.runPlan}/${this.mapId}?skinCode=${this.skinCode}` });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,8 +166,8 @@
|
|||||||
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
|
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
|
||||||
: res.data;
|
: res.data;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const mapId = getSessionStorage('demonList') || null;
|
// const mapId = getSessionStorage('demonList') || null;
|
||||||
this.$refs.tree.setCurrentKey(mapId);
|
// this.$refs.tree.setCurrentKey(mapId);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -176,9 +176,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickEvent(obj, data, ele) {
|
clickEvent(obj, data, ele) {
|
||||||
if (data.parent && data.parent.data){
|
if (obj.type=="map"){
|
||||||
this.mapId = data.parent.data.id;
|
this.mapId = data.data.id;
|
||||||
this.mapName=data.parent.data.name;
|
this.mapName=data.data.name;
|
||||||
|
this.skinCode=data.data.skinCode;
|
||||||
}
|
}
|
||||||
switch(obj.type){
|
switch(obj.type){
|
||||||
case 'scriptDesign':{
|
case 'scriptDesign':{
|
||||||
@ -195,7 +196,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'runPlanDesign': {
|
case 'runPlanDesign': {
|
||||||
this.$router.push({ path: `${UrlConfig.designUser.runPlan}/${this.mapId}` })
|
this.$router.push({ path: `${UrlConfig.designUser.runPlan}/${this.mapId}?skinCode=${this.skinCode}` })
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,8 @@ export default {
|
|||||||
if (this.editModel.id == this.$route.params.mapId) {
|
if (this.editModel.id == this.$route.params.mapId) {
|
||||||
this.$store.dispatch('map/mapClear').then(() => {
|
this.$store.dispatch('map/mapClear').then(() => {
|
||||||
_that.$emit('editMap', null);
|
_that.$emit('editMap', null);
|
||||||
_that.$router.push({ path: `${UrlConfig.map.draft}/0/draft` });
|
// _that.$router.push({ path: `${UrlConfig.map.draft}/0/draft` });
|
||||||
|
_that.$router.push({ path: `${UrlConfig.designUser.prefix}` });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
_that.refresh();
|
_that.refresh();
|
||||||
|
@ -22,10 +22,9 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<div class="runPlanHeader">
|
<div class="runPlanHeader">
|
||||||
<div class="runPlanList">运行图列表</div>
|
<div class="runPlanList">运行图列表</div>
|
||||||
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan">创建运行图</el-button>
|
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">创建运行图</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<el-table :data="runPlanList" height="600" stripe
|
||||||
<el-table :data="runPlanList" height="350" stripe
|
|
||||||
border
|
border
|
||||||
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
||||||
<el-table-column prop="name" label="运行图名称" />
|
<el-table-column prop="name" label="运行图名称" />
|
||||||
@ -33,12 +32,13 @@
|
|||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<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="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" @click="handleEdit(scope.row)" v-if="isCreate">修改名称</el-button>
|
||||||
<el-button size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)" v-if="isCreate">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<create-empty-plan ref="createEmptyPlan" :plan-convert="PlanConvert" @dispatchOperate="dispatchOperate" @dispatchDialog="dispatchDialog" @refresh="refresh"/>
|
||||||
|
<edit-plan-name ref="editPlan" @renewal="getRunPlanList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -145,11 +145,16 @@
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
|
import EditPlanName from './editTool/menus/editPlanName';
|
||||||
|
import CreateEmptyPlan from './editTool/menus/createEmptyPlan';
|
||||||
import { getRpListByUserMapId} from '@/api/designPlatform';
|
import { getRpListByUserMapId} from '@/api/designPlatform';
|
||||||
import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
||||||
|
import { UrlConfig } from '@/router/index';
|
||||||
export default {
|
export default {
|
||||||
name: 'userRunPlanList',
|
name: 'userRunPlanList',
|
||||||
components: {
|
components: {
|
||||||
|
CreateEmptyPlan,
|
||||||
|
EditPlanName
|
||||||
// LimitList
|
// LimitList
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@ -164,7 +169,9 @@ export default {
|
|||||||
type: 'add',
|
type: 'add',
|
||||||
// defaultShowKeys: [],
|
// defaultShowKeys: [],
|
||||||
runPlanList: [],
|
runPlanList: [],
|
||||||
runPlanDict: {}
|
runPlanDict: {},
|
||||||
|
isCreate:false,
|
||||||
|
PlanConvert: {}
|
||||||
// defaultProps: {
|
// defaultProps: {
|
||||||
// label: 'name'
|
// label: 'name'
|
||||||
// }
|
// }
|
||||||
@ -173,15 +180,29 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 50;
|
return this.$store.state.app.height - 50;
|
||||||
}
|
},
|
||||||
|
skinCode() {
|
||||||
|
return this.$route.query.skinCode || '02';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode);
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.getRunPlanList();
|
this.getRunPlanList();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$route' () {
|
||||||
|
this.getRunPlanList();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
refresh(){
|
||||||
|
this.getRunPlanList();
|
||||||
|
},
|
||||||
getRunPlanList() {
|
getRunPlanList() {
|
||||||
if(/^\/design\/userlist/.test(this.$route.fullPath)){
|
if(/^\/design\/userlist/.test(this.$route.fullPath)){
|
||||||
debugger;
|
this.isCreate=false;
|
||||||
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
|
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
|
||||||
this.runPlanList = resp.data;
|
this.runPlanList = resp.data;
|
||||||
this.runPlanList.forEach(elem => {
|
this.runPlanList.forEach(elem => {
|
||||||
@ -193,7 +214,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
debugger;
|
this.isCreate=true;
|
||||||
getRpListByMapId(this.$route.params.mapId).then((resp) => {
|
getRpListByMapId(this.$route.params.mapId).then((resp) => {
|
||||||
this.runPlanList = resp.data;
|
this.runPlanList = resp.data;
|
||||||
this.runPlanList.forEach(elem => {
|
this.runPlanList.forEach(elem => {
|
||||||
@ -205,18 +226,57 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
dispatchOperate(){
|
||||||
|
this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
||||||
|
},
|
||||||
|
dispatchDialog(){
|
||||||
|
this.$refs['createEmptyPlan'].doShow();
|
||||||
|
},
|
||||||
handleCreate(){
|
handleCreate(){
|
||||||
|
this.$refs['createEmptyPlan'].doShow();
|
||||||
},
|
},
|
||||||
handleConfirm(){
|
handleConfirm(row){
|
||||||
|
this.loadRunPlanData({
|
||||||
|
planId: row.id,
|
||||||
|
skinCode: this.$route.query.skinCode,
|
||||||
|
planName: row.name
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleEdit(){
|
// 修改运行图名称
|
||||||
|
handleEdit(row) {
|
||||||
|
if (row.id && row.name) {
|
||||||
|
this.$refs.editPlan.doShow({id: row.id, name: row.name});
|
||||||
|
} else {
|
||||||
|
this.$message.info(this.$t('planMonitor.openRunPlan.pleaseSelectRunplan'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleDelete(){
|
loadRunPlanData({ refresh, planId, skinCode, planName }) {
|
||||||
|
if (refresh) {
|
||||||
|
this.$store.dispatch('runPlan/refresh');
|
||||||
|
} else {
|
||||||
|
const query = { skinCode: skinCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
|
||||||
|
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除运行图
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$confirm(this.$t('planMonitor.openRunPlan.confirmDeleteRunPlan'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteRunPlan(row.id).then(Response => {
|
||||||
|
this.$message.success(this.$t('planMonitor.openRunPlan.deleteSuccess'));
|
||||||
|
// if (row.id === this.$route.query.planId) {
|
||||||
|
// const query = { skinCode: this.$route.query.skinCode, mapId: this.$route.query.mapId };
|
||||||
|
// this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||||
|
// }
|
||||||
|
this.refresh();
|
||||||
|
// this.doClose();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox(this.$t('tip.deleteOperationGraphFailed'));
|
||||||
|
});
|
||||||
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs v-model="activeTab" type="card">
|
<el-tabs v-model="activeTab" type="card">
|
||||||
<el-tab-pane :label="this.$t('planMonitor.normalNew')" name="first">
|
<!-- <el-tab-pane :label="this.$t('planMonitor.normalNew')" name="first">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form ref="form" :model="newModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
<el-form ref="form" :model="newModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
||||||
<el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
|
<el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
|
||||||
@ -20,7 +20,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
<el-tab-pane :label="this.$t('planMonitor.createFromTheReleaseRunGraph')" name="second">
|
<el-tab-pane :label="this.$t('planMonitor.createFromTheReleaseRunGraph')" name="second">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form ref="pullForm" :model="pullModel" label-width="140px" size="mini" :rules="pullRules" @submit.native.prevent>
|
<el-form ref="pullForm" :model="pullModel" label-width="140px" size="mini" :rules="pullRules" @submit.native.prevent>
|
||||||
@ -82,7 +82,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeTab: 'first',
|
activeTab: 'second',
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
loadingDig: null,
|
loadingDig: null,
|
||||||
@ -161,7 +161,7 @@ export default {
|
|||||||
|
|
||||||
this.$emit('dispatchOperate', params);
|
this.$emit('dispatchOperate', params);
|
||||||
this.$message.success(this.$t('tip.createAnEmptyRunGraphSuccessfully'));
|
this.$message.success(this.$t('tip.createAnEmptyRunGraphSuccessfully'));
|
||||||
this.jump(resp.data, this.newModel.name);
|
// this.jump(resp.data, this.newModel.name);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
||||||
@ -175,7 +175,8 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
postCreatePlan(this.pullModel).then(resp => {
|
postCreatePlan(this.pullModel).then(resp => {
|
||||||
this.$message.success(this.$t('tip.createARunGraphSuccessfully'));
|
this.$message.success(this.$t('tip.createARunGraphSuccessfully'));
|
||||||
this.jump(resp.data, this.pullModel.name);
|
// this.jump(resp.data, this.pullModel.name);
|
||||||
|
this.$emit('refresh');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
||||||
|
@ -88,11 +88,11 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.$emit('dispatchOperate', params);
|
this.$emit('dispatchOperate', params);
|
||||||
this.$message.success(this.$t('planMonitor.runGraphNameModifiedSuccessfully'));
|
this.$message.success(this.$t('tip.runGraphNameModifiedSuccessfully'));
|
||||||
this.$emit('renewal');
|
this.$emit('renewal');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('planMonitor.modifyRunGraphNameFailed'));
|
this.$messageBox(this.$t('tip.modifyRunGraphNameFailed'));
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user