Commit f279b26b authored by Gakki's avatar Gakki

so far

parent 259fb578
......@@ -22,8 +22,8 @@
</a-col>
<a-col :span='1'></a-col>
<a-col :span='18' class="layoutMargin layoutPadding">
<RightPanel v-if="currentState == 'create'" :trigger-type='currentState' />
<RightPanel v-else-if="currentState == 'loadChildLabel'" :trigger-type='currentState' :label-id='labelId' />
<RightPanel v-if="currentState == 'create'" :trigger-type='currentState' @finish='getFinishState' />
<RightPanel v-else-if="currentState == 'loadChildLabel'" :trigger-type='currentState' :label-id='labelId' @finish='getFinishState'/>
<EmptyRightPanel v-else />
</a-col>
</a-row>
......@@ -61,6 +61,11 @@ export default {
this.getLabelList()
},
methods: {
getFinishState(state) {
if(state == true) {
this.currentState = null
}
},
getLabelList() {
this.$ajax.get({
url: this.$api.GET_LABEL_LIST,
......
<template>
<div class="routerWapper">
<div>
{{triggerType}} - {{labelId}}
{{triggerType}} - {{labelId}} - {{finish}}
<a-row>
<a-col :span='1' v-if="triggerType == 'create'">
<a-button type='default' @click="backPage()">返回</a-button>
......@@ -77,16 +77,15 @@
<a-select-option value='like'>模糊</a-select-option>
</a-select>
</a-form-item>
{{loopContent.data.length}}
{{index}}
<a-form-item>
<a-icon v-if="index+1 == loopContent.data.length" theme='filled' style="color:lightgreen;" type="plus-circle" @click="addRow()" />
<a-icon v-if="index+1 == loopContent.data.length" theme='filled' style="color:red; margin-left: 5px" type="minus-circle" @click="deleteRow(index)" />
</a-form-item>
</div>
</a-form>
<a-button type='link' v-if="loopContent.data.length == 0" @click="addInitRow()">新增配置</a-button>
<a-modal :visible='deleteVisible' @ok='handleDeleteOk' @cancel='handleCancelOk'>
确定删除该标签吗?
确定删除该标签{{labelId}}吗?
</a-modal>
</div>
</template>
......@@ -106,7 +105,8 @@ export default {
}]
},
jsonData: [],
deleteVisible: false
deleteVisible: false,
finish: false
}
},
mounted() {
......@@ -152,6 +152,14 @@ export default {
backPage(){ // 返回按钮
this.$router.back()
},
addInitRow() {
this.loopContent.data.push({
key: '',
codition: 'equels',
val: '',
selMet: ''
})
},
addRow() {
this.loopContent.data.push({
key: '',
......@@ -180,12 +188,13 @@ export default {
this.deleteVisible = !this.deleteVisible
},
resetFormFields() {
this.loopContent.data = [{
key: '',
codition: 'equels',
val: '',
selMet: ''
}]
// this.loopContent.data = [{
// key: '',
// codition: 'equels',
// val: '',
// selMet: ''
// }]
this.loopContent.data = []
},
save() {
this.jsonData = []
......@@ -209,6 +218,8 @@ export default {
}
})
this.resetFormFields()
this.finish = true
this.$emit('finish', this.finish)
},
},
}
......
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