|
|
|
@ -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>
|
|
|
|
|