<template>
|
<view class="respon">
|
<card v-for="(item,index) in responsiblePersonList" :key="index">
|
<view class="content" slot="content">
|
<view class="content_item">
|
<u-row customStyle="margin-bottom: 10px">
|
<u-col span="12">
|
<view class="text">
|
<text>{{item.responsibleName}}</text>
|
</view>
|
</u-col>
|
|
</u-row>
|
<u-row customStyle="margin-bottom: 10px">
|
<u-col span="12">
|
<view class="text">
|
<img class="img_icon" :src="imgList.xm">
|
</img>
|
<text>姓名:{{item.name}}</text>
|
</view>
|
</u-col>
|
</u-row>
|
<u-row customStyle="margin-bottom: 10px">
|
<u-col span="11">
|
<view class="text">
|
<img class="img_icon" :src="imgList.dh">
|
</img>
|
<text>电话:{{item.phone}}</text>
|
</view>
|
</u-col>
|
<u-col span="1">
|
<view class="text" @click="call(item.phone)">
|
<u-icon name="phone" color="#2979ff" size="28"></u-icon>
|
</view>
|
</u-col>
|
</u-row>
|
<u-row customStyle="margin-bottom: 10px">
|
<u-col span="12">
|
<view class="text">
|
<img class="img_icon" :src="imgList.zw">
|
</img>
|
<text>职务:{{item.role}}</text>
|
</view>
|
</u-col>
|
</u-row>
|
<u-row customStyle="margin-bottom: 10px">
|
<u-col span="12">
|
<view class="text">
|
<img class="img_icon" :src="imgList.dw">
|
</img>
|
<text>单位:{{item.deptName}}</text>
|
</view>
|
</u-col>
|
</u-row>
|
|
</view>
|
</view>
|
<view class="border" slot="footer"></view>
|
</card>
|
</view>
|
</template>
|
|
<script>
|
import card from "@/components/my-components/card.vue"
|
import {
|
findResManagePersonByResId
|
} from "@/api/dataCenter/responsiblePerson/responsiblePerson.js"
|
export default {
|
components: {
|
card
|
},
|
props: ['reservoirId'],
|
data() {
|
return {
|
responsiblePersonList: [],
|
imgList: {
|
xm: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/xm.png",
|
dh: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/dh.png",
|
zw: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/zw.png",
|
dw: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/dw.png",
|
}
|
}
|
},
|
created() {
|
this.loadResponsiblePersonList()
|
},
|
mounted() {
|
|
},
|
onLoad(option) {
|
|
},
|
onShow() {
|
|
},
|
methods: {
|
call(phone) {
|
uni.makePhoneCall({
|
phoneNumber: phone
|
});
|
},
|
loadResponsiblePersonList() {
|
findResManagePersonByResId({
|
resGuid: this.reservoirId
|
}).then(res => {
|
let data = res.data
|
data.sort((a, b) => a.type - b.type)
|
// 1行政责任人,2主管部门责任人,3管理单位责任人,4技术责任人, 5巡查责任人
|
data.forEach(e => {
|
if (e.type == 1) {
|
this.responsiblePersonList.push({
|
responsibleName: "行政责任人",
|
name: e.userName,
|
phone: e.userPhone,
|
role: e.position,
|
deptName: e.userUnit
|
})
|
}
|
|
if (e.type == 2) {
|
this.responsiblePersonList.push({
|
responsibleName: "主管部门责任人",
|
name: e.userName,
|
phone: e.userPhone,
|
role: e.position,
|
deptName: e.userUnit
|
})
|
}
|
|
if (e.type == 3) {
|
this.responsiblePersonList.push({
|
responsibleName: "管理单位责任人",
|
name: e.userName,
|
phone: e.userPhone,
|
role: e.position,
|
deptName: e.userUnit
|
})
|
}
|
|
if (e.type == 4) {
|
this.responsiblePersonList.push({
|
responsibleName: "技术责任人",
|
name: e.userName,
|
phone: e.userPhone,
|
role: e.position,
|
deptName: e.userUnit
|
})
|
}
|
|
if (e.type == 5) {
|
this.responsiblePersonList.push({
|
responsibleName: "巡查责任人",
|
name: e.userName,
|
phone: e.userPhone,
|
role: e.position,
|
deptName: e.userUnit
|
})
|
}
|
})
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.respon {
|
.content {
|
padding: 0 32rpx;
|
margin-bottom: 8rpx;
|
|
.text {
|
font-size: 24rpx;
|
display: flex;
|
align-items: center;
|
|
.img_icon {
|
width: 20rpx;
|
height: 20rpx;
|
margin-right: 30rpx;
|
}
|
}
|
}
|
|
.border {
|
background-color: #F9F9FA;
|
width: 100%;
|
height: 2rpx;
|
padding: 4rpx 0;
|
}
|
}
|
</style>
|