--no commit message
Showing
1 changed file
with
63 additions
and
80 deletions
... | @@ -6,8 +6,16 @@ | ... | @@ -6,8 +6,16 @@ |
6 | <template> | 6 | <template> |
7 | <div class="content loadingtext"> | 7 | <div class="content loadingtext"> |
8 | <div class="left"> | 8 | <div class="left"> |
9 | <el-tree ref="tree" :data="treedata" :props="defaultProps" @node-click="handleNodeClick" | 9 | <el-tree |
10 | :default-expand-all="true" :expand-on-click-node="false" node-key="id" :default-checked-keys="[showTab]"> | 10 | ref="tree" |
11 | :data="treedata" | ||
12 | :props="defaultProps" | ||
13 | @node-click="handleNodeClick" | ||
14 | :default-expand-all="true" | ||
15 | :expand-on-click-node="false" | ||
16 | node-key="id" | ||
17 | :default-checked-keys="[showTab]" | ||
18 | > | ||
11 | </el-tree> | 19 | </el-tree> |
12 | </div> | 20 | </div> |
13 | <div class="right"> | 21 | <div class="right"> |
... | @@ -16,20 +24,16 @@ | ... | @@ -16,20 +24,16 @@ |
16 | </div> | 24 | </div> |
17 | </template> | 25 | </template> |
18 | <script> | 26 | <script> |
19 | import { getBdcqljqtsx } from "@/api/djbDetail.js"; | 27 | import { getBdcqljqtsx } from "@/api/djbDetail.js"; |
20 | import { loadTreeData, getNode } from "./djbFrameData.js"; | 28 | import { loadTreeData, getNode } from "./djbFrameData.js"; |
21 | // import { searchTaskToDo } from "@/api/workflow/search.js"; | 29 | // import { searchTaskToDo } from "@/api/workflow/search.js"; |
22 | import { getDjbBysearch } from "@/api/search.js"; | 30 | import { getDjbBysearch } from "@/api/search.js"; |
23 | import { | 31 | import { |
24 | leftMenu | 32 | leftMenu |
25 | } from "@/api/workFlow.js"; | 33 | } from "@/api/workFlow.js"; |
26 | export default { | 34 | export default { |
27 | data () { | 35 | data () { |
28 | return { | 36 | return { |
29 | //接收参数 | ||
30 | // propsParam: this.$attrs, | ||
31 | //左侧目录 | ||
32 | catalog: {}, | ||
33 | //选择加载哪一个组件 | 37 | //选择加载哪一个组件 |
34 | componentTag: "", | 38 | componentTag: "", |
35 | //子组件接收参数 | 39 | //子组件接收参数 |
... | @@ -46,6 +50,10 @@ | ... | @@ -46,6 +50,10 @@ |
46 | label: "label", | 50 | label: "label", |
47 | }, | 51 | }, |
48 | showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断 | 52 | showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断 |
53 | bdcdyid:"", | ||
54 | bdcdyh: "", | ||
55 | qllx: "", | ||
56 | bsmQlxx: "", | ||
49 | }; | 57 | }; |
50 | }, | 58 | }, |
51 | mounted () { | 59 | mounted () { |
... | @@ -74,32 +82,6 @@ | ... | @@ -74,32 +82,6 @@ |
74 | bdcdyh: this.getCaption(window.location.href) | 82 | bdcdyh: this.getCaption(window.location.href) |
75 | 83 | ||
76 | } | 84 | } |
77 | |||
78 | // if (this.getCaption(window.location.href)) { | ||
79 | // this.$startLoading(); | ||
80 | // searchTaskToDo({ | ||
81 | // ...this.queryForm, | ||
82 | // }).then((res) => { | ||
83 | // if (res.code === 200) { | ||
84 | // this.$endLoading(); | ||
85 | // let { records } = res.result; | ||
86 | // if(records.length){ | ||
87 | // console.log("true",records.length); | ||
88 | // this.loadBdcdylist(records[0].bsmSlsq, records[0].bestepid); | ||
89 | |||
90 | // }else{ | ||
91 | // console.log("false",records.length); | ||
92 | // this.treedata=[] | ||
93 | |||
94 | |||
95 | // } | ||
96 | |||
97 | // } | ||
98 | // }); | ||
99 | // }else{ | ||
100 | // this.treedata=[] | ||
101 | // } | ||
102 | |||
103 | if (this.getCaption(window.location.href)) { | 85 | if (this.getCaption(window.location.href)) { |
104 | this.$startLoading(); | 86 | this.$startLoading(); |
105 | getDjbBysearch({ | 87 | getDjbBysearch({ |
... | @@ -110,13 +92,14 @@ | ... | @@ -110,13 +92,14 @@ |
110 | let { records } = res.result; | 92 | let { records } = res.result; |
111 | if(records.length){ | 93 | if(records.length){ |
112 | console.log("true",records.length); | 94 | console.log("true",records.length); |
113 | this.loadBdcdylist(records[0].bdcdyh, records[0].bdcdyid); | 95 | this.bdcdyid=records[0].bdcdyid |
114 | 96 | this.bdcdyh=records[0].bdcdyh | |
97 | this.qllx=records[0].qllx | ||
98 | this.bsmQlxx=records[0].bsmQlxx | ||
99 | this.loadData() | ||
115 | }else{ | 100 | }else{ |
116 | console.log("false",records.length); | 101 | console.log("false",records.length); |
117 | this.treedata=[] | 102 | this.treedata=[] |
118 | |||
119 | |||
120 | } | 103 | } |
121 | 104 | ||
122 | } | 105 | } |
... | @@ -134,42 +117,42 @@ | ... | @@ -134,42 +117,42 @@ |
134 | * @param {*} b | 117 | * @param {*} b |
135 | * @author: renchao | 118 | * @author: renchao |
136 | */ | 119 | */ |
137 | loadBdcdylist (a, b) { | 120 | // loadBdcdylist (a, b) { |
138 | var formdata = new FormData(); | 121 | // var formdata = new FormData(); |
139 | formdata.append("bsmSlsq", a); | 122 | // formdata.append("bsmSlsq", a); |
140 | formdata.append("bestepid", b); | 123 | // formdata.append("bestepid", b); |
141 | leftMenu(formdata).then((res) => { | 124 | // leftMenu(formdata).then((res) => { |
142 | if (res.code === 200) { | 125 | // if (res.code === 200) { |
143 | if (res.result) { | 126 | // if (res.result) { |
144 | this.currentSelectProps = res.result[0]; | 127 | // this.currentSelectProps = res.result[0]; |
145 | this.loadData(); | 128 | // this.loadData(); |
146 | } | 129 | // } |
147 | } | 130 | // } |
148 | }); | 131 | // }); |
149 | }, | 132 | // }, |
150 | /** | 133 | /** |
151 | * @description: loadData | 134 | * @description: loadData |
152 | * @author: renchao | 135 | * @author: renchao |
153 | */ | 136 | */ |
154 | loadData () { | 137 | loadData () { |
155 | getBdcqljqtsx({ | 138 | getBdcqljqtsx({ |
156 | bdcdyid: this.currentSelectProps.bdcdyid, | 139 | bdcdyid: this.bdcdyid, |
157 | bdcdyh: this.currentSelectProps.bdcdyh, | 140 | bdcdyh: this.bdcdyh, |
158 | }).then((res) => { | 141 | }).then((res) => { |
159 | if (res.code === 200) { | 142 | if (res.code === 200) { |
160 | this.treedata = loadTreeData(res.result, this.currentSelectProps.bdcdyh); | 143 | this.treedata = loadTreeData(res.result, this.bdcdyh); |
161 | this.$nextTick(function () { | 144 | this.$nextTick(function () { |
162 | this.defaultNode = getNode(this.currentSelectProps.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, ""); | 145 | this.defaultNode = getNode(this.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, ""); |
163 | this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 | 146 | this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 |
164 | this.loadComponent(this.defaultNode.form); | 147 | this.loadComponent(this.defaultNode.form); |
165 | }); | 148 | }); |
166 | } | 149 | } |
167 | }); | 150 | }); |
168 | this.currentSelectProps = { | 151 | this.currentSelectProps = { |
169 | bdcdyid: this.currentSelectProps.bdcdyid, | 152 | bdcdyid: this.bdcdyid, |
170 | bdcdyh: this.currentSelectProps.bdcdyh, | 153 | bdcdyh: this.bdcdyh, |
171 | qllx: this.currentSelectProps.qllx, | 154 | qllx: this.qllx, |
172 | bsmQlxx: this.currentSelectProps.bsmQlxx, | 155 | bsmQlxx: this.bsmQlxx, |
173 | }; | 156 | }; |
174 | }, | 157 | }, |
175 | /* | 158 | /* |
... | @@ -195,14 +178,14 @@ | ... | @@ -195,14 +178,14 @@ |
195 | require.ensure([], () => r(require("@/views/registerBook/" + form))); | 178 | require.ensure([], () => r(require("@/views/registerBook/" + form))); |
196 | }, | 179 | }, |
197 | }, | 180 | }, |
198 | }; | 181 | }; |
199 | </script> | 182 | </script> |
200 | <style scoped lang="scss"> | 183 | <style scoped lang="scss"> |
201 | /deep/.rollTable { | 184 | /deep/.rollTable { |
202 | height: calc(120vh - 254px) !important; | 185 | height: calc(120vh - 254px) !important; |
203 | } | 186 | } |
204 | 187 | ||
205 | .content { | 188 | .content { |
206 | width: 100%; | 189 | width: 100%; |
207 | height: 100%; | 190 | height: 100%; |
208 | display: flex; | 191 | display: flex; |
... | @@ -223,31 +206,31 @@ | ... | @@ -223,31 +206,31 @@ |
223 | background-color: #f5f5f5; | 206 | background-color: #f5f5f5; |
224 | border: 1px solid rgb(228, 228, 228); | 207 | border: 1px solid rgb(228, 228, 228); |
225 | } | 208 | } |
226 | } | 209 | } |
227 | 210 | ||
228 | /deep/ .expanded.el-tree-node__expand-icon, | 211 | /deep/ .expanded.el-tree-node__expand-icon, |
229 | /deep/ .el-tree-node__expand-icon { | 212 | /deep/ .el-tree-node__expand-icon { |
230 | visibility: hidden; | 213 | visibility: hidden; |
231 | } | 214 | } |
232 | 215 | ||
233 | /deep/ .el-tree-node__content { | 216 | /deep/ .el-tree-node__content { |
234 | border: 1px solid rgb(228, 228, 228); | 217 | border: 1px solid rgb(228, 228, 228); |
235 | height: 45px; | 218 | height: 45px; |
236 | } | 219 | } |
237 | 220 | ||
238 | /deep/ .el-tree-node:focus > .el-tree-node__content { | 221 | /deep/ .el-tree-node:focus > .el-tree-node__content { |
239 | background-color: #f5f5f5; | 222 | background-color: #f5f5f5; |
240 | color: #0079fe; | 223 | color: #0079fe; |
241 | border-right: 4px solid #0079fe; | 224 | border-right: 4px solid #0079fe; |
242 | } | 225 | } |
243 | 226 | ||
244 | /deep/.el-tree-node { | 227 | /deep/.el-tree-node { |
245 | white-space: pre-wrap; | 228 | white-space: pre-wrap; |
246 | } | 229 | } |
247 | 230 | ||
248 | /deep/ .is-current > .el-tree-node__content { | 231 | /deep/ .is-current > .el-tree-node__content { |
249 | background-color: #f5f5f5; | 232 | background-color: #f5f5f5; |
250 | color: #0079fe; | 233 | color: #0079fe; |
251 | border-right: 4px solid #0079fe; | 234 | border-right: 4px solid #0079fe; |
252 | } | 235 | } |
253 | </style> | 236 | </style> | ... | ... |
-
Please register or sign in to post a comment