| | |
| | | <div slot="title" class="slot-title"> |
| | | <p>请选择想要推送的字段</p> |
| | | <div class="right"> |
| | | <el-checkbox v-model="allFieldChecked"></el-checkbox> |
| | | <el-checkbox v-model="allFieldChecked" @change="allCheckChange"></el-checkbox> |
| | | </div> |
| | | </div> |
| | | <div class="check-area" v-for="configObj in tempPushSet" :key="configObj.id"> |
| | |
| | | </div> |
| | | <div class="flex-box flex-wrap"> |
| | | <div class="param flex-box" v-for="param in configObj.children" :key="param.id"> |
| | | <el-checkbox v-model="param.checked"></el-checkbox> |
| | | <el-checkbox v-model="param.checked" @change="checkChildren"></el-checkbox> |
| | | <span class="param-name">{{param.name}}</span> |
| | | <el-input |
| | | v-model="param.alias" |
| | |
| | | openPushSetDialog() { |
| | | this.pushFieldDialog = true; |
| | | this.tempPushSet = JSON.parse(JSON.stringify(this.taskEditData.push_set)); |
| | | this.checkFlag() |
| | | }, |
| | | checkFlag(){ |
| | | // debugger |
| | | let flag = true |
| | | this.tempPushSet.forEach(item => { |
| | | if (item.checked==false) { |
| | | flag = false |
| | | } |
| | | }); |
| | | this.allFieldChecked=flag |
| | | }, |
| | | checkChildren(val){ |
| | | console.log(val,12121); |
| | | if (val==false) { |
| | | this.allFieldChecked=false |
| | | } else if(val==true && this.allFieldChecked==false){ |
| | | this.$nextTick( ()=> { |
| | | this.checkFlag() |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | varifyField(param) { |
| | | var reg = /^[A-Za-z]+[0-9-_]?$/; |
| | |
| | | }, |
| | | canclePushFieldSet() { |
| | | this.pushFieldDialog = false; |
| | | }, |
| | | allCheckChange(val){ |
| | | |
| | | this.tempPushSet.forEach(function (item) { |
| | | item.checked= val |
| | | item.children.forEach(function (child) { |
| | | child.checked= val |
| | | }) |
| | | }) |
| | | }, |
| | | submitPushFieldSet() { |
| | | let flag = false; |
| | |
| | | this.pushFieldDialog = false; |
| | | }, |
| | | toggleConfigCheck(configObj) { |
| | | |
| | | configObj.children.forEach(child => { |
| | | child.checked = configObj.checked |
| | | }) |
| | | this.checkFlag() |
| | | }, |
| | | getPushFields() { |
| | | let _this = this; |