feat: 在多个请求模型中添加分组名称字段,优化选择框组件以支持清除功能
This commit is contained in:
@@ -22,8 +22,7 @@
|
||||
"clean:cache": "rimraf .eslintcache && rimraf node_modules && pnpm install",
|
||||
"prepare": "husky && husky install",
|
||||
"release": "bumpp",
|
||||
"generate:api": "openapi-generator-cli generate -i http://127.0.0.1:12401/api.json -g typescript-axios -o ./src/api/generated -p withSeparateModelsAndApi=true,modelPackage=models,apiPackage=apis,useTagAsApiPackage=true,sortParamsByRequiredFlag=true,useSquareBracketsInArrayNames=true,withInterfaces=false,useSingleRequestParameter=true,stringEnums=true",
|
||||
"generate:hooks": "tsx scripts/generate-hooks.ts"
|
||||
"generate:api": "openapi-generator-cli generate -i http://127.0.0.1:12401/api.json -g typescript-axios -o ./src/api/generated -p withSeparateModelsAndApi=true,modelPackage=models,apiPackage=apis,useTagAsApiPackage=true,sortParamsByRequiredFlag=true,useSquareBracketsInArrayNames=true,withInterfaces=false,useSingleRequestParameter=true,stringEnums=true"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,ts,jsx,tsx}": [
|
||||
|
||||
@@ -5764,6 +5764,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartGroupListGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [userId] 用户ID
|
||||
* @param {string} [name] 分组名称
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@@ -5771,6 +5772,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartGroupListGetPageSizeEnum,
|
||||
userId?: string,
|
||||
name?: string,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'current' is not null or undefined
|
||||
@@ -5805,6 +5807,10 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
localVarQueryParameter['userId'] = userId;
|
||||
}
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameter['name'] = name;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
@@ -14077,6 +14083,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartGroupListGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [userId] 用户ID
|
||||
* @param {string} [name] 分组名称
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@@ -14084,6 +14091,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartGroupListGetPageSizeEnum,
|
||||
userId?: string,
|
||||
name?: string,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
@@ -14096,6 +14104,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
current,
|
||||
pageSize,
|
||||
userId,
|
||||
name,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
@@ -19066,6 +19075,7 @@ export const DefaultApiFactory = function (
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.userId,
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then(request => request(axios, basePath));
|
||||
@@ -24962,6 +24972,13 @@ export interface DefaultApiApiCardInfoWalmartGroupListGetRequest {
|
||||
* @memberof DefaultApiApiCardInfoWalmartGroupListGet
|
||||
*/
|
||||
readonly userId?: string;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
* @type {string}
|
||||
* @memberof DefaultApiApiCardInfoWalmartGroupListGet
|
||||
*/
|
||||
readonly name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28606,6 +28623,7 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.userId,
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
|
||||
@@ -36,6 +36,12 @@ export interface KamiApiCardInfoWalmartV1GroupListReq {
|
||||
* @memberof KamiApiCardInfoWalmartV1GroupListReq
|
||||
*/
|
||||
userId?: string;
|
||||
/**
|
||||
* 分组名称
|
||||
* @type {string}
|
||||
* @memberof KamiApiCardInfoWalmartV1GroupListReq
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item field="createdUserName" label="创建人">
|
||||
<a-select v-model="formModel.createdUserName">
|
||||
<a-select v-model="formModel.createdUserName" allow-clear>
|
||||
<a-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
|
||||
@@ -190,7 +190,7 @@ export default defineComponent({
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<FormItem field='userId' label='创建人'>
|
||||
<Select v-model={formModel.value.userId}>
|
||||
<Select v-model={formModel.value.userId} allow-clear>
|
||||
{userList.value.map(item => (
|
||||
<Option key={item.id} value={item.id}>
|
||||
{item.userName}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item field="userId" label="创建人">
|
||||
<a-select v-model="searchForm.userId">
|
||||
<a-select v-model="searchForm.userId" allow-clear>
|
||||
<a-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
@@ -201,7 +201,8 @@ const fetchData = async () => {
|
||||
current: pagination.current,
|
||||
pageSize:
|
||||
pagination.pageSize as ApiCardInfoWalmartGroupListGetPageSizeEnum,
|
||||
userId: searchForm.userId
|
||||
userId: searchForm.userId,
|
||||
name: searchForm.name
|
||||
},
|
||||
{
|
||||
paramsSerializer: obj => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { apiClient } from '@/api';
|
||||
import type {
|
||||
ApiCardInfoWalmartAccountDailySummaryGetPageSizeEnum,
|
||||
ApiCardInfoWalmartGroupExportGetPageSizeEnum,
|
||||
ApiCardInfoWalmartGroupStatGetPageSizeEnum,
|
||||
KamiApiCardInfoWalmartV1V1CardRedeemAccountGroupEntity,
|
||||
@@ -26,7 +25,6 @@ import {
|
||||
type TableColumnData
|
||||
} from '@arco-design/web-vue';
|
||||
import { defineComponent, onMounted, reactive, ref } from 'vue';
|
||||
import qs from 'query-string';
|
||||
|
||||
interface IformData {
|
||||
accountId: string;
|
||||
@@ -197,7 +195,7 @@ export default defineComponent({
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<FormItem field='userId' label='创建人'>
|
||||
<Select v-model={formModel.value.userId}>
|
||||
<Select v-model={formModel.value.userId} allow-clear>
|
||||
{userList.value.map(item => (
|
||||
<Option
|
||||
key={item.id}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item field="userId" label="账号所属用户">
|
||||
<a-select v-model="formModel.userId">
|
||||
<a-select v-model="formModel.userId" allow-clear>
|
||||
<a-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
|
||||
Reference in New Issue
Block a user