|
|
@@ -1,7 +1,9 @@
|
|
|
<template>
|
|
|
<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"
|
|
|
+ <en-input :label="'文件密码'"
|
|
|
+ v-model="msgData.password" type="digit" placeholder="文件有密码必填"></en-input>
|
|
|
+ <textarea class="sys-from-background-color r-20 textarea p-20 m-t20" 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="">
|
|
|
@@ -19,7 +21,7 @@
|
|
|
<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()">
|
|
|
+ <view class="sys-from-background-color row-c p-20 r-20" @click.stop="uploadingWord()" v-if="is_multifile===true || msgData.file_list.length<1">
|
|
|
<image class="wh-80 m-r20" src="/page_subpack/static/img/task-details/add-file.png"
|
|
|
mode="aspectFill">
|
|
|
</image>
|
|
|
@@ -38,16 +40,22 @@
|
|
|
<script>
|
|
|
import tools from "@/service/tools";
|
|
|
import txUploadFile from "@/service/txOssSts";
|
|
|
- import {
|
|
|
- addTransferPdf
|
|
|
- } from "@/api/transfer";
|
|
|
+ import {
|
|
|
+ addTransferPdf, cancelPassword
|
|
|
+ } from "@/api/transfer";
|
|
|
+ import EnInput from "@/components/en-from/en-input/en-input.vue";
|
|
|
|
|
|
export default {
|
|
|
+ components: {EnInput},
|
|
|
props: {
|
|
|
is_button: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
+ is_multifile: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ },
|
|
|
placeholder: {
|
|
|
default: '留个言吧~~'
|
|
|
}
|
|
|
@@ -58,6 +66,7 @@
|
|
|
msgData: {
|
|
|
business_id: '',
|
|
|
msg: '',
|
|
|
+ password: '',
|
|
|
reply_id: 0,
|
|
|
msg_img: [],
|
|
|
file_list: [],
|
|
|
@@ -68,25 +77,43 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
-
|
|
|
+ cancelPassword(){
|
|
|
+ cancelPassword(this.msgData).then(res=>{
|
|
|
+ if(res.code===1){
|
|
|
+ this.msgData.file_list=res.data
|
|
|
+ this.addTransferPdf()
|
|
|
+ }else {
|
|
|
+ tools.error(res.msg)
|
|
|
+ this.isAjax = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
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;
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
+ if(this.msgData.password!==''){
|
|
|
+ this.cancelPassword()
|
|
|
+ }else {
|
|
|
+ this.addTransferPdf()
|
|
|
+ }
|
|
|
},
|
|
|
+ addTransferPdf(){
|
|
|
+ addTransferPdf(this.msgData).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ tools.success(res.msg)
|
|
|
+ this.$emit('newMsg')
|
|
|
+ this.msgData.msg = ''
|
|
|
+ this.msgData.password = ''
|
|
|
+ this.msgData.file_list = []
|
|
|
+ } else {
|
|
|
+ tools.error(res.msg)
|
|
|
+
|
|
|
+ }
|
|
|
+ this.isAjax = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
delFile(fileIndex) {
|
|
|
this.msgData.file_list.splice(fileIndex, 1)
|
|
|
this.fileNum = -1
|
|
|
@@ -230,4 +257,4 @@
|
|
|
display: inline-block;
|
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|