|
|
|
@ -1,107 +1,49 @@
|
|
|
|
|
<template> |
|
|
|
|
<ContentWrap> |
|
|
|
|
|
|
|
|
|
<el-form |
|
|
|
|
ref="formRef" |
|
|
|
|
:model="formData" |
|
|
|
|
:rules="formRules" |
|
|
|
|
label-width="100px" |
|
|
|
|
v-loading="formLoading" |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
<el-form-item label="企业名称" prop="enterprisesName"> |
|
|
|
|
<el-input v-model="formData.enterprisesName" placeholder="请输入企业名称" readonly="true"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="企业类型" prop="type"> |
|
|
|
|
|
|
|
|
|
<el-select v-model="formData.type" placeholder="请选择企业类型" readonly="true" > |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_TYPE)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
<el-input v-model="formData.enterprisesName" placeholder="请输入企业名称" readonly="true"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="企业所属区域" prop="region"> |
|
|
|
|
<el-select v-model="formData.region" placeholder="请选择企业所属区域"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_AREA)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="企业地址" prop="address"> |
|
|
|
|
<el-input v-model="formData.address" type="textarea" placeholder="请输入企业地址" readonly="true"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="环保负责人姓名" prop="contactName"> |
|
|
|
|
<el-input v-model="formData.contactName" placeholder="请输入环保负责人姓名" readonly="true" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="企业环保负责人联系电话" prop="environmentalContactPhone"> |
|
|
|
|
<el-input v-model="formData.environmentalContactPhone" placeholder="请输入企业环保负责人联系电话" readonly="true" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="企业注册号" prop="registrationNumber"> |
|
|
|
|
<el-input v-model="formData.registrationNumber" placeholder="请输入企业注册号" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="企业介绍" prop="introduction"> |
|
|
|
|
<el-input v-model="formData.introduction" type="textarea" placeholder="请输入企业介绍" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="企业照片" prop="size"> |
|
|
|
|
<InnerUploadImg |
|
|
|
|
:uploadList="uploadList" |
|
|
|
|
@handler-success="uploadSuccess" |
|
|
|
|
ref="uploadRef" |
|
|
|
|
@handler-remove="uploadRemove" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="企业成立时间" prop="establishmentDate"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="formData.establishmentDate" |
|
|
|
|
type="date" |
|
|
|
|
value-format="x" |
|
|
|
|
placeholder="选择企业成立时间" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="企业经纬度" prop="gpsLocation"> |
|
|
|
|
<el-input v-model="formData.gpsLocation" placeholder="请输入企业经纬度" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="管理部门" prop="managerDeptId"> |
|
|
|
|
<el-select v-model="formData.managerDeptId" placeholder="请选择管理部门"> |
|
|
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="资质整明" prop="managerDeptId"> |
|
|
|
|
<el-select v-model="formData.managerDeptId" placeholder="请选择管理部门"> |
|
|
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="执法记录" prop="managerDeptId"> |
|
|
|
|
<el-select v-model="formData.managerDeptId" placeholder="请选择管理部门"> |
|
|
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
</ContentWrap> |
|
|
|
|
</template>s |
|
|
|
|
<section class="flex flex-col gap-5"> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span >企业名称</span> |
|
|
|
|
<span>{{ formData.enterprisesName }} </span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>企业类型</span> |
|
|
|
|
<span>{{ getDictLabel(DICT_TYPE.ENTERPRISES_TYPE, formData.type) }} </span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>企业所属区域</span> |
|
|
|
|
<span>{{ getDictLabel(DICT_TYPE.ENTERPRISES_AREA, formData.region) }} </span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>企业地址</span> |
|
|
|
|
<span>{{ formData.address }} </span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>负责人</span> |
|
|
|
|
<span>{{ formData.contactName }} {{ formData.environmentalContactPhone }}</span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>成立时间</span> |
|
|
|
|
<span>{{ formData.establishmentDate }}</span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>成立时间</span> |
|
|
|
|
<span>{{ formData.establishmentDate }}</span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>企业介绍</span> |
|
|
|
|
<span>{{ formData.introduction }}</span> |
|
|
|
|
</section> |
|
|
|
|
<section class="flex gap-10px"> |
|
|
|
|
<span>图片介绍</span> |
|
|
|
|
<img v-for="img in formData.files" :src="img.url" :key="img.id" alt="" /> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
</template> |
|
|
|
|
s |
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict' |
|
|
|
|
import { EnterprisesApi, EnterprisesVO, } from '@/api/enterprises' |
|
|
|
|
import { FileInfoApi } from '@/api/enterprises/fileinfo' |
|
|
|
|
import { ElMessage,ElLoading } from 'element-plus' |
|
|
|
|
import { getDictLabel, DICT_TYPE } from '@/utils/dict' |
|
|
|
|
import { EnterprisesApi } from '@/api/enterprises' |
|
|
|
|
|
|
|
|
|
/** 企业 表单 */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
|
|
|
|
const formData = ref({ |
|
|
|
|
id: undefined, |
|
|
|
|
departmentId: undefined, |
|
|
|
@ -117,21 +59,16 @@ const formData = ref({
|
|
|
|
|
establishmentDate: undefined, |
|
|
|
|
gpsLocation: undefined, |
|
|
|
|
managerDeptId: undefined, |
|
|
|
|
ides:undefined |
|
|
|
|
ides: undefined |
|
|
|
|
}) |
|
|
|
|
const formRules = reactive({ |
|
|
|
|
type: [{ required: true, message: '企业类型不能为空', trigger: 'change' }], |
|
|
|
|
enterprisesName: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }], |
|
|
|
|
}) |
|
|
|
|
const formRef = ref() // 表单 Ref |
|
|
|
|
const route=useRoute() |
|
|
|
|
|
|
|
|
|
function getDetail(){ |
|
|
|
|
EnterprisesApi.getEnterprises(route.query.id as any).then(res=>{ |
|
|
|
|
formData.value=res |
|
|
|
|
const route = useRoute() |
|
|
|
|
|
|
|
|
|
function getDetail() { |
|
|
|
|
EnterprisesApi.getEnterprises(route.query.id as any).then((res) => { |
|
|
|
|
formData.value = res |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getDetail() |
|
|
|
|
|
|
|
|
|
getDetail() |
|
|
|
|
</script> |
|
|
|
|