447d5cd8 by renchao@pashanhoo.com

style:字典增加下拉框组件

1 parent 14ba91ec
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
10 "dependencies": { 10 "dependencies": {
11 "@antv/g2": "^4.2.8", 11 "@antv/g2": "^4.2.8",
12 "@babel/polyfill": "^7.12.1", 12 "@babel/polyfill": "^7.12.1",
13 "@riophae/vue-treeselect": "^0.4.0",
13 "axios": "^0.21.1", 14 "axios": "^0.21.1",
14 "bpmn-js": "^7.4.0", 15 "bpmn-js": "^7.4.0",
15 "bpmn-js-properties-panel": "^0.37.2", 16 "bpmn-js-properties-panel": "^0.37.2",
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-05-25 08:59:02 4 * @LastEditTime: 2023-06-25 15:52:42
5 --> 5 -->
6 <template> 6 <template>
7 <!-- 受理信息 --> 7 <!-- 受理信息 -->
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
13 ref="ruleForm" 13 ref="ruleForm"
14 :label-position="flag ? 'top' : ''" 14 :label-position="flag ? 'top' : ''"
15 :inline="flag" 15 :inline="flag"
16 label-width="127px" 16 label-width="127px">
17 >
18 <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''"> 17 <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''">
19 <div class="slxx_title title-block"> 18 <div class="slxx_title title-block">
20 补录信息 19 补录信息
...@@ -38,7 +37,7 @@ ...@@ -38,7 +37,7 @@
38 </el-col> 37 </el-col>
39 </el-row> 38 </el-row>
40 <div class="slxx_title title-block"> 39 <div class="slxx_title title-block">
41 房地产权(独幢、层、套、间房屋) 40 房地产权(独幢、层、套、间房屋)
42 <div class="triangle"></div> 41 <div class="triangle"></div>
43 </div> 42 </div>
44 <el-row :gutter="10"> 43 <el-row :gutter="10">
...@@ -52,7 +51,7 @@ ...@@ -52,7 +51,7 @@
52 <el-input v-model="ruleForm.qlxx.ywh"></el-input> 51 <el-input v-model="ruleForm.qlxx.ywh"></el-input>
53 </el-form-item> 52 </el-form-item>
54 </el-col> 53 </el-col>
55 <el-col :span="8"> 54 <el-col :span="8">
56 <el-form-item label="上手业务号:"> 55 <el-form-item label="上手业务号:">
57 <el-input v-model="ruleForm.qlxx.ssywh"></el-input> 56 <el-input v-model="ruleForm.qlxx.ssywh"></el-input>
58 </el-form-item> 57 </el-form-item>
...@@ -66,10 +65,10 @@ ...@@ -66,10 +65,10 @@
66 </el-col> 65 </el-col>
67 <el-col :span="8"> 66 <el-col :span="8">
68 <el-form-item label="登记类型:"> 67 <el-form-item label="登记类型:">
69 <el-select v-model="ruleForm.qlxx.djlx"> 68 <el-select v-model="ruleForm.qlxx.djlx">
70 <el-option v-for="item in dictData['A21']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 69 <el-option v-for="item in dictData['A21']" :key="item.dcode" :label="item.dname" :value="item.dcode">
71 </el-option> 70 </el-option>
72 </el-select> 71 </el-select>
73 </el-form-item> 72 </el-form-item>
74 </el-col> 73 </el-col>
75 <el-col :span="8"> 74 <el-col :span="8">
...@@ -77,35 +76,33 @@ ...@@ -77,35 +76,33 @@
77 <el-input v-model="ruleForm.qlxx.zl"></el-input> 76 <el-input v-model="ruleForm.qlxx.zl"></el-input>
78 </el-form-item> 77 </el-form-item>
79 </el-col> 78 </el-col>
80 <el-col :span="8"> 79 <el-col :span="8">
81 <el-form-item label="土地使用权人:"> 80 <el-form-item label="土地使用权人:">
82 <el-input v-model="ruleForm.fdcq2.tdsyqr"></el-input> 81 <el-input v-model="ruleForm.fdcq2.tdsyqr"></el-input>
83 </el-form-item> 82 </el-form-item>
84 </el-col> 83 </el-col>
85 <el-col :span="8"> 84 <el-col :span="8">
86 <el-form-item label="独用土地面积:"> 85 <el-form-item label="独用土地面积:">
87 <el-input v-model="ruleForm.fdcq2.dytdmj"></el-input> 86 <el-input v-model="ruleForm.fdcq2.dytdmj"></el-input>
88 </el-form-item> 87 </el-form-item>
89 </el-col> 88 </el-col>
90 <el-col :span="8"> 89 <el-col :span="8">
91 <el-form-item label="分摊土地面积:"> 90 <el-form-item label="分摊土地面积:">
92 <el-input v-model="ruleForm.fdcq2.fttdmj"></el-input> 91 <el-input v-model="ruleForm.fdcq2.fttdmj"></el-input>
93 </el-form-item> 92 </el-form-item>
94 </el-col> 93 </el-col>
95 <el-col :span="8"> 94 <el-col :span="8">
96 <!-- 下拉框 --> 95 <!-- 下拉框 -->
97 <el-form-item label="土地性质:"> 96 <el-form-item label="土地性质:" style="margin-bottom:3px">
98 <el-select v-model="ruleForm.fdcq2.jedw"> 97 <treeselect v-model="ruleForm.fdcq2.jedw" placeholder=""
99 <el-option v-for="item in dictData['A45']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 98 :normalizer="normalizer"
100 </el-option> 99 :show-count="true" :options="dictData['A45']" />
101 </el-select>
102 </el-form-item> 100 </el-form-item>
103 </el-col> 101 </el-col>
104 <el-col :span="8"> 102 <el-col :span="8">
105
106 <el-form-item label="房地产交易价格:"> 103 <el-form-item label="房地产交易价格:">
107 <div style="display:flex"> 104 <div style="display:flex">
108 <el-input v-model="ruleForm.fdcq2.qjjg" style="width:500%"></el-input> 105 <el-input v-model="ruleForm.fdcq2.qjjg" style="width:500%"></el-input>
109 <el-select v-model="ruleForm.fdcq2.jedw"> 106 <el-select v-model="ruleForm.fdcq2.jedw">
110 <el-option v-for="item in dictData['A57']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 107 <el-option v-for="item in dictData['A57']" :key="item.dcode" :label="item.dname" :value="item.dcode">
111 </el-option> 108 </el-option>
...@@ -113,38 +110,38 @@ ...@@ -113,38 +110,38 @@
113 </div> 110 </div>
114 </el-form-item> 111 </el-form-item>
115 </el-col> 112 </el-col>
116 <el-col :span="8"> 113 <el-col :span="8">
117 <el-form-item label="规划用途:"> 114 <el-form-item label="规划用途:">
118 <el-select v-model="ruleForm.fdcq2.ghyt"> 115 <el-select v-model="ruleForm.fdcq2.ghyt">
119 <el-option v-for="item in dictData['A17']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 116 <el-option v-for="item in dictData['A17']" :key="item.dcode" :label="item.dname" :value="item.dcode">
120 </el-option> 117 </el-option>
121 </el-select> 118 </el-select>
122 </el-form-item> 119 </el-form-item>
123 </el-col> 120 </el-col>
124 <el-col :span="8"> 121 <el-col :span="8">
125 <el-form-item label="批准用途:"> 122 <el-form-item label="批准用途:">
126 <el-input v-model="ruleForm.fdcq2.pzyt"></el-input> 123 <el-input v-model="ruleForm.fdcq2.pzyt"></el-input>
127 </el-form-item> 124 </el-form-item>
128 </el-col> 125 </el-col>
129 <el-col :span="8"> 126 <el-col :span="8">
130 <el-form-item label="实际用途:"> 127 <el-form-item label="实际用途:">
131 <el-input v-model="ruleForm.fdcq2.sjyt"></el-input> 128 <el-input v-model="ruleForm.fdcq2.sjyt"></el-input>
132 </el-form-item> 129 </el-form-item>
133 </el-col> 130 </el-col>
134 <el-col :span="8"> 131 <el-col :span="8">
135 <el-form-item label="房屋性质:"> 132 <el-form-item label="房屋性质:">
136 <el-select v-model="ruleForm.fdcq2.fwxz"> 133 <el-select v-model="ruleForm.fdcq2.fwxz">
137 <el-option v-for="item in dictData['A19']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 134 <el-option v-for="item in dictData['A19']" :key="item.dcode" :label="item.dname" :value="item.dcode">
138 </el-option> 135 </el-option>
139 </el-select> 136 </el-select>
140 </el-form-item> 137 </el-form-item>
141 </el-col> 138 </el-col>
142 <el-col :span="8"> 139 <el-col :span="8">
143 <el-form-item label="房屋结构:"> 140 <el-form-item label="房屋结构:">
144 <el-select v-model="ruleForm.fdcq2.fwjg"> 141 <el-select v-model="ruleForm.fdcq2.fwjg">
145 <el-option v-for="item in dictData['A46']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 142 <el-option v-for="item in dictData['A46']" :key="item.dcode" :label="item.dname" :value="item.dcode">
146 </el-option> 143 </el-option>
147 </el-select> 144 </el-select>
148 </el-form-item> 145 </el-form-item>
149 </el-col> 146 </el-col>
150 <el-col :span="8"> 147 <el-col :span="8">
...@@ -205,14 +202,14 @@ ...@@ -205,14 +202,14 @@
205 </el-col> 202 </el-col>
206 </el-row> 203 </el-row>
207 <el-row> 204 <el-row>
208 <el-col :span="24"> 205 <el-col :span="24">
209 <el-form-item label="登记原因:"> 206 <el-form-item label="登记原因:">
210 <el-input v-model="ruleForm.fdcq2.djyy"></el-input> 207 <el-input v-model="ruleForm.fdcq2.djyy"></el-input>
211 </el-form-item> 208 </el-form-item>
212 </el-col> 209 </el-col>
213 </el-row> 210 </el-row>
214 <el-row> 211 <el-row>
215 <el-col :span="24"> 212 <el-col :span="24">
216 <el-form-item label="附记:"> 213 <el-form-item label="附记:">
217 <el-input v-model="ruleForm.fdcq2.fj"></el-input> 214 <el-input v-model="ruleForm.fdcq2.fj"></el-input>
218 </el-form-item> 215 </el-form-item>
...@@ -222,11 +219,10 @@ ...@@ -222,11 +219,10 @@
222 土地用途 219 土地用途
223 <div class="triangle"></div> 220 <div class="triangle"></div>
224 </div> 221 </div>
225 <tdytTable 222 <tdytTable
226 :tableData="ruleForm.tdytqxList" 223 :tableData="ruleForm.tdytqxList"
227 @upDateQlrxxList="upDateTdytxxList" 224 @upDateQlrxxList="upDateTdytxxList"
228 :viewtype="$route.query.viewtype" 225 :viewtype="$route.query.viewtype" />
229 />
230 <div class="slxx_title title-block"> 226 <div class="slxx_title title-block">
231 权利人信息 227 权利人信息
232 <div class="triangle"></div> 228 <div class="triangle"></div>
...@@ -236,8 +232,7 @@ ...@@ -236,8 +232,7 @@
236 <el-form-item label="共有方式:"> 232 <el-form-item label="共有方式:">
237 <el-radio-group 233 <el-radio-group
238 :disabled="$route.query.viewtype == 0" 234 :disabled="$route.query.viewtype == 0"
239 v-model="ruleForm.qlxx.gyqk" 235 v-model="ruleForm.qlxx.gyqk">
240 >
241 <el-radio label="0">单独所有</el-radio> 236 <el-radio label="0">单独所有</el-radio>
242 <el-radio label="1">共同共有</el-radio> 237 <el-radio label="1">共同共有</el-radio>
243 <el-radio label="2">按份所有</el-radio> 238 <el-radio label="2">按份所有</el-radio>
...@@ -267,8 +262,7 @@ ...@@ -267,8 +262,7 @@
267 @upDateQlrxxList="upDateQlrxxList" 262 @upDateQlrxxList="upDateQlrxxList"
268 :key="key" 263 :key="key"
269 :viewtype="$route.query.viewtype" 264 :viewtype="$route.query.viewtype"
270 :gyfs="ruleForm.qlxx.gyfs" 265 :gyfs="ruleForm.qlxx.gyfs" />
271 />
272 266
273 <div v-if="ruleForm.ywrList && ruleForm.ywrList.length > 0"> 267 <div v-if="ruleForm.ywrList && ruleForm.ywrList.length > 0">
274 <div class="slxx_title title-block"> 268 <div class="slxx_title title-block">
...@@ -280,8 +274,7 @@ ...@@ -280,8 +274,7 @@
280 :tableData="ruleForm.ywrList" 274 :tableData="ruleForm.ywrList"
281 :key="key" 275 :key="key"
282 @upDateQlrxxList="upDateYwrxxList" 276 @upDateQlrxxList="upDateYwrxxList"
283 :viewtype="$route.query.viewtype" 277 :viewtype="$route.query.viewtype" />
284 />
285 </div> 278 </div>
286 </div> 279 </div>
287 <el-row class="btn" v-if="!$route.query.viewtype && ableOperation"> 280 <el-row class="btn" v-if="!$route.query.viewtype && ableOperation">
...@@ -293,129 +286,147 @@ ...@@ -293,129 +286,147 @@
293 </div> 286 </div>
294 </template> 287 </template>
295 <script> 288 <script>
296 import { mapGetters } from "vuex"; 289 import { mapGetters } from "vuex";
297 import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js"; 290 import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js";
298 import { init } from "@/api/djbbl.js"; 291 import { init } from "@/api/djbbl.js";
299 import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"; 292 import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
300 import tdytTable from "@/views/workflow/components/tdytTable"; 293 import tdytTable from "@/views/workflow/components/tdytTable";
301 export default { 294 // import the component
302 components: { qlrCommonTable,tdytTable }, 295 import Treeselect from '@riophae/vue-treeselect'
303 computed: { 296 // import the styles
304 ...mapGetters(["dictData", "flag"]), 297 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
305 },
306 data() {
307 return {
308 //表单是否可操作
309 propsParam: this.$attrs,
310 ableOperation: true,
311 key: 0,
312 isShow: false,
313 disabled: true,
314 czrOptions: [],
315 ruleForm: {},
316 //传递参数\
317 rules: {},
318 };
319 },
320 created() {
321 this.loadData();
322 },
323 mounted() {},
324 methods: {
325 loadData() {
326 console.log("房地产权",this.propsParam);
327 init(this.propsParam.bsmRepair).then((res) => {
328 if (res.code == 200) {
329 298
330 this.ruleForm = res.result; 299 export default {
331 this.isShow = true; 300 components: { qlrCommonTable, tdytTable, Treeselect },
332 // this.tableData = res.result; 301 computed: {
333 // if (this.tableData.length < datas.columns().emptycolNum) { 302 ...mapGetters(["dictData", "flag"]),
334 // this.emptycolNum =
335 // datas.columns().emptycolNum - this.tableData.length;
336 // } else {
337 // this.emptycolNum = 0;
338 // }
339 }
340 });
341 }, 303 },
342 // 更新土地用途信息 304 data () {
343 upDateTdytxxList(val) { 305 return {
344 console.log("VAL",val); 306 // 键名转换,方法默认是label和children进行树状渲染
345 this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val)); 307 normalizer (node) { //方法
346 this.key++; 308 if (node.children == null || node.children == 'null') {
347 }, 309 delete node.children;
348 // 更新权利人信息 310 }
349 upDateQlrxxList(val) { 311 return {
350 this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val)); 312 id: node.dcode,
351 this.czrOptions = this.ruleForm.qlrList; 313 label: node.dname
352 this.key++; 314 }
315 },
316 //表单是否可操作
317 propsParam: this.$attrs,
318 ableOperation: true,
319 key: 0,
320 isShow: false,
321 disabled: true,
322 czrOptions: [],
323 ruleForm: {},
324 //传递参数\
325 rules: {},
326 };
353 }, 327 },
354 // 更新义务人信息 328 created () {
355 upDateYwrxxList(val) { 329 this.loadData();
356 this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val));
357 this.key++;
358 }, 330 },
359 onSubmit() { 331 mounted () { },
360 console.log("this.ruleForm大信息",this.ruleForm); 332 methods: {
361 if (this.ruleForm.qlrList.length == 0) { 333 loadData () {
362 this.$message({ 334 console.log("房地产权", this.propsParam);
363 showClose: true, 335 init(this.propsParam.bsmRepair).then((res) => {
364 message: "请确认权利人信息", 336 if (res.code == 200) {
365 type: "error",
366 });
367 return false;
368 }
369 337
370 if (this.ruleForm.qlxx.gyfs == "0") { 338 this.ruleForm = res.result;
371 if (this.ruleForm.qlrList.length > 1) { 339 this.isShow = true;
340 // this.tableData = res.result;
341 // if (this.tableData.length < datas.columns().emptycolNum) {
342 // this.emptycolNum =
343 // datas.columns().emptycolNum - this.tableData.length;
344 // } else {
345 // this.emptycolNum = 0;
346 // }
347 }
348 });
349 },
350 // 更新土地用途信息
351 upDateTdytxxList (val) {
352 console.log("VAL", val);
353 this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
354 this.key++;
355 },
356 // 更新权利人信息
357 upDateQlrxxList (val) {
358 this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val));
359 this.czrOptions = this.ruleForm.qlrList;
360 this.key++;
361 },
362 // 更新义务人信息
363 upDateYwrxxList (val) {
364 this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val));
365 this.key++;
366 },
367 onSubmit () {
368 console.log("this.ruleForm大信息", this.ruleForm);
369 if (this.ruleForm.qlrList.length == 0) {
372 this.$message({ 370 this.$message({
373 showClose: true, 371 showClose: true,
374 message: "共有方式:单独所有,权利人只能是一个人", 372 message: "请确认权利人信息",
375 type: "error", 373 type: "error",
376 }); 374 });
377 return false; 375 return false;
378 } 376 }
379 this.ruleForm.qlrList[0].sfczr = "1"; 377
380 } 378 if (this.ruleForm.qlxx.gyfs == "0") {
381 if (this.ruleForm.qlxx.gyfs == "1") { 379 if (this.ruleForm.qlrList.length > 1) {
382 //是否分别持证 380 this.$message({
383 if (this.ruleForm.qlxx.sqfbcz == "1") { 381 showClose: true,
384 //是 382 message: "共有方式:单独所有,权利人只能是一个人",
385 this.ruleForm.qlrList.forEach((item, index) => { 383 type: "error",
386 item.sfczr = "1"; 384 });
387 }); 385 return false;
388 } else { 386 }
389 this.ruleForm.qlrList.forEach((item, index) => { 387 this.ruleForm.qlrList[0].sfczr = "1";
390 if (item.zjh == this.ruleForm.czr) {
391 item.sfczr = "1";
392 } else {
393 item.sfczr = "0";
394 }
395 });
396 } 388 }
397 } 389 if (this.ruleForm.qlxx.gyfs == "1") {
398 saveData(this.ruleForm).then((res) => { 390 //是否分别持证
399 if (res.code === 200) { 391 if (this.ruleForm.qlxx.sqfbcz == "1") {
400 this.$message({ 392 //是
401 showClose: true, 393 this.ruleForm.qlrList.forEach((item, index) => {
402 message: "保存成功!", 394 item.sfczr = "1";
403 type: "success", 395 });
404 }); 396 } else {
405 this.$store.dispatch("user/refreshPage", true); 397 this.ruleForm.qlrList.forEach((item, index) => {
406 } else { 398 if (item.zjh == this.ruleForm.czr) {
407 this.$message({ 399 item.sfczr = "1";
408 showClose: true, 400 } else {
409 message: res.message, 401 item.sfczr = "0";
410 type: "error", 402 }
411 }); 403 });
404 }
412 } 405 }
413 }); 406 saveData(this.ruleForm).then((res) => {
407 if (res.code === 200) {
408 this.$message({
409 showClose: true,
410 message: "保存成功!",
411 type: "success",
412 });
413 this.$store.dispatch("user/refreshPage", true);
414 } else {
415 this.$message({
416 showClose: true,
417 message: res.message,
418 type: "error",
419 });
420 }
421 });
422 },
414 }, 423 },
415 }, 424 };
416 };
417 </script> 425 </script>
418 <style scoped lang="scss"> 426 <style scoped lang="scss">
419 @import "~@/styles/public.scss"; 427 @import "~@/styles/public.scss";
420 @import "~@/styles/slxx/slxx.scss"; 428 @import "~@/styles/slxx/slxx.scss";
429 /deep/.vue-treeselect__menu-container {
430 transition: 0.3s !important;
431 }
421 </style> 432 </style>
......