|
@@ -0,0 +1,270 @@
|
|
|
+<template>
|
|
|
+ <div class="common-dialog">
|
|
|
+ <div class="common-dialog-content">
|
|
|
+ <div class="common-dialog-title-box">
|
|
|
+ <h3 class="common-dialog-title">新建应急庇护场所</h3>
|
|
|
+ </div>
|
|
|
+ <div class="common-dialog-box">
|
|
|
+ <el-form ref="form" :model="formData" :rules="rules" label-width="auto">
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="行政区域:" prop="administrative_region">
|
|
|
+ <el-input v-model="formData.administrative_region" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="应急避难场所全称:" prop="name">
|
|
|
+ <el-input v-model="formData.name" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="应急避难场所地址:" prop="address">
|
|
|
+ <el-input v-model="formData.address" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="按突发事件类型分类:" prop="emergency_type">
|
|
|
+ <el-input v-model="formData.emergency_type" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="避难种类:" prop="refuge_type">
|
|
|
+ <el-input v-model="formData.refuge_type" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="按避难时长设计分类:" prop="refuge_duration">
|
|
|
+ <el-input v-model="formData.refuge_duration" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="按空间类型分类:" prop="space_type">
|
|
|
+ <el-input v-model="formData.space_type" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="按总体功能定位分类:" prop="total_function">
|
|
|
+ <el-input v-model="formData.total_function" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="应急避难场所建设类型:" prop="shelter_type">
|
|
|
+ <el-input v-model="formData.shelter_type" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="应急避难场所所占地总面积:" prop="shelter_area">
|
|
|
+ <el-input v-model="formData.shelter_area" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="应急避难场所室内面积:" prop="shelter_indoor">
|
|
|
+ <el-input v-model="formData.shelter_indoor" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="避难场所容纳人数:" prop="shelter_galleryful">
|
|
|
+ <el-input v-model="formData.shelter_galleryful" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="物资储备:" prop="material_reserves">
|
|
|
+ <el-input v-model="formData.material_reserves" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="应急设施:" prop="emergency_facility">
|
|
|
+ <el-input v-model="formData.emergency_facility" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="认定部门:" prop="accrediting_department">
|
|
|
+ <el-input v-model="formData.accrediting_department" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="主管单位:" prop="competent_organization">
|
|
|
+ <el-input v-model="formData.competent_organization" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="建设单位:" prop="development_organization">
|
|
|
+ <el-input v-model="formData.development_organization" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="建成(或挂牌)时间:" prop="completion_time">
|
|
|
+ <el-input v-model="formData.completion_time" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="规划情况:" prop="planning_situation">
|
|
|
+ <el-input v-model="formData.planning_situation" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="建设总投资:" prop="total_investment">
|
|
|
+ <el-input v-model="formData.total_investment" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="建设标准名称:" prop="standard_name">
|
|
|
+ <el-input v-model="formData.standard_name" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="日常维护或管理人员数量:" prop="maintenance_personnel">
|
|
|
+ <el-input v-model="formData.maintenance_personnel" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="专职维护或管理人员数量:" prop="fulltime_personnel">
|
|
|
+ <el-input v-model="formData.fulltime_personnel" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="产权/运维单位:" prop="property_right">
|
|
|
+ <el-input v-model="formData.property_right" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" class="mb8">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="运维投入:" prop="maintenance_input">
|
|
|
+ <el-input v-model="formData.maintenance_input" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="运维投入渠道:" prop="input_channel">
|
|
|
+ <el-input v-model="formData.input_channel" style="width: 468px !important" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div class="common-dialog-footer">
|
|
|
+ <el-button @click="closeDialog">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { ref } from 'vue';
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
+import { addUnit } from '@/api/comprehensiveGuarantee/reliefResourceManagement/rescueUnit';
|
|
|
+
|
|
|
+const emits = defineEmits(['close']);
|
|
|
+
|
|
|
+const formData = ref({
|
|
|
+ administrative_region: '',
|
|
|
+ name: '',
|
|
|
+ address: '',
|
|
|
+ emergency_type: '',
|
|
|
+ refuge_type: '',
|
|
|
+ refuge_duration: '',
|
|
|
+ space_type: '',
|
|
|
+ total_function: '',
|
|
|
+ shelter_type: '',
|
|
|
+ shelter_area: '',
|
|
|
+ shelter_indoor: '',
|
|
|
+ shelter_galleryful: '',
|
|
|
+ material_reserves: '',
|
|
|
+ emergency_facility: '',
|
|
|
+ accrediting_department: '',
|
|
|
+ competent_organization: '',
|
|
|
+ development_organization: '',
|
|
|
+ completion_time: '',
|
|
|
+ planning_situation: '',
|
|
|
+ total_investment: '',
|
|
|
+ standard_name: '',
|
|
|
+ maintenance_personnel: '',
|
|
|
+ fulltime_personnel: '',
|
|
|
+ property_right: '',
|
|
|
+ maintenance_input: '',
|
|
|
+ input_channel: ''
|
|
|
+});
|
|
|
+
|
|
|
+const rules = ref({
|
|
|
+ administrative_region: [{ required: true, message: '行政区域不能为空', trigger: 'blur' }],
|
|
|
+ name: [{ required: true, message: '应急避难场所全称不能为空', trigger: 'blur' }],
|
|
|
+ address: [{ required: true, message: '应急避难场所地址不能为空', trigger: 'blur' }],
|
|
|
+ emergency_type: [{ required: true, message: '按突发事件类型分类不能为空', trigger: 'blur' }],
|
|
|
+ refuge_type: [{ required: true, message: '避难种类不能为空', trigger: 'blur' }],
|
|
|
+ refuge_duration: [{ required: true, message: '按避难时长设计分类不能为空', trigger: 'blur' }],
|
|
|
+ space_type: [{ required: true, message: '按空间类型分类不能为空', trigger: 'blur' }],
|
|
|
+ total_function: [{ required: true, message: '按总体功能定位分类不能为空', trigger: 'blur' }],
|
|
|
+ shelter_type: [{ required: true, message: '应急避难场所建设类型不能为空', trigger: 'blur' }],
|
|
|
+ shelter_area: [{ required: true, message: '应急避难场所所占地总面积不能为空', trigger: 'blur' }],
|
|
|
+ shelter_indoor: [{ required: true, message: '应急避难场所室内面积不能为空', trigger: 'blur' }],
|
|
|
+ shelter_galleryful: [{ required: true, message: '避难场所容纳人数不能为空', trigger: 'blur' }],
|
|
|
+ material_reserves: [{ required: true, message: '物资储备不能为空', trigger: 'blur' }],
|
|
|
+ emergency_facility: [{ required: true, message: '应急设施不能为空', trigger: 'blur' }],
|
|
|
+ accrediting_department: [{ required: true, message: '认定部门不能为空', trigger: 'blur' }],
|
|
|
+ competent_organization: [{ required: true, message: '主管单位不能为空', trigger: 'blur' }],
|
|
|
+ development_organization: [{ required: true, message: '建设单位不能为空', trigger: 'blur' }],
|
|
|
+ completion_time: [{ required: true, message: '建成(或挂牌)时间不能为空', trigger: 'blur' }],
|
|
|
+ planning_situation: [{ required: true, message: '规划情况不能为空', trigger: 'blur' }],
|
|
|
+ total_investment: [{ required: true, message: '建设总投资不能为空', trigger: 'blur' }],
|
|
|
+ standard_name: [{ required: true, message: '建设标准名称不能为空', trigger: 'blur' }],
|
|
|
+ maintenance_personnel: [{ required: true, message: '日常维护或管理人员数量不能为空', trigger: 'blur' }],
|
|
|
+ fulltime_personnel: [{ required: true, message: '专职维护或管理人员数量不能为空', trigger: 'blur' }],
|
|
|
+ property_right: [{ required: true, message: '产权/运维单位不能为空', trigger: 'blur' }],
|
|
|
+ maintenance_input: [{ required: true, message: '运维投入不能为空', trigger: 'blur' }],
|
|
|
+ input_channel: [{ required: true, message: '运维投入渠道不能为空', trigger: 'blur' }]
|
|
|
+});
|
|
|
+
|
|
|
+const form = ref(null); // 定义 form 变量
|
|
|
+
|
|
|
+const closeDialog = () => {
|
|
|
+ emits('close');
|
|
|
+};
|
|
|
+
|
|
|
+const router = useRouter();
|
|
|
+
|
|
|
+// 提交表单
|
|
|
+// const submitForm = async () => {
|
|
|
+// try {
|
|
|
+// await form.value.validate();
|
|
|
+// const payload = {
|
|
|
+// units: [formData.value]
|
|
|
+// };
|
|
|
+// const response = await addUnit(payload);
|
|
|
+// if (response.code === 200) {
|
|
|
+// ElMessage.success('提交成功');
|
|
|
+// closeDialog();
|
|
|
+// emits('refresh');
|
|
|
+// } else {
|
|
|
+// ElMessage.error(response.msg || '提交失败,请稍后再试');
|
|
|
+// }
|
|
|
+// } catch (error) {
|
|
|
+// ElMessage.error('表单验证失败,请检查输入');
|
|
|
+// }
|
|
|
+// };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped></style>
|