Skip to content

Commit

Permalink
... some change
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Nov 3, 2018
1 parent 7fee99d commit e826403
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
8 changes: 7 additions & 1 deletion src/api/Archive/person.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ export function UpdateUsers(data){
}


export function Getobj(){
export function getKey(){
return fetch({
url: '/person/Getkey',
method: 'post',
})
}


export function getObj(){
return fetch({
url: '/person/getObj',
method: 'post',
})
}
12 changes: 9 additions & 3 deletions src/components/UploadAffix/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template>
<div class="upload-container">
<el-upload
ref="upload"
class="upload-demo"
:action="Params['Url']"
:data="Params['Param']"
:headers="token"
v-if="!Params.IsDetail"
:show-file-list = "false"
:on-success="test()"
:on-success="uploadSuccess"
>
<el-button size="small" style="float:left;margin-top:10px 0" type="primary">点击上传</el-button>
</el-upload>
Expand Down Expand Up @@ -76,8 +77,13 @@ export default {
})
})
},
test(){
console.log("上传成功");
uploadSuccess(response, file, fileList){
console.log(response)
console.log(file)
console.log(fileList)
this.$refs.upload.clearFiles()
},
fetchData_File(id) {
this.listLoading = true
Expand Down
20 changes: 14 additions & 6 deletions src/views/Archive/person.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ import {
GetUsersDetail,
SaveNewUsers,
UpdateUsers,
Getobj
getObj
} from "@/api/Archive/person";
import { getToken } from "@/utils/auth";
import UploadAffix from "@/components/UploadAffix";
Expand Down Expand Up @@ -151,6 +151,7 @@ export default {
created() {
this.fetchData(this.listQuery);
this.getObj();
},
mounted() {
Expand All @@ -160,10 +161,12 @@ export default {
},
methods: {
newGuid,
GetFormDetail() {
getObj() {
getObj().then(res => {
this.temp_obj = res.data
})
},
handleSizeChange(val) {
this.listQuery.pageSize = val;
this.fetchData(this.listQuery);
Expand Down Expand Up @@ -192,9 +195,14 @@ export default {
New() {
this.dialogStatus = "create";
this.dialogFormVisible = true;
this.temp_obj = {};
this.uploadParams.Param.MasterID = "";
for(let key in this.temp_obj){
this.temp_obj[key]=""
}
this.filelist = null;
this.dialogFormVisible = true;
},
Delete(id) {
this.$confirm("确认删除?", "提示", {
Expand Down
4 changes: 2 additions & 2 deletions src/views/Archive/person_detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ import {
GetUsersDetail,
SaveNewUsers,
UpdateUsers,
Getobj
getKey
} from "@/api/Archive/person"
import { getToken } from "@/utils/auth"
import UploadAffix from "@/components/UploadAffix"
Expand Down Expand Up @@ -139,7 +139,7 @@ export default {
},
methods: {
getObj() {
Getobj().then(res => {
getObj().then(res => {
console.log(res)
this.temp = res.data
Expand Down

0 comments on commit e826403

Please sign in to comment.