提交代码

dev_xds
姜玉琦 2024-04-25 22:22:16 +08:00
parent 8c4f6c2566
commit 808bd00b14
8 changed files with 495 additions and 324 deletions

View File

@ -111,12 +111,11 @@
</el-form-item>
<el-form-item label="审批内容">
<div v-for="(file, index) in initData.files" :key="index">
<el-button
size="mini"
type="text"
<el-link
type="primary"
icon="el-icon-paperclip"
@click="handledownload(file)"
>{{ file.substring(file.lastIndexOf("/") + 1) }}</el-button
>{{ file.substring(file.lastIndexOf("/") + 1) }}</el-link
>
</div>
</el-form-item>
@ -475,6 +474,10 @@ export default {
height: 100%;
float: left;
padding-left: 20px;
.el-link .el-link--inner{
word-break: break-all !important;
}
}
}
.containers {

View File

@ -53,7 +53,7 @@
<el-form-item label="审批内容" prop="files">
<FileUpload
@input="fileInput"
:limit="18"
:limit="30"
v-model="form.files"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>

View File

@ -53,7 +53,7 @@
<el-form-item label="审批内容" prop="files">
<FileUpload
@input="fileInput"
:limit="18"
:limit="30"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
</el-form-item>

View File

@ -116,12 +116,11 @@
</el-form-item>
<el-form-item label="审批内容">
<div v-for="(file, index) in initData.files" :key="index">
<el-button
size="mini"
type="text"
<el-link
type="primary"
icon="el-icon-paperclip"
@click="handledownload(file)"
>{{ file.substring(file.lastIndexOf("/") + 1) }}</el-button
>{{ file.substring(file.lastIndexOf("/") + 1) }}</el-link
>
</div>
</el-form-item>
@ -255,7 +254,7 @@ export default {
returnTaskList: [], // 退
returnTask: false,
returnTaskBtn: false,
fileTypes:['pdf','png','jpg','jpeg'],
fileTypes: ["pdf", "png", "jpg", "jpeg"],
};
},
computed: {},
@ -619,9 +618,11 @@ export default {
},
handledownload(url) {
let fileType = url.split(".");
if(this.fileTypes.indexOf(fileType[fileType.length-1].toLocaleLowerCase())>-1){
window.open(process.env.VUE_APP_BASE_API+url);
}else{
if (
this.fileTypes.indexOf(fileType[fileType.length - 1].toLocaleLowerCase()) > -1
) {
window.open(process.env.VUE_APP_BASE_API + url);
} else {
this.$download.resource(url);
}
},
@ -671,6 +672,10 @@ export default {
height: 100%;
float: left;
padding-left: 20px;
.el-link .el-link--inner{
word-break: break-all !important;
}
}
}
.containers {

View File

@ -91,7 +91,8 @@
:data="dataList"
:span-method="objectSpanMethod"
height="700"
stripe border
stripe
border
>
<el-table-column
label="项目名称"
@ -102,108 +103,266 @@
fixed="left"
show-overflow-tooltip
/>
<el-table-column label="参建单位" align="left" fixed="left" prop="unitName" width="163" show-overflow-tooltip/>
<el-table-column
label="参建单位"
align="left"
fixed="left"
prop="unitName"
width="163"
show-overflow-tooltip
/>
<el-table-column label="项目详情" align="center">
<el-table-column label="劳务实名制" align="center">
<el-table-column label="劳务人员" align="center" prop="lwry" width="90" show-overflow-tooltip/>
<el-table-column
label="劳务人员"
align="center"
prop="lwry"
width="90"
show-overflow-tooltip
/>
<el-table-column label="实名制接入" align="center" prop="lwsm" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.lwsm==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.lwsm==0" type="danger" effect="dark"></el-tag>
<el-tag v-if="scope.row.lwsm == 1" type="success" effect="dark"
>已接入</el-tag
>
<el-tag v-if="scope.row.lwsm == 0" type="danger" effect="dark"
>未接入</el-tag
>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="节点预警" align="center" prop="jdyj" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.jdyj==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.jdyj==2" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="环境检测" align="center" prop="hjjc" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.hjjc==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.hjjc==0" type="danger" effect="dark"></el-tag>
<el-tag v-if="scope.row.jdyj == 1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.jdyj == 2" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column
label="劳资预警"
align="center"
prop="lzyjs"
width="90"
show-overflow-tooltip
/>
<el-table-column label="项目预警" align="center">
<el-table-column label="AI预警" align="center" prop="aiyjs" width="90" show-overflow-tooltip/>
<el-table-column label="安全预警" align="center" prop="aqyjs" width="90" show-overflow-tooltip/>
<el-table-column label="质量预警" align="center" prop="zlyjs" width="90" show-overflow-tooltip/>
<el-table-column label="环境预警" align="center" prop="hjyjs" width="90" show-overflow-tooltip/>
<el-table-column
label="AI预警"
align="center"
prop="aiyjs"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="安全预警"
align="center"
prop="aqyjs"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="质量预警"
align="center"
prop="zlyjs"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="环境预警"
align="center"
prop="hjyjs"
width="90"
show-overflow-tooltip
/>
</el-table-column>
</el-table-column>
<el-table-column label="安全管理" align="center">
<el-table-column label="安责险" align="center" prop="azx" width="80" show-overflow-tooltip>
<el-table-column
label="安责险"
align="center"
prop="azx"
width="80"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.azx==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.azx==0" type="danger" effect="dark"></el-tag>
<el-tag v-if="scope.row.azx == 1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.azx == 0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="一切险" align="center" prop="yqx" width="80" show-overflow-tooltip>
<el-table-column
label="一切险"
align="center"
prop="yqx"
width="80"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.yqx==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.yqx==0" type="danger" effect="dark"></el-tag>
<el-tag v-if="scope.row.yqx == 1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.yqx == 0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="安全隐患排查" align="center">
<el-table-column label="甲方代表" align="center" prop="aqyhpc_jfdb" width="90" show-overflow-tooltip/>
<el-table-column label="监理单位" align="center" prop="aqyhpc_jldw" width="90" show-overflow-tooltip/>
<el-table-column label="总包单位" align="center" prop="aqyhpc_zbdw" width="90" show-overflow-tooltip/>
<el-table-column
label="甲方代表"
align="center"
prop="aqyhpc_jfdb"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="监理单位"
align="center"
prop="aqyhpc_jldw"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="总包单位"
align="center"
prop="aqyhpc_zbdw"
width="90"
show-overflow-tooltip
/>
</el-table-column>
<el-table-column label="特种人员" align="center" prop="tzry" width="90" show-overflow-tooltip/>
<el-table-column label="应急演练" align="center" prop="yjyl" width="90" show-overflow-tooltip/>
<el-table-column label="教育培训" align="center" prop="zxpx" width="90" show-overflow-tooltip/>
<el-table-column
label="特种人员"
align="center"
prop="tzry"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="应急演练"
align="center"
prop="yjyl"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="教育培训"
align="center"
prop="zxpx"
width="90"
show-overflow-tooltip
/>
</el-table-column>
<el-table-column label="质量管理" align="center">
<el-table-column label="质量隐患排查" align="center">
<el-table-column label="甲方代表" align="center" prop="zlyhpc_jfdb" width="90" show-overflow-tooltip/>
<el-table-column label="监理单位" align="center" prop="zlyhpc_jldw" width="90" show-overflow-tooltip/>
<el-table-column label="总包单位" align="center" prop="zlyhpc_zbdw" width="90" show-overflow-tooltip/>
<el-table-column
label="甲方代表"
align="center"
prop="zlyhpc_jfdb"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="监理单位"
align="center"
prop="zlyhpc_jldw"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="总包单位"
align="center"
prop="zlyhpc_zbdw"
width="90"
show-overflow-tooltip
/>
</el-table-column>
<el-table-column label="取样复试" align="center" prop="clqyfs" width="90" show-overflow-tooltip/>
<el-table-column label="材料封样" align="center" prop="clfy" width="90" show-overflow-tooltip/>
<el-table-column label="实测实量" align="center" prop="cscl" width="90" show-overflow-tooltip/>
<el-table-column label="举牌验收" align="center" prop="jpys" width="90" show-overflow-tooltip/>
<el-table-column
label="取样复试"
align="center"
prop="clqyfs"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="材料封样"
align="center"
prop="clfy"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="实测实量"
align="center"
prop="cscl"
width="90"
show-overflow-tooltip
/>
<el-table-column
label="举牌验收"
align="center"
prop="jpys"
width="90"
show-overflow-tooltip
/>
</el-table-column>
<el-table-column label="视频监控" align="center">
<el-table-column label="实时监控" align="center" prop="ssjk" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.ssjk!=0" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.ssjk==0" type="danger" effect="dark"></el-tag>
<el-tag v-if="scope.row.ssjk != 0" type="success" effect="dark"
>已开通</el-tag
>
<el-tag v-if="scope.row.ssjk == 0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="AI监控" align="center" prop="aijk" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.aijk==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.aijk==0" type="danger" effect="dark"></el-tag>
<el-tag v-if="scope.row.aijk == 1" type="success" effect="dark"
>已开通</el-tag
>
<el-tag v-if="scope.row.aijk == 0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="项目全景" align="center" prop="yssys" width="120" show-overflow-tooltip/>
<el-table-column
label="项目全景"
align="center"
prop="yssys"
width="120"
show-overflow-tooltip
/>
</el-table-column>
<el-table-column label="工程管理" align="center">
<el-table-column label="项目标准化" align="center" prop="bzh" width="120" show-overflow-tooltip/>
<el-table-column label="审批进行中" align="center" prop="gcsq" width="120" show-overflow-tooltip/>
<el-table-column label="审批已完成" align="center" prop="gcsp" width="120" show-overflow-tooltip/>
<el-table-column
label="项目标准化"
align="center"
prop="bzh"
width="120"
show-overflow-tooltip
/>
<el-table-column
label="审批进行中"
align="center"
prop="gcsq"
width="120"
show-overflow-tooltip
/>
<el-table-column
label="审批已完成"
align="center"
prop="gcsp"
width="120"
show-overflow-tooltip
/>
</el-table-column>
</el-table>
</div>
</template>
</template>
<script>
import {
selectStatisticsProjectList, exportView
} from "@/api/statistics/statisticsProject";
import axios from 'axios';
import { saveAs } from 'file-saver';
import { getToken } from '@/utils/auth'
<script>
import {
selectStatisticsProjectList,
exportView,
} from "@/api/statistics/statisticsProject";
import axios from "axios";
import { saveAs } from "file-saver";
import { getToken } from "@/utils/auth";
export default {
export default {
name: "statisticsProject",
components: {},
dicts: [
"project_build_type",
"project_category",
],
dicts: ["project_build_type", "project_category"],
data() {
return {
//
@ -224,8 +383,8 @@
//
rules: {},
depts: [],
dataList:[],
daterangeTime:[],
dataList: [],
daterangeTime: [],
};
},
created() {
@ -261,7 +420,7 @@
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column.propertykey
let _row = 1;
if([0,4,7,8,12,13,18,19,27].includes(columnIndex)){
if ([0, 4, 7, 8, 12, 13, 18, 19, 27].includes(columnIndex)) {
var spanArr = this.getSpanArr(column.property);
_row = spanArr[rowIndex];
}
@ -282,7 +441,10 @@
pos = 0;
} else {
//
if (data[i][spanKey] === data[i - 1][spanKey] && data[i].projectId === data[i - 1].projectId) {
if (
data[i][spanKey] === data[i - 1][spanKey] &&
data[i].projectId === data[i - 1].projectId
) {
spanArr[pos] += 1;
spanArr.push(0);
} else {
@ -301,24 +463,25 @@
this.queryParams.params["beginTime"] = this.daterangeTime[0];
this.queryParams.params["endTime"] = this.daterangeTime[1];
}
let url = process.env.VUE_APP_BASE_API + '/statistics/project/exportView';
let url = process.env.VUE_APP_BASE_API + "/statistics/project/exportView";
axios({
method: 'post',
method: "post",
url: url,
data: this.queryParams,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getToken() }
responseType: "blob",
headers: { Authorization: "Bearer " + getToken() },
}).then((res) => {
this.loading = false;
let timeStamp = new Date().getTime();
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel;charset=utf-8' })
this.saveAs(blob, decodeURIComponent('项目汇总数据_'+timeStamp+'.xlsx'))
})
const blob = new Blob([res.data], {
type: "application/vnd.ms-excel;charset=utf-8",
});
this.saveAs(blob, decodeURIComponent("项目汇总数据_" + timeStamp + ".xlsx"));
});
},
saveAs(text, name, opts) {
saveAs(text, name, opts);
},
},
};
</script>
};
</script>

View File

@ -14,24 +14,22 @@ import com.yanzhu.jh.project.domain.SurProject;
import com.yanzhu.jh.project.domain.vo.ProjectViewExport;
import com.yanzhu.jh.project.domain.vo.ProjectViewJlExport;
import com.yanzhu.jh.project.service.IProjectViewService;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
@ -309,7 +307,7 @@ public class ProjectViewController extends BaseBuildNodeController{
tempCell.setCellStyle(headerStyle);
tempCell = tempRow.createCell(5);
tempCell.setCellValue("环境检测");
tempCell.setCellValue("劳资预警");
tempCell.setCellStyle(headerStyle);
tempCell = tempRow.createCell(6);
@ -493,7 +491,7 @@ public class ProjectViewController extends BaseBuildNodeController{
tempCell.setCellStyle(contentStyle);
tempCell = tempRow.createCell(5);
tempCell.setCellValue(view.getHjjc().equals("0")?"未接入":"已接入");
tempCell.setCellValue(Convert.toStr(view.getLzyjs(),"0"));
tempCell.setCellStyle(contentStyle);
tempCell = tempRow.createCell(6);

View File

@ -87,7 +87,9 @@ public class ProjectViewExport implements Serializable {
private String jdyj;
private String hjjc;
@Excel(name = "劳资预警", width = 20,align = HorizontalAlignment.CENTER)
private String lzyjs;
private String hjyjs;
private String zlyjs;
private String aqyjs;
@ -326,12 +328,12 @@ public class ProjectViewExport implements Serializable {
this.jdyj = jdyj;
}
public String getHjjc() {
return hjjc;
public String getLzyjs() {
return lzyjs;
}
public void setHjjc(String hjjc) {
this.hjjc = hjjc;
public void setLzyjs(String lzyjs) {
this.lzyjs = lzyjs;
}
public String getHjyjs() {

View File

@ -43,7 +43,7 @@
(select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is not null)as gcsp,
(select count(1) from sur_project_standard a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as bzh,
(select count(1) from sur_project_photography a where a.project_id = sp.id and a.is_del=0)as yssys,
'0' as hjjc,
(select count(1) from flow_labour_info a where a.project_id = sp.id and a.deptId=pui.unitId and a.is_del=0) as lzyjs,
'0' as hjyjs,
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=1 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as zlyjs,
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=0 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as aqyjs,