fix: BUG修改
This commit is contained in:
parent
ac6a848247
commit
c4f014fdcf
@ -77,6 +77,7 @@ const changeTab = (e: MouseEvent, i: number) => {
|
||||
// width.value = (e.target as HTMLDivElement).offsetWidth;
|
||||
// 切换的时候把颜色换到第一个
|
||||
ActiveColor.value = 0;
|
||||
value.value = "";
|
||||
emit("update:modelValue", i);
|
||||
};
|
||||
|
||||
|
||||
@ -171,22 +171,22 @@ const formConfig = {
|
||||
{
|
||||
label: "总工程造价(元)",
|
||||
prop: "totalAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "本期完成工程造价(元)",
|
||||
prop: "completeAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至上期末完成工程造价(元)",
|
||||
prop: "lastEndAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至本期末完成工程造价(元)",
|
||||
prop: "nowEndAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
}
|
||||
// {
|
||||
// label: "本期完成形象进度(%)",
|
||||
@ -271,12 +271,12 @@ const formConfig2 = {
|
||||
{
|
||||
label: "合同单价(元)",
|
||||
prop: "contractUnitPrice",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "合同金额(元)",
|
||||
prop: "contractAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至上期末完成工程量",
|
||||
@ -286,7 +286,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "至上期末完成金额(元)",
|
||||
prop: "lastAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "本期完成工程量",
|
||||
@ -296,7 +296,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "本期完成金额(元)",
|
||||
prop: "nowAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "截至本期末完成工程量",
|
||||
@ -306,7 +306,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "截至本期末完成金额(元)",
|
||||
prop: "endAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<el-table-column label="隐患照片">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
v-if="scope.row.image"
|
||||
v-if="scope.row.image && scope.row.image.length > 0"
|
||||
style="width: 38px; height: 28px"
|
||||
:src="scope.row.image[0].url"
|
||||
fit="fill"
|
||||
@ -120,11 +120,11 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<!-- <el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button> -->
|
||||
<!-- <div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button>
|
||||
<el-button type="primary" @click="allSubmit">全部整改完成,提交审核</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
<div class="title-detail">
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<el-table-column label="隐患照片">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
v-if="scope.row.image"
|
||||
v-if="scope.row.image && scope.row.image.length > 0"
|
||||
style="width: 38px; height: 28px"
|
||||
:src="scope.row.image[0].url"
|
||||
fit="fill"
|
||||
@ -120,11 +120,11 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<!-- <el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button> -->
|
||||
<!-- <div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button>
|
||||
<el-button type="primary" @click="allSubmit">全部整改完成,提交审核</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
<div class="title-detail">
|
||||
|
||||
@ -152,22 +152,22 @@ const formConfig = {
|
||||
{
|
||||
label: "总工程造价(元)",
|
||||
prop: "totalAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "本期完成工程造价(元)",
|
||||
prop: "completeAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至上期末完成工程造价(元)",
|
||||
prop: "lastEndAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至本期末完成工程造价(元)",
|
||||
prop: "nowEndAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
}
|
||||
// {
|
||||
// label: "本期完成形象进度(%)",
|
||||
@ -252,12 +252,12 @@ const formConfig2 = {
|
||||
{
|
||||
label: "合同单价(元)",
|
||||
prop: "contractUnitPrice",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "合同金额(元)",
|
||||
prop: "contractAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至上期末完成工程量",
|
||||
@ -267,7 +267,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "至上期末完成金额(元)",
|
||||
prop: "lastAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "本期完成工程量",
|
||||
@ -277,7 +277,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "本期完成金额(元)",
|
||||
prop: "nowAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "截至本期末完成工程量",
|
||||
@ -287,7 +287,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "截至本期末完成金额(元)",
|
||||
prop: "endAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
|
||||
@ -200,7 +200,7 @@
|
||||
<el-table-column label="隐患照片">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
v-if="scope.row.image.length > 0"
|
||||
v-if="scope.row.image && scope.row.image.length > 0"
|
||||
style="width: 38px; height: 28px"
|
||||
:src="scope.row.image[0].url"
|
||||
fit="fill"
|
||||
@ -276,6 +276,7 @@
|
||||
class="face-uploader"
|
||||
:action="`${baseUrl}` + '/xmgl/file/upload'"
|
||||
:show-file-list="false"
|
||||
:before-upload="handleAvatarUpload"
|
||||
:on-success="handleAvatarSuccess"
|
||||
accept="image/jpg, image/jpeg, image/png"
|
||||
>
|
||||
@ -297,13 +298,13 @@
|
||||
<div class="content-select">
|
||||
<div class="member-menu">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
ref="multipleMemberTable"
|
||||
:data="membertableData"
|
||||
row-key="userId"
|
||||
tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column prop="realName" label="检查人员"></el-table-column>
|
||||
<el-table-column prop="account" label="用户名称"></el-table-column>
|
||||
<el-table-column prop="userTel" label="手机号码"></el-table-column>
|
||||
@ -445,7 +446,8 @@ import {
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
const multipleTable = ref(null);
|
||||
const multipleMemberTable = ref();
|
||||
const multipleTable = ref();
|
||||
const memberVisible = ref(false);
|
||||
const store = GlobalStore();
|
||||
const headers = ref({ Authorization: "Bearer " + store.token });
|
||||
@ -623,16 +625,18 @@ const getProjectData = async () => {
|
||||
projectTableData.value = res.result;
|
||||
console.log(res);
|
||||
};
|
||||
const selectMember = async () => {
|
||||
const getMemberList = async () => {
|
||||
const res = await getgovNamelist({});
|
||||
console.log(res);
|
||||
membertableData.value = res.result;
|
||||
};
|
||||
const selectMember = async () => {
|
||||
console.log(membertableData.value);
|
||||
console.log(selectedMemberList.value);
|
||||
selectedMemberList.value.forEach(key => {
|
||||
membertableData.value.forEach(row => {
|
||||
if (row.userId == key.userId) {
|
||||
multipleTable.value.toggleRowSelection(row);
|
||||
multipleMemberTable.value.toggleRowSelection(row, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -656,16 +660,20 @@ const uploadSuccess = (response: any, index: number) => {
|
||||
basicData.value.otherSignature.push({ url: response.result.url });
|
||||
}
|
||||
};
|
||||
// const handleSelectionChange = val => {
|
||||
// console.log(val);
|
||||
// let obj = {};
|
||||
// selectedMemberList.value = val;
|
||||
// // 当检查人员表格数据行勾选变换时触发
|
||||
// selectedMemberList.value = val.reduce((item, next) => {
|
||||
// obj[next.userId] ? "" : (obj[next.userId] = true && item.push(next));
|
||||
// return item;
|
||||
// }, []);
|
||||
// console.log(selectedMemberList.value);
|
||||
// };
|
||||
const handleSelectionChange = val => {
|
||||
console.log(val);
|
||||
let obj = {};
|
||||
selectedMemberList.value = val;
|
||||
// 当检查人员表格数据行勾选变换时触发
|
||||
selectedMemberList.value = val.reduce((item, next) => {
|
||||
obj[next.userId] ? "" : (obj[next.userId] = true && item.push(next));
|
||||
return item;
|
||||
}, []);
|
||||
console.log(selectedMemberList.value);
|
||||
console.log(val);
|
||||
};
|
||||
// const handleSelectionAllChange = val => {
|
||||
// selectedMemberList.value = val;
|
||||
@ -688,6 +696,13 @@ const selectProjectTree = data => {
|
||||
const deleteDangerImg = (index: number) => {
|
||||
dangerForm.value.image.splice(index, 1);
|
||||
};
|
||||
// 图片上传之前
|
||||
const handleAvatarUpload = file => {
|
||||
if (dangerForm.value.image.length == 3) {
|
||||
ElMessage.error("上传图片不能大于三张");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
// 图片上传成功后的钩子
|
||||
const handleAvatarSuccess: UploadProps["onSuccess"] = response => {
|
||||
dangerForm.value.image.push({
|
||||
@ -700,10 +715,10 @@ const submitForm = async () => {
|
||||
ElMessage.error("请添加隐患问题");
|
||||
return;
|
||||
}
|
||||
if (dangerForm.value.image.length == 0) {
|
||||
ElMessage.error("请添加隐患照片");
|
||||
return;
|
||||
}
|
||||
// if (dangerForm.value.image.length == 0) {
|
||||
// ElMessage.error("请添加隐患照片");
|
||||
// return;
|
||||
// }
|
||||
recordData.value.push({
|
||||
...dangerForm.value
|
||||
});
|
||||
@ -769,7 +784,9 @@ watch(
|
||||
watch(visible1, (n, o) => {
|
||||
emits("update:orderDialog", n);
|
||||
});
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getMemberList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -957,7 +974,9 @@ onMounted(() => {});
|
||||
.imgList {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
> div {
|
||||
position: relative;
|
||||
}
|
||||
:deep(.el-icon) {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
|
||||
@ -200,7 +200,7 @@
|
||||
<el-table-column label="隐患照片">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
v-if="scope.row.image.length > 0"
|
||||
v-if="scope.row.image && scope.row.image.length > 0"
|
||||
style="width: 38px; height: 28px"
|
||||
:src="scope.row.image[0].url"
|
||||
fit="fill"
|
||||
@ -276,6 +276,7 @@
|
||||
class="face-uploader"
|
||||
:action="`${baseUrl}` + '/xmgl/file/upload'"
|
||||
:show-file-list="false"
|
||||
:before-upload="handleAvatarUpload"
|
||||
:on-success="handleAvatarSuccess"
|
||||
accept="image/jpg, image/jpeg, image/png"
|
||||
>
|
||||
@ -403,7 +404,12 @@
|
||||
</template>
|
||||
<div class="content-select">
|
||||
<div class="member-menu">
|
||||
<el-table ref="multipleTable" :data="membertableData" tooltip-effect="dark" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
ref="multipleMemberTable"
|
||||
:data="membertableData"
|
||||
tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column prop="realName" label="检查人员"></el-table-column>
|
||||
<el-table-column prop="account" label="用户名称"></el-table-column>
|
||||
@ -438,6 +444,7 @@ import {
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
const multipleMemberTable = ref();
|
||||
const memberVisible = ref(false);
|
||||
const store = GlobalStore();
|
||||
const headers = ref({ Authorization: "Bearer " + store.token });
|
||||
@ -615,10 +622,21 @@ const getProjectData = async () => {
|
||||
projectTableData.value = res.result;
|
||||
console.log(res);
|
||||
};
|
||||
const selectMember = async () => {
|
||||
const getMemberList = async () => {
|
||||
const res = await getgovNamelist({});
|
||||
console.log(res);
|
||||
membertableData.value = res.result;
|
||||
};
|
||||
const selectMember = async () => {
|
||||
console.log(membertableData.value);
|
||||
console.log(selectedMemberList.value);
|
||||
selectedMemberList.value.forEach(key => {
|
||||
membertableData.value.forEach(row => {
|
||||
if (row.userId == key.userId) {
|
||||
multipleMemberTable.value.toggleRowSelection(row, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
memberVisible.value = true;
|
||||
};
|
||||
// 删除用户信息
|
||||
@ -661,6 +679,13 @@ const selectProjectTree = data => {
|
||||
const deleteDangerImg = (index: number) => {
|
||||
dangerForm.value.image.splice(index, 1);
|
||||
};
|
||||
// 图片上传之前
|
||||
const handleAvatarUpload = file => {
|
||||
if (dangerForm.value.image.length == 3) {
|
||||
ElMessage.error("上传图片不能大于三张");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
// 图片上传成功后的钩子
|
||||
const handleAvatarSuccess: UploadProps["onSuccess"] = response => {
|
||||
dangerForm.value.image.push({
|
||||
@ -673,10 +698,10 @@ const submitForm = async () => {
|
||||
ElMessage.error("请添加隐患问题");
|
||||
return;
|
||||
}
|
||||
if (dangerForm.value.image.length == 0) {
|
||||
ElMessage.error("请添加隐患照片");
|
||||
return;
|
||||
}
|
||||
// if (dangerForm.value.image.length == 0) {
|
||||
// ElMessage.error("请添加隐患照片");
|
||||
// return;
|
||||
// }
|
||||
recordData.value.push({
|
||||
...dangerForm.value
|
||||
});
|
||||
@ -741,7 +766,9 @@ watch(
|
||||
watch(visible1, (n, o) => {
|
||||
emits("update:orderDialog", n);
|
||||
});
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getMemberList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -931,7 +958,9 @@ onMounted(() => {});
|
||||
.imgList {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
>div{
|
||||
position: relative;
|
||||
}
|
||||
:deep(.el-icon) {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
|
||||
@ -171,22 +171,22 @@ const formConfig = {
|
||||
{
|
||||
label: "总工程造价(元)",
|
||||
prop: "totalAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "本期完成工程造价(元)",
|
||||
prop: "completeAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至上期末完成工程造价(元)",
|
||||
prop: "lastEndAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至本期末完成工程造价(元)",
|
||||
prop: "nowEndAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
}
|
||||
// {
|
||||
// label: "本期完成形象进度(%)",
|
||||
@ -271,12 +271,12 @@ const formConfig2 = {
|
||||
{
|
||||
label: "合同单价(元)",
|
||||
prop: "contractUnitPrice",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "合同金额(元)",
|
||||
prop: "contractAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "至上期末完成工程量",
|
||||
@ -286,7 +286,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "至上期末完成金额(元)",
|
||||
prop: "lastAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "本期完成工程量",
|
||||
@ -296,7 +296,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "本期完成金额(元)",
|
||||
prop: "nowAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "截至本期末完成工程量",
|
||||
@ -306,7 +306,7 @@ const formConfig2 = {
|
||||
{
|
||||
label: "截至本期末完成金额(元)",
|
||||
prop: "endAmount",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<el-table-column label="隐患照片">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
v-if="scope.row.image"
|
||||
v-if="scope.row.image && scope.row.image.length > 0"
|
||||
style="width: 38px; height: 28px"
|
||||
:src="scope.row.image[0].url"
|
||||
fit="fill"
|
||||
@ -120,11 +120,11 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<!-- <el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button> -->
|
||||
<!-- <div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button>
|
||||
<el-button type="primary" @click="allSubmit">全部整改完成,提交审核</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
<div class="title-detail">
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<el-table-column label="隐患照片">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
v-if="scope.row.image"
|
||||
v-if="scope.row.image && scope.row.image.length > 0"
|
||||
style="width: 38px; height: 28px"
|
||||
:src="scope.row.image[0].url"
|
||||
fit="fill"
|
||||
@ -120,11 +120,11 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<!-- <el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button> -->
|
||||
<!-- <div class="operation-btn" v-if="basicData?.state != 4">
|
||||
<el-button type="info" style="margin-right: 98px">驳回,请尽快整改</el-button>
|
||||
<el-button type="primary">整改完成,全部合格</el-button>
|
||||
<el-button type="primary" @click="allSubmit">全部整改完成,提交审核</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
<div class="title-detail">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user