|
@@ -81,7 +81,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import {chkcCheck, listChkc} from "@/api/check/chkc"
|
|
|
+import {chkcCheck, chkcResult, listChkc} from "@/api/check/chkc"
|
|
|
import {onMounted} from "vue";
|
|
|
import {Loading} from "@element-plus/icons-vue";
|
|
|
import nCheckList from "./widget/nCheckList.vue"
|
|
@@ -109,11 +109,16 @@ const colors = [
|
|
|
{color: '#1e88e5', percentage: 100},
|
|
|
]
|
|
|
|
|
|
+const initData = async () => {
|
|
|
+ await chkcResult(0)
|
|
|
+ getListChkc().then()
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
if (localStorage.getItem("listData")) {
|
|
|
return restoreCache()
|
|
|
}
|
|
|
- getListChkc()
|
|
|
+ initData()
|
|
|
})
|
|
|
|
|
|
const handleDialog = (action) => {
|
|
@@ -133,6 +138,7 @@ const handleDialog = (action) => {
|
|
|
}
|
|
|
|
|
|
const restoreCache = () => {
|
|
|
+ chkcResult(0)
|
|
|
listData.value = JSON.parse(localStorage.getItem("listData"))
|
|
|
nowCheck.value = JSON.parse(localStorage.getItem("nowCheck"))
|
|
|
checkList.value = uniqueByKey(listData.value, 'className')
|