zhengkaixin 2 vuotta sitten
vanhempi
commit
da1a5bf62a

+ 7 - 0
src/apis/Oa/doc.js

@@ -47,6 +47,13 @@ export function pageList(data) {
 		method: 'post',
 	})
 }
+export function pageAllList(data) {
+	return request({
+		url: '/mobile/doc/pageAllList' ,
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
 
 export function skipStep(data) {
 	return request({

+ 9 - 0
src/router/oa.js

@@ -47,6 +47,15 @@ const routes = [
 						}
 					},
 					//列表文件
+					{
+						path: 'ListAll',
+						name: 'OaDocumentListAll',
+						component: () => import('../views-oa/Document/ListAll.vue'),
+						meta: {
+							title: '列表文件',
+						}
+					},
+					//列表文件
 					{
 						path: 'Browse',
 						name: 'OaDocumentBrowse',

+ 2 - 1
src/views-oa/Document/Info.vue

@@ -50,7 +50,7 @@
                 <span v-text="detail.createTime">2020-04-27 12:00:00</span>
             </div>
 
-			<div style="    text-align: center;    background-color: #fff; " v-if="detail.docStatus==0" >
+			<div style="    text-align: center;    background-color: #fff; " v-if="detail.docStatus==0&&person_data.id==detail.personId" >
 				<button type="button" class="btn1 mui-btn mui-btn-danger" @click="inforevoke"  >撤销审批</button>
 				
 			</div>
@@ -293,6 +293,7 @@ export default {
             }
         },
         ...mapGetters({
+			person_data: 'person_data',
             openId: 'wx_openid',
             token: 'token',
         })

+ 1 - 1
src/views-oa/Document/List.vue

@@ -15,7 +15,7 @@
 							
 							<li class="mui-table-view-cell"   >
 								<label>公文标题:</label>
-								<span>{{item.docTitle}}<span   class="mui-pull-right " :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
+								<span>{{item.docTitle}}<span  style=" min-width: 50px;" class="mui-pull-right " :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
 							</li>
 							<li class="mui-table-view-cell"  v-show="listForm.templateFlag==1" >
 								<label>模板标题:</label>

+ 228 - 0
src/views-oa/Document/ListAll.vue

@@ -0,0 +1,228 @@
+<template>
+	<div>
+
+		<common @asynCallBack="asynCallBack"></common>
+		<top-header :pageTitle="pageTitle" :routeName="'Master'"  :rightLink="rightLink" :doRightLink="doRightLink"  ></top-header>
+
+		
+			<div class="mui-content margin60">
+				<p style="text-align: center;"  v-show="listForm.templateFlag==1&&recordList.length"  >模板选择最多10条,请不要过度添加</p>
+				<template v-for="item in recordList">
+				
+					<div class="mui-content-padded" style="margin: 12px 12px !important;" >
+			
+						<ul class="mui-table-view fyy-view" @click="detail(item.id)">
+							
+							<li class="mui-table-view-cell"   >
+								<label style=" width: 70px;">公文标题:</label>
+								<span>{{item.docTitle}}<span style=" min-width: 50px;"  class="mui-pull-right " :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
+							</li>
+							
+							<li class="mui-table-view-cell" >
+								<label  style=" width: 70px;">提报人员:</label>
+								<span>{{item.personName}}</span>
+							</li>
+							<li class="mui-table-view-cell" >
+								<label  style=" width: 70px;">公文类型:</label>
+								<span>{{item.typeName}}</span>
+							</li>
+							<li class="mui-table-view-cell"  >
+								<label  style=" width: 70px;">提交时间:</label>
+								<span>{{item.createTime}}</span>
+							</li>
+						
+			
+						</ul>
+			
+					</div>
+			
+				</template>
+		
+			
+			</div>
+			
+			
+		
+		<NullList :remark="'暂无提报公文记录'" v-if="!recordList.length"></NullList>
+
+
+		<loading :visible="isLoading"></loading>
+
+	</div>
+</template>
+
+
+<script>
+	import * as API from '@/apis/Oa/doc'
+	import Common from '@/components/Common.vue'
+	import Loading from '@/components/Loading.vue'
+	import TopHeader from '@/components/TopHeader.vue'
+	import isReachBottom from '@/utils/isReachBottom'
+	import NullList from '@/components/NullList.vue'
+
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+	export default {
+		name: 'OaDocumentList',
+		components: {
+			Common,
+			Loading,
+			TopHeader,
+			NullList
+		},
+		data() {
+			return {
+				pageTitle: '公文总览',
+
+				isLoading: false,
+
+				listForm: {
+					pageIndex: 1,
+					pageSize: 20,
+					//	token: '',
+					totalPage: 1,
+					result: 0,
+				},
+				recordList: [],
+				status: ['待审核', '已通过', '未通过', '已撤销'],
+				statusColor: ['classFF8400', 'class389E0D', 'classFF6666','classA5A5A5'],
+				
+				rightLink: {
+					show: false,
+					//icon: 'icon-tongji',
+					style: 'font-size:14px',
+					title: '我的模板'
+				},
+
+			}
+		},
+		created() {
+			//this.listForm.openId = this.openId;
+			//this.listForm.result = this.$route.query.result != null ? this.$route.query.result : 0;
+		},
+		methods: {
+			doRightLink() {
+				
+				// if(this.listForm.templateFlag==1){
+				// 	this.listForm.templateFlag=null
+				// 	this.rightLink.title="我的模板"
+				// }else{
+				// 	this.listForm.templateFlag=1;
+				// 	this.rightLink.title="返回列表"
+				// }
+				// this.listForm.pageIndex=1;
+				// this.getList()
+				this.$router.push({
+					name: 'OaDocumentListTemplate',
+				
+				})
+				
+			},
+			//info
+			detail(id) {
+				this.$router.push({
+					name: 'OaDocumentInfo',
+					query: {
+						id: id
+					}
+				})
+			},
+			save() {
+				this.$router.push({
+					name: 'OaDocumentForm',
+					query: {
+
+					}
+				})
+			},
+			//获取列表
+			getList() {
+				this.isLoading = true;
+				API.pageAllList(this.listForm).then(response => {
+					if (response) {
+						if (this.listForm.pageIndex == 1) {
+							this.recordList = response.data;
+							this.listForm.pageIndex = response.pageNumber;
+							this.listForm.totalPage = response.totalPage;
+						} else {
+							this.recordList = [
+								...this.recordList,
+								...response.data
+							];
+						}
+					}
+					if(this.recordList.length==0){
+						this.rightLink.show=false;
+					}
+					this.listForm.pageIndex++;
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
+			//下拉事件
+			handleScrool() {
+				if (isReachBottom()) {
+					console.log('到达底部')
+					if (this.listForm.pageIndex <= this.listForm.totalPage && this.isLoading == false) {
+						this.getList();
+					} else {
+						return;
+					}
+				}
+			},
+
+			asynCallBack() {
+
+			},
+		},
+		mounted() {
+			this.getList();
+			//监控下拉加载事件
+			var _this = this;
+			window.addEventListener('scroll', _this.handleScrool);
+		},
+		destroyed() {
+			//销毁监听事件
+			var _this = this;
+			window.removeEventListener('scroll', _this.handleScrool);
+		},
+		computed: {
+			...mapGetters({
+				openId: 'wx_openid',
+				token: 'token',
+			})
+		},
+		//keepalive监控判断
+		beforeRouteLeave(to, from, next) {
+			console.log(to.name);
+			if (['OaDocumentInfo'].indexOf(to.name) > -1) {
+				this.$store.commit('SET_KEEP_ALIVE_COMPONENTS', ['MasterAttendanceLeaveList'])
+			} else {
+				this.$store.commit('SET_KEEP_ALIVE_COMPONENTS', [])
+			}
+			next()
+		},
+	}
+</script>
+
+<style scoped src="@/assets/css/xpwyfyy-oa.css"></style>
+<style src="@/assets/css/iconfont.css"></style>
+
+<style scoped >
+	.classFF8400 {
+		color: #FF8400 ;
+	}
+	.class389E0D  {
+		color: #389E0D  ;
+	}
+	.classFF6666  {
+		color: #FF6666  ;
+	}
+	.classA5A5A5  {
+		color: #A5A5A5  ;
+	}
+</style>

+ 1 - 1
src/views-oa/Document/VerifyList.vue

@@ -31,7 +31,7 @@
 											<ul class="mui-table-view fyy-view" @click="detail(item.id)">
 												<li class="mui-table-view-cell" >
 													<label>公文标题:</label>
-													<span>{{item.docTitle}}<span class="mui-pull-right " :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
+													<span>{{item.docTitle}}<span class="mui-pull-right "  style=" min-width: 50px;" :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
 												</li>
 												<li class="mui-table-view-cell" >
 													<label>公文类型:</label>

+ 1 - 1
src/views-oa/Document/ViewList.vue

@@ -22,7 +22,7 @@
 											<ul class="mui-table-view fyy-view" @click="detail(item.id)">
 												<li class="mui-table-view-cell" >
 													<label>公文标题:</label>
-													<span>{{item.docTitle}}<span class="mui-pull-right " :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
+													<span>{{item.docTitle}}<span class="mui-pull-right "    style=" min-width: 50px;" :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
 												</li>
 												<li class="mui-table-view-cell" >
 													<label>公文类型:</label>