Преглед на файлове

style:修改征信报告页面样式

443166679@qq.com преди 1 година
родител
ревизия
71cc720cc5
променени са 3 файла, в които са добавени 310 реда и са изтрити 291 реда
  1. 26 25
      common/system_popup/system_popup.vue
  2. 224 218
      page_subpack/transition/components/add-file.vue
  3. 60 48
      page_subpack/transition/components/credit-item.vue

+ 26 - 25
common/system_popup/system_popup.vue

@@ -57,27 +57,28 @@
 			return {
 				topNavHeight: null,
 				systemList: [{
-					icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-info.png",
-					name: '个人信息',
-					id: 1
-				}, {
-					icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-lock.png",
-					name: '修改密码',
-					id: 2
-				}, {
-					icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-phone.png",
-					name: '修改手机号',
-					id: 3
-				}, {
-					icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-phone.png",
-					name: '邀请二维码',
-					id: 4
-				},
-          {
-            icon: "/static/img/index/to_excel.png",
-            name: '转换工具',
-            id: 5
-          },]
+						icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-info.png",
+						name: '个人信息',
+						id: 1
+					}, {
+						icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-lock.png",
+						name: '修改密码',
+						id: 2
+					}, {
+						icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-phone.png",
+						name: '修改手机号',
+						id: 3
+					}, {
+						icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-phone.png",
+						name: '邀请二维码',
+						id: 4
+					},
+					{
+						icon: "/static/img/index/to_excel.png",
+						name: '转换工具',
+						id: 5
+					},
+				]
 			}
 		},
 		created() {
@@ -113,10 +114,10 @@
 					// 	url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
 					// })
 				} else if (item.id === 5) {
-          uni.navigateTo({
-          	url: `/page_subpack/transition/to_excel`
-          })
-        } else {
+					uni.navigateTo({
+						url: `/page_subpack/transition/to_excel`
+					})
+				} else {
 					uni.navigateTo({
 						url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
 					})

+ 224 - 218
page_subpack/transition/components/add-file.vue

@@ -1,227 +1,233 @@
 <template>
-  <view class="text-color-12">
-    <view class="p-30">
+	<view class="text-color-12">
+		<view class="p-30">
 			<textarea class="sys-from-background-color r-20 textarea p-20" name="" id="" cols="30" rows="10"
-                v-model="msgData.msg" :maxlength="999" :placeholder="placeholder"></textarea>
-      <view class="size-26 m-tb20 sys-weight-600">上传附件</view>
-      <view class="">
-        <view class="sys-from-background-color row-justify-sb center p-20 m-b16 r-20"
-              v-for="(file,fileIndex) in msgData.file_list" :key="fileIndex">
-          <view class="row-c">
-            <image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-pdf.png"
-                   v-if="file.file_type===1" mode="aspectFill"></image>
-            <image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-word.png"
-                   v-else-if="file.file_type===2" mode="aspectFill"> </image>
-            <image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-excel.png" v-else
-                   mode="aspectFill"> </image>
-            <text class="size-24 text-color-666"> {{file.name}}</text>
-          </view>
-          <image class="delete-iocn wh-25" src="/page_subpack/static/img/task-details/hint-subtract.png"
-                 @click.stop="delFile(fileIndex)" mode=""></image>
-        </view>
-        <view class="sys-from-background-color row-c p-20 r-20" @click.stop="uploadingWord()">
-          <image class="wh-80 m-r20" src="/page_subpack/static/img/task-details/add-file.png" mode="aspectFill">
-          </image>
-          <view class="column">
-            <text class="select-file size-24">选择文件</text>
-            <text class="size-24 text-color-666">支持上传文件:pdf</text>
-          </view>
-        </view>
-      </view>
-    </view>
-    <EnButton  @onSubmit="clickBut"></EnButton>
-
-  </view>
+				v-model="msgData.msg" :maxlength="999" :placeholder="placeholder"></textarea>
+			<view class="size-26 m-tb20 sys-weight-600">上传附件</view>
+			<view class="">
+				<view class="sys-from-background-color row-justify-sb center p-20 m-b16 r-20"
+					v-for="(file,fileIndex) in msgData.file_list" :key="fileIndex">
+					<view class="row-c">
+						<image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-pdf.png"
+							v-if="file.file_type===1" mode="aspectFill"></image>
+						<image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-word.png"
+							v-else-if="file.file_type===2" mode="aspectFill"> </image>
+						<image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-excel.png" v-else
+							mode="aspectFill"> </image>
+						<view class="size-24 text-color-666 ellipsis" style="max-width: 500rpx;"> {{file.name}}</view>
+					</view>
+					<image class="delete-iocn wh-25" src="/page_subpack/static/img/task-details/hint-subtract.png"
+						@click.stop="delFile(fileIndex)" mode=""></image>
+				</view>
+				<view class="sys-from-background-color row-c p-20 r-20" @click.stop="uploadingWord()">
+					<image class="wh-80 m-r20" src="/page_subpack/static/img/task-details/add-file.png"
+						mode="aspectFill">
+					</image>
+					<view class="column">
+						<text class="select-file size-24">选择文件</text>
+						<text class="size-24 text-color-666">支持上传文件:pdf</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<EnButton @onSubmit="clickBut"></EnButton>
+
+	</view>
 </template>
 
 <script>
-import tools from "@/service/tools";
-import txUploadFile from "@/service/txOssSts";
-import {addTransferPdf} from "@/api/transfer";
-
-export default {
-  props: {
-    is_button: {
-      type: Boolean,
-      default: false
-    },
-    placeholder: {
-      default: '留个言吧~~'
-    }
-
-  },
-  data() {
-    return {
-      msgData: {
-        business_id: '',
-        msg: '',
-        reply_id: 0,
-        msg_img: [],
-        file_list: [],
-      },
-      videoUrl:'',
-      isAjax: false,
-    }
-  },
-
-  methods: {
-
-
-    clickBut() {
-      if (this.isAjax) {
-        return;
-      }
-      addTransferPdf(this.msgData).then((res) => {
-        if (res.code === 1) {
-          tools.success(res.msg)
-          this.$emit('newMsg')
-          this.msgData.msg=''
-          this.msgData.file_list=[]
-        } else {
-          tools.error(res.msg)
-          this.isAjax = false;
-        }
-
-      })
-    },
-    delFile(fileIndex) {
-      this.msgData.file_list.splice(fileIndex, 1)
-      this.fileNum = -1
-    },
-
-    uploadingWord() {
-      tools.showLoading()
-      wx.chooseMessageFile({
-        count: 5, //默认100
-        type: 'file', //默认100
-        extension: ['pdf'],
-        success: (res) => {
-          console.log('---------------------------------------------');
-          console.log(res);
-          if (res.tempFiles.length > 0) {
-            res.tempFiles.forEach((tempFilePath) => {
-              console.log(tempFilePath)
-              txUploadFile(tempFilePath.path).then((data) => {
-                if (!data) {
-                  tools.error('上传失败')
-                } else {
-                  console.log({
-                    'name': tempFilePath.name,
-                    'file_type': tools.getFileType(data
-                        .Location),
-                    'url': data.Location
-                  })
-                  this.msgData.file_list.push({
-                    'name': tempFilePath.name,
-                    'file_type': tools.getFileType(data .Location),
-                    'url': data.Location
-                  })
-                }
-              })
-            })
-           tools.hideLoading()
-          } else {
-            tools.error("请选择上传文件")
-            tools.hideLoading()
-          }
-        },
-        fail: (e) => {
-          tools.hideLoading()
-        }
-      });
-
-    },
-
-  }
-}
+	import tools from "@/service/tools";
+	import txUploadFile from "@/service/txOssSts";
+	import {
+		addTransferPdf
+	} from "@/api/transfer";
+
+	export default {
+		props: {
+			is_button: {
+				type: Boolean,
+				default: false
+			},
+			placeholder: {
+				default: '留个言吧~~'
+			}
+
+		},
+		data() {
+			return {
+				msgData: {
+					business_id: '',
+					msg: '',
+					reply_id: 0,
+					msg_img: [],
+					file_list: [],
+				},
+				videoUrl: '',
+				isAjax: false,
+			}
+		},
+
+		methods: {
+
+
+			clickBut() {
+				if (this.isAjax) {
+					return;
+				}
+				addTransferPdf(this.msgData).then((res) => {
+					if (res.code === 1) {
+						tools.success(res.msg)
+						this.$emit('newMsg')
+						this.msgData.msg = ''
+						this.msgData.file_list = []
+					} else {
+						tools.error(res.msg)
+						this.isAjax = false;
+					}
+
+				})
+			},
+			delFile(fileIndex) {
+				this.msgData.file_list.splice(fileIndex, 1)
+				this.fileNum = -1
+			},
+
+			uploadingWord() {
+				tools.showLoading()
+				wx.chooseMessageFile({
+					count: 5, //默认100
+					type: 'file', //默认100
+					extension: ['pdf'],
+					success: (res) => {
+						console.log('---------------------------------------------');
+						console.log(res);
+						if (res.tempFiles.length > 0) {
+							res.tempFiles.forEach((tempFilePath) => {
+								console.log(tempFilePath)
+								txUploadFile(tempFilePath.path).then((data) => {
+									if (!data) {
+										tools.error('上传失败')
+									} else {
+										console.log({
+											'name': tempFilePath.name,
+											'file_type': tools.getFileType(data
+												.Location),
+											'url': data.Location
+										})
+										this.msgData.file_list.push({
+											'name': tempFilePath.name,
+											'file_type': tools.getFileType(data
+												.Location),
+											'url': data.Location
+										})
+									}
+								})
+							})
+							tools.hideLoading()
+						} else {
+							tools.error("请选择上传文件")
+							tools.hideLoading()
+						}
+					},
+					fail: (e) => {
+						tools.hideLoading()
+					}
+				});
+
+			},
+
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
-.nav {
-  font-size: 18px;
-  font-weight: bold;
-  text-align: center;
-  padding: 30rpx 0 15rpx;
-  background: #fff;
-}
-.textarea {
-  width: calc(100% - 40rpx);
-  max-height: 100rpx;
-}
-
-.popup-block {
-  border-radius: 20rpx 20rpx 0rpx 0rpx;
-  overflow: hidden;
-  background-color: #f5f5f5;
-
-  .popup-row {
-    height: 100rpx;
-    background-color: #fff;
-    text-align: center;
-    line-height: 100rpx;
-    border-bottom: 2rpx solid #f5f5f5;
-
-    &:nth-child(4) {
-      margin-bottom: 20rpx;
-    }
-
-    &:last-child {
-      height: 112rpx;
-      border: none;
-      line-height: 112rpx;
-    }
-
-    &:active {
-      background-color: rgb(244, 244, 244);
-    }
-  }
-}
-
-.image-content {
-  display: flex;
-  flex-wrap: wrap;
-
-  .image-box {
-    position: relative;
-
-    .image-item {
-      width: 130rpx;
-      height: 130rpx;
-      border-radius: 10rpx;
-    }
-
-    .video-icon {
-      position: absolute;
-      top: 50%;
-      left: 50%;
-      transform: translate(-50%, -50%);
-    }
-
-    .delete-iocn {
-      position: absolute;
-      right: -10rpx;
-      top: -10rpx;
-    }
-  }
-
-  .add-image {
-    width: 128rpx;
-    height: 128rpx;
-    border-radius: 10rpx;
-    background: #F7F9FE;
-    border: 1rpx dashed #999999;
-  }
-}
-
-.select-file {
-  width: 132rpx;
-  height: 44rpx;
-  background: #FFFFFF;
-  border-radius: 6rpx;
-  border: 1rpx solid #DDDDDD;
-  line-height: 44rpx;
-  text-align: center;
-  display: inline-block;
-  margin-bottom: 10rpx;
-}
+	.nav {
+		font-size: 18px;
+		font-weight: bold;
+		text-align: center;
+		padding: 30rpx 0 15rpx;
+		background: #fff;
+	}
+
+	.textarea {
+		width: calc(100% - 40rpx);
+		max-height: 100rpx;
+		font-size: 28rpx;
+	}
+
+	.popup-block {
+		border-radius: 20rpx 20rpx 0rpx 0rpx;
+		overflow: hidden;
+		background-color: #f5f5f5;
+
+		.popup-row {
+			height: 100rpx;
+			background-color: #fff;
+			text-align: center;
+			line-height: 100rpx;
+			border-bottom: 2rpx solid #f5f5f5;
+
+			&:nth-child(4) {
+				margin-bottom: 20rpx;
+			}
+
+			&:last-child {
+				height: 112rpx;
+				border: none;
+				line-height: 112rpx;
+			}
+
+			&:active {
+				background-color: rgb(244, 244, 244);
+			}
+		}
+	}
+
+	.image-content {
+		display: flex;
+		flex-wrap: wrap;
+
+		.image-box {
+			position: relative;
+
+			.image-item {
+				width: 130rpx;
+				height: 130rpx;
+				border-radius: 10rpx;
+			}
+
+			.video-icon {
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				transform: translate(-50%, -50%);
+			}
+
+			.delete-iocn {
+				position: absolute;
+				right: -10rpx;
+				top: -10rpx;
+			}
+		}
+
+		.add-image {
+			width: 128rpx;
+			height: 128rpx;
+			border-radius: 10rpx;
+			background: #F7F9FE;
+			border: 1rpx dashed #999999;
+		}
+	}
+
+	.select-file {
+		width: 132rpx;
+		height: 44rpx;
+		background: #FFFFFF;
+		border-radius: 6rpx;
+		border: 1rpx solid #DDDDDD;
+		line-height: 44rpx;
+		text-align: center;
+		display: inline-block;
+		margin-bottom: 10rpx;
+	}
 </style>

+ 60 - 48
page_subpack/transition/components/credit-item.vue

@@ -1,70 +1,72 @@
 <template>
-	<view class="p-lr20 p-b40 animate__animated animate__fadeIn">
-		<view class="sys-background-fff r-30 text-color-12 p-20 m-t20" v-for="(item,index) in list" :key="index">
-			<view class="row-justify-sb center">
-				<view class="row-c line-30">
-					<text class="size-30 sys-weight-600">{{item.file_name}}</text>
-<!--					<image class="wh-30 m-lr16" src="/static/img/task/task-phone.png" mode="aspectFill"></image>-->
-<!--					<text class="size-26">{{item.task_sn}}</text>-->
+	<view class="animate__animated animate__fadeIn">
+		<view class="p-lr20 p-b40" v-if="list.length>0">
+			<view class="sys-background-fff r-30 text-color-12 p-20 m-b20" v-for="(item,index) in list" :key="index">
+				<view class="row-justify-sb center">
+					<view class="size-30 sys-weight-600 credit-file-name ellipsis">{{item.file_name}}</view>
+					<image v-if="item.status>=2" class="credit-file-icon"
+						:src="'/page_subpack/static/img/task-details/icon-'+item.status+'.png'" mode="aspectFill">
+					</image>
 				</view>
-				<image v-if="item.status>=2" class="wh-80" :src="'/page_subpack/static/img/task-details/icon-'+item.status+'.png'" mode="aspectFill"></image>
-			</view>
-			<view class="sys-from-background-color size-24 text-color-666 p-20 r-20 m-tb20">
-				<view>
-					<text>任务编号:</text>
-					<text>{{item.task_sn}}</text>
+				<view class="sys-from-background-color size-24 text-color-666 p-20 r-20 m-tb20">
+					<view>
+						<text>任务编号:</text>
+						<text>{{item.task_sn}}</text>
+					</view>
+					<view class="m-t10">
+						<text>备注:</text>
+						<text> {{item.msg?item.msg:'无'}}</text>
+					</view>
 				</view>
-				<view class="m-t10">
-					<text>备注:</text>
-					<text> {{item.msg?item.msg:'无'}}</text>
+				<view class="row-justify-sb center">
+					<text class="size-24 text-color-999 flex">{{item.created_at}}上传</text>
+					<button class="credit-item-button sys-weight-500 size-28" type="default" hover-class="is-hover"
+						v-if="item.status === 3" @click="downPdf(item)">下载</button>
 				</view>
 			</view>
-			<view class="row-justify-sb center">
-				<text class="size-24 text-color-999 flex">{{item.created_at}}上传</text>
-				<button class="credit-item-button sys-weight-500 size-28" type="default" hover-class="is-hover"  v-if="item.status === 3"
-					@click="downPdf(item)">下载</button>
-			</view>
 		</view>
-    <en-blank v-if="list.length<=0"></en-blank>
+		<en-blank v-if="list.length<=0"></en-blank>
 	</view>
 </template>
 
 <script>
 	import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
 
-  export default {
-    components: {EnBlank},
+	export default {
+		components: {
+			EnBlank
+		},
 		props: {
-      list:{
-        default:[]
-      }
+			list: {
+				default: []
+			}
 		},
 		data() {
 			return {
 
 			}
 		},
-    methods: {
-      downPdf(item) {
-        uni.downloadFile({
-          url: item.file_url,
-          success: function (res) {
-            let filePath = res.tempFilePath;
-            uni.openDocument({
-              filePath: filePath,
-              fileType: 'xlsx',
-              showMenu: true,
-              success: function (res) {
-                console.log('打开文档成功');
-              }
-            });
-            // wx.shareFileMessage({
-            //
-            // })
-          }
-        });
-      },
-    },
+		methods: {
+			downPdf(item) {
+				uni.downloadFile({
+					url: item.file_url,
+					success: function(res) {
+						let filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							fileType: 'xlsx',
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+						// wx.shareFileMessage({
+						//
+						// })
+					}
+				});
+			},
+		},
 	}
 </script>
 
@@ -77,6 +79,16 @@
 		border-radius: 100rpx;
 	}
 
+	.credit-file-icon {
+		width: 93rpx;
+		height: 80rpx;
+		display: block;
+	}
+
+	.credit-file-name {
+		max-width: 500rpx;
+	}
+
 	button::after {
 		border: none;
 	}