|
@@ -5,13 +5,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div v-loading="isProcessLoading" class="hc-round-chart mt-14px flex">
|
|
<div v-loading="isProcessLoading" class="hc-round-chart mt-14px flex">
|
|
|
- <div class="open-btn">
|
|
|
|
|
|
|
+ <div class="open-btn" @click="toggleShowAll">
|
|
|
<el-link type="primary">
|
|
<el-link type="primary">
|
|
|
- <HcIcon name="arrow-right-s" />
|
|
|
|
|
|
|
+ <HcIcon :name="isShowAll ? 'arrow-left-s' : 'arrow-right-s'" />
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</div>
|
|
</div>
|
|
|
<el-row :gutter="30" class="flex-1">
|
|
<el-row :gutter="30" class="flex-1">
|
|
|
- <template v-for="(item, index) in processMaterialList" :key="index">
|
|
|
|
|
|
|
+ <template v-for="(item, index) in filteredProcessList" :key="index">
|
|
|
<el-col :span="isProcessSpan">
|
|
<el-col :span="isProcessSpan">
|
|
|
<div class="hc-round-chart-card-box position-relative">
|
|
<div class="hc-round-chart-card-box position-relative">
|
|
|
<div class="hc-card-content-box">
|
|
<div class="hc-card-content-box">
|
|
@@ -20,7 +20,8 @@
|
|
|
<div class="eye-icon-container pos-absolute">
|
|
<div class="eye-icon-container pos-absolute">
|
|
|
<HcTooltip keys="schedule-data-hide">
|
|
<HcTooltip keys="schedule-data-hide">
|
|
|
<el-link type="warning" @click="hideData(item)">
|
|
<el-link type="warning" @click="hideData(item)">
|
|
|
- <HcIcon name="eye-off" />
|
|
|
|
|
|
|
+ <HcIcon v-if="item.isHide === 0" name="eye-off" />
|
|
|
|
|
+ <HcIcon v-else name="eye" />
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
|
</div>
|
|
</div>
|
|
@@ -100,7 +101,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { onActivated, ref } from 'vue'
|
|
|
|
|
|
|
+import { computed, onActivated, ref } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
|
import { getArrValue, useClick } from 'js-fast-way'
|
|
import { getArrValue, useClick } from 'js-fast-way'
|
|
@@ -250,6 +251,8 @@ const toTableClick = () => {
|
|
|
}
|
|
}
|
|
|
const hideLoad = ref(false)
|
|
const hideLoad = ref(false)
|
|
|
const hideData = async (item)=>{
|
|
const hideData = async (item)=>{
|
|
|
|
|
+ console.log(item, 'item')
|
|
|
|
|
+
|
|
|
hideLoad.value = true
|
|
hideLoad.value = true
|
|
|
|
|
|
|
|
|
|
|
|
@@ -257,7 +260,7 @@ const hideData = async (item)=>{
|
|
|
hideType:item.hideType,
|
|
hideType:item.hideType,
|
|
|
contractId: contractId.value,
|
|
contractId: contractId.value,
|
|
|
classifyType: contractTypeTabKey.value ?? '1',
|
|
classifyType: contractTypeTabKey.value ?? '1',
|
|
|
- type:1,
|
|
|
|
|
|
|
+ type:item.isHide === 0 ? 1 : 0,
|
|
|
})
|
|
})
|
|
|
//处理数据
|
|
//处理数据
|
|
|
hideLoad.value = false
|
|
hideLoad.value = false
|
|
@@ -266,6 +269,31 @@ const hideData = async (item)=>{
|
|
|
queryMaterialProgress()
|
|
queryMaterialProgress()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+// 新增一个控制是否显示所有卡片的变量
|
|
|
|
|
+const isShowAll = ref(false)
|
|
|
|
|
+
|
|
|
|
|
+// 切换显示所有/仅显示未隐藏卡片
|
|
|
|
|
+const toggleShowAll = () => {
|
|
|
|
|
+ isShowAll.value = !isShowAll.value
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// 根据显示状态过滤并排序卡片列表
|
|
|
|
|
+const filteredProcessList = computed(() => {
|
|
|
|
|
+ if (isShowAll.value) {
|
|
|
|
|
+ // 显示所有卡片时,先排isHide===0的,再排其他
|
|
|
|
|
+ return [...processMaterialList.value].sort((a, b) => {
|
|
|
|
|
+ // 核心排序逻辑:isHide为0的排在前面
|
|
|
|
|
+ if (a.isHide === 1 && b.isHide !== 1) return -1
|
|
|
|
|
+ if (a.isHide !== 1 && b.isHide === 1) return 1
|
|
|
|
|
+ return 0 // 状态相同则保持原有顺序
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 仅显示未隐藏卡片(本身已经都是isHide===0,无需排序)
|
|
|
|
|
+ return processMaterialList.value.filter(item => item.isHide === 0)
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -298,6 +326,7 @@ const hideData = async (item)=>{
|
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
}
|
|
|
@import "../../styles/schedule/hc-data.scss";
|
|
@import "../../styles/schedule/hc-data.scss";
|
|
|
</style>
|
|
</style>
|