Merge branch 'dev_product' of https://git.cloud.tencent.com/joylink/jl-nclient into dev_product
This commit is contained in:
commit
d6dbb01bba
@ -130,6 +130,15 @@ export function rejectRunPlan(id, data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 用户申请发布剧本或者撤销剧本申请 */
|
||||
export function releaseScript(id, status) {
|
||||
return request({
|
||||
url: `/api/review/script/releaseOrCancel/${id}/${status}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查看课程详情 */
|
||||
export function reviewLessonDetail(id) {
|
||||
return request({
|
||||
|
@ -26,6 +26,8 @@ export default {
|
||||
rejectRunPlan: 'Reject Run Plan',
|
||||
runPlanPreview: 'RunPlan Preview',
|
||||
inputRunPlanName: 'Please input run plan name',
|
||||
releaseScriptSuccess: 'release script success',
|
||||
releaseScriptFailed: 'release script failed',
|
||||
courseDescription: 'Course description',
|
||||
lookOver: 'Look over',
|
||||
courseDetails: 'Course details',
|
||||
|
@ -84,5 +84,6 @@ export default {
|
||||
operate: 'Operate',
|
||||
scriptList: 'Script List',
|
||||
applyPublish: 'Apply for release',
|
||||
preview: 'Preview'
|
||||
preview: 'Preview',
|
||||
status: 'Status'
|
||||
};
|
||||
|
@ -26,6 +26,8 @@ export default {
|
||||
rejectRunPlan: '驳回运行图',
|
||||
runPlanPreview: '预览',
|
||||
inputRunPlanName: '请输入运行图名称',
|
||||
releaseScriptSuccess: '申请发布成功',
|
||||
releaseScriptFailed: '申请发布失败',
|
||||
courseDescription: '课程说明',
|
||||
lookOver: '查看',
|
||||
courseDetails: '课程详情',
|
||||
|
@ -85,5 +85,6 @@ export default {
|
||||
operate: '操作',
|
||||
scriptList: '剧本列表',
|
||||
applyPublish: '申请发布',
|
||||
preview: '预览'
|
||||
preview: '预览',
|
||||
status: '状态'
|
||||
};
|
||||
|
@ -97,6 +97,12 @@ export default {
|
||||
{ label: '北京一号线', value: '03'},
|
||||
{ label: '成都三号线', value: '04'},
|
||||
{ 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
|
||||
prop="name"
|
||||
:label="$t('scriptRecord.scriptName')"
|
||||
width="300">
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="description"
|
||||
: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
|
||||
:label="$t('scriptRecord.operate')"
|
||||
width="400"
|
||||
>
|
||||
<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="primary" @click="handleModify(scope.$index, scope.row)">{{$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="primary" @click="publishScript(scope.$index, scope.row)">{{$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="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)" :disabled="scope.row.status==1">{{$t('scriptRecord.scriptModify')}}</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)" v-if="scope.row.status==0">{{$t('scriptRecord.applyPublish')}}</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>
|
||||
@ -57,8 +65,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { admin, superAdmin} from '@/router';
|
||||
// import {listPublishMap} from '@/api/jmap/map';
|
||||
import {releaseScript,publishScript} from '@/api/designPlatform';
|
||||
import { getQuestPageList,createQuest,deleteQuest,updateQuest} from '@/api/quest';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { scriptRecordNotify } from '@/api/simulation';
|
||||
@ -91,6 +103,10 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'roles',
|
||||
]),
|
||||
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
@ -165,8 +181,37 @@ export default {
|
||||
},
|
||||
reloadTable() {
|
||||
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() {
|
||||
// this.mapList = [];
|
||||
// listPublishMap().then(response => {
|
||||
@ -237,4 +282,8 @@ export default {
|
||||
.scriptList{
|
||||
display:inline-block;padding:7px 0px
|
||||
}
|
||||
.el-button+.el-button {
|
||||
margin-left: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user