Browse Source

修复一些已知的问题

南明 9 months ago
parent
commit
7e21525fbe
6 changed files with 249 additions and 235 deletions
  1. 233 216
      pages/index/index.vue
  2. 2 2
      pages/lr/list.vue
  3. 8 5
      pages/lr/shxxList.vue
  4. 6 12
      static/html/card.html
  5. BIN
      static/images/sfza.png
  6. BIN
      static/images/sfzb.png

+ 233 - 216
pages/index/index.vue

@@ -1,227 +1,244 @@
 <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">
-      <image 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">
-              <uni-list-item v-if="(item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7') && 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>
+	<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">
+			<image 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,
-        bannerList: [
-          { image: '../../static/image/banner2.png' }
-        ],
-        lrInfo: {},
-        // 人员信息
-        userInfo: {},
-        userType: '',
-        form: {
-          pageNum: 1,
-          pageSize: 4,
-          createUserId: ''
-        },
-        dataList: [],
-        total: 0,
-      }
-    },
-    onLoad() {
-      // 老人07、员工04、监管00
-      this.userInfo = getUser()
-      this.userType = this.userInfo.userType
-    },
-    onShow() {
-      if (this.userType == '07') {
-        this.info(this.userInfo.userId)
-      } else {
-        this.form.createUserId = this.userInfo.userId
-      }
-      this.dataList = []
-      this.getDaiBanList()
-    },
-    methods: {
-      getDaiBanList() {
-        ListKhShxx(this.form).then(res => {
-          if (res.code == 200) {
-            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",
+	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,
+				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
+		},
+		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.dataList = []
+			this.getDaiBanList()
+		},
+		methods: {
+			getDaiBanList() {
+				ListKhShxx(this.form).then(res => {
+					if (res.code == 200) {
+						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) {
-        if (index == 1) {
-          // uni.showToast({
-          //   icon: 'none',
-          //   title: '该功能暂未开放'
-          // })
-        } else {
-          let baseUrl = '/pages/info/add-files'
-          uni.navigateTo({
-            url: baseUrl
-          })
-        }
-      }
-    }
-  }
+					}
+				})
+			},
+			btnClick(index) {
+				if (index == 1) {
+					// 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;
-    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;
-  }
+	.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;
+		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;
+	}
 </style>

+ 2 - 2
pages/lr/list.vue

@@ -16,7 +16,7 @@
                   <image class="item-img" src="@/static/images/caogao.png" mode=""></image>
                   <!-- <text>{{item.lrSpyj || '无'}}</text> -->
                 </view>
-                <view v-else-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'" class="item-right">
+                <view v-else-if="['1','2','5','7','8'].includes(item.lzzt)" class="item-right">
                   <text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
                   <text v-else>{{item.createTime.substring(0,8) }}</text>
                   <image class="item-img" src="@/static/images/daishenhe.png" mode=""></image>
@@ -26,7 +26,7 @@
                   <text v-else>{{item.createTime.substring(0,8) }}</text>
                   <image class="item-img" src="@/static/images/tongguo.png" mode=""></image>
                 </view>
-                <view v-else-if="item.lzzt == '4'" class="item-right">
+                <view v-else-if="item.lzzt == '4' || item.lzzt == '9'" class="item-right">
                   <text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
                   <text v-else>{{item.createTime.substring(0,8) }}</text>
                   <image class="item-img" src="@/static/images/jujue.png" mode=""></image>

+ 8 - 5
pages/lr/shxxList.vue

@@ -54,11 +54,14 @@
     },
     mounted() {
       this.userInfo = getUser()
-      if (this.userInfo.userType == '07') {
-        this.info(this.userInfo.userId)
-      } else {
-        this.form.createUserId = this.userInfo.userId
-      }
+      // if (this.userInfo.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.getList()
     },
     created() {},

+ 6 - 12
static/html/card.html

@@ -48,17 +48,11 @@
       var video = document.getElementById("video");
       var canvas = document.getElementById("canvas");
       var context = canvas.getContext("2d");
-      var bl = 1;
-      var v_t_w = window.screen.width,
-        v_t_h = v_t_w / bl;
+      var ratio = 1;
+      var v_t_h = 200, v_t_w = v_t_h *ratio;
       var mode = 'environment';
       var mediaStreamTrack;
 
-      // 85.6   54
-
-      // v_t_w = v_t_w * 90 / 100
-      // v_t_h = 54 / 85.6 * v_t_w
-
       canvas.width = v_t_w;
       canvas.height = v_t_h;
 
@@ -131,8 +125,8 @@
         mediaStreamTrack = stream.getTracks()[0];
         let settings = mediaStreamTrack.getSettings()
         const { height, width } = settings
-        bl = width / height
-        v_t_h = v_t_w / bl
+        ratio = width / height
+        v_t_w  = v_t_h * ratio
         
         // 播放视频
         video.play();
@@ -213,7 +207,7 @@
     }
 
     canvas {
-      margin-top: 12vh;
+      margin-top: 5vh;
       /* border-radius: 50%; */
     }
 
@@ -226,7 +220,7 @@
     .buttonBox {
       display: flex;
       justify-content: space-around;
-      margin-top: 35vh;
+      margin-top: 15vh;
 
       .buttonImg {
         width: 15vw;

BIN
static/images/sfza.png


BIN
static/images/sfzb.png