Commit 19d7179d authored by levante's avatar levante

标签提交

parent b5e55149
...@@ -3,16 +3,20 @@ ...@@ -3,16 +3,20 @@
<div class="routerWapper"> <div class="routerWapper">
<!-- {{checkedKeys}} --> <!-- {{checkedKeys}} -->
<div class="layoutMargin layoutPadding"> <div class="layoutMargin layoutPadding">
<!-- {{tbl}} -->
<a-row> <a-row>
<a-col :span="4" style="height:100%; position:relative;" v-if="leftPanelShow"> <a-col :span="4" style="height:100%; position:relative;" v-if="leftPanelShow">
<span style="display: block; width: 90%; color:#1890ff; font-size: 16px; font-weight: 500; padding-bottom:5px; border-bottom:1px solid #1890ff;"> <span style="display: block; width: 90%; color:#1890ff; font-size: 16px; font-weight: 500; padding-bottom:5px; border-bottom:1px solid #1890ff;">
标签筛选条件 标签筛选条件
<a-button type='link' @click="resetLabel">重置</a-button>
</span> </span>
<a-tree <a-tree
:disabled='disableTree'
@check='onCheck' @check='onCheck'
checkable checkable
:tree-data="treeData" :tree-data="treeData"
:replace-fields="replaceFields" :replace-fields="replaceFields"
:checkedKeys="checkedKeys"
/> />
</a-col> </a-col>
...@@ -22,8 +26,9 @@ ...@@ -22,8 +26,9 @@
<a-col :span="!!leftPanelShow ? 20 : 24" :style="!!leftPanelShow? `padding-left: 10px; border-left:1px solid #ccc;`:`padding-left: 10px;`"> <a-col :span="!!leftPanelShow ? 20 : 24" :style="!!leftPanelShow? `padding-left: 10px; border-left:1px solid #ccc;`:`padding-left: 10px;`">
<!-- <p class="gayLine noline" /> --> <!-- <p class="gayLine noline" /> -->
<div class="portalTableOperates"> <div class="portalTableOperates">
<a-button type='primary' @click="searchXXXByLabel">查询</a-button> <!-- <a-button type='primary' @click="resetLabel">重置</a-button> -->
<a-tabs :default-active-key="tbl" @change="changeTbl"> <!-- <a-button type='primary' @click="searchXXXByLabel">查询</a-button> -->
<a-tabs :activeKey='tbl' @change="changeTbl">
<a-tab-pane key="tbl_community" tab="小区"> <a-tab-pane key="tbl_community" tab="小区">
<TAM ref="childTab" :tableData="tableData_sect" :pagination="pagination" :tbl="tbl" /> <TAM ref="childTab" :tableData="tableData_sect" :pagination="pagination" :tbl="tbl" />
</a-tab-pane> </a-tab-pane>
...@@ -56,6 +61,7 @@ export default { ...@@ -56,6 +61,7 @@ export default {
}, },
data() { data() {
return { return {
disableTree: false,
treeData, treeData,
tbl: 'tbl_community', tbl: 'tbl_community',
selectedKeys: [], selectedKeys: [],
...@@ -266,7 +272,8 @@ export default { ...@@ -266,7 +272,8 @@ export default {
type: '', // 邻里小汇 type: '', // 邻里小汇
isBeforeTwoThousand: '', isBeforeTwoThousand: '',
twoThousandValue: '', twoThousandValue: '',
personalizedKey: '' personalizedKey: '',
currentSeeId: null
} }
}, },
beforeCreate() { // 页面进来创建form beforeCreate() { // 页面进来创建form
...@@ -308,6 +315,30 @@ export default { ...@@ -308,6 +315,30 @@ export default {
} }
}, },
methods: { methods: {
resetLabel() {
this.disableTree = false
this.checkedKeys = []
this.searchXXXByLabel()
this.pagination = { // 分页信息
pageNo: 1,
pageSize: 20,
current: 1,
defaultCurrent: 1,
defaultPageSize: 20,
showQuickJumper: true,
onChange: this.pageChange,
showSizeChanger: true,
onShowSizeChange: this.showSizeChange,
pageSizeOptions: ['10', '20', '50', '100'],
total: 0, // 小区总数
showTotal: total => `总条数: ${total}`,
totStCnstArea: '', // 房屋总面积 平方米
totUnits: '', // 总门牌数 幢
totHous: '', // 总分户数 户
}
this.tbl = 'tbl_community'
},
changeTbl(tbl) { changeTbl(tbl) {
this.tbl = tbl this.tbl = tbl
if(this.checkedKeys.length > 0) { if(this.checkedKeys.length > 0) {
...@@ -320,12 +351,13 @@ export default { ...@@ -320,12 +351,13 @@ export default {
}).then(res => { }).then(res => {
let keyType = '' let keyType = ''
if (res.code == 200) { if (res.code == 200) {
this.currentSeeId = res.data.content
switch (this.tbl) { switch (this.tbl) {
case 'tbl_community': case 'tbl_community':
if(res.data.content.sectId_in == '') { if(res.data.content.sectId_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListSect(res.data.content) this.getListSect(this.currentSeeId)
} }
break break
...@@ -333,7 +365,7 @@ export default { ...@@ -333,7 +365,7 @@ export default {
if(res.data.content.unit_in == '') { if(res.data.content.unit_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListMpz(res.data.content) this.getListMpz(this.currentSeeId)
} }
break break
...@@ -341,7 +373,7 @@ export default { ...@@ -341,7 +373,7 @@ export default {
if(res.data.content.cspId_in == '') { if(res.data.content.cspId_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListWy(res.data.content) this.getListWy(this.currentSeeId)
} }
break break
...@@ -349,7 +381,7 @@ export default { ...@@ -349,7 +381,7 @@ export default {
if(res.data.content.hocId_in == '') { if(res.data.content.hocId_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListYwh(res.data.content) this.getListYwh(this.currentSeeId)
} }
break break
...@@ -385,7 +417,7 @@ export default { ...@@ -385,7 +417,7 @@ export default {
if(res.data.content.sectId_in == '') { if(res.data.content.sectId_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListSect(res.data.content) this.getListSect(this.currentSeeId)
} }
break break
...@@ -393,7 +425,7 @@ export default { ...@@ -393,7 +425,7 @@ export default {
if(res.data.content.unit_in == '') { if(res.data.content.unit_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListMpz(res.data.content) this.getListMpz(this.currentSeeId)
} }
break break
...@@ -401,7 +433,7 @@ export default { ...@@ -401,7 +433,7 @@ export default {
if(res.data.content.cspId_in == '') { if(res.data.content.cspId_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListWy(res.data.content) this.getListWy(this.currentSeeId)
} }
break break
...@@ -409,7 +441,7 @@ export default { ...@@ -409,7 +441,7 @@ export default {
if(res.data.content.hocId_in == '') { if(res.data.content.hocId_in == '') {
this.clearAllTableData() this.clearAllTableData()
} else { } else {
this.getListYwh(res.data.content) this.getListYwh(this.currentSeeId)
} }
break break
...@@ -424,13 +456,26 @@ export default { ...@@ -424,13 +456,26 @@ export default {
}, },
onCheck(keys, node) { onCheck(keys, node) {
// console.log(keys, node.node.$children.length) // console.log(keys, node.node.$children.length)
// this.checkedKeys = [] this.checkedKeys = []
for(let i = 0; i < keys.length; i++) { for(let i = 0; i < keys.length; i++) {
console.log(keys[i]) console.log(keys[i])
this.checkedKeys.push(keys[i]) this.checkedKeys.push(keys[i])
} }
// cf this.$ajax.get({
url: this.$api.GET_LABEL_DETAIL.replace('{id}', this.checkedKeys[0]),
}).then(res => {
if (res.code == 200) {
// console.log(res.data.content.tableName);
this.tbl = res.data.content.tableName
}
})
if(this.checkedKeys.length > 0) {
this.disableTree = true
}
this.searchXXXByLabel()
}, },
getLabelList() { getLabelList() {
...@@ -468,7 +513,26 @@ export default { ...@@ -468,7 +513,26 @@ export default {
pageChange(page){ //分页切换 pageChange(page){ //分页切换
this.pagination.pageNo = page this.pagination.pageNo = page
this.pagination.current = page this.pagination.current = page
this.getList() switch (this.tbl) {
case 'tbl_community':
this.getListSect(this.currentSeeId)
break
case 'tbl_building':
this.getListMpz(this.currentSeeId)
break
case 'tbl_prop_company':
this.getListWy(this.currentSeeId)
break
case 'tbl_industry_council':
this.getListYwh(this.currentSeeId)
break
default:
break
}
}, },
showSizeChange(current, size) { //每页条数切换 showSizeChange(current, size) { //每页条数切换
this.pagination.pageNo = 1 this.pagination.pageNo = 1
......
...@@ -114,31 +114,31 @@ ...@@ -114,31 +114,31 @@
</a-form-item> </a-form-item>
<a-form-item v-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'select' && checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).isfromUrl == false"> <a-form-item v-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'select' && checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).isfromUrl == false">
<a-select style="width: 100px" placeholder='请选择' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: item.val, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]"> <a-select style="width: 120px" placeholder='请选择' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: item.val, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option v-for="(item1, index) in JSON.parse(availableKeyList.find(item=>item.tblKey == infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).selVals)" :key='item1' :value="item1">{{index}}</a-select-option> <a-select-option v-for="(item1, index) in JSON.parse(availableKeyList.find(item=>item.tblKey == infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).selVals)" :key='item1' :value="item1">{{index}}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'select' && checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).isfromUrl == true"> <a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'select' && checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).isfromUrl == true">
<a-select style="width: 100px" placeholder='请选择' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: item.val, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]"> <a-select style="width: 120px" placeholder='请选择' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: item.val, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option v-for="(item1, index) in sectOptions" :key='index' :value="item1.streetId">{{item1.name}}</a-select-option> <a-select-option v-for="(item1, index) in sectOptions" :key='index' :value="item1.streetId">{{item1.name}}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'str'"> <a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'str'">
<a-input style="width: 100px" placeholder='请输入' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]"></a-input> <a-input style="width: 120px" placeholder='请输入' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]"></a-input>
</a-form-item> </a-form-item>
<a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'num'"> <a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'num'">
<a-input-number style="width: 100px" placeholder='请输入' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]"></a-input-number> <a-input-number style="width: 120px" placeholder='请输入' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]"></a-input-number>
</a-form-item> </a-form-item>
<a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'date'"> <a-form-item v-else-if="checkIfSelectOptionAppears(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index), infoSettingForm.getFieldValue('key-' + index66 +'-' + index)).dataType == 'date'">
<a-date-picker style="width: 100px" placeholder='请选择' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]"></a-date-picker> <a-date-picker style="width: 120px" placeholder='请选择' v-decorator="['inputOne-' + index66 +'-' + index,{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]"></a-date-picker>
</a-form-item> </a-form-item>
<a-form-item v-if="infoSettingForm.getFieldValue('codition-'+index66 +'-' + index) == 'btw'"> <a-form-item v-if="infoSettingForm.getFieldValue('codition-'+index66 +'-' + index) == 'btw'">
<a-input style="width: 100px" placeholder='请输入' v-decorator="['inputTwo-' + index66 +'-' + index,{initialValue: getInitialValueTwo(item.val), validateTrigger:'blur',rules: []}]"></a-input> <a-input style="width: 120px" placeholder='请输入' v-decorator="['inputTwo-' + index66 +'-' + index,{initialValue: getInitialValueTwo(item.val), validateTrigger:'blur',rules: []}]"></a-input>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
......
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