|
|
@@ -547,7 +547,7 @@
|
|
|
<!--<div slot="tip" class="el-upload__tip">大小为512KB-5MB</div>-->
|
|
|
<!--</el-upload>-->
|
|
|
<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach" :http-request="uploadrequest"
|
|
|
- class="attach-uploader" :before-upload="beforeAvatarUpload">
|
|
|
+ :on-remove="filremove" :file-list="fileList" class="attach-uploader" :before-upload="beforeAvatarUpload">
|
|
|
<i class="el-icon-plus attach-uploader-icon"></i>
|
|
|
<div slot="tip" class="el-upload__tip">大小为512KB-5MB</div>
|
|
|
</el-upload>
|
|
|
@@ -904,6 +904,7 @@
|
|
|
auditerOption: [], // 审批人
|
|
|
allorgunitOptions: [],
|
|
|
InOptions: [],
|
|
|
+ fileList: [],
|
|
|
orgtreeprops: {
|
|
|
value: 'Id',
|
|
|
label: 'CodeName',
|
|
|
@@ -2067,15 +2068,13 @@
|
|
|
fileurlcut (val, index) {
|
|
|
let fileurlall = val.split('$')[index]
|
|
|
let fileurl = fileurlall.split('|')
|
|
|
- let fullUrl = fileurl[0]
|
|
|
+ let retUrl = fileurl[0]
|
|
|
// 内网服务器专用
|
|
|
- if (process.client && (fullUrl.indexOf('upfile') === 0 || fullUrl.indexOf('/upfile') === 0)) {
|
|
|
+ if (process.client && retUrl.indexOf('/upfile') === 0) {
|
|
|
const myDomain = window.location.host
|
|
|
- fullUrl = 'http://' + myDomain + '/' + fullUrl
|
|
|
- } else {
|
|
|
- fullUrl = 'http://' + fullUrl
|
|
|
+ retUrl = myDomain + '/' + retUrl
|
|
|
}
|
|
|
- return fullUrl
|
|
|
+ return retUrl
|
|
|
},
|
|
|
openDialog (val) {
|
|
|
this.SubfileForm.Id = val.Id
|
|
|
@@ -2094,9 +2093,13 @@
|
|
|
this.SubfileForm.FileName = val.FileName
|
|
|
this.SubfileForm.OldFileName = val.OldFileName
|
|
|
this.SubfileForm.OldEffectDate = new Date(val.OldEffectDate)
|
|
|
+ this.SubfileForm.EffectDate = (this.jsEffectDate(val.EffectDate))
|
|
|
this.SubfileForm.OldFileUrl = val.OldFileUrl
|
|
|
this.SubfileForm.FileUrl = val.FileUrl
|
|
|
- this.getwendanginfo(val.FileUrl)
|
|
|
+ this.fileList = []
|
|
|
+ if (val.FileUrl !== '') {
|
|
|
+ this.getwendanginfo(val.FileUrl)
|
|
|
+ }
|
|
|
this.SubfileForm.OtherRemark = val.OtherRemark
|
|
|
this.SubfileForm.Remark = val.Remark
|
|
|
this.SubfileForm.IsDelete = val.IsDelete
|
|
|
@@ -2106,12 +2109,19 @@
|
|
|
getwendanginfo (iUrl) {
|
|
|
let _this = this
|
|
|
_this.doclist = []
|
|
|
- let exArr = iUrl.split('|')
|
|
|
- let params = {
|
|
|
- name: exArr[1],
|
|
|
- url: exArr[0]
|
|
|
+ let urlArr = iUrl.split('$')
|
|
|
+ for (let idx in urlArr) {
|
|
|
+ let exArr = urlArr[idx].split('|')
|
|
|
+ let params = {
|
|
|
+ name: exArr[1],
|
|
|
+ url: exArr[0]
|
|
|
+ }
|
|
|
+ _this.doclist.push(params)
|
|
|
+ _this.fileList.push(params)
|
|
|
}
|
|
|
- _this.doclist.push(params)
|
|
|
+ },
|
|
|
+ filremove (file, files) {
|
|
|
+ this.fileList = files
|
|
|
},
|
|
|
beforeAvatarUpload (file) {
|
|
|
/* let isLt512K = file.size / 1024 < 512
|
|
|
@@ -2182,6 +2192,12 @@
|
|
|
getattachissuccess () {
|
|
|
this.SubfileForm.FileUrl = ''
|
|
|
this.SubfileForm.FileName = ''
|
|
|
+ if (this.fileList != null && this.fileList.length > 0) {
|
|
|
+ for (let idx in this.fileList) {
|
|
|
+ this.SubfileForm.FileName += this.fileList[idx].name + '$'
|
|
|
+ this.SubfileForm.FileUrl += this.fileList[idx].url + '|' + this.fileList[idx].name + '$'
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
|
if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
|
|
|
@@ -2672,7 +2688,19 @@
|
|
|
this.currentPage = 1
|
|
|
this.getSortList()
|
|
|
},
|
|
|
-
|
|
|
+ jsEffectDate (val) {
|
|
|
+ if (val === '') {
|
|
|
+ return ''
|
|
|
+ } else if (val === '0001-01-01T00:00:00Z') {
|
|
|
+ return ''
|
|
|
+ } else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
+ return ''
|
|
|
+ } else if (val === '5000-01-01T23:59:59+08:00') {
|
|
|
+ return ''
|
|
|
+ } else {
|
|
|
+ return val
|
|
|
+ }
|
|
|
+ },
|
|
|
jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|