fix: BUG修改

This commit is contained in:
kun 2023-09-06 19:08:55 +08:00
parent d50611763b
commit e8b189cd90
19 changed files with 1201 additions and 6 deletions

View File

@ -707,3 +707,9 @@ export const monthlyReportDetails = (params: any) => {
export const engineerMainDetails = (params: any) => { export const engineerMainDetails = (params: any) => {
return http.post(BASEURL + `/project/engineering/queryAndMainById`, params); return http.post(BASEURL + `/project/engineering/queryAndMainById`, params);
}; };
// 危大工程
// 危大工程台账
export const dangerousEngineerPage = (params: any) => {
return http.post(BASEURL + `/project/dangerousEngineering/page`, params);
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

View File

@ -7,13 +7,14 @@ import { AMAP_MAP_KEY } from "@/config/config";
// see: https://lbs.amap.com/api/jsapi-v2/guide/abc/prepare // see: https://lbs.amap.com/api/jsapi-v2/guide/abc/prepare
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
securityJsCode: "df19aa4c9f83a52f7ef66843449f438e" // 密钥 securityJsCode: "df19aa4c9f83a52f7ef66843449f438e" // 密钥
// securityJsCode: "6caf6429e4b98cf7f39db9bf7014a78b" // 密钥
}; };
const amap = (async function (Loader, AMAP_MAP_KEY) { const amap = (async function (Loader, AMAP_MAP_KEY) {
return Loader.load({ return Loader.load({
key: AMAP_MAP_KEY, key: AMAP_MAP_KEY,
version: "2.0", version: "2.0",
plugins: ["AMap.PlaceSearch", "AMap.AutoComplete", "AMap.Geocoder"] plugins: ["AMap.AutoComplete", "AMap.PlaceSearch", "AMap.Geocoder"]
}); });
})(AMapLoader, AMAP_MAP_KEY); })(AMapLoader, AMAP_MAP_KEY);

View File

@ -13,7 +13,11 @@
<h4 :id="titleId" :class="titleClass">坐标拾取</h4> <h4 :id="titleId" :class="titleClass">坐标拾取</h4>
<div class="search-container"> <div class="search-container">
<div class="search-item"> <div class="search-item">
<label class="search"><span>请输入地址</span><el-input id="map-input" v-model="address" /></label> <label class="search"
><span>请输入地址</span>
<el-input id="map-input" v-model="address" />
<!-- <input id="input" type="text" /> -->
</label>
<!-- <el-button class="btn-search" type="primary">搜索</el-button> --> <!-- <el-button class="btn-search" type="primary">搜索</el-button> -->
</div> </div>
<div class="search-item"> <div class="search-item">
@ -98,7 +102,7 @@ const open = async () => {
}); });
// POI // POI
autocomplete.value = new AMap.AutoComplete({ extensions: "all", input: "map-input" }); autocomplete.value = new AMap.AutoComplete({ input: "map-input" });
search.value = new AMap.PlaceSearch({ map: map.value, extensions: "base" }); search.value = new AMap.PlaceSearch({ map: map.value, extensions: "base" });
autocomplete.value?.on("select", (e: any) => { autocomplete.value?.on("select", (e: any) => {
map.value?.clearMap(); map.value?.clearMap();

View File

@ -18,7 +18,9 @@
<span class="row-span" <span class="row-span"
>检查情况 >检查情况
<span>{{ <span>{{
basicData?.state == 1 basicData?.state == 0
? "待检查"
: basicData?.state == 1
? "执法中" ? "执法中"
: basicData?.state == 2 : basicData?.state == 2
? "待整改" ? "待整改"

View File

@ -120,7 +120,7 @@
</div> </div>
<div class="right"> <div class="right">
<el-form-item label="所属国企:" prop="authorityEnterprise"> <el-form-item label="所属国企:" prop="authorityEnterprise" v-if="ruleForm.isAuthority == 1">
<el-input disabled style="width: 100%" v-model="ruleForm.authorityEnterprise" placeholder="国企所属集团"> <el-input disabled style="width: 100%" v-model="ruleForm.authorityEnterprise" placeholder="国企所属集团">
</el-input> </el-input>
</el-form-item> </el-form-item>

View File

@ -65,6 +65,11 @@ export const rules = reactive<FormRules>({
required: true, required: true,
message: "请输入统一社会信用码", message: "请输入统一社会信用码",
trigger: "blur" trigger: "blur"
},
{
pattern: /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/,
message: "格式错误",
trigger: "blur"
} }
// { // {
// type: "number", // type: "number",

View File

@ -0,0 +1,274 @@
<template>
<div class="overview">
<el-dialog :show-close="false" v-model="visible1" width="1305px" @close="closeMain">
<template #title>
<div class="title-detail">
<span>新增危大工程</span>
<el-icon>
<close @click="closeMain" />
</el-icon>
</div>
</template>
<el-form ref="formRef" :model="formData" label-width="180px" :rules="rules" class="basic-form" size="default">
<div class="basic-info">
<div class="content-title">基本信息</div>
<el-row :gutter="120">
<el-col :span="12">
<el-form-item label="危大工程名称:" prop="engineeringName">
<el-input v-model="formData.engineeringName" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="危大工程类别:" prop="type">
<el-select v-model="formData.type" placeholder="请选择" style="width: 100%">
<el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="120">
<el-col :span="12">
<el-form-item label="危大工程概况:" prop="engineeringSurvey">
<el-input v-model="formData.engineeringSurvey" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="类别描述:" prop="typeDescribe">
<el-input v-model="formData.typeDescribe" placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="120">
<el-col :span="12">
<el-form-item label="施工部位:" prop="constructionLocation">
<el-input v-model="formData.constructionLocation" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="施工计划:" prop="constructionPlanTime">
<el-date-picker
style="width: 100%"
v-model="formData.constructionPlanTime"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
type="date"
placeholder="请选择时间"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="120">
<el-col :span="12">
<el-form-item label="责任人:" prop="personLiable">
<el-input v-model="formData.personLiable" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="责任分包单位:" prop="responsibilityCompany">
<el-input v-model="formData.responsibilityCompany" placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
</div>
<div class="basic-info">
<div class="content-title">危大工程资料</div>
<el-row :gutter="120">
<el-col :span="12">
<el-form-item label="安全技术交底:" prop="devName">
<div class="switch-box">
<el-switch v-model="formData.technicalDisclosureType" :active-value="2" :inactive-value="1" />
<span>未完成</span>
<el-button type="primary">点击上传</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="安全专项施工方案及附件:" prop="devNumber">
<div class="switch-box">
<el-switch v-model="formData.securityConstructionSchemeType" :active-value="2" :inactive-value="1" />
<span>未完成</span>
<el-button type="primary">点击上传</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="120">
<el-col :span="12">
<el-form-item label="专项施工方案交底:" prop="devName">
<div class="switch-box">
<el-switch v-model="formData.specialConstructionSchemeType" :active-value="2" :inactive-value="1" />
<span>未完成</span>
<el-button type="primary">点击上传</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<template #footer>
<el-button class="cancelButtonStyle" @click="visible1 = false">取消</el-button>
<el-button type="primary" @click="confirm(formRef)"> 保存 </el-button>
</template>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref, watch } from "vue";
import type { FormInstance, UploadProps } from "element-plus";
import { ElMessage } from "element-plus";
import { submitMonthlyReport, engineerMainDetails } from "@/api/modules/project";
import { getDicList } from "@/api/modules/jxjview";
const props = defineProps({
addVisible: Boolean,
searchSn: String,
activeValue: String,
relativeId: String
});
const emits = defineEmits(["update:addVisible", "confirm"]);
const typeList = ref([]);
const rules = ref({
engineeringName: [
{
required: true,
message: "请输入",
trigger: "blur"
}
],
type: [
{
required: true,
message: "请输入",
trigger: "change"
}
],
typeDescribe: [
{
required: true,
message: "请输入",
trigger: "blur"
}
]
});
const formRef = ref<FormInstance>();
const fileList = ref([]);
const formData = ref<any>({
technicalDisclosureFile: "",
securityConstructionSchemeFile: "",
specialConstructionSchemeFile: ""
});
const visible1 = ref(false);
const getTypeDicMainList = async () => {
//
const { result } = await getDicList({ dictType: "dangerous_engineer_type" });
if (result.length > 0) {
let arr: any = [];
result.map(item => {
arr.push({
label: item.dictValue,
value: item.dictLabel
});
});
typeList.value.length = 0;
typeList.value.push(...arr);
}
};
//
const confirm = async (formEl: FormInstance | undefined) => {
if (!formEl) return;
await formEl.validate((valid, fields) => {
if (valid) {
} else {
console.log("error submit!", fields);
ElMessage({
showClose: true,
message: "请完善表单信息!",
type: "error"
});
}
});
};
//
const closeMain = () => {
visible1.value = false;
emits("update:addVisible", false);
};
watch(
() => props.addVisible,
n => {
if (n) {
if (n) {
getTypeDicMainList();
fileList.value = [];
formData.value = {};
}
visible1.value = n;
}
}
);
watch(
() => visible1,
n => {
emits("update:addVisible", n);
}
);
onMounted(() => {});
</script>
<style lang="scss" scoped>
@mixin flex {
display: flex;
align-items: center;
}
@mixin title {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
border-left: 2px solid #008bff;
padding-left: 5px;
}
.overview {
:deep() {
.el-dialog__body {
padding-top: 0;
padding-bottom: 0;
}
}
.title-detail {
@include flex;
border-left: 3px solid #0f81ff;
margin-bottom: 5px;
> span {
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
margin-left: 12px;
margin-right: auto;
font-size: 18px;
}
:deep(.el-icon) {
cursor: pointer;
color: #a8abb2;
}
}
.basic-form {
margin-bottom: 42px;
.basic-info {
.content-title {
@include title;
margin-bottom: 35px;
}
.switch-box {
width: 100%;
display: flex;
align-items: center;
> span {
margin-right: auto;
margin-left: 9px;
}
}
}
}
}
</style>

View File

@ -0,0 +1,590 @@
<template>
<div class="overview">
<el-dialog :show-close="false" v-model="visible1" width="1305px" @close="closeMain">
<template #title>
<div class="title-detail">
<span>月报详情</span>
<el-icon>
<close @click="closeMain" />
</el-icon>
</div>
</template>
<div class="report-content" id="monthlyReport">
<div class="title">{{ engineerData.engineeringName }}</div>
<div class="title">建设监理工作月报</div>
<div class="sub-title">
<span></span>
<span>{{ formData.stage }}</span>
<span></span>
</div>
<div class="sub-title">{{ engineerData.supervisorEnt }}</div>
<div class="title">监理月报签认表</div>
<div class="engineer-name">工程名称{{ engineerData.engineeringName }}</div>
<div class="report-content-part1">
<div> 监理工程师</div>
<div>
按照建设工程监理规范和公司的有关规定 完成了天地一号御花园工程 月份监理月报
编写工作请予以审查签认
</div>
<div>编制人员</div>
<div>土建专业监理工程师</div>
<div>水暖专业监理工程师</div>
<div>电气专业监理工程师</div>
<div>签字</div>
</div>
<div class="report-content-part2">
<div>项目监理部总监理工程师签认意见</div>
<div>
<span>{{ formData.signOpinion }}</span>
</div>
<div>
<span>总监理工程师</span>
<span></span>
<span></span>
</div>
</div>
<div class="report-content-part3">
<div>
<div>工程名称</div>
<div>{{ engineerData.engineeringName }}</div>
<div>设计单位</div>
<div>{{ engineerData.designEnt }}</div>
</div>
<div>
<div>建设单位</div>
<div>{{ engineerData.buildEnt }}</div>
<div>施工单位</div>
<div>{{ engineerData.opEnt }}</div>
</div>
</div>
<div class="report-content-part4">
<div><span>形象进度完成情况</span></div>
<div>
<div>
<div><span>实际完成</span></div>
<div>
<span>{{ formData.actualCompletion }}</span>
</div>
</div>
<div>
<div>原因分析</div>
<div>
<span>{{ formData.reasonAnalysis }}</span>
</div>
</div>
</div>
</div>
<div class="report-content-part5">
<div><span>工程签证情况</span></div>
<div>
<div>
<div><span>专题报告例会纪要</span></div>
<div>
<span>{{ formData.meetingSummary }}</span>
</div>
<div><span>内容简要</span></div>
<div>
<span>{{ formData.meetingContentBriefly }}</span>
</div>
</div>
<div>
<div><span>工程质量签证</span></div>
<div>
<span>{{ formData.engineeringQualityVisa }}</span>
</div>
<div><span>内容简要</span></div>
<div>
<span>{{ formData.engineeringContentBriefly }}</span>
</div>
</div>
<div>
<div><span>向施工单位发出的通知指示指令</span></div>
<div>
<span>{{ formData.instructions }}</span>
</div>
<div><span>内容简要</span></div>
<div>
<span>{{ formData.instructionsContentBriefly }}</span>
</div>
</div>
<div>
<div><span>施工单位提出的各种报告</span></div>
<div>
<span>{{ formData.presentation }}</span>
</div>
<div><span>内容简要</span></div>
<div>
<span>{{ formData.presentationContentBriefly }}</span>
</div>
</div>
<div>
<div><span>工程付款签证</span></div>
<div>
<span>{{ formData.projectPaymentVisa }}</span>
</div>
<div><span>内容简要</span></div>
<div>
<span>{{ formData.projectPaymentContentBriefly }}</span>
</div>
</div>
</div>
</div>
<div class="report-content-step">
<div class="step-title">工程进度</div>
<div class="step-sub-title">本月完成情况</div>
<div class="step-input">
<span>{{ formData.thisMonthCompletion }}</span>
</div>
<div class="step-sub-title">下月计划完成</div>
<div class="step-input">
<span>{{ formData.nextMonthPlan }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">工程质量</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.constructionQuality }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">安全环保文明生产</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.civilizationContent }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">费用支付</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.costContent }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">合同管理</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.contractManagement }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">存在的问题</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.existingProblems }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">监理工作小结</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.workSummary }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">下月工作计划</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.nextMonthWorkPlan }}</span>
</div>
</div>
<div class="report-content-step">
<div class="step-title">本月大事记</div>
<div class="step-input" style="margin-top: 11px">
<span>{{ formData.thisMonthEventsRecord }}</span>
</div>
</div>
<div class="report-content-img">
<div class="step-title">工程照片</div>
<div class="img-list">
<img :src="item" alt="" srcset="" v-for="(item, index) in fileList" :key="index" />
</div>
</div>
</div>
<template #footer>
<div>
<el-button type="primary" @click="visible1 = false">关闭</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref, watch, reactive } from "vue";
import { monthlyReportDetails, engineerMainDetails } from "@/api/modules/project";
import printJS from "print-js";
const fileList = ref([]);
const baseUrl = import.meta.env.VITE_API_URL;
const props = defineProps({
detailVisible: Boolean,
searchSn: String,
activeValue: String,
relativeId: String,
searchId: String
});
const emits = defineEmits(["update:detailVisible"]);
const engineerData = ref<any>({});
const formData = ref<any>({
stage: "",
signOpinion: "",
actualCompletion: "",
reasonAnalysis: "",
meetingSummary: "",
meetingContentBriefly: "",
engineeringQualityVisa: "",
engineeringContentBriefly: "",
instructions: "",
instructionsContentBriefly: "",
presentation: "",
presentationContentBriefly: "",
projectPaymentVisa: "",
projectPaymentContentBriefly: "",
thisMonthCompletion: "",
nextMonthPlan: "",
constructionQuality: "",
civilizationContent: "",
costContent: "",
contractManagement: "",
existingProblems: "",
workSummary: "",
nextMonthWorkPlan: "",
thisMonthEventsRecord: ""
});
const visible1 = ref(false);
//
const getDetails = async () => {
const res = await monthlyReportDetails({ id: props.relativeId });
console.log(res);
if (res && res.result) {
formData.value = { ...res.result };
if (formData.value.imageFiles) {
fileList.value = formData.value.imageFiles.split(",");
console.log(fileList.value);
}
}
const res2 = await engineerMainDetails({ id: props.searchId });
console.log(res);
if (res2 && res2.result) {
engineerData.value = { ...res2.result };
}
};
//
const closeMain = () => {
visible1.value = false;
emits("update:detailVisible", false);
};
watch(
() => props.detailVisible,
n => {
if (n) {
getDetails();
visible1.value = n;
}
}
);
watch(
() => visible1,
n => {
emits("update:detailVisible", n);
}
);
onMounted(() => {});
</script>
<style lang="scss" scoped>
@mixin flex {
display: flex;
align-items: center;
}
@mixin title {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
border-left: 2px solid #008bff;
padding-left: 5px;
}
.overview {
:deep() {
.el-dialog__body {
padding-top: 0;
padding-bottom: 0;
}
}
.title-detail {
@include flex;
border-left: 3px solid #0f81ff;
> span {
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
margin-left: 12px;
margin-right: auto;
font-size: 18px;
}
:deep(.el-icon) {
cursor: pointer;
color: #a8abb2;
}
}
.report-content {
.title {
font-size: 23px;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
text-align: center;
}
.sub-title {
@include flex;
justify-content: center;
font-size: 18px;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.sub-title:nth-child(3) {
margin-top: 9px;
}
.sub-title:nth-child(4) {
margin-top: 18px;
}
.title:nth-child(5) {
margin-top: 25px;
}
.engineer-name {
font-size: 16px;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
margin-top: 11px;
}
&-part1 {
padding: 16px 9px;
border: 1px solid #dedede;
margin-top: 11px;
div {
font-size: 16px;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
div:last-child {
text-align: right;
}
div:not(:last-child) {
margin-bottom: 20px;
}
div:nth-child(6) {
margin-bottom: 0px;
}
}
&-part2 {
padding: 16px 9px;
border: 1px solid #dedede;
border-top: 0;
div:nth-child(1) {
font-size: 16px;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
margin-bottom: 14px;
}
div:nth-child(3) {
@include flex;
justify-content: flex-end;
span {
white-space: nowrap;
}
span:first-child {
margin-right: 120px;
}
span:nth-child(2) {
margin-right: 60px;
}
span:last-child {
margin-right: 107px;
}
}
}
&-part3 {
border: 1px solid #dedede;
border-top: 0;
> div {
@include flex;
height: 50px;
> div {
height: 50px;
line-height: 50px;
}
> div:nth-child(2n-1) {
width: 15%;
text-align: center;
}
> div:nth-child(2n) {
width: 35%;
text-indent: 1em;
}
}
> div:nth-child(1) {
> div:not(:last-child) {
border-right: 1px solid #dedede;
border-bottom: 1px solid #dedede;
}
> div:nth-child(4) {
border-bottom: 1px solid #dedede;
}
}
> div:nth-child(2) {
> div:not(:last-child) {
border-right: 1px solid #dedede;
}
}
}
&-part4 {
@include flex;
border: 1px solid #dedede;
border-top: 0;
height: 200px;
> div:nth-child(1) {
@include flex;
justify-content: center;
align-items: center;
width: 3%;
height: 200px;
border-right: 1px solid #dedede;
> span {
display: inline-block;
writing-mode: vertical-lr;
letter-spacing: 4px;
}
}
> div:nth-child(2) {
width: 97%;
> div {
height: 100px;
@include flex;
> div:nth-child(1) {
@include flex;
justify-content: center;
width: calc(12% + 3px);
height: 100%;
border-right: 1px solid #dedede;
border-bottom: 1px solid #dedede;
}
> div:nth-child(2) {
@include flex;
justify-content: center;
flex: 1;
height: 100%;
border-bottom: 1px solid #dedede;
}
}
}
}
&-part5 {
@include flex;
border: 1px solid #dedede;
border-top: 0;
height: 500px;
> div:nth-child(1) {
@include flex;
justify-content: center;
width: 3%;
height: 100%;
border-right: 1px solid #dedede;
> span {
display: inline-block;
writing-mode: vertical-lr;
letter-spacing: 4px;
}
}
> div:nth-child(2) {
width: 97%;
height: 100%;
> div {
height: 100px;
@include flex;
> div:nth-child(2n-1) {
@include flex;
justify-content: center;
width: calc(12% + 3px);
height: 100%;
border-right: 1px solid #dedede;
border-bottom: 1px solid #dedede;
> span {
display: inline-block;
width: 92%;
text-align: center;
}
}
> div:nth-child(2n) {
@include flex;
justify-content: center;
flex: 1;
height: 100%;
border-bottom: 1px solid #dedede;
}
> div:nth-child(3) {
border-left: 1px solid #dedede;
}
}
}
}
&-step {
border: 1px solid #dedede;
border-top: 0;
padding: 14px 23px;
.step-title {
font-size: 16px;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
}
.step-sub-title {
font-size: 16px;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
margin-top: 17px;
margin-bottom: 9px;
}
}
&-img {
border: 1px solid #dedede;
border-top: 0;
padding: 14px 23px;
.step-title {
font-size: 16px;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
margin-bottom: 12px;
}
.img-list {
@include flex;
img {
width: 100px;
height: 100px;
border: 1px solid #ccc;
margin-right: 15px;
}
}
.face-img {
:deep(.face-uploader .el-upload) {
border: 2px dashed #d9d9d9 !important;
cursor: pointer !important;
position: relative !important;
overflow: hidden !important;
}
.face-uploader .el-upload:hover {
border-color: #409eff !important;
}
:deep(.el-icon) {
font-size: 42px;
color: #8c939d;
width: 96px;
height: 96px;
line-height: 53px;
text-align: center;
}
}
}
}
}
</style>

View File

@ -0,0 +1,50 @@
.type-select {
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-gap: 20px;
// display: flex;
// justify-content: space-between;
// align-content: flex-start;
// flex-wrap: wrap;
margin-bottom: 20px;
.sta-item {
background-color: rgba(255, 255, 255, 0.9);
border-radius: 8px 8px 8px 8px;
padding: 24px 0;
&-content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
> img {
width: 44px;
height: 44px;
margin-bottom: 17px;
}
> span:nth-child(2) {
font-size: 36px;
font-family: OPPOSans-Heavy, OPPOSans;
font-weight: 800;
color: #2e3038;
margin-bottom: 8px;
}
> span:nth-child(3) {
font-size: 16px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #6b7275;
}
}
}
}
.table-box {
height: calc(100% - 205px);
:deep() {
.table {
height: 100%;
.table-main {
height: calc(100% - 82px);
}
}
}
}

View File

@ -0,0 +1,261 @@
<template>
<div class="type-select">
<div class="sta-item" v-for="(item, index) in statisticsOption" :key="index">
<div class="sta-item-content">
<img :src="item.img" alt="" />
<span>{{ item.value }}</span>
<span>{{ item.name }}</span>
</div>
</div>
</div>
<div class="table-box">
<div class="table">
<ProTable
ref="proTable"
title="危大工程台账管理"
:columns="columns"
:request-api="getTableList"
:dataCallback="dataCallback"
:tableRowClassName="tableRowClassName"
:tool-button="false"
:pagination="true"
background
:isShowSearch="false"
:onReset="true"
@row-click="rowClick"
>
<template #formButton="scope">
<el-button class="addButtonStyle" @click="handleAddItem">新增</el-button>
</template>
<template #operation="{ row }">
<el-button type="danger" style="margin-right: 5px" link :icon="Delete" @click="deleteItem(row)">删除</el-button>
</template>
</ProTable>
</div>
<!-- 新增危大工程 -->
<engineerAdd
v-model:addVisible="addVisible"
:searchSn="searchSn"
:activeValue="activeValue"
@confirm="confirmAdd"
></engineerAdd>
<!-- 侧边栏选择 -->
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
<template #default="{ data }">
<span style="margin-left: 10px" @click="onUpdate(data)">{{
activeValue == "eng" ? data.engineeringName : data.projectName
}}</span>
</template>
</engineeringEngDrawer>
<allEngineering @click="engVisable = true" />
</div>
</template>
<script setup lang="tsx" name="ProjectSupervisionRecord">
import { ref, onMounted } from "vue";
import { ElMessage } from "element-plus";
import { ColumnProps } from "@/components/ProTable/interface";
import ProTable from "@/components/ProTable/index.vue";
import { User } from "@/api/interface";
import { getDicList } from "@/api/modules/jxjview";
import { Delete } from "@element-plus/icons-vue";
import { jxj_User } from "@/api/types";
import { useHandleData } from "@/hooks/useHandleData";
import engineerAdd from "./components/engineerAdd.vue";
import { getRelevanceList } from "@/api/modules/common";
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
import allEngineering from "@/components/allEngineering/index.vue";
import { monthlyReportPage, updateMonthlyReport, dangerousEngineerPage, getEngineeringName } from "@/api/modules/project";
const activeValue = ref("eng");
const engList = ref([]);
const engVisable = ref(false);
const searchSn = ref("");
const addVisible = ref(false);
const relativeId = ref("");
const statisticsOption = ref([
{
name: "在施危大工程",
value: 0,
img: new URL("@/assets/images/dangerousEngineeringImg/在施危大工程.png", import.meta.url).href,
prop: "inServiceWorker"
},
{
name: "危大工程施工部位",
value: 1,
img: new URL("@/assets/images/dangerousEngineeringImg/危大工程施工部位.png", import.meta.url).href,
prop: "workerAttendanceNum"
},
{
name: "本月检查总数",
value: 6,
img: new URL("@/assets/images/dangerousEngineeringImg/本月检查总数.png", import.meta.url).href,
prop: "ratio"
},
{
name: "本月危大工程导致隐患数量",
value: 4,
img: new URL("@/assets/images/dangerousEngineeringImg/本月危大工程导致隐患数量.png", import.meta.url).href,
prop: "workerAttendanceTotal"
},
{
name: "本月危大工程排查覆盖率",
value: 5,
img: new URL("@/assets/images/dangerousEngineeringImg/本月危大工程排查覆盖率.png", import.meta.url).href,
prop: "workerAttendanceTotal"
},
{
name: "下月计划施工的危大工程",
value: 7,
img: new URL("@/assets/images/dangerousEngineeringImg/下月计划施工的危大工程.png", import.meta.url).href,
prop: "workerAttendanceTotal"
}
]);
const operateDialog = ref(false);
const hoistEquipType = ref([]);
// ProTable 便
const proTable = ref();
//
const columns: ColumnProps[] = [
{ type: "index", label: "序号", width: 80 },
{
prop: "type",
label: "类别",
search: { el: "input" }
},
{
prop: "model",
label: "危大工程"
},
{
prop: "constructionLocation",
label: "施工部位"
},
{
prop: "constructionPlanTime",
label: "施工计划"
},
{
prop: "personLiable",
label: "责任人"
},
{
prop: "responsibilityCompany",
label: "分包单位"
},
{
prop: "equipmentType",
label: "施工进度"
},
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
];
//
const confirmAdd = () => {
proTable.value.getTableList();
};
//
const handleAddItem = () => {
addVisible.value = true;
};
//
const deleteItem = async (params: jxj_User.ResUserList) => {
// await useHandleData(bigStoreDelete, { id: params.id }, `${params.name}`);
};
//
const rowClick = (row: any, column: ColumnProps) => {
console.log("row", row, "column", column);
};
const getDicMainList = async () => {
//
const { result } = await getDicList({ dictType: "hoist_equip_type" });
if (result.length > 0) {
let arr: any = [];
result.map(item => {
arr.push({
label: item.dictValue,
value: item.dictLabel
});
});
hoistEquipType.value.length = 0;
hoistEquipType.value.push(...arr);
}
};
//
const tableRowClassName = ({ rowIndex }: { row: User.ResUserList; rowIndex: number }) => {
console.log(rowIndex);
if (rowIndex === 0) return "warning-row";
if (rowIndex === 6) return "success-row";
return "";
};
// dataCallback list && total && pageNum && pageSize
// hooks/useTable.ts
const dataCallback = (data: any) => {
// console.log(data);
return {
list: data.records,
total: Number(data.total),
pageNo: Number(data.current),
pageSize: Number(data.size)
};
};
// params
// ProTable :requestApi="getUserList"
const getTableList = (params: any) => {
let newParams = JSON.parse(JSON.stringify(params));
if (newParams.timeLimit) {
newParams.createTime_begin = newParams.timeLimit[0];
newParams.createTime_end = newParams.timeLimit[1];
delete newParams.timeLimit;
}
return dangerousEngineerPage(newParams);
};
// tab
const tabsSelect = val => {
activeValue.value = val;
if (val == "eng") {
getengineering();
} else if (val == "project") {
getProject();
}
};
//
const getProject = async () => {
const res = await getEngineeringName();
engList.value = [res.result];
if (res.result) {
searchSn.value = res.result.projectSn;
}
proTable.value.getTableList();
console.log(res);
};
const getengineering = async () => {
// let newParams = JSON.parse(JSON.stringify(params));
const res = await getRelevanceList();
engList.value = res.result;
if (res.result && res.result.length > 0) {
searchSn.value = res.result[0].engineeringSn;
}
proTable.value.getTableList();
console.log(res);
};
//
const onUpdate = async row => {
if (activeValue.value == "eng") {
searchSn.value = row.engineeringSn;
} else if (activeValue.value == "project") {
searchSn.value = row.projectSn;
}
proTable.value.getTableList();
ElMessage.success("页面已更新");
};
onMounted(() => {});
onMounted(async () => {
await getDicMainList();
await getengineering();
});
</script>
<style scoped lang="scss">
@import "./index.scss";
</style>

View File

@ -18,7 +18,9 @@
<span class="row-span" <span class="row-span"
>检查情况 >检查情况
<span>{{ <span>{{
basicData?.state == 1 basicData?.state == 0
? "待检查"
: basicData?.state == 1
? "执法中" ? "执法中"
: basicData?.state == 2 : basicData?.state == 2
? "待整改" ? "待整改"