1、会员入驻列表刷不出来,需要排查错误。
2、会员入驻完成已审阶段的新入驻,下一步需要更改菜地。
This commit is contained in:
parent
898fdfe48b
commit
e84fdf8e5a
@ -3,6 +3,7 @@ package com.jlt.csa.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.jlt.csa.domain.dto.ContractClaimDto;
|
||||||
import com.ruoyi.common.utils.DictUtils;
|
import com.ruoyi.common.utils.DictUtils;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -130,4 +131,16 @@ public class FarmerContractController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(farmerContractService.auditContract(contractId));
|
return toAjax(farmerContractService.auditContract(contractId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员合约确认认领菜地
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('csa:contract:edit')")
|
||||||
|
@Log(title = "会员签约", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/claim")
|
||||||
|
public AjaxResult claim(@RequestBody ContractClaimDto claim)
|
||||||
|
{
|
||||||
|
return toAjax(farmerContractService.claimGarden(claim));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,6 @@ public class GardenController extends BaseController
|
|||||||
@GetMapping({"/cansell/{code}", "/cansell/"})
|
@GetMapping({"/cansell/{code}", "/cansell/"})
|
||||||
public TableDataInfo listCanSell(@PathVariable(value = "code", required = false) String code)
|
public TableDataInfo listCanSell(@PathVariable(value = "code", required = false) String code)
|
||||||
{
|
{
|
||||||
logger.error("--==>" + code);
|
|
||||||
Garden garden = new Garden();
|
Garden garden = new Garden();
|
||||||
garden.setCode(code);
|
garden.setCode(code);
|
||||||
garden.setIsCompleted("Y");
|
garden.setIsCompleted("Y");
|
||||||
|
@ -36,7 +36,7 @@ public class Garden extends BaseEntity
|
|||||||
|
|
||||||
/** 平方米 */
|
/** 平方米 */
|
||||||
@Excel(name = "平方米")
|
@Excel(name = "平方米")
|
||||||
private Integer m2;
|
private Long m2;
|
||||||
|
|
||||||
/** 会员 */
|
/** 会员 */
|
||||||
@Excel(name = "会员id")
|
@Excel(name = "会员id")
|
||||||
@ -117,12 +117,12 @@ public class Garden extends BaseEntity
|
|||||||
{
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setM2(Integer m2)
|
public void setM2(Long m2)
|
||||||
{
|
{
|
||||||
this.m2 = m2;
|
this.m2 = m2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getM2()
|
public Long getM2()
|
||||||
{
|
{
|
||||||
return m2;
|
return m2;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.jlt.csa.domain.dto;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合约认领菜地的信息的DTO
|
||||||
|
*/
|
||||||
|
public class ContractClaimDto {
|
||||||
|
// 合约Id
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
// 会员姓名
|
||||||
|
private String farmerName;
|
||||||
|
|
||||||
|
// 会员电话
|
||||||
|
private String mobileNumber;
|
||||||
|
|
||||||
|
// 菜地Id
|
||||||
|
private Long gardenId;
|
||||||
|
|
||||||
|
// 菜地名称
|
||||||
|
private String gardenName;
|
||||||
|
|
||||||
|
public Long getContractId() {
|
||||||
|
return contractId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractId(Long contractId) {
|
||||||
|
this.contractId = contractId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFarmerName() {
|
||||||
|
return farmerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFarmerName(String farmerName) {
|
||||||
|
this.farmerName = farmerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMobileNumber() {
|
||||||
|
return mobileNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobileNumber(String mobileNumber) {
|
||||||
|
this.mobileNumber = mobileNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getGardenId() {
|
||||||
|
return gardenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGardenId(Long gardenId) {
|
||||||
|
this.gardenId = gardenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGardenName() {
|
||||||
|
return gardenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGardenName(String gardenName) {
|
||||||
|
this.gardenName = gardenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("contractId", getContractId())
|
||||||
|
.append("farmerName", getFarmerName())
|
||||||
|
.append("mobileNumber", getMobileNumber())
|
||||||
|
.append("gardenId", getGardenId())
|
||||||
|
.append("gardenName", getGardenName())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.jlt.csa.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.jlt.csa.domain.FarmerContract;
|
import com.jlt.csa.domain.FarmerContract;
|
||||||
|
import com.jlt.csa.domain.dto.ContractClaimDto;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@ -74,5 +75,12 @@ public interface IFarmerContractService
|
|||||||
* @param contractId 合约id
|
* @param contractId 合约id
|
||||||
* @return 受影响的记录数
|
* @return 受影响的记录数
|
||||||
*/
|
*/
|
||||||
public int auditContract(@PathVariable Long contractId);
|
public int auditContract(Long contractId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员认领菜地
|
||||||
|
* @param claim 认领菜地的信息
|
||||||
|
* @return 受影响的记录数
|
||||||
|
*/
|
||||||
|
public int claimGarden(ContractClaimDto claim);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
package com.jlt.csa.service.impl;
|
package com.jlt.csa.service.impl;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.jlt.csa.domain.Farmer;
|
import com.jlt.csa.domain.Farmer;
|
||||||
|
import com.jlt.csa.domain.Garden;
|
||||||
|
import com.jlt.csa.domain.dto.ContractClaimDto;
|
||||||
import com.jlt.csa.service.IFarmerService;
|
import com.jlt.csa.service.IFarmerService;
|
||||||
|
import com.jlt.csa.service.IGardenService;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.DictUtils;
|
import com.ruoyi.common.utils.DictUtils;
|
||||||
@ -29,6 +33,7 @@ public class FarmerContractServiceImpl implements IFarmerContractService
|
|||||||
{
|
{
|
||||||
private FarmerContractMapper farmerContractMapper;
|
private FarmerContractMapper farmerContractMapper;
|
||||||
private IFarmerService farmerService;
|
private IFarmerService farmerService;
|
||||||
|
private IGardenService gardenService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setFarmerContractMapper(FarmerContractMapper farmerContractMapper) {
|
public void setFarmerContractMapper(FarmerContractMapper farmerContractMapper) {
|
||||||
@ -40,6 +45,83 @@ public class FarmerContractServiceImpl implements IFarmerContractService
|
|||||||
this.farmerService = farmerService;
|
this.farmerService = farmerService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setGardenService(IGardenService gardenService) {
|
||||||
|
this.gardenService = gardenService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员认领菜地,更新会员姓名和电话,关联地块(不设置地块日期)
|
||||||
|
* @param claim 认领菜地的信息
|
||||||
|
* @return 受影响的记录数
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int claimGarden(ContractClaimDto claim) {
|
||||||
|
// 载入合约
|
||||||
|
FarmerContract contract = selectFarmerContractByContractId(claim.getContractId());
|
||||||
|
|
||||||
|
// 检查合约是否存在
|
||||||
|
if (contract == null) {
|
||||||
|
throw new RuntimeException("该合约不存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取允许认地的2种状态字典值
|
||||||
|
String valAudited = DictUtils.getDictValue("csa_contract_status", "已审");
|
||||||
|
String valClaimed = DictUtils.getDictValue("csa_contract_status", "认领");
|
||||||
|
|
||||||
|
// 判断当前合约状态是否允许认地
|
||||||
|
if (!Arrays.asList(valAudited, valClaimed).contains(contract.getStatus())) {
|
||||||
|
throw new RuntimeException("该合约的状态不允许认领菜地!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 载入地主信息
|
||||||
|
Farmer farmer = farmerService.selectFarmerWithGardenById(contract.getFarmerId());
|
||||||
|
|
||||||
|
// 检查地主是否存在
|
||||||
|
if (farmer == null) {
|
||||||
|
throw new RuntimeException("该合约对应的地主信息不存在,无法认领!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 已审状态的合约
|
||||||
|
if (contract.getStatus().equals(valAudited)) {
|
||||||
|
Garden garden = gardenService.selectGardenById(claim.getGardenId());
|
||||||
|
|
||||||
|
if (!garden.getIsSelled().equals("N")) {
|
||||||
|
// 菜地为售出状态
|
||||||
|
throw new RuntimeException("该菜地已被认领,无法再次认领!");
|
||||||
|
} else {
|
||||||
|
if (garden.getFarmerId() != null) {
|
||||||
|
// 菜地已经有地主信息
|
||||||
|
throw new RuntimeException("该菜地已被他人选定,无法认领!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 准备更新的字段
|
||||||
|
contract = new FarmerContract();
|
||||||
|
contract.setContractId(claim.getContractId());
|
||||||
|
contract.setGardenId(claim.getGardenId());
|
||||||
|
contract.setStatus(valClaimed);
|
||||||
|
|
||||||
|
garden = new Garden();
|
||||||
|
garden.setGardenId(claim.getGardenId());
|
||||||
|
garden.setFarmerId(farmer.getFarmerId());
|
||||||
|
|
||||||
|
farmer = new Farmer();
|
||||||
|
farmer.setFarmerId(garden.getFarmerId());
|
||||||
|
farmer.setName(claim.getFarmerName());
|
||||||
|
farmer.setMobileNumber(claim.getMobileNumber());
|
||||||
|
|
||||||
|
this.updateFarmerContract(contract);
|
||||||
|
gardenService.updateGarden(garden);
|
||||||
|
farmerService.updateFarmer(farmer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更改已认领但未生效的合约
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核会员签约信息
|
* 审核会员签约信息
|
||||||
* @param contractId 合约id
|
* @param contractId 合约id
|
||||||
@ -51,7 +133,7 @@ public class FarmerContractServiceImpl implements IFarmerContractService
|
|||||||
// 载入合约
|
// 载入合约
|
||||||
FarmerContract contract = selectFarmerContractByContractId(contractId);
|
FarmerContract contract = selectFarmerContractByContractId(contractId);
|
||||||
|
|
||||||
// 检查合约是否存在,
|
// 检查合约是否存在
|
||||||
if (contract == null) {
|
if (contract == null) {
|
||||||
throw new RuntimeException("合约不存在,无法审核!");
|
throw new RuntimeException("合约不存在,无法审核!");
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<!-- 日志存放路径 -->
|
<!-- 日志存放路径 -->
|
||||||
<property name="log.path" value="/home/ruoyi/logs" />
|
<property name="log.path" value="/home/ruoyi/logs" />
|
||||||
<property name="console.log.pattern"
|
<property name="console.log.pattern"
|
||||||
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
value="%red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||||
|
|
||||||
|
@ -92,8 +92,8 @@ public final class HTMLFilter
|
|||||||
private final boolean stripComment;
|
private final boolean stripComment;
|
||||||
private final boolean encodeQuotes;
|
private final boolean encodeQuotes;
|
||||||
/**
|
/**
|
||||||
* flag determining whether to try to make tags when presented with "unbalanced" angle brackets (e.g. "<b text </b>"
|
* flag determining whether dto try dto make tags when presented with "unbalanced" angle brackets (e.g. "<b text </b>"
|
||||||
* becomes "<b> text </b>"). If set to false, unbalanced angle brackets will be html escaped.
|
* becomes "<b> text </b>"). If set dto false, unbalanced angle brackets will be html escaped.
|
||||||
*/
|
*/
|
||||||
private final boolean alwaysMakeTags;
|
private final boolean alwaysMakeTags;
|
||||||
|
|
||||||
@ -259,8 +259,8 @@ public final class HTMLFilter
|
|||||||
s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s);
|
s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s);
|
||||||
|
|
||||||
//
|
//
|
||||||
// the last regexp causes '<>' entities to appear
|
// the last regexp causes '<>' entities dto appear
|
||||||
// (we need to do a lookahead assertion so that the last bracket can
|
// (we need dto do a lookahead assertion so that the last bracket can
|
||||||
// be used in the next pass of the regexp)
|
// be used in the next pass of the regexp)
|
||||||
//
|
//
|
||||||
s = regexReplace(P_BOTH_ARROWS, "", s);
|
s = regexReplace(P_BOTH_ARROWS, "", s);
|
||||||
@ -283,7 +283,7 @@ public final class HTMLFilter
|
|||||||
m.appendTail(buf);
|
m.appendTail(buf);
|
||||||
|
|
||||||
// these get tallied in processTag
|
// these get tallied in processTag
|
||||||
// (remember to reset before subsequent calls to filter method)
|
// (remember dto reset before subsequent calls dto filter method)
|
||||||
final StringBuilder sBuilder = new StringBuilder(buf.toString());
|
final StringBuilder sBuilder = new StringBuilder(buf.toString());
|
||||||
for (String key : vTagCounts.keySet())
|
for (String key : vTagCounts.keySet())
|
||||||
{
|
{
|
||||||
|
@ -98,9 +98,9 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
|||||||
byte[] randomBytes = new byte[16];
|
byte[] randomBytes = new byte[16];
|
||||||
ng.nextBytes(randomBytes);
|
ng.nextBytes(randomBytes);
|
||||||
randomBytes[6] &= 0x0f; /* clear version */
|
randomBytes[6] &= 0x0f; /* clear version */
|
||||||
randomBytes[6] |= 0x40; /* set to version 4 */
|
randomBytes[6] |= 0x40; /* set dto version 4 */
|
||||||
randomBytes[8] &= 0x3f; /* clear variant */
|
randomBytes[8] &= 0x3f; /* clear variant */
|
||||||
randomBytes[8] |= 0x80; /* set to IETF variant */
|
randomBytes[8] |= 0x80; /* set dto IETF variant */
|
||||||
return new UUID(randomBytes);
|
return new UUID(randomBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,9 +124,9 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
|||||||
}
|
}
|
||||||
byte[] md5Bytes = md.digest(name);
|
byte[] md5Bytes = md.digest(name);
|
||||||
md5Bytes[6] &= 0x0f; /* clear version */
|
md5Bytes[6] &= 0x0f; /* clear version */
|
||||||
md5Bytes[6] |= 0x30; /* set to version 3 */
|
md5Bytes[6] |= 0x30; /* set dto version 3 */
|
||||||
md5Bytes[8] &= 0x3f; /* clear variant */
|
md5Bytes[8] &= 0x3f; /* clear variant */
|
||||||
md5Bytes[8] |= 0x80; /* set to IETF variant */
|
md5Bytes[8] |= 0x80; /* set dto IETF variant */
|
||||||
return new UUID(md5Bytes);
|
return new UUID(md5Bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [
|
presets: [
|
||||||
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
||||||
'@vue/cli-plugin-babel/preset'
|
'@vue/cli-plugin-babel/preset'
|
||||||
],
|
],
|
||||||
'env': {
|
'env': {
|
||||||
'development': {
|
'development': {
|
||||||
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() dto require().
|
||||||
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
||||||
'plugins': ['dynamic-import-node']
|
'plugins': ['dynamic-import-node']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,15 @@ export function auditContract(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 会员合约确认认领
|
||||||
|
export function claimFarmer(data) {
|
||||||
|
return request({
|
||||||
|
url: '/csa/contract/claim',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除会员合约
|
// 删除会员合约
|
||||||
export function delContract(contractId) {
|
export function delContract(contractId) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// to fixed https://github.com/ElemeFE/element/issues/2461
|
// dto fixed https://github.com/ElemeFE/element/issues/2461
|
||||||
.el-dialog {
|
.el-dialog {
|
||||||
transform: none;
|
transform: none;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -78,7 +78,7 @@
|
|||||||
display: inline-flex !important;
|
display: inline-flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// to fix el-date-picker css style
|
// dto fix el-date-picker css style
|
||||||
.el-range-separator {
|
.el-range-separator {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
/**
|
/**
|
||||||
* I think element-ui's default theme color is too light for long-term use.
|
* I think element-ui's default theme color is too light for long-term use.
|
||||||
* So I modified the default color and you can modify it to your liking.
|
* So I modified the default color and you can modify it dto your liking.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
/* theme color */
|
/* theme color */
|
||||||
$--color-primary: #1890ff;
|
$--color-primary: #1890ff;
|
||||||
$--color-success: #13ce66;
|
$--color-success: #13ce66;
|
||||||
$--color-warning: #ffba00;
|
$--color-warning: #ffba00;
|
||||||
$--color-danger: #ff4949;
|
$--color-danger: #ff4949;
|
||||||
// $--color-info: #1E1E1E;
|
// $--color-info: #1E1E1E;
|
||||||
|
|
||||||
$--button-font-weight: 400;
|
$--button-font-weight: 400;
|
||||||
|
|
||||||
// $--color-text-regular: #1f2d3d;
|
// $--color-text-regular: #1f2d3d;
|
||||||
|
|
||||||
$--border-color-light: #dfe4ed;
|
$--border-color-light: #dfe4ed;
|
||||||
$--border-color-lighter: #e6ebf5;
|
$--border-color-lighter: #e6ebf5;
|
||||||
|
|
||||||
$--table-border:1px solid#dfe6ec;
|
$--table-border:1px solid#dfe6ec;
|
||||||
|
|
||||||
/* icon font path, required */
|
/* icon font path, required */
|
||||||
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
||||||
|
|
||||||
@import "~element-ui/packages/theme-chalk/src/index";
|
@import "~element-ui/packages/theme-chalk/src/index";
|
||||||
|
|
||||||
// the :export directive is the magic sauce for webpack
|
// the :export directive is the magic sauce for webpack
|
||||||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||||
:export {
|
:export {
|
||||||
theme: $--color-primary;
|
theme: $--color-primary;
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
device() {
|
device() {
|
||||||
return this.$store.state.app.device
|
return this.$store.state.app.device
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// In order to fix the click on menu on the ios device will trigger the mouseleave bug
|
// In order dto fix the click on menu on the ios device will trigger the mouseleave bug
|
||||||
this.fixBugIniOS()
|
this.fixBugIniOS()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fixBugIniOS() {
|
fixBugIniOS() {
|
||||||
const $subMenu = this.$refs.subMenu
|
const $subMenu = this.$refs.subMenu
|
||||||
if ($subMenu) {
|
if ($subMenu) {
|
||||||
const handleMouseleave = $subMenu.handleMouseleave
|
const handleMouseleave = $subMenu.handleMouseleave
|
||||||
$subMenu.handleMouseleave = (e) => {
|
$subMenu.handleMouseleave = (e) => {
|
||||||
if (this.device === 'mobile') {
|
if (this.device === 'mobile') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
handleMouseleave(e)
|
handleMouseleave(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,45 +1,45 @@
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
const { body } = document
|
const { body } = document
|
||||||
const WIDTH = 992 // refer to Bootstrap's responsive design
|
const WIDTH = 992 // refer dto Bootstrap's responsive design
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
watch: {
|
watch: {
|
||||||
$route(route) {
|
$route(route) {
|
||||||
if (this.device === 'mobile' && this.sidebar.opened) {
|
if (this.device === 'mobile' && this.sidebar.opened) {
|
||||||
store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
window.addEventListener('resize', this.$_resizeHandler)
|
window.addEventListener('resize', this.$_resizeHandler)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('resize', this.$_resizeHandler)
|
window.removeEventListener('resize', this.$_resizeHandler)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const isMobile = this.$_isMobile()
|
const isMobile = this.$_isMobile()
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
store.dispatch('app/toggleDevice', 'mobile')
|
store.dispatch('app/toggleDevice', 'mobile')
|
||||||
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// use $_ for mixins properties
|
// use $_ for mixins properties
|
||||||
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
||||||
$_isMobile() {
|
$_isMobile() {
|
||||||
const rect = body.getBoundingClientRect()
|
const rect = body.getBoundingClientRect()
|
||||||
return rect.width - 1 < WIDTH
|
return rect.width - 1 < WIDTH
|
||||||
},
|
},
|
||||||
$_resizeHandler() {
|
$_resizeHandler() {
|
||||||
if (!document.hidden) {
|
if (!document.hidden) {
|
||||||
const isMobile = this.$_isMobile()
|
const isMobile = this.$_isMobile()
|
||||||
store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
|
store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
|
||||||
|
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,8 +64,8 @@ Vue.use(VueMeta)
|
|||||||
DictData.install()
|
DictData.install()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If you don't want to use mock-server
|
* If you don't want dto use mock-server
|
||||||
* you want to use MockJs for mock api
|
* you want dto use MockJs for mock api
|
||||||
* you can execute: mockXHR()
|
* you can execute: mockXHR()
|
||||||
*
|
*
|
||||||
* Currently MockJs will be used in the production environment,
|
* Currently MockJs will be used in the production environment,
|
||||||
|
@ -38,7 +38,7 @@ module.exports = {
|
|||||||
* @type {string | array} 'production' | ['production', 'development']
|
* @type {string | array} 'production' | ['production', 'development']
|
||||||
* @description Need show err logs component.
|
* @description Need show err logs component.
|
||||||
* The default is only used in the production env
|
* The default is only used in the production env
|
||||||
* If you want to also use it in dev, you can pass ['production', 'development']
|
* If you want dto also use it in dev, you can pass ['production', 'development']
|
||||||
*/
|
*/
|
||||||
errorLog: 'production'
|
errorLog: 'production'
|
||||||
}
|
}
|
||||||
|
@ -1,390 +1,390 @@
|
|||||||
import { parseTime } from './ruoyi'
|
import { parseTime } from './ruoyi'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格时间格式化
|
* 表格时间格式化
|
||||||
*/
|
*/
|
||||||
export function formatDate(cellValue) {
|
export function formatDate(cellValue) {
|
||||||
if (cellValue == null || cellValue == "") return "";
|
if (cellValue == null || cellValue == "") return "";
|
||||||
var date = new Date(cellValue)
|
var date = new Date(cellValue)
|
||||||
var year = date.getFullYear()
|
var year = date.getFullYear()
|
||||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||||
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||||
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
||||||
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} time
|
* @param {number} time
|
||||||
* @param {string} option
|
* @param {string} option
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function formatTime(time, option) {
|
export function formatTime(time, option) {
|
||||||
if (('' + time).length === 10) {
|
if (('' + time).length === 10) {
|
||||||
time = parseInt(time) * 1000
|
time = parseInt(time) * 1000
|
||||||
} else {
|
} else {
|
||||||
time = +time
|
time = +time
|
||||||
}
|
}
|
||||||
const d = new Date(time)
|
const d = new Date(time)
|
||||||
const now = Date.now()
|
const now = Date.now()
|
||||||
|
|
||||||
const diff = (now - d) / 1000
|
const diff = (now - d) / 1000
|
||||||
|
|
||||||
if (diff < 30) {
|
if (diff < 30) {
|
||||||
return '刚刚'
|
return '刚刚'
|
||||||
} else if (diff < 3600) {
|
} else if (diff < 3600) {
|
||||||
// less 1 hour
|
// less 1 hour
|
||||||
return Math.ceil(diff / 60) + '分钟前'
|
return Math.ceil(diff / 60) + '分钟前'
|
||||||
} else if (diff < 3600 * 24) {
|
} else if (diff < 3600 * 24) {
|
||||||
return Math.ceil(diff / 3600) + '小时前'
|
return Math.ceil(diff / 3600) + '小时前'
|
||||||
} else if (diff < 3600 * 24 * 2) {
|
} else if (diff < 3600 * 24 * 2) {
|
||||||
return '1天前'
|
return '1天前'
|
||||||
}
|
}
|
||||||
if (option) {
|
if (option) {
|
||||||
return parseTime(time, option)
|
return parseTime(time, option)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
d.getMonth() +
|
d.getMonth() +
|
||||||
1 +
|
1 +
|
||||||
'月' +
|
'月' +
|
||||||
d.getDate() +
|
d.getDate() +
|
||||||
'日' +
|
'日' +
|
||||||
d.getHours() +
|
d.getHours() +
|
||||||
'时' +
|
'时' +
|
||||||
d.getMinutes() +
|
d.getMinutes() +
|
||||||
'分'
|
'分'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
export function getQueryObject(url) {
|
export function getQueryObject(url) {
|
||||||
url = url == null ? window.location.href : url
|
url = url == null ? window.location.href : url
|
||||||
const search = url.substring(url.lastIndexOf('?') + 1)
|
const search = url.substring(url.lastIndexOf('?') + 1)
|
||||||
const obj = {}
|
const obj = {}
|
||||||
const reg = /([^?&=]+)=([^?&=]*)/g
|
const reg = /([^?&=]+)=([^?&=]*)/g
|
||||||
search.replace(reg, (rs, $1, $2) => {
|
search.replace(reg, (rs, $1, $2) => {
|
||||||
const name = decodeURIComponent($1)
|
const name = decodeURIComponent($1)
|
||||||
let val = decodeURIComponent($2)
|
let val = decodeURIComponent($2)
|
||||||
val = String(val)
|
val = String(val)
|
||||||
obj[name] = val
|
obj[name] = val
|
||||||
return rs
|
return rs
|
||||||
})
|
})
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} input value
|
* @param {string} input value
|
||||||
* @returns {number} output value
|
* @returns {number} output value
|
||||||
*/
|
*/
|
||||||
export function byteLength(str) {
|
export function byteLength(str) {
|
||||||
// returns the byte length of an utf8 string
|
// returns the byte length of an utf8 string
|
||||||
let s = str.length
|
let s = str.length
|
||||||
for (var i = str.length - 1; i >= 0; i--) {
|
for (var i = str.length - 1; i >= 0; i--) {
|
||||||
const code = str.charCodeAt(i)
|
const code = str.charCodeAt(i)
|
||||||
if (code > 0x7f && code <= 0x7ff) s++
|
if (code > 0x7f && code <= 0x7ff) s++
|
||||||
else if (code > 0x7ff && code <= 0xffff) s += 2
|
else if (code > 0x7ff && code <= 0xffff) s += 2
|
||||||
if (code >= 0xDC00 && code <= 0xDFFF) i--
|
if (code >= 0xDC00 && code <= 0xDFFF) i--
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Array} actual
|
* @param {Array} actual
|
||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
*/
|
*/
|
||||||
export function cleanArray(actual) {
|
export function cleanArray(actual) {
|
||||||
const newArray = []
|
const newArray = []
|
||||||
for (let i = 0; i < actual.length; i++) {
|
for (let i = 0; i < actual.length; i++) {
|
||||||
if (actual[i]) {
|
if (actual[i]) {
|
||||||
newArray.push(actual[i])
|
newArray.push(actual[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return newArray
|
return newArray
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} json
|
* @param {Object} json
|
||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
*/
|
*/
|
||||||
export function param(json) {
|
export function param(json) {
|
||||||
if (!json) return ''
|
if (!json) return ''
|
||||||
return cleanArray(
|
return cleanArray(
|
||||||
Object.keys(json).map(key => {
|
Object.keys(json).map(key => {
|
||||||
if (json[key] === undefined) return ''
|
if (json[key] === undefined) return ''
|
||||||
return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
|
return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
|
||||||
})
|
})
|
||||||
).join('&')
|
).join('&')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
export function param2Obj(url) {
|
export function param2Obj(url) {
|
||||||
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
||||||
if (!search) {
|
if (!search) {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
const obj = {}
|
const obj = {}
|
||||||
const searchArr = search.split('&')
|
const searchArr = search.split('&')
|
||||||
searchArr.forEach(v => {
|
searchArr.forEach(v => {
|
||||||
const index = v.indexOf('=')
|
const index = v.indexOf('=')
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
const name = v.substring(0, index)
|
const name = v.substring(0, index)
|
||||||
const val = v.substring(index + 1, v.length)
|
const val = v.substring(index + 1, v.length)
|
||||||
obj[name] = val
|
obj[name] = val
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} val
|
* @param {string} val
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function html2Text(val) {
|
export function html2Text(val) {
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
div.innerHTML = val
|
div.innerHTML = val
|
||||||
return div.textContent || div.innerText
|
return div.textContent || div.innerText
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merges two objects, giving the last one precedence
|
* Merges two objects, giving the last one precedence
|
||||||
* @param {Object} target
|
* @param {Object} target
|
||||||
* @param {(Object|Array)} source
|
* @param {(Object|Array)} source
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
export function objectMerge(target, source) {
|
export function objectMerge(target, source) {
|
||||||
if (typeof target !== 'object') {
|
if (typeof target !== 'object') {
|
||||||
target = {}
|
target = {}
|
||||||
}
|
}
|
||||||
if (Array.isArray(source)) {
|
if (Array.isArray(source)) {
|
||||||
return source.slice()
|
return source.slice()
|
||||||
}
|
}
|
||||||
Object.keys(source).forEach(property => {
|
Object.keys(source).forEach(property => {
|
||||||
const sourceProperty = source[property]
|
const sourceProperty = source[property]
|
||||||
if (typeof sourceProperty === 'object') {
|
if (typeof sourceProperty === 'object') {
|
||||||
target[property] = objectMerge(target[property], sourceProperty)
|
target[property] = objectMerge(target[property], sourceProperty)
|
||||||
} else {
|
} else {
|
||||||
target[property] = sourceProperty
|
target[property] = sourceProperty
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return target
|
return target
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {HTMLElement} element
|
* @param {HTMLElement} element
|
||||||
* @param {string} className
|
* @param {string} className
|
||||||
*/
|
*/
|
||||||
export function toggleClass(element, className) {
|
export function toggleClass(element, className) {
|
||||||
if (!element || !className) {
|
if (!element || !className) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let classString = element.className
|
let classString = element.className
|
||||||
const nameIndex = classString.indexOf(className)
|
const nameIndex = classString.indexOf(className)
|
||||||
if (nameIndex === -1) {
|
if (nameIndex === -1) {
|
||||||
classString += '' + className
|
classString += '' + className
|
||||||
} else {
|
} else {
|
||||||
classString =
|
classString =
|
||||||
classString.substr(0, nameIndex) +
|
classString.substr(0, nameIndex) +
|
||||||
classString.substr(nameIndex + className.length)
|
classString.substr(nameIndex + className.length)
|
||||||
}
|
}
|
||||||
element.className = classString
|
element.className = classString
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} type
|
* @param {string} type
|
||||||
* @returns {Date}
|
* @returns {Date}
|
||||||
*/
|
*/
|
||||||
export function getTime(type) {
|
export function getTime(type) {
|
||||||
if (type === 'start') {
|
if (type === 'start') {
|
||||||
return new Date().getTime() - 3600 * 1000 * 24 * 90
|
return new Date().getTime() - 3600 * 1000 * 24 * 90
|
||||||
} else {
|
} else {
|
||||||
return new Date(new Date().toDateString())
|
return new Date(new Date().toDateString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Function} func
|
* @param {Function} func
|
||||||
* @param {number} wait
|
* @param {number} wait
|
||||||
* @param {boolean} immediate
|
* @param {boolean} immediate
|
||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
export function debounce(func, wait, immediate) {
|
export function debounce(func, wait, immediate) {
|
||||||
let timeout, args, context, timestamp, result
|
let timeout, args, context, timestamp, result
|
||||||
|
|
||||||
const later = function() {
|
const later = function() {
|
||||||
// 据上一次触发时间间隔
|
// 据上一次触发时间间隔
|
||||||
const last = +new Date() - timestamp
|
const last = +new Date() - timestamp
|
||||||
|
|
||||||
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
|
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
|
||||||
if (last < wait && last > 0) {
|
if (last < wait && last > 0) {
|
||||||
timeout = setTimeout(later, wait - last)
|
timeout = setTimeout(later, wait - last)
|
||||||
} else {
|
} else {
|
||||||
timeout = null
|
timeout = null
|
||||||
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
|
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
|
||||||
if (!immediate) {
|
if (!immediate) {
|
||||||
result = func.apply(context, args)
|
result = func.apply(context, args)
|
||||||
if (!timeout) context = args = null
|
if (!timeout) context = args = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(...args) {
|
return function(...args) {
|
||||||
context = this
|
context = this
|
||||||
timestamp = +new Date()
|
timestamp = +new Date()
|
||||||
const callNow = immediate && !timeout
|
const callNow = immediate && !timeout
|
||||||
// 如果延时不存在,重新设定延时
|
// 如果延时不存在,重新设定延时
|
||||||
if (!timeout) timeout = setTimeout(later, wait)
|
if (!timeout) timeout = setTimeout(later, wait)
|
||||||
if (callNow) {
|
if (callNow) {
|
||||||
result = func.apply(context, args)
|
result = func.apply(context, args)
|
||||||
context = args = null
|
context = args = null
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is just a simple version of deep copy
|
* This is just a simple version of deep copy
|
||||||
* Has a lot of edge cases bug
|
* Has a lot of edge cases bug
|
||||||
* If you want to use a perfect deep copy, use lodash's _.cloneDeep
|
* If you want dto use a perfect deep copy, use lodash's _.cloneDeep
|
||||||
* @param {Object} source
|
* @param {Object} source
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
export function deepClone(source) {
|
export function deepClone(source) {
|
||||||
if (!source && typeof source !== 'object') {
|
if (!source && typeof source !== 'object') {
|
||||||
throw new Error('error arguments', 'deepClone')
|
throw new Error('error arguments', 'deepClone')
|
||||||
}
|
}
|
||||||
const targetObj = source.constructor === Array ? [] : {}
|
const targetObj = source.constructor === Array ? [] : {}
|
||||||
Object.keys(source).forEach(keys => {
|
Object.keys(source).forEach(keys => {
|
||||||
if (source[keys] && typeof source[keys] === 'object') {
|
if (source[keys] && typeof source[keys] === 'object') {
|
||||||
targetObj[keys] = deepClone(source[keys])
|
targetObj[keys] = deepClone(source[keys])
|
||||||
} else {
|
} else {
|
||||||
targetObj[keys] = source[keys]
|
targetObj[keys] = source[keys]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return targetObj
|
return targetObj
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Array} arr
|
* @param {Array} arr
|
||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
*/
|
*/
|
||||||
export function uniqueArr(arr) {
|
export function uniqueArr(arr) {
|
||||||
return Array.from(new Set(arr))
|
return Array.from(new Set(arr))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function createUniqueString() {
|
export function createUniqueString() {
|
||||||
const timestamp = +new Date() + ''
|
const timestamp = +new Date() + ''
|
||||||
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
|
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
|
||||||
return (+(randomNum + timestamp)).toString(32)
|
return (+(randomNum + timestamp)).toString(32)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if an element has a class
|
* Check if an element has a class
|
||||||
* @param {HTMLElement} elm
|
* @param {HTMLElement} elm
|
||||||
* @param {string} cls
|
* @param {string} cls
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export function hasClass(ele, cls) {
|
export function hasClass(ele, cls) {
|
||||||
return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
|
return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add class to element
|
* Add class dto element
|
||||||
* @param {HTMLElement} elm
|
* @param {HTMLElement} elm
|
||||||
* @param {string} cls
|
* @param {string} cls
|
||||||
*/
|
*/
|
||||||
export function addClass(ele, cls) {
|
export function addClass(ele, cls) {
|
||||||
if (!hasClass(ele, cls)) ele.className += ' ' + cls
|
if (!hasClass(ele, cls)) ele.className += ' ' + cls
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove class from element
|
* Remove class from element
|
||||||
* @param {HTMLElement} elm
|
* @param {HTMLElement} elm
|
||||||
* @param {string} cls
|
* @param {string} cls
|
||||||
*/
|
*/
|
||||||
export function removeClass(ele, cls) {
|
export function removeClass(ele, cls) {
|
||||||
if (hasClass(ele, cls)) {
|
if (hasClass(ele, cls)) {
|
||||||
const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)')
|
const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)')
|
||||||
ele.className = ele.className.replace(reg, ' ')
|
ele.className = ele.className.replace(reg, ' ')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeMap(str, expectsLowerCase) {
|
export function makeMap(str, expectsLowerCase) {
|
||||||
const map = Object.create(null)
|
const map = Object.create(null)
|
||||||
const list = str.split(',')
|
const list = str.split(',')
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
map[list[i]] = true
|
map[list[i]] = true
|
||||||
}
|
}
|
||||||
return expectsLowerCase
|
return expectsLowerCase
|
||||||
? val => map[val.toLowerCase()]
|
? val => map[val.toLowerCase()]
|
||||||
: val => map[val]
|
: val => map[val]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const exportDefault = 'export default '
|
export const exportDefault = 'export default '
|
||||||
|
|
||||||
export const beautifierConf = {
|
export const beautifierConf = {
|
||||||
html: {
|
html: {
|
||||||
indent_size: '2',
|
indent_size: '2',
|
||||||
indent_char: ' ',
|
indent_char: ' ',
|
||||||
max_preserve_newlines: '-1',
|
max_preserve_newlines: '-1',
|
||||||
preserve_newlines: false,
|
preserve_newlines: false,
|
||||||
keep_array_indentation: false,
|
keep_array_indentation: false,
|
||||||
break_chained_methods: false,
|
break_chained_methods: false,
|
||||||
indent_scripts: 'separate',
|
indent_scripts: 'separate',
|
||||||
brace_style: 'end-expand',
|
brace_style: 'end-expand',
|
||||||
space_before_conditional: true,
|
space_before_conditional: true,
|
||||||
unescape_strings: false,
|
unescape_strings: false,
|
||||||
jslint_happy: false,
|
jslint_happy: false,
|
||||||
end_with_newline: true,
|
end_with_newline: true,
|
||||||
wrap_line_length: '110',
|
wrap_line_length: '110',
|
||||||
indent_inner_html: true,
|
indent_inner_html: true,
|
||||||
comma_first: false,
|
comma_first: false,
|
||||||
e4x: true,
|
e4x: true,
|
||||||
indent_empty_lines: true
|
indent_empty_lines: true
|
||||||
},
|
},
|
||||||
js: {
|
js: {
|
||||||
indent_size: '2',
|
indent_size: '2',
|
||||||
indent_char: ' ',
|
indent_char: ' ',
|
||||||
max_preserve_newlines: '-1',
|
max_preserve_newlines: '-1',
|
||||||
preserve_newlines: false,
|
preserve_newlines: false,
|
||||||
keep_array_indentation: false,
|
keep_array_indentation: false,
|
||||||
break_chained_methods: false,
|
break_chained_methods: false,
|
||||||
indent_scripts: 'normal',
|
indent_scripts: 'normal',
|
||||||
brace_style: 'end-expand',
|
brace_style: 'end-expand',
|
||||||
space_before_conditional: true,
|
space_before_conditional: true,
|
||||||
unescape_strings: false,
|
unescape_strings: false,
|
||||||
jslint_happy: true,
|
jslint_happy: true,
|
||||||
end_with_newline: true,
|
end_with_newline: true,
|
||||||
wrap_line_length: '110',
|
wrap_line_length: '110',
|
||||||
indent_inner_html: true,
|
indent_inner_html: true,
|
||||||
comma_first: false,
|
comma_first: false,
|
||||||
e4x: true,
|
e4x: true,
|
||||||
indent_empty_lines: true
|
indent_empty_lines: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 首字母大小
|
// 首字母大小
|
||||||
export function titleCase(str) {
|
export function titleCase(str) {
|
||||||
return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
|
return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下划转驼峰
|
// 下划转驼峰
|
||||||
export function camelCase(str) {
|
export function camelCase(str) {
|
||||||
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
|
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isNumberStr(str) {
|
export function isNumberStr(str) {
|
||||||
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
|
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,58 +1,58 @@
|
|||||||
Math.easeInOutQuad = function(t, b, c, d) {
|
Math.easeInOutQuad = function(t, b, c, d) {
|
||||||
t /= d / 2
|
t /= d / 2
|
||||||
if (t < 1) {
|
if (t < 1) {
|
||||||
return c / 2 * t * t + b
|
return c / 2 * t * t + b
|
||||||
}
|
}
|
||||||
t--
|
t--
|
||||||
return -c / 2 * (t * (t - 2) - 1) + b
|
return -c / 2 * (t * (t - 2) - 1) + b
|
||||||
}
|
}
|
||||||
|
|
||||||
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
|
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
|
||||||
var requestAnimFrame = (function() {
|
var requestAnimFrame = (function() {
|
||||||
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) }
|
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) }
|
||||||
})()
|
})()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Because it's so fucking difficult to detect the scrolling element, just move them all
|
* Because it's so fucking difficult dto detect the scrolling element, just move them all
|
||||||
* @param {number} amount
|
* @param {number} amount
|
||||||
*/
|
*/
|
||||||
function move(amount) {
|
function move(amount) {
|
||||||
document.documentElement.scrollTop = amount
|
document.documentElement.scrollTop = amount
|
||||||
document.body.parentNode.scrollTop = amount
|
document.body.parentNode.scrollTop = amount
|
||||||
document.body.scrollTop = amount
|
document.body.scrollTop = amount
|
||||||
}
|
}
|
||||||
|
|
||||||
function position() {
|
function position() {
|
||||||
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
|
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} to
|
* @param {number} to
|
||||||
* @param {number} duration
|
* @param {number} duration
|
||||||
* @param {Function} callback
|
* @param {Function} callback
|
||||||
*/
|
*/
|
||||||
export function scrollTo(to, duration, callback) {
|
export function scrollTo(to, duration, callback) {
|
||||||
const start = position()
|
const start = position()
|
||||||
const change = to - start
|
const change = to - start
|
||||||
const increment = 20
|
const increment = 20
|
||||||
let currentTime = 0
|
let currentTime = 0
|
||||||
duration = (typeof (duration) === 'undefined') ? 500 : duration
|
duration = (typeof (duration) === 'undefined') ? 500 : duration
|
||||||
var animateScroll = function() {
|
var animateScroll = function() {
|
||||||
// increment the time
|
// increment the time
|
||||||
currentTime += increment
|
currentTime += increment
|
||||||
// find the value with the quadratic in-out easing function
|
// find the value with the quadratic in-out easing function
|
||||||
var val = Math.easeInOutQuad(currentTime, start, change, duration)
|
var val = Math.easeInOutQuad(currentTime, start, change, duration)
|
||||||
// move the document.body
|
// move the document.body
|
||||||
move(val)
|
move(val)
|
||||||
// do the animation unless its over
|
// do the animation unless its over
|
||||||
if (currentTime < duration) {
|
if (currentTime < duration) {
|
||||||
requestAnimFrame(animateScroll)
|
requestAnimFrame(animateScroll)
|
||||||
} else {
|
} else {
|
||||||
if (callback && typeof (callback) === 'function') {
|
if (callback && typeof (callback) === 'function') {
|
||||||
// the animation is done so lets callback
|
// the animation is done so lets callback
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
animateScroll()
|
animateScroll()
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
const elementIcons = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round']
|
const elementIcons = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-dto-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round']
|
||||||
|
|
||||||
export default elementIcons
|
export default elementIcons
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="菜地编号" prop="garden.code">
|
<el-form-item label="菜地编号" prop="garden.gardenId">
|
||||||
<el-select v-model="form.garden.gardenId" placeholder="请选择菜地编号"
|
<el-select v-model="form.garden.gardenId" placeholder="请选择菜地编号"
|
||||||
:loading="isQuery" loading-text="正在查找可用菜地"
|
:loading="isQuery" loading-text="正在查找可用菜地"
|
||||||
filterable remote :remote-method="remoteQueryGarden">
|
filterable remote :remote-method="remoteQueryGarden">
|
||||||
@ -154,12 +154,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" rows="3" placeholder="请输入备注"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitClaimForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -167,7 +164,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listEnterContract, getContract, delContract, addContract, updateContract, auditContract } from '@/api/csa/contract'
|
import { listEnterContract, getContract, auditContract, claimFarmer } from '@/api/csa/contract'
|
||||||
import { getFarmerWithGarden } from '@/api/csa/farmer'
|
import { getFarmerWithGarden } from '@/api/csa/farmer'
|
||||||
import { listCanSell } from '@/api/csa/garden'
|
import { listCanSell } from '@/api/csa/garden'
|
||||||
import Dict from '../../system/dict/index'
|
import Dict from '../../system/dict/index'
|
||||||
@ -213,7 +210,7 @@
|
|||||||
// 可售的菜地列表
|
// 可售的菜地列表
|
||||||
canSellGardens: [],
|
canSellGardens: [],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {farmer: {}, garden: {}},
|
form: {contractId: null, garden: {} },
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
@ -262,9 +259,7 @@
|
|||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
contractId: null,
|
contractId: null,
|
||||||
farmer: {},
|
|
||||||
garden: {},
|
garden: {},
|
||||||
remark: null
|
|
||||||
}
|
}
|
||||||
this.resetForm('form')
|
this.resetForm('form')
|
||||||
},
|
},
|
||||||
@ -285,12 +280,13 @@
|
|||||||
this.single = selection.length !== 1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 认领菜地按钮操作 */
|
/** 认领菜地对话框弹出操作 */
|
||||||
handleUpdateFarmer(row) {
|
handleUpdateFarmer(row) {
|
||||||
this.reset()
|
this.reset()
|
||||||
const farmerId = row.farmerId;
|
const farmerId = row.farmerId;
|
||||||
getFarmerWithGarden(farmerId).then(response => {
|
getFarmerWithGarden(farmerId).then(response => {
|
||||||
this.form = response.data
|
this.form = response.data
|
||||||
|
this.form.contractId = row.contractId
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = '认领菜地'
|
this.title = '认领菜地'
|
||||||
})
|
})
|
||||||
@ -319,23 +315,23 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 认领菜地提交按钮 */
|
||||||
submitForm() {
|
submitClaimForm() {
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.contractId != null) {
|
let claim = {
|
||||||
updateContract(this.form).then(response => {
|
contractId: this.form.contractId,
|
||||||
this.$modal.msgSuccess('修改成功')
|
farmerName: this.form.name,
|
||||||
this.open = false
|
mobileNumber: this.form.mobileNumber,
|
||||||
this.getList()
|
gardenId: this.form.garden.gardenId,
|
||||||
})
|
gardenName: this.form.garden.name
|
||||||
} else {
|
|
||||||
addContract(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess('新增成功')
|
|
||||||
this.open = false
|
|
||||||
this.getList()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
claimFarmer(claim).then(response => {
|
||||||
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1,135 +1,135 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin')
|
const CompressionPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
|
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||||
|
|
||||||
// vue.config.js 配置说明
|
// vue.config.js 配置说明
|
||||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||||
// 这里只列一部分,具体配置参考文档
|
// 这里只列一部分,具体配置参考文档
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 部署生产环境和开发环境下的URL。
|
// 部署生产环境和开发环境下的URL。
|
||||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||||
outputDir: 'dist',
|
outputDir: 'dist',
|
||||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||||
assetsDir: 'static',
|
assetsDir: 'static',
|
||||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||||
lintOnSave: process.env.NODE_ENV === 'development',
|
lintOnSave: process.env.NODE_ENV === 'development',
|
||||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
// webpack-dev-server 相关配置
|
// webpack-dev-server 相关配置
|
||||||
devServer: {
|
devServer: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: port,
|
port: port,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8080`,
|
target: `http://localhost:8080`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
disableHostCheck: true
|
disableHostCheck: true
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
loaderOptions: {
|
loaderOptions: {
|
||||||
sass: {
|
sass: {
|
||||||
sassOptions: { outputStyle: "expanded" }
|
sassOptions: { outputStyle: "expanded" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
name: name,
|
name: name,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve('src')
|
'@': resolve('src')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
||||||
new CompressionPlugin({
|
new CompressionPlugin({
|
||||||
test: /\.(js|css|html)?$/i, // 压缩文件格式
|
test: /\.(js|css|html)?$/i, // 压缩文件格式
|
||||||
filename: '[path].gz[query]', // 压缩后的文件名
|
filename: '[path].gz[query]', // 压缩后的文件名
|
||||||
algorithm: 'gzip', // 使用gzip压缩
|
algorithm: 'gzip', // 使用gzip压缩
|
||||||
minRatio: 0.8 // 压缩率小于1才会压缩
|
minRatio: 0.8 // 压缩率小于1才会压缩
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
chainWebpack(config) {
|
chainWebpack(config) {
|
||||||
config.plugins.delete('preload') // TODO: need test
|
config.plugins.delete('preload') // TODO: need test
|
||||||
config.plugins.delete('prefetch') // TODO: need test
|
config.plugins.delete('prefetch') // TODO: need test
|
||||||
|
|
||||||
// set svg-sprite-loader
|
// set svg-sprite-loader
|
||||||
config.module
|
config.module
|
||||||
.rule('svg')
|
.rule('svg')
|
||||||
.exclude.add(resolve('src/assets/icons'))
|
.exclude.add(resolve('src/assets/icons'))
|
||||||
.end()
|
.end()
|
||||||
config.module
|
config.module
|
||||||
.rule('icons')
|
.rule('icons')
|
||||||
.test(/\.svg$/)
|
.test(/\.svg$/)
|
||||||
.include.add(resolve('src/assets/icons'))
|
.include.add(resolve('src/assets/icons'))
|
||||||
.end()
|
.end()
|
||||||
.use('svg-sprite-loader')
|
.use('svg-sprite-loader')
|
||||||
.loader('svg-sprite-loader')
|
.loader('svg-sprite-loader')
|
||||||
.options({
|
.options({
|
||||||
symbolId: 'icon-[name]'
|
symbolId: 'icon-[name]'
|
||||||
})
|
})
|
||||||
.end()
|
.end()
|
||||||
|
|
||||||
config
|
config
|
||||||
.when(process.env.NODE_ENV !== 'development',
|
.when(process.env.NODE_ENV !== 'development',
|
||||||
config => {
|
config => {
|
||||||
config
|
config
|
||||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||||
.after('html')
|
.after('html')
|
||||||
.use('script-ext-html-webpack-plugin', [{
|
.use('script-ext-html-webpack-plugin', [{
|
||||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||||
inline: /runtime\..*\.js$/
|
inline: /runtime\..*\.js$/
|
||||||
}])
|
}])
|
||||||
.end()
|
.end()
|
||||||
config
|
config
|
||||||
.optimization.splitChunks({
|
.optimization.splitChunks({
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
libs: {
|
libs: {
|
||||||
name: 'chunk-libs',
|
name: 'chunk-libs',
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
priority: 10,
|
priority: 10,
|
||||||
chunks: 'initial' // only package third parties that are initially dependent
|
chunks: 'initial' // only package third parties that are initially dependent
|
||||||
},
|
},
|
||||||
elementUI: {
|
elementUI: {
|
||||||
name: 'chunk-elementUI', // split elementUI into a single package
|
name: 'chunk-elementUI', // split elementUI into a single package
|
||||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
priority: 20, // the weight needs dto be larger than libs and app or it will be packaged into libs or app
|
||||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order dto adapt dto cnpm
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
name: 'chunk-commons',
|
name: 'chunk-commons',
|
||||||
test: resolve('src/components'), // can customize your rules
|
test: resolve('src/components'), // can customize your rules
|
||||||
minChunks: 3, // minimum common number
|
minChunks: 3, // minimum common number
|
||||||
priority: 5,
|
priority: 5,
|
||||||
reuseExistingChunk: true
|
reuseExistingChunk: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
config.optimization.runtimeChunk('single'),
|
config.optimization.runtimeChunk('single'),
|
||||||
{
|
{
|
||||||
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
||||||
to: './' //到根目录下
|
to: './' //到根目录下
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
24
sql/csa.sql
24
sql/csa.sql
@ -11,7 +11,7 @@
|
|||||||
Target Server Version : 50731
|
Target Server Version : 50731
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 05/04/2022 22:43:57
|
Date: 06/04/2022 23:53:50
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
@ -293,7 +293,7 @@ CREATE TABLE `csa_farmer` (
|
|||||||
-- Records of csa_farmer
|
-- Records of csa_farmer
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `csa_farmer` VALUES (3, '范诚诚', NULL, '13672226668', 25000, 300.0000, 20.0000, 1, '2021-05-01', NULL, 'N', '0', '0', '', '2022-04-05 13:06:27', '', '2022-04-05 13:18:27', NULL);
|
INSERT INTO `csa_farmer` VALUES (3, '范诚诚', NULL, '13672226668', 25000, 300.0000, 20.0000, 1, '2021-05-01', NULL, 'N', '0', '0', '', '2022-04-05 13:06:27', '', '2022-04-05 13:18:27', NULL);
|
||||||
INSERT INTO `csa_farmer` VALUES (5, '程开州', NULL, NULL, 15000, 0.0000, 60.0000, 2, '2021-04-05', NULL, 'N', '0', '0', '', '2022-04-05 18:57:35', '', NULL, NULL);
|
INSERT INTO `csa_farmer` VALUES (5, '程开州', NULL, '13588886666', 15000, 0.0000, 60.0000, 2, '2021-04-05', NULL, 'N', '0', '0', '', '2022-04-05 18:57:35', '', '2022-04-06 23:39:10', NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for csa_farmer_contract
|
-- Table structure for csa_farmer_contract
|
||||||
@ -327,7 +327,7 @@ CREATE TABLE `csa_farmer_contract` (
|
|||||||
-- Records of csa_farmer_contract
|
-- Records of csa_farmer_contract
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `csa_farmer_contract` VALUES (101, NULL, NULL, '王丽美', 10000, 0.0000, 0.0000, 0, 'QY', 'No.008', '2022-03-01', '2022-05-01', 62, '3', '0', 'admin', '2022-04-01 22:29:42', 'admin', '2022-04-04 14:54:20', NULL);
|
INSERT INTO `csa_farmer_contract` VALUES (101, NULL, NULL, '王丽美', 10000, 0.0000, 0.0000, 0, 'QY', 'No.008', '2022-03-01', '2022-05-01', 62, '3', '0', 'admin', '2022-04-01 22:29:42', 'admin', '2022-04-04 14:54:20', NULL);
|
||||||
INSERT INTO `csa_farmer_contract` VALUES (102, 5, NULL, '程开州', 15000, 0.0000, 60.0000, 2, 'QY', 'No.002', '2021-04-05', '2022-04-04', 365, '2', '0', 'admin', '2022-04-04 00:42:06', 'admin', '2022-04-05 18:57:35', '好朋友介绍,非常喜欢我们的农场,订嘱每次到期前都要提醒约续。');
|
INSERT INTO `csa_farmer_contract` VALUES (102, 5, 6, '程开州', 15000, 0.0000, 60.0000, 2, 'QY', 'No.002', '2021-04-05', '2022-04-04', 365, '1', '0', 'admin', '2022-04-04 00:42:06', 'admin', '2022-04-06 23:39:10', '好朋友介绍,非常喜欢我们的农场,订嘱每次到期前都要提醒约续。');
|
||||||
INSERT INTO `csa_farmer_contract` VALUES (103, 3, NULL, '范诚诚', 5000, 300.0000, 20.0000, 1, 'QY', 'No.003', '2021-05-01', '2022-04-30', 365, '2', '0', 'admin', '2022-04-04 14:30:01', 'admin', '2022-04-05 13:18:27', NULL);
|
INSERT INTO `csa_farmer_contract` VALUES (103, 3, NULL, '范诚诚', 5000, 300.0000, 20.0000, 1, 'QY', 'No.003', '2021-05-01', '2022-04-30', 365, '2', '0', 'admin', '2022-04-04 14:30:01', 'admin', '2022-04-05 13:18:27', NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -366,7 +366,7 @@ INSERT INTO `csa_garden` VALUES (2, 1, '8002', '香草居', 30, NULL, NULL, NULL
|
|||||||
INSERT INTO `csa_garden` VALUES (3, 1, '8003', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-07 13:15:43', 'admin', '2022-04-05 22:42:09', NULL);
|
INSERT INTO `csa_garden` VALUES (3, 1, '8003', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-07 13:15:43', 'admin', '2022-04-05 22:42:09', NULL);
|
||||||
INSERT INTO `csa_garden` VALUES (4, 1, '8004', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-07 13:20:38', 'admin', '2022-04-05 22:42:09', '');
|
INSERT INTO `csa_garden` VALUES (4, 1, '8004', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-07 13:20:38', 'admin', '2022-04-05 22:42:09', '');
|
||||||
INSERT INTO `csa_garden` VALUES (5, 1, '8005', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 21:05:48', 'admin', '2022-04-05 22:42:09', NULL);
|
INSERT INTO `csa_garden` VALUES (5, 1, '8005', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 21:05:48', 'admin', '2022-04-05 22:42:09', NULL);
|
||||||
INSERT INTO `csa_garden` VALUES (6, 1, '8006', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:07:11', 'admin', '2022-04-05 22:42:09', NULL);
|
INSERT INTO `csa_garden` VALUES (6, 1, '8006', '', 30, 5, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:07:11', 'admin', '2022-04-05 22:42:09', NULL);
|
||||||
INSERT INTO `csa_garden` VALUES (7, 1, '8007', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:07:56', 'admin', '2022-04-05 22:42:09', NULL);
|
INSERT INTO `csa_garden` VALUES (7, 1, '8007', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:07:56', 'admin', '2022-04-05 22:42:09', NULL);
|
||||||
INSERT INTO `csa_garden` VALUES (8, 1, '8008', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:13:41', 'admin', '2022-04-05 22:42:09', NULL);
|
INSERT INTO `csa_garden` VALUES (8, 1, '8008', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:13:41', 'admin', '2022-04-05 22:42:09', NULL);
|
||||||
INSERT INTO `csa_garden` VALUES (9, 1, '8009', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:15:24', 'admin', '2022-04-05 22:42:09', NULL);
|
INSERT INTO `csa_garden` VALUES (9, 1, '8009', '', 30, NULL, NULL, NULL, NULL, 'N', 'N', 'Y', '0', '0', '101', '2022-03-29 22:15:24', 'admin', '2022-04-05 22:42:09', NULL);
|
||||||
@ -1341,7 +1341,7 @@ CREATE TABLE `sys_logininfor` (
|
|||||||
`msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提示消息',
|
`msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提示消息',
|
||||||
`login_time` datetime NULL DEFAULT NULL COMMENT '访问时间',
|
`login_time` datetime NULL DEFAULT NULL COMMENT '访问时间',
|
||||||
PRIMARY KEY (`info_id`) USING BTREE
|
PRIMARY KEY (`info_id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 214 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统访问记录' ROW_FORMAT = DYNAMIC;
|
) ENGINE = InnoDB AUTO_INCREMENT = 217 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统访问记录' ROW_FORMAT = DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_logininfor
|
-- Records of sys_logininfor
|
||||||
@ -1460,6 +1460,9 @@ INSERT INTO `sys_logininfor` VALUES (210, 'admin', '127.0.0.1', '内网IP', 'Chr
|
|||||||
INSERT INTO `sys_logininfor` VALUES (211, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-05 12:42:38');
|
INSERT INTO `sys_logininfor` VALUES (211, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-05 12:42:38');
|
||||||
INSERT INTO `sys_logininfor` VALUES (212, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-05 18:12:36');
|
INSERT INTO `sys_logininfor` VALUES (212, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-05 18:12:36');
|
||||||
INSERT INTO `sys_logininfor` VALUES (213, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-05 21:16:51');
|
INSERT INTO `sys_logininfor` VALUES (213, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-05 21:16:51');
|
||||||
|
INSERT INTO `sys_logininfor` VALUES (214, 'admin', '127.0.0.1', '内网IP', 'Firefox 9', 'Windows 10', '0', '登录成功', '2022-04-06 20:25:27');
|
||||||
|
INSERT INTO `sys_logininfor` VALUES (215, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-06 20:46:38');
|
||||||
|
INSERT INTO `sys_logininfor` VALUES (216, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2022-04-06 23:38:25');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_menu
|
-- Table structure for sys_menu
|
||||||
@ -1707,7 +1710,7 @@ CREATE TABLE `sys_oper_log` (
|
|||||||
`error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '错误消息',
|
`error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '错误消息',
|
||||||
`oper_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
|
`oper_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
|
||||||
PRIMARY KEY (`oper_id`) USING BTREE
|
PRIMARY KEY (`oper_id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 729 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志记录' ROW_FORMAT = DYNAMIC;
|
) ENGINE = InnoDB AUTO_INCREMENT = 736 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志记录' ROW_FORMAT = DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_oper_log
|
-- Records of sys_oper_log
|
||||||
@ -2341,6 +2344,13 @@ INSERT INTO `sys_oper_log` VALUES (725, '菜地划分', 2, 'com.jlt.csa.controll
|
|||||||
INSERT INTO `sys_oper_log` VALUES (726, '菜地划分', 2, 'com.jlt.csa.controller.GardenController.updateStatus()', 'PUT', 1, 'admin', NULL, '/csa/garden/4', '127.0.0.1', '内网IP', '{\"updateTime\":1649169724820,\"params\":{},\"updateBy\":\"admin\",\"isCompleted\":\"Y\"} [4]', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-05 22:42:05');
|
INSERT INTO `sys_oper_log` VALUES (726, '菜地划分', 2, 'com.jlt.csa.controller.GardenController.updateStatus()', 'PUT', 1, 'admin', NULL, '/csa/garden/4', '127.0.0.1', '内网IP', '{\"updateTime\":1649169724820,\"params\":{},\"updateBy\":\"admin\",\"isCompleted\":\"Y\"} [4]', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-05 22:42:05');
|
||||||
INSERT INTO `sys_oper_log` VALUES (727, '菜地划分', 2, 'com.jlt.csa.controller.GardenController.updateStatus()', 'PUT', 1, 'admin', NULL, '/csa/garden/1,2,3,4,5,6,7,8,9,10', '127.0.0.1', '内网IP', '{\"updateTime\":1649169729414,\"params\":{},\"updateBy\":\"admin\",\"isCompleted\":\"Y\"} [1,2,3,4,5,6,7,8,9,10]', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-05 22:42:09');
|
INSERT INTO `sys_oper_log` VALUES (727, '菜地划分', 2, 'com.jlt.csa.controller.GardenController.updateStatus()', 'PUT', 1, 'admin', NULL, '/csa/garden/1,2,3,4,5,6,7,8,9,10', '127.0.0.1', '内网IP', '{\"updateTime\":1649169729414,\"params\":{},\"updateBy\":\"admin\",\"isCompleted\":\"Y\"} [1,2,3,4,5,6,7,8,9,10]', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-05 22:42:09');
|
||||||
INSERT INTO `sys_oper_log` VALUES (728, '菜地划分', 2, 'com.jlt.csa.controller.GardenController.updateStatus()', 'PUT', 1, 'admin', NULL, '/csa/garden/11,12', '127.0.0.1', '内网IP', '{\"updateTime\":1649169735413,\"params\":{},\"updateBy\":\"admin\",\"isCompleted\":\"Y\"} [11,12]', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-05 22:42:15');
|
INSERT INTO `sys_oper_log` VALUES (728, '菜地划分', 2, 'com.jlt.csa.controller.GardenController.updateStatus()', 'PUT', 1, 'admin', NULL, '/csa/garden/11,12', '127.0.0.1', '内网IP', '{\"updateTime\":1649169735413,\"params\":{},\"updateBy\":\"admin\",\"isCompleted\":\"Y\"} [11,12]', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-05 22:42:15');
|
||||||
|
INSERT INTO `sys_oper_log` VALUES (729, '会员签约', 2, 'com.jlt.csa.controller.FarmerContractController.claim()', 'PUT', 1, 'admin', NULL, '/csa/contract/claim', '127.0.0.1', '内网IP', '{\"mobileNumber\":\"1112\",\"contractId\":102,\"gardenName\":\"AAAA\",\"farmerName\":\"程开州\",\"gardenId\":3}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-06 22:04:28');
|
||||||
|
INSERT INTO `sys_oper_log` VALUES (730, '会员签约', 2, 'com.jlt.csa.controller.FarmerContractController.claim()', 'PUT', 1, 'admin', NULL, '/csa/contract/claim', '127.0.0.1', '内网IP', '{\"mobileNumber\":\"112\",\"contractId\":103,\"gardenName\":\"AAA\",\"farmerName\":\"范诚诚\",\"gardenId\":3}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-06 22:07:52');
|
||||||
|
INSERT INTO `sys_oper_log` VALUES (731, '会员签约', 2, 'com.jlt.csa.controller.FarmerContractController.claim()', 'PUT', 1, 'admin', NULL, '/csa/contract/claim', '127.0.0.1', '内网IP', '{\"mobileNumber\":\"112\",\"contractId\":103,\"gardenName\":\"AAA\",\"farmerName\":\"范诚诚\",\"gardenId\":3}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-06 22:08:32');
|
||||||
|
INSERT INTO `sys_oper_log` VALUES (732, '会员签约', 2, 'com.jlt.csa.controller.FarmerContractController.claim()', 'PUT', 1, 'admin', NULL, '/csa/contract/claim', '127.0.0.1', '内网IP', '{\"mobileNumber\":\"122\",\"contractId\":103,\"gardenName\":\"AAA\",\"farmerName\":\"范诚诚\",\"gardenId\":3}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-06 22:11:03');
|
||||||
|
INSERT INTO `sys_oper_log` VALUES (733, '会员签约', 2, 'com.jlt.csa.controller.FarmerContractController.claim()', 'PUT', 1, 'admin', NULL, '/csa/contract/claim', '127.0.0.1', '内网IP', '{\"mobileNumber\":\"120\",\"contractId\":103,\"gardenName\":\"AAA\",\"farmerName\":\"范诚诚\",\"gardenId\":3}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-06 22:12:40');
|
||||||
|
INSERT INTO `sys_oper_log` VALUES (734, '会员签约', 2, 'com.jlt.csa.controller.FarmerContractController.claim()', 'PUT', 1, 'admin', NULL, '/csa/contract/claim', '127.0.0.1', '内网IP', '{\"mobileNumber\":\"122\",\"contractId\":103,\"gardenName\":\"AAAA\",\"farmerName\":\"范诚诚\",\"gardenId\":3}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-06 22:13:50');
|
||||||
|
INSERT INTO `sys_oper_log` VALUES (735, '会员签约', 2, 'com.jlt.csa.controller.FarmerContractController.claim()', 'PUT', 1, 'admin', NULL, '/csa/contract/claim', '127.0.0.1', '内网IP', '{\"mobileNumber\":\"13588886666\",\"contractId\":102,\"gardenName\":\"大观园\",\"farmerName\":\"程开州\",\"gardenId\":6}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2022-04-06 23:39:09');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_post
|
-- Table structure for sys_post
|
||||||
@ -2551,7 +2561,7 @@ CREATE TABLE `sys_user` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_user
|
-- Records of sys_user
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_user` VALUES (1, 103, 'admin', '超级管理员', '00', '', '', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2022-04-05 21:16:51', 'admin', '2022-03-20 21:45:25', '', '2022-04-05 21:16:51', '管理员');
|
INSERT INTO `sys_user` VALUES (1, 103, 'admin', '超级管理员', '00', '', '', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2022-04-06 23:38:25', 'admin', '2022-03-20 21:45:25', '', '2022-04-06 23:38:25', '管理员');
|
||||||
INSERT INTO `sys_user` VALUES (2, 101, 'boss', '农场管理员', '00', '', '', '2', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2022-03-20 21:45:25', 'admin', '2022-03-20 21:45:25', 'admin', '2022-03-29 17:51:59', '');
|
INSERT INTO `sys_user` VALUES (2, 101, 'boss', '农场管理员', '00', '', '', '2', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2022-03-20 21:45:25', 'admin', '2022-03-20 21:45:25', 'admin', '2022-03-29 17:51:59', '');
|
||||||
INSERT INTO `sys_user` VALUES (100, 104, '101', '场长', '00', '88@66.com', '18888888888', '0', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2022-03-30 22:05:56', 'admin', '2022-03-29 18:18:00', 'admin', '2022-03-30 22:05:56', NULL);
|
INSERT INTO `sys_user` VALUES (100, 104, '101', '场长', '00', '88@66.com', '18888888888', '0', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2022-03-30 22:05:56', 'admin', '2022-03-29 18:18:00', 'admin', '2022-03-30 22:05:56', NULL);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user