mkl_power_box/components/amplify/Company/jishuguanli/amplify-jsjdgl.js

153 lines
6.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var vms = Vue.component("Company-amplify-jsjdgl", {
template: `
<div>
<div class="amplify-title-icon">
<img src="https://fileimg.makalu.cc/WEB_DBD5893450984E50AFF356EF44FF4139.png" @click="openAmplify">
</div>
<transition name="el-zoom-in-top">
<div class="amplify-fixed" v-show="show" style="display: none" @click="closeAmplifyAll">
<div class="amplify-max">
<div class="amplify-title">
<div>技术交底管理</div>
<div class="amplify-close" @click="closeAmplify"><i class="el-icon-close"></i></div>
</div>
<div class="amplify-content">
<!--内容区域-->
<div class="amplify-new-technical-max">
<el-row>
<el-col :span="12">
<div class="amplify-czz-number-content1 new-technical">
<div class="amplify-czz-number-img czz-number-img-blue">
<img src="/images/circle_icon_23.png">
</div>
<div class="amplify-survey_content_number">
<p>管理交底</p>
<div class="amplify-survey_content_value date-font-size"><span v-cloak>{{technologyData.GLJDNum}}</span> 次</div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="amplify-czz-number-content1 new-technical">
<div class="amplify-czz-number-img czz-number-img-green">
<img src="/images/circle_icon_20.png">
</div>
<div class="amplify-survey_content_number">
<p>施组交底</p>
<div class="amplify-survey_content_value survey_content_value_color_green date-font-size" >
<span v-cloak>{{technologyData.SZJDNum}}</span> 次</div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="amplify-czz-number-content1 new-technical" @click="clickShowFour(2)">
<div class="amplify-czz-number-img czz-number-img-blue">
<img src="/images/circle_icon_21.png">
</div>
<div class="amplify-survey_content_number">
<p>专项方案交底</p>
<div class="amplify-survey_content_value"><span v-cloak>{{technologyData.ZXFAJDNum}}</span> 次</div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="amplify-czz-number-content1 new-technical" @click="clickShowFour(1)">
<div class="amplify-czz-number-img czz-number-img-green">
<img src="/images/circle_icon_22.png">
</div>
<div class="amplify-survey_content_number">
<p>技术交底</p>
<div class="amplify-survey_content_value survey_content_value_color_green">
<span v-cloak>{{technologyData.JSJDNum}}</span> 次</div>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
</div>
</transition>
</div>
`,
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:{
},
})