Blame view

src/views/ywbl/ywsq/ywsq.vue 5.96 KB
赵千 committed
1
<template>
任超 committed
2 3
  <div class="ywsq">
    <div class="ywsq-left">
任超 committed
4 5 6 7
      <p v-for="(item, index) in leftList" @click="handleleftTitle(index)" :key="index"
        :class="{ 'active': n == index }">{{ item }}</p>
      <el-collapse disabled v-model="activeNames">
        <el-collapse-item title="业务申请" name="1">
任超 committed
8
          <ul class="item-list">
任超 committed
9
            <li v-for="(obj, key) in list" :key="key" @click="handleList(list, obj)" :class="obj.check ? 'active' : ''">
任超 committed
10
              {{ obj.nodename }}</li>
任超 committed
11
          </ul>
任超 committed
12 13
        </el-collapse-item>
      </el-collapse>
任超 committed
14 15 16 17
    </div>

    <!-- right -->
    <div class="ywsq-right">
任超 committed
18
      <div class="right-type el-card box-card is-always-shadow" v-if="n == -1">
任超 committed
19 20
        <div class="right-title">登记类型</div>
        <ul class="type-content">
任超 committed
21
          <li :class="item.cselect ? 'cactive' : ''" @click="handleDjlxSelect(item)" v-for="(item, index) in djlxList"
任超 committed
22 23 24 25
            :key="index">
            <p>
              {{ item.nodename }}
            </p>
任超 committed
26
            <p v-if="item.sffqlc == 1" :class="item.select ? 'active' : ''" @click.stop="handleCollection(item)">
任超 committed
27 28 29
              <i class="el-icon-star-off" :class="item.select ? 'active' : ''"></i>
            </p>
          </li>
任超 committed
30 31 32
        </ul>
      </div>
      <div class="right-situation el-card box-card is-always-shadow">
任超 committed
33 34 35
        <div v-if="n >= 0">
          <div class="right-title">业务列表</div>
          <ul>
任超 committed
36
            <li v-for="(item, index) in ywList" :key="index" @click="handleSelectYw(item, ywList)"
任超 committed
37
              :class="item.cselect ? 'cactive' : ''">
任超 committed
38
              <p>
任超 committed
39
                {{ item.nodename }}
任超 committed
40
              </p>
任超 committed
41
              <p v-if="item.sffqlc == 1" :class="item.select ? 'active' : ''" @click="handleCollection(item)">
任超 committed
42 43 44 45 46 47 48
                <i class="el-icon-star-off" :class="item.select ? 'active' : ''"></i>
              </p>
            </li>
          </ul>
        </div>
        <div v-if="n == -1">
          <div class="right-title">登记情形</div>
任超 committed
49
          <ul class="registration">
任超 committed
50 51
            <li v-for="(item, index) in djqxList" @click="handleSelectYw(item, djqxList)"
              :class="item.cselect ? 'cactive' : ''" :key="index">
任超 committed
52
              <p>
任超 committed
53
                {{ item.nodename }}
任超 committed
54
              </p>
任超 committed
55
              <p :class="item.select ? 'active' : ''" @click.stop="handleCollection(item)">
任超 committed
56 57 58 59 60 61 62
                <i class="el-icon-star-off" :class="item.select ? 'active' : ''"></i>
              </p>
            </li>
          </ul>
        </div>
      </div>
      <div class="submit-button">
任超 committed
63
        <el-button type="primary" :disabled="btnDisabled" @click="btnClick">选择不动产信息</el-button>
任超 committed
64 65
      </div>
    </div>
任超 committed
66
    <fqsqDialog v-model="isDialog" :bsmSqyw="bsmSqyw" :djywbm="djywbm" :djqxObj='djqxObj' />
任超 committed
67
  </div>
赵千 committed
68 69
</template>
<script>
任超 committed
70
import { getCollectBiz, getleftMenu, getNextNode } from "@/api/ywbl"
任超 committed
71
import fqsqDialog from "./components/fqsqDialog/fqsqDialog.vue"
赵千 committed
72 73 74
export default {
  data () {
    return {
任超 committed
75
      n: 0,
任超 committed
76
      activeNames: ['1'],
任超 committed
77
      leftList: [
78
        '常办业务', '一并申请', '登记簿补录',
任超 committed
79
      ],
任超 committed
80
      list: [],
任超 committed
81
      djlxList: [],
任超 committed
82
      ywList: [],
任超 committed
83
      djqxList: [],
任超 committed
84
      bsmSqyw: '',
liangyifan committed
85
      isDialog: false,
任超 committed
86
      btnDisabled: true,
liangyifan committed
87
      djywbm: '',
任超 committed
88 89 90
      djqxObj: {
        djqxbm: "",
        djqxmc: "",
liangyifan committed
91
      },
任超 committed
92

任超 committed
93 94
    }
  },
liangyifan committed
95
  components: {
任超 committed
96
    fqsqDialog
liangyifan committed
97
  },
任超 committed
98 99 100
  created () {
    this.getDataList()
  },
任超 committed
101
  methods: {
任超 committed
102 103 104 105 106 107 108 109 110 111 112 113 114
    getDataList () {
      getCollectBiz().then(res => {
        let { result } = res
        this.ywList = result
        this.ywList.forEach(item => {
          this.$set(item, 'cselect', false)
        })
      })
      getleftMenu().then(res => {
        let { result } = res
        this.list = result
      })
    },
任超 committed
115 116 117 118 119 120
    handleleftTitle (index) {
      this.n = index
      this.list.forEach(item => {
        if (item.check) item.check = false
      })
    },
任超 committed
121 122 123
    // 业务-登记情形选择
    handleSelectYw (item, list) {
      list.forEach(item => {
任超 committed
124 125 126
        item.cselect = false
      })
      item.cselect = !item.cselect
liangyifan committed
127
      this.djqxObj = {
任超 committed
128 129
        'djqxbm': item.nodecode,
        'djqxmc': item.nodename,
liangyifan committed
130
      }
任超 committed
131 132
      if (item.sffqlc == '1') {
        this.btnDisabled = false
任超 committed
133
        this.bsmSqyw = item.parentid
任超 committed
134
        this.djywbm = item.djywbm
任超 committed
135 136
      }
    },
任超 committed
137
    handleList (list, obj) {
任超 committed
138
      this.btnDisabled = true
任超 committed
139
      list.forEach(item => {
任超 committed
140
        if (item.check) item.check = false
任超 committed
141
      })
任超 committed
142
      this.n = -1
任超 committed
143
      this.$set(obj, 'check', true)
任超 committed
144
      this.getNextNode(obj.bsmSqyw)
任超 committed
145 146
      this.djqxList = []
      this.djlxList = []
任超 committed
147 148 149 150
    },
    // 获取下个节点类型
    getNextNode (bsmSqyw) {
      getNextNode(bsmSqyw).then(res => {
任超 committed
151 152
        if (res.result.djqx) this.djqxList = res.result.djqx
        if (res.result.djlx) this.djlxList = res.result.djlx
任超 committed
153 154
        this.djqxList.forEach(item => {
          this.$set(item, 'cselect', false)
任超 committed
155
          this.$set(item, 'select', false)
任超 committed
156
        })
任超 committed
157 158 159 160
        this.djlxList.forEach(item => {
          this.$set(item, 'cselect', false)
          this.$set(item, 'select', false)
        })
任超 committed
161
      })
任超 committed
162
    },
任超 committed
163 164 165
    handleCollection (item) {
      item.select = !item.select
    },
任超 committed
166 167 168 169 170 171
    handleSelect (item) {
      this.busList.forEach(item => {
        item.cselect = false
      })
      item.cselect = !item.cselect
    },
任超 committed
172
    // 登记类型
任超 committed
173
    handleDjlxSelect (item) {
任超 committed
174
      this.btnDisabled = true
任超 committed
175
      this.djlxList.forEach(item => {
任超 committed
176
        if (item.cselect) item.cselect = false
任超 committed
177
      })
任超 committed
178
      this.$set(item, 'cselect', true)
任超 committed
179 180
      if (item.sffqlc == '1') {
        this.btnDisabled = false
181
        this.bsmSqyw = item.bsmSqyw
任超 committed
182
        this.djywbm = item.djywbm
任超 committed
183 184
      } else {
        this.getNextNode(item.bsmSqyw)
任超 committed
185
      }
任超 committed
186
      this.djqxList = []
liangyifan committed
187 188
    },
    // 选择不动产信息
任超 committed
189
    btnClick () {
liangyifan committed
190 191
      this.isDialog = true
    },
任超 committed
192 193 194
    loadView (view) {
      return r => require.ensure([], () => r(require(`./components/${view}/${view}.vue`)))
    },
赵千 committed
195 196 197 198
  }
}
</script>
<style scoped lang='scss'>
任超 committed
199
@import "~@/styles/mixin.scss";
任超 committed
200
@import './ywsq.scss';
赵千 committed
201
</style>