123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <template>
- <view class="container">
- <view>
- <text class="phoneText global-font">Hello,{{userInfo.nickName}}</text>
- </view>
- <view class="bannerBox">
- <swiper class="swiper-box" :interval="interval" autoplay indicator-dots indicator-color="#C7C7C7"
- indicator-active-color="#1aad19">
- <swiper-item v-for="(item, index) in bannerList" :key="index">
- <image src="../../static/images/banner2.png" class="imgItem" @click="bannerItemClick(item)"></image>
- </swiper-item>
- </swiper>
- </view>
- <view class="btnBox" v-if="userType !== '07'">
- <image v-if="isShow" class="btnImg" src="../../static/images/lrzc.png" @click="btnClick(0)" />
- <image v-if="userType !== '07'" class="btnImg img2" src="../../static/images/jsjz.png" @click="btnClick(1)" />
- </view>
- <view>
- <uni-card v-if="userType !== '07'" class="daiban">
- <uni-section type="line" title="待办事项">
- <template v-slot:right>
- <text @click="toList">更多 ></text>
- </template>
- <uni-list>
- <template v-for="(item,index) in dataList">
- <!-- (item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7') && -->
- <uni-list-item v-if=" item.state != '99'" :key="index" :title="item.lrXm" :note="item.sqyy"
- thumbSize="lg" :showArrow="false">
- <template v-slot:header>
- <image :src="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head"
- style="width: 10vw;height: 5vh;margin-right: 2vw;border-radius: 50%;"></image>
- </template>
- <template v-slot:footer>
- <view class="item-right">
- <text>{{item.sqsj.substring(0,8) }}</text>
- <image class="item-img" src="@/static/images/daishenhe.png" mode=""></image>
- <!-- <text>{{item.lrSpyj || '无'}}</text> -->
- </view>
- </template>
- </uni-list-item>
- </template>
- </uni-list>
- </uni-section>
- </uni-card>
- </view>
- </view>
- </template>
- <script>
- import {
- getToken,
- getUser
- } from '@/common/auth.js'
- import {
- decryptRowData_ECB,
- decryptData_ECB
- } from '@/common/sm4.js'
- import {
- updateKhjbxx,
- infoKhjbxx,
- ListKhjbxx,
- ListKhShxx
- } from '@/api/kh.js'
- export default {
- data() {
- return {
- interval: 3000,
- isShow:true,
- bannerList: [{
- image: '../../static/image/banner2.png'
- }],
- lrInfo: {},
- // 人员信息
- userInfo: {},
- userType: '',
- form: {
- pageNum: 1,
- pageSize: 4,
- state:'0',
- // createUserId: ''
- },
- dataList: [],
- total: 0,
- }
- },
- onLoad() {
- // 老人07、员工04、监管00
- this.userInfo = getUser()
- this.userType = this.userInfo.userType
- if(['04'].includes(this.userInfo.userType)&&this.userInfo.lrzptype)
- {
- if(this.userInfo.lrzptype=='2')
- {
- this.isShow=false;
- }
- }
- },
- onShow() {
- // if (this.userType == '07') {
- // this.info(this.userInfo.userId)
- // } else {
- // this.form.createUserId = this.userInfo.userId
- // }
- if (this.userInfo.userType !== '00') {
- this.form.createUserId = this.userInfo.userId
- }
-
- this.getDaiBanList()
- },
- methods: {
- getDaiBanList() {
- ListKhShxx(this.form).then(res => {
- if (res.code == 200) {
- this.dataList = []
- this.total = res.total
- // let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
- // "lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
- // "yhzh", "khmc"
- // ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
- let list = res.rows
- this.dataList.push(...list)
- }
- })
- },
- toList() {
- // 待办事项(他给老人注册、他给老人维护) 会员维护 结算记账(食堂)
- // 登录不获取openid
- uni.navigateTo({
- url: '/pages/lr/shxxList'
- })
- },
- info(id) {
- infoKhjbxx(id).then(res => {
- if (res.code == 200) {
- this.lrInfo = decryptData_ECB(res.data, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
- "lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
- "yhzh", "khmc"
- ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5]);
- }
- })
- },
- btnClick(index) {
- console.log(index,'<----------index')
- if (index == 1) {
- // uni.showToast({
- // icon: 'none',
- // title: '该功能暂未开放'
- // })
- if(['04'].includes(this.userInfo.userType))
- {
- uni.navigateTo({
- url: '/pages/accounting/accounting'
- })
- }else{
- uni.showToast({
- icon: 'none',
- title: '该功能暂未开放'
- })
- }
- } else {
- let baseUrl = '/pages/info/add-files'
- uni.navigateTo({
- url: baseUrl
- })
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .item-right {
- width: 60px;
- display: flex;
- flex-direction: column;
- background-position: left;
- background-size: 58px 58px;
- background-repeat: no-repeat;
- position: relative;
- font-size: 14px;
- .item-img {
- position: absolute;
- right: -5px;
- bottom: -10px;
- height: 40px;
- width: 40px;
- }
- }
- .container {
- // display: flex;
- // flex-direction: column;
- // height: 100vh;
- padding: 1px 0 50px;
- width: 100vw;
- background: linear-gradient(to bottom, #07bf61 0%, #fff 30%, #F8FCFF 100%);
- }
- /* 轮播图 */
- .bannerBox {
- width: 100vw;
- }
- .swiper-box {
- height: 19vh;
- margin: 7vh 2vh 20px;
- }
- .imgItem {
- width: 100%;
- height: 100%;
- }
- .swiper-box swiper-item {
- border-radius: 15px;
- overflow: hidden;
- }
- .phoneText {
- position: absolute;
- margin-top: 2vh;
- margin-left: 5vw;
- width: 80vw;
- height: 2vh;
- font-size: 14px;
- color: white;
- font-weight: 700;
- line-height: 2vh;
- text-align: left;
- vertical-align: top;
- }
- /* 按钮 */
- .btnBox {
- /* width: 90%; */
- display: flex;
- margin: 1vh 19px;
- }
- .btnImg {
- width: 49%;
- height: 16vh;
- }
- .img2 {
- margin-left: 2%;
- opacity: 0.36;
- }
- .daiban {
- // position: fixed;
- // left: 4px;
- // right: 4px;
- margin: 20px !important;
- padding: 0 !important;
- }
- </style>
|