Kaynağa Gözat

巡查任务、分页

Hwf 1 ay önce
ebeveyn
işleme
b6360dae9a

+ 2 - 2
src/api/inspectionWork/inspector.ts

@@ -108,11 +108,11 @@ export function addtask(data) {
   });
 }
 // 查询用户详情
-export function workSubList(task_id) {
+export function workSubList(task_id, params) {
   return request({
     url: '/api/riskManagement/inspection/task/children/task/' + task_id + '/list',
     method: 'get',
-    params: task_id
+    params: params
   });
 }
 // 删除风险任务

+ 2 - 2
src/views/inspectionWork/completed.vue

@@ -58,7 +58,7 @@ const total = ref(0);
 const deptOptions = ref([]);
 const deptTreeRef = ref(null);
 const tableData = ref([]);
-const props = defineProps<{ eventId: string, taskId: string, state: string }>();
+const props = defineProps<{ eventId: string, state: string }>();
 
 const initFormData = reactive({
   area: '',
@@ -140,7 +140,7 @@ const filename = '已完成情况';
 
 const baseUrl = import.meta.env.VITE_APP_BASE_API;
 const handleExport = () => {
-  download2(baseUrl + '/api/riskManagement/inspection/task/children/task/log/'+props.taskId+'/'+props.state+'/export', filename + '.xlsx');
+  download2(baseUrl + '/api/riskManagement/inspection/task/children/task/log/' + props.eventId + '/' + props.state + '/export', filename + '.xlsx');
 };
 
 onMounted(async () => {

+ 2 - 2
src/views/inspectionWork/incompleted.vue

@@ -57,7 +57,7 @@ const total = ref(0);
 const deptOptions = ref([]);
 const deptTreeRef = ref(null);
 const tableData = ref([]);
-const props = defineProps<{ eventId: string, taskId: string, state: string }>();
+const props = defineProps<{ eventId: string; state: string }>();
 
 const initFormData = reactive({
   area: '',
@@ -139,7 +139,7 @@ const filename = '未完成情况';
 
 const baseUrl = import.meta.env.VITE_APP_BASE_API;
 const handleExport = () => {
-  download2(baseUrl + '/api/riskManagement/inspection/task/children/task/log/'+props.taskId+'/'+props.state+'/export', filename + '.xlsx');
+  download2(baseUrl + '/api/riskManagement/inspection/task/children/task/log/' + props.eventId + '/' + props.state + '/export', filename + '.xlsx');
 };
 
 onMounted(async () => {

+ 1 - 2
src/views/inspectionWork/patrolSubResult.vue

@@ -93,7 +93,6 @@ const formattedDivisionData = ref([]);
 const rawDivisionData = ref([]);
 const props = defineProps<{
   eventId: string | number;
-  taskId: string | number;
 }>();
 const initFormData = reactive({
   id: '',
@@ -164,7 +163,7 @@ const handleQuery = () => {
 
 const filename = '巡查结果';
 const handleExport = () => {
-  download2(baseUrl + '/api/riskManagement/inspection/task/children/task/result/'+props.taskId+'/export', filename + '.xlsx');
+  download2(baseUrl + '/api/riskManagement/inspection/task/children/task/result/' + props.eventId + '/export', filename + '.xlsx');
 };
 
 // 重置查询条件

+ 3 - 9
src/views/inspectionWork/patrolSubTasks.vue

@@ -74,10 +74,10 @@
       </el-col>
     </el-row>
   </div>
-  <PatrolSubResult v-if="patrolSubResultState.show" :event-id="patrolSubResultState.eventId" :taskId="patrolSubResultState.task_id" @close="handleCancel" />
+  <PatrolSubResult v-if="patrolSubResultState.show" :event-id="patrolSubResultState.eventId" @close="handleCancel" />
   <PatrolTaskEdit v-if="patrolTaskEditState.show" :event-id="patrolTaskEditState.eventId" @close="handleCancel" @refresh-parent="refreshBoth" />
-  <Completed v-if="completedState.show" :event-id="completedState.eventId" :taskId="completedState.task_id" :state="completedState.state" @close="handleCancel" />
-  <Incompleted v-if="incompletedState.show" :event-id="incompletedState.eventId" :taskId="incompletedState.task_id" :state="incompletedState.state" @close="handleCancel" />
+  <Completed v-if="completedState.show" :event-id="completedState.eventId" :state="completedState.state" @close="handleCancel" />
+  <Incompleted v-if="incompletedState.show" :event-id="incompletedState.eventId" :state="incompletedState.state" @close="handleCancel" />
 </template>
 <script setup lang="ts">
 import { workDetail, workSubList, updatetask, deleteRisk } from '@/api/inspectionWork/inspector';
@@ -173,18 +173,15 @@ let patrolTaskEditState = reactive({
 let patrolSubResultState = reactive({
   show: false,
   eventId: '',
-  task_id: ''
 });
 let completedState = reactive({
   show: false,
   eventId: '',
-  task_id: '',
   state: ''
 });
 let incompletedState = reactive({
   show: false,
   eventId: '',
-  task_id: '',
   state: ''
 });
 const handleCancel = () => {
@@ -200,14 +197,12 @@ const handleUpdate = () => {
 const handleResult = (row) => {
   if (row) {
     patrolSubResultState.eventId = row.id; // 假设eventId是id字段
-    patrolSubResultState.task_id = row.task_id;
     patrolSubResultState.show = true;
   }
 };
 const handleCompletedClick = (row, state) => {
   if (row) {
     completedState.eventId = row.id; // 假设eventId是id字段
-    completedState.task_id = row.task_id;
     completedState.state = state;
     completedState.show = true;
   }
@@ -215,7 +210,6 @@ const handleCompletedClick = (row, state) => {
 const handleIncompletedClick = (row, state) => {
   if (row) {
     incompletedState.eventId = row.id; // 假设eventId是id字段
-    incompletedState.task_id = row.task_id
     incompletedState.state = state;
     incompletedState.show = true;
   }