yangyuxuan 2 月之前
父節點
當前提交
3871e48efb

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

@@ -27,14 +27,10 @@ declare module 'vue' {
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElButton: typeof import('element-plus/es')['ElButton']
-    ElCard: typeof import('element-plus/es')['ElCard']
-    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
-    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
-    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
@@ -47,31 +43,23 @@ declare module 'vue' {
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
     ElInput: typeof import('element-plus/es')['ElInput']
-    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
     ElPagination: typeof import('element-plus/es')['ElPagination']
     ElPopover: typeof import('element-plus/es')['ElPopover']
     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']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
     ElSelect: typeof import('element-plus/es')['ElSelect']
-    ElStep: typeof import('element-plus/es')['ElStep']
-    ElSteps: typeof import('element-plus/es')['ElSteps']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
     ElText: typeof import('element-plus/es')['ElText']
-    ElTimeline: typeof import('element-plus/es')['ElTimeline']
-    ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
     ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
     ElTree: typeof import('element-plus/es')['ElTree']
-    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     ExcelEditor: typeof import('./../components/ExcelEditor/index.vue')['default']
     ExcelEditor: typeof import('./../components/ExcelEditor/index.vue')['default']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
@@ -84,8 +72,6 @@ declare module 'vue' {
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
-    IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
-    IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']

+ 4 - 4
src/views/comprehensiveGuarantee/reliefResourceManagement/rescueStationEdit.vue

@@ -156,11 +156,11 @@ const fetchUnitData = async () => {
 const submitForm = async () => {
 const submitForm = async () => {
   const temp = deepClone(formData.value);
   const temp = deepClone(formData.value);
   temp.kfsj = temp.kfsj[0] + '-' + temp.kfsj[1];
   temp.kfsj = temp.kfsj[0] + '-' + temp.kfsj[1];
-  const payload = {
-    stations: [temp]
-  };
+  // const payload = {
+  //   stations: [temp]
+  // };
   // 假设表单已经通过验证
   // 假设表单已经通过验证
-  const response = await uploadStation(props.eventId, payload);
+  const response = await uploadStation(props.eventId, temp);
   if (response.code === 200) {
   if (response.code === 200) {
     ElMessage.success('提交成功');
     ElMessage.success('提交成功');
     closeDialog();
     closeDialog();

+ 7 - 1
src/views/comprehensiveGuarantee/reliefResourceManagement/shelterAdd.vue

@@ -114,7 +114,13 @@
             </el-col>
             </el-col>
             <el-col :span="10">
             <el-col :span="10">
               <el-form-item label="建成时间:" prop="completion_time">
               <el-form-item label="建成时间:" prop="completion_time">
-                <el-input v-model="formData.completion_time" placeholder="请输入建成时间" style="width: 468px !important" />
+<!--                <el-input v-model="formData.completion_time" placeholder="请输入建成时间" style="width: 468px !important" />-->
+                <el-date-picker
+                  v-model="formData.completion_time"
+                  type="datetime"
+                  placeholder="请选择建成时间"
+                  style="width: 468px !important"
+                />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>

+ 7 - 1
src/views/comprehensiveGuarantee/reliefResourceManagement/shelterEdit.vue

@@ -114,7 +114,13 @@
             </el-col>
             </el-col>
             <el-col :span="10">
             <el-col :span="10">
               <el-form-item label="建成时间:" prop="completion_time">
               <el-form-item label="建成时间:" prop="completion_time">
-                <el-input v-model="formData.completion_time" placeholder="请输入建成时间" style="width: 468px !important" />
+<!--                <el-input v-model="formData.modified_time" placeholder="请输入建成时间" style="width: 468px !important" />-->
+                <el-date-picker
+                  v-model="formData.completion_time"
+                  type="datetime"
+                  placeholder="请选择建成时间"
+                  style="width: 468px !important"
+                />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>

+ 5 - 2
src/views/comprehensiveGuarantee/reliefResourceManagement/shelterView.vue

@@ -110,7 +110,7 @@
             </el-col>
             </el-col>
             <el-col :span="10">
             <el-col :span="10">
               <el-form-item label="建成时间:" prop="completion_time">
               <el-form-item label="建成时间:" prop="completion_time">
-                <el-input v-model="formData.completion_time" placeholder="请输入建成时间" style="width: 468px !important" />
+                <el-input v-model="formData.modified_time" placeholder="请输入建成时间" style="width: 468px !important" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
@@ -175,6 +175,7 @@
 import { ref, onMounted } from 'vue';
 import { ref, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
 import { ElMessage } from 'element-plus';
 import { getSheltert } from '@/api/comprehensiveGuarantee/reliefResourceManagement/shelter';
 import { getSheltert } from '@/api/comprehensiveGuarantee/reliefResourceManagement/shelter';
+import { parseTime } from '@/utils/ruoyi';
 
 
 const emits = defineEmits(['close']);
 const emits = defineEmits(['close']);
 const props = defineProps<{
 const props = defineProps<{
@@ -201,7 +202,9 @@ const closeDialog = () => {
 const fetchShelterData = async () => {
 const fetchShelterData = async () => {
   const response = await getSheltert(props.eventId);
   const response = await getSheltert(props.eventId);
   if (response.code === 200) {
   if (response.code === 200) {
-    formData.value = response.shelter;
+    let temp = response.shelter;
+    temp.modified_time = parseTime(temp.modified_time);
+    formData.value = temp;
   } else {
   } else {
     ElMessage.error('未找到相关数据');
     ElMessage.error('未找到相关数据');
   }
   }

+ 33 - 26
src/views/dataFilling/tableDetails.vue

@@ -15,7 +15,7 @@
         <!--          <el-button v-if="reportInfo.issued_status === 0" type="primary" @click="handleReport()">智能识别</el-button>-->
         <!--          <el-button v-if="reportInfo.issued_status === 0" type="primary" @click="handleReport()">智能识别</el-button>-->
         <!--        </el-col>-->
         <!--        </el-col>-->
         <el-col v-if="reportInfo.issued_status === 1" :span="1.5">
         <el-col v-if="reportInfo.issued_status === 1" :span="1.5">
-          <el-button type="primary" @click="handleSaveTemporarily(1)">暂存</el-button>
+          <el-button type="primary" @click="handleSaveTemporarily(formRef,1)">暂存</el-button>
         </el-col>
         </el-col>
         <!--        <el-col :span="1.5">-->
         <!--        <el-col :span="1.5">-->
         <!--          <el-button v-if="reportInfo.issued_status === 2" type="primary" @click="handleData()">数据</el-button>-->
         <!--          <el-button v-if="reportInfo.issued_status === 2" type="primary" @click="handleData()">数据</el-button>-->
@@ -180,6 +180,10 @@ const rules = {
   ],
   ],
   user_ids: [{ required: true, message: '请选择填报人', trigger: 'blur' }]
   user_ids: [{ required: true, message: '请选择填报人', trigger: 'blur' }]
 };
 };
+const tempRules = {
+  table_name: rules.table_name,
+  end_time: rules.end_time
+};
 const selectedReporter = ref(null);
 const selectedReporter = ref(null);
 const personNum = ref();
 const personNum = ref();
 
 
@@ -381,33 +385,36 @@ const handleReload = () => {
   alert('表格已清空');
   alert('表格已清空');
 };
 };
 
 
-const handleSaveTemporarily = async (statuCode) => {
-  if (hotData.value && hotData.value[0] && hotData.value[0].length > 0) {
-    const data2 = [];
-    hotData.value[0].forEach((item) => {
-      if (!!item) {
-        data2.push(item);
-      }
-    });
-    reportInfo.value.field_names = hotData.value;
-  }
-
-  reportInfo.value.issued_status = statuCode;
+const handleSaveTemporarily = async (formEl, statuCode) => {
+  if (!formRef.value) return;
+  const isValid = await formRef.value.validateField(['table_name', 'end_time']);
+  if (isValid) {
+    if (hotData.value && hotData.value[0] && hotData.value[0].length > 0) {
+      const data2 = [];
+      hotData.value[0].forEach((item) => {
+        if (!!item) {
+          data2.push(item);
+        }
+      });
+      reportInfo.value.field_names = hotData.value;
+    }
+    reportInfo.value.issued_status = statuCode;
 
 
-  let data = {
-    creator_name: reportInfo.value.creator_name,
-    creator_phone: reportInfo.value.creator_phone,
-    table_name: reportInfo.value.table_name,
-    status: reportInfo.value.issued_status,
-    period_type: reportInfo.value.period_type,
-    end_time: reportInfo.value.end_time,
-    new_fields: reportInfo.value.field_names[0],
-    user_ids: reportInfo.value.user_ids
+    let data = {
+      creator_name: reportInfo.value.creator_name,
+      creator_phone: reportInfo.value.creator_phone,
+      table_name: reportInfo.value.table_name,
+      status: reportInfo.value.issued_status,
+      period_type: reportInfo.value.period_type,
+      end_time: reportInfo.value.end_time,
+      new_fields: !reportInfo.value.field_names ? [] : reportInfo.value.field_names[0],
+      user_ids: reportInfo.value.user_ids
+    };
+    fillingChange(reportId.value, data).then(() => {
+      proxy.$modal.msgSuccess('暂存成功');
+      emits('close');
+    });
   };
   };
-  fillingChange(reportId.value, data).then(() => {
-    proxy.$modal.msgSuccess('暂存成功');
-    emits('close');
-  });
 };
 };
 
 
 const handleSave = async (formEl, statuCode) => {
 const handleSave = async (formEl, statuCode) => {