網(wǎng)站首頁 Vue 正文
未處理時(shí),表單傳值如下:
timeRange[0]: 2022-10-14
timeRange[1]: 2022-11-14
customerRegionint[0]: 山西省
customerRegionint[1]: 長治市
industry[0]: 1,1-1
industry[1]: 1,1-2
industry[2]: 2,2-1
industry[3]: 2,2-2
industry[4]: 2,2-3
industry[5]: 2,2-4
只需要加這句處理一下: this.queryParams.timeRange = this.queryParams.timeRange.join(",")
/** 查詢客戶列表 */
getList() {
this.loading = true;
// 復(fù)制對象
var queryParams = JSON.parse(JSON.stringify(this.queryParams));
//時(shí)間換成字符串?dāng)?shù)組
if (this.queryParams.timeRange) {
queryParams.timeRange = this.queryParams.timeRange.join(",");
}
// 行業(yè)換成字符串?dāng)?shù)組
if (this.queryParams.industry) {
queryParams.industry = this.queryParams.industry.join(",");
}
// 地區(qū)換成字符串?dāng)?shù)組
if (this.queryParams.customerRegionint) {
queryParams.customerRegionint =
this.queryParams.customerRegionint.join(",");
}
console.log(queryParams);
listCustomer(queryParams).then((response) => {
this.customerList = response.rows;
this.total = response.total;
this.loading = false;
});
},
表單傳值的結(jié)果如下:
timeRange: 2022-10-07,2022-11-15
customerRegionint: 內(nèi)蒙古自治區(qū),赤峰市
industry: 1,1-1,1,1-2,2,2-1,2,2-2,2,2-3,2,2-4
原文鏈接:https://blog.csdn.net/weixin_38897313/article/details/127257833
- 上一篇:沒有了
- 下一篇:沒有了
相關(guān)推薦
- 2023-08-01 elementui DateTimePicker組件 限制時(shí)間范圍(包含時(shí)分秒)
- 2023-07-25 適用SpringMVC實(shí)現(xiàn)圖片上傳功能
- 2022-12-03 SQL?Server如何通過SQL語句直接操作另一臺(tái)服務(wù)器上的SQL?SERVER的數(shù)據(jù)_MsSql
- 2022-10-29 Clickhouse通過命令導(dǎo)入導(dǎo)出文件(在Linux命令窗口)
- 2023-10-26 解決:NODE_ENV 不是內(nèi)部或外部命令,也不是可運(yùn)行的程序,或者批處理文件
- 2022-05-31 postman批量執(zhí)行接口測試的圖文步驟_其它綜合
- 2022-12-02 AVFoundation?AVCaptureSession媒體捕捉_IOS
- 2022-10-05 Android?Flutter實(shí)現(xiàn)原理淺析_Android
- 欄目分類
-
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支