Commit 1e070dd5 authored by Gakki's avatar Gakki

1

parent 27995879
{ {
"Layout": [{ "Layout": [
"path": "/documents/month", "name": "month",
"meta": { "title": "检查单","menuIcon": "profile", "menuPath":false, "hideInBread":false },
"children":[
{ {
"path": "/documents/month/monthList", "name": "month", "path": "/month", "name": "month",
"meta": { "title": "房办月查列表","menuIcon": "profile", "menuPath":false, "hideInBread":false }, "meta": { "title": "检查单", "menuIcon": "profile", "menuPath": true, "hideInBread": false },
"children": [ "children": [
{ {
"path": "/documents/month/monthInfo", "name": "monthInfo", "path": "/month/monthList", "name": "month",
"meta": { "title": "检查详情", "menuPath":false, "hideInBread":false } "meta": { "title": "房办月查", "menuIcon": "profile", "menuPath": true, "hideInBread": false },
"children": [
{
"path": "/month/monthList/monthListSect", "name": "monthListSect",
"meta": { "title": "房办月查小区列表", "menuPath": false, "hideInBread": false},
"children": [
{
"path": "/month/monthList/monthListSect/monthInfo", "name": "monthInfo",
"meta": { "title": "检查详情", "menuPath": false, "hideInBread": false}
} }
] ]
} }
] ]
}, }
{ ]
"path": "/documents/repair", "name": "repairList", },
"meta": { "title": "应急报修","menuIcon": "profile", "menuPath":false, "hideInBread":false }, {
"children":[ "path": "/repair", "name": "repairList",
"meta": { "title": "应急报修", "menuIcon": "profile", "menuPath": true, "hideInBread": false },
"children": [
{ {
"path": "/documents/repair/repairList", "name": "repairList", "path": "/repair/repairList", "name": "repairInnerList",
"meta": { "title": "应急报修列表","menuIcon": "profile", "menuPath":false, "hideInBread":false }, "meta": { "title": "应急报修列表", "menuIcon": "profile", "menuPath": true, "hideInBread": false },
"children": [ "children": [
{ {
"path": "/documents/repair/repairInfo", "name": "repairInfo", "path": "/repair/repairInfo", "name": "repairInfo",
"meta": { "title": "报修详情", "menuPath":false, "hideInBread":false } "meta": { "title": "报修详情", "menuPath": false, "hideInBread": false}
} }
] ]
} }
] ]
}, },
{ {
"path": "/documents/tousu", "name": "tousu", "path": "/tousu", "name": "tousu",
"meta": { "title": "投诉信息", "menuPath": true, "menuIcon": "profile", "hideInBread": true }, "meta": { "title": "投诉信息", "menuPath": true, "menuIcon": "profile", "hideInBread": true },
"children": [ "children": [
{ {
"path": "/documents/tousu/tousuQuestion", "name": "tousuQuestion", "path": "/tousu/tousuQuestion", "name": "tousuQuestion",
"meta": { "title": "投诉问题排行", "menuPath":true, "hideInBread":false}, "meta": { "title": "投诉问题排行", "menuIcon": "profile", "menuPath": true, "hideInBread": false},
"children":[ "children": [
{ {
"path": "/documents/tousu/tousuQuestion/questionInfo", "name": "questionInfo", "path": "/tousu/tousuQuestion/questionInfo", "name": "questionInfo",
"meta": { "title": "投诉问题列表", "menuPath":false, "hideInBread":false } "meta": { "title": "投诉问题列表", "menuPath": false, "hideInBread": false}
}, },
{ {
"path": "/documents/tousu/tousuQuestion/tousuDetails", "name": "tousuDetails", "path": "/tousu/tousuQuestion/tousuDetails", "name": "tousuDetails",
"meta": { "title": "投诉问题详情", "menuPath":false, "hideInBread":false } "meta": { "title": "投诉问题详情", "menuPath": false, "hideInBread": false}
} }
] ]
}, },
{ {
"path": "/documents/tousu/tousuDensity", "name": "tousuDensity", "path": "/tousu/tousuDensity", "name": "tousuDensity",
"meta": { "title": "投诉密度排行", "menuPath":true, "hideInBread":false} "meta": { "title": "投诉密度排行", "menuIcon": "profile", "menuPath": true, "hideInBread": false}
} }
] ]
}]} },
\ No newline at end of file {
"path": "/ledger", "name": "ledger",
"meta": { "title": "区房屋台账", "menuIcon": "profile", "menuPath": true, "hideInBread": false },
"children": [
{
"path": "/ledger/community", "name": "communityList",
"meta": { "title": "住宅房屋", "menuIcon": "profile", "menuPath": true, "hideInBread": false },
"children": [
{
"path": "/ledger/community/info", "name": "communityInfo",
"meta": { "title": "详情", "menuIcon": "profile", "menuPath": false, "hideInBread": false }
},
{
"path": "/ledger/community/equipment", "name": "equipment",
"meta": { "title": "设备信息", "menuIcon": "profile", "menuPath": false, "hideInBread": false }
},
{
"path": "/ledger/community/building", "name": "communityBuilding",
"meta": { "title": "门牌幢列表", "menuIcon": "profile", "menuPath": false, "hideInBread": false }
}
]
},
{
"path": "/ledger/NonResident", "name": "NonResident",
"meta": { "title": "非居房屋", "menuIcon": "profile", "menuPath": true, "hideInBread": false },
"children": [
{
"path": "/ledger/NonResident/info", "name": "NonResidentInfo",
"meta": { "title": "非居详情", "menuIcon": "profile", "menuPath": false, "hideInBread": false }
},
{
"path": "/ledger/NonResident/building", "name": "NonResidentBuilding",
"meta": { "title": "非居门牌幢列表", "menuIcon": "profile", "menuPath": false, "hideInBread": false }
}
]
}
]
}
]}
\ No newline at end of file
...@@ -206,4 +206,10 @@ export default { ...@@ -206,4 +206,10 @@ export default {
DELETE_SINGLE_LABEL: '/service-customkey-ddd/label/{id}', // 根据id删除某个标签 DELETE_SINGLE_LABEL: '/service-customkey-ddd/label/{id}', // 根据id删除某个标签
POST_SINGLE_LABEL: '/service-customkey-ddd/label', // 新增标签 POST_SINGLE_LABEL: '/service-customkey-ddd/label', // 新增标签
PUT_LABEL_INFO: '/service-customkey-ddd/label/{id}', // 修改标签信息 PUT_LABEL_INFO: '/service-customkey-ddd/label/{id}', // 修改标签信息
POST_AVAILABLE_KEY: '/service-customkey-ddd/entityKeyDic', // 可查询字段新增
PUT_AVAILABLE_KEY: '/service-customkey-ddd/entityKeyDic/{id}', // 可查询字段修改
GET_AVAILABLE_KEY_LIST: '/service-customkey-ddd/entityKeyDics', // 可查询字段列表
DELETE_AVAILABLE_KEY: '/service-customkey-ddd/entityKeyDic/{id}', // 删除字段
GET_SINGLE_KEY_INFO: '/service-customkey-ddd/entityKeyDic/{id}', //可查询字段详情
GET_LABEL_BIND_FILTER_RESULT: '/service-customkey-ddd/labelResource', // 点击保存后查询是否有结果,有结果则调用绑定接口
} }
// 小区列表 // 小区列表
<template> <template>
<div class="routerWapper"> <div class="routerWapper">
<a-row type='flex'>
<a-col flex='250px' style="overflow: hidden">
<div v-if="$route.path == '/houseData/basicInfo'" class="layoutMargin layoutPadding">
<a-tree
: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"> <div v-if="$route.path == '/houseData/basicInfo'" class="layoutMargin layoutPadding">
<a-form :form="form" class="protalForm" > <a-form :form="form" class="protalForm" >
<a-row class="formItem" type="flex" :justify="simpleSearchForm ? 'end' : ''" align="top" :gutter="simpleSearchForm ? 16 : 0"> <a-row class="formItem" type="flex" :justify="simpleSearchForm ? 'end' : ''" align="top" :gutter="simpleSearchForm ? 16 : 0">
...@@ -155,14 +167,24 @@ ...@@ -155,14 +167,24 @@
</div> </div>
</div> </div>
<RouterWapper v-else></RouterWapper> <RouterWapper v-else></RouterWapper>
</a-col>
</a-row>
</div> </div>
</template> </template>
<script> <script>
const treeData = []
export default { export default {
name: 'basicInfo', name: 'basicInfo',
data() { data() {
return { return {
treeData,
selectedKeys: [],
replaceFields: {
children: 'children',
title: 'labelName',
key: 'id'
},
simpleSearchForm: true, // 展示、收取简单搜索开关,true为简单搜索 simpleSearchForm: true, // 展示、收取简单搜索开关,true为简单搜索
levelType: [ levelType: [
...@@ -400,12 +422,26 @@ export default { ...@@ -400,12 +422,26 @@ export default {
this.$nextTick(function () { this.$nextTick(function () {
// setTimeout(() => { // setTimeout(() => {
this.getConfig(), this.getConfig(),
this.getSearchParams() this.getSearchParams(),
this.getLabelList()
// }, 0) // }, 0)
}) })
} }
}, },
methods: { methods: {
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() { getConfig() {
this.$ajax.get({ this.$ajax.get({
url: this.$api.GET_CONFIG, url: this.$api.GET_CONFIG,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="routerWapper"> <div class="routerWapper">
<div class="portalDetailTitle" v-if="$route.name=='lvot'"> <div class="portalDetailTitle" v-if="$route.name=='lvot'">
<span class="title">标签维护</span> <span class="title">标签维护</span>
{{currentState}} <!-- {{currentState}} -->
<div class="detailOperations"> <div class="detailOperations">
<a-button @click="backPage"> 返回 </a-button> <a-button @click="backPage"> 返回 </a-button>
</div> </div>
...@@ -84,14 +84,16 @@ export default { ...@@ -84,14 +84,16 @@ export default {
backPage(){ // 返回按钮 backPage(){ // 返回按钮
this.$router.back() this.$router.back()
}, },
onSelect(selectedKeys) { onSelect(selectedKeys, node) {
console.log(selectedKeys, node.node.$children.length)
this.$ajax.get({ this.$ajax.get({
url: this.$api.GET_LABEL_DETAIL.replace('{id}', selectedKeys[0]), url: this.$api.GET_LABEL_DETAIL.replace('{id}', selectedKeys[0]),
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
let result = this.$com.confirm(res, 'data.content', []) let result = this.$com.confirm(res, 'data.content', [])
this.labelId = selectedKeys[0] this.labelId = selectedKeys[0]
if(result.parentId !== '0') { // 为二级菜单 console.log(result.parentId, node.node.$children.length)
if(result.parentId !== '0' && node.node.$children.length == 0 || result.parentId == '0' && node.node.$children.length == 0) { // 为二级菜单
this.currentState = 'loadChildLabel' this.currentState = 'loadChildLabel'
} else { // 为一级菜单 } else { // 为一级菜单
this.currentState = 'loadParentLabel' this.currentState = 'loadParentLabel'
......
<template> <template>
<div class="routerWapper"> <div class="routerWapper">
<div> <div>
<!-- {{triggerType}} - {{labelId}} - {{finish}} - {{jsonData}} --> <!-- {{triggerType}} - {{labelId}} - {{finish}} - {{jsonData}} - {{initKey}} -->
<a-row> <a-row>
<a-col :span='1' v-if="triggerType == 'create'"> <a-col :span='1' v-if="triggerType == 'create'">
<a-button type='default' @click="backPage()">返回</a-button> <a-button type='default' @click="backPage()">返回</a-button>
...@@ -24,16 +24,17 @@ ...@@ -24,16 +24,17 @@
<a-input v-decorator="['labelName',{validateTrigger:'blur', initialValue: jsonData.labelName?jsonData.labelName: '', rules: [{required: true, message: '请填写标签名!'}]}]"></a-input> <a-input v-decorator="['labelName',{validateTrigger:'blur', initialValue: jsonData.labelName?jsonData.labelName: '', rules: [{required: true, message: '请填写标签名!'}]}]"></a-input>
</a-form-item> </a-form-item>
<a-form-item label='标签分组' :label-col="{span:2}" :wrapper-col="{span:14}"> <a-form-item label='标签分组' :label-col="{span:2}" :wrapper-col="{span:14}">
<a-select v-decorator="['parentId',{validateTrigger:'blur', initialValue: jsonData.parentId?jsonData.parentId: '', rules: []}]"> <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'> <a-select-option v-for="(item, index) in parentLabelList" :key='index' :value='item.id'>
{{item.labelName}} {{item.labelName}}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label='业务对象' :label-col="{span:2}" :wrapper-col="{span:14}"> <a-form-item label='业务对象' :label-col="{span:2}" :wrapper-col="{span:14}">
<a-select v-decorator="['tableName',{validateTrigger:'blur', initialValue: jsonData.tableName?jsonData.tableName: '', rules: [{required: true, message: '请选择业务对象!'}]}]"> <a-select :disabled="triggerType == 'loadChildLabel'" @change='handleObjChange' v-decorator="['tableName',{validateTrigger:'blur', initialValue: jsonData.tableName?jsonData.tableName: '', rules: [{required: true, message: '请选择业务对象!'}]}]">
<a-select-option value='xq'>小区</a-select-option> <a-select-option value='tbl_community'>小区</a-select-option>
<a-select-option value='mpz'>门牌幢</a-select-option> <a-select-option value='tbl_building'>门牌幢</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-form> </a-form>
...@@ -52,14 +53,13 @@ ...@@ -52,14 +53,13 @@
<a-form-item> <a-form-item>
<a-select style="width: 120px" placeholder='请选择业务属性' v-decorator="['key' + index,{initialValue: item.key, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]"> <a-select style="width: 120px" placeholder='请选择业务属性' v-decorator="['key' + index,{initialValue: item.key, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option value='sx1'>属性一</a-select-option> <a-select-option v-for="(item1, index1) in availableKeyList" :key='index1' :value='item1.tblKey'>{{item1.tblKeyName}}</a-select-option>
<a-select-option value='sx2'>属性二</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-select style="width: 120px" placeholder='区间' v-decorator="['codition' + index,{initialValue: item.codition, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]"> <a-select style="width: 120px" placeholder='区间' v-decorator="['codition' + index,{initialValue: item.codition, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option value='equels'>等于</a-select-option> <a-select-option value='eq'>等于</a-select-option>
<a-select-option value='gt'>大于</a-select-option> <a-select-option value='gt'>大于</a-select-option>
<a-select-option value='gte'>大于等于</a-select-option> <a-select-option value='gte'>大于等于</a-select-option>
<a-select-option value='lt'>小于</a-select-option> <a-select-option value='lt'>小于</a-select-option>
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
loopContent: { loopContent: {
data: [{ data: [{
key: '', key: '',
codition: 'equels', codition: 'eq',
val: '', val: '',
selMet: '' selMet: ''
}] }]
...@@ -111,13 +111,16 @@ export default { ...@@ -111,13 +111,16 @@ export default {
jsonData: {}, jsonData: {},
deleteVisible: false, deleteVisible: false,
finish: false, finish: false,
parentLabelList: [] parentLabelList: [],
availableKeyList: [],
initKey: ''
} }
}, },
mounted() { mounted() {
console.log('得到的' + this.labelId) console.log('得到的' + this.labelId)
this.getLabelDetail() this.getLabelDetail()
this.getParentLabelList() this.getParentLabelList()
// this.initKeyList()
}, },
props: [ props: [
'triggerType', 'triggerType',
...@@ -140,6 +143,37 @@ export default { ...@@ -140,6 +143,37 @@ export default {
} }
}, },
methods: { methods: {
initKeyList() {
// 获取当前的对象
this.initKey = this.labelForm.getFieldValue('tableName')
this.getKeyList(this.initKey)
},
handleObjChange(val) {
this.getKeyList(val)
// 重置key表项的值为空 或 业务对象干脆disable掉
},
getKeyList(val) {
console.log('111')
this.availableKeyList = []
this.$ajax.get({
url: this.$api.GET_AVAILABLE_KEY_LIST,
params: {
'tableName': val
}
}).then(res => {
if (res.code == 200) {
let list = res.data.content
console.log(list)
this.availableKeyList = []
for(let i = 0; i < list.length; i++) {
this.availableKeyList.push({
'tblKey': list[i].tblKey,
'tblKeyName': list[i].tblKeyName
})
}
}
})
},
getLabelDetail() { getLabelDetail() {
if(!!this.labelId && this.labelId !== 'undefined') { if(!!this.labelId && this.labelId !== 'undefined') {
this.$ajax.get({ this.$ajax.get({
...@@ -153,6 +187,7 @@ export default { ...@@ -153,6 +187,7 @@ export default {
}) })
this.loopContent.data = res.data.content.selParams this.loopContent.data = res.data.content.selParams
console.log(res.data.content.selParams) console.log(res.data.content.selParams)
this.initKeyList()
} }
}) })
} else { } else {
...@@ -193,7 +228,7 @@ export default { ...@@ -193,7 +228,7 @@ export default {
addInitRow() { addInitRow() {
this.loopContent.data.push({ this.loopContent.data.push({
key: '', key: '',
codition: 'equels', codition: 'eq',
val: '', val: '',
selMet: '' selMet: ''
}) })
...@@ -201,7 +236,7 @@ export default { ...@@ -201,7 +236,7 @@ export default {
addRow() { addRow() {
this.loopContent.data.push({ this.loopContent.data.push({
key: '', key: '',
codition: 'equels', codition: 'eq',
val: '', val: '',
relation: 'and', relation: 'and',
selMet: '' selMet: ''
...@@ -256,6 +291,20 @@ export default { ...@@ -256,6 +291,20 @@ export default {
selMet: formData['selMet' + i] selMet: formData['selMet' + i]
}) })
} }
this.$ajax.post({
url: this.$api.GET_LABEL_BIND_FILTER_RESULT,
params: this.jsonData
}).then(res => {
if (res.code == 200) {
console.log(res.data.content)
// this.$message.success('修改成功!')
// this.resetFormFields()
// this.finish = true
// this.$emit('finish', this.finish)
} else {
this.$message.success('修改失败!')
}
})
// 提交标签内容, 如果有labelId则调用put接口,反之调用post接口 // 提交标签内容, 如果有labelId则调用put接口,反之调用post接口
if(!!this.labelId) { if(!!this.labelId) {
this.$ajax.put({ this.$ajax.put({
......
<template> <template>
<div class="routerWapper"> <div class="routerWapper">
{{labelId}} <!-- {{labelId}} -->
<div> <div>
<a-row> <a-row>
<a-col :span='1'> <a-col :span='1'>
...@@ -40,6 +40,22 @@ export default { ...@@ -40,6 +40,22 @@ export default {
mounted() { mounted() {
this.getLabelInfo() this.getLabelInfo()
}, },
watch: {
triggerType: {
handler: function(newV, oldV) {
this.resetFormFields()
this.getLabelInfo()
},
immediate: true
},
labelId: {
handler: function(newV, oldV) {
this.resetFormFields()
this.getLabelInfo()
},
immediate: true
}
},
methods: { methods: {
getLabelInfo() { getLabelInfo() {
if(!!this.labelId) { if(!!this.labelId) {
......
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