Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复动态分组保存multilike值不为数组的问题 #4345

Merged
merged 1 commit into from
Jun 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/ui/src/views/custom-query/define.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<label class="userapi-label">
{{$t("CustomQuery['查询名称']")}}<span class="color-danger"> * </span>
</label>
<input type="text" class="cmdb-form-input"
<input type="text" class="cmdb-form-input"
v-model.trim="name"
:name="$t('CustomQuery[\'查询名称\']')"
:disabled="!authority.includes('update')"
Expand Down Expand Up @@ -144,9 +144,9 @@
</bk-button>
</div>
</div>
<v-preview ref="preview"
v-if="isPreviewShow"
:apiParams="apiParams"
<v-preview ref="preview"
v-if="isPreviewShow"
:apiParams="apiParams"
:attribute="object"
:tableHeader="attribute.selected"
@close="isPreviewShow = false">
Expand Down Expand Up @@ -332,6 +332,12 @@
operator: property.operator,
value: property.value === 'true'
})
} else if (property.operator === '$multilike') {
param.condition.push({
field: property.propertyId,
operator: property.operator,
value: property.value.split('\n').filter(str => str.trim().length).map(str => str.trim())
})
} else {
let operator = property.operator
let value = property.value
Expand Down