088ec5ed by 任超

style:业务申请模块重构

1 parent e377d71b
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 flex-direction: column; 30 flex-direction: column;
31 31
32 .item-list { 32 .item-list {
33 max-height: calc(100vh - 380px); 33 max-height: calc(100vh - 360px);
34 overflow-y: auto; 34 overflow-y: auto;
35 } 35 }
36 36
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
146 flex: 1; 146 flex: 1;
147 width: 100%; 147 width: 100%;
148 padding: 3px; 148 padding: 3px;
149
149 } 150 }
150 151
151 p:nth-child(2) { 152 p:nth-child(2) {
...@@ -189,7 +190,7 @@ ...@@ -189,7 +190,7 @@
189 cursor: pointer; 190 cursor: pointer;
190 margin-bottom: 15px; 191 margin-bottom: 15px;
191 192
192 p { 193 p:nth-child(2) {
193 @include flex-center; 194 @include flex-center;
194 } 195 }
195 196
...@@ -202,6 +203,9 @@ ...@@ -202,6 +203,9 @@
202 flex: 1; 203 flex: 1;
203 width: 100%; 204 width: 100%;
204 padding: 3px; 205 padding: 3px;
206 padding-left: 30px;
207 display: flex;
208 align-items: center;
205 } 209 }
206 210
207 p:nth-child(2) { 211 p:nth-child(2) {
......
...@@ -31,37 +31,21 @@ ...@@ -31,37 +31,21 @@
31 </ul> 31 </ul>
32 </div> 32 </div>
33 <div class="right-situation el-card box-card is-always-shadow"> 33 <div class="right-situation el-card box-card is-always-shadow">
34 <div v-if="n >= 0"> 34 <div class="right-title">{{ obj[n] }}</div>
35 <div class="right-title">常办业务列表</div>
36 <ul> 35 <ul>
37 <li v-for="(item, index) in ywList" :key="index" @click="handleSelectYw(item, ywList)" 36 <li v-for="(item, index) in itemList" :key="index" @click="handleSelectYw(item, ywList)"
38 :class="item.cselect ? 'cactive' : ''"> 37 :class="item.cselect ? 'cactive' : ''">
39 <p> 38 <p>
40 {{ item.djywmc }}<br> 39 {{ item.djywmc }}<br>
41 {{ item.nodename }} 40 {{ item.nodename }}
42 </p> 41 </p>
43 42
44 <p v-if="item.sffqlc == 1" class="active" @click.stop="handleCollection(item)">
45 <i class="el-icon-star-off active"></i>
46 </p>
47 </li>
48 </ul>
49 </div>
50 <div v-if="n == -1">
51 <div class="right-title">登记情形</div>
52 <ul class="registration">
53 <li v-for="(item, index) in djqxList" @click="handleSelectYw(item, djqxList)"
54 :class="item.cselect ? 'cactive' : ''" :key="index">
55 <p>
56 {{ item.nodename }}
57 </p>
58 <p :class="item.userCollect == 1 ? 'active' : ''" @click.stop="handleCollection(item)"> 43 <p :class="item.userCollect == 1 ? 'active' : ''" @click.stop="handleCollection(item)">
59 <i class="el-icon-star-off" :class="item.userCollect == 1 ? 'active' : ''"></i> 44 <i class="el-icon-star-off" :class="item.userCollect == 1 ? 'active' : ''"></i>
60 </p> 45 </p>
61 </li> 46 </li>
62 </ul> 47 </ul>
63 </div> 48 </div>
64 </div>
65 <div class="submit-button"> 49 <div class="submit-button">
66 <el-button type="primary" :disabled="btnDisabled" @click="bthSelectClick">选择不动产</el-button> 50 <el-button type="primary" :disabled="btnDisabled" @click="bthSelectClick">选择不动产</el-button>
67 </div> 51 </div>
...@@ -70,7 +54,6 @@ ...@@ -70,7 +54,6 @@
70 </div> 54 </div>
71 </template> 55 </template>
72 <script> 56 <script>
73 import Cookies from 'js-cookie'
74 import fqsqDialog from "./slectBdc.vue" 57 import fqsqDialog from "./slectBdc.vue"
75 import { getCollectBiz, getleftMenu, getNextNode, addCollectBiz, deleteCollectBiz } from "@/api/ywbl" 58 import { getCollectBiz, getleftMenu, getNextNode, addCollectBiz, deleteCollectBiz } from "@/api/ywbl"
76 export default { 59 export default {
...@@ -81,10 +64,17 @@ export default { ...@@ -81,10 +64,17 @@ export default {
81 leftList: [ 64 leftList: [
82 '常办业务', '一并申请', '登记簿补录', 65 '常办业务', '一并申请', '登记簿补录',
83 ], 66 ],
67 // 左侧列表
84 list: [], 68 list: [],
85 djlxList: [], 69 djlxList: [],
70
71 itemList: [],
86 ywList: [], 72 ywList: [],
87 djqxList: [], 73 djqxList: [],
74 obj: {
75 '0': '常办业务列表',
76 '-1': '登记情形'
77 },
88 isDialog: false, 78 isDialog: false,
89 btnDisabled: true, 79 btnDisabled: true,
90 djywbm: '', 80 djywbm: '',
...@@ -104,12 +94,16 @@ export default { ...@@ -104,12 +94,16 @@ export default {
104 }, 94 },
105 methods: { 95 methods: {
106 getDataList () { 96 getDataList () {
107 getCollectBiz({ 'target': '#ywsq' }).then(res => { 97 getCollectBiz().then(res => {
108 let { result } = res 98 let { result } = res
109 this.ywList = result 99 this.ywList = result
110 this.ywList.forEach(item => { 100 this.ywList.forEach(item => {
111 this.$set(item, 'cselect', false) 101 this.$set(item, 'cselect', false)
102 item.userCollect = 1
112 }) 103 })
104 if (this.n == 0) {
105 this.itemList = this.ywList
106 }
113 }) 107 })
114 getleftMenu().then(res => { 108 getleftMenu().then(res => {
115 let { result } = res 109 let { result } = res
...@@ -118,9 +112,14 @@ export default { ...@@ -118,9 +112,14 @@ export default {
118 }, 112 },
119 handleleftTitle (index) { 113 handleleftTitle (index) {
120 this.n = index 114 this.n = index
115 let obj = {
116 '0': this.ywList
117 }
118 this.itemList = obj[this.n]
121 this.list.forEach(item => { 119 this.list.forEach(item => {
122 if (item.check) item.check = false 120 if (item.check) item.check = false
123 }) 121 })
122
124 }, 123 },
125 // 业务-登记情形选择 124 // 业务-登记情形选择
126 handleSelectYw (item, list) { 125 handleSelectYw (item, list) {
...@@ -135,7 +134,6 @@ export default { ...@@ -135,7 +134,6 @@ export default {
135 this.btnDisabled = false 134 this.btnDisabled = false
136 this.bsmSqyw = item.bsmSqyw 135 this.bsmSqyw = item.bsmSqyw
137 this.djywbm = item.djywbm 136 this.djywbm = item.djywbm
138 console.log(this.djywbm, 'this.djywbm');
139 } 137 }
140 }, 138 },
141 handleList (list, obj) { 139 handleList (list, obj) {
...@@ -147,11 +145,11 @@ export default { ...@@ -147,11 +145,11 @@ export default {
147 this.$set(obj, 'check', true) 145 this.$set(obj, 'check', true)
148 this.getNextNode(obj.bsmSqyw) 146 this.getNextNode(obj.bsmSqyw)
149 this.djqxList = [] 147 this.djqxList = []
150 this.djlxList = [] 148 this.itemList = []
151 }, 149 },
152 // 获取下个节点类型 150 // 获取下个节点类型
153 getNextNode (bsmSqyw, type) { 151 getNextNode (bsmSqyw, type = true) {
154 getNextNode(bsmSqyw, { 'target': '#ywsq' }).then(res => { 152 getNextNode(bsmSqyw).then(res => {
155 if (res.result.djqx) this.djqxList = res.result.djqx 153 if (res.result.djqx) this.djqxList = res.result.djqx
156 if (res.result.djlx) this.djlxList = res.result.djlx 154 if (res.result.djlx) this.djlxList = res.result.djlx
157 if (type) { 155 if (type) {
...@@ -162,6 +160,7 @@ export default { ...@@ -162,6 +160,7 @@ export default {
162 this.$set(item, 'cselect', false) 160 this.$set(item, 'cselect', false)
163 }) 161 })
164 } 162 }
163 this.itemList = this.djqxList
165 }) 164 })
166 }, 165 },
167 handleCollection (item) { 166 handleCollection (item) {
...@@ -178,6 +177,11 @@ export default { ...@@ -178,6 +177,11 @@ export default {
178 } 177 }
179 }) 178 })
180 } else { 179 } else {
180 this.$confirm('此操作将取消收藏, 是否继续?', '提示', {
181 confirmButtonText: '确定',
182 cancelButtonText: '取消',
183 type: 'warning'
184 }).then(() => {
181 deleteCollectBiz(item.bsmSqyw).then(res => { 185 deleteCollectBiz(item.bsmSqyw).then(res => {
182 if (res.code == 200) { 186 if (res.code == 200) {
183 item.userCollect = '2' 187 item.userCollect = '2'
...@@ -188,6 +192,12 @@ export default { ...@@ -188,6 +192,12 @@ export default {
188 that.getDataList() 192 that.getDataList()
189 } 193 }
190 }) 194 })
195 }).catch(() => {
196 this.$message({
197 type: 'info',
198 message: '已取消收藏'
199 })
200 })
191 } 201 }
192 }, 202 },
193 handleSelect (item) { 203 handleSelect (item) {
...@@ -198,11 +208,11 @@ export default { ...@@ -198,11 +208,11 @@ export default {
198 }, 208 },
199 // 登记类型 209 // 登记类型
200 handleDjlxSelect (item) { 210 handleDjlxSelect (item) {
201 this.btnDisabled = true
202 this.djlxList.forEach(item => { 211 this.djlxList.forEach(item => {
203 if (item.cselect) item.cselect = false 212 item.cselect = false
204 }) 213 })
205 this.$set(item, 'cselect', true) 214 this.btnDisabled = true
215 item.cselect = true
206 if (item.sffqlc == '1') { 216 if (item.sffqlc == '1') {
207 this.btnDisabled = false 217 this.btnDisabled = false
208 this.bsmSqyw = item.bsmSqyw 218 this.bsmSqyw = item.bsmSqyw
......