材料信息接口调试
Showing
3 changed files
with
210 additions
and
137 deletions
... | @@ -69,3 +69,12 @@ export function save (data) { | ... | @@ -69,3 +69,12 @@ export function save (data) { |
69 | data | 69 | data |
70 | }) | 70 | }) |
71 | } | 71 | } |
72 | |||
73 | // 材料目录批量删除 | ||
74 | export function clmlDelete (params) { | ||
75 | return request({ | ||
76 | url: '/zhcx/clml/delete', | ||
77 | method: 'delete', | ||
78 | params: params | ||
79 | }) | ||
80 | } | ... | ... |
... | @@ -28,18 +28,18 @@ | ... | @@ -28,18 +28,18 @@ |
28 | <!-- 材料预览 --> | 28 | <!-- 材料预览 --> |
29 | <div class="clyl-box" v-if="checkedId == '2'"> | 29 | <div class="clyl-box" v-if="checkedId == '2'"> |
30 | <div class="menu-tree"> | 30 | <div class="menu-tree"> |
31 | <div class="item" v-for="item in treedata" :key="item.id"> | 31 | <div class="item"> |
32 | {{ item.label }} | 32 | 材料目录 |
33 | <i :class="iclass" @click="iconClick()"></i> | 33 | <i :class="iclass" @click="iconClick()"></i> |
34 | <el-collapse-transition> | 34 | <el-collapse-transition> |
35 | <div v-show="menuOpen"> | 35 | <div v-show="menuOpen"> |
36 | <div | 36 | <div |
37 | v-for="item2 in item.children" | 37 | v-for="item in tableData" |
38 | :key="item2.id" | 38 | :key="item.bsmSj" |
39 | :class="['child', treeCheckId == item2.id ? 'checked' : '']" | 39 | :class="['child', treeCheckId == item.bsmSj ? 'checked' : '']" |
40 | @click="treeClick(item2)" | 40 | @click="treeClick(item)" |
41 | > | 41 | > |
42 | {{ item2.label }} | 42 | {{ item.sjmc }} |
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
45 | </el-collapse-transition> | 45 | </el-collapse-transition> |
... | @@ -47,7 +47,12 @@ | ... | @@ -47,7 +47,12 @@ |
47 | </div> | 47 | </div> |
48 | <div class="clyl-img"> | 48 | <div class="clyl-img"> |
49 | <div class="header"> | 49 | <div class="header"> |
50 | <div class="title">{{ title }}</div> | 50 | <div class="title" v-if="titleNum == 0"> |
51 | {{ title }} | ||
52 | </div> | ||
53 | <div class="title" v-else> | ||
54 | {{ title }} ({{ titleYs }} / {{ titleNum }}) | ||
55 | </div> | ||
51 | <div class="i-group"> | 56 | <div class="i-group"> |
52 | <i class="el-icon-zoom-in"></i> | 57 | <i class="el-icon-zoom-in"></i> |
53 | <i class="el-icon-zoom-out"></i> | 58 | <i class="el-icon-zoom-out"></i> |
... | @@ -56,16 +61,22 @@ | ... | @@ -56,16 +61,22 @@ |
56 | <i class="el-icon-document"></i> | 61 | <i class="el-icon-document"></i> |
57 | </div> | 62 | </div> |
58 | </div> | 63 | </div> |
64 | <div class="prev" @click="imgPrev()" v-if="imgList.length > 0"> | ||
65 | <i class="el-icon-arrow-left"></i> | ||
66 | </div> | ||
59 | <div class="img-box"> | 67 | <div class="img-box"> |
60 | <img :src="showImg.imgUrl" alt="" /> | 68 | <img :src="showImg.imgUrl" alt="" /> |
61 | </div> | 69 | </div> |
70 | <div class="next" @click="imgNext()" v-if="imgList.length > 0"> | ||
71 | <i class="el-icon-arrow-right"></i> | ||
72 | </div> | ||
62 | <div class="img-list"> | 73 | <div class="img-list"> |
63 | <div class="item" v-for="(item, index) in imgList" :key="index"> | 74 | <div class="item" v-for="(item, index) in imgList" :key="index"> |
64 | <img | 75 | <img |
65 | :class="showImg.id == item.id ? 'active' : ''" | 76 | :class="showImg.id == item.id ? 'active' : ''" |
66 | :src="item.imgUrl" | 77 | :src="item.imgUrl" |
67 | alt="" | 78 | alt="" |
68 | @click="imgClick(item)" | 79 | @click="imgClick(item, index)" |
69 | /> | 80 | /> |
70 | </div> | 81 | </div> |
71 | </div> | 82 | </div> |
... | @@ -81,16 +92,14 @@ | ... | @@ -81,16 +92,14 @@ |
81 | </div> | 92 | </div> |
82 | </template> | 93 | </template> |
83 | <script> | 94 | <script> |
95 | import { mapGetters } from "vuex"; | ||
84 | import clxxAddDialog from "./clxxAddDialog.vue"; | 96 | import clxxAddDialog from "./clxxAddDialog.vue"; |
85 | import { upward, down } from "@/utils/operation"; | 97 | import { upward, down } from "@/utils/operation"; |
86 | import { clmlInit, move, save } from "@/api/fqsq.js"; | 98 | import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js"; |
99 | import filter from "@/utils/filter.js"; | ||
87 | 100 | ||
88 | export default { | 101 | export default { |
89 | components: { clxxAddDialog }, | 102 | components: { clxxAddDialog }, |
90 | props: { | ||
91 | id: "", | ||
92 | unitData: Array, | ||
93 | }, | ||
94 | data() { | 103 | data() { |
95 | return { | 104 | return { |
96 | isDialog: false, | 105 | isDialog: false, |
... | @@ -120,12 +129,13 @@ export default { | ... | @@ -120,12 +129,13 @@ export default { |
120 | ); | 129 | ); |
121 | }, | 130 | }, |
122 | render: (h, scope) => { | 131 | render: (h, scope) => { |
123 | if (scope.row.isAdd) { | 132 | // 新建的材料,可删除 |
133 | if (scope.row.sfxjcl === "1") { | ||
124 | return ( | 134 | return ( |
125 | <i | 135 | <i |
126 | class="el-icon-minus pointer" | 136 | class="el-icon-minus pointer" |
127 | onClick={() => { | 137 | onClick={() => { |
128 | this.handleMinus(scope.$index, scope.row); | 138 | this.handleDelete(scope.$index, scope.row); |
129 | }} | 139 | }} |
130 | ></i> | 140 | ></i> |
131 | ); | 141 | ); |
... | @@ -138,28 +148,68 @@ export default { | ... | @@ -138,28 +148,68 @@ export default { |
138 | type: "index", | 148 | type: "index", |
139 | }, | 149 | }, |
140 | { | 150 | { |
141 | prop: "sfbx", | 151 | prop: "isrequired", |
142 | label: "是否必选", | 152 | label: "是否必选", |
143 | width: "100", | 153 | width: "100", |
154 | render: (h, scope) => { | ||
155 | // 新增的材料,全部为系统默认可选 | ||
156 | if (scope.row.sfxjcl === "1") { | ||
157 | return ( | ||
158 | <div> | ||
159 | <span>可选</span> | ||
160 | </div> | ||
161 | ); | ||
162 | } | ||
163 | // 系统配置的材料 | ||
164 | else { | ||
165 | return ( | ||
166 | <div> | ||
167 | <span>必选</span> | ||
168 | </div> | ||
169 | ); | ||
170 | } | ||
171 | }, | ||
144 | }, | 172 | }, |
145 | { | 173 | { |
146 | prop: "clmc", | 174 | prop: "sjmc", |
147 | label: "材料名称", | 175 | label: "材料名称", |
148 | }, | 176 | }, |
149 | { | 177 | { |
150 | prop: "cllx", | 178 | prop: "sjlx", |
151 | label: "材料类型", | 179 | label: "材料类型", |
180 | render: (h, scope) => { | ||
181 | return ( | ||
182 | <div> | ||
183 | <span>{this.dicStatus(scope.row.sjlx, "A40")}</span> | ||
184 | </div> | ||
185 | ); | ||
186 | }, | ||
152 | }, | 187 | }, |
153 | { | 188 | { |
154 | prop: "fs", | 189 | prop: "sjsl", |
155 | label: "份数", | 190 | label: "份数", |
156 | }, | 191 | }, |
157 | { | 192 | { |
158 | prop: "smzt", | 193 | prop: "smzt", |
159 | label: "扫描状态", | 194 | label: "扫描状态", |
195 | render: (h, scope) => { | ||
196 | if (scope.row.children.length > 0) { | ||
197 | return ( | ||
198 | <div> | ||
199 | <span>已扫描</span> | ||
200 | </div> | ||
201 | ); | ||
202 | } else { | ||
203 | return ( | ||
204 | <div> | ||
205 | <span>未扫描</span> | ||
206 | </div> | ||
207 | ); | ||
208 | } | ||
209 | }, | ||
160 | }, | 210 | }, |
161 | { | 211 | { |
162 | prop: "smys", | 212 | prop: "ys", |
163 | label: "扫描页数", | 213 | label: "扫描页数", |
164 | }, | 214 | }, |
165 | { | 215 | { |
... | @@ -193,116 +243,28 @@ export default { | ... | @@ -193,116 +243,28 @@ export default { |
193 | ], | 243 | ], |
194 | key: 0, | 244 | key: 0, |
195 | tableData: [], | 245 | tableData: [], |
196 | tableData1: [ | ||
197 | { | ||
198 | sfbx: "必选", | ||
199 | clmc: "不动产登记申请书", | ||
200 | cllx: "原件正本", | ||
201 | fs: 2, | ||
202 | smzt: "已扫描", | ||
203 | smys: 4, | ||
204 | }, | ||
205 | { | ||
206 | sfbx: "必选", | ||
207 | clmc: "申请人身份证明", | ||
208 | cllx: "正本复印件", | ||
209 | fs: 1, | ||
210 | smzt: "已扫描", | ||
211 | smys: 6, | ||
212 | }, | ||
213 | { | ||
214 | sfbx: "必选", | ||
215 | clmc: "土地权属来源材", | ||
216 | cllx: "副本复印件", | ||
217 | fs: 1, | ||
218 | smzt: "未扫描", | ||
219 | smys: 0, | ||
220 | }, | ||
221 | { | ||
222 | sfbx: "必选", | ||
223 | clmc: "不动产权籍调查表", | ||
224 | cllx: "副本复印件", | ||
225 | fs: 1, | ||
226 | smzt: "未扫描", | ||
227 | smys: 0, | ||
228 | }, | ||
229 | { | ||
230 | sfbx: "必选", | ||
231 | clmc: "完税凭证", | ||
232 | cllx: "副本复印件", | ||
233 | fs: 1, | ||
234 | smzt: "未扫描", | ||
235 | smys: 0, | ||
236 | }, | ||
237 | ], | ||
238 | |||
239 | treedata: [ | ||
240 | { | ||
241 | id: "clml", | ||
242 | label: "材料目录", | ||
243 | children: [ | ||
244 | { | ||
245 | id: "bdcdjsqs", | ||
246 | label: "不动产登记申请书", | ||
247 | }, | ||
248 | { | ||
249 | id: "sqrsfzm", | ||
250 | label: "申请人身份证明", | ||
251 | }, | ||
252 | { | ||
253 | id: "tdqslycl", | ||
254 | label: "土地权属来源材料", | ||
255 | }, | ||
256 | { | ||
257 | id: "bdcqjdcb", | ||
258 | label: "不动产权籍调查表", | ||
259 | }, | ||
260 | { | ||
261 | id: "wspz", | ||
262 | label: "完税凭证", | ||
263 | }, | ||
264 | ], | ||
265 | }, | ||
266 | ], | ||
267 | menuOpen: true, | 246 | menuOpen: true, |
268 | treeCheckId: "bdcdjsqs", | 247 | treeCheckId: "", |
269 | defaultProps: { | 248 | defaultProps: { |
270 | children: "children", | 249 | children: "children", |
271 | label: "label", | 250 | label: "label", |
272 | }, | 251 | }, |
273 | defaultKey: "bdcdjsqs", | 252 | title: "", |
274 | title: "不动产登记申请书 (1/2)", | 253 | titleYs: 1, |
275 | imgList: [ | 254 | titleNum: 0, |
276 | { | 255 | imgList:[], |
277 | id: "1", | 256 | showImg:{}, |
278 | imgUrl: require("../images/1.png"), | ||
279 | }, | ||
280 | { | ||
281 | id: "2", | ||
282 | imgUrl: require("../images/2.png"), | ||
283 | }, | ||
284 | { | ||
285 | id: "3", | ||
286 | imgUrl: require("../images/3.png"), | ||
287 | }, | ||
288 | ], | ||
289 | showImg: { | ||
290 | id: "1", | ||
291 | imgUrl: require("../images/1.png"), | ||
292 | }, | ||
293 | iclass: "itemIcon el-icon-caret-bottom", | 257 | iclass: "itemIcon el-icon-caret-bottom", |
294 | }; | 258 | }; |
295 | }, | 259 | }, |
296 | watch: { | 260 | computed: { |
297 | unitData: { | 261 | ...mapGetters(["dictData"]), |
298 | handler(newName, oldName) { | 262 | }, |
299 | if (newName && newName.length > 0) { | 263 | mounted() { |
264 | if (this.$parent.index == 1) { | ||
300 | this.clmlmxInit(); | 265 | this.clmlmxInit(); |
301 | } | 266 | } |
302 | }, | 267 | }, |
303 | immediate: true, | ||
304 | }, | ||
305 | }, | ||
306 | methods: { | 268 | methods: { |
307 | // 左侧菜单点击 | 269 | // 左侧菜单点击 |
308 | menuClick(item) { | 270 | menuClick(item) { |
... | @@ -314,36 +276,87 @@ export default { | ... | @@ -314,36 +276,87 @@ export default { |
314 | }, | 276 | }, |
315 | // 上移 | 277 | // 上移 |
316 | moveUpward(index, row) { | 278 | moveUpward(index, row) { |
317 | upward(index, this.tableData); | 279 | let obj = { |
280 | xh: row.xh, | ||
281 | bsmSlsq: row.bsmSlsq, | ||
282 | moveDirection: "up", | ||
283 | }; | ||
284 | // 接口待调 | ||
285 | move(obj).then((res) => { | ||
286 | console.log("111111", res); | ||
287 | this.clmlmxInit(); | ||
288 | }); | ||
318 | }, | 289 | }, |
319 | // 下移 | 290 | // 下移 |
320 | moveDown(index, row) { | 291 | moveDown(index, row) { |
321 | down(index, this.tableData); | 292 | let obj = { |
293 | xh: row.xh, | ||
294 | bsmSlsq: row.bsmSlsq, | ||
295 | moveDirection: "down", | ||
296 | }; | ||
297 | // 接口待调 | ||
298 | move(obj).then((res) => { | ||
299 | console.log("222222222", res); | ||
300 | this.clmlmxInit(); | ||
301 | }); | ||
322 | }, | 302 | }, |
323 | // 材料目录明细初始化 | 303 | // 材料目录明细初始化 |
324 | clmlmxInit() { | 304 | clmlmxInit() { |
305 | this.id = this.$parent.$parent.$parent.id; | ||
306 | this.unitData = this.$parent.$parent.$parent.unitData; | ||
325 | var formdata = new FormData(); | 307 | var formdata = new FormData(); |
326 | formdata.append("bsmSldy", this.unitData[0].bsmSldy); | 308 | formdata.append("bsmSldy", this.unitData[0].bsmSldy); |
327 | formdata.append("bsmSlsq", this.id); | 309 | formdata.append("bsmSlsq", this.id); |
328 | clmlInit(formdata).then((res) => { | 310 | clmlInit(formdata).then((res) => { |
329 | if (res.result.result) { | 311 | if (res.result.result) { |
330 | this.tableData = res.result.result; | 312 | this.tableData = res.result.result; |
313 | this.treeCheckId = this.tableData[0].bsmSj; | ||
314 | this.title = this.tableData[0].sjmc; | ||
315 | this.titleYs = 1; | ||
316 | this.titleNum = this.tableData[0].children.length; | ||
331 | } | 317 | } |
332 | }); | 318 | }); |
333 | }, | 319 | }, |
334 | // 新增弹窗保存 | 320 | // 新增弹窗保存 |
335 | addSave(data){ | 321 | addSave(data) { |
336 | let obj = [...this.tableData]; | 322 | let maxXh = 0; |
337 | obj.push({ | 323 | this.tableData.forEach((item) => { |
338 | bsmSlsq:this.id, | 324 | if (item.xh > maxXh) { |
339 | xh: this.tableData.length + 1, | 325 | maxXh = item.xh; |
340 | isrequired:'0', | 326 | } |
341 | sjmc:data.clmc, | 327 | }); |
342 | sjlx:data.cllx | 328 | let obj = { |
343 | }) | 329 | bsmSlsq: this.id, |
344 | save(obj).then(res => { | 330 | xh: maxXh + 1, |
345 | console.log('22222',res); | 331 | isrequired: "0", |
346 | }) | 332 | sjmc: data.clmc, |
333 | sjlx: data.cllx, | ||
334 | sfxjcl: "1", // 是否是新建材料 | ||
335 | }; | ||
336 | save(obj).then((res) => { | ||
337 | if (res.code == 200) { | ||
338 | this.$message({ | ||
339 | message: "新增成功", | ||
340 | type: "success", | ||
341 | }); | ||
342 | this.tableData = res.result; | ||
343 | // 加载表格 | ||
344 | this.clmlmxInit(); | ||
345 | } | ||
346 | }); | ||
347 | }, | ||
348 | // 材料目录删除 | ||
349 | handleDelete(index, row) { | ||
350 | clmlDelete({ sjBsm: row.bsmSj }).then((res) => { | ||
351 | if (res.code == 200) { | ||
352 | this.$message({ | ||
353 | message: "删除成功", | ||
354 | type: "success", | ||
355 | }); | ||
356 | // 加载表格 | ||
357 | this.clmlmxInit(); | ||
358 | } | ||
359 | }); | ||
347 | }, | 360 | }, |
348 | // 材料目录关闭收起 | 361 | // 材料目录关闭收起 |
349 | iconClick() { | 362 | iconClick() { |
... | @@ -356,11 +369,36 @@ export default { | ... | @@ -356,11 +369,36 @@ export default { |
356 | }, | 369 | }, |
357 | // 材料目录点击选中 | 370 | // 材料目录点击选中 |
358 | treeClick(item) { | 371 | treeClick(item) { |
359 | this.treeCheckId = item.id; | 372 | this.treeCheckId = item.bsmSj; |
373 | this.title = item.sjmc; | ||
374 | this.titleYs = 1; | ||
375 | this.titleNum = item.children.length; | ||
360 | }, | 376 | }, |
361 | // 小图片点击 | 377 | // 小图片点击 |
362 | imgClick(item) { | 378 | imgClick(item, index) { |
363 | this.showImg = item; | 379 | this.showImg = item; |
380 | this.titleYs = index + 1; | ||
381 | }, | ||
382 | // 图片上一张 | ||
383 | imgPrev(){ | ||
384 | |||
385 | }, | ||
386 | // 图片下一张 | ||
387 | imgNext(){ | ||
388 | |||
389 | }, | ||
390 | // 字典 | ||
391 | dicStatus(val, code) { | ||
392 | let data = this.$store.getters.dictData[code], | ||
393 | name = "暂无"; | ||
394 | if (data) { | ||
395 | data.map((item) => { | ||
396 | if (item.dcode == val) { | ||
397 | name = item.dname; | ||
398 | } | ||
399 | }); | ||
400 | return name; | ||
401 | } | ||
364 | }, | 402 | }, |
365 | }, | 403 | }, |
366 | }; | 404 | }; |
... | @@ -489,6 +527,7 @@ export default { | ... | @@ -489,6 +527,7 @@ export default { |
489 | height: 800px; | 527 | height: 800px; |
490 | background: #f3f4f7; | 528 | background: #f3f4f7; |
491 | margin: 0 auto; | 529 | margin: 0 auto; |
530 | position: relative; | ||
492 | .header { | 531 | .header { |
493 | height: 54px; | 532 | height: 54px; |
494 | line-height: 52px; | 533 | line-height: 52px; |
... | @@ -509,6 +548,30 @@ export default { | ... | @@ -509,6 +548,30 @@ export default { |
509 | } | 548 | } |
510 | } | 549 | } |
511 | } | 550 | } |
551 | .prev, | ||
552 | .next { | ||
553 | width: 60px; | ||
554 | height: 60px; | ||
555 | line-height: 60px; | ||
556 | text-align: center; | ||
557 | font-size: 40px; | ||
558 | border-radius: 6px; | ||
559 | cursor: pointer; | ||
560 | position: absolute; | ||
561 | } | ||
562 | .prev:hover, | ||
563 | .next:hover{ | ||
564 | background: #7a7a7a; | ||
565 | } | ||
566 | |||
567 | .prev { | ||
568 | top: 40%; | ||
569 | left: 10px; | ||
570 | } | ||
571 | .next { | ||
572 | top: 40%; | ||
573 | right: 10px; | ||
574 | } | ||
512 | .img-box { | 575 | .img-box { |
513 | width: 800px; | 576 | width: 800px; |
514 | height: calc(100% - 214px); | 577 | height: calc(100% - 214px); | ... | ... |
... | @@ -43,7 +43,8 @@ | ... | @@ -43,7 +43,8 @@ |
43 | <div class="splitScreen-con" v-if='index == 0'> | 43 | <div class="splitScreen-con" v-if='index == 0'> |
44 | <component ref='slxx' :is="editItem" :flag="flag" :key="key" /> | 44 | <component ref='slxx' :is="editItem" :flag="flag" :key="key" /> |
45 | </div> | 45 | </div> |
46 | <component :is="editItem" v-else :key="key" :unitData="unitData" :id="id" /> | 46 | <component ref='clxx' :is="editItem" v-else-if="index == 1" :key="key" /> |
47 | <component :is="editItem" v-else :key="key" /> | ||
47 | </el-tab-pane> | 48 | </el-tab-pane> |
48 | </el-tabs> | 49 | </el-tabs> |
49 | </div> | 50 | </div> | ... | ... |
-
Please register or sign in to post a comment