style:字典增加下拉框组件
Showing
2 changed files
with
50 additions
and
38 deletions
| ... | @@ -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 | 补录信息 |
| ... | @@ -94,15 +93,13 @@ | ... | @@ -94,15 +93,13 @@ |
| 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> |
| ... | @@ -225,8 +222,7 @@ | ... | @@ -225,8 +222,7 @@ |
| 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,18 +286,33 @@ | ... | @@ -293,18 +286,33 @@ |
| 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' |
| 296 | // import the styles | ||
| 297 | import '@riophae/vue-treeselect/dist/vue-treeselect.css' | ||
| 298 | |||
| 299 | export default { | ||
| 300 | components: { qlrCommonTable, tdytTable, Treeselect }, | ||
| 303 | computed: { | 301 | computed: { |
| 304 | ...mapGetters(["dictData", "flag"]), | 302 | ...mapGetters(["dictData", "flag"]), |
| 305 | }, | 303 | }, |
| 306 | data() { | 304 | data () { |
| 307 | return { | 305 | return { |
| 306 | // 键名转换,方法默认是label和children进行树状渲染 | ||
| 307 | normalizer (node) { //方法 | ||
| 308 | if (node.children == null || node.children == 'null') { | ||
| 309 | delete node.children; | ||
| 310 | } | ||
| 311 | return { | ||
| 312 | id: node.dcode, | ||
| 313 | label: node.dname | ||
| 314 | } | ||
| 315 | }, | ||
| 308 | //表单是否可操作 | 316 | //表单是否可操作 |
| 309 | propsParam: this.$attrs, | 317 | propsParam: this.$attrs, |
| 310 | ableOperation: true, | 318 | ableOperation: true, |
| ... | @@ -317,13 +325,13 @@ export default { | ... | @@ -317,13 +325,13 @@ export default { |
| 317 | rules: {}, | 325 | rules: {}, |
| 318 | }; | 326 | }; |
| 319 | }, | 327 | }, |
| 320 | created() { | 328 | created () { |
| 321 | this.loadData(); | 329 | this.loadData(); |
| 322 | }, | 330 | }, |
| 323 | mounted() {}, | 331 | mounted () { }, |
| 324 | methods: { | 332 | methods: { |
| 325 | loadData() { | 333 | loadData () { |
| 326 | console.log("房地产权",this.propsParam); | 334 | console.log("房地产权", this.propsParam); |
| 327 | init(this.propsParam.bsmRepair).then((res) => { | 335 | init(this.propsParam.bsmRepair).then((res) => { |
| 328 | if (res.code == 200) { | 336 | if (res.code == 200) { |
| 329 | 337 | ||
| ... | @@ -340,24 +348,24 @@ export default { | ... | @@ -340,24 +348,24 @@ export default { |
| 340 | }); | 348 | }); |
| 341 | }, | 349 | }, |
| 342 | // 更新土地用途信息 | 350 | // 更新土地用途信息 |
| 343 | upDateTdytxxList(val) { | 351 | upDateTdytxxList (val) { |
| 344 | console.log("VAL",val); | 352 | console.log("VAL", val); |
| 345 | this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val)); | 353 | this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val)); |
| 346 | this.key++; | 354 | this.key++; |
| 347 | }, | 355 | }, |
| 348 | // 更新权利人信息 | 356 | // 更新权利人信息 |
| 349 | upDateQlrxxList(val) { | 357 | upDateQlrxxList (val) { |
| 350 | this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val)); | 358 | this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val)); |
| 351 | this.czrOptions = this.ruleForm.qlrList; | 359 | this.czrOptions = this.ruleForm.qlrList; |
| 352 | this.key++; | 360 | this.key++; |
| 353 | }, | 361 | }, |
| 354 | // 更新义务人信息 | 362 | // 更新义务人信息 |
| 355 | upDateYwrxxList(val) { | 363 | upDateYwrxxList (val) { |
| 356 | this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val)); | 364 | this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val)); |
| 357 | this.key++; | 365 | this.key++; |
| 358 | }, | 366 | }, |
| 359 | onSubmit() { | 367 | onSubmit () { |
| 360 | console.log("this.ruleForm大信息",this.ruleForm); | 368 | console.log("this.ruleForm大信息", this.ruleForm); |
| 361 | if (this.ruleForm.qlrList.length == 0) { | 369 | if (this.ruleForm.qlrList.length == 0) { |
| 362 | this.$message({ | 370 | this.$message({ |
| 363 | showClose: true, | 371 | showClose: true, |
| ... | @@ -413,9 +421,12 @@ export default { | ... | @@ -413,9 +421,12 @@ export default { |
| 413 | }); | 421 | }); |
| 414 | }, | 422 | }, |
| 415 | }, | 423 | }, |
| 416 | }; | 424 | }; |
| 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> | ... | ... |
-
Please register or sign in to post a comment