feat: 过滤条件格式修改

This commit is contained in:
fit2cloud-chenyw 2021-04-19 11:51:12 +08:00
parent afca57c459
commit e2a5a2f440
3 changed files with 29 additions and 6 deletions

View File

@ -47,7 +47,7 @@ export default {
},
methods: {
changeValue(value) {
this.inDraw && this.$emit('set-condition-value', { component: this.element, value: value, operator: this.operator })
this.inDraw && this.$emit('set-condition-value', { component: this.element, value: [value], operator: this.operator })
}
}
}

View File

@ -44,6 +44,7 @@ class MySelectImpl extends DrawWidgetService {
Object.assign(options, { name: 'mySelectWidget' })
super(options)
this.filterDialog = true
this.showSwitch = true
}
initLeftPanel() {

View File

@ -106,14 +106,17 @@
<el-col :span="8">
<div class="filter-options-left">
<el-switch
active-text="单选"
inactive-text="多选"
v-if="widget.showSwitch"
v-model="componentInfo.options.attrs.multiple"
active-text="多选"
inactive-text="单选"
/>
</div>
</el-col>
<el-col :span="16"><div class="filter-options-right">
<el-checkbox disabled>备选项1</el-checkbox>
<el-checkbox disabled>备选项</el-checkbox>
<el-checkbox v-model="customRange"><span> 自定义控制范围 </span> </el-checkbox>
<i :class="{'i-filter-active': customRange, 'i-filter-inactive': !customRange}" class="el-icon-setting i-filter" @click="showFilterRange" />
<!-- <el-checkbox disabled>备选项</el-checkbox> -->
</div>
</el-col>
@ -182,7 +185,8 @@ export default {
},
selectField: [],
widget: null,
fieldValues: []
fieldValues: [],
customRange: false
}
},
@ -329,6 +333,12 @@ export default {
closeItem(tag) {
const index = tag.index
this.selectField.splice(index, 1)
},
showFilterRange() {
//
if (!this.customRange) {
return
}
}
}
}
@ -461,5 +471,17 @@ export default {
width: 100%;
height: 100%;
}
.i-filter {
text-align: center;
margin-left: 5px;
margin-top: 1px;
}
.i-filter-inactive {
color: #9ea6b2!important;
cursor: not-allowed!important;
}
.i-filter-active {
cursor: pointer!important;
}
</style>