Procházet zdrojové kódy

修改任务登记

hmm před 7 měsíci
rodič
revize
b9d44dd8e0

+ 6 - 3
src/api/emergencyCommandMap/JointDuty.ts

@@ -72,15 +72,18 @@ export function addTask(data) {
 export function selectTask(data) {
   return request({
     url: '/api/taskRegistration/select',
-    method: 'post',
-    data: data
+    method: 'get',
+    params: {
+      sortBy: 'creation_time'
+
+    }
   });
 }
 // 任务更新
 export function updateTaskRegistration(data) {
   return request({
     url: '/api/taskRegistration/update',
-    method: 'post',
+    method: 'put',
     data: data
   });
 }

+ 0 - 7
src/types/components.d.ts

@@ -45,9 +45,6 @@ declare module 'vue' {
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
-    ElPopover: typeof import('element-plus/es')['ElPopover']
-    ElRadio: typeof import('element-plus/es')['ElRadio']
-    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
@@ -60,14 +57,12 @@ declare module 'vue' {
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-    ElTableV2: typeof import('element-plus/es')['ElTableV2']
     ElTabPane: typeof import('element-plus/es')['ElTabPane']
     ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']
     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
-    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
     FooterSection: typeof import('./../components/FooterSection/index.vue')['default']
@@ -78,7 +73,6 @@ declare module 'vue' {
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
-    IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
@@ -110,7 +104,6 @@ declare module 'vue' {
     VideoContainer: typeof import('./../components/HKVideo/video-container.vue')['default']
     VideoContainer2: typeof import('./../components/HKVideo/video-container2.vue')['default']
     YMap: typeof import('./../components/Map/YMap.vue')['default']
-    YMapold: typeof import('./../components/Map/YMapold.vue')['default']
     YztMap: typeof import('./../components/Map/YztMap/index.vue')['default']
   }
   export interface ComponentCustomProperties {

+ 4 - 0
src/views/emergencyCommandMap/RightSection/RenWuDengJi.vue

@@ -55,11 +55,15 @@ const newTask = reactive({
 });
 const units = ref([]);
 
+
+
 interface Props {
   data: string;
 }
 const props = withDefaults(defineProps<Props>(), {});
 
+const id = props.data;
+
 // 获取单位数据
 const fetchUnits = async () => {
   try {

+ 4 - 6
src/views/emergencyCommandMap/RightSection/RenWuGenZong.vue

@@ -19,7 +19,7 @@
     <button @click="toggleScroll" class="toggle-scroll-btn">{{ showScroll ? '收起' : '查看更多 >>' }}</button>
   </div>
 
-  <RenWuTanChuan
+  <RenWuGengXin
     v-model="newSectionState.showListDialog"
     :task="selectedTask"
     @update-success="handleUpdateSuccess"
@@ -32,7 +32,7 @@
 import { onMounted, ref, reactive } from 'vue';
 import { selectTask } from '@/api/emergencyCommandMap/JointDuty';
 import { parseTime } from '@/utils/ruoyi';
-import RenWuTanChuan from '@/views/emergencyCommandMap/RightSection/RenWuTanChuan.vue';
+import RenWuGengXin from '@/views/emergencyCommandMap/RightSection/RenWuGengXin.vue';
 
 const newSectionState = reactive({
   showListDialog: false,
@@ -40,9 +40,7 @@ const newSectionState = reactive({
 
 const selectedTask = ref({
   task_id: '',
-  // task_description: '',
-  // registrar: '',
-  // progress_status: '',
+  sortBy: 'creation_time',
   pageNum: 2,
   pageSize: 20
 });
@@ -57,7 +55,7 @@ const props = defineProps<{
 // 请求数据
 const fetchData = async () => {
   try {
-    const res = await selectTask({ eventId: props.eventId });
+    const res = await selectTask();
     res.data.forEach((item) => {
       item.update_time = parseTime(item.update_time);
     });

+ 9 - 4
src/views/emergencyCommandMap/RightSection/RenWuGengXin.vue

@@ -32,7 +32,7 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, reactive } from 'vue';
+import { ref, reactive, defineEmits, computed } from "vue";
 import { updateTaskRegistration } from '@/api/emergencyCommandMap/JointDuty.ts'; // 确保API路径正确
 
 const showRegisterDialog = ref(false);
@@ -56,13 +56,18 @@ const closeDialog = () => {
   showRegisterDialog.value = false;
 };
 
+const emit = defineEmits(['update:modelValue', 'update-success']);
+
+const visible = computed({
+  get: () => props.modelValue,
+  set: (val) => emit('update:modelValue', val)
+});
+
 // 确认登记任务
 const confirmRegister = async () => {
   try {
-    const response = await updateTask({
+    const response = await updateTaskRegistration({
       task_id: newTask.task_id, // 假设任务有唯一ID
-      task_description: newTask.task_description,
-      unit_name: newTask.unit_name,
       processing_status: newTask.processing_status
     });
     if (response.code === 200) {

+ 1 - 1
src/views/emergencyCommandMap/RightSection/RenWuTanChuan.vue

@@ -41,7 +41,7 @@ const props = defineProps({
       id: '',
       task_description: '',
       unit_name: '',
-      registrar: ''
+      processing_status: ''
     })
   }
 });