fix: BUG修改
This commit is contained in:
parent
1a11fa06cc
commit
7cc79f85a7
@ -6,7 +6,7 @@
|
||||
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
||||
<span>查看危大工程信息</span>
|
||||
<el-icon>
|
||||
<close @click="closeMain" />
|
||||
<close @click="visible1 = false" />
|
||||
</el-icon>
|
||||
</div>
|
||||
</template>
|
||||
@ -496,7 +496,7 @@ const props = defineProps({
|
||||
activeValue: String,
|
||||
relativeId: String
|
||||
});
|
||||
const emits = defineEmits(["update:detailsVisible"]);
|
||||
const emits = defineEmits(["update:detailsVisible", "confirm"]);
|
||||
const arrOne = ref<any>([]);
|
||||
const arrFive = ref<any>([]);
|
||||
const arrSeven = ref<any>([]);
|
||||
@ -585,6 +585,29 @@ const confirmAdd = async (row: any, index: any) => {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (tabPosition.value == 5) {
|
||||
if (!requestData.currentProgress || !requestData.imageUrl) {
|
||||
ElMessage.error("请完善表格信息");
|
||||
break;
|
||||
}
|
||||
} else if (tabPosition.value == 6) {
|
||||
if (
|
||||
!requestData.inspectResult ||
|
||||
!requestData.inspectUser ||
|
||||
!requestData.inspectTime ||
|
||||
typeof requestData.question != "number" ||
|
||||
!requestData.solveUser ||
|
||||
!requestData.questionDesc
|
||||
) {
|
||||
ElMessage.error("请完善表格信息");
|
||||
break;
|
||||
}
|
||||
} else if (tabPosition.value == 7) {
|
||||
if (!requestData.type || !requestData.result || !requestData.state || !requestData.imageUrl || !requestData.acceptTime) {
|
||||
ElMessage.error("请完善表格信息");
|
||||
break;
|
||||
}
|
||||
}
|
||||
row.isEdit = false;
|
||||
if (row.id) {
|
||||
const res2 = await updateOperation[tabPosition.value - 4](requestData);
|
||||
@ -866,32 +889,33 @@ const getTypeDicMainList = async () => {
|
||||
typeList.value.push(...arr);
|
||||
}
|
||||
};
|
||||
// 关闭两个对话框
|
||||
// 关闭对话框
|
||||
const closeMain = () => {
|
||||
visible1.value = false;
|
||||
emits("update:detailsVisible", false);
|
||||
};
|
||||
watch(
|
||||
() => props.detailsVisible,
|
||||
n => {
|
||||
if (n) {
|
||||
if (n) {
|
||||
getAcceptTypeList();
|
||||
getTypeDicMainList();
|
||||
getDetailsData();
|
||||
getConstructionSchemeList();
|
||||
setTimeout(function () {
|
||||
formRef.value?.clearValidate();
|
||||
}, 200);
|
||||
}
|
||||
getAcceptTypeList();
|
||||
getTypeDicMainList();
|
||||
getDetailsData();
|
||||
getConstructionSchemeList();
|
||||
setTimeout(function () {
|
||||
formRef.value?.clearValidate();
|
||||
}, 200);
|
||||
visible1.value = n;
|
||||
tabPosition.value = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => visible1,
|
||||
() => visible1.value,
|
||||
n => {
|
||||
emits("update:detailsVisible", n);
|
||||
if (!n) {
|
||||
emits("confirm");
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {});
|
||||
|
||||
@ -76,6 +76,7 @@
|
||||
:relativeId="relativeId"
|
||||
:searchSn="searchSn"
|
||||
:activeValue="activeValue"
|
||||
@confirm="confirmAdd"
|
||||
></engineerDetails>
|
||||
|
||||
<!-- 侧边栏选择 -->
|
||||
|
||||
@ -1379,9 +1379,11 @@ onMounted(() => {
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
overflow-y: scroll;
|
||||
.list-content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
// grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(auto-fit, minmax(530px, 1fr));
|
||||
grid-gap: 20px;
|
||||
&-item {
|
||||
width: 530px;
|
||||
@ -1395,7 +1397,6 @@ onMounted(() => {
|
||||
margin: 0 22px;
|
||||
> div:nth-child(1) {
|
||||
width: 126px;
|
||||
min-width: 78px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
|
||||
@ -14,9 +14,7 @@
|
||||
:onReset="true"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button v-auth="'monthly_report_add'" class="addButtonStyle" :disabled="!searchSn" @click="handleAddItem"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button v-auth="'monthly_report_add'" class="addButtonStyle" @click="handleAddItem">新增</el-button>
|
||||
</template>
|
||||
<template #annexFile="{ row }">
|
||||
<span>{{ row.annexFile ? JSON.parse(row.annexFile).name : "" }}</span>
|
||||
@ -244,6 +242,7 @@ const getTableList = (params: any) => {
|
||||
};
|
||||
// 新增
|
||||
const handleAddItem = () => {
|
||||
if (!searchSn.value) return ElMessage.error("请先选择工程");
|
||||
addVisible.value = true;
|
||||
};
|
||||
// 下载附件
|
||||
|
||||
@ -484,21 +484,20 @@ watch(
|
||||
() => props.detailsVisible,
|
||||
n => {
|
||||
if (n) {
|
||||
if (n) {
|
||||
getAcceptTypeList();
|
||||
getTypeDicMainList();
|
||||
getDetailsData();
|
||||
getConstructionSchemeList();
|
||||
setTimeout(function () {
|
||||
formRef.value?.clearValidate();
|
||||
}, 200);
|
||||
}
|
||||
getAcceptTypeList();
|
||||
getTypeDicMainList();
|
||||
getDetailsData();
|
||||
getConstructionSchemeList();
|
||||
setTimeout(function () {
|
||||
formRef.value?.clearValidate();
|
||||
}, 200);
|
||||
visible1.value = n;
|
||||
tabPosition.value = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => visible1,
|
||||
() => visible1.value,
|
||||
n => {
|
||||
emits("update:detailsVisible", n);
|
||||
}
|
||||
|
||||
@ -1201,9 +1201,11 @@ onMounted(() => {
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
overflow-y: scroll;
|
||||
.list-content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
// grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(auto-fit, minmax(530px, 1fr));
|
||||
grid-gap: 20px;
|
||||
&-item {
|
||||
width: 530px;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
||||
<span>查看危大工程信息</span>
|
||||
<el-icon>
|
||||
<close @click="closeMain" />
|
||||
<close @click="visible1 = false" />
|
||||
</el-icon>
|
||||
</div>
|
||||
</template>
|
||||
@ -100,7 +100,7 @@
|
||||
<el-form-item label="安全技术交底:" prop="devName">
|
||||
<div class="switch-box">
|
||||
<el-switch v-model="formData.technicalDisclosureType" :active-value="2" :inactive-value="1" disabled />
|
||||
<span>未完成</span>
|
||||
<span>{{ formData.technicalDisclosureType == 2 ? "已完成" : "未完成" }}</span>
|
||||
<el-button type="primary" @click="onDownLoad('technicalDisclosureFile')">点击下载</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -109,7 +109,7 @@
|
||||
<el-form-item label="安全专项施工方案及附件:" prop="devNumber">
|
||||
<div class="switch-box">
|
||||
<el-switch v-model="formData.securityConstructionSchemeType" :active-value="2" :inactive-value="1" disabled />
|
||||
<span>未完成</span>
|
||||
<span>{{ formData.securityConstructionSchemeType == 2 ? "已完成" : "未完成" }}</span>
|
||||
<el-button type="primary" @click="onDownLoad('securityConstructionSchemeFile')">点击下载</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -120,7 +120,7 @@
|
||||
<el-form-item label="专项施工方案交底:" prop="devName">
|
||||
<div class="switch-box">
|
||||
<el-switch v-model="formData.specialConstructionSchemeType" :active-value="2" :inactive-value="1" disabled />
|
||||
<span>未完成</span>
|
||||
<span>{{ formData.specialConstructionSchemeType == 2 ? "已完成" : "未完成" }}</span>
|
||||
<el-button type="primary" @click="onDownLoad('specialConstructionSchemeFile')">点击下载</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -496,7 +496,7 @@ const props = defineProps({
|
||||
activeValue: String,
|
||||
relativeId: String
|
||||
});
|
||||
const emits = defineEmits(["update:detailsVisible"]);
|
||||
const emits = defineEmits(["update:detailsVisible", "confirm"]);
|
||||
const arrOne = ref<any>([]);
|
||||
const arrFive = ref<any>([]);
|
||||
const arrSeven = ref<any>([]);
|
||||
@ -585,6 +585,30 @@ const confirmAdd = async (row: any, index: any) => {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (tabPosition.value == 5) {
|
||||
if (!requestData.currentProgress || !requestData.imageUrl) {
|
||||
ElMessage.error("请完善表格信息");
|
||||
break;
|
||||
}
|
||||
} else if (tabPosition.value == 6) {
|
||||
if (
|
||||
!requestData.inspectResult ||
|
||||
!requestData.inspectUser ||
|
||||
!requestData.inspectTime ||
|
||||
typeof requestData.question != "number" ||
|
||||
!requestData.solveUser ||
|
||||
!requestData.questionDesc
|
||||
) {
|
||||
ElMessage.error("请完善表格信息");
|
||||
break;
|
||||
}
|
||||
} else if (tabPosition.value == 7) {
|
||||
if (!requestData.type || !requestData.result || !requestData.state || !requestData.imageUrl || !requestData.acceptTime) {
|
||||
ElMessage.error("请完善表格信息");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
row.isEdit = false;
|
||||
if (row.id) {
|
||||
const res2 = await updateOperation[tabPosition.value - 4](requestData);
|
||||
@ -866,32 +890,33 @@ const getTypeDicMainList = async () => {
|
||||
typeList.value.push(...arr);
|
||||
}
|
||||
};
|
||||
// 关闭两个对话框
|
||||
// 关闭对话框
|
||||
const closeMain = () => {
|
||||
visible1.value = false;
|
||||
emits("update:detailsVisible", false);
|
||||
};
|
||||
watch(
|
||||
() => props.detailsVisible,
|
||||
n => {
|
||||
if (n) {
|
||||
if (n) {
|
||||
getAcceptTypeList();
|
||||
getTypeDicMainList();
|
||||
getDetailsData();
|
||||
getConstructionSchemeList();
|
||||
setTimeout(function () {
|
||||
formRef.value?.clearValidate();
|
||||
}, 200);
|
||||
}
|
||||
getAcceptTypeList();
|
||||
getTypeDicMainList();
|
||||
getDetailsData();
|
||||
getConstructionSchemeList();
|
||||
setTimeout(function () {
|
||||
formRef.value?.clearValidate();
|
||||
}, 200);
|
||||
visible1.value = n;
|
||||
tabPosition.value = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => visible1,
|
||||
() => visible1.value,
|
||||
n => {
|
||||
emits("update:detailsVisible", n);
|
||||
if (!n) {
|
||||
emits("confirm");
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {});
|
||||
|
||||
@ -76,6 +76,7 @@
|
||||
:relativeId="relativeId"
|
||||
:searchSn="searchSn"
|
||||
:activeValue="activeValue"
|
||||
@confirm="confirmAdd"
|
||||
></engineerDetails>
|
||||
|
||||
<!-- 侧边栏选择 -->
|
||||
@ -232,7 +233,7 @@ const getTypeDicMainList = async () => {
|
||||
typeList.value.push(...result);
|
||||
}
|
||||
};
|
||||
// 新增完成
|
||||
// 操作完成
|
||||
const confirmAdd = () => {
|
||||
proTable.value.getTableList();
|
||||
};
|
||||
|
||||
@ -1044,9 +1044,11 @@ onMounted(() => {
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
overflow-y: scroll;
|
||||
.list-content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
// grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(auto-fit, minmax(530px, 1fr));
|
||||
grid-gap: 20px;
|
||||
&-item {
|
||||
width: 530px;
|
||||
|
||||
@ -389,10 +389,14 @@ const formData = ref<any>({
|
||||
const visible1 = ref(false);
|
||||
// 获取详情数据
|
||||
const getDetails = async () => {
|
||||
const res = await engineerMainDetails({ id: props.relativeId });
|
||||
console.log(res);
|
||||
if (res && res.result) {
|
||||
engineerData.value = { ...res.result };
|
||||
if (props.activeValue == "eng") {
|
||||
const res = await engineerMainDetails({ id: props.relativeId });
|
||||
console.log(res);
|
||||
if (res && res.result) {
|
||||
engineerData.value = { ...res.result };
|
||||
}
|
||||
} else {
|
||||
engineerData.value = {};
|
||||
}
|
||||
};
|
||||
// 提交打印
|
||||
|
||||
@ -14,9 +14,7 @@
|
||||
:onReset="true"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button v-auth="'monthly_report_add'" class="addButtonStyle" :disabled="!searchSn" @click="handleAddItem"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button v-auth="'monthly_report_add'" class="addButtonStyle" @click="handleAddItem">新增</el-button>
|
||||
</template>
|
||||
<template #annexFile="{ row }">
|
||||
<span>{{ row.annexFile ? JSON.parse(row.annexFile).name : "" }}</span>
|
||||
@ -246,6 +244,7 @@ const getTableList = (params: any) => {
|
||||
};
|
||||
// 新增
|
||||
const handleAddItem = () => {
|
||||
if (!searchSn.value) return ElMessage.error("请先选择工程/项目");
|
||||
addVisible.value = true;
|
||||
};
|
||||
// 下载附件
|
||||
@ -288,6 +287,9 @@ const getProject = async () => {
|
||||
if (res.result) {
|
||||
searchSn.value = res.result.projectSn;
|
||||
searchId.value = res.result.id;
|
||||
} else {
|
||||
searchSn.value = "";
|
||||
searchId.value = "";
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
@ -299,6 +301,9 @@ const getengineering = async () => {
|
||||
if (res.result && res.result.length > 0) {
|
||||
searchSn.value = res.result[0].engineeringSn;
|
||||
searchId.value = res.result[0].id;
|
||||
} else {
|
||||
searchSn.value = "";
|
||||
searchId.value = "";
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user