@@ -355,7 +380,8 @@ export default {
idCardImgList: [],
unit: ''
}],
- fileList: []
+ fileList: [],
+ docList: []
},
zzmmOptions: [
{ name: '党员', value: '党员' },
@@ -391,7 +417,10 @@ export default {
buildingOptions: [],
unitOptions: [],
houseOptions: [],
- agencyOptions: []
+ agencyOptions: [],
+ uploadUrl: `${window.SITE_CONFIG['apiURL']}/oss/file/uploadqrcodeV2`,
+ customerId: localStorage.getItem("customerId"),
+ limit: 3
}
},
computed: {
@@ -537,6 +566,7 @@ export default {
unit: ''
}],
fileList: [],
+ docList: [],
agencyImgList: []
}
},
@@ -866,6 +896,43 @@ export default {
this.editModeGetList()
}).catch(() => {})
},
+ handleFlieSuccess(res, file) {
+ if (res.code === 0 && res.msg === "success") {
+ let ob = {
+ fileType: '0',
+ fileUrl: file.response.data.url,
+ name: file.response.data.fileName
+ }
+ this.dataForm.docList.push(ob)
+ } else {
+ this.$message.error(res.msg)
+ }
+ },
+ handleFlieError(res, file) {
+ console.log(res)
+ },
+ handleFlieRemove(res) {
+ // console.log(JSON.stringify(res))
+ const delFile = res.fileUrl
+ this.dataForm.docList.forEach((item, key) => {
+ if (delFile == item.fileUrl) {
+ this.dataForm.docList.splice(key, 1)
+ }
+ })
+ },
+ handleFlieExceed(res) {
+ this.$message({
+ type: "warning",
+ message: `文件数量最多不超过${this.limit}个`,
+ })
+ },
+ beforeFlieUpload(file) {
+ console.log(file)
+ },
+ handlePreview(file) {
+ window.open(file.fileUrl)
+ // console.log(JSON.stringify(file));
+ },
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
@@ -932,7 +999,9 @@ export default {
}