update code
parent
6792e98194
commit
88193c6f0d
|
@ -7,27 +7,46 @@
|
||||||
<div class="head-title-tab">
|
<div class="head-title-tab">
|
||||||
<div v-if="!isTypeBuser" :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="pageJump(1, '#/')">项目概况
|
<div v-if="!isTypeBuser" :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="pageJump(1, '#/')">项目概况
|
||||||
</div>
|
</div>
|
||||||
<div :class="(nav >=20 && nav <30) || nav==2? 'head-nav active' : 'head-nav'" style="position: relative;"
|
<div :class="(nav >= 20 && nav < 40) || nav == 2 ? 'head-nav active' : 'head-nav'" style="position: relative;"
|
||||||
class="has-submenu">
|
class="has-submenu">
|
||||||
<div @click="pageJump(2, '#/detail')">项目详情</div>
|
<div @click="pageJump(2, '#/detail')">项目详情</div>
|
||||||
<div class="header-btn-list">
|
<div class="header-btn-list" v-if="!isTypeBuser">
|
||||||
<div class="header-btn-list-arrow"></div>
|
<div class="header-btn-list-arrow"></div>
|
||||||
<div class="header-btn-list-item" style="">
|
<div class="header-btn-list-item" style="">
|
||||||
<div class="header-btn-list-padding" style="text-align: left;">
|
<div class="header-btn-list-padding menu-row1" style="text-align: left;">
|
||||||
<button type="button" :class="nav == 21 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 21 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(21, '#/towerCrane')">塔吊监控</button>
|
@click="pageJump(21, '#/prjSafety')">安全管理</button>
|
||||||
<button type="button" :class="nav == 22 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 22 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(22, '#/excavation')">基坑监控</button>
|
@click="pageJump(22, '#/prjQuality')">质量管理</button>
|
||||||
<button type="button" :class="nav == 23 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 23 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(23, '#/distributionBox')">配电箱监控</button>
|
@click="pageJump(23, '#/prjProgress')">进度管理</button>
|
||||||
<button type="button" :class="nav == 24 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 24 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(24, '#/dumbwaiter')">升降机监控</button> <br/>
|
@click="pageJump(24, '#/prjEngin')">工程管理</button>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style="color:rgb(1, 169, 255);margin:0px 12px;text-align: left;border-bottom: dotted 1px #cccccc88;font-weight: bold;line-height:30px;">
|
||||||
|
监测监控</div>
|
||||||
|
<div class="header-btn-list-padding menu-row2" style="text-align: left;">
|
||||||
<button type="button" :class="nav == 25 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 25 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(25, '#/personnelPosition')">人员定位</button>
|
@click="pageJump(25, '#/prjVideo')">视频监控</button>
|
||||||
<button type="button" :class="nav == 26 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 26 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(26, '#/standardCuringRoom')">标养室检测</button>
|
@click="pageJump(26, '#/prjAiVideo')">AI识别监控</button>
|
||||||
<button type="button" :class="nav == 27 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 27 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(27, '#/concreteStrength')">混泥土强度检测</button>
|
@click="pageJump(27, '#/prjPhotography')">项目全景</button>
|
||||||
|
<button type="button" :class="nav == 28 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(28, '#/towerCrane')">塔吊监控</button><br />
|
||||||
|
<button type="button" :class="nav == 29 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(29, '#/excavation')">基坑监控</button>
|
||||||
|
<button type="button" :class="nav == 30 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(30, '#/distributionBox')">配电箱监控</button>
|
||||||
|
<button type="button" :class="nav == 31 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(31, '#/dumbwaiter')">升降机监控</button>
|
||||||
|
<button type="button" :class="nav == 32 ? 'active' : ''" class="sub-btn" style="display: none;"
|
||||||
|
@click="pageJump(32, '#/personnelPosition')">人员定位</button><br />
|
||||||
|
<button type="button" :class="nav == 33 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(33, '#/standardCuringRoom')">标养室检测</button>
|
||||||
|
<button type="button" :class="nav == 34 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(34, '#/concreteStrength')">混泥土强度检测</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,26 +54,42 @@
|
||||||
<div :class="nav == 3 ? 'head-nav active' : 'head-nav'" @click="pageJump(3, '#/safety')">安全管理</div>
|
<div :class="nav == 3 ? 'head-nav active' : 'head-nav'" @click="pageJump(3, '#/safety')">安全管理</div>
|
||||||
<div :class="nav == 4 ? 'head-nav active' : 'head-nav'" @click="pageJump(4, '#/quality')">质量管理</div>
|
<div :class="nav == 4 ? 'head-nav active' : 'head-nav'" @click="pageJump(4, '#/quality')">质量管理</div>
|
||||||
<div :class="nav == 5 ? 'head-nav active' : 'head-nav'" @click="pageJump(5, '#/progress')">进度管理</div>
|
<div :class="nav == 5 ? 'head-nav active' : 'head-nav'" @click="pageJump(5, '#/progress')">进度管理</div>
|
||||||
<div :class="nav == 61 || nav == 62 || nav==63 ? 'head-nav active' : 'head-nav'" style="position: relative;"
|
<div :class="nav>=60 && nav <=69 ? 'head-nav active' : 'head-nav'" style="position: relative;"
|
||||||
class="has-submenu">
|
class="has-submenu">
|
||||||
<div>视频管理</div>
|
<div>监测监控</div>
|
||||||
<div class="header-btn-list">
|
<div class="header-btn-list">
|
||||||
<div class="header-btn-list-arrow"></div>
|
<div class="header-btn-list-arrow"></div>
|
||||||
<div class="header-btn-list-item" style="">
|
<div class="header-btn-list-item" style="">
|
||||||
<div class="header-btn-list-padding">
|
<div class="header-btn-list-padding" style="text-align: left;">
|
||||||
|
<button type="button" :class="nav == 60 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(60, '#/video')">视频监控</button>
|
||||||
<button type="button" :class="nav == 61 ? 'active' : ''" class="sub-btn"
|
<button type="button" :class="nav == 61 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(61, '#/video')">视频监控</button>
|
@click="pageJump(61, '#/aiVideo')">AI识别监控</button>
|
||||||
<button type="button" :class="nav == 62 ? 'active' : ''" class="sub-btn"
|
<button v-if="1 == 1" type="button" :class="nav == 62 ? 'active' : ''" class="sub-btn"
|
||||||
@click="pageJump(62, '#/aiVideo')">AI识别监控</button>
|
@click="pageJump(62, '#/photography')">项目全景</button>
|
||||||
<button v-if="1==1" type="button" :class="nav == 63 ? 'active' : ''" class="sub-btn"
|
<template v-if="isTypeBuser">
|
||||||
@click="pageJump(63, '#/photography')">项目全景</button>
|
<button type="button" :class="nav == 63 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(63, '#/videoTowerCrane')">塔吊监控</button><br />
|
||||||
|
<button type="button" :class="nav == 64 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(64, '#/videoExcavation')">基坑监控</button>
|
||||||
|
<button type="button" :class="nav == 65 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(65, '#/videoDistributionBox')">配电箱监控</button>
|
||||||
|
<button type="button" :class="nav == 66 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(66, '#/videoDumbwaiter')">升降机监控</button>
|
||||||
|
<button type="button" :class="nav == 67 ? 'active' : ''" class="sub-btn" style="display: none;"
|
||||||
|
@click="pageJump(67, '#/videoPersonnelPosition')">人员定位</button><br />
|
||||||
|
<button type="button" :class="nav == 68 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(68, '#/videoStandardCuringRoom')">标养室检测</button>
|
||||||
|
<button type="button" :class="nav == 69 ? 'active' : ''" class="sub-btn"
|
||||||
|
@click="pageJump(69, '#/videoConcreteStrength')">混泥土强度检测</button>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!isTypeBuser" :class="(nav >=70 && nav <80) || nav==7? 'head-nav active' : 'head-nav'" style="position: relative;"
|
<div v-if="!isTypeBuser" :class="(nav >= 70 && nav < 80) || nav == 7 ? 'head-nav active' : 'head-nav'"
|
||||||
class="has-submenu">
|
style="position: relative;" class="has-submenu">
|
||||||
<div @click="pageJump(7, '#/engin')">工程管理</div>
|
<div @click="pageJump(7, '#/engin')">工程管理</div>
|
||||||
<div class="header-btn-list">
|
<div class="header-btn-list">
|
||||||
<div class="header-btn-list-arrow"></div>
|
<div class="header-btn-list-arrow"></div>
|
||||||
|
@ -88,7 +123,8 @@
|
||||||
</div>
|
</div>
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<ul class="header-screen-ul" v-show="showSel3">
|
<ul class="header-screen-ul" v-show="showSel3">
|
||||||
<li v-for="item in proTypeList" @click="setScreenLiSel3(item)" :title="item.text">{{ item.text }}</li>
|
<li v-for="item in proTypeList" @click="setScreenLiSel3(item)" :title="item.text">{{ item.text }}
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</div>
|
</div>
|
||||||
|
@ -184,6 +220,8 @@ export default {
|
||||||
condCode: '',
|
condCode: '',
|
||||||
proTypeList: [],
|
proTypeList: [],
|
||||||
proType: '',
|
proType: '',
|
||||||
|
allProjects:[],
|
||||||
|
projects:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -214,7 +252,6 @@ export default {
|
||||||
async mounted() {
|
async mounted() {
|
||||||
window.headerApp = this
|
window.headerApp = this
|
||||||
await this.initMe();
|
await this.initMe();
|
||||||
this.getWeather();
|
|
||||||
this.nav = this.$route.meta?.nav || 1
|
this.nav = this.$route.meta?.nav || 1
|
||||||
this.setTitle();
|
this.setTitle();
|
||||||
this.timerID = setInterval(this.updateTime, 1000);
|
this.timerID = setInterval(this.updateTime, 1000);
|
||||||
|
@ -226,19 +263,16 @@ export default {
|
||||||
if (this.$route.name == "index") {
|
if (this.$route.name == "index") {
|
||||||
this.$router.push("/detail");
|
this.$router.push("/detail");
|
||||||
}
|
}
|
||||||
this.$api.project.findProjectByDept(-1).then(d => {
|
this.loadInitData(-1,()=>{
|
||||||
let objs = (d?.data || []).map(it => {
|
let objs=this.projects;
|
||||||
it.text = it.projectName;
|
|
||||||
return it;
|
|
||||||
}).filter(it => +it.progressVisible == 0);
|
|
||||||
this.data = [{ id: 0, text: '所有项目' }, ...objs];
|
this.data = [{ id: 0, text: '所有项目' }, ...objs];
|
||||||
let dept = { id: 0, text: '' };
|
let dept = { id: 0, text: '' };
|
||||||
this.$root.dept = dept;
|
this.$root.dept = dept;
|
||||||
this.$root.hasInitHeader = true;
|
this.$root.hasInitHeader = true;
|
||||||
this.$bus.$emit("deptChange", dept)
|
//this.$bus.$emit("deptChange", dept)
|
||||||
this.$root._prjIds = objs.map(it => it.id);
|
this.$root._prjIds = objs.map(it => it.id);
|
||||||
Cookies.set("__ids__", objs.map(it => it.id).join(","));
|
Cookies.set("__ids__", objs.map(it => it.id).join(","));
|
||||||
this.$bus.$emit("loadProjects", this.data);
|
//this.$bus.$emit("loadProjects", this.data);
|
||||||
this.$root.projects = this.data;
|
this.$root.projects = this.data;
|
||||||
if (this.data.length > 0) {
|
if (this.data.length > 0) {
|
||||||
this.setScreenLiSel2(this.data[0], true);
|
this.setScreenLiSel2(this.data[0], true);
|
||||||
|
@ -248,6 +282,7 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.isTypeBuser = false;
|
this.isTypeBuser = false;
|
||||||
|
this.loadInitData(0,()=>{
|
||||||
this.$api.dept.list().then(d => {
|
this.$api.dept.list().then(d => {
|
||||||
this.$root.hasInitHeader = true;
|
this.$root.hasInitHeader = true;
|
||||||
if (roleId < 4) {
|
if (roleId < 4) {
|
||||||
|
@ -263,14 +298,37 @@ export default {
|
||||||
return it;
|
return it;
|
||||||
})]
|
})]
|
||||||
}
|
}
|
||||||
this.setScreenLiSel1(this.localStorage1);
|
this.setScreenLiSel1(this.localStorage1,true);
|
||||||
this.deptChange();
|
this.checkIsDetailSubPage();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$root.isTypeBuser = this.isTypeBuser;
|
this.$root.isTypeBuser = this.isTypeBuser;
|
||||||
this.init();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
checkIsDetailSubPage(){
|
||||||
|
let name=this.$route.name;
|
||||||
|
if(["prjSafety","prjQuality","prjProgress","prjEngin","prjVideo","prjAiVideo","prjPhotography"
|
||||||
|
,"towerCrane","excavation","distributionBox","dumbwaiter","personnelPosition","standardCuringRoom","concreteStrength"
|
||||||
|
].includes(name)){
|
||||||
|
if(this.localStorage2.id==0 && this.projects.length>1){
|
||||||
|
this.setScreenLiSel2(this.projects[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
loadInitData(deptId, cb) {
|
||||||
|
localStorage.setItem("proType", 0);
|
||||||
|
this.$api.project.findProjectByDept(deptId).then(d => {
|
||||||
|
if (cb) {
|
||||||
|
this.projects = (d.data || []).map(it => {
|
||||||
|
it.text = it.projectName;
|
||||||
|
return it;
|
||||||
|
}).filter(it => +it.progressVisible == 0);
|
||||||
|
this.allProjects=this.projects;
|
||||||
|
cb();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
initMe() {
|
initMe() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
let func = () => {
|
let func = () => {
|
||||||
|
@ -345,15 +403,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deptChange(cb) {
|
deptChange(cb) {
|
||||||
if(!this.dept1){
|
|
||||||
if(this.depts.length>0){
|
|
||||||
this.dept1=this.depts[0].text;
|
|
||||||
this.loadProject(true,cb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let tmps = this.depts.filter(d => d.text == this.dept1);
|
let tmps = this.depts.filter(d => d.text == this.dept1);
|
||||||
if (tmps.length > 0) {
|
if (tmps.length > 0) {
|
||||||
this.$bus.$emit("deptChange", tmps[0])
|
|
||||||
this.$root.dept = tmps[0];
|
this.$root.dept = tmps[0];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -370,6 +421,9 @@ export default {
|
||||||
pageJump(n, url) {
|
pageJump(n, url) {
|
||||||
this.nav = n;
|
this.nav = n;
|
||||||
this.setTitle();
|
this.setTitle();
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.checkIsDetailSubPage();
|
||||||
|
},400);
|
||||||
if (url) {
|
if (url) {
|
||||||
location.href = url
|
location.href = url
|
||||||
} else {
|
} else {
|
||||||
|
@ -405,29 +459,43 @@ export default {
|
||||||
localStorage.setItem("proType", item.value);
|
localStorage.setItem("proType", item.value);
|
||||||
this.proType = item.text;
|
this.proType = item.text;
|
||||||
this.showSel3 = false;
|
this.showSel3 = false;
|
||||||
this.deptChange();
|
|
||||||
this.loadProject();
|
this.loadProject();
|
||||||
|
this.$bus.$emit("projectChange",this.localStorage2);
|
||||||
},
|
},
|
||||||
setScreenLiSel1(item) {
|
setScreenLiSel1(item,init) {
|
||||||
localStorage.setItem("data1", JSON.stringify(item))
|
localStorage.setItem("data1", JSON.stringify(item))
|
||||||
this.localStorage1 = JSON.parse(localStorage.getItem("data1"))
|
this.localStorage1 = JSON.parse(localStorage.getItem("data1"))
|
||||||
this.$emit('itemdata', item);
|
//this.$emit('itemdata', item);
|
||||||
this.showSel1 = false
|
this.showSel1 = false
|
||||||
this.dept1 = item.text;
|
this.dept1 = item.text;
|
||||||
|
if(!init){
|
||||||
|
localStorage.setItem("proType", 0);
|
||||||
|
this.proType = "全部";
|
||||||
|
}
|
||||||
this.deptChange();
|
this.deptChange();
|
||||||
this.loadProject();
|
this.loadProject();
|
||||||
|
this.$bus.$emit("projectChange",this.localStorage2);
|
||||||
},
|
},
|
||||||
loadProject(init, cb) {
|
loadProject(init, cb) {
|
||||||
if (this.isTypeBuser) {
|
if (this.isTypeBuser) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$api.project.findProjectByDept(this.localStorage1.id).then(d => {
|
let objs = this.projects||[];
|
||||||
let objs = (d?.data || []).map(it => {
|
|
||||||
it.text = it.projectName;
|
objs=objs.filter(it=>{
|
||||||
return it;
|
let b1=true;
|
||||||
}).filter(it => +it.progressVisible == 0);
|
if(this.localStorage1.id>0){
|
||||||
|
b1=it.deptId==this.localStorage1.id;
|
||||||
|
}
|
||||||
|
let b2=true;
|
||||||
|
let type = +localStorage.getItem("proType");
|
||||||
|
if(type!=0){
|
||||||
|
b2=it.projectType==type;
|
||||||
|
}
|
||||||
|
return b1 && b2;
|
||||||
|
});
|
||||||
|
|
||||||
this.data = [{ id: 0, text: '所有项目' }, ...objs];
|
this.data = [{ id: 0, text: '所有项目' }, ...objs];
|
||||||
this.$bus.$emit("loadProjects", this.data);
|
|
||||||
this.$root.projects = this.data;
|
this.$root.projects = this.data;
|
||||||
if (this.data.find(it => it.id == this.localStorage2.id)) {
|
if (this.data.find(it => it.id == this.localStorage2.id)) {
|
||||||
this.setScreenLiSel2(this.localStorage2)
|
this.setScreenLiSel2(this.localStorage2)
|
||||||
|
@ -441,7 +509,6 @@ export default {
|
||||||
if (cb) {
|
if (cb) {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
setScreenLiSel2(item, init) {
|
setScreenLiSel2(item, init) {
|
||||||
if (item) {
|
if (item) {
|
||||||
|
@ -449,17 +516,18 @@ export default {
|
||||||
if (!init || !this.dept2) {
|
if (!init || !this.dept2) {
|
||||||
localStorage.setItem("data2", JSON.stringify(item))
|
localStorage.setItem("data2", JSON.stringify(item))
|
||||||
this.localStorage2 = JSON.parse(localStorage.getItem("data2"))
|
this.localStorage2 = JSON.parse(localStorage.getItem("data2"))
|
||||||
this.$emit('itemdata', item);
|
//this.$emit('itemdata', item);
|
||||||
this.dept2 = item.text;
|
this.dept2 = item.text;
|
||||||
}
|
}
|
||||||
this.$root.project = this.localStorage2;
|
this.$root.project = this.localStorage2;
|
||||||
this.$bus.$emit("projectChange", this.localStorage2);
|
//this.$bus.$emit("projectChange", this.localStorage2);
|
||||||
} else {
|
} else {
|
||||||
localStorage.removeItem("data2");
|
localStorage.removeItem("data2");
|
||||||
this.localStorage2 = {};
|
this.localStorage2 = {};
|
||||||
this.showSel2 = false;
|
this.showSel2 = false;
|
||||||
this.dept2 = '';
|
this.dept2 = '';
|
||||||
}
|
}
|
||||||
|
this.$bus.$emit("projectChange",this.localStorage2);
|
||||||
},
|
},
|
||||||
|
|
||||||
//时间方法
|
//时间方法
|
||||||
|
@ -484,6 +552,7 @@ export default {
|
||||||
.head-title {
|
.head-title {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-header {
|
.main-header {
|
||||||
.head-title-tab {
|
.head-title-tab {
|
||||||
.has-submenu {
|
.has-submenu {
|
||||||
|
@ -497,21 +566,52 @@ export default {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
.header-btn-list-item {
|
.header-btn-list-item {
|
||||||
|
.header-btn-list-padding {
|
||||||
|
padding: 8px;
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.menu-row2 {
|
||||||
.sub-btn {
|
.sub-btn {
|
||||||
&.active {
|
color: #fff;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.menu-row1 {
|
||||||
|
.sub-btn {
|
||||||
|
color: rgb(1, 169, 255);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-btn {
|
||||||
|
&.active {
|
||||||
|
color: #ffffffaa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-select1 {
|
.title-select1 {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-select3 {
|
.title-select3 {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
|
@ -99,16 +99,11 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on("projectChange", (res) => {
|
this.$bus.$on("projectChange", (res) => {
|
||||||
this.prjInfo = res;
|
this.prjInfo = res;
|
||||||
|
this.deptInfo = this.$root.dept ||this.deptInfo|| {};
|
||||||
if (this.deptInfo.text) {
|
if (this.deptInfo.text) {
|
||||||
this.getMonitAndWarning();
|
this.getMonitAndWarning();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$bus.$on("deptChange", (dept) => {
|
|
||||||
this.deptInfo = dept;
|
|
||||||
if (this.prjInfo.id) {
|
|
||||||
this.getMonitAndWarning();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (this.$root.hasInitHeader) {
|
if (this.$root.hasInitHeader) {
|
||||||
this.initMe();
|
this.initMe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,15 +255,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on("loadProjects", debounce(prjs => {
|
|
||||||
this.prjs = prjs;
|
|
||||||
}));
|
|
||||||
this.$bus.$on("projectChange", debounce(res => {
|
this.$bus.$on("projectChange", debounce(res => {
|
||||||
this.project = res;
|
this.project = res;
|
||||||
this.loadData();
|
this.dept = this.$root.dept ||this.dept|| {};
|
||||||
}));
|
this.prjs = this.$root.projects || this.prjs||[];
|
||||||
this.$bus.$on("deptChange", debounce(dept => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}));
|
}));
|
||||||
if (this.$root.hasInitHeader) {
|
if (this.$root.hasInitHeader) {
|
||||||
|
|
|
@ -471,15 +471,14 @@ export default {
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
});
|
});
|
||||||
this.$bus.$on("loadProjects", debounce(prjs => {
|
this.$bus.$on("projectChange", debounce(res => {
|
||||||
this.prjs = prjs;
|
this.deptInfo = this.$root.dept||this.deptInfo;
|
||||||
|
this.prj=res||this.$root.project;
|
||||||
|
this.prjs=this.$root.projects||this.prjs||[];
|
||||||
if (this.prj.id == 0) {
|
if (this.prj.id == 0) {
|
||||||
this.prjInfo = this.prjs[1];
|
this.prjInfo = this.prjs[1];
|
||||||
}
|
}
|
||||||
}));
|
this.groupByProjectCategory(this.deptInfo.id);
|
||||||
this.$bus.$on("deptChange", debounce(dept => {
|
|
||||||
this.deptInfo = dept;
|
|
||||||
this.groupByProjectCategory(dept.id);
|
|
||||||
this.onClickoOverview(0)
|
this.onClickoOverview(0)
|
||||||
this.qualityNavClick(0);
|
this.qualityNavClick(0);
|
||||||
this.onWarningInfoNav(0);
|
this.onWarningInfoNav(0);
|
||||||
|
|
|
@ -66,12 +66,9 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on("deptChange", debounce(dept => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.loadData();
|
|
||||||
}));
|
|
||||||
this.$bus.$on("projectChange", debounce(res => {
|
this.$bus.$on("projectChange", debounce(res => {
|
||||||
this.prj = res;
|
this.prj = res;
|
||||||
|
this.dept=this.$root.dept||this.dept||{};
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}));
|
}));
|
||||||
this.info = this.scheduleInfo || {};
|
this.info = this.scheduleInfo || {};
|
||||||
|
|
|
@ -915,18 +915,12 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.xapp = this;
|
|
||||||
this.$bus.$on(
|
|
||||||
"loadProjects",
|
|
||||||
debounce((prjs) => {
|
|
||||||
this.prjs = prjs;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
this.$bus.$on(
|
this.$bus.$on(
|
||||||
"projectChange",
|
"projectChange",
|
||||||
debounce((res) => {
|
debounce((res) => {
|
||||||
this.project = res;
|
this.project = res||this.$root.project;
|
||||||
|
this.dept=this.$root.dept||this.dept;
|
||||||
|
this.prjs= this.$root.projects||this.prjs;
|
||||||
this.mapName = "";
|
this.mapName = "";
|
||||||
if (res.id == 0) {
|
if (res.id == 0) {
|
||||||
if (this.prjs.length > 1) {
|
if (this.prjs.length > 1) {
|
||||||
|
@ -939,12 +933,6 @@ export default {
|
||||||
this.loadFilshNode();
|
this.loadFilshNode();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
this.$bus.$on(
|
|
||||||
"deptChange",
|
|
||||||
debounce((dept) => {
|
|
||||||
this.dept = dept;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
if (this.$root.hasInitHeader) {
|
if (this.$root.hasInitHeader) {
|
||||||
this.initMe();
|
this.initMe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,305 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="project-engin-index">
|
|
||||||
<div class="screen-content">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<module-one-1-1 label="现场管理标准化" style="position: relative;">
|
|
||||||
<imageItem :images="list1" v-if="list1.length>0 && !loading"></imageItem>
|
|
||||||
<div v-if="list1.length==0 && !loading" style="text-align: center;margin-top: 40px;">
|
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
|
||||||
<div style="text-align: center;">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
</module-one-1-1>
|
|
||||||
<module-one-1-1 label="作业标准" style="position: relative;">
|
|
||||||
<imageItem :images="list2" v-if="list2.length>0 && !loading"></imageItem>
|
|
||||||
<div v-if="list2.length==0 && !loading" style="text-align: center;margin-top: 40px;">
|
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
|
||||||
<div style="text-align: center;">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
</module-one-1-1>
|
|
||||||
<module-one-1-1 label="安全技术标准" style="position: relative;">
|
|
||||||
<imageItem :images="list3" v-if="list3.length>0 && !loading"></imageItem>
|
|
||||||
<div v-if="list3.length==0 && !loading" style="text-align: center;margin-top: 40px;">
|
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
|
||||||
<div style="text-align: center;">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
</module-one-1-1>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<module-one-1-1 label="审批进度" :border="1" style="position: relative;">
|
|
||||||
<img src="images/icon2001.png" style="position: absolute;cursor: pointer;right: 20px;top: 32px;z-index: 9;" @click="doStateDlg">
|
|
||||||
<chart-bar :height="280" :optData="chart1Data" :fn="changeChart1" :key="elChart2"></chart-bar>
|
|
||||||
</module-one-1-1>
|
|
||||||
<module-one-1-1 label="待审批" :border="1" class="chart2" style="position: relative;">
|
|
||||||
<img src="images/icon2001.png" style="position: absolute;cursor: pointer;right: 20px;top: 32px;z-index:9;" @click="doUnitDlg">
|
|
||||||
<project-overview-chart :key="elChart2" :fn="changeChart2" :sp="'\n'" :maintitle="flowTotal" :legend-opt="legendOpt2"
|
|
||||||
:typedata="chart2Data" :text="flowTitle" :height="280"
|
|
||||||
txtTop="52" gifTop="90px" style="top:0px"></project-overview-chart>
|
|
||||||
</module-one-1-1>
|
|
||||||
<module-one-1-1 label="集团期刊" style="position: relative;">
|
|
||||||
<imageItem :images="periodicalList" v-if="periodicalList.length>0 && !loading" mode="periodical"></imageItem>
|
|
||||||
<div v-if="periodicalList.length==0 && !loading" style="text-align: center;margin-top: 40px;">
|
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
|
||||||
<div style="text-align: center;">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
</module-one-1-1>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<module-one-1-1 label="设备管理标准" style="position: relative;">
|
|
||||||
<imageItem :images="list4" v-if="list4.length>0 && !loading"></imageItem>
|
|
||||||
<div v-if="list4.length==0 && !loading" style="text-align: center;margin-top: 40px;">
|
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
|
||||||
<div style="text-align: center;">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
</module-one-1-1>
|
|
||||||
<module-one-1-1 label="文明施工标准" style="position: relative;">
|
|
||||||
<imageItem :images="list5" v-if="list5.length>0 && !loading"></imageItem>
|
|
||||||
<div v-if="list5.length==0 && !loading" style="text-align: center;margin-top: 40px;">
|
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
|
||||||
<div style="text-align: center;">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
</module-one-1-1>
|
|
||||||
<module-one-1-1 label="环境保护标准" style="position: relative;">
|
|
||||||
<imageItem :images="list6" v-if="list6.length>0 && !loading"></imageItem>
|
|
||||||
<div v-if="list6.length==0 && !loading" style="text-align: center;margin-top: 40px;">
|
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
|
||||||
<div style="text-align: center;">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
</module-one-1-1>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<unitDialog ref="unitDlg"></unitDialog>
|
|
||||||
<stateDialog ref="stateDlg"></stateDialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import '../components/module/module-one-1-2'
|
|
||||||
import '../components/staff-survey-chart'
|
|
||||||
import '../components/chart-bar'
|
|
||||||
import BorderBox6 from './components/BorderBox6.vue'
|
|
||||||
import debounce from 'lodash.debounce'
|
|
||||||
import imageItem from './engin/enginImageItems.vue'
|
|
||||||
import unitDialog from './engin/flowDetailByUnitDialog.vue'
|
|
||||||
import stateDialog from './engin/flowDetailByStateDialog.vue'
|
|
||||||
export default {
|
|
||||||
name: 'JhbigscreenProjectEngin',
|
|
||||||
components: {
|
|
||||||
BorderBox6,
|
|
||||||
imageItem,unitDialog,stateDialog
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
elChart2:0,
|
|
||||||
loading:true,
|
|
||||||
index1:0,
|
|
||||||
index2:0,
|
|
||||||
index3:0,
|
|
||||||
index4:0,
|
|
||||||
index5:0,
|
|
||||||
index6:0,
|
|
||||||
list1:[],
|
|
||||||
list2:[],
|
|
||||||
list3:[],
|
|
||||||
list4:[],
|
|
||||||
list5:[],
|
|
||||||
list6:[],
|
|
||||||
chart1Data:[],
|
|
||||||
chart2Data:[],
|
|
||||||
legendOpt2:{
|
|
||||||
icon: "rect",
|
|
||||||
orient: "vertical",
|
|
||||||
left: '70%',
|
|
||||||
top: '0',
|
|
||||||
itemGap: 10,
|
|
||||||
itemWidth:20,
|
|
||||||
itemHeight:40,
|
|
||||||
textStyle: {
|
|
||||||
color: "#c3dbfd",
|
|
||||||
fontSize: 14,
|
|
||||||
rich: {
|
|
||||||
name: {
|
|
||||||
color: "#c3dbfd",
|
|
||||||
padding: [0, 2, 10, 2],
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
color: "#ffffff",
|
|
||||||
fontSize: 16,
|
|
||||||
},
|
|
||||||
percent: {
|
|
||||||
color: "#4676FD",
|
|
||||||
fontSize: 16,
|
|
||||||
padding: [0, 2, 0, 2],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
flowTitle:'待审批',
|
|
||||||
flowTotal:0,
|
|
||||||
periodicalList:[]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.$bus.$on("loadProjects", debounce(prjs => {
|
|
||||||
this.prjs = prjs;
|
|
||||||
}));
|
|
||||||
this.$bus.$on("projectChange",debounce(res => {
|
|
||||||
this.project = res;
|
|
||||||
this.loadData();
|
|
||||||
}));
|
|
||||||
this.$bus.$on("deptChange",debounce(dept => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.loadData();
|
|
||||||
}));
|
|
||||||
this.loadPeriodical();
|
|
||||||
if(this.$root.hasInitHeader){
|
|
||||||
this.initMe();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
initMe(){
|
|
||||||
this.project=this.$root.project||{};
|
|
||||||
this.dept=this.$root.dept||{};
|
|
||||||
this.prjs=this.$root.projects||[];
|
|
||||||
this.loadData();
|
|
||||||
},
|
|
||||||
doStateDlg(){
|
|
||||||
this.$refs.stateDlg.showDialog({
|
|
||||||
deptId:this.dept?.id||0,
|
|
||||||
projectId:this.project?.id||0
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doUnitDlg(){
|
|
||||||
this.$refs.unitDlg.showDialog({
|
|
||||||
deptId:this.dept?.id||0,
|
|
||||||
projectId:this.project?.id||0
|
|
||||||
});
|
|
||||||
},
|
|
||||||
loadPeriodical(){
|
|
||||||
this.$api.periodical.getList().then(d=>{
|
|
||||||
this.periodicalList=(d.data||[]).map(it=>{
|
|
||||||
it.fileUrl=JSON.parse(it.fileUrl);
|
|
||||||
it.imageFile=it.imageUrl;
|
|
||||||
it.standardDesc=it.name;
|
|
||||||
return it;
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
changeChart1(opt){
|
|
||||||
return opt;
|
|
||||||
},
|
|
||||||
changeChart2(opt){
|
|
||||||
opt.title.left=135;
|
|
||||||
opt.title.top=20;
|
|
||||||
opt.series[0].center=["40%","50%"];
|
|
||||||
opt.series[1].center=["40%","50%"];
|
|
||||||
return opt;
|
|
||||||
},
|
|
||||||
getProjectId(cb) {
|
|
||||||
let func = () => {
|
|
||||||
let prjId = this.project?.id||0;
|
|
||||||
if (prjId == 0) {
|
|
||||||
if (!this.prjs||this.prjs.length == 0) {
|
|
||||||
setTimeout(func, 100);
|
|
||||||
} else {
|
|
||||||
if(this.prjs.length>1){
|
|
||||||
cb && cb(this.prjs[1].id);
|
|
||||||
}else{
|
|
||||||
cb(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cb && cb(prjId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func();
|
|
||||||
},
|
|
||||||
addBr(s){
|
|
||||||
let out="";
|
|
||||||
for(let i=0;i<s.length;i++){
|
|
||||||
out+=s.charAt(i);
|
|
||||||
if((i+1)%3==0 && i<s.length-2){
|
|
||||||
out+="\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
},
|
|
||||||
loadData(){
|
|
||||||
this.getProjectId(id => {
|
|
||||||
let ajaxs=[
|
|
||||||
this.$api.standard.getList(id,this.dept?.id||0),
|
|
||||||
this.$api.flow.groupByCategory(this.project?.id||0,this.dept?.id||0),
|
|
||||||
this.$api.flow.groupByUnit(this.project?.id||0,this.dept?.id||0),
|
|
||||||
];
|
|
||||||
this.$api.http.all(ajaxs).then(res=>{
|
|
||||||
let d=res[0];
|
|
||||||
let tmps=d.data||[];
|
|
||||||
this.list1=tmps.filter(it=>it.standardType==1);
|
|
||||||
this.list2=tmps.filter(it=>it.standardType==2);
|
|
||||||
this.list3=tmps.filter(it=>it.standardType==3);
|
|
||||||
this.list4=tmps.filter(it=>it.standardType==4);
|
|
||||||
this.list5=tmps.filter(it=>it.standardType==5);
|
|
||||||
this.list6=tmps.filter(it=>it.standardType==6);
|
|
||||||
this.loading=false;
|
|
||||||
let chartData=[ ['分类', '总计', '审批中', '已完成']];
|
|
||||||
this.chartInfo=[];
|
|
||||||
(res[1].data||[]).forEach(it=>{
|
|
||||||
let o= {
|
|
||||||
title:it.taskName,
|
|
||||||
comp:it.assigneeId||0,
|
|
||||||
uncomp:it.procDefVersion||0,
|
|
||||||
total:0
|
|
||||||
}
|
|
||||||
o.total=o.comp+o.uncomp;
|
|
||||||
chartData.push([this.addBr(o.title),o.total,o.uncomp,o.comp])
|
|
||||||
})
|
|
||||||
this.chart1Data=chartData;
|
|
||||||
let tmps2=[{title:'总包单位',count:0},
|
|
||||||
{title:'监理单位',count:0},
|
|
||||||
{title:'设计单位',count:0},
|
|
||||||
{title:'甲方代表',count:0},
|
|
||||||
{title:'子公司',count:0},
|
|
||||||
];
|
|
||||||
let objs=res[2].data||[];
|
|
||||||
this.flowTotal=0;
|
|
||||||
tmps2.forEach(it=>{
|
|
||||||
let o=objs.find(item=>it.title==item.taskName);
|
|
||||||
if(o){
|
|
||||||
it.count=o.assigneeId
|
|
||||||
this.flowTotal+=o.assigneeId;
|
|
||||||
}
|
|
||||||
it.name=it.title;
|
|
||||||
it.value=it.count;
|
|
||||||
});
|
|
||||||
this.chart2Data=tmps2;
|
|
||||||
|
|
||||||
this.elChart2++;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onItemData(e) {
|
|
||||||
if (e.type == 1) {
|
|
||||||
location.href = 'index.html'
|
|
||||||
}
|
|
||||||
this.getProjectOverview(e.id)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.project-engin-index{
|
|
||||||
/deep/ .border-1{
|
|
||||||
padding-left:0px;
|
|
||||||
}
|
|
||||||
.chart2{
|
|
||||||
/deep/ .chart-gif{
|
|
||||||
top:89px;
|
|
||||||
left:196px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -228,15 +228,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on("loadProjects", debounce(prjs => {
|
|
||||||
this.prjs = prjs;
|
|
||||||
}));
|
|
||||||
this.$bus.$on("projectChange", debounce(res => {
|
this.$bus.$on("projectChange", debounce(res => {
|
||||||
this.project = res;
|
this.project = res;
|
||||||
this.loadData();
|
this.prjs=this.$root.projects ||this.prjs||[];
|
||||||
}));
|
this.dept=this.$root.dept||this.dept;
|
||||||
this.$bus.$on("deptChange", debounce(dept => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}));
|
}));
|
||||||
if (this.$root.hasInitHeader) {
|
if (this.$root.hasInitHeader) {
|
||||||
|
|
|
@ -170,15 +170,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on("loadProjects", debounce(prjs => {
|
|
||||||
this.prjs = prjs;
|
|
||||||
}));
|
|
||||||
this.$bus.$on("projectChange", debounce(res => {
|
this.$bus.$on("projectChange", debounce(res => {
|
||||||
this.project = res;
|
this.project = res;
|
||||||
this.loadData();
|
this.dept=this.$root.dept||this.dept||{};
|
||||||
}));
|
this.prjs=this.$root.projects||this.prjs||[];
|
||||||
this.$bus.$on("deptChange", debounce(dept => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}));
|
}));
|
||||||
if (this.$root.hasInitHeader) {
|
if (this.$root.hasInitHeader) {
|
||||||
|
|
|
@ -455,20 +455,14 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on("projectChange", debounce(res => {
|
this.$bus.$on("projectChange", debounce(res => {
|
||||||
this.prjInfo = res;
|
this.prjInfo = res;
|
||||||
|
this.dept=this.$root.dept||this.dept||{};
|
||||||
|
this.projects=this.$root.projects||this.projects||[];
|
||||||
|
this.groupByProjectCategory(this.dept.id);
|
||||||
|
this.deptChange();
|
||||||
this.loadProjectConstructionProgress();
|
this.loadProjectConstructionProgress();
|
||||||
this.selectScheduledAlerts();
|
this.selectScheduledAlerts();
|
||||||
this.selectCompletionRate();
|
this.selectCompletionRate();
|
||||||
}));
|
}));
|
||||||
this.$bus.$on("loadProjects", debounce(prjs => {
|
|
||||||
this.projects = prjs;
|
|
||||||
}));
|
|
||||||
this.$bus.$on("deptChange", debounce(dept => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.groupByProjectCategory(dept.id);
|
|
||||||
this.deptChange();
|
|
||||||
this.selectScheduledAlerts();
|
|
||||||
this.selectCompletionRate();
|
|
||||||
}))
|
|
||||||
if(this.$root.hasInitHeader){
|
if(this.$root.hasInitHeader){
|
||||||
this.initMe();
|
this.initMe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<project-overview-chart2 :key="'b' + safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)"
|
<project-overview-chart2 :key="'b' + safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)"
|
||||||
:typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
|
:typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
|
||||||
</div>
|
</div>
|
||||||
<div class="proble-list" v-if="isTypeBuser()">
|
<div class="proble-list" v-if="isOneProject()">
|
||||||
<div class="my-module-title module-title" style="" >质量隐患明细</div>
|
<div class="my-module-title module-title" style="" >质量隐患明细</div>
|
||||||
<ProblemmodifyList ref="probList"></ProblemmodifyList>
|
<ProblemmodifyList ref="probList"></ProblemmodifyList>
|
||||||
</div>
|
</div>
|
||||||
|
@ -358,26 +358,10 @@ export default {
|
||||||
let dt1 = this.$dt((+new Date()) - 30 * 24 * 3600 * 1000);
|
let dt1 = this.$dt((+new Date()) - 30 * 24 * 3600 * 1000);
|
||||||
let dt2 = this.$dt(new Date());
|
let dt2 = this.$dt(new Date());
|
||||||
this.selDate = [dt1, dt2];
|
this.selDate = [dt1, dt2];
|
||||||
this.$bus.$on(
|
this.$bus.$on("projectChange",debounce((res) => {
|
||||||
"loadProjects",
|
|
||||||
debounce((prjs) => {
|
|
||||||
this.prjs = prjs;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
this.$bus.$on(
|
|
||||||
"projectChange",
|
|
||||||
debounce((res) => {
|
|
||||||
this.projectInfo = res;
|
this.projectInfo = res;
|
||||||
this.dtChange();
|
this.dept = this.$root.dept || this.dep||{};
|
||||||
this.checkDetection(0);
|
this.prjs = this.$root.projects ||this.prjs|| [];
|
||||||
this.doMeasuredNav(0, "汇总");
|
|
||||||
this.groupByApprove();
|
|
||||||
})
|
|
||||||
);
|
|
||||||
this.$bus.$on(
|
|
||||||
"deptChange",
|
|
||||||
debounce((dept) => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.dtChange();
|
this.dtChange();
|
||||||
this.checkDetection(0);
|
this.checkDetection(0);
|
||||||
this.doMeasuredNav(0, "汇总");
|
this.doMeasuredNav(0, "汇总");
|
||||||
|
@ -392,8 +376,11 @@ export default {
|
||||||
},400);
|
},400);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isTypeBuser(){
|
isOneProject(){
|
||||||
return this.$root.isTypeBuser;
|
if(this.prjs && this.projectInfo){
|
||||||
|
return this.prjs.length==2||this.projectInfo.id>0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
showMaterialSealDlg() {
|
showMaterialSealDlg() {
|
||||||
this.$refs.msListDlg.showDialog({
|
this.$refs.msListDlg.showDialog({
|
||||||
|
@ -493,7 +480,7 @@ export default {
|
||||||
return " ".substring(0, 3 - n.length) + n;
|
return " ".substring(0, 3 - n.length) + n;
|
||||||
},
|
},
|
||||||
dtChange() {
|
dtChange() {
|
||||||
if(this.isTypeBuser() && this.$refs.probList){
|
if(this.isOneProject() && this.$refs.probList){
|
||||||
this.$refs.probList.loadData(1, this.safeNav, this.selDate);
|
this.$refs.probList.loadData(1, this.safeNav, this.selDate);
|
||||||
}
|
}
|
||||||
this.doDeptChane();
|
this.doDeptChane();
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<project-overview-chart2 :key="'b' + safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)"
|
<project-overview-chart2 :key="'b' + safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)"
|
||||||
:typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
|
:typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
|
||||||
</div>
|
</div>
|
||||||
<div class="proble-list" v-if="isTypeBuser()">
|
<div class="proble-list" v-if="isOneProject()">
|
||||||
<div class="my-module-title module-title" style="" >安全隐患明细</div>
|
<div class="my-module-title module-title" style="" >安全隐患明细</div>
|
||||||
<ProblemmodifyList ref="probList"></ProblemmodifyList>
|
<ProblemmodifyList ref="probList"></ProblemmodifyList>
|
||||||
</div>
|
</div>
|
||||||
|
@ -90,10 +90,10 @@
|
||||||
<enginChart ref="chart4" :height="300"></enginChart>
|
<enginChart ref="chart4" :height="300"></enginChart>
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
<module-one-1-1 label="特种作业人员" style="position: relative;">
|
<module-one-1-1 label="特种作业人员" style="position: relative;">
|
||||||
<img src="images/icon2001.png" v-if="isTypeBuser()"
|
<img src="images/icon2001.png" v-if="isOneProject()"
|
||||||
style="position: absolute;cursor: pointer;right: 20px;top: 13px;z-index: 9;"
|
style="position: absolute;cursor: pointer;right: 20px;top: 13px;z-index: 9;"
|
||||||
@click="doSpecialRowClick">
|
@click="doSpecialRowClick">
|
||||||
<SpecialList ref="specList" v-if="isTypeBuser()"></SpecialList>
|
<SpecialList ref="specList" v-if="isOneProject()"></SpecialList>
|
||||||
<div v-else class="quality-table special-table">
|
<div v-else class="quality-table special-table">
|
||||||
<el-table :data="specialDataList" class="mytable"
|
<el-table :data="specialDataList" class="mytable"
|
||||||
style="width: 100%;background: transparent;" height="265" ref="fbsubordinateUnit"
|
style="width: 100%;background: transparent;" height="265" ref="fbsubordinateUnit"
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-if="safetyWorkFlowList && safetyWorkFlowList.length > 0"
|
<div v-if="safetyWorkFlowList && safetyWorkFlowList.length > 0"
|
||||||
class="quality-table special-table scroll"
|
class="quality-table special-table scroll"
|
||||||
style="overflow-x: hidden;overflow-y: scroll;height: 238px;margin-right: 12px;">
|
style="overflow-x: hidden;overflow-y: scroll;height: 230px;margin-right: 12px;">
|
||||||
<el-table :data="safetyWorkFlowList" class="mytable" style="background: transparent;">
|
<el-table :data="safetyWorkFlowList" class="mytable" style="background: transparent;">
|
||||||
<el-table-column prop="businessKeyName" label="项目名称" min-width="150"></el-table-column>
|
<el-table-column prop="businessKeyName" label="项目名称" min-width="150"></el-table-column>
|
||||||
<el-table-column prop="total" label="申请状态">
|
<el-table-column prop="total" label="申请状态">
|
||||||
|
@ -245,7 +245,8 @@
|
||||||
</div>
|
</div>
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
<module-one-1-1 label="保险采购明细">
|
<module-one-1-1 label="保险采购明细">
|
||||||
<div class="quality-table special-table">
|
<projectInsurancList v-if="isOneProject" ref="prjInsList"></projectInsurancList>
|
||||||
|
<div class="quality-table special-table" v-else>
|
||||||
<el-table :data="insuranceDataList" class="my-table"
|
<el-table :data="insuranceDataList" class="my-table"
|
||||||
style="width: 100%;background: transparent;" height="265"
|
style="width: 100%;background: transparent;" height="265"
|
||||||
@row-click="doInsuranceRowClick" ref="fbsubordinateUnit">
|
@row-click="doInsuranceRowClick" ref="fbsubordinateUnit">
|
||||||
|
@ -329,12 +330,13 @@ import enginChart from './engin/enginChart.vue'
|
||||||
import workTrainListDlg from './safe/workTrainListDlg.vue'
|
import workTrainListDlg from './safe/workTrainListDlg.vue'
|
||||||
import ProblemmodifyList from './components/ProblemmodifyList.vue'
|
import ProblemmodifyList from './components/ProblemmodifyList.vue'
|
||||||
import SpecialList from './safe/SpecialList.vue'
|
import SpecialList from './safe/SpecialList.vue'
|
||||||
|
import projectInsurancList from './safe/projectInsurancList.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
worktrainDlg,
|
worktrainDlg,
|
||||||
projectSpecialDlg,
|
projectSpecialDlg,
|
||||||
ProblemmodifyDetail, AttendanceDetailDialog,
|
ProblemmodifyDetail, AttendanceDetailDialog,
|
||||||
projectInsuranceDlg, JobWorkerDialog, enginChart, workTrainListDlg,ProblemmodifyList,SpecialList
|
projectInsuranceDlg, JobWorkerDialog, enginChart, workTrainListDlg,ProblemmodifyList,SpecialList,projectInsurancList
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -430,22 +432,10 @@ export default {
|
||||||
this.selDate=[dt1,dt2];
|
this.selDate=[dt1,dt2];
|
||||||
this.$bus.$on("projectChange", debounce(res => {
|
this.$bus.$on("projectChange", debounce(res => {
|
||||||
this.projectInfo = res;
|
this.projectInfo = res;
|
||||||
|
this.dept=this.$root.dept||this.dept;
|
||||||
|
this.projects=this.$root.projects ||this.projects;
|
||||||
this.dtChange();
|
this.dtChange();
|
||||||
this.getWorkTrainChart();
|
this.getWorkTrainChart();
|
||||||
//this.getWorkTrainList();
|
|
||||||
//this.getEmergencyDrillList();
|
|
||||||
this.getProjectSpecialView();
|
|
||||||
this.getDeptSafetyWorksList();
|
|
||||||
this.getProjectInsuranceList();
|
|
||||||
}));
|
|
||||||
this.$bus.$on("loadProjects", debounce(prjs => {
|
|
||||||
this.projects = prjs;
|
|
||||||
}))
|
|
||||||
this.$bus.$on("deptChange", debounce(dept => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.dtChange();
|
|
||||||
//this.getWorkTrainList();
|
|
||||||
//this.getEmergencyDrillList();
|
|
||||||
this.getProjectSpecialView();
|
this.getProjectSpecialView();
|
||||||
this.getDeptSafetyWorksList();
|
this.getDeptSafetyWorksList();
|
||||||
this.getProjectInsuranceList();
|
this.getProjectInsuranceList();
|
||||||
|
@ -461,8 +451,11 @@ export default {
|
||||||
},400);
|
},400);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isTypeBuser(){
|
isOneProject(){
|
||||||
return this.$root.isTypeBuser;
|
if(this.projects && this.projectInfo){
|
||||||
|
return this.projects.length==2||this.projectInfo.id>0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
doShowWorkTrain(type) {
|
doShowWorkTrain(type) {
|
||||||
this.$refs.workTrainListDlg.showDialog({
|
this.$refs.workTrainListDlg.showDialog({
|
||||||
|
@ -490,8 +483,6 @@ export default {
|
||||||
this.dept = this.$root.dept || {};
|
this.dept = this.$root.dept || {};
|
||||||
this.projects = this.$root.projects || [];
|
this.projects = this.$root.projects || [];
|
||||||
this.getWorkTrainChart();
|
this.getWorkTrainChart();
|
||||||
//this.getWorkTrainList();
|
|
||||||
//this.getEmergencyDrillList();
|
|
||||||
this.getProjectSpecialView();
|
this.getProjectSpecialView();
|
||||||
this.getDeptSafetyWorksList();
|
this.getDeptSafetyWorksList();
|
||||||
this.getProjectInsuranceList();
|
this.getProjectInsuranceList();
|
||||||
|
@ -506,7 +497,7 @@ export default {
|
||||||
this.$refs.probDlg.showDialog(a, 0, this.safeNav, this.selDate);
|
this.$refs.probDlg.showDialog(a, 0, this.safeNav, this.selDate);
|
||||||
},
|
},
|
||||||
doSpecialRowClick(row) {
|
doSpecialRowClick(row) {
|
||||||
if(this.isTypeBuser()){
|
if(this.isOneProject()){
|
||||||
row=this.$root.projects[1];
|
row=this.$root.projects[1];
|
||||||
row.projectId=row.id;
|
row.projectId=row.id;
|
||||||
}
|
}
|
||||||
|
@ -571,7 +562,9 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
if(this.$refs.chart3){
|
||||||
this.$refs.chart3.init(opt);
|
this.$refs.chart3.init(opt);
|
||||||
|
}
|
||||||
let tmps = this.WorkTrainChart2;
|
let tmps = this.WorkTrainChart2;
|
||||||
let opt2 = {
|
let opt2 = {
|
||||||
grid: {
|
grid: {
|
||||||
|
@ -616,7 +609,9 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
if(this.$refs.chart4){
|
||||||
this.$refs.chart4.init(opt2);
|
this.$refs.chart4.init(opt2);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取教育培训列表
|
// 获取教育培训列表
|
||||||
|
@ -729,12 +724,15 @@ export default {
|
||||||
}
|
}
|
||||||
this.$api.problemmodify.safetySummary(postData).then(d => {
|
this.$api.problemmodify.safetySummary(postData).then(d => {
|
||||||
if(init){
|
if(init){
|
||||||
if(this.isTypeBuser() && this.$refs.probList){
|
if(this.isOneProject() && this.$refs.probList){
|
||||||
this.$refs.probList.loadData(0, this.safeNav, this.selDate);
|
this.$refs.probList.loadData(0, this.safeNav, this.selDate);
|
||||||
}
|
}
|
||||||
if(this.$refs.specList){
|
if(this.$refs.specList){
|
||||||
this.$refs.specList.initData();
|
this.$refs.specList.initData();
|
||||||
}
|
}
|
||||||
|
if(this.$refs.prjInsList){
|
||||||
|
this.$refs.prjInsList.initData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.summary = (d || []).map(it => {
|
this.summary = (d || []).map(it => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -307,7 +307,6 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
console.log("-----beforeDestroy------>");
|
|
||||||
this.players.forEach((p) => {
|
this.players.forEach((p) => {
|
||||||
if (p) {
|
if (p) {
|
||||||
try {
|
try {
|
||||||
|
@ -319,27 +318,13 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.xapp = this;
|
window.xapp = this;
|
||||||
this.$bus.$on(
|
this.$bus.$on("projectChange",debounce((res) => {
|
||||||
"projectChange",
|
|
||||||
debounce((res) => {
|
|
||||||
this.projectInfo = res;
|
this.projectInfo = res;
|
||||||
|
this.dept = this.$root.dept || this.dept|| {};
|
||||||
|
this.projectInfos = this.$root.projects || this.projectInfos||[];
|
||||||
this.initVideoMenu();
|
this.initVideoMenu();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
this.$bus.$on(
|
|
||||||
"loadProjects",
|
|
||||||
debounce((prjs) => {
|
|
||||||
this.projectInfos = prjs;
|
|
||||||
//this.initVideoMenu();
|
|
||||||
})
|
|
||||||
);
|
|
||||||
this.$bus.$on(
|
|
||||||
"deptChange",
|
|
||||||
debounce((dept) => {
|
|
||||||
this.dept = dept;
|
|
||||||
//this.initVideoMenu();
|
|
||||||
})
|
|
||||||
);
|
|
||||||
if (this.$root.hasInitHeader) {
|
if (this.$root.hasInitHeader) {
|
||||||
this.initMe();
|
this.initMe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,18 +204,10 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on(
|
|
||||||
"loadProjects",
|
|
||||||
debounce((prjs) => {
|
|
||||||
this.prjs = prjs;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
this.$bus.$on("projectChange", throttle((res) => {
|
this.$bus.$on("projectChange", throttle((res) => {
|
||||||
this.projectInfo = res;
|
this.projectInfo = res;
|
||||||
this.loadData();
|
this.dept = this.$root.dept || this.dept||{};
|
||||||
}));
|
this.prjs=this.$root.projects || this.prjs||[];
|
||||||
this.$bus.$on("deptChange", throttle((dept) => {
|
|
||||||
this.dept = dept;
|
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}));
|
}));
|
||||||
if (this.$root.hasInitHeader) {
|
if (this.$root.hasInitHeader) {
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
<template>
|
||||||
|
<div class="project-insuranc-list scroll quality-table special-table" style="max-height: 260px;overflow-y: auto;">
|
||||||
|
|
||||||
|
<div class="data-item el-table" v-for="(it, idx) in list" :key="idx" style="position:relative;">
|
||||||
|
|
||||||
|
<table class="el-table__body-wrapper">
|
||||||
|
<tr class="el-table__row"
|
||||||
|
<td style="width:50%"><img src="images/title_icon.png"><span
|
||||||
|
class="sp-label">单位名称:</span>{{ it.deptName }}</td>
|
||||||
|
|
||||||
|
<td><img src="images/title_icon.png"><span class="sp-label">保险公司:</span>{{ it.companyName }}</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr class="el-table__row">
|
||||||
|
<td><img src="images/title_icon.png"><span class="sp-label">保险类型:</span>{{ it.insuranceTypeName }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td><img src="images/title_icon.png"><span class="sp-label">保险单号:</span>{{ it.insuranceNumber }}</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr class="el-table__row">
|
||||||
|
<td><img src="images/title_icon.png"><span class="sp-label">保险状态:</span>
|
||||||
|
<template v-if="it.insuranceState == 'Y'">
|
||||||
|
<i class="el-icon-success" style="color:rgb(34, 193, 52)"></i> <span
|
||||||
|
style="color:rgb(34, 193, 52)">已办理</span>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<i class="el-icon-error" style="color:rgb(245, 34, 45)"></i> <span
|
||||||
|
style="color:rgb(245, 34, 45)">未办理</span>
|
||||||
|
</template>
|
||||||
|
<span v-if="it.insuranceFile" @click="download(it)"
|
||||||
|
style="cursor:pointer;margin-left:12px;color:rgb(1, 169, 255);">
|
||||||
|
<i class="el-icon-paperclip" style=""></i><span>下载</span>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td><img src="images/title_icon.png"><span class="sp-label">办理时间:</span>{{ it.createTime | formatDate }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
prjId: 0,
|
||||||
|
list: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
initData() {
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
loadData() {
|
||||||
|
let prjId = this.$root.project.id;
|
||||||
|
if (prjId == 0 && this.$root.projects.length > 1) {
|
||||||
|
prjId = this.$root.projects[1].id;
|
||||||
|
this.projectInfo = this.$root.projects[1];
|
||||||
|
}
|
||||||
|
this.prjId = prjId;
|
||||||
|
if (prjId == 0) {
|
||||||
|
this.list = [];
|
||||||
|
}
|
||||||
|
this.$api.insurance.getProjectInsurance(prjId).then(d => {
|
||||||
|
this.list = d.data || [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.project-insuranc-list {
|
||||||
|
padding: 10px;
|
||||||
|
.data-item{
|
||||||
|
border-bottom: dashed 1px #3da2ff;
|
||||||
|
&:last-child{
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.el-table__body-wrapper{
|
||||||
|
border-collapse: collapse;
|
||||||
|
td{
|
||||||
|
text-align: left;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
img{
|
||||||
|
position: relative;
|
||||||
|
top:7px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -365,7 +365,6 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
console.log("-----beforeDestroy------>");
|
|
||||||
this.players.forEach((p) => {
|
this.players.forEach((p) => {
|
||||||
if (p) {
|
if (p) {
|
||||||
try {
|
try {
|
||||||
|
@ -384,30 +383,10 @@ export default {
|
||||||
this.forIndex = 0;
|
this.forIndex = 0;
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on(
|
this.$bus.$on("projectChange",debounce((res) => {
|
||||||
"projectChange",
|
|
||||||
debounce((res) => {
|
|
||||||
this.projectInfo = res;
|
this.projectInfo = res;
|
||||||
console.log("项目改变");
|
this.dept = this.$root.dept||this.dept||{};
|
||||||
console.log(this.projectInfo);
|
this.projectInfos = this.$root.projects||this.projectInfos||[];
|
||||||
this.init();
|
|
||||||
})
|
|
||||||
);
|
|
||||||
this.$bus.$on(
|
|
||||||
"loadProjects",
|
|
||||||
debounce((prjs) => {
|
|
||||||
this.projectInfos = prjs;
|
|
||||||
console.log("项目加载");
|
|
||||||
console.log(this.projectInfos);
|
|
||||||
this.init();
|
|
||||||
})
|
|
||||||
);
|
|
||||||
this.$bus.$on(
|
|
||||||
"deptChange",
|
|
||||||
debounce((dept) => {
|
|
||||||
this.dept = dept;
|
|
||||||
console.log("部门改变");
|
|
||||||
console.log(this.dept);
|
|
||||||
this.init();
|
this.init();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,132 +1,273 @@
|
||||||
import Vue from 'vue'
|
import Vue from "vue";
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from "vue-router";
|
||||||
|
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
name: 'index',
|
name: "index",
|
||||||
meta:{nav:1,},
|
meta: { nav: 1 },
|
||||||
component: () => import(/* webpackChunkName: "index" */ '../pages/index.vue')
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "index" */ "../pages/index.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/map',
|
path: "/map",
|
||||||
name: 'map',
|
name: "map",
|
||||||
meta:{nav:100,},
|
meta: { nav: 100 },
|
||||||
component: () => import(/* webpackChunkName: "map" */ '../pages/map.vue')
|
component: () => import(/* webpackChunkName: "map" */ "../pages/map.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/detail',
|
path: "/detail",
|
||||||
name: 'detail',
|
name: "detail",
|
||||||
meta:{nav:2,},
|
meta: { nav: 2 },
|
||||||
component: () => import(/* webpackChunkName: "detail" */ '../pages/projectDetail.vue')
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "detail" */ "../pages/projectDetail.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/progress',
|
path: "/prjSafety",
|
||||||
name: 'progress',
|
name: "prjSafety",
|
||||||
meta:{nav:5,},
|
meta: { nav: 21 },
|
||||||
component: () => import(/* webpackChunkName: "progress" */ '../pages/projectProgress.vue')
|
component: () =>
|
||||||
}
|
import(/* webpackChunkName: "safety" */ "../pages/projectSafety.vue"),
|
||||||
,
|
|
||||||
{
|
|
||||||
path: '/quality',
|
|
||||||
name: 'quality',
|
|
||||||
meta:{nav:4,},
|
|
||||||
component: () => import(/* webpackChunkName: "quality" */ '../pages/projectQuality.vue')
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/concreteStrength',
|
path: "/prjQuality",
|
||||||
name: 'concreteStrength',
|
name: "prjQuality",
|
||||||
meta:{nav:27,},
|
meta: { nav: 22 },
|
||||||
component: () => import(/* webpackChunkName: "concreteStrength" */ '../pages/quality/concreteStrength.vue')
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "quality" */ "../pages/projectQuality.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/standardCuringRoom',
|
path: "/prjProgress",
|
||||||
name: 'standardCuringRoom',
|
name: "prjProgress",
|
||||||
meta:{nav:26,},
|
meta: { nav: 23 },
|
||||||
component: () => import(/* webpackChunkName: "standardCuringRoom" */ '../pages/quality/standardCuringRoom.vue')
|
component: () =>
|
||||||
}
|
import(/* webpackChunkName: "progress" */ "../pages/projectProgress.vue"),
|
||||||
,
|
},
|
||||||
{
|
{
|
||||||
path: '/safety',
|
path: "/prjEngin",
|
||||||
name: 'safety',
|
name: "prjEngin",
|
||||||
meta:{nav:3,},
|
meta: { nav: 24 },
|
||||||
component: () => import(/* webpackChunkName: "safety" */ '../pages/projectSafety.vue')
|
component: () =>
|
||||||
}
|
import(/* webpackChunkName: "video" */ "../pages/projectEngin.vue"),
|
||||||
, {
|
},
|
||||||
path: '/distributionBox',
|
{
|
||||||
name: 'distributionBox',
|
path: "/prjVideo",
|
||||||
meta:{nav:23,},
|
name: "prjVideo",
|
||||||
component: () => import(/* webpackChunkName: "distributionBox" */ '../pages/safe/distributionBox.vue')
|
meta: { nav: 25 },
|
||||||
}
|
component: () =>
|
||||||
, {
|
import(/* webpackChunkName: "video" */ "../pages/projectVideo.vue"),
|
||||||
path: '/dumbwaiter',
|
},
|
||||||
name: 'dumbwaiter',
|
{
|
||||||
meta:{nav:24,},
|
path: "/prjAiVideo",
|
||||||
component: () => import(/* webpackChunkName: "dumbwaiter" */ '../pages/safe/dumbwaiter.vue')
|
name: "aiVprjAiVideoideo",
|
||||||
|
meta: { nav: 26 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "video" */ "../pages/toAIVideoProject.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/prjPhotography",
|
||||||
|
name: "prjPhotography",
|
||||||
|
meta: { nav: 27 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "video" */ "../pages/photography.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/towerCrane",
|
||||||
|
name: "towerCrane",
|
||||||
|
meta: { nav: 28 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "towerCrane" */ "../pages/safe/towerCrane.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/excavation",
|
||||||
|
name: "excavation",
|
||||||
|
meta: { nav: 29 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "excavation" */ "../pages/safe/excavation.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/distributionBox",
|
||||||
|
name: "distributionBox",
|
||||||
|
meta: { nav: 30 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "distributionBox" */ "../pages/safe/distributionBox.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/dumbwaiter",
|
||||||
|
name: "dumbwaiter",
|
||||||
|
meta: { nav: 31 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "dumbwaiter" */ "../pages/safe/dumbwaiter.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/personnelPosition",
|
||||||
|
name: "personnelPosition",
|
||||||
|
meta: { nav: 32 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "personnelPosition" */ "../pages/safe/personnelPosition.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/concreteStrength",
|
||||||
|
name: "concreteStrength",
|
||||||
|
meta: { nav: 33 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "concreteStrength" */ "../pages/quality/concreteStrength.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/standardCuringRoom",
|
||||||
|
name: "standardCuringRoom",
|
||||||
|
meta: { nav: 33 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "standardCuringRoom" */ "../pages/quality/standardCuringRoom.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/progress",
|
||||||
|
name: "progress",
|
||||||
|
meta: { nav: 5 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "progress" */ "../pages/projectProgress.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/quality",
|
||||||
|
name: "quality",
|
||||||
|
meta: { nav: 4 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "quality" */ "../pages/projectQuality.vue"),
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: "/safety",
|
||||||
|
name: "safety",
|
||||||
|
meta: { nav: 3 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "safety" */ "../pages/projectSafety.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/video",
|
||||||
|
name: "video",
|
||||||
|
meta: { nav: 60 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "video" */ "../pages/projectVideo.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/aiVideo",
|
||||||
|
name: "aiVideo",
|
||||||
|
meta: { nav: 61 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "video" */ "../pages/toAIVideoProject.vue"),
|
||||||
},{
|
},{
|
||||||
path: '/personnelPosition',
|
path: "/photography",
|
||||||
name: 'personnelPosition',
|
name: "photography",
|
||||||
meta:{nav:25,},
|
meta: { nav: 62 },
|
||||||
component: () => import(/* webpackChunkName: "personnelPosition" */ '../pages/safe/personnelPosition.vue')
|
component: () =>
|
||||||
}
|
import(/* webpackChunkName: "video" */ "../pages/photography.vue"),
|
||||||
, {
|
|
||||||
path: '/excavation',
|
|
||||||
name: 'excavation',
|
|
||||||
meta:{nav:22,},
|
|
||||||
component: () => import(/* webpackChunkName: "excavation" */ '../pages/safe/excavation.vue')
|
|
||||||
}
|
|
||||||
, {
|
|
||||||
path: '/towerCrane',
|
|
||||||
name: 'towerCrane',
|
|
||||||
meta:{nav:21,},
|
|
||||||
component: () => import(/* webpackChunkName: "towerCrane" */ '../pages/safe/towerCrane.vue')
|
|
||||||
}
|
|
||||||
,
|
|
||||||
{
|
|
||||||
path: '/video',
|
|
||||||
name: 'video',
|
|
||||||
meta:{nav:61,},
|
|
||||||
component: () => import(/* webpackChunkName: "video" */ '../pages/projectVideo.vue')
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/aiVideo',
|
path: "/videoTowerCrane",
|
||||||
name: 'aiVideo',
|
name: "videoTowerCrane",
|
||||||
meta:{nav:62,},
|
meta: { nav: 63 },
|
||||||
component: () => import(/* webpackChunkName: "video" */ '../pages/toAIVideoProject.vue')
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "towerCrane" */ "../pages/safe/towerCrane.vue"
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/engin',
|
path: "/videoExcavation",
|
||||||
name: 'engin',
|
name: "videoExcavation",
|
||||||
meta:{nav:7,},
|
meta: { nav: 64 },
|
||||||
component: () => import(/* webpackChunkName: "video" */ '../pages/projectEngin.vue')
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "excavation" */ "../pages/safe/excavation.vue"
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/enginBUser',
|
path: "/videoDistributionBox",
|
||||||
name: 'enginBUser',
|
name: "videoDistributionBox",
|
||||||
meta:{nav:7,},
|
meta: { nav: 65 },
|
||||||
component: () => import(/* webpackChunkName: "video" */ '../pages/projectEnginBUser.vue')
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "distributionBox" */ "../pages/safe/distributionBox.vue"
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/enginAuditing',
|
path: "/videoDumbwaiter",
|
||||||
name: 'enginAuditing',
|
name: "videoDumbwaiter",
|
||||||
meta:{nav:71,},
|
meta: { nav: 66 },
|
||||||
component: () => import(/* webpackChunkName: "video" */ '../pages/engin/auditingPage.vue')
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "dumbwaiter" */ "../pages/safe/dumbwaiter.vue"
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/photography',
|
path: "/videoPersonnelPosition",
|
||||||
name: 'photography',
|
name: "videoPersonnelPosition",
|
||||||
meta:{nav:63,},
|
meta: { nav: 67 },
|
||||||
component: () => import(/* webpackChunkName: "video" */ '../pages/photography.vue')
|
component: () =>
|
||||||
}
|
import(
|
||||||
]
|
/* webpackChunkName: "personnelPosition" */ "../pages/safe/personnelPosition.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/videoStandardCuringRoom",
|
||||||
|
name: "videoStandardCuringRoom",
|
||||||
|
meta: { nav: 68},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "concreteStrength" */ "../pages/quality/concreteStrength.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/videoConcreteStrength",
|
||||||
|
name: "videoConcreteStrength",
|
||||||
|
meta: { nav: 69 },
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "standardCuringRoom" */ "../pages/quality/standardCuringRoom.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/engin",
|
||||||
|
name: "engin",
|
||||||
|
meta: { nav: 7 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "video" */ "../pages/projectEngin.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/enginBUser",
|
||||||
|
name: "enginBUser",
|
||||||
|
meta: { nav: 7 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "video" */ "../pages/projectEnginBUser.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/enginAuditing",
|
||||||
|
name: "enginAuditing",
|
||||||
|
meta: { nav: 71 },
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "video" */ "../pages/engin/auditingPage.vue"),
|
||||||
|
},
|
||||||
|
|
||||||
|
];
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
mode: 'hash',
|
mode: "hash",
|
||||||
base: process.env.BASE_URL,
|
base: process.env.BASE_URL,
|
||||||
routes
|
routes,
|
||||||
})
|
});
|
||||||
export {
|
export { routes };
|
||||||
routes
|
export default router;
|
||||||
}
|
|
||||||
export default router
|
|
||||||
|
|
Loading…
Reference in New Issue