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