feat: 所有下拉选项框新增搜索功能

bak
刘释隆 1 year ago
parent 8671c62ca7
commit c490172e4e

@ -270,16 +270,16 @@ defineExpose({
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent /> <n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
</n-form-item> </n-form-item>
<n-form-item path="logic" label="逻辑关系"> <n-form-item path="logic" label="逻辑关系">
<n-select v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" /> <n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" />
</n-form-item> </n-form-item>
<n-form-item <n-form-item
v-for="(item, index) in formValue.conditions" :key="index" :style="formItemStyle" v-for="(item, index) in formValue.conditions" :key="index" :style="formItemStyle"
path="conditions" :label="formLabel(index)" path="conditions" :label="formLabel(index)"
> >
<n-select <n-select filterable
v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions" v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions"
/> />
<n-select <n-select filterable
v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择" v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择"
:options="operatorOptions" :options="operatorOptions"
/> />
@ -289,7 +289,7 @@ defineExpose({
clearable clearable
/> />
</n-space> </n-space>
<n-select <n-select filterable
v-else v-model:value="item.result" style="margin-left: 8px;" placeholder="请选择" :options="getOptions(item.type!)" v-else v-model:value="item.result" style="margin-left: 8px;" placeholder="请选择" :options="getOptions(item.type!)"
/> />
<n-button :style="noBorderInput" icon-placement="right" @click="removeCondition(index)"> <n-button :style="noBorderInput" icon-placement="right" @click="removeCondition(index)">

@ -78,11 +78,11 @@ onBeforeMount(async () => {
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<span>处理方式</span> <span>处理方式</span>
<n-select v-model:value="selectBackId" style="margin-top: 10px;" :options="backOptions" /> <n-select filterable v-model:value="selectBackId" style="margin-top: 10px;" :options="backOptions" />
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<span>不通过原因</span> <span>不通过原因</span>
<n-select v-model:value="selectRejectId" style="margin-top: 10px;" :options="reasonOptions" /> <n-select filterable v-model:value="selectRejectId" style="margin-top: 10px;" :options="reasonOptions" />
<n-input v-show="showOther" v-model:value="otherValue" type="textarea" placeholder="备注内容" style="margin-top: 10px;" /> <n-input v-show="showOther" v-model:value="otherValue" type="textarea" placeholder="备注内容" style="margin-top: 10px;" />
</div> </div>
</div> </div>

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户级别" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户级别" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户名称" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户名称" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户类型" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户类型" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -51,7 +51,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择izcustomtype" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择izcustomtype" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择产品名称" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择产品名称" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择所属项目" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择所属项目" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访项目类别" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访项目类别" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -51,7 +51,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择IzSearch" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择IzSearch" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -51,7 +51,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择IzSearchManager" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择IzSearchManager" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择分类" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择分类" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择发布地区" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择发布地区" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -51,7 +51,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访项目类别" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访项目类别" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -51,7 +51,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户类型" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户类型" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -51,7 +51,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户名称" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户名称" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -51,7 +51,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户级别" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户级别" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择厂商" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择厂商" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务来源" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务来源" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务状态" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务状态" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择省份" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择省份" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />

@ -45,7 +45,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择计划" multiple :options="planOptons" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择计划" multiple :options="planOptons"
@update:value="onChange" @update:value="onChange"
/> />

@ -45,7 +45,8 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="users" :label-style="labStyle"> <n-form-item :label="label" path="users" :label-style="labStyle">
<n-select <n-select filterable
v-model:value="formValue.users" :max-tag-count="2" multiple placeholder="请选择提报人(可多选)" v-model:value="formValue.users" :max-tag-count="2" multiple placeholder="请选择提报人(可多选)"
:options="personOptions" @update:value="onChange" :options="personOptions" @update:value="onChange"
/> />

@ -303,16 +303,16 @@ defineExpose({
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent /> <n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
</n-form-item> </n-form-item>
<n-form-item path="logic" label="逻辑关系"> <n-form-item path="logic" label="逻辑关系">
<n-select v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" /> <n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" />
</n-form-item> </n-form-item>
<n-form-item <n-form-item
v-for="(item, index) in formValue.conditions" :key="index" :style="formItemStyle" v-for="(item, index) in formValue.conditions" :key="index" :style="formItemStyle"
path="conditions" :label="formLabel(index)" path="conditions" :label="formLabel(index)"
> >
<n-select <n-select filterable
v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions" v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions"
/> />
<n-select <n-select filterable
v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择" v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择"
:options="operatorOptions" :options="operatorOptions"
/> />
@ -322,7 +322,7 @@ defineExpose({
clearable clearable
/> />
</n-space> </n-space>
<n-select <n-select filterable
v-else v-model:value="item.result" style="margin-left: 8px;" placeholder="请选择" :options="getOptions(item.type!)" v-else v-model:value="item.result" style="margin-left: 8px;" placeholder="请选择" :options="getOptions(item.type!)"
/> />
<n-button :style="noBorderInput" icon-placement="right" @click="removeCondition(index)"> <n-button :style="noBorderInput" icon-placement="right" @click="removeCondition(index)">

@ -86,11 +86,11 @@ async function selectChange(id){
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<span>处理方式</span> <span>处理方式</span>
<n-select v-model:value="selectBackId" style="margin-top: 10px;" :options="backOptions" /> <n-select filterable v-model:value="selectBackId" style="margin-top: 10px;" :options="backOptions" />
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<span>不通过原因</span> <span>不通过原因</span>
<n-select v-model:value="selectRejectId" @change="selectChange" style="margin-top: 10px;" :options="reasonOptions" /> <n-select filterable v-model:value="selectRejectId" @change="selectChange" style="margin-top: 10px;" :options="reasonOptions" />
<n-input v-show="showOther" v-model:value="otherValue" type="textarea" placeholder="备注内容" style="margin-top: 10px;" /> <n-input v-show="showOther" v-model:value="otherValue" type="textarea" placeholder="备注内容" style="margin-top: 10px;" />
</div> </div>

@ -66,7 +66,7 @@ onBeforeMount(async () => {
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<span>判假原因</span> <span>判假原因</span>
<n-select v-model:value="selectId" style="margin-top: 10px;" :options="options" /> <n-select filterable v-model:value="selectId" style="margin-top: 10px;" :options="options" />
<n-input v-show="showOther" v-model:value="otherValue" style="margin-top: 10px;" type="textarea" /> <n-input v-show="showOther" v-model:value="otherValue" style="margin-top: 10px;" type="textarea" />
</div> </div>
</div> </div>

Loading…
Cancel
Save