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