update code
parent
88a1861846
commit
c41fc51d34
|
@ -18,41 +18,29 @@
|
|||
<div class="survey-oil-title">
|
||||
<div class="survey-oil-hr"></div>
|
||||
<div class="survey-oil-text">预警类型</div>
|
||||
<div
|
||||
class="survey-oil-summary"
|
||||
style="
|
||||
<div class="survey-oil-summary" style="
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 8px;
|
||||
font-size: 15px;
|
||||
padding: 0 15px;
|
||||
background: #000b25;
|
||||
"
|
||||
>
|
||||
<span style="font-weight: 800; color: red">未完成</span>/<span
|
||||
style="color: #c0dafb"
|
||||
>总数</span
|
||||
>
|
||||
">
|
||||
<span style="font-weight: 800; color: red">未完成</span>/<span style="color: #c0dafb">总数</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="analyse-number-max" id="afootOverflowType" style="height: unset">
|
||||
<div
|
||||
class="glr-login-number-max analyse-num-max"
|
||||
v-for="(item, idx) in warningType"
|
||||
v-if="type != 'detail' || (type == 'detail' && item.name != '劳资预警')"
|
||||
style="height: unset"
|
||||
:key="idx"
|
||||
>
|
||||
<div class="glr-login-number-max analyse-num-max" v-for="(item, idx) in warningType" @click="doShowDetail(item)"
|
||||
v-if="type != 'detail' || (type == 'detail' && item.name != '劳资预警')" style="height: unset;cursor: pointer;" :key="idx">
|
||||
<div class="glr-login-number-bgd glr-login-number-red-bgd"></div>
|
||||
<div class="glr-login-number analyse-login-numbe">
|
||||
<div class="glr-login-number analyse-login-numbe" >
|
||||
<div><img src="images/text_red_spot.png" />{{ item.name }}</div>
|
||||
<div class="glr-rate-value glr-rate-red-value">
|
||||
<template v-if="idx == 0">
|
||||
<span style="color: #c0dafb">{{ item.total }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>{{ item.data }}</span
|
||||
>/
|
||||
<template v-else>
|
||||
<span>{{ item.data }}</span>/
|
||||
<span style="color: #c0dafb">{{ item.total }}</span>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -60,12 +48,17 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<flowLabourDlg ref="flowLabourDlg"></flowLabourDlg>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import flowLabourDlg from "../dlg/flowLabourDlg";
|
||||
export default {
|
||||
name: "JhbigscreenMonitAndWarning",
|
||||
components: {
|
||||
flowLabourDlg,
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
|
@ -124,6 +117,11 @@ export default {
|
|||
this.initMe();
|
||||
},
|
||||
methods: {
|
||||
doShowDetail(item){
|
||||
if(item.name == '劳资预警'){
|
||||
this.$refs.flowLabourDlg.showDialog(this.prjInfo);
|
||||
}
|
||||
},
|
||||
initMe() {
|
||||
this.prjInfo = this.$root.project || {};
|
||||
this.deptInfo = this.$root.dept || {};
|
||||
|
|
|
@ -476,29 +476,7 @@ export default {
|
|||
if (this.prj.id == 0) {
|
||||
this.prjInfo = this.prjs[1];
|
||||
}
|
||||
}));
|
||||
this.$bus.$on("projectChange", debounce(res => {
|
||||
if (res.id == 0) {
|
||||
const func = () => {
|
||||
if (this.prjs && this.prjs.length > 1) {
|
||||
this.prjInfo = this.prjs[1];
|
||||
} else {
|
||||
setTimeout(func, 100);
|
||||
}
|
||||
}
|
||||
func();
|
||||
} else {
|
||||
this.prjInfo = res;
|
||||
}
|
||||
this.prj = res;
|
||||
this.investmentAmountData1[0].value = "" + res.paidAmount * 1.0;
|
||||
this.investmentAmountData2[0].value = "" + res.onAccountAmount * 1.0;
|
||||
this.elKey++;
|
||||
this.onWarningInfoNav(0);
|
||||
this.sumCostOutByDeptId();
|
||||
this.groupByProjectCategory(this.deptInfo.id);
|
||||
|
||||
}));
|
||||
}));
|
||||
this.$bus.$on("deptChange", debounce(dept => {
|
||||
this.deptInfo = dept;
|
||||
this.groupByProjectCategory(dept.id);
|
||||
|
@ -529,7 +507,7 @@ export default {
|
|||
doShowAttendanceDetail(){
|
||||
let data={
|
||||
deptId:this.deptInfo.id||0,
|
||||
projectId:this.prj.id||0,
|
||||
projectId:0,
|
||||
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
||||
}
|
||||
if(this.infoNav == 2){
|
||||
|
@ -553,7 +531,7 @@ export default {
|
|||
let data={
|
||||
id:this.infoNav,
|
||||
subDeptId:this.deptInfo.id||0,
|
||||
projectId:this.prj.id||0,
|
||||
projectId:0,
|
||||
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
||||
}
|
||||
let ajax=this.$api.attendance.groupByComany
|
||||
|
@ -606,13 +584,8 @@ export default {
|
|||
postData.month=12
|
||||
}else{
|
||||
postData.month--;
|
||||
}
|
||||
|
||||
if (this.prj && this.prj.id > 0) {
|
||||
postData.projectId = this.prj.id;
|
||||
} else {
|
||||
postData.id = this.deptInfo.id;
|
||||
}
|
||||
}
|
||||
postData.id = this.deptInfo.id;
|
||||
this.$api.costOut.sumByDeptId(postData).then(d => {
|
||||
this.sumCost = d;
|
||||
});
|
||||
|
|
|
@ -954,7 +954,14 @@ export default {
|
|||
* 劳资预警详情弹窗
|
||||
*/
|
||||
doFlowLabourDlg() {
|
||||
this.$refs.flowLabourDlg.showDialog(this.project);
|
||||
if(this.project.id==0){
|
||||
if(this.prjs.length>1){
|
||||
this.$refs.flowLabourDlg.showDialog(this.prjs[1]);
|
||||
}
|
||||
}else{
|
||||
this.$refs.flowLabourDlg.showDialog(this.project);
|
||||
}
|
||||
|
||||
},
|
||||
getFloorArea() {
|
||||
this.getProjectId((id) => {
|
||||
|
|
Loading…
Reference in New Issue