Commit 96ff51c8 authored by 程卓's avatar 程卓
parents 59227dc3 8d43baf5
......@@ -3,16 +3,20 @@
<div class="routerWapper">
<!-- {{checkedKeys}} -->
<div class="layoutMargin layoutPadding">
<!-- {{tbl}} -->
<a-row>
<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;">
标签筛选条件
<a-button type='link' @click="resetLabel">重置</a-button>
</span>
<a-tree
:disabled='disableTree'
@check='onCheck'
checkable
:tree-data="treeData"
:replace-fields="replaceFields"
:checkedKeys="checkedKeys"
/>
</a-col>
......@@ -22,8 +26,9 @@
<a-col :span="!!leftPanelShow ? 20 : 24" :style="!!leftPanelShow? `padding-left: 10px; border-left:1px solid #ccc;`:`padding-left: 10px;`">
<!-- <p class="gayLine noline" /> -->
<div class="portalTableOperates">
<a-button type='primary' @click="searchXXXByLabel">查询</a-button>
<a-tabs :default-active-key="tbl" @change="changeTbl">
<!-- <a-button type='primary' @click="resetLabel">重置</a-button> -->
<!-- <a-button type='primary' @click="searchXXXByLabel">查询</a-button> -->
<a-tabs :activeKey='tbl' @change="changeTbl">
<a-tab-pane key="tbl_community" tab="小区">
<TAM ref="childTab" :tableData="tableData_sect" :pagination="pagination" :tbl="tbl" />
</a-tab-pane>
......@@ -56,6 +61,7 @@ export default {
},
data() {
return {
disableTree: false,
treeData,
tbl: 'tbl_community',
selectedKeys: [],
......@@ -266,7 +272,8 @@ export default {
type: '', // 邻里小汇
isBeforeTwoThousand: '',
twoThousandValue: '',
personalizedKey: ''
personalizedKey: '',
currentSeeId: null
}
},
beforeCreate() { // 页面进来创建form
......@@ -308,6 +315,30 @@ export default {
}
},
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) {
this.tbl = tbl
if(this.checkedKeys.length > 0) {
......@@ -320,12 +351,13 @@ export default {
}).then(res => {
let keyType = ''
if (res.code == 200) {
this.currentSeeId = res.data.content
switch (this.tbl) {
case 'tbl_community':
if(res.data.content.sectId_in == '') {
this.clearAllTableData()
} else {
this.getListSect(res.data.content)
this.getListSect(this.currentSeeId)
}
break
......@@ -333,7 +365,7 @@ export default {
if(res.data.content.unit_in == '') {
this.clearAllTableData()
} else {
this.getListMpz(res.data.content)
this.getListMpz(this.currentSeeId)
}
break
......@@ -341,7 +373,7 @@ export default {
if(res.data.content.cspId_in == '') {
this.clearAllTableData()
} else {
this.getListWy(res.data.content)
this.getListWy(this.currentSeeId)
}
break
......@@ -349,7 +381,7 @@ export default {
if(res.data.content.hocId_in == '') {
this.clearAllTableData()
} else {
this.getListYwh(res.data.content)
this.getListYwh(this.currentSeeId)
}
break
......@@ -385,7 +417,7 @@ export default {
if(res.data.content.sectId_in == '') {
this.clearAllTableData()
} else {
this.getListSect(res.data.content)
this.getListSect(this.currentSeeId)
}
break
......@@ -393,7 +425,7 @@ export default {
if(res.data.content.unit_in == '') {
this.clearAllTableData()
} else {
this.getListMpz(res.data.content)
this.getListMpz(this.currentSeeId)
}
break
......@@ -401,7 +433,7 @@ export default {
if(res.data.content.cspId_in == '') {
this.clearAllTableData()
} else {
this.getListWy(res.data.content)
this.getListWy(this.currentSeeId)
}
break
......@@ -409,7 +441,7 @@ export default {
if(res.data.content.hocId_in == '') {
this.clearAllTableData()
} else {
this.getListYwh(res.data.content)
this.getListYwh(this.currentSeeId)
}
break
......@@ -424,13 +456,26 @@ export default {
},
onCheck(keys, node) {
// console.log(keys, node.node.$children.length)
// this.checkedKeys = []
this.checkedKeys = []
for(let i = 0; i < keys.length; i++) {
console.log(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() {
......@@ -468,7 +513,26 @@ export default {
pageChange(page){ //分页切换
this.pagination.pageNo = 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) { //每页条数切换
this.pagination.pageNo = 1
......
......@@ -114,31 +114,31 @@
</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-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>
</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-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>
</a-form-item>
<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 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 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 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>
......
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