소스 검색

调整图片上传组件ip为动态

xieyunhui 3 년 전
부모
커밋
ddb8793419

+ 11 - 5
components/tm-upload-img/tm-upload-img.vue

@@ -25,7 +25,8 @@
 	 * props:属性说明看tm-radio-gruop.vue
 	 */
 
-	import uploadImage from "../../utils/uploadImg.js";
+	import uploadImage from "../../utils/uploadImg.js";
+	import {URL} from '../../utils/requestUrl.js';
 	export default {
 		props: {
 			// 上传的图片路径列表
@@ -61,21 +62,26 @@
 		methods: {
 			// 上传图片
 			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 => {
+						uploadImage(res1).then(fileList => {
+						    console.log({fileList,res1});
+							const _fileList = fileList.map(t=>`http://${IP}${t}`);
 							if (this.isMultiple) {
 									this.$emit('changeFilePaths',{
-										  files:[...this.filePaths, ...fileList],
+										  files:[...this.filePaths, ..._fileList],
 										  index:this.pickIndex
 									});
 							} else {
 								this.$emit('changeFilePaths',{
-									  files:fileList,
+									  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 {

+ 4 - 1
pages/checkList/checkList.vue

@@ -71,7 +71,10 @@
 				showModal: false,
 				planList: [],
 				checkId: '',
-				depList: []
+				depList: [],
+				searchKey:'',
+				ifSearchMod:false
+				
 			};
 		},
 		computed: {

+ 1 - 1
pages/login/login.vue

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

+ 12 - 17
pages/mainPointsDetail/mainPointsDetail.vue

@@ -484,8 +484,11 @@
 							this.recordList[0].seeResult = res.checkResultRequestList[0].checkResultDescribe;
 							this.checkedSelectResultListIds = tempIds;
 							this.checkedSelectResultList = res.checkResultRequestList[0].checkResultDescribe.split(
-								',');
-							this.checkedSelectResultListData = tempResult;
+								',');
+								
+							this.checkedSelectResultListData = tempResult;
+							
+							console.log({tempResult});
 							// this.selectedScore = tempScore;
 
 						}
@@ -620,7 +623,7 @@
 								   	let params = {
 								   		id: this.data.id,
 								   		checkResult: this.data.checkResult,
-								   		checkResultRequestList: [],
+								   		checkResultRequestList:[],
 								   		checkItemScore: this.checkItemScore,
 								   		value: this.checkItemValue,
 								   		situationType: this.situationType,
@@ -628,8 +631,9 @@
 								   		score: this.currentScore,
 								   		deductPoint: this.deductPoint,
 								   	};
-								   					     
-								   					     
+									
+									console.log({params});
+										   					     				     
 								   	if (this.data.checkModelName == "访谈") {
 								   		let list = [];
 								   		for (let i = 0; i < this.talkList.length; i++) {
@@ -651,23 +655,14 @@
 								   		}
 								   		params.checkResultRequestList = list;
 								   	} else {
-								   		let list = [];
-								   		let path = "";
-								   		for (let j = 0; j < this.recordList[0].filePath.length; j++) {
-								   			if (j == 0) {
-								   				path += `${this.recordList[0].filePath[j]}`;
-								   			} else {
-								   				path += `,${this.recordList[0].filePath[j]}`;
-								   			}
-								   		}
+								   		
 								   		let item = {
 								   			checkResultId: 1,
 								   			checkResultDescribe: this.recordList[0].seeResult,
-								   			checkResultUrl: path,
+								   			checkResultUrl: this.filePath.join(','),
 								   		};
 								   					     
-								   		list.push(item);
-								   		params.checkResultRequestList = list;
+								   		params.checkResultRequestList = [item];
 								   	}
 								   	const checkConfiglist = JSON.parse(JSON.stringify(this.checkConfiglist));
 								

+ 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 - 3
utils/requestUrl.js

@@ -8,10 +8,10 @@
  */
 // const base = '192.168.51.80:8801/imed/pfm/';
 
-// export const URL = '192.168.51.80:8801/imed/pfm/'; // 本地
-export const URL = '112.124.59.133:8802/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 = '118.31.245.65:8111/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/';  // 外网