lvxinghai 4 سال پیش
والد
کامیت
13ae034e8f

+ 36 - 0
components/tm-no-data/tm-no-data.vue

@@ -0,0 +1,36 @@
+<template>
+	<view class="no-data">
+		<image src="../../static/no-data.png"></image>
+		<text v-for="(text, index) in textArr" :key="index">{{text}}</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		},
+		props: ['textArr']
+	}
+</script>
+
+<style lang="less">
+	.no-data {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		width: 100%;
+		height: 100%;
+		font-size: 22.5rpx;
+		line-height: 33.75rpx;
+		color: #828899;
+		>image {
+			margin-bottom: 35rpx;
+			width: 176.87rpx;
+			height: 200.62rpx;
+		}
+	}
+</style>

+ 8 - 8
pages/checkList/checkList.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="check-map-list">
+	<scroll-view scroll-y="true" class="check-map-list">
 		<tm-top-menu>
 			<view class="top-menu"  @click="showModalHandle(!showModal)">
 				<text>第{{checkIndex}}/{{planList.length}}次查核</text>
@@ -35,7 +35,8 @@
 				<text>{{item.completeDes}}</text>
 			</view>
 		</view>
-		<view class="null" v-if="depList.length === 0">暂无数据</view>
+		<tm-no-data v-if="depList.length === 0"
+			:textArr="['暂时没有内容可以展示哦', '请返回上一页面或尝试刷新页面']" />
 		<tm-modal v-show="showModal" v-on:click="showModalHandle(false)">
 			<scroll-view scroll-y="true" class="content-list">
 				<view class="list-item" 
@@ -57,7 +58,7 @@
 				</view>
 			</scroll-view>
 		</tm-modal>
-	</view>
+	</scroll-view>
 </template>
 
 <script>
@@ -103,7 +104,9 @@
 			getDepList: function() {
 				this.dispatch('depList', {checkId: this.checkId}).then((data)=>{
 					if(data) {
-						this.depList = data;
+						this.depList = data.sort((a,b)=> {
+							if(a.sort && b.sort) return a.sort - b.sort;
+						});
 						this.showModalHandle(false);
 					}
 				});
@@ -128,6 +131,7 @@
 	.check-map-list {
 		padding: 25rpx;
 		padding-top: 75rpx;
+		height: 100%;
 		.top-menu {
 			overflow: hidden;
 			display: flex;
@@ -175,10 +179,6 @@
 			color: #666E80;
 		}
 	}
-	.null {
-		text-align: center;
-		color: #999;
-	}
 	.content-list {
 		padding-top: 50rpx;
 		width: 100%;

+ 2 - 2
pages/creatingSituations/components/checkMapDetail.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="check-map-detail">
+	<scroll-view scroll-y="true" class="check-map-detail">
 		<view class="item" v-for="(item, index) in checkMap.actionItem.pointList" :key="index">
 			<view class="icon-wrap" @click="openChildren(item.id)">
 				<image :src="`../../static/list-${openItems.includes(item.id)
@@ -21,7 +21,7 @@
 		</view>
 		<tm-simple-btn-group :options="botmBtnGroup"
 			v-on:callback="btnClick" ></tm-simple-btn-group>
-	</view>
+	</scroll-view>
 </template>
 
 <script>

+ 3 - 0
pages/creatingSituations/components/utils.js

@@ -137,6 +137,9 @@ export const editCheckMap = ({checkDep}) =>{
 				...item,
 				status: 'normal'
 			}
+		}).sort((a,b)=>{
+			if(a.sort && b.sort)
+				return a.sort - b.sort;
 		}), // 列表数据
 		actionItem: {id: '', pointList: []}, // 当前操作的列表项
 		deptList: [], // 新增单位数据

+ 7 - 3
pages/creatingSituations/creatingSituations.vue

@@ -171,9 +171,7 @@
 				this.dispatch(`save${this.saveType}`, data).then((data)=>{
 					if(data) {
 						// 保存成功先清空数据
-						this.myCommit('stepActive', 0);
-						this.myCommit('theme', {id: null, title: null, des: null});
-						this.myCommit('editConfig', null);
+						this.clearData();
 						uni.navigateTo({
 							url: '/pages/situationsCenter/situationsCenter'
 						});
@@ -262,6 +260,12 @@
 			dispatch: function(key, data) {
 				return this.$store.dispatch({type: 'creatingSituations/commActions', key, data});
 			},
+			clearData:function() {
+				this.$store.commit({type: 'creatingSituations/setInit'});
+			},
+		},
+		destroyed() {
+			this.clearData();
 		},
 		components: {
 			checkMapDetail,

+ 45 - 40
pages/creatingSituations/model.js

@@ -1,52 +1,57 @@
 import { commServer } from './server.js';
 import {dateHandle} from "../../utils/dateHandle.js";
 	
+const initState = {
+	showCheckMapDetail: false,
+	showCheckMapAdd: false,
+	showCheckPlan1: true,
+	needReload: true, // 切换页面是否需要获取新数据
+	stepActive: 0, // 步骤进度
+	theme: {id: null, title: null, des: null}, // 主题选中数据(id: 0个案 1系统)
+	condition: { // 条件页面数据
+		options: [], // 树形节点数据
+		conditionIds: [], // 选中的key
+		depType: 1, // 门急诊类型 1-门诊 2-急诊
+		defaultOpen: [], // 默认展开的项
+	},
+	checkRent: { // 查核组页面数据
+		list: [],
+		checkedItem: {id: null}
+	},
+	checkMap: { // 查核地图数据
+		list: [], // 列表数据
+		actionItem: {id: '', pointList: []}, // 当前操作的列表项
+		deptList: [], // 新增单位数据
+	},
+	checkPlan: { // 查核计划
+		checkedItem: {id: 'month', value: 2, label: '每月', model: 30}, // 选中的取模方式对象
+		dateObj: { // 保存开始日期结束日期的对象
+			start: dateHandle.todayDate(),
+			end: '',
+			dayNum: 0 // 两个日期间隔的天数
+		}, 
+		checkList: [], // 核查计划数组
+	},
+	situationPreview: { // 预览
+		sitName: null,
+		description: null,
+		preDay: null,
+		preH: null,
+		startDay: null
+	},
+	editConfig: null // 编辑时候的原始数据
+};
+
 export default {
   namespaced: true,
-  state: {
-		showCheckMapDetail: false,
-		showCheckMapAdd: false,
-		showCheckPlan1: true,
-		needReload: true, // 切换页面是否需要获取新数据
-		stepActive: 0, // 步骤进度
-		theme: {id: null, title: null, des: null}, // 主题选中数据(id: 0个案 1系统)
-		condition: { // 条件页面数据
-			options: [], // 树形节点数据
-			conditionIds: [], // 选中的key
-			depType: 1, // 门急诊类型 1-门诊 2-急诊
-			defaultOpen: [], // 默认展开的项
-		},
-		checkRent: { // 查核组页面数据
-			list: [],
-			checkedItem: {id: null}
-		},
-		checkMap: { // 查核地图数据
-			list: [], // 列表数据
-			actionItem: {id: '', pointList: []}, // 当前操作的列表项
-			deptList: [], // 新增单位数据
-		},
-		checkPlan: { // 查核计划
-			checkedItem: {id: 'month', value: 2, label: '每月', model: 30}, // 选中的取模方式对象
-			dateObj: { // 保存开始日期结束日期的对象
-				start: dateHandle.todayDate(),
-				end: '',
-				dayNum: 0 // 两个日期间隔的天数
-			}, 
-			checkList: [], // 核查计划数组
-		},
-		situationPreview: { // 预览
-			sitName: null,
-			description: null,
-			preDay: null,
-			preH: null,
-			startDay: null
-		},
-		editConfig: null // 编辑时候的原始数据
-  },
+  state: initState,
   mutations: {
 		comChangeState(state, {key, data}) {
 			state[key] = data;
 		},
+		setInit(state) {
+			state = initState
+		}
   },
   actions: {
 		commActions({ commit, state }, { key, data }) {

+ 15 - 0
pages/home/home.vue

@@ -50,6 +50,10 @@
 		<view class="logout-box" @click="logOut">
 			<text class="logout-text">退出登录</text>
 		</view>
+		<view class="copyright">
+			<text>浙江新医智联信息科技有限公司</text>
+			<text>0.5.1</text>
+		</view>
 		<tm-tabbar :permission="nowPermission" />
 	</view>
 </template>
@@ -319,5 +323,16 @@
 				margin-left: 330rpx;
 			}
 		}
+		.copyright {
+			position: absolute;
+			bottom: 90rpx;
+			left: 0;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			width: 100%;
+			color: #666E80;
+		}
 	}
 </style>

+ 4 - 1
pages/mission/mission.vue

@@ -12,7 +12,10 @@
 				:key="item.id"
 				:task="item"
 			/>
-			<view class="completed-box">
+			<tm-no-data v-show="improvingTaskList.length === 0 && !showCloseList"
+				:textArr="['目前没有任务需要处理']" />
+			<view class="completed-box" 
+				:style="{marginTop: improvingTaskList.length === 0 && !showCloseList ? '-50rpx' : 0}">
 				<view class="btn-box" >
 					<view class="btn" v-show="completeTaskList.length > 0" @click="toggleBtn">
 						<image class="icon" :src="`/static/${btnSetting.icon}.png`"></image>

+ 3 - 0
pages/situationsCenter/situationsCenter.vue

@@ -79,6 +79,8 @@
               <text class="text">{{ item.nextCheckTime }}</text>
             </view>
           </view>
+					<tm-no-data v-if="situationList.length === 0" 
+						:textArr="['还没有情境', '快点击右下方按钮新建一个吧']" />
         </view>
       </scroll-view>
     </view>
@@ -399,6 +401,7 @@ export default {
         display: flex;
         flex-flow: row wrap;
         padding-bottom: 25rpx;
+				height: 100%;
         .situation {
           height: 187.5rpx;
           width: 337.5rpx;

BIN
static/no-data.png


+ 2 - 2
utils/requestUrl.js

@@ -1,8 +1,8 @@
 // export const URL = 'http://192.168.38.140:8088'; // 李磊
 // export const URL = 'http://192.168.38.174:8088';
-export const URL = 'http://192.168.1.45:8088'; //内网
+// export const URL = 'http://192.168.1.45:8088'; //内网
 // export const URL = 'http://s1.nsloop.com:5137';  // 外网
-// export const URL = 'http://121.43.139.179:8801';  // 云端服务1
+export const URL = 'http://121.43.139.179:8801';  // 云端服务1
 // export const URL = 'http://172.18.116.20:8801';  // 云端服务2
 
 

+ 2 - 2
utils/wsUrl.js

@@ -1,3 +1,3 @@
-export const wsURL = `ws://192.168.1.45:8088/websocket/${hiId}/${user}/${permission}`; // 内网
-// export const wsURL = `ws://121.43.139.179:8801/websocket/${hiId}/${user}/${permission}`; // 云端服务1
+// export const wsURL = `ws://192.168.1.45:8088/websocket/${hiId}/${user}/${permission}`; // 内网
+export const wsURL = `ws://121.43.139.179:8801/websocket/${hiId}/${user}/${permission}`; // 云端服务1
 // export const wsURL = `ws://172.18.116.20:8801/websocket/${hiId}/${user}/${permission}`; // 云端服务2