Переглянути джерело

Merge branch 'master' of ssh://1582597470426922.onaliyun.com@s1.nsloop.com:29418/web_TracerMethodology

yuwenfen 4 роки тому
батько
коміт
6e44f2a725

+ 2 - 2
components/tm-tabbar/tm-tabbar.vue

@@ -54,12 +54,12 @@
 						text: '配置', 
 						iconPath: '/static/tabbar/setting-unselect.png', 
 						selectedIconPath: '/static/tabbar/setting-select.png', 
-						pagePath: 'pages/index/index'
+						pagePath: 'pages/configure/configure'
 					},{
 						text: '我的', 
 						iconPath: '/static/tabbar/my-unselect.png', 
 						selectedIconPath: '/static/tabbar/my-select.png', 
-						pagePath: 'pages/index/index'
+						pagePath: 'pages/home/home'
 					},{
 						text: '日历', 
 						iconPath: '/static/tabbar/calendar-unselect.png', 

+ 20 - 4
pages.json

@@ -23,6 +23,13 @@
 				"enablePullDownRefresh": false
 			}
 		},
+		{
+			"path": "pages/configure/configure",
+			"style": {
+				"navigationBarTitleText": "配置",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path": "pages/mission-details/mission-details",
 			"style": {
@@ -31,13 +38,22 @@
 			}
 		},
 		{
-			"path" : "pages/mission-action/mission-action",
+			"path": "pages/mission-action/mission-action",
 			"style": {
-				 "navigationBarTitleText": "改善任务",
-				 "enablePullDownRefresh": false
+				"navigationBarTitleText": "改善任务",
+				"enablePullDownRefresh": false
 			}
 		}
-  ],
+	    ,{
+            "path" : "pages/home/home",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "个人中心",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"globalStyle": {
 		"navigationStyle": "custom",
 		"navigationBarTextStyle": "black",

+ 185 - 0
pages/configure/configure.vue

@@ -0,0 +1,185 @@
+<template>
+  <view class="configure-page">
+    <view class="greyTitle">
+      <text>为结果选项配置后续操作</text>
+      <text class="recovery" @click="recoveryList">恢复初始配置</text>
+    </view>
+    <view class="configureCont">
+      <view
+        v-for="(item, index) in resultConfigList"
+        :key="index"
+        class="configure-cont"
+        @click="changeIndex(index)"
+      >
+        <view class="contTitle">{{ item.name }}</view>
+        <view class="contCon">
+          <tm-radio-group
+            :list="configList"
+            label=""
+            :defaultValue="item.resultType"
+            @change="changeSelect"
+            :setting="{
+              value: 'value',
+              name: 'label',
+            }"
+          />
+        </view>
+      </view>
+    </view>
+    <view class="sure-button">
+      <button @click="sureList">保存</button>
+    </view>
+    <tm-tabbar :permission="1" />
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      resultConfigList: [],
+      configList: [
+        {
+          value: 1,
+          label: "无需操作",
+        },
+        {
+          value: 2,
+          label: "需改善回复",
+        },
+        {
+          value: 3,
+          label: "需使用改善工具",
+        },
+      ],
+      showPopup: false,
+      radioVal: null,
+      index: null,
+	  timer:null,
+    };
+  },
+  created() {
+    this.getResultConfig();
+  },
+  methods: {
+    //获取最新配置
+    getResultConfig() {
+      this.$store.dispatch({
+          type: "configure/commActions",
+          payload: {
+            key: "getResultConfig",
+          },
+        })
+        .then((res) => {
+          this.resultConfigList = res ? res : [];
+        });
+    },
+    //恢复最初配置
+    recoveryList() {
+      this.$store.dispatch({
+          type: "configure/commActions",
+          payload: {
+            key: "getDefault",
+          },
+        })
+        .then((res) => {
+          this.resultConfigList = res ? res : [];
+        });
+    },
+    //保存配置
+    sureList() {
+      this.$store.dispatch({
+          type: "configure/commActions",
+          payload: {
+            key: "postResultConfig",
+            data: {
+              list: this.resultConfigList,
+            },
+          },
+        })
+        .then(() => {
+          this.getResultConfig();
+		  clearTimeout(this.timer)
+        });
+    },
+    showConfig() {
+      uni.navigateTo({
+        url: "/pages/configure-detail/detail",
+      });
+    },
+    changeSelect(selectVal, selectData, i) {
+      this.timer = setTimeout(() => {
+        this.resultConfigList[this.index].resultType = selectVal;
+      }, 0);
+    },
+    changeIndex(index) {
+      this.index = index;
+    },
+  },
+  components: {},
+};
+</script>
+
+<style lang="less">
+.configure-page {
+  height: 100%;
+  background-color: #f5f6fa;
+  .greyTitle {
+    padding: 0rpx 25rpx;
+    height: 105rpx;
+    line-height: 105rpx;
+    font-size: 30rpx;
+    color: #292c33;
+    .recovery {
+      float: right;
+      text-align: center;
+      color: #7a8599;
+      font-size: 22.5rpx;
+    }
+  }
+  .configureCont {
+    height: calc(100vh - 280rpx);
+    overflow-y: auto;
+  }
+  .configure-cont {
+    font-size: 22.5rpx;
+    border-bottom: 0.62rpx solid #dadee6;
+    background-color: #fff;
+    .contTitle {
+      padding: 25rpx 0rpx 15rpx 25rpx;
+      font-size: 22.5rpx;
+      color: #666f80;
+      background-color: #f5f6fa;
+    }
+    .contCon {
+      padding-left: 25rpx;
+      color: #292c33;
+    }
+    .moreImg {
+      margin-top: 31.23rpx;
+      margin-right: 18.68rpx;
+      padding: 1.89rpx 6.31rpx;
+      float: right;
+      width: 12.37rpx;
+      height: 21.21rpx;
+    }
+  }
+  .configure-cont:nth-child(6) {
+    border-bottom: none;
+  }
+  .sure-button {
+    width: 100%;
+    position: fixed;
+    bottom: 100rpx;
+    button {
+      width: 625rpx;
+      height: 62.5rpx;
+      line-height: 62.5rpx;
+      border-radius: 37.5rpx;
+      background-color: #3377ff;
+      color: #fff;
+      font-size: 22.5rpx;
+    }
+  }
+}
+</style>

+ 29 - 0
pages/configure/model.js

@@ -0,0 +1,29 @@
+import { commServer } from './server.js';
+
+export default {
+  namespaced: true,
+  state: {
+    // baseInfo: 'test',
+    // // 包含院区,病区, 床号
+    // patParams: {
+    //   hiId: '1',
+    //   wardDm: '-10022',
+    //   bedNo: '201'
+    // }
+  },
+  mutations: {
+  //   changeBaseInfo(state, { baseInfo }) {
+  //     state.baseInfo = baseInfo;
+  //   },
+  //   // 修改第三方应用传递的参数
+  //   changePatParams(state, { patParams }) {
+  //     state.patParams = patParams;
+  //   },
+  },
+  actions: {
+    commActions({ commit, state }, { payload }) {
+	  // payload = {key,data} // data是请求数据,key是请求接口id
+      return commServer(payload);
+	},
+  }
+}

+ 25 - 0
pages/configure/server.js

@@ -0,0 +1,25 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+	// 保存配置
+	postResultConfig: {
+		method: 'POST',
+		url: 'imed/pfm/resultConfig'
+	},
+	//最新配置
+	getResultConfig:{
+		method: 'GET',
+		url: 'imed/pfm/resultConfig'
+	},
+	//默认配置列表
+	getDefault:{
+		method: 'GET',
+		url: 'imed/pfm/resultConfig/default'
+	}
+	
+};
+
+export const commServer = ({ key, data }) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 147 - 0
pages/home/home.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="home-page">
+		<view class="content-info">
+			<view class="top-box">
+				<image class="bgpic" src="/static/images/个人中心背景.png"></image>
+			</view>
+			<view class="avatar-box">
+				<image class="avatar" src="/static/images/小哥哥.png"></image>
+			</view>
+			<view class="info-box">
+				<text class="">
+					毛之易
+				</text>
+			</view>
+			<view class="function-box">
+				<view class="role-switch">
+					<text class="func-text">角色切换</text>
+					<image class="msgbubble" src="/static/images/消息气泡.png"></image>
+					<image class="icon-more" src="/static/images/icon更多.png"></image>
+					<text class="role">管理员</text>
+				</view>			
+				<view class="sys-setting">
+					<text class="func-text">系统设置</text>
+					<image class="icon-more" src="/static/images/icon更多.png"></image>
+				</view>
+			</view>
+			<view class="bg-box">
+				<view class="logout-box">
+					<text class=""></text>
+				</view>
+			</view>
+		</view>
+		<tm-tabbar :permission="1" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				nowPermission:'',//用户当前第一权限
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="less">
+	.top-box{
+		position: relative;
+		height: 350rpx;
+	}
+	.bgpic{
+		width: 750rpx;
+		height: 350rpx;
+	}
+	.info-box{
+		width: 700rpx;
+		height: 250rpx;
+		border-radius: 15rpx;
+		background-color: #FFFFFF;
+		position: absolute;
+		left: 25rpx;
+		right: 25rpx;
+		top: 226.25rpx;
+		box-shadow: 0px 10px 30px 0px rgba(0, 13, 51, 0.1);
+	}
+	.avatar-box{
+		width: 125rpx;
+		height: 125rpx;
+		position: absolute;
+		right: 75rpx;
+		top: 187.5rpx;
+		background: #FFFFFF;
+		z-index: 2;
+		border-radius:50%
+	}
+	.avatar{
+		width: 112.5rpx;
+		height: 112.5rpx;
+		margin-left: 6.25rpx;
+		margin-top: 6.25rpx;
+		border-radius:50%
+	}
+	.function-box{
+		position: absolute;
+		top: 496.25rpx;
+		width: 750rpx;
+	}
+	.role-switch{
+		height: 100rpx;
+		width: 725rpx;
+		margin-left: 25rpx;
+		background: #FFFFFF;
+		border-bottom: 0.62rpx solid #DADEE6;
+	}
+	.sys-setting{
+		height: 100rpx;
+		width: 725rpx;
+		margin-left: 25rpx;
+		background: #FFFFFF;
+	}
+	.func-text{
+		font-size: 22.5rpx;
+		font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+		font-weight: 500;
+		color: #292C33;
+		line-height: 100rpx;
+		float: left;
+	}
+	.icon-more{
+		width: 12.37rpx;
+		height: 21.21rpx;
+		line-height: 100rpx;
+		float: right;
+		margin-top: 39.37rpx;
+		margin-right: 25rpx;
+	}
+	.msgbubble{
+		width: 50rpx;
+		height: 30rpx;
+		background: #FF4060;
+		border-radius: 24px;
+		float: left;
+		margin-top: 35rpx;
+		margin-left: 15rpx;
+	}
+	.bg-box{
+		width: 750rpx;
+		height: 416.25rpx;
+		position: absolute;
+		bottom: 87.5rpx;
+		background-color: #F5F6FA;
+		z-index: -1;
+	}
+	.role{
+		font-size: 22.5rpx;
+		font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+		font-weight: 400;
+		color: #7A8599;
+		line-height: 100rpx;
+		float: right;
+		margin-right: 25rpx;
+	}
+</style>

+ 53 - 46
pages/login/login.vue

@@ -1,8 +1,8 @@
 <template>
-	<view class="login-model">
+	<view class="login-page">
 		<view class="com-model">
 			<view class="top-box">
-				<image class="pic" src="/static/images/底纹.png"></image>
+				<image class="pic" src="/static/images/shade.png"></image>
 				<text class="title-top">你好,</text>
 				<text class="title-buttom">欢迎使用追踪方法学系统</text>
 			</view>
@@ -57,6 +57,8 @@
 						uni.setStorageSync('permissions', data.permissions);
 			      uni.setStorageSync('token', data.token);
 					  uni.setStorageSync('nowPermission', data.nowPermission);
+						uni.setStorageSync('id', data.id);
+						uni.setStorageSync('name', data.name);
 						this.rolToTarget(data.nowPermission)
 					}
 				});
@@ -84,48 +86,53 @@
 </script>
 
 <style lang="less" scoped>
- .pic{
-	 height: 281.25rpx;
-	 width: 430rpx;
-	 float: right;
- }
- .title-top{
-	 height: 45rpx;
-	 font-size: 45rpx;
-	 font-weight: bold;
-	 margin-top: 250rpx;
-	 margin-left: 62.5rpx;
-	 font-family: SourceHanSansCN-Bold, SourceHanSansCN;
-	 color: #2E2F33;
-	 float: left;
- }
- .title-buttom{
-	 height: 45rpx;
-	 font-size: 45rpx;
-	 font-family: SourceHanSansCN-Bold, SourceHanSansCN;
-	 font-weight: bold;
-	 color: #2E2F33;
-	 float: left;
-	 margin-left: 62.5rpx;
-	 margin-top: 40rpx;
- }
- .main-content{
-	 margin-top: 37.5rpx;
-	 float: left;
- }
- .uni-input-box{
-	 width: 625rpx;
-	 float: left;
-	 margin-left: 62.5rpx;
-	 margin-top: 62.5rpx;
-	 font-size: 30rpx;
-	 padding-bottom: 25rpx;
-	 border-bottom:1.25rpx solid #E6EAF2 ;
- }
- .login-button{
-	  float: left;
-	  margin-left: 62.5rpx;
-	  margin-top: 62.5rpx;
-	  background-color: #A3B1CC;
- }
+	.login-page {
+		height: 100%;
+		background-color: #FFFFFF;
+		
+		.pic{
+			 height: 281.25rpx;
+			 width: 430rpx;
+			 float: right;
+		}
+		.title-top{
+			 height: 45rpx;
+			 font-size: 45rpx;
+			 font-weight: bold;
+			 margin-top: 250rpx;
+			 margin-left: 62.5rpx;
+			 font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+			 color: #2E2F33;
+			 float: left;
+		}
+		.title-buttom{
+			 height: 45rpx;
+			 font-size: 45rpx;
+			 font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+			 font-weight: bold;
+			 color: #2E2F33;
+			 float: left;
+			 margin-left: 62.5rpx;
+			 margin-top: 40rpx;
+		}
+		.main-content{
+			 margin-top: 37.5rpx;
+			 float: left;
+		}
+		.uni-input-box{
+			 width: 625rpx;
+			 float: left;
+			 margin-left: 62.5rpx;
+			 margin-top: 62.5rpx;
+			 font-size: 30rpx;
+			 padding-bottom: 25rpx;
+			 border-bottom:1.25rpx solid #E6EAF2 ;
+		}
+		.login-button{
+			  float: left;
+			  margin-left: 62.5rpx;
+			  margin-top: 62.5rpx;
+			  background-color: #A3B1CC;
+		}
+	}
 </style>

+ 3 - 2
pages/model.js

@@ -1,5 +1,6 @@
 import login from './login/model.js';
-
+import configure from './configure/model.js';
 export default module = {
-  login
+  login,
+  configure,
 }

BIN
static/images/icon更多.png


BIN
static/images/个人中心背景.png


BIN
static/images/女生标识.png


BIN
static/images/小哥哥.png


BIN
static/images/小姐姐.png


BIN
static/images/消息气泡.png


BIN
static/images/男生.png


+ 23 - 0
yarn.lock

@@ -0,0 +1,23 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+crypto-js@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.npm.taobao.org/crypto-js/download/crypto-js-4.0.0.tgz#2904ab2677a9d042856a2ea2ef80de92e4a36dcc"
+  integrity sha1-KQSrJnep0EKFai6i74DekuSjbcw=
+
+moment@^2.29.1:
+  version "2.29.1"
+  resolved "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
+  integrity sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=
+
+qs@^6.9.6:
+  version "6.9.6"
+  resolved "https://registry.npm.taobao.org/qs/download/qs-6.9.6.tgz?cache=0&sync_timestamp=1610598111557&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee"
+  integrity sha1-Ju08gkOkMbKSSsqEzJBHHzXVoO4=
+
+vuex@^3.6.0:
+  version "3.6.2"
+  resolved "https://registry.npm.taobao.org/vuex/download/vuex-3.6.2.tgz?cache=0&sync_timestamp=1611672210051&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvuex%2Fdownload%2Fvuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71"
+  integrity sha1-I2vAhqhww655lG8QfxbeWdWJXnE=