|
|
@ -1,107 +1,107 @@
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import type { FormInst, FormItemRule, FormRules } from "naive-ui";
|
|
|
|
import type { FormInst, FormItemRule, FormRules } from 'naive-ui'
|
|
|
|
import { computed, defineOptions, onBeforeMount, reactive, ref, unref, watch } from "vue";
|
|
|
|
import { computed, defineOptions, onBeforeMount, reactive, ref, unref, watch } from 'vue'
|
|
|
|
import { asideMap } from "@/config/aside";
|
|
|
|
import { asideMap } from '@/config/aside'
|
|
|
|
import { useDictionary } from "@/store/modules/dictonary";
|
|
|
|
import { useDictionary } from '@/store/modules/dictonary'
|
|
|
|
import { useConfig } from "@/store/modules/asideConfig";
|
|
|
|
import { useConfig } from '@/store/modules/asideConfig'
|
|
|
|
import type { FilterCondition } from "/#/api";
|
|
|
|
import type { FilterCondition } from '/#/api'
|
|
|
|
import { addCondition, updateCondition } from "@/api/home/filter";
|
|
|
|
import { addCondition, updateCondition } from '@/api/home/filter'
|
|
|
|
import { formatToDate2, formatToDate3 } from "@/utils/dateUtil";
|
|
|
|
import { formatToDate2, formatToDate3 } from '@/utils/dateUtil'
|
|
|
|
|
|
|
|
|
|
|
|
type Status = "edit" | "new";
|
|
|
|
type Status = 'edit' | 'new'
|
|
|
|
|
|
|
|
|
|
|
|
const show = ref(false);
|
|
|
|
const emit = defineEmits(['onOk'])
|
|
|
|
const configStore = useConfig();
|
|
|
|
const show = ref(false)
|
|
|
|
const dicStore = useDictionary();
|
|
|
|
const configStore = useConfig()
|
|
|
|
const currentStatus = ref<Status>("new");
|
|
|
|
const dicStore = useDictionary()
|
|
|
|
let currentEditId: string | null = null;
|
|
|
|
const currentStatus = ref<Status>('new')
|
|
|
|
const emit = defineEmits(["onOk"]);
|
|
|
|
let currentEditId: string | null = null
|
|
|
|
|
|
|
|
|
|
|
|
const modalTitle = computed(() => {
|
|
|
|
const modalTitle = computed(() => {
|
|
|
|
return currentStatus.value === "new" ? "新建过滤条件" : "编辑过滤条件";
|
|
|
|
return currentStatus.value === 'new' ? '新建过滤条件' : '编辑过滤条件'
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const cardStyle = {
|
|
|
|
const cardStyle = {
|
|
|
|
width: "800px",
|
|
|
|
'width': '800px',
|
|
|
|
"--n-padding-bottom": "10px",
|
|
|
|
'--n-padding-bottom': '10px',
|
|
|
|
"--n-padding-left": "10px",
|
|
|
|
'--n-padding-left': '10px',
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const noBorderInput = {
|
|
|
|
const noBorderInput = {
|
|
|
|
"--n-border": "0px",
|
|
|
|
'--n-border': '0px',
|
|
|
|
"--n-border-hover": "0px",
|
|
|
|
'--n-border-hover': '0px',
|
|
|
|
"--n-border-pressed": "0px",
|
|
|
|
'--n-border-pressed': '0px',
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const formItemStyle = {
|
|
|
|
const formItemStyle = {
|
|
|
|
"--n-label-height": "0px",
|
|
|
|
'--n-label-height': '0px',
|
|
|
|
"--n-feedback-height": "8px",
|
|
|
|
'--n-feedback-height': '8px',
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface FormType {
|
|
|
|
interface FormType {
|
|
|
|
name: string | null;
|
|
|
|
name: string | null
|
|
|
|
logic: string | null;
|
|
|
|
logic: string | null
|
|
|
|
conditions: Condition[];
|
|
|
|
conditions: Condition[]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface Condition {
|
|
|
|
interface Condition {
|
|
|
|
type: string | null;
|
|
|
|
type: string | null
|
|
|
|
operator: string | null;
|
|
|
|
operator: string | null
|
|
|
|
result: any;
|
|
|
|
result: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface Option {
|
|
|
|
interface Option {
|
|
|
|
label: string;
|
|
|
|
label: string
|
|
|
|
value: string;
|
|
|
|
value: string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const rules: FormRules = {
|
|
|
|
const rules: FormRules = {
|
|
|
|
name: {
|
|
|
|
name: {
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: "请输入过滤条件名称",
|
|
|
|
message: '请输入过滤条件名称',
|
|
|
|
trigger: "blur",
|
|
|
|
trigger: 'blur',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
logic: {
|
|
|
|
logic: {
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: "请选择逻辑关系",
|
|
|
|
message: '请选择逻辑关系',
|
|
|
|
trigger: "blur",
|
|
|
|
trigger: 'blur',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
conditions: {
|
|
|
|
conditions: {
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
validator(rule: FormItemRule, value: Condition[]) {
|
|
|
|
validator(rule: FormItemRule, value: Condition[]) {
|
|
|
|
for (const item of value) {
|
|
|
|
for (const item of value) {
|
|
|
|
const { type, operator, result } = item;
|
|
|
|
const { type, operator, result } = item
|
|
|
|
|
|
|
|
|
|
|
|
if (type === null || operator === null || result === null)
|
|
|
|
if (type === null || operator === null || result === null)
|
|
|
|
return new Error("请选择过滤条件");
|
|
|
|
return new Error('请选择过滤条件')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
return true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
trigger: ["input", "blur"],
|
|
|
|
trigger: ['input', 'blur'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const formRef = ref<FormInst | null>(null);
|
|
|
|
const formRef = ref<FormInst | null>(null)
|
|
|
|
|
|
|
|
|
|
|
|
const formValue = reactive<FormType>({
|
|
|
|
const formValue = reactive<FormType>({
|
|
|
|
name: null,
|
|
|
|
name: null,
|
|
|
|
logic: "where",
|
|
|
|
logic: 'where',
|
|
|
|
conditions: [
|
|
|
|
conditions: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: null,
|
|
|
|
type: null,
|
|
|
|
operator: "eq",
|
|
|
|
operator: 'eq',
|
|
|
|
result: null,
|
|
|
|
result: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
function handleSumbit(e: MouseEvent) {
|
|
|
|
function handleSumbit(e: MouseEvent) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault()
|
|
|
|
formRef.value?.validate((errors) => {
|
|
|
|
formRef.value?.validate((errors) => {
|
|
|
|
if (errors) return;
|
|
|
|
if (errors)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
const list = formValue.conditions.map((item, index) => {
|
|
|
|
const list = formValue.conditions.map((item, index) => {
|
|
|
|
const { type, operator, result } = item;
|
|
|
|
const { type, operator, result } = item
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
searchfield: type!,
|
|
|
|
searchfield: type!,
|
|
|
@ -109,84 +109,85 @@ function handleSumbit(e: MouseEvent) {
|
|
|
|
searchvalue: formatValue(type!, result),
|
|
|
|
searchvalue: formatValue(type!, result),
|
|
|
|
searchRelationType: formValue.logic!,
|
|
|
|
searchRelationType: formValue.logic!,
|
|
|
|
orderNum: index + 1,
|
|
|
|
orderNum: index + 1,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const param: FilterCondition = {
|
|
|
|
const param: FilterCondition = {
|
|
|
|
searchname: formValue.name!,
|
|
|
|
searchname: formValue.name!,
|
|
|
|
type: 0,
|
|
|
|
type: 0,
|
|
|
|
ocrUsersearchchildList: list,
|
|
|
|
ocrUsersearchchildList: list,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (currentStatus.value === "new") addCondition(param);
|
|
|
|
if (currentStatus.value === 'new')
|
|
|
|
else updateCondition({ id: currentEditId!, ...param });
|
|
|
|
addCondition(param)
|
|
|
|
emit("onOk");
|
|
|
|
else updateCondition({ id: currentEditId!, ...param })
|
|
|
|
|
|
|
|
emit('onOk')
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
closeModal();
|
|
|
|
closeModal()
|
|
|
|
}, 300);
|
|
|
|
}, 300)
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 调用接口前转换为服务端格式
|
|
|
|
// 调用接口前转换为服务端格式
|
|
|
|
function formatValue(searchfield: string, searchvalue: any) {
|
|
|
|
function formatValue(searchfield: string, searchvalue: any) {
|
|
|
|
if (searchfield === "izyear") {
|
|
|
|
if (searchfield === 'izyear') {
|
|
|
|
const start = formatToDate2(searchvalue[0]);
|
|
|
|
const start = formatToDate2(searchvalue[0])
|
|
|
|
const end = formatToDate2(searchvalue[1]);
|
|
|
|
const end = formatToDate2(searchvalue[1])
|
|
|
|
return `${start}-${end}`;
|
|
|
|
return `${start}-${end}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (searchfield === "izsimilarity" && Array.isArray(searchvalue))
|
|
|
|
if (searchfield === 'izsimilarity' && Array.isArray(searchvalue))
|
|
|
|
return searchvalue.join(",");
|
|
|
|
return searchvalue.join(',')
|
|
|
|
|
|
|
|
|
|
|
|
return searchvalue;
|
|
|
|
return searchvalue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑前前转换为服务端格式
|
|
|
|
// 编辑前前转换为服务端格式
|
|
|
|
function unformatValue(searchfield: string, searchvalue: any) {
|
|
|
|
function unformatValue(searchfield: string, searchvalue: any) {
|
|
|
|
// 2022/01/03-2023/02/04
|
|
|
|
// 2022/01/03-2023/02/04
|
|
|
|
if (searchfield === "izyear") {
|
|
|
|
if (searchfield === 'izyear') {
|
|
|
|
const dataStrs = searchvalue.split("-");
|
|
|
|
const dataStrs = searchvalue.split('-')
|
|
|
|
const start = formatToDate3(dataStrs[0]);
|
|
|
|
const start = formatToDate3(dataStrs[0])
|
|
|
|
const end = formatToDate3(dataStrs[1]);
|
|
|
|
const end = formatToDate3(dataStrs[1])
|
|
|
|
return [start, end];
|
|
|
|
return [start, end]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 80,90
|
|
|
|
// 80,90
|
|
|
|
// if (searchfield === "izsimilarity") return searchvalue.split(",");
|
|
|
|
// if (searchfield === "izsimilarity") return searchvalue.split(",");
|
|
|
|
|
|
|
|
|
|
|
|
return searchvalue;
|
|
|
|
return searchvalue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function createCondition() {
|
|
|
|
function createCondition() {
|
|
|
|
formValue.conditions.push({
|
|
|
|
formValue.conditions.push({
|
|
|
|
type: null,
|
|
|
|
type: null,
|
|
|
|
operator: "eq",
|
|
|
|
operator: 'eq',
|
|
|
|
result: null,
|
|
|
|
result: null,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function removeCondition(index: number) {
|
|
|
|
function removeCondition(index: number) {
|
|
|
|
formValue.conditions.splice(index, 1);
|
|
|
|
formValue.conditions.splice(index, 1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function formLabel(index: number) {
|
|
|
|
function formLabel(index: number) {
|
|
|
|
return index === 0 ? "筛选条件" : "";
|
|
|
|
return index === 0 ? '筛选条件' : ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const typeOptions = ref<Option[]>([]);
|
|
|
|
const typeOptions = ref<Option[]>([])
|
|
|
|
|
|
|
|
|
|
|
|
const operatorOptions = [
|
|
|
|
const operatorOptions = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
label: "等于",
|
|
|
|
label: '等于',
|
|
|
|
value: "eq",
|
|
|
|
value: 'eq',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
label: "不等于",
|
|
|
|
label: '不等于',
|
|
|
|
value: "notEq",
|
|
|
|
value: 'notEq',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
const logicOptions = ref([]);
|
|
|
|
const logicOptions = ref([])
|
|
|
|
|
|
|
|
|
|
|
|
const similarityOptions = [
|
|
|
|
const similarityOptions = [
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -201,57 +202,58 @@ const similarityOptions = [
|
|
|
|
label: "100%-100%",
|
|
|
|
label: "100%-100%",
|
|
|
|
value: '100,100',
|
|
|
|
value: '100,100',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(() => {
|
|
|
|
onBeforeMount(() => {
|
|
|
|
dicStore.fetchRelationTypeList();
|
|
|
|
dicStore.fetchRelationTypeList()
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
watch(
|
|
|
|
() => dicStore.relationTypeList,
|
|
|
|
() => dicStore.relationTypeList,
|
|
|
|
(newval) => {
|
|
|
|
(newval) => {
|
|
|
|
logicOptions.value = newval;
|
|
|
|
logicOptions.value = newval
|
|
|
|
}
|
|
|
|
},
|
|
|
|
);
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
function showModal() {
|
|
|
|
function showModal() {
|
|
|
|
const list = generateAllData(configStore.systemConfig);
|
|
|
|
const list = generateAllData(configStore.systemConfig)
|
|
|
|
typeOptions.value = list;
|
|
|
|
typeOptions.value = list
|
|
|
|
show.value = true;
|
|
|
|
show.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function closeModal() {
|
|
|
|
function closeModal() {
|
|
|
|
show.value = false;
|
|
|
|
show.value = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function generateAllData(config): Option[] {
|
|
|
|
function generateAllData(config): Option[] {
|
|
|
|
const initVal: Option[] = [];
|
|
|
|
const initVal: Option[] = []
|
|
|
|
|
|
|
|
|
|
|
|
const list = Object.keys(config).reduce((acc, value) => {
|
|
|
|
const list = Object.keys(config).reduce((acc, value) => {
|
|
|
|
if (value.startsWith("iz") && asideMap[value]?.inFilterList !== false) {
|
|
|
|
if (value.startsWith('iz') && asideMap[value]?.inFilterList !== false) {
|
|
|
|
const name = asideMap[value]?.label;
|
|
|
|
const name = asideMap[value]?.label
|
|
|
|
|
|
|
|
|
|
|
|
name &&
|
|
|
|
name
|
|
|
|
acc.push({
|
|
|
|
&& acc.push({
|
|
|
|
value,
|
|
|
|
value,
|
|
|
|
label: name || "未配置",
|
|
|
|
label: name || '未配置',
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return acc;
|
|
|
|
return acc
|
|
|
|
}, initVal);
|
|
|
|
}, initVal)
|
|
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
return list
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
watch(
|
|
|
|
() => configStore.systemConfig,
|
|
|
|
() => configStore.systemConfig,
|
|
|
|
(newVal) => {
|
|
|
|
(newVal) => {
|
|
|
|
if (!newVal) return;
|
|
|
|
if (!newVal)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
const list = generateAllData(newVal);
|
|
|
|
const list = generateAllData(newVal)
|
|
|
|
typeOptions.value = list;
|
|
|
|
typeOptions.value = list
|
|
|
|
}
|
|
|
|
},
|
|
|
|
);
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
function getOptions(key: string) {
|
|
|
|
function getOptions(key: string) {
|
|
|
|
if (key === "izsimilarity") return similarityOptions;
|
|
|
|
if (key === "izsimilarity") return similarityOptions;
|
|
|
@ -261,17 +263,17 @@ function getOptions(key: string) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function leaveHandler() {
|
|
|
|
function leaveHandler() {
|
|
|
|
currentStatus.value = "new";
|
|
|
|
currentStatus.value = 'new'
|
|
|
|
currentEditId = null;
|
|
|
|
currentEditId = null
|
|
|
|
|
|
|
|
|
|
|
|
formValue.name = null;
|
|
|
|
formValue.name = null
|
|
|
|
formValue.conditions = [
|
|
|
|
formValue.conditions = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: null,
|
|
|
|
type: null,
|
|
|
|
operator: "eq",
|
|
|
|
operator: 'eq',
|
|
|
|
result: null,
|
|
|
|
result: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function edit(editFilter: any) {
|
|
|
|
function edit(editFilter: any) {
|
|
|
@ -285,14 +287,14 @@ function edit(editFilter: any) {
|
|
|
|
type: item.searchfield,
|
|
|
|
type: item.searchfield,
|
|
|
|
operator: item.searchtype,
|
|
|
|
operator: item.searchtype,
|
|
|
|
result: unformatValue(item.searchfield, item.searchvalue),
|
|
|
|
result: unformatValue(item.searchfield, item.searchvalue),
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
defineExpose({
|
|
|
|
showModal,
|
|
|
|
showModal,
|
|
|
|
edit,
|
|
|
|
edit,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
@ -314,16 +316,18 @@ defineExpose({
|
|
|
|
<div class="wrapper-form">
|
|
|
|
<div class="wrapper-form">
|
|
|
|
<n-form ref="formRef" :model="formValue" :rules="rules">
|
|
|
|
<n-form ref="formRef" :model="formValue" :rules="rules">
|
|
|
|
<n-form-item path="name" label="标题">
|
|
|
|
<n-form-item path="name" label="标题">
|
|
|
|
|
|
|
|
<!-- j -->
|
|
|
|
<n-input
|
|
|
|
<n-input
|
|
|
|
v-model:value="formValue.name"
|
|
|
|
v-model:value="formValue.name"
|
|
|
|
:style="{ width: '780px' }"
|
|
|
|
:style="{ width: '780px' }"
|
|
|
|
|
|
|
|
maxlength="15"
|
|
|
|
@keydown.enter.prevent
|
|
|
|
@keydown.enter.prevent
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</n-form-item>
|
|
|
|
</n-form-item>
|
|
|
|
<n-form-item path="logic" label="逻辑关系" v-show="false">
|
|
|
|
<n-form-item v-show="false" path="logic" label="逻辑关系">
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
filterable
|
|
|
|
|
|
|
|
v-model:value="formValue.logic"
|
|
|
|
v-model:value="formValue.logic"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
placeholder="请选择逻辑关系"
|
|
|
|
placeholder="请选择逻辑关系"
|
|
|
|
:options="logicOptions"
|
|
|
|
:options="logicOptions"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -336,14 +340,14 @@ defineExpose({
|
|
|
|
:label="formLabel(index)"
|
|
|
|
:label="formLabel(index)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
filterable
|
|
|
|
|
|
|
|
v-model:value="item.type"
|
|
|
|
v-model:value="item.type"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
placeholder="请选择筛选项名称"
|
|
|
|
placeholder="请选择筛选项名称"
|
|
|
|
:options="typeOptions"
|
|
|
|
:options="typeOptions"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
filterable
|
|
|
|
|
|
|
|
v-model:value="item.operator"
|
|
|
|
v-model:value="item.operator"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
style="margin-left: 8px"
|
|
|
|
style="margin-left: 8px"
|
|
|
|
placeholder="请选择"
|
|
|
|
placeholder="请选择"
|
|
|
|
:options="operatorOptions"
|
|
|
|
:options="operatorOptions"
|
|
|
@ -357,9 +361,9 @@ defineExpose({
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</n-space>
|
|
|
|
</n-space>
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
filterable
|
|
|
|
|
|
|
|
v-else
|
|
|
|
v-else
|
|
|
|
v-model:value="item.result"
|
|
|
|
v-model:value="item.result"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
style="margin-left: 8px"
|
|
|
|
style="margin-left: 8px"
|
|
|
|
placeholder="请选择"
|
|
|
|
placeholder="请选择"
|
|
|
|
:options="getOptions(item.type!)"
|
|
|
|
:options="getOptions(item.type!)"
|
|
|
@ -370,7 +374,19 @@ defineExpose({
|
|
|
|
@click="removeCondition(index)"
|
|
|
|
@click="removeCondition(index)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #icon>
|
|
|
|
<template #icon>
|
|
|
|
<SvgIcon size="24" name="close" />
|
|
|
|
<!-- <SvgIcon size="24" name="close" color="#F00"/>
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
<svg width="24px" height="24px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
|
|
|
|
<title>清除</title>
|
|
|
|
|
|
|
|
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
|
|
|
|
|
|
<g id="PrevailCloud-Design-图标集" transform="translate(-3040.000000, -3118.000000)" fill-rule="nonzero">
|
|
|
|
|
|
|
|
<g id="清除" transform="translate(3040.000000, 3118.000000)">
|
|
|
|
|
|
|
|
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="64" height="64"></rect>
|
|
|
|
|
|
|
|
<path d="M32,4 C16.5619675,4 4,16.5600322 4,32 C4,47.4399678 16.5600322,60 32,60 C47.4380325,60 60,47.4399678 60,32 C60,16.5600322 47.4399678,4 32,4 Z M43.4220132,40.6240021 C44.2020159,41.4079827 44.1999731,42.6720064 43.4180353,43.4520091 C43.0280877,43.8400215 42.5180487,44.0360166 42.0060745,44.0360166 C41.4920576,44.0360166 40.9800834,43.8400214 40.5900283,43.4480311 L31.9900014,34.8219862 L23.3620213,43.3580432 C22.9720737,43.7420776 22.4639699,43.9360301 21.9559737,43.9360301 C21.4400215,43.9360301 20.9260046,43.7379922 20.5340143,43.3420239 C19.7579895,42.5560005 19.7640102,41.2919768 20.5500336,40.5140169 L29.1680151,31.9900013 L20.5819648,23.3759978 C19.8019621,22.5939524 19.8040049,21.3279935 20.5859428,20.5479908 C21.3679882,19.7659454 22.6319043,19.7700309 23.4139498,20.5519687 L32.0119339,29.1759709 L40.639914,20.6400214 C41.4238946,19.8620614 42.6918962,19.8700173 43.467921,20.6560407 C44.2458809,21.4420641 44.2379251,22.708023 43.4519016,23.4840477 L34.8340277,32.0079559 L43.4220132,40.6240021 Z" id="形状" fill="#DDDDDD"></path>
|
|
|
|
|
|
|
|
</g>
|
|
|
|
|
|
|
|
</g>
|
|
|
|
|
|
|
|
</g>
|
|
|
|
|
|
|
|
</svg>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</n-button>
|
|
|
|
</n-button>
|
|
|
|
</n-form-item>
|
|
|
|
</n-form-item>
|
|
|
@ -383,8 +399,10 @@ defineExpose({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<template #footer>
|
|
|
|
<template #footer>
|
|
|
|
<div class="wrapper-footer">
|
|
|
|
<div class="wrapper-footer">
|
|
|
|
<n-button type="info" @click="handleSumbit"> 保存 </n-button>
|
|
|
|
<n-button style="background-color: #507AFD;" type="info" @click="handleSumbit">
|
|
|
|
<n-button secondary style="margin-left: 15px" @click="closeModal">
|
|
|
|
确定
|
|
|
|
|
|
|
|
</n-button>
|
|
|
|
|
|
|
|
<n-button secondary style="margin-left: 15px;background-color: #ffffff;border: 1px solid #cad2dd;color: #333333;" @click="closeModal">
|
|
|
|
取消
|
|
|
|
取消
|
|
|
|
</n-button>
|
|
|
|
</n-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -451,4 +469,11 @@ defineExpose({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*j */
|
|
|
|
|
|
|
|
// ::v-deep(.n-input .n-input-wrapper) {
|
|
|
|
|
|
|
|
// padding-left: 0;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
::v-deep(.n-input__suffix){
|
|
|
|
|
|
|
|
margin-right: -8px;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|