update code

prv
haha 2024-05-06 21:56:00 +08:00
parent 17fb41850d
commit 6adedec170
17 changed files with 251 additions and 326 deletions

View File

@ -6,35 +6,57 @@
<div class="head-title-tab">
<div v-if="!isTypeBuser" :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="pageJump(1, '#/')">
</div>
<div :class="(nav >=20 && nav <30) || nav==2? 'head-nav active' : 'head-nav'" style="position: relative;"
<div :class="(nav >=200 && nav <300) || nav==2? 'head-nav active' : 'head-nav'" style="position: relative;"
class="has-submenu">
<div @click="pageJump(2, '#/detail')">项目详情</div>
<div class="header-btn-list">
<div class="header-btn-list-arrow"></div>
<div class="header-btn-list-item" style="">
<div class="header-btn-list-padding" style="text-align: left;">
<button type="button" :class="nav == 21 ? 'active' : ''" class="sub-btn"
@click="pageJump(21, '#/towerCrane')">塔吊监控</button>
<button type="button" :class="nav == 22 ? 'active' : ''" class="sub-btn"
@click="pageJump(22, '#/excavation')">基坑监控</button>
<button type="button" :class="nav == 23 ? 'active' : ''" class="sub-btn"
@click="pageJump(23, '#/distributionBox')">配电箱监控</button>
<button type="button" :class="nav == 24 ? 'active' : ''" class="sub-btn"
@click="pageJump(24, '#/dumbwaiter')">升降机监控</button> <br/>
<button type="button" :class="nav == 25 ? 'active' : ''" class="sub-btn"
@click="pageJump(25, '#/personnelPosition')">人员定位</button>
<button type="button" :class="nav == 26 ? 'active' : ''" class="sub-btn"
@click="pageJump(26, '#/standardCuringRoom')">标养室检测</button>
<button type="button" :class="nav == 27 ? 'active' : ''" class="sub-btn"
@click="pageJump(27, '#/concreteStrength')">混泥土强度检测</button>
<div class="header-btn-list-padding" style="text-align: left;display: grid;grid-template-columns: 20% 20% 20% 20% 20%;">
<button type="button" :class="nav == 208 ? 'active' : ''" class="sub-btn"
@click="pageJump(208, '#/prjSafety')">安全管理</button>
<button type="button" :class="nav == 209 ? 'active' : ''" class="sub-btn"
@click="pageJump(209, '#/prjQuality')">质量管理</button>
<button type="button" :class="nav == 210 ? 'active' : ''" class="sub-btn"
@click="pageJump(210, '#/prjProgress')">进度管理</button>
<button type="button" :class="nav == 211 ? 'active' : ''" class="sub-btn"
@click="pageJump(211, '#/prjVideo')">视频监控</button>
<button type="button" :class="nav == 212 ? 'active' : ''" class="sub-btn"
@click="pageJump(212, '#/prjAiVideo')">AI识别监控</button>
<button type="button" :class="nav == 213 ? 'active' : ''" class="sub-btn"
@click="pageJump(213, '#/prjPhotography')">项目全景</button>
<button type="button" :class="nav == 214 ? 'active' : ''" class="sub-btn"
@click="pageJump(214, '#/prjEngin')" v-if="!isTypeBuser" >工程管理</button>
<button type="button" :class="nav == 215 ? 'active' : ''" class="sub-btn"
@click="pageJump(215, '#/prjEnginAuditing')" v-if="!isTypeBuser" >工程审核</button>
<button type="button" :class="nav == 201 ? 'active' : ''" class="sub-btn"
@click="pageJump(201, '#/towerCrane')">塔吊监控</button>
<button type="button" :class="nav == 202 ? 'active' : ''" class="sub-btn"
@click="pageJump(202, '#/excavation')">基坑监控</button>
<button type="button" :class="nav == 203 ? 'active' : ''" class="sub-btn"
@click="pageJump(203, '#/distributionBox')">配电箱监控</button>
<button type="button" :class="nav == 204 ? 'active' : ''" class="sub-btn"
@click="pageJump(204, '#/dumbwaiter')">升降机监控</button>
<button type="button" :class="nav == 205 ? 'active' : ''" class="sub-btn"
@click="pageJump(205, '#/personnelPosition')">人员定位</button>
<button type="button" :class="nav == 206 ? 'active' : ''" class="sub-btn"
@click="pageJump(206, '#/standardCuringRoom')">标养室检测</button>
<button type="button" :class="nav == 207 ? 'active' : ''" class="sub-btn"
@click="pageJump(207, '#/concreteStrength')">混泥土强度检测</button>
</div>
</div>
</div>
</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 == 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 v-if="!isTypeBuser" :class="nav == 3 ? 'head-nav active' : 'head-nav'" @click="pageJump(3, '#/safety')"></div>
<div v-if="!isTypeBuser" :class="nav == 4 ? 'head-nav active' : 'head-nav'" @click="pageJump(4, '#/quality')"></div>
<div v-if="!isTypeBuser" :class="nav == 5 ? 'head-nav active' : 'head-nav'" @click="pageJump(5, '#/progress')"></div>
<div v-if="!isTypeBuser" :class="nav == 61 || nav == 62 || nav==63 ? 'head-nav active' : 'head-nav'" style="position: relative;"
class="has-submenu">
<div>视频管理</div>
<div class="header-btn-list">
@ -76,7 +98,7 @@
</div>
<el-collapse-transition>
<ul class="header-screen-ul" v-show="showSel1" ref="selectUl">
<li v-for="item in depts" @click="setScreenLiSel1(item)" :title="item.text">{{ item.text }}</li>
<li v-for="item in depts" @click="doSetScreenLiSel1(item)" :title="item.text">{{ item.text }}</li>
</ul>
</el-collapse-transition>
</div>
@ -87,7 +109,7 @@
</div>
<el-collapse-transition>
<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="doSetScreenLiSel3(item)" :title="item.text">{{ item.text }}</li>
</ul>
</el-collapse-transition>
</div>
@ -97,7 +119,7 @@
</div>
<el-collapse-transition>
<ul class="header-screen-ul" v-show="showSel2" ref="selectUl">
<li v-for="item in data" @click="setScreenLiSel2(item)" :title="item.text">{{ item.text }}</li>
<li v-for="item in data" @click="doSetScreenLiSel2(item)" :title="item.text">{{ item.text }}</li>
</ul>
</el-collapse-transition>
</div>
@ -183,6 +205,7 @@ export default {
condCode: '',
proTypeList:[],
proType:'',
projs:[],
}
},
created(){
@ -210,7 +233,7 @@ export default {
localStorage.setItem("project_category",JSON.stringify(tmps));
});
},
async mounted() {
async mounted() {
window.headerApp = this
await this.initMe();
this.getWeather();
@ -224,50 +247,54 @@ export default {
this.isTypeBuser = true;
if (this.$route.name == "index") {
this.$router.push("/detail");
return;
}
this.$api.project.findProjectByDept(-1).then(d => {
let objs = (d?.data || []).map(it => {
}
let ajaxs=[
this.$api.dept.list(),
this.$api.project.findProjectByDept(0)
];
let res=await this.$api.http.all(ajaxs);
this.projs=res[1].data||[];
if ([5, 6, 7, 15, 16, 17, 99].includes(roleId)) {
let objs = (res[1]?.data || []).map(it => {
it.text = it.projectName;
return it;
}).filter(it => +it.progressVisible == 0);
this.data = [{ id: 0, text: '所有项目' }, ...objs];
let dept={id:0,text:''};
this.$root.dept=dept;
this.$root.hasInitHeader=true;
this.$bus.$emit("deptChange", dept)
this.$root.hasInitHeader=true;
this.$root._prjIds=objs.map(it=>it.id);
Cookies.set("__ids__",objs.map(it=>it.id).join(","));
this.$bus.$emit("loadProjects", this.data);
Cookies.set("__ids__",objs.map(it=>it.id).join(","));
this.$root.projects = this.data;
if (this.data.length > 0) {
this.setScreenLiSel2(this.data[0], true);
} else {
this.setScreenLiSel2(null);
}
});
}
} else {
this.isTypeBuser = false;
this.$api.dept.list().then(d => {
this.isTypeBuser = false;
this.$root.hasInitHeader = true;
if (roleId < 4) {
this.depts = [{ text: '产发集团', id: 0 }, ...(d?.data || []).map(it => {
this.depts = [{ text: '产发集团', id: 0 }, ...(res[0]?.data || []).map(it => {
it.text = it.deptName;
it.id = it.deptId;
return it;
})]
} else {
this.depts = [...(d?.data || []).map(it => {
it.text = it.deptName;
it.id = it.deptId;
return it;
})]
}
this.setScreenLiSel1(this.localStorage1);
this.deptChange();
});
} else {
this.depts = [...(res[0]?.data || []).map(it => {
it.text = it.deptName;
it.id = it.deptId;
return it;
})]
}
this.setScreenLiSel1(this.localStorage1);
this.deptChange();
}
this.$root.isTypeBuser = this.isTypeBuser;
this.init();
this.init();
this.$bus.$emit("headerChange",this);
},
methods: {
initMe() {
@ -351,8 +378,7 @@ export default {
}
}
let tmps = this.depts.filter(d => d.text == this.dept1);
if (tmps.length > 0) {
this.$bus.$emit("deptChange", tmps[0])
if (tmps.length > 0) {
this.$root.dept = tmps[0];
}
},
@ -370,7 +396,10 @@ export default {
this.nav = n;
this.setTitle();
if (url) {
location.href = url
location.href="#/"
setTimeout(()=>{
location.href = url
},400);
} else {
this.$notify({
title: '提示',
@ -407,10 +436,21 @@ export default {
this.deptChange();
this.loadProject();
},
doSetScreenLiSel1(item){
this.setScreenLiSel1(item);
this.$bus.$emit("headerChange",this);
},
doSetScreenLiSel2(item){
this.setScreenLiSel2(item);
this.$bus.$emit("headerChange",this);
},
doSetScreenLiSel3(item){
this.setScreenLiSel3(item);
this.$bus.$emit("headerChange",this);
},
setScreenLiSel1(item) {
localStorage.setItem("data1", JSON.stringify(item))
this.localStorage1 = JSON.parse(localStorage.getItem("data1"))
this.$emit('itemdata', item);
this.localStorage1 = JSON.parse(localStorage.getItem("data1"))
this.showSel1 = false
this.dept1 = item.text;
this.deptChange();
@ -419,14 +459,25 @@ export default {
loadProject(init,cb) {
if (this.isTypeBuser) {
return;
}
this.$api.project.findProjectByDept(this.localStorage1.id).then(d => {
let objs = (d?.data || []).map(it => {
}
let tmps=this.projs.filter(d=>{
let b1= true;
if(this.localStorage1.id!=0){
b1=d.deptId==this.localStorage1.id
}
let b2=true;
let tmps=this.proTypeList.filter(it=>it.text==this.proType);
if(tmps.length>0 && tmps[0].value!=0){
b2=d.projectType==tmps[0].value;
}
return b1 && b2;
});
let objs = (tmps || []).map(it => {
it.text = it.projectName;
return it;
}).filter(it => +it.progressVisible == 0);
this.data = [{ id: 0, text: '所有项目' }, ...objs];
this.$bus.$emit("loadProjects", this.data);
//this.$bus.$emit("loadProjects", this.data);
this.$root.projects = this.data;
if(this.data.find(it=>it.id==this.localStorage2.id)){
this.setScreenLiSel2(this.localStorage2)
@ -440,7 +491,7 @@ export default {
if(cb){
cb();
}
});
},
setScreenLiSel2(item, init) {
if (item) {
@ -451,8 +502,7 @@ export default {
this.$emit('itemdata', item);
this.dept2 = item.text;
}
this.$root.project = this.localStorage2;
this.$bus.$emit("projectChange", this.localStorage2);
this.$root.project = this.localStorage2;
} else {
localStorage.removeItem("data2");
this.localStorage2 = {};

View File

@ -104,18 +104,9 @@ export default {
};
},
mounted() {
this.$bus.$on("projectChange", (res) => {
this.prjInfo = res;
if (this.deptInfo.text) {
this.getMonitAndWarning();
}
});
this.$bus.$on("deptChange", (dept) => {
this.deptInfo = dept;
if (this.prjInfo.id) {
this.getMonitAndWarning();
}
});
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -36,10 +36,9 @@ export default {
mounted() {
window.mymap = this;
this.$bus.$on("projectChange", res => {
this.project = res;
this.reloadMap();
});
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if(this.$root.hasInitHeader){
this.initMe();
}

View File

@ -261,17 +261,9 @@ export default {
},
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.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -471,42 +471,9 @@ export default {
}
this.loading = true;
});
this.$bus.$on("loadProjects", debounce(prjs => {
this.prjs = prjs;
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);
this.onClickoOverview(0)
this.qualityNavClick(0);
this.onWarningInfoNav(0);
this.sumCostOutByDeptId();
}));
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if(this.$root.hasInitHeader){
this.initMe();
}

View File

@ -72,13 +72,9 @@ export default {
},
mounted() {
this.$bus.$on("loadProjects", debounce(prjs => {
this.prjs = prjs;
}));
this.$bus.$on("projectChange", debounce(res => {
this.prj = res;
this.loadData2();
}));
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -66,14 +66,9 @@ export default {
};
},
mounted() {
this.$bus.$on("deptChange", debounce(dept => {
this.dept = dept;
this.loadData();
}));
this.$bus.$on("projectChange", debounce(res => {
this.prj = res;
this.loadData();
}));
this.$bus.$on("headerChange",()=>{
this.initMe();
});
this.info = this.scheduleInfo || {};
this.prj = this.prjInfo || {};
if(this.$root.hasInitHeader){

View File

@ -916,18 +916,12 @@ export default {
},
mounted() {
window.xapp = this;
this.$bus.$on(
"loadProjects",
debounce((prjs) => {
this.prjs = prjs;
})
);
this.$bus.$on(
"projectChange",
debounce((res) => {
this.project = res;
this.mapName = "";
this.$bus.$on("headerChange",()=>{
this.project = this.$root.project || {};
this.dept = this.$root.dept || {};
this.prjs = this.$root.projects || [];
let res=this.project;
this.mapName = "";
if (res.id == 0) {
if (this.prjs.length > 1) {
this.getMapName(this.prjs[1].projectName);
@ -936,15 +930,8 @@ export default {
this.getMapName(res.projectName);
}
this.loadData();
this.loadFilshNode();
})
);
this.$bus.$on(
"deptChange",
debounce((dept) => {
this.dept = dept;
})
);
this.loadFilshNode();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -142,17 +142,9 @@ export default {
},
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.$bus.$on("headerChange",()=>{
this.initMe();
});
this.loadPeriodical();
if(this.$root.hasInitHeader){
this.initMe();

View File

@ -228,17 +228,9 @@ export default {
},
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.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -453,22 +453,9 @@ export default {
this.loadPlan();
},
mounted() {
this.$bus.$on("projectChange", debounce(res => {
this.prjInfo = res;
this.loadProjectConstructionProgress();
this.selectScheduledAlerts();
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();
}))
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if(this.$root.hasInitHeader){
this.initMe();
}

View File

@ -423,32 +423,9 @@ export default {
let dt1=this.$dt((+new Date())-30*24*3600*1000);
let dt2=this.$dt(new Date());
this.selDate=[dt1,dt2];
this.$bus.$on(
"loadProjects",
debounce((prjs) => {
this.prjs = prjs;
})
);
this.$bus.$on(
"projectChange",
debounce((res) => {
this.projectInfo = res;
this.doDeptChane();
this.checkDetection(0);
this.doMeasuredNav(0, "汇总");
this.selectTop20materialSeal();
})
);
this.$bus.$on(
"deptChange",
debounce((dept) => {
this.dept = dept;
this.doDeptChane();
this.checkDetection(0);
this.doMeasuredNav(0, "汇总");
this.selectTop20materialSeal();
})
);
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -395,7 +395,7 @@ export default {
projectInsuranceDlg, JobWorkerDialog, enginChart, workTrainListDlg
},
data() {
return {
return {
dictWorkTrainDataType: [],
selDate: [],
elSummaryKey: 0,
@ -486,50 +486,41 @@ export default {
let dt1=this.$dt((+new Date())-30*24*3600*1000);
let dt2=this.$dt(new Date());
this.selDate=[dt1,dt2];
this.$bus.$on("projectChange", debounce(res => {
this.projectInfo = res;
this.doDeptChane();
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.doDeptChane();
//this.getWorkTrainList();
//this.getEmergencyDrillList();
this.getProjectSpecialView();
this.getDeptSafetyWorksList();
this.getProjectInsuranceList();
if (this.fileNav == 3) {
this.getWorkFileList();
}
}));
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}
},
methods: {
methods: {
getPrjId(cb){
let isFromPrj=(+this.$route.meta?.nav)>200;//
if(isFromPrj){
this.getProjectId(id=>{
cb(id);
});
}else{
cb(this.projectInfo?.id || 0);
}
},
doShowWorkTrain(type) {
this.getPrjId(prjId=>{
this.$refs.workTrainListDlg.showDialog({
type: type,
deptId: this.dept.id || 0,
projectId: this.projectInfo?.id || 0,
projectId: prjId,
prj: this.projectInfo || {},
dicts: this.dictWorkTrainDataType.filter(d => d.cssClass == (type == 0 ? 'a' : 'b'))
});
});
},
doShowAttendanceDetail() {
this.getPrjId(prjId=>{
let data = {
deptId: this.dept.id || 0,
projectId: this.projectInfo?.id || 0,
projectId: prjId,
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
}
if (this.infoNav == 1) {
@ -537,6 +528,7 @@ export default {
} else {
this.$refs.jobWorkerdlg.showDialog(data);
}
});
},
initMe() {
this.projectInfo = this.$root.project || {};
@ -587,7 +579,8 @@ export default {
});
},
getWorkTrainChart() {
this.$api.workTrain.getGroupByDataType(this.dept?.id || 0, this.projectInfo?.id || 0).then(d => {
this.getPrjId(prjId=>{
this.$api.workTrain.getGroupByDataType(this.dept?.id || 0, prjId).then(d => {
this.WorkTrainChart1 = (d.data || []).filter(it => it.trainType === 'a').map(it => { return { value: it.id || 0, name: it.trainTitle } });
this.WorkTrainChart2 = (d.data || []).filter(it => it.trainType === 'b').map(it => { return { value: it.id || 0, name: it.trainTitle } });
let cnt = 0;
@ -668,31 +661,40 @@ export default {
};
this.$refs.chart4.init(opt2);
});
});
},
//
getWorkTrainList() {
this.$api.workTrain.getWorkTrainList(0, this.dept?.id || 0, this.projectInfo?.id || 0).then(d => {
this.getPrjId(prjId=>{
this.$api.workTrain.getWorkTrainList(0, this.dept?.id || 0, prjId).then(d => {
this.workTrainList = d.rows;
});
});
},
//
getEmergencyDrillList() {
this.$api.workTrain.getWorkTrainList(1, this.dept?.id || 0, this.projectInfo?.id || 0).then(d => {
this.getPrjId(prjId=>{
this.$api.workTrain.getWorkTrainList(1, this.dept?.id || 0, prjId).then(d => {
this.emergencyDrillList = d.rows;
});
});
},
//
getProjectSpecialView() {
this.$api.special.getProjectSpecialView(this.dept?.id || 0, this.projectInfo?.id || 0).then(d => {
this.getPrjId(prjId=>{
this.$api.special.getProjectSpecialView(this.dept?.id || 0, prjId).then(d => {
this.specialDataList = d.rows;
});
});
},
//
getDeptSafetyWorksList() {
//
this.$api.flow.findSafetyWorkList(this.dept?.id || 0, this.projectInfo?.id || 0, this.infoNav).then(d => {
this.getPrjId(prjId=>{
this.$api.flow.findSafetyWorkList(this.dept?.id || 0, prjId, this.infoNav).then(d => {
this.safetyWorkFlowList = d.data || [];
});
});
},
getProjectId(cb) {
let func = () => {
@ -750,12 +752,14 @@ export default {
});
},
getProjectInsuranceList() {
this.$api.insurance.getProjectInsuranceList(this.dept?.id || 0, this.projectInfo?.id || 0).then(d => {
this.getPrjId(prjId=>{
this.$api.insurance.getProjectInsuranceList(this.dept?.id || 0, prjId).then(d => {
this.insuranceDataList = [];
if (d.rows.length > 0 && d.rows[0] != null) {
this.insuranceDataList = d.rows;
}
});
});
},
fmt(n) {
n = "" + n;

View File

@ -319,27 +319,9 @@ export default {
},
mounted() {
window.xapp = this;
this.$bus.$on(
"projectChange",
debounce((res) => {
this.projectInfo = res;
this.initVideoMenu();
})
);
this.$bus.$on(
"loadProjects",
debounce((prjs) => {
this.projectInfos = prjs;
//this.initVideoMenu();
})
);
this.$bus.$on(
"deptChange",
debounce((dept) => {
this.dept = dept;
//this.initVideoMenu();
})
);
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -204,20 +204,9 @@ export default {
});
},
mounted() {
this.$bus.$on(
"loadProjects",
debounce((prjs) => {
this.prjs = prjs;
})
);
this.$bus.$on("projectChange", throttle((res) => {
this.projectInfo = res;
this.loadData();
}));
this.$bus.$on("deptChange", throttle((dept) => {
this.dept = dept;
this.loadData();
}));
this.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -384,33 +384,9 @@ export default {
this.forIndex = 0;
},
mounted() {
this.$bus.$on(
"projectChange",
debounce((res) => {
this.projectInfo = res;
console.log("项目改变");
console.log(this.projectInfo);
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.$bus.$on("headerChange",()=>{
this.initMe();
});
if (this.$root.hasInitHeader) {
this.initMe();
}

View File

@ -35,16 +35,59 @@ const routes = [
meta:{nav:4,},
component: () => import(/* webpackChunkName: "quality" */ '../pages/projectQuality.vue')
} ,
{
path: '/prjQuality',
name: 'prjQuality',
meta:{nav:209,},
component: () => import(/* webpackChunkName: "quality" */ '../pages/projectQuality.vue')
} ,
{
path: '/prjProgress',
name: 'prjProgress',
meta:{nav:210,},
component: () => import(/* webpackChunkName: "progress" */ '../pages/projectProgress.vue')
}
,
{
path: '/prjVideo',
name: 'prjVideo',
meta:{nav:211,},
component: () => import(/* webpackChunkName: "video" */ '../pages/projectVideo.vue')
},
{
path: '/prjAiVideo',
name: 'prjAiVideo',
meta:{nav:212,},
component: () => import(/* webpackChunkName: "video" */ '../pages/toAIVideoProject.vue')
},
{
path: '/prjPhotography',
name: 'prjPhotography',
meta:{nav:213,},
component: () => import(/* webpackChunkName: "video" */ '../pages/photography.vue')
},
{
path: '/prjEngin',
name: 'prjEngin',
meta:{nav:214,},
component: () => import(/* webpackChunkName: "video" */ '../pages/projectEngin.vue')
},
{
path: '/prjEnginAuditing',
name: 'prjEnginAuditing',
meta:{nav:215,},
component: () => import(/* webpackChunkName: "video" */ '../pages/engin/auditingPage.vue')
},
{
path: '/concreteStrength',
name: 'concreteStrength',
meta:{nav:27,},
meta:{nav:207,},
component: () => import(/* webpackChunkName: "concreteStrength" */ '../pages/quality/concreteStrength.vue')
} ,
{
path: '/standardCuringRoom',
name: 'standardCuringRoom',
meta:{nav:26,},
meta:{nav:206,},
component: () => import(/* webpackChunkName: "standardCuringRoom" */ '../pages/quality/standardCuringRoom.vue')
}
,
@ -53,34 +96,40 @@ const routes = [
name: 'safety',
meta:{nav:3,},
component: () => import(/* webpackChunkName: "safety" */ '../pages/projectSafety.vue')
},
{
path: '/prjSafety',
name: 'prjSafety',
meta:{nav:208,},
component: () => import(/* webpackChunkName: "safety" */ '../pages/projectSafety.vue')
}
, {
path: '/distributionBox',
name: 'distributionBox',
meta:{nav:23,},
meta:{nav:203,},
component: () => import(/* webpackChunkName: "distributionBox" */ '../pages/safe/distributionBox.vue')
}
, {
path: '/dumbwaiter',
name: 'dumbwaiter',
meta:{nav:24,},
meta:{nav:204,},
component: () => import(/* webpackChunkName: "dumbwaiter" */ '../pages/safe/dumbwaiter.vue')
}, {
path: '/personnelPosition',
name: 'personnelPosition',
meta:{nav:25,},
meta:{nav:205,},
component: () => import(/* webpackChunkName: "personnelPosition" */ '../pages/safe/personnelPosition.vue')
}
, {
path: '/excavation',
name: 'excavation',
meta:{nav:22,},
meta:{nav:202,},
component: () => import(/* webpackChunkName: "excavation" */ '../pages/safe/excavation.vue')
}
, {
path: '/towerCrane',
name: 'towerCrane',
meta:{nav:21,},
meta:{nav:201,},
component: () => import(/* webpackChunkName: "towerCrane" */ '../pages/safe/towerCrane.vue')
}
,