1c24f3f9 by weimo934

feat(fjcl):增加附件删除

1 parent 6a5d2671
...@@ -175,6 +175,18 @@ export function loadFile(url) { ...@@ -175,6 +175,18 @@ export function loadFile(url) {
175 } 175 }
176 }) 176 })
177 } 177 }
178 /**
179 * 删除文件
180 */
181 export function deleteFile(id) {
182 return request({
183 url:"/file/delete",
184 method:'delete',
185 params:{
186 id
187 }
188 })
189 }
178 190
179 /** 191 /**
180 * 多个宗地代码获取树的数据信息 192 * 多个宗地代码获取树的数据信息
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
22 <span>多幢信息({{zdZxx.dzList.length}}个)</span> 22 <span>多幢信息({{zdZxx.dzList.length}}个)</span>
23 </div> 23 </div>
24 <ul> 24 <ul>
25 <li v-for="(item,index) in zdZxx.dzList" :key="index" 25 <li v-for="(item,index) in zdZxx.dzList" :key="index" @mouseenter="mouseenter" @mouseleave="mouseleave"
26 :class="[{'border':'((index+1)%2) == 0'},{'nosearch':!zdDzList.includes(item)}]" 26 :class="[{'search':!zdDzList.includes(item)}]"
27 >{{item.displays}}</li> 27 >{{item.displays}}</li>
28 </ul> 28 </ul>
29 </div> 29 </div>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
33 </div> 33 </div>
34 <ul> 34 <ul>
35 <li v-for="(item,index) in zdZxx.zrzList" :key="index" 35 <li v-for="(item,index) in zdZxx.zrzList" :key="index"
36 :class="[{'border':'((index+1)%2) == 0'},{'nosearch':!zdZrzList.includes(item)}]">{{item.displays}} 36 :class="[{'oddborder':((index+1)%2) === 1},{'search':!zdZrzList.includes(item)}]">{{item.displays}}
37 </li> 37 </li>
38 </ul> 38 </ul>
39 </div> 39 </div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
50 <th class="syqlx">所有权类型</th> 50 <th class="syqlx">所有权类型</th>
51 <th class="tdtzm">土地特征码</th> 51 <th class="tdtzm">土地特征码</th>
52 <th class="xmmc">项目名称</th> 52 <th class="xmmc">项目名称</th>
53 <th class="zxx">幢信息</th> 53 <th class="xzzxx">幢信息</th>
54 <th class="">选择</th> 54 <th class="">选择</th>
55 </tr> 55 </tr>
56 <tr v-for="(item,index) in zdFghData.newZdlist" :key="index"> 56 <tr v-for="(item,index) in zdFghData.newZdlist" :key="index">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
116 <td class="xmmc"> 116 <td class="xmmc">
117 <input type="text" v-model="item.xmmc" class="formInput"/> 117 <input type="text" v-model="item.xmmc" class="formInput"/>
118 </td> 118 </td>
119 <td class="zxx"> 119 <td class="xzzxx">
120 <span>多幢:</span> 120 <span>多幢:</span>
121 <ul> 121 <ul>
122 <li v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex">{{dzItem}}</li> 122 <li v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex">{{dzItem}}</li>
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
196 <div class="zxx"> 196 <div class="zxx">
197 <div class="dz"> 197 <div class="dz">
198 <div class="title"> 198 <div class="title">
199 <span class="title">多幢信息({{zdZxx.zrzList.length}}个)</span> 199 <span>多幢信息({{zdZxx.zrzList.length}}个)</span>
200 </div> 200 </div>
201 <ul> 201 <ul>
202 <li v-for="(item,index) in zdZxx.zrzList" :key="index">{{item.xmmc}}</li> 202 <li v-for="(item,index) in zdZxx.zrzList" :key="index">{{item.xmmc}}</li>
...@@ -204,11 +204,11 @@ ...@@ -204,11 +204,11 @@
204 </div> 204 </div>
205 <div class="zrz"> 205 <div class="zrz">
206 <div class="title"> 206 <div class="title">
207 <span class="title">自然幢信息({{zdZxx.dzList.length}}个)</span> 207 <span class="">自然幢信息({{zdZxx.dzList.length}}个)</span>
208 </div> 208 </div>
209 <ul> 209 <ul>
210 <li v-for="(item,index) in zdZxx.dzList" :key="index" 210 <li v-for="(item,index) in zdZxx.dzList" :key="index"
211 :class="(index+1)%2==0?'':'border'">{{item.xmmc}} 211 :class="(index+1)%2==0?'':'oddborder'">{{item.xmmc}}
212 </li> 212 </li>
213 </ul> 213 </ul>
214 </div> 214 </div>
...@@ -225,7 +225,6 @@ ...@@ -225,7 +225,6 @@
225 <th class="syqlx">所有权类型</th> 225 <th class="syqlx">所有权类型</th>
226 <th class="tdtzm">土地特征码</th> 226 <th class="tdtzm">土地特征码</th>
227 <th class="xmmc">项目名称</th> 227 <th class="xmmc">项目名称</th>
228 <th class="zxx">幢信息</th>
229 </tr> 228 </tr>
230 <tr v-for="(item,index) in dzFghData.newZdlist" :key="index"> 229 <tr v-for="(item,index) in dzFghData.newZdlist" :key="index">
231 <td class="cz"> 230 <td class="cz">
...@@ -290,9 +289,6 @@ ...@@ -290,9 +289,6 @@
290 <td class="xmmc"> 289 <td class="xmmc">
291 <input type="text" v-model="item.xmmc" class="formInput"/> 290 <input type="text" v-model="item.xmmc" class="formInput"/>
292 </td> 291 </td>
293 <td class="zxx">
294 <span @click="xzzrz(index)" class="xz">选择</span>
295 </td>
296 </tr> 292 </tr>
297 <tr> 293 <tr>
298 <td> 294 <td>
...@@ -309,7 +305,6 @@ ...@@ -309,7 +305,6 @@
309 <td></td> 305 <td></td>
310 <td></td> 306 <td></td>
311 <td></td> 307 <td></td>
312 <td></td>
313 </tr> 308 </tr>
314 </table> 309 </table>
315 </div> 310 </div>
...@@ -328,12 +323,12 @@ ...@@ -328,12 +323,12 @@
328 <div class="fgq"> 323 <div class="fgq">
329 <div class="data"> 324 <div class="data">
330 <ul> 325 <ul>
331 <li><span>宗地代码:</span>{{zdFgqData.zddm}}</li> 326 <li><span>宗地代码:</span>{{hFgqData.zddm}}</li>
332 <li><span>不动产单元号:</span>{{zdFgqData.bdcdyh}}</li> 327 <li><span>不动产单元号:</span>{{hFgqData.bdcdyh}}</li>
333 <li><span>项目名称:</span>{{zdFgqData.xmmc}}</li> 328 <li><span>项目名称:</span>{{hFgqData.xmmc}}</li>
334 <li><span>不动产权证号:</span>{{zdFgqData.bdcqzh}}</li> 329 <li><span>不动产权证号:</span>{{hFgqData.bdcqzh}}</li>
335 <li><span>权利人:</span>{{zdFgqData.qlr}}</li> 330 <li><span>权利人:</span>{{hFgqData.qlr}}</li>
336 <li><span>坐落:</span>{{zdFgqData.zl}}</li> 331 <li><span>坐落:</span>{{hFgqData.zl}}</li>
337 </ul> 332 </ul>
338 </div> 333 </div>
339 <div class="zxx"> 334 <div class="zxx">
...@@ -351,7 +346,7 @@ ...@@ -351,7 +346,7 @@
351 </div> 346 </div>
352 <ul> 347 <ul>
353 <li v-for="(item,index) in zdZxx.dzList" :key="index" 348 <li v-for="(item,index) in zdZxx.dzList" :key="index"
354 :class="(index+1)%2==0?'':'border'">{{item.xmmc}} 349 :class="(index+1)%2==0?'':'oddborder'">{{item.xmmc}}
355 </li> 350 </li>
356 </ul> 351 </ul>
357 </div> 352 </div>
...@@ -368,7 +363,6 @@ ...@@ -368,7 +363,6 @@
368 <th class="syqlx">所有权类型</th> 363 <th class="syqlx">所有权类型</th>
369 <th class="tdtzm">土地特征码</th> 364 <th class="tdtzm">土地特征码</th>
370 <th class="xmmc">项目名称</th> 365 <th class="xmmc">项目名称</th>
371 <th class="zxx">幢信息</th>
372 </tr> 366 </tr>
373 <tr v-for="(item,index) in hFghData.newZdlist" :key="index"> 367 <tr v-for="(item,index) in hFghData.newZdlist" :key="index">
374 368
...@@ -434,10 +428,6 @@ ...@@ -434,10 +428,6 @@
434 <td class="xmmc"> 428 <td class="xmmc">
435 <input type="text" v-model="item.xmmc" class="formInput"/> 429 <input type="text" v-model="item.xmmc" class="formInput"/>
436 </td> 430 </td>
437 <td class="zxx">
438 <!-- {{item.fwlist.zbsm}}-->
439 <span @click="xzzrz(index)" class="xz">选择</span>
440 </td>
441 </tr> 431 </tr>
442 <tr> 432 <tr>
443 <td> 433 <td>
...@@ -454,7 +444,6 @@ ...@@ -454,7 +444,6 @@
454 <td></td> 444 <td></td>
455 <td></td> 445 <td></td>
456 <td></td> 446 <td></td>
457 <td></td>
458 </tr> 447 </tr>
459 </table> 448 </table>
460 </div> 449 </div>
...@@ -558,6 +547,12 @@ ...@@ -558,6 +547,12 @@
558 }) 547 })
559 }, 548 },
560 methods: { 549 methods: {
550 mouseenter(){
551 console.log("鼠标进入....")
552 },
553 mouseleave(){
554 console.log("鼠标移出...")
555 },
561 // 重置数据 556 // 重置数据
562 result(){ 557 result(){
563 switch (this.tabName) { 558 switch (this.tabName) {
...@@ -966,6 +961,7 @@ ...@@ -966,6 +961,7 @@
966 .title { 961 .title {
967 color: red; 962 color: red;
968 text-align: center; 963 text-align: center;
964 padding: 5px 0;
969 } 965 }
970 .dz { 966 .dz {
971 width: 33%; 967 width: 33%;
...@@ -997,7 +993,7 @@ ...@@ -997,7 +993,7 @@
997 } 993 }
998 } 994 }
999 995
1000 .border { 996 .oddborder {
1001 border-right: 1px solid #000; 997 border-right: 1px solid #000;
1002 } 998 }
1003 999
...@@ -1109,7 +1105,13 @@ ...@@ -1109,7 +1105,13 @@
1109 background-color: rgba(0, 202, 205, .8); 1105 background-color: rgba(0, 202, 205, .8);
1110 border-color: rgba(0, 202, 205, .8); 1106 border-color: rgba(0, 202, 205, .8);
1111 } 1107 }
1112 1108 .xzzxx{
1109 ul{
1110 li{
1111 display: inline-block;
1112 }
1113 }
1114 }
1113 .cz, .xh { 1115 .cz, .xh {
1114 width: 100px; 1116 width: 100px;
1115 } 1117 }
...@@ -1117,7 +1119,7 @@ ...@@ -1117,7 +1119,7 @@
1117 .xzq, .djq, .djzq { 1119 .xzq, .djq, .djzq {
1118 width: 150px; 1120 width: 150px;
1119 } 1121 }
1120 .nosearch{ 1122 .search{
1121 color: #BBB !important; 1123 color: #BBB !important;
1122 } 1124 }
1123 </style> 1125 </style>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 <td>操作</td> 18 <td>操作</td>
19 </tr> 19 </tr>
20 <tr v-if="zdhbqData.length==0"> 20 <tr v-if="zdhbqData.length==0">
21 <td colspan="7"> 21 <td colspan="8">
22 <span class="noData">暂无数据</span> 22 <span class="noData">暂无数据</span>
23 </td> 23 </td>
24 </tr> 24 </tr>
...@@ -134,9 +134,10 @@ ...@@ -134,9 +134,10 @@
134 <td class="bdcqzh">不动产权证号</td> 134 <td class="bdcqzh">不动产权证号</td>
135 <td class="qlr">权利人</td> 135 <td class="qlr">权利人</td>
136 <td class="zl">坐落</td> 136 <td class="zl">坐落</td>
137 <td class="">操作</td>
137 </tr> 138 </tr>
138 <tr v-if="dzhbqData.length==0"> 139 <tr v-if="dzhbqData.length==0">
139 <td colspan="7"> 140 <td colspan="8">
140 <span class="noData">暂无数据</span> 141 <span class="noData">暂无数据</span>
141 </td> 142 </td>
142 </tr> 143 </tr>
...@@ -154,6 +155,7 @@ ...@@ -154,6 +155,7 @@
154 readonly="readonly"/></td> 155 readonly="readonly"/></td>
155 <td class="zl"><input type="text" class="formInput" v-model="item.zl" 156 <td class="zl"><input type="text" class="formInput" v-model="item.zl"
156 readonly="readonly"/></td> 157 readonly="readonly"/></td>
158 <td class="cz" @click="deleteData(index)"><span>删除</span></td>
157 </tr> 159 </tr>
158 </table> 160 </table>
159 </div> 161 </div>
...@@ -250,9 +252,10 @@ ...@@ -250,9 +252,10 @@
250 <td class="bdcqzh">不动产权证号</td> 252 <td class="bdcqzh">不动产权证号</td>
251 <td class="qlr">权利人</td> 253 <td class="qlr">权利人</td>
252 <td class="zl">坐落</td> 254 <td class="zl">坐落</td>
255 <td class="">操作</td>
253 </tr> 256 </tr>
254 <tr v-if="hhbqData.length==0"> 257 <tr v-if="hhbqData.length==0">
255 <td colspan="7"> 258 <td colspan="8">
256 <span class="noData">暂无数据</span> 259 <span class="noData">暂无数据</span>
257 </td> 260 </td>
258 </tr> 261 </tr>
...@@ -270,6 +273,7 @@ ...@@ -270,6 +273,7 @@
270 readonly="readonly"/></td> 273 readonly="readonly"/></td>
271 <td class="zl"><input type="text" class="formInput" v-model="item.zl" 274 <td class="zl"><input type="text" class="formInput" v-model="item.zl"
272 readonly="readonly"/></td> 275 readonly="readonly"/></td>
276 <td class="cz" @click="deleteData(index)"><span>删除</span></td>
273 </tr> 277 </tr>
274 </table> 278 </table>
275 </div> 279 </div>
......
...@@ -33,7 +33,10 @@ ...@@ -33,7 +33,10 @@
33 <td class="lx">{{item.filepostfix}}</td> 33 <td class="lx">{{item.filepostfix}}</td>
34 <td class="cz"> 34 <td class="cz">
35 <span @click="downloadFile(item.fileurl)">下载</span> 35 <span @click="downloadFile(item.fileurl)">下载</span>
36 <span>/</span>
36 <span @click="loadFile(item.fileurl)">预览</span> 37 <span @click="loadFile(item.fileurl)">预览</span>
38 <span>/</span>
39 <span @click="deleteFile(item.bsm)">删除</span>
37 </td> 40 </td>
38 </tr> 41 </tr>
39 </table> 42 </table>
...@@ -41,7 +44,7 @@ ...@@ -41,7 +44,7 @@
41 </template> 44 </template>
42 45
43 <script> 46 <script>
44 import {insertFile, getFileLis, downloadFile,loadFile} from "./../../../api/common" 47 import {insertFile, getFileLis, downloadFile,loadFile,deleteFile} from "./../../../api/common"
45 import {Message} from "element-ui" 48 import {Message} from "element-ui"
46 49
47 export default { 50 export default {
...@@ -69,21 +72,29 @@ ...@@ -69,21 +72,29 @@
69 } 72 }
70 }, 73 },
71 mounted() { 74 mounted() {
72 switch (this.$route.name) { 75 this.getFileList()
73 case "宗地":
74 this.filesData.dylx = 'zd';
75 this.filesData.glbsm = this.$store.state.zdbsm
76 break;
77 case "自然幢":
78 this.filesData.dylx = 'zrz';
79 this.filesData.glbsm = this.$store.state.zrzbsm
80 break
81 default:
82 break
83 }
84 this.getFileList(this.filesData.glbsm)
85 }, 76 },
86 methods: { 77 methods: {
78 deleteFile(bsm){
79 this.$confirm('将删除该文件, 是否继续?', '提示', {
80 confirmButtonText: '确定',
81 cancelButtonText: '取消',
82 type: 'warning'
83 }).then(() => {
84 deleteFile(bsm).then(res=>{
85 if (res.success) {
86 this.getFileList();
87 }else {
88 this.$message.error("删除失败")
89 }
90 })
91 }).catch(() => {
92 this.$message({
93 type: 'info',
94 message: '已取消'
95 });
96 });
97 },
87 loadFile(url){ 98 loadFile(url){
88 loadFile(url).then(res=>{ 99 loadFile(url).then(res=>{
89 if (res.success) { 100 if (res.success) {
...@@ -94,8 +105,20 @@ ...@@ -94,8 +105,20 @@
94 downloadFile(url) { 105 downloadFile(url) {
95 window.open(`/api/file/download?url=`+url); 106 window.open(`/api/file/download?url=`+url);
96 }, 107 },
97 getFileList(bsm) { 108 getFileList() {
98 getFileLis(bsm).then(res => { 109 switch (this.$route.name) {
110 case "宗地":
111 this.filesData.dylx = 'zd';
112 this.filesData.glbsm = this.$store.state.zdbsm
113 break;
114 case "自然幢":
115 this.filesData.dylx = 'zrz';
116 this.filesData.glbsm = this.$store.state.zrzbsm
117 break
118 default:
119 break
120 }
121 getFileLis(this.filesData.glbsm ).then(res => {
99 if (res.success) { 122 if (res.success) {
100 this.list = res.result; 123 this.list = res.result;
101 } else { 124 } else {
......