Commit 9ef682ef authored by levante's avatar levante

标签完成

parent 1940cb77
......@@ -19,7 +19,7 @@
bordered
>
<span slot="action" slot-scope="text, record">
<span class="actionBtn" @click="$parent.toView(record)">查看 </span>
<span class="actionBtn" @click="toView(tbl, record)">查看 </span>
<a-dropdown :trigger="['click']" v-if="customKeyEnable == 'true' || $route.name=='basicInfo' || $route.name=='propertyInfo' || $route.name=='indCous'">
<a class="ant-dropdown-link" href="#">| 更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
......@@ -108,6 +108,28 @@ export default {
},
},
methods: {
toView(tbl, record) {
switch (tbl) {
case 'tbl_community':
this.$router.push({path: `/houseData/basicInfo/${record.id}`, query: {id: record.id, name: record.cspName}})
break;
case 'tbl_building':
this.$router.push({path: `/houseData/buildings/${record.id}`})
break;
case 'tbl_prop_company':
this.$router.push({path: `/houseData/propertyInfo/${record.id}`, query: {id: record.id, name: record.cspName }})
break;
case 'tbl_industry_council':
this.$router.push({path: `/houseData/indCou/${record.id}`, query: {id: record.id}})
break;
default:
break;
}
},
selKeysNew(val) { //重新赋值选中项数组
this.selKeysList = val
},
......
......@@ -23,7 +23,7 @@
<a-divider type='horizontal' />
<div style="height: 580px; overflow-y: scroll">
<a-form :form='labelForm'>
<!-- {{loopContent}} -->
<!-- {{loopContent.data}} -->
<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>
......@@ -384,6 +384,7 @@ export default {
labelId: {
handler: function(newV, oldV) {
console.log(222)
this.initKeyList()
this.resetFormFields()
this.getLabelDetail()
},
......@@ -421,13 +422,15 @@ export default {
break
}
console.log(tbRealName);
let optionsPush = []
for (let i = 0; i < options.length; i++) {
if(options[i].tableName == tbRealName) {
optionsPush.push(options[i])
}
}
console.log(optionsPush);
return optionsPush
},
handleResultOk() {
......@@ -488,6 +491,9 @@ export default {
}).then(res => {
if (res.code == 200) {
this.$message.success('保存成功!')
this.resetFormFields()
this.finish = true
this.$emit('finish', this.finish)
} else {
this.$message.error('保存失败!')
}
......@@ -503,18 +509,21 @@ export default {
const groupTotal = Object.keys(this.loopContent.data).length
console.log(groupTotal)
console.log(this.loopContent)
this.loopContent.data.push(
{ 'serial': '1', 'relation': 'and', 'labelSelConditionList': [ { 'key': '', 'val': '', 'tableName': '', 'codition': 'eq', 'selMet': '', 'relation': '' } ] }
)
// Vue.set(this.loopContent.data, ''+(groupTotal+1), [
// { 'serial': '1', 'relation': 'and', 'labelSelConditionList': [ { 'key': '', 'val': '', 'codition': 'eq', 'selMet': '', 'relation': '' } ] }
// ])
// this.loopContent.data.push(
// { serial: 1, relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] }
// )
Vue.set(this.loopContent, 'data', [
...this.loopContent.data, { serial: 1, relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] }
])
this.$forceUpdate()
console.log(JSON.stringify(this.loopContent))
},
delGroup(key) {
console.log(key)
Vue.delete(this.loopContent.data, key)
this.$forceUpdate()
},
initKeyList() {
// 获取当前的对象
......@@ -623,11 +632,13 @@ export default {
relation: 'and',
selMet: ''
})
this.$forceUpdate()
console.log(this.loopContent)
},
deleteRow(whichGroup, whichRow) {
console.log(whichGroup, whichRow)
this.loopContent.data[whichGroup].labelSelConditionList.splice(whichRow, 1)
this.$forceUpdate()
// console.log(JSON.stringify(this.loopContent.data))
// console.log(index)
// this.loopContent.data.splice(index, 1)
......
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