|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
<div class="hc-layout-box">
|
|
|
+ <HcPageHeader v-if="contractInfo?.contractType === 2 || contractInfo?.contractType === 3">
|
|
|
+ <HcNewSwitch :datas="contractTypeTab" :keys="contractTypeTabKey" @change="contractTypeTabChange"/>
|
|
|
+ </HcPageHeader>
|
|
|
<div class="hc-round-chart">
|
|
|
<el-row :gutter="30">
|
|
|
<el-col :span="6" v-for="item in processMaterialList">
|
|
@@ -94,6 +97,7 @@ const router = useRouter()
|
|
|
const useAppState = useAppStore()
|
|
|
const projectId = ref(useAppState.getProjectId);
|
|
|
const contractId = ref(useAppState.getContractId);
|
|
|
+const contractInfo = ref(useAppState.getContractInfo);
|
|
|
const isCollapse = ref(useAppState.getCollapse)
|
|
|
|
|
|
//渲染完成
|
|
@@ -104,14 +108,39 @@ onMounted(() => {
|
|
|
})
|
|
|
|
|
|
|
|
|
+//结构类型tab数据和相关处理
|
|
|
+const contractTypeTabKey = ref(2)
|
|
|
+const contractTypeTab = ref([
|
|
|
+ {key:'1', name: '施工数据'},
|
|
|
+ {key:'2', name: '监理数据'}
|
|
|
+]);
|
|
|
+const contractTypeTabChange = (item) => {
|
|
|
+ contractTypeTabKey.value = item?.key;
|
|
|
+ queryMaterialProgress()
|
|
|
+ queryMaterialProgressStatus()
|
|
|
+ queryImageClassification()
|
|
|
+}
|
|
|
+
|
|
|
+//获取合同段类型
|
|
|
+const getContractTypeKey = () => {
|
|
|
+ const { contractType } = contractInfo.value;
|
|
|
+ if (contractType === 2 || contractType === 3) {
|
|
|
+ return contractTypeTabKey.value ?? '1'
|
|
|
+ } else {
|
|
|
+ return null
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//查询内业资料进度
|
|
|
const isProcessLoading = ref(false)
|
|
|
const processMaterialList = ref([])
|
|
|
const queryMaterialProgress = async () => {
|
|
|
isProcessLoading.value = true
|
|
|
+ const classifyType = getContractTypeKey();
|
|
|
const { error, code, data } = await DataApi.queryMaterialProgress({
|
|
|
projectId: projectId.value,
|
|
|
- contractId: contractId.value
|
|
|
+ contractId: contractId.value,
|
|
|
+ classifyType: classifyType
|
|
|
});
|
|
|
//处理数据
|
|
|
isProcessLoading.value = false
|
|
@@ -129,9 +158,11 @@ const isMaterialLoading = ref(false)
|
|
|
const processMaterialStatusList = ref([])
|
|
|
const queryMaterialProgressStatus = async () => {
|
|
|
isMaterialLoading.value = true
|
|
|
+ const classifyType = getContractTypeKey();
|
|
|
const { error, code, data } = await DataApi.queryMaterialProgressStatus({
|
|
|
projectId: projectId.value,
|
|
|
- contractId: contractId.value
|
|
|
+ contractId: contractId.value,
|
|
|
+ classifyType: classifyType
|
|
|
});
|
|
|
//处理数据
|
|
|
isMaterialLoading.value = false
|
|
@@ -156,9 +187,11 @@ const contractImageClassificationList = ref([])
|
|
|
const imageClassInfo = ref({amount: 0, image: 0, video: 0})
|
|
|
const queryImageClassification = async () => {
|
|
|
isImageClassLoading.value = true
|
|
|
+ const classifyType = getContractTypeKey();
|
|
|
const { error, code, data } = await DataApi.queryImageClassification({
|
|
|
projectId: projectId.value,
|
|
|
- contractId: contractId.value
|
|
|
+ contractId: contractId.value,
|
|
|
+ classifyType: classifyType
|
|
|
});
|
|
|
//处理数据
|
|
|
isImageClassLoading.value = false
|