fix: BUG修改
This commit is contained in:
parent
5f845dd319
commit
767e85a1a4
@ -300,7 +300,9 @@ const baseUrl = import.meta.env.VITE_API_URL;
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dialogVisible: Boolean,
|
dialogVisible: Boolean,
|
||||||
relativeId: String,
|
relativeId: String,
|
||||||
title: String
|
title: String,
|
||||||
|
searchSn: String,
|
||||||
|
activeValue: String
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:dialogVisible", "confirm"]);
|
const emits = defineEmits(["update:dialogVisible", "confirm"]);
|
||||||
const visible1 = ref(false);
|
const visible1 = ref(false);
|
||||||
@ -382,9 +384,13 @@ const confirm = async () => {
|
|||||||
let requestData = {
|
let requestData = {
|
||||||
...allForm.value,
|
...allForm.value,
|
||||||
detailList: recordData.value,
|
detailList: recordData.value,
|
||||||
annexList: documentData.value,
|
annexList: documentData.value
|
||||||
engineeringSn: globalStore.engineeringSn
|
|
||||||
};
|
};
|
||||||
|
if (props.activeValue == "eng") {
|
||||||
|
requestData.engineeringSn = props.searchSn;
|
||||||
|
} else {
|
||||||
|
requestData.projectSn = props.searchSn;
|
||||||
|
}
|
||||||
if (props.title == "重新发起") {
|
if (props.title == "重新发起") {
|
||||||
requestData.id = props.relativeId;
|
requestData.id = props.relativeId;
|
||||||
}
|
}
|
||||||
@ -467,7 +473,13 @@ const confirm = async () => {
|
|||||||
visible1.value = false;
|
visible1.value = false;
|
||||||
};
|
};
|
||||||
const getSingleEngineerData = async () => {
|
const getSingleEngineerData = async () => {
|
||||||
const res = await singleEngineer({ engineeringSn: globalStore.engineeringSn });
|
let requestData = {};
|
||||||
|
if (props.activeValue == "eng") {
|
||||||
|
requestData.engineeringSn = props.searchSn;
|
||||||
|
} else {
|
||||||
|
requestData.projectSn = props.searchSn;
|
||||||
|
}
|
||||||
|
const res = await singleEngineer(requestData);
|
||||||
singleEngineerList.value = res.result;
|
singleEngineerList.value = res.result;
|
||||||
console.log(res);
|
console.log(res);
|
||||||
};
|
};
|
||||||
@ -548,6 +560,7 @@ watch(
|
|||||||
(n, o) => {
|
(n, o) => {
|
||||||
visible1.value = n;
|
visible1.value = n;
|
||||||
if (n) {
|
if (n) {
|
||||||
|
getSingleEngineerData();
|
||||||
if (props.title == "新增") {
|
if (props.title == "新增") {
|
||||||
allForm.value = {
|
allForm.value = {
|
||||||
stage: "",
|
stage: "",
|
||||||
@ -571,7 +584,6 @@ watch(visible1, (n, o) => {
|
|||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDicMainList();
|
getDicMainList();
|
||||||
getSingleEngineerData();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -487,8 +487,8 @@ onMounted(() => {});
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: -460px;
|
right: -460px;
|
||||||
width: 380px;
|
width: 380px;
|
||||||
height: calc(100% - 31px);
|
|
||||||
min-width: 420px;
|
min-width: 420px;
|
||||||
|
height: calc(100% - 31px);
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2);
|
box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2);
|
||||||
border-radius: 8px 8px 8px 8px;
|
border-radius: 8px 8px 8px 8px;
|
||||||
@ -502,7 +502,8 @@ onMounted(() => {});
|
|||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
width: 56px;
|
display: inline-block;
|
||||||
|
width: 60px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||||
@ -524,11 +525,13 @@ onMounted(() => {});
|
|||||||
img {
|
img {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
:deep(.el-image) {
|
:deep(.el-image) {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -574,10 +577,10 @@ onMounted(() => {});
|
|||||||
.situation-step {
|
.situation-step {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 300px;
|
height: 210px;
|
||||||
.row {
|
.row {
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
text-align: left;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.el-timeline-item) {
|
:deep(.el-timeline-item) {
|
||||||
|
|||||||
@ -41,6 +41,8 @@
|
|||||||
v-model:dialogVisible="dialogVisible"
|
v-model:dialogVisible="dialogVisible"
|
||||||
:title="newTitle"
|
:title="newTitle"
|
||||||
:relativeId="relativeId"
|
:relativeId="relativeId"
|
||||||
|
:searchSn="searchSn"
|
||||||
|
:activeValue="activeValue"
|
||||||
@confirm="confirmReform"
|
@confirm="confirmReform"
|
||||||
></detailsDialog>
|
></detailsDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -284,6 +284,10 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
|||||||
await formEl.validate(async (valid, fields) => {
|
await formEl.validate(async (valid, fields) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
planFormData.value.engineeringSn = initParam.engineeringSn;
|
planFormData.value.engineeringSn = initParam.engineeringSn;
|
||||||
|
planFormData.value.fileUrl = planFormData.value.fileUrl ? JSON.stringify(planFormData.value.fileUrl) : "";
|
||||||
|
if (planFormData.value.state == "0") {
|
||||||
|
planFormData.value.completeDate = null;
|
||||||
|
}
|
||||||
if (planFormData.value.id) {
|
if (planFormData.value.id) {
|
||||||
const res = await acceptancePlanEdit({ ...planFormData.value });
|
const res = await acceptancePlanEdit({ ...planFormData.value });
|
||||||
ElMessage.success("编辑成功");
|
ElMessage.success("编辑成功");
|
||||||
@ -345,6 +349,7 @@ const getTableList = (params: any) => {
|
|||||||
|
|
||||||
// 修改数据按钮
|
// 修改数据按钮
|
||||||
const handleEditItem = async (index: number, row: any) => {
|
const handleEditItem = async (index: number, row: any) => {
|
||||||
|
ruleFormRef.value?.resetFields();
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
newTitle.value = "新增验收计划";
|
newTitle.value = "新增验收计划";
|
||||||
planFormData.value = reactive({
|
planFormData.value = reactive({
|
||||||
|
|||||||
@ -520,11 +520,13 @@ onMounted(() => {});
|
|||||||
img {
|
img {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
:deep(.el-image) {
|
:deep(.el-image) {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -521,11 +521,13 @@ onMounted(() => {});
|
|||||||
img {
|
img {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
:deep(.el-image) {
|
:deep(.el-image) {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -495,11 +495,17 @@ onMounted(() => {});
|
|||||||
.imgList {
|
.imgList {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
img {
|
||||||
|
width: 95px;
|
||||||
|
height: 53px;
|
||||||
|
margin-right: 15px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
:deep(.el-image) {
|
:deep(.el-image) {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.face-img {
|
.face-img {
|
||||||
@ -544,7 +550,7 @@ onMounted(() => {});
|
|||||||
.situation-step {
|
.situation-step {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 300px;
|
height: 210px;
|
||||||
.row {
|
.row {
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<img src="@/assets/images/AIwaring/报警.png" alt="" />
|
<img src="@/assets/images/AIwaring/报警.png" alt="" />
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<img src="@/assets/images/AIwaring/报警.png" alt="" />
|
<img src="@/assets/images/AIwaring/报警.png" alt="" />
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -158,7 +158,7 @@
|
|||||||
<el-input v-else class="test" v-model="row.annexName" />
|
<el-input v-else class="test" v-model="row.annexName" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="fileList" label="*操作" v-if="title != '详情'">
|
<el-table-column prop="fileList" label="*操作">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-button v-if="title != '新增' && title != '重新发起'" type="primary" @click="onDownLoad(row)" link
|
<el-button v-if="title != '新增' && title != '重新发起'" type="primary" @click="onDownLoad(row)" link
|
||||||
>下载附件</el-button
|
>下载附件</el-button
|
||||||
@ -282,7 +282,7 @@ import { getDicList } from "@/api/modules/jxjview";
|
|||||||
import { singleEngineer } from "@/api/modules/common";
|
import { singleEngineer } from "@/api/modules/common";
|
||||||
import FilesUploadPlus from "@/components/FilesUploadPlus/FilesUpload.vue";
|
import FilesUploadPlus from "@/components/FilesUploadPlus/FilesUpload.vue";
|
||||||
import transformInfo from "./transformInfo.vue";
|
import transformInfo from "./transformInfo.vue";
|
||||||
import DownLoad from "@/utils/annexDowload";
|
import DownLoad from "@/utils/annexDowload.ts";
|
||||||
const current = ref({
|
const current = ref({
|
||||||
files: []
|
files: []
|
||||||
});
|
});
|
||||||
@ -300,7 +300,9 @@ const baseUrl = import.meta.env.VITE_API_URL;
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dialogVisible: Boolean,
|
dialogVisible: Boolean,
|
||||||
relativeId: String,
|
relativeId: String,
|
||||||
title: String
|
title: String,
|
||||||
|
searchSn: String,
|
||||||
|
activeValue: String
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:dialogVisible", "confirm"]);
|
const emits = defineEmits(["update:dialogVisible", "confirm"]);
|
||||||
const visible1 = ref(false);
|
const visible1 = ref(false);
|
||||||
@ -382,9 +384,13 @@ const confirm = async () => {
|
|||||||
let requestData = {
|
let requestData = {
|
||||||
...allForm.value,
|
...allForm.value,
|
||||||
detailList: recordData.value,
|
detailList: recordData.value,
|
||||||
annexList: documentData.value,
|
annexList: documentData.value
|
||||||
engineeringSn: globalStore.engineeringSn
|
|
||||||
};
|
};
|
||||||
|
if (props.activeValue == "eng") {
|
||||||
|
requestData.engineeringSn = props.searchSn;
|
||||||
|
} else {
|
||||||
|
requestData.projectSn = props.searchSn;
|
||||||
|
}
|
||||||
if (props.title == "重新发起") {
|
if (props.title == "重新发起") {
|
||||||
requestData.id = props.relativeId;
|
requestData.id = props.relativeId;
|
||||||
}
|
}
|
||||||
@ -466,7 +472,13 @@ const confirm = async () => {
|
|||||||
visible1.value = false;
|
visible1.value = false;
|
||||||
};
|
};
|
||||||
const getSingleEngineerData = async () => {
|
const getSingleEngineerData = async () => {
|
||||||
const res = await singleEngineer({ engineeringSn: globalStore.engineeringSn });
|
let requestData = {};
|
||||||
|
if (props.activeValue == "eng") {
|
||||||
|
requestData.engineeringSn = props.searchSn;
|
||||||
|
} else {
|
||||||
|
requestData.projectSn = props.searchSn;
|
||||||
|
}
|
||||||
|
const res = await singleEngineer(requestData);
|
||||||
singleEngineerList.value = res.result;
|
singleEngineerList.value = res.result;
|
||||||
console.log(res);
|
console.log(res);
|
||||||
};
|
};
|
||||||
@ -547,6 +559,7 @@ watch(
|
|||||||
(n, o) => {
|
(n, o) => {
|
||||||
visible1.value = n;
|
visible1.value = n;
|
||||||
if (n) {
|
if (n) {
|
||||||
|
getSingleEngineerData();
|
||||||
if (props.title == "新增") {
|
if (props.title == "新增") {
|
||||||
allForm.value = {
|
allForm.value = {
|
||||||
stage: "",
|
stage: "",
|
||||||
|
|||||||
@ -519,11 +519,13 @@ onMounted(() => {});
|
|||||||
img {
|
img {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
:deep(.el-image) {
|
:deep(.el-image) {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -569,7 +571,7 @@ onMounted(() => {});
|
|||||||
.situation-step {
|
.situation-step {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 300px;
|
height: 210px;
|
||||||
.row {
|
.row {
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|||||||
@ -34,6 +34,8 @@
|
|||||||
v-model:dialogVisible="dialogVisible"
|
v-model:dialogVisible="dialogVisible"
|
||||||
:title="newTitle"
|
:title="newTitle"
|
||||||
:relativeId="relativeId"
|
:relativeId="relativeId"
|
||||||
|
:searchSn="searchSn"
|
||||||
|
:activeValue="activeValue"
|
||||||
@confirm="confirmReform"
|
@confirm="confirmReform"
|
||||||
></detailsDialog>
|
></detailsDialog>
|
||||||
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
||||||
|
|||||||
@ -125,7 +125,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="acceptancePlan">
|
<script setup lang="tsx" name="acceptancePlan">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, nextTick, onMounted } from "vue";
|
||||||
import { ElMessage, ElMessageBox, UploadProps } from "element-plus";
|
import { ElMessage, ElMessageBox, UploadProps } from "element-plus";
|
||||||
import type { FormInstance } from "element-plus";
|
import type { FormInstance } from "element-plus";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
@ -287,6 +287,10 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
|||||||
await formEl.validate(async (valid, fields) => {
|
await formEl.validate(async (valid, fields) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
planFormData.value.engineeringSn = searchSn.value;
|
planFormData.value.engineeringSn = searchSn.value;
|
||||||
|
planFormData.value.fileUrl = planFormData.value.fileUrl ? JSON.stringify(planFormData.value.fileUrl) : "";
|
||||||
|
if (planFormData.value.state == "0") {
|
||||||
|
planFormData.value.completeDate = null;
|
||||||
|
}
|
||||||
if (planFormData.value.id) {
|
if (planFormData.value.id) {
|
||||||
const res = await acceptancePlanEdit({ ...planFormData.value });
|
const res = await acceptancePlanEdit({ ...planFormData.value });
|
||||||
ElMessage.success("编辑成功");
|
ElMessage.success("编辑成功");
|
||||||
@ -352,6 +356,7 @@ const getTableList = (params: any) => {
|
|||||||
|
|
||||||
// 修改数据按钮
|
// 修改数据按钮
|
||||||
const handleEditItem = async (index: number, row: any) => {
|
const handleEditItem = async (index: number, row: any) => {
|
||||||
|
ruleFormRef.value?.resetFields();
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
newTitle.value = "新增验收计划";
|
newTitle.value = "新增验收计划";
|
||||||
planFormData.value = reactive({
|
planFormData.value = reactive({
|
||||||
|
|||||||
@ -520,11 +520,13 @@ onMounted(() => {});
|
|||||||
img {
|
img {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
:deep(.el-image) {
|
:deep(.el-image) {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -520,11 +520,13 @@ onMounted(() => {});
|
|||||||
img {
|
img {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
:deep(.el-image) {
|
:deep(.el-image) {
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
|
margin-bottom: 10px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -280,7 +280,7 @@ const engineeringPurpose = ref<DictDataList>([]);
|
|||||||
const structuralStyle = ref<DictDataList>([]);
|
const structuralStyle = ref<DictDataList>([]);
|
||||||
const validatorNumber = (e: any, index: any, key: string) => {
|
const validatorNumber = (e: any, index: any, key: string) => {
|
||||||
// 校验数字
|
// 校验数字
|
||||||
let pattern = /^[1-9][0-9]*$/;
|
let pattern = /^[0-9][0-9]*$/;
|
||||||
let dataValue = form.value.engineeringSingles[index][key];
|
let dataValue = form.value.engineeringSingles[index][key];
|
||||||
if (!pattern.test(dataValue)) {
|
if (!pattern.test(dataValue)) {
|
||||||
ElMessage.error("请输入纯数字");
|
ElMessage.error("请输入纯数字");
|
||||||
@ -338,6 +338,13 @@ const next = async (formEl: FormInstance | undefined, params: any) => {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (form.value.engineeringSingles?.length == 0) {
|
||||||
|
ElMessage({
|
||||||
|
message: "请添加单体工程",
|
||||||
|
type: "error"
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
form.value.engineeringSingles?.map(item => {
|
form.value.engineeringSingles?.map(item => {
|
||||||
if (!item.name) {
|
if (!item.name) {
|
||||||
validatorBool = false;
|
validatorBool = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user