黑龙江

This commit is contained in:
liuye
2024-09-25 15:01:06 +08:00
parent 4801309e52
commit dfea39a891
16 changed files with 345 additions and 130 deletions

View File

@@ -15,6 +15,7 @@
"src/components",
"src/common/util.js",
"src/common/dict.js",
"src/common/dictHlj.js",
"src/common/monent.js",
"src/common/modules.js",
"src/common/http.js",

View File

@@ -35,7 +35,9 @@ instance.interceptors.response.use(res => {
return res.data
} else if (res.config.alwaysReturn) {
return res.data
} else if (res.data.code == 200) {
} else if (res.data.code == 200) { //黑龙江接口200 正常
return res.data
} else if (res.data.code == 0) {
return res.data
} else if (res.data.code === 1) {
uni.showToast({

76
src/common/dictHlj.js Normal file
View File

@@ -0,0 +1,76 @@
/**
* 封装字典工具类
*/
const $dictHlj = {
instance: null,
url: "/system/dictData/types/",
init(config) {
this.instance = config?.instance
this.url = config?.url || this.url
},
dicts() {
let dicts = uni.getStorageSync('dicts') || null
typeof dicts == "string" ? (dicts = JSON.parse(dicts)) : dicts
return dicts || [];
},
load(...code) {
var url = this.url + code.toString()
return this.instance && this.instance.get(url, {
withoutToken: true,
}).then((res) => {
console.log(res)
if (res && res.data) {
let dicts=[]
for (var i in res.data) {
var e = {
key: res.data[i][0].dictType,
values: res.data[res.data[i][0].dictType]
}
dicts.push(e)
}
this.dicts()
uni.setStorageSync('dicts', dicts);
}
}).catch((err) => {
console.log(err)
})
},
getDict(key) {
if (this.dicts().length) {
let dict = this.dicts().find((e) => e.key == key);
return dict ? dict.values : [];
} else return [];
},
getValue(key, label) {
if (this.dicts().length) {
let dict = this.dicts().find((e) => e.key == key);
if (dict) {
let item = dict.values.find((v) => v.label == label);
return item ? item.value : label;
} else return label;
} else return label;
},
getLabel(key, value) {
if (this.dicts().length) {
let dict = this.dicts().find((e) => e.key == key);
if (dict) {
let item = dict.values.find((v) => v.value == value);
return item ? item.label : value;
} else return value ? value : '';
} else return value ? value : '';
},
getColor(key, value) {
if (this.dicts().length) {
let dict = this.dicts().find((e) => e.key == key);
if (dict) {
let item = dict.values.find((v) => v.dictValue == value);
return item ? item.dictColor : value;
} else return value;
} else return value;
}
}
export default $dictHlj

View File

@@ -1,4 +1,5 @@
import dict from "./dict"
import dictHlj from "./dictHlj"
import dayjs from './monent'
import qs from 'query-string'
import reg from "./regular";
@@ -255,6 +256,7 @@ export const copy = any => {
export default {
dict,
dictHlj,
confirm,
calcAge,
injectLib: (url, cb = () => 0) => {

View File

@@ -62,10 +62,6 @@ export default {
type: Boolean,
default: false,
},
imgUrlHttp: {
type: String,
default: '',
},
},
computed: {
...mapState(['token']),
@@ -171,8 +167,8 @@ export default {
this.fileList.push(res.data)
} else if (this.api == '/admin/file/add-portrait') {
this.fileList.push({url: res.data?.split(";")?.[0], id: res.data?.split(";")?.[1]})
}else if (this.api == '/common/upload') { //图片url回显需先拼接imgUrlHttp
this.fileList.push({url: this.imgUrlHttp + res.data.fileName, fileName: res.data.originalFilename, filePath: this.imgUrlHttp + res.data.fileName})
}else if (this.api == '/common/upload') { //黑龙江图片上传接口
this.fileList.push({fileName: res.data.fileName, filePath: res.data.fileName})
}
this.$emit("update:def", this.fileList)
this.$emit("list", this.fileList)

View File

@@ -28,6 +28,7 @@ Vue.prototype.$dayjs = dayjs
Vue.prototype.$cdn = 'https://cdn.cunwuyun.cn/dvcp/h5/';
Object.keys(utils).map((e) => (Vue.prototype['$' + e] = utils[e]));
utils.dict.init({instance: axios})
utils.dictHlj.init({instance: axios})
App.mpType = 'app';
process.env.NODE_ENV == 'development' && new VConsole();
// new VConsole()

View File

@@ -9,6 +9,7 @@
"components",
"common/util.js",
"common/dict.js",
"common/dictHlj.js",
"common/monent.js",
"common/modules.js",
"common/http.js",

View File

@@ -2,14 +2,14 @@
<section class="AppChildrenDetail">
<div class="info-list">
<div class="item">
<div class="title-flex">
<div class="title-flex" @click="view(0)">
<div class="item-title">基本信息</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowBasic ? 'right-icon' : 'right-icon right-icon-active'" @click="view(0)">
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowBasic ? 'right-icon' : 'right-icon right-icon-active'">
</div>
<div class="item-content" v-if="isShowBasic">
<div class="item-form">
<div class="label">儿童类别</div>
<div class="value">{{$dict.getLabel('CHILD_CATEGORY_CODE', info.childType) || '-'}}</div>
<div class="value">{{$dictHlj.getLabel('CHILD_CATEGORY_CODE', info.childType) || '-'}}</div>
</div>
<div class="item-form">
<div class="label">儿童名称</div>
@@ -25,7 +25,7 @@
</div>
<div class="item-form">
<div class="label">性别</div>
<div class="value">{{$dict.getLabel('GENDER_CODE', info.gender) || '-'}}</div>
<div class="value">{{$dictHlj.getLabel('GENDER_CODE', info.gender) || '-'}}</div>
</div>
<div class="item-form">
<div class="label">年龄</div>
@@ -42,9 +42,9 @@
</div>
</div>
<div class="item">
<div class="title-flex">
<div class="title-flex" @click="view(1)">
<div class="item-title">生活费信息</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowLifeMoney ? 'right-icon' : 'right-icon right-icon-active'" @click="view(1)">
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowLifeMoney ? 'right-icon' : 'right-icon right-icon-active'">
</div>
<div class="item-content" v-if="isShowLifeMoney">
<div class="item-form">
@@ -66,9 +66,9 @@
</div>
</div>
<div class="item">
<div class="title-flex">
<div class="title-flex" @click="view(2)">
<div class="item-title">福利机构信息</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowInstitution ? 'right-icon' : 'right-icon right-icon-active'" @click="view(2)">
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowInstitution ? 'right-icon' : 'right-icon right-icon-active'">
</div>
<div class="item-content" v-if="isShowInstitution">
<div class="item-form">
@@ -110,9 +110,9 @@ export default {
childType: '',
synId: '',
info: {},
isShowBasic: false,
isShowLifeMoney: false,
isShowInstitution: false
isShowBasic: true,
isShowLifeMoney: true,
isShowInstitution: true
}
},
onLoad(option) {
@@ -125,7 +125,7 @@ export default {
})
this.childType = option.childType
this.synId = option.synId
this.$dict.load(['CHILD_CATEGORY_CODE', 'GENDER_CODE']).then(() => {
this.$dictHlj.load(['CHILD_CATEGORY_CODE', 'GENDER_CODE']).then(() => {
this.getDetail()
})
},

View File

@@ -5,7 +5,7 @@
<span class="requier">*</span>
<div class="item-content" @click="isShowtype=true">
<div class="label">儿童类型</div>
<div :class="childType ? 'value' : 'value placeholder'">{{$dict.getLabel('CHILD_CATEGORY_CODE', childType) || '请选择'}}</div>
<div :class="childType ? 'value' : 'value placeholder'">{{$dictHlj.getLabel('CHILD_CATEGORY_CODE', childType) || '请选择'}}</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" class="right-icon">
</div>
</div>
@@ -31,9 +31,9 @@
<div class="footer-btn">
<!-- <div class="btn primary">扫描身份证</div> -->
<div class="btn primary" @click="toList()">查询</div>
<div class="btn">返回</div>
<!-- <div class="btn" @click="back">返回</div> -->
</div>
<u-select v-model="isShowtype" :list="$dict.getDict('CHILD_CATEGORY_CODE')" value-name="dictValue" label-name="dictName" @confirm="typeChange"></u-select>
<u-select v-model="isShowtype" :list="$dictHlj.getDict('CHILD_CATEGORY_CODE')" value-name="value" label-name="label" @confirm="typeChange"></u-select>
</section>
</template>
@@ -44,7 +44,7 @@ export default {
data() {
return {
childName: '',
childType: '1',
childType: '',
isShowtype: false
}
},
@@ -56,7 +56,7 @@ export default {
uni.setNavigationBarTitle({
title: '各类儿童信息查询'
})
this.$dict.load(['CHILD_CATEGORY_CODE'])
this.$dictHlj.load(['CHILD_CATEGORY_CODE'])
},
methods: {
typeChange(e) {
@@ -70,6 +70,9 @@ export default {
return this.$u.toast(`请输入儿童姓名`)
}
uni.navigateTo({url: `./AppChildrenList?childType=${this.childType}&childName=${this.childName}`})
},
back() {
uni.navigateBack()
}
},
}

View File

@@ -5,12 +5,12 @@
<div class="name-flex">
<div class="name">{{item.childName}}</div>
<div class="type-list">
<div class="type">{{$dict.getLabel('CHILD_CATEGORY_CODE', item.childType)}}</div>
<div class="type">{{$dictHlj.getLabel('CHILD_CATEGORY_CODE', item.childType)}}</div>
</div>
</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" class="right-icon">
<div class="sex-info">
<span>{{$dict.getLabel('GENDER_CODE', item.gender)}}</span>
<span>{{$dictHlj.getLabel('GENDER_CODE', item.gender)}}</span>
<span>{{item.age}}</span>
</div>
</div>
@@ -42,7 +42,7 @@ export default {
})
this.childType = option.childType
this.childName = option.childName
this.$dict.load(['CHILD_CATEGORY_CODE', 'GENDER_CODE']).then(() => {
this.$dictHlj.load(['CHILD_CATEGORY_CODE', 'GENDER_CODE']).then(() => {
this.getList()
})
},
@@ -54,8 +54,8 @@ export default {
if(this.current > this.pageTotal) return
this.$http.post(`/mobile/childrenInfo/findListPage`,
{
// childName: this.childName,
// childType: this.childType,
childName: this.childName,
childType: this.childType,
pageNum: this.current,
pageSize: 10,
},
@@ -63,7 +63,7 @@ export default {
withoutToken: true
}).then((res) => {
if (res.code == 200) {
this.list = this.current > 1 ? [...this.datas, ...res.data.rows] : res.data.rows
this.list = this.current > 1 ? [...this.list, ...res.data.rows] : res.data.rows
this.pageTotal = Math.ceil(res.data.total/10)
}else {
this.$u.toast(res.msg)

View File

@@ -7,7 +7,7 @@
<div class="select-content" v-if="showAdd">
<span class="triangle-up"></span>
<div class="item" @click="linkTo('./AppRecognizeSearchTab')">查询</div>
<div class="item" @click="linkTo(`./AppRecognizeAdd?assistanceMethod=${tabList[tabIndex].val}`)">新增认助养</div>
<div class="item" @click="linkTo(`./AppRecognizeAdd?assistanceMethod=${tabList[tabIndex].val}`)">新增认助养</div>
</div>
<u-tabs u-tabs :list="tabList" :is-scroll="false" :current="tabIndex" @change="change" height="112" :bar-style="barStyle"
bg-color="#fff" inactive-color="#666" active-color="#222" :active-item-style="activeStyle"></u-tabs>

View File

@@ -8,6 +8,8 @@
<p class="text">{{item.name}}</p>
</div>
</div>
<u-search placeholder="搜索儿童姓名" :show-action="false" bg-color="#F5F6F7" search-icon-color="#666" color="#666"
height="58" v-model="searchChildrenName" @search="getChildrenListInit()" v-if="stepIndex == 1"/>
</div>
<div class="form" v-if="stepIndex == 0">
<div class="item">
@@ -23,7 +25,7 @@
<span class="requier">*</span>
<div class="item-content" @click="isShowRelationship=true">
<div class="label">与助养对象关系</div>
<div :class="form.relationshipWithChild ? 'value' : 'value placeholder'">{{$dict.getLabel('relationship_children', form.relationshipWithChild) || '请选择'}}</div>
<div :class="form.relationshipWithChild ? 'value' : 'value placeholder'">{{$dictHlj.getLabel('relationship_children', form.relationshipWithChild) || '请选择'}}</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" class="right-icon">
</div>
</div>
@@ -31,7 +33,7 @@
<span class="requier">*</span>
<div class="item-content" @click="isShowMethod=true">
<div class="label">助养方式</div>
<div :class="form.assistanceMethod ? 'value' : 'value placeholder'">{{$dict.getLabel('handling_Date', form.assistanceMethod) || '请选择'}}</div>
<div :class="form.assistanceMethod ? 'value' : 'value placeholder'">{{$dictHlj.getLabel('handling_Date', form.assistanceMethod) || '请选择'}}</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" class="right-icon">
</div>
</div>
@@ -63,13 +65,11 @@
</div>
</div>
<div class="user-list" v-if="stepIndex == 1">
<u-search placeholder="搜索儿童姓名" :show-action="false" bg-color="#fff" search-icon-color="#ccc" color="#666"
height="58" v-model="searchChildrenName" @search="getChildrenList()"/>
<div class="item" v-for="(item, index) in childrenList" :key="index">
<div class="item-top">
<div class="title">儿童姓名{{item.childName}}</div>
<div class="info">身份证号{{item.childNumber}}</div>
<div class="info">儿童类别{{$dict.getLabel('CHILD_CATEGORY_CODE', item.childCategory)}}</div>
<div class="info">儿童类别{{$dictHlj.getLabel('CHILD_CATEGORY_CODE', item.childCategory)}}</div>
<div class="info">出生年月{{item.birthDate}}</div>
<img :src="item.isCheck ? 'https://cdn.sinoecare.com/i/2024/07/16/6695ddf91113c.png' :
'https://cdn.sinoecare.com/i/2024/07/16/6695ddf890b1e.png'" alt="" class="check-img" @click="checkChildren(index)">
@@ -78,6 +78,7 @@
<div class="btn">详情</div>
</div>
</div>
<AiEmpty v-if="!childrenList.length"></AiEmpty>
</div>
<div class="form" v-if="stepIndex == 2">
<div class="item">
@@ -85,7 +86,7 @@
<div class="item-content">
<div class="label">助养者身份证信息(身份证正反面)</div>
<div class="value">
<AiUploader style="margin-top: 12px;" :def.sync="filesId" :limit="2" :multiple="true" action="/common/upload" :withoutToken="true" :imgUrlHttp="imgUrlHttp"></AiUploader>
<AiUploader style="margin-top: 12px;" :def.sync="filesId" :limit="2" :multiple="true" action="/common/upload" :withoutToken="true" @list="changeId"></AiUploader>
</div>
</div>
</div>
@@ -94,7 +95,7 @@
<div class="item-content">
<div class="label">助养者经济状况证明</div>
<div class="value">
<AiUploader style="margin-top: 12px;" :def.sync="filesEconomy" :limit="9" :multiple="true" action="/common/upload" :withoutToken="true" :imgUrlHttp="imgUrlHttp"></AiUploader>
<AiUploader style="margin-top: 12px;" :def.sync="filesEconomy" :limit="9" :multiple="true" action="/common/upload" :withoutToken="true" @list="changeEconomy"></AiUploader>
</div>
</div>
</div>
@@ -103,7 +104,7 @@
<div class="item-content">
<div class="label">助养者健康状况</div>
<div class="value">
<AiUploader style="margin-top: 12px;" :def.sync="filesHealth" :limit="9" :multiple="true" action="/common/upload" :withoutToken="true" :imgUrlHttp="imgUrlHttp"></AiUploader>
<AiUploader style="margin-top: 12px;" :def.sync="filesHealth" :limit="9" :multiple="true" action="/common/upload" :withoutToken="true" @list="changeHealth"></AiUploader>
</div>
</div>
</div>
@@ -112,7 +113,7 @@
<div class="item-content">
<div class="label">其他材料</div>
<div class="value">
<AiUploader style="margin-top: 12px;" :def.sync="filesOther" :limit="9" :multiple="true" action="/common/upload" :withoutToken="true" :imgUrlHttp="imgUrlHttp"></AiUploader>
<AiUploader style="margin-top: 12px;" :def.sync="filesOther" :limit="9" :multiple="true" action="/common/upload" :withoutToken="true" @list="changeOther"></AiUploader>
</div>
</div>
</div>
@@ -151,8 +152,8 @@
<div class="btn primary" @click="confirm" v-if="stepIndex == 3">确认</div>
<div class="btn" @click="pre" v-if="stepIndex != 0">返回</div>
</div>
<u-select v-model="isShowRelationship" :list="$dict.getDict('relationship_children')" value-name="dictValue" label-name="dictName" @confirm="shipChange"></u-select>
<u-select v-model="isShowMethod" :list="$dict.getDict('handling_Date')" value-name="dictValue" label-name="dictName" @confirm="methodChange"></u-select>
<u-select v-model="isShowRelationship" :list="$dictHlj.getDict('relationship_children')" value-name="value" label-name="label" @confirm="shipChange"></u-select>
<u-select v-model="isShowMethod" :list="$dictHlj.getDict('handling_Date')" value-name="value" label-name="label" @confirm="methodChange"></u-select>
<u-calendar v-model="isShowDate" @change="onDateChange" mode="date"></u-calendar>
</section>
</template>
@@ -168,23 +169,24 @@ export default {
stepIndex: 0,
files: [],
form: {
assistanceName: '张三',
relationshipWithChild: '1',
assistanceMethod: '1',
assistanceName: '李四',
relationshipWithChild: '',
assistanceMethod: '',
details: '111',
assistanceIdNumber: '110102190001010731',
handlingDate: '2024-09-23',
handlingDate: '',
assistanceInformationFile: [],
agentId: '',
agentPhone: '',
agency: '',
childBusinessId: '',
childType: '',
assistanceMethod: ''
},
isShowDate: false,
isShowRelationship: false,
isShowMethod: false,
current: 1,
pageTotal: 2,
childrenList: [],
searchChildrenName: '',
checkChildrenInfo: {}, //第二步选择儿童信息
@@ -207,7 +209,7 @@ export default {
uni.setNavigationBarTitle({
title: '认亲助养'
})
this.$dict.load(['handling_Date', 'relationship_children', 'CHILD_CATEGORY_CODE'])
this.$dictHlj.load(['handling_Date', 'relationship_children', 'CHILD_CATEGORY_CODE'])
this.$http.get(`/system/config/configKey/upload.file.path`,
{
@@ -232,6 +234,30 @@ export default {
onDateChange(e) {
this.form.handlingDate = `${e.result}`
},
changeId(list) {
list.map((item) => {
item.url = this.imgUrlHttp + item.fileName
})
this.filesId = list
},
changeEconomy(list) {
list.map((item) => {
item.url = this.imgUrlHttp + item.fileName
})
this.filesEconomy = list
},
changeHealth(list) {
list.map((item) => {
item.url = this.imgUrlHttp + item.fileName
})
this.filesHealth = list
},
changeOther(list) {
list.map((item) => {
item.url = this.imgUrlHttp + item.fileName
})
this.filesOther = list
},
next() {
if(!this.stepIndex) { //第一步
return this.validateFirst()
@@ -247,36 +273,44 @@ export default {
}
},
validateFirst() {
// if (!this.form.assistanceName) {
// return this.$u.toast(`请输入助养人姓名`)
// }
// if (!this.form.relationshipWithChild) {
// return this.$u.toast(`请选择与助养对象关系`)
// }
// if (!this.form.assistanceMethod) {
// return this.$u.toast(`请选择助养方式`)
// }
// if (!this.form.details) {
// return this.$u.toast(`请输入详细描述`)
// }
// if (!this.form.assistanceIdNumber) {
// return this.$u.toast(`请输入助养人身份号码`)
// }
// if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.assistanceIdNumber)) {
// return this.$u.toast('请输入正确的助养人身份证号')
// }
// if (!this.form.handlingDate) {
// return this.$u.toast(`请选择办理日期`)
// }
this.searchChildrenName = this.form.assistanceName
if (!this.form.assistanceName) {
return this.$u.toast(`请输入助养人姓名`)
}
if (!this.form.relationshipWithChild) {
return this.$u.toast(`请选择与助养对象关系`)
}
if (!this.form.assistanceMethod) {
return this.$u.toast(`请选择助养方式`)
}
if (!this.form.details) {
return this.$u.toast(`请输入详细描述`)
}
if (!this.form.assistanceIdNumber) {
return this.$u.toast(`请输入助养人身份号码`)
}
if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.assistanceIdNumber)) {
return this.$u.toast('请输入正确的助养人身份证号')
}
if (!this.form.handlingDate) {
return this.$u.toast(`请选择办理日期`)
}
this.stepIndex ++
this.getChildrenListInit()
},
getChildrenListInit() {
this.pageNum = 1
this.pageTotal = 2
this.childrenList = []
this.checkChildrenInfo = {}
this.getChildrenList()
},
getChildrenList() {
if(this.current > this.pageTotal) return
this.$http.post(`/mobile/supportRaise/findChildrenList`,
{
childName: this.searchChildrenName,
pageSize: 1000,
pageNum: 1,
pageSize: 20,
pageNum: this.current,
divisionCode: this.user.divisionCode || ''
},
{
@@ -286,15 +320,15 @@ export default {
res.data.rows.map((item) => {
item.isCheck = false
})
this.childrenList = res.data.rows
this.stepIndex ++
this.childrenList = this.current > 1 ? [...this.childrenList, ...res.data.rows] : res.data.rows
this.pageTotal = Math.ceil(res.data.total/20)
}else {
this.$u.toast(`未查询到有效的儿童信息,请输入正确的助养人姓名`)
}
})
},
toChildrenDetail(row) {
uni.navigateTo({url: `../AppChildrenInfo/AppChildrenDetail?id=`})
uni.navigateTo({url: `../AppChildrenInfo/AppChildrenDetail?synId=${row.childId}&childType=${row.childCategoryType}`})
},
checkChildren(index) {
this.childrenList.map((item) => {
@@ -358,6 +392,10 @@ export default {
this.stepIndex --
}
},
onReachBottom() {
this.current++
this.getChildrenList()
}
}
</script>
@@ -373,6 +411,10 @@ uni-page-body {
background-color: #fff;
box-sizing: border-box;
margin-bottom: 24px;
position: fixed;
top: 0;
left: 0;
z-index: 9;
.step-list {
display: flex;
.step-item {
@@ -428,13 +470,16 @@ uni-page-body {
}
}
::v-deep .u-search {
margin-top: 24px!important;
}
}
.form {
background-color: #fff;
padding-top: 200px;
.item {
display: flex;
padding-top: 16px;
background-color: #fff;
.requier {
line-height: 44px;
font-family: PingFangSC-Regular;
@@ -475,7 +520,7 @@ uni-page-body {
}
}
.user-list {
padding: 24px 32px 0 32px;
padding: 282px 32px 0 32px;
box-sizing: border-box;
::v-deep .u-search {
margin-bottom: 32px!important;

View File

@@ -9,11 +9,11 @@
</div>
<div class="item">
<div class="label">与助养对象关系</div>
<div class="value">{{$dict.getLabel('relationship_children', info.relationshipWithChild)}}</div>
<div class="value">{{$dictHlj.getLabel('relationship_children', info.relationshipWithChild)}}</div>
</div>
<div class="item">
<div class="label">助养方式</div>
<div class="value">{{$dict.getLabel('handling_Date', info.assistanceMethod)}}</div>
<div class="value">{{$dictHlj.getLabel('handling_Date', info.assistanceMethod)}}</div>
</div>
<div class="item">
<div class="label">详细描述</div>
@@ -31,72 +31,95 @@
<div class="info-content" v-if="tabIndex == 1">
<div class="item">
<div class="label">儿童姓名</div>
<div class="value">{{info.assistanceName}}</div>
<div class="value">{{info.childName}}</div>
</div>
<div class="item">
<div class="label">身份证号</div>
<div class="value">{{info.assistanceIdNumber}}</div>
<div class="value">{{info.childIdNumber}}</div>
</div>
<div class="item">
<div class="label">儿童类别</div>
<div class="value">{{$dict.getLabel('CHILD_CATEGORY_CODE', info.childType)}}</div>
<div class="value">{{$dictHlj.getLabel('child_type', info.childType)}}</div>
</div>
<div class="item">
<div class="label">出生年月</div>
<div class="value">{{info.birthDate}}</div>
<div class="value">{{info.childBirthDate}}</div>
</div>
</div>
<div class="info-content" v-if="tabIndex == 2">
<div class="item">
<div class="label">助养者身份证信息</div>
<div class="value">
<!-- <AiUploader style="margin-top: 12px;" :def.sync="filesId" :disabled="true"></AiUploader> -->
<div class="img-list" v-if="filesId.length">
<img :src="item.filePath" alt="" v-for="(item, index) in filesId" :key="index" @click.stop="previewImages(filesId, item.filePath)">
<div class="img-list" v-if="filesIdImg.length">
<img :src="item.url" alt="" v-for="(item, index) in filesIdImg" :key="index" @click.stop="previewImages(filesIdImg, item.url)">
</div>
<p v-else>暂无数据</p>
<div class="file-list" v-if="filesId.length">
<div class="file-item" v-for="(item, index) in filesId" :key="index" @click="previewFile(item)">
<img src="https://cdn.sinoecare.com/i/2024/07/16/66963dd133cfd.png" alt="">
<div>{{ item.fileName }}</div>
</div>
</div>
<p v-if="!filesIdImg.length && !filesId.length">暂无数据</p>
</div>
</div>
<div class="item">
<div class="label">助养者经济状况证明</div>
<div class="value">
<div class="img-list" v-if="filesEconomy.length">
<img :src="item.filePath" alt="" v-for="(item, index) in filesEconomy" :key="index" @click.stop="previewImages(filesEconomy, item.filePath)">
<div class="img-list" v-if="filesEconomyImg.length">
<img :src="item.url" alt="" v-for="(item, index) in filesEconomyImg" :key="index" @click.stop="previewImages(filesEconomyImg, item.url)">
</div>
<p v-else>暂无数据</p>
<div class="file-list" v-if="filesEconomy.length">
<div class="file-item" v-for="(item, index) in filesEconomy" :key="index" @click="previewFile(item)">
<img src="https://cdn.sinoecare.com/i/2024/07/16/66963dd133cfd.png" alt="">
<div>{{ item.fileName }}</div>
</div>
</div>
<p v-if="!filesEconomyImg.length && !filesEconomy.length">暂无数据</p>
</div>
</div>
<div class="item">
<div class="label">助养者健康状况</div>
<div class="value">
<div class="img-list" v-if="filesHealth.length">
<img :src="item.filePath" alt="" v-for="(item, index) in filesHealth" :key="index" @click.stop="previewImages(filesHealth, item.filePath)">
<div class="img-list" v-if="filesHealthImg.length">
<img :src="item.url" alt="" v-for="(item, index) in filesHealthImg" :key="index" @click.stop="previewImages(filesHealthImg, item.url)">
</div>
<p v-else>暂无数据</p>
<div class="file-list" v-if="filesHealth.length">
<div class="file-item" v-for="(item, index) in filesHealth" :key="index" @click="previewFile(item)">
<img src="https://cdn.sinoecare.com/i/2024/07/16/66963dd133cfd.png" alt="">
<div>{{ item.fileName }}</div>
</div>
</div>
<p v-if="!filesHealthImg.length && !filesHealth.length">暂无数据</p>
</div>
</div>
<div class="item">
<div class="label">其他材料</div>
<div class="value">
<div class="img-list" v-if="filesOther.length">
<img :src="item.filePath" alt="" v-for="(item, index) in filesOther" :key="index" @click.stop="previewImages(filesOther, item.filePath)">
<div class="img-list" v-if="filesOtherImg.length">
<img :src="item.url" alt="" v-for="(item, index) in filesOtherImg" :key="index" @click.stop="previewImages(filesOtherImg, item.url)">
</div>
<p v-else>暂无数据</p>
<div class="file-list" v-if="filesOther.length">
<div class="file-item" v-for="(item, index) in filesOther" :key="index" @click="previewFile(item)">
<img src="https://cdn.sinoecare.com/i/2024/07/16/66963dd133cfd.png" alt="">
<div>{{ item.fileName }}</div>
</div>
</div>
<p v-if="!filesOtherImg.length && !filesOther.length">暂无数据</p>
</div>
</div>
</div>
<div class="info-content" v-if="tabIndex == 3">
<div class="item">
<div class="label">办理人</div>
<div class="value">{{info.agentId}}</div>
<div class="value">{{info.agentId || '-'}}</div>
</div>
<div class="item">
<div class="label">办理人联系电话</div>
<div class="value">{{info.agentPhone}}</div>
<div class="value">{{info.agentPhone || '-'}}</div>
</div>
<div class="item">
<div class="label">办理机构</div>
<div class="value">{{info.agency}}</div>
<div class="value">{{info.agency || '-'}}</div>
</div>
</div>
</section>
@@ -122,10 +145,15 @@ export default {
},
id: '',
info: {},
filesId: [], //身份证照片
filesEconomy: [], //经济状况证明
filesHealth: [], //健康证明
filesOther: [], //其它
filesIdImg: [], //身份证照片
filesId: [], //身份证附件
filesEconomyImg: [], //经济状况证明照片
filesEconomy: [], //经济状况证明附件
filesHealthImg: [], //健康证明照片
filesHealth: [], //健康证明附件
filesOtherImg: [], //其它照片
filesOther: [], //其它附件
imgUrlHttp: '',
}
},
onLoad(option) {
@@ -137,7 +165,15 @@ export default {
title: '认亲助养'
})
this.id = option.id
this.$dict.load(['handling_Date', 'relationship_children', 'CHILD_CATEGORY_CODE']).then(() => {
this.$http.get(`/system/config/configKey/upload.file.path`,
{
withoutToken: true
}).then((res) => {
if (res.code == 200) {
this.imgUrlHttp = res.data
}
})
this.$dictHlj.load(['handling_Date', 'relationship_children', 'child_type']).then(() => {
this.getDetail()
})
@@ -157,21 +193,38 @@ export default {
if (res.code == 200) {
this.info = {...res.data}
res.data.assistanceInformationFile.map((item) => {
item.url = item.filePath
item.url = this.imgUrlHttp + item.fileName
var e = item.fileName.split('.')
item.postfix = e[e.length-1]
if(item.type == 1) {
this.filesId.push(item)
if(['jpeg', 'jpg', 'png'].includes(item.postfix)) {
this.filesIdImg.push(item)
}else {
this.filesId.push(item)
}
}
if(item.type == 2) {
this.filesEconomy.push(item)
if(['jpeg', 'jpg', 'png'].includes(item.postfix)) {
this.filesEconomyImg.push(item)
}else {
this.filesEconomy.push(item)
}
}
if(item.type == 3) {
this.filesHealth.push(item)
if(['jpeg', 'jpg', 'png'].includes(item.postfix)) {
this.filesHealthImg.push(item)
}else {
this.filesHealth.push(item)
}
}
if(item.type == 4) {
this.filesOther.push(item)
if(['jpeg', 'jpg', 'png'].includes(item.postfix)) {
this.filesOtherImg.push(item)
}else {
this.filesOther.push(item)
}
}
})
console.log(this.filesId)
}else {
this.$u.toast(res.msg)
}
@@ -179,10 +232,23 @@ export default {
},
previewImages(images, img) {
uni.previewImage({
urls: images.map(v => v.filePath),
urls: images.map(v => v.url),
current: img
})
},
previewFile(e) {
uni.downloadFile({
url: e.url,
success: function (res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
fileType: e.postfix,
showMenu: true,
});
}
});
}
},
}
</script>
@@ -228,6 +294,22 @@ uni-page-body {
margin-right: 0;
}
}
.file-list {
.file-item {
padding: 16px;
border: 1px solid #CCCCCC;
border-radius: 8px;
display: flex;
margin-bottom: 32px;
img {
width: 96px;
height: 96px;
}
div {
align-self: center;
}
}
}
p {
color: #999;
line-height: 44px;

View File

@@ -22,7 +22,7 @@
</div>
<div class="footer-btn">
<div class="btn primary" @click="toList()">查询</div>
<div class="btn" @click="back">返回</div>
<!-- <div class="btn" @click="back">返回</div> -->
</div>
</section>
</template>

View File

@@ -4,15 +4,15 @@
<u-tabs :list="tabList" :is-scroll="false" :current="tabIndex" @change="change" height="112" :bar-style="barStyle"
bg-color="#fff" inactive-color="#666" active-color="#222" :active-item-style="activeStyle"></u-tabs>
</div>
<div class="select-type">
{{$dict.getLabel('CHILD_CATEGORY_CODE', childTypeCode) || '儿童类别'}}<u-icon name="arrow-down" color="#999" size="28"></u-icon>
<div class="select-type" @click="isShowType=true">
{{$dictHlj.getLabel('CHILD_CATEGORY_CODE', childTypeCode) || '儿童类别'}}<u-icon name="arrow-down" color="#999" size="28"></u-icon>
</div>
<div class="user-list">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
<div class="item-top">
<div class="title">儿童姓名{{item.name}}</div>
<div class="info">身份证号{{item.idNumber}}</div>
<div class="info">儿童类别{{item.childType}}</div>
<div class="info">儿童类别{{$dictHlj.getLabel('CHILD_CATEGORY_CODE', item.childTypeCode)}}</div>
<div class="type">{{item.itemName}}</div>
</div>
<div class="item-bottom">
@@ -21,7 +21,7 @@
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
<u-select v-model="isShowType" :list="$dict.getDict('CHILD_CATEGORY_CODE')" value-name="dictValue" label-name="dictName" @confirm="typeChange"></u-select>
<u-select v-model="isShowType" :list="typeList" value-name="value" label-name="label" @confirm="typeChange"></u-select>
</section>
</template>
@@ -48,6 +48,7 @@ export default {
pageTotal: 2,
list: [],
isShowType: false,
typeList: [],
childTypeCode: ''
}
},
@@ -59,7 +60,9 @@ export default {
uni.setNavigationBarTitle({
title: '保障对象管理'
})
this.$dict.load(['item_Type', 'CHILD_CATEGORY_CODE']).then(() => {
this.$dictHlj.load(['item_Type', 'CHILD_CATEGORY_CODE']).then(() => {
this.typeList = this.$dictHlj.getDict('CHILD_CATEGORY_CODE')
this.typeList.unshift({label: '全部', value: ''})
this.getList()
})
},
@@ -69,6 +72,9 @@ export default {
methods: {
change(e) {
this.tabIndex = e
this.getListInit()
},
getListInit() {
this.current = 1
this.pageTotal = 2
this.list = []
@@ -100,6 +106,7 @@ export default {
},
typeChange(e) {
this.childTypeCode = e[0].value
this.getListInit()
},
},
}

View File

@@ -2,14 +2,14 @@
<section class="AppSecurityObjectDetail">
<div class="info-list">
<div class="item">
<div class="title-flex">
<div class="title-flex" @click="view(0)">
<div class="item-title">基本信息</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowBasic ? 'right-icon' : 'right-icon right-icon-active'" @click="view(0)">
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowBasic ? 'right-icon' : 'right-icon right-icon-active'">
</div>
<div class="item-content" v-if="isShowBasic">
<div class="item-form">
<div class="label">儿童类别</div>
<div class="value">{{$dict.getLabel('CHILD_CATEGORY_CODE', info.childType) || '-'}}</div>
<div class="value">{{$dictHlj.getLabel('CHILD_CATEGORY_CODE', info.childType) || '-'}}</div>
</div>
<div class="item-form">
<div class="label">儿童名称</div>
@@ -21,7 +21,7 @@
</div>
<div class="item-form">
<div class="label">性别</div>
<div class="value">{{$dict.getLabel('GENDER_CODE', info.gender) || '-'}}</div>
<div class="value">{{$dictHlj.getLabel('GENDER_CODE', info.gender) || '-'}}</div>
</div>
<div class="item-form">
<div class="label">户籍地址</div>
@@ -30,9 +30,9 @@
</div>
</div>
<div class="item">
<div class="title-flex">
<div class="title-flex" @click="view(1)">
<div class="item-title">事项信息</div>
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowMatter ? 'right-icon' : 'right-icon right-icon-active'" @click="view(1)">
<img src="https://cdn.sinoecare.com/i/2024/09/06/66da67b778d99.png" alt="" :class="isShowMatter ? 'right-icon' : 'right-icon right-icon-active'">
</div>
<div class="item-content" v-if="isShowMatter">
<div class="item-form">
@@ -111,8 +111,8 @@ export default {
childTypeCode: '',
itemType: '',
info: {},
isShowBasic: false,
isShowMatter: false,
isShowBasic: true,
isShowMatter: true,
}
},
onLoad(option) {
@@ -126,10 +126,9 @@ export default {
this.childrenId = option.childrenId
this.childTypeCode = option.childTypeCode
this.itemType = option.itemType
// this.$dict.load(['CHILD_CATEGORY_CODE', 'GENDER_CODE']).then(() => {
// this.getDetail()
// })
this.getDetail()
this.$dictHlj.load(['CHILD_CATEGORY_CODE', 'GENDER_CODE']).then(() => {
this.getDetail()
})
},
computed: {
...mapState(['user']),