浏览代码

添加用户详情

zs 1 年之前
父节点
当前提交
f429e58c46

+ 6 - 0
pages.json

@@ -98,6 +98,12 @@
 						"enablePullDownRefresh": true
 					}
 				},
+				{
+					"path": "person/detail",
+					"style": {
+						"navigationBarTitleText": "用户详情"
+					}
+				},
 				{
 					"path": "answer/index",
 					"style": {

+ 153 - 0
pagesMy/person/detail.vue

@@ -0,0 +1,153 @@
+<template>
+	<view class="main">
+		<view class="one">
+			<image class="image" :src="user.icon&&user.icon.length>0?user.icon[0].url:config.user_url[0].url" mode="">
+			</image>
+		</view>
+		<view class="two">
+			<view class="two_1">
+				<view class="left">姓名</view>
+				<view class="right textOne">
+					<text>{{user.name||'暂无姓名'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">手机号</view>
+				<view class="right textOne">
+					<text>{{user.mobile||'暂无手机号'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">就诊编号/卡号</view>
+				<view class="right textOne">
+					<text>{{user.card_no||'暂无就诊编号/卡号'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">性别</view>
+				<view class="right textOne">
+					<text>{{user.gender||'暂无性别'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">年龄</view>
+				<view class="right textOne">
+					<text>{{user.age||'暂无年龄'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">住址</view>
+				<view class="right textOne">
+					<text>{{user.address||'暂无住址'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">紧急联系人</view>
+				<view class="right textOne">
+					<text>{{user.urgent_name||'暂无紧急联系人'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">紧急联系人电话</view>
+				<view class="right textOne">
+					<text>{{user.urgent_mobile||'暂无紧急联系人电话'}}</text>
+				</view>
+			</view>
+			<view class="two_1">
+				<view class="left">病例</view>
+				<view class="right" @tap="toImage(user.emrs[0].url)">
+					<image class="image" :src="user.emrs&&user.emrs.length>0?user.emrs[0].url:''" mode="">
+					</image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: '',
+				user: {},
+				config: {},
+			}
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.$set(that, `id`, e && e.id || '');
+			await that.searchConfig();
+			await that.search();
+		},
+		methods: {
+			searchConfig() {
+				const that = this;
+				try {
+					const res = uni.getStorageSync('config');
+					if (res) that.$set(that, `config`, res);
+				} catch (e) {}
+			},
+			// 查询
+			async search() {
+				const that = this;
+				if (that.id) {
+					let res = await that.$api(`/patient/${that.id}`, 'GET', {})
+					if (res.errcode == '0') {
+						that.$set(that, `user`, res.data)
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none'
+						});
+					}
+				}
+			},
+			// 预览图片
+			toImage(e) {
+				uni.previewImage({
+					urls: [e]
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.main {
+		.one {
+			display: flex;
+			justify-content: center;
+			padding: 2vw;
+
+			.image {
+				width: 25vw;
+				height: 25vw;
+				border-radius: 5px;
+			}
+		}
+
+		.two {
+			padding: 2vw;
+
+			.two_1 {
+				display: flex;
+				justify-content: space-between;
+				padding: 4vw;
+				border-bottom: 1px solid var(--f9Color);
+				font-size: var(--font14Size);
+				color: var(--f69Color);
+
+				.right {
+					text-align: right;
+					width: 60vw;
+
+					.image {
+						width: 20vw;
+						height: 20vw;
+						border-radius: 5px;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 1 - 1
pagesMy/person/index.vue

@@ -154,7 +154,7 @@
 				const that = this;
 				uni.showModal({
 					title: '提示',
-					content: `您确定${item.name}用户退出群聊吗?`,
+					content: `您确定${item.name}用户退出群聊吗?`,
 					success: async function(res) {
 						if (res.confirm) {
 							that.groupInfo.patients = taht.patientsList.filter(i => i != item._id)

文件差异内容过多而无法显示
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


文件差异内容过多而无法显示
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/person/detail.js.map


文件差异内容过多而无法显示
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/person/index.js.map


文件差异内容过多而无法显示
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/person/person.js.map


+ 1 - 0
unpackage/dist/dev/mp-weixin/app.json

@@ -27,6 +27,7 @@
         "basic/index",
         "group/index",
         "person/index",
+        "person/detail",
         "answer/index"
       ]
     }

+ 5 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -7799,6 +7799,11 @@ var _default = {
         "navigationBarTitleText": "群成员",
         "enablePullDownRefresh": true
       }
+    }, {
+      "path": "person/detail",
+      "style": {
+        "navigationBarTitleText": "用户详情"
+      }
     }, {
       "path": "answer/index",
       "style": {

文件差异内容过多而无法显示
+ 343 - 0
unpackage/dist/dev/mp-weixin/pagesMy/person/detail.js


+ 4 - 0
unpackage/dist/dev/mp-weixin/pagesMy/person/detail.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "用户详情",
+  "usingComponents": {}
+}

文件差异内容过多而无法显示
+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesMy/person/detail.wxml


+ 34 - 0
unpackage/dist/dev/mp-weixin/pagesMy/person/detail.wxss

@@ -0,0 +1,34 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.main .one.data-v-74927324 {
+  display: flex;
+  justify-content: center;
+  padding: 2vw;
+}
+.main .one .image.data-v-74927324 {
+  width: 25vw;
+  height: 25vw;
+  border-radius: 5px;
+}
+.main .two.data-v-74927324 {
+  padding: 2vw;
+}
+.main .two .two_1.data-v-74927324 {
+  display: flex;
+  justify-content: space-between;
+  padding: 4vw;
+  border-bottom: 1px solid var(--f9Color);
+  font-size: var(--font14Size);
+  color: var(--f69Color);
+}
+.main .two .two_1 .right.data-v-74927324 {
+  text-align: right;
+  width: 60vw;
+}
+.main .two .two_1 .right .image.data-v-74927324 {
+  width: 20vw;
+  height: 20vw;
+  border-radius: 5px;
+}
+

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesMy/person/index.js

@@ -390,7 +390,7 @@ var _default = {
       var that = this;
       uni.showModal({
         title: '提示',
-        content: "\u60A8\u786E\u5B9A\u8BE5".concat(item.name, "\u7528\u6237\u9000\u51FA\u7FA4\u804A\u5417?"),
+        content: "\u60A8\u786E\u5B9A\u5C06".concat(item.name, "\u7528\u6237\u9000\u51FA\u7FA4\u804A\u5417?"),
         success: function () {
           var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(res) {
             var _res;

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesMy/person/person.js

@@ -0,0 +1 @@
+Component({})

+ 3 - 0
unpackage/dist/dev/mp-weixin/pagesMy/person/person.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "用户详情"
+}