From e3b49d33e9c2e8ba75ce3d6fdef0da27d529c72c Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: 星期四, 14 十二月 2023 10:43:00 +0800
Subject: [PATCH] 样式调整
---
src/views/safetyReview/institution/components/viewInstitution.vue | 76 +++++++++++++++-----------------------
1 files changed, 30 insertions(+), 46 deletions(-)
diff --git a/src/views/safetyReview/institution/components/viewInstitution.vue b/src/views/safetyReview/institution/components/viewInstitution.vue
index fb7c32e..9c58bf5 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">
@@ -202,7 +203,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 +213,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 +233,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"/>
@@ -327,10 +302,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 +322,32 @@
}
}
-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
- // })
+
}else{
ElMessage.warning(res.message)
}
@@ -375,6 +358,7 @@
const closeDialog = ()=>{
dialogVisible.value = false;
state.fileList = []
+ srcList.value = []
}
defineExpose({
--
Gitblit v1.9.2