<script lang="ts" setup>
|
import { reactive, toRefs, watch } from 'vue';
|
|
import { useMessage } from '@jnpf/hooks';
|
import { JnpfRelationForm } from '@jnpf/ui';
|
import { formatToDateTime, isEmpty } from '@jnpf/utils';
|
|
import { useDebounceFn } from '@vueuse/core';
|
import { cloneDeep } from 'lodash-es';
|
|
import { getDataInterfaceRes } from '#/api/systemData/dataInterface';
|
import { getDictionaryDataSelector } from '#/api/systemData/dictionary';
|
import { dyOptionsList } from '#/components/FormGenerator/src/helper/config';
|
import { orgSysField, positionSysField, userSysField } from '#/utils/constants/organize';
|
import { simpleSourceTypeOptions } from '#/utils/define';
|
import { getParamList } from '#/utils/jnpf';
|
|
interface State {
|
conditionList: any;
|
fieldOptions: any[];
|
matchLogic: any;
|
}
|
|
const props = defineProps({
|
bordered: { type: Boolean, default: false },
|
isSuperQuery: { type: Boolean, default: false },
|
defaultAddEmpty: { type: Boolean, default: false },
|
// 是否展示 值类型 下拉框
|
showFieldValueType: { type: Boolean, default: false },
|
valueFieldOptions: { type: Array, default: () => [] },
|
compact: { type: Boolean, default: false },
|
// 是否动态 值类型 options
|
isCustomFieldValueType: { type: Boolean, default: false },
|
});
|
const emit = defineEmits(['confirm']);
|
|
defineExpose({
|
init,
|
confirm,
|
updateConditionList,
|
});
|
|
const { createMessage } = useMessage();
|
const notSupportList = new Set([
|
'alert',
|
'button',
|
'colorPicker',
|
'editor',
|
'link',
|
'popupAttr',
|
'relationFormAttr',
|
'sign',
|
'signature',
|
'table',
|
'text',
|
'uploadFile',
|
'uploadImg',
|
]);
|
const emptyChildItem = {
|
field: '',
|
symbol: '',
|
jnpfKey: '',
|
fieldValueType: !props.showFieldValueType || props.isCustomFieldValueType ? 2 : 1,
|
fieldValue: undefined,
|
fieldValueJnpfKey: '',
|
cellKey: Date.now(),
|
};
|
const emptyItem = { logic: 'and', groups: [emptyChildItem] };
|
const logicOptions = [
|
{ id: 'and', fullName: '且' },
|
{ id: 'or', fullName: '或' },
|
];
|
const baseSymbolOptions = [
|
{ id: '==', fullName: '等于' },
|
{ id: '<>', fullName: '不等于' },
|
{ id: 'like', fullName: '包含' },
|
{ id: 'notLike', fullName: '不包含' },
|
{ id: 'null', fullName: '为空' },
|
{ id: 'notNull', fullName: '不为空' },
|
{ id: 'in', fullName: '包含任意一个' },
|
{ id: 'notIn', fullName: '不包含任意一个' },
|
];
|
const rangeSymbolOptions = [
|
{ id: '>=', fullName: '大于等于' },
|
{ id: '>', fullName: '大于' },
|
{ id: '==', fullName: '等于' },
|
{ id: '<=', fullName: '小于等于' },
|
{ id: '<', fullName: '小于' },
|
{ id: '<>', fullName: '不等于' },
|
{ id: 'between', fullName: '介于' },
|
{ id: 'null', fullName: '为空' },
|
{ id: 'notNull', fullName: '不为空' },
|
];
|
const selectSymbolOptions = [
|
{ id: '==', fullName: '等于' },
|
{ id: '<>', fullName: '不等于' },
|
{ id: 'in', fullName: '包含任意一个' },
|
{ id: 'notIn', fullName: '不包含任意一个' },
|
{ id: 'null', fullName: '为空' },
|
{ id: 'notNull', fullName: '不为空' },
|
];
|
const switchSymbolOptions = [
|
{ id: '==', fullName: '等于' },
|
{ id: '<>', fullName: '不等于' },
|
];
|
const locationSymbolOptions = [
|
{ id: 'like', fullName: '包含' },
|
{ id: 'notLike', fullName: '不包含' },
|
{ id: 'null', fullName: '为空' },
|
{ id: 'notNull', fullName: '不为空' },
|
];
|
const relationFormSymbolOptions = [...switchSymbolOptions, { id: 'null', fullName: '为空' }, { id: 'notNull', fullName: '不为空' }];
|
const useRangeSymbolList = new Set(['calculate', 'createTime', 'dateCalculate', 'datePicker', 'inputNumber', 'modifyTime', 'rate', 'slider', 'timePicker']);
|
const useSelectSymbolList = new Set([
|
'areaSelect',
|
'cascader',
|
'checkbox',
|
'createUser',
|
'currOrganize',
|
'currPosition',
|
'groupSelect',
|
'modifyUser',
|
'organizeSelect',
|
'popupTableSelect',
|
'posSelect',
|
'radio',
|
'roleSelect',
|
'select',
|
'treeSelect',
|
'userSelect',
|
'usersSelect',
|
]);
|
const dateList = new Set(['createTime', 'dateCalculate', 'datePicker', 'modifyTime']);
|
const organizeList = ['organizeSelect', 'currOrganize'];
|
const positionList = ['posSelect', 'currPosition'];
|
const userList = ['userSelect', 'createUser', 'modifyUser'];
|
const useSwitchSymbolList = new Set(['switch']);
|
const useRelationFormSymbolList = new Set(['popupSelect', 'relationForm']);
|
const state = reactive<State>({
|
conditionList: [],
|
fieldOptions: [],
|
matchLogic: 'and',
|
});
|
const { conditionList, fieldOptions, matchLogic } = toRefs(state);
|
const onConfirm = useDebounceFn((data) => {
|
emit('confirm', data);
|
}, 300);
|
|
watch(
|
[() => state.conditionList, () => state.matchLogic],
|
() => {
|
props.compact && onConfirm({ conditionList: state.conditionList, matchLogic: state.matchLogic });
|
},
|
{ deep: true },
|
);
|
|
function init(data) {
|
updateConditionList(data);
|
const fieldOptions = data.fieldOptions.filter((o) => !notSupportList.has(o.__config__.jnpfKey));
|
state.fieldOptions = buildOptions(fieldOptions);
|
if (!state.conditionList.length && props.defaultAddEmpty) addGroup();
|
}
|
function updateConditionList(data) {
|
state.conditionList = cloneDeep(data.conditionList || []);
|
state.matchLogic = data.matchLogic || 'and';
|
}
|
function buildOptions(componentList) {
|
componentList.forEach((cur) => {
|
cur.disabled = false;
|
const config = cur.__config__;
|
if (dyOptionsList.includes(config.jnpfKey)) {
|
if (config.dataType === 'dictionary' && config.dictionaryType) {
|
cur.options = [];
|
getDictionaryDataSelector(config.dictionaryType).then((res) => {
|
cur.options = res.data.list;
|
});
|
}
|
if (config.dataType === 'dynamic' && config.propsUrl) {
|
cur.options = [];
|
const query = { paramList: getParamList(config.templateJson) };
|
getDataInterfaceRes(config.propsUrl, query).then((res) => {
|
cur.options = Array.isArray(res.data) ? res.data : [];
|
});
|
}
|
}
|
});
|
return componentList;
|
}
|
function onFieldChange(val, data, item, index, childIndex) {
|
item.cellKey = Date.now();
|
if (item.fieldValueType != 1) {
|
item.fieldValue = undefined;
|
item.fieldValueJnpfKey = '';
|
}
|
const newItem = cloneDeep(emptyChildItem);
|
for (const key of Object.keys(newItem)) {
|
newItem[key] = item[key];
|
}
|
if (!val) {
|
item.jnpfKey = '';
|
item.symbol = undefined;
|
item.disabled = false;
|
item.fieldName = '';
|
return;
|
}
|
item = { ...newItem, ...data };
|
const config = data.__config__;
|
if (item.jnpfKey != config.jnpfKey) item.symbol = undefined;
|
item.jnpfKey = data.__config__?.jnpfKey || '';
|
item.fieldName = data.__config__.label;
|
item.disabled = ['notNull', 'null'].includes(item.symbol);
|
item.multiple = ['in', 'notIn'].includes(item.symbol);
|
state.conditionList[index].groups[childIndex] = item;
|
}
|
function onSymbolChange(val, data, item) {
|
item.symbolName = val ? data.fullName : '';
|
item.fieldValue = undefined;
|
item.disabled = ['notNull', 'null'].includes(val);
|
item.multiple = ['in', 'notIn'].includes(val);
|
if (props.showFieldValueType && (['notNull', 'null'].includes(val) || (val == 'between' && dateList.has(item.jnpfKey)))) {
|
item.fieldValueType = !props.showFieldValueType || props.isCustomFieldValueType ? 2 : 1;
|
item.fieldValueJnpfKey = '';
|
}
|
}
|
function onParameterChange(item, val, data) {
|
if (!val) return (item.fieldLabel = '');
|
item.fieldLabel = data.fullName || '';
|
}
|
function addItem(index) {
|
state.conditionList[index].groups.push(cloneDeep(emptyChildItem));
|
}
|
function delItem(index, childIndex) {
|
state.conditionList[index].groups.splice(childIndex, 1);
|
if (!state.conditionList[index].groups.length) delGroup(index);
|
}
|
function addGroup() {
|
state.conditionList.push(cloneDeep(emptyItem));
|
}
|
function delGroup(index) {
|
state.conditionList.splice(index, 1);
|
}
|
function getSymbolOptions(jnpfKey) {
|
if (useSwitchSymbolList.has(jnpfKey)) return switchSymbolOptions;
|
if (useRelationFormSymbolList.has(jnpfKey)) return relationFormSymbolOptions;
|
if (useRangeSymbolList.has(jnpfKey)) return rangeSymbolOptions;
|
if (useSelectSymbolList.has(jnpfKey)) return selectSymbolOptions;
|
if (jnpfKey == 'location') return locationSymbolOptions;
|
return baseSymbolOptions;
|
}
|
function exist() {
|
let isOk = true;
|
for (let i = 0; i < state.conditionList.length; i++) {
|
const e = state.conditionList[i];
|
for (let j = 0; j < e.groups.length; j++) {
|
const child = e.groups[j];
|
if (!child.field) {
|
createMessage.warning('条件字段不能为空');
|
isOk = false;
|
return;
|
}
|
if (!child.symbol) {
|
createMessage.warning('条件符号不能为空');
|
isOk = false;
|
return;
|
}
|
if (!['notNull', 'null'].includes(child.symbol) && ((!child.fieldValue && child.fieldValue !== 0) || isEmpty(child.fieldValue))) {
|
createMessage.warning('数据值不能为空');
|
isOk = false;
|
return;
|
}
|
}
|
}
|
return isOk;
|
}
|
function confirm() {
|
if (!exist()) return false;
|
return {
|
matchLogic: state.matchLogic,
|
conditionList: cloneDeep(state.conditionList),
|
};
|
}
|
function getSourceTypeOptions({ symbol, jnpfKey }) {
|
if (!props.isCustomFieldValueType) return simpleSourceTypeOptions;
|
const list = [...organizeList, ...positionList, ...userList];
|
const options = [{ id: 2, fullName: '自定义' }];
|
return list.includes(jnpfKey) || (symbol != 'between' && dateList.has(jnpfKey)) ? [...options, { id: 4, fullName: '系统变量' }] : options;
|
}
|
function getParameterList(jnpfKey) {
|
if (dateList.has(jnpfKey)) return [{ id: '@currentTime', fullName: '当前时间' }];
|
if (positionList.includes(jnpfKey)) return positionSysField;
|
if (organizeList.includes(jnpfKey)) return orgSysField;
|
if (userList.includes(jnpfKey)) return userSysField;
|
return [];
|
}
|
function onConditionOrganizeChange(item, val, data) {
|
if (!val) return (item.fieldLabel = '');
|
if (item.multiple) {
|
const labelList = data.map((o) => o.orgNameTree);
|
item.fieldLabel = labelList.join('/');
|
} else {
|
item.fieldLabel = data.orgNameTree || '';
|
}
|
}
|
function onConditionChange(item, val, data) {
|
if (!val) return (item.fieldLabel = '');
|
if (item.multiple) {
|
const labelList = data.map((o) => o.fullName);
|
item.fieldLabel = labelList.join('/');
|
} else {
|
item.fieldLabel = data.fullName || '';
|
}
|
}
|
function onConditionDateChange(val, item) {
|
if (!val) return (item.fieldLabel = '');
|
const format = item.format || 'YYYY-MM-DD HH:mm:ss';
|
item.fieldLabel = formatToDateTime(val, format);
|
}
|
function onConditionDateRageChange(val, item) {
|
if (!val) return (item.fieldLabel = '');
|
const format = item.format || 'YYYY-MM-DD HH:mm:ss';
|
item.fieldLabel = `${formatToDateTime(val[0], format)}-${formatToDateTime(val[1], format)}`;
|
}
|
</script>
|
|
<template>
|
<div class="condition-main" :class="{ 'condition-main-bordered': bordered, 'condition-main-compact': compact }">
|
<div class="mb-[10px]" v-if="conditionList.length">
|
<jnpf-radio v-model:value="matchLogic" :options="logicOptions" option-type="button" button-style="solid" />
|
</div>
|
<div class="condition-item" v-for="(item, index) in conditionList" :key="index">
|
<div class="condition-item-title">
|
<div>条件组</div>
|
<i class="icon-ym icon-ym-nav-close" @click="delGroup(index)"></i>
|
</div>
|
<div class="condition-item-content" :class="{ '!px-[5px]': compact }">
|
<div class="condition-item-cap">
|
以下条件全部执行:
|
<jnpf-radio v-model:value="item.logic" :options="logicOptions" option-type="button" button-style="solid" size="small" />
|
</div>
|
<a-row :gutter="compact ? 2 : 8" v-for="(child, childIndex) in item.groups" :key="index + childIndex" class="mb-[10px]">
|
<a-col :span="6">
|
<jnpf-select
|
v-model:value="child.field"
|
:options="fieldOptions"
|
show-search
|
allow-clear
|
:field-names="{ options: 'options1' }"
|
@change="(val, data) => onFieldChange(val, data, child, index, childIndex)" />
|
</a-col>
|
<a-col :span="5">
|
<jnpf-select
|
v-model:value="child.symbol"
|
placeholder="运算符号"
|
:options="getSymbolOptions(child.jnpfKey)"
|
:dropdown-match-select-width="false"
|
@change="(val, data) => onSymbolChange(val, data, child)" />
|
</a-col>
|
<a-col :span="4" v-if="showFieldValueType">
|
<jnpf-select
|
v-model:value="child.fieldValueType"
|
:options="getSourceTypeOptions(child)"
|
:disabled="child.disabled"
|
@change="child.fieldValue = undefined" />
|
</a-col>
|
<a-col :span="8" v-if="child.fieldValueType === 1">
|
<jnpf-select
|
v-model:value="child.fieldValue"
|
:options="valueFieldOptions"
|
show-search
|
allow-clear
|
:field-names="{ options: 'children' }"
|
:disabled="child.disabled" />
|
</a-col>
|
<a-col :span="showFieldValueType ? 8 : 12" v-if="child.fieldValueType == 2">
|
<template v-if="child.jnpfKey === 'inputNumber'">
|
<jnpf-number-range v-model:value="child.fieldValue" :precision="child.precision" :disabled="child.disabled" v-if="child.symbol == 'between'" />
|
<jnpf-input-number v-model:value="child.fieldValue" :precision="child.precision" :disabled="child.disabled" placeholder="请输入" v-else />
|
</template>
|
<template v-else-if="child.jnpfKey === 'calculate'">
|
<jnpf-number-range
|
v-model:value="child.fieldValue"
|
:precision="child.precision || 0"
|
:disabled="child.disabled"
|
v-if="child.symbol == 'between'" />
|
<jnpf-input-number v-model:value="child.fieldValue" :precision="child.precision || 0" :disabled="child.disabled" placeholder="请输入" v-else />
|
</template>
|
<template v-else-if="['rate', 'slider'].includes(child.jnpfKey)">
|
<jnpf-number-range
|
v-model:value="child.fieldValue"
|
:precision="child.jnpfKey == 'rate' && child.allowHalf ? 1 : 0"
|
:disabled="child.disabled"
|
v-if="child.symbol == 'between'" />
|
<jnpf-input-number
|
v-model:value="child.fieldValue"
|
:precision="child.jnpfKey == 'rate' && child.allowHalf ? 1 : 0"
|
:disabled="child.disabled"
|
placeholder="请输入"
|
v-else />
|
</template>
|
<div class="pt-[3px]" v-else-if="child.jnpfKey === 'switch'">
|
<jnpf-switch v-model:value="child.fieldValue" :disabled="child.disabled" />
|
</div>
|
<template v-else-if="child.jnpfKey === 'colorPicker'">
|
<jnpf-color-picker v-model:value="child.fieldValue" size="small" :disabled="child.disabled" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'timePicker'">
|
<jnpf-time-range
|
v-model:value="child.fieldValue"
|
:format="child.format"
|
allow-clear
|
:disabled="child.disabled"
|
v-if="child.symbol == 'between'" />
|
<jnpf-time-picker v-model:value="child.fieldValue" :format="child.format" allow-clear :disabled="child.disabled" v-else />
|
</template>
|
<template v-else-if="dateList.has(child.jnpfKey)">
|
<jnpf-date-range
|
v-model:value="child.fieldValue"
|
:format="child.format || 'YYYY-MM-DD HH:mm:ss'"
|
allow-clear
|
:disabled="child.disabled"
|
@change="onConditionDateRageChange($event, child)"
|
v-if="child.symbol == 'between'" />
|
<jnpf-date-picker
|
v-model:value="child.fieldValue"
|
:format="child.format || 'YYYY-MM-DD HH:mm:ss'"
|
allow-clear
|
:disabled="child.disabled"
|
@change="onConditionDateChange($event, child)"
|
v-else />
|
</template>
|
<template v-else-if="['organizeSelect', 'currOrganize'].includes(child.jnpfKey)">
|
<jnpf-organize-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:select-type="child.selectType"
|
:able-ids="child.ableIds"
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionOrganizeChange(child, val, data)" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'roleSelect'">
|
<jnpf-role-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:select-type="child.selectType"
|
:able-ids="child.ableIds"
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionChange(child, val, data)" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'groupSelect'">
|
<jnpf-group-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:select-type="child.selectType"
|
:able-ids="child.ableIds"
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionChange(child, val, data)" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'posSelect'">
|
<jnpf-pos-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:select-type="child.selectType"
|
:able-ids="child.ableIds"
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionOrganizeChange(child, val, data)" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'currPosition'">
|
<jnpf-pos-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionOrganizeChange(child, val, data)" />
|
</template>
|
<template v-else-if="['createUser', 'modifyUser'].includes(child.jnpfKey)">
|
<jnpf-user-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionChange(child, val, data)" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'userSelect'">
|
<jnpf-user-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:select-type="child.selectType != 'all' && child.selectType != 'custom' ? 'all' : child.selectType"
|
:able-ids="child.ableIds"
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionChange(child, val, data)" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'usersSelect'">
|
<jnpf-users-select
|
v-model:value="child.fieldValue"
|
allow-clear
|
:disabled="child.disabled"
|
@change="(val, data) => onConditionOrganizeChange(child, val, data)" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'areaSelect'">
|
<jnpf-area-select
|
v-model:value="child.fieldValue"
|
:level="child.level"
|
allow-clear
|
:multiple="child.multiple"
|
:disabled="child.disabled"
|
:key="item.cellKey"
|
@change="(val, data) => onConditionChange(child, val, data)" />
|
</template>
|
<template v-else-if="['select', 'radio', 'checkbox'].includes(child.jnpfKey)">
|
<jnpf-select
|
v-model:value="child.fieldValue"
|
show-search
|
allow-clear
|
:options="child.options"
|
:field-names="child.props"
|
:multiple="child.multiple || child.jnpfKey === 'checkbox'"
|
:disabled="child.disabled" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'cascader'">
|
<jnpf-cascader
|
v-model:value="child.fieldValue"
|
:options="child.options"
|
:field-names="child.props"
|
:show-all-levels="child.showAllLevels"
|
show-search
|
allow-clear
|
placeholder="请选择"
|
:multiple="child.multiple"
|
:disabled="child.disabled" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'treeSelect'">
|
<jnpf-tree-select
|
v-model:value="child.fieldValue"
|
:options="child.options"
|
:field-names="child.props"
|
show-search
|
allow-clear
|
placeholder="请选择"
|
:multiple="child.multiple"
|
:disabled="child.disabled" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'relationForm'">
|
<JnpfRelationForm
|
v-model:value="child.fieldValue"
|
placeholder="请选择"
|
:model-id="child.modelId"
|
allow-clear
|
:column-options="child.columnOptions"
|
:relation-field="child.relationField"
|
:has-page="child.hasPage"
|
:page-size="child.pageSize"
|
:popup-type="child.popupType"
|
:popup-title="child.popupTitle"
|
:popup-width="child.popupWidth"
|
:query-type="child.queryType"
|
:props-value="child.propsValue"
|
:disabled="child.disabled" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'popupSelect' || child.jnpfKey === 'popupTableSelect'">
|
<jnpf-popup-select
|
v-model:value="child.fieldValue"
|
placeholder="请选择"
|
:interface-id="child.interfaceId"
|
allow-clear
|
:multiple="child.multiple"
|
:column-options="child.columnOptions"
|
:props-value="child.propsValue"
|
:template-json="child.templateJson"
|
:relation-field="child.relationField"
|
:has-page="child.hasPage"
|
:page-size="child.pageSize"
|
:popup-type="child.popupType"
|
:popup-title="child.popupTitle"
|
:popup-width="child.popupWidth"
|
:disabled="child.disabled" />
|
</template>
|
<template v-else-if="['input', 'textarea', 'autoComplete', 'billRule'].includes(child.jnpfKey) && ['in', 'notIn'].includes(child.symbol)">
|
<a-select
|
v-model:value="child.fieldValue"
|
placeholder="请输入"
|
allow-clear
|
mode="tags"
|
:open="false"
|
:options="child.options"
|
:field-names="child.props"
|
:disabled="child.disabled" />
|
</template>
|
<template v-else-if="child.jnpfKey === 'autoComplete'">
|
<jnpf-auto-complete
|
v-model:value="child.fieldValue"
|
placeholder="请输入"
|
allow-clear
|
:interface-id="child.interfaceId"
|
:relation-field="child.relationField"
|
:template-json="child.templateJson"
|
:total="child.total"
|
:disabled="child.disabled" />
|
</template>
|
<template v-else>
|
<a-input v-model:value="child.fieldValue" placeholder="请输入" allow-clear :disabled="child.disabled" />
|
</template>
|
</a-col>
|
<a-col :span="8" v-if="child.fieldValueType === 4">
|
<jnpf-select
|
v-model:value="child.fieldValue"
|
:options="getParameterList(child.jnpfKey)"
|
allow-clear
|
@change="(val, data) => onParameterChange(child, val, data)" />
|
</a-col>
|
<a-col :span="1" class="text-center">
|
<i class="icon-ym icon-ym-btn-clearn" @click="delItem(index, childIndex)"></i>
|
</a-col>
|
</a-row>
|
<span class="link-text inline-block" @click="addItem(index)"><i class="icon-ym icon-ym-btn-add mr-[4px] text-[14px]"></i>添加条件</span>
|
</div>
|
</div>
|
<div class="query-noData" v-show="!conditionList.length && isSuperQuery">
|
<img src="@/assets/images/query-noData.png" class="noData-img" />
|
<div class="noData-txt">
|
<span>没有任何查询条件</span>
|
<a-divider type="vertical" />
|
<span class="link-text" @click="addGroup">点击新增</span>
|
</div>
|
</div>
|
<span class="link-text inline-block" @click="addGroup()" v-show="conditionList.length || !isSuperQuery">
|
<i class="icon-ym icon-ym-btn-add mr-[4px] text-[14px]"></i>添加条件组
|
</span>
|
</div>
|
</template>
|