Commit 275b6ef5 authored by levante's avatar levante

标签支持分组重命名

parent 44326e30
......@@ -3,25 +3,25 @@
<div>
<a-row>
<!-- <a-col :span='1' v-if="triggerType == 'create'"> -->
<a-col :span='16'>
<!-- <a-col :span='16'>
<a-row>
<a-col :span='1'>
<div class="detailOperations">
<div class="detailOperations"> -->
<a-button @click="backPage"> 返回 </a-button>
</div>
</a-col>
<a-col :span='1' v-if="triggerType !== 'create' && triggerType !== 'loadParentLabel'" :offset='1'>
<a-button type='danger' @click="deleteLabel(labelId)">删除</a-button>
<!-- </div>
</a-col>
<a-col :span='1' :offset='1'>
<a-col :span='1' v-if="triggerType !== 'create' && triggerType !== 'loadParentLabel'" :offset='1'> -->
<a-button v-if="triggerType !== 'create' && triggerType !== 'loadParentLabel'" :offset='1' type='danger' @click="deleteLabel(labelId)">删除</a-button>
<!-- </a-col>
<a-col :span='1' :offset='1'> -->
<a-button type='primary' @click="preview()">预览</a-button>
</a-col>
<a-col :span='1' :offset='1'>
<!-- </a-col>
<a-col :span='1' :offset='1'> -->
<a-button type='primary' @click="save()">保存</a-button>
</a-col>
<!-- </a-col>
<a-col :span='18'></a-col>
</a-row>
</a-col>
</a-row> -->
<!-- </a-col> -->
</a-row>
</div>
<a-divider type='horizontal' />
......@@ -79,7 +79,7 @@
<!-- {{index66}} -->
<a-row type='flex' style="font-weight: bold; font-size: 16px; margin-bottom: 20px; border-bottom: 1px solid lightgrey" align='middle'>
<a-col :span='21'>
<span style="font-weight: bold">条件分组{{index66+1}}</span>
<span style="font-weight: bold">{{item66.serial}}</span>
</a-col>
<a-col :span='3' v-if="index66 !== 0">
<a-button style="color: darkred" type="link" @click="delGroup(index66)"><a-icon type="delete" />删除分组 </a-button>
......@@ -95,9 +95,9 @@
<a-select-option value='ne'></a-select-option>
</a-select>
</a-form-item>
<!-- <a-form-item v-if="index == 0">
<a-input style="width: 80px" placeholder='分组名' v-decorator="['groupName-' + index66,{initialValue: getInitialValueTwo(item.val), validateTrigger:'blur',rules: []}]"></a-input>
</a-form-item> -->
<a-form-item v-if="index == 0">
<a-input style="width: 80px" placeholder='分组名' v-decorator="['groupName-' + index66,{initialValue: item66.serial, validateTrigger:'blur',rules: []}]"></a-input>
</a-form-item>
</a-row>
<a-form-item v-if="index !== 0">
......@@ -564,7 +564,7 @@ export default {
})
innerResult.push({
'serial': 1,
'serial': formData['groupName-' + i],
'relation': !!formData['relationWithGroup-' + i + '-0']? formData['relationWithGroup-' + i + '-0']: 'and',
'labelSelConditionList': rowList
})
......@@ -596,11 +596,9 @@ 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', [
...this.loopContent.data, { serial: 1, relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] }
...this.loopContent.data, { serial: '新分组', relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] }
])
this.$forceUpdate()
......@@ -751,7 +749,7 @@ export default {
this.deleteVisible = !this.deleteVisible
},
resetFormFields() {
this.loopContent.data = [ { serial: 1, relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] } ]
this.loopContent.data = [ { serial: '新分组', relation: 'and', labelSelConditionList: [ { key: '', val: '', tableName: '', codition: 'eq', selMet: '', relation: '' } ] } ]
this.resultList = []
this.labelForm.resetFields()
......@@ -819,7 +817,7 @@ export default {
// relationWithGroup-0-0
innerResult.push({
'serial': 1,
'serial': formData['groupName-' + i],
'relation': !!formData['relationWithGroup-' + i + '-0']? formData['relationWithGroup-' + i + '-0']: 'and',
'labelSelConditionList': rowList
})
......@@ -893,7 +891,7 @@ export default {
})
innerResult.push({
'serial': 1,
'serial': formData['groupName-' + i],
'relation': !!formData['relationWithGroup-' + i + '-0']? formData['relationWithGroup-' + i + '-0']: 'and',
'labelSelConditionList': rowList
})
......
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