This commit is contained in:
shijing 2022-06-06 09:49:12 +08:00
parent d1ad210c08
commit cc7ddefa7d
1 changed files with 37 additions and 4 deletions

View File

@ -241,8 +241,8 @@
style="padding: 10px 20px;position: relative"
>
<p style="font-size: 20px;font-weight: bold;">新增能力</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力类型 </span>{{showData.data.afield_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域</span>{{showData.data.afield_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力类型 </span>{{atype_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域</span>{{afield_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">上传文件</span>{{showData.data.file}}</p>
<el-link :href="showData.data.file" target="_blank" type="primary">{{showData.data.file}}</el-link>
<el-divider></el-divider>
@ -281,6 +281,7 @@
import checkPermission from "@/utils/permission";
import quliShow from "@/views/ability/quliShow";
import {upUrl, upHeaders} from "@/api/file";
import {getDictList} from "@/api/dict";
export default {
name: 'qualityTaskDo',
@ -318,7 +319,10 @@
actionType: null,
tableHeight: null,
fieldList2: [],
atypeOptions: {},
afieldOptions: {},
atype_name:'',
afield_name:''
};
},
created() {
@ -330,12 +334,32 @@
let computedHeight = height1-height2;
this.tableHeight = computedHeight/2-54;
this.qtaskId = sessionStorage.getItem('qtaskId');
this.getOptions();
this.getQtaskDept();
},
methods: {
//领域类型和领域名称
getOptions() {
getDictList({type__code: "field_type", is_used: true}).then((res) => {
let obj = new Object();
res.data.forEach(item=>{
obj[item.id]=item.name;
});
this.afieldOptions = obj;
debugger;
console.log(this.afieldOptions)
});
getDictList({type__code: "quality_type", is_used: true}).then((res) => {
// this.atypeOptions = res.data;
let obj1 = new Object();
res.data.forEach(item1=>{
obj1[item1.id]=item1.name;
});
this.atypeOptions = obj1;
});
},
checkPermission,
getQtaskDept() {
qtaskDetail({qtask: this.qtaskId}).then((res) => {
@ -357,10 +381,19 @@
//操作处理
handleRecord(type, item) {
this.showData.id = item.id;
this.showData.data = item;
this.showData.type = item.action;
this.showData.action = type;
this.actionType = type;
this.fieldList2 =[];
if(item.afield){
debugger;
this.afield_name = this.afieldOptions[item.afield];
}
if(item.atype){
debugger;
this.atype_name = this.atypeOptions[item.atype];
}
qactionItem(item.id).then(res=>{
if (res.code>=200) {
let updateDetail = res.data.update_detail;//更改字段