feat(sxdr):属性导入
Showing
2 changed files
with
21 additions
and
36 deletions
... | @@ -15,12 +15,12 @@ | ... | @@ -15,12 +15,12 @@ |
15 | multiple | 15 | multiple |
16 | > | 16 | > |
17 | <el-button type="primary">上传</el-button> | 17 | <el-button type="primary">上传</el-button> |
18 | <el-button type="primary" @click="downloadTemplate">下载模板</el-button> | 18 | <el-button type="primary" @click="downloadTemplate">下载模板</el-button> |
19 | </el-upload> | 19 | </el-upload> |
20 | </div> | 20 | </div> |
21 | <ul> | 21 | <ul> |
22 | <li v-for="(item,index) in errorData" :key="index">{{item}}</li> | 22 | <li v-for="(item,index) in errorData" :key="index">{{item}}</li> |
23 | </ul> | 23 | </ul> |
24 | <span slot="footer" class="dialog-footer"> | 24 | <span slot="footer" class="dialog-footer"> |
25 | <el-button @click="dialogVisible = false">取 消</el-button> | 25 | <el-button @click="dialogVisible = false">取 消</el-button> |
26 | <el-button type="primary" @click="dialogVisible = false">确 定</el-button> | 26 | <el-button type="primary" @click="dialogVisible = false">确 定</el-button> |
... | @@ -52,53 +52,37 @@ | ... | @@ -52,53 +52,37 @@ |
52 | sxdrData: { | 52 | sxdrData: { |
53 | bsm: '' | 53 | bsm: '' |
54 | }, | 54 | }, |
55 | errorData:[] | 55 | errorData: [] |
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | mounted(){ | 58 | mounted() { |
59 | this.$store.state.sxdrType=''; | 59 | this.$store.state.sxdrType = ''; |
60 | }, | 60 | }, |
61 | methods: { | 61 | methods: { |
62 | loading(){ | 62 | loading() { |
63 | debugger | 63 | this.$store.state.sxdrType = this.dylx; |
64 | switch (this.dylx) { | ||
65 | case "zd": | ||
66 | this.$store.state.sxdrType='zd'; | ||
67 | break; | ||
68 | case "dz": | ||
69 | this.$store.state.sxdrType='dz'; | ||
70 | break; | ||
71 | case "zrz": | ||
72 | this.$store.state.sxdrType='zrz'; | ||
73 | break; | ||
74 | case "h": | ||
75 | this.$store.state.sxdrType="h"; | ||
76 | break; | ||
77 | default: | ||
78 | break; | ||
79 | } | ||
80 | }, | 64 | }, |
81 | reset(){ | 65 | reset() { |
82 | this.errorData=[]; | 66 | this.errorData = []; |
83 | this.uploadUrl=''; | 67 | this.uploadUrl = ''; |
84 | this.sxdrData={bsm:''}; | 68 | this.sxdrData = {bsm: ''}; |
85 | this.$store.state.sxdrType=''; | ||
86 | }, | 69 | }, |
87 | close() { | 70 | close() { |
88 | this.$emit('close') | 71 | this.$emit('close') |
89 | this.reset(); | 72 | this.reset(); |
90 | }, | 73 | }, |
91 | downloadTemplate() { | 74 | downloadTemplate() { |
92 | window.open(`/api/tx/excelGeo/zdTemplate?type=`+this.dylx); | 75 | window.open(`/api/tx/excelGeo/zdTemplate?type=` + this.dylx); |
93 | }, | 76 | }, |
94 | uploadSuccess(res, file, fileList) { | 77 | uploadSuccess(res, file, fileList) { |
95 | if (res.success) { | 78 | if (res.success) { |
96 | this.$message.success("上传成功") | 79 | this.$message.success("上传成功") |
80 | debugger | ||
97 | this.loading(); | 81 | this.loading(); |
98 | this.close() | 82 | this.close() |
99 | } else { | 83 | } else { |
100 | this.$message.error("上传失败") | 84 | this.$message.error("上传失败") |
101 | this.errorData=res.result | 85 | this.errorData = res.result |
102 | } | 86 | } |
103 | } | 87 | } |
104 | }, | 88 | }, |
... | @@ -123,15 +107,16 @@ | ... | @@ -123,15 +107,16 @@ |
123 | </script> | 107 | </script> |
124 | 108 | ||
125 | <style scoped lang="less"> | 109 | <style scoped lang="less"> |
126 | .main-button{ | 110 | .main-button { |
127 | display: -webkit-flex; | 111 | display: -webkit-flex; |
128 | display: flex; | 112 | display: flex; |
129 | flex-direction: column-reverse; | 113 | flex-direction: column-reverse; |
130 | flex-wrap:nowrap; | 114 | flex-wrap: nowrap; |
131 | } | 115 | } |
132 | ul{ | 116 | |
117 | ul { | ||
133 | margin-top: 20px; | 118 | margin-top: 20px; |
134 | li{ | 119 | li { |
135 | line-height: 15px; | 120 | line-height: 15px; |
136 | color: red; | 121 | color: red; |
137 | } | 122 | } | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment