Compare commits

...

2 Commits

@ -0,0 +1,213 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.StoreupEntity;
import com.entity.view.StoreupView;
import com.service.StoreupService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
*
*
* @author
* @email
*/
@RestController
@RequestMapping("/storeup")
public class StoreupController {
@Autowired
private StoreupService storeupService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,StoreupEntity storeup, HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,StoreupEntity storeup, HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( StoreupEntity storeup){
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
return R.ok().put("data", storeupService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(StoreupEntity storeup){
EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
StoreupView storeupView = storeupService.selectView(ew);
return R.ok("查询收藏表成功").put("data", storeupView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
storeupService.insert(storeup);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
storeupService.insert(storeup);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody StoreupEntity storeup, HttpServletRequest request){
//ValidatorUtils.validateEntity(storeup);
storeupService.updateById(storeup);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
storeupService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<StoreupEntity> wrapper = new EntityWrapper<StoreupEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
}
int count = storeupService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,216 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.WeixiuchuliEntity;
import com.entity.view.WeixiuchuliView;
import com.service.WeixiuchuliService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
*
*
* @author
* @email
*/
@RestController
@RequestMapping("/weixiuchuli")
public class WeixiuchuliController {
@Autowired
private WeixiuchuliService weixiuchuliService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("fangzhu")) {
weixiuchuli.setFangzhuzhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
weixiuchuli.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<WeixiuchuliEntity> ew = new EntityWrapper<WeixiuchuliEntity>();
PageUtils page = weixiuchuliService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, weixiuchuli), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
EntityWrapper<WeixiuchuliEntity> ew = new EntityWrapper<WeixiuchuliEntity>();
PageUtils page = weixiuchuliService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, weixiuchuli), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( WeixiuchuliEntity weixiuchuli){
EntityWrapper<WeixiuchuliEntity> ew = new EntityWrapper<WeixiuchuliEntity>();
ew.allEq(MPUtil.allEQMapPre( weixiuchuli, "weixiuchuli"));
return R.ok().put("data", weixiuchuliService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(WeixiuchuliEntity weixiuchuli){
EntityWrapper< WeixiuchuliEntity> ew = new EntityWrapper< WeixiuchuliEntity>();
ew.allEq(MPUtil.allEQMapPre( weixiuchuli, "weixiuchuli"));
WeixiuchuliView weixiuchuliView = weixiuchuliService.selectView(ew);
return R.ok("查询维修处理成功").put("data", weixiuchuliView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
WeixiuchuliEntity weixiuchuli = weixiuchuliService.selectById(id);
return R.ok().put("data", weixiuchuli);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
WeixiuchuliEntity weixiuchuli = weixiuchuliService.selectById(id);
return R.ok().put("data", weixiuchuli);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
weixiuchuli.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(weixiuchuli);
weixiuchuliService.insert(weixiuchuli);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
weixiuchuli.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(weixiuchuli);
weixiuchuliService.insert(weixiuchuli);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
//ValidatorUtils.validateEntity(weixiuchuli);
weixiuchuliService.updateById(weixiuchuli);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
weixiuchuliService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<WeixiuchuliEntity> wrapper = new EntityWrapper<WeixiuchuliEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("fangzhu")) {
wrapper.eq("fangzhuzhanghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
int count = weixiuchuliService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,32 @@
package com.dao;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.StoreupVO;
import com.entity.view.StoreupView;
/**
*
*
* @author
* @email
*/
public interface StoreupDao extends BaseMapper<StoreupEntity> {
List<StoreupVO> selectListVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
StoreupVO selectVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(Pagination page,@Param("ew") Wrapper<StoreupEntity> wrapper);
StoreupView selectView(@Param("ew") Wrapper<StoreupEntity> wrapper);
}

@ -0,0 +1,32 @@
package com.dao;
import com.entity.WeixiuchuliEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.WeixiuchuliVO;
import com.entity.view.WeixiuchuliView;
/**
*
*
* @author
* @email
*/
public interface WeixiuchuliDao extends BaseMapper<WeixiuchuliEntity> {
List<WeixiuchuliVO> selectListVO(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
WeixiuchuliVO selectVO(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
List<WeixiuchuliView> selectListView(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
List<WeixiuchuliView> selectListView(Pagination page,@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
WeixiuchuliView selectView(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
}

@ -0,0 +1,163 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
*/
@TableName("storeup")
public class StoreupEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public StoreupEntity() {
}
public StoreupEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long userid;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
}

@ -0,0 +1,291 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
*/
@TableName("weixiuchuli")
public class WeixiuchuliEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public WeixiuchuliEntity() {
}
public WeixiuchuliEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String fangwumingcheng;
/**
*
*/
private String fangwuleixing;
/**
*
*/
private String baoxiumingcheng;
/**
*
*/
private String leixing;
/**
*
*/
private String baoxiuriqi;
/**
*
*/
private String weixiufankui;
/**
*
*/
private String weixiujindu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
@DateTimeFormat
private Date gengxinriqi;
/**
*
*/
private String fangzhuzhanghao;
/**
*
*/
private String fangzhuxingming;
/**
*
*/
private String yonghuming;
/**
*
*/
private String lianxidianhua;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public void setFangwumingcheng(String fangwumingcheng) {
this.fangwumingcheng = fangwumingcheng;
}
/**
*
*/
public String getFangwumingcheng() {
return fangwumingcheng;
}
/**
*
*/
public void setFangwuleixing(String fangwuleixing) {
this.fangwuleixing = fangwuleixing;
}
/**
*
*/
public String getFangwuleixing() {
return fangwuleixing;
}
/**
*
*/
public void setBaoxiumingcheng(String baoxiumingcheng) {
this.baoxiumingcheng = baoxiumingcheng;
}
/**
*
*/
public String getBaoxiumingcheng() {
return baoxiumingcheng;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setBaoxiuriqi(String baoxiuriqi) {
this.baoxiuriqi = baoxiuriqi;
}
/**
*
*/
public String getBaoxiuriqi() {
return baoxiuriqi;
}
/**
*
*/
public void setWeixiufankui(String weixiufankui) {
this.weixiufankui = weixiufankui;
}
/**
*
*/
public String getWeixiufankui() {
return weixiufankui;
}
/**
*
*/
public void setWeixiujindu(String weixiujindu) {
this.weixiujindu = weixiujindu;
}
/**
*
*/
public String getWeixiujindu() {
return weixiujindu;
}
/**
*
*/
public void setGengxinriqi(Date gengxinriqi) {
this.gengxinriqi = gengxinriqi;
}
/**
*
*/
public Date getGengxinriqi() {
return gengxinriqi;
}
/**
*
*/
public void setFangzhuzhanghao(String fangzhuzhanghao) {
this.fangzhuzhanghao = fangzhuzhanghao;
}
/**
*
*/
public String getFangzhuzhanghao() {
return fangzhuzhanghao;
}
/**
*
*/
public void setFangzhuxingming(String fangzhuxingming) {
this.fangzhuxingming = fangzhuxingming;
}
/**
*
*/
public String getFangzhuxingming() {
return fangzhuxingming;
}
/**
*
*/
public void setYonghuming(String yonghuming) {
this.yonghuming = yonghuming;
}
/**
*
*/
public String getYonghuming() {
return yonghuming;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
}

@ -0,0 +1,112 @@
package com.entity.model;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
/**
*
*
* ModelAndView model
* @author
* @email
*/
public class StoreupModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
}

@ -0,0 +1,268 @@
package com.entity.model;
import com.entity.WeixiuchuliEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
/**
*
*
* ModelAndView model
* @author
* @email
*/
public class WeixiuchuliModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String fangwuleixing;
/**
*
*/
private String baoxiumingcheng;
/**
*
*/
private String leixing;
/**
*
*/
private String baoxiuriqi;
/**
*
*/
private String weixiufankui;
/**
*
*/
private String weixiujindu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date gengxinriqi;
/**
*
*/
private String fangzhuzhanghao;
/**
*
*/
private String fangzhuxingming;
/**
*
*/
private String yonghuming;
/**
*
*/
private String lianxidianhua;
/**
*
*/
public void setFangwuleixing(String fangwuleixing) {
this.fangwuleixing = fangwuleixing;
}
/**
*
*/
public String getFangwuleixing() {
return fangwuleixing;
}
/**
*
*/
public void setBaoxiumingcheng(String baoxiumingcheng) {
this.baoxiumingcheng = baoxiumingcheng;
}
/**
*
*/
public String getBaoxiumingcheng() {
return baoxiumingcheng;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setBaoxiuriqi(String baoxiuriqi) {
this.baoxiuriqi = baoxiuriqi;
}
/**
*
*/
public String getBaoxiuriqi() {
return baoxiuriqi;
}
/**
*
*/
public void setWeixiufankui(String weixiufankui) {
this.weixiufankui = weixiufankui;
}
/**
*
*/
public String getWeixiufankui() {
return weixiufankui;
}
/**
*
*/
public void setWeixiujindu(String weixiujindu) {
this.weixiujindu = weixiujindu;
}
/**
*
*/
public String getWeixiujindu() {
return weixiujindu;
}
/**
*
*/
public void setGengxinriqi(Date gengxinriqi) {
this.gengxinriqi = gengxinriqi;
}
/**
*
*/
public Date getGengxinriqi() {
return gengxinriqi;
}
/**
*
*/
public void setFangzhuzhanghao(String fangzhuzhanghao) {
this.fangzhuzhanghao = fangzhuzhanghao;
}
/**
*
*/
public String getFangzhuzhanghao() {
return fangzhuzhanghao;
}
/**
*
*/
public void setFangzhuxingming(String fangzhuxingming) {
this.fangzhuxingming = fangzhuxingming;
}
/**
*
*/
public String getFangzhuxingming() {
return fangzhuxingming;
}
/**
*
*/
public void setYonghuming(String yonghuming) {
this.yonghuming = yonghuming;
}
/**
*
*/
public String getYonghuming() {
return yonghuming;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
}

@ -0,0 +1,35 @@
package com.entity.view;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
*/
@TableName("storeup")
public class StoreupView extends StoreupEntity implements Serializable {
private static final long serialVersionUID = 1L;
public StoreupView(){
}
public StoreupView(StoreupEntity storeupEntity){
try {
BeanUtils.copyProperties(this, storeupEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,35 @@
package com.entity.view;
import com.entity.WeixiuchuliEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
*/
@TableName("weixiuchuli")
public class WeixiuchuliView extends WeixiuchuliEntity implements Serializable {
private static final long serialVersionUID = 1L;
public WeixiuchuliView(){
}
public WeixiuchuliView(WeixiuchuliEntity weixiuchuliEntity){
try {
BeanUtils.copyProperties(this, weixiuchuliEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,112 @@
package com.entity.vo;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
*/
public class StoreupVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
}

@ -0,0 +1,268 @@
package com.entity.vo;
import com.entity.WeixiuchuliEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
*/
public class WeixiuchuliVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String fangwuleixing;
/**
*
*/
private String baoxiumingcheng;
/**
*
*/
private String leixing;
/**
*
*/
private String baoxiuriqi;
/**
*
*/
private String weixiufankui;
/**
*
*/
private String weixiujindu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date gengxinriqi;
/**
*
*/
private String fangzhuzhanghao;
/**
*
*/
private String fangzhuxingming;
/**
*
*/
private String yonghuming;
/**
*
*/
private String lianxidianhua;
/**
*
*/
public void setFangwuleixing(String fangwuleixing) {
this.fangwuleixing = fangwuleixing;
}
/**
*
*/
public String getFangwuleixing() {
return fangwuleixing;
}
/**
*
*/
public void setBaoxiumingcheng(String baoxiumingcheng) {
this.baoxiumingcheng = baoxiumingcheng;
}
/**
*
*/
public String getBaoxiumingcheng() {
return baoxiumingcheng;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setBaoxiuriqi(String baoxiuriqi) {
this.baoxiuriqi = baoxiuriqi;
}
/**
*
*/
public String getBaoxiuriqi() {
return baoxiuriqi;
}
/**
*
*/
public void setWeixiufankui(String weixiufankui) {
this.weixiufankui = weixiufankui;
}
/**
*
*/
public String getWeixiufankui() {
return weixiufankui;
}
/**
*
*/
public void setWeixiujindu(String weixiujindu) {
this.weixiujindu = weixiujindu;
}
/**
*
*/
public String getWeixiujindu() {
return weixiujindu;
}
/**
*
*/
public void setGengxinriqi(Date gengxinriqi) {
this.gengxinriqi = gengxinriqi;
}
/**
*
*/
public Date getGengxinriqi() {
return gengxinriqi;
}
/**
*
*/
public void setFangzhuzhanghao(String fangzhuzhanghao) {
this.fangzhuzhanghao = fangzhuzhanghao;
}
/**
*
*/
public String getFangzhuzhanghao() {
return fangzhuzhanghao;
}
/**
*
*/
public void setFangzhuxingming(String fangzhuxingming) {
this.fangzhuxingming = fangzhuxingming;
}
/**
*
*/
public String getFangzhuxingming() {
return fangzhuxingming;
}
/**
*
*/
public void setYonghuming(String yonghuming) {
this.yonghuming = yonghuming;
}
/**
*
*/
public String getYonghuming() {
return yonghuming;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
}

@ -0,0 +1,36 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.StoreupEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.StoreupVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.StoreupView;
/**
*
*
* @author
* @email
* @date 2021-03-04 18:46:21
*/
public interface StoreupService extends IService<StoreupEntity> {
PageUtils queryPage(Map<String, Object> params);
List<StoreupVO> selectListVO(Wrapper<StoreupEntity> wrapper);
StoreupVO selectVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(Wrapper<StoreupEntity> wrapper);
StoreupView selectView(@Param("ew") Wrapper<StoreupEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<StoreupEntity> wrapper);
}

@ -0,0 +1,36 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.WeixiuchuliEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.WeixiuchuliVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.WeixiuchuliView;
/**
*
*
* @author
* @email
* @date 2021-03-04 18:46:21
*/
public interface WeixiuchuliService extends IService<WeixiuchuliEntity> {
PageUtils queryPage(Map<String, Object> params);
List<WeixiuchuliVO> selectListVO(Wrapper<WeixiuchuliEntity> wrapper);
WeixiuchuliVO selectVO(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
List<WeixiuchuliView> selectListView(Wrapper<WeixiuchuliEntity> wrapper);
WeixiuchuliView selectView(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<WeixiuchuliEntity> wrapper);
}

@ -0,0 +1,62 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.StoreupDao;
import com.entity.StoreupEntity;
import com.service.StoreupService;
import com.entity.vo.StoreupVO;
import com.entity.view.StoreupView;
@Service("storeupService")
public class StoreupServiceImpl extends ServiceImpl<StoreupDao, StoreupEntity> implements StoreupService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<StoreupEntity> page = this.selectPage(
new Query<StoreupEntity>(params).getPage(),
new EntityWrapper<StoreupEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<StoreupEntity> wrapper) {
Page<StoreupView> page =new Query<StoreupView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<StoreupVO> selectListVO(Wrapper<StoreupEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public StoreupVO selectVO(Wrapper<StoreupEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<StoreupView> selectListView(Wrapper<StoreupEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public StoreupView selectView(Wrapper<StoreupEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
}

@ -0,0 +1,62 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.WeixiuchuliDao;
import com.entity.WeixiuchuliEntity;
import com.service.WeixiuchuliService;
import com.entity.vo.WeixiuchuliVO;
import com.entity.view.WeixiuchuliView;
@Service("weixiuchuliService")
public class WeixiuchuliServiceImpl extends ServiceImpl<WeixiuchuliDao, WeixiuchuliEntity> implements WeixiuchuliService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<WeixiuchuliEntity> page = this.selectPage(
new Query<WeixiuchuliEntity>(params).getPage(),
new EntityWrapper<WeixiuchuliEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<WeixiuchuliEntity> wrapper) {
Page<WeixiuchuliView> page =new Query<WeixiuchuliView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<WeixiuchuliVO> selectListVO(Wrapper<WeixiuchuliEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public WeixiuchuliVO selectVO(Wrapper<WeixiuchuliEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<WeixiuchuliView> selectListView(Wrapper<WeixiuchuliEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public WeixiuchuliView selectView(Wrapper<WeixiuchuliEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
}

@ -1,43 +0,0 @@
<template>
<svg :class="svgClass" aria-hidden="true" v-on="$listeners">
<use :xlink:href="iconName" />
</svg>
</template>
<script>
export default {
name: 'SvgIcon',
props: {
iconClass: {
type: String,
required: true
},
className: {
type: String,
default: ''
}
},
computed: {
iconName() {
return `#icon-${this.iconClass}`
},
svgClass() {
if (this.className) {
return 'svg-icon ' + this.className
} else {
return 'svg-icon'
}
}
}
}
</script>
<style scoped>
.svg-icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>

@ -1,109 +0,0 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="(●'◡'●)" style="height:50px;backgroundColor:rgba(79, 73, 73, 1);borderRadius:0px;padding:0px 20px 0px 20px;boxShadow:;borderWidth:2px;borderStyle:;borderColor:rgba(193, 180, 180, 0.5);">
<transition-group name="breadcrumb" class="box" :style="1==1?'justifyContent:flex-start;':1==2?'justifyContent:center;':'justifyContent:flex-end;'">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.name }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.name }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script>
import pathToRegexp from 'path-to-regexp'
import { generateTitle } from '@/utils/i18n'
export default {
data() {
return {
levelList: null
}
},
watch: {
$route() {
this.getBreadcrumb()
}
},
created() {
this.getBreadcrumb()
this.breadcrumbStyleChange()
},
methods: {
generateTitle,
getBreadcrumb() {
// only show routes with meta.title
let route = this.$route
let matched = route.matched.filter(item => item.meta)
const first = matched[0]
matched = [{ path: '/index' }].concat(matched)
this.levelList = matched.filter(item => item.meta)
},
isDashboard(route) {
const name = route && route.name
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === 'Index'.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
return toPath(params)
},
handleLink(item) {
const { redirect, path } = item
if (redirect) {
this.$router.push(redirect)
return
}
this.$router.push(path)
},
breadcrumbStyleChange(val) {
this.$nextTick(()=>{
document.querySelectorAll('.app-breadcrumb .el-breadcrumb__separator').forEach(el=>{
el.innerText = "(●'◡'●)"
el.style.color = "rgba(235, 90, 170, 1)"
})
document.querySelectorAll('.app-breadcrumb .el-breadcrumb__inner a').forEach(el=>{
el.style.color = "rgba(196, 212, 244, 1)"
})
document.querySelectorAll('.app-breadcrumb .el-breadcrumb__inner .no-redirect').forEach(el=>{
el.style.color = "rgba(244, 149, 32, 1)"
})
let str = "vertical"
if("vertical" === str) {
let headHeight = "60px"
headHeight = parseInt(headHeight) + 10 + 'px'
document.querySelectorAll('.app-breadcrumb').forEach(el=>{
el.style.marginTop = headHeight
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.app-breadcrumb {
display: block;
font-size: 14px;
line-height: 50px;
.box {
display: flex;
width: 100%;
height: 100%;
justify-content: flex-start;
align-items: center;
}
.no-redirect {
color: #97a8be;
cursor: text;
}
}
</style>

@ -1,77 +0,0 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.name }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.name }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script>
import pathToRegexp from 'path-to-regexp'
import { generateTitle } from '@/utils/i18n'
export default {
data() {
return {
levelList: null
}
},
watch: {
$route() {
this.getBreadcrumb()
}
},
created() {
this.getBreadcrumb()
},
methods: {
generateTitle,
getBreadcrumb() {
// only show routes with meta.title
console.log(this.$route)
let matched = this.$route.matched.filter(item => item.meta)
const first = matched[0]
matched = [{ path: '/index' }].concat(matched)
this.levelList = matched.filter(item => item.meta)
},
isDashboard(route) {
const name = route && route.name
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === 'Index'.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
return toPath(params)
},
handleLink(item) {
const { redirect, path } = item
if (redirect) {
this.$router.push(redirect)
return
}
this.$router.push(path)
}
}
}
</script>
<style lang="scss" scoped>
.app-breadcrumb.el-breadcrumb {
display: inline-block;
font-size: 14px;
line-height: 50px;
margin-left: 8px;
.no-redirect {
color: #97a8be;
cursor: text;
}
}
</style>

@ -1,238 +0,0 @@
<template>
<div>
<!-- 图片上传组件辅助-->
<el-upload
class="avatar-uploader"
:action="getActionUrl"
name="file"
:headers="header"
:show-file-list="false"
:on-success="uploadSuccess"
:on-error="uploadError"
:before-upload="beforeUpload"
></el-upload>
<quill-editor
class="editor"
v-model="value"
ref="myQuillEditor"
:options="editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@change="onEditorChange($event)"
></quill-editor>
</div>
</template>
<script>
//
const toolbarOptions = [
["bold", "italic", "underline", "strike"], // 线 线
["blockquote", "code-block"], //
[{ header: 1 }, { header: 2 }], // 12
[{ list: "ordered" }, { list: "bullet" }], //
[{ script: "sub" }, { script: "super" }], // /
[{ indent: "-1" }, { indent: "+1" }], //
// [{'direction': 'rtl'}], //
[{ size: ["small", false, "large", "huge"] }], //
[{ header: [1, 2, 3, 4, 5, 6, false] }], //
[{ color: [] }, { background: [] }], //
[{ font: [] }], //
[{ align: [] }], //
["clean"], //
["link", "image", "video"] //
];
import { quillEditor } from "vue-quill-editor";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
export default {
props: {
/*编辑器的内容*/
value: {
type: String
},
action: {
type: String
},
/*图片大小*/
maxSize: {
type: Number,
default: 4000 //kb
}
},
components: {
quillEditor
},
data() {
return {
content: this.value,
quillUpdateImg: false, // loadingfalse,
editorOption: {
placeholder: "",
theme: "snow", // or 'bubble'
modules: {
toolbar: {
container: toolbarOptions,
// container: "#toolbar",
handlers: {
image: function(value) {
if (value) {
// input
document.querySelector(".avatar-uploader input").click();
} else {
this.quill.format("image", false);
}
}
// link: function(value) {
// if (value) {
// var href = prompt('url');
// this.quill.format("link", href);
// } else {
// this.quill.format("link", false);
// }
// },
}
}
}
},
// serverUrl: `${base.url}sys/storage/uploadSwiper?token=${storage.get('token')}`, //
header: {
// token: sessionStorage.token
'Token': this.$storage.get("Token")
} // token
};
},
computed: {
// getter
getActionUrl: function() {
// return this.$base.url + this.action + "?token=" + this.$storage.get("token");
return `/${this.$base.name}/` + this.action;
}
},
methods: {
onEditorBlur() {
//
},
onEditorFocus() {
//
},
onEditorChange() {
console.log(this.value);
//
this.$emit("input", this.value);
},
//
beforeUpload() {
// loading
this.quillUpdateImg = true;
},
uploadSuccess(res, file) {
// res
//
let quill = this.$refs.myQuillEditor.quill;
//
if (res.code === 0) {
//
let length = quill.getSelection().index;
// res.url
quill.insertEmbed(length, "image", this.$base.url+ "upload/" +res.file);
//
quill.setSelection(length + 1);
} else {
this.$message.error("图片插入失败");
}
// loading
this.quillUpdateImg = false;
},
//
uploadError() {
// loading
this.quillUpdateImg = false;
this.$message.error("图片插入失败");
}
}
};
</script>
<style>
.editor {
line-height: normal !important;
height: 400px;
}
.ql-snow .ql-tooltip[data-mode="link"]::before {
content: "请输入链接地址:";
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: "保存";
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode="video"]::before {
content: "请输入视频地址:";
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: "14px";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
content: "10px";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
content: "18px";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
content: "32px";
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: "文本";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: "标题1";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: "标题2";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: "标题3";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: "标题4";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: "标题5";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: "标题6";
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: "标准字体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
content: "衬线字体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
content: "等宽字体";
}
</style>

@ -1,137 +0,0 @@
<template>
<div>
<!-- 上传文件组件 -->
<el-upload
ref="upload"
:action="getActionUrl"
list-type="picture-card"
:multiple="multiple"
:limit="limit"
:headers="myHeaders"
:file-list="fileList"
:on-exceed="handleExceed"
:on-preview="handleUploadPreview"
:on-remove="handleRemove"
:on-success="handleUploadSuccess"
:on-error="handleUploadErr"
:before-upload="handleBeforeUpload"
>
<i class="el-icon-plus"></i>
<div slot="tip" class="el-upload__tip" style="color:#838fa1;">{{tip}}</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible" size="tiny" append-to-body>
<img width="100%" :src="dialogImageUrl" alt>
</el-dialog>
</div>
</template>
<script>
import storage from "@/utils/storage";
import base from "@/utils/base";
export default {
data() {
return {
//
dialogVisible: false,
//
dialogImageUrl: "",
//
fileList: [],
fileUrlList: [],
myHeaders:{}
};
},
props: ["tip", "action", "limit", "multiple", "fileUrls"],
mounted() {
this.init();
this.myHeaders= {
'Token':storage.get("Token")
}
},
watch: {
fileUrls: function(val, oldVal) {
// console.log("new: %s, old: %s", val, oldVal);
this.init();
}
},
computed: {
// getter
getActionUrl: function() {
// return base.url + this.action + "?token=" + storage.get("token");
return `/${this.$base.name}/` + this.action;
}
},
methods: {
//
init() {
// console.log(this.fileUrls);
if (this.fileUrls) {
this.fileUrlList = this.fileUrls.split(",");
let fileArray = [];
this.fileUrlList.forEach(function(item, index) {
var url = item;
var name = index;
var file = {
name: name,
url: url
};
fileArray.push(file);
});
this.setFileList(fileArray);
}
},
handleBeforeUpload(file) {
},
//
handleUploadSuccess(res, file, fileList) {
if (res && res.code === 0) {
fileList[fileList.length - 1]["url"] =
this.$base.url + "upload/" + file.response.file;
this.setFileList(fileList);
this.$emit("change", this.fileUrlList.join(","));
} else {
this.$message.error(res.msg);
}
},
//
handleUploadErr(err, file, fileList) {
this.$message.error("文件上传失败");
},
//
handleRemove(file, fileList) {
this.setFileList(fileList);
this.$emit("change", this.fileUrlList.join(","));
},
//
handleUploadPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
//
handleExceed(files, fileList) {
this.$message.warning(`最多上传${this.limit}张图片`);
},
// fileList
setFileList(fileList) {
var fileArray = [];
var fileUrlArray = [];
// token
var token = storage.get("token");
fileList.forEach(function(item, index) {
var url = item.url.split("?")[0];
var name = item.name;
var file = {
name: name,
url: url + "?token=" + token
};
fileArray.push(file);
fileUrlArray.push(url);
});
this.fileList = fileArray;
this.fileUrlList = fileUrlArray;
}
}
};
</script>
<style lang="scss" scoped>
</style>

@ -1,60 +0,0 @@
<template>
<el-card class="box-card">
<div slot="header" class="header">
<span>{{title}}</span>
<span>
<el-tag size="small" :type="titleTag">{{titleUnit}}</el-tag>
</span>
</div>
<div class="content">
{{content}}&nbsp;&nbsp;
<span class="unit">{{contentUnit}}</span>
</div>
<div class="bottom">
<span>{{bottomTitle}}</span>
<span>
{{bottomContent}}
<i :class="bottomIcon"></i>
</span>
</div>
</el-card>
</template>
<script>
export default {
props: [
"title",
"titleTag",
"titleUnit",
"content",
"contentUnit",
"bottomTitle",
"bottomContent",
"bottomIcon"
]
};
</script>
<style lang="scss" scoped>
.box-card {
margin-right: 10px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
}
.content {
font-size: 30px;
font-weight: bold;
color: #666;
text-align: center;
.unit {
font-size: 16px;
}
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
}
}
</style>

@ -1,126 +0,0 @@
<template>
<div id="home-chart" style="width:100%;height:400px;"></div>
</template>
<script>
export default {
mounted() {
this.homeChart();
},
methods: {
homeChart() {
// domecharts
var myChart = this.$echarts.init(document.getElementById("home-chart"));
//
var option = {
tooltip: {
trigger: "axis"
},
legend: {
data: ["访问量", "用户量", "收入"]
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true
},
xAxis: {
type: "category",
boundaryGap: false,
data: [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月"
]
},
yAxis: {
type: "value"
},
series: [
{
name: "访问量",
type: "line",
stack: "总量",
data: [
120,
132,
101,
134,
90,
230,
210,
120,
132,
101,
134,
90,
230
]
},
{
name: "用户量",
type: "line",
stack: "总量",
data: [
220,
182,
191,
234,
290,
330,
310,
182,
191,
234,
290,
330,
310
]
},
{
name: "收入",
type: "line",
stack: "总量",
data: [
150,
232,
201,
154,
190,
330,
410,
232,
201,
154,
190,
330,
410
]
}
]
};
// // 使
myChart.setOption(option);
//
window.onresize = function() {
myChart.resize();
};
}
}
};
</script>
<style lang="scss" scoped>
#home-chart {
background: #ffffff;
padding: 20px 0;
}
</style>

@ -1,101 +0,0 @@
<template>
<div class="home-comment">
<div class="title">用户留言</div>
<div class="comment-list">
<div v-for="(item,index) in list" v-bind:key="index" class="comment-item">
<div class="user-content">
<el-image
class="avator"
:src="item.avator"
></el-image>
<span class="user">{{item.name}}</span>
</div>
<div class="comment">{{item.content}}</div>
<div class="create-time">{{item.createTime}}</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
list: [
{
name: "MaskLin",
avator:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
content:
"你以为只要长得漂亮就有男生喜欢?你以为只要有了钱漂亮妹子就自己贴上来了?你以为学霸就能找到好工作?我告诉你吧,这些都是真的!",
createTime: "5月02日 00:00"
},
{
name: "MaskLin",
avator:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
content: "作者太帅了",
createTime: "5月04日 00:00"
},
{
name: "MaskLin",
avator:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
content: "作者太帅了",
createTime: "5月04日 00:00"
},
{
name: "MaskLin",
avator: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
content: "作者太帅了",
createTime: "5月04日 00:00"
}
]
};
}
};
</script>
<style lang="scss" scoped>
.home-comment {
background: #ffffff;
.title {
font-size: 18px;
color: #666;
font-weight: bold;
padding: 10px;
border-bottom: 1px solid #eeeeee;
}
.comment-list {
padding: 10px;
.comment-item {
padding: 10px;
border-bottom: 1px solid #eeeeee;
.user-content {
display: flex;
align-items: center;
.user {
font-size: 18px;
color: #666;
font-weight: bold;
line-height: 50px;
margin-left: 10px;
}
.avator {
width: 50px;
height: 50px;
border-radius: 50%;
}
}
.comment {
margin-top: 10px;
font-size: 14px;
color: #888888;
}
.create-time {
margin-top: 15px;
font-size: 14px;
color: #888888;
}
}
}
}
</style>

@ -1,55 +0,0 @@
<template>
<div class="home-progress">
<div class="title">月访问量</div>
<div class="tip">同上期增长</div>
<el-progress
class="progress"
:text-inside="true"
:stroke-width="24"
:percentage="20"
status="success"
></el-progress>
<div class="title">月用户量</div>
<div class="tip">同上期增长</div>
<el-progress
class="progress"
:text-inside="true"
:stroke-width="24"
:percentage="50"
status="success"
></el-progress>
<div class="title">月收入</div>
<div class="tip">同上期减少</div>
<el-progress
class="progress"
:text-inside="true"
:stroke-width="24"
:percentage="28"
status="exception"
></el-progress>
</div>
</template>
<script>
export default {};
</script>
<style lang="scss">
.home-progress {
background: #ffffff;
height: 400px;
padding: 20px;
.title {
color: #666666;
font-weight: bold;
font-size: 20px;
margin-top: 10px;
}
.tip {
color: #888888;
font-size: 16px;
margin-top: 10px;
}
.progress {
margin-top: 10px;
}
}
</style>

@ -1,56 +0,0 @@
<template>
<el-aside class="index-aside" width="200px">
<div class="index-aside-inner">
<el-menu default-active="1">
<el-menu-item @click="menuHandler('/')" index="1">
<!-- <i class="el-icon-s-home"></i> -->
首页
</el-menu-item>
<sub-menu
v-for="menu in menuList"
:key="menu.menuId"
:menu="menu"
:dynamicMenuRoutes="dynamicMenuRoutes"
></sub-menu>
</el-menu>
</div>
</el-aside>
</template>
<script>
import SubMenu from "@/components/index/IndexAsideSub";
export default {
data() {
return {
menuList: [],
dynamicMenuRoutes: []
};
},
components: {
SubMenu
},
mounted() {
//
this.menuList = JSON.parse(sessionStorage.getItem("menuList") || "[]");
this.dynamicMenuRoutes = JSON.parse(
sessionStorage.getItem("dynamicMenuRoutes") || "[]"
);
},
methods: {
menuHandler(path) {
this.$router.push({ path: path });
}
}
};
</script>
<style lang="scss" scoped>
.index-aside {
margin-top: 80px;
overflow: hidden;
.index-aside-inner {
width: 217px;
height: 100%;
overflow-y: scroll;
}
}
</style>

@ -1,240 +0,0 @@
<template>
<el-aside class="index-aside" height="100vh" width="210px">
<div class="index-aside-inner menulist" style="height:100%">
<div v-for="item in menuList" :key="item.roleName" v-if="role==item.roleName" class="menulist-item" style="height:100%;broder:0;background-color:#988181">
<div class="menulistImg" style="backgroundColor:#ff0000;padding:25px 0" v-if="false && menulistStyle == 'vertical'">
<el-image v-if="'http://codegen.caihongy.cn/20201021/cc7d45d9c8164b58b18351764eba9be1.jpg'" src="http://codegen.caihongy.cn/20201021/cc7d45d9c8164b58b18351764eba9be1.jpg" fit="cover" />
</div>
<el-menu mode="vertical" :unique-opened="true" class="el-menu-demo" style="height:100%;" background-color="#988181" text-color="#111010" active-text-color="#99EFED" default-active="0">
<el-menu-item index="0" :style="menulistBorderBottom" @click="menuHandler('')"><i v-if="true" class="el-icon-s-home" />首页</el-menu-item>
<el-submenu :index="1+''" :style="menulistBorderBottom">
<template slot="title">
<i v-if="true" class="el-icon-user-solid" />
<span>个人中心</span>
</template>
<el-menu-item :index="1-1" @click="menuHandler('updatePassword')"></el-menu-item>
<el-menu-item :index="1-2" @click="menuHandler('center')"></el-menu-item>
</el-submenu>
<el-submenu :style="menulistBorderBottom" v-for=" (menu,index) in item.backMenu" :key="menu.menu" :index="index+2+''">
<template slot="title">
<i v-if="true" :class="icons[index]" />
<span>{{ menu.menu }}</span>
</template>
<el-menu-item v-for=" (child,sort) in menu.child" :key="sort" :index="(index+2)+'-'+sort" @click="menuHandler(child.tableName)">{{ child.menu }}</el-menu-item>
</el-submenu>
</el-menu>
</div>
</div>
</el-aside>
</template>
<script>
import menu from '@/utils/menu'
export default {
data() {
return {
menuList: [],
dynamicMenuRoutes: [],
role: '',
icons: [
'el-icon-s-cooperation',
'el-icon-s-order',
'el-icon-s-platform',
'el-icon-s-fold',
'el-icon-s-unfold',
'el-icon-s-operation',
'el-icon-s-promotion',
'el-icon-s-release',
'el-icon-s-ticket',
'el-icon-s-management',
'el-icon-s-open',
'el-icon-s-shop',
'el-icon-s-marketing',
'el-icon-s-flag',
'el-icon-s-comment',
'el-icon-s-finance',
'el-icon-s-claim',
'el-icon-s-custom',
'el-icon-s-opportunity',
'el-icon-s-data',
'el-icon-s-check',
'el-icon-s-grid',
'el-icon-menu',
'el-icon-chat-dot-square',
'el-icon-message',
'el-icon-postcard',
'el-icon-position',
'el-icon-microphone',
'el-icon-close-notification',
'el-icon-bangzhu',
'el-icon-time',
'el-icon-odometer',
'el-icon-crop',
'el-icon-aim',
'el-icon-switch-button',
'el-icon-full-screen',
'el-icon-copy-document',
'el-icon-mic',
'el-icon-stopwatch',
],
menulistStyle: 'vertical',
menulistBorderBottom: {},
}
},
mounted() {
const menus = menu.list()
this.menuList = menus
this.role = this.$storage.get('role')
},
created(){
setTimeout(()=>{
this.menulistStyleChange()
},10)
this.icons.sort(()=>{
return (0.5-Math.random())
})
this.lineBorder()
},
methods: {
lineBorder() {
let style = 'vertical'
let w = '1px'
let s = 'solid'
let c = '#ccc'
if(style == 'vertical') {
this.menulistBorderBottom = {
borderBottomWidth: w,
borderBottomStyle: s,
borderBottomColor: c
}
} else {
this.menulistBorderBottom = {
borderRightWidth: w,
borderRightStyle: s,
borderRightColor: c
}
}
},
menuHandler(name) {
let router = this.$router
name = '/'+name
router.push(name)
},
//
setMenulistHoverColor(){
let that = this
this.$nextTick(()=>{
document.querySelectorAll('.menulist .el-menu-item').forEach(el=>{
el.addEventListener("mouseenter", e => {
e.stopPropagation()
el.style.backgroundColor = "rgba(238, 221, 129, 1)"
})
el.addEventListener("mouseleave", e => {
e.stopPropagation()
el.style.backgroundColor = "#988181"
})
el.addEventListener("focus", e => {
e.stopPropagation()
el.style.backgroundColor = "rgba(238, 221, 129, 1)"
})
})
document.querySelectorAll('.menulist .el-submenu__title').forEach(el=>{
el.addEventListener("mouseenter", e => {
e.stopPropagation()
el.style.backgroundColor = "rgba(238, 221, 129, 1)"
})
el.addEventListener("mouseleave", e => {
e.stopPropagation()
el.style.backgroundColor = "#988181"
})
})
})
},
setMenulistIconColor() {
this.$nextTick(()=>{
document.querySelectorAll('.menulist .el-submenu__title .el-submenu__icon-arrow').forEach(el=>{
el.style.color = "rgba(153, 153, 153, 1)"
})
})
},
menulistStyleChange() {
this.setMenulistIconColor()
this.setMenulistHoverColor()
this.setMenulistStyleHeightChange()
let str = "vertical"
if("horizontal" === str) {
this.$nextTick(()=>{
document.querySelectorAll('.el-container .el-container').forEach(el=>{
el.style.display = "block"
el.style.paddingTop = "60px" // header
})
document.querySelectorAll('.el-aside').forEach(el=>{
el.style.width = "100%"
el.style.height = "62px"
el.style.paddingTop = '0'
})
document.querySelectorAll('.index-aside .index-aside-inner').forEach(el=>{
el.style.paddingTop = '0'
})
})
}
if("vertical" === str) {
this.$nextTick(()=>{
document.querySelectorAll('.index-aside .index-aside-inner').forEach(el=>{
el.style.paddingTop = "60px"
})
})
}
},
setMenulistStyleHeightChange() {
this.$nextTick(()=>{
document.querySelectorAll('.menulist-item>.el-menu--horizontal>.el-menu-item').forEach(el=>{
el.style.height = "62px"
el.style.lineHeight = "62px"
})
document.querySelectorAll('.menulist-item>.el-menu--horizontal>.el-submenu>.el-submenu__title').forEach(el=>{
el.style.height = "62px"
el.style.lineHeight = "62px"
})
})
},
}
}
</script>
<style lang="scss" scoped>
.index-aside {
position: relative;
overflow: hidden;
.menulistImg {
padding: 24px 0;
box-sizing: border-box;
.el-image {
margin: 0 auto;
width: 100px;
height: 100px;
border-radius: 100%;
display: block;
}
}
.index-aside-inner {
height: 100%;
margin-right: -17px;
margin-bottom: -17px;
overflow: scroll;
overflow-x: hidden !important;
padding-top: 60px;
box-sizing: border-box;
&:focus {
outline: none;
}
.el-menu {
border: 0;
}
}
}
</style>

@ -1,76 +0,0 @@
<template>
<el-aside class="index-aside" width="200px">
<div class="index-aside-inner">
<div v-for="item in menuList" v-bind:key="item.roleName">
<el-menu
background-color="#263238"
text-color="#fff"
active-text-color="#ffd04b"
default-active="0"
v-if="role==item.roleName"
>
<el-menu-item @click="menuHandler('home')" index="0">首页</el-menu-item>
<el-submenu
:index="1+''"
>
<template slot="title">
<span>个人中心</span>
</template>
<el-menu-item
@click="menuHandler('updatePassword')"
:index="1-1"
>修改密码</el-menu-item>
<el-menu-item
@click="menuHandler('center')"
:index="1-2"
>个人信息</el-menu-item>
</el-submenu>
<el-submenu
v-for=" (menu,index) in item.backMenu"
v-bind:key="menu.menu"
:index="index+2+''"
>
<template slot="title">
<span>{{menu.menu}}</span>
</template>
<el-menu-item
v-for=" (child,sort) in menu.child"
v-bind:key="sort"
@click="menuHandler(child.tableName)"
:index="(index+2)+'-'+sort"
>{{child.menu}}</el-menu-item>
</el-submenu>
</el-menu>
</div>
</div>
</el-aside>
</template>
<script>
import menu from "@/utils/menu";
export default {
data() {
return {
menuList: [],
dynamicMenuRoutes: [],
role: ""
};
},
mounted() {
let menus = menu.list();
this.menuList = menus;
this.role = this.$storage.get("role");
console.log(this.menuList)
console.log(this.role)
},
methods: {
menuHandler(name) {
this.$router.push({
name: name
});
}
}
};
</script>
<style lang="scss" scoped>
</style>

@ -1,51 +0,0 @@
<template>
<el-submenu v-if="menu.list && menu.list.length >= 1" :index="menu.menuId + ''">
<template slot="title">
<span>{{ menu.name }}</span>
</template>
<sub-menu
v-for="item in menu.list"
:key="item.menuId"
:menu="item"
:dynamicMenuRoutes="dynamicMenuRoutes"
></sub-menu>
</el-submenu>
<el-menu-item v-else :index="menu.menuId + ''" @click="gotoRouteHandle(menu)">
<span>{{ menu.name }}</span>
</el-menu-item>
</template>
<script>
import SubMenu from "./IndexAsideSub";
export default {
name: "sub-menu",
props: {
menu: {
type: Object,
required: true
},
dynamicMenuRoutes: {
type: Array,
required: true
}
},
components: {
SubMenu
},
methods: {
// menuId()
gotoRouteHandle(menu) {
var route = this.dynamicMenuRoutes.filter(
item => item.meta.menuId === menu.menuId
);
if (route.length >= 1) {
if (route[0].component != null) {
this.$router.replace({ name: route[0].name });
} else {
this.$router.push({ name: "404" });
}
}
}
}
};
</script>

@ -1,183 +0,0 @@
<template>
<!-- <el-header>
<el-menu background-color="#00c292" text-color="#FFFFFF" active-text-color="#FFFFFF" mode="horizontal">
<div class="fl title">{{this.$project.projectName}}</div>
<div class="fr logout" style="display:flex;">
<el-menu-item index="3">
<div>{{this.$storage.get('role')}} {{this.$storage.get('adminName')}}</div>
</el-menu-item>
<el-menu-item @click="onLogout" index="2">
<div>退出登录</div>
</el-menu-item>
</div>
</el-menu>
</el-header> -->
<div class="navbar" :style="{backgroundColor:heads.headBgColor,height:heads.headHeight,boxShadow:heads.headBoxShadow,lineHeight:heads.headHeight}">
<div class="title-menu" :style="{justifyContent:heads.headTitleStyle=='1'?'flex-start':'center'}">
<el-image v-if="heads.headTitleImg" class="title-img" :style="{width:heads.headTitleImgWidth,height:heads.headTitleImgHeight,boxShadow:heads.headTitleImgBoxShadow,borderRadius:heads.headTitleImgBorderRadius}" :src="heads.headTitleImgUrl" fit="cover"></el-image>
<div class="title-name" :style="{color:heads.headFontColor,fontSize:heads.headFontSize}">{{this.$project.projectName}}</div>
</div>
<div class="right-menu">
<div class="user-info" :style="{color:heads.headUserInfoFontColor,fontSize:heads.headUserInfoFontSize}">{{this.$storage.get('role')}} {{this.$storage.get('adminName')}}</div>
<div class="logout" :style="{color:heads.headLogoutFontColor,fontSize:heads.headLogoutFontSize}" @click="onLogout">退</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
ruleForm: {},
user: {},
heads: {"headLogoutFontHoverColor":"rgba(41, 42, 42, 1)","headFontSize":"20px","headUserInfoFontColor":"rgba(238, 221, 129, 1)","headBoxShadow":"0 1px 6px #444","headTitleImgHeight":"44px","headLogoutFontHoverBgColor":"rgba(247, 142, 142, 1)","headFontColor":"rgba(153, 239, 237, 1)","headTitleImg":false,"headHeight":"60px","headTitleImgBorderRadius":"22px","headTitleImgUrl":"http://codegen.caihongy.cn/20201021/cc7d45d9c8164b58b18351764eba9be1.jpg","headBgColor":"#4F4949","headTitleImgBoxShadow":"0 1px 6px #444","headLogoutFontColor":"rgba(153, 239, 237, 1)","headUserInfoFontSize":"16px","headTitleImgWidth":"44px","headTitleStyle":"2","headLogoutFontSize":"16px"},
};
},
created() {
this.setHeaderStyle()
},
mounted() {
let sessionTable = this.$storage.get("sessionTable")
this.$http({
url: sessionTable + '/session',
method: "get"
}).then(({
data
}) => {
if (data && data.code === 0) {
this.user = data.data;
} else {
let message = this.$message
message.error(data.msg);
}
});
},
methods: {
onLogout() {
let storage = this.$storage
let router = this.$router
storage.remove("Token");
router.replace({
name: "login"
});
},
onIndexTap(){
window.location.href = `${this.$base.indexUrl}`
},
setHeaderStyle() {
this.$nextTick(()=>{
document.querySelectorAll('.navbar .right-menu .logout').forEach(el=>{
el.addEventListener("mouseenter", e => {
e.stopPropagation()
el.style.backgroundColor = this.heads.headLogoutFontHoverBgColor
el.style.color = this.heads.headLogoutFontHoverColor
})
el.addEventListener("mouseleave", e => {
e.stopPropagation()
el.style.backgroundColor = "transparent"
el.style.color = this.heads.headLogoutFontColor
})
})
})
},
}
};
</script>
<style lang="scss" scoped>
.navbar {
height: 60px;
line-height: 60px;
width: 100%;
padding: 0 34px;
box-sizing: border-box;
background-color: #ff00ff;
position: relative;
z-index: 111;
.right-menu {
position: absolute;
right: 34px;
top: 0;
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
z-index: 111;
.user-info {
font-size: 16px;
color: red;
padding: 0 12px;
}
.logout {
font-size: 16px;
color: red;
padding: 0 12px;
cursor: pointer;
}
}
.title-menu {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
height: 100%;
.title-img {
width: 44px;
height: 44px;
border-radius: 22px;
box-shadow: 0 1px 6px #444;
margin-right: 16px;
}
.title-name {
font-size: 24px;
color: #fff;
font-weight: 700;
}
}
}
// .el-header .fr {
// float: right;
// }
// .el-header .fl {
// float: left;
// }
// .el-header {
// width: 100%;
// color: #333;
// text-align: center;
// line-height: 60px;
// padding: 0;
// z-index: 99;
// }
// .logo {
// width: 60px;
// height: 60px;
// margin-left: 70px;
// }
// .avator {
// width: 40px;
// height: 40px;
// background: #ffffff;
// border-radius: 50%;
// }
// .title {
// color: #ffffff;
// font-size: 20px;
// font-weight: bold;
// margin-left: 20px;
// }
</style>

@ -1,89 +0,0 @@
<template>
<el-header>
<el-menu background-color="#00c292" text-color="#FFFFFF" active-text-color="#FFFFFF" mode="horizontal">
<div class="fl title">{{this.$project.projectName}}</div>
<div class="fr logout" style="display:flex;">
<el-menu-item index="3">
<div>{{this.$storage.get('role')}} {{this.$storage.get('adminName')}}</div>
</el-menu-item>
<el-menu-item @click="onLogout" index="2">
<div>退出登录</div>
</el-menu-item>
</div>
</el-menu>
</el-header>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
ruleForm: {},
user: {}
};
},
mounted() {
this.$http({
url: `${this.$storage.get("sessionTable")}/session`,
method: "get"
}).then(({
data
}) => {
if (data && data.code === 0) {
this.user = data.data;
} else {
this.$message.error(data.msg);
}
});
},
methods: {
onLogout() {
this.$storage.remove("Token");
this.$router.replace({
name: "login"
});
}
}
};
</script>
<style lang="scss" scoped>
.el-header .fr {
float: right;
}
.el-header .fl {
float: left;
}
.el-header {
width: 100%;
color: #333;
text-align: center;
line-height: 60px;
padding: 0;
z-index: 99;
}
.logo {
width: 60px;
height: 60px;
margin-left: 70px;
}
.avator {
width: 40px;
height: 40px;
background: #ffffff;
border-radius: 50%;
}
.title {
color: #ffffff;
font-size: 20px;
font-weight: bold;
margin-left: 20px;
}
</style>

@ -1,124 +0,0 @@
<template>
<el-main>
<bread-crumbs :title="title" class="bread-crumbs"></bread-crumbs>
<router-view class="router-view"></router-view>
</el-main>
</template>
<script>
import menu from "@/utils/menu";
export default {
data() {
return {
menuList: [],
role: "",
currentIndex: -2,
itemMenu: [],
title: ''
};
},
mounted() {
let menus = menu.list();
this.menuList = menus;
this.role = this.$storage.get("role");
},
methods: {
menuHandler(menu) {
this.$router.push({
name: menu.tableName
});
this.title = menu.menu;
},
titleChange(index, menus) {
this.currentIndex = index
this.itemMenu = menus;
console.log(menus);
},
homeChange(index) {
this.itemMenu = [];
this.title = ""
this.currentIndex = index
this.$router.push({
name: 'home'
});
},
centerChange(index) {
this.itemMenu = [{
"buttons": ["新增", "查看", "修改", "删除"],
"menu": "修改密码",
"tableName": "updatePassword"
}, {
"buttons": ["新增", "查看", "修改", "删除"],
"menu": "个人信息",
"tableName": "center"
}];
this.title = ""
this.currentIndex = index
this.$router.push({
name: 'home'
});
}
}
};
</script>
<style lang="scss" scoped>
a {
text-decoration: none;
color: #555;
}
a:hover {
background: #00c292;
}
.nav-list {
width: 100%;
margin: 0 auto;
text-align: left;
margin-top: 20px;
.nav-title {
display: inline-block;
font-size: 15px;
color: #333;
padding: 15px 25px;
border: none;
}
.nav-title.active {
color: #555;
cursor: default;
background-color: #fff;
}
}
.nav-item {
margin-top: 20px;
background: #FFFFFF;
padding: 15px 0;
.menu {
padding: 15px 25px;
}
}
.el-main {
background-color: #F6F8FA;
padding: 0 24px;
// padding-top: 60px;
}
.router-view {
padding: 10px;
margin-top: 10px;
background: #FFFFFF;
box-sizing: border-box;
}
.bread-crumbs {
width: 100%;
// border-bottom: 1px solid #e9eef3;
// border-top: 1px solid #e9eef3;
margin-top: 10px;
box-sizing: border-box;
}
</style>

@ -0,0 +1,456 @@
<template>
<div class="addEdit-block">
<el-form
class="detail-form-content"
ref="ruleForm"
:model="ruleForm"
:rules="rules"
label-width="80px"
:style="{backgroundColor:addEditForm.addEditBoxColor}"
>
<el-row>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="收藏id" prop="refid">
<el-input v-model="ruleForm.refid"
placeholder="收藏id" clearable :readonly="ro.refid"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="收藏id" prop="refid">
<el-input v-model="ruleForm.refid"
placeholder="收藏id" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="表名" prop="tablename">
<el-input v-model="ruleForm.tablename"
placeholder="表名" clearable :readonly="ro.tablename"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="表名" prop="tablename">
<el-input v-model="ruleForm.tablename"
placeholder="表名" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="收藏名称" prop="name">
<el-input v-model="ruleForm.name"
placeholder="收藏名称" clearable :readonly="ro.name"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="收藏名称" prop="name">
<el-input v-model="ruleForm.name"
placeholder="收藏名称" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="24">
<el-form-item class="upload" v-if="type!='info' && !ro.picture" label="收藏图片" prop="picture">
<file-upload
tip="点击上传收藏图片"
action="file/upload"
:limit="3"
:multiple="true"
:fileUrls="ruleForm.picture?ruleForm.picture:''"
@change="pictureUploadChange"
></file-upload>
</el-form-item>
<div v-else>
<el-form-item v-if="ruleForm.picture" label="收藏图片" prop="picture">
<img style="margin-right:20px;" v-bind:key="index" v-for="(item,index) in ruleForm.picture.split(',')" :src="item" width="100" height="100">
</el-form-item>
</div>
</el-col>
</el-row>
<el-form-item class="btn">
<el-button v-if="type!='info'" type="primary" class="btn-success" @click="onSubmit"></el-button>
<el-button v-if="type!='info'" class="btn-close" @click="back()"></el-button>
<el-button v-if="type=='info'" class="btn-close" @click="back()"></el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
// url
import { isNumber,isIntNumer,isEmail,isPhone, isMobile,isURL,checkIdCard } from "@/utils/validate";
export default {
data() {
let self = this
var validateIdCard = (rule, value, callback) => {
if(!value){
callback();
} else if (!checkIdCard(value)) {
callback(new Error("请输入正确的身份证号码"));
} else {
callback();
}
};
var validateUrl = (rule, value, callback) => {
if(!value){
callback();
} else if (!isURL(value)) {
callback(new Error("请输入正确的URL地址"));
} else {
callback();
}
};
var validateMobile = (rule, value, callback) => {
if(!value){
callback();
} else if (!isMobile(value)) {
callback(new Error("请输入正确的手机号码"));
} else {
callback();
}
};
var validatePhone = (rule, value, callback) => {
if(!value){
callback();
} else if (!isPhone(value)) {
callback(new Error("请输入正确的电话号码"));
} else {
callback();
}
};
var validateEmail = (rule, value, callback) => {
if(!value){
callback();
} else if (!isEmail(value)) {
callback(new Error("请输入正确的邮箱地址"));
} else {
callback();
}
};
var validateNumber = (rule, value, callback) => {
if(!value){
callback();
} else if (!isNumber(value)) {
callback(new Error("请输入数字"));
} else {
callback();
}
};
var validateIntNumber = (rule, value, callback) => {
if(!value){
callback();
} else if (!isIntNumer(value)) {
callback(new Error("请输入整数"));
} else {
callback();
}
};
return {
addEditForm: {"btnSaveFontColor":"#fff","selectFontSize":"14px","btnCancelBorderColor":"rgba(152, 129, 129, 1)","inputBorderRadius":"22px","inputFontSize":"14px","textareaBgColor":"#fff","btnSaveFontSize":"14px","textareaBorderRadius":"22px","uploadBgColor":"#fff","textareaBorderStyle":"solid","btnCancelWidth":"88px","textareaHeight":"120px","dateBgColor":"#fff","btnSaveBorderRadius":"22px","uploadLableFontSize":"14px","textareaBorderWidth":"1px","inputLableColor":"#606266","addEditBoxColor":"rgba(210, 194, 194, 0.29)","dateIconFontSize":"14px","btnSaveBgColor":"#409EFF","uploadIconFontColor":"#8c939d","textareaBorderColor":"rgba(152, 129, 129, 1)","btnCancelBgColor":"rgba(143, 222, 143, 1)","selectLableColor":"#606266","btnSaveBorderStyle":"solid","dateBorderWidth":"1px","dateLableFontSize":"14px","dateBorderRadius":"22px","btnCancelBorderStyle":"solid","selectLableFontSize":"14px","selectBorderStyle":"solid","selectIconFontColor":"#C0C4CC","btnCancelHeight":"44px","inputHeight":"40px","btnCancelFontColor":"#606266","dateBorderColor":"rgba(152, 129, 129, 1)","dateIconFontColor":"#C0C4CC","uploadBorderStyle":"solid","dateBorderStyle":"solid","dateLableColor":"#606266","dateFontSize":"14px","inputBorderWidth":"1px","uploadIconFontSize":"28px","selectHeight":"40px","inputFontColor":"#606266","uploadHeight":"148px","textareaLableColor":"#606266","textareaLableFontSize":"14px","btnCancelFontSize":"14px","inputBorderStyle":"solid","btnCancelBorderRadius":"22px","inputBgColor":"rgba(252, 250, 250, 1)","inputLableFontSize":"14px","uploadLableColor":"#606266","uploadBorderRadius":"22px","btnSaveHeight":"44px","selectBgColor":"#fff","btnSaveWidth":"88px","selectIconFontSize":"14px","dateHeight":"40px","selectBorderColor":"rgba(152, 129, 129, 1)","inputBorderColor":"rgba(152, 129, 129, 1)","uploadBorderColor":"rgba(152, 129, 129, 1)","textareaFontColor":"#606266","selectBorderWidth":"1px","dateFontColor":"#606266","btnCancelBorderWidth":"1px","uploadBorderWidth":"1px","textareaFontSize":"14px","selectBorderRadius":"22px","selectFontColor":"#606266","btnSaveBorderColor":"#409EFF","btnSaveBorderWidth":"1px"},
id: '',
type: '',
ro:{
userid : false,
refid : false,
tablename : false,
name : false,
picture : false,
},
ruleForm: {
userid: '',
refid: '',
tablename: '',
name: '',
picture: '',
},
rules: {
userid: [
{ required: true, message: '用户id不能为空', trigger: 'blur' },
],
refid: [
],
tablename: [
],
name: [
{ required: true, message: '收藏名称不能为空', trigger: 'blur' },
],
picture: [
{ required: true, message: '收藏图片不能为空', trigger: 'blur' },
],
}
};
},
props: ["parent"],
computed: {
},
created() {
this.addEditStyleChange()
this.addEditUploadStyleChange()
},
methods: {
//
download(file){
window.open(`${file}`)
},
//
init(id,type) {
if (id) {
this.id = id;
this.type = type;
}
if(this.type=='info'||this.type=='else'){
this.info(id);
}else if(this.type=='cross'){
var obj = this.$storage.getObj('crossObj');
for (var o in obj){
if(o=='userid'){
this.ruleForm.userid = obj[o];
this.ro.userid = true;
continue;
}
if(o=='refid'){
this.ruleForm.refid = obj[o];
this.ro.refid = true;
continue;
}
if(o=='tablename'){
this.ruleForm.tablename = obj[o];
this.ro.tablename = true;
continue;
}
if(o=='name'){
this.ruleForm.name = obj[o];
this.ro.name = true;
continue;
}
if(o=='picture'){
this.ruleForm.picture = obj[o];
this.ro.picture = true;
continue;
}
}
}
},
//
info(id) {
this.$http({
url: `storeup/info/${id}`,
method: "get"
}).then(({ data }) => {
if (data && data.code === 0) {
this.ruleForm = data.data;
} else {
this.$message.error(data.msg);
}
});
},
//
onSubmit() {
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
this.$refs["ruleForm"].validate(valid => {
if (valid) {
this.$http({
url: `storeup/${!this.ruleForm.id ? "save" : "update"}`,
method: "post",
data: this.ruleForm
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.parent.showFlag = true;
this.parent.addOrUpdateFlag = false;
this.parent.storeupCrossAddOrUpdateFlag = false;
this.parent.search();
this.parent.contentStyleChange();
}
});
} else {
this.$message.error(data.msg);
}
});
}
});
},
// uuid
getUUID () {
return new Date().getTime();
},
//
back() {
this.parent.showFlag = true;
this.parent.addOrUpdateFlag = false;
this.parent.storeupCrossAddOrUpdateFlag = false;
this.parent.contentStyleChange();
},
pictureUploadChange(fileUrls) {
this.ruleForm.picture = fileUrls;
this.addEditUploadStyleChange()
},
addEditStyleChange() {
this.$nextTick(()=>{
// input
document.querySelectorAll('.addEdit-block .input .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.inputHeight
el.style.color = this.addEditForm.inputFontColor
el.style.fontSize = this.addEditForm.inputFontSize
el.style.borderWidth = this.addEditForm.inputBorderWidth
el.style.borderStyle = this.addEditForm.inputBorderStyle
el.style.borderColor = this.addEditForm.inputBorderColor
el.style.borderRadius = this.addEditForm.inputBorderRadius
el.style.backgroundColor = this.addEditForm.inputBgColor
})
document.querySelectorAll('.addEdit-block .input .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.inputHeight
el.style.color = this.addEditForm.inputLableColor
el.style.fontSize = this.addEditForm.inputLableFontSize
})
// select
document.querySelectorAll('.addEdit-block .select .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.selectHeight
el.style.color = this.addEditForm.selectFontColor
el.style.fontSize = this.addEditForm.selectFontSize
el.style.borderWidth = this.addEditForm.selectBorderWidth
el.style.borderStyle = this.addEditForm.selectBorderStyle
el.style.borderColor = this.addEditForm.selectBorderColor
el.style.borderRadius = this.addEditForm.selectBorderRadius
el.style.backgroundColor = this.addEditForm.selectBgColor
})
document.querySelectorAll('.addEdit-block .select .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.selectHeight
el.style.color = this.addEditForm.selectLableColor
el.style.fontSize = this.addEditForm.selectLableFontSize
})
document.querySelectorAll('.addEdit-block .select .el-select__caret').forEach(el=>{
el.style.color = this.addEditForm.selectIconFontColor
el.style.fontSize = this.addEditForm.selectIconFontSize
})
// date
document.querySelectorAll('.addEdit-block .date .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.dateHeight
el.style.color = this.addEditForm.dateFontColor
el.style.fontSize = this.addEditForm.dateFontSize
el.style.borderWidth = this.addEditForm.dateBorderWidth
el.style.borderStyle = this.addEditForm.dateBorderStyle
el.style.borderColor = this.addEditForm.dateBorderColor
el.style.borderRadius = this.addEditForm.dateBorderRadius
el.style.backgroundColor = this.addEditForm.dateBgColor
})
document.querySelectorAll('.addEdit-block .date .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.dateHeight
el.style.color = this.addEditForm.dateLableColor
el.style.fontSize = this.addEditForm.dateLableFontSize
})
document.querySelectorAll('.addEdit-block .date .el-input__icon').forEach(el=>{
el.style.color = this.addEditForm.dateIconFontColor
el.style.fontSize = this.addEditForm.dateIconFontSize
el.style.lineHeight = this.addEditForm.dateHeight
})
// upload
let iconLineHeight = parseInt(this.addEditForm.uploadHeight) - parseInt(this.addEditForm.uploadBorderWidth) * 2 + 'px'
document.querySelectorAll('.addEdit-block .upload .el-upload--picture-card').forEach(el=>{
el.style.width = this.addEditForm.uploadHeight
el.style.height = this.addEditForm.uploadHeight
el.style.borderWidth = this.addEditForm.uploadBorderWidth
el.style.borderStyle = this.addEditForm.uploadBorderStyle
el.style.borderColor = this.addEditForm.uploadBorderColor
el.style.borderRadius = this.addEditForm.uploadBorderRadius
el.style.backgroundColor = this.addEditForm.uploadBgColor
})
document.querySelectorAll('.addEdit-block .upload .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.uploadHeight
el.style.color = this.addEditForm.uploadLableColor
el.style.fontSize = this.addEditForm.uploadLableFontSize
})
document.querySelectorAll('.addEdit-block .upload .el-icon-plus').forEach(el=>{
el.style.color = this.addEditForm.uploadIconFontColor
el.style.fontSize = this.addEditForm.uploadIconFontSize
el.style.lineHeight = iconLineHeight
el.style.display = 'block'
})
//
document.querySelectorAll('.addEdit-block .textarea .el-textarea__inner').forEach(el=>{
el.style.height = this.addEditForm.textareaHeight
el.style.color = this.addEditForm.textareaFontColor
el.style.fontSize = this.addEditForm.textareaFontSize
el.style.borderWidth = this.addEditForm.textareaBorderWidth
el.style.borderStyle = this.addEditForm.textareaBorderStyle
el.style.borderColor = this.addEditForm.textareaBorderColor
el.style.borderRadius = this.addEditForm.textareaBorderRadius
el.style.backgroundColor = this.addEditForm.textareaBgColor
})
document.querySelectorAll('.addEdit-block .textarea .el-form-item__label').forEach(el=>{
// el.style.lineHeight = this.addEditForm.textareaHeight
el.style.color = this.addEditForm.textareaLableColor
el.style.fontSize = this.addEditForm.textareaLableFontSize
})
//
document.querySelectorAll('.addEdit-block .btn .btn-success').forEach(el=>{
el.style.width = this.addEditForm.btnSaveWidth
el.style.height = this.addEditForm.btnSaveHeight
el.style.color = this.addEditForm.btnSaveFontColor
el.style.fontSize = this.addEditForm.btnSaveFontSize
el.style.borderWidth = this.addEditForm.btnSaveBorderWidth
el.style.borderStyle = this.addEditForm.btnSaveBorderStyle
el.style.borderColor = this.addEditForm.btnSaveBorderColor
el.style.borderRadius = this.addEditForm.btnSaveBorderRadius
el.style.backgroundColor = this.addEditForm.btnSaveBgColor
})
//
document.querySelectorAll('.addEdit-block .btn .btn-close').forEach(el=>{
el.style.width = this.addEditForm.btnCancelWidth
el.style.height = this.addEditForm.btnCancelHeight
el.style.color = this.addEditForm.btnCancelFontColor
el.style.fontSize = this.addEditForm.btnCancelFontSize
el.style.borderWidth = this.addEditForm.btnCancelBorderWidth
el.style.borderStyle = this.addEditForm.btnCancelBorderStyle
el.style.borderColor = this.addEditForm.btnCancelBorderColor
el.style.borderRadius = this.addEditForm.btnCancelBorderRadius
el.style.backgroundColor = this.addEditForm.btnCancelBgColor
})
})
},
addEditUploadStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.addEdit-block .upload .el-upload-list--picture-card .el-upload-list__item').forEach(el=>{
el.style.width = this.addEditForm.uploadHeight
el.style.height = this.addEditForm.uploadHeight
el.style.borderWidth = this.addEditForm.uploadBorderWidth
el.style.borderStyle = this.addEditForm.uploadBorderStyle
el.style.borderColor = this.addEditForm.uploadBorderColor
el.style.borderRadius = this.addEditForm.uploadBorderRadius
el.style.backgroundColor = this.addEditForm.uploadBgColor
})
})
},
}
};
</script>
<style lang="scss">
.editor{
height: 500px;
& /deep/ .ql-container {
height: 310px;
}
}
.amap-wrapper {
width: 100%;
height: 500px;
}
.search-box {
position: absolute;
}
.addEdit-block {
margin: -10px;
}
.detail-form-content {
padding: 12px;
}
.btn .el-button {
padding: 0;
}
</style>

@ -0,0 +1,524 @@
<template>
<div class="main-content">
<!-- 列表页 -->
<div v-if="showFlag">
<el-form :inline="true" :model="searchForm" class="form-content">
<el-row :gutter="20" class="slt" :style="{justifyContent:contents.searchBoxPosition=='1'?'flex-start':contents.searchBoxPosition=='2'?'center':'flex-end'}">
<el-form-item :label="contents.inputTitle == 1 ? '收藏名称' : ''">
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 1" prefix-icon="el-icon-search" v-model="searchForm.name" placeholder="收藏名称" clearable></el-input>
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 2" suffix-icon="el-icon-search" v-model="searchForm.name" placeholder="收藏名称" clearable></el-input>
<el-input v-if="contents.inputIcon == 0" v-model="searchForm.name" placeholder="收藏名称" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button v-if="contents.searchBtnIcon == 1 && contents.searchBtnIconPosition == 1" icon="el-icon-search" type="success" @click="search()">{{ contents.searchBtnFont == 1?'':'' }}</el-button>
<el-button v-if="contents.searchBtnIcon == 1 && contents.searchBtnIconPosition == 2" type="success" @click="search()">{{ contents.searchBtnFont == 1?'':'' }}<i class="el-icon-search el-icon--right"/></el-button>
<el-button v-if="contents.searchBtnIcon == 0" type="success" @click="search()">{{ contents.searchBtnFont == 1?'':'' }}</el-button>
</el-form-item>
</el-row>
<el-row class="ad" :style="{justifyContent:contents.btnAdAllBoxPosition=='1'?'flex-start':contents.btnAdAllBoxPosition=='2'?'center':'flex-end'}">
<el-form-item>
<el-button
v-if="isAuth('storeup','新增') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 1"
type="success"
icon="el-icon-plus"
@click="addOrUpdateHandler()"
>{{ contents.btnAdAllFont == 1?'新增':'' }}</el-button>
<el-button
v-if="isAuth('storeup','新增') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 2"
type="success"
@click="addOrUpdateHandler()"
>{{ contents.btnAdAllFont == 1?'新增':'' }}<i class="el-icon-plus el-icon--right" /></el-button>
<el-button
v-if="isAuth('storeup','新增') && contents.btnAdAllIcon == 0"
type="success"
@click="addOrUpdateHandler()"
>{{ contents.btnAdAllFont == 1?'新增':'' }}</el-button>
<el-button
v-if="isAuth('storeup','删除') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 1 && contents.tableSelection"
:disabled="dataListSelections.length <= 0"
type="danger"
icon="el-icon-delete"
@click="deleteHandler()"
>{{ contents.btnAdAllFont == 1?'删除':'' }}</el-button>
<el-button
v-if="isAuth('storeup','删除') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 2 && contents.tableSelection"
:disabled="dataListSelections.length <= 0"
type="danger"
@click="deleteHandler()"
>{{ contents.btnAdAllFont == 1?'删除':'' }}<i class="el-icon-delete el-icon--right" /></el-button>
<el-button
v-if="isAuth('storeup','删除') && contents.btnAdAllIcon == 0 && contents.tableSelection"
:disabled="dataListSelections.length <= 0"
type="danger"
@click="deleteHandler()"
>{{ contents.btnAdAllFont == 1?'删除':'' }}</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="table-content">
<el-table class="tables" :size="contents.tableSize" :show-header="contents.tableShowHeader"
:header-row-style="headerRowStyle" :header-cell-style="headerCellStyle"
:border="contents.tableBorder"
:fit="contents.tableFit"
:stripe="contents.tableStripe"
:row-style="rowStyle"
:cell-style="cellStyle"
:style="{width: '100%',fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}"
v-if="isAuth('storeup','查看')"
:data="dataList"
v-loading="dataListLoading"
@selection-change="selectionChangeHandler">
<el-table-column v-if="contents.tableSelection"
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column label="索引" v-if="contents.tableIndex" type="index" width="50" />
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="name"
header-align="center"
label="收藏名称">
<template slot-scope="scope">
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign" prop="picture"
header-align="center"
width="200"
label="收藏图片">
<template slot-scope="scope">
<div v-if="scope.row.picture">
<img :src="scope.row.picture.split(',')[0]" width="100" height="100">
</div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column width="300" :align="contents.tableAlign"
header-align="center"
label="操作">
<template slot-scope="scope">
<el-button v-if="isAuth('storeup','查看') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 1" type="success" icon="el-icon-tickets" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('storeup','查看') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 2" type="success" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">{{ contents.tableBtnFont == 1?'':'' }}<i class="el-icon-tickets el-icon--right" /></el-button>
<el-button v-if="isAuth('storeup','查看') && contents.tableBtnIcon == 0" type="success" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('storeup','修改') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 1" type="primary" icon="el-icon-edit" size="mini" @click="addOrUpdateHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('storeup','修改') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 2" type="primary" size="mini" @click="addOrUpdateHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}<i class="el-icon-edit el-icon--right" /></el-button>
<el-button v-if="isAuth('storeup','修改') && contents.tableBtnIcon == 0" type="primary" size="mini" @click="addOrUpdateHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('storeup','删除') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 1" type="danger" icon="el-icon-delete" size="mini" @click="deleteHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('storeup','删除') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 2" type="danger" size="mini" @click="deleteHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}<i class="el-icon-delete el-icon--right" /></el-button>
<el-button v-if="isAuth('storeup','删除') && contents.tableBtnIcon == 0" type="danger" size="mini" @click="deleteHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
clsss="pages"
:layout="layouts"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="Number(contents.pageEachNum)"
:total="totalPage"
:small="contents.pageStyle"
class="pagination-content"
:background="contents.pageBtnBG"
:style="{textAlign:contents.pagePosition==1?'left':contents.pagePosition==2?'center':'right'}"
></el-pagination>
</div>
</div>
<!-- 添加/修改页面 将父组件的search方法传递给子组件-->
<add-or-update v-if="addOrUpdateFlag" :parent="this" ref="addOrUpdate"></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from "./add-or-update";
export default {
data() {
return {
searchForm: {
key: ""
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
showFlag: true,
sfshVisiable: false,
shForm: {},
chartVisiable: false,
addOrUpdateFlag:false,
contents:{"searchBtnFontColor":"#333","pagePosition":"1","inputFontSize":"14px","inputBorderRadius":"22px","tableBtnDelFontColor":"#333","tableBtnIconPosition":"1","searchBtnHeight":"40px","inputIconColor":"rgba(66, 130, 129, 1)","searchBtnBorderRadius":"22px","tableStripe":false,"btnAdAllWarnFontColor":"#333","tableBtnDelBgColor":"rgba(244, 150, 150, 1)","searchBtnIcon":"1","tableSize":"medium","searchBtnBorderStyle":"solid","tableSelection":true,"searchBtnBorderWidth":"1px","tableContentFontSize":"14px","searchBtnBgColor":"rgba(153, 239, 237, 1)","inputTitleSize":"14px","btnAdAllBorderColor":"#DCDFE6","pageJumper":true,"btnAdAllIconPosition":"1","searchBoxPosition":"1","tableBtnDetailFontColor":"#333","tableBtnHeight":"40px","pagePager":true,"searchBtnBorderColor":"#DCDFE6","tableHeaderFontColor":"rgba(33, 34, 35, 1)","inputTitle":"1","tableBtnBorderRadius":"22px","btnAdAllFont":"1","btnAdAllDelFontColor":"rgba(21, 20, 20, 1)","tableBtnIcon":"1","btnAdAllHeight":"40px","btnAdAllWarnBgColor":"rgba(238, 236, 126, 1)","btnAdAllBorderWidth":"1px","tableStripeFontColor":"#606266","tableBtnBorderStyle":"solid","inputHeight":"40px","btnAdAllBorderRadius":"22px","btnAdAllDelBgColor":"rgba(234, 93, 93, 0.69)","pagePrevNext":true,"btnAdAllAddBgColor":"rgba(153, 239, 237, 1)","searchBtnFont":"1","tableIndex":true,"btnAdAllIcon":"1","tableSortable":true,"pageSizes":true,"tableFit":true,"pageBtnBG":true,"searchBtnFontSize":"14px","tableBtnEditBgColor":"rgba(240, 242, 124, 1)","inputBorderWidth":"1px","inputFontPosition":"1","inputFontColor":"#333","pageEachNum":10,"tableHeaderBgColor":"rgba(152, 129, 129, 1)","inputTitleColor":"#333","btnAdAllBoxPosition":"1","tableBtnDetailBgColor":"rgba(171, 239, 239, 1)","inputIcon":"0","searchBtnIconPosition":"1","btnAdAllFontSize":"14px","inputBorderStyle":"solid","inputBgColor":"rgba(197, 174, 174, 0.32)","pageStyle":false,"pageTotal":true,"btnAdAllAddFontColor":"#333","tableBtnFont":"1","tableContentFontColor":"rgba(22, 22, 23, 1)","inputBorderColor":"rgba(152, 129, 129, 1)","tableShowHeader":true,"tableBtnFontSize":"14px","tableBtnBorderColor":"rgba(196, 210, 244, 1)","inputIconPosition":"1","tableBorder":true,"btnAdAllBorderStyle":"solid","tableBtnBorderWidth":"1px","tableStripeBgColor":"rgba(213, 197, 197, 1)","tableBtnEditFontColor":"#333","tableAlign":"center"},
layouts: '',
};
},
created() {
this.init();
this.getDataList();
this.contentStyleChange()
},
mounted() {
},
filters: {
htmlfilter: function (val) {
return val.replace(/<[^>]*>/g).replace(/undefined/g,'');
}
},
components: {
AddOrUpdate,
},
methods: {
contentStyleChange() {
this.contentSearchStyleChange()
this.contentBtnAdAllStyleChange()
this.contentSearchBtnStyleChange()
this.contentTableBtnStyleChange()
this.contentPageStyleChange()
},
contentSearchStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.form-content .slt .el-input__inner').forEach(el=>{
let textAlign = 'left'
if(this.contents.inputFontPosition == 2) textAlign = 'center'
if(this.contents.inputFontPosition == 3) textAlign = 'right'
el.style.textAlign = textAlign
el.style.height = this.contents.inputHeight
el.style.lineHeight = this.contents.inputHeight
el.style.color = this.contents.inputFontColor
el.style.fontSize = this.contents.inputFontSize
el.style.borderWidth = this.contents.inputBorderWidth
el.style.borderStyle = this.contents.inputBorderStyle
el.style.borderColor = this.contents.inputBorderColor
el.style.borderRadius = this.contents.inputBorderRadius
el.style.backgroundColor = this.contents.inputBgColor
})
if(this.contents.inputTitle) {
document.querySelectorAll('.form-content .slt .el-form-item__label').forEach(el=>{
el.style.color = this.contents.inputTitleColor
el.style.fontSize = this.contents.inputTitleSize
el.style.lineHeight = this.contents.inputHeight
})
}
setTimeout(()=>{
document.querySelectorAll('.form-content .slt .el-input__prefix').forEach(el=>{
el.style.color = this.contents.inputIconColor
el.style.lineHeight = this.contents.inputHeight
})
document.querySelectorAll('.form-content .slt .el-input__suffix').forEach(el=>{
el.style.color = this.contents.inputIconColor
el.style.lineHeight = this.contents.inputHeight
})
document.querySelectorAll('.form-content .slt .el-input__icon').forEach(el=>{
el.style.lineHeight = this.contents.inputHeight
})
},10)
})
},
//
contentSearchBtnStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.form-content .slt .el-button--success').forEach(el=>{
el.style.height = this.contents.searchBtnHeight
el.style.color = this.contents.searchBtnFontColor
el.style.fontSize = this.contents.searchBtnFontSize
el.style.borderWidth = this.contents.searchBtnBorderWidth
el.style.borderStyle = this.contents.searchBtnBorderStyle
el.style.borderColor = this.contents.searchBtnBorderColor
el.style.borderRadius = this.contents.searchBtnBorderRadius
el.style.backgroundColor = this.contents.searchBtnBgColor
})
})
},
//
contentBtnAdAllStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.form-content .ad .el-button--success').forEach(el=>{
el.style.height = this.contents.btnAdAllHeight
el.style.color = this.contents.btnAdAllAddFontColor
el.style.fontSize = this.contents.btnAdAllFontSize
el.style.borderWidth = this.contents.btnAdAllBorderWidth
el.style.borderStyle = this.contents.btnAdAllBorderStyle
el.style.borderColor = this.contents.btnAdAllBorderColor
el.style.borderRadius = this.contents.btnAdAllBorderRadius
el.style.backgroundColor = this.contents.btnAdAllAddBgColor
})
document.querySelectorAll('.form-content .ad .el-button--danger').forEach(el=>{
el.style.height = this.contents.btnAdAllHeight
el.style.color = this.contents.btnAdAllDelFontColor
el.style.fontSize = this.contents.btnAdAllFontSize
el.style.borderWidth = this.contents.btnAdAllBorderWidth
el.style.borderStyle = this.contents.btnAdAllBorderStyle
el.style.borderColor = this.contents.btnAdAllBorderColor
el.style.borderRadius = this.contents.btnAdAllBorderRadius
el.style.backgroundColor = this.contents.btnAdAllDelBgColor
})
document.querySelectorAll('.form-content .ad .el-button--warning').forEach(el=>{
el.style.height = this.contents.btnAdAllHeight
el.style.color = this.contents.btnAdAllWarnFontColor
el.style.fontSize = this.contents.btnAdAllFontSize
el.style.borderWidth = this.contents.btnAdAllBorderWidth
el.style.borderStyle = this.contents.btnAdAllBorderStyle
el.style.borderColor = this.contents.btnAdAllBorderColor
el.style.borderRadius = this.contents.btnAdAllBorderRadius
el.style.backgroundColor = this.contents.btnAdAllWarnBgColor
})
})
},
//
rowStyle({ row, rowIndex}) {
if (rowIndex % 2 == 1) {
if(this.contents.tableStripe) {
return {color:this.contents.tableStripeFontColor}
}
} else {
return ''
}
},
cellStyle({ row, rowIndex}){
if (rowIndex % 2 == 1) {
if(this.contents.tableStripe) {
return {backgroundColor:this.contents.tableStripeBgColor}
}
} else {
return ''
}
},
headerRowStyle({ row, rowIndex}){
return {color: this.contents.tableHeaderFontColor}
},
headerCellStyle({ row, rowIndex}){
return {backgroundColor: this.contents.tableHeaderBgColor}
},
//
contentTableBtnStyleChange(){
// this.$nextTick(()=>{
// setTimeout(()=>{
// document.querySelectorAll('.table-content .tables .el-table__body .el-button--success').forEach(el=>{
// el.style.height = this.contents.tableBtnHeight
// el.style.color = this.contents.tableBtnDetailFontColor
// el.style.fontSize = this.contents.tableBtnFontSize
// el.style.borderWidth = this.contents.tableBtnBorderWidth
// el.style.borderStyle = this.contents.tableBtnBorderStyle
// el.style.borderColor = this.contents.tableBtnBorderColor
// el.style.borderRadius = this.contents.tableBtnBorderRadius
// el.style.backgroundColor = this.contents.tableBtnDetailBgColor
// })
// document.querySelectorAll('.table-content .tables .el-table__body .el-button--primary').forEach(el=>{
// el.style.height = this.contents.tableBtnHeight
// el.style.color = this.contents.tableBtnEditFontColor
// el.style.fontSize = this.contents.tableBtnFontSize
// el.style.borderWidth = this.contents.tableBtnBorderWidth
// el.style.borderStyle = this.contents.tableBtnBorderStyle
// el.style.borderColor = this.contents.tableBtnBorderColor
// el.style.borderRadius = this.contents.tableBtnBorderRadius
// el.style.backgroundColor = this.contents.tableBtnEditBgColor
// })
// document.querySelectorAll('.table-content .tables .el-table__body .el-button--danger').forEach(el=>{
// el.style.height = this.contents.tableBtnHeight
// el.style.color = this.contents.tableBtnDelFontColor
// el.style.fontSize = this.contents.tableBtnFontSize
// el.style.borderWidth = this.contents.tableBtnBorderWidth
// el.style.borderStyle = this.contents.tableBtnBorderStyle
// el.style.borderColor = this.contents.tableBtnBorderColor
// el.style.borderRadius = this.contents.tableBtnBorderRadius
// el.style.backgroundColor = this.contents.tableBtnDelBgColor
// })
// }, 50)
// })
},
//
contentPageStyleChange(){
let arr = []
if(this.contents.pageTotal) arr.push('total')
if(this.contents.pageSizes) arr.push('sizes')
if(this.contents.pagePrevNext){
arr.push('prev')
if(this.contents.pagePager) arr.push('pager')
arr.push('next')
}
if(this.contents.pageJumper) arr.push('jumper')
this.layouts = arr.join()
this.contents.pageEachNum = 10
},
init () {
},
search() {
this.pageIndex = 1;
this.getDataList();
},
//
getDataList() {
this.dataListLoading = true;
let params = {
page: this.pageIndex,
limit: this.pageSize,
sort: 'id',
}
if(this.searchForm.name!='' && this.searchForm.name!=undefined){
params['name'] = '%' + this.searchForm.name + '%'
}
this.$http({
url: "storeup/page",
method: "get",
params: params
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.list;
this.totalPage = data.data.total;
} else {
this.dataList = [];
this.totalPage = 0;
}
this.dataListLoading = false;
});
},
//
sizeChangeHandle(val) {
this.pageSize = val;
this.pageIndex = 1;
this.getDataList();
},
//
currentChangeHandle(val) {
this.pageIndex = val;
this.getDataList();
},
//
selectionChangeHandler(val) {
this.dataListSelections = val;
},
// /
addOrUpdateHandler(id,type) {
this.showFlag = false;
this.addOrUpdateFlag = true;
this.crossAddOrUpdateFlag = false;
if(type!='info'){
type = 'else';
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id,type);
});
},
//
//
download(file){
window.open(`${file}`)
},
//
deleteHandler(id) {
var ids = id
? [Number(id)]
: this.dataListSelections.map(item => {
return Number(item.id);
});
this.$confirm(`确定进行[${id ? "删除" : "批量删除"}]操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$http({
url: "storeup/delete",
method: "post",
data: ids
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.search();
}
});
} else {
this.$message.error(data.msg);
}
});
});
},
}
};
</script>
<style lang="scss" scoped>
.slt {
margin: 0 !important;
display: flex;
}
.ad {
margin: 0 !important;
display: flex;
}
.pages {
& /deep/ el-pagination__sizes{
& /deep/ el-input__inner {
height: 22px;
line-height: 22px;
}
}
}
.el-button+.el-button {
margin:0;
}
.tables {
& /deep/ .el-button--success {
height: 40px;
color: #333;
font-size: 14px;
border-width: 1px;
border-style: solid;
border-color: rgba(196, 210, 244, 1);
border-radius: 22px;
background-color: rgba(171, 239, 239, 1);
}
& /deep/ .el-button--primary {
height: 40px;
color: #333;
font-size: 14px;
border-width: 1px;
border-style: solid;
border-color: rgba(196, 210, 244, 1);
border-radius: 22px;
background-color: rgba(240, 242, 124, 1);
}
& /deep/ .el-button--danger {
height: 40px;
color: #333;
font-size: 14px;
border-width: 1px;
border-style: solid;
border-color: rgba(196, 210, 244, 1);
border-radius: 22px;
background-color: rgba(244, 150, 150, 1);
}
& /deep/ .el-button {
margin: 4px;
}
}
</style>

@ -0,0 +1,634 @@
<template>
<div class="addEdit-block">
<el-form
class="detail-form-content"
ref="ruleForm"
:model="ruleForm"
:rules="rules"
label-width="80px"
:style="{backgroundColor:addEditForm.addEditBoxColor}"
>
<el-row>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="房屋名称" prop="fangwumingcheng">
<el-input v-model="ruleForm.fangwumingcheng"
placeholder="房屋名称" clearable :readonly="ro.fangwumingcheng"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="房屋名称" prop="fangwumingcheng">
<el-input v-model="ruleForm.fangwumingcheng"
placeholder="房屋名称" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="房屋类型" prop="fangwuleixing">
<el-input v-model="ruleForm.fangwuleixing"
placeholder="房屋类型" clearable :readonly="ro.fangwuleixing"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="房屋类型" prop="fangwuleixing">
<el-input v-model="ruleForm.fangwuleixing"
placeholder="房屋类型" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="报修名称" prop="baoxiumingcheng">
<el-input v-model="ruleForm.baoxiumingcheng"
placeholder="报修名称" clearable :readonly="ro.baoxiumingcheng"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="报修名称" prop="baoxiumingcheng">
<el-input v-model="ruleForm.baoxiumingcheng"
placeholder="报修名称" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="类型" prop="leixing">
<el-input v-model="ruleForm.leixing"
placeholder="类型" clearable :readonly="ro.leixing"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="类型" prop="leixing">
<el-input v-model="ruleForm.leixing"
placeholder="类型" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="报修日期" prop="baoxiuriqi">
<el-input v-model="ruleForm.baoxiuriqi"
placeholder="报修日期" clearable :readonly="ro.baoxiuriqi"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="报修日期" prop="baoxiuriqi">
<el-input v-model="ruleForm.baoxiuriqi"
placeholder="报修日期" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="维修反馈" prop="weixiufankui">
<el-input v-model="ruleForm.weixiufankui"
placeholder="维修反馈" clearable :readonly="ro.weixiufankui"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="维修反馈" prop="weixiufankui">
<el-input v-model="ruleForm.weixiufankui"
placeholder="维修反馈" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="select" v-if="type!='info'" label="维修进度" prop="weixiujindu">
<el-select v-model="ruleForm.weixiujindu" placeholder="请选择维修进度">
<el-option
v-for="(item,index) in weixiujinduOptions"
v-bind:key="index"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<div v-else>
<el-form-item class="input" label="维修进度" prop="weixiujindu">
<el-input v-model="ruleForm.weixiujindu"
placeholder="维修进度" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="date" v-if="type!='info'" label="更新日期" prop="gengxinriqi">
<el-date-picker
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
v-model="ruleForm.gengxinriqi"
type="date"
placeholder="更新日期">
</el-date-picker>
</el-form-item>
<div v-else>
<el-form-item class="input" v-if="ruleForm.gengxinriqi" label="更新日期" prop="gengxinriqi">
<el-input v-model="ruleForm.gengxinriqi"
placeholder="更新日期" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="房主账号" prop="fangzhuzhanghao">
<el-input v-model="ruleForm.fangzhuzhanghao"
placeholder="房主账号" clearable :readonly="ro.fangzhuzhanghao"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="房主账号" prop="fangzhuzhanghao">
<el-input v-model="ruleForm.fangzhuzhanghao"
placeholder="房主账号" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="房主姓名" prop="fangzhuxingming">
<el-input v-model="ruleForm.fangzhuxingming"
placeholder="房主姓名" clearable :readonly="ro.fangzhuxingming"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="房主姓名" prop="fangzhuxingming">
<el-input v-model="ruleForm.fangzhuxingming"
placeholder="房主姓名" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="用户名" prop="yonghuming">
<el-input v-model="ruleForm.yonghuming"
placeholder="用户名" clearable :readonly="ro.yonghuming"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="用户名" prop="yonghuming">
<el-input v-model="ruleForm.yonghuming"
placeholder="用户名" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="联系电话" prop="lianxidianhua">
<el-input v-model="ruleForm.lianxidianhua"
placeholder="联系电话" clearable :readonly="ro.lianxidianhua"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="联系电话" prop="lianxidianhua">
<el-input v-model="ruleForm.lianxidianhua"
placeholder="联系电话" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-form-item class="btn">
<el-button v-if="type!='info'" type="primary" class="btn-success" @click="onSubmit"></el-button>
<el-button v-if="type!='info'" class="btn-close" @click="back()"></el-button>
<el-button v-if="type=='info'" class="btn-close" @click="back()"></el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
// url
import { isNumber,isIntNumer,isEmail,isPhone, isMobile,isURL,checkIdCard } from "@/utils/validate";
export default {
data() {
let self = this
var validateIdCard = (rule, value, callback) => {
if(!value){
callback();
} else if (!checkIdCard(value)) {
callback(new Error("请输入正确的身份证号码"));
} else {
callback();
}
};
var validateUrl = (rule, value, callback) => {
if(!value){
callback();
} else if (!isURL(value)) {
callback(new Error("请输入正确的URL地址"));
} else {
callback();
}
};
var validateMobile = (rule, value, callback) => {
if(!value){
callback();
} else if (!isMobile(value)) {
callback(new Error("请输入正确的手机号码"));
} else {
callback();
}
};
var validatePhone = (rule, value, callback) => {
if(!value){
callback();
} else if (!isPhone(value)) {
callback(new Error("请输入正确的电话号码"));
} else {
callback();
}
};
var validateEmail = (rule, value, callback) => {
if(!value){
callback();
} else if (!isEmail(value)) {
callback(new Error("请输入正确的邮箱地址"));
} else {
callback();
}
};
var validateNumber = (rule, value, callback) => {
if(!value){
callback();
} else if (!isNumber(value)) {
callback(new Error("请输入数字"));
} else {
callback();
}
};
var validateIntNumber = (rule, value, callback) => {
if(!value){
callback();
} else if (!isIntNumer(value)) {
callback(new Error("请输入整数"));
} else {
callback();
}
};
return {
addEditForm: {"btnSaveFontColor":"#fff","selectFontSize":"14px","btnCancelBorderColor":"rgba(152, 129, 129, 1)","inputBorderRadius":"22px","inputFontSize":"14px","textareaBgColor":"#fff","btnSaveFontSize":"14px","textareaBorderRadius":"22px","uploadBgColor":"#fff","textareaBorderStyle":"solid","btnCancelWidth":"88px","textareaHeight":"120px","dateBgColor":"#fff","btnSaveBorderRadius":"22px","uploadLableFontSize":"14px","textareaBorderWidth":"1px","inputLableColor":"#606266","addEditBoxColor":"rgba(210, 194, 194, 0.29)","dateIconFontSize":"14px","btnSaveBgColor":"#409EFF","uploadIconFontColor":"#8c939d","textareaBorderColor":"rgba(152, 129, 129, 1)","btnCancelBgColor":"rgba(143, 222, 143, 1)","selectLableColor":"#606266","btnSaveBorderStyle":"solid","dateBorderWidth":"1px","dateLableFontSize":"14px","dateBorderRadius":"22px","btnCancelBorderStyle":"solid","selectLableFontSize":"14px","selectBorderStyle":"solid","selectIconFontColor":"#C0C4CC","btnCancelHeight":"44px","inputHeight":"40px","btnCancelFontColor":"#606266","dateBorderColor":"rgba(152, 129, 129, 1)","dateIconFontColor":"#C0C4CC","uploadBorderStyle":"solid","dateBorderStyle":"solid","dateLableColor":"#606266","dateFontSize":"14px","inputBorderWidth":"1px","uploadIconFontSize":"28px","selectHeight":"40px","inputFontColor":"#606266","uploadHeight":"148px","textareaLableColor":"#606266","textareaLableFontSize":"14px","btnCancelFontSize":"14px","inputBorderStyle":"solid","btnCancelBorderRadius":"22px","inputBgColor":"rgba(252, 250, 250, 1)","inputLableFontSize":"14px","uploadLableColor":"#606266","uploadBorderRadius":"22px","btnSaveHeight":"44px","selectBgColor":"#fff","btnSaveWidth":"88px","selectIconFontSize":"14px","dateHeight":"40px","selectBorderColor":"rgba(152, 129, 129, 1)","inputBorderColor":"rgba(152, 129, 129, 1)","uploadBorderColor":"rgba(152, 129, 129, 1)","textareaFontColor":"#606266","selectBorderWidth":"1px","dateFontColor":"#606266","btnCancelBorderWidth":"1px","uploadBorderWidth":"1px","textareaFontSize":"14px","selectBorderRadius":"22px","selectFontColor":"#606266","btnSaveBorderColor":"#409EFF","btnSaveBorderWidth":"1px"},
id: '',
type: '',
ro:{
fangwumingcheng : false,
fangwuleixing : false,
baoxiumingcheng : false,
leixing : false,
baoxiuriqi : false,
weixiufankui : false,
weixiujindu : false,
gengxinriqi : false,
fangzhuzhanghao : false,
fangzhuxingming : false,
yonghuming : false,
lianxidianhua : false,
},
ruleForm: {
fangwumingcheng: '',
fangwuleixing: '',
baoxiumingcheng: '',
leixing: '',
baoxiuriqi: '',
weixiufankui: '',
weixiujindu: '',
gengxinriqi: '',
fangzhuzhanghao: '',
fangzhuxingming: '',
yonghuming: '',
lianxidianhua: '',
},
weixiujinduOptions: [],
rules: {
fangwumingcheng: [
],
fangwuleixing: [
],
baoxiumingcheng: [
],
leixing: [
],
baoxiuriqi: [
],
weixiufankui: [
],
weixiujindu: [
],
gengxinriqi: [
],
fangzhuzhanghao: [
],
fangzhuxingming: [
],
yonghuming: [
],
lianxidianhua: [
],
}
};
},
props: ["parent"],
computed: {
},
created() {
this.addEditStyleChange()
this.addEditUploadStyleChange()
},
methods: {
//
download(file){
window.open(`${file}`)
},
//
init(id,type) {
if (id) {
this.id = id;
this.type = type;
}
if(this.type=='info'||this.type=='else'){
this.info(id);
}else if(this.type=='cross'){
var obj = this.$storage.getObj('crossObj');
for (var o in obj){
if(o=='fangwumingcheng'){
this.ruleForm.fangwumingcheng = obj[o];
this.ro.fangwumingcheng = true;
continue;
}
if(o=='fangwuleixing'){
this.ruleForm.fangwuleixing = obj[o];
this.ro.fangwuleixing = true;
continue;
}
if(o=='baoxiumingcheng'){
this.ruleForm.baoxiumingcheng = obj[o];
this.ro.baoxiumingcheng = true;
continue;
}
if(o=='leixing'){
this.ruleForm.leixing = obj[o];
this.ro.leixing = true;
continue;
}
if(o=='baoxiuriqi'){
this.ruleForm.baoxiuriqi = obj[o];
this.ro.baoxiuriqi = true;
continue;
}
if(o=='weixiufankui'){
this.ruleForm.weixiufankui = obj[o];
this.ro.weixiufankui = true;
continue;
}
if(o=='weixiujindu'){
this.ruleForm.weixiujindu = obj[o];
this.ro.weixiujindu = true;
continue;
}
if(o=='gengxinriqi'){
this.ruleForm.gengxinriqi = obj[o];
this.ro.gengxinriqi = true;
continue;
}
if(o=='fangzhuzhanghao'){
this.ruleForm.fangzhuzhanghao = obj[o];
this.ro.fangzhuzhanghao = true;
continue;
}
if(o=='fangzhuxingming'){
this.ruleForm.fangzhuxingming = obj[o];
this.ro.fangzhuxingming = true;
continue;
}
if(o=='yonghuming'){
this.ruleForm.yonghuming = obj[o];
this.ro.yonghuming = true;
continue;
}
if(o=='lianxidianhua'){
this.ruleForm.lianxidianhua = obj[o];
this.ro.lianxidianhua = true;
continue;
}
}
}
//
this.$http({
url: `${this.$storage.get('sessionTable')}/session`,
method: "get"
}).then(({ data }) => {
if (data && data.code === 0) {
var json = data.data;
} else {
this.$message.error(data.msg);
}
});
this.weixiujinduOptions = "维修中,已完成".split(',')
},
//
info(id) {
this.$http({
url: `weixiuchuli/info/${id}`,
method: "get"
}).then(({ data }) => {
if (data && data.code === 0) {
this.ruleForm = data.data;
} else {
this.$message.error(data.msg);
}
});
},
//
onSubmit() {
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
this.$refs["ruleForm"].validate(valid => {
if (valid) {
this.$http({
url: `weixiuchuli/${!this.ruleForm.id ? "save" : "update"}`,
method: "post",
data: this.ruleForm
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.parent.showFlag = true;
this.parent.addOrUpdateFlag = false;
this.parent.weixiuchuliCrossAddOrUpdateFlag = false;
this.parent.search();
this.parent.contentStyleChange();
}
});
} else {
this.$message.error(data.msg);
}
});
}
});
},
// uuid
getUUID () {
return new Date().getTime();
},
//
back() {
this.parent.showFlag = true;
this.parent.addOrUpdateFlag = false;
this.parent.weixiuchuliCrossAddOrUpdateFlag = false;
this.parent.contentStyleChange();
},
addEditStyleChange() {
this.$nextTick(()=>{
// input
document.querySelectorAll('.addEdit-block .input .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.inputHeight
el.style.color = this.addEditForm.inputFontColor
el.style.fontSize = this.addEditForm.inputFontSize
el.style.borderWidth = this.addEditForm.inputBorderWidth
el.style.borderStyle = this.addEditForm.inputBorderStyle
el.style.borderColor = this.addEditForm.inputBorderColor
el.style.borderRadius = this.addEditForm.inputBorderRadius
el.style.backgroundColor = this.addEditForm.inputBgColor
})
document.querySelectorAll('.addEdit-block .input .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.inputHeight
el.style.color = this.addEditForm.inputLableColor
el.style.fontSize = this.addEditForm.inputLableFontSize
})
// select
document.querySelectorAll('.addEdit-block .select .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.selectHeight
el.style.color = this.addEditForm.selectFontColor
el.style.fontSize = this.addEditForm.selectFontSize
el.style.borderWidth = this.addEditForm.selectBorderWidth
el.style.borderStyle = this.addEditForm.selectBorderStyle
el.style.borderColor = this.addEditForm.selectBorderColor
el.style.borderRadius = this.addEditForm.selectBorderRadius
el.style.backgroundColor = this.addEditForm.selectBgColor
})
document.querySelectorAll('.addEdit-block .select .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.selectHeight
el.style.color = this.addEditForm.selectLableColor
el.style.fontSize = this.addEditForm.selectLableFontSize
})
document.querySelectorAll('.addEdit-block .select .el-select__caret').forEach(el=>{
el.style.color = this.addEditForm.selectIconFontColor
el.style.fontSize = this.addEditForm.selectIconFontSize
})
// date
document.querySelectorAll('.addEdit-block .date .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.dateHeight
el.style.color = this.addEditForm.dateFontColor
el.style.fontSize = this.addEditForm.dateFontSize
el.style.borderWidth = this.addEditForm.dateBorderWidth
el.style.borderStyle = this.addEditForm.dateBorderStyle
el.style.borderColor = this.addEditForm.dateBorderColor
el.style.borderRadius = this.addEditForm.dateBorderRadius
el.style.backgroundColor = this.addEditForm.dateBgColor
})
document.querySelectorAll('.addEdit-block .date .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.dateHeight
el.style.color = this.addEditForm.dateLableColor
el.style.fontSize = this.addEditForm.dateLableFontSize
})
document.querySelectorAll('.addEdit-block .date .el-input__icon').forEach(el=>{
el.style.color = this.addEditForm.dateIconFontColor
el.style.fontSize = this.addEditForm.dateIconFontSize
el.style.lineHeight = this.addEditForm.dateHeight
})
// upload
let iconLineHeight = parseInt(this.addEditForm.uploadHeight) - parseInt(this.addEditForm.uploadBorderWidth) * 2 + 'px'
document.querySelectorAll('.addEdit-block .upload .el-upload--picture-card').forEach(el=>{
el.style.width = this.addEditForm.uploadHeight
el.style.height = this.addEditForm.uploadHeight
el.style.borderWidth = this.addEditForm.uploadBorderWidth
el.style.borderStyle = this.addEditForm.uploadBorderStyle
el.style.borderColor = this.addEditForm.uploadBorderColor
el.style.borderRadius = this.addEditForm.uploadBorderRadius
el.style.backgroundColor = this.addEditForm.uploadBgColor
})
document.querySelectorAll('.addEdit-block .upload .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.uploadHeight
el.style.color = this.addEditForm.uploadLableColor
el.style.fontSize = this.addEditForm.uploadLableFontSize
})
document.querySelectorAll('.addEdit-block .upload .el-icon-plus').forEach(el=>{
el.style.color = this.addEditForm.uploadIconFontColor
el.style.fontSize = this.addEditForm.uploadIconFontSize
el.style.lineHeight = iconLineHeight
el.style.display = 'block'
})
//
document.querySelectorAll('.addEdit-block .textarea .el-textarea__inner').forEach(el=>{
el.style.height = this.addEditForm.textareaHeight
el.style.color = this.addEditForm.textareaFontColor
el.style.fontSize = this.addEditForm.textareaFontSize
el.style.borderWidth = this.addEditForm.textareaBorderWidth
el.style.borderStyle = this.addEditForm.textareaBorderStyle
el.style.borderColor = this.addEditForm.textareaBorderColor
el.style.borderRadius = this.addEditForm.textareaBorderRadius
el.style.backgroundColor = this.addEditForm.textareaBgColor
})
document.querySelectorAll('.addEdit-block .textarea .el-form-item__label').forEach(el=>{
// el.style.lineHeight = this.addEditForm.textareaHeight
el.style.color = this.addEditForm.textareaLableColor
el.style.fontSize = this.addEditForm.textareaLableFontSize
})
//
document.querySelectorAll('.addEdit-block .btn .btn-success').forEach(el=>{
el.style.width = this.addEditForm.btnSaveWidth
el.style.height = this.addEditForm.btnSaveHeight
el.style.color = this.addEditForm.btnSaveFontColor
el.style.fontSize = this.addEditForm.btnSaveFontSize
el.style.borderWidth = this.addEditForm.btnSaveBorderWidth
el.style.borderStyle = this.addEditForm.btnSaveBorderStyle
el.style.borderColor = this.addEditForm.btnSaveBorderColor
el.style.borderRadius = this.addEditForm.btnSaveBorderRadius
el.style.backgroundColor = this.addEditForm.btnSaveBgColor
})
//
document.querySelectorAll('.addEdit-block .btn .btn-close').forEach(el=>{
el.style.width = this.addEditForm.btnCancelWidth
el.style.height = this.addEditForm.btnCancelHeight
el.style.color = this.addEditForm.btnCancelFontColor
el.style.fontSize = this.addEditForm.btnCancelFontSize
el.style.borderWidth = this.addEditForm.btnCancelBorderWidth
el.style.borderStyle = this.addEditForm.btnCancelBorderStyle
el.style.borderColor = this.addEditForm.btnCancelBorderColor
el.style.borderRadius = this.addEditForm.btnCancelBorderRadius
el.style.backgroundColor = this.addEditForm.btnCancelBgColor
})
})
},
addEditUploadStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.addEdit-block .upload .el-upload-list--picture-card .el-upload-list__item').forEach(el=>{
el.style.width = this.addEditForm.uploadHeight
el.style.height = this.addEditForm.uploadHeight
el.style.borderWidth = this.addEditForm.uploadBorderWidth
el.style.borderStyle = this.addEditForm.uploadBorderStyle
el.style.borderColor = this.addEditForm.uploadBorderColor
el.style.borderRadius = this.addEditForm.uploadBorderRadius
el.style.backgroundColor = this.addEditForm.uploadBgColor
})
})
},
}
};
</script>
<style lang="scss">
.editor{
height: 500px;
& /deep/ .ql-container {
height: 310px;
}
}
.amap-wrapper {
width: 100%;
height: 500px;
}
.search-box {
position: absolute;
}
.addEdit-block {
margin: -10px;
}
.detail-form-content {
padding: 12px;
}
.btn .el-button {
padding: 0;
}
</style>

@ -0,0 +1,626 @@
<template>
<div class="main-content">
<!-- 列表页 -->
<div v-if="showFlag">
<el-form :inline="true" :model="searchForm" class="form-content">
<el-row :gutter="20" class="slt" :style="{justifyContent:contents.searchBoxPosition=='1'?'flex-start':contents.searchBoxPosition=='2'?'center':'flex-end'}">
<el-form-item :label="contents.inputTitle == 1 ? '报修名称' : ''">
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 1" prefix-icon="el-icon-search" v-model="searchForm.baoxiumingcheng" placeholder="报修名称" clearable></el-input>
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 2" suffix-icon="el-icon-search" v-model="searchForm.baoxiumingcheng" placeholder="报修名称" clearable></el-input>
<el-input v-if="contents.inputIcon == 0" v-model="searchForm.baoxiumingcheng" placeholder="报修名称" clearable></el-input>
</el-form-item>
<el-form-item :label="contents.inputTitle == 1 ? '维修进度' : ''">
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 1" prefix-icon="el-icon-search" v-model="searchForm.weixiujindu" placeholder="维修进度" clearable></el-input>
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 2" suffix-icon="el-icon-search" v-model="searchForm.weixiujindu" placeholder="维修进度" clearable></el-input>
<el-input v-if="contents.inputIcon == 0" v-model="searchForm.weixiujindu" placeholder="维修进度" clearable></el-input>
</el-form-item>
<el-form-item :label="contents.inputTitle == 1 ? '房主姓名' : ''">
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 1" prefix-icon="el-icon-search" v-model="searchForm.fangzhuxingming" placeholder="房主姓名" clearable></el-input>
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 2" suffix-icon="el-icon-search" v-model="searchForm.fangzhuxingming" placeholder="房主姓名" clearable></el-input>
<el-input v-if="contents.inputIcon == 0" v-model="searchForm.fangzhuxingming" placeholder="房主姓名" clearable></el-input>
</el-form-item>
<el-form-item :label="contents.inputTitle == 1 ? '用户名' : ''">
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 1" prefix-icon="el-icon-search" v-model="searchForm.yonghuming" placeholder="用户名" clearable></el-input>
<el-input v-if="contents.inputIcon == 1 && contents.inputIconPosition == 2" suffix-icon="el-icon-search" v-model="searchForm.yonghuming" placeholder="用户名" clearable></el-input>
<el-input v-if="contents.inputIcon == 0" v-model="searchForm.yonghuming" placeholder="用户名" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button v-if="contents.searchBtnIcon == 1 && contents.searchBtnIconPosition == 1" icon="el-icon-search" type="success" @click="search()">{{ contents.searchBtnFont == 1?'':'' }}</el-button>
<el-button v-if="contents.searchBtnIcon == 1 && contents.searchBtnIconPosition == 2" type="success" @click="search()">{{ contents.searchBtnFont == 1?'':'' }}<i class="el-icon-search el-icon--right"/></el-button>
<el-button v-if="contents.searchBtnIcon == 0" type="success" @click="search()">{{ contents.searchBtnFont == 1?'':'' }}</el-button>
</el-form-item>
</el-row>
<el-row class="ad" :style="{justifyContent:contents.btnAdAllBoxPosition=='1'?'flex-start':contents.btnAdAllBoxPosition=='2'?'center':'flex-end'}">
<el-form-item>
<el-button
v-if="isAuth('weixiuchuli','新增') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 1"
type="success"
icon="el-icon-plus"
@click="addOrUpdateHandler()"
>{{ contents.btnAdAllFont == 1?'新增':'' }}</el-button>
<el-button
v-if="isAuth('weixiuchuli','新增') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 2"
type="success"
@click="addOrUpdateHandler()"
>{{ contents.btnAdAllFont == 1?'新增':'' }}<i class="el-icon-plus el-icon--right" /></el-button>
<el-button
v-if="isAuth('weixiuchuli','新增') && contents.btnAdAllIcon == 0"
type="success"
@click="addOrUpdateHandler()"
>{{ contents.btnAdAllFont == 1?'新增':'' }}</el-button>
<el-button
v-if="isAuth('weixiuchuli','删除') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 1 && contents.tableSelection"
:disabled="dataListSelections.length <= 0"
type="danger"
icon="el-icon-delete"
@click="deleteHandler()"
>{{ contents.btnAdAllFont == 1?'删除':'' }}</el-button>
<el-button
v-if="isAuth('weixiuchuli','删除') && contents.btnAdAllIcon == 1 && contents.btnAdAllIconPosition == 2 && contents.tableSelection"
:disabled="dataListSelections.length <= 0"
type="danger"
@click="deleteHandler()"
>{{ contents.btnAdAllFont == 1?'删除':'' }}<i class="el-icon-delete el-icon--right" /></el-button>
<el-button
v-if="isAuth('weixiuchuli','删除') && contents.btnAdAllIcon == 0 && contents.tableSelection"
:disabled="dataListSelections.length <= 0"
type="danger"
@click="deleteHandler()"
>{{ contents.btnAdAllFont == 1?'删除':'' }}</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="table-content">
<el-table class="tables" :size="contents.tableSize" :show-header="contents.tableShowHeader"
:header-row-style="headerRowStyle" :header-cell-style="headerCellStyle"
:border="contents.tableBorder"
:fit="contents.tableFit"
:stripe="contents.tableStripe"
:row-style="rowStyle"
:cell-style="cellStyle"
:style="{width: '100%',fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}"
v-if="isAuth('weixiuchuli','查看')"
:data="dataList"
v-loading="dataListLoading"
@selection-change="selectionChangeHandler">
<el-table-column v-if="contents.tableSelection"
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column label="索引" v-if="contents.tableIndex" type="index" width="50" />
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="fangwumingcheng"
header-align="center"
label="房屋名称">
<template slot-scope="scope">
{{scope.row.fangwumingcheng}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="fangwuleixing"
header-align="center"
label="房屋类型">
<template slot-scope="scope">
{{scope.row.fangwuleixing}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="baoxiumingcheng"
header-align="center"
label="报修名称">
<template slot-scope="scope">
{{scope.row.baoxiumingcheng}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="leixing"
header-align="center"
label="类型">
<template slot-scope="scope">
{{scope.row.leixing}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="baoxiuriqi"
header-align="center"
label="报修日期">
<template slot-scope="scope">
{{scope.row.baoxiuriqi}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="weixiufankui"
header-align="center"
label="维修反馈">
<template slot-scope="scope">
{{scope.row.weixiufankui}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="weixiujindu"
header-align="center"
label="维修进度">
<template slot-scope="scope">
{{scope.row.weixiujindu}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="gengxinriqi"
header-align="center"
label="更新日期">
<template slot-scope="scope">
{{scope.row.gengxinriqi}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="fangzhuzhanghao"
header-align="center"
label="房主账号">
<template slot-scope="scope">
{{scope.row.fangzhuzhanghao}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="fangzhuxingming"
header-align="center"
label="房主姓名">
<template slot-scope="scope">
{{scope.row.fangzhuxingming}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="yonghuming"
header-align="center"
label="用户名">
<template slot-scope="scope">
{{scope.row.yonghuming}}
</template>
</el-table-column>
<el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"
prop="lianxidianhua"
header-align="center"
label="联系电话">
<template slot-scope="scope">
{{scope.row.lianxidianhua}}
</template>
</el-table-column>
<el-table-column width="300" :align="contents.tableAlign"
header-align="center"
label="操作">
<template slot-scope="scope">
<el-button v-if="isAuth('weixiuchuli','查看') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 1" type="success" icon="el-icon-tickets" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('weixiuchuli','查看') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 2" type="success" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">{{ contents.tableBtnFont == 1?'':'' }}<i class="el-icon-tickets el-icon--right" /></el-button>
<el-button v-if="isAuth('weixiuchuli','查看') && contents.tableBtnIcon == 0" type="success" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('weixiuchuli','修改') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 1" type="primary" icon="el-icon-edit" size="mini" @click="addOrUpdateHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('weixiuchuli','修改') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 2" type="primary" size="mini" @click="addOrUpdateHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}<i class="el-icon-edit el-icon--right" /></el-button>
<el-button v-if="isAuth('weixiuchuli','修改') && contents.tableBtnIcon == 0" type="primary" size="mini" @click="addOrUpdateHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('weixiuchuli','删除') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 1" type="danger" icon="el-icon-delete" size="mini" @click="deleteHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
<el-button v-if="isAuth('weixiuchuli','删除') && contents.tableBtnIcon == 1 && contents.tableBtnIconPosition == 2" type="danger" size="mini" @click="deleteHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}<i class="el-icon-delete el-icon--right" /></el-button>
<el-button v-if="isAuth('weixiuchuli','删除') && contents.tableBtnIcon == 0" type="danger" size="mini" @click="deleteHandler(scope.row.id)">{{ contents.tableBtnFont == 1?'':'' }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
clsss="pages"
:layout="layouts"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="Number(contents.pageEachNum)"
:total="totalPage"
:small="contents.pageStyle"
class="pagination-content"
:background="contents.pageBtnBG"
:style="{textAlign:contents.pagePosition==1?'left':contents.pagePosition==2?'center':'right'}"
></el-pagination>
</div>
</div>
<!-- 添加/修改页面 将父组件的search方法传递给子组件-->
<add-or-update v-if="addOrUpdateFlag" :parent="this" ref="addOrUpdate"></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from "./add-or-update";
export default {
data() {
return {
searchForm: {
key: ""
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
showFlag: true,
sfshVisiable: false,
shForm: {},
chartVisiable: false,
addOrUpdateFlag:false,
contents:{"searchBtnFontColor":"#333","pagePosition":"1","inputFontSize":"14px","inputBorderRadius":"22px","tableBtnDelFontColor":"#333","tableBtnIconPosition":"1","searchBtnHeight":"40px","inputIconColor":"rgba(66, 130, 129, 1)","searchBtnBorderRadius":"22px","tableStripe":false,"btnAdAllWarnFontColor":"#333","tableBtnDelBgColor":"rgba(244, 150, 150, 1)","searchBtnIcon":"1","tableSize":"medium","searchBtnBorderStyle":"solid","tableSelection":true,"searchBtnBorderWidth":"1px","tableContentFontSize":"14px","searchBtnBgColor":"rgba(153, 239, 237, 1)","inputTitleSize":"14px","btnAdAllBorderColor":"#DCDFE6","pageJumper":true,"btnAdAllIconPosition":"1","searchBoxPosition":"1","tableBtnDetailFontColor":"#333","tableBtnHeight":"40px","pagePager":true,"searchBtnBorderColor":"#DCDFE6","tableHeaderFontColor":"rgba(33, 34, 35, 1)","inputTitle":"1","tableBtnBorderRadius":"22px","btnAdAllFont":"1","btnAdAllDelFontColor":"rgba(21, 20, 20, 1)","tableBtnIcon":"1","btnAdAllHeight":"40px","btnAdAllWarnBgColor":"rgba(238, 236, 126, 1)","btnAdAllBorderWidth":"1px","tableStripeFontColor":"#606266","tableBtnBorderStyle":"solid","inputHeight":"40px","btnAdAllBorderRadius":"22px","btnAdAllDelBgColor":"rgba(234, 93, 93, 0.69)","pagePrevNext":true,"btnAdAllAddBgColor":"rgba(153, 239, 237, 1)","searchBtnFont":"1","tableIndex":true,"btnAdAllIcon":"1","tableSortable":true,"pageSizes":true,"tableFit":true,"pageBtnBG":true,"searchBtnFontSize":"14px","tableBtnEditBgColor":"rgba(240, 242, 124, 1)","inputBorderWidth":"1px","inputFontPosition":"1","inputFontColor":"#333","pageEachNum":10,"tableHeaderBgColor":"rgba(152, 129, 129, 1)","inputTitleColor":"#333","btnAdAllBoxPosition":"1","tableBtnDetailBgColor":"rgba(171, 239, 239, 1)","inputIcon":"0","searchBtnIconPosition":"1","btnAdAllFontSize":"14px","inputBorderStyle":"solid","inputBgColor":"rgba(197, 174, 174, 0.32)","pageStyle":false,"pageTotal":true,"btnAdAllAddFontColor":"#333","tableBtnFont":"1","tableContentFontColor":"rgba(22, 22, 23, 1)","inputBorderColor":"rgba(152, 129, 129, 1)","tableShowHeader":true,"tableBtnFontSize":"14px","tableBtnBorderColor":"rgba(196, 210, 244, 1)","inputIconPosition":"1","tableBorder":true,"btnAdAllBorderStyle":"solid","tableBtnBorderWidth":"1px","tableStripeBgColor":"rgba(213, 197, 197, 1)","tableBtnEditFontColor":"#333","tableAlign":"center"},
layouts: '',
};
},
created() {
this.init();
this.getDataList();
this.contentStyleChange()
},
mounted() {
},
filters: {
htmlfilter: function (val) {
return val.replace(/<[^>]*>/g).replace(/undefined/g,'');
}
},
components: {
AddOrUpdate,
},
methods: {
contentStyleChange() {
this.contentSearchStyleChange()
this.contentBtnAdAllStyleChange()
this.contentSearchBtnStyleChange()
this.contentTableBtnStyleChange()
this.contentPageStyleChange()
},
contentSearchStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.form-content .slt .el-input__inner').forEach(el=>{
let textAlign = 'left'
if(this.contents.inputFontPosition == 2) textAlign = 'center'
if(this.contents.inputFontPosition == 3) textAlign = 'right'
el.style.textAlign = textAlign
el.style.height = this.contents.inputHeight
el.style.lineHeight = this.contents.inputHeight
el.style.color = this.contents.inputFontColor
el.style.fontSize = this.contents.inputFontSize
el.style.borderWidth = this.contents.inputBorderWidth
el.style.borderStyle = this.contents.inputBorderStyle
el.style.borderColor = this.contents.inputBorderColor
el.style.borderRadius = this.contents.inputBorderRadius
el.style.backgroundColor = this.contents.inputBgColor
})
if(this.contents.inputTitle) {
document.querySelectorAll('.form-content .slt .el-form-item__label').forEach(el=>{
el.style.color = this.contents.inputTitleColor
el.style.fontSize = this.contents.inputTitleSize
el.style.lineHeight = this.contents.inputHeight
})
}
setTimeout(()=>{
document.querySelectorAll('.form-content .slt .el-input__prefix').forEach(el=>{
el.style.color = this.contents.inputIconColor
el.style.lineHeight = this.contents.inputHeight
})
document.querySelectorAll('.form-content .slt .el-input__suffix').forEach(el=>{
el.style.color = this.contents.inputIconColor
el.style.lineHeight = this.contents.inputHeight
})
document.querySelectorAll('.form-content .slt .el-input__icon').forEach(el=>{
el.style.lineHeight = this.contents.inputHeight
})
},10)
})
},
//
contentSearchBtnStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.form-content .slt .el-button--success').forEach(el=>{
el.style.height = this.contents.searchBtnHeight
el.style.color = this.contents.searchBtnFontColor
el.style.fontSize = this.contents.searchBtnFontSize
el.style.borderWidth = this.contents.searchBtnBorderWidth
el.style.borderStyle = this.contents.searchBtnBorderStyle
el.style.borderColor = this.contents.searchBtnBorderColor
el.style.borderRadius = this.contents.searchBtnBorderRadius
el.style.backgroundColor = this.contents.searchBtnBgColor
})
})
},
//
contentBtnAdAllStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.form-content .ad .el-button--success').forEach(el=>{
el.style.height = this.contents.btnAdAllHeight
el.style.color = this.contents.btnAdAllAddFontColor
el.style.fontSize = this.contents.btnAdAllFontSize
el.style.borderWidth = this.contents.btnAdAllBorderWidth
el.style.borderStyle = this.contents.btnAdAllBorderStyle
el.style.borderColor = this.contents.btnAdAllBorderColor
el.style.borderRadius = this.contents.btnAdAllBorderRadius
el.style.backgroundColor = this.contents.btnAdAllAddBgColor
})
document.querySelectorAll('.form-content .ad .el-button--danger').forEach(el=>{
el.style.height = this.contents.btnAdAllHeight
el.style.color = this.contents.btnAdAllDelFontColor
el.style.fontSize = this.contents.btnAdAllFontSize
el.style.borderWidth = this.contents.btnAdAllBorderWidth
el.style.borderStyle = this.contents.btnAdAllBorderStyle
el.style.borderColor = this.contents.btnAdAllBorderColor
el.style.borderRadius = this.contents.btnAdAllBorderRadius
el.style.backgroundColor = this.contents.btnAdAllDelBgColor
})
document.querySelectorAll('.form-content .ad .el-button--warning').forEach(el=>{
el.style.height = this.contents.btnAdAllHeight
el.style.color = this.contents.btnAdAllWarnFontColor
el.style.fontSize = this.contents.btnAdAllFontSize
el.style.borderWidth = this.contents.btnAdAllBorderWidth
el.style.borderStyle = this.contents.btnAdAllBorderStyle
el.style.borderColor = this.contents.btnAdAllBorderColor
el.style.borderRadius = this.contents.btnAdAllBorderRadius
el.style.backgroundColor = this.contents.btnAdAllWarnBgColor
})
})
},
//
rowStyle({ row, rowIndex}) {
if (rowIndex % 2 == 1) {
if(this.contents.tableStripe) {
return {color:this.contents.tableStripeFontColor}
}
} else {
return ''
}
},
cellStyle({ row, rowIndex}){
if (rowIndex % 2 == 1) {
if(this.contents.tableStripe) {
return {backgroundColor:this.contents.tableStripeBgColor}
}
} else {
return ''
}
},
headerRowStyle({ row, rowIndex}){
return {color: this.contents.tableHeaderFontColor}
},
headerCellStyle({ row, rowIndex}){
return {backgroundColor: this.contents.tableHeaderBgColor}
},
//
contentTableBtnStyleChange(){
// this.$nextTick(()=>{
// setTimeout(()=>{
// document.querySelectorAll('.table-content .tables .el-table__body .el-button--success').forEach(el=>{
// el.style.height = this.contents.tableBtnHeight
// el.style.color = this.contents.tableBtnDetailFontColor
// el.style.fontSize = this.contents.tableBtnFontSize
// el.style.borderWidth = this.contents.tableBtnBorderWidth
// el.style.borderStyle = this.contents.tableBtnBorderStyle
// el.style.borderColor = this.contents.tableBtnBorderColor
// el.style.borderRadius = this.contents.tableBtnBorderRadius
// el.style.backgroundColor = this.contents.tableBtnDetailBgColor
// })
// document.querySelectorAll('.table-content .tables .el-table__body .el-button--primary').forEach(el=>{
// el.style.height = this.contents.tableBtnHeight
// el.style.color = this.contents.tableBtnEditFontColor
// el.style.fontSize = this.contents.tableBtnFontSize
// el.style.borderWidth = this.contents.tableBtnBorderWidth
// el.style.borderStyle = this.contents.tableBtnBorderStyle
// el.style.borderColor = this.contents.tableBtnBorderColor
// el.style.borderRadius = this.contents.tableBtnBorderRadius
// el.style.backgroundColor = this.contents.tableBtnEditBgColor
// })
// document.querySelectorAll('.table-content .tables .el-table__body .el-button--danger').forEach(el=>{
// el.style.height = this.contents.tableBtnHeight
// el.style.color = this.contents.tableBtnDelFontColor
// el.style.fontSize = this.contents.tableBtnFontSize
// el.style.borderWidth = this.contents.tableBtnBorderWidth
// el.style.borderStyle = this.contents.tableBtnBorderStyle
// el.style.borderColor = this.contents.tableBtnBorderColor
// el.style.borderRadius = this.contents.tableBtnBorderRadius
// el.style.backgroundColor = this.contents.tableBtnDelBgColor
// })
// }, 50)
// })
},
//
contentPageStyleChange(){
let arr = []
if(this.contents.pageTotal) arr.push('total')
if(this.contents.pageSizes) arr.push('sizes')
if(this.contents.pagePrevNext){
arr.push('prev')
if(this.contents.pagePager) arr.push('pager')
arr.push('next')
}
if(this.contents.pageJumper) arr.push('jumper')
this.layouts = arr.join()
this.contents.pageEachNum = 10
},
init () {
this.weixiujinduOptions = "维修中,已完成".split(',')
},
search() {
this.pageIndex = 1;
this.getDataList();
},
//
getDataList() {
this.dataListLoading = true;
let params = {
page: this.pageIndex,
limit: this.pageSize,
sort: 'id',
}
if(this.searchForm.baoxiumingcheng!='' && this.searchForm.baoxiumingcheng!=undefined){
params['baoxiumingcheng'] = '%' + this.searchForm.baoxiumingcheng + '%'
}
if(this.searchForm.weixiujindu!='' && this.searchForm.weixiujindu!=undefined){
params['weixiujindu'] = '%' + this.searchForm.weixiujindu + '%'
}
if(this.searchForm.fangzhuxingming!='' && this.searchForm.fangzhuxingming!=undefined){
params['fangzhuxingming'] = '%' + this.searchForm.fangzhuxingming + '%'
}
if(this.searchForm.yonghuming!='' && this.searchForm.yonghuming!=undefined){
params['yonghuming'] = '%' + this.searchForm.yonghuming + '%'
}
this.$http({
url: "weixiuchuli/page",
method: "get",
params: params
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.list;
this.totalPage = data.data.total;
} else {
this.dataList = [];
this.totalPage = 0;
}
this.dataListLoading = false;
});
},
//
sizeChangeHandle(val) {
this.pageSize = val;
this.pageIndex = 1;
this.getDataList();
},
//
currentChangeHandle(val) {
this.pageIndex = val;
this.getDataList();
},
//
selectionChangeHandler(val) {
this.dataListSelections = val;
},
// /
addOrUpdateHandler(id,type) {
this.showFlag = false;
this.addOrUpdateFlag = true;
this.crossAddOrUpdateFlag = false;
if(type!='info'){
type = 'else';
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id,type);
});
},
//
//
download(file){
window.open(`${file}`)
},
//
deleteHandler(id) {
var ids = id
? [Number(id)]
: this.dataListSelections.map(item => {
return Number(item.id);
});
this.$confirm(`确定进行[${id ? "删除" : "批量删除"}]操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$http({
url: "weixiuchuli/delete",
method: "post",
data: ids
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.search();
}
});
} else {
this.$message.error(data.msg);
}
});
});
},
}
};
</script>
<style lang="scss" scoped>
.slt {
margin: 0 !important;
display: flex;
}
.ad {
margin: 0 !important;
display: flex;
}
.pages {
& /deep/ el-pagination__sizes{
& /deep/ el-input__inner {
height: 22px;
line-height: 22px;
}
}
}
.el-button+.el-button {
margin:0;
}
.tables {
& /deep/ .el-button--success {
height: 40px;
color: #333;
font-size: 14px;
border-width: 1px;
border-style: solid;
border-color: rgba(196, 210, 244, 1);
border-radius: 22px;
background-color: rgba(171, 239, 239, 1);
}
& /deep/ .el-button--primary {
height: 40px;
color: #333;
font-size: 14px;
border-width: 1px;
border-style: solid;
border-color: rgba(196, 210, 244, 1);
border-radius: 22px;
background-color: rgba(240, 242, 124, 1);
}
& /deep/ .el-button--danger {
height: 40px;
color: #333;
font-size: 14px;
border-width: 1px;
border-style: solid;
border-color: rgba(196, 210, 244, 1);
border-radius: 22px;
background-color: rgba(244, 150, 150, 1);
}
& /deep/ .el-button {
margin: 4px;
}
}
</style>

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dao.StoreupDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.entity.StoreupEntity" id="storeupMap">
<result property="userid" column="userid"/>
<result property="refid" column="refid"/>
<result property="tablename" column="tablename"/>
<result property="name" column="name"/>
<result property="picture" column="picture"/>
</resultMap>
<select id="selectListVO"
resultType="com.entity.vo.StoreupVO" >
SELECT * FROM storeup storeup
<where> 1=1 ${ew.sqlSegment}</where>
</select>
<select id="selectVO"
resultType="com.entity.vo.StoreupVO" >
SELECT storeup.* FROM storeup storeup
<where> 1=1 ${ew.sqlSegment}</where>
</select>
<select id="selectListView"
resultType="com.entity.view.StoreupView" >
SELECT storeup.* FROM storeup storeup
<where> 1=1 ${ew.sqlSegment}</where>
</select>
<select id="selectView"
resultType="com.entity.view.StoreupView" >
SELECT * FROM storeup storeup <where> 1=1 ${ew.sqlSegment}</where>
</select>
</mapper>

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dao.WeixiuchuliDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.entity.WeixiuchuliEntity" id="weixiuchuliMap">
<result property="fangwumingcheng" column="fangwumingcheng"/>
<result property="fangwuleixing" column="fangwuleixing"/>
<result property="baoxiumingcheng" column="baoxiumingcheng"/>
<result property="leixing" column="leixing"/>
<result property="baoxiuriqi" column="baoxiuriqi"/>
<result property="weixiufankui" column="weixiufankui"/>
<result property="weixiujindu" column="weixiujindu"/>
<result property="gengxinriqi" column="gengxinriqi"/>
<result property="fangzhuzhanghao" column="fangzhuzhanghao"/>
<result property="fangzhuxingming" column="fangzhuxingming"/>
<result property="yonghuming" column="yonghuming"/>
<result property="lianxidianhua" column="lianxidianhua"/>
</resultMap>
<select id="selectListVO"
resultType="com.entity.vo.WeixiuchuliVO" >
SELECT * FROM weixiuchuli weixiuchuli
<where> 1=1 ${ew.sqlSegment}</where>
</select>
<select id="selectVO"
resultType="com.entity.vo.WeixiuchuliVO" >
SELECT weixiuchuli.* FROM weixiuchuli weixiuchuli
<where> 1=1 ${ew.sqlSegment}</where>
</select>
<select id="selectListView"
resultType="com.entity.view.WeixiuchuliView" >
SELECT weixiuchuli.* FROM weixiuchuli weixiuchuli
<where> 1=1 ${ew.sqlSegment}</where>
</select>
<select id="selectView"
resultType="com.entity.view.WeixiuchuliView" >
SELECT * FROM weixiuchuli weixiuchuli <where> 1=1 ${ew.sqlSegment}</where>
</select>
</mapper>
Loading…
Cancel
Save