|
@@ -3,37 +3,39 @@
|
|
|
<hc-page-header v-if="contractInfo?.contractType === 2 || contractInfo?.contractType === 3">
|
|
|
<hc-new-switch :datas="contractTypeTab" :keys="contractTypeTabKey" size="default" @change="contractTypeTabChange" />
|
|
|
</hc-page-header>
|
|
|
- <div class="hc-round-chart">
|
|
|
+ <div v-loading="isProcessLoading" class="hc-round-chart mt-14px">
|
|
|
<el-row :gutter="30">
|
|
|
- <el-col v-for="(item, index) in processMaterialList" :key="index" :span="6">
|
|
|
- <div class="hc-round-chart-card-box">
|
|
|
- <div class="hc-card-content-box">
|
|
|
- <div class="card-title">{{ item.title }}</div>
|
|
|
- <div class="card-ratio-box">
|
|
|
- <div class="ratio-num">{{ item.ratio }}</div>
|
|
|
- <div class="ratio-text">
|
|
|
- <div class="unit">%</div>
|
|
|
- <div class="text">完成率</div>
|
|
|
+ <template v-for="(item, index) in processMaterialList" :key="index">
|
|
|
+ <el-col :span="isProcessSpan">
|
|
|
+ <div class="hc-round-chart-card-box">
|
|
|
+ <div class="hc-card-content-box">
|
|
|
+ <div class="card-title">{{ item.title }}</div>
|
|
|
+ <div class="card-ratio-box">
|
|
|
+ <div class="ratio-num">{{ item.ratio }}</div>
|
|
|
+ <div class="ratio-text">
|
|
|
+ <div class="unit">%</div>
|
|
|
+ <div class="text">完成率</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="card-amount-box">
|
|
|
- <div class="amount-item">
|
|
|
- <div class="text">应填(份)</div>
|
|
|
- <div class="num">{{ item.amount }}</div>
|
|
|
- </div>
|
|
|
- <div class="amount-divider" />
|
|
|
- <div class="amount-item">
|
|
|
- <div class="text">已填(份)</div>
|
|
|
- <div class="num">{{ item.successAmount }}</div>
|
|
|
+ <div class="card-amount-box">
|
|
|
+ <div class="amount-item">
|
|
|
+ <div class="text">应填(份)</div>
|
|
|
+ <div class="num">{{ item.amount }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="amount-divider" />
|
|
|
+ <div class="amount-item">
|
|
|
+ <div class="text">已填(份)</div>
|
|
|
+ <div class="num">{{ item.successAmount }}</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="hc-card-chart-box">
|
|
|
+ <RoundChart :ratio="item.ratio" />
|
|
|
+ <div class="text-num">{{ item.ratio }}%</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="hc-card-chart-box">
|
|
|
- <RoundChart :ratio="item.ratio" />
|
|
|
- <div class="text-num">{{ item.ratio }}%</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
+ </el-col>
|
|
|
+ </template>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="hc-chart-flex">
|
|
@@ -86,6 +88,7 @@
|
|
|
import { onMounted, ref } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
+import { btnAuth } from '~uti/btn-auth'
|
|
|
import RoundChart from './components/echarts/RoundChart.vue'
|
|
|
import ReportChart from './components/echarts/ReportChart.vue'
|
|
|
import MediaChart from './components/echarts/MediaChart.vue'
|
|
@@ -134,6 +137,7 @@ const getContractTypeKey = () => {
|
|
|
//查询内业资料进度
|
|
|
const isProcessLoading = ref(false)
|
|
|
const processMaterialList = ref([])
|
|
|
+const isProcessSpan = ref(24)
|
|
|
const queryMaterialProgress = async () => {
|
|
|
isProcessLoading.value = true
|
|
|
const classifyType = getContractTypeKey()
|
|
@@ -145,9 +149,43 @@ const queryMaterialProgress = async () => {
|
|
|
//处理数据
|
|
|
isProcessLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
|
- processMaterialList.value = getArrValue(data?.processMaterialList)
|
|
|
+ const arr = getArrValue(data?.processMaterialList)
|
|
|
+ let newArr = []
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ if (arr[i].title === '开工报告') {
|
|
|
+ console.log(btnAuth('schedule-data-chart-1'))
|
|
|
+ if (btnAuth('schedule-data-chart-1')) {
|
|
|
+ newArr.push(arr[i])
|
|
|
+ }
|
|
|
+ } else if (arr[i].title === '工序资料') {
|
|
|
+ if (btnAuth('schedule-data-chart-2')) {
|
|
|
+ newArr.push(arr[i])
|
|
|
+ }
|
|
|
+ } else if (arr[i].title === '评定资料') {
|
|
|
+ if (btnAuth('schedule-data-chart-3')) {
|
|
|
+ newArr.push(arr[i])
|
|
|
+ }
|
|
|
+ } else if (arr[i].title === '中间交工') {
|
|
|
+ if (btnAuth('schedule-data-chart-3')) {
|
|
|
+ newArr.push(arr[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ processMaterialList.value = newArr
|
|
|
+ if (newArr.length === 4) {
|
|
|
+ isProcessSpan.value = 6
|
|
|
+ } else if (newArr.length === 3) {
|
|
|
+ isProcessSpan.value = 8
|
|
|
+ } else if (newArr.length === 2) {
|
|
|
+ isProcessSpan.value = 12
|
|
|
+ } else if (newArr.length === 1) {
|
|
|
+ isProcessSpan.value = 24
|
|
|
+ } else if (newArr.length === 0) {
|
|
|
+ isProcessSpan.value = 24
|
|
|
+ }
|
|
|
} else {
|
|
|
processMaterialList.value = []
|
|
|
+ isProcessSpan.value = 24
|
|
|
}
|
|
|
}
|
|
|
|