var vms = Vue.component("Company-amplify-jsjdgl", { template: `
`, props: { }, data() { return { show:false, //技术交底管理 technologyData:{ GLJDNum:0, SZJDNum:0, ZXFAJDNum:0, JSJDNum:0 }, } }, mounted(){ }, methods: { openAmplify(){ this.show = true this.getTechnicalCompanyInfo() }, closeAmplify(){ this.show = false }, closeAmplifyAll(e){ if(e.target.className == 'amplify-fixed'){ this.show = false } }, //工具类(通过id 返回num) findNumByTypeId(tempList,typeId) { var list = tempList; if(list.length > 0) { for (let i = 0; i < list.length; i++) { if(typeId == list[i].type) { return list[i] break; } } } else { return 0 } }, //获取技术交底管理 getTechnicalCompanyInfo() { let that = this axios({ method: 'post', url: "/mkl/api/getTechnicalCompanyInfo", data: { "deptId":"131", "typeList":"1,2,3,4" } }).then(res => { if(res.data.code == 0) { var data = res.data.data that.technologyData.GLJDNum = that.findNumByTypeId(data,3).num == undefined ? 0:that.findNumByTypeId(data,3).num that.technologyData.SZJDNum = that.findNumByTypeId(data,4).num == undefined ? 0:that.findNumByTypeId(data,4).num that.technologyData.ZXFAJDNum = that.findNumByTypeId(data,2).num == undefined ? 0:that.findNumByTypeId(data,2).num that.technologyData.JSJDNum = that.findNumByTypeId(data,1).num == undefined ? 0:that.findNumByTypeId(data,1).num } }).catch(err => { }) }, }, watch:{ }, })