登记簿拆分
Showing
2 changed files
with
190 additions
and
0 deletions
... | @@ -32,6 +32,14 @@ export const constantRoutes = [ | ... | @@ -32,6 +32,14 @@ export const constantRoutes = [ |
32 | hidden: true, | 32 | hidden: true, |
33 | meta: { title: '发起申请' } | 33 | meta: { title: '发起申请' } |
34 | }, | 34 | }, |
35 | //登记簿详情 | ||
36 | { | ||
37 | path: '/djbFrameall', | ||
38 | component: () => import('@/views/registerBook/djbFrameall.vue'), | ||
39 | name: 'djbFrameall', | ||
40 | hidden: true, | ||
41 | meta: { title: '登记簿详情' } | ||
42 | }, | ||
35 | // 业务流程只读框架 | 43 | // 业务流程只读框架 |
36 | { | 44 | { |
37 | path: '/workFrameView', | 45 | path: '/workFrameView', | ... | ... |
src/views/registerBook/djbFrameall.vue
0 → 100644
1 | <template> | ||
2 | <div class="content"> | ||
3 | <div class="left"> | ||
4 | <el-tree ref="tree" :data="treedata" :props="defaultProps" @node-click="handleNodeClick" | ||
5 | :default-expand-all="true" :expand-on-click-node="false" node-key="id" :default-checked-keys="[showTab]"> | ||
6 | </el-tree> | ||
7 | </div> | ||
8 | <div class="right"> | ||
9 | <component :is="componentTag" v-bind="currentSelectProps" /> | ||
10 | </div> | ||
11 | </div> | ||
12 | </template> | ||
13 | <script> | ||
14 | import { getBdcqljqtsx } from "@/api/registerBook.js"; | ||
15 | import { loadTreeData, getNode } from "./djbFrameData.js"; | ||
16 | import { searchTaskToDo } from "@/api/ywbl"; | ||
17 | import { | ||
18 | leftMenu | ||
19 | } from "@/api/fqsq.js"; | ||
20 | export default { | ||
21 | data () { | ||
22 | return { | ||
23 | //接收参数 | ||
24 | // propsParam: this.$attrs, | ||
25 | //左侧目录 | ||
26 | catalog: {}, | ||
27 | //选择加载哪一个组件 | ||
28 | componentTag: "", | ||
29 | //子组件接收参数 | ||
30 | currentSelectProps: {}, | ||
31 | //左侧树形结构数据 | ||
32 | treedata: [], | ||
33 | // 查询参数 | ||
34 | queryForm: {}, | ||
35 | |||
36 | defaultNode: "", | ||
37 | defaultProps: { | ||
38 | value: "id", | ||
39 | children: "children", | ||
40 | label: "label", | ||
41 | }, | ||
42 | showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断 | ||
43 | }; | ||
44 | }, | ||
45 | mounted () { | ||
46 | this.getdata() | ||
47 | |||
48 | }, | ||
49 | methods: { | ||
50 | // 截取字符的方法 | ||
51 | getCaption (obj) { | ||
52 | let index = obj.lastIndexOf("="); | ||
53 | obj = obj.substring(index + 1, obj.length); | ||
54 | return obj | ||
55 | }, | ||
56 | // 通过不动产业务号获取参数 | ||
57 | getdata () { | ||
58 | this.queryForm = { | ||
59 | bdcdyh: this.getCaption(window.location.href), | ||
60 | currentPage: 1, | ||
61 | djlx: "", | ||
62 | pageSize: 10, | ||
63 | qllx: "", | ||
64 | ywh: "", | ||
65 | ywly: "" | ||
66 | } | ||
67 | if (this.queryForm) { | ||
68 | searchTaskToDo({ | ||
69 | ...this.queryForm, | ||
70 | }).then((res) => { | ||
71 | if (res.code === 200) { | ||
72 | let { records } = res.result; | ||
73 | |||
74 | this.loadBdcdylist(records[0].bsmSlsq, records[0].bestepid); | ||
75 | } | ||
76 | }); | ||
77 | } | ||
78 | |||
79 | }, | ||
80 | |||
81 | // 获取不动产信息 | ||
82 | loadBdcdylist (a, b) { | ||
83 | var formdata = new FormData(); | ||
84 | formdata.append("bsmSlsq", a); | ||
85 | formdata.append("bestepid", b); | ||
86 | leftMenu(formdata).then((res) => { | ||
87 | if (res.code === 200) { | ||
88 | if (res.result) { | ||
89 | this.currentSelectProps = res.result[0]; | ||
90 | this.loadData(); | ||
91 | } | ||
92 | } | ||
93 | }); | ||
94 | }, | ||
95 | loadData () { | ||
96 | getBdcqljqtsx({ | ||
97 | bdcdyid: this.currentSelectProps.bdcdyid, | ||
98 | bdcdyh: this.currentSelectProps.bdcdyh, | ||
99 | }).then((res) => { | ||
100 | if (res.code === 200) { | ||
101 | this.treedata = loadTreeData(res.result, this.currentSelectProps.bdcdyh); | ||
102 | this.$nextTick(function () { | ||
103 | this.defaultNode = getNode(this.currentSelectProps.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, ""); | ||
104 | this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 | ||
105 | this.loadComponent(this.defaultNode.form); | ||
106 | }); | ||
107 | } | ||
108 | }); | ||
109 | this.currentSelectProps = { | ||
110 | bdcdyid: this.currentSelectProps.bdcdyid, | ||
111 | bdcdyh: this.currentSelectProps.bdcdyh, | ||
112 | qllx: this.currentSelectProps.qllx, | ||
113 | bsmQlxx: this.currentSelectProps.bsmQlxx, | ||
114 | }; | ||
115 | }, | ||
116 | /* | ||
117 | 点击登记簿菜单 | ||
118 | */ | ||
119 | handleNodeClick (data, node, elem) { | ||
120 | this.loadComponent(data.form); | ||
121 | }, | ||
122 | loadComponent (form) { | ||
123 | this.componentTag = (r) => | ||
124 | require.ensure([], () => r(require("@/views/registerBook/" + form))); | ||
125 | }, | ||
126 | }, | ||
127 | }; | ||
128 | </script> | ||
129 | <style scoped lang="scss"> | ||
130 | /deep/.rollTable { | ||
131 | height: calc(120vh - 254px) !important; | ||
132 | } | ||
133 | |||
134 | .content { | ||
135 | width: 100%; | ||
136 | height: 100%; | ||
137 | display: flex; | ||
138 | |||
139 | .left { | ||
140 | width: 256px; | ||
141 | height: 100%; | ||
142 | background-color: #f5f5f5; | ||
143 | color: #333; | ||
144 | border: 1px solid rgb(228, 228, 228); | ||
145 | } | ||
146 | |||
147 | .right { | ||
148 | width: calc(100% - 256px); | ||
149 | height: 100%; | ||
150 | // overflow-y: scroll; | ||
151 | overflow: auto; | ||
152 | background-color: #f5f5f5; | ||
153 | border: 1px solid rgb(228, 228, 228); | ||
154 | } | ||
155 | } | ||
156 | |||
157 | /deep/ .expanded.el-tree-node__expand-icon, | ||
158 | /deep/ .el-tree-node__expand-icon { | ||
159 | visibility: hidden; | ||
160 | } | ||
161 | |||
162 | /deep/ .el-tree-node__content { | ||
163 | border: 1px solid rgb(228, 228, 228); | ||
164 | height: 45px; | ||
165 | } | ||
166 | |||
167 | /deep/ .el-tree-node:focus > .el-tree-node__content { | ||
168 | background-color: #f5f5f5; | ||
169 | color: #0079fe; | ||
170 | border-right: 4px solid #0079fe; | ||
171 | } | ||
172 | |||
173 | /deep/.el-tree-node { | ||
174 | white-space: pre-wrap; | ||
175 | } | ||
176 | |||
177 | /deep/ .is-current > .el-tree-node__content { | ||
178 | background-color: #f5f5f5; | ||
179 | color: #0079fe; | ||
180 | border-right: 4px solid #0079fe; | ||
181 | } | ||
182 | </style> |
-
Please register or sign in to post a comment