Merge branch 'master' of http://yun.pashanhoo.com:9090/renchao/CadastralSystem
Showing
2 changed files
with
91 additions
and
50 deletions
... | @@ -89,7 +89,7 @@ export function getTreeByZrzbsm(zrzbsm) { | ... | @@ -89,7 +89,7 @@ export function getTreeByZrzbsm(zrzbsm) { |
89 | /**x | 89 | /**x |
90 | *修改 宗地,自然幢,户的权属状态 | 90 | *修改 宗地,自然幢,户的权属状态 |
91 | */ | 91 | */ |
92 | export function updateQsztByBsm(data){ | 92 | export function updateQsztByBsm(data) { |
93 | return request({ | 93 | return request({ |
94 | url: '/gz/updateByBsm', | 94 | url: '/gz/updateByBsm', |
95 | method: 'post', | 95 | method: 'post', |
... | @@ -100,24 +100,25 @@ export function updateQsztByBsm(data){ | ... | @@ -100,24 +100,25 @@ export function updateQsztByBsm(data){ |
100 | /**x | 100 | /**x |
101 | *修改 宗地,自然幢,户的权属状态 | 101 | *修改 宗地,自然幢,户的权属状态 |
102 | */ | 102 | */ |
103 | export function copyZdjbxx(data){ | 103 | export function copyZdjbxx(data) { |
104 | return request({ | 104 | return request({ |
105 | url: '/bg/fwsxbg/copyZdjbxx', | 105 | url: '/bg/fwsxbg/copyZdjbxx', |
106 | method: 'post', | 106 | method: 'post', |
107 | data: data | 107 | data: data |
108 | }) | 108 | }) |
109 | } | 109 | } |
110 | |||
110 | /** | 111 | /** |
111 | * 提交表单信息 | 112 | * 提交表单信息 |
112 | * glbsm 关联标识码,自然幢,多幢等标识码 , | 113 | * glbsm 关联标识码,自然幢,多幢等标识码 , |
113 | * status 状态 | 114 | * status 状态 |
114 | * type 类型,zrz,dz,zd等信息,首字母缩写 | 115 | * type 类型,zrz,dz,zd等信息,首字母缩写 |
115 | */ | 116 | */ |
116 | export function submit (data) { | 117 | export function submit(data) { |
117 | return request({ | 118 | return request({ |
118 | url: '/system/submit/submitInfo', | 119 | url: '/system/submit/submitInfo', |
119 | method: 'post', | 120 | method: 'post', |
120 | data:data | 121 | data: data |
121 | }) | 122 | }) |
122 | } | 123 | } |
123 | 124 | ||
... | @@ -126,8 +127,21 @@ export function submit (data) { | ... | @@ -126,8 +127,21 @@ export function submit (data) { |
126 | */ | 127 | */ |
127 | export function insertFile(data) { | 128 | export function insertFile(data) { |
128 | return request({ | 129 | return request({ |
129 | url:'/file', | 130 | url: '/file', |
130 | method:'post', | 131 | method: 'post', |
131 | data:data | 132 | data: data |
133 | }) | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * 获取文件 | ||
138 | */ | ||
139 | export function getFileLis(glbsm) { | ||
140 | return request({ | ||
141 | url: '/file/list', | ||
142 | method: 'get', | ||
143 | params: { | ||
144 | glbsm | ||
145 | } | ||
132 | }) | 146 | }) |
133 | } | 147 | } | ... | ... |
... | @@ -16,17 +16,22 @@ | ... | @@ -16,17 +16,22 @@ |
16 | </el-upload> | 16 | </el-upload> |
17 | <table border="2"> | 17 | <table border="2"> |
18 | <tr> | 18 | <tr> |
19 | <th>序号</th> | 19 | <th class="xh">序号</th> |
20 | <th>文件名称</th> | 20 | <th class="mc">文件名称</th> |
21 | <th>文件类型</th> | 21 | <th class="lx">文件类型</th> |
22 | <th>操作</th> | 22 | <th class="cz">操作</th> |
23 | </tr> | 23 | </tr> |
24 | <tr v-for="(item,index) in list" :key="index"> | 24 | <tr v-if="list.length==0"> |
25 | <td>{{index+1}}</td> | 25 | <td colspan="4" class="noData" > |
26 | <td>{{item.wjmc}}</td> | 26 | <span>暂无数据</span> |
27 | <td>{{item.wjlx}}</td> | 27 | </td> |
28 | <td> | 28 | </tr> |
29 | <span>下载</span> | 29 | <tr v-else v-for="(item,index) in list" :key="index" > |
30 | <td class="xh">{{index+1}}</td> | ||
31 | <td class="mc">{{item.filename}}</td> | ||
32 | <td class="lx">{{item.filepostfix}}</td> | ||
33 | <td class="cz"> | ||
34 | <span @click="downloadFile(item.fileurl)">下载</span> | ||
30 | <span>预览</span> | 35 | <span>预览</span> |
31 | </td> | 36 | </td> |
32 | </tr> | 37 | </tr> |
... | @@ -35,35 +40,21 @@ | ... | @@ -35,35 +40,21 @@ |
35 | </template> | 40 | </template> |
36 | 41 | ||
37 | <script> | 42 | <script> |
38 | import {insertFile} from "./../../../api/common" | 43 | import {insertFile, getFileLis, downloadFile} from "./../../../api/common" |
39 | import {Message} from "element-ui" | 44 | import {Message} from "element-ui" |
45 | |||
40 | export default { | 46 | export default { |
41 | name: "fjcl", | 47 | name: "fjcl", |
42 | data() { | 48 | data() { |
43 | return { | 49 | return { |
44 | list: [ | 50 | list: [ |
45 | { | 51 | { |
46 | wjmc: '调查文档1', | 52 | filename: '调查文档1', |
47 | wjlx: 'doc', | 53 | filepostfix: 'doc', |
48 | url: '' | 54 | fileurl: '' |
49 | }, | 55 | } |
50 | { | ||
51 | wjmc: '调查文档2', | ||
52 | wjlx: 'doc', | ||
53 | url: '' | ||
54 | }, | ||
55 | { | ||
56 | wjmc: '调查文档3', | ||
57 | wjlx: 'doc', | ||
58 | url: '' | ||
59 | }, | ||
60 | { | ||
61 | wjmc: '调查文档4', | ||
62 | wjlx: 'doc', | ||
63 | url: '' | ||
64 | }, | ||
65 | ], | 56 | ], |
66 | filesData:{ | 57 | filesData: { |
67 | dylx: "", | 58 | dylx: "", |
68 | glbsm: "", | 59 | glbsm: "", |
69 | list: [ | 60 | list: [ |
... | @@ -76,31 +67,45 @@ | ... | @@ -76,31 +67,45 @@ |
76 | }, | 67 | }, |
77 | } | 68 | } |
78 | }, | 69 | }, |
79 | mounted(){ | 70 | mounted() { |
80 | switch (this.$route.name) { | 71 | switch (this.$route.name) { |
81 | case "宗地": | 72 | case "宗地": |
82 | this.filesData.dylx='zd'; | 73 | this.filesData.dylx = 'zd'; |
83 | this.filesData.glbsm=this.$store.state.zdbsm | 74 | this.filesData.glbsm = this.$store.state.zdbsm |
84 | break; | 75 | break; |
85 | case "自然幢": | 76 | case "自然幢": |
86 | this.filesData.dylx='zrz'; | 77 | this.filesData.dylx = 'zrz'; |
87 | this.filesData.glbsm=this.$store.state.zrzbsm | 78 | this.filesData.glbsm = this.$store.state.zrzbsm |
88 | break | 79 | break |
89 | default: | 80 | default: |
90 | break | 81 | break |
91 | } | 82 | } |
83 | this.getFileList(this.filesData.glbsm) | ||
92 | }, | 84 | }, |
93 | methods: { | 85 | methods: { |
94 | uploadError(err,file,fileList){ | 86 | downloadFile(url) { |
95 | console.log("上传文件失败",err) | 87 | window.open(`/api/file/download?url=`+url); |
88 | }, | ||
89 | getFileList(bsm) { | ||
90 | getFileLis(bsm).then(res => { | ||
91 | if (res.success) { | ||
92 | this.list = res.result; | ||
93 | } else { | ||
94 | |||
95 | } | ||
96 | }) | ||
97 | }, | ||
98 | uploadError(err, file, fileList) { | ||
99 | console.log("上传文件失败", err) | ||
96 | }, | 100 | }, |
97 | uploadSuccess(res, file, fileList) { | 101 | uploadSuccess(res, file, fileList) { |
98 | this.filesData.list = res.result; | 102 | this.filesData.list = res.result; |
99 | console.log(res,"res=========") | 103 | console.log(res, "res=========") |
100 | insertFile(this.filesData).then(res=>{ | 104 | insertFile(this.filesData).then(res => { |
101 | if (res.success) { | 105 | if (res.success) { |
102 | Message.warning("上传成功") | 106 | Message.warning("上传成功") |
103 | }else { | 107 | this.getFileList(this.filesData.glbsm) |
108 | } else { | ||
104 | Message.error(res.message) | 109 | Message.error(res.message) |
105 | } | 110 | } |
106 | }) | 111 | }) |
... | @@ -119,8 +124,7 @@ | ... | @@ -119,8 +124,7 @@ |
119 | return this.$confirm(`确定移除 ${ file.name }?`); | 124 | return this.$confirm(`确定移除 ${ file.name }?`); |
120 | } | 125 | } |
121 | }, | 126 | }, |
122 | watch:{ | 127 | watch: {} |
123 | } | ||
124 | } | 128 | } |
125 | </script> | 129 | </script> |
126 | 130 | ||
... | @@ -134,6 +138,7 @@ | ... | @@ -134,6 +138,7 @@ |
134 | 138 | ||
135 | table { | 139 | table { |
136 | margin-top: 10px; | 140 | margin-top: 10px; |
141 | cursor: pointer; | ||
137 | background-color: #fff; | 142 | background-color: #fff; |
138 | font-size: 14px; | 143 | font-size: 14px; |
139 | width: 100%; | 144 | width: 100%; |
... | @@ -142,6 +147,28 @@ | ... | @@ -142,6 +147,28 @@ |
142 | height: 36px; | 147 | height: 36px; |
143 | min-width: 50px; | 148 | min-width: 50px; |
144 | } | 149 | } |
150 | td span { | ||
151 | color: blue; | ||
152 | } | ||
153 | .cz span:hover { | ||
154 | color: blue; | ||
155 | text-decoration: underline; | ||
156 | } | ||
157 | .xh{ | ||
158 | width: 100px; | ||
159 | } | ||
160 | .mc{ | ||
161 | width: 300px; | ||
162 | } | ||
163 | .lx{ | ||
164 | width: 120px; | ||
165 | } | ||
166 | .cz{ | ||
167 | width: 150px; | ||
168 | } | ||
169 | .noData span{ | ||
170 | color: #BBB; | ||
171 | } | ||
145 | } | 172 | } |
146 | 173 | ||
147 | 174 | ... | ... |
-
Please register or sign in to post a comment