137 lines
5.7 KiB
JavaScript
137 lines
5.7 KiB
JavaScript
|
var vms = Vue.component("Company-amplify-aqjc", {
|
||
|
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-glr-max" style="height:380px;">
|
||
|
<el-row>
|
||
|
<el-col :span="12">
|
||
|
<div class="amplify-glr-min safety-min">
|
||
|
<div class="amplify-glr-titles">常规检查次数</div>
|
||
|
<people-number :number="checkNumber1"></people-number>
|
||
|
<div class="amplify-glr-login-rates">
|
||
|
<div>整改率</div>
|
||
|
<div class="amplify-glr-rate-value"><span v-html="zgrate1"></span> %</div>
|
||
|
</div>
|
||
|
<div class="amplify-glr-login-number-max">
|
||
|
<div class="amplify-glr-login-number-bgd"></div>
|
||
|
<div class="amplify-glr-login-number">
|
||
|
<div><img src="/images/text_spot.png">检查问题数</div>
|
||
|
<div class="amplify-glr-rate-value"><span v-html="jcwts1"></span></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</el-col>
|
||
|
<el-col :span="12">
|
||
|
<div class="amplify-glr-min safety-min" >
|
||
|
<div class="amplify-glr-titles">专项检查次数</div>
|
||
|
<people-number :number="checkNumber2"></people-number>
|
||
|
<div class="amplify-glr-login-rates">
|
||
|
<div>整改率</div>
|
||
|
<div class="amplify-glr-rate-value"><span v-html="zgrate2"></span> %</div>
|
||
|
</div>
|
||
|
<div class="amplify-glr-login-number-max">
|
||
|
<div class="amplify-glr-login-number-bgd"></div>
|
||
|
<div class="amplify-glr-login-number" >
|
||
|
<div><img src="/images/text_spot.png">检查问题数</div>
|
||
|
<div class="amplify-glr-rate-value"><span v-html="jcwts2"></span></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</el-col>
|
||
|
</el-row>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</transition>
|
||
|
</div>
|
||
|
`,
|
||
|
props: {
|
||
|
projectid:{
|
||
|
type:Array
|
||
|
}
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
show:false,
|
||
|
checkNumber1:0,
|
||
|
zgrate1:0,
|
||
|
jcwts1:0,
|
||
|
checkNumber2:0,
|
||
|
zgrate2:0,
|
||
|
jcwts2:0,
|
||
|
}
|
||
|
},
|
||
|
mounted(){
|
||
|
|
||
|
},
|
||
|
methods: {
|
||
|
openAmplify(){
|
||
|
this.show = true
|
||
|
this.getAQjcData()
|
||
|
},
|
||
|
closeAmplify(){
|
||
|
this.show = false
|
||
|
},
|
||
|
closeAmplifyAll(e){
|
||
|
if(e.target.className == 'amplify-fixed'){
|
||
|
this.show = false
|
||
|
}
|
||
|
},
|
||
|
|
||
|
|
||
|
//获取安全检查
|
||
|
getAQjcData() {
|
||
|
var list = this.projectid;
|
||
|
console.log(list)
|
||
|
if(list.length > 0) {
|
||
|
var projectList= list.map((item) =>{
|
||
|
return item.id
|
||
|
})
|
||
|
var temp = projectList.join(",")+"";
|
||
|
axios.post("/api/check/getCheckInfoListCompany?projectList="+temp).then(res => {
|
||
|
if(res.data.code == 0) {
|
||
|
this.checkNumber1 = res.data.cgjc.total;
|
||
|
this.zgrate1 = res.data.cgjc.rate;
|
||
|
this.jcwts1 = res.data.cgjc.problemTotal;
|
||
|
this.checkNumber2 = res.data.zxjc.total;
|
||
|
this.zgrate2 = res.data.zxjc.rate;
|
||
|
this.jcwts2 = res.data.zxjc.problemTotal;
|
||
|
}
|
||
|
})
|
||
|
} else {
|
||
|
this.checkNumber1 =0;
|
||
|
this.zgrate1 = 0;
|
||
|
this.jcwts1 = 0;
|
||
|
this.checkNumber2 = 0;
|
||
|
this.zgrate2 = 0;
|
||
|
this.jcwts2 = 0;
|
||
|
}
|
||
|
|
||
|
},
|
||
|
|
||
|
},
|
||
|
watch:{
|
||
|
|
||
|
},
|
||
|
|
||
|
})
|
||
|
|
||
|
|