多关键字搜索
This commit is contained in:
parent
73d716126c
commit
ccef6fa24c
@ -29,8 +29,8 @@ public class SysRecipesTemplateController extends BaseController {
|
||||
* 查询
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('recipes:template:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysRecipesTemplate sysRecipesTemplate) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody SysRecipesTemplate sysRecipesTemplate) {
|
||||
startPage();
|
||||
List<SysRecipesTemplate> list = iSysRecipesTemplateService.selectRecipesTemplateListByCondition(sysRecipesTemplate);
|
||||
return getDataTable(list);
|
||||
|
@ -36,4 +36,6 @@ public class SysRecipesTemplate {
|
||||
Long recipesId;
|
||||
|
||||
Integer reviewStatus;
|
||||
|
||||
String[] keys;
|
||||
}
|
||||
|
@ -31,7 +31,11 @@
|
||||
left join sys_user su_nutritionist on su_nutritionist.user_id = srt.nutritionist_id and su_nutritionist.del_flag = 0
|
||||
left join sys_user su_nutritionist_assis on su_nutritionist_assis.user_id = srt.nutri_assis_id and su_nutritionist_assis.del_flag = 0
|
||||
where srt.del_flag = 0
|
||||
<if test="name != null and name != ''">and srt.name like concat('%', #{name}, '%') or srt.remark like concat('%', #{name}, '%')</if>
|
||||
<if test="keys != null">and
|
||||
<foreach collection="keys" item="key" separator="and" open="(" close=")">
|
||||
srt.name like concat('%', #{key}, '%') or srt.remark like concat('%', #{key}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="nutriAssisId != null ">and srt.nutri_assis_id = #{nutriAssisId}</if>
|
||||
<if test="nutritionistId != null ">and srt.nutritionist_id = #{nutritionistId}</if>
|
||||
<if test="reviewStatus != null ">and srp.review_status = #{reviewStatus}</if>
|
||||
|
@ -1,10 +1,11 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function listRecipesTemplate(query) {
|
||||
export function listRecipesTemplate(data) {
|
||||
return request({
|
||||
url: "/recipes/template/list",
|
||||
method: "get",
|
||||
params: query
|
||||
method: "post",
|
||||
// params: query
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="template_view_wrapper">
|
||||
<div class="header">
|
||||
<div style="fontWeight: bold">选择模板</div>
|
||||
<div style="fontweight: bold">选择模板</div>
|
||||
<el-button size="mini" @click="handleOnBackClick">返回</el-button>
|
||||
</div>
|
||||
<div class="content">
|
||||
@ -131,7 +131,9 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRecipesTemplate(this.queryParams).then((res) => {
|
||||
const params = JSON.parse(JSON.stringify(this.queryParams));
|
||||
params.keys = (params.name || "").split(" ");
|
||||
listRecipesTemplate(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.dataList = res.rows;
|
||||
this.total = res.total;
|
||||
|
@ -12,6 +12,7 @@
|
||||
placeholder="请输入客户姓名或手机号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" prop="planStartDateScope">
|
||||
|
@ -269,7 +269,9 @@ export default {
|
||||
/** 查询食谱计划列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRecipesTemplate(this.queryParams).then((response) => {
|
||||
const params = JSON.parse(JSON.stringify(this.queryParams));
|
||||
params.keys = params.name ? params.name.split(" ") : null;
|
||||
listRecipesTemplate(params).then((response) => {
|
||||
this.recipesTemplateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
@ -10,6 +10,7 @@
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
@keyup.enter.native="handleQuery"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user