门户网站管理:关于我们信息、关于我们详情、联系我们信息完善
master
xs 2 weeks ago
parent afddf2994e
commit 8b54538f4b

@ -1,5 +1,6 @@
package com.ruoyi.portal.controller; package com.ruoyi.portal.controller;
import com.ruoyi.common.core.utils.ip.IpUtils;
import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.core.web.page.TableDataInfo;
@ -102,6 +103,7 @@ public class HwPortalController extends BaseController
@PostMapping("/addContactUsInfo") @PostMapping("/addContactUsInfo")
public AjaxResult addContactUsInfo(@RequestBody HwContactUsInfo hwContactUsInfo) public AjaxResult addContactUsInfo(@RequestBody HwContactUsInfo hwContactUsInfo)
{ {
hwContactUsInfo.setUserIp(IpUtils.getIpAddr());
return toAjax(hwContactUsInfoService.insertHwContactUsInfo(hwContactUsInfo)); return toAjax(hwContactUsInfoService.insertHwContactUsInfo(hwContactUsInfo));
} }

@ -54,6 +54,7 @@ public class HwContactUsInfoServiceImpl implements IHwContactUsInfoService
@Override @Override
public int insertHwContactUsInfo(HwContactUsInfo hwContactUsInfo) public int insertHwContactUsInfo(HwContactUsInfo hwContactUsInfo)
{ {
hwContactUsInfo.setCreateTime(DateUtils.getNowDate()); hwContactUsInfo.setCreateTime(DateUtils.getNowDate());
return hwContactUsInfoMapper.insertHwContactUsInfo(hwContactUsInfo); return hwContactUsInfoMapper.insertHwContactUsInfo(hwContactUsInfo);
} }

@ -25,8 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectHwAboutUsInfoDetailVo"/> <include refid="selectHwAboutUsInfoDetailVo"/>
<where> <where>
<if test="aboutUsInfoId != null "> and about_us_info_id = #{aboutUsInfoId}</if> <if test="aboutUsInfoId != null "> and about_us_info_id = #{aboutUsInfoId}</if>
<if test="usInfoDetailTitle != null and usInfoDetailTitle != ''"> and us_info_detail_title = #{usInfoDetailTitle}</if> <if test="usInfoDetailTitle != null and usInfoDetailTitle != ''"> and us_info_detail_title like concat('%', #{usInfoDetailTitle}, '%')</if>
<if test="usInfoDetailDesc != null and usInfoDetailDesc != ''"> and us_info_detail_desc = #{usInfoDetailDesc}</if> <if test="usInfoDetailDesc != null and usInfoDetailDesc != ''"> and us_info_detail_desc like concat('%', #{usInfoDetailDesc}, '%')</if>
<if test="usInfoDetailOrder != null "> and us_info_detail_order = #{usInfoDetailOrder}</if> <if test="usInfoDetailOrder != null "> and us_info_detail_order = #{usInfoDetailOrder}</if>
<if test="usInfoDetailPic != null and usInfoDetailPic != ''"> and us_info_detail_pic = #{usInfoDetailPic}</if> <if test="usInfoDetailPic != null and usInfoDetailPic != ''"> and us_info_detail_pic = #{usInfoDetailPic}</if>
</where> </where>

@ -27,8 +27,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectHwAboutUsInfoVo"/> <include refid="selectHwAboutUsInfoVo"/>
<where> <where>
<if test="aboutUsInfoType != null and aboutUsInfoType != ''"> and about_us_info_type = #{aboutUsInfoType}</if> <if test="aboutUsInfoType != null and aboutUsInfoType != ''"> and about_us_info_type = #{aboutUsInfoType}</if>
<if test="aboutUsInfoTitle != null and aboutUsInfoTitle != ''"> and about_us_info_title = #{aboutUsInfoTitle}</if> <if test="aboutUsInfoTitle != null and aboutUsInfoTitle != ''"> and about_us_info_title like concat('%', #{aboutUsInfoTitle }, '%') </if>
<if test="aboutUsInfoDesc != null and aboutUsInfoDesc != ''"> and about_us_info_desc = #{aboutUsInfoDesc}</if> <if test="aboutUsInfoDesc != null and aboutUsInfoDesc != ''"> and about_us_info_desc like concat('%', #{aboutUsInfoDesc}, '%')</if>
<if test="aboutUsInfoOrder != null "> and about_us_info_order = #{aboutUsInfoOrder}</if> <if test="aboutUsInfoOrder != null "> and about_us_info_order = #{aboutUsInfoOrder}</if>
<if test="aboutUsInfoPic != null and aboutUsInfoPic != ''"> and about_us_info_pic = #{aboutUsInfoPic}</if> <if test="aboutUsInfoPic != null and aboutUsInfoPic != ''"> and about_us_info_pic = #{aboutUsInfoPic}</if>
</where> </where>

@ -25,9 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectHwContactUsInfoVo"/> <include refid="selectHwContactUsInfoVo"/>
<where> <where>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if> <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="userEmail != null and userEmail != ''"> and user_email = #{userEmail}</if> <if test="userEmail != null and userEmail != ''"> and user_email like concat('%', #{userEmail}, '%')</if>
<if test="userPhone != null and userPhone != ''"> and user_phone = #{userPhone}</if> <if test="userPhone != null and userPhone != ''"> and user_phone like concat('%', #{userPhone}, '%')</if>
<if test="userIp != null and userIp != ''"> and user_ip = #{userIp}</if> <if test="userIp != null and userIp != ''"> and user_ip like concat('%', #{userIp}, '%')</if>
</where> </where>
</select> </select>

@ -25,14 +25,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="图片地址" prop="aboutUsInfoPic">
<el-input
v-model="queryParams.aboutUsInfoPic"
placeholder="请输入图片地址"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -88,13 +80,25 @@
<el-table v-loading="loading" :data="aboutUsInfoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="aboutUsInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="aboutUsInfoId" /> <el-table-column label="主键标识" align="center" prop="aboutUsInfoId" />
<el-table-column label="类型" align="center" prop="aboutUsInfoType" /> <el-table-column label="类型" align="center" prop="aboutUsInfoType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.hw_about_us_info_type" :value="scope.row.aboutUsInfoType"/>
</template>
</el-table-column>
<el-table-column label="中文标题" align="center" prop="aboutUsInfoTitle" /> <el-table-column label="中文标题" align="center" prop="aboutUsInfoTitle" />
<el-table-column label="英文标题" align="center" prop="aboutUsInfoEtitle" /> <el-table-column label="英文标题" align="center" prop="aboutUsInfoEtitle" />
<el-table-column label="内容" align="center" prop="aboutUsInfoDesc" /> <el-table-column label="内容" align="center" prop="aboutUsInfoDesc" />
<el-table-column label="顺序" align="center" prop="aboutUsInfoOrder" /> <el-table-column label="顺序" align="center" prop="aboutUsInfoOrder" />
<el-table-column label="显示模式" align="center" prop="displayModal" /> <el-table-column label="显示模式" align="center" prop="displayModal" >
<el-table-column label="图片地址" align="center" prop="aboutUsInfoPic" /> <template slot-scope="scope">
<dict-tag :options="dict.type.hw_about_us_info_display_modal" :value="scope.row.displayModal"/>
</template>
</el-table-column>
<el-table-column label="图片" align="center" prop="aboutUsInfoPic" >
<template slot-scope="scope" v-if="scope.row.aboutUsInfoPic && scope.row.aboutUsInfoPic!=null && scope.row.aboutUsInfoPic!=undefined && scope.row.aboutUsInfoPic!==''">
<img :src="scope.row.aboutUsInfoPic" alt="图片" style="width: 200px;height:150px;">
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -140,19 +144,36 @@
<el-input v-model="form.aboutUsInfoEtitle" placeholder="请输入英文标题" /> <el-input v-model="form.aboutUsInfoEtitle" placeholder="请输入英文标题" />
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="aboutUsInfoType"> <el-form-item label="类型" prop="aboutUsInfoType">
<el-input v-model="form.aboutUsInfoType" placeholder="请输入类型" /> <el-select v-model="form.aboutUsInfoType" placeholder="请选择类型" clearable>
</el-form-item> <el-option
<el-form-item label="内容" prop="aboutUsInfoDesc"> v-for="dict in dict.type.hw_about_us_info_type"
<el-input v-model="form.aboutUsInfoDesc" placeholder="请输入内容" /> :key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="顺序" prop="aboutUsInfoOrder"> <el-form-item label="顺序" prop="aboutUsInfoOrder">
<el-input v-model="form.aboutUsInfoOrder" placeholder="请输入顺序" /> <el-input v-model="form.aboutUsInfoOrder" placeholder="请输入顺序" />
</el-form-item> </el-form-item>
<el-form-item label="显示模式" prop="displayModal"> <el-form-item label="显示模式" prop="displayModal">
<el-input v-model="form.displayModal" placeholder="请输入显示模式" /> <el-select v-model="form.displayModal" placeholder="请选择显示模式" clearable>
<el-option
v-for="dict in dict.type.hw_about_us_info_display_modal"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="内容" prop="aboutUsInfoDesc">
<el-input v-model="form.aboutUsInfoDesc" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="图片" prop="aboutUsInfoPic"> <el-form-item label="图片" prop="aboutUsInfoPic">
<el-upload <el-upload
single single
@ -211,6 +232,7 @@ import {getToken} from "@/utils/auth";
export default { export default {
name: "AboutUsInfo", name: "AboutUsInfo",
dicts: ['hw_about_us_info_type','hw_about_us_info_display_modal'],
props: { props: {
value: [String, Object, Array], value: [String, Object, Array],
// //
@ -271,6 +293,9 @@ export default {
aboutUsInfoTitle: [ aboutUsInfoTitle: [
{ required: true, message: "标题不能为空", trigger: "blur" } { required: true, message: "标题不能为空", trigger: "blur" }
], ],
aboutUsInfoType: [
{ required: true, message: "类型不能为空", trigger: "change" }
],
aboutUsInfoDesc: [ aboutUsInfoDesc: [
{ required: true, message: "内容不能为空", trigger: "blur" } { required: true, message: "内容不能为空", trigger: "blur" }
], ],

@ -1,14 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关于我们信息ID" prop="aboutUsInfoId">
<el-input
v-model="queryParams.aboutUsInfoId"
placeholder="请输入关于我们信息ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="标题" prop="usInfoDetailTitle"> <el-form-item label="标题" prop="usInfoDetailTitle">
<el-input <el-input
v-model="queryParams.usInfoDetailTitle" v-model="queryParams.usInfoDetailTitle"
@ -33,14 +25,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="图片地址" prop="usInfoDetailPic">
<el-input
v-model="queryParams.usInfoDetailPic"
placeholder="请输入图片地址"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -96,11 +81,14 @@
<el-table v-loading="loading" :data="aboutUsInfoDetailList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="aboutUsInfoDetailList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="usInfoDetailId" /> <el-table-column label="主键标识" align="center" prop="usInfoDetailId" />
<el-table-column label="关于我们信息ID" align="center" prop="aboutUsInfoId" />
<el-table-column label="标题" align="center" prop="usInfoDetailTitle" /> <el-table-column label="标题" align="center" prop="usInfoDetailTitle" />
<el-table-column label="内容" align="center" prop="usInfoDetailDesc" /> <el-table-column label="内容" align="center" prop="usInfoDetailDesc" />
<el-table-column label="顺序" align="center" prop="usInfoDetailOrder" /> <el-table-column label="顺序" align="center" prop="usInfoDetailOrder" />
<el-table-column label="图片地址" align="center" prop="usInfoDetailPic" /> <el-table-column label="图片" align="center" prop="usInfoDetailPic" >
<template slot-scope="scope" v-if="scope.row.usInfoDetailPic && scope.row.usInfoDetailPic!=null && scope.row.usInfoDetailPic!=undefined && scope.row.usInfoDetailPic!==''">
<img :src="scope.row.usInfoDetailPic" alt="图片" style="width: 200px;height:150px;">
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -132,9 +120,6 @@
<!-- 添加或修改关于我们信息明细对话框 --> <!-- 添加或修改关于我们信息明细对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="关于我们信息ID" prop="aboutUsInfoId">
<el-input v-model="form.aboutUsInfoId" placeholder="请输入关于我们信息ID" />
</el-form-item>
<el-form-item label="标题" prop="usInfoDetailTitle"> <el-form-item label="标题" prop="usInfoDetailTitle">
<el-input v-model="form.usInfoDetailTitle" placeholder="请输入标题" /> <el-input v-model="form.usInfoDetailTitle" placeholder="请输入标题" />
</el-form-item> </el-form-item>

@ -40,16 +40,6 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['portal:contactUsInfo:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -111,7 +101,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"

Loading…
Cancel
Save