bug修复
This commit is contained in:
parent
304c10975e
commit
66cc36b74d
|
|
@ -37,8 +37,8 @@ export function updateProject(data) {
|
||||||
'decrypt': 'decrypt',
|
'decrypt': 'decrypt',
|
||||||
'Content-Type': 'multipart/form-data'
|
'Content-Type': 'multipart/form-data'
|
||||||
},
|
},
|
||||||
url: '/bracelet/project',
|
url: '/bracelet/project/update',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@
|
||||||
action="#"
|
action="#"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
|
:key="uploadKey"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
|
|
@ -168,6 +169,7 @@ export default {
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uploadKey: Date.now(),
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
|
@ -320,6 +322,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
this.uploadKey = Date.now();
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.fileList=[];
|
this.fileList=[];
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
@ -356,6 +359,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
this.uploadKey = Date.now();
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
|
@ -364,6 +368,7 @@ export default {
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
|
this.delFileIdList = []
|
||||||
this.reset();
|
this.reset();
|
||||||
const projectId = row.projectId
|
const projectId = row.projectId
|
||||||
getProject(projectId).then(response => {
|
getProject(projectId).then(response => {
|
||||||
|
|
@ -377,7 +382,7 @@ export default {
|
||||||
// response.data.fileList = [];
|
// response.data.fileList = [];
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改项目";
|
this.title = "修改项目";
|
||||||
|
this.uploadKey = Date.now();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 图片上传
|
// 图片上传
|
||||||
|
|
@ -435,13 +440,13 @@ export default {
|
||||||
},
|
},
|
||||||
//提交时循环fileList 获取raw文件
|
//提交时循环fileList 获取raw文件
|
||||||
getFileData() {
|
getFileData() {
|
||||||
const file = []
|
const fileTwo = []
|
||||||
this.fileList.forEach(item => {
|
this.fileList.forEach(item => {
|
||||||
if (item?.hasOwnProperty('raw')) {
|
if (item?.hasOwnProperty('raw')) {
|
||||||
file.push(item.raw)
|
fileTwo.push(item.raw)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return { file }
|
return { fileTwo }
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
|
@ -449,29 +454,40 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.projectId != undefined) {
|
if (this.form.projectId != undefined) {
|
||||||
const reqData = new FormData();
|
const reqData = new FormData();
|
||||||
this.form.delFileIdList = this.delFileIdList;
|
const forTemp = {'projectId': this.form.projectId,'projectDepartName': this.form.projectDepartName,'projectHeadName': this.form.projectHeadName,'contactInformation': this.form.contactInformation,'remarks': this.form.remarks};
|
||||||
reqData.append('params', JSON.stringify(this.form))
|
reqData.append('params', JSON.stringify(forTemp));
|
||||||
const { file } = this.getFileData()
|
// this.form.delFileIdList = this.delFileIdList;
|
||||||
file.forEach(item => {
|
this.delFileIdList.forEach(item => {
|
||||||
|
reqData.append('delFileIdList', item)
|
||||||
|
});
|
||||||
|
// reqData.append('params', JSON.stringify(this.form))
|
||||||
|
const { fileTwo } = this.getFileData()
|
||||||
|
fileTwo.forEach(item => {
|
||||||
reqData.append('file', item)
|
reqData.append('file', item)
|
||||||
})
|
})
|
||||||
|
console.log(reqData)
|
||||||
updateProject(reqData).then(response => {
|
updateProject(reqData).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.delFileIdList = [];
|
||||||
this.fileList=[];
|
this.fileList=[];
|
||||||
|
this.uploadKey = Date.now();
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log(this.form)
|
|
||||||
const reqData = new FormData()
|
const reqData = new FormData()
|
||||||
reqData.append('params', JSON.stringify(this.form))
|
const forTemp = {'projectId': this.form.projectId,'projectDepartName': this.form.projectDepartName,'projectHeadName': this.form.projectHeadName,'contactInformation': this.form.contactInformation,'remarks': this.form.remarks};
|
||||||
const { file } = this.getFileData()
|
reqData.append('params', JSON.stringify(forTemp))
|
||||||
file.forEach(item => {
|
const { fileTwo } = this.getFileData()
|
||||||
|
fileTwo.forEach(item => {
|
||||||
reqData.append('file', item)
|
reqData.append('file', item)
|
||||||
})
|
})
|
||||||
addProject(reqData).then(response => {
|
addProject(reqData).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.fileList=[];
|
||||||
|
this.delFileIdList = [];
|
||||||
|
this.uploadKey = Date.now();
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="证书" align="center" prop="certificateNum" sortable>
|
<el-table-column label="证书" align="center" prop="certificateNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div @click="openCertificate(scope.row)" style="color: #02a7f0; cursor: pointer">
|
<div @click="openCertificate(scope.row)" style="color: #02a7f0; cursor: pointer" >
|
||||||
{{ scope.row.certificateNum}}
|
{{ scope.row.certificateNum}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -401,6 +401,7 @@ import { listPerson, addPerson, editPerson, getPersonInfo, delPerson, exportPers
|
||||||
import { downloadFile,downloadFileData } from '@/utils/download'
|
import { downloadFile,downloadFileData } from '@/utils/download'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import uploadFile from '../../components/uploadFile.vue'
|
import uploadFile from '../../components/uploadFile.vue'
|
||||||
|
import _ from 'lodash';
|
||||||
export default {
|
export default {
|
||||||
name: "Post",
|
name: "Post",
|
||||||
dicts: ['sys_normal_disable','sys_user_sex','post_type'],
|
dicts: ['sys_normal_disable','sys_user_sex','post_type'],
|
||||||
|
|
@ -796,6 +797,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.delHighFileIdList.push(this.highImgList[sum].fileId)
|
this.delHighFileIdList.push(this.highImgList[sum].fileId)
|
||||||
|
console.log(this.delHighFileIdList)
|
||||||
this.highImgList.splice(sum, 1)
|
this.highImgList.splice(sum, 1)
|
||||||
},
|
},
|
||||||
handleRemoveElectricianImgList(file, fileList) {
|
handleRemoveElectricianImgList(file, fileList) {
|
||||||
|
|
@ -1006,7 +1008,7 @@ export default {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
},
|
},
|
||||||
//打开证书上传
|
//打开证书上传
|
||||||
openCertificate(row){
|
openCertificate:_.debounce(function(row){
|
||||||
this.title = "证书上传";
|
this.title = "证书上传";
|
||||||
this.memberId = row.id;
|
this.memberId = row.id;
|
||||||
this.highImgList = [];
|
this.highImgList = [];
|
||||||
|
|
@ -1077,7 +1079,7 @@ export default {
|
||||||
this.showCertificate = true;
|
this.showCertificate = true;
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},300),
|
||||||
|
|
||||||
//关闭证书上传
|
//关闭证书上传
|
||||||
cancelCertificate(){
|
cancelCertificate(){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue