rt-sim-training-client/src/views/orderauthor/rules/detail.vue

100 lines
2.8 KiB
Vue

<template>
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="800px" :before-close="close">
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getPermissonDetail } from '@/api/management/author';
export default {
name: 'Author',
components: {
},
data() {
return {
dialogShow: false,
id: '',
PermissionTypeList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '140px',
reset: true,
show: false,
queryObject: {
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('orderAuthor.permissionName'),
prop: 'name'
},
{
title: this.$t('orderAuthor.permissionType'),
prop: 'type',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
tagType: (row) => { return ''; }
}
],
actions: [
]
}
};
},
mounted() {
this.loadInitData();
},
methods: {
loadInitData() {
this.$Dictionary.permissionType().then(list => {
this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
});
},
doShow(id) {
this.id = id;
this.dialogShow = true;
this.reloadTable();
},
close() {
this.id = '';
this.dialogShow = false;
},
queryFunction() {
if (this.id) {
return getPermissonDetail(this.id);
}
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
turnback() {
this.$router.go(-1);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.draft {
width: 400px;
text-align: center;
margin: 20px auto;
}
</style>