|
@@ -49,12 +49,12 @@
|
|
|
<el-table-column label="执行日期" align="center" prop="create_time" />
|
|
|
<el-table-column label="已完成" align="center" prop="completed_num">
|
|
|
<template #default="scope">
|
|
|
- <el-text class="common-btn-text-primary" @click="handleCompletedClick(scope.row)">{{ scope.row.completed_num }}</el-text>
|
|
|
+ <el-text class="common-btn-text-primary" @click="handleCompletedClick(scope.row, 'completed')">{{ scope.row.completed_num }}</el-text>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="未完成" align="center" prop="incomplete_num">
|
|
|
<template #default="scope">
|
|
|
- <el-text class="common-btn-text-primary" @click="handleIncompletedClick(scope.row)">{{ scope.row.incomplete_num }}</el-text>
|
|
|
+ <el-text class="common-btn-text-primary" @click="handleIncompletedClick(scope.row, 'incomplete')">{{ scope.row.incomplete_num }}</el-text>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
@@ -74,15 +74,15 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <RescueResourcesResult v-if="rescueResourcesResultState.show" :event-id="rescueResourcesResultState.eventId" @close="handleCancel" />
|
|
|
+ <RescueResourcesResult v-if="rescueResourcesResultState.show" :event-id="rescueResourcesResultState.eventId" :taskId="rescueResourcesResultState.task_id" @close="handleCancel" />
|
|
|
<RescueResourcesEdit
|
|
|
v-if="rescueResourcesEditState.show"
|
|
|
:event-id="rescueResourcesEditState.eventId"
|
|
|
@close="handleCancel"
|
|
|
@refresh-parent="refreshBoth"
|
|
|
/>
|
|
|
- <RescueResourcesCompleted v-if="rescueResourcesCompletedState.show" :event-id="rescueResourcesCompletedState.eventId" @close="handleCancel" />
|
|
|
- <RescueResourcesIncomplete v-if="rescueResourcesIncompleteState.show" :event-id="rescueResourcesIncompleteState.eventId" @close="handleCancel" />
|
|
|
+ <RescueResourcesCompleted v-if="rescueResourcesCompletedState.show" :event-id="rescueResourcesCompletedState.eventId" :taskId="rescueResourcesCompletedState.task_id" :state="rescueResourcesCompletedState.state" @close="handleCancel" />
|
|
|
+ <RescueResourcesIncomplete v-if="rescueResourcesIncompleteState.show" :event-id="rescueResourcesIncompleteState.eventId" :taskId="rescueResourcesIncompleteState.task_id" :state="rescueResourcesIncompleteState.state" @close="handleCancel" />
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
import { workDetail, workSubList, updatetask, deleteRisk } from '@/api/inspectionWork/rescueResources';
|
|
@@ -94,6 +94,7 @@ import RescueResourcesCompleted from './rescueResourcesCompleted.vue';
|
|
|
import RescueResourcesIncomplete from './rescueResourcesIncomplete.vue';
|
|
|
import { to } from 'await-to-js';
|
|
|
import { parseTime } from '@/utils/ruoyi';
|
|
|
+import Completed from '@/views/inspectionWork/completed.vue';
|
|
|
const props = defineProps<{ eventId: string }>();
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const total = ref(0);
|
|
@@ -166,15 +167,20 @@ let rescueResourcesEditState = reactive({
|
|
|
});
|
|
|
let rescueResourcesResultState = reactive({
|
|
|
show: false,
|
|
|
- eventId: ''
|
|
|
+ eventId: '',
|
|
|
+ task_id: ''
|
|
|
});
|
|
|
let rescueResourcesCompletedState = reactive({
|
|
|
show: false,
|
|
|
- eventId: ''
|
|
|
+ eventId: '',
|
|
|
+ task_id: '',
|
|
|
+ state: ''
|
|
|
});
|
|
|
let rescueResourcesIncompleteState = reactive({
|
|
|
show: false,
|
|
|
- eventId: ''
|
|
|
+ eventId: '',
|
|
|
+ task_id: '',
|
|
|
+ state: ''
|
|
|
});
|
|
|
const handleCancel = () => {
|
|
|
rescueResourcesEditState.show = false;
|
|
@@ -189,18 +195,23 @@ const handleUpdate = () => {
|
|
|
const handleResult = (row) => {
|
|
|
if (row) {
|
|
|
rescueResourcesResultState.eventId = row.id; // 假设eventId是id字段
|
|
|
+ rescueResourcesResultState.task_id = row.task_id;
|
|
|
rescueResourcesResultState.show = true;
|
|
|
}
|
|
|
};
|
|
|
-const handleCompletedClick = (row) => {
|
|
|
+const handleCompletedClick = (row, state) => {
|
|
|
if (row) {
|
|
|
rescueResourcesCompletedState.eventId = row.id; // 假设eventId是id字段
|
|
|
+ rescueResourcesCompletedState.task_id = row.task_id;
|
|
|
+ rescueResourcesCompletedState.state = state;
|
|
|
rescueResourcesCompletedState.show = true;
|
|
|
}
|
|
|
};
|
|
|
-const handleIncompletedClick = (row) => {
|
|
|
+const handleIncompletedClick = (row, state) => {
|
|
|
if (row) {
|
|
|
rescueResourcesIncompleteState.eventId = row.id; // 假设eventId是id字段
|
|
|
+ rescueResourcesIncompleteState.task_id = row.task_id;
|
|
|
+ rescueResourcesIncompleteState.state = state;
|
|
|
rescueResourcesIncompleteState.show = true;
|
|
|
}
|
|
|
};
|