LuChongMei 1 anno fa
parent
commit
e992716b79

+ 1 - 1
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/controller/GwCirculationCard2Controller.java

@@ -81,7 +81,7 @@ public class GwCirculationCard2Controller {
 	 */
 	@ApiLog("查询公文流转列表数据(含待办筛选)")
 	@ApiOperation(value = "查询公文流转列表数据(含待办筛选)")
-	@PreAuthorize("hasAuthority('circulation2:gwCirculationCard2:list')")
+//	@PreAuthorize("hasAuthority('circulation2:gwCirculationCard2:list')")
 	@GetMapping("list2")
 	public ResponseEntity<IPage<GwCirculationCard2DTO>> list2(GwCirculationCard2DTO gwCirculationCard2DTO, Page<GwCirculationCard2> page) throws Exception {
 		//除   管理员、办公室管理员  之外的角色需要判断是否涉及自己流程

+ 88 - 35
jp-mobile/pages/fileTransmit/fileTransmitList.vue

@@ -1,15 +1,15 @@
 <template>
 	<view class="file_list_page">
 		<view class="list_search card_banner flex">
-			<uni-data-select class="list_search_select" v-model="value" :localdata="range" @change="change"
+			<uni-data-select class="list_search_select" v-model="searchForm.sendingAgency" :localdata="range"
 				placeholder="发文部门"></uni-data-select>
-			<uni-datetime-picker class="list_search_date" v-model="time" type="daterange" @maskClick="maskClick" />
-			<u-icon class="list_search_icon" name="search" color="#fff" size="28"></u-icon>
+			<uni-datetime-picker class="list_search_date" v-model="searchForm.createTime" type="daterange" />
+			<u-icon class="list_search_icon" name="search" color="#fff" size="28" @click="doSearch"></u-icon>
 		</view>
-		<view class="list_content" >
+		<view class="list_content">
 			<u-cell-group>
-				<u-cell v-for="item in dataList" >
-					<view slot="title" >
+				<u-cell v-for="item in dataList">
+					<view slot="title">
 						<view class="text-bold text-black">
 							<view class="ellipsis-description">
 								{{item.contentSummary}}
@@ -18,7 +18,7 @@
 					</view>
 					<view slot="value">
 						<view class="text-grey text-sm  list_label margin-top">
-							{{item.receivingTime}}
+							{{item.createTime}}
 						</view>
 					</view>
 					<view slot="label">
@@ -33,50 +33,96 @@
 </template>
 
 <script>
-		import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
+	import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
 	export default {
 		onLoad(option) {
-			if(option){
+			if (option) {
 				this.type = option.type
-				gwCirculationCard2Service.list({
-					
-				}).then(data =>{
-					console.log("list=============",data);
-					this.dataList = data.records
-
-				})
+				this.searchForm.state = option.type
+				this.loadmore()
 			}
 		},
 		data() {
 			return {
-				type:"",
-				time:"",
-				value:"",
-				range: [{
-						value: 0,
-						text: "篮球"
-					},
-					{
-						value: 1,
-						text: "足球"
-					},
-					{
-						value: 2,
-						text: "游泳"
-					},
-				],
+				status: 'loadmore',
+				type: "",
+				time: "",
+				value: "",
+				range: [],
 				dataList: [],
+				searchForm: {
+					yearNum: '',
+					cardNum: '',
+					sendingAgency: '',
+					docFontSize: '',
+					fileSource: '',
+					writtenTime: '',
+					receivingTime: '',
+					contentSummary: '',
+					state: '',
+					createTime: ""
+				},
 				tablePage: {
 					pages: 0,
 					currentPage: 0,
 					pageSize: 10,
-					orders: [{ column: "a.create_time", asc: false }],
+					orders: [{
+						column: "a.create_time",
+						asc: false
+					}],
 				},
 				loading: false,
 			}
 		},
-		methods:{
-			
+		methods: {
+			// 搜索
+			doSearch() {
+				console.log("search=============", this.searchForm);
+				this.dataList = [];
+				this.tablePage.currentPage = 0;
+				this.tablePage.pageSize = 10;
+				this.tablePage.pages = 0;
+				this.loadmore()
+			},
+			onReachBottom() {
+				this.loadmore()
+			},
+			loadmore() {
+				if (this.tablePage.currentPage !== 0 && this.tablePage.pages <= this.tablePage.currentPage) {
+					this.status = 'nomore';
+					return;
+				}
+				this.tablePage.currentPage = ++this.tablePage.currentPage;
+				//联网加载数据
+				this.status = 'loading';
+				gwCirculationCard2Service.list({
+					current: this.tablePage.currentPage,
+					size: this.tablePage.pageSize,
+					orders: this.tablePage.orders,
+					// beginCreateDate: this.searchForm.createDate ? this.searchForm.createDate[0] : '',
+					// endCreateDate: this.searchForm.createDate ? this.searchForm.createDate[1] : '',
+					...this.searchForm
+				}).then((data) => {
+					//追加新数据
+					this.dataList = this.dataList.concat(data.records);
+					let places = []
+					this.dataList.forEach(item => {
+						places.push({
+							text: item.sendingAgency,
+							value: item.sendingAgency
+						})
+					});
+					this.range = places.filter((item) => !places.includes(item.value) && places.push(item.value))
+
+					this.tablePage.pages = data.pages;
+					if (this.tablePage.pages <= this.tablePage.currentPage) {
+						this.status = 'nomore'
+					} else {
+						this.status = 'loadmore'
+					}
+				})
+
+			}
 		}
 
 	}
@@ -104,9 +150,16 @@
 	.list_search_date {
 		margin: 8px 5px 0;
 	}
+
+	.t-c {
+		height: 34px;
+		line-height: 34px;
+	}
+
 	.list_content {
 		background-color: #fff;
 	}
+
 	.list_label {
 		margin-top: 33px;
 	}