|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-table :data="auditfileList" border>
|
|
|
+ <el-table :data="auditfileList" border size="mini">
|
|
|
<!-- <el-table-column label="操作" width="150" align="center" fixed>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)">编辑</el-button>
|
|
|
@@ -126,13 +126,13 @@
|
|
|
},
|
|
|
BusinessForm: {}
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created () {},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
session: 'session'
|
|
|
})
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
auditfileList: [],
|
|
|
techList: [],
|
|
|
@@ -166,21 +166,21 @@
|
|
|
selfVisible: this.visible, // 避免vue双向绑定警告
|
|
|
|
|
|
waituploads: [], // 等待上传的附件列表
|
|
|
- doclist: [],
|
|
|
+ doclist: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- initData() {
|
|
|
+ initData () {
|
|
|
let _this = this
|
|
|
const params = {
|
|
|
SupplierId: this.SupplierId,
|
|
|
SupplierTypeCode: this.SupplierTypeCode,
|
|
|
_currentPage: 1,
|
|
|
- _size: 1000,
|
|
|
+ _size: 1000
|
|
|
}
|
|
|
this.$axios.get('supplierfile/filelist', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.auditfileList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
@@ -190,7 +190,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- getCode() {
|
|
|
+ getCode () {
|
|
|
if (this.businessList && this.businessList.length > 0) {
|
|
|
for (var i = 0; i < this.businessList.length; i++) {
|
|
|
if (this.SubfileForm.SupplierCertSubId == this.businessList[i].Id) {
|
|
|
@@ -199,7 +199,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- makesure() {
|
|
|
+ makesure () {
|
|
|
if (this.Title == '新增文件') {
|
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
// 上传附件是否完成判断
|
|
|
@@ -229,7 +229,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- addSubfile() {
|
|
|
+ addSubfile () {
|
|
|
let _this = this
|
|
|
_this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
_this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
|
@@ -238,7 +238,7 @@
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
this.visible = false
|
|
|
this.initData()
|
|
|
@@ -254,7 +254,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- editSubfile() {
|
|
|
+ editSubfile () {
|
|
|
let _this = this
|
|
|
_this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
_this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
|
@@ -263,7 +263,7 @@
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
this.visible = false
|
|
|
this.initData()
|
|
|
@@ -279,36 +279,36 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- deletedata(val) {
|
|
|
- let _this = this;
|
|
|
- _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
+ deletedata (val) {
|
|
|
+ let _this = this
|
|
|
+ _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
.then(() => {
|
|
|
_this.$axios.delete('supplierfile/subfiledelete/' + val.Id, {})
|
|
|
.then(function (response) {
|
|
|
// response
|
|
|
if (response.data.code === 0) {
|
|
|
_this.$message({
|
|
|
- type: "success",
|
|
|
+ type: 'success',
|
|
|
message: response.data.message
|
|
|
- });
|
|
|
- _this.initData();
|
|
|
- } else {
|
|
|
+ })
|
|
|
+ _this.initData()
|
|
|
+ } else {
|
|
|
_this.$message({
|
|
|
- type: "warning",
|
|
|
+ type: 'warning',
|
|
|
message: response.data.message
|
|
|
- });
|
|
|
- }
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
// showDialog() {
|
|
|
// this.Title = '新增文件'
|
|
|
// this.SubfileForm.Id = ''
|
|
|
@@ -328,7 +328,7 @@
|
|
|
// this.SubfileForm.IsDelete = 0
|
|
|
// this.visible = true
|
|
|
// },
|
|
|
- openDialog(val) {
|
|
|
+ openDialog (val) {
|
|
|
this.Title = '编辑文件'
|
|
|
this.SubfileForm.Id = val.Id
|
|
|
this.SubfileForm.SupplierId = val.SupplierId
|
|
|
@@ -354,8 +354,8 @@
|
|
|
this.SubfileForm.IsDelete = val.IsDelete
|
|
|
this.visible = true
|
|
|
},
|
|
|
- //文档列表
|
|
|
- getwendanginfo(iUrl) {
|
|
|
+ // 文档列表
|
|
|
+ getwendanginfo (iUrl) {
|
|
|
let _this = this
|
|
|
_this.doclist = []
|
|
|
let exArr = iUrl.split('|')
|
|
|
@@ -365,11 +365,11 @@
|
|
|
}
|
|
|
_this.doclist.push(params)
|
|
|
},
|
|
|
- fileurlcut(val) {
|
|
|
+ fileurlcut (val) {
|
|
|
let fileurlall = val
|
|
|
- let fileurl = fileurlall.split("|")
|
|
|
+ let fileurl = fileurlall.split('|')
|
|
|
let retUrl = fileurl[0]
|
|
|
- //内网服务器专用
|
|
|
+ // 内网服务器专用
|
|
|
if (process.client && retUrl.indexOf('/upfile') === 0) {
|
|
|
const myDomain = window.location.host
|
|
|
retUrl = myDomain + '/' + retUrl
|
|
|
@@ -377,7 +377,7 @@
|
|
|
return retUrl
|
|
|
},
|
|
|
|
|
|
- beforeAvatarUpload(file) {
|
|
|
+ beforeAvatarUpload (file) {
|
|
|
let isLt50m = file.size / 1024 / 1024 / 50 < 1
|
|
|
if (!isLt50m) {
|
|
|
this.$message.error('上传文件大小不能超过 50MB!')
|
|
|
@@ -385,14 +385,14 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
- uploadrequest(option) {
|
|
|
+ uploadrequest (option) {
|
|
|
let _this = this
|
|
|
if (process.client) {
|
|
|
const myDomain = window.location.host
|
|
|
axios.post(process.env.upfilehost, {})
|
|
|
.then(function (res) {
|
|
|
if (res.data && res.data.fid && res.data.fid !== '') {
|
|
|
- if ( res.data.publicUrl.indexOf('/upfile') === 0 ) {
|
|
|
+ if (res.data.publicUrl.indexOf('/upfile') === 0) {
|
|
|
option.action = `http://${myDomain}/${res.data.publicUrl}/${res.data.fid}`
|
|
|
} else {
|
|
|
option.action = `http://${res.data.publicUrl}/${res.data.fid}`
|
|
|
@@ -419,7 +419,7 @@
|
|
|
}
|
|
|
},
|
|
|
// 判断附件是否上传成功
|
|
|
- attachissuccess() {
|
|
|
+ attachissuccess () {
|
|
|
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') {
|
|
|
@@ -429,7 +429,7 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
- getattachissuccess() {
|
|
|
+ getattachissuccess () {
|
|
|
this.SubfileForm.FileUrl = ''
|
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
|
@@ -445,26 +445,26 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- clickachment(url, uid) {
|
|
|
+ clickachment (url, uid) {
|
|
|
window.open(`http://${url}`)
|
|
|
},
|
|
|
- deletefile() {
|
|
|
+ deletefile () {
|
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
.then(() => {
|
|
|
_this.doclist = []
|
|
|
})
|
|
|
.catch(() => {})
|
|
|
},
|
|
|
|
|
|
- seachdata() {
|
|
|
+ seachdata () {
|
|
|
this.initData()
|
|
|
},
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T00:00:00Z') {
|
|
|
@@ -477,10 +477,9 @@
|
|
|
val = val.replace('T', ' ')
|
|
|
return val.substring(0, 10)
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang='scss'>
|