166 lines
6.6 KiB
JavaScript
166 lines
6.6 KiB
JavaScript
var vms = Vue.component("Company-amplify-qysj", {
|
|
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">
|
|
<!--内容区域-->
|
|
<!--送检tab切换-->
|
|
<div class="amplify-pcd-output-value">
|
|
<div class="amplify-warning-info-title"></div>
|
|
<div class="sjk-chart-line-title pcd-output-value-title quality-button">
|
|
<div :class="outputValueNavQysj==1?'active':''" @click="onClickOutputValueNavQysj(1)">本月</div>
|
|
<div :class="outputValueNavQysj==2?'active':''" @click="onClickOutputValueNavQysj(2)">开累</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="amplify-survey_title" style="padding: 15px">
|
|
<div class="amplify-survey_title_btn" >
|
|
<div :class="overview==1?'amplify-survey_title_btn_min active':'amplify-survey_title_btn_min'" @click="onClickoOverview(1)">钢筋原材料</div>
|
|
</div>
|
|
<div class="amplify-survey_title_btn" >
|
|
<div :class="overview==2?'amplify-survey_title_btn_min active':'amplify-survey_title_btn_min'" @click="onClickoOverview(2)">钢筋试垃件</div>
|
|
</div>
|
|
<div class="amplify-survey_title_btn" >
|
|
<div :class="overview==3?'amplify-survey_title_btn_min active':'amplify-survey_title_btn_min'" @click="onClickoOverview(3)">混凝土试件</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="amplify-czz-number">
|
|
<div class="amplify-czz-number-content">
|
|
<div class="amplify-czz-number-img czz-number-img-blue">
|
|
<img src="/images/circle_icon_1.png">
|
|
</div>
|
|
<div class="amplify-survey_content_number">
|
|
<p>取样复试次数</p>
|
|
<div class="amplify-survey_content_value"><span v-cloak>{{qyfsTotal}}</span> 组</div>
|
|
</div>
|
|
</div>
|
|
<div class="amplify-czz-number-content" @click="getCertInfoList(2)">
|
|
<div class="amplify-czz-number-img czz-number-img-green">
|
|
<img src="/images/circle_icon_24.png">
|
|
</div>
|
|
<div class="amplify-survey_content_number">
|
|
<p>合格率</p>
|
|
<div class="amplify-survey_content_value amplify-survey_content_value_color_green"><span v-cloak>{{qyfsHgl}}</span> %</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
</div>
|
|
`,
|
|
props: {
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
show:false,
|
|
//取样送检
|
|
outputValueNavQysj:1,
|
|
overview:1,
|
|
qyfsTotal:0,
|
|
qyfsHgl:0,
|
|
startDate:"",
|
|
endDate:'',
|
|
}
|
|
},
|
|
mounted(){
|
|
|
|
},
|
|
methods: {
|
|
openAmplify(){
|
|
this.show = true
|
|
this.getStartDate()
|
|
this.getEndDate()
|
|
this.qysjStatisticalData()
|
|
},
|
|
closeAmplify(){
|
|
this.show = false
|
|
},
|
|
closeAmplifyAll(e){
|
|
if(e.target.className == 'amplify-fixed'){
|
|
this.show = false
|
|
}
|
|
},
|
|
|
|
|
|
//取样送检
|
|
onClickoOverview(n){
|
|
this.overview = n
|
|
this.qysjStatisticalData();
|
|
},
|
|
|
|
//取样送检
|
|
onClickOutputValueNavQysj(n){
|
|
console.log('@@@@@',n)
|
|
this.outputValueNavQysj = n
|
|
this.qysjStatisticalData();
|
|
},
|
|
|
|
getStartDate(){
|
|
var data = new Date();
|
|
var year = data.getFullYear();
|
|
var month = (data.getMonth()+1) > 9? (data.getMonth()+1):'0'+(data.getMonth()+1)
|
|
this.startDate = year+"-"+month+"-01";
|
|
},
|
|
getEndDate(){
|
|
var date = new Date();
|
|
var year = date.getFullYear();
|
|
var month = (date.getMonth()+1) > 9 ? (date.getMonth()+1):'0'+(date.getMonth()+1)
|
|
var day = date.getDate() > 9 ? date.getDate():'0'+date.getDate()
|
|
this.endDate = year+"-"+month+"-"+day;
|
|
},
|
|
|
|
qysjStatisticalData() {
|
|
var outputValueNavQysj = this.outputValueNavQysj;
|
|
var overview = this.overview;
|
|
var data = {};
|
|
if(outputValueNavQysj == 1){//本月
|
|
data = {
|
|
"dept_id":"131",
|
|
"startDate":this.startDate,
|
|
"endDate":this.endDate,
|
|
"type":overview
|
|
}
|
|
}else{//开累
|
|
data = {
|
|
"dept_id":"131",
|
|
"type":overview
|
|
}
|
|
}
|
|
axios({
|
|
method: 'post',
|
|
url: "/api/qualityManagemen/qysjStatisticalData",
|
|
data: data
|
|
}).then(res => {
|
|
console.log(res)
|
|
if(res.data.code == 200){
|
|
this.qyfsTotal = res.data.data.total;
|
|
this.qyfsHgl = res.data.data.hgl;
|
|
}
|
|
}).catch(err => {
|
|
|
|
})
|
|
},
|
|
|
|
},
|
|
watch:{
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|