378199b5 by “miaofang

--no commit message

1 parent 0a3c79ce
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
14 :default-expand-all="true" 14 :default-expand-all="true"
15 :expand-on-click-node="false" 15 :expand-on-click-node="false"
16 node-key="id" 16 node-key="id"
17 :default-checked-keys="[showTab]"> 17 :default-checked-keys="[showTab]"
18 >
18 </el-tree> 19 </el-tree>
19 <el-collapse v-model="activeName" accordion> 20 <el-collapse v-model="activeName" accordion>
20 <el-collapse-item 21 <el-collapse-item
...@@ -22,22 +23,27 @@ ...@@ -22,22 +23,27 @@
22 ref="sfq" 23 ref="sfq"
23 v-for="(item, index) in sfqdata" 24 v-for="(item, index) in sfqdata"
24 :key="index" 25 :key="index"
25 :name="index"> 26 :name="index"
27 >
26 <template slot="title"> 28 <template slot="title">
27 <span class="text" @click="addlist(item)"> 29 <span class="text" @click="tap(item, index)">
28 <span> 30 <span> {{ item.label }}</span>
29 {{ item.label }}
30 </span>
31 </span> 31 </span>
32 </template> 32 </template>
33 <el-button 33 <p
34 v-for="(item, index) in item.children" 34 v-for="(item, index) in item.children"
35 :re='item' 35 :re="item"
36 :key="index" 36 :key="index"
37 class="sfqcontent" 37 :class="[isActive == index ? activeCls : '', errorCls]"
38 @click="addlist(item, index)"> 38 @click="taplist(item, index)"
39 {{ item.label }} 39 >
40 </el-button> 40 <span>
41 {{ item.label }}
42 </span>
43 <span>
44 {{ item.zt }}
45 </span>
46 </p>
41 </el-collapse-item> 47 </el-collapse-item>
42 </el-collapse> 48 </el-collapse>
43 </div> 49 </div>
...@@ -45,292 +51,298 @@ ...@@ -45,292 +51,298 @@
45 <component 51 <component
46 :is="componentTag" 52 :is="componentTag"
47 @getBdcdyh="getBdcdyh" 53 @getBdcdyh="getBdcdyh"
48 v-bind="currentSelectProps" /> 54 v-bind="currentSelectProps"
55 />
49 </div> 56 </div>
50 </div> 57 </div>
51 </template> 58 </template>
52 <script> 59 <script>
53 import { getBdcqljqtsx } from "@/api/djbDetail.js"; 60 import { getBdcqljqtsx } from "@/api/djbDetail.js";
54 import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js"; 61 import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js";
55 export default { 62 export default {
56 data () { 63 data() {
57 return { 64 return {
58 activeName: 0, 65 activeName: 0,
59 //接收参数 66 //接收参数
60 // propsParam: this.$attrs, 67 // propsParam: this.$attrs,
61 //左侧目录 68 //左侧目录
62 catalog: {}, 69 catalog: {},
63 //选择加载哪一个组件 70 //选择加载哪一个组件
64 componentTag: "", 71 componentTag: "",
65 //子组件接收参数 72 //子组件接收参数
66 currentSelectProps: {}, 73 currentSelectProps: {},
67 //左侧树形结构数据 74 //左侧树形结构数据
68 treedata: [], 75 treedata: [],
69 sfqdata: [], 76 sfqdata: [],
70 keyy: "", 77 keyy: "",
71 iskey: "", 78 iskey: "",
72 defaultNode: "", 79 defaultNode: "",
73 defaultProps: { 80 isActive: "",
74 value: "id", 81 activeCls: "select",
75 children: "children", 82 errorCls: "unselected",
76 label: "label", 83 defaultProps: {
77 }, 84 value: "id",
78 showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断 85 children: "children",
79 }; 86 label: "label",
80 },
81 props: ["formData"],
82 mounted () {
83 this.loadData(this.formData.bdcdyh);
84 },
85 methods: {
86 /**
87 * @description: getBdcdyh
88 * @author: miaofang
89 * 点击不动产单元号事件
90 */
91 getBdcdyh (val) {
92 this.addloadData(val);
93 }, 87 },
94 /** 88 showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断
95 * @description: addloadData 89 };
96 * @author: miaofang 90 },
97 */ 91 props: ["formData"],
98 addloadData (val) { 92 mounted() {
99 getBdcqljqtsx({ 93 this.loadData(this.formData.bdcdyh);
100 bdcdyid: val.bdcdyid, 94 },
101 bdcdyh: val.bdcdyh, 95 methods: {
102 }).then((res) => { 96 /**
103 if (res.code === 200) { 97 * @description: getBdcdyh
104 if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) { 98 * @author: miaofang
105 let index = this.sfqdata.findIndex((item) => { 99 * 点击不动产单元号事件
106 return item.bdcdyid == val.bdcdyid; 100 */
107 }); 101 getBdcdyh(val) {
108 this.activeName = index 102 this.addloadData(val);
109 this.setstyle(index, 0, this.iskey); 103 },
110 } else { 104 /**
111 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); 105 * @description: addloadData
112 this.activeName = this.sfqdata.length - 1; 106 * @author: miaofang
113 this.$nextTick(() => { 107 */
114 this.setstyle(this.sfqdata.length - 1, 0, this.iskey); 108 addloadData(val) {
115 }) 109 getBdcqljqtsx({
116 } 110 bdcdyid: val.bdcdyid,
111 bdcdyh: val.bdcdyh,
112 }).then((res) => {
113 if (res.code === 200) {
114 if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) {
115 let index = this.sfqdata.findIndex((item) => {
116 return item.bdcdyid == val.bdcdyid;
117 });
118 this.activeName = index;
119
120 // this.setstyle(index, 0, this.iskey);
121 } else {
122 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid));
123 this.activeName = this.sfqdata.length - 1;
124 // this.$nextTick(() => {
125 // this.setstyle(this.sfqdata.length - 1, 0, this.iskey);
126 // })
117 } 127 }
118 });
119 this.currentSelectProps = {
120 bdcdyid: val.bdcdyid,
121 bdcdyh: val.bdcdyh,
122 qllx: this.formData.qllx,
123 bsmQlxx: this.formData.bsmQlxx,
124 } 128 }
125 }, 129 });
126 /** 130 this.currentSelectProps = {
127 * @description: loadData 131 bdcdyid: val.bdcdyid,
128 * @author: renchao 132 bdcdyh: val.bdcdyh,
129 */ 133 qllx: this.formData.qllx,
130 loadData (val) { 134 bsmQlxx: this.formData.bsmQlxx,
131 getBdcqljqtsx({ 135 };
132 bdcdyid: this.formData.bdcdyid, 136 },
133 bdcdyh: val, 137 /**
134 }).then((res) => { 138 * @description: loadData
135 if (res.code === 200) { 139 * @author: renchao
136 this.treedata = loadTreeData(val); 140 */
137 this.sfqdata.push( 141 loadData(val) {
138 loadsfqData(res.result, val, this.formData.bdcdyid) 142 getBdcqljqtsx({
143 bdcdyid: this.formData.bdcdyid,
144 bdcdyh: val,
145 }).then((res) => {
146 if (res.code === 200) {
147 this.treedata = loadTreeData(val);
148 this.sfqdata.push(
149 loadsfqData(res.result, val, this.formData.bdcdyid)
150 );
151 this.$nextTick(function () {
152 this.defaultNode = getNode(
153 this.formData.qllx,
154 { linShi: 0, xianShi: 0, liShi: 0 },
155 res.result.bdcdylx || ""
139 ); 156 );
140 this.$nextTick(function () { 157 this.sfqdata[0].children.forEach((item, index) => {
141 this.defaultNode = getNode( 158 if (item.id == this.defaultNode.id) {
142 this.formData.qllx, 159 this.loadComponent(item.form);
143 { linShi: 0, xianShi: 0, liShi: 0 }, 160 this.isActive = index;
144 res.result.bdcdylx || "" 161 }
145 ); 162 });
146 this.sfqdata[0].children.forEach((item, index) => { 163 // this.setstyle(0, 0, this.iskey);
147 if (item.id == this.defaultNode.id) {
148 this.iskey = index
149 }
150 })
151 this.setstyle(0, 0, this.iskey);
152 })
153 }
154 })
155 this.currentSelectProps = {
156 bdcdyid: this.formData.bdcdyid,
157 bdcdyh: val,
158 qllx: this.formData.qllx,
159 bsmQlxx: this.formData.bsmQlxx,
160 }
161 },
162 /**
163 * @description: handleNodeClick
164 * @param {*} data
165 * @author: renchao
166 */
167 handleNodeClick (data) {
168 this.loadComponent(data.form);
169 },
170 setstyle (newindex, index, key) {
171 if (key != undefined || this.keyy == index) {
172 if (key != undefined) {
173 this.keyy = key
174 }
175 this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form);
176 let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
177 dpme.style.backgroundColor = "#f5f5f5";
178 dpme.style.color = "#0079fe";
179 dpme.style.borderRight = "4px solid #0079fe";
180 } else {
181 let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
182 dpme.style.backgroundColor = "#ffffff";
183 dpme.style.color = "black";
184 dpme.style.border = "none";
185 }
186 },
187 /**
188 * @description: addlist
189 * @param {*} data
190 * @author: renchao
191 * 新增列表功能
192 */
193 addlist (data, index) {
194 if (index != undefined) {
195 let newindex = this.sfqdata.findIndex((item) => {
196 return item.bdcdyid == data.bdcdyid;
197 });
198 this.setstyle(newindex, index);
199 this.currentSelectProps.bdcdyid = data.bdcdyid;
200 this.loadComponent(data.form);
201 } else {
202 this.loadComponent(data.form);
203 let newindex = this.sfqdata.findIndex((item) => {
204 return item.bdcdyid == data.bdcdyid;
205 }); 164 });
206 this.setstyle(newindex, index);
207 } 165 }
208 166 });
209 }, 167 this.currentSelectProps = {
210 /** 168 bdcdyid: this.formData.bdcdyid,
211 * @description: loadComponent 169 bdcdyh: val,
212 * @param {*} form 170 qllx: this.formData.qllx,
213 * @author: renchao 171 bsmQlxx: this.formData.bsmQlxx,
214 */ 172 };
215 loadComponent (form) { 173 },
216 console.log(form, 'form'); 174 /**
217 this.componentTag = (r) => 175 * @description: handleNodeClick
218 require.ensure([], () => r(require("@/views/registerBook/" + form))); 176 * @param {*} data
219 } 177 * @author: renchao
220 } 178 */
221 } 179 handleNodeClick(data) {
180 this.loadComponent(data.form);
181 },
182 // setstyle(newindex, index, key) {
183 // if (key != undefined || this.keyy == index) {
184 // if (key != undefined) {
185 // this.keyy = key;
186 // }
187 // this.loadComponent(
188 // this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form
189 // );
190 // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el;
191 // dpme.style.backgroundColor = "#f5f5f5";
192 // dpme.style.color = "#0079fe";
193 // dpme.style.borderRight = "4px solid #0079fe";
194 // } else {
195 // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el;
196 // dpme.style.backgroundColor = "#ffffff";
197 // dpme.style.color = "black";
198 // dpme.style.border = "none";
199 // }
200 // },
201 /**
202 * @description: addlist
203 * @param {*} data
204 * @author: renchao
205 * 新增列表功能
206 */
207 tap(data, index) {
208 this.loadComponent(data.form);
209 },
210 taplist(data, index) {
211 this.loadComponent(data.form);
212 this.isActive = index;
213 },
214 /**
215 * @description: loadComponent
216 * @param {*} form
217 * @author: renchao
218 */
219 loadComponent(form) {
220 console.log(form, "form");
221 this.componentTag = (r) =>
222 require.ensure([], () => r(require("@/views/registerBook/" + form)));
223 },
224 },
225 };
222 </script> 226 </script>
223 <style scoped lang="scss"> 227 <style scoped lang="scss">
224 /deep/.rollTable { 228 /deep/.rollTable {
225 height: calc(100vh - 300px) !important; 229 height: calc(100vh - 300px) !important;
226 } 230 }
227 231
228 .content { 232 .content {
229 width: 100%; 233 width: 100%;
230 height: 100%; 234 height: 100%;
231 display: flex; 235 display: flex;
232 236
233 .left { 237 .left {
234 width: 256px; 238 width: 256px;
235 height: 704px; 239 height: 704px;
236 background-color: #f5f5f5; 240 background-color: #f5f5f5;
237 color: #333; 241 color: #333;
238 border: 1px solid rgb(228, 228, 228); 242 border: 1px solid rgb(228, 228, 228);
239 overflow-y: auto; 243 overflow-y: auto;
240 }
241
242 .right {
243 width: calc(100% - 256px);
244 height: 704px;
245 // overflow-y: scroll;
246 // overflow: auto;
247 background-color: #f5f5f5;
248 border: 1px solid rgb(228, 228, 228);
249 }
250 }
251
252 /deep/ .expanded.el-tree-node__expand-icon,
253 /deep/ .el-tree-node__expand-icon {
254 visibility: hidden;
255 } 244 }
256 245
257 /deep/ .el-tree-node__content { 246 .right {
247 width: calc(100% - 256px);
248 height: 704px;
249 // overflow-y: scroll;
250 // overflow: auto;
251 background-color: #f5f5f5;
258 border: 1px solid rgb(228, 228, 228); 252 border: 1px solid rgb(228, 228, 228);
259 height: 45px;
260 } 253 }
254 }
261 255
262 /deep/ .el-tree-node:focus > .el-tree-node__content { 256 /deep/ .expanded.el-tree-node__expand-icon,
263 // background-color: #f5f5f5; 257 /deep/ .el-tree-node__expand-icon {
264 // color: #0079fe; 258 visibility: hidden;
265 // border-right: 4px solid #0079fe; 259 }
266 }
267 260
268 /deep/.el-tree-node { 261 /deep/ .el-tree-node__content {
269 white-space: pre-wrap; 262 border: 1px solid rgb(228, 228, 228);
270 } 263 height: 45px;
264 }
271 265
272 /deep/ .is-current > .el-tree-node__content { 266 /deep/ .el-tree-node:focus > .el-tree-node__content {
273 // background-color: #f5f5f5; 267 // background-color: #f5f5f5;
274 // color: #0079fe; 268 // color: #0079fe;
275 // border-right: 4px solid #0079fe; 269 // border-right: 4px solid #0079fe;
276 } 270 }
271
272 /deep/.el-tree-node {
273 white-space: pre-wrap;
274 }
277 275
278 /deep/.el-collapse-item__header { 276 /deep/ .is-current > .el-tree-node__content {
277 // background-color: #f5f5f5;
278 // color: #0079fe;
279 // border-right: 4px solid #0079fe;
280 }
281
282 /deep/.el-collapse-item__header {
283 width: 100%;
284 cursor: pointer;
285 position: relative;
286 .el-collapse-item__arrow {
287 position: absolute;
288 top: 15px;
289 right: 0px;
290 }
291 align-items: center;
292 .text {
279 width: 100%; 293 width: 100%;
280 cursor: pointer;
281 position: relative;
282 .el-collapse-item__arrow {
283 position: absolute;
284 top: 15px;
285 right: 0px;
286 }
287 align-items: center;
288 .text {
289 width: 100%;
290 height: 45px;
291 display: inline-block;
292 span {
293 margin-left: 60px;
294 padding-top: 10px;
295 display: inline-block;
296 line-height: 15px;
297 }
298 }
299 height: 45px; 294 height: 45px;
300 display: inline-block; 295 display: inline-block;
301 line-height: 45px;
302 border: 1px solid rgb(228, 228, 228);
303 }
304 /deep/.el-collapse-item__content {
305 padding-bottom: 5px;
306 }
307 /deep/.sfqcontent {
308 white-space: wrap;
309 border: none;
310 padding: 0;
311 margin: 0;
312 cursor: pointer;
313 width: 100%;
314 height: 100px;
315 word-break: break-word;
316 display: inline;
317 span { 296 span {
318 font-size: 13px; 297 margin-left: 60px;
319 display: block; 298 padding-top: 10px;
299 display: inline-block;
320 line-height: 15px; 300 line-height: 15px;
321 margin-left: 70px;
322 } 301 }
323 height: 45px;
324 border: 1px solid rgb(228, 228, 228);
325 border-right: 4px solid #f5f5f5;
326 } 302 }
327 .sfqcontent:hover { 303 height: 45px;
328 background-color: #f5f5f5; 304 display: inline-block;
329 color: black; 305 line-height: 45px;
306 border: 1px solid rgb(228, 228, 228);
307 }
308 /deep/.el-collapse-item__content {
309 padding-bottom: 5px;
310 }
311 /deep/.unselected {
312 // white-space: wrap;
313 border: none;
314 cursor: pointer;
315 width: 250px;
316 height: 45px;
317 border: 1px solid rgb(228, 228, 228);
318 border-right: 4px solid #f5f5f5;
319 margin: auto;
320 text-align: center;
321 align-items: center;
322 span {
323 width: 100%;
324 display: inline-block;
325 justify-content: center;
326 align-items: center;
330 } 327 }
331 .sfqcontent:focus { 328 }
332 background-color: #f5f5f5; 329
333 color: #0079fe; 330 .select {
334 border-right: 4px solid #0079fe; 331 border: none;
332 cursor: pointer;
333 width: 250px;
334 height: 45px;
335 background-color: #f5f5f5;
336 color: #0079fe;
337 border-right: 4px solid #0079fe;
338 margin: auto;
339 text-align: center;
340 align-items: center;
341 span {
342 width: 100%;
343 display: inline-block;
344 justify-content: center;
345 align-items: center;
335 } 346 }
347 }
336 </style> 348 </style>
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-09-15 10:52:40 4 * @LastEditTime: 2023-09-15 10:52:40
5 */ 5 */
...@@ -89,12 +89,12 @@ export function getNode (qllx, qlxx, bdcdylx, bdcdyid) { ...@@ -89,12 +89,12 @@ export function getNode (qllx, qlxx, bdcdylx, bdcdyid) {
89 if (qlxxPage[i].qllx == qllx) { 89 if (qlxxPage[i].qllx == qllx) {
90 if (qllx == "A04" || qllx == "A06" || qllx == "A08") { 90 if (qllx == "A04" || qllx == "A06" || qllx == "A08") {
91 if (bdcdylx == "4") { 91 if (bdcdylx == "4") {
92 node = { bdcdyid: bdcdyid, id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; 92 node = { bdcdyid: bdcdyid, id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
93 } else { 93 } else {
94 node = { bdcdyid: bdcdyid, id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; 94 node = { bdcdyid: bdcdyid, id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
95 } 95 }
96 } else { 96 } else {
97 node = { bdcdyid: bdcdyid, id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; 97 node = { bdcdyid: bdcdyid, id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
98 } 98 }
99 break; 99 break;
100 } 100 }
......
...@@ -26,21 +26,26 @@ ...@@ -26,21 +26,26 @@
26 :name="index" 26 :name="index"
27 > 27 >
28 <template slot="title"> 28 <template slot="title">
29 <span class="text" @click="addlist(item)"> 29 <span class="text" @click="tap(item)">
30 <span> 30 <span>
31 {{ item.label }} 31 {{ item.label }}
32 </span> 32 </span>
33 </span> 33 </span>
34 </template> 34 </template>
35 <el-button 35 <p
36 v-for="(item, index) in item.children" 36 v-for="(item, index) in item.children"
37 :re='item' 37 :re="item"
38 :key="index" 38 :key="index"
39 class="sfqcontent" 39 :class="[isActive == index ? activeCls : '', errorCls]"
40 @click="addlist(item, index)" 40 @click="taplist(item, index)"
41 > 41 >
42 {{ item.label }} 42 <span>
43 </el-button> 43 {{ item.label }}
44 </span>
45 <span>
46 {{ item.zt }}
47 </span>
48 </p>
44 </el-collapse-item> 49 </el-collapse-item>
45 </el-collapse> 50 </el-collapse>
46 </div> 51 </div>
...@@ -79,6 +84,9 @@ export default { ...@@ -79,6 +84,9 @@ export default {
79 queryForm: {}, 84 queryForm: {},
80 85
81 defaultNode: "", 86 defaultNode: "",
87 isActive: "",
88 activeCls: "select",
89 errorCls: "unselected",
82 defaultProps: { 90 defaultProps: {
83 value: "id", 91 value: "id",
84 children: "children", 92 children: "children",
...@@ -176,13 +184,9 @@ export default { ...@@ -176,13 +184,9 @@ export default {
176 return item.bdcdyid == val.bdcdyid; 184 return item.bdcdyid == val.bdcdyid;
177 }); 185 });
178 this.activeName = index 186 this.activeName = index
179 this.setstyle(index, 0, this.iskey);
180 } else { 187 } else {
181 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); 188 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid));
182 this.activeName = this.sfqdata.length - 1; 189 this.activeName = this.sfqdata.length - 1;
183 this.$nextTick(() => {
184 this.setstyle(this.sfqdata.length - 1, 0, this.iskey);
185 })
186 } 190 }
187 } 191 }
188 }); 192 });
...@@ -215,13 +219,14 @@ export default { ...@@ -215,13 +219,14 @@ export default {
215 ); 219 );
216 this.sfqdata[0].children.forEach((item, index) => { 220 this.sfqdata[0].children.forEach((item, index) => {
217 if (item.id == this.defaultNode.id) { 221 if (item.id == this.defaultNode.id) {
218 this.iskey = index 222 this.loadComponent(item.form);
223 this.isActive = index;
219 } 224 }
220 }) 225 })
221 // this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 226 // this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
222 // this.loadComponent(this.defaultNode.form); 227 // this.loadComponent(this.defaultNode.form);
223 228
224 this.setstyle(0, 0, this.iskey); 229 // this.setstyle(0, 0, this.iskey);
225 230
226 231
227 }); 232 });
...@@ -252,50 +257,42 @@ export default { ...@@ -252,50 +257,42 @@ export default {
252 * @author: renchao 257 * @author: renchao
253 * 设置样式和点击定位到当前功能 258 * 设置样式和点击定位到当前功能
254 */ 259 */
255 setstyle (newindex, index, key) { 260 // setstyle (newindex, index, key) {
256 if (key != undefined || this.keyy == index) { 261 // if (key != undefined || this.keyy == index) {
257 if (key != undefined) { 262 // if (key != undefined) {
258 this.keyy = key 263 // this.keyy = key
259 } 264 // }
260 this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form); 265 // this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form);
261 let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el 266 // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
262 dpme.style.backgroundColor = "#f5f5f5"; 267 // dpme.style.backgroundColor = "#f5f5f5";
263 dpme.style.color = "#0079fe"; 268 // dpme.style.color = "#0079fe";
264 dpme.style.borderRight = "4px solid #0079fe"; 269 // dpme.style.borderRight = "4px solid #0079fe";
265 } else { 270 // } else {
266 let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el 271 // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
267 dpme.style.backgroundColor = "#ffffff"; 272 // dpme.style.backgroundColor = "#ffffff";
268 dpme.style.color = "black"; 273 // dpme.style.color = "black";
269 dpme.style.border = "none"; 274 // dpme.style.border = "none";
270 } 275 // }
271 276 // },
272
273
274
275 },
276 /** 277 /**
277 * @description: addlist 278 * @description: tap
278 * @param {*} data 279 * @param {*} data
279 * @author: renchao 280 * @author: renchao
280 * 新增列表功能 281 * 新增列表功能
281 */ 282 */
282 addlist (data, index) { 283 tap(data, index) {
283 if (index != undefined) { 284 this.loadComponent(data.form);
284 let newindex = this.sfqdata.findIndex((item) => { 285 },
285 return item.bdcdyid == data.bdcdyid; 286 /**
286 }); 287 * @description: taplist
287 this.setstyle(newindex, index); 288 * @param {*} data
288 this.currentSelectProps.bdcdyid = data.bdcdyid; 289 * @author: renchao
289 this.loadComponent(data.form); 290 * 新增列表功能
290 } else { 291 */
291 let newindex = this.sfqdata.findIndex((item) => { 292 taplist(data, index) {
292 return item.bdcdyid == data.bdcdyid; 293 this.loadComponent(data.form);
293 }); 294 this.isActive = index;
294 this.setstyle(newindex, index, this.iskey); 295 },
295 this.currentSelectProps.bdcdyid = data.bdcdyid;
296 }
297
298 },
299 /** 296 /**
300 * @description: loadComponent 297 * @description: loadComponent
301 * @param {*} form 298 * @param {*} form
...@@ -390,33 +387,41 @@ export default { ...@@ -390,33 +387,41 @@ export default {
390 /deep/.el-collapse-item__content { 387 /deep/.el-collapse-item__content {
391 padding-bottom: 5px; 388 padding-bottom: 5px;
392 } 389 }
393 /deep/.sfqcontent { 390 /deep/.unselected {
394 white-space: wrap; 391 // white-space: wrap;
395 border: none; 392 border: none;
396 padding: 0;
397 margin: 0;
398 cursor: pointer; 393 cursor: pointer;
399 width: 100%; 394 width: 250px;
400 height: 100px;
401 word-break: break-word;
402 display: inline;
403 span {
404 font-size: 13px;
405 display: block;
406 line-height: 15px;
407 margin-left: 70px;
408 }
409 height: 45px; 395 height: 45px;
410 border: 1px solid rgb(228, 228, 228); 396 border: 1px solid rgb(228, 228, 228);
411 border-right: 4px solid #f5f5f5; 397 border-right: 4px solid #f5f5f5;
398 margin: auto;
399 text-align: center;
400 align-items: center;
401 span {
402 width: 100%;
403 display: inline-block;
404 justify-content: center;
405 align-items: center;
406 }
412 } 407 }
413 .sfqcontent:hover { 408
414 background-color: #f5f5f5; 409 .select {
415 color: black; 410 border: none;
416 } 411 cursor: pointer;
417 .sfqcontent:focus { 412 width: 250px;
413 height: 45px;
418 background-color: #f5f5f5; 414 background-color: #f5f5f5;
419 color: #0079fe; 415 color: #0079fe;
420 border-right: 4px solid #0079fe; 416 border-right: 4px solid #0079fe;
417 margin: auto;
418 text-align: center;
419 align-items: center;
420 span {
421 width: 100%;
422 display: inline-block;
423 justify-content: center;
424 align-items: center;
425 }
421 } 426 }
422 </style> 427 </style>
......