Browse Source

调整查核列表筛选样式

xieyunhui 3 years ago
parent
commit
ed25418c44

+ 30 - 3
components/com-button/com-button.vue

@@ -1,7 +1,14 @@
 <template>
 	<view 
 	  :class="{'com-button': true, 'default': defaultClass }" 
-		:style="{width: btnWidth, height: btnHeight, borderRadius: btnRadius,background:background,marginBottom:btnMarginBottom}"
+		:style="{
+			width: btnWidth,
+			height: btnHeight,
+			borderRadius: btnRadius,
+			background:background,
+			marginBottom:btnMarginBottom,
+			marginRight:btnmarginRight
+			}"
 		 @click="btnClick">
 		<text class="btn-text" :style="{fontSize: fSize}">{{ btnText }}</text>
 	</view>
@@ -12,7 +19,7 @@
 		props:{
 	
 			width: { // 按钮宽度(直接写设计稿量取大小即可
-				type: Number,
+				type: Number|String,
 				default: () => {
 					return  160 
 				}
@@ -41,6 +48,12 @@
 					return  0 
 				}
 			},
+			marginRight:{
+				type: Number|String,
+				default: () => {
+					return  0 
+				}
+			},
 			type: {
 				type: String,
 				default: () => {
@@ -56,7 +69,12 @@
 		},
 		computed: {
 			btnWidth() {
-				return this.width * 750 / 1200 + 'rpx';
+				if(typeof this.width == 'number'){
+					  return this.width * 750 / 1200 + 'rpx';
+				}
+				if(typeof this.width == 'string'){
+					  return this.width;
+				}
 			},
 			btnHeight() {
 				return this.height * 750 / 1200 + 'rpx';
@@ -73,6 +91,15 @@
 			defaultClass() {
 				return this.type === 'default' ? true : false
 			},
+			btnmarginRight(){
+				if(typeof this.marginRight == 'number'){
+					  return this.marginRight * 750 / 1200 + 'rpx';
+				}
+				if(typeof this.marginRight == 'string'){
+					  return this.marginRight;
+				}
+				
+			},
 		},
 		data() {
 			return {

+ 28 - 15
components/tm-upload-img/tm-upload-img.vue

@@ -24,10 +24,14 @@
 	 * 2021.2.3
 	 * props:属性说明看tm-radio-gruop.vue
 	 */
-
-	import uploadImage from "../../utils/uploadImg.js";
+	import uploadImage from "../../utils/uploadImg.js";
+	// #ifdef APP
 	const pictureModule = uni.requireNativePlugin("Wlake-PictureView")
-	const modal = uni.requireNativePlugin('modal');
+	const modal = uni.requireNativePlugin('modal');
+	// #endif
+	
+	import {URL} from '../../utils/requestUrl.js';
+
 	export default {
 		props: {
 			// 上传的图片路径列表
@@ -62,6 +66,7 @@
 		},
 		methods: {
 			previewHandle(index) {
+				// #ifdef APP
 				console.log(this.filePaths[0],index);
 				const picList = this.filePaths;
 				pictureModule.PictureViewerMain({
@@ -73,26 +78,34 @@
 							message: ret,
 							duration: 1.5
 						});
-					});
+					});
+				// #endif
 			},
 			// 上传图片
 			uploadPicture() {
-				if (this.disabled) return;
+				if (this.disabled) return;
+
+				const URLParms = URL.split('/');
+				const IP = URLParms[0];
 				uni.chooseImage({
 					count: this.isMultiple ? 9 : 1, // 是否多选
 					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
 					// sourceType: ['camera'], //从相册选择,默认时可以选择从相机和相册中选取
 					success: res1 => {
-						uploadImage(res1).then(fileList => {
-							if (this.isMultiple) {
-								this.$emit('changeFilePaths', {
-									files: [...this.filePaths, ...fileList],
-									index: this.pickIndex
-								});
-							} else {
-								this.$emit('changeFilePaths', {
-									files: fileList,
-									index: this.pickIndex
+
+						uploadImage(res1).then(fileList => {
+							// const _fileList = fileList.map(t=>`http://${IP}${t}`);  //横店特殊处理
+							const _fileList = fileList;
+							
+							if (this.isMultiple) {
+									this.$emit('changeFilePaths',{
+										  files:[...this.filePaths, ..._fileList],
+										  index:this.pickIndex
+									});
+							} else {
+								this.$emit('changeFilePaths',{
+									  files:_fileList,
+									  index:this.pickIndex
 								});
 							}
 						})

+ 7 - 1
pages/batchDistribution/batchDistribution.vue

@@ -75,7 +75,13 @@
 		onLoad({
 			details
 		}) {
-			const _details = details ? JSON.parse(details) : {};
+			const _details = details ? JSON.parse(details) : {};
+			//初始化默认时间
+			const currentDate = new Date();
+			_details.startDate = `${currentDate.getFullYear()}-${currentDate.getMonth()+1}-${currentDate.getDate()} 00:00`;
+			_details.endDate = _details.planEndDate;
+			
+			
 			// 强制刷新返回查核列表页面
 			if (getCurrentPages().length === 1) {
 				const {

+ 16 - 12
pages/checkMainPoints/checkMainPoints.vue

@@ -57,13 +57,16 @@
 					</view>
 				</view>
 			</template>
-			<!-- 只有当查核者进入才展示 -->
-			<view class="rowTwo" v-if="nowPermission == 3||nowPermission == 1" :animation="animationData" v-for="(v,i) in btnArr">
-				<text class="rowTwoName">{{v.key}}</text>
-				<view class="filterBtnWrap">
-					<com-button v-for="(item, index) in v.list" :btnText="item.label" :width="350" :height="80" :marginBottom="20"
-						:type="setFilterBtnType(item.value,v.key)" v-on:btnClick="btnClick(item.value,v.key)" />
-				</view>
+			<!-- 只有当查核者进入才展示 -->
+			<view ref="rowTwoWraper">
+				  <view class="rowTwo"v-if="nowPermission == 3||nowPermission == 1" :animation="animationData" v-for="(v,i) in btnArr">
+				  	<text class="rowTwoName">{{v.key}}</text>
+				  	<view class="filterBtnWrap" :style="{paddingBottom:i==2?'20px':0}">
+				  		<com-button v-for="(item, index) in v.list" :btnText="item.label" :width="`${32}%`" :height="80" :marginBottom="20"
+				  		     :marginRight="(index+1)%3==0?0:`2%`"
+				  			:type="setFilterBtnType(item.value,v.key)" v-on:btnClick="btnClick(item.value,v.key)" />
+				  	</view>
+				  </view>
 			</view>
 
 		</tm-top-menu>
@@ -299,7 +302,7 @@
 			}
 			//创建动画实例
 			const animation = uni.createAnimation({
-				duration: 300,
+				duration: 100,
 				timingFunction: 'ease',
 			})
 
@@ -340,8 +343,8 @@
 					const _checkStatuses = checkStatuses.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value}));
 					const _others = others.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value}));
 					this.btnArr  = [
-						{key:'查核结果',list:_checkResults},
 						{key:'查核状态',list:_checkStatuses},
+						{key:'查核结果',list:_checkResults},
 						{key:'其他',list:_others},
 					];
 				})
@@ -483,11 +486,12 @@
 				}
 			},
 			openFilter() {
-				const status = this.ifOpenFilter;
+				const status = this.ifOpenFilter;
+				// console.log(this.$refs.rowTwoWraper.$el.offsetHeight)
 				if (!status) {
 					this.$refs.popup.open();
 					this.ifOpenFilter = true;
-					this.animation.height('15vh').step();
+					this.animation.height('100%').step();
 				} else {
 					this.$refs.popup.close();
 					this.ifOpenFilter = false;
@@ -948,7 +952,7 @@
 					display: flex;
 					flex-direction: row;
 					flex-wrap: wrap;
-					justify-content: space-between;
+					justify-content: flex-start;
 				}
 			}
 		}

+ 1 - 1
pages/login/login.vue

@@ -34,7 +34,7 @@
 		data() {
 			return {
 				index:0,
-				appHospSign:'IGlcn5nc4xBWc08C',//app端更新hospSign
+				appHospSign:'8CJYqxlGIdLEIwaG',//app端更新hospSign
 				showInputModal:false,
 				hospSign: '', // 医院标识
 				username: '', // 用户名

+ 6 - 4
pages/situationsCenter/situationsCenter.vue

@@ -40,7 +40,7 @@
         class="scroll-box"
         scroll-y="true"
         @scrolltolower="toLower"
-        lower-threshold="184"
+        lower-threshold="5"
       >
         <view class="content" :style="[situationList.length === 0 ?{height:'100%'}:{}]">
           <view
@@ -185,7 +185,7 @@ export default {
     searchByKeywords(event) {
       let data = {
         pageNum: 1,
-        pageSize: 15,
+        pageSize: 300,
         keyword: event.target.value,
       };
       this.getSituationList(data, (data) => {
@@ -207,17 +207,19 @@ export default {
       });
     },
     toLower() {
+	  console.log('toLower');
       uni.showToast({
         title: "加载中....",
         icon: "loading",
         duration: 2000,
       });
       let count = this.situationList.length;
+	  console.log(this.totalCount,count);
       if (this.totalCount != count) {
         this.page++;
         let data = {
           pageNum: this.page,
-          pageSize: 15,
+          pageSize: 300,
         };
         this.getSituationList(data, (data) => {
           this.createSituationList(data.list);
@@ -268,7 +270,7 @@ export default {
     initSituationList() {
       let data = {
         pageNum: 1,
-        pageSize: 15,
+        pageSize: 300,
       };
       this.getSituationList(data, (data) => {
         this.totalCount = data.totalCount;

+ 3 - 2
utils/requestUrl.js

@@ -8,10 +8,11 @@
  */
 // const base = '192.168.51.80:8801/imed/pfm/';
 
-// export const URL = '192.168.51.80:8801/imed/pfm/'; // 本地
+// export const URL = '192.168.50.190:8801/imed/pfm/'; // 本地
 export const URL = '112.124.59.133:8802/imed/pfm/'; //线上测试
 // export const URL = '118.31.245.65:8802/imed/pfm/';
-// export const URL = '192.168.200.56:8801/imed/pfm/'; //横店
+// export const URL = '192.168.200.56:8111/imed/pfm/'; //横店
+
 // export const URL = '192.168.1.253:8111/imed/pfm/';
 // export const URL = '192.168.1.45:8088/imed/pfm/'; //内网
 // export const URL = 's1.nsloop.com:5137/imed/pfm/';  // 外网