Commit 9ef682ef authored by levante's avatar levante

标签完成

parent 1940cb77
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
bordered bordered
> >
<span slot="action" slot-scope="text, record"> <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-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 class="ant-dropdown-link" href="#">| 更多 <a-icon type="down" /></a>
<a-menu slot="overlay"> <a-menu slot="overlay">
...@@ -108,6 +108,28 @@ export default { ...@@ -108,6 +108,28 @@ export default {
}, },
}, },
methods: { 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) { //重新赋值选中项数组 selKeysNew(val) { //重新赋值选中项数组
this.selKeysList = val this.selKeysList = val
}, },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<a-divider type='horizontal' /> <a-divider type='horizontal' />
<div style="height: 580px; overflow-y: scroll"> <div style="height: 580px; overflow-y: scroll">
<a-form :form='labelForm'> <a-form :form='labelForm'>
<!-- {{loopContent}} --> <!-- {{loopContent.data}} -->
<a-form-item label='标签名' :label-col="{span:3}" :wrapper-col="{span:15}"> <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-input placeholder='请输入标签名' v-decorator="['labelName',{validateTrigger:'blur', initialValue: jsonData.labelName?jsonData.labelName: '', rules: [{required: true, message: '请填写标签名!'}]}]"></a-input>
</a-form-item> </a-form-item>
...@@ -384,6 +384,7 @@ export default { ...@@ -384,6 +384,7 @@ export default {
labelId: { labelId: {
handler: function(newV, oldV) { handler: function(newV, oldV) {
console.log(222) console.log(222)
this.initKeyList()
this.resetFormFields() this.resetFormFields()
this.getLabelDetail() this.getLabelDetail()
}, },
...@@ -421,13 +422,15 @@ export default { ...@@ -421,13 +422,15 @@ export default {
break break
} }
console.log(tbRealName);
let optionsPush = [] let optionsPush = []
for (let i = 0; i < options.length; i++) { for (let i = 0; i < options.length; i++) {
if(options[i].tableName == tbRealName) { if(options[i].tableName == tbRealName) {
optionsPush.push(options[i]) optionsPush.push(options[i])
} }
} }
console.log(optionsPush);
return optionsPush return optionsPush
}, },
handleResultOk() { handleResultOk() {
...@@ -488,6 +491,9 @@ export default { ...@@ -488,6 +491,9 @@ export default {
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success('保存成功!') this.$message.success('保存成功!')
this.resetFormFields()
this.finish = true
this.$emit('finish', this.finish)
} else { } else {
this.$message.error('保存失败!') this.$message.error('保存失败!')
} }
...@@ -503,18 +509,21 @@ export default { ...@@ -503,18 +509,21 @@ export default {
const groupTotal = Object.keys(this.loopContent.data).length const groupTotal = Object.keys(this.loopContent.data).length
console.log(groupTotal) console.log(groupTotal)
console.log(this.loopContent) console.log(this.loopContent)
this.loopContent.data.push( // this.loopContent.data.push(
{ 'serial': '1', 'relation': 'and', 'labelSelConditionList': [ { 'key': '', 'val': '', 'tableName': '', 'codition': 'eq', 'selMet': '', 'relation': '' } ] } // { serial: 1, relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] }
) // )
// Vue.set(this.loopContent.data, ''+(groupTotal+1), [ Vue.set(this.loopContent, 'data', [
// { 'serial': '1', 'relation': 'and', 'labelSelConditionList': [ { 'key': '', 'val': '', 'codition': 'eq', 'selMet': '', 'relation': '' } ] } ...this.loopContent.data, { serial: 1, relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] }
// ]) ])
this.$forceUpdate()
console.log(JSON.stringify(this.loopContent)) console.log(JSON.stringify(this.loopContent))
}, },
delGroup(key) { delGroup(key) {
console.log(key) console.log(key)
Vue.delete(this.loopContent.data, key) Vue.delete(this.loopContent.data, key)
this.$forceUpdate()
}, },
initKeyList() { initKeyList() {
// 获取当前的对象 // 获取当前的对象
...@@ -623,11 +632,13 @@ export default { ...@@ -623,11 +632,13 @@ export default {
relation: 'and', relation: 'and',
selMet: '' selMet: ''
}) })
this.$forceUpdate()
console.log(this.loopContent) console.log(this.loopContent)
}, },
deleteRow(whichGroup, whichRow) { deleteRow(whichGroup, whichRow) {
console.log(whichGroup, whichRow) console.log(whichGroup, whichRow)
this.loopContent.data[whichGroup].labelSelConditionList.splice(whichRow, 1) this.loopContent.data[whichGroup].labelSelConditionList.splice(whichRow, 1)
this.$forceUpdate()
// console.log(JSON.stringify(this.loopContent.data)) // console.log(JSON.stringify(this.loopContent.data))
// console.log(index) // console.log(index)
// this.loopContent.data.splice(index, 1) // 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