diff --git a/stdiet-admin/src/main/filters/dev/application.yml b/stdiet-admin/src/main/filters/dev/application.yml index 1cc260e8a..f9c1e913b 100644 --- a/stdiet-admin/src/main/filters/dev/application.yml +++ b/stdiet-admin/src/main/filters/dev/application.yml @@ -83,7 +83,7 @@ spring: # 主库数据源 master: url: jdbc:mysql://localhost:3306/stdiet_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - password: S6QAUjVMFwWe + password: gzDxPaZcSiXJpi2N username: root slave: # 从数据源开关/默认关闭 diff --git a/stdiet-admin/src/main/filters/local/application.yml b/stdiet-admin/src/main/filters/local/application.yml index 3c7cc4ede..d8b94efbe 100644 --- a/stdiet-admin/src/main/filters/local/application.yml +++ b/stdiet-admin/src/main/filters/local/application.yml @@ -83,7 +83,7 @@ spring: # 主库数据源 master: url: jdbc:mysql://47.115.23.82:3306/stdiet_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - password: S6QAUjVMFwWe + password: gzDxPaZcSiXJpi2N username: root slave: # 从数据源开关/默认关闭 diff --git a/stdiet-admin/src/main/filters/prod/application.yml b/stdiet-admin/src/main/filters/prod/application.yml index 9c4701cca..f1095933f 100644 --- a/stdiet-admin/src/main/filters/prod/application.yml +++ b/stdiet-admin/src/main/filters/prod/application.yml @@ -83,7 +83,7 @@ spring: # 主库数据源 master: url: jdbc:mysql://localhost:3306/stdiet?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - password: S6QAUjVMFwWe + password: gzDxPaZcSiXJpi2N username: root slave: # 从数据源开关/默认关闭 diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java index 716a7614f..4b45d85b0 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java @@ -16,6 +16,9 @@ import java.math.BigDecimal; public class SysIngredient extends BaseEntity { private static final long serialVersionUID = 1L; + private int pageNum; + private int pageSize; + /** * id */ @@ -69,6 +72,19 @@ public class SysIngredient extends BaseEntity { @Excel(name = "推荐人群") private String rec; + /** + * 审核状态 + */ + private String reviewStatus; + + public void setReviewStatus(String reviewStatus) { + this.reviewStatus = reviewStatus; + } + + public String getReviewStatus() { + return reviewStatus; + } + private Long[] recIds; private Long[] notRecIds; @@ -153,6 +169,22 @@ public class SysIngredient extends BaseEntity { this.rec = rec; } + public void setPageNum(int pageNum) { + this.pageNum = pageNum; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + public int getPageNum() { + return pageNum; + } + + public int getPageSize() { + return pageSize; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysIngredientMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysIngredientMapper.xml index 51c7517c4..f51d79dd4 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysIngredientMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysIngredientMapper.xml @@ -19,6 +19,7 @@ <result property="updateTime" column="update_time" /> <result property="rec" column="rec" /> <result property="notRec" column="not_rec" /> + <result property="reviewStatus" column="review_status" /> </resultMap> <sql id="selectSysIngredientVo"> @@ -99,6 +100,7 @@ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="type != null and type != ''"> and type = #{type}</if> <if test="area != null and area != ''"> and area = #{area}</if> + <if test="reviewStatus != null and reviewStatus != ''"> and review_status = #{reviewStatus}</if> </where> </select> @@ -121,6 +123,7 @@ <if test="createTime != null">create_time,</if> <if test="updateBy != null">update_by,</if> <if test="updateTime != null">update_time,</if> + <if test="reviewStatus != null">review_status,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="name != null">#{name},</if> @@ -134,6 +137,7 @@ <if test="createTime != null">#{createTime},</if> <if test="updateBy != null">#{updateBy},</if> <if test="updateTime != null">#{updateTime},</if> + <if test="reviewStatus != null">#{reviewStatus},</if> </trim> </insert> @@ -187,6 +191,7 @@ <if test="createTime != null">create_time = #{createTime},</if> <if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateTime != null">update_time = #{updateTime},</if> + <if test="reviewStatus != null">review_status = #{reviewStatus},</if> </trim> where id = #{id} </update> diff --git a/stdiet-ui/src/views/custom/ingredient/index.vue b/stdiet-ui/src/views/custom/ingredient/index.vue index cbe64797a..6582fd130 100644 --- a/stdiet-ui/src/views/custom/ingredient/index.vue +++ b/stdiet-ui/src/views/custom/ingredient/index.vue @@ -50,6 +50,15 @@ </el-option> </el-select> </el-form-item> + <el-form-item label="审核状态" prop="reviewStatus"> + <el-select v-model="queryParams.reviewStatus" placeholder="请选择审核状态" + clearable> + <el-option v-for="dict in reviewStatusOptions" + :key="dict.dictValue" + :label="dict.dictLabel" + :value="dict.dictValue"/> + </el-select> + </el-form-item> <el-form-item> <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> @@ -105,11 +114,20 @@ <el-table v-loading="loading" :data="ingredientList" @selection-change="handleSelectionChange"> <!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column label="id" align="center" prop="id" />--> + <el-table-column label="审核状态" align="center"> + <template slot-scope="scope"> + <el-tag + :type="scope.row.reviewStatus === 'yes' ? 'success' : 'danger'" + disable-transitions> + {{scope.row.reviewStatus === 'yes' ? '已审核':'未审核'}} + </el-tag> + </template> + </el-table-column> <el-table-column label="食材名称" align="center" prop="name"/> <el-table-column label="食材类别" align="center" prop="type" :formatter="typeFormat"/> - <el-table-column label="蛋白质比例(100g)" align="center" prop="proteinRatio"/> - <el-table-column label="脂肪比例(100g)" align="center" prop="fatRatio"/> - <el-table-column label="碳水比例(100g)" align="center" prop="carbonRatio"/> + <el-table-column label="蛋白质比例(100g)" width="124" align="center" prop="proteinRatio"/> + <el-table-column label="脂肪比例(100g)" width="120" align="center" prop="fatRatio"/> + <el-table-column label="碳水比例(100g)" width="120" align="center" prop="carbonRatio"/> <el-table-column label="地域" align="center" prop="area" :formatter="areaFormat"/> <el-table-column label="忌口人群" align="center" prop="notRec"/> <el-table-column label="推荐人群" align="center" prop="rec"/> @@ -207,7 +225,7 @@ </el-select> </el-form-item> </el-col> - <el-col :span="24"> + <el-col :span="12"> <el-form-item label="推荐人群" label-width="90px"> <el-select v-model="form.recIds" multiple placeholder="请选择体征"> <el-option @@ -219,6 +237,17 @@ </el-select> </el-form-item> </el-col> + <el-col :span="12"> + <el-form-item label="审核状态" prop="reviewStatus"> + <el-select v-model="form.reviewStatus" placeholder="请选择审核状态" + clearable> + <el-option v-for="dict in reviewStatusOptions" + :key="dict.dictValue" + :label="dict.dictLabel" + :value="dict.dictValue"/> + </el-select> + </el-form-item> + </el-col> <el-col :span="24"> <el-form-item label="备注" prop="remark" label-width="90px"> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/> @@ -264,6 +293,8 @@ total: 0, // 食材表格数据 ingredientList: [], + // 审核状态 + reviewStatusOptions: [], // 弹出层标题 title: "", // 是否显示弹出层 @@ -283,6 +314,7 @@ area: null, notRecIds: null, recIds: null, + reviewStatus: null }, // 表单参数 form: {}, @@ -298,6 +330,9 @@ this.getDicts("cus_area").then(response => { this.areaOptions = response.data; }); + this.getDicts("cus_review_status").then(response => { + this.reviewStatusOptions = response.data; + }) listPhysicalSigns().then(response => { this.physicalSignsOptions = response.rows.map(obj => ({ dictLabel: obj.name, @@ -434,7 +469,7 @@ this.download(response.msg); }).catch(function () { }); - } + }, } }; </script>