产品分化剧本管理调整
This commit is contained in:
parent
12eed3629a
commit
c60471023f
@ -139,3 +139,12 @@ export function rejectRunPlan(id, data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 用户申请发布剧本或者撤销剧本申请 */
|
||||||
|
export function releaseScript(id, status) {
|
||||||
|
return request({
|
||||||
|
url: `/api/review/script/releaseOrCancel/${id}/${status}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -25,5 +25,7 @@ export default {
|
|||||||
passedRunPlan: 'Passed Run Plan',
|
passedRunPlan: 'Passed Run Plan',
|
||||||
rejectRunPlan: 'Reject Run Plan',
|
rejectRunPlan: 'Reject Run Plan',
|
||||||
runPlanPreview: 'RunPlan Preview',
|
runPlanPreview: 'RunPlan Preview',
|
||||||
inputRunPlanName: 'Please input run plan name'
|
inputRunPlanName: 'Please input run plan name',
|
||||||
|
releaseScriptSuccess: 'release script success',
|
||||||
|
releaseScriptFailed: 'release script failed'
|
||||||
};
|
};
|
||||||
|
@ -84,5 +84,6 @@ export default {
|
|||||||
operate: 'Operate',
|
operate: 'Operate',
|
||||||
scriptList: 'Script List',
|
scriptList: 'Script List',
|
||||||
applyPublish: 'Apply for release',
|
applyPublish: 'Apply for release',
|
||||||
preview: 'Preview'
|
preview: 'Preview',
|
||||||
|
status: 'Status'
|
||||||
};
|
};
|
||||||
|
@ -25,5 +25,7 @@ export default {
|
|||||||
passedRunPlan: '通过运行图',
|
passedRunPlan: '通过运行图',
|
||||||
rejectRunPlan: '驳回运行图',
|
rejectRunPlan: '驳回运行图',
|
||||||
runPlanPreview: '预览',
|
runPlanPreview: '预览',
|
||||||
inputRunPlanName: '请输入运行图名称'
|
inputRunPlanName: '请输入运行图名称',
|
||||||
|
releaseScriptSuccess: '申请发布成功',
|
||||||
|
releaseScriptFailed: '申请发布失败'
|
||||||
};
|
};
|
||||||
|
@ -85,5 +85,6 @@ export default {
|
|||||||
operate: '操作',
|
operate: '操作',
|
||||||
scriptList: '剧本列表',
|
scriptList: '剧本列表',
|
||||||
applyPublish: '申请发布',
|
applyPublish: '申请发布',
|
||||||
preview: '预览'
|
preview: '预览',
|
||||||
|
status: '状态'
|
||||||
};
|
};
|
||||||
|
@ -97,6 +97,12 @@ export default {
|
|||||||
{ label: '北京一号线', value: '03'},
|
{ label: '北京一号线', value: '03'},
|
||||||
{ label: '成都三号线', value: '04'},
|
{ label: '成都三号线', value: '04'},
|
||||||
{ label: '北京八通线', value: '05'}
|
{ label: '北京八通线', value: '05'}
|
||||||
|
],
|
||||||
|
releaseReview: [
|
||||||
|
{ enlabel: 'Unpublished', label: '未发布', value: '0'},
|
||||||
|
{ enlabel: 'Pending review', label: '待审核', value: '1'},
|
||||||
|
{ enlabel: 'Successfully released', label: '发布成功', value: '2'},
|
||||||
|
{ enlabel: 'Overrule', label: '被驳回', value: '3'}
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,22 +16,30 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
:label="$t('scriptRecord.scriptName')"
|
:label="$t('scriptRecord.scriptName')"
|
||||||
width="300">
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="description"
|
prop="description"
|
||||||
:label="$t('scriptRecord.scriptDescription')"
|
:label="$t('scriptRecord.scriptDescription')"
|
||||||
width="400">
|
>
|
||||||
|
</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>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('scriptRecord.operate')"
|
:label="$t('scriptRecord.operate')"
|
||||||
|
width="400"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="small" type="success" @click="drawUp(scope.$index, scope.row)">{{$t('scriptRecord.scriptRecord')}}</el-button>
|
<el-button size="small" type="success" @click="drawUp(scope.$index, scope.row)" :disabled="scope.row.status==1">{{$t('scriptRecord.scriptRecord')}}</el-button>
|
||||||
<el-button size="small" type="primary" @click="handleModify(scope.$index, scope.row)">{{$t('scriptRecord.scriptModify')}}</el-button>
|
<el-button size="small" type="primary" @click="handleModify(scope.$index, scope.row)" :disabled="scope.row.status==1">{{$t('scriptRecord.scriptModify')}}</el-button>
|
||||||
<el-button size="small" type="danger" @click="deleteScript(scope.$index, scope.row)">{{$t('scriptRecord.scriptDelete')}}</el-button>
|
<el-button size="small" type="danger" @click="deleteScript(scope.$index, scope.row)" :disabled="scope.row.status==1">{{$t('scriptRecord.scriptDelete')}}</el-button>
|
||||||
<el-button size="small" type="primary" @click="publishScript(scope.$index, scope.row)">{{$t('scriptRecord.applyPublish')}}</el-button>
|
<el-button size="small" type="primary" @click="publishScript(scope.$index, scope.row)" v-if="scope.row.status==0">{{$t('scriptRecord.applyPublish')}}</el-button>
|
||||||
<el-button size="small" type="success" @click="previewScript(scope.$index, scope.row)">{{$t('scriptRecord.preview')}}</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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -57,8 +65,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { admin, superAdmin} from '@/router';
|
||||||
// import {listPublishMap} from '@/api/jmap/map';
|
// import {listPublishMap} from '@/api/jmap/map';
|
||||||
|
import {releaseScript,publishScript} from '@/api/designPlatform';
|
||||||
import { getQuestPageList,createQuest,deleteQuest,updateQuest} from '@/api/quest';
|
import { getQuestPageList,createQuest,deleteQuest,updateQuest} from '@/api/quest';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { scriptRecordNotify } from '@/api/simulation';
|
import { scriptRecordNotify } from '@/api/simulation';
|
||||||
@ -91,6 +103,10 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'roles',
|
||||||
|
]),
|
||||||
|
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 50;
|
return this.$store.state.app.height - 50;
|
||||||
}
|
}
|
||||||
@ -165,8 +181,37 @@ export default {
|
|||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
|
},
|
||||||
|
covertData(row){
|
||||||
|
let releaseReview=ConstConfig.ConstSelect.releaseReview;
|
||||||
|
let lastData=Object.assign({}, row) ;
|
||||||
|
releaseReview.forEach(function(element){
|
||||||
|
let rolename=element.value;
|
||||||
|
if(lastData.status==rolename){
|
||||||
|
lastData.status=element.label;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let explanation=lastData.explanation?'{ 说明:'+lastData.explanation+'}':'';
|
||||||
|
return lastData.status+explanation;
|
||||||
|
},
|
||||||
|
publishScript(index,row){
|
||||||
|
if(this.roles.indexOf(admin) >= 0 || this.roles.indexOf(superAdmin) >= 0){
|
||||||
|
publishScript(row.id,{'scriptName':row.name}).then(resp => {
|
||||||
|
this.reloadTable();
|
||||||
|
this.$message.success(this.$t('approval.releaseScriptSuccess'));
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${this.$t('approval.releaseScriptFailed')}: ${error.message}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
releaseScript(row.id,1).then(resp => {
|
||||||
|
this.reloadTable();
|
||||||
|
this.$message.success(this.$t('approval.releaseScriptSuccess'));
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${this.$t('approval.releaseScriptFailed')}: ${error.message}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// loadInitData() {
|
// loadInitData() {
|
||||||
// this.mapList = [];
|
// this.mapList = [];
|
||||||
// listPublishMap().then(response => {
|
// listPublishMap().then(response => {
|
||||||
@ -237,4 +282,8 @@ export default {
|
|||||||
.scriptList{
|
.scriptList{
|
||||||
display:inline-block;padding:7px 0px
|
display:inline-block;padding:7px 0px
|
||||||
}
|
}
|
||||||
|
.el-button+.el-button {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user