14d76203 by 任超
2 parents 41264184 7963b2d5
<template>
<div class="ywsq" id="ywsq">
<div class="ywsq-left">
<p v-for="(item, index) in leftList" @click="handleleftTitle(index)" :key="index"
:class="{ 'active': n == index }">{{ item }}</p>
<p v-for="(item, index) in sqywlxList" @click="sqywlxClick(item)" :key="index"
:class="{ 'active': selectType == item.type }">{{ item.name }}</p>
<el-collapse disabled v-model="activeNames">
<el-collapse-item title="业务申请" name="1">
<ul class="item-list">
<li v-for="(obj, key) in list" :key="key" @click="handleList(list, obj)" :class="obj.check ? 'active' : ''">
{{ obj.nodename }}</li>
<li v-for="(item, index) in sqywQllxList" :key="index" @click="qllxClick(index)" :class="item.check ? 'active' : ''">
{{ item.nodename }}</li>
</ul>
</el-collapse-item>
</el-collapse>
</div>
<!-- right -->
<div class="ywsq-right">
<div class="right-type el-card box-card is-always-shadow" v-if="n == -1">
<!-- 常办业务 -->
<div v-if="selectType=='collect'" class="right-situation">
<div class="right-title">常办业务列表</div>
<ul>
<li class="cactive" v-for="(item, index) in collectList" :key="index" @dblclick="dblclick(item)"
@click="selectSqywClick(item)">
<p>{{ item.djywmc }}<br>{{ item.nodename }}</p>
<p class="active" @click.stop="handleCollection(item)">
<i class="el-icon-star-off active"></i>
</p>
</li>
</ul>
</div>
<!-- 一并申请 -->
<div v-if="selectType=='together'">一并申请</div>
<!-- 登记簿补录 -->
<div v-if="selectType=='amend'">登记簿补录</div>
<!-- 业务申请 -->
<div v-if="selectType=='apply'">
<div class="right-title">登记类型</div>
<ul class="type-content">
<li :class="item.cselect ? 'cactive' : ''" @dblclick="handleDjqxItem(item)" @click="handleDjlxSelect(item)"
<li :class="item.cselect ? 'cactive' : ''" @dblclick="dblclick(item)" @click="selectSqywClick(item)"
v-for="(item, index) in djlxList" :key="index">
<p>
{{ item.nodename }}
......@@ -30,48 +46,35 @@
</li>
</ul>
</div>
<div class="right-situation el-card box-card is-always-shadow">
<div class="right-title">{{ obj[n] }}</div>
<ul>
<li v-for="(item, index) in itemList" :key="index" @dblclick="handleSelectItem(item, itemList)"
@click="handleSelectYw(item, itemList)" :class="item.cselect ? 'cactive' : ''">
<p v-if="n == 0">
{{ item.djywmc }}<br>
{{ item.nodename }}
</p>
<dt v-else>{{ item.nodename }}</dt>
<p :class="item.userCollect == 1 ? 'active' : ''" @click.stop="handleCollection(item)">
<i class="el-icon-star-off" :class="item.userCollect == 1 ? 'active' : ''"></i>
</p>
</li>
</ul>
</div>
<div class="submit-button">
<el-button type="primary" :disabled="btnDisabled" @click="bthSelectClick">选择不动产</el-button>
<el-button type="primary" :disabled="btnDisabled" @click="dialogClick">选择不动产</el-button>
</div>
</div>
<fqsqDialog v-model="isDialog" :djqxObj="djqxObj" :bsmSqyw="bsmSqyw" :djywbm="djywbm" />
<selectDialog v-model="isDialog" v-bind="selectSqdjyw"/>
</div>
</template>
<script>
import fqsqDialog from "./slectBdc.vue"
import selectDialog from "./slectBdc.vue"
import { getCollectBiz, getleftMenu, getNextNode, addCollectBiz, deleteCollectBiz } from "@/api/ywbl"
export default {
data () {
return {
n: 0,
activeNames: ['1'],
leftList: [
'常办业务', '一并申请', '登记簿补录',
sqywlxList: [
{name:"常办业务",type:"collect"},
{name:"一并申请",type:"together"},
{name:"登记簿补录",type:"amend"}
],
// 左侧列表
list: [],
selectType: "collect",
activeNames: ['1'],
collectList :[],
sqywQllxList :[],
djlxList: [],
djqxList: [],
selectSqdjyw:{},
itemList: [],
ywList: [],
djqxList: [],
obj: {
'0': '常办业务列表',
'-1': '登记情形'
......@@ -84,42 +87,68 @@ export default {
}
},
components: {
fqsqDialog
selectDialog
},
created () {
this.getDataList()
this.getDataList();
},
methods: {
getDataList () {
//获取收藏信息集合
getCollectBiz().then(res => {
let { result } = res
this.ywList = result
this.ywList.forEach(item => {
this.$set(item, 'cselect', false)
item.userCollect = 1
this.collectList = res.result
});
//获取申请权利信息集合
getleftMenu().then(res => {
this.sqywQllxList=res.result;
})
if (this.n == 0) {
this.itemList = this.ywList
}
},
//申请业务类型菜单事件
sqywlxClick (item) {
this.selectType = item.type;
this.sqywQllxList.forEach(item => {
if (item.check) item.check = false;
})
getleftMenu().then(res => {
let { result } = res
this.list = result
},
//权利类型菜单事件
qllxClick (index) {
this.sqywQllxList.forEach(item => {
if (item.check) item.check = false;
})
this.sqywQllxList[index].check=true;
this.selectType = "apply";
this.djlxList=[];
this.djqxList=[];
this.getNextNode(this.sqywQllxList[index].bsmSqyw);
},
handleleftTitle (index) {
this.n = index
let obj = {
'0': this.ywList
//选择申请业务事件
selectSqywClick(item){
if(item.sffqlc=="1"){
this.selectSqdjyw=item;
this.btnDisabled=false;
}else{
this.getNextNode(item.bsmSqyw);
}
this.itemList = obj[this.n]
this.list.forEach(item => {
if (item.check) item.check = false
},
//获取下个节点类型数据
getNextNode (bsmSqyw) {
getNextNode(bsmSqyw).then(res => {
if (res.result.djqx) this.djqxList = res.result.djqx;
if (res.result.djlx) this.djlxList = res.result.djlx;
})
},
//双击事件
dblclick(item){
this.selectSqdjyw=item;
this.btnDisabled=false;
this.dialogClick();
},
//打开弹框内容
dialogClick(){
this.isDialog = true;
},
// 业务-登记情形选择
handleSelectYw (item, list) {
SelectDjqx (item, list) {
list.forEach(item => {
this.$set(item, 'cselect', false)
})
......@@ -131,34 +160,8 @@ export default {
this.djywbm = item.djywbm
}
},
handleList (list, obj) {
this.btnDisabled = true
list.forEach(item => {
if (item.check) item.check = false
})
this.n = -1
this.$set(obj, 'check', true)
this.getNextNode(obj.bsmSqyw)
this.djqxList = []
this.djlxList = []
this.itemList = []
},
// 获取下个节点类型
getNextNode (bsmSqyw, type = true) {
getNextNode(bsmSqyw).then(res => {
if (res.result.djqx) this.djqxList = res.result.djqx
if (res.result.djlx) this.djlxList = res.result.djlx
if (type) {
this.djqxList.forEach(item => {
this.$set(item, 'cselect', false)
})
this.djlxList.forEach(item => {
this.$set(item, 'cselect', false)
})
}
this.itemList = this.djqxList
})
},
handleCollection (item) {
let that = this
if (item.userCollect == '2') {
......