Commit 5ac2335c authored by Gakki's avatar Gakki

123

parent 8b7035c5
......@@ -57,6 +57,10 @@ const appRoutes = [
path: '/house', name: 'house', component: resolve => require(['@/components/Layout/content-wrapper'], resolve), // ContentWrapper,
meta: { title: '住宅信息', menuPath: true, menuIcon: 'profile', hideInBread: true, requirePerm: false },
children: [
{
path: '/houseData/basicInfoByLabel', name: 'basicInfoByLabel', component: resolve => require(['@/views/houseData/basicInfoByLabel'], resolve), //basicInfo,
meta: { title: '小区列表-标签', menuPath: true, hideInBread: false, },
},
{ // 小区列表
path: '/houseData/basicInfo', name: 'basicInfo', component: resolve => require(['@/views/houseData/basicInfo'], resolve), //basicInfo,
meta: { title: '小区列表', menuPath: true, hideInBread: false, },
......
// 小区列表
<template>
<div class="routerWapper">
{{checkedKeys}}
<a-row type='flex'>
<a-col flex='250px' style="overflow: hidden">
<div v-if="$route.path == '/houseData/basicInfo'" class="layoutMargin layoutPadding">
<a-tree
@check='onCheck'
checkable
:tree-data="treeData"
:replace-fields="replaceFields"
/>
<!-- <a-tree
v-model='checkedKeys'
checkable
:tree-data="treeData"
:replace-fields="replaceFields"
:selected-keys="selectedKeys"
@select="onSelect"
/> -->
</div>
</a-col>
<a-col flex='78%'>
<div v-if="$route.path == '/houseData/basicInfo'" class="layoutMargin layoutPadding">
<a-form :form="form" class="protalForm" >
<a-row class="formItem" type="flex" :justify="simpleSearchForm ? 'end' : ''" align="top" :gutter="simpleSearchForm ? 16 : 0">
......@@ -176,25 +155,14 @@
</div>
</div>
<RouterWapper v-else></RouterWapper>
</a-col>
</a-row>
</div>
</template>
<script>
const treeData = []
export default {
name: 'basicInfo',
data() {
return {
treeData,
selectedKeys: [],
replaceFields: {
children: 'children',
title: 'labelName',
key: 'id'
},
checkedKeys: [],
simpleSearchForm: true, // 展示、收取简单搜索开关,true为简单搜索
levelType: [
......@@ -432,50 +400,12 @@ export default {
this.$nextTick(function () {
// setTimeout(() => {
this.getConfig(),
this.getSearchParams(),
this.getLabelList()
this.getSearchParams()
// }, 0)
})
}
},
methods: {
onCheck(keys, node) {
// console.log(keys, node.node.$children.length)
this.checkedKeys = []
if(node.node.$children.length > 0) { // 一级菜单(有若干个二级菜单)
console.log('一级菜单')
for(let i = 0; i < node.node.$children.length; i++) {
// 一级菜单
// console.log(node.checkedNodesPositions[i].pos.split('-').length)
if(node.checkedNodesPositions[i].pos.split('-').length == 3) {
this.checkedKeys.push(keys[i])
}
}
} else {
console.log('二级菜单')
for(let i = 0; i < node.checkedNodesPositions.length; i++) {
// 一级菜单
// console.log(node.checkedNodesPositions[i].pos.split('-').length)
if(node.checkedNodesPositions[i].pos.split('-').length == 2) {
this.checkedKeys.push(keys[i])
}
}
}
// console.log(this.checkedKeys.toString())
},
getLabelList() {
this.$ajax.get({
url: this.$api.GET_LABEL_LIST,
}).then(res => {
if (res.code == 200) {
this.treeData = this.$com.confirm(res, 'data.content', [])
console.log(JSON.stringify(this.treeData))
}
})
},
onSelect(selectedKeys, node) {
console.log(selectedKeys, node.node.$children.length)
},
getConfig() {
this.$ajax.get({
url: this.$api.GET_CONFIG,
......@@ -616,7 +546,6 @@ export default {
// 'finishDate_lt': !!this.isBeforeTwoThousand? '2000-01-01': '',
'finishDate_lt': this.isBeforeTwoThousand == '1' ? '2020-01-01':'',
'finishDate_gt': this.isBeforeTwoThousand == '2' ? '2020-01-01':'',
'labelIds': this.checkedKeys.toString(),
'cspContractEndDate_lt': !!this.form.getFieldValue('cspContractEndDate_lt') ? this.$moment(this.form.getFieldValue('cspContractEndDate_lt')).format('YYYY-MM-DD') : ''
}, obj, isHocId)// 融合obj 和isHocId 到入参
......@@ -626,7 +555,6 @@ export default {
this.form.setFieldsValue({'c.cspId': this.$route.query.name+'#'+this.$route.query.id})
searchParams = Object.assign(searchParams, {}, {'c.cspId': this.$route.query.id, 'c.createTime_desc': 'desc'})
}
this.searchParams = searchParams
this.$ajax.get({
url: this.$api.GET_BASIC_LIST,
......
This diff is collapsed.
......@@ -20,25 +20,27 @@
</div>
<a-divider type='horizontal' />
<a-form :form='labelForm'>
<a-form-item label='标签名' :label-col="{span:2}" :wrapper-col="{span:14}">
<a-input v-decorator="['labelName',{validateTrigger:'blur', initialValue: jsonData.labelName?jsonData.labelName: '', rules: [{required: true, message: '请填写标签名!'}]}]"></a-input>
<a-form-item label='标签名' :label-col="{span:3}" :wrapper-col="{span:15}">
<a-input placeholder='请输入标签名' v-decorator="['labelName',{validateTrigger:'blur', initialValue: jsonData.labelName?jsonData.labelName: '', rules: [{required: true, message: '请填写标签名!'}]}]"></a-input>
</a-form-item>
<a-form-item label='标签分组' :label-col="{span:2}" :wrapper-col="{span:14}">
<a-form-item label='标签分组' :label-col="{span:3}" :wrapper-col="{span:7}">
<a-select v-decorator="['parentId',{validateTrigger:'blur', initialValue: jsonData.parentId?jsonData.parentId: '0', rules: []}]">
<a-select-option value='0'>无(将改标签设为一级标签)</a-select-option>
<a-select-option v-for="(item, index) in parentLabelList" :key='index' :value='item.id'>
{{item.labelName}}
</a-select-option>
</a-select>
<!-- <a-input placeholder='请输入分组名称' v-decorator="['parentName',{validateTrigger:'blur', initialValue: jsonData.parentName?jsonData.parentName: '', rules: [{required: true, message: '请填写标签分组名!'}]}]"></a-input> -->
</a-form-item>
<a-form-item label='业务对象' :label-col="{span:2}" :wrapper-col="{span:14}">
<a-select :disabled="triggerType == 'loadChildLabel'" @change='handleObjChange' v-decorator="['tableName',{validateTrigger:'blur', initialValue: jsonData.tableName?jsonData.tableName: '', rules: [{required: true, message: '请选择业务对象!'}]}]">
<a-form-item label='业务对象' :label-col="{span:3}" :wrapper-col="{span:15}">
<a-select placeholder='请选择业务对象' :disabled="triggerType == 'loadChildLabel'" @change='handleObjChange' v-decorator="['tableName',{validateTrigger:'blur', initialValue: jsonData.tableName?jsonData.tableName: '', rules: [{required: true, message: '请选择业务对象!'}]}]">
<a-select-option value='tbl_community'>小区</a-select-option>
<a-select-option value='tbl_building'>门牌幢</a-select-option>
</a-select>
</a-form-item>
</a-form>
<a-row style="font-weight: bold">信息筛选配置</a-row>
<a-row style="font-weight: bold; font-size: 16px;">信息筛选配置</a-row>
<a-divider type='horizontal' dashed />
<a-form :form='infoSettingForm' layout='inline'>
<div v-for="(item, index) in loopContent.data" :key='index'>
<a-form-item v-if="!!item.relation">
......@@ -85,10 +87,11 @@
<a-icon v-if="index+1 == loopContent.data.length" theme='filled' style="color:lightgreen;" type="plus-circle" @click="addRow()" />
<a-icon v-if="index+1 == loopContent.data.length" theme='filled' style="color:red; margin-left: 5px" type="minus-circle" @click="deleteRow(index)" />
</a-form-item>
<a-divider type='horizontal' dashed />
</div>
</a-form>
<a-button type='link' v-if="loopContent.data.length == 0" @click="addInitRow()">新增配置</a-button>
<a-button type='link' v-if="loopContent.data.length == 0" @click="addInitRow()"><a-icon type="plus" />新增配置</a-button>
<!-- <div v-if="resultList.length > 0">
<a-divider type='horizontal' />
<a-row style="font-weight: bold">筛选结果</a-row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment