|
@@ -68,6 +68,7 @@
|
|
|
class="upload-demo"
|
|
|
drag
|
|
|
:limit="3"
|
|
|
+ :on-remove="uploadRemove"
|
|
|
:http-request="uploadBack"
|
|
|
action="http://192.168.1.228:9600/spfm"
|
|
|
multiple
|
|
@@ -397,7 +398,7 @@ export default {
|
|
|
id: element.id + '',
|
|
|
deal: element.draft === "1" && element.sts === "0" ? "1" : "0",
|
|
|
isEdit:
|
|
|
- element.draft === "0" && element.createId === this.loginNoStr && element.parentLevel === '1'
|
|
|
+ element.draft === "0" && element.createId === this.loginNoStr && element.parentLevel === '0'
|
|
|
? "1"
|
|
|
: "0",
|
|
|
No: index + 1,
|
|
@@ -457,38 +458,24 @@ export default {
|
|
|
},
|
|
|
//文件返回值
|
|
|
uploadBack({ file }) {
|
|
|
- // const fileName = [];
|
|
|
- // const fileIds = [];
|
|
|
- // v.forEach((element) => {
|
|
|
- // fileName.push(element.fileName);
|
|
|
- // fileIds.push(element.fileCode);
|
|
|
- // });
|
|
|
- // console.log(v);
|
|
|
- // this.add_form.fileNames = fileName.join(",");
|
|
|
- // this.add_form.fileIds = fileIds.join(",");
|
|
|
- // console.log(this.add_form,'this.add_form')
|
|
|
- // console.log(file,'file');
|
|
|
- // let params = new FormData();
|
|
|
- // params.append('file',file)
|
|
|
- // console.log(file);
|
|
|
this.file.push(file);
|
|
|
console.log(this.file);
|
|
|
this.file1 = this.file[0]
|
|
|
this.file2 = this.file[1]
|
|
|
this.file3 = this.file[2]
|
|
|
- // this.$http({
|
|
|
- // url: "/market/mkWangge/upload",
|
|
|
- // method: "post",
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // data:file
|
|
|
- // }).then((res)=>{
|
|
|
- // console.log(res);
|
|
|
- // })
|
|
|
- // let params = new FormData()
|
|
|
- // params.append('file',file)
|
|
|
- // console.log(params,'params');
|
|
|
+ },
|
|
|
+ // 删除文件
|
|
|
+ uploadRemove(file){
|
|
|
+ // console.log(file);
|
|
|
+ this.file.forEach((item,index) => {
|
|
|
+ if(item.uid === file.uid) {
|
|
|
+ this.file.splice(index,1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.file);
|
|
|
+ this.file1 = this.file[0]
|
|
|
+ this.file2 = this.file[1]
|
|
|
+ this.file3 = this.file[2]
|
|
|
},
|
|
|
// 获取模态框信息
|
|
|
getDialogData(row) {
|
|
@@ -506,9 +493,9 @@ export default {
|
|
|
},
|
|
|
}).then(({ data: { body } }) => {
|
|
|
console.log(body, "body");
|
|
|
- this.ids = [body.id.toString()];
|
|
|
+ this.ids = [body.wanggeId.toString()];
|
|
|
this.add_form = {
|
|
|
- id: body.id,
|
|
|
+ id: body.wanggeId,
|
|
|
proposer: body.proposer,
|
|
|
telephone: body.telephone,
|
|
|
wanggeText: body.wanggeText,
|
|
@@ -524,6 +511,7 @@ export default {
|
|
|
this.fileInfo.fileList = body.attList
|
|
|
? body.attList.map((item) => ({
|
|
|
...item,
|
|
|
+ name:item.fileName
|
|
|
}))
|
|
|
: [];
|
|
|
});
|
|
@@ -610,6 +598,7 @@ export default {
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
this.handleInit();
|
|
|
+ this.handleVisible('add')
|
|
|
});
|
|
|
} else {
|
|
|
// 审批
|
|
@@ -631,10 +620,11 @@ export default {
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
this.handleInit();
|
|
|
+ this.handleVisible('add')
|
|
|
});
|
|
|
}
|
|
|
- this.edit_visible = false;
|
|
|
- this.add_visible = false;
|
|
|
+ // this.edit_visible = false;
|
|
|
+ // this.add_visible = false;
|
|
|
this.fileInfo.fileList = [];
|
|
|
}
|
|
|
});
|