zhengkaixin 2 years ago
parent
commit
93ddd129a3
2 changed files with 63 additions and 67 deletions
  1. 1 1
      src/utils/request.js
  2. 62 66
      src/views-oa/Document/Browse.vue

+ 1 - 1
src/utils/request.js

@@ -56,7 +56,7 @@ store.commit('SET_API_TYPE', baseApiList[apiTypeIndex]);
 var BACKEND_URL = baseApiList[apiTypeIndex];
 
 if (process.env.VUE_APP_NODE_NAME == 'devlopment') {			
-	//baseApiList = ['http://192.168.77.162:8086/jp-housekeeper-server/']
+	//BACKEND_URL = 'http://192.168.77.162:8086/jp-housekeeper-server/'
 	//baseApiList = ['http://127.0.0.1:8086/jp-housekeeper-server/']
 	BACKEND_URL="http://192.168.33.220:8086/jp-housekeeper-server/";
 }

+ 62 - 66
src/views-oa/Document/Browse.vue

@@ -14,8 +14,8 @@
 						 
 						<input 
 						style="  width: 70%;"
-						v-model="listForm.name" @keyup.enter="reloadSearchList" type="search" placeholder="请输入文件名称搜索">
-						<span style="  width: 25%;font-size: 12px;">{{queryName}}<span class="mui-icon mui-icon-arrowdown" style="font-size: 10px;
+						v-model="listForm.fileName" @keyup.enter="reloadSearchList" type="search" placeholder="请输入文件名称搜索">
+						<span style="  width: 25%;font-size: 12px;"  @click="selectType" >{{queryName}}<span class="mui-icon mui-icon-arrowdown" style="font-size: 10px;
 							width: 10px;  border: 0px;"></span></span>
 
 						<span class="mui-icon mui-icon-search" style="border: 0px;margin-top: -16px;margin-left: -3px;"></span>
@@ -33,7 +33,7 @@
 						<div class="mui-scroll-wrapper vongi-over-hei"  style="margin-top: 10px;" >
 							<div class="mui-scroll">
 								<form class="mui-input-group ">
-									<div v-for="(item,index) in recordList" :key="'s0_'+item.id" class="mui-input-row  mui-left">
+									<div v-for="(item,index) in recordList" :key="'s0_'+item.id" class="mui-input-row  mui-left"  @click="downitem(item)"  >
 										
 										<div class="doclist  ">
 												
@@ -71,6 +71,8 @@
 </template>
 
 <script>
+	require('@/assets/js/mui.picker.min.js');
+	
 	import * as API from '@/apis/Oa/doc'
 	import Common from '@/components/Common.vue'
 	import Loading from '@/components/Loading.vue'
@@ -94,11 +96,34 @@
 				pageTitle: '公文浏览',
 
 				isLoading: false,
-				queryName:"上传时间",
+				queryName:"↓上传时间",
+				typeList:[{
+					value:"↓上传时间",
+					text:"↓上传时间",
+					orderSort:2,
+					orderType:1
+				},{
+					value:"↑上传时间",
+					text:"↑上传时间",
+					orderSort:2,
+					orderType:2
+				},{
+					value:"↓文件名称",
+					text:"↓文件名称",
+					orderSort:1,
+					orderType:1
+				},{
+					value:"↑文件名称",
+					text:"↑文件名称",
+					orderSort:1,
+					orderType:2
+				},],
 				listForm: {
 					pageIndex: 1,
 					pageSize: 20,
 					totalPage: 1,
+					orderSort:2,
+					orderType:1
 				},
 				recordList: [],
 				selectIdList: [],
@@ -118,6 +143,35 @@
 
 		},
 		methods: {
+			downitem(item){
+				
+				window.location.href=item.fileUrl
+			},
+			reloadSearchList(){
+				this.listForm.pageIndex=1
+				this.recordList=[]
+				this.getList();
+			},
+			selectType() {
+				var picker = new mui.PopPicker();
+			
+				picker.setData(this.typeList);
+				picker.pickers[0].setSelectedValue(this.queryName, 200);
+
+				var _this = this;
+				picker.show(function(selectItems) {
+					var key=selectItems[0]
+					
+					_this.listForm.orderSort = selectItems[0].orderSort;
+					
+					_this.listForm.orderType = selectItems[0].orderType;
+					_this.queryName= selectItems[0].text;
+					_this.listForm.pageIndex=1
+					_this.recordList=[]
+					_this.getList();
+					
+				})
+			},
 			//获取列表
 			getList() {
 				this.isLoading = true;
@@ -181,56 +235,8 @@
 				}
 			},
 			 
-			//选择所有
-			selectAll() {
-				if (this.allSelect.length) {
-					this.selectIdList = [];
-				} else {
-					var selectIdList = [];
-					this.recordList.forEach(function(item, index) {
-						selectIdList.push(item.id);
-					})
-					this.selectIdList = selectIdList;
-				}
-			},
-			//显示内容表单
-			openFrom(status) {
-				if (!this.selectIdList.length) {
-					mui.toast('请选择要处理的信息');
-				} else {
-					this.subForm.status = status;
-					this.subForm.content = status == 1 ? '同意' : '拒绝';
-					this.openFromVisible = true;
-					//直接点击处理,不需要弹窗理由框,又需要弹窗理由框了
-					//this.doAction();
-				}
-			},
-			//检测表单
-			checkForm() {
-				if (!this.subForm.ids) {
-					mui.toast('请选择要处理的信息');
-					return false;
-				} else {
-					return true;
-				}
-			},
-			//同意拒绝
-			doAction() {
-				this.subForm.ids = this.selectIdList.join(',');
-				if (this.checkForm()) {
-					this.isLoading = true;
-					API_Attendance.doVerify(this.subForm).then(response => {
-						this.isLoading = false;
-
-						this.openFromVisible = false;
-						this.listForm.pageIndex = 1;
-						this.getList();
-					}).catch(error => {
-						this.isLoading = false;
-						mui.toast(error);
-					})
-				}
-			},
+			 
+			 
 			asynCallBack() {
 
 			},
@@ -255,18 +261,10 @@
 		watch: {
 			 
 		},
-		//keepalive监控判断
-		beforeRouteLeave(to, from, next) {
-			console.log(to.name);
-			if (['MasterAttendanceVerifyInfo'].indexOf(to.name) > -1) {
-				this.$store.commit('SET_KEEP_ALIVE_COMPONENTS', ['MasterAttendanceVerifyList'])
-			} else {
-				this.$store.commit('SET_KEEP_ALIVE_COMPONENTS', [])
-			}
-			next()
-		},
+		
 	}
 </script>
+<style src="@/assets/css/mui.picker.min.css"></style>
 
 <style scoped src="@/assets/css/xpwyfyy.css"></style>
 <style src="@/assets/css/iconfont.css"></style>
@@ -274,8 +272,6 @@
 	.doclist img{
 		width: 45px !important;
 		height: 40px !important;
-		
-		
 		background-color: #fff;
 	}
 	.doclist {