From 47b3ce354885e7df90e4219bd4154003c1c241d7 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期二, 04 十一月 2025 13:35:16 +0800
Subject: [PATCH] 修改
---
src/views/safetyReview/institution/components/viewInstitution.vue | 91 ++++++++++++++++++++++-----------------------
1 files changed, 45 insertions(+), 46 deletions(-)
diff --git a/src/views/safetyReview/institution/components/viewInstitution.vue b/src/views/safetyReview/institution/components/viewInstitution.vue
index fb7c32e..aa9a569 100644
--- a/src/views/safetyReview/institution/components/viewInstitution.vue
+++ b/src/views/safetyReview/institution/components/viewInstitution.vue
@@ -36,14 +36,15 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item prop="agency.area" label="实际经营地址所属区域">
- <el-input v-model="registerForm.agency.area" disabled></el-input>
-<!-- <el-cascader-->
-<!-- v-model="registerForm.agency.area"-->
-<!-- :options="state.areaList"-->
-<!-- :props="props"-->
-<!-- style="width: 100%"-->
-<!-- size="large"-->
-<!-- />-->
+<!-- <el-input v-model="registerForm.agency.area" disabled></el-input>-->
+ <el-cascader
+ disabled
+ v-model="registerForm.agency.area"
+ :options="state.areaList"
+ :props="props"
+ style="width: 100%"
+ size="large"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -139,6 +140,15 @@
</el-form-item>
</el-col>
</el-row>
+ <el-row :gutter="30">
+ <el-col :span="8">
+ <el-form-item prop="agency.certPath" label="资质证书">
+ <el-upload disabled :limit='state.imgLimit' :show-file-list="false" list-type="picture-card" >
+ <el-image v-if="certImageUrl" :src="certImageUrl" :preview-src-list="certList" style="width: 100%;max-height: 146px;" />
+ </el-upload>
+ </el-form-item>
+ </el-col>
+ </el-row>
<el-row :gutter="30">
<el-col :span="8">
<el-form-item prop="agency.assetValue" label="固定资产总值">
@@ -202,7 +212,7 @@
<el-col :span="8">
<el-form-item prop="agency.reportPath" label="加盖公章的《机构信息上报表》">
<el-upload disabled :limit='state.imgLimit' :show-file-list="false" list-type="picture-card" >
- <el-image v-if="imageUrl" style="width: 150px;height: 150px" :src="imageUrl" :preview-src-list="srcList"/>
+ <el-image v-if="imageUrl" :src="imageUrl" :preview-src-list="srcList" style="width: 100%;max-height: 146px;" />
<!-- <template #tip>-->
<!-- <div class="el-upload__tip">上传jpg/png图片尺寸小于5M,最多可上传1张</div>-->
<!-- </template>-->
@@ -212,7 +222,7 @@
</el-row>
<el-row :gutter="30">
<el-col :span="12">
- <el-form-item prop="username" label="登录用户名(字母+数字,长度在5-16之间)">
+ <el-form-item prop="username" label="用户名">
<el-input
disabled
v-model="registerForm.username"
@@ -232,32 +242,6 @@
</el-form-item>
</el-col>
</el-row>
-<!-- <el-row :gutter="30">-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item prop="password" label="密码">-->
-<!-- <el-input-->
-<!-- v-model="registerForm.password"-->
-<!-- type="password"-->
-<!-- size="large"-->
-<!-- placeholder="请输入密码"-->
-<!-- show-password-->
-<!-- />-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item prop="confirmPassword" label="确认密码">-->
-<!-- <el-input-->
-<!-- v-model="registerForm.confirmPassword"-->
-<!-- type="password"-->
-<!-- size="large"-->
-<!-- auto-complete="off"-->
-<!-- placeholder="确认密码"-->
-<!-- show-password-->
-<!-- >-->
-<!-- </el-input>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- </el-row>-->
</el-form>
<el-dialog v-model="state.dialogImg">
<el-image style="width: 100%; height: 100%" :src="state.dialogImageUrl"/>
@@ -274,7 +258,9 @@
import {getDict} from "@/api/login";
import {getRegionTree} from "@/api/area";
const imageUrl = ref("");
+const certImageUrl = ref("");
const srcList = ref([]);
+const certList = ref([]);
const registerForm = ref({
agency:{
name: "",
@@ -327,10 +313,6 @@
const loading = ref(false)
const dialogVisible = ref(false)
const registerRef = ref(null)
-onMounted(()=>{
- getBusiness()
- getArea()
-})
const getBusiness = async ()=>{
const res = await getDict({dictType: 'sys_business_scope'})
@@ -351,20 +333,35 @@
}
}
-const openDialog = async (val) => {
+const openDialog = async (val,type) => {
+ let id = "";
+ if(type === 'view'){
+ id = val.agencyId
+ }else {
+ id = val.id
+ }
const param = {
- agencyId: val.id
+ agencyId: id
}
const res = await getInstitutionDetail(param);
if(res.code === 200){
registerForm.value.agency = res.data
- registerForm.value.agency.area = res.data.province+ " " +res.data.city + " " + res.data.district
+ await getBusiness()
+ await getArea()
+ registerForm.value.username = res.data.user?.username
+ registerForm.value.phone = res.data.user?.phone
+ if(registerForm.value.agency.attribute === 0){
+ registerForm.value.agency.area = [res.data.city,res.data.district].filter(item => { return item && item.trim() })
+ }else {
+ registerForm.value.agency.area = [res.data.province,res.data.city,res.data.district].filter(item => { return item && item.trim() })
+ }
registerForm.value.agency.business = res.data.business.split(",").map(Number)
imageUrl.value = import.meta.env.VITE_APP_BASE_API + "/" + res.data.reportPath
srcList.value.push(imageUrl.value)
- // state.fileList.push({
- // 'url': imgUrl
- // })
+ certImageUrl.value = import.meta.env.VITE_APP_BASE_API + "/" + res.data.certPath
+ certList.value.push(certImageUrl.value)
+
+
}else{
ElMessage.warning(res.message)
}
@@ -375,6 +372,8 @@
const closeDialog = ()=>{
dialogVisible.value = false;
state.fileList = []
+ srcList.value = []
+ certList.value = []
}
defineExpose({
--
Gitblit v1.9.2