update code

dev-login
haha 2023-09-10 00:56:59 +08:00
parent db3b88db30
commit 5f33fc5fc5
13 changed files with 517 additions and 259 deletions

View File

@ -13,7 +13,11 @@
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
<script src="https://unpkg.com/element-ui@2.15.13/lib/index.js"></script>
<script src="https://cdn.makalu.cc/js/jquery/3.5.1/jquery.min.js"></script>
<script crossorigin="anonymous" integrity="sha384-gb8mitZ44MWVFB3GKzmtx1OCjOh3Cj4mgusyTvNzl1Nu31l0em1FrApJindwVAe0" src="https://lib.baomitu.com/echarts/4.2.1/echarts.min.js"></script>
<script src="./js/echarts.min.js"></script>
<!--
<script crossorigin="anonymous" integrity="sha384-gb8mitZ44MWVFB3GKzmtx1OCjOh3Cj4mgusyTvNzl1Nu31l0em1FrApJindwVAe0"
src="https://lib.baomitu.com/echarts/4.2.1/echarts.min.js"></script>
-->
<script src="https://cdn.makalu.cc/js/echarts/china.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=6zAD8CIavtzWnkGg0a7roush5maGMIPn"></script>
<style type="text/css">

45
public/js/echarts.min.js vendored 100644

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,7 @@ import materialSeal from './materialSeal/index'
import costOut from './costOut/index'
import checkDetection from './checkDetection/index'
import video from './video/index'
import plan from './plan/index'
import {axios,download} from '@/utils/request'
export default {
project,
@ -39,5 +40,6 @@ export default {
checkDetection,
http:axios,
video,
plan,
downFile:download
}

View File

@ -0,0 +1,21 @@
import request from '@/utils/request'
const listAllTop3=()=>{
return request({
url: `bgscreen/projectPlan/listAllTop3`,
method: 'get'
})
}
const listAll=(type)=>{
return request({
url: `bgscreen/projectPlan/listAll/${type}`,
method: 'get'
})
}
export default{
listAllTop3,
listAll
}

View File

@ -33,9 +33,13 @@ Vue.component("staff-survey-chart", {
init(){
this.getChartData()
},
chartClick(p){
this.$emit("chart-click",p);
},
getChartData(){
//品类金额占比 饼图
var chChart = echarts.init(this.$refs.chart);
chChart.on("click",this.chartClick)
this.echart(chChart,this.data)
},
echart(chChart,chartData){
@ -93,6 +97,7 @@ Vue.component("staff-survey-chart", {
],
yAxis: [
{
triggerEvent:true,
type: 'category',
axisLabel: {
show: false, //让Y轴数据不显示
@ -108,6 +113,7 @@ Vue.component("staff-survey-chart", {
},
data: [],
},{
triggerEvent:true,
show: false,
data: [],
axisLine: {

View File

@ -2,7 +2,7 @@
<div class="my-dialog">
<transition name="el-zoom-in-top">
<div class="popup-project-introduction-max" v-show="showDlg">
<div class="popup-project-introduction-min" :style="{ 'width': width, 'height': height }">
<div class="popup-project-introduction-min" :style="{ 'width': width, 'height': height }" v-loading="loading">
<div class="popup-project-introduction-con">
<div class="popup-project-introduction-title">
<div style="width: 100%;">
@ -43,6 +43,10 @@ export default {
className:{
type:String,
default:'',
},
loading:{
type:Boolean,
default:false,
}
},
data() {

View File

@ -29,16 +29,18 @@
:maintitle="overviewTotal" :legend-opt="legendOpt1" :typedata="typeDistributionData"
:text="overviewText" :height="230"></project-overview-chart>
<rank-chart :data="availabilityData" :showval="true" :height="300" :width="projectCategoryWidth"></rank-chart>
<rank-chart :data="availabilityData" :showval="true" :height="300"
:width="projectCategoryWidth"></rank-chart>
</module-one-2-1>
<module-one-1-1 label="安全/质量管理" >
<div class="warning-info-title" style="padding-left: 20px;" >
<module-one-1-1 label="安全/质量管理">
<div class="warning-info-title" style="padding-left: 20px;">
<div :class="qualityNav == 0 ? 'active' : ''" @click="qualityNavClick(0)"></div>
<div :class="qualityNav == 1 ? 'active' : ''" @click="qualityNavClick(1)"></div>
</div>
<project-overview-chart :sp="'\n'" :maintitle="qualityNavTotal" :legend-opt="legendOpt2" :key="elKey"
:typedata="dangersDatas" :text="qualityNavTitle" :height="220" style="top:0px"></project-overview-chart>
<project-overview-chart :sp="'\n'" :maintitle="qualityNavTotal" :legend-opt="legendOpt2"
:key="elKey" :typedata="dangersDatas" :text="qualityNavTitle" :height="220"
style="top:0px"></project-overview-chart>
</module-one-1-1>
</el-col>
<el-col :span="12">
@ -75,13 +77,17 @@
<el-col :span="12" style="position: relative;">
<module-one-1-1 label="项目进度汇总">
<img src="images/icon2001.png"
style="position: absolute;cursor: pointer;right: 13px;top: 12px;" @click="doShowDlg2">
style="position: absolute;cursor: pointer;right: 13px;top: 12px;"
@click="doShowDlg2">
<div class="warning-info-title" style="padding-left: 20px;">
<div :class="prjProcessNav == 1 ? 'active' : ''" @click="doPrjProcess(1, '在建项目')">在建项目({{ getPrjCateCount(0) }})
<div :class="prjProcessNav == 1 ? 'active' : ''" @click="doPrjProcess(1, '在建项目')">
在建项目({{ getPrjCateCount(0) }})
</div>
<div :class="prjProcessNav == 2 ? 'active' : ''" @click="doPrjProcess(2, '拟建项目')">拟建项目({{ getPrjCateCount(1) }})
<div :class="prjProcessNav == 2 ? 'active' : ''" @click="doPrjProcess(2, '拟建项目')">
拟建项目({{ getPrjCateCount(1) }})
</div>
<div :class="prjProcessNav == 4 ? 'active' : ''" @click="doPrjProcess(4, '完成项目')">完成项目({{ getPrjCateCount(3) }})
<div :class="prjProcessNav == 4 ? 'active' : ''" @click="doPrjProcess(4, '完成项目')">
完成项目({{ getPrjCateCount(3) }})
</div>
</div>
<el-row>
@ -136,7 +142,7 @@
</el-col>
<el-col :span="16" :key="elSumKey">
<staff-survey-chart :height="220" :unit="'个'" :data="prjPrcessData"
:width="140"></staff-survey-chart>
:width="140" @chart-click="planSummaryChartClick"></staff-survey-chart>
</el-col>
</el-row>
</module-one-1-1>
@ -147,12 +153,12 @@
<el-col :span="6">
<module-one-1-1 label="集团新闻">
<el-carousel>
<el-carousel-item v-for="(item,idx) in JournalismList" :key="idx">
<el-carousel-item v-for="(item, idx) in JournalismList" :key="idx">
<div style="height: 94%;text-align: center;" @click="handJournalism(item)">
<img :src="$apiPath + item.mainImage+'.min.jpg'" style="width: 99%;height: 100%;">
<img :src="$apiPath + item.mainImage + '.min.jpg'" style="width: 99%;height: 100%;">
</div>
<div style="text-align: center;font-size: 12px;line-height: 32px;margin-top: -32px;">
{{item.title}}
{{ item.title }}
</div>
</el-carousel-item>
</el-carousel>
@ -163,44 +169,50 @@
<div class="glr-title">开累产值</div>
<div class="labour-education" >
<div style="transform: scale(0.8);margin-left:-20px">
<people-number :number="numberWithCommas((sumCost.totalMonth*1.0||0).toFixed(2))||'0.00'" unit="万元"></people-number>
</div>
<div class="survey_content" style="position: absolute;right: 15px;top: -4px;">
<div class="survey_content_img labour-education_bgd">
<svg class="my-svg-icon"
style="vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="16007">
<path
d="M544.853333 545.322667v54.826666h100.053334a33.749333 33.749333 0 1 1 0 67.541334h-99.989334v91.648a33.749333 33.749333 0 0 1-67.52 0v-91.648h-98.282666a33.749333 33.749333 0 0 1 0-67.52h98.282666v-54.848h-98.282666a33.749333 33.749333 0 0 1 0-67.52h76.565333l-90.176-151.658667a33.856 33.856 0 0 1 58.133333-34.453333l88.298667 148.501333 88.362667-148.501333a33.856 33.856 0 0 1 58.069333 34.453333l-90.176 151.68h76.693333a33.749333 33.749333 0 0 1 0 67.498667H544.853333zM512 110.186667a400 400 0 0 0-284.16 117.674666A400.426667 400.426667 0 0 0 110.208 512a400 400 0 0 0 117.674667 284.16A400.426667 400.426667 0 0 0 512 913.792a400 400 0 0 0 284.16-117.674667A400.426667 400.426667 0 0 0 913.792 512a400 400 0 0 0-117.653333-284.16A400.426667 400.426667 0 0 0 512 110.208zM512 42.666667c259.2 0 469.333333 210.133333 469.333333 469.333333s-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667z"
fill="#8A8A8A" p-id="16008"></path>
</svg>
</div>
<div class="labour-education">
<div style="transform: scale(0.8);margin-left:-20px">
<people-number
:number="numberWithCommas((sumCost.totalMonth * 1.0 || 0).toFixed(2)) || '0.00'"
unit="万元"></people-number>
</div>
<div class="survey_content" style="position: absolute;right: 15px;top: -4px;">
<div class="survey_content_img labour-education_bgd">
<svg class="my-svg-icon"
style="vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="16007">
<path
d="M544.853333 545.322667v54.826666h100.053334a33.749333 33.749333 0 1 1 0 67.541334h-99.989334v91.648a33.749333 33.749333 0 0 1-67.52 0v-91.648h-98.282666a33.749333 33.749333 0 0 1 0-67.52h98.282666v-54.848h-98.282666a33.749333 33.749333 0 0 1 0-67.52h76.565333l-90.176-151.658667a33.856 33.856 0 0 1 58.133333-34.453333l88.298667 148.501333 88.362667-148.501333a33.856 33.856 0 0 1 58.069333 34.453333l-90.176 151.68h76.693333a33.749333 33.749333 0 0 1 0 67.498667H544.853333zM512 110.186667a400 400 0 0 0-284.16 117.674666A400.426667 400.426667 0 0 0 110.208 512a400 400 0 0 0 117.674667 284.16A400.426667 400.426667 0 0 0 512 913.792a400 400 0 0 0 284.16-117.674667A400.426667 400.426667 0 0 0 913.792 512a400 400 0 0 0-117.653333-284.16A400.426667 400.426667 0 0 0 512 110.208zM512 42.666667c259.2 0 469.333333 210.133333 469.333333 469.333333s-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667z"
fill="#8A8A8A" p-id="16008"></path>
</svg>
</div>
</div>
</div>
<div class="glr-title">年度产值</div>
<div class="labour-education" >
<div style="transform: scale(0.8);margin-left:-20px">
<people-number :number="numberWithCommas((sumCost.curYear*1.0||0).toFixed(2))||'0.00'" unit="万元"></people-number>
</div>
<div class="glr-title">年度产值</div>
<div class="labour-education">
<div style="transform: scale(0.8);margin-left:-20px">
<people-number
:number="numberWithCommas((sumCost.curYear * 1.0 || 0).toFixed(2)) || '0.00'"
unit="万元"></people-number>
</div>
</div>
<div class="glr-title">月度产值</div>
<div class="labour-education" >
<div style="transform: scale(0.8);margin-left:-20px">
<people-number :number="numberWithCommas((sumCost.curMonth*1.0||0).toFixed(2))||'0.00'" unit="万元"></people-number>
</div>
<div class="glr-title">月度产值</div>
<div class="labour-education">
<div style="transform: scale(0.8);margin-left:-20px">
<people-number
:number="numberWithCommas((sumCost.curMonth * 1.0 || 0).toFixed(2)) || '0.00'"
unit="万元"></people-number>
</div>
</div>
</div>
</div>
</module-one-1-1>
<module-one-1-1 label="项目监测预警">
<MonitAndWarning></MonitAndWarning>
<MonitAndWarning></MonitAndWarning>
</module-one-1-1>
</el-col>
</el-row>
@ -240,10 +252,10 @@ export default {
},
data() {
return {
elDeptWorks:0,
prj:{},
prjs:[],
elSumKey:0,
elDeptWorks: 0,
prj: {},
prjs: [],
elSumKey: 0,
elKey: 0,
prjInfo: {},
loading: true,
@ -266,9 +278,9 @@ export default {
legendOpt2: {
icon: "rect",
orient: "horizontal",
left:'50%',
top:'top',
itemGap:0,
left: '50%',
top: 'top',
itemGap: 0,
textStyle: {
fontSize: 14,
rich: {
@ -303,8 +315,8 @@ export default {
],
//
qualityNav: 0,
qualityNavTitle:'',
qualityNavTotal:0,
qualityNavTitle: '',
qualityNavTotal: 0,
//
infoNav: 0,
staffText: '在岗人员',
@ -441,49 +453,49 @@ export default {
//
warningInterval: undefined,
forIndex: 0,
projectCategory:[],
projectCategoryWidth:200,
deptInfo:{},
JournalismList:[],
sumCost:{},
projectCategory: [],
projectCategoryWidth: 200,
deptInfo: {},
JournalismList: [],
sumCost: {},
}
},
created() {
this.init()
},
mounted() {
window.xapp=this;
window.xapp = this;
this.$nextTick(() => {
this.loading = true;
});
this.$bus.$on("loadProjects", prjs => {
this.prjs = prjs;
if(this.prj.id==0){
this.prjInfo=this.prjs[1];
if (this.prj.id == 0) {
this.prjInfo = this.prjs[1];
}
});
this.$bus.$on("projectChange", res => {
if(res.id==0){
const func=()=>{
if(this.prjs && this.prjs.length>1){
if (res.id == 0) {
const func = () => {
if (this.prjs && this.prjs.length > 1) {
this.prjInfo = this.prjs[1];
}else{
setTimeout(func,100);
} else {
setTimeout(func, 100);
}
}
func();
}else{
} else {
this.prjInfo = res;
}
this.prj=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.$bus.$on("deptChange",dept=>{
this.deptInfo=dept;
this.$bus.$on("deptChange", dept => {
this.deptInfo = dept;
this.groupByProjectCategory(dept.id);
this.onClickoOverview(0)
this.qualityNavClick(0);
@ -492,72 +504,90 @@ export default {
});
},
methods: {
sumCostOutByDeptId(){
let dt=this.$dt(new Date());
let postData={
year:dt.$y,
month:dt.$M+1
planSummaryChartClick(p){
let idx=0;
if(p.event.target.parent.style && p.event.target.parent.style.text){
if(p.event.target.parent.style.text.includes("正常推进项目")){
idx=2;
}
if(p.event.target.parent.style.text.includes("进度滞后项目")){
idx=1;
}
}else{
idx=p.seriesIndex;
}
if(idx==1||idx==2){
this.$refs.dlg2.showDetailDialog(this.prjProcessNav,idx);
}
},
sumCostOutByDeptId() {
let dt = this.$dt(new Date());
let postData = {
year: dt.$y,
month: dt.$M + 1
};
if(this.prj && this.prj.id>0){
postData.projectId=this.prj.id;
}else{
postData.id=this.deptInfo.id;
if (this.prj && this.prj.id > 0) {
postData.projectId = this.prj.id;
} else {
postData.id = this.deptInfo.id;
}
if(this.callSumCostTime){
if(+new Date() - this.callSumCostTime <400){
if (this.callSumCostTime) {
if (+new Date() - this.callSumCostTime < 400) {
return;
}
}
this.callSumCostTime=+new Date();
this.$api.costOut.sumByDeptId(postData).then(d=>{
this.sumCost=d;
this.callSumCostTime = +new Date();
this.$api.costOut.sumByDeptId(postData).then(d => {
this.sumCost = d;
});
},
qualityNavClick(n){
this.qualityNav=n;
if(n==0){
this.qualityNavTitle="安全隐患总数";
let postData={
deptId:this.deptInfo?.id||0,
roleType:0
qualityNavClick(n) {
this.qualityNav = n;
if (n == 0) {
this.qualityNavTitle = "安全隐患总数";
let postData = {
deptId: this.deptInfo?.id || 0,
roleType: 0
};
this.$api.problemmodify.safetySummary(postData).then(d=>{
this.dangersDatas=(d||[]).map(it=>{
this.$api.problemmodify.safetySummary(postData).then(d => {
this.dangersDatas = (d || []).map(it => {
return {
text:it.problemArea,
prop:'0.0',
name:it.problemArea,
value:+it.roleType||0
text: it.problemArea,
prop: '0.0',
name: it.problemArea,
value: +it.roleType || 0
}
});
let sum=0;
this.dangersDatas.forEach(it=>{
sum+=it.value*1;
let sum = 0;
this.dangersDatas.forEach(it => {
sum += it.value * 1;
})
this.qualityNavTotal=sum;
this.qualityNavTotal = sum;
this.elKey++;
})
}else{
let postData={
deptId:this.deptInfo?.id||0,
roleType:0
} else {
let postData = {
deptId: this.deptInfo?.id || 0,
roleType: 0
};
this.qualityNavTitle="质量隐患总数";
this.$api.problemmodify.qualitySummary(postData).then(d=>{
this.dangersDatas=(d||[]).map(it=>{
this.qualityNavTitle = "质量隐患总数";
this.$api.problemmodify.qualitySummary(postData).then(d => {
this.dangersDatas = (d || []).map(it => {
return {
text:it.problemArea,
prop:'0.0',
name:it.problemArea,
value:+it.roleType||0
text: it.problemArea,
prop: '0.0',
name: it.problemArea,
value: +it.roleType || 0
}
});
let sum=0;
this.dangersDatas.forEach(it=>{
sum+=it.value*1;
let sum = 0;
this.dangersDatas.forEach(it => {
sum += it.value * 1;
})
this.qualityNavTotal=sum;
this.qualityNavTotal = sum;
this.elKey++;
})
}
@ -576,33 +606,33 @@ export default {
this.$refs.dlg1.showDialog()
},
doShowDlg2() {
this.$refs.dlg2.showDialog(this.prjProcessNav,[this.getPrjCateCount(0),this.getPrjCateCount(1),this.getPrjCateCount(3)])
this.$refs.dlg2.showDialog(this.prjProcessNav, [this.getPrjCateCount(0), this.getPrjCateCount(1), this.getPrjCateCount(3)])
},
getPrjCateCount(n){
if(this.projectCategory.length<n+1){
return 0;
}
let tmps=this.projectCategory[n];
if(tmps && tmps.length>0){
let sum=0;
tmps.forEach(d=>{
sum+=d.cnt;
})
return sum;
}
getPrjCateCount(n) {
if (this.projectCategory.length < n + 1) {
return 0;
},
groupByProjectCategory(deptId){
this.$api.project.groupByProjectCategory(deptId,datas=>{
this.projectCategory=datas;
this.prjPrcessTotal=this.getPrjCateCount(0);
let item=this.projectCategory.length>0?this.projectCategory[0]:null;
this.prjPrcessData[0].value=item && item.length>0?item[0].cnt:0;
this.prjPrcessData[1].value=item && item.length>1?item[1].cnt:0;
}
let tmps = this.projectCategory[n];
if (tmps && tmps.length > 0) {
let sum = 0;
tmps.forEach(d => {
sum += d.cnt;
})
return sum;
}
return 0;
},
groupByProjectCategory(deptId) {
this.$api.project.groupByProjectCategory(deptId, datas => {
this.projectCategory = datas;
this.prjPrcessTotal = this.getPrjCateCount(0);
let item = this.projectCategory.length > 0 ? this.projectCategory[0] : null;
this.prjPrcessData[0].value = item && item.length > 0 ? item[0].cnt : 0;
this.prjPrcessData[1].value = item && item.length > 1 ? item[1].cnt : 0;
this.doPrjProcess(1, '在建项目');
this.elKey++;
});
},
},
init() {
@ -624,16 +654,16 @@ export default {
this.prjProcessNav = n;
this.prjPrcessText = text;
n--;
this.prjPrcessTotal=this.getPrjCateCount(n);
let item=this.projectCategory.length>n?this.projectCategory[n]:null;
this.prjPrcessData[0].value=item && item.length>0?item[0].cnt:0;
this.prjPrcessData[1].value=item && item.length>1?item[1].cnt:0;
this.prjPrcessTotal = this.getPrjCateCount(n);
let item = this.projectCategory.length > n ? this.projectCategory[n] : null;
this.prjPrcessData[0].value = item && item.length > 0 ? item[0].cnt : 0;
this.prjPrcessData[1].value = item && item.length > 1 ? item[1].cnt : 0;
this.elSumKey++;
},
//
onWarningInfoNav(n) {
this.infoNav = n
this.staffText = n==0?'在岗人数':'今日出勤'
this.staffText = n == 0 ? '在岗人数' : '今日出勤'
if (n == 0) {
this.surveyUrl = 'images/survey_icon_4.png'
} else {
@ -642,50 +672,50 @@ export default {
this.getDeptWorksList();
},
//
getDeptWorksList(){
let deptId = this.deptInfo?.id||0;
getDeptWorksList() {
let deptId = this.deptInfo?.id || 0;
if (this.infoNav == 0) {
//
this.$api.attendance.getDeptWorksList(deptId,this.prj.id).then(d => {
this.laborPersonnelTotal=0;
this.laborPersonnelData=[{text: "劳务人员", value: 0},{text: "监理人员", value: 0},{text: "总包人员", value: 0}];
if(d.rows.length>0 && d.rows[0]!=null){
this.laborPersonnelData=[];
this.laborPersonnelTotal += d.rows[0].servicePersonnel;
this.laborPersonnelData.push({text: "劳务人员", value: d.rows[0].servicePersonnel});
this.laborPersonnelTotal += d.rows[0].supervisorPersonnel;
this.laborPersonnelData.push({text: "监理人员", value: d.rows[0].supervisorPersonnel});
this.laborPersonnelTotal += d.rows[0].contractorPersonnel;
this.laborPersonnelData.push({text: "总包人员", value: d.rows[0].contractorPersonnel});
}
this.elDeptWorks++;
});
this.$api.attendance.getDeptWorksList(deptId, this.prj.id).then(d => {
this.laborPersonnelTotal = 0;
this.laborPersonnelData = [{ text: "劳务人员", value: 0 }, { text: "监理人员", value: 0 }, { text: "总包人员", value: 0 }];
if (d.rows.length > 0 && d.rows[0] != null) {
this.laborPersonnelData = [];
this.laborPersonnelTotal += d.rows[0].servicePersonnel;
this.laborPersonnelData.push({ text: "劳务人员", value: d.rows[0].servicePersonnel });
this.laborPersonnelTotal += d.rows[0].supervisorPersonnel;
this.laborPersonnelData.push({ text: "监理人员", value: d.rows[0].supervisorPersonnel });
this.laborPersonnelTotal += d.rows[0].contractorPersonnel;
this.laborPersonnelData.push({ text: "总包人员", value: d.rows[0].contractorPersonnel });
}
this.elDeptWorks++;
});
} else {
//
this.$api.attendance.getWorkAttendanceList(deptId).then(d => {
this.laborPersonnelTotal=0;
this.laborPersonnelData=[{text: "劳务人员", value: 0},{text: "监理人员", value: 0},{text: "总包人员", value: 0}];
if(d.rows.length>0 && d.rows[0]!=null){
this.laborPersonnelData=[];
this.laborPersonnelTotal += d.rows[0].servicePersonnel;
this.laborPersonnelData.push({text: "劳务人员", value: d.rows[0].servicePersonnel});
this.laborPersonnelTotal += d.rows[0].supervisorPersonnel;
this.laborPersonnelData.push({text: "监理人员", value: d.rows[0].supervisorPersonnel});
this.laborPersonnelTotal += d.rows[0].contractorPersonnel;
this.laborPersonnelData.push({text: "总包人员", value: d.rows[0].contractorPersonnel});
}
this.elDeptWorks++;
});
this.laborPersonnelTotal = 0;
this.laborPersonnelData = [{ text: "劳务人员", value: 0 }, { text: "监理人员", value: 0 }, { text: "总包人员", value: 0 }];
if (d.rows.length > 0 && d.rows[0] != null) {
this.laborPersonnelData = [];
this.laborPersonnelTotal += d.rows[0].servicePersonnel;
this.laborPersonnelData.push({ text: "劳务人员", value: d.rows[0].servicePersonnel });
this.laborPersonnelTotal += d.rows[0].supervisorPersonnel;
this.laborPersonnelData.push({ text: "监理人员", value: d.rows[0].supervisorPersonnel });
this.laborPersonnelTotal += d.rows[0].contractorPersonnel;
this.laborPersonnelData.push({ text: "总包人员", value: d.rows[0].contractorPersonnel });
}
this.elDeptWorks++;
});
}
},
//
getJournalismList(){
getJournalismList() {
//
this.$api.journalism.getJournalismList().then(d => {
this.JournalismList = d.rows;
});
},
handJournalism(item){
handJournalism(item) {
this.$refs.journalismDlg.showDialog(item);
},
//
@ -708,63 +738,63 @@ export default {
this.overview = n
if (this.overview == 0) {
this.projectCategoryWidth=290;
this.projectCategoryWidth = 290;
this.overviewText = "项目数";
this.surveyUrlSb = 'images/survey_icon_1.png'
} else if (this.overview == 1) {
this.projectCategoryWidth=210;
this.projectCategoryWidth = 210;
this.overviewText = "项目总投资";
this.surveyUrlSb = 'images/survey_icon_2.png'
} else {
this.projectCategoryWidth=210;
this.projectCategoryWidth = 210;
this.overviewText = "项目年投资";
this.surveyUrlSb = 'images/survey_icon_3.png'
}
let year=this.$dt(new Date()).$y;
this.$api.project.groupByCategory(this.deptInfo.id,n,year).then(d=>{
let tmps=(d.data||[]).map(it=>{
let year = this.$dt(new Date()).$y;
this.$api.project.groupByCategory(this.deptInfo.id, n, year).then(d => {
let tmps = (d.data || []).map(it => {
return {
id:it.id,
name:it.projectName,
value:it.deptId/10000.0
id: it.id,
name: it.projectName,
value: it.deptId / 10000.0
}
});
let sum=0;
tmps.forEach(it=>{
sum+=it.value;
let sum = 0;
tmps.forEach(it => {
sum += it.value;
})
this.overviewTotal=sum;
this.typeDistributionData=tmps;
this.overviewTotal = sum;
this.typeDistributionData = tmps;
this.elKey++;
})
this.$api.project.groupByLevel(this.deptInfo.id,n,year).then(d=>{
let tmps=(d.data||[]).map(it=>{
this.$api.project.groupByLevel(this.deptInfo.id, n, year).then(d => {
let tmps = (d.data || []).map(it => {
return {
id:it.id,
text:it.projectName,
value:it.deptId/10000.0,
prop:0,
id: it.id,
text: it.projectName,
value: it.deptId / 10000.0,
prop: 0,
}
});
let sum=0;
tmps.forEach(it=>{
sum+=it.value;
let sum = 0;
tmps.forEach(it => {
sum += it.value;
})
let total=0;
tmps.forEach((it,idx)=>{
it.prop=sum==0?0:(it.value*100.0/sum).toFixed(1)
let total = 0;
tmps.forEach((it, idx) => {
it.prop = sum == 0 ? 0 : (it.value * 100.0 / sum).toFixed(1)
if(idx<tmps.length-1){
total+=it.prop*1;
}else{
if(sum>0){
it.prop=(100-total).toFixed(1);
if (idx < tmps.length - 1) {
total += it.prop * 1;
} else {
if (sum > 0) {
it.prop = (100 - total).toFixed(1);
}
}
})
this.availabilityData=tmps;
this.availabilityData = tmps;
this.elKey++;
})
@ -958,14 +988,17 @@ export default {
position: relative;
bottom: -8px;
}
.number-unit{
.number-unit {
word-break: keep-all;
}
.cost-out{
.labour-education{
.cost-out {
.labour-education {
height: 60px;
.people-number-con{
padding:0px;
.people-number-con {
padding: 0px;
}
}
}

View File

@ -1,12 +1,13 @@
<template>
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" ref="dlg" class="index-dlg3" :class="'font-size-'+fontSize">
<MyDialog v-if="show" v-model="show" :loading="loading" width="1600px" height="850px" ref="dlg" class="index-dlg3" :class="'font-size-'+fontSize">
<template slot="title">
<div class="warning-info-title" style="padding-left: 20px;">
<div class="warning-info-title" style="padding-left: 20px;" v-if="showType=='all'">
<div :class="nav == 1 ? 'active' : ''" class="nav-item" @click="toggleNav(1)">({{ cnts[0] }})</div>
<div :class="nav == 2 ? 'active' : ''" class="nav-item" @click="toggleNav(2)">({{ cnts[1] }})</div>
<div :class="nav == 4 ? 'active' : ''" class="nav-item" @click="toggleNav(4)">({{ cnts[2] }})</div>
</div>
<template v-else>{{ title }}({{ tableData.length }})</template>
</template>
<div class="font-size-tools">
<i class="set-font-size font-size2" @click="fontSize = 2" :class="fontSize==2?'active':''">
@ -47,7 +48,7 @@
<div class="div-text">{{ it.projectName }}</div>
</el-col>
<el-col :span="12" style="display: flex;" v-if="nav!=4">
<el-col :span="12" style="display: flex;" v-if="nav!=4||showType!='all'">
<img src="images/title_icon.png"><span class="sp-lbl">目前状态:</span>
<div class="div-text" :class="getState(it.projectSchedule)">{{ it.projectSchedule==1?'正常':'滞后' }}</div>
</el-col>
@ -115,7 +116,7 @@
</div>
<div v-if="tableData.length==0" style="text-align: center;margin-top:200px;">
<div v-if="tableData.length==0 && !loading" style="text-align: center;margin-top:200px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
@ -133,12 +134,16 @@ export default {
},
data() {
return {
title:'',
dataState:0,
showType:'',
quarterlyName:'',
nav: 1,
show: false,
fontSize:0,
cnts:[],
tableData:[]
tableData:[],
loading:false
};
},
@ -178,10 +183,12 @@ export default {
}),
this.$api.schedule.selectByProjectType(n)
];
this.loading=true;
this.$api.http.all(ajaxs).then(res=>{
this.loading=false;
let prjs=res[0].data||[];
let tmps=res[1].data||[];
this.tableData=prjs.map(it=>{
let objs=prjs.map(it=>{
it.projectName=it.project?.projectName||'';
it.projectSchedule=it.project?.projectSchedule||'1';
let objs=tmps.filter(item=>it.id==item.projectId);
@ -191,6 +198,15 @@ export default {
}
return it;
}).sort((a,b)=>b.projectSchedule-a.projectSchedule);
if(this.showType=="all"){
this.tableData=objs;
}else{
if(this.dataState==1){
this.tableData=objs.filter(ob=>ob.projectSchedule!=1);
}else{
this.tableData=objs.filter(ob=>ob.projectSchedule==1);
}
}
})
},
@ -204,12 +220,14 @@ export default {
this.$api.schedule.selectByProjectType(n),
this.$api.buildNode.queryByProjectTypeNoTree(n)
];
this.loading=true;
this.$api.http.all(ajaxs).then(res=>{
this.loading=false;
let prjs=res[0].data||[];
let tmps=res[1].data||[];
let nodes=res[2]||[];
let findNodes=['01','02','03','04','05'];
this.tableData=prjs.map(it=>{
let objs=prjs.map(it=>{
it.projectName=it.project?.projectName||'';
it.projectSchedule=it.project?.projectSchedule||'1';
let objs=tmps.filter(item=>it.id==item.projectId);
@ -220,23 +238,56 @@ export default {
it.nodes=this.$api.buildNode.toTree(nds);
return it;
}).sort((a,b)=>b.projectSchedule-a.projectSchedule);
if(this.showType=="all"){
this.tableData=objs;
}else{
if(this.dataState==1){
this.tableData=objs.filter(ob=>ob.projectSchedule!=1);
}else{
this.tableData=objs.filter(ob=>ob.projectSchedule==1);
}
}
})
},
loadData4(n){
this.loading=true;
this.$api.schedule.selectByProjectType(n).then(d=>{
this.tableData=(d.data||[]).map(it=>{
this.loading=false;
let objs=(d.data||[]).map(it=>{
it.projectName=it.surProject?.projectName||''
it.projectSchedule=it.surProject?.projectSchedule||'1'
return it;
}).sort((a,b)=>b.projectSchedule-a.projectSchedule);;
if(this.showType=="all"){
this.tableData=objs;
}else{
if(this.dataState==1){
this.tableData=objs.filter(ob=>ob.projectSchedule!=1);
}else{
this.tableData=objs.filter(ob=>ob.projectSchedule==1);
}
}
})
},
showDialog(n,cnts) {
this.loading=true;
this.tableData=[]
this.showType="all";
this.cnts=cnts;
this.nav=n;
this.toggleNav(n);
this.show = true
}
},
showDetailDialog(n,type){
this.loading=true;
this.tableData=[]
this.showType="detail";
this.nav=n;
this.dataState=type;
this.toggleNav(n);
this.title=["","在建项目","拟建项目","","完成项目"][n]+"-"+(type==1?'进度滞后项目':'正常推进项目');
this.show=true;
},
},
};
</script>

View File

@ -5,6 +5,8 @@ import './style/index.less'
import dayfilter from '@/utils/dayfilter'
import {tryToJson} from '../utils/tools'
import H265Player from '../components/h265-player/index'
import { Loading } from 'element-ui';
Loading.install(Vue);
H265Player.install(Vue);
dayfilter(Vue);
const vue=new Vue();

View File

@ -13,7 +13,9 @@
<el-table v-show="nav == 0" :data="tableData1" class="mytable" height="500" style="width: 100%;background: transparent;"
ref="fbsubordinateUnit">
<el-table-column prop="num" label="序号" class-name="text-left" width="100"> </el-table-column>
<el-table-column prop="num" label="序号" class-name="text-left" width="100">
<template slot-scope="scope">{{ scope.$index+1}}</template>
</el-table-column>
<el-table-column prop="prj" label="项目名称" width="400" class-name="text-left"> </el-table-column>
<el-table-column prop="detail" label="建设规模及主要工程内容" class-name="text-left">
<template slot-scope="scope">
@ -21,7 +23,7 @@
</template>
</el-table-column>
<el-table-column prop="prop" label="建设性质(新建/续建/前期)" width="100">
<el-table-column prop="prop" label="建设性质" width="100">
<template slot-scope="scope">
<span style="color:red">{{ scope.row.prop }}</span>
</template>
@ -40,7 +42,9 @@
<el-table v-show="nav == 1" :data="tableData2" class="mytable" height="500" style="width: 100%;background: transparent;"
ref="fbsubordinateUnit">
<el-table-column prop="num" label="序号" class-name="text-left" width="100"> </el-table-column>
<el-table-column prop="num" label="序号" class-name="text-left" width="100">
<template slot-scope="scope">{{ scope.$index+1}}</template>
</el-table-column>
<el-table-column prop="prj" label="项目名称" width="400" class-name="text-left"> </el-table-column>
<el-table-column prop="detail" label="建设规模及主要工程内容" class-name="text-left">
<template slot-scope="scope">
@ -48,7 +52,7 @@
</template>
</el-table-column>
<el-table-column prop="prop" label="建设性质(新建/续建/前期)" width="100">
<el-table-column prop="prop" label="建设性质" width="100">
<template slot-scope="scope">
<span style="color:red">{{ scope.row.prop }}</span>
</template>
@ -210,13 +214,42 @@ export default {
]
this.initData();
},
methods: {
initData(){
this.tableData1=[];
this.tableData2=[];
let ajaxs=[
this.$api.plan.listAll(0),
this.$api.plan.listAll(1),
];
this.$api.http.all(ajaxs).then(res=>{
this.tableData1=this.convertData(res[0].data||[]);
this.tableData2=this.convertData(res[1].data||[]);
});
},
convertData(tmps){
return tmps.map(it=>{
return{
prj:it.projectName,
detail:it.content,
prop:it.buildType,
department:it.dept,
startTime:it.startDate,
endTime:it.endDate,
taotal:it.totalInvestment,
year:it.yearInvestment,
...it
}
});
},
toggleNav(n) {
this.nav = n;
},
showDialog(n) {
this.initData();
this.nav=n;
this.show = true
}

View File

@ -104,13 +104,16 @@
<el-col :span="12">
<module-one-1-2 label="项目推进明细">
<el-row style="padding: 20px;" :key="elKey">
<el-col :span="12">
<el-col :span="12" style="position: relative;">
<img src="images/icon2001.png"
style="position: absolute;cursor: pointer;right: 24px;top: 12px;"
@click="showPrjSummary">
<div class="warning-info-title my-warning-info-title">
<div :class="pushNav == 0 ? 'active' : ''" @click="doPushNav(0, '在建项目')">在建项目({{
<div :class="pushNav == 1 ? 'active' : ''" @click="doPushNav(1, '在建项目')">在建项目({{
getPrjCateCount(0) }})</div>
<div :class="pushNav == 1 ? 'active' : ''" @click="doPushNav(1, '拟建项目')">拟建项目({{
<div :class="pushNav == 2 ? 'active' : ''" @click="doPushNav(2, '拟建项目')">拟建项目({{
getPrjCateCount(1) }})</div>
<div :class="pushNav == 3 ? 'active' : ''" @click="doPushNav(3, '完成项目')">完成项目({{
<div :class="pushNav == 4 ? 'active' : ''" @click="doPushNav(4, '完成项目')">完成项目({{
getPrjCateCount(3) }})</div>
</div>
<el-row>
@ -126,7 +129,7 @@
</div>
</el-col>
<el-col :span="16">
<staff-survey-chart :height="220" unit=" " :data="pushData"
<staff-survey-chart :height="220" unit=" " :data="pushData" @chart-click="planSummaryChartClick"
:width="140"></staff-survey-chart>
</el-col>
</el-row>
@ -358,6 +361,7 @@
<index-dlg1 ref="dlg1"></index-dlg1>
<index-dlg2 ref="dlg2"></index-dlg2>
<index-dlg3 ref="dlg3"></index-dlg3>
<prj-summary-dlg ref="prjSummary"></prj-summary-dlg>
<build-node-dlg ref="buildNodeDlg"></build-node-dlg>
</div>
</template>
@ -374,6 +378,7 @@ import '../components/screen-select'
import indexDlg1 from './progress/indexDlg1'
import indexDlg2 from './progress/indexDlg2'
import indexDlg3 from './progress/indexDlg3'
import PrjSummaryDlg from './index/indexDlg2.vue'
import problemProgress from './progress/problemProgress.vue'
import buildNodeDlg from './progress/buildNodeDlg.vue'
export default {
@ -382,7 +387,8 @@ export default {
indexDlg2,
indexDlg3,
problemProgress,
buildNodeDlg
buildNodeDlg,
PrjSummaryDlg
},
data() {
return {
@ -393,7 +399,7 @@ export default {
nodePLanData: [],
assessData: [],
pushUrl: 'images/company_6.png',
pushNav: 0,
pushNav: 1,
pushText: '在建项目',
pushCount: 35,
pushData: [
@ -452,6 +458,7 @@ export default {
},
created() {
this.init()
this.loadPlan();
},
mounted() {
window.app = this;
@ -473,6 +480,45 @@ export default {
})
},
methods: {
planSummaryChartClick(p){
let idx=0;
if(p.event.target.parent.style && p.event.target.parent.style.text){
if(p.event.target.parent.style.text.includes("正常推进项目")){
idx=2;
}
if(p.event.target.parent.style.text.includes("进度滞后项目")){
idx=1;
}
}else{
idx=p.seriesIndex;
}
if(idx==1||idx==2){
this.$refs.prjSummary.showDetailDialog(this.pushNav,idx);
}
},
showPrjSummary(){
this.$refs.prjSummary.showDialog(this.pushNav,[this.getPrjCateCount(0),this.getPrjCateCount(1),this.getPrjCateCount(3)])
},
loadPlan(){
this.$api.plan.listAllTop3().then(d=>{
let tmps=(d.data||[]).map(it=>{
return{
prj:it.projectName,
detail:it.content,
prop:it.buildType,
department:it.dept,
startTime:it.startDate,
endTime:it.endDate,
taotal:it.totalInvestment,
year:it.yearInvestment,
...it
}
});
this.planData1=tmps.filter(d=>d.planType==0);
this.planData2=tmps.filter(d=>d.planType==1);
})
},
selectCompletionRate(){
let postData = {}
if (this.prjInfo.id == 0) {
@ -486,8 +532,8 @@ export default {
},
selectScheduledAlerts() {
let postData = {}
if (this.prjInfo.id == 0) {
postData.id = this.dept.id;
if ((this.prjInfo?.id||0) == 0) {
postData.id = this.dept?.id||0;
} else {
postData.projectId = this.prjInfo.id;
}
@ -585,6 +631,7 @@ export default {
this.pushNav = n;
this.pushText = t;
this.pushUrl = ['images/company_6.png', 'images/company_5.png', 'images/company_4.png'][n]
n--;
this.pushCount = this.getPrjCateCount(n);
let item = this.projectCategory.length > n ? this.projectCategory[n] : null;
this.pushData[0].value = item && item.length > 0 ? item[0].cnt : 0;
@ -672,14 +719,14 @@ export default {
}
return 0;
},
groupByProjectCategory(detpId){
this.$api.project.groupByProjectCategory(detpId,datas => {
groupByProjectCategory(deptId) {
this.$api.project.groupByProjectCategory(deptId, datas => {
this.projectCategory = datas;
this.pushCount = this.getPrjCateCount(0);
this.prjPrcessTotal = this.getPrjCateCount(0);
let item = this.projectCategory.length > 0 ? this.projectCategory[0] : null;
this.pushData[0].value = item && item.length > 0 ? item[0].cnt : 0;
this.pushData[1].value = item && item.length > 1 ? item[1].cnt : 0;
this.doPushNav(0, '在建项目');
this.doPushNav(1, '在建项目');
this.elKey++;
});
},

View File

@ -622,7 +622,7 @@ export default {
}
this.videoListData = videoListData
debugger
this.playVideo();
@ -1338,7 +1338,7 @@ export default {
this.oWebControl.JS_Disconnect().then(function () { }, function () { });
},
videoPlay(video) {
debugger
//
// var VideoDistribution = this.VideoDistribution
// for (var i = 0; i < VideoDistribution.length; i++) {

View File

@ -98,3 +98,13 @@
}
}
}
.el-loading-mask{
background-color: rgba(255,255,255,.4);
.el-loading-spinner{
.circular{
right:unset;
width: 100px;
height: 100px;
}
}
}