Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
@@ -1,462 +1,59 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="credit-points column" flex>
|
||||
<AiTopFixed>
|
||||
<div class="header-tab">
|
||||
<div
|
||||
class="tab-item"
|
||||
v-for="(item, index) in tabList"
|
||||
:key="index"
|
||||
@click="tabClick(index)"
|
||||
>
|
||||
{{ item }}<span class="active-line" v-if="tabIndex == index"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="area-content">
|
||||
<AiAreaPicker :areaId="user.areaId" :value="areaId" @select="areaSelect" :name.sync="areaName" selectRoot>
|
||||
<img src="./components/img/local-icon.png" alt="">
|
||||
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||
<span v-else>请选择</span>
|
||||
<u-icon name="arrow-down" color="#666" size="24"/>
|
||||
</AiAreaPicker>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
<div class="line-bg"></div>
|
||||
<div v-if="info['列表'] && info['列表'].length">
|
||||
<div class="ranking-content" v-if="info['列表'] && info['列表'].length">
|
||||
<div class="item" v-if="info['列表'].length > 1">
|
||||
<img
|
||||
src="https://cdn.cunwuyun.cn/dvcp/credit/2.png"
|
||||
alt=""
|
||||
class="top-img"
|
||||
/>
|
||||
<img
|
||||
:src="info['列表'][1].photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="info['列表'][1].photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4" v-else>
|
||||
{{ formatName(info["列表"][1].name) }}
|
||||
</div>
|
||||
<p class="user-name mar-b8">
|
||||
{{ info["列表"][1].name }}{{ tabIndex == 0 ? "家" : "" }}
|
||||
</p>
|
||||
<p class="item-num">{{ info["列表"][1].integral }}</p>
|
||||
</div>
|
||||
<div class="item-top item" v-if="info['列表'].length > 0">
|
||||
<img
|
||||
src="https://cdn.cunwuyun.cn/dvcp/credit/1.png"
|
||||
alt=""
|
||||
class="top-img-one"
|
||||
/>
|
||||
<img
|
||||
:src="info['列表'][0].photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="info['列表'][0].photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4" v-else>
|
||||
{{ formatName(info["列表"][0].name) }}
|
||||
</div>
|
||||
<p class="user-name mar-b8">
|
||||
{{ info["列表"][0].name }}{{ tabIndex == 0 ? "家" : "" }}
|
||||
</p>
|
||||
<p class="item-num">{{ info["列表"][0].integral }}</p>
|
||||
</div>
|
||||
<div class="item" v-if="info['列表'].length > 2">
|
||||
<img
|
||||
src="https://cdn.cunwuyun.cn/dvcp/credit/3.png"
|
||||
alt=""
|
||||
class="top-img"
|
||||
/>
|
||||
<img
|
||||
:src="info['列表'][2].photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="info['列表'][2].photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4" v-else>
|
||||
{{ formatName(info["列表"][2].name) }}
|
||||
</div>
|
||||
<p class="user-name mar-b8">
|
||||
{{ info["列表"][2].name }}{{ tabIndex == 0 ? "家" : "" }}
|
||||
</p>
|
||||
<p class="item-num">{{ info["列表"][2].integral }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ranking-list" v-if="info['列表'] && info['列表'].length">
|
||||
<div
|
||||
class="item"
|
||||
v-for="(item, index) in info['列表']"
|
||||
:key="index"
|
||||
v-if="index > 2"
|
||||
>
|
||||
<span class="item-num">{{ index + 1 }}</span>
|
||||
<img
|
||||
:src="item.photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="item.photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4 mar-r24" v-else>
|
||||
{{ formatName(item.name) }}
|
||||
</div>
|
||||
<span class="item-name"
|
||||
>{{ item.name }}{{ tabIndex == 0 ? "家" : "" }}</span
|
||||
>
|
||||
<span class="item-point">{{ item.integral }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else />
|
||||
</div>
|
||||
</div>
|
||||
<section class="AppCreditPoints">
|
||||
<AiTabPanes :tabs="tabList" v-model="tabIndex" background="#4181FF"/>
|
||||
<family-rank v-if="tabIndex == 0" :showDetail="showDetail"/>
|
||||
<user-rank v-if="tabIndex == 1" :showDetail="showDetail"/>
|
||||
<sys-user-integral v-if="tabIndex==2"/>
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import {mapState} from 'vuex'
|
||||
import userRank from './components/userRank.vue'
|
||||
import familyRank from './components/familyRank.vue'
|
||||
import SysUserIntegral from "./components/sysUserIntegral";
|
||||
|
||||
export default {
|
||||
name: "AppCreditPoints",
|
||||
appName: '积分排行',
|
||||
appName: "我的积分",
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
components: {SysUserIntegral, userRank, familyRank},
|
||||
data() {
|
||||
return {
|
||||
tabList: ["家庭积分", "个人积分"],
|
||||
tabList: ['家庭积分', '个人积分', "员工积分"],
|
||||
tabIndex: 0,
|
||||
info: {},
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
list: []
|
||||
};
|
||||
showDetail: true
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.areaId = this.user.areaId
|
||||
this.areaName = this.user.areaName || ''
|
||||
this.getInfo();
|
||||
onLoad(options) {
|
||||
if (options.type == 'detail') {
|
||||
this.showDetail = true
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.title
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = '积分排行'
|
||||
onReachBottom() {
|
||||
uni.$emit("reachBottom")
|
||||
},
|
||||
onShow(){
|
||||
let index = JSON.parse(JSON.stringify(this.tabIndex))
|
||||
this.tabIndex = null
|
||||
this.$nextTick(()=>this.tabIndex = index)
|
||||
},
|
||||
methods: {
|
||||
areaSelect(e) {
|
||||
this.areaId = e
|
||||
this.getInfo()
|
||||
},
|
||||
tabClick(index) {
|
||||
this.tabIndex = index;
|
||||
this.getInfo();
|
||||
},
|
||||
// 积分排行
|
||||
getInfo() {
|
||||
this.info = {};
|
||||
this.$http.post(`/app/appresident/rank-qw?type=${this.tabIndex}&areaId=${this.areaId}`).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
formatName(name) {
|
||||
if (name == undefined) {
|
||||
return
|
||||
}
|
||||
return name.substr(name.length - 2, name.length > 2 ? (name.length - 1) : name.length)
|
||||
},
|
||||
this.tabIndex = index
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.page {
|
||||
width: 100%;
|
||||
// background-color: #f3f6f9;
|
||||
.credit-points {
|
||||
|
||||
.bg-blue {
|
||||
width: 100%;
|
||||
height: 176rpx;
|
||||
background-color: #3975C6;
|
||||
}
|
||||
.header-content {
|
||||
width: 690rpx;
|
||||
height: 256rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin: -130rpx 0 40rpx 30rpx;
|
||||
padding: 100rpx 60rpx 40rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
.item {
|
||||
text-align: center;
|
||||
z-index: 99;
|
||||
.num {
|
||||
font-family: DIN;
|
||||
font-size: 52rpx;
|
||||
font-weight: bold;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.color-5AAD6A {
|
||||
color: #5aad6a;
|
||||
}
|
||||
.color-4185F5 {
|
||||
color: #4185f5;
|
||||
}
|
||||
.color-CD413A {
|
||||
color: #cd413a;
|
||||
}
|
||||
}
|
||||
img {
|
||||
position: absolute;
|
||||
width: 360rpx;
|
||||
height: 250rpx;
|
||||
top: -40rpx;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.ranking-content {
|
||||
padding: 94rpx 30rpx 0;
|
||||
background-color: #fff;
|
||||
.item {
|
||||
display: inline-block;
|
||||
width: 216rpx;
|
||||
height: 320px;
|
||||
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.12);
|
||||
border-radius: 12rpx;
|
||||
padding: 40rpx 0 0 0;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
.user-name {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 42rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
.item-num {
|
||||
font-size: 46rpx;
|
||||
font-weight: 6000;
|
||||
color: #2c51ce;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
.top-img {
|
||||
width: 100%;
|
||||
height: 34rpx;
|
||||
position: absolute;
|
||||
top: -11rpx;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.item-top {
|
||||
margin: -46rpx 20rpx 0;
|
||||
height: 366px;
|
||||
.user-img {
|
||||
width: 104rpx;
|
||||
height: 104rpx;
|
||||
}
|
||||
.user-name-bg {
|
||||
width: 104rpx;
|
||||
height: 104rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #4e8eee;
|
||||
font-size: 28rpx;
|
||||
line-height: 104rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
.top-img-one {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: -22rpx;
|
||||
left: 0;
|
||||
height: 46rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ranking-list {
|
||||
background-color: #fff;
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
background: #fff;
|
||||
padding: 0 64rpx;
|
||||
box-sizing: border-box;
|
||||
.item-num {
|
||||
display: inline-block;
|
||||
width: 68rpx;
|
||||
color: #858594;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.user-img {
|
||||
margin-right: 24rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.item-name {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
width: 240rpx;
|
||||
}
|
||||
.item-point {
|
||||
display: inline-block;
|
||||
width: 210rpx;
|
||||
text-align: right;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
.mar-r24 {
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.user-img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.user-name-bg {
|
||||
display: inline-block;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #4e8eee;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
.mar-b4 {
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.mar-b8 {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.detail-content {
|
||||
width: 690rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin: 432rpx 0 0 32rpx;
|
||||
padding: 30rpx 30rpx 94rpx;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
font-size: 34rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.item {
|
||||
padding: 34rpx 0 32rpx 0;
|
||||
border-bottom: 2rpx solid #ddd;
|
||||
display: flex;
|
||||
.item-info {
|
||||
width: 500rpx;
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8rpx;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
.item-num {
|
||||
width: calc(100% - 500rpx);
|
||||
text-align: right;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.color-0 {
|
||||
color: #2c51ce !important;
|
||||
}
|
||||
.color-1 {
|
||||
color: #e6736e !important;
|
||||
}
|
||||
.fixed-top {
|
||||
z-index: 999;
|
||||
}
|
||||
.header-tab {
|
||||
height: 96rpx;
|
||||
background-color: #3975C6;
|
||||
padding: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-tab .tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.header-tab .tab-active {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.header-tab .active-line {
|
||||
position: absolute;
|
||||
width: 40rpx;
|
||||
height: 4rpx;
|
||||
background: #FFF;
|
||||
top: 48rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.area-content {
|
||||
padding: 32px;
|
||||
background-color: #fff;
|
||||
|
||||
img {
|
||||
width: 42px;
|
||||
vertical-align: middle;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.u-icon {
|
||||
margin-left: 6px;
|
||||
}
|
||||
}
|
||||
.line-bg{
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
background-color: #f3f6f9;
|
||||
}
|
||||
::v-deep .content{
|
||||
padding: 0;
|
||||
}
|
||||
.AppCreditPoints {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
background-color: #f3f6f9;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
390
src/apps/AppCreditPoints/components/familyRank.vue
Normal file
@@ -0,0 +1,390 @@
|
||||
<template>
|
||||
<div class="familyRank">
|
||||
<div class="bg-blue"></div>
|
||||
<div class="header-content">
|
||||
<div class="item">
|
||||
<div class="num color-5AAD6A">{{ info['家庭积分'] || '0' }}</div>
|
||||
<div class="label">家庭总分</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="num color-4185F5">{{ info['剩余总分'] || '0' }}</div>
|
||||
<div class="label">剩余总分</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="num color-CD413A">{{ info['家庭排行'] || '0' }}</div>
|
||||
<div class="label">家庭排名</div>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
||||
</div>
|
||||
<div v-if="!showDetail">
|
||||
<div class="ranking-content" v-if="info['列表'] && info['列表'].length">
|
||||
<div class="item" v-if="info['列表'].length > 1">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/2.png" alt="" class="top-img">
|
||||
<img :src="info['列表'][1].photo" alt="" class="user-img mar-b4" v-if="info['列表'][1].photo">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ $formatName(info['列表'][1].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ info['列表'][1].name }}</p>
|
||||
<p class="item-num">{{ info['列表'][1].integral }}</p>
|
||||
</div>
|
||||
<div class="item-top item" v-if="info['列表'].length > 0">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/1.png" alt="" class="top-img-one">
|
||||
<img :src="info['列表'][0].photo" alt="" class="user-img mar-b4" v-if="info['列表'][0].photo">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ $formatName(info['列表'][0].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ info['列表'][0].name }}</p>
|
||||
<p class="item-num">{{ info['列表'][0].integral }}</p>
|
||||
</div>
|
||||
<div class="item" v-if="info['列表'].length > 2">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/3.png" alt="" class="top-img">
|
||||
<img :src="info['列表'][2].photo" alt="" class="user-img mar-b4" v-if="info['列表'][2].photo">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ $formatName(info['列表'][2].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ info['列表'][2].name }}</p>
|
||||
<p class="item-num">{{ info['列表'][2].integral }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ranking-list" v-if="info['列表'] && info['列表'].length">
|
||||
<div class="item" v-for="(item, index) in info['列表']" :key="index" v-if="index > 2">
|
||||
<span class="item-num">{{ index + 1 }}</span>
|
||||
<img :src="item.photo" alt="" class="user-img mar-b4" v-if="item.photo">
|
||||
<div class="user-name-bg mar-b4 mar-r24" v-else>{{ $formatName(item.name) }}</div>
|
||||
<span class="item-name">{{ item.name }}</span>
|
||||
<span class="item-point">{{ item.integral }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content" v-if="showDetail && list.length">
|
||||
<div class="title">积分明细</div>
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-info">
|
||||
<p>{{ item.residentName + ':' }}{{ item.eventDesc }}</p>
|
||||
<span> {{ item.doTime }}</span>
|
||||
</div>
|
||||
<div class="item-num" :class="'color-'+ (item.changeIntegral >= 0 ? 0 : 1)">
|
||||
{{ item.changeIntegral > 0 ? '+' + item.changeIntegral : item.changeIntegral }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "familyRank",
|
||||
appName: "家庭积分",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
props: {
|
||||
showDetail: { //true 积分明细 false积分排行
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
current: 1,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
if (this.showDetail) {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInfo() {// 积分排行
|
||||
this.info = {}
|
||||
var url = `/app/appresident/rank?id=${this.user.residentId}&type=0&areaId=${this.user?.areaId}` //积分排行
|
||||
this.$http.post(url).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {// 积分明细列表
|
||||
let url = `/app/appvillagerintegraldetail/IntegralList?residentId=${this.user.residentId}&queryType=0¤t=${this.current}&size=10` //积分明细
|
||||
this.$http.post(url).then(res => {
|
||||
if (res?.data) {
|
||||
if (this.current > res.data.pages) {
|
||||
return
|
||||
}
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.familyRank {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
background-color: #f3f6f9;
|
||||
|
||||
.bg-blue {
|
||||
width: 100vw;
|
||||
height: 176px;
|
||||
background-color: #4181FF;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
width: 690px;
|
||||
height: 256px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: -130px 0 40px 30px;
|
||||
padding: 100px 60px 40px 60px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
|
||||
.item {
|
||||
text-align: center;
|
||||
z-index: 99;
|
||||
|
||||
.num {
|
||||
font-family: DIN;
|
||||
font-size: 52px;
|
||||
font-weight: bold;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.color-5AAD6A {
|
||||
color: #5AAD6A;
|
||||
}
|
||||
|
||||
.color-4185F5 {
|
||||
color: #4185F5;
|
||||
}
|
||||
|
||||
.color-CD413A {
|
||||
color: #CD413A;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
width: 360px;
|
||||
height: 250px;
|
||||
top: -40px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-content {
|
||||
padding: 94px 30px 0;
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
display: inline-block;
|
||||
width: 216px;
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.12);
|
||||
border-radius: 12px;
|
||||
padding: 40px 0 76px 0;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.user-name {
|
||||
font-size: 30px;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.item-num {
|
||||
font-size: 46px;
|
||||
font-weight: 6000;
|
||||
color: #2C51CE;
|
||||
line-height: 54px;
|
||||
}
|
||||
|
||||
.top-img {
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
position: absolute;
|
||||
top: -11px;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-top {
|
||||
margin: -46px 20px 0;
|
||||
|
||||
.user-img {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
}
|
||||
|
||||
.user-name-bg {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
border-radius: 50%;
|
||||
background-color: #4E8EEE;
|
||||
font-size: 28px;
|
||||
line-height: 104px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.top-img-one {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: -22px;
|
||||
left: 0;
|
||||
height: 46px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-list {
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
background: #FFF;
|
||||
padding: 0 64px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.item-num {
|
||||
display: inline-block;
|
||||
width: 68px;
|
||||
color: #858594;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.user-img {
|
||||
margin-right: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
display: inline-block;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.item-point {
|
||||
display: inline-block;
|
||||
width: 210px;
|
||||
text-align: right;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mar-r24 {
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.user-name-bg {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background-color: #4E8EEE;
|
||||
font-size: 28px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mar-b4 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mar-b8 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 0 0 0 32px;
|
||||
padding: 30px 30px 94px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 34px 0 32px 0;
|
||||
border-bottom: 2px solid #ddd;
|
||||
display: flex;
|
||||
|
||||
.item-info {
|
||||
width: 500px;
|
||||
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-num {
|
||||
width: calc(100% - 500px);
|
||||
text-align: right;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.color-0 {
|
||||
color: #2C51CE !important;
|
||||
}
|
||||
|
||||
.color-1 {
|
||||
color: #E6736E !important;
|
||||
}
|
||||
|
||||
.fixed-top {
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 700 B |
216
src/apps/AppCreditPoints/components/sysUserIntegral.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="bg-blue"></div>
|
||||
<div class="header-content">
|
||||
<div class="left-content" flex>
|
||||
<div class="fill">
|
||||
<span>总积分:</span>
|
||||
<div class="info num" v-text="info.sysUserIntegral"/>
|
||||
</div>
|
||||
<div class="btn" @click="gotoGive">积分赠送</div>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
||||
</div>
|
||||
<div class="detail-content" v-if="list.length">
|
||||
<div class="title">积分明细</div>
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-info">
|
||||
<p v-text="item.eventDesc"/>
|
||||
<span v-text="item.doTime"/>
|
||||
</div>
|
||||
<div class="item-num" :class="'color-'+ item.integralCalcType">
|
||||
{{ (item.integralCalcType == 1 ? '+' : '-') + item.changeIntegral }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "sysUserIntegral",
|
||||
appName: "员工积分",
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
...mapActions(['selectEnterpriseContact'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
list: [],
|
||||
current: 1,
|
||||
pages: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getInfo()
|
||||
uni.$on("reachBottom", onShow => {
|
||||
!onShow && this.current++;
|
||||
this.getInfo()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 积分排行
|
||||
getInfo() {
|
||||
let {current, user: {id: userId}, info: {details}} = this
|
||||
if (!details?.pages || current <= details.pages) {
|
||||
this.$http.post('/app/appvillagerintegraldetail/sysUserIntegralList', null, {
|
||||
params: {userId, current, size: 10}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
this.list = [this.list, res.data.details?.records || []].flat()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
gotoGive() {
|
||||
uni.navigateTo({url: "./giveIntegral"})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
background-color: #f3f6f9;
|
||||
|
||||
.bg-blue {
|
||||
width: 100%;
|
||||
height: 176px;
|
||||
background-color: #4181FF;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
width: 690px;
|
||||
height: 184px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: -130px 0 40px 30px;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.left-content {
|
||||
position: absolute;
|
||||
left: 32px;
|
||||
right: 32px;
|
||||
z-index: 99;
|
||||
align-items: flex-end;
|
||||
|
||||
.btn {
|
||||
border-radius: 28px;
|
||||
border: 2px solid #4181FF;
|
||||
padding: 0 28px;
|
||||
line-height: 56px;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
width: 140px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info {
|
||||
height: 40px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.num {
|
||||
margin-top: 20px;
|
||||
font-size: 40px;
|
||||
font-family: DINAlternate-Bold, DINAlternate;
|
||||
font-weight: bold;
|
||||
color: #5AAD6A;
|
||||
line-height: 48px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
width: 360px;
|
||||
height: 250px;
|
||||
top: -40px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mar-b4 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mar-b8 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 0 0 0 32px;
|
||||
padding: 30px 30px 94px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 34px 0 32px 0;
|
||||
border-bottom: 2px solid #ddd;
|
||||
display: flex;
|
||||
|
||||
.item-info {
|
||||
width: 500px;
|
||||
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-num {
|
||||
width: calc(100% - 500px);
|
||||
text-align: right;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.color-1 {
|
||||
color: #2C51CE !important;
|
||||
}
|
||||
|
||||
.color-0 {
|
||||
color: #E6736E !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
395
src/apps/AppCreditPoints/components/userRank.vue
Normal file
@@ -0,0 +1,395 @@
|
||||
<template>
|
||||
<section class="userRank">
|
||||
<div class="bg-blue"/>
|
||||
<div class="header-content">
|
||||
<div class="item">
|
||||
<div class="num color-5AAD6A">{{ Number(info['个人积分']) || '0' }}</div>
|
||||
<div class="label">个人总分</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="num color-CD413A">{{ info['个人排行'] || '0' }}</div>
|
||||
<div class="label">个人排名</div>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
||||
</div>
|
||||
<div v-if="!showDetail">
|
||||
<div class="ranking-content" v-if="info['列表'] && info['列表'].length">
|
||||
<div class="item" v-if="info['列表'].length > 1">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/2.png" alt="" class="top-img">
|
||||
<img :src="info['列表'][1].photo" alt="" class="user-img mar-b4" v-if="info['列表'][1].photo">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ $formatName(info['列表'][1].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ info['列表'][1].name }}</p>
|
||||
<p class="item-num">{{ info['列表'][1].integral }}</p>
|
||||
</div>
|
||||
<div class="item-top item" v-if="info['列表'].length > 0">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/1.png" alt="" class="top-img-one">
|
||||
<img :src="info['列表'][0].photo" alt="" class="user-img mar-b4" v-if="info['列表'][0].photo">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ $formatName(info['列表'][0].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ info['列表'][0].name }}</p>
|
||||
<p class="item-num">{{ info['列表'][0].integral }}</p>
|
||||
</div>
|
||||
<div class="item" v-if="info['列表'].length > 2">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/3.png" alt="" class="top-img">
|
||||
<img :src="info['列表'][2].photo" alt="" class="user-img mar-b4" v-if="info['列表'][2].photo">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ $formatName(info['列表'][2].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ info['列表'][2].name }}</p>
|
||||
<p class="item-num">{{ info['列表'][2].integral }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ranking-list" v-if="info['列表'] && info['列表'].length">
|
||||
<div class="item" v-for="(item, index) in info['列表']" :key="index" v-if="index > 2">
|
||||
<span class="item-num">{{ index + 1 }}</span>
|
||||
<img :src="item.photo" alt="" class="user-img mar-b4" v-if="item.photo">
|
||||
<div class="user-name-bg mar-b4 mar-r24" v-else>{{ $formatName(item.name) }}</div>
|
||||
<span class="item-name">{{ item.name }}</span>
|
||||
<span class="item-point">{{ item.integral }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content" v-if="showDetail && list.length">
|
||||
<div class="title">积分明细</div>
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-info">
|
||||
<p>{{ item.residentName + ':' }}{{ item.eventDesc }}</p>
|
||||
<span> {{ item.doTime }}</span>
|
||||
</div>
|
||||
<div class="item-num" :class="'color-'+ (item.changeIntegral >= 0 ? 0 : 1)">
|
||||
{{ item.changeIntegral > 0 ? '+' + item.changeIntegral : item.changeIntegral }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "userRank",
|
||||
appName: "个人积分",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
props: {
|
||||
showDetail: { //true 积分明细 false积分排行
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
current: 1,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
if (this.showDetail) {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInfo() {// 积分排行
|
||||
this.info = {}
|
||||
// var url = `/app/appresident/rank?id=00255e188d1225f3fe022cb4eed44a84&type=${this.tabIndex}` //积分排行
|
||||
var url = `/app/appresident/rank?id=${this.user.residentId}&type=1&areaId=${this.user?.areaId}` //积分排行
|
||||
this.$http.post(url).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList() {// 积分明细列表
|
||||
// var url = `/app/appvillagerintegraldetail/IntegralList?residentId=00255e188d1225f3fe022cb4eed44a84&type=${this.tabIndex}¤t=${this.current}&size=10` //积分明细
|
||||
let url = `/app/appvillagerintegraldetail/IntegralList?residentId=${this.user.residentId}&queryType=1¤t=${this.current}&size=10` //积分明细
|
||||
this.$http.post(url).then(res => {
|
||||
if (res?.data) {
|
||||
if (this.current > res.data.pages) {
|
||||
return
|
||||
}
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.list.length < 50) {
|
||||
this.current++;
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.userRank {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
background-color: #f3f6f9;
|
||||
|
||||
.bg-blue {
|
||||
width: 100%;
|
||||
height: 176px;
|
||||
background-color: #4181FF;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
width: 690px;
|
||||
height: 256px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: -130px 0 40px 30px;
|
||||
padding: 100px 60px 40px 60px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
|
||||
.item {
|
||||
text-align: center;
|
||||
z-index: 99;
|
||||
|
||||
.num {
|
||||
font-family: DIN;
|
||||
font-size: 52px;
|
||||
font-weight: bold;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.color-5AAD6A {
|
||||
color: #5AAD6A;
|
||||
}
|
||||
|
||||
.color-4185F5 {
|
||||
color: #4185F5;
|
||||
}
|
||||
|
||||
.color-CD413A {
|
||||
color: #CD413A;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
width: 360px;
|
||||
height: 250px;
|
||||
top: -40px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-content {
|
||||
padding: 94px 30px 0;
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
display: inline-block;
|
||||
width: 216px;
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.12);
|
||||
border-radius: 12px;
|
||||
padding: 40px 0 76px 0;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.user-name {
|
||||
font-size: 30px;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.item-num {
|
||||
font-size: 46px;
|
||||
font-weight: 6000;
|
||||
color: #2C51CE;
|
||||
line-height: 54px;
|
||||
}
|
||||
|
||||
.top-img {
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
position: absolute;
|
||||
top: -11px;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-top {
|
||||
margin: -46px 20px 0;
|
||||
|
||||
.user-img {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
}
|
||||
|
||||
.user-name-bg {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
border-radius: 50%;
|
||||
background-color: #4E8EEE;
|
||||
font-size: 28px;
|
||||
line-height: 104px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.top-img-one {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: -22px;
|
||||
left: 0;
|
||||
height: 46px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-list {
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
background: #FFF;
|
||||
padding: 0 64px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.item-num {
|
||||
display: inline-block;
|
||||
width: 68px;
|
||||
color: #858594;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.user-img {
|
||||
margin-right: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
display: inline-block;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.item-point {
|
||||
display: inline-block;
|
||||
width: 210px;
|
||||
text-align: right;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mar-r24 {
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.user-name-bg {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background-color: #4E8EEE;
|
||||
font-size: 28px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mar-b4 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mar-b8 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 0 0 0 32px;
|
||||
padding: 30px 30px 94px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 34px 0 32px 0;
|
||||
border-bottom: 2px solid #ddd;
|
||||
display: flex;
|
||||
|
||||
.item-info {
|
||||
width: 500px;
|
||||
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-num {
|
||||
width: calc(100% - 500px);
|
||||
text-align: right;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.color-0 {
|
||||
color: #2C51CE !important;
|
||||
}
|
||||
|
||||
.color-1 {
|
||||
color: #E6736E !important;
|
||||
}
|
||||
|
||||
.fixed-top {
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
96
src/apps/AppCreditPoints/giveIntegral.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<section class="giveIntegral">
|
||||
<AiGroup>
|
||||
<AiItem label="选择对象" required>
|
||||
<AiSelect v-model="form.objectType" dict="integralGiveObjType"/>
|
||||
</AiItem>
|
||||
<AiItem label="选择人员" required v-if="form.objectType">
|
||||
<AiPagePicker v-if="form.objectType==0" single @select="handleSelectUser">
|
||||
<AiMore v-model="form.userName"/>
|
||||
</AiPagePicker>
|
||||
<AiPagePicker v-if="form.objectType==1" single @select="handleSelectUser" type="sysUser">
|
||||
<AiMore v-model="form.userName"/>
|
||||
</AiPagePicker>
|
||||
</AiItem>
|
||||
</AiGroup>
|
||||
<AiGroup>
|
||||
<AiItem label="赠送分值" required topLabel>
|
||||
<div slot="sub" class="color-999">(积分总额{{ info.sysUserIntegral || 0 }}分)</div>
|
||||
<input v-model.number="form.integral"/>
|
||||
</AiItem>
|
||||
</AiGroup>
|
||||
<AiBottomBtn text="确认赠送" @click="submit"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "giveIntegral",
|
||||
appName: "积分赠送",
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
form: {userName: ""}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
let {user: {id: userId}} = this
|
||||
this.$http.post('/app/appvillagerintegraldetail/sysUserIntegralList', null, {
|
||||
params: {userId, current: 1, size: 10}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
let {objectType, userId, integral} = this.form
|
||||
if (!objectType) {
|
||||
return this.$u.toast("请选择对象")
|
||||
}
|
||||
if (!userId) {
|
||||
return this.$u.toast("请选择人员")
|
||||
}
|
||||
if (!integral) {
|
||||
return this.$u.toast("请输入赠送分值")
|
||||
}
|
||||
this.$http.post("/admin/user/giveIntegral", null, {
|
||||
params: {...this.form}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$u.toast("提交成功!")
|
||||
uni.navigateBack({
|
||||
success: () => uni.$emit('reachBottom', true)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelectUser(v) {
|
||||
console.log(v)
|
||||
this.form.userId = v?.[0]?.id || ""
|
||||
this.form.userName = v?.[0]?.name || ""
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getInfo()
|
||||
this.$dict.load("integralGiveObjType")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.giveIntegral {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
|
||||
.color-999 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -71,7 +71,7 @@
|
||||
{{ item.girdMemberName && item.girdMemberName.substring(item.girdMemberName.length, item.girdMemberName.length - 2) }}
|
||||
</span>
|
||||
|
||||
<img src="./components/1.png" class="avatarIcon" alt="" />
|
||||
<!-- <img src="./components/1.png" class="avatarIcon" alt="" /> -->
|
||||
</div>
|
||||
|
||||
<div class="cardss-right">
|
||||
@@ -102,12 +102,12 @@
|
||||
<div class="fixedBtn">
|
||||
<div class="status00" v-if="data.eventStatus == 0">
|
||||
<div class="columns border-r" @click="toContent(1)">
|
||||
<img src="./components/img/zhuanjiao.png" alt="" />
|
||||
<!-- <img src="./components/img/zhuanjiao.png" alt="" /> -->
|
||||
<span class="hint">转交事件</span>
|
||||
</div>
|
||||
|
||||
<div class="columns" @click="toContent(2)">
|
||||
<img src="./components/img/jujue.png" alt="" />
|
||||
<!-- <img src="./components/img/jujue.png" alt="" /> -->
|
||||
<span class="hint">拒绝受理</span>
|
||||
</div>
|
||||
|
||||
@@ -198,7 +198,7 @@ uni-page-body {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
background: #4e8eee;
|
||||
background: #3975c6;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
|
||||
339
src/apps/AppHelpDeclaration/SelectUser.vue
Normal file
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<div class="SelectUser">
|
||||
<div class="header-middle">
|
||||
<div class="hint">
|
||||
<span v-for="(item, index) in slectList" :key="index"><span v-if="index" style="margin:0 4px;">/</span><span style="color:#3F8DF5" @click="girdNameClick(item, index)">{{item.girdName}}</span></span>
|
||||
</div>
|
||||
|
||||
<div class="showTypes" v-if="!userList.length">
|
||||
<div v-if="treeList.length > 0">
|
||||
<div class="cards" v-for="(item, index) in treeList" :key="index" @click="itemClick(item)">
|
||||
<div class="imges">
|
||||
<span v-if="item.girdLevel == 2">
|
||||
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked" @click.stop="girdClick(item, index)" />
|
||||
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click.stop="girdClick(item, index)" />
|
||||
</span>
|
||||
<img src="./components/img/gird--select-icon.png" alt="" class="avatras" />
|
||||
</div>
|
||||
<div class="rightes">
|
||||
<div class="applicationNames">{{ item.girdName }}</div>
|
||||
<img src="./components/img/right-icon.png" alt="" class="imgs" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
||||
</div>
|
||||
|
||||
<div class="showUsers" v-else>
|
||||
<div v-if="userList.length > 0">
|
||||
<div class="cards" v-for="(e, index) in userList" :key="index">
|
||||
<div class="imges">
|
||||
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
|
||||
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
|
||||
|
||||
<img src="./components/img/tx@2x.png" alt="" class="avatras" />
|
||||
</div>
|
||||
|
||||
<div class="rights">
|
||||
<div class="applicationNames">{{ e.name }}</div>
|
||||
<div class="idNumbers">{{ e.phone }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="subBtn" @click="submit">
|
||||
<div>确定选择</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SelectUser',
|
||||
data() {
|
||||
return {
|
||||
selectUser: {},
|
||||
allData: null,
|
||||
treeList: [],
|
||||
slectList: [],
|
||||
userList: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getTree()
|
||||
},
|
||||
onShow() {
|
||||
document.title = '选择人员'
|
||||
},
|
||||
methods: {
|
||||
getTree() {
|
||||
this.slectList = []
|
||||
this.$http.post('/app/appgirdinfo/listAllByTop').then((res) => {
|
||||
if (res?.data) {
|
||||
this.allData = res.data
|
||||
this.treeInit()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
treeInit() {
|
||||
if(this.allData[0].girdLevel == 2) {
|
||||
if(this.allData[0].girdMemberList && this.allData[0].girdMemberList.length) {
|
||||
this.userList = this.allData[0].girdMemberList
|
||||
this.userList.map((item) => {
|
||||
item.isChecked = false
|
||||
})
|
||||
}
|
||||
}else {
|
||||
this.treeList = this.allData[0].girdList
|
||||
}
|
||||
var obj = {
|
||||
girdName: this.allData[0].girdName,
|
||||
id: this.allData[0].id,
|
||||
girdLevel: this.allData[0].girdLevel
|
||||
}
|
||||
this.slectList.push(obj)
|
||||
},
|
||||
|
||||
itemClick(row) {
|
||||
console.log(row)
|
||||
var obj = {
|
||||
girdName: row.girdName,
|
||||
id: row.id,
|
||||
girdLevel: row.girdLevel
|
||||
}
|
||||
this.slectList.push(obj)
|
||||
this.searckGird(row)
|
||||
},
|
||||
|
||||
searckGird(row) {
|
||||
this.treeList = []
|
||||
if(row.girdLevel != 2) { //查网格
|
||||
this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.treeList = res.data.records
|
||||
}
|
||||
})
|
||||
}else { //查网格员
|
||||
this.userList = []
|
||||
this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.userList = res.data
|
||||
this.userList.map((item) => {
|
||||
item.isChecked = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
girdNameClick(row, index) {
|
||||
this.userList = []
|
||||
if(!index) { //第一级别
|
||||
this.slectList = []
|
||||
this.treeInit()
|
||||
}else {
|
||||
var list = []
|
||||
this.slectList.map((item, i) => {
|
||||
if(i <= index) {
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
this.slectList = list
|
||||
this.searckGird(row)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
girdClick(row, index) {
|
||||
if (this.treeList[index].isChecked) {//取消
|
||||
this.treeList[index].isChecked = false
|
||||
this.selectUser = {}
|
||||
} else {
|
||||
this.treeList.map((item) => {
|
||||
item.isChecked = false
|
||||
})
|
||||
this.treeList[index].isChecked = true
|
||||
this.selectUser = row
|
||||
}
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
userClick(row, index) {
|
||||
if (this.userList[index].isChecked) {//取消
|
||||
this.userList[index].isChecked = false
|
||||
this.selectUser = {}
|
||||
} else {
|
||||
this.userList.map((item) => {
|
||||
item.isChecked = false
|
||||
})
|
||||
this.userList[index].isChecked = true
|
||||
this.selectUser = row
|
||||
}
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
submit() {
|
||||
if (this.selectUser.id != null) {
|
||||
uni.$emit('goback', this.selectUser)
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
return this.$u.toast('请选择网格或网格员')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.SelectUser {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
.header-top {
|
||||
background: #fff;
|
||||
padding: 20px 32px;
|
||||
}
|
||||
|
||||
.header-middle {
|
||||
padding-bottom: 140px;
|
||||
.hint {
|
||||
padding: 28px 20px 28px 32px;
|
||||
line-height: 56px;
|
||||
box-shadow: 0px 1px 0px 0px #e4e5e6;
|
||||
font-size: 30px;
|
||||
font-weight: 500;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.showTypes {
|
||||
.empty-div {
|
||||
height: 16px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.cards {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
// background: pink;
|
||||
padding: 0 0 0 32px;
|
||||
|
||||
.imges {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// width: 200px;
|
||||
.imgselect {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.avatras {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
margin-left: 36px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.rightes {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 32px;
|
||||
border-bottom: 1px solid #e4e5e6;
|
||||
.applicationNames {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
.imgs {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.showUsers {
|
||||
.cards {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
// background: pink;
|
||||
padding: 0 0 0 32px;
|
||||
|
||||
.imges {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 200px;
|
||||
.imgselect {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.avatras {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
margin-left: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.rights {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 32px;
|
||||
border-bottom: 1px solid #e4e5e6;
|
||||
padding-right: 40px;
|
||||
.applicationNames {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
.idNumbers {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subBtn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 118px;
|
||||
background: #f4f8fb;
|
||||
div {
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
background: #1365dd;
|
||||
border-radius: 4px;
|
||||
font-size: 32px;
|
||||
color: #fff;
|
||||
margin: 20px 34px 0 0;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -160,7 +160,11 @@ export default {
|
||||
this.flag = true
|
||||
this.$http.post('/app/apphelpdeclarationinfo/addByEw',{...this.form}).then((res) => {
|
||||
if(res.code ==0) {
|
||||
uni.navigateTo({url: './result'})
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('update')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
},600)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
BIN
src/apps/AppHelpDeclaration/components/1.png
Normal file
|
After Width: | Height: | Size: 623 B |
BIN
src/apps/AppHelpDeclaration/components/img/add-icon.png
Normal file
|
After Width: | Height: | Size: 815 B |
BIN
src/apps/AppHelpDeclaration/components/img/bg-1.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/bg-2.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/bg-3.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/down-icon.png
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
src/apps/AppHelpDeclaration/components/img/gird--select-icon.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/gird-icon.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/handle-icon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/jujue.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/line-img.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/no-admin.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/remove-icon.png
Normal file
|
After Width: | Height: | Size: 803 B |
BIN
src/apps/AppHelpDeclaration/components/img/right-icon.png
Normal file
|
After Width: | Height: | Size: 373 B |
BIN
src/apps/AppHelpDeclaration/components/img/search-icon.png
Normal file
|
After Width: | Height: | Size: 766 B |
BIN
src/apps/AppHelpDeclaration/components/img/set-icon-active.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/set-icon.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/setting-icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/statistics-icon.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/tx@2x.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/user-img.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/xz.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/xzh.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/apps/AppHelpDeclaration/components/img/zhuanjiao.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
@@ -1,37 +1,112 @@
|
||||
<template>
|
||||
<div class="details">
|
||||
<div class="user">
|
||||
<div class="avatar">{{ data.name && data.name.substring(data.name.length, data.name.length - 2) }}</div>
|
||||
<div class="right">
|
||||
<p><span>{{ data.name }}</span>的帮扶申请</p>
|
||||
<div>{{ data.declareTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="event_info">
|
||||
<div class="content">{{ data.riskDescription }}</div>
|
||||
<div class="picture" v-if="data.files.length">
|
||||
<img :src="item.url" v-for="(item,index) in data.files" :key="index" alt="" @click="preview(index)">
|
||||
</div>
|
||||
<div class="tags">
|
||||
<span v-for="(item,index) in list" :key="index">{{item}}</span>
|
||||
<span :style="{background: data.status == 0? '#FF883C':data.status == 1? '#1AAAFF': data.status==2? '#FF4466': '#42D784'}">{{ $dict.getLabel('helpDeclarationStatus', data.status) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="progress_info">
|
||||
<div class="item">
|
||||
<label>申报进度</label>
|
||||
<div :style="{color: item.status == 0? '#FF883C':item.status == 1? '#1AAAFF': item.status==2? '#FF4466': '#42D784'}">{{ $dict.getLabel('helpDeclarationStatus', data.status) }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<label>申报人姓名</label>
|
||||
<div>{{ data.name }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<label>申报时间</label>
|
||||
<div>{{ data.declareTime }}</div>
|
||||
<label>家庭人口数</label>
|
||||
<div>{{ data.householdNumber }}</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<label>详细地址</label>
|
||||
<div>{{ data.address }}</div>
|
||||
<div class="item">
|
||||
<label>联系方式</label>
|
||||
<div>{{ data.phone }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<label>申报方式</label>
|
||||
<div>自主申报</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<label>身份证号</label>
|
||||
<div>{{ data.idNumber }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<label>所在地区</label>
|
||||
<div>{{ data.areaName }}</div>
|
||||
</div>
|
||||
<div class="items" v-if="data.files && data.files.length">
|
||||
<p>照片</p>
|
||||
<div class="picture">
|
||||
<img :src="item.url" v-for="(item,index) in data.files" :key="index" alt="" @click="preview(data.files, item.url)">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="progress"></div>
|
||||
<div class="header-bottom">
|
||||
|
||||
<div class="plan">
|
||||
<div class="nav">
|
||||
<span>办理进度</span>
|
||||
<span> ({{ $dict.getLabel('clapEventStatus', data.eventStatus) }})</span>
|
||||
</div>
|
||||
|
||||
<div class="cards" v-for="(item, index) in data.processList" :key="index">
|
||||
<div class="cardss">
|
||||
<div class="cardss-left">
|
||||
<span>
|
||||
{{ item.doUsername && item.doUsername.substring(item.doUsername.length, item.doUsername.length - 2) }}
|
||||
</span>
|
||||
|
||||
<img src="./components/1.png" class="avatarIcon" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="cardss-right">
|
||||
<div class="cardsss-right-left">
|
||||
<div class="cardssss-right-left-top">
|
||||
<span>{{ item.description }}</span>
|
||||
<div style="color: #2ea222; font-size: 16px; margin-top: 5px">
|
||||
{{ $dict.getLabel('helpDeclarationStatus', item.status) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cardees-right-right">{{ item.doTime }}</div>
|
||||
</div>
|
||||
|
||||
<div class="lines"></div>
|
||||
</div>
|
||||
|
||||
<div class="cardes-msg-top" v-if="item.doExplain">{{ item.doExplain }}</div>
|
||||
|
||||
<div class="imgs">
|
||||
<img :src="e.url" alt="" v-for="(e, index) in item.files" :key="index" @click="previewImage(item.files, e.url)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fixedBtn">
|
||||
<div class="status00">
|
||||
<div class="columns border-r" @click="toContent(1)">
|
||||
<span class="hint">转交事件</span>
|
||||
</div>
|
||||
|
||||
<!-- <div class="columns" @click="toContent(2)">
|
||||
<span class="hint">拒绝受理</span>
|
||||
</div> -->
|
||||
|
||||
<div class="doIt" @click="doItShow = true">审核处理</div>
|
||||
</div>
|
||||
|
||||
<div class="endDoIt" v-if="data.eventStatus == 1 && data.rightType == 0" @click="toContent(3)">前往办理</div>
|
||||
</div>
|
||||
<u-modal v-model="doItShow" :mask-close-able="true" z-index="99" content="确定处理该事件?" :show-cancel-button="true" @confirm="doThings"></u-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -42,6 +117,7 @@ export default {
|
||||
list: [],
|
||||
data: {},
|
||||
id: '',
|
||||
doItShow: false,
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
@@ -53,15 +129,21 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/apphelpdeclarationinfo/queryDetailById?id=${this.id}`).then(res => {
|
||||
this.$http.post(`/app/apphelpdeclarationinfo/queryDetailById?id=${this.id}`).then(res => {
|
||||
if(res.code == 0) {
|
||||
this.data = res.data
|
||||
this.list = res.data.reason.split(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
preview(index) {
|
||||
this.$previewImage(this.data.files, index, "url");
|
||||
preview(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map(v => v.url),
|
||||
current: img
|
||||
})
|
||||
},
|
||||
toContent(status) {
|
||||
uni.navigateTo({ url: `./result?status=${status}` })
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -69,6 +151,37 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.details {
|
||||
.user {
|
||||
height: 120px;
|
||||
padding: 26px 30px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
background: #FFF;
|
||||
.avatar {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 50%;
|
||||
background: #4E8EEE;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-size: 28px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.right {
|
||||
p {
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
color: #333333;
|
||||
}
|
||||
div {
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.event_info {
|
||||
background: #FFFFFF;
|
||||
@@ -90,35 +203,35 @@ export default {
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-right: 16px;
|
||||
background: #EEEEEE;
|
||||
padding: 4px 16px;
|
||||
padding: 4px 8px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 24px;
|
||||
margin-bottom: 16px;
|
||||
color: #999999;
|
||||
border-radius: 8px;
|
||||
color: #FFF;
|
||||
// margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.progress_info {
|
||||
margin-top: 16px;
|
||||
background: #FFF;
|
||||
padding: 0 32px 20px 32px;
|
||||
box-sizing: border-box;
|
||||
.item {
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
border-top: 1px solid #DDDDDD;
|
||||
label {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.item:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
.items {
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
label {
|
||||
border-top: 1px solid #DDDDDD;
|
||||
p {
|
||||
color: #999999;
|
||||
}
|
||||
div {
|
||||
@@ -138,5 +251,153 @@ export default {
|
||||
color: #FF4466
|
||||
}
|
||||
}
|
||||
|
||||
.header-bottom {
|
||||
padding-bottom: 80px;
|
||||
background: #FFF;
|
||||
margin-top: 16px;
|
||||
|
||||
.plan {
|
||||
padding: 0 32px;
|
||||
.nav {
|
||||
padding: 26px 0;
|
||||
}
|
||||
|
||||
.cards {
|
||||
position: relative;
|
||||
padding-bottom: 80px;
|
||||
.cardss {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.cardss-left {
|
||||
position: relative;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
color: #fff;
|
||||
background: #197df0;
|
||||
border: 1px solid #dddddd;
|
||||
border-radius: 50%;
|
||||
font-size: 28px;
|
||||
z-index: 9;
|
||||
|
||||
.avatarIcon {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
.cardss-right {
|
||||
width: calc(100% - 110px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.cardsss-right-left {
|
||||
.cardssss-right-left-top {
|
||||
width: 300px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32px;
|
||||
}
|
||||
.cardssss-right-left-bottom {
|
||||
margin-top: 10px;
|
||||
font-size: 28px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
.cardees-right-right {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.lines {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 40px;
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
background: #eeeeee;
|
||||
}
|
||||
}
|
||||
.cardes-msg-top {
|
||||
font-size: 28px;
|
||||
color: #343d65;
|
||||
margin-top: 10px;
|
||||
margin-left: 110px;
|
||||
}
|
||||
|
||||
.imgs {
|
||||
margin-top: 10px;
|
||||
margin-left: 110px;
|
||||
img {
|
||||
width: 136px;
|
||||
height: 136px;
|
||||
border-radius: 4px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
img:nth-child(4n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cards:last-child {
|
||||
.lines {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedBtn {
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
z-index: 999;
|
||||
.status00 {
|
||||
display: flex;
|
||||
|
||||
.columns {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 50%;
|
||||
padding: 16px 0;
|
||||
border-top: 1px solid #ddd;
|
||||
.hint {
|
||||
margin-top: 16px;
|
||||
font-size: 32px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
.border-r {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
.doIt {
|
||||
width: 56%;
|
||||
background: #3975c6;
|
||||
text-align: center;
|
||||
line-height: 112px;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.endDoIt {
|
||||
background: #3975c6;
|
||||
text-align: center;
|
||||
padding: 34px 0;
|
||||
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="progress">
|
||||
<div class="list">
|
||||
<AiTopFixed>
|
||||
<div class="tab-select">
|
||||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
|
||||
@@ -17,18 +17,18 @@
|
||||
</AiAreaPicker>
|
||||
</div>
|
||||
<div class="right">
|
||||
<AiSelect dict="helpDeclarationStatus" v-model="status">
|
||||
<span v-if="!status" style="color: #999;">风险类型</span>
|
||||
<span v-else>{{status}}</span>
|
||||
<AiSelect dict="helpDeclarationReason" v-model="declareReason">
|
||||
<span v-if="!declareReason" style="color: #999;">风险类型</span>
|
||||
<span v-else>{{ $dict.getLabel('helpDeclarationReason', declareReason) }}</span>
|
||||
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;"></u-icon>
|
||||
<u-icon name="close-circle" v-if="ststus" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;"></u-icon>
|
||||
<u-icon name="close-circle" v-if="declareReason" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;"></u-icon>
|
||||
</AiSelect>
|
||||
</div>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
<div v-if="list.length">
|
||||
<div class="card_list" v-for="(item,index) in list" :key="index">
|
||||
<div class="card" @click="$linkTo(`./details?id=${item.id}`)">
|
||||
<div class="card_list">
|
||||
<div class="card" v-for="(item,index) in list" :key="index" @click="toDetail(item.id)">
|
||||
<div class="top">
|
||||
<div class="title">{{ item.riskDescription }}</div>
|
||||
<div class="time">{{ item.declareTime }}</div>
|
||||
@@ -42,9 +42,12 @@
|
||||
</div>
|
||||
<AiEmpty v-else description="暂无数据"/>
|
||||
|
||||
<AiFixedBtn>
|
||||
<!-- <AiFixedBtn>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAdd()"/>
|
||||
</AiFixedBtn>
|
||||
</AiFixedBtn> -->
|
||||
<div style="height: 56px"></div>
|
||||
<div class="btn" @click="toAdd">申请帮扶</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -58,11 +61,15 @@ export default {
|
||||
current: 1,
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
status: '',
|
||||
declareReason: '',
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$dict.load('helpDeclarationStatus')
|
||||
this.$dict.load('helpDeclarationStatus').then(() => {
|
||||
uni.$on('update', () => {
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
@@ -74,10 +81,12 @@ export default {
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.$http.post('/app/apphelpdeclarationinfo/list',null,{
|
||||
this.$http.post('/app/apphelpdeclarationinfo/listByEw',null,{
|
||||
params: {
|
||||
current: this.current,
|
||||
// status: this.tabIndex == 0 ?
|
||||
areaId: this.areaId,
|
||||
searchType: this.tabIndex,
|
||||
declareReason: this.declareReason // 风险类型
|
||||
}
|
||||
}).then((res) => {
|
||||
if(res?.data) {
|
||||
@@ -90,6 +99,10 @@ export default {
|
||||
uni.navigateTo({url: './add'})
|
||||
},
|
||||
|
||||
toDetail(id) {
|
||||
uni.navigateTo({url: `./details?id=${id}`})
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
@@ -99,8 +112,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.progress {
|
||||
// padding-top: 24px;
|
||||
.list {
|
||||
::v-deep .AiTopFixed .content {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -151,7 +163,7 @@ export default {
|
||||
}
|
||||
|
||||
.card_list {
|
||||
padding: 0 32px;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
.card {
|
||||
background: #FFFFFF;
|
||||
@@ -204,5 +216,17 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
line-height: 112px;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
background: #3975C6;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,82 +1,232 @@
|
||||
<template>
|
||||
<div class="service-result" >
|
||||
<!-- v-if="showPage" -->
|
||||
<img src="./components/resultPic.png" />
|
||||
<h2>申请成功!</h2>
|
||||
<div class="result">
|
||||
<div class="contents">
|
||||
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
|
||||
<u-form-item label="转交给" prop="status" required :border-bottom="false" right-icon="arrow-right" class="first-form" v-if="status == 1">
|
||||
<u-input v-model="forms.name" placeholder="请选择转交对象" @click="toSelectUser" disabled />
|
||||
</u-form-item>
|
||||
<u-form-item label="事件分类" prop="groupName" required :border-bottom="false" right-icon="arrow-right" v-if="status != 1">
|
||||
<!-- <u-input v-model="forms.groupName" placeholder="请选择事件分类" /> -->
|
||||
<span @click="show = true" class="right-span" :style="forms.groupName ? '' : 'color:#999;'">{{forms.groupName || '请选择事件分类'}}</span>
|
||||
|
||||
<div class="service-btn" hover-class="text-hover" @click="myAdd">查看我的申报</div>
|
||||
<div class="service-btn" hover-class="text-hover" @click="back">返回</div>
|
||||
<u-select v-model="show" :list="myList" value-name="id" label-name="groupName" @confirm="selectStatus"></u-select>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item :label="status == 3 ? '办结意见' : status == 2 ? '拒绝受理意见' : '办理意见'" prop="content" required :border-bottom="false" label-position="top" class="contents">
|
||||
<u-input v-model="forms.content" :placeholder="status == 2 ? '请写下拒绝受理意见…' : '请写下你的办结意见...'" type="textarea" auto-height height="100" maxlength="500" />
|
||||
</u-form-item>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="图片上传(最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top">
|
||||
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
|
||||
</u-form-item>
|
||||
|
||||
</u-form>
|
||||
</div>
|
||||
|
||||
<div class="btn" v-if="this.status == 1" @click="confirm">
|
||||
<span>转交事件</span>
|
||||
</div>
|
||||
|
||||
<div class="btn" v-if="this.status == 2" @click="confirm">
|
||||
<span>拒绝受理</span>
|
||||
</div>
|
||||
|
||||
<div class="btn" v-if="this.status == 3" @click="confirm">
|
||||
<span>我已办结</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'result',
|
||||
data() {
|
||||
return {
|
||||
showPage: false,
|
||||
title: '',
|
||||
forms: {
|
||||
groupName: '',
|
||||
groupId: '',
|
||||
content: '',
|
||||
files: [],
|
||||
name: ''
|
||||
},
|
||||
flag: false,
|
||||
show: false,
|
||||
status: '', //1转交 2拒绝受理 3我已办结
|
||||
myList: [],
|
||||
id: '',
|
||||
selectUser: {},
|
||||
titleList: ['', '转交事件', '拒绝受理', '我已办结']
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.title = query.title
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.title,
|
||||
onLoad(option) {
|
||||
this.status = option.status
|
||||
this.id = option.id
|
||||
this.forms.groupId = option.groupId
|
||||
this.forms.groupName = option.groupName
|
||||
this.typeList()
|
||||
uni.$on('goback', (res) => {
|
||||
this.selectUser = res
|
||||
if(res.name) {
|
||||
this.forms.name = res.name
|
||||
}else{
|
||||
this.forms.name = res.girdName
|
||||
}
|
||||
})
|
||||
if (this.title) {
|
||||
this.showPage = true
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
console.log(this.titleList[this.status])
|
||||
document.title = this.titleList[this.status]
|
||||
},
|
||||
methods: {
|
||||
myAdd() {
|
||||
uni.reLaunch({url: './progress'})
|
||||
|
||||
typeList() {
|
||||
this.$http.post(`/app/appclapeventgroup/list`, null, {
|
||||
params: {
|
||||
size: 9999,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.myList = res.data.records
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
|
||||
confirm() {
|
||||
if(this.status == 1 && !this.forms.name) {
|
||||
return this.$u.toast('请选择转交对象')
|
||||
}
|
||||
if(this.status != 1 && !this.forms.groupName) {
|
||||
return this.$u.toast('请选择分类')
|
||||
}
|
||||
if(this.status != 1 && !this.forms.content) {
|
||||
return this.$u.toast('请输入意见')
|
||||
}
|
||||
this.submit()
|
||||
},
|
||||
submit() { //status 1转交 2拒绝受理 3我已办结
|
||||
var url = '', successText= '', params= ''
|
||||
if(this.status == 1) {
|
||||
url = `/app/appclapeventinfo/transfer`
|
||||
successText = '转交成功'
|
||||
params = {
|
||||
...this.forms,
|
||||
girdId: this.selectUser.id,
|
||||
girdName: this.selectUser.girdName,
|
||||
}
|
||||
if(this.selectUser.name) { //选择的网格员
|
||||
params.girdId = this.selectUser.girdId
|
||||
params.girdMemberId = this.selectUser.id
|
||||
params.girdMemberName = this.selectUser.name
|
||||
}
|
||||
}
|
||||
if(this.status == 2) {
|
||||
url = `/app/appclapeventinfo/refuse`
|
||||
successText = '拒绝成功'
|
||||
params = {...this.forms}
|
||||
}
|
||||
if(this.status == 3) {
|
||||
url = `/app/appclapeventinfo/finishByGirdMember`
|
||||
successText = '办结成功'
|
||||
params = {...this.forms}
|
||||
}
|
||||
params.id = this.id
|
||||
this.$http.post(url, params).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast(successText)
|
||||
uni.$emit('updateDeatil')
|
||||
uni.$emit('getListInit')
|
||||
setTimeout(() => {
|
||||
if(this.status == 1) {
|
||||
uni.navigateBack({delta: 2})
|
||||
}else {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},600)
|
||||
}
|
||||
})
|
||||
},
|
||||
selectStatus(e) {
|
||||
this.forms.groupName = e[0].label
|
||||
this.forms.groupId = e[0].value
|
||||
},
|
||||
toSelectUser() {
|
||||
uni.navigateTo({ url: './SelectUser' })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.service-result {
|
||||
min-height: 100vh;
|
||||
padding-top: 96px;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
<style scoped lang="scss">
|
||||
.result {
|
||||
height: 100%;
|
||||
.contents {
|
||||
padding-bottom: 140px;
|
||||
::v-deep .u-form {
|
||||
.u-form-item {
|
||||
padding: 0 45px !important;
|
||||
.u-form-item__body {
|
||||
.u-form-item--right__content__slot {
|
||||
padding-bottom: 0;
|
||||
.u-input {
|
||||
text-align: right !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.service-btn {
|
||||
width: 320px;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
margin: 80px auto 0;
|
||||
.u-form-item:first-child {
|
||||
.u-form-item__body {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
height: 24px;
|
||||
background: #f3f6f9;
|
||||
}
|
||||
|
||||
.contents {
|
||||
padding-bottom: 20px !important;
|
||||
.u-form-item__body {
|
||||
.u-form-item--right__content__slot {
|
||||
.u-input {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatars {
|
||||
padding-bottom: 20px !important;
|
||||
.u-form-item__body {
|
||||
.default {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: #3975c6;
|
||||
padding: 34px 0;
|
||||
text-align: center;
|
||||
background: #4181FF;
|
||||
font-size: 36px;
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.service-btn:last-child {
|
||||
margin-top: 30px;
|
||||
background: #FFF;
|
||||
color: #4181FF;
|
||||
border: 1px solid #4181FF;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 32px;
|
||||
color: #333333;
|
||||
font-size: 40px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
.right-span{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
40
src/components/AiBottomBtn.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<section class="AiBottomBtn">
|
||||
<slot v-if="$slots.default"/>
|
||||
<u-gap v-else height="112"/>
|
||||
<div class="fixed" @click="$emit('click')">
|
||||
<slot v-if="$slots.default"/>
|
||||
<div class="text" v-text="text"/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AiBottomBtn",
|
||||
props: {
|
||||
text: {default: ""}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AiBottomBtn {
|
||||
.fixed {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 100%;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
line-height: 112px;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: #1365DD;
|
||||
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
29
src/components/AiGroup.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<section class="AiGroup">
|
||||
<slot/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AiGroup",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AiGroup {
|
||||
background: #FFFFFF;
|
||||
box-shadow: inset 0px -1px 0px 0px #DDDDDD;
|
||||
padding-left: 32px;
|
||||
|
||||
& + .AiGroup {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
82
src/components/AiItem.vue
Normal file
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<section class="AiItem">
|
||||
<div v-if="topLabel" class="topLabel">
|
||||
<div class="labelPane" flex>
|
||||
<div class="label" :class="{required}" v-text="label"/>
|
||||
<slot name="sub" v-if="$slots.sub"/>
|
||||
</div>
|
||||
<div class="content">
|
||||
<slot v-if="$slots.default"/>
|
||||
<div v-else v-text="value"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="normal" flex>
|
||||
<div class="fill" flex>
|
||||
<div class="label" :class="{required}" v-text="label"/>
|
||||
<slot name="sub" v-if="$slots.sub"/>
|
||||
</div>
|
||||
<slot v-if="$slots.default"/>
|
||||
<div v-else v-text="value"/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AiItem",
|
||||
props: {
|
||||
value: {default: ""},
|
||||
label: {default: ""},
|
||||
required: Boolean,
|
||||
topLabel: Boolean
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AiItem {
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
|
||||
.normal {
|
||||
width: 100%;
|
||||
border-bottom: 2px solid #ddd;
|
||||
padding-right: 32px;
|
||||
box-sizing: border-box;
|
||||
height: 112px;
|
||||
}
|
||||
|
||||
.label {
|
||||
padding-left: 20px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-right: 20px;
|
||||
position: relative;
|
||||
|
||||
&.required:before {
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
content: "*";
|
||||
color: #f46;
|
||||
}
|
||||
}
|
||||
|
||||
.topLabel {
|
||||
padding: 32px 32px 32px 0;
|
||||
border-bottom: 2px solid #ddd;
|
||||
|
||||
.labelPane {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -28,6 +28,7 @@ export default {
|
||||
return {
|
||||
configList: {
|
||||
resident: {url: "/components/pages/selectResident", label: "name"},
|
||||
sysUser:{url: "/components/pages/selectSysUser", label: "name"},
|
||||
gird: {url: "/components/pages/selectGird", label: "girdName"},
|
||||
party: {url: "/components/pages/selectParty", label: "name"},
|
||||
custom: {...this.ops}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<section class="AiTabPanes">
|
||||
<section class="AiTabPanes" :style="{background}">
|
||||
<div class="item" :class="{active:value==i}" v-for="(item, i) in tabs" :key="i"
|
||||
@click="handleClick(item,i)">{{ item }}
|
||||
</div>
|
||||
@@ -18,7 +18,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
value: {default: ""},
|
||||
tabs: {default: () => []}
|
||||
tabs: {default: () => []},
|
||||
background: {default: ""}
|
||||
},
|
||||
methods: {
|
||||
handleClick(item, index) {
|
||||
|
||||
181
src/components/pages/selectSysUser.vue
Normal file
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<div class="selectResident">
|
||||
<AiTopFixed>
|
||||
<u-search placeholder="搜索" v-model="name" :show-action="false" @change="getList"/>
|
||||
</AiTopFixed>
|
||||
<div class="user-list">
|
||||
<template v-if="list.length>0">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="select-img" @click="checkClick(index)">
|
||||
<img :src="item.isCheck ? checkIcon : cirIcon" alt="">
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<img :src="item.photo" alt="" v-if="item.photo">
|
||||
<img src="./img/user-img.png" alt="" v-else>{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<AiEmpty/>
|
||||
<div class="pad-b118"/>
|
||||
</template>
|
||||
</div>
|
||||
<div class="pad-b118"/>
|
||||
<div class="footer">
|
||||
<div class="btn" @click="confirm">确定选择</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "selectResident",
|
||||
appName: "人员选择器(居民档案)",
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
total: 0,
|
||||
name: '',
|
||||
list: [],
|
||||
cirIcon: require('./img/xz.png'),
|
||||
checkIcon: require('./img/xzh.png'),
|
||||
selected: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
isSingle() {
|
||||
return this.$route.query.single
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
if (query.selected) {
|
||||
this.selected = query.selected?.split(",") || []
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
let {current, total, name: con} = this
|
||||
if (total == 0 || current <= total) {
|
||||
this.$http.post(`/admin/user/userIntegralList`, null, {
|
||||
params: {current, size: 20, con}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.total = res.data.total || 0
|
||||
res.data.records.forEach(e => {
|
||||
e.isCheck = this.selected.includes(e.idNumber)
|
||||
})
|
||||
this.list = [this.list, res.data.records || []].flat()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
checkClick(index) {
|
||||
if (this.isSingle) {
|
||||
this.list.map((e, i) => {
|
||||
e.isCheck = i == index;
|
||||
})
|
||||
} else this.list[index].isCheck = !this.list[index].isCheck
|
||||
|
||||
},
|
||||
confirm() {
|
||||
let checkList = []
|
||||
this.list.map((item) => {
|
||||
if (item.isCheck) {
|
||||
checkList.push(item)
|
||||
}
|
||||
})
|
||||
if (!checkList.length) {
|
||||
return this.$u.toast('请先选择人员')
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit("pagePicker:sysUser", checkList)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selectResident {
|
||||
::v-deep .AiTopFixed .u-search {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.pad-b118 {
|
||||
padding-bottom: 118px;
|
||||
}
|
||||
|
||||
.user-list {
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
.select-img {
|
||||
display: inline-block;
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin: 12px 36px 12px 30px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: inline-block;
|
||||
padding: 20px 0 20px 0;
|
||||
width: calc(100% - 114px);
|
||||
height: 100%;
|
||||
border-bottom: 1px solid #E4E5E6;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 74px;
|
||||
|
||||
img {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
margin-right: 34px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 118px;
|
||||
background: #F4F8FB;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
background: #1365DD;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #FFF;
|
||||
margin: 20px 34px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||