|
@@ -39,48 +39,53 @@
|
|
{{ getConditionProgress(index) }}
|
|
{{ getConditionProgress(index) }}
|
|
</template>
|
|
</template>
|
|
<template v-if="column.dataIndex === 'operation'">
|
|
<template v-if="column.dataIndex === 'operation'">
|
|
- <a-button
|
|
|
|
- v-if="checkActionValid(index, 'arbitrate')"
|
|
|
|
- type="link"
|
|
|
|
- :diabled="checkDangerActionRunning(index)"
|
|
|
|
- @click="onArbitrate(index)"
|
|
|
|
- >仲裁</a-button
|
|
|
|
- >
|
|
|
|
- <a-button
|
|
|
|
- v-if="checkActionValid(index, 'edit')"
|
|
|
|
- type="link"
|
|
|
|
- :diabled="checkDangerActionRunning(index)"
|
|
|
|
- @click="onEdit(index)"
|
|
|
|
- >修改</a-button
|
|
|
|
- >
|
|
|
|
- <a-button
|
|
|
|
- v-if="checkActionValid(index, 'reset')"
|
|
|
|
- type="link"
|
|
|
|
- :diabled="checkDangerActionRunning(index)"
|
|
|
|
- @click="onReset(index)"
|
|
|
|
- >重置</a-button
|
|
|
|
- >
|
|
|
|
- <a-button
|
|
|
|
- v-if="checkActionValid(index, 'recheck')"
|
|
|
|
- type="link"
|
|
|
|
- :diabled="checkDangerActionRunning(index)"
|
|
|
|
- @click="onRecheck(index)"
|
|
|
|
- >复查</a-button
|
|
|
|
- >
|
|
|
|
- <a-button
|
|
|
|
- v-if="checkActionValid(index, 'buildTask')"
|
|
|
|
- type="link"
|
|
|
|
- :diabled="checkDangerActionRunning(index)"
|
|
|
|
- @click="onBuildTask(index)"
|
|
|
|
- >生成任务</a-button
|
|
|
|
- >
|
|
|
|
- <a-button
|
|
|
|
- v-if="checkActionValid(index, 'delete')"
|
|
|
|
- type="link"
|
|
|
|
- :diabled="checkDangerActionRunning(index)"
|
|
|
|
- @click="onDelete(index)"
|
|
|
|
- >删除</a-button
|
|
|
|
- >
|
|
|
|
|
|
+ <span v-if="record.building">生成任务中...</span>
|
|
|
|
+ <span v-else-if="record.reseting">重置中...</span>
|
|
|
|
+ <span v-else-if="record.deleting">删除中...</span>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="checkActionValid(index, 'arbitrate')"
|
|
|
|
+ type="link"
|
|
|
|
+ :diabled="checkDangerActionRunning(index)"
|
|
|
|
+ @click="onArbitrate(index)"
|
|
|
|
+ >仲裁</a-button
|
|
|
|
+ >
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="checkActionValid(index, 'edit')"
|
|
|
|
+ type="link"
|
|
|
|
+ :diabled="checkDangerActionRunning(index)"
|
|
|
|
+ @click="onEdit(index)"
|
|
|
|
+ >修改</a-button
|
|
|
|
+ >
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="checkActionValid(index, 'reset')"
|
|
|
|
+ type="link"
|
|
|
|
+ :diabled="checkDangerActionRunning(index)"
|
|
|
|
+ @click="onReset(index)"
|
|
|
|
+ >重置</a-button
|
|
|
|
+ >
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="checkActionValid(index, 'recheck')"
|
|
|
|
+ type="link"
|
|
|
|
+ :diabled="checkDangerActionRunning(index)"
|
|
|
|
+ @click="onRecheck(index)"
|
|
|
|
+ >复查</a-button
|
|
|
|
+ >
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="checkActionValid(index, 'buildTask')"
|
|
|
|
+ type="link"
|
|
|
|
+ :diabled="checkDangerActionRunning(index)"
|
|
|
|
+ @click="onBuildTask(index)"
|
|
|
|
+ >生成任务</a-button
|
|
|
|
+ >
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="checkActionValid(index, 'delete')"
|
|
|
|
+ type="link"
|
|
|
|
+ :diabled="checkDangerActionRunning(index)"
|
|
|
|
+ @click="onDelete(index)"
|
|
|
|
+ >删除</a-button
|
|
|
|
+ >
|
|
|
|
+ </template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</a-table>
|
|
</a-table>
|
|
@@ -97,7 +102,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import { ref, reactive, onMounted } from "vue";
|
|
|
|
|
|
+import { ref, reactive, onMounted, watch, onBeforeUnmount } from "vue";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import { PlusCircleOutlined } from "@ant-design/icons-vue";
|
|
import { PlusCircleOutlined } from "@ant-design/icons-vue";
|
|
import { message } from "ant-design-vue";
|
|
import { message } from "ant-design-vue";
|
|
@@ -121,6 +126,7 @@ import { showConfirm } from "@/utils/uiUtils";
|
|
import { useUserStore } from "@/store";
|
|
import { useUserStore } from "@/store";
|
|
|
|
|
|
import ModifyRecognizeCheckTask from "./ModifyRecognizeCheckTask.vue";
|
|
import ModifyRecognizeCheckTask from "./ModifyRecognizeCheckTask.vue";
|
|
|
|
+import { useIntervalFn } from "@vueuse/core";
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
name: "RecognizeCheck",
|
|
name: "RecognizeCheck",
|
|
@@ -206,6 +212,10 @@ const curRow = ref<RecognizeCheckListItem | null>(null);
|
|
const { dataList, pagination, loading, getList, toPage, deletePageLastItem } =
|
|
const { dataList, pagination, loading, getList, toPage, deletePageLastItem } =
|
|
useTable<RecognizeCheckListItem>(recognizeCheckListPage, searchModel, false);
|
|
useTable<RecognizeCheckListItem>(recognizeCheckListPage, searchModel, false);
|
|
|
|
|
|
|
|
+const { pause, isActive, resume } = useIntervalFn(getList, 30 * 1000, {
|
|
|
|
+ immediate: false,
|
|
|
|
+});
|
|
|
|
+
|
|
type ActionType =
|
|
type ActionType =
|
|
| "arbitrate"
|
|
| "arbitrate"
|
|
| "edit"
|
|
| "edit"
|
|
@@ -338,4 +348,22 @@ onMounted(async () => {
|
|
await getConditionList();
|
|
await getConditionList();
|
|
await toPage(1);
|
|
await toPage(1);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+watch(
|
|
|
|
+ dataList,
|
|
|
|
+ () => {
|
|
|
|
+ pause();
|
|
|
|
+ if (
|
|
|
|
+ dataList.value.find((item) => {
|
|
|
|
+ return item.building || item.deleting || item.reseting;
|
|
|
|
+ })
|
|
|
|
+ ) {
|
|
|
|
+ resume();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ { deep: true, immediate: true }
|
|
|
|
+);
|
|
|
|
+onBeforeUnmount(() => {
|
|
|
|
+ pause();
|
|
|
|
+});
|
|
</script>
|
|
</script>
|