Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev
Showing
41 changed files
with
942 additions
and
628 deletions
... | @@ -6,6 +6,11 @@ import afterLeave from 'element-ui/src/utils/after-leave'; | ... | @@ -6,6 +6,11 @@ import afterLeave from 'element-ui/src/utils/after-leave'; |
6 | const Mask = Vue.extend(Loading); | 6 | const Mask = Vue.extend(Loading); |
7 | 7 | ||
8 | const loadingDirective = {}; | 8 | const loadingDirective = {}; |
9 | |||
10 | /** | ||
11 | * @description: install | ||
12 | * @author: renchao | ||
13 | */ | ||
9 | loadingDirective.install = Vue => { | 14 | loadingDirective.install = Vue => { |
10 | if (Vue.prototype.$isServer) return; | 15 | if (Vue.prototype.$isServer) return; |
11 | const toggleLoading = (el, binding) => { | 16 | const toggleLoading = (el, binding) => { |
... | @@ -110,14 +115,24 @@ loadingDirective.install = Vue => { | ... | @@ -110,14 +115,24 @@ loadingDirective.install = Vue => { |
110 | 115 | ||
111 | binding.value && toggleLoading(el, binding); | 116 | binding.value && toggleLoading(el, binding); |
112 | }, | 117 | }, |
113 | 118 | /** | |
119 | * @description: update | ||
120 | * @param {*} el | ||
121 | * @param {*} binding | ||
122 | * @author: renchao | ||
123 | */ | ||
114 | update: function (el, binding) { | 124 | update: function (el, binding) { |
115 | el.instance.setText(el.getAttribute('element-loading-text')); | 125 | el.instance.setText(el.getAttribute('element-loading-text')); |
116 | if (binding.oldValue !== binding.value) { | 126 | if (binding.oldValue !== binding.value) { |
117 | toggleLoading(el, binding); | 127 | toggleLoading(el, binding); |
118 | } | 128 | } |
119 | }, | 129 | }, |
120 | 130 | /** | |
131 | * @description: unbind | ||
132 | * @param {*} el | ||
133 | * @param {*} binding | ||
134 | * @author: renchao | ||
135 | */ | ||
121 | unbind: function (el, binding) { | 136 | unbind: function (el, binding) { |
122 | if (el.domInserted) { | 137 | if (el.domInserted) { |
123 | el.mask && | 138 | el.mask && | ... | ... |
... | @@ -20,6 +20,10 @@ let fullscreenLoading; | ... | @@ -20,6 +20,10 @@ let fullscreenLoading; |
20 | LoadingConstructor.prototype.originalPosition = ''; | 20 | LoadingConstructor.prototype.originalPosition = ''; |
21 | LoadingConstructor.prototype.originalOverflow = ''; | 21 | LoadingConstructor.prototype.originalOverflow = ''; |
22 | 22 | ||
23 | /** | ||
24 | * @description: close | ||
25 | * @author: renchao | ||
26 | */ | ||
23 | LoadingConstructor.prototype.close = function() { | 27 | LoadingConstructor.prototype.close = function() { |
24 | if (this.fullscreen) { | 28 | if (this.fullscreen) { |
25 | fullscreenLoading = undefined; | 29 | fullscreenLoading = undefined; |
... | @@ -38,6 +42,13 @@ LoadingConstructor.prototype.close = function() { | ... | @@ -38,6 +42,13 @@ LoadingConstructor.prototype.close = function() { |
38 | this.visible = false; | 42 | this.visible = false; |
39 | }; | 43 | }; |
40 | 44 | ||
45 | /** | ||
46 | * @description: addStyle | ||
47 | * @param {*} options | ||
48 | * @param {*} parent | ||
49 | * @param {*} instance | ||
50 | * @author: renchao | ||
51 | */ | ||
41 | const addStyle = (options, parent, instance) => { | 52 | const addStyle = (options, parent, instance) => { |
42 | let maskStyle = {}; | 53 | let maskStyle = {}; |
43 | if (options.fullscreen) { | 54 | if (options.fullscreen) { |
... | @@ -64,6 +75,10 @@ const addStyle = (options, parent, instance) => { | ... | @@ -64,6 +75,10 @@ const addStyle = (options, parent, instance) => { |
64 | }); | 75 | }); |
65 | }; | 76 | }; |
66 | 77 | ||
78 | /** | ||
79 | * @description: Loading | ||
80 | * @author: renchao | ||
81 | */ | ||
67 | const Loading = (options = {}) => { | 82 | const Loading = (options = {}) => { |
68 | if (Vue.prototype.$isServer) return; | 83 | if (Vue.prototype.$isServer) return; |
69 | options = merge({}, defaults, options); | 84 | options = merge({}, defaults, options); | ... | ... |
... | @@ -43,6 +43,11 @@ const MessageBoxConstructor = Vue.extend(msgboxVue); | ... | @@ -43,6 +43,11 @@ const MessageBoxConstructor = Vue.extend(msgboxVue); |
43 | let currentMsg, instance; | 43 | let currentMsg, instance; |
44 | let msgQueue = []; | 44 | let msgQueue = []; |
45 | 45 | ||
46 | |||
47 | /** | ||
48 | * @description: defaultCallback | ||
49 | * @author: renchao | ||
50 | */ | ||
46 | const defaultCallback = action => { | 51 | const defaultCallback = action => { |
47 | if (currentMsg) { | 52 | if (currentMsg) { |
48 | let callback = currentMsg.callback; | 53 | let callback = currentMsg.callback; |
... | @@ -56,6 +61,10 @@ const defaultCallback = action => { | ... | @@ -56,6 +61,10 @@ const defaultCallback = action => { |
56 | } | 61 | } |
57 | }; | 62 | }; |
58 | 63 | ||
64 | /** | ||
65 | * @description: initInstance | ||
66 | * @author: renchao | ||
67 | */ | ||
59 | const initInstance = () => { | 68 | const initInstance = () => { |
60 | instance = new MessageBoxConstructor({ | 69 | instance = new MessageBoxConstructor({ |
61 | el: document.createElement('div') | 70 | el: document.createElement('div') |
... | @@ -64,6 +73,10 @@ const initInstance = () => { | ... | @@ -64,6 +73,10 @@ const initInstance = () => { |
64 | instance.callback = defaultCallback; | 73 | instance.callback = defaultCallback; |
65 | }; | 74 | }; |
66 | 75 | ||
76 | /** | ||
77 | * @description: showNextMsg | ||
78 | * @author: renchao | ||
79 | */ | ||
67 | const showNextMsg = () => { | 80 | const showNextMsg = () => { |
68 | if (!instance) { | 81 | if (!instance) { |
69 | initInstance(); | 82 | initInstance(); |
... | @@ -109,6 +122,10 @@ const showNextMsg = () => { | ... | @@ -109,6 +122,10 @@ const showNextMsg = () => { |
109 | } | 122 | } |
110 | }; | 123 | }; |
111 | 124 | ||
125 | /** | ||
126 | * @description: MessageBox | ||
127 | * @author: renchao | ||
128 | */ | ||
112 | const MessageBox = function (options, callback) { | 129 | const MessageBox = function (options, callback) { |
113 | if (Vue.prototype.$isServer) return; | 130 | if (Vue.prototype.$isServer) return; |
114 | if (typeof options === 'string' || isVNode(options)) { | 131 | if (typeof options === 'string' || isVNode(options)) { |
... | @@ -143,10 +160,18 @@ const MessageBox = function (options, callback) { | ... | @@ -143,10 +160,18 @@ const MessageBox = function (options, callback) { |
143 | } | 160 | } |
144 | }; | 161 | }; |
145 | 162 | ||
163 | /** | ||
164 | * @description: setDefaults | ||
165 | * @author: renchao | ||
166 | */ | ||
146 | MessageBox.setDefaults = defaults => { | 167 | MessageBox.setDefaults = defaults => { |
147 | MessageBox.defaults = defaults; | 168 | MessageBox.defaults = defaults; |
148 | }; | 169 | }; |
149 | 170 | ||
171 | /** | ||
172 | * @description: alert | ||
173 | * @author: renchao | ||
174 | */ | ||
150 | MessageBox.alert = (title, message, options) => { | 175 | MessageBox.alert = (title, message, options) => { |
151 | if (typeof title === 'object') { | 176 | if (typeof title === 'object') { |
152 | options = title; | 177 | options = title; |
... | @@ -163,6 +188,10 @@ MessageBox.alert = (title, message, options) => { | ... | @@ -163,6 +188,10 @@ MessageBox.alert = (title, message, options) => { |
163 | }, options)); | 188 | }, options)); |
164 | }; | 189 | }; |
165 | 190 | ||
191 | /** | ||
192 | * @description: close | ||
193 | * @author: renchao | ||
194 | */ | ||
166 | MessageBox.close = () => { | 195 | MessageBox.close = () => { |
167 | instance.doClose(); | 196 | instance.doClose(); |
168 | instance.visible = false; | 197 | instance.visible = false; | ... | ... |
... | @@ -97,6 +97,10 @@ export default { | ... | @@ -97,6 +97,10 @@ export default { |
97 | }, | 97 | }, |
98 | 98 | ||
99 | methods: { | 99 | methods: { |
100 | /** | ||
101 | * @description: getSafeClose | ||
102 | * @author: renchao | ||
103 | */ | ||
100 | getSafeClose () { | 104 | getSafeClose () { |
101 | const currentId = this.uid; | 105 | const currentId = this.uid; |
102 | return () => { | 106 | return () => { |
... | @@ -105,6 +109,10 @@ export default { | ... | @@ -105,6 +109,10 @@ export default { |
105 | }); | 109 | }); |
106 | }; | 110 | }; |
107 | }, | 111 | }, |
112 | /** | ||
113 | * @description: doClose | ||
114 | * @author: renchao | ||
115 | */ | ||
108 | doClose () { | 116 | doClose () { |
109 | if (!this.visible) return; | 117 | if (!this.visible) return; |
110 | this.visible = false; | 118 | this.visible = false; |
... | @@ -122,18 +130,31 @@ export default { | ... | @@ -122,18 +130,31 @@ export default { |
122 | }); | 130 | }); |
123 | }, | 131 | }, |
124 | 132 | ||
133 | /** | ||
134 | * @description: handleWrapperClick | ||
135 | * @author: renchao | ||
136 | */ | ||
125 | handleWrapperClick () { | 137 | handleWrapperClick () { |
126 | if (this.closeOnClickModal) { | 138 | if (this.closeOnClickModal) { |
127 | this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel'); | 139 | this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel'); |
128 | } | 140 | } |
129 | }, | 141 | }, |
130 | 142 | ||
143 | /** | ||
144 | * @description: handleInputEnter | ||
145 | * @author: renchao | ||
146 | */ | ||
131 | handleInputEnter () { | 147 | handleInputEnter () { |
132 | if (this.inputType !== 'textarea') { | 148 | if (this.inputType !== 'textarea') { |
133 | return this.handleAction('confirm'); | 149 | return this.handleAction('confirm'); |
134 | } | 150 | } |
135 | }, | 151 | }, |
136 | 152 | ||
153 | /** | ||
154 | * @description: handleAction | ||
155 | * @param {*} action | ||
156 | * @author: renchao | ||
157 | */ | ||
137 | handleAction (action) { | 158 | handleAction (action) { |
138 | if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) { | 159 | if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) { |
139 | return; | 160 | return; |
... | @@ -147,6 +168,10 @@ export default { | ... | @@ -147,6 +168,10 @@ export default { |
147 | } | 168 | } |
148 | }, | 169 | }, |
149 | 170 | ||
171 | /** | ||
172 | * @description: validate | ||
173 | * @author: renchao | ||
174 | */ | ||
150 | validate () { | 175 | validate () { |
151 | if (this.$type === 'prompt') { | 176 | if (this.$type === 'prompt') { |
152 | const inputPattern = this.inputPattern; | 177 | const inputPattern = this.inputPattern; |
... | @@ -174,15 +199,27 @@ export default { | ... | @@ -174,15 +199,27 @@ export default { |
174 | removeClass(this.getInputElement(), 'invalid'); | 199 | removeClass(this.getInputElement(), 'invalid'); |
175 | return true; | 200 | return true; |
176 | }, | 201 | }, |
202 | /** | ||
203 | * @description: getFirstFocus | ||
204 | * @author: renchao | ||
205 | */ | ||
177 | getFirstFocus () { | 206 | getFirstFocus () { |
178 | const btn = this.$el.querySelector('.el-message-box__btns .el-button'); | 207 | const btn = this.$el.querySelector('.el-message-box__btns .el-button'); |
179 | const title = this.$el.querySelector('.el-message-box__btns .el-message-box__title'); | 208 | const title = this.$el.querySelector('.el-message-box__btns .el-message-box__title'); |
180 | return btn || title; | 209 | return btn || title; |
181 | }, | 210 | }, |
211 | /** | ||
212 | * @description: getInputElement | ||
213 | * @author: renchao | ||
214 | */ | ||
182 | getInputElement () { | 215 | getInputElement () { |
183 | const inputRefs = this.$refs.input.$refs; | 216 | const inputRefs = this.$refs.input.$refs; |
184 | return inputRefs.input || inputRefs.textarea; | 217 | return inputRefs.input || inputRefs.textarea; |
185 | }, | 218 | }, |
219 | /** | ||
220 | * @description: handleClose | ||
221 | * @author: renchao | ||
222 | */ | ||
186 | handleClose () { | 223 | handleClose () { |
187 | this.handleAction('close'); | 224 | this.handleAction('close'); |
188 | } | 225 | } |
... | @@ -200,6 +237,11 @@ export default { | ... | @@ -200,6 +237,11 @@ export default { |
200 | } | 237 | } |
201 | }, | 238 | }, |
202 | 239 | ||
240 | /** | ||
241 | * @description: visible | ||
242 | * @param {*} val | ||
243 | * @author: renchao | ||
244 | */ | ||
203 | visible (val) { | 245 | visible (val) { |
204 | if (val) { | 246 | if (val) { |
205 | this.uid++; | 247 | this.uid++; |
... | @@ -222,6 +264,10 @@ export default { | ... | @@ -222,6 +264,10 @@ export default { |
222 | } | 264 | } |
223 | }, | 265 | }, |
224 | 266 | ||
267 | /** | ||
268 | * @description: mounted | ||
269 | * @author: renchao | ||
270 | */ | ||
225 | mounted () { | 271 | mounted () { |
226 | this.$nextTick(() => { | 272 | this.$nextTick(() => { |
227 | if (this.closeOnHashChange) { | 273 | if (this.closeOnHashChange) { |
... | @@ -230,6 +276,10 @@ export default { | ... | @@ -230,6 +276,10 @@ export default { |
230 | }); | 276 | }); |
231 | }, | 277 | }, |
232 | 278 | ||
279 | /** | ||
280 | * @description: beforeDestroy | ||
281 | * @author: renchao | ||
282 | */ | ||
233 | beforeDestroy () { | 283 | beforeDestroy () { |
234 | if (this.closeOnHashChange) { | 284 | if (this.closeOnHashChange) { |
235 | window.removeEventListener('hashchange', this.close); | 285 | window.removeEventListener('hashchange', this.close); | ... | ... |
... | @@ -49,10 +49,18 @@ export default { | ... | @@ -49,10 +49,18 @@ export default { |
49 | } | 49 | } |
50 | }, | 50 | }, |
51 | methods: { | 51 | methods: { |
52 | /** | ||
53 | * @description: handleNotice | ||
54 | * @param {*} item | ||
55 | * @author: renchao | ||
56 | */ | ||
52 | handleNotice (item) { | 57 | handleNotice (item) { |
53 | this.$alertMes(item.noticeTitle, item.noticeContent) | 58 | this.$alertMes(item.noticeTitle, item.noticeContent) |
54 | }, | 59 | }, |
55 | // 获取数据 | 60 | /** |
61 | * @description: 获取数据 | ||
62 | * @author: renchao | ||
63 | */ | ||
56 | getData () { | 64 | getData () { |
57 | let style = document.styleSheets[0]; | 65 | let style = document.styleSheets[0]; |
58 | let text = this.$refs.text; | 66 | let text = this.$refs.text; |
... | @@ -72,13 +80,19 @@ export default { | ... | @@ -72,13 +80,19 @@ export default { |
72 | this.changeState(); | 80 | this.changeState(); |
73 | }, 300); | 81 | }, 300); |
74 | }, | 82 | }, |
75 | // 用速度计算时间(想要保持速度一样,2种状态时间不同需算出) | 83 | /** |
84 | * @description: 用速度计算时间(想要保持速度一样,2种状态时间不同需算出) | ||
85 | * @author: renchao | ||
86 | */ | ||
76 | ComputationTime () { | 87 | ComputationTime () { |
77 | this.firstAnimationTime = this.wordLength / this.speed; | 88 | this.firstAnimationTime = this.wordLength / this.speed; |
78 | this.secondAnimationTime = | 89 | this.secondAnimationTime = |
79 | (this.wordLength + this.backWidth) / this.speed; | 90 | (this.wordLength + this.backWidth) / this.speed; |
80 | }, | 91 | }, |
81 | // 根据状态切换动画 | 92 | /** |
93 | * @description: 根据状态切换动画 | ||
94 | * @author: renchao | ||
95 | */ | ||
82 | changeState () { | 96 | changeState () { |
83 | let text = this.$refs.text; | 97 | let text = this.$refs.text; |
84 | if (this.state == 1) { | 98 | if (this.state == 1) { |
... | @@ -88,6 +102,10 @@ export default { | ... | @@ -88,6 +102,10 @@ export default { |
88 | text.style.animation = `secondAnimation ${this.secondAnimationTime}s linear infinite`; | 102 | text.style.animation = `secondAnimation ${this.secondAnimationTime}s linear infinite`; |
89 | } | 103 | } |
90 | }, | 104 | }, |
105 | /** | ||
106 | * @description: Listener | ||
107 | * @author: renchao | ||
108 | */ | ||
91 | Listener () { | 109 | Listener () { |
92 | let text = this.$refs.text; | 110 | let text = this.$refs.text; |
93 | text.addEventListener( | 111 | text.addEventListener( |
... | @@ -98,10 +116,18 @@ export default { | ... | @@ -98,10 +116,18 @@ export default { |
98 | false | 116 | false |
99 | ) | 117 | ) |
100 | }, | 118 | }, |
119 | /** | ||
120 | * @description: mouseOver | ||
121 | * @author: renchao | ||
122 | */ | ||
101 | mouseOver () { | 123 | mouseOver () { |
102 | let text = this.$refs.text; | 124 | let text = this.$refs.text; |
103 | text.style.animationPlayState = 'paused' | 125 | text.style.animationPlayState = 'paused' |
104 | }, | 126 | }, |
127 | /** | ||
128 | * @description: mouseLeave | ||
129 | * @author: renchao | ||
130 | */ | ||
105 | mouseLeave () { | 131 | mouseLeave () { |
106 | let text = this.$refs.text; | 132 | let text = this.$refs.text; |
107 | text.style.animationPlayState = '' | 133 | text.style.animationPlayState = '' | ... | ... |
... | @@ -188,6 +188,10 @@ | ... | @@ -188,6 +188,10 @@ |
188 | this.$img = this.$refs["img"]; | 188 | this.$img = this.$refs["img"]; |
189 | }, | 189 | }, |
190 | methods: { | 190 | methods: { |
191 | /** | ||
192 | * @description: imgLoaded | ||
193 | * @author: renchao | ||
194 | */ | ||
191 | imgLoaded () { | 195 | imgLoaded () { |
192 | let imgInfo = this.$img.getBoundingClientRect(); | 196 | let imgInfo = this.$img.getBoundingClientRect(); |
193 | if (JSON.stringify(this.imgInfo) != JSON.stringify(imgInfo)) { | 197 | if (JSON.stringify(this.imgInfo) != JSON.stringify(imgInfo)) { |
... | @@ -200,6 +204,10 @@ | ... | @@ -200,6 +204,10 @@ |
200 | this.$emit("created", imgInfo); | 204 | this.$emit("created", imgInfo); |
201 | } | 205 | } |
202 | }, | 206 | }, |
207 | /** | ||
208 | * @description: mouseMove | ||
209 | * @author: renchao | ||
210 | */ | ||
203 | mouseMove (e) { | 211 | mouseMove (e) { |
204 | if (!this.hideZoom && this.imgLoadedFlag) { | 212 | if (!this.hideZoom && this.imgLoadedFlag) { |
205 | this.imgLoaded(); | 213 | this.imgLoaded(); |
... | @@ -225,6 +233,11 @@ | ... | @@ -225,6 +233,11 @@ |
225 | selector.bgTop = addWidth - y * scale; | 233 | selector.bgTop = addWidth - y * scale; |
226 | } | 234 | } |
227 | }, | 235 | }, |
236 | /** | ||
237 | * @description: initSelectorProperty | ||
238 | * @param {*} selectorWidth | ||
239 | * @author: renchao | ||
240 | */ | ||
228 | initSelectorProperty (selectorWidth) { | 241 | initSelectorProperty (selectorWidth) { |
229 | const selectorHalfWidth = selectorWidth / 2; | 242 | const selectorHalfWidth = selectorWidth / 2; |
230 | const selector = this.selector; | 243 | const selector = this.selector; |
... | @@ -236,12 +249,20 @@ | ... | @@ -236,12 +249,20 @@ |
236 | selector.absoluteLeft = left + selectorHalfWidth + scrollLeft; | 249 | selector.absoluteLeft = left + selectorHalfWidth + scrollLeft; |
237 | selector.absoluteTop = top + selectorHalfWidth + scrollTop; | 250 | selector.absoluteTop = top + selectorHalfWidth + scrollTop; |
238 | }, | 251 | }, |
252 | /** | ||
253 | * @description: mouseLeave | ||
254 | * @author: renchao | ||
255 | */ | ||
239 | mouseLeave () { | 256 | mouseLeave () { |
240 | this.hideSelector = true; | 257 | this.hideSelector = true; |
241 | if (this.outShow) { | 258 | if (this.outShow) { |
242 | this.hideOutShow = true; | 259 | this.hideOutShow = true; |
243 | } | 260 | } |
244 | }, | 261 | }, |
262 | /** | ||
263 | * @description: reset | ||
264 | * @author: renchao | ||
265 | */ | ||
245 | reset () { | 266 | reset () { |
246 | Object.assign(this.selector, { | 267 | Object.assign(this.selector, { |
247 | top: 0, | 268 | top: 0, |
... | @@ -251,9 +272,18 @@ | ... | @@ -251,9 +272,18 @@ |
251 | }); | 272 | }); |
252 | this.resetOutShowInitPosition(); | 273 | this.resetOutShowInitPosition(); |
253 | }, | 274 | }, |
275 | /** | ||
276 | * @description: resetOutShowInitPosition | ||
277 | * @author: renchao | ||
278 | */ | ||
254 | resetOutShowInitPosition () { | 279 | resetOutShowInitPosition () { |
255 | this.outShowInitTop = 0; | 280 | this.outShowInitTop = 0; |
256 | }, | 281 | }, |
282 | /** | ||
283 | * @description: resetOutShowInitPosition | ||
284 | * @param {*} e | ||
285 | * @author: renchao | ||
286 | */ | ||
257 | imgerrorfun (e) { | 287 | imgerrorfun (e) { |
258 | // let img = require('@/assets/vehicle_img/blank_vehicle.jpg') | 288 | // let img = require('@/assets/vehicle_img/blank_vehicle.jpg') |
259 | // this.url = img | 289 | // this.url = img | ... | ... |
... | @@ -2,6 +2,15 @@ import Vue from 'vue' | ... | @@ -2,6 +2,15 @@ import Vue from 'vue' |
2 | import Popup from './index.vue' | 2 | import Popup from './index.vue' |
3 | 3 | ||
4 | const PopupBox = Vue.extend(Popup) | 4 | const PopupBox = Vue.extend(Popup) |
5 | |||
6 | /** | ||
7 | * @description: install | ||
8 | * @param {*} title | ||
9 | * @param {*} editItem | ||
10 | * @param {*} data | ||
11 | * @param {*} formData | ||
12 | * @author: renchao | ||
13 | */ | ||
5 | Popup.install = function (title, editItem, data, formData) { | 14 | Popup.install = function (title, editItem, data, formData) { |
6 | data.title = title | 15 | data.title = title |
7 | data.editItem = editItem | 16 | data.editItem = editItem | ... | ... |
... | @@ -55,7 +55,10 @@ export default { | ... | @@ -55,7 +55,10 @@ export default { |
55 | } | 55 | } |
56 | }, | 56 | }, |
57 | mounted () { | 57 | mounted () { |
58 | // 计算滚动条高度 | 58 | /** |
59 | * @description: 计算滚动条高度 | ||
60 | * @author: renchao | ||
61 | */ | ||
59 | setTimeout(() => { | 62 | setTimeout(() => { |
60 | if (this.btnShow) { | 63 | if (this.btnShow) { |
61 | if (this.height == 'auto') { | 64 | if (this.height == 'auto') { |
... | @@ -73,10 +76,18 @@ export default { | ... | @@ -73,10 +76,18 @@ export default { |
73 | }, 300) | 76 | }, 300) |
74 | }, | 77 | }, |
75 | methods: { | 78 | methods: { |
79 | /** | ||
80 | * @description: onCancel | ||
81 | * @author: renchao | ||
82 | */ | ||
76 | onCancel () { | 83 | onCancel () { |
77 | this.isShow = false | 84 | this.isShow = false |
78 | this.cancel() | 85 | this.cancel() |
79 | }, | 86 | }, |
87 | /** | ||
88 | * @description: onConfirm | ||
89 | * @author: renchao | ||
90 | */ | ||
80 | onConfirm () { | 91 | onConfirm () { |
81 | this.loading = true | 92 | this.loading = true |
82 | let res = new Promise((resolve, reject) => { | 93 | let res = new Promise((resolve, reject) => { |
... | @@ -87,9 +98,19 @@ export default { | ... | @@ -87,9 +98,19 @@ export default { |
87 | this.isShow = false | 98 | this.isShow = false |
88 | } | 99 | } |
89 | }, | 100 | }, |
101 | /** | ||
102 | * @description: loadingFn | ||
103 | * @param {*} e | ||
104 | * @author: renchao | ||
105 | */ | ||
90 | loadingFn (e) { //加载状态 | 106 | loadingFn (e) { //加载状态 |
91 | this.loading = e | 107 | this.loading = e |
92 | }, | 108 | }, |
109 | /** | ||
110 | * @description: loadViewFn | ||
111 | * @param {*} view | ||
112 | * @author: renchao | ||
113 | */ | ||
93 | loadViewFn (view) { | 114 | loadViewFn (view) { |
94 | return (r) => | 115 | return (r) => |
95 | require.ensure([], () => | 116 | require.ensure([], () => | ... | ... |
... | @@ -8,6 +8,10 @@ import Popup from './index.vue' | ... | @@ -8,6 +8,10 @@ import Popup from './index.vue' |
8 | const PopupBox = Vue.extend(Popup) | 8 | const PopupBox = Vue.extend(Popup) |
9 | let popuping = undefined | 9 | let popuping = undefined |
10 | 10 | ||
11 | /** | ||
12 | * @description: close | ||
13 | * @author: renchao | ||
14 | */ | ||
11 | PopupBox.prototype.close = function () { | 15 | PopupBox.prototype.close = function () { |
12 | // 如果Popup 有引用,则去掉引用 | 16 | // 如果Popup 有引用,则去掉引用 |
13 | if (popuping) { | 17 | if (popuping) { |
... | @@ -23,7 +27,14 @@ PopupBox.prototype.close = function () { | ... | @@ -23,7 +27,14 @@ PopupBox.prototype.close = function () { |
23 | } | 27 | } |
24 | }, 300) | 28 | }, 300) |
25 | } | 29 | } |
26 | 30 | /** | |
31 | * @description: Popup1 | ||
32 | * @param {*} title | ||
33 | * @param {*} editItem | ||
34 | * @param {*} data | ||
35 | * @param {*} formData | ||
36 | * @author: renchao | ||
37 | */ | ||
27 | const Popup1 = (title, editItem, data, formData) => { | 38 | const Popup1 = (title, editItem, data, formData) => { |
28 | // 如果组件已渲染,则返回即可 | 39 | // 如果组件已渲染,则返回即可 |
29 | if (popuping) { | 40 | if (popuping) { | ... | ... |
... | @@ -56,7 +56,10 @@ | ... | @@ -56,7 +56,10 @@ |
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | mounted () { | 58 | mounted () { |
59 | // 计算滚动条高度 | 59 | /** |
60 | * @description: 计算滚动条高度 | ||
61 | * @author: renchao | ||
62 | */ | ||
60 | setTimeout(() => { | 63 | setTimeout(() => { |
61 | if (this.btnShow) { | 64 | if (this.btnShow) { |
62 | if (this.height == 'auto') { | 65 | if (this.height == 'auto') { |
... | @@ -74,9 +77,17 @@ | ... | @@ -74,9 +77,17 @@ |
74 | }, 300) | 77 | }, 300) |
75 | }, | 78 | }, |
76 | methods: { | 79 | methods: { |
80 | /** | ||
81 | * @description: onCancel | ||
82 | * @author: renchao | ||
83 | */ | ||
77 | onCancel () { | 84 | onCancel () { |
78 | Popup1().close() | 85 | Popup1().close() |
79 | }, | 86 | }, |
87 | /** | ||
88 | * @description: onConfirm | ||
89 | * @author: renchao | ||
90 | */ | ||
80 | onConfirm () { | 91 | onConfirm () { |
81 | let res = new Promise((resolve, reject) => { | 92 | let res = new Promise((resolve, reject) => { |
82 | this.confirm() | 93 | this.confirm() |
... | @@ -86,6 +97,11 @@ | ... | @@ -86,6 +97,11 @@ |
86 | this.isShow = false | 97 | this.isShow = false |
87 | } | 98 | } |
88 | }, | 99 | }, |
100 | /** | ||
101 | * @description: loadViewFn | ||
102 | * @param {*} view | ||
103 | * @author: renchao | ||
104 | */ | ||
89 | loadViewFn (view) { | 105 | loadViewFn (view) { |
90 | return (r) => | 106 | return (r) => |
91 | require.ensure([], () => | 107 | require.ensure([], () => |
... | @@ -185,4 +201,3 @@ | ... | @@ -185,4 +201,3 @@ |
185 | opacity: 0; | 201 | opacity: 0; |
186 | } | 202 | } |
187 | </style> | 203 | </style> |
188 | |||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -84,6 +84,13 @@ export default { | ... | @@ -84,6 +84,13 @@ export default { |
84 | }, | 84 | }, |
85 | 85 | ||
86 | methods: { | 86 | methods: { |
87 | /** | ||
88 | * @description: updateStyle | ||
89 | * @param {*} style | ||
90 | * @param {*} oldCluster | ||
91 | * @param {*} newCluster | ||
92 | * @author: renchao | ||
93 | */ | ||
87 | updateStyle (style, oldCluster, newCluster) { | 94 | updateStyle (style, oldCluster, newCluster) { |
88 | let newStyle = style | 95 | let newStyle = style |
89 | oldCluster.forEach((color, index) => { | 96 | oldCluster.forEach((color, index) => { |
... | @@ -92,6 +99,12 @@ export default { | ... | @@ -92,6 +99,12 @@ export default { |
92 | return newStyle | 99 | return newStyle |
93 | }, | 100 | }, |
94 | 101 | ||
102 | /** | ||
103 | * @description: getCSSString | ||
104 | * @param {*} url | ||
105 | * @param {*} variable | ||
106 | * @author: renchao | ||
107 | */ | ||
95 | getCSSString (url, variable) { | 108 | getCSSString (url, variable) { |
96 | return new Promise(resolve => { | 109 | return new Promise(resolve => { |
97 | const xhr = new XMLHttpRequest() | 110 | const xhr = new XMLHttpRequest() |
... | @@ -106,6 +119,11 @@ export default { | ... | @@ -106,6 +119,11 @@ export default { |
106 | }) | 119 | }) |
107 | }, | 120 | }, |
108 | 121 | ||
122 | /** | ||
123 | * @description: getThemeCluster | ||
124 | * @param {*} theme | ||
125 | * @author: renchao | ||
126 | */ | ||
109 | getThemeCluster (theme) { | 127 | getThemeCluster (theme) { |
110 | const tintColor = (color, tint) => { | 128 | const tintColor = (color, tint) => { |
111 | let red = parseInt(color.slice(0, 2), 16) | 129 | let red = parseInt(color.slice(0, 2), 16) | ... | ... |
... | @@ -2,6 +2,10 @@ import objectAssign from 'element-ui/src/utils/merge'; | ... | @@ -2,6 +2,10 @@ import objectAssign from 'element-ui/src/utils/merge'; |
2 | import { markNodeData, NODE_KEY } from './util'; | 2 | import { markNodeData, NODE_KEY } from './util'; |
3 | import { arrayFindIndex } from 'element-ui/src/utils/util'; | 3 | import { arrayFindIndex } from 'element-ui/src/utils/util'; |
4 | 4 | ||
5 | /** | ||
6 | * @description: getChildState | ||
7 | * @author: renchao | ||
8 | */ | ||
5 | export const getChildState = node => { | 9 | export const getChildState = node => { |
6 | let all = true; | 10 | let all = true; |
7 | let none = true; | 11 | let none = true; |
... | @@ -22,6 +26,11 @@ export const getChildState = node => { | ... | @@ -22,6 +26,11 @@ export const getChildState = node => { |
22 | return { all, none, allWithoutDisable, half: !all && !none }; | 26 | return { all, none, allWithoutDisable, half: !all && !none }; |
23 | }; | 27 | }; |
24 | 28 | ||
29 | /** | ||
30 | * @description: reInitChecked | ||
31 | * @param {*} node | ||
32 | * @author: renchao | ||
33 | */ | ||
25 | const reInitChecked = function(node) { | 34 | const reInitChecked = function(node) { |
26 | if (node.childNodes.length === 0 || node.loading) return; | 35 | if (node.childNodes.length === 0 || node.loading) return; |
27 | 36 | ||
... | @@ -45,6 +54,12 @@ const reInitChecked = function(node) { | ... | @@ -45,6 +54,12 @@ const reInitChecked = function(node) { |
45 | } | 54 | } |
46 | }; | 55 | }; |
47 | 56 | ||
57 | /** | ||
58 | * @description: getPropertyFromData | ||
59 | * @param {*} node | ||
60 | * @param {*} prop | ||
61 | * @author: renchao | ||
62 | */ | ||
48 | const getPropertyFromData = function(node, prop) { | 63 | const getPropertyFromData = function(node, prop) { |
49 | const props = node.store.props; | 64 | const props = node.store.props; |
50 | const data = node.data || {}; | 65 | const data = node.data || {}; |
... | @@ -63,6 +78,11 @@ const getPropertyFromData = function(node, prop) { | ... | @@ -63,6 +78,11 @@ const getPropertyFromData = function(node, prop) { |
63 | let nodeIdSeed = 0; | 78 | let nodeIdSeed = 0; |
64 | 79 | ||
65 | export default class Node { | 80 | export default class Node { |
81 | /** | ||
82 | * @description: constructor | ||
83 | * @param {*} options | ||
84 | * @author: renchao | ||
85 | */ | ||
66 | constructor(options) { | 86 | constructor(options) { |
67 | this.id = nodeIdSeed++; | 87 | this.id = nodeIdSeed++; |
68 | this.text = null; | 88 | this.text = null; |
... | @@ -135,6 +155,11 @@ export default class Node { | ... | @@ -135,6 +155,11 @@ export default class Node { |
135 | this.updateLeafState(); | 155 | this.updateLeafState(); |
136 | } | 156 | } |
137 | 157 | ||
158 | /** | ||
159 | * @description: setData | ||
160 | * @param {*} data | ||
161 | * @author: renchao | ||
162 | */ | ||
138 | setData(data) { | 163 | setData(data) { |
139 | if (!Array.isArray(data)) { | 164 | if (!Array.isArray(data)) { |
140 | markNodeData(this, data); | 165 | markNodeData(this, data); |
... | @@ -155,20 +180,36 @@ export default class Node { | ... | @@ -155,20 +180,36 @@ export default class Node { |
155 | } | 180 | } |
156 | } | 181 | } |
157 | 182 | ||
183 | /** | ||
184 | * @description: label | ||
185 | * @author: renchao | ||
186 | */ | ||
158 | get label() { | 187 | get label() { |
159 | return getPropertyFromData(this, 'label'); | 188 | return getPropertyFromData(this, 'label'); |
160 | } | 189 | } |
161 | 190 | ||
191 | /** | ||
192 | * @description: key | ||
193 | * @author: renchao | ||
194 | */ | ||
162 | get key() { | 195 | get key() { |
163 | const nodeKey = this.store.key; | 196 | const nodeKey = this.store.key; |
164 | if (this.data) return this.data[nodeKey]; | 197 | if (this.data) return this.data[nodeKey]; |
165 | return null; | 198 | return null; |
166 | } | 199 | } |
167 | 200 | ||
201 | /** | ||
202 | * @description: disabled | ||
203 | * @author: renchao | ||
204 | */ | ||
168 | get disabled() { | 205 | get disabled() { |
169 | return getPropertyFromData(this, 'disabled'); | 206 | return getPropertyFromData(this, 'disabled'); |
170 | } | 207 | } |
171 | 208 | ||
209 | /** | ||
210 | * @description: nextSibling | ||
211 | * @author: renchao | ||
212 | */ | ||
172 | get nextSibling() { | 213 | get nextSibling() { |
173 | const parent = this.parent; | 214 | const parent = this.parent; |
174 | if (parent) { | 215 | if (parent) { |
... | @@ -180,6 +221,10 @@ export default class Node { | ... | @@ -180,6 +221,10 @@ export default class Node { |
180 | return null; | 221 | return null; |
181 | } | 222 | } |
182 | 223 | ||
224 | /** | ||
225 | * @description: previousSibling | ||
226 | * @author: renchao | ||
227 | */ | ||
183 | get previousSibling() { | 228 | get previousSibling() { |
184 | const parent = this.parent; | 229 | const parent = this.parent; |
185 | if (parent) { | 230 | if (parent) { |
... | @@ -191,6 +236,12 @@ export default class Node { | ... | @@ -191,6 +236,12 @@ export default class Node { |
191 | return null; | 236 | return null; |
192 | } | 237 | } |
193 | 238 | ||
239 | /** | ||
240 | * @description: contains | ||
241 | * @param {*} target | ||
242 | * @param {*} deep | ||
243 | * @author: renchao | ||
244 | */ | ||
194 | contains(target, deep = true) { | 245 | contains(target, deep = true) { |
195 | const walk = function(parent) { | 246 | const walk = function(parent) { |
196 | const children = parent.childNodes || []; | 247 | const children = parent.childNodes || []; |
... | @@ -208,6 +259,10 @@ export default class Node { | ... | @@ -208,6 +259,10 @@ export default class Node { |
208 | return walk(this); | 259 | return walk(this); |
209 | } | 260 | } |
210 | 261 | ||
262 | /** | ||
263 | * @description: remove | ||
264 | * @author: renchao | ||
265 | */ | ||
211 | remove() { | 266 | remove() { |
212 | const parent = this.parent; | 267 | const parent = this.parent; |
213 | if (parent) { | 268 | if (parent) { |
... | @@ -215,6 +270,13 @@ export default class Node { | ... | @@ -215,6 +270,13 @@ export default class Node { |
215 | } | 270 | } |
216 | } | 271 | } |
217 | 272 | ||
273 | /** | ||
274 | * @description: insertChild | ||
275 | * @param {*} child | ||
276 | * @param {*} index | ||
277 | * @param {*} batch | ||
278 | * @author: renchao | ||
279 | */ | ||
218 | insertChild(child, index, batch) { | 280 | insertChild(child, index, batch) { |
219 | if (!child) throw new Error('insertChild error: child is required.'); | 281 | if (!child) throw new Error('insertChild error: child is required.'); |
220 | 282 | ||
... | @@ -247,6 +309,12 @@ export default class Node { | ... | @@ -247,6 +309,12 @@ export default class Node { |
247 | this.updateLeafState(); | 309 | this.updateLeafState(); |
248 | } | 310 | } |
249 | 311 | ||
312 | /** | ||
313 | * @description: insertBefore | ||
314 | * @param {*} child | ||
315 | * @param {*} ref | ||
316 | * @author: renchao | ||
317 | */ | ||
250 | insertBefore(child, ref) { | 318 | insertBefore(child, ref) { |
251 | let index; | 319 | let index; |
252 | if (ref) { | 320 | if (ref) { |
... | @@ -255,6 +323,12 @@ export default class Node { | ... | @@ -255,6 +323,12 @@ export default class Node { |
255 | this.insertChild(child, index); | 323 | this.insertChild(child, index); |
256 | } | 324 | } |
257 | 325 | ||
326 | /** | ||
327 | * @description: insertAfter | ||
328 | * @param {*} child | ||
329 | * @param {*} ref | ||
330 | * @author: renchao | ||
331 | */ | ||
258 | insertAfter(child, ref) { | 332 | insertAfter(child, ref) { |
259 | let index; | 333 | let index; |
260 | if (ref) { | 334 | if (ref) { |
... | @@ -264,6 +338,11 @@ export default class Node { | ... | @@ -264,6 +338,11 @@ export default class Node { |
264 | this.insertChild(child, index); | 338 | this.insertChild(child, index); |
265 | } | 339 | } |
266 | 340 | ||
341 | /** | ||
342 | * @description: removeChild | ||
343 | * @param {*} child | ||
344 | * @author: renchao | ||
345 | */ | ||
267 | removeChild(child) { | 346 | removeChild(child) { |
268 | const children = this.getChildren() || []; | 347 | const children = this.getChildren() || []; |
269 | const dataIndex = children.indexOf(child.data); | 348 | const dataIndex = children.indexOf(child.data); |
... | @@ -282,6 +361,11 @@ export default class Node { | ... | @@ -282,6 +361,11 @@ export default class Node { |
282 | this.updateLeafState(); | 361 | this.updateLeafState(); |
283 | } | 362 | } |
284 | 363 | ||
364 | /** | ||
365 | * @description: removeChildByData | ||
366 | * @param {*} data | ||
367 | * @author: renchao | ||
368 | */ | ||
285 | removeChildByData(data) { | 369 | removeChildByData(data) { |
286 | let targetNode = null; | 370 | let targetNode = null; |
287 | 371 | ||
... | @@ -297,6 +381,12 @@ export default class Node { | ... | @@ -297,6 +381,12 @@ export default class Node { |
297 | } | 381 | } |
298 | } | 382 | } |
299 | 383 | ||
384 | /** | ||
385 | * @description: expand | ||
386 | * @param {*} callback | ||
387 | * @param {*} expandParent | ||
388 | * @author: renchao | ||
389 | */ | ||
300 | expand(callback, expandParent) { | 390 | expand(callback, expandParent) { |
301 | const done = () => { | 391 | const done = () => { |
302 | if (expandParent) { | 392 | if (expandParent) { |
... | @@ -326,20 +416,38 @@ export default class Node { | ... | @@ -326,20 +416,38 @@ export default class Node { |
326 | } | 416 | } |
327 | } | 417 | } |
328 | 418 | ||
419 | /** | ||
420 | * @description: doCreateChildren | ||
421 | * @param {*} array | ||
422 | * @param {*} defaultProps | ||
423 | * @author: renchao | ||
424 | */ | ||
329 | doCreateChildren(array, defaultProps = {}) { | 425 | doCreateChildren(array, defaultProps = {}) { |
330 | array.forEach((item) => { | 426 | array.forEach((item) => { |
331 | this.insertChild(objectAssign({ data: item }, defaultProps), undefined, true); | 427 | this.insertChild(objectAssign({ data: item }, defaultProps), undefined, true); |
332 | }); | 428 | }); |
333 | } | 429 | } |
334 | 430 | ||
431 | /** | ||
432 | * @description: collapse | ||
433 | * @author: renchao | ||
434 | */ | ||
335 | collapse() { | 435 | collapse() { |
336 | this.expanded = false; | 436 | this.expanded = false; |
337 | } | 437 | } |
338 | 438 | ||
439 | /** | ||
440 | * @description: shouldLoadData | ||
441 | * @author: renchao | ||
442 | */ | ||
339 | shouldLoadData() { | 443 | shouldLoadData() { |
340 | return this.store.lazy === true && this.store.load && !this.loaded; | 444 | return this.store.lazy === true && this.store.load && !this.loaded; |
341 | } | 445 | } |
342 | 446 | ||
447 | /** | ||
448 | * @description: updateLeafState | ||
449 | * @author: renchao | ||
450 | */ | ||
343 | updateLeafState() { | 451 | updateLeafState() { |
344 | if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') { | 452 | if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') { |
345 | this.isLeaf = this.isLeafByUser; | 453 | this.isLeaf = this.isLeafByUser; |
... | @@ -353,6 +461,14 @@ export default class Node { | ... | @@ -353,6 +461,14 @@ export default class Node { |
353 | this.isLeaf = false; | 461 | this.isLeaf = false; |
354 | } | 462 | } |
355 | 463 | ||
464 | /** | ||
465 | * @description: setChecked | ||
466 | * @param {*} value | ||
467 | * @param {*} deep | ||
468 | * @param {*} recursion | ||
469 | * @param {*} passValue | ||
470 | * @author: renchao | ||
471 | */ | ||
356 | setChecked(value, deep, recursion, passValue) { | 472 | setChecked(value, deep, recursion, passValue) { |
357 | this.indeterminate = value === 'half'; | 473 | this.indeterminate = value === 'half'; |
358 | this.checked = value === true; | 474 | this.checked = value === true; |
... | @@ -406,6 +522,11 @@ export default class Node { | ... | @@ -406,6 +522,11 @@ export default class Node { |
406 | } | 522 | } |
407 | } | 523 | } |
408 | 524 | ||
525 | /** | ||
526 | * @description: getChildren | ||
527 | * @param {*} forceInit | ||
528 | * @author: renchao | ||
529 | */ | ||
409 | getChildren(forceInit = false) { // this is data | 530 | getChildren(forceInit = false) { // this is data |
410 | if (this.level === 0) return this.data; | 531 | if (this.level === 0) return this.data; |
411 | const data = this.data; | 532 | const data = this.data; |
... | @@ -428,6 +549,10 @@ export default class Node { | ... | @@ -428,6 +549,10 @@ export default class Node { |
428 | return data[children]; | 549 | return data[children]; |
429 | } | 550 | } |
430 | 551 | ||
552 | /** | ||
553 | * @description: updateChildren | ||
554 | * @author: renchao | ||
555 | */ | ||
431 | updateChildren() { | 556 | updateChildren() { |
432 | const newData = this.getChildren() || []; | 557 | const newData = this.getChildren() || []; |
433 | const oldData = this.childNodes.map((node) => node.data); | 558 | const oldData = this.childNodes.map((node) => node.data); |
... | @@ -458,6 +583,12 @@ export default class Node { | ... | @@ -458,6 +583,12 @@ export default class Node { |
458 | this.updateLeafState(); | 583 | this.updateLeafState(); |
459 | } | 584 | } |
460 | 585 | ||
586 | /** | ||
587 | * @description: loadData | ||
588 | * @param {*} callback | ||
589 | * @param {*} defaultProps | ||
590 | * @author: renchao | ||
591 | */ | ||
461 | loadData(callback, defaultProps = {}) { | 592 | loadData(callback, defaultProps = {}) { |
462 | if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) { | 593 | if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) { |
463 | this.loading = true; | 594 | this.loading = true; | ... | ... |
... | @@ -2,6 +2,11 @@ import Node from './node'; | ... | @@ -2,6 +2,11 @@ import Node from './node'; |
2 | import { getNodeKey } from './util'; | 2 | import { getNodeKey } from './util'; |
3 | 3 | ||
4 | export default class TreeStore { | 4 | export default class TreeStore { |
5 | /** | ||
6 | * @description: constructor | ||
7 | * @param {*} options | ||
8 | * @author: renchao | ||
9 | */ | ||
5 | constructor(options) { | 10 | constructor(options) { |
6 | this.currentNode = null; | 11 | this.currentNode = null; |
7 | this.currentNodeKey = null; | 12 | this.currentNodeKey = null; |
... | @@ -30,6 +35,11 @@ export default class TreeStore { | ... | @@ -30,6 +35,11 @@ export default class TreeStore { |
30 | } | 35 | } |
31 | } | 36 | } |
32 | 37 | ||
38 | /** | ||
39 | * @description: filter | ||
40 | * @param {*} value | ||
41 | * @author: renchao | ||
42 | */ | ||
33 | filter(value) { | 43 | filter(value) { |
34 | const filterNodeMethod = this.filterNodeMethod; | 44 | const filterNodeMethod = this.filterNodeMethod; |
35 | const lazy = this.lazy; | 45 | const lazy = this.lazy; |
... | @@ -60,6 +70,11 @@ export default class TreeStore { | ... | @@ -60,6 +70,11 @@ export default class TreeStore { |
60 | traverse(this); | 70 | traverse(this); |
61 | } | 71 | } |
62 | 72 | ||
73 | /** | ||
74 | * @description: setData | ||
75 | * @param {*} newVal | ||
76 | * @author: renchao | ||
77 | */ | ||
63 | setData(newVal) { | 78 | setData(newVal) { |
64 | const instanceChanged = newVal !== this.root.data; | 79 | const instanceChanged = newVal !== this.root.data; |
65 | if (instanceChanged) { | 80 | if (instanceChanged) { |
... | @@ -70,22 +85,44 @@ export default class TreeStore { | ... | @@ -70,22 +85,44 @@ export default class TreeStore { |
70 | } | 85 | } |
71 | } | 86 | } |
72 | 87 | ||
88 | /** | ||
89 | * @description: getNode | ||
90 | * @param {*} data | ||
91 | * @author: renchao | ||
92 | */ | ||
73 | getNode(data) { | 93 | getNode(data) { |
74 | if (data instanceof Node) return data; | 94 | if (data instanceof Node) return data; |
75 | const key = typeof data !== 'object' ? data : getNodeKey(this.key, data); | 95 | const key = typeof data !== 'object' ? data : getNodeKey(this.key, data); |
76 | return this.nodesMap[key] || null; | 96 | return this.nodesMap[key] || null; |
77 | } | 97 | } |
78 | 98 | ||
99 | /** | ||
100 | * @description: insertBefore | ||
101 | * @param {*} data | ||
102 | * @param {*} refData | ||
103 | * @author: renchao | ||
104 | */ | ||
79 | insertBefore(data, refData) { | 105 | insertBefore(data, refData) { |
80 | const refNode = this.getNode(refData); | 106 | const refNode = this.getNode(refData); |
81 | refNode.parent.insertBefore({ data }, refNode); | 107 | refNode.parent.insertBefore({ data }, refNode); |
82 | } | 108 | } |
83 | 109 | ||
110 | /** | ||
111 | * @description: insertAfter | ||
112 | * @param {*} data | ||
113 | * @param {*} refData | ||
114 | * @author: renchao | ||
115 | */ | ||
84 | insertAfter(data, refData) { | 116 | insertAfter(data, refData) { |
85 | const refNode = this.getNode(refData); | 117 | const refNode = this.getNode(refData); |
86 | refNode.parent.insertAfter({ data }, refNode); | 118 | refNode.parent.insertAfter({ data }, refNode); |
87 | } | 119 | } |
88 | 120 | ||
121 | /** | ||
122 | * @description: remove | ||
123 | * @param {*} data | ||
124 | * @author: renchao | ||
125 | */ | ||
89 | remove(data) { | 126 | remove(data) { |
90 | const node = this.getNode(data); | 127 | const node = this.getNode(data); |
91 | 128 | ||
... | @@ -97,6 +134,12 @@ export default class TreeStore { | ... | @@ -97,6 +134,12 @@ export default class TreeStore { |
97 | } | 134 | } |
98 | } | 135 | } |
99 | 136 | ||
137 | /** | ||
138 | * @description: append | ||
139 | * @param {*} data | ||
140 | * @param {*} parentData | ||
141 | * @author: renchao | ||
142 | */ | ||
100 | append(data, parentData) { | 143 | append(data, parentData) { |
101 | const parentNode = parentData ? this.getNode(parentData) : this.root; | 144 | const parentNode = parentData ? this.getNode(parentData) : this.root; |
102 | 145 | ||
... | @@ -105,6 +148,10 @@ export default class TreeStore { | ... | @@ -105,6 +148,10 @@ export default class TreeStore { |
105 | } | 148 | } |
106 | } | 149 | } |
107 | 150 | ||
151 | /** | ||
152 | * @description: _initDefaultCheckedNodes | ||
153 | * @author: renchao | ||
154 | */ | ||
108 | _initDefaultCheckedNodes() { | 155 | _initDefaultCheckedNodes() { |
109 | const defaultCheckedKeys = this.defaultCheckedKeys || []; | 156 | const defaultCheckedKeys = this.defaultCheckedKeys || []; |
110 | const nodesMap = this.nodesMap; | 157 | const nodesMap = this.nodesMap; |
... | @@ -118,6 +165,11 @@ export default class TreeStore { | ... | @@ -118,6 +165,11 @@ export default class TreeStore { |
118 | }); | 165 | }); |
119 | } | 166 | } |
120 | 167 | ||
168 | /** | ||
169 | * @description: _initDefaultCheckedNode | ||
170 | * @param {*} node | ||
171 | * @author: renchao | ||
172 | */ | ||
121 | _initDefaultCheckedNode(node) { | 173 | _initDefaultCheckedNode(node) { |
122 | const defaultCheckedKeys = this.defaultCheckedKeys || []; | 174 | const defaultCheckedKeys = this.defaultCheckedKeys || []; |
123 | 175 | ||
... | @@ -126,6 +178,11 @@ export default class TreeStore { | ... | @@ -126,6 +178,11 @@ export default class TreeStore { |
126 | } | 178 | } |
127 | } | 179 | } |
128 | 180 | ||
181 | /** | ||
182 | * @description: setDefaultCheckedKey | ||
183 | * @param {*} newVal | ||
184 | * @author: renchao | ||
185 | */ | ||
129 | setDefaultCheckedKey(newVal) { | 186 | setDefaultCheckedKey(newVal) { |
130 | if (newVal !== this.defaultCheckedKeys) { | 187 | if (newVal !== this.defaultCheckedKeys) { |
131 | this.defaultCheckedKeys = newVal; | 188 | this.defaultCheckedKeys = newVal; |
... | @@ -133,6 +190,11 @@ export default class TreeStore { | ... | @@ -133,6 +190,11 @@ export default class TreeStore { |
133 | } | 190 | } |
134 | } | 191 | } |
135 | 192 | ||
193 | /** | ||
194 | * @description: registerNode | ||
195 | * @param {*} node | ||
196 | * @author: renchao | ||
197 | */ | ||
136 | registerNode(node) { | 198 | registerNode(node) { |
137 | const key = this.key; | 199 | const key = this.key; |
138 | if (!key || !node || !node.data) return; | 200 | if (!key || !node || !node.data) return; |
... | @@ -141,6 +203,11 @@ export default class TreeStore { | ... | @@ -141,6 +203,11 @@ export default class TreeStore { |
141 | if (nodeKey !== undefined) this.nodesMap[node.key] = node; | 203 | if (nodeKey !== undefined) this.nodesMap[node.key] = node; |
142 | } | 204 | } |
143 | 205 | ||
206 | /** | ||
207 | * @description: deregisterNode | ||
208 | * @param {*} node | ||
209 | * @author: renchao | ||
210 | */ | ||
144 | deregisterNode(node) { | 211 | deregisterNode(node) { |
145 | const key = this.key; | 212 | const key = this.key; |
146 | if (!key || !node || !node.data) return; | 213 | if (!key || !node || !node.data) return; |
... | @@ -152,6 +219,12 @@ export default class TreeStore { | ... | @@ -152,6 +219,12 @@ export default class TreeStore { |
152 | delete this.nodesMap[node.key]; | 219 | delete this.nodesMap[node.key]; |
153 | } | 220 | } |
154 | 221 | ||
222 | /** | ||
223 | * @description: getCheckedNodes | ||
224 | * @param {*} leafOnly | ||
225 | * @param {*} includeHalfChecked | ||
226 | * @author: renchao | ||
227 | */ | ||
155 | getCheckedNodes(leafOnly = false, includeHalfChecked = false) { | 228 | getCheckedNodes(leafOnly = false, includeHalfChecked = false) { |
156 | const checkedNodes = []; | 229 | const checkedNodes = []; |
157 | const traverse = function(node) { | 230 | const traverse = function(node) { |
... | @@ -171,10 +244,19 @@ export default class TreeStore { | ... | @@ -171,10 +244,19 @@ export default class TreeStore { |
171 | return checkedNodes; | 244 | return checkedNodes; |
172 | } | 245 | } |
173 | 246 | ||
247 | /** | ||
248 | * @description: getCheckedKeys | ||
249 | * @param {*} leafOnly | ||
250 | * @author: renchao | ||
251 | */ | ||
174 | getCheckedKeys(leafOnly = false) { | 252 | getCheckedKeys(leafOnly = false) { |
175 | return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]); | 253 | return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]); |
176 | } | 254 | } |
177 | 255 | ||
256 | /** | ||
257 | * @description: getHalfCheckedNodes | ||
258 | * @author: renchao | ||
259 | */ | ||
178 | getHalfCheckedNodes() { | 260 | getHalfCheckedNodes() { |
179 | const nodes = []; | 261 | const nodes = []; |
180 | const traverse = function(node) { | 262 | const traverse = function(node) { |
... | @@ -194,10 +276,18 @@ export default class TreeStore { | ... | @@ -194,10 +276,18 @@ export default class TreeStore { |
194 | return nodes; | 276 | return nodes; |
195 | } | 277 | } |
196 | 278 | ||
279 | /** | ||
280 | * @description: getHalfCheckedKeys | ||
281 | * @author: renchao | ||
282 | */ | ||
197 | getHalfCheckedKeys() { | 283 | getHalfCheckedKeys() { |
198 | return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]); | 284 | return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]); |
199 | } | 285 | } |
200 | 286 | ||
287 | /** | ||
288 | * @description: _getAllNodes | ||
289 | * @author: renchao | ||
290 | */ | ||
201 | _getAllNodes() { | 291 | _getAllNodes() { |
202 | const allNodes = []; | 292 | const allNodes = []; |
203 | const nodesMap = this.nodesMap; | 293 | const nodesMap = this.nodesMap; |
... | @@ -210,6 +300,12 @@ export default class TreeStore { | ... | @@ -210,6 +300,12 @@ export default class TreeStore { |
210 | return allNodes; | 300 | return allNodes; |
211 | } | 301 | } |
212 | 302 | ||
303 | /** | ||
304 | * @description: updateChildren | ||
305 | * @param {*} key | ||
306 | * @param {*} data | ||
307 | * @author: renchao | ||
308 | */ | ||
213 | updateChildren(key, data) { | 309 | updateChildren(key, data) { |
214 | const node = this.nodesMap[key]; | 310 | const node = this.nodesMap[key]; |
215 | if (!node) return; | 311 | if (!node) return; |
... | @@ -224,6 +320,13 @@ export default class TreeStore { | ... | @@ -224,6 +320,13 @@ export default class TreeStore { |
224 | } | 320 | } |
225 | } | 321 | } |
226 | 322 | ||
323 | /** | ||
324 | * @description: _setCheckedKeys | ||
325 | * @param {*} key | ||
326 | * @param {*} leafOnly | ||
327 | * @param {*} checkedKeys | ||
328 | * @author: renchao | ||
329 | */ | ||
227 | _setCheckedKeys(key, leafOnly = false, checkedKeys) { | 330 | _setCheckedKeys(key, leafOnly = false, checkedKeys) { |
228 | const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level); | 331 | const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level); |
229 | const cache = Object.create(null); | 332 | const cache = Object.create(null); |
... | @@ -268,6 +371,12 @@ export default class TreeStore { | ... | @@ -268,6 +371,12 @@ export default class TreeStore { |
268 | } | 371 | } |
269 | } | 372 | } |
270 | 373 | ||
374 | /** | ||
375 | * @description: setCheckedNodes | ||
376 | * @param {*} array | ||
377 | * @param {*} leafOnly | ||
378 | * @author: renchao | ||
379 | */ | ||
271 | setCheckedNodes(array, leafOnly = false) { | 380 | setCheckedNodes(array, leafOnly = false) { |
272 | const key = this.key; | 381 | const key = this.key; |
273 | const checkedKeys = {}; | 382 | const checkedKeys = {}; |
... | @@ -278,6 +387,12 @@ export default class TreeStore { | ... | @@ -278,6 +387,12 @@ export default class TreeStore { |
278 | this._setCheckedKeys(key, leafOnly, checkedKeys); | 387 | this._setCheckedKeys(key, leafOnly, checkedKeys); |
279 | } | 388 | } |
280 | 389 | ||
390 | /** | ||
391 | * @description: setCheckedKeys | ||
392 | * @param {*} array | ||
393 | * @param {*} leafOnly | ||
394 | * @author: renchao | ||
395 | */ | ||
281 | setCheckedKeys(keys, leafOnly = false) { | 396 | setCheckedKeys(keys, leafOnly = false) { |
282 | this.defaultCheckedKeys = keys; | 397 | this.defaultCheckedKeys = keys; |
283 | const key = this.key; | 398 | const key = this.key; |
... | @@ -289,6 +404,11 @@ export default class TreeStore { | ... | @@ -289,6 +404,11 @@ export default class TreeStore { |
289 | this._setCheckedKeys(key, leafOnly, checkedKeys); | 404 | this._setCheckedKeys(key, leafOnly, checkedKeys); |
290 | } | 405 | } |
291 | 406 | ||
407 | /** | ||
408 | * @description: setDefaultExpandedKeys | ||
409 | * @param {*} keys | ||
410 | * @author: renchao | ||
411 | */ | ||
292 | setDefaultExpandedKeys(keys) { | 412 | setDefaultExpandedKeys(keys) { |
293 | keys = keys || []; | 413 | keys = keys || []; |
294 | this.defaultExpandedKeys = keys; | 414 | this.defaultExpandedKeys = keys; |
... | @@ -299,6 +419,13 @@ export default class TreeStore { | ... | @@ -299,6 +419,13 @@ export default class TreeStore { |
299 | }); | 419 | }); |
300 | } | 420 | } |
301 | 421 | ||
422 | /** | ||
423 | * @description: setChecked | ||
424 | * @param {*} data | ||
425 | * @param {*} checked | ||
426 | * @param {*} deep | ||
427 | * @author: renchao | ||
428 | */ | ||
302 | setChecked(data, checked, deep) { | 429 | setChecked(data, checked, deep) { |
303 | const node = this.getNode(data); | 430 | const node = this.getNode(data); |
304 | 431 | ||
... | @@ -307,10 +434,19 @@ export default class TreeStore { | ... | @@ -307,10 +434,19 @@ export default class TreeStore { |
307 | } | 434 | } |
308 | } | 435 | } |
309 | 436 | ||
437 | /** | ||
438 | * @description: getCurrentNode | ||
439 | * @author: renchao | ||
440 | */ | ||
310 | getCurrentNode() { | 441 | getCurrentNode() { |
311 | return this.currentNode; | 442 | return this.currentNode; |
312 | } | 443 | } |
313 | 444 | ||
445 | /** | ||
446 | * @description: setCurrentNode | ||
447 | * @param {*} currentNode | ||
448 | * @author: renchao | ||
449 | */ | ||
314 | setCurrentNode(currentNode) { | 450 | setCurrentNode(currentNode) { |
315 | const prevCurrentNode = this.currentNode; | 451 | const prevCurrentNode = this.currentNode; |
316 | if (prevCurrentNode) { | 452 | if (prevCurrentNode) { |
... | @@ -320,12 +456,22 @@ export default class TreeStore { | ... | @@ -320,12 +456,22 @@ export default class TreeStore { |
320 | this.currentNode.isCurrent = true; | 456 | this.currentNode.isCurrent = true; |
321 | } | 457 | } |
322 | 458 | ||
459 | /** | ||
460 | * @description: setUserCurrentNode | ||
461 | * @param {*} node | ||
462 | * @author: renchao | ||
463 | */ | ||
323 | setUserCurrentNode(node) { | 464 | setUserCurrentNode(node) { |
324 | const key = node[this.key]; | 465 | const key = node[this.key]; |
325 | const currNode = this.nodesMap[key]; | 466 | const currNode = this.nodesMap[key]; |
326 | this.setCurrentNode(currNode); | 467 | this.setCurrentNode(currNode); |
327 | } | 468 | } |
328 | 469 | ||
470 | /** | ||
471 | * @description: setCurrentNodeKey | ||
472 | * @param {*} key | ||
473 | * @author: renchao | ||
474 | */ | ||
329 | setCurrentNodeKey(key) { | 475 | setCurrentNodeKey(key) { |
330 | if (key === null || key === undefined) { | 476 | if (key === null || key === undefined) { |
331 | this.currentNode && (this.currentNode.isCurrent = false); | 477 | this.currentNode && (this.currentNode.isCurrent = false); | ... | ... |
1 | export const NODE_KEY = '$treeNodeId'; | 1 | export const NODE_KEY = '$treeNodeId'; |
2 | 2 | ||
3 | /** | ||
4 | * @description: markNodeData | ||
5 | * @param {*} node | ||
6 | * @param {*} data | ||
7 | * @author: renchao | ||
8 | */ | ||
3 | export const markNodeData = function(node, data) { | 9 | export const markNodeData = function(node, data) { |
4 | if (!data || data[NODE_KEY]) return; | 10 | if (!data || data[NODE_KEY]) return; |
5 | Object.defineProperty(data, NODE_KEY, { | 11 | Object.defineProperty(data, NODE_KEY, { |
... | @@ -10,11 +16,23 @@ export const markNodeData = function(node, data) { | ... | @@ -10,11 +16,23 @@ export const markNodeData = function(node, data) { |
10 | }); | 16 | }); |
11 | }; | 17 | }; |
12 | 18 | ||
19 | /** | ||
20 | * @description: getNodeKey | ||
21 | * @param {*} key | ||
22 | * @param {*} data | ||
23 | * @author: renchao | ||
24 | */ | ||
13 | export const getNodeKey = function(key, data) { | 25 | export const getNodeKey = function(key, data) { |
14 | if (!key) return data[NODE_KEY]; | 26 | if (!key) return data[NODE_KEY]; |
15 | return data[key]; | 27 | return data[key]; |
16 | }; | 28 | }; |
17 | 29 | ||
30 | /** | ||
31 | * @description: findNearestComponent | ||
32 | * @param {*} element | ||
33 | * @param {*} componentName | ||
34 | * @author: renchao | ||
35 | */ | ||
18 | export const findNearestComponent = (element, componentName) => { | 36 | export const findNearestComponent = (element, componentName) => { |
19 | let target = element; | 37 | let target = element; |
20 | while (target && target.tagName !== 'BODY') { | 38 | while (target && target.tagName !== 'BODY') { | ... | ... |
... | @@ -116,10 +116,21 @@ export default { | ... | @@ -116,10 +116,21 @@ export default { |
116 | }, | 116 | }, |
117 | 117 | ||
118 | methods: { | 118 | methods: { |
119 | /** | ||
120 | * @description: getNodeKey | ||
121 | * @param {*} node | ||
122 | * @author: renchao | ||
123 | */ | ||
119 | getNodeKey (node) { | 124 | getNodeKey (node) { |
120 | return getNodeKey(this.tree.nodeKey, node.data); | 125 | return getNodeKey(this.tree.nodeKey, node.data); |
121 | }, | 126 | }, |
122 | 127 | ||
128 | /** | ||
129 | * @description: handleSelectChange | ||
130 | * @param {*} checked | ||
131 | * @param {*} indeterminate | ||
132 | * @author: renchao | ||
133 | */ | ||
123 | handleSelectChange (checked, indeterminate) { | 134 | handleSelectChange (checked, indeterminate) { |
124 | if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) { | 135 | if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) { |
125 | this.tree.$emit('check-change', this.node.data, checked, indeterminate); | 136 | this.tree.$emit('check-change', this.node.data, checked, indeterminate); |
... | @@ -128,6 +139,10 @@ export default { | ... | @@ -128,6 +139,10 @@ export default { |
128 | this.indeterminate = indeterminate; | 139 | this.indeterminate = indeterminate; |
129 | }, | 140 | }, |
130 | 141 | ||
142 | /** | ||
143 | * @description: handleClick | ||
144 | * @author: renchao | ||
145 | */ | ||
131 | handleClick () { | 146 | handleClick () { |
132 | const store = this.tree.store; | 147 | const store = this.tree.store; |
133 | store.setCurrentNode(this.node); | 148 | store.setCurrentNode(this.node); |
... | @@ -144,6 +159,11 @@ export default { | ... | @@ -144,6 +159,11 @@ export default { |
144 | this.tree.$emit('node-click', this.node.data, this.node, this); | 159 | this.tree.$emit('node-click', this.node.data, this.node, this); |
145 | }, | 160 | }, |
146 | 161 | ||
162 | /** | ||
163 | * @description: handleContextMenu | ||
164 | * @param {*} event | ||
165 | * @author: renchao | ||
166 | */ | ||
147 | handleContextMenu (event) { | 167 | handleContextMenu (event) { |
148 | if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) { | 168 | if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) { |
149 | event.stopPropagation(); | 169 | event.stopPropagation(); |
... | @@ -152,6 +172,10 @@ export default { | ... | @@ -152,6 +172,10 @@ export default { |
152 | this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this); | 172 | this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this); |
153 | }, | 173 | }, |
154 | 174 | ||
175 | /** | ||
176 | * @description: handleExpandIconClick | ||
177 | * @author: renchao | ||
178 | */ | ||
155 | handleExpandIconClick () { | 179 | handleExpandIconClick () { |
156 | if (this.node.isLeaf) return; | 180 | if (this.node.isLeaf) return; |
157 | if (this.expanded) { | 181 | if (this.expanded) { |
... | @@ -163,6 +187,12 @@ export default { | ... | @@ -163,6 +187,12 @@ export default { |
163 | } | 187 | } |
164 | }, | 188 | }, |
165 | 189 | ||
190 | /** | ||
191 | * @description: handleCheckChange | ||
192 | * @param {*} value | ||
193 | * @param {*} ev | ||
194 | * @author: renchao | ||
195 | */ | ||
166 | handleCheckChange (value, ev) { | 196 | handleCheckChange (value, ev) { |
167 | this.node.setChecked(ev.target.checked, !this.tree.checkStrictly); | 197 | this.node.setChecked(ev.target.checked, !this.tree.checkStrictly); |
168 | this.$nextTick(() => { | 198 | this.$nextTick(() => { |
... | @@ -176,26 +206,53 @@ export default { | ... | @@ -176,26 +206,53 @@ export default { |
176 | }); | 206 | }); |
177 | }, | 207 | }, |
178 | 208 | ||
209 | /** | ||
210 | * @description: handleChildNodeExpand | ||
211 | * @param {*} nodeData | ||
212 | * @param {*} node | ||
213 | * @param {*} instance | ||
214 | * @author: renchao | ||
215 | */ | ||
179 | handleChildNodeExpand (nodeData, node, instance) { | 216 | handleChildNodeExpand (nodeData, node, instance) { |
180 | this.broadcast('ElTreeNode', 'tree-node-expand', node); | 217 | this.broadcast('ElTreeNode', 'tree-node-expand', node); |
181 | this.tree.$emit('node-expand', nodeData, node, instance); | 218 | this.tree.$emit('node-expand', nodeData, node, instance); |
182 | }, | 219 | }, |
183 | 220 | ||
221 | /** | ||
222 | * @description: handleDragStart | ||
223 | * @param {*} event | ||
224 | * @author: renchao | ||
225 | */ | ||
184 | handleDragStart (event) { | 226 | handleDragStart (event) { |
185 | if (!this.tree.draggable) return; | 227 | if (!this.tree.draggable) return; |
186 | this.tree.$emit('tree-node-drag-start', event, this); | 228 | this.tree.$emit('tree-node-drag-start', event, this); |
187 | }, | 229 | }, |
188 | 230 | ||
231 | /** | ||
232 | * @description: handleDragOver | ||
233 | * @param {*} event | ||
234 | * @author: renchao | ||
235 | */ | ||
189 | handleDragOver (event) { | 236 | handleDragOver (event) { |
190 | if (!this.tree.draggable) return; | 237 | if (!this.tree.draggable) return; |
191 | this.tree.$emit('tree-node-drag-over', event, this); | 238 | this.tree.$emit('tree-node-drag-over', event, this); |
192 | event.preventDefault(); | 239 | event.preventDefault(); |
193 | }, | 240 | }, |
194 | 241 | ||
242 | /** | ||
243 | * @description: handleDrop | ||
244 | * @param {*} event | ||
245 | * @author: renchao | ||
246 | */ | ||
195 | handleDrop (event) { | 247 | handleDrop (event) { |
196 | event.preventDefault(); | 248 | event.preventDefault(); |
197 | }, | 249 | }, |
198 | 250 | ||
251 | /** | ||
252 | * @description: handleDragEnd | ||
253 | * @param {*} event | ||
254 | * @author: renchao | ||
255 | */ | ||
199 | handleDragEnd (event) { | 256 | handleDragEnd (event) { |
200 | if (!this.tree.draggable) return; | 257 | if (!this.tree.draggable) return; |
201 | this.tree.$emit('tree-node-drag-end', event, this); | 258 | this.tree.$emit('tree-node-drag-end', event, this); | ... | ... |
... | @@ -177,15 +177,30 @@ | ... | @@ -177,15 +177,30 @@ |
177 | }, | 177 | }, |
178 | 178 | ||
179 | methods: { | 179 | methods: { |
180 | /** | ||
181 | * @description: filter | ||
182 | * @param {*} value | ||
183 | * @author: renchao | ||
184 | */ | ||
180 | filter(value) { | 185 | filter(value) { |
181 | if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter'); | 186 | if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter'); |
182 | this.store.filter(value); | 187 | this.store.filter(value); |
183 | }, | 188 | }, |
184 | 189 | ||
190 | /** | ||
191 | * @description: getNodeKey | ||
192 | * @param {*} node | ||
193 | * @author: renchao | ||
194 | */ | ||
185 | getNodeKey(node) { | 195 | getNodeKey(node) { |
186 | return getNodeKey(this.nodeKey, node.data); | 196 | return getNodeKey(this.nodeKey, node.data); |
187 | }, | 197 | }, |
188 | 198 | ||
199 | /** | ||
200 | * @description: getNodePath | ||
201 | * @param {*} data | ||
202 | * @author: renchao | ||
203 | */ | ||
189 | getNodePath(data) { | 204 | getNodePath(data) { |
190 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath'); | 205 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath'); |
191 | const node = this.store.getNode(data); | 206 | const node = this.store.getNode(data); |
... | @@ -199,87 +214,188 @@ | ... | @@ -199,87 +214,188 @@ |
199 | return path.reverse(); | 214 | return path.reverse(); |
200 | }, | 215 | }, |
201 | 216 | ||
217 | /** | ||
218 | * @description: getCheckedNodes | ||
219 | * @param {*} leafOnly | ||
220 | * @param {*} includeHalfChecked | ||
221 | * @author: renchao | ||
222 | */ | ||
202 | getCheckedNodes(leafOnly, includeHalfChecked) { | 223 | getCheckedNodes(leafOnly, includeHalfChecked) { |
203 | return this.store.getCheckedNodes(leafOnly, includeHalfChecked); | 224 | return this.store.getCheckedNodes(leafOnly, includeHalfChecked); |
204 | }, | 225 | }, |
205 | 226 | ||
227 | /** | ||
228 | * @description: getCheckedKeys | ||
229 | * @param {*} leafOnly | ||
230 | * @author: renchao | ||
231 | */ | ||
206 | getCheckedKeys(leafOnly) { | 232 | getCheckedKeys(leafOnly) { |
207 | return this.store.getCheckedKeys(leafOnly); | 233 | return this.store.getCheckedKeys(leafOnly); |
208 | }, | 234 | }, |
209 | 235 | ||
236 | /** | ||
237 | * @description: getCurrentNode | ||
238 | * @author: renchao | ||
239 | */ | ||
210 | getCurrentNode() { | 240 | getCurrentNode() { |
211 | const currentNode = this.store.getCurrentNode(); | 241 | const currentNode = this.store.getCurrentNode(); |
212 | return currentNode ? currentNode.data : null; | 242 | return currentNode ? currentNode.data : null; |
213 | }, | 243 | }, |
214 | 244 | ||
245 | /** | ||
246 | * @description: getCurrentKey | ||
247 | * @author: renchao | ||
248 | */ | ||
215 | getCurrentKey() { | 249 | getCurrentKey() { |
216 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey'); | 250 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey'); |
217 | const currentNode = this.getCurrentNode(); | 251 | const currentNode = this.getCurrentNode(); |
218 | return currentNode ? currentNode[this.nodeKey] : null; | 252 | return currentNode ? currentNode[this.nodeKey] : null; |
219 | }, | 253 | }, |
220 | 254 | ||
255 | /** | ||
256 | * @description: setCheckedNodes | ||
257 | * @param {*} nodes | ||
258 | * @param {*} leafOnly | ||
259 | * @author: renchao | ||
260 | */ | ||
221 | setCheckedNodes(nodes, leafOnly) { | 261 | setCheckedNodes(nodes, leafOnly) { |
222 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes'); | 262 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes'); |
223 | this.store.setCheckedNodes(nodes, leafOnly); | 263 | this.store.setCheckedNodes(nodes, leafOnly); |
224 | }, | 264 | }, |
225 | 265 | ||
266 | /** | ||
267 | * @description: setCheckedKeys | ||
268 | * @param {*} keys | ||
269 | * @param {*} leafOnly | ||
270 | * @author: renchao | ||
271 | */ | ||
226 | setCheckedKeys(keys, leafOnly) { | 272 | setCheckedKeys(keys, leafOnly) { |
227 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys'); | 273 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys'); |
228 | this.store.setCheckedKeys(keys, leafOnly); | 274 | this.store.setCheckedKeys(keys, leafOnly); |
229 | }, | 275 | }, |
230 | 276 | ||
277 | /** | ||
278 | * @description: setChecked | ||
279 | * @param {*} data | ||
280 | * @param {*} checked | ||
281 | * @param {*} deep | ||
282 | * @author: renchao | ||
283 | */ | ||
231 | setChecked(data, checked, deep) { | 284 | setChecked(data, checked, deep) { |
232 | this.store.setChecked(data, checked, deep); | 285 | this.store.setChecked(data, checked, deep); |
233 | }, | 286 | }, |
234 | 287 | ||
288 | /** | ||
289 | * @description: getHalfCheckedNodes | ||
290 | * @author: renchao | ||
291 | */ | ||
235 | getHalfCheckedNodes() { | 292 | getHalfCheckedNodes() { |
236 | return this.store.getHalfCheckedNodes(); | 293 | return this.store.getHalfCheckedNodes(); |
237 | }, | 294 | }, |
238 | 295 | ||
296 | /** | ||
297 | * @description: getHalfCheckedKeys | ||
298 | * @author: renchao | ||
299 | */ | ||
239 | getHalfCheckedKeys() { | 300 | getHalfCheckedKeys() { |
240 | return this.store.getHalfCheckedKeys(); | 301 | return this.store.getHalfCheckedKeys(); |
241 | }, | 302 | }, |
242 | 303 | ||
304 | /** | ||
305 | * @description: setCurrentNode | ||
306 | * @param {*} node | ||
307 | * @author: renchao | ||
308 | */ | ||
243 | setCurrentNode(node) { | 309 | setCurrentNode(node) { |
244 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode'); | 310 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode'); |
245 | this.store.setUserCurrentNode(node); | 311 | this.store.setUserCurrentNode(node); |
246 | }, | 312 | }, |
247 | 313 | ||
314 | /** | ||
315 | * @description: setCurrentKey | ||
316 | * @param {*} key | ||
317 | * @author: renchao | ||
318 | */ | ||
248 | setCurrentKey(key) { | 319 | setCurrentKey(key) { |
249 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey'); | 320 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey'); |
250 | this.store.setCurrentNodeKey(key); | 321 | this.store.setCurrentNodeKey(key); |
251 | }, | 322 | }, |
252 | 323 | ||
324 | /** | ||
325 | * @description: getNode | ||
326 | * @param {*} data | ||
327 | * @author: renchao | ||
328 | */ | ||
253 | getNode(data) { | 329 | getNode(data) { |
254 | return this.store.getNode(data); | 330 | return this.store.getNode(data); |
255 | }, | 331 | }, |
256 | 332 | ||
333 | /** | ||
334 | * @description: remove | ||
335 | * @param {*} data | ||
336 | * @author: renchao | ||
337 | */ | ||
257 | remove(data) { | 338 | remove(data) { |
258 | this.store.remove(data); | 339 | this.store.remove(data); |
259 | }, | 340 | }, |
260 | 341 | ||
342 | /** | ||
343 | * @description: append | ||
344 | * @param {*} data | ||
345 | * @param {*} parentNode | ||
346 | * @author: renchao | ||
347 | */ | ||
261 | append(data, parentNode) { | 348 | append(data, parentNode) { |
262 | this.store.append(data, parentNode); | 349 | this.store.append(data, parentNode); |
263 | }, | 350 | }, |
264 | 351 | ||
352 | /** | ||
353 | * @description: insertBefore | ||
354 | * @param {*} data | ||
355 | * @param {*} refNode | ||
356 | * @author: renchao | ||
357 | */ | ||
265 | insertBefore(data, refNode) { | 358 | insertBefore(data, refNode) { |
266 | this.store.insertBefore(data, refNode); | 359 | this.store.insertBefore(data, refNode); |
267 | }, | 360 | }, |
268 | 361 | ||
362 | /** | ||
363 | * @description: insertAfter | ||
364 | * @param {*} data | ||
365 | * @param {*} refNode | ||
366 | * @author: renchao | ||
367 | */ | ||
269 | insertAfter(data, refNode) { | 368 | insertAfter(data, refNode) { |
270 | this.store.insertAfter(data, refNode); | 369 | this.store.insertAfter(data, refNode); |
271 | }, | 370 | }, |
272 | 371 | ||
372 | /** | ||
373 | * @description: handleNodeExpand | ||
374 | * @param {*} nodeData | ||
375 | * @param {*} node | ||
376 | * @param {*} instance | ||
377 | * @author: renchao | ||
378 | */ | ||
273 | handleNodeExpand(nodeData, node, instance) { | 379 | handleNodeExpand(nodeData, node, instance) { |
274 | this.broadcast('ElTreeNode', 'tree-node-expand', node); | 380 | this.broadcast('ElTreeNode', 'tree-node-expand', node); |
275 | this.$emit('node-expand', nodeData, node, instance); | 381 | this.$emit('node-expand', nodeData, node, instance); |
276 | }, | 382 | }, |
277 | 383 | ||
384 | /** | ||
385 | * @description: updateKeyChildren | ||
386 | * @param {*} key | ||
387 | * @param {*} data | ||
388 | * @author: renchao | ||
389 | */ | ||
278 | updateKeyChildren(key, data) { | 390 | updateKeyChildren(key, data) { |
279 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild'); | 391 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild'); |
280 | this.store.updateChildren(key, data); | 392 | this.store.updateChildren(key, data); |
281 | }, | 393 | }, |
282 | 394 | ||
395 | /** | ||
396 | * @description: initTabIndex | ||
397 | * @author: renchao | ||
398 | */ | ||
283 | initTabIndex() { | 399 | initTabIndex() { |
284 | this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]'); | 400 | this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]'); |
285 | this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]'); | 401 | this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]'); |
... | @@ -291,6 +407,11 @@ | ... | @@ -291,6 +407,11 @@ |
291 | this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0); | 407 | this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0); |
292 | }, | 408 | }, |
293 | 409 | ||
410 | /** | ||
411 | * @description: handleKeydown | ||
412 | * @param {*} ev | ||
413 | * @author: renchao | ||
414 | */ | ||
294 | handleKeydown(ev) { | 415 | handleKeydown(ev) { |
295 | const currentItem = ev.target; | 416 | const currentItem = ev.target; |
296 | if (currentItem.className.indexOf('el-tree-node') === -1) return; | 417 | if (currentItem.className.indexOf('el-tree-node') === -1) return; |
... | @@ -319,6 +440,10 @@ | ... | @@ -319,6 +440,10 @@ |
319 | } | 440 | } |
320 | }, | 441 | }, |
321 | 442 | ||
443 | /** | ||
444 | * @description: created | ||
445 | * @author: renchao | ||
446 | */ | ||
322 | created() { | 447 | created() { |
323 | this.isTree = true; | 448 | this.isTree = true; |
324 | 449 | ... | ... |
src/components/formMenu/qlr.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/components/formMenu/qlxz.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
1 | <template> | ||
2 | <div class="temp"> | ||
3 | <el-row class="qlxzModule" v-for="(items, index) in countList" :key="items.id"> | ||
4 | <template v-for="(childItem, childIndex) in items.list"> | ||
5 | <el-col :span="2" class="btnCol" :key="childIndex + '1'" :class="childIndex > 0 ? 'childYT noTopBorder' : ''"> | ||
6 | <el-button v-show="childIndex < 1" type="primary" class="changeBtn addMinus outAdd" | ||
7 | @click="handleClick(index, 'add')">+</el-button> | ||
8 | <el-button v-show="childIndex < 1" type="primary" class="changeBtn addMinus outMinus" | ||
9 | @click="handleClick(index, 'minus')">-</el-button> | ||
10 | <div :class="items.hasNotBorder ? 'itemShow whiteItem' : 'whiteItem'" v-if="items.isInside"></div> | ||
11 | </el-col> | ||
12 | <el-col :span="2" class="btnCol" :key="childIndex + '8'" :class="childIndex > 0 ? 'childYT' : ''"> | ||
13 | <!-- <template v-if="childIndex>0"> --> | ||
14 | <span class="qlxz" v-show="childIndex < 1">权利性质</span><br /> | ||
15 | <el-button type="primary" class="changeBtn addMinus inAdd" @click="handleInClick(index, childIndex, 'add')">+ | ||
16 | </el-button> | ||
17 | <el-button type="primary" class="changeBtn addMinus inMinus" | ||
18 | @click="handleInClick(index, childIndex, 'minus')">-</el-button> | ||
19 | <!-- </template> --> | ||
20 | </el-col> | ||
21 | <el-col :span="5" :key="childIndex + '7'" :class="childIndex > 0 ? 'childYT' : ''"> | ||
22 | <ul> | ||
23 | <li>批准用途</li> | ||
24 | <li>实际用途</li> | ||
25 | <li>土地使用起始时间<i class="requisite">*</i></li> | ||
26 | </ul> | ||
27 | </el-col> | ||
28 | <el-col :span="5" :key="childIndex + '6'" :class="childIndex > 0 ? 'childYT' : ''"> | ||
29 | <ul> | ||
30 | <li> | ||
31 | <el-select-tree v-if="show" :default-expand-all="defaultExpandAll" :multiple="multiple" | ||
32 | :placeholder="placeholder" :disabled="disabled" :data="$store.state.tdytList" :props="treeProps" | ||
33 | :check-strictly="checkStrictly" :clearable="clearable" v-model="childItem.pzytdm"></el-select-tree> | ||
34 | </li> | ||
35 | <li> | ||
36 | <el-select-tree v-if="show" :default-expand-all="defaultExpandAll" :multiple="multiple" | ||
37 | :placeholder="placeholder" :disabled="disabled" :data="$store.state.tdytList" :props="treeProps" | ||
38 | :check-strictly="checkStrictly" :clearable="clearable" v-model="childItem.sjytdm"></el-select-tree> | ||
39 | </li> | ||
40 | <li> | ||
41 | <el-date-picker v-model="childItem.tdsyqssj" :picker-options="childItem.pickerStart" type="date" | ||
42 | value-format="yyyy-MM-dd" placeholder="选择日期" @input="startTime(index, childIndex)"> | ||
43 | </el-date-picker> | ||
44 | </li> | ||
45 | </ul> | ||
46 | </el-col> | ||
47 | <el-col :span="5" :key="childIndex + '5'" :class="childIndex > 0 ? 'childYT' : ''"> | ||
48 | <ul> | ||
49 | <li>地类编码</li> | ||
50 | <li>地类编码</li> | ||
51 | <li>土地使用结束时间<i class="requisite">*</i></li> | ||
52 | </ul> | ||
53 | </el-col> | ||
54 | <el-col :span="5" :key="childIndex + '4'" :class="childIndex > 0 ? 'childYT' : ''"> | ||
55 | <ul> | ||
56 | <li> | ||
57 | <input type="text" style="top: -1px;" v-model="childItem.pzytdm" class="formInput" /> | ||
58 | </li> | ||
59 | <li> | ||
60 | <input type="text" v-model="childItem.sjytdm" class="formInput" /> | ||
61 | </li> | ||
62 | <li> | ||
63 | <el-date-picker v-model="childItem.tdsyjssj" type="date" value-format="yyyy-MM-dd" | ||
64 | :picker-options="childItem.pickerEnd" placeholder="选择日期" @input="endTime(index, childIndex)"> | ||
65 | </el-date-picker> | ||
66 | </li> | ||
67 | </ul> | ||
68 | </el-col> | ||
69 | </template> | ||
70 | |||
71 | <div class="title"> | ||
72 | <el-select class="formSelect" v-model="items.qlxzdm"> | ||
73 | <el-option v-for="item in $store.state.qlxzList" :key="item.dm" :label="item.mc" :value="item.dm"> | ||
74 | </el-option> | ||
75 | </el-select> | ||
76 | </div> | ||
77 | </el-row> | ||
78 | </div> | ||
79 | </template> | ||
80 | |||
81 | <script> | ||
82 | // import { getDdicByMC } from "@api/common"; | ||
83 | export default { | ||
84 | props: { | ||
85 | // widtd: { | ||
86 | // type: String, | ||
87 | default: "70%", | ||
88 | , | ||
89 | a () { | ||
90 | return { | ||
91 | //树型结构 | ||
92 | how: true, | ||
93 | arable: true, | ||
94 | aultExpandAll: true, | ||
95 | tiple: false, | ||
96 | ceholder: "请选择", | ||
97 | abled: false, | ||
98 | ckStrictly: true, | ||
99 | eProps: { | ||
100 | lue: "dm", | ||
101 | ildren: "children", | ||
102 | bel: "mc", | ||
103 | |||
104 | ntList: [ | ||
105 | |||
106 | id: Math.random(), | ||
107 | isInside: false, | ||
108 | hasNotBorder: false, | ||
109 | bsm: "", //权利性质标识码 | ||
110 | lbsm: "", //宗地BSM、自然幢BSM、户BSM、多幢BSM、宗海BSM | ||
111 | lxzdm: "", | ||
112 | zhqlxzlx: "", //除宗海数据外,默认都是空;0:用海类型权利性质;2:海岛用途权利性质 | ||
113 | list: [ | ||
114 | { | ||
115 | pzdjbsm: "", | ||
116 | pzdjmc: "", | ||
117 | pzytdm: "", | ||
118 | pzytmc: "", | ||
119 | pzytmj: 0, | ||
120 | qlxzbsm: "", | ||
121 | sjdjbsm: "", | ||
122 | sjdjmc: "", | ||
123 | sjytdm: "", | ||
124 | sjytmc: "", | ||
125 | jytmj: 0, | ||
126 | syqx: "", | ||
127 | tdsyjssj: "", | ||
128 | tdsyqssj: "", | ||
129 | pickerStart: {}, | ||
130 | pickerEnd: {}, | ||
131 | tdzh: "", | ||
132 | }, | ||
133 | |||
134 | |||
135 | |||
136 | Num: 0, | ||
137 | |||
138 | |||
139 | ed () { }, | ||
140 | hods: { | ||
141 | 外层操作 | ||
142 | ndleClick (ind, type) { | ||
143 | outsideObj = { | ||
144 | Math.random(), | ||
145 | Inside: false, | ||
146 | sNotBorder: false, | ||
147 | "", //权利性质标识码 | ||
148 | bsm: "", //宗地BSM、自然幢BSM、户BSM、多幢BSM、宗海BSM | ||
149 | xzdm: "", | ||
150 | zhqlxzlx: "", //除宗海数据外,默认都是空;0:用海类型权利性质;2:海岛用途权利性质 | ||
151 | list: [ | ||
152 | { | ||
153 | pzdjbsm: "", | ||
154 | pzdjmc: "", | ||
155 | pzytdm: "", | ||
156 | pzytmc: "", | ||
157 | pzytmj: 0, | ||
158 | qlxzbsm: "", | ||
159 | sjdjbsm: "", | ||
160 | sjdjmc: "", | ||
161 | sjytdm: "", | ||
162 | sjytmc: "", | ||
163 | sjytmj: 0, | ||
164 | syqx: "", | ||
165 | tdsyjssj: "", | ||
166 | tdsyqssj: "", | ||
167 | tdzh: "", | ||
168 | |||
169 | |||
170 | }; | ||
171 | (type === "add") { | ||
172 | is.countList.push(outsideObj); | ||
173 | is.outNum++; | ||
174 | lse { | ||
175 | .countList.forEach((item, index) => { | ||
176 | f (index == ind && this.countList.length > 1) { | ||
177 | this.countList.splice(index, 1); | ||
178 | } | ||
179 | }); | ||
180 | this.outNum--; | ||
181 | |||
182 | Click (index, childIndex, type) { | ||
183 | eObj = { | ||
184 | ", | ||
185 | , | ||
186 | "", | ||
187 | "", | ||
188 | : 0, | ||
189 | m: "", | ||
190 | m: "", | ||
191 | "", | ||
192 | : "", | ||
193 | : "", | ||
194 | : 0, | ||
195 | "", | ||
196 | jssj: "", | ||
197 | sj: "", | ||
198 | : "", | ||
199 | e === "add") { | ||
200 | ountList[index].list.splice(childIndex + 1, 0, insideObj); | ||
201 | |||
202 | ountList[index].list.forEach((item, childInd) => { | ||
203 | (childIndex == childInd && this.countList[index].list.length > 1) { | ||
204 | this.countList[index].list.splice(childIndex, 1); | ||
205 | } | ||
206 | }); | ||
207 | |||
208 | s.hasBorderOrNot(); | ||
209 | 是否显示边框 | ||
210 | orderOrNot () { | ||
211 | s.countList.forEach((item, index) => { | ||
212 | (index == this.countList.length - 1) { | ||
213 | m.hasNotBorder = true; | ||
214 | { | ||
215 | sNotBorder = | ||
216 | sInside && !this.countList[index + 1].isInside ? true : false; | ||
217 | aList () { | ||
218 | this.countList; | ||
219 | 时间判断 | ||
220 | tTime (index, childIndex) { | ||
221 | tartTime = this.countList[index].list[childIndex].tdsyqssj; | ||
222 | endTime = this.countList[index].list[childIndex].tdsyjssj; | ||
223 | s.countList[index].list[childIndex].pickerEnd = { | ||
224 | bledDate: (time) => { | ||
225 | f (Object.keys(startTime).length > 0) { | ||
226 | return new Date(startTime).getTime() > time.getTime(); | ||
227 | lse { | ||
228 | rn time.getTime() < Date.now(); | ||
229 | t.keys(startTime).length > 0 && Object.keys(endTime).length > 0) { | ||
230 | ear = new Date(startTime).getFullYear(); | ||
231 | ear = new Date(endTime).getFullYear(); | ||
232 | ime (index, childIndex, e) { | ||
233 | onsole.log(e, 'eeeeee'); | ||
234 | let startTime = this.countList[index].list[childIndex].tdsyqssj; | ||
235 | let endTime = this.countList[index].list[childIndex].tdsyjssj; | ||
236 | this.countList[index].list[childIndex].pickerStart = { | ||
237 | disabledDate: (time) => { | ||
238 | if (Object.keys(endTime).length > 0) { | ||
239 | return new Date(endTime).getTime() < time.getTime(); | ||
240 | } else { | ||
241 | return time.getTime() > Date.now(); | ||
242 | } | ||
243 | } | ||
244 | } | ||
245 | if (Object.keys(startTime).length > 0 && Object.keys(endTime).length > 0) { | ||
246 | let startYear = new Date(startTime).getFullYear(); | ||
247 | let endYear = new Date(endTime).getFullYear(); | ||
248 | } | ||
249 | }, | ||
250 | }, | ||
251 | }; | ||
252 | </script> | ||
253 | <style lang="scss"> | ||
254 | .temp { | ||
255 | width: 100%; | ||
256 | |||
257 | .qlxzModule { | ||
258 | height: auto; | ||
259 | position: relative; | ||
260 | border-bottom: 1px solid #e6e6e6; | ||
261 | |||
262 | .el-col { | ||
263 | // height: 100%; | ||
264 | border-right: 1px solid #E6E6E6; | ||
265 | position: relative; | ||
266 | text-align: right; | ||
267 | padding-right: 10px; | ||
268 | |||
269 | .qlxz { | ||
270 | line-height: 34px; | ||
271 | } | ||
272 | |||
273 | ul { | ||
274 | margin-top: 34px; | ||
275 | |||
276 | li { | ||
277 | height: 37px; | ||
278 | line-height: 37px; | ||
279 | text-decoration: none; | ||
280 | border-bottom: 1px solid #e6e6e6; | ||
281 | |||
282 | .el-select { | ||
283 | width: 100%; | ||
284 | } | ||
285 | |||
286 | .el-input { | ||
287 | width: 100%; | ||
288 | } | ||
289 | |||
290 | .el-input__inner { | ||
291 | height: 34px; | ||
292 | } | ||
293 | |||
294 | input { | ||
295 | position: relative; | ||
296 | top: -2px; | ||
297 | height: 35px; | ||
298 | width: calc(100% - 1px) !important; | ||
299 | } | ||
300 | } | ||
301 | |||
302 | li:last-child { | ||
303 | border-bottom: none; | ||
304 | } | ||
305 | } | ||
306 | |||
307 | .whiteItem { | ||
308 | background-color: #fff; | ||
309 | position: absolute; | ||
310 | width: 100%; | ||
311 | height: 2px; | ||
312 | bottom: -1px; | ||
313 | left: 0; | ||
314 | } | ||
315 | |||
316 | .itemShow { | ||
317 | bottom: 2px; | ||
318 | } | ||
319 | } | ||
320 | |||
321 | .childYT { | ||
322 | height: 114px; | ||
323 | border-top: 1px solid #E6E6E6; | ||
324 | |||
325 | ul { | ||
326 | margin-top: 0; | ||
327 | |||
328 | li { | ||
329 | .el-input__inner { | ||
330 | height: 29px; | ||
331 | } | ||
332 | } | ||
333 | } | ||
334 | |||
335 | .changeBtn { | ||
336 | margin-top: -48px; | ||
337 | } | ||
338 | |||
339 | .el-button+.el-button { | ||
340 | margin-top: 4px; | ||
341 | } | ||
342 | } | ||
343 | |||
344 | .noTopBorder { | ||
345 | border-top: 0; | ||
346 | } | ||
347 | |||
348 | .noRightBorder { | ||
349 | border-right: 0; | ||
350 | } | ||
351 | |||
352 | .el-col:nth-last-child(2) { | ||
353 | border-right: none; | ||
354 | } | ||
355 | |||
356 | .title { | ||
357 | width: 83.33333%; | ||
358 | height: 34px; | ||
359 | line-height: 34px; | ||
360 | background-color: #fff; | ||
361 | border-bottom: 1px solid #E6E6E6; | ||
362 | position: absolute; | ||
363 | right: 0; | ||
364 | top: 0; | ||
365 | |||
366 | .formSelect { | ||
367 | top: -1px; | ||
368 | width: 100%; | ||
369 | |||
370 | .el-input__inner { | ||
371 | height: 32px; | ||
372 | } | ||
373 | } | ||
374 | } | ||
375 | } | ||
376 | |||
377 | .btnCol { | ||
378 | position: relative; | ||
379 | height: 146px; | ||
380 | |||
381 | .changeBtn { | ||
382 | width: 46px; | ||
383 | height: 46px; | ||
384 | font-size: 30px; | ||
385 | padding: 4px 6px; | ||
386 | position: absolute; | ||
387 | top: 50%; | ||
388 | left: 50%; | ||
389 | margin-top: -38px; | ||
390 | margin-left: -23px; | ||
391 | } | ||
392 | |||
393 | .el-button+.el-button { | ||
394 | margin-left: -23px; | ||
395 | margin-top: 16px; | ||
396 | } | ||
397 | } | ||
398 | |||
399 | .el-row:nth-last-child(1) { | ||
400 | border-bottom: none; | ||
401 | } | ||
402 | |||
403 | /deep/.el-select-tree { | ||
404 | width: 100%; | ||
405 | |||
406 | .el-input__inner { | ||
407 | height: 30px !important; | ||
408 | } | ||
409 | } | ||
410 | } | ||
411 | </style> |
src/components/lineTree/lineItem.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/components/lineTree/lineTree.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:24:24 | ||
5 | */ | ||
6 | export default { | ||
7 | methods:{ | ||
8 | /** | ||
9 | * @description: downloadTxt | ||
10 | * @param {*} text | ||
11 | * @param {*} fileName | ||
12 | * @author: renchao | ||
13 | */ | ||
14 | downloadTxt(text, fileName){ | ||
15 | let element = document.createElement('a') | ||
16 | element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)) | ||
17 | element.setAttribute('download', fileName) | ||
18 | element.style.display = 'none' | ||
19 | element.click() | ||
20 | }, | ||
21 | /** | ||
22 | * @description: createTextContent | ||
23 | * @param {*} jzdInfo | ||
24 | * @author: renchao | ||
25 | */ | ||
26 | createTextContent(jzdInfo){ | ||
27 | var textContent = ""; | ||
28 | for(var i = 0;i < jzdInfo.length;i++){ | ||
29 | textContent += jzdInfo[i].jzdh +","+jzdInfo[i].sxh+"," + | ||
30 | jzdInfo[i].x+","+jzdInfo[i].y+"\n" | ||
31 | } | ||
32 | return textContent; | ||
33 | }, | ||
34 | |||
35 | } | ||
36 | } |
This diff is collapsed.
Click to expand it.
... | @@ -36,9 +36,18 @@ export default { | ... | @@ -36,9 +36,18 @@ export default { |
36 | }) | 36 | }) |
37 | }, | 37 | }, |
38 | methods: { | 38 | methods: { |
39 | /** | ||
40 | * @description: closeViewer | ||
41 | * @author: renchao | ||
42 | */ | ||
39 | closeViewer () { | 43 | closeViewer () { |
40 | this.$emit('close-viewer') | 44 | this.$emit('close-viewer') |
41 | }, | 45 | }, |
46 | /** | ||
47 | * @description: hideCusBtn | ||
48 | * @param {*} e | ||
49 | * @author: renchao | ||
50 | */ | ||
42 | hideCusBtn (e) { | 51 | hideCusBtn (e) { |
43 | let className = e.target.className | 52 | let className = e.target.className |
44 | if (className === 'el-icon-download') { | 53 | if (className === 'el-icon-download') { |
... | @@ -48,6 +57,11 @@ export default { | ... | @@ -48,6 +57,11 @@ export default { |
48 | this.downloadImage(imgUrl) | 57 | this.downloadImage(imgUrl) |
49 | } | 58 | } |
50 | }, | 59 | }, |
60 | /** | ||
61 | * @description: downloadImage | ||
62 | * @param {*} imgUrl | ||
63 | * @author: renchao | ||
64 | */ | ||
51 | downloadImage (imgUrl) { | 65 | downloadImage (imgUrl) { |
52 | let tmpArr = imgUrl.split('/') | 66 | let tmpArr = imgUrl.split('/') |
53 | let fileName = tmpArr[tmpArr.length - 1] | 67 | let fileName = tmpArr[tmpArr.length - 1] | ... | ... |
... | @@ -77,7 +77,11 @@ | ... | @@ -77,7 +77,11 @@ |
77 | this.autoCurrentLabel() | 77 | this.autoCurrentLabel() |
78 | }, | 78 | }, |
79 | methods: { | 79 | methods: { |
80 | //表格显示隐藏回调 | 80 | /** |
81 | * @description: 表格显示隐藏回调 | ||
82 | * @param {*} visible | ||
83 | * @author: renchao | ||
84 | */ | ||
81 | visibleChange (visible) { | 85 | visibleChange (visible) { |
82 | if (visible) { | 86 | if (visible) { |
83 | this.formData = {} | 87 | this.formData = {} |
... | @@ -86,7 +90,10 @@ | ... | @@ -86,7 +90,10 @@ |
86 | this.autoCurrentLabel() | 90 | this.autoCurrentLabel() |
87 | } | 91 | } |
88 | }, | 92 | }, |
89 | //获取表格数据 | 93 | /** |
94 | * @description: 获取表格数据 | ||
95 | * @author: renchao | ||
96 | */ | ||
90 | async getData () { | 97 | async getData () { |
91 | //表格默认赋值 | 98 | //表格默认赋值 |
92 | if (this.multiple) { | 99 | if (this.multiple) { |
... | @@ -104,11 +111,17 @@ | ... | @@ -104,11 +111,17 @@ |
104 | } | 111 | } |
105 | // this.$refs.table.setScrollTop(0) | 112 | // this.$refs.table.setScrollTop(0) |
106 | }, | 113 | }, |
107 | //插糟表单提交 | 114 | /** |
115 | * @description: 插糟表单提交 | ||
116 | * @author: renchao | ||
117 | */ | ||
108 | formSubmit () { | 118 | formSubmit () { |
109 | this.getData() | 119 | this.getData() |
110 | }, | 120 | }, |
111 | //自动模拟options赋值 | 121 | /** |
122 | * @description: 自动模拟options赋值 | ||
123 | * @author: renchao | ||
124 | */ | ||
112 | autoCurrentLabel () { | 125 | autoCurrentLabel () { |
113 | this.$nextTick(() => { | 126 | this.$nextTick(() => { |
114 | if (this.multiple) { | 127 | if (this.multiple) { |
... | @@ -122,7 +135,12 @@ | ... | @@ -122,7 +135,12 @@ |
122 | } | 135 | } |
123 | }) | 136 | }) |
124 | }, | 137 | }, |
125 | //表格勾选事件 | 138 | /** |
139 | * @description: 表格勾选事件 | ||
140 | * @param {*} rows | ||
141 | * @param {*} row | ||
142 | * @author: renchao | ||
143 | */ | ||
126 | select (rows, row) { | 144 | select (rows, row) { |
127 | var isSelect = rows.length && rows.indexOf(row) !== -1 | 145 | var isSelect = rows.length && rows.indexOf(row) !== -1 |
128 | if (isSelect) { | 146 | if (isSelect) { |
... | @@ -134,7 +152,11 @@ | ... | @@ -134,7 +152,11 @@ |
134 | this.$emit('update:modelValue', this.defaultValue); | 152 | this.$emit('update:modelValue', this.defaultValue); |
135 | this.$emit('change', this.defaultValue); | 153 | this.$emit('change', this.defaultValue); |
136 | }, | 154 | }, |
137 | //表格全选事件 | 155 | /** |
156 | * @description: 表格全选事件 | ||
157 | * @param {*} rows | ||
158 | * @author: renchao | ||
159 | */ | ||
138 | selectAll (rows) { | 160 | selectAll (rows) { |
139 | var isAllSelect = rows.length > 0 | 161 | var isAllSelect = rows.length > 0 |
140 | if (isAllSelect) { | 162 | if (isAllSelect) { |
... | @@ -156,6 +178,11 @@ | ... | @@ -156,6 +178,11 @@ |
156 | this.$emit('update:modelValue', this.defaultValue); | 178 | this.$emit('update:modelValue', this.defaultValue); |
157 | this.$emit('change', this.defaultValue); | 179 | this.$emit('change', this.defaultValue); |
158 | }, | 180 | }, |
181 | /** | ||
182 | * @description: click | ||
183 | * @param {*} row | ||
184 | * @author: renchao | ||
185 | */ | ||
159 | click (row) { | 186 | click (row) { |
160 | if (this.multiple) { | 187 | if (this.multiple) { |
161 | //处理多选点击行 | 188 | //处理多选点击行 |
... | @@ -168,25 +195,42 @@ | ... | @@ -168,25 +195,42 @@ |
168 | this.$emit('change', this.defaultValue); | 195 | this.$emit('change', this.defaultValue); |
169 | } | 196 | } |
170 | }, | 197 | }, |
171 | //tags删除后回调 | 198 | /** |
199 | * @description: tags删除后回调 | ||
200 | * @param {*} tag | ||
201 | * @author: renchao | ||
202 | */ | ||
172 | removeTag (tag) { | 203 | removeTag (tag) { |
173 | var row = this.findRowByKey(tag[this.defaultProps.value]) | 204 | var row = this.findRowByKey(tag[this.defaultProps.value]) |
174 | this.$refs.table.toggleRowSelection(row, false); | 205 | this.$refs.table.toggleRowSelection(row, false); |
175 | this.$emit('update:modelValue', this.defaultValue); | 206 | this.$emit('update:modelValue', this.defaultValue); |
176 | }, | 207 | }, |
177 | //清空后的回调 | 208 | /** |
209 | * @description: 清空后的回调 | ||
210 | * @author: renchao | ||
211 | */ | ||
178 | clear () { | 212 | clear () { |
179 | this.$emit('update:modelValue', this.defaultValue); | 213 | this.$emit('update:modelValue', this.defaultValue); |
180 | }, | 214 | }, |
181 | // 关键值查询表格数据行 | 215 | /** |
216 | * @description: 关键值查询表格数据行 | ||
217 | * @param {*} value | ||
218 | * @author: renchao | ||
219 | */ | ||
182 | findRowByKey (value) { | 220 | findRowByKey (value) { |
183 | return this.tableData.find(item => item[this.defaultProps.value] === value) | 221 | return this.tableData.find(item => item[this.defaultProps.value] === value) |
184 | }, | 222 | }, |
185 | // 触发select隐藏 | 223 | /** |
224 | * @description: 触发select隐藏 | ||
225 | * @author: renchao | ||
226 | */ | ||
186 | blur () { | 227 | blur () { |
187 | this.$refs.select.blur(); | 228 | this.$refs.select.blur(); |
188 | }, | 229 | }, |
189 | // 触发select显示 | 230 | /** |
231 | * @description: 触发select显示 | ||
232 | * @author: renchao | ||
233 | */ | ||
190 | focus () { | 234 | focus () { |
191 | this.$refs.select.focus(); | 235 | this.$refs.select.focus(); |
192 | } | 236 | } | ... | ... |
... | @@ -16,8 +16,7 @@ | ... | @@ -16,8 +16,7 @@ |
16 | :inline="flag" | 16 | :inline="flag" |
17 | :show-message="false" | 17 | :show-message="false" |
18 | inline-message | 18 | inline-message |
19 | label-width="145px" | 19 | label-width="145px"> |
20 | > | ||
21 | <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''"> | 20 | <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''"> |
22 | <div class="slxx_title title-block"> | 21 | <div class="slxx_title title-block"> |
23 | 补录信息 | 22 | 补录信息 |
... | @@ -52,18 +51,15 @@ | ... | @@ -52,18 +51,15 @@ |
52 | :table-width="550" | 51 | :table-width="550" |
53 | :tableData="ssQlxxList" | 52 | :tableData="ssQlxxList" |
54 | :props="props" | 53 | :props="props" |
55 | @change="ssQlxxchange" | 54 | @change="ssQlxxchange"> |
56 | > | ||
57 | <el-table-column | 55 | <el-table-column |
58 | prop="qllxmc" | 56 | prop="qllxmc" |
59 | width="130" | 57 | width="130" |
60 | label="权利类型" | 58 | label="权利类型"></el-table-column> |
61 | ></el-table-column> | ||
62 | <el-table-column | 59 | <el-table-column |
63 | prop="bdcqzh" | 60 | prop="bdcqzh" |
64 | width="160" | 61 | width="160" |
65 | label="不动产权证书" | 62 | label="不动产权证书"></el-table-column> |
66 | ></el-table-column> | ||
67 | <el-table-column prop="qlrmc" label="权利人"></el-table-column> | 63 | <el-table-column prop="qlrmc" label="权利人"></el-table-column> |
68 | <el-table-column prop="mjmc" label="面积"></el-table-column> | 64 | <el-table-column prop="mjmc" label="面积"></el-table-column> |
69 | <el-table-column prop="ytmc" label="用途"></el-table-column> | 65 | <el-table-column prop="ytmc" label="用途"></el-table-column> |
... | @@ -102,8 +98,7 @@ | ... | @@ -102,8 +98,7 @@ |
102 | v-for="item in djlxlist" | 98 | v-for="item in djlxlist" |
103 | :key="item.dcode" | 99 | :key="item.dcode" |
104 | :label="item.dname" | 100 | :label="item.dname" |
105 | :value="item.dcode" | 101 | :value="item.dcode"> |
106 | > | ||
107 | </el-option> | 102 | </el-option> |
108 | </el-select> | 103 | </el-select> |
109 | </el-form-item> | 104 | </el-form-item> |
... | @@ -137,8 +132,7 @@ | ... | @@ -137,8 +132,7 @@ |
137 | placeholder="" | 132 | placeholder="" |
138 | :normalizer="normalizer" | 133 | :normalizer="normalizer" |
139 | :show-count="true" | 134 | :show-count="true" |
140 | :options="dictData['A9']" | 135 | :options="dictData['A9']" /> |
141 | /> | ||
142 | </el-form-item> | 136 | </el-form-item> |
143 | </el-col> | 137 | </el-col> |
144 | <el-col :span="8"> | 138 | <el-col :span="8"> |
... | @@ -146,15 +140,13 @@ | ... | @@ -146,15 +140,13 @@ |
146 | <div style="display: flex"> | 140 | <div style="display: flex"> |
147 | <el-input | 141 | <el-input |
148 | v-model="ruleForm.fdcq2.qjjg" | 142 | v-model="ruleForm.fdcq2.qjjg" |
149 | style="width: 500%" | 143 | style="width: 500%"></el-input> |
150 | ></el-input> | ||
151 | <el-select v-model="ruleForm.fdcq2.jedw"> | 144 | <el-select v-model="ruleForm.fdcq2.jedw"> |
152 | <el-option | 145 | <el-option |
153 | v-for="item in dictData['A57']" | 146 | v-for="item in dictData['A57']" |
154 | :key="item.dcode" | 147 | :key="item.dcode" |
155 | :label="item.dname" | 148 | :label="item.dname" |
156 | :value="item.dcode" | 149 | :value="item.dcode"> |
157 | > | ||
158 | </el-option> | 150 | </el-option> |
159 | </el-select> | 151 | </el-select> |
160 | </div> | 152 | </div> |
... | @@ -167,8 +159,7 @@ | ... | @@ -167,8 +159,7 @@ |
167 | v-for="item in qsztlist" | 159 | v-for="item in qsztlist" |
168 | :key="item.dcode" | 160 | :key="item.dcode" |
169 | :label="item.dname" | 161 | :label="item.dname" |
170 | :value="item.dcode" | 162 | :value="item.dcode"> |
171 | > | ||
172 | </el-option> | 163 | </el-option> |
173 | </el-select> | 164 | </el-select> |
174 | </el-form-item> | 165 | </el-form-item> |
... | @@ -180,8 +171,7 @@ | ... | @@ -180,8 +171,7 @@ |
180 | v-for="item in dictData['A17']" | 171 | v-for="item in dictData['A17']" |
181 | :key="item.dcode" | 172 | :key="item.dcode" |
182 | :label="item.dname" | 173 | :label="item.dname" |
183 | :value="item.dcode" | 174 | :value="item.dcode"> |
184 | > | ||
185 | </el-option> | 175 | </el-option> |
186 | </el-select> | 176 | </el-select> |
187 | </el-form-item> | 177 | </el-form-item> |
... | @@ -203,8 +193,7 @@ | ... | @@ -203,8 +193,7 @@ |
203 | v-for="item in dictData['A19']" | 193 | v-for="item in dictData['A19']" |
204 | :key="item.dcode" | 194 | :key="item.dcode" |
205 | :label="item.dname" | 195 | :label="item.dname" |
206 | :value="item.dcode" | 196 | :value="item.dcode"> |
207 | > | ||
208 | </el-option> | 197 | </el-option> |
209 | </el-select> | 198 | </el-select> |
210 | </el-form-item> | 199 | </el-form-item> |
... | @@ -213,15 +202,13 @@ | ... | @@ -213,15 +202,13 @@ |
213 | <el-form-item | 202 | <el-form-item |
214 | label="房屋结构:" | 203 | label="房屋结构:" |
215 | prop="fdcq2.fwjg" | 204 | prop="fdcq2.fwjg" |
216 | :rules="rules.fwjgrules" | 205 | :rules="rules.fwjgrules"> |
217 | > | ||
218 | <el-select v-model="ruleForm.fdcq2.fwjg"> | 206 | <el-select v-model="ruleForm.fdcq2.fwjg"> |
219 | <el-option | 207 | <el-option |
220 | v-for="item in dictData['A46']" | 208 | v-for="item in dictData['A46']" |
221 | :key="item.dcode" | 209 | :key="item.dcode" |
222 | :label="item.dname" | 210 | :label="item.dname" |
223 | :value="item.dcode" | 211 | :value="item.dcode"> |
224 | > | ||
225 | </el-option> | 212 | </el-option> |
226 | </el-select> | 213 | </el-select> |
227 | </el-form-item> | 214 | </el-form-item> |
... | @@ -261,8 +248,7 @@ | ... | @@ -261,8 +248,7 @@ |
261 | <el-form-item | 248 | <el-form-item |
262 | label="不动产权证号:" | 249 | label="不动产权证号:" |
263 | prop="qlxx.bdcqzh" | 250 | prop="qlxx.bdcqzh" |
264 | :rules="rules.bdcqzhrules" | 251 | :rules="rules.bdcqzhrules"> |
265 | > | ||
266 | <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input> | 252 | <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input> |
267 | </el-form-item> | 253 | </el-form-item> |
268 | </el-col> | 254 | </el-col> |
... | @@ -279,8 +265,7 @@ | ... | @@ -279,8 +265,7 @@ |
279 | <el-form-item | 265 | <el-form-item |
280 | label="登记机构:" | 266 | label="登记机构:" |
281 | prop="qlxx.djjg" | 267 | prop="qlxx.djjg" |
282 | :rules="rules.djjgrules" | 268 | :rules="rules.djjgrules"> |
283 | > | ||
284 | <el-input v-model="ruleForm.qlxx.djjg"></el-input> | 269 | <el-input v-model="ruleForm.qlxx.djjg"></el-input> |
285 | </el-form-item> | 270 | </el-form-item> |
286 | </el-col> | 271 | </el-col> |
... | @@ -288,8 +273,7 @@ | ... | @@ -288,8 +273,7 @@ |
288 | <el-form-item | 273 | <el-form-item |
289 | label="登簿人:" | 274 | label="登簿人:" |
290 | prop="qlxx.dbr" | 275 | prop="qlxx.dbr" |
291 | :rules="rules.dbrrules" | 276 | :rules="rules.dbrrules"> |
292 | > | ||
293 | <el-input v-model="ruleForm.qlxx.dbr"></el-input> | 277 | <el-input v-model="ruleForm.qlxx.dbr"></el-input> |
294 | </el-form-item> | 278 | </el-form-item> |
295 | </el-col> | 279 | </el-col> |
... | @@ -297,15 +281,13 @@ | ... | @@ -297,15 +281,13 @@ |
297 | <el-form-item | 281 | <el-form-item |
298 | label="登记时间:" | 282 | label="登记时间:" |
299 | prop="qlxx.djsj" | 283 | prop="qlxx.djsj" |
300 | :rules="rules.djsjrules" | 284 | :rules="rules.djsjrules"> |
301 | > | ||
302 | <el-date-picker | 285 | <el-date-picker |
303 | v-model="ruleForm.qlxx.djsj" | 286 | v-model="ruleForm.qlxx.djsj" |
304 | type="date" | 287 | type="date" |
305 | placeholder="选择日期" | 288 | placeholder="选择日期" |
306 | value-format="yyyy-MM-dd HH:mm:ss" | 289 | value-format="yyyy-MM-dd HH:mm:ss" |
307 | format="yyyy-MM-dd" | 290 | format="yyyy-MM-dd"> |
308 | > | ||
309 | </el-date-picker> | 291 | </el-date-picker> |
310 | </el-form-item> | 292 | </el-form-item> |
311 | </el-col> | 293 | </el-col> |
... | @@ -331,8 +313,7 @@ | ... | @@ -331,8 +313,7 @@ |
331 | <tdytTable | 313 | <tdytTable |
332 | :tableData="ruleForm.tdytqxList" | 314 | :tableData="ruleForm.tdytqxList" |
333 | @upDateTdytxxList="upDateTdytxxList" | 315 | @upDateTdytxxList="upDateTdytxxList" |
334 | :ableOperation="ableOperation" | 316 | :ableOperation="ableOperation" /> |
335 | /> | ||
336 | <div class="slxx_title title-block"> | 317 | <div class="slxx_title title-block"> |
337 | 权利人信息 | 318 | 权利人信息 |
338 | <div class="triangle"></div> | 319 | <div class="triangle"></div> |
... | @@ -342,8 +323,7 @@ | ... | @@ -342,8 +323,7 @@ |
342 | <el-form-item label="共有方式:"> | 323 | <el-form-item label="共有方式:"> |
343 | <el-radio-group | 324 | <el-radio-group |
344 | :disabled="!ableOperation" | 325 | :disabled="!ableOperation" |
345 | v-model="ruleForm.qlxx.gyfs" | 326 | v-model="ruleForm.qlxx.gyfs"> |
346 | > | ||
347 | <el-radio label="0">单独所有</el-radio> | 327 | <el-radio label="0">单独所有</el-radio> |
348 | <el-radio label="1">共同共有</el-radio> | 328 | <el-radio label="1">共同共有</el-radio> |
349 | <el-radio label="2">按份所有</el-radio> | 329 | <el-radio label="2">按份所有</el-radio> |
... | @@ -357,8 +337,7 @@ | ... | @@ -357,8 +337,7 @@ |
357 | @upDateQlrxxList="upDateQlrxxList" | 337 | @upDateQlrxxList="upDateQlrxxList" |
358 | :ableOperation="ableOperation" | 338 | :ableOperation="ableOperation" |
359 | :key="key" | 339 | :key="key" |
360 | :gyfs="ruleForm.qlxx.gyfs" | 340 | :gyfs="ruleForm.qlxx.gyfs" /> |
361 | /> | ||
362 | </div> | 341 | </div> |
363 | <el-row class="btn" v-if="ableOperation"> | 342 | <el-row class="btn" v-if="ableOperation"> |
364 | <el-form-item> | 343 | <el-form-item> |
... | @@ -369,21 +348,21 @@ | ... | @@ -369,21 +348,21 @@ |
369 | </div> | 348 | </div> |
370 | </template> | 349 | </template> |
371 | <script> | 350 | <script> |
372 | import { mapGetters } from "vuex"; | 351 | import { mapGetters } from "vuex"; |
373 | import { init,getSsQlxx, save } from "@/api/djbRepair.js"; | 352 | import { init, getSsQlxx, save } from "@/api/djbRepair.js"; |
374 | import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable"; | 353 | import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable"; |
375 | import selectTable from "@/components/selectTable/index.vue"; | 354 | import selectTable from "@/components/selectTable/index.vue"; |
376 | import tdytTable from "@/views/workflow/components/tdytTable"; | 355 | import tdytTable from "@/views/workflow/components/tdytTable"; |
377 | // import the component | 356 | // import the component |
378 | // import Treeselect from '@riophae/vue-treeselect' | 357 | // import Treeselect from '@riophae/vue-treeselect' |
379 | // // import the styles | 358 | // // import the styles |
380 | // import '@riophae/vue-treeselect/dist/vue-treeselect.css' | 359 | // import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
381 | export default { | 360 | export default { |
382 | components: { qlrCommonTable, tdytTable,selectTable}, | 361 | components: { qlrCommonTable, tdytTable, selectTable }, |
383 | computed: { | 362 | computed: { |
384 | ...mapGetters(["dictData", "flag"]), | 363 | ...mapGetters(["dictData", "flag"]), |
385 | // 根据流程判断表单是否为只读 | 364 | // 根据流程判断表单是否为只读 |
386 | editDisabled() { | 365 | editDisabled () { |
387 | if (!this.ableOperation) { | 366 | if (!this.ableOperation) { |
388 | //只读状态 | 367 | //只读状态 |
389 | return true; | 368 | return true; |
... | @@ -391,15 +370,15 @@ export default { | ... | @@ -391,15 +370,15 @@ export default { |
391 | return false; | 370 | return false; |
392 | }, | 371 | }, |
393 | }, | 372 | }, |
394 | data() { | 373 | data () { |
395 | return { | 374 | return { |
396 | ssqlxxshow:true, | 375 | ssqlxxshow: true, |
397 | props: { | 376 | props: { |
398 | label: "bdcqzh", | 377 | label: "bdcqzh", |
399 | value: "bdcdyid", | 378 | value: "bdcdyid", |
400 | }, | 379 | }, |
401 | // 键名转换,方法默认是label和children进行树状渲染 | 380 | // 键名转换,方法默认是label和children进行树状渲染 |
402 | normalizer(node) { | 381 | normalizer (node) { |
403 | //方法 | 382 | //方法 |
404 | if (node.children == null || node.children == "null") { | 383 | if (node.children == null || node.children == "null") { |
405 | delete node.children; | 384 | delete node.children; |
... | @@ -473,18 +452,18 @@ export default { | ... | @@ -473,18 +452,18 @@ export default { |
473 | }, | 452 | }, |
474 | }; | 453 | }; |
475 | }, | 454 | }, |
476 | created() {}, | 455 | created () { }, |
477 | mounted() { | 456 | mounted () { |
478 | this.loadData(); | 457 | this.loadData(); |
479 | this.ableOperation = this.$parent.ableOperation; | 458 | this.ableOperation = this.$parent.ableOperation; |
480 | }, | 459 | }, |
481 | methods: { | 460 | methods: { |
482 | ssQlxxchange(val) { | 461 | ssQlxxchange (val) { |
483 | this.ruleForm.ssQlxx = val; | 462 | this.ruleForm.ssQlxx = val; |
484 | this.ruleForm.qlxx.ssywh = val.ssywh; | 463 | this.ruleForm.qlxx.ssywh = val.ssywh; |
485 | }, | 464 | }, |
486 | djlxchange(val) { | 465 | djlxchange (val) { |
487 | console.log("val",val); | 466 | console.log("val", val); |
488 | if (val == null || val == 100) { | 467 | if (val == null || val == 100) { |
489 | this.ssqlxxshow = false; | 468 | this.ssqlxxshow = false; |
490 | } else { | 469 | } else { |
... | @@ -492,7 +471,7 @@ export default { | ... | @@ -492,7 +471,7 @@ export default { |
492 | } | 471 | } |
493 | }, | 472 | }, |
494 | 473 | ||
495 | loadData() { | 474 | loadData () { |
496 | this.$startLoading(); | 475 | this.$startLoading(); |
497 | this.propsParam.isEdit = this.$parent.isEdit; | 476 | this.propsParam.isEdit = this.$parent.isEdit; |
498 | init(this.propsParam).then((res) => { | 477 | init(this.propsParam).then((res) => { |
... | @@ -523,22 +502,22 @@ export default { | ... | @@ -523,22 +502,22 @@ export default { |
523 | }); | 502 | }); |
524 | }, | 503 | }, |
525 | // 更新土地用途信息 | 504 | // 更新土地用途信息 |
526 | upDateTdytxxList(val) { | 505 | upDateTdytxxList (val) { |
527 | this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val)); | 506 | this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val)); |
528 | this.key++; | 507 | this.key++; |
529 | }, | 508 | }, |
530 | // 更新权利人信息 | 509 | // 更新权利人信息 |
531 | upDateQlrxxList(val) { | 510 | upDateQlrxxList (val) { |
532 | this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val)); | 511 | this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val)); |
533 | this.czrOptions = this.ruleForm.qlrData; | 512 | this.czrOptions = this.ruleForm.qlrData; |
534 | this.key++; | 513 | this.key++; |
535 | }, | 514 | }, |
536 | // 更新义务人信息 | 515 | // 更新义务人信息 |
537 | upDateYwrxxList(val) { | 516 | upDateYwrxxList (val) { |
538 | this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val)); | 517 | this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val)); |
539 | this.key++; | 518 | this.key++; |
540 | }, | 519 | }, |
541 | onSubmit() { | 520 | onSubmit () { |
542 | this.$refs.ruleForm.validate((valid) => { | 521 | this.$refs.ruleForm.validate((valid) => { |
543 | if (valid) { | 522 | if (valid) { |
544 | if (this.ruleForm.qlrData.length == 0) { | 523 | if (this.ruleForm.qlrData.length == 0) { |
... | @@ -621,9 +600,9 @@ export default { | ... | @@ -621,9 +600,9 @@ export default { |
621 | }); | 600 | }); |
622 | }, | 601 | }, |
623 | }, | 602 | }, |
624 | }; | 603 | }; |
625 | </script> | 604 | </script> |
626 | <style scoped lang="scss"> | 605 | <style scoped lang="scss"> |
627 | @import "~@/styles/public.scss"; | 606 | @import "~@/styles/public.scss"; |
628 | @import "~@/styles/slxx/slxx.scss"; | 607 | @import "~@/styles/slxx/slxx.scss"; |
629 | </style> | 608 | </style> | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-19 16:04:43 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <dialogBox title="新增法律法规" @submitForm="submitForm" saveButton="保存" :isFullscreen="false" width="50%" | 7 | <dialogBox title="新增法律法规" @submitForm="submitForm" saveButton="保存" :isFullscreen="false" width="50%" |
3 | @closeDialog="closeDialog" v-model="value"> | 8 | @closeDialog="closeDialog" v-model="value"> |
... | @@ -25,9 +30,9 @@ | ... | @@ -25,9 +30,9 @@ |
25 | </template> | 30 | </template> |
26 | 31 | ||
27 | <script> | 32 | <script> |
28 | import { addSysNotice } from "@/api/sysNotice.js" | 33 | import { addSysNotice } from "@/api/sysNotice.js" |
29 | import { upload } from "@/api/file.js" | 34 | import { upload } from "@/api/file.js" |
30 | export default { | 35 | export default { |
31 | props: { | 36 | props: { |
32 | value: { type: Boolean, default: false }, | 37 | value: { type: Boolean, default: false }, |
33 | }, | 38 | }, |
... | @@ -89,8 +94,7 @@ export default { | ... | @@ -89,8 +94,7 @@ export default { |
89 | }) | 94 | }) |
90 | }, | 95 | }, |
91 | } | 96 | } |
92 | } | 97 | } |
93 | </script> | 98 | </script> |
94 | <style scoped lang="scss"> | 99 | <style scoped lang="scss"> |
95 | |||
96 | </style> | 100 | </style> | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-19 16:04:47 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <div class="from-clues"> | 7 | <div class="from-clues"> |
3 | <!-- 表单部分 --> | 8 | <!-- 表单部分 --> |
... | @@ -29,11 +34,11 @@ | ... | @@ -29,11 +34,11 @@ |
29 | </div> | 34 | </div> |
30 | </template> | 35 | </template> |
31 | <script> | 36 | <script> |
32 | import table from "@/utils/mixin/table"; | 37 | import table from "@/utils/mixin/table"; |
33 | import { datas, sendThis } from "./flfgdata"; | 38 | import { datas, sendThis } from "./flfgdata"; |
34 | import { getSysPolicyList, deleteSysNotice } from "@/api/sysNotice.js" | 39 | import { getSysPolicyList, deleteSysNotice } from "@/api/sysNotice.js" |
35 | import addDialog from "./components/addDialog.vue"; | 40 | import addDialog from "./components/addDialog.vue"; |
36 | export default { | 41 | export default { |
37 | name: "flfg", | 42 | name: "flfg", |
38 | components: { addDialog }, | 43 | components: { addDialog }, |
39 | mixins: [table], | 44 | mixins: [table], |
... | @@ -100,8 +105,8 @@ export default { | ... | @@ -100,8 +105,8 @@ export default { |
100 | }); | 105 | }); |
101 | }, | 106 | }, |
102 | }, | 107 | }, |
103 | }; | 108 | }; |
104 | </script> | 109 | </script> |
105 | <style scoped lang="scss"> | 110 | <style scoped lang="scss"> |
106 | @import "~@/styles/public.scss"; | 111 | @import "~@/styles/public.scss"; |
107 | </style> | 112 | </style> | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-19 16:04:58 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <div> | 7 | <div> |
3 | <div class="qtjfjmb-edit-title"> | 8 | <div class="qtjfjmb-edit-title"> |
... | @@ -117,8 +122,8 @@ | ... | @@ -117,8 +122,8 @@ |
117 | </template> | 122 | </template> |
118 | 123 | ||
119 | <script> | 124 | <script> |
120 | import { updateSysSqywmbsz, getSysSqywmbszDetailById } from '@/api/sysSqywmbsz' | 125 | import { updateSysSqywmbsz, getSysSqywmbszDetailById } from '@/api/sysSqywmbsz' |
121 | export default { | 126 | export default { |
122 | props: { | 127 | props: { |
123 | formData: { | 128 | formData: { |
124 | type: Object, | 129 | type: Object, |
... | @@ -216,19 +221,19 @@ export default { | ... | @@ -216,19 +221,19 @@ export default { |
216 | }) | 221 | }) |
217 | } | 222 | } |
218 | } | 223 | } |
219 | } | 224 | } |
220 | </script> | 225 | </script> |
221 | <style scoped lang="scss"> | 226 | <style scoped lang="scss"> |
222 | @import "~@/styles/mixin.scss"; | 227 | @import "~@/styles/mixin.scss"; |
223 | @import "~@/styles/dialogBoxheader.scss"; | 228 | @import "~@/styles/dialogBoxheader.scss"; |
224 | 229 | ||
225 | .qtjfjmb-edit-title { | 230 | .qtjfjmb-edit-title { |
226 | padding-bottom: 10px; | 231 | padding-bottom: 10px; |
227 | border-bottom: 1px solid $borderColor; | 232 | border-bottom: 1px solid $borderColor; |
228 | margin-bottom: 10px; | 233 | margin-bottom: 10px; |
229 | } | 234 | } |
230 | 235 | ||
231 | ul { | 236 | ul { |
232 | @include flex; | 237 | @include flex; |
233 | border-radius: 5px; | 238 | border-radius: 5px; |
234 | overflow: hidden; | 239 | overflow: hidden; |
... | @@ -252,5 +257,5 @@ ul { | ... | @@ -252,5 +257,5 @@ ul { |
252 | @extend .active; | 257 | @extend .active; |
253 | } | 258 | } |
254 | } | 259 | } |
255 | } | 260 | } |
256 | </style> | 261 | </style> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: 功能:审批意见 | 2 | * @Description: 功能:审批意见 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:41:24 | 4 | * @LastEditTime: 2023-07-20 09:52:48 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class='spyj loadingtext'> | 7 | <div class='spyj loadingtext'> |
... | @@ -83,7 +83,7 @@ | ... | @@ -83,7 +83,7 @@ |
83 | }, | 83 | }, |
84 | }, | 84 | }, |
85 | mounted () { | 85 | mounted () { |
86 | this.ableOperation = this.$parent.ableOperation; | 86 | this.ableOperation = this.$parent.currentSelectTab.ableOperation |
87 | this.list(); | 87 | this.list(); |
88 | }, | 88 | }, |
89 | methods: { | 89 | methods: { |
... | @@ -94,7 +94,6 @@ | ... | @@ -94,7 +94,6 @@ |
94 | var formdata = new FormData(); | 94 | var formdata = new FormData(); |
95 | formdata.append("bsmBusiness", this.propsParam.bsmBusiness); | 95 | formdata.append("bsmBusiness", this.propsParam.bsmBusiness); |
96 | formdata.append("bestepid", this.$route.query.bestepid); | 96 | formdata.append("bestepid", this.$route.query.bestepid); |
97 | // formdata.append("ableOperation", this.ableOperation) | ||
98 | getSpyjList(formdata).then((res) => { | 97 | getSpyjList(formdata).then((res) => { |
99 | this.$endLoading() | 98 | this.$endLoading() |
100 | if (res.code === 200 && res.result) { | 99 | if (res.code === 200 && res.result) { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: 受理信息 | 2 | * @Description: 受理信息 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-25 08:41:40 | 4 | * @LastEditTime: 2023-07-20 09:30:21 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="slxx"> | 7 | <div class="slxx"> |
... | @@ -111,7 +111,6 @@ | ... | @@ -111,7 +111,6 @@ |
111 | </el-form-item> | 111 | </el-form-item> |
112 | </el-col> | 112 | </el-col> |
113 | 113 | ||
114 | |||
115 | <el-col :span="5" v-show=" ruleForm.slsq.gyfs == '2'"> | 114 | <el-col :span="5" v-show=" ruleForm.slsq.gyfs == '2'"> |
116 | <el-form-item label="是否分别持证:"> | 115 | <el-form-item label="是否分别持证:"> |
117 | <el-radio-group v-model="ruleForm.sldyList[0].sqfbcz"> | 116 | <el-radio-group v-model="ruleForm.sldyList[0].sqfbcz"> |
... | @@ -154,11 +153,11 @@ | ... | @@ -154,11 +153,11 @@ |
154 | </div> | 153 | </div> |
155 | </template> | 154 | </template> |
156 | <script> | 155 | <script> |
157 | import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"; | 156 | import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"; |
158 | import {BatchInit, Init, saveBatchData, saveData} from "@/api/workflow/fwsyqFlow.js"; | 157 | import { BatchInit, Init, saveBatchData, saveData } from "@/api/workflow/fwsyqFlow.js"; |
159 | import { mapGetters } from "vuex"; | 158 | import { mapGetters } from "vuex"; |
160 | export default { | 159 | export default { |
161 | created(callbackfn, thisArg) { | 160 | created (callbackfn, thisArg) { |
162 | this.ableOperation = this.$parent.currentSelectTab.ableOperation | 161 | this.ableOperation = this.$parent.currentSelectTab.ableOperation |
163 | this.propsParam = this.$attrs; | 162 | this.propsParam = this.$attrs; |
164 | var formdata = new FormData(); | 163 | var formdata = new FormData(); |
... | @@ -184,19 +183,19 @@ export default { | ... | @@ -184,19 +183,19 @@ export default { |
184 | tdytOption: [], | 183 | tdytOption: [], |
185 | czrOptions: [], | 184 | czrOptions: [], |
186 | ruleForm: { | 185 | ruleForm: { |
187 | cfdjList:[]//查封登记 | 186 | cfdjList: []//查封登记 |
188 | ,diyaqList:[]//抵押权 | 187 | , diyaqList: []//抵押权 |
189 | ,fdcq2List:[]//房屋信息集合 | 188 | , fdcq2List: []//房屋信息集合 |
190 | ,qlrList:[]//权利人 | 189 | , qlrList: []//权利人 |
191 | ,ywrList:[]//义务人 | 190 | , ywrList: []//义务人 |
192 | ,qlxxList:[]//权利信息集合 | 191 | , qlxxList: []//权利信息集合 |
193 | ,sldyList:[]//受理不动产单元集合 | 192 | , sldyList: []//受理不动产单元集合 |
194 | ,slsq: {}//受理申请流程明细 | 193 | , slsq: {}//受理申请流程明细 |
195 | ,flow: {}//受理申请流程明细 | 194 | , flow: {}//受理申请流程明细 |
196 | ,sqrList:[]//申请人 | 195 | , sqrList: []//申请人 |
197 | ,ssQlxxList:[]//上手权利信息 | 196 | , ssQlxxList: []//上手权利信息 |
198 | ,user:{}//用户 | 197 | , user: {}//用户 |
199 | ,zdjbxx: {}//宗地基本信息 | 198 | , zdjbxx: {}//宗地基本信息 |
200 | }, | 199 | }, |
201 | //传递参数 | 200 | //传递参数 |
202 | propsParam: this.$attrs, | 201 | propsParam: this.$attrs, |
... | @@ -204,17 +203,17 @@ export default { | ... | @@ -204,17 +203,17 @@ export default { |
204 | ableOperation: true, | 203 | ableOperation: true, |
205 | rules: {}, | 204 | rules: {}, |
206 | bsmSlsq: this.$route.query.bsmSlsq,//受理申请标识码 | 205 | bsmSlsq: this.$route.query.bsmSlsq,//受理申请标识码 |
207 | splicingFdcq2:{//前端根据后台数组组装展示内容 | 206 | splicingFdcq2: {//前端根据后台数组组装展示内容 |
208 | fwxz:{}//房屋性质 | 207 | fwxz: {}//房屋性质 |
209 | ,fwjg:{}//房屋结构 | 208 | , fwjg: {}//房屋结构 |
210 | ,jzmj:{} //建筑面积 | 209 | , jzmj: {} //建筑面积 |
211 | ,zts:{}//房屋总套数 | 210 | , zts: {}//房屋总套数 |
212 | } | 211 | } |
213 | } | 212 | } |
214 | }, | 213 | }, |
215 | methods: { | 214 | methods: { |
216 | //组装房地产权通用信息 | 215 | //组装房地产权通用信息 |
217 | splicingFdcq2Info(){ | 216 | splicingFdcq2Info () { |
218 | let fdcq2List = this.ruleForm.fdcq2List; | 217 | let fdcq2List = this.ruleForm.fdcq2List; |
219 | let fwxzArr = []; | 218 | let fwxzArr = []; |
220 | let fwjgArr = []; | 219 | let fwjgArr = []; |
... | @@ -231,7 +230,7 @@ export default { | ... | @@ -231,7 +230,7 @@ export default { |
231 | let fwjg = Array.from(new Set(fwjgArr)).join(","); | 230 | let fwjg = Array.from(new Set(fwjgArr)).join(","); |
232 | this.splicingFdcq2.fwxz = fwxz; | 231 | this.splicingFdcq2.fwxz = fwxz; |
233 | this.splicingFdcq2.fwjg = fwjg; | 232 | this.splicingFdcq2.fwjg = fwjg; |
234 | this.splicingFdcq2.jzmj = jzmj==null ? 0 : jzmj; | 233 | this.splicingFdcq2.jzmj = jzmj == null ? 0 : jzmj; |
235 | this.splicingFdcq2.zts = fdcq2List.length; | 234 | this.splicingFdcq2.zts = fdcq2List.length; |
236 | 235 | ||
237 | }, | 236 | }, |
... | @@ -266,55 +265,55 @@ export default { | ... | @@ -266,55 +265,55 @@ export default { |
266 | }) | 265 | }) |
267 | } | 266 | } |
268 | } | 267 | } |
269 | } | 268 | } |
270 | </script> | 269 | </script> |
271 | <style scoped lang='scss'> | 270 | <style scoped lang='scss'> |
272 | @import "~@/styles/public.scss"; | 271 | @import "~@/styles/public.scss"; |
273 | 272 | ||
274 | /deep/.el-form { | 273 | /deep/.el-form { |
275 | display: flex; | 274 | display: flex; |
276 | flex-direction: column; | 275 | flex-direction: column; |
277 | height: calc(100vh - 130px); | 276 | height: calc(100vh - 130px); |
278 | } | 277 | } |
279 | 278 | ||
280 | /deep/.el-form-item__label { | 279 | /deep/.el-form-item__label { |
281 | padding: 0; | 280 | padding: 0; |
282 | } | 281 | } |
283 | 282 | ||
284 | /deep/.el-radio { | 283 | /deep/.el-radio { |
285 | margin-right: 10px; | 284 | margin-right: 10px; |
286 | } | 285 | } |
287 | 286 | ||
288 | /deep/.el-select { | 287 | /deep/.el-select { |
289 | width: 100%; | 288 | width: 100%; |
290 | } | 289 | } |
291 | 290 | ||
292 | /deep/.el-form-item { | 291 | /deep/.el-form-item { |
293 | margin-bottom: 8px; | 292 | margin-bottom: 8px; |
294 | } | 293 | } |
295 | 294 | ||
296 | .marginBot0 { | 295 | .marginBot0 { |
297 | margin-bottom: 0 !important; | 296 | margin-bottom: 0 !important; |
298 | } | 297 | } |
299 | 298 | ||
300 | .slxx { | 299 | .slxx { |
301 | box-sizing: border-box; | 300 | box-sizing: border-box; |
302 | } | 301 | } |
303 | 302 | ||
304 | .slxx_con { | 303 | .slxx_con { |
305 | flex: 1; | 304 | flex: 1; |
306 | height: 100%; | 305 | height: 100%; |
307 | background-color: #ffffff; | 306 | background-color: #ffffff; |
308 | overflow-y: auto; | 307 | overflow-y: auto; |
309 | padding-right: 3px; | 308 | padding-right: 3px; |
310 | overflow-x: hidden; | 309 | overflow-x: hidden; |
311 | } | 310 | } |
312 | 311 | ||
313 | .submit_btn { | 312 | .submit_btn { |
314 | height: 50px; | 313 | height: 50px; |
315 | } | 314 | } |
316 | 315 | ||
317 | .slxx_title { | 316 | .slxx_title { |
318 | border-bottom: 1px solid $borderColor; | 317 | border-bottom: 1px solid $borderColor; |
319 | padding-left: 10px; | 318 | padding-left: 10px; |
320 | padding-bottom: 5px; | 319 | padding-bottom: 5px; |
... | @@ -323,23 +322,23 @@ export default { | ... | @@ -323,23 +322,23 @@ export default { |
323 | font-size: 16px; | 322 | font-size: 16px; |
324 | font-weight: 500; | 323 | font-weight: 500; |
325 | color: #4a4a4a; | 324 | color: #4a4a4a; |
326 | } | 325 | } |
327 | 326 | ||
328 | .btn { | 327 | .btn { |
329 | text-align: center; | 328 | text-align: center; |
330 | padding-top: 10px; | 329 | padding-top: 10px; |
331 | height: 36px; | 330 | height: 36px; |
332 | background-color: #ffffff; | 331 | background-color: #ffffff; |
333 | padding: 5px 0; | 332 | padding: 5px 0; |
334 | } | 333 | } |
335 | 334 | ||
336 | .textArea { | 335 | .textArea { |
337 | /deep/.el-textarea__inner { | 336 | /deep/.el-textarea__inner { |
338 | min-height: 90px !important; | 337 | min-height: 90px !important; |
339 | } | 338 | } |
340 | } | 339 | } |
341 | 340 | ||
342 | /deep/.el-form-item__label { | 341 | /deep/.el-form-item__label { |
343 | padding-bottom: 0px; | 342 | padding-bottom: 0px; |
344 | } | 343 | } |
345 | </style> | 344 | </style> | ... | ... |
... | @@ -225,7 +225,7 @@ | ... | @@ -225,7 +225,7 @@ |
225 | computed: { | 225 | computed: { |
226 | ...mapGetters(["dictData", "flag"]), | 226 | ...mapGetters(["dictData", "flag"]), |
227 | // 根据流程判断表单是否为只读 | 227 | // 根据流程判断表单是否为只读 |
228 | editDisabled() { | 228 | editDisabled () { |
229 | if (!this.ableOperation) { | 229 | if (!this.ableOperation) { |
230 | //只读状态 | 230 | //只读状态 |
231 | return true; | 231 | return true; | ... | ... |
This diff is collapsed.
Click to expand it.
... | @@ -174,7 +174,7 @@ | ... | @@ -174,7 +174,7 @@ |
174 | 抵押人信息 | 174 | 抵押人信息 |
175 | <div class="triangle"></div> | 175 | <div class="triangle"></div> |
176 | </div> | 176 | </div> |
177 | <qlrCommonTable :tableData="ruleForm.ywrList" @upDateQlrxxList="upDateYwrxxList" :disabled="!ableOperation"/> | 177 | <qlrCommonTable :tableData="ruleForm.ywrList" @upDateQlrxxList="upDateYwrxxList" :disabled="!ableOperation" /> |
178 | 178 | ||
179 | <div class="slxx_title title-block"> | 179 | <div class="slxx_title title-block"> |
180 | 登记原因 | 180 | 登记原因 |
... | @@ -194,7 +194,6 @@ | ... | @@ -194,7 +194,6 @@ |
194 | </el-form-item> | 194 | </el-form-item> |
195 | </el-col> | 195 | </el-col> |
196 | </el-row> | 196 | </el-row> |
197 | |||
198 | </div> | 197 | </div> |
199 | <el-row class="btn" v-if="ableOperation"> | 198 | <el-row class="btn" v-if="ableOperation"> |
200 | <el-form-item> | 199 | <el-form-item> | ... | ... |
... | @@ -218,7 +218,7 @@ | ... | @@ -218,7 +218,7 @@ |
218 | 抵押人信息 | 218 | 抵押人信息 |
219 | <div class="triangle"></div> | 219 | <div class="triangle"></div> |
220 | </div> | 220 | </div> |
221 | <qlrCommonTable :tableData="ruleForm.ywrList" @upDateQlrxxList="upDateYwrxxList" :disabled="!ableOperation"/> | 221 | <qlrCommonTable :tableData="ruleForm.ywrList" @upDateQlrxxList="upDateYwrxxList" :disabled="!ableOperation" /> |
222 | 222 | ||
223 | <div class="slxx_title title-block"> | 223 | <div class="slxx_title title-block"> |
224 | 登记原因 | 224 | 登记原因 |
... | @@ -238,7 +238,6 @@ | ... | @@ -238,7 +238,6 @@ |
238 | </el-form-item> | 238 | </el-form-item> |
239 | </el-col> | 239 | </el-col> |
240 | </el-row> | 240 | </el-row> |
241 | |||
242 | </div> | 241 | </div> |
243 | <el-row class="btn" v-if="ableOperation"> | 242 | <el-row class="btn" v-if="ableOperation"> |
244 | <el-form-item> | 243 | <el-form-item> | ... | ... |
... | @@ -3,9 +3,7 @@ const path = require('path') | ... | @@ -3,9 +3,7 @@ const path = require('path') |
3 | function resolve (dir) { | 3 | function resolve (dir) { |
4 | return path.join(__dirname, dir) | 4 | return path.join(__dirname, dir) |
5 | } | 5 | } |
6 | |||
7 | const port = process.env.port || process.env.npm_config_port || 8888 // dev port | 6 | const port = process.env.port || process.env.npm_config_port || 8888 // dev port |
8 | |||
9 | // All configuration item explanations can be find in https://cli.vuejs.org/config/ | 7 | // All configuration item explanations can be find in https://cli.vuejs.org/config/ |
10 | module.exports = { | 8 | module.exports = { |
11 | /** | 9 | /** | ... | ... |
-
Please register or sign in to post a comment