浏览代码

Merge remote-tracking branch 'origin/master'

yin_yu820 1 年之前
父节点
当前提交
bdcbebda26

+ 0 - 1
jp-mobile/pages/fileTransmit/addFileTransmit.vue

@@ -309,7 +309,6 @@
 				this.inputForm.receivingTime = this.inputForm.receivingTime + " 00:00:00";
 				this.inputForm.cardNum = this.cardNum
 				this.$refs.inputForm.validate().then(valid => {
-					console.log("valid", valid);
 					if (valid) {
 						gwCirculationCard2Service.save(this.inputForm).then((data) => {
 

+ 20 - 3
jp-mobile/pages/fileTransmit/examineFile.vue

@@ -121,7 +121,7 @@
 				}
 				if (role == '办公室主任') {
 					this.isoffice = true
-					if(gw.length == 0) {
+					if (gw.length == 0) {
 						let gw1 = data.filter(item => {
 							return item.which == 0
 						})
@@ -131,6 +131,7 @@
 					}
 				}
 				if (role == '局领导' && gw.length > 0) this.isleader = true
+				if (role == '分管领导' && gw.length > 0) this.isleader = true
 				if (role == '科室负责人' && gw.length > 0) this.isundertake = true
 			})
 		},
@@ -237,9 +238,17 @@
 						type: 'success',
 						message: data,
 						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png',
-						url: "/pages/fileTransmit/fileTransmitList?type=1"
+
 					}
 					this.showToast(param);
+					setTimeout(() => {
+						uni.$emit('refresh', {
+							type: 1
+						})
+						uni.navigateBack({
+							delta: getCurrentPages().length - 1, // 返回上一页
+						})
+					}, 500)
 				}).catch(() => {
 					let param = {
 						type: 'error',
@@ -261,7 +270,15 @@
 						}
 						this.showToast(param);
 						setTimeout(() => {
-							uni.navigateTo({
+							uni.navigateBack({
+								delta: 1, // 返回上一页
+								success() {
+									const pages = getCurrentPages()
+									const prevPage = pages[pages.length - 2]
+									prevPage.onShow() // 刷新数据
+								}
+							})
+							uni.redirectTo({
 								url: 'pages/fileTransmit/fileTransmitList?type=3'
 							});
 						}, 500)

+ 2 - 2
jp-mobile/pages/fileTransmit/fileInfo.vue

@@ -5,10 +5,10 @@
 			<u-steps :current="current" direction="column" inactiveColor="#36a7f3" activeColor="#5fdf50">
 				<u-steps-item title="发起" desc="办公室管理员">
 				</u-steps-item>
-				<u-steps-item v-for="item in downList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':'承办情况'"
+				<u-steps-item v-for="item in downList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':'承办转发'"
 					:desc="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime">
 				</u-steps-item>
-				<u-steps-item v-for="item in gwList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':'承办情况'"
+				<u-steps-item v-for="item in gwList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':'承办转发'"
 					:desc="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime">
 				</u-steps-item>
 				<!-- <u-steps-item v-for="item in officeInfo" title="办公室拟办" :desc="item.nextTruename +' - '+item.updateTime">

+ 13 - 1
jp-mobile/pages/fileTransmit/fileTransmitList.vue

@@ -73,6 +73,19 @@
 				this.loadmore()
 			}
 		},
+		onShow() {
+			uni.$on('refresh',(data)=>{
+				this.dataList=[]
+				this.searchForm.state = data.type
+				this.tablePage.currentPage = 0
+				this.status = 'loading';
+				this.loadmore()
+			})
+			
+		},
+		onUnload() {
+			uni.$off('refresh');
+		},
 		data() {
 			return {
 				status: 'loadmore',
@@ -108,7 +121,6 @@
 		methods: {
 			// 查看详情
 			toInfo(item) {
-				console.log("item ===",this.type);
 				if (this.type == 3 || this.type == 5 || this.type == 4) {
 					uni.navigateTo({
 						url: '/pages/fileTransmit/fileInfo?id=' + item.id

+ 13 - 10
jp-mobile/pages/user/setting/signature/signature.vue

@@ -78,13 +78,16 @@
 				for (let i = 0; i < lists.length; i++) {
 					const result = await this.uploadFilePromise(lists[i])
 					let item = this.fileList[fileListLen]
+
 					this.fileList.splice(fileListLen, 1, Object.assign(item, {
 						status: 'success',
 						message: '',
 						url: result
 					}))
+					console.log("result", result);
 					fileListLen++
 				}
+
 			},
 			uploadFilePromise(url) {
 				return new Promise((resolve, reject) => {
@@ -98,7 +101,7 @@
 						formData: url,
 						success: (res) => {
 							setTimeout(() => {
-								resolve(res.data.data)
+								resolve(res.data)
 							}, 1000)
 						}
 					});
@@ -110,23 +113,23 @@
 				uni.showLoading()
 				let files = []
 				if (this.fileList.length > 0) {
-					this.fileLists.forEach(item => {
+					this.fileList.forEach(item => {
 						files.push(item.url)
 					})
 					this.inputForm.signPic = files.join(",");
+
 				}
 				userService.saveInfo(this.inputForm).then((data) => {
 					uni.showToast({
 						title: data,
-						icon: "success"
+						icon: "success",
+						complete: function(res) {
+							uni.redirectTo({
+								url: '/pages/index/index'
+							})
+						}
 					});
-					uni.clearStorage();
-					uni.reLaunch({
-						url: '/pages/login/login'
-					})
-					// }).catch((e) => {
-					// 	console.log(e)
-					// })
+
 				})
 			}
 		}