fix: BUG修改

This commit is contained in:
kun 2023-08-04 13:41:13 +08:00
parent c4f014fdcf
commit d1f6da7ae7
8 changed files with 125 additions and 59 deletions

View File

@ -92,7 +92,7 @@
@row-click="rowClick" @row-click="rowClick"
> >
<el-table-column prop="createByName" label="创建人" /> <el-table-column prop="createByName" label="创建人" />
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -511,6 +511,7 @@ onMounted(() => {});
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
overflow-wrap: anywhere;
} }
.imgList { .imgList {
display: flex; display: flex;

View File

@ -92,7 +92,7 @@
@row-click="rowClick" @row-click="rowClick"
> >
<el-table-column prop="createByName" label="创建人" /> <el-table-column prop="createByName" label="创建人" />
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -512,6 +512,7 @@ onMounted(() => {});
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
overflow-wrap: anywhere;
} }
.imgList { .imgList {
display: flex; display: flex;

View File

@ -79,6 +79,7 @@
placeholder="请选择日期" placeholder="请选择日期"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
:disabledDate="disabledDate"
/></el-col> /></el-col>
<el-col :span="8"> <el-col :span="8">
<span class="row-span">整改类型</span> <span class="row-span">整改类型</span>
@ -196,7 +197,7 @@
:cell-style="{ textAlign: 'center', height: '40px' }" :cell-style="{ textAlign: 'center', height: '40px' }"
> >
<!-- <el-table-column prop="createByName" label="创建人" /> --> <!-- <el-table-column prop="createByName" label="创建人" /> -->
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -343,7 +344,7 @@
<el-input style="width: 200px" v-model="projectForm.name" placeholder="请输入" clearable /> <el-input style="width: 200px" v-model="projectForm.name" placeholder="请输入" clearable />
<el-button type="primary" style="margin-left: 20px" @click="searchData">查询</el-button> <el-button type="primary" style="margin-left: 20px" @click="searchData">查询</el-button>
</div> </div>
<div class="table" v-if="projectTreeData.id"> <div class="table" v-if="projectTreeData.id == 1">
<el-table <el-table
style="width: 100%; height: 350px" style="width: 100%; height: 350px"
ref="multipleTable" ref="multipleTable"
@ -352,26 +353,23 @@
@row-click="projectRowClick" @row-click="projectRowClick"
> >
<!-- <el-table-column type="selection" width="55"></el-table-column> --> <!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column <el-table-column prop="engineeringName" align="center" label="工程名称"></el-table-column>
prop="engineeringName" <el-table-column prop="engineeringTypeName" align="center" label="工程类型"></el-table-column>
align="center" <el-table-column prop="stateName" align="center" label="工程状态"></el-table-column>
label="工程名称" </el-table>
v-if="projectTreeData.id == 1" </div>
></el-table-column> <div class="table" v-if="projectTreeData.id == 2">
<el-table-column <el-table
prop="projectName" style="width: 100%; height: 350px"
align="center" ref="multipleTable"
label="项目名称" :data="projectTableData"
v-if="projectTreeData.id == 2" tooltip-effect="dark"
></el-table-column> @row-click="projectRowClick"
<el-table-column >
:prop="projectTreeData.id == 1 ? 'project_manage' : 'engineering_manage'" <!-- <el-table-column type="selection" width="55"></el-table-column> -->
label="负责人" <el-table-column prop="projectName" align="center" label="项目名称"></el-table-column>
></el-table-column> <el-table-column prop="projectManage" align="center" label="负责人"></el-table-column>
<el-table-column <el-table-column prop="projectTel" align="center" label="手机号码"></el-table-column>
:prop="projectTreeData.id == 1 ? 'project_tel' : 'engineering_tel'"
label="手机号码"
></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
@ -435,7 +433,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
import type { FormInstance, UploadProps } from "element-plus"; import type { FormInstance, UploadProps } from "element-plus";
import { import {
addDividerQuestion, addDividerQuestion,
AIengList, getEngineeringApproveList,
AIproList, AIproList,
getEngineerInfo, getEngineerInfo,
getProjectInfo, getProjectInfo,
@ -491,6 +489,7 @@ const transformDialog = ref(false); // 整改记录对话框
const recordData = ref([]); // const recordData = ref([]); //
const basicData = ref({ const basicData = ref({
// //
requireType: 1,
opSignature: [], opSignature: [],
supervisorSignature: [], supervisorSignature: [],
inspectSignature: [], inspectSignature: [],
@ -501,6 +500,16 @@ const dialogStyle = ref({
}); });
const selectedMemberList = ref([]); // const selectedMemberList = ref([]); //
const selectedSmallList = ref([]); // const selectedSmallList = ref([]); //
//
const disabledDate = date => {
let todayTime = new Date().getTime();
let dateTime = date.getTime();
if (dateTime < todayTime) {
return true;
} else {
return false;
}
};
const deleteImg = (arrIndex, index) => { const deleteImg = (arrIndex, index) => {
// //
switch (arrIndex) { switch (arrIndex) {
@ -591,6 +600,7 @@ const searchData = () => {
}; };
const getRowDetails = async () => { const getRowDetails = async () => {
basicData.value = { basicData.value = {
requireType: 1,
opSignature: [], opSignature: [],
supervisorSignature: [], supervisorSignature: [],
inspectSignature: [], inspectSignature: [],
@ -610,10 +620,12 @@ const getRowDetails = async () => {
const getEngieerData = async () => { const getEngieerData = async () => {
// //
let requestData = { let requestData = {
engineeringName: projectForm.value.name engineeringName: projectForm.value.name,
pageSize: -1,
pageNo: -1
}; };
const res = await AIengList(requestData); const res = await getEngineeringApproveList(requestData);
projectTableData.value = res.result; projectTableData.value = res.result.records;
console.log(res); console.log(res);
}; };
const getProjectData = async () => { const getProjectData = async () => {
@ -728,6 +740,22 @@ const submitForm = async () => {
}; };
// //
const allSubmit = async () => { const allSubmit = async () => {
if (!(projectSelectedData.value.projectName || projectSelectedData.value.engineeringName)) {
ElMessage.error("请选择工程/项目");
return;
}
// if (!basicData.value.selectedMember) {
// ElMessage.error("");
// return;
// }
if (!basicData.value.deadline) {
ElMessage.error("请选择整改期限");
return;
}
if (recordData.value.length == 0) {
ElMessage.error("请添加隐患问题");
return;
}
recordData.value.map(item => { recordData.value.map(item => {
item.image = JSON.stringify(item.image); item.image = JSON.stringify(item.image);
}); });
@ -768,6 +796,7 @@ watch(
visible1.value = n; visible1.value = n;
if (n) { if (n) {
basicData.value = { basicData.value = {
requireType: 1,
opSignature: [], opSignature: [],
supervisorSignature: [], supervisorSignature: [],
inspectSignature: [], inspectSignature: [],

View File

@ -86,13 +86,14 @@
<el-table <el-table
:data="recordData" :data="recordData"
class="el-table" class="el-table"
:show-overflow-tooltip="true"
:row-style="{ height: '40px' }" :row-style="{ height: '40px' }"
:header-cell-style="{ backgroundColor: '#F5F7FA', textAlign: 'center', height: '40px' }" :header-cell-style="{ backgroundColor: '#F5F7FA', textAlign: 'center', height: '40px' }"
:cell-style="{ textAlign: 'center', height: '40px' }" :cell-style="{ textAlign: 'center', height: '40px' }"
@row-click="rowClick" @row-click="rowClick"
> >
<el-table-column prop="createByName" label="创建人" /> <el-table-column prop="createByName" label="创建人" />
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -475,6 +476,7 @@ onMounted(() => {});
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
overflow-wrap: anywhere;
} }
.imgList { .imgList {
display: flex; display: flex;

View File

@ -79,6 +79,7 @@
placeholder="请选择日期" placeholder="请选择日期"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
:disabledDate="disabledDate"
/></el-col> /></el-col>
<el-col :span="8"> <el-col :span="8">
<span class="row-span">整改类型</span> <span class="row-span">整改类型</span>
@ -190,13 +191,14 @@
<div class="table"> <div class="table">
<el-table <el-table
:data="recordData" :data="recordData"
:show-overflow-tooltip="true"
class="el-table" class="el-table"
:row-style="{ height: '40px' }" :row-style="{ height: '40px' }"
:header-cell-style="{ backgroundColor: '#F5F7FA', textAlign: 'center', height: '40px' }" :header-cell-style="{ backgroundColor: '#F5F7FA', textAlign: 'center', height: '40px' }"
:cell-style="{ textAlign: 'center', height: '40px' }" :cell-style="{ textAlign: 'center', height: '40px' }"
> >
<!-- <el-table-column prop="createByName" label="创建人" /> --> <!-- <el-table-column prop="createByName" label="创建人" /> -->
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -355,7 +357,7 @@
<el-input style="width: 200px" v-model="projectForm.name" placeholder="请输入" clearable /> <el-input style="width: 200px" v-model="projectForm.name" placeholder="请输入" clearable />
<el-button type="primary" style="margin-left: 20px" @click="searchData">查询</el-button> <el-button type="primary" style="margin-left: 20px" @click="searchData">查询</el-button>
</div> </div>
<div class="table" v-if="projectTreeData.id"> <div class="table" v-if="projectTreeData.id == 1">
<el-table <el-table
style="width: 100%; height: 350px" style="width: 100%; height: 350px"
ref="multipleTable" ref="multipleTable"
@ -364,26 +366,23 @@
@row-click="projectRowClick" @row-click="projectRowClick"
> >
<!-- <el-table-column type="selection" width="55"></el-table-column> --> <!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column <el-table-column prop="engineeringName" align="center" label="工程名称"></el-table-column>
prop="engineeringName" <el-table-column prop="engineeringTypeName" align="center" label="工程类型"></el-table-column>
align="center" <el-table-column prop="stateName" align="center" label="工程状态"></el-table-column>
label="工程名称" </el-table>
v-if="projectTreeData.id == 1" </div>
></el-table-column> <div class="table" v-if="projectTreeData.id == 2">
<el-table-column <el-table
prop="projectName" style="width: 100%; height: 350px"
align="center" ref="multipleTable"
label="项目名称" :data="projectTableData"
v-if="projectTreeData.id == 2" tooltip-effect="dark"
></el-table-column> @row-click="projectRowClick"
<el-table-column >
:prop="projectTreeData.id == 1 ? 'project_manage' : 'engineering_manage'" <!-- <el-table-column type="selection" width="55"></el-table-column> -->
label="负责人" <el-table-column prop="projectName" align="center" label="项目名称"></el-table-column>
></el-table-column> <el-table-column prop="projectManage" align="center" label="负责人"></el-table-column>
<el-table-column <el-table-column prop="projectTel" align="center" label="手机号码"></el-table-column>
:prop="projectTreeData.id == 1 ? 'project_tel' : 'engineering_tel'"
label="手机号码"
></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
@ -433,7 +432,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
import type { FormInstance, UploadProps } from "element-plus"; import type { FormInstance, UploadProps } from "element-plus";
import { import {
addDividerQuestion, addDividerQuestion,
AIengList, getEngineeringApproveList,
AIproList, AIproList,
getEngineerInfo, getEngineerInfo,
getProjectInfo, getProjectInfo,
@ -488,6 +487,7 @@ const transformDialog = ref(false); // 整改记录对话框
const recordData = ref([]); // const recordData = ref([]); //
const basicData = ref({ const basicData = ref({
// //
requireType: 1,
opSignature: [], opSignature: [],
supervisorSignature: [], supervisorSignature: [],
inspectSignature: [], inspectSignature: [],
@ -498,6 +498,16 @@ const dialogStyle = ref({
}); });
const selectedMemberList = ref([]); // const selectedMemberList = ref([]); //
const selectedSmallList = ref([]); // const selectedSmallList = ref([]); //
//
const disabledDate = date => {
let todayTime = new Date().getTime();
let dateTime = date.getTime();
if (dateTime < todayTime) {
return true;
} else {
return false;
}
};
const deleteImg = (arrIndex, index) => { const deleteImg = (arrIndex, index) => {
// //
switch (arrIndex) { switch (arrIndex) {
@ -588,6 +598,7 @@ const searchData = () => {
}; };
const getRowDetails = async () => { const getRowDetails = async () => {
basicData.value = { basicData.value = {
requireType: 1,
opSignature: [], opSignature: [],
supervisorSignature: [], supervisorSignature: [],
inspectSignature: [], inspectSignature: [],
@ -607,10 +618,12 @@ const getRowDetails = async () => {
const getEngieerData = async () => { const getEngieerData = async () => {
// //
let requestData = { let requestData = {
engineeringName: projectForm.value.name engineeringName: projectForm.value.name,
pageSize: -1,
pageNo: -1
}; };
const res = await AIengList(requestData); const res = await getEngineeringApproveList(requestData);
projectTableData.value = res.result; projectTableData.value = res.result.records;
console.log(res); console.log(res);
}; };
const getProjectData = async () => { const getProjectData = async () => {
@ -710,6 +723,22 @@ const submitForm = async () => {
}; };
// //
const allSubmit = async () => { const allSubmit = async () => {
if (!(projectSelectedData.value.projectName || projectSelectedData.value.engineeringName)) {
ElMessage.error("请选择工程/项目");
return;
}
// if (!basicData.value.selectedMember) {
// ElMessage.error("");
// return;
// }
if (!basicData.value.deadline) {
ElMessage.error("请选择整改期限");
return;
}
if (recordData.value.length == 0) {
ElMessage.error("请添加隐患问题");
return;
}
recordData.value.map(item => { recordData.value.map(item => {
item.image = JSON.stringify(item.image); item.image = JSON.stringify(item.image);
}); });
@ -750,6 +779,7 @@ watch(
visible1.value = n; visible1.value = n;
if (n) { if (n) {
basicData.value = { basicData.value = {
requireType: 1,
opSignature: [], opSignature: [],
supervisorSignature: [], supervisorSignature: [],
inspectSignature: [], inspectSignature: [],
@ -958,7 +988,7 @@ onMounted(() => {
.imgList { .imgList {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
>div{ > div {
position: relative; position: relative;
} }
:deep(.el-icon) { :deep(.el-icon) {

View File

@ -91,7 +91,7 @@
@row-click="rowClick" @row-click="rowClick"
> >
<el-table-column prop="createByName" label="创建人" /> <el-table-column prop="createByName" label="创建人" />
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -484,6 +484,7 @@ onMounted(() => {});
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
overflow-wrap: anywhere;
} }
.imgList { .imgList {
display: flex; display: flex;

View File

@ -92,7 +92,7 @@
@row-click="rowClick" @row-click="rowClick"
> >
<el-table-column prop="createByName" label="创建人" /> <el-table-column prop="createByName" label="创建人" />
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -511,6 +511,7 @@ onMounted(() => {});
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
overflow-wrap: anywhere;
} }
.imgList { .imgList {
display: flex; display: flex;

View File

@ -92,7 +92,7 @@
@row-click="rowClick" @row-click="rowClick"
> >
<el-table-column prop="createByName" label="创建人" /> <el-table-column prop="createByName" label="创建人" />
<el-table-column prop="questionDesc" label="隐患问题" /> <el-table-column prop="questionDesc" label="隐患问题" :show-overflow-tooltip="true" />
<el-table-column label="隐患照片"> <el-table-column label="隐患照片">
<template #default="scope"> <template #default="scope">
<el-image <el-image
@ -511,6 +511,7 @@ onMounted(() => {});
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
overflow-wrap: anywhere;
} }
.imgList { .imgList {
display: flex; display: flex;