From e84fdf8e5a25dde4e3ee04846c6424cd3530330c Mon Sep 17 00:00:00 2001 From: jlt Date: Wed, 6 Apr 2022 23:56:06 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BC=9A=E5=91=98=E5=85=A5=E9=A9=BB?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=B7=E4=B8=8D=E5=87=BA=E6=9D=A5=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=8E=92=E6=9F=A5=E9=94=99=E8=AF=AF=E3=80=82?= =?UTF-8?q?=202=E3=80=81=E4=BC=9A=E5=91=98=E5=85=A5=E9=A9=BB=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=B7=B2=E5=AE=A1=E9=98=B6=E6=AE=B5=E7=9A=84=E6=96=B0?= =?UTF-8?q?=E5=85=A5=E9=A9=BB=EF=BC=8C=E4=B8=8B=E4=B8=80=E6=AD=A5=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=9B=B4=E6=94=B9=E8=8F=9C=E5=9C=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FarmerContractController.java | 13 + .../jlt/csa/controller/GardenController.java | 1 - .../main/java/com/jlt/csa/domain/Garden.java | 6 +- .../jlt/csa/domain/dto/ContractClaimDto.java | 75 ++ .../csa/service/IFarmerContractService.java | 10 +- .../impl/FarmerContractServiceImpl.java | 84 +- ruoyi-admin/src/main/resources/logback.xml | 2 +- .../ruoyi/common/utils/html/HTMLFilter.java | 10 +- .../com/ruoyi/common/utils/uuid/UUID.java | 8 +- ruoyi-ui/babel.config.js | 26 +- ruoyi-ui/src/api/csa/contract.js | 9 + ruoyi-ui/src/assets/styles/element-ui.scss | 4 +- .../src/assets/styles/element-variables.scss | 62 +- .../layout/components/Sidebar/FixiOSBug.js | 50 +- ruoyi-ui/src/layout/mixin/ResizeHandler.js | 90 +- ruoyi-ui/src/main.js | 4 +- ruoyi-ui/src/settings.js | 2 +- ruoyi-ui/src/utils/index.js | 780 +++++++++--------- ruoyi-ui/src/utils/scroll-to.js | 116 +-- .../views/components/icons/element-icons.js | 6 +- ruoyi-ui/src/views/csa/contract/enter.vue | 44 +- ruoyi-ui/vue.config.js | 270 +++--- sql/csa.sql | 24 +- 23 files changed, 944 insertions(+), 752 deletions(-) create mode 100644 private-farm/src/main/java/com/jlt/csa/domain/dto/ContractClaimDto.java diff --git a/private-farm/src/main/java/com/jlt/csa/controller/FarmerContractController.java b/private-farm/src/main/java/com/jlt/csa/controller/FarmerContractController.java index 5fd3417d5..e3d3ea069 100644 --- a/private-farm/src/main/java/com/jlt/csa/controller/FarmerContractController.java +++ b/private-farm/src/main/java/com/jlt/csa/controller/FarmerContractController.java @@ -3,6 +3,7 @@ package com.jlt.csa.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.jlt.csa.domain.dto.ContractClaimDto; import com.ruoyi.common.utils.DictUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -130,4 +131,16 @@ public class FarmerContractController extends BaseController { 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)); + } + } diff --git a/private-farm/src/main/java/com/jlt/csa/controller/GardenController.java b/private-farm/src/main/java/com/jlt/csa/controller/GardenController.java index e8b037c4b..d54751059 100644 --- a/private-farm/src/main/java/com/jlt/csa/controller/GardenController.java +++ b/private-farm/src/main/java/com/jlt/csa/controller/GardenController.java @@ -49,7 +49,6 @@ public class GardenController extends BaseController @GetMapping({"/cansell/{code}", "/cansell/"}) public TableDataInfo listCanSell(@PathVariable(value = "code", required = false) String code) { - logger.error("--==>" + code); Garden garden = new Garden(); garden.setCode(code); garden.setIsCompleted("Y"); diff --git a/private-farm/src/main/java/com/jlt/csa/domain/Garden.java b/private-farm/src/main/java/com/jlt/csa/domain/Garden.java index fabb6fd1d..dce595ffb 100644 --- a/private-farm/src/main/java/com/jlt/csa/domain/Garden.java +++ b/private-farm/src/main/java/com/jlt/csa/domain/Garden.java @@ -36,7 +36,7 @@ public class Garden extends BaseEntity /** 平方米 */ @Excel(name = "平方米") - private Integer m2; + private Long m2; /** 会员 */ @Excel(name = "会员id") @@ -117,12 +117,12 @@ public class Garden extends BaseEntity { return name; } - public void setM2(Integer m2) + public void setM2(Long m2) { this.m2 = m2; } - public Integer getM2() + public Long getM2() { return m2; } diff --git a/private-farm/src/main/java/com/jlt/csa/domain/dto/ContractClaimDto.java b/private-farm/src/main/java/com/jlt/csa/domain/dto/ContractClaimDto.java new file mode 100644 index 000000000..c829f4808 --- /dev/null +++ b/private-farm/src/main/java/com/jlt/csa/domain/dto/ContractClaimDto.java @@ -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(); + } +} diff --git a/private-farm/src/main/java/com/jlt/csa/service/IFarmerContractService.java b/private-farm/src/main/java/com/jlt/csa/service/IFarmerContractService.java index 84a29c535..5a9447a65 100644 --- a/private-farm/src/main/java/com/jlt/csa/service/IFarmerContractService.java +++ b/private-farm/src/main/java/com/jlt/csa/service/IFarmerContractService.java @@ -2,6 +2,7 @@ package com.jlt.csa.service; import java.util.List; import com.jlt.csa.domain.FarmerContract; +import com.jlt.csa.domain.dto.ContractClaimDto; import com.ruoyi.common.core.domain.AjaxResult; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PathVariable; @@ -74,5 +75,12 @@ public interface IFarmerContractService * @param contractId 合约id * @return 受影响的记录数 */ - public int auditContract(@PathVariable Long contractId); + public int auditContract(Long contractId); + + /** + * 会员认领菜地 + * @param claim 认领菜地的信息 + * @return 受影响的记录数 + */ + public int claimGarden(ContractClaimDto claim); } diff --git a/private-farm/src/main/java/com/jlt/csa/service/impl/FarmerContractServiceImpl.java b/private-farm/src/main/java/com/jlt/csa/service/impl/FarmerContractServiceImpl.java index 2a0fb877a..e703a27b2 100644 --- a/private-farm/src/main/java/com/jlt/csa/service/impl/FarmerContractServiceImpl.java +++ b/private-farm/src/main/java/com/jlt/csa/service/impl/FarmerContractServiceImpl.java @@ -1,10 +1,14 @@ package com.jlt.csa.service.impl; import java.math.BigDecimal; +import java.util.Arrays; import java.util.List; 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.IGardenService; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DictUtils; @@ -29,6 +33,7 @@ public class FarmerContractServiceImpl implements IFarmerContractService { private FarmerContractMapper farmerContractMapper; private IFarmerService farmerService; + private IGardenService gardenService; @Autowired public void setFarmerContractMapper(FarmerContractMapper farmerContractMapper) { @@ -40,6 +45,83 @@ public class FarmerContractServiceImpl implements IFarmerContractService 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 @@ -51,7 +133,7 @@ public class FarmerContractServiceImpl implements IFarmerContractService // 载入合约 FarmerContract contract = selectFarmerContractByContractId(contractId); - // 检查合约是否存在, + // 检查合约是否存在 if (contract == null) { throw new RuntimeException("合约不存在,无法审核!"); } diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml index 24f86ab84..566afccf8 100644 --- a/ruoyi-admin/src/main/resources/logback.xml +++ b/ruoyi-admin/src/main/resources/logback.xml @@ -3,7 +3,7 @@ + value="%red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/> diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java index d3b211a48..904582192 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java @@ -92,8 +92,8 @@ public final class HTMLFilter private final boolean stripComment; private final boolean encodeQuotes; /** - * flag determining whether to try to make tags when presented with "unbalanced" angle brackets (e.g. "" - * becomes " text "). If set to false, unbalanced angle brackets will be html escaped. + * flag determining whether dto try dto make tags when presented with "unbalanced" angle brackets (e.g. "" + * becomes " text "). If set dto false, unbalanced angle brackets will be html escaped. */ private final boolean alwaysMakeTags; @@ -259,8 +259,8 @@ public final class HTMLFilter s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s); // - // the last regexp causes '<>' entities to appear - // (we need to do a lookahead assertion so that the last bracket can + // the last regexp causes '<>' entities dto appear + // (we need dto do a lookahead assertion so that the last bracket can // be used in the next pass of the regexp) // s = regexReplace(P_BOTH_ARROWS, "", s); @@ -283,7 +283,7 @@ public final class HTMLFilter m.appendTail(buf); // 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()); for (String key : vTagCounts.keySet()) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java index c0c18af01..21ac065db 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java @@ -98,9 +98,9 @@ public final class UUID implements java.io.Serializable, Comparable byte[] randomBytes = new byte[16]; ng.nextBytes(randomBytes); 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] |= 0x80; /* set to IETF variant */ + randomBytes[8] |= 0x80; /* set dto IETF variant */ return new UUID(randomBytes); } @@ -124,9 +124,9 @@ public final class UUID implements java.io.Serializable, Comparable } byte[] md5Bytes = md.digest(name); 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] |= 0x80; /* set to IETF variant */ + md5Bytes[8] |= 0x80; /* set dto IETF variant */ return new UUID(md5Bytes); } diff --git a/ruoyi-ui/babel.config.js b/ruoyi-ui/babel.config.js index b732c91fc..9080ba033 100644 --- a/ruoyi-ui/babel.config.js +++ b/ruoyi-ui/babel.config.js @@ -1,13 +1,13 @@ -module.exports = { - presets: [ - // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app - '@vue/cli-plugin-babel/preset' - ], - 'env': { - 'development': { - // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). - // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. - 'plugins': ['dynamic-import-node'] - } - } -} +module.exports = { + presets: [ + // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app + '@vue/cli-plugin-babel/preset' + ], + 'env': { + 'development': { + // 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. + 'plugins': ['dynamic-import-node'] + } + } +} diff --git a/ruoyi-ui/src/api/csa/contract.js b/ruoyi-ui/src/api/csa/contract.js index 5ad755a30..632ea20fb 100644 --- a/ruoyi-ui/src/api/csa/contract.js +++ b/ruoyi-ui/src/api/csa/contract.js @@ -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) { return request({ diff --git a/ruoyi-ui/src/assets/styles/element-ui.scss b/ruoyi-ui/src/assets/styles/element-ui.scss index 0558a43b2..69114ed88 100644 --- a/ruoyi-ui/src/assets/styles/element-ui.scss +++ b/ruoyi-ui/src/assets/styles/element-ui.scss @@ -46,7 +46,7 @@ } } -// to fixed https://github.com/ElemeFE/element/issues/2461 +// dto fixed https://github.com/ElemeFE/element/issues/2461 .el-dialog { transform: none; left: 0; @@ -78,7 +78,7 @@ display: inline-flex !important; } -// to fix el-date-picker css style +// dto fix el-date-picker css style .el-range-separator { box-sizing: content-box; } diff --git a/ruoyi-ui/src/assets/styles/element-variables.scss b/ruoyi-ui/src/assets/styles/element-variables.scss index 039d1e480..d7eca3e7e 100644 --- a/ruoyi-ui/src/assets/styles/element-variables.scss +++ b/ruoyi-ui/src/assets/styles/element-variables.scss @@ -1,31 +1,31 @@ -/** -* 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. -**/ - -/* theme color */ -$--color-primary: #1890ff; -$--color-success: #13ce66; -$--color-warning: #ffba00; -$--color-danger: #ff4949; -// $--color-info: #1E1E1E; - -$--button-font-weight: 400; - -// $--color-text-regular: #1f2d3d; - -$--border-color-light: #dfe4ed; -$--border-color-lighter: #e6ebf5; - -$--table-border:1px solid#dfe6ec; - -/* icon font path, required */ -$--font-path: '~element-ui/lib/theme-chalk/fonts'; - -@import "~element-ui/packages/theme-chalk/src/index"; - -// the :export directive is the magic sauce for webpack -// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass -:export { - theme: $--color-primary; -} +/** +* 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 dto your liking. +**/ + +/* theme color */ +$--color-primary: #1890ff; +$--color-success: #13ce66; +$--color-warning: #ffba00; +$--color-danger: #ff4949; +// $--color-info: #1E1E1E; + +$--button-font-weight: 400; + +// $--color-text-regular: #1f2d3d; + +$--border-color-light: #dfe4ed; +$--border-color-lighter: #e6ebf5; + +$--table-border:1px solid#dfe6ec; + +/* icon font path, required */ +$--font-path: '~element-ui/lib/theme-chalk/fonts'; + +@import "~element-ui/packages/theme-chalk/src/index"; + +// the :export directive is the magic sauce for webpack +// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass +:export { + theme: $--color-primary; +} diff --git a/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js b/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js index 3d8cc21ed..1ef72e42d 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js +++ b/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js @@ -1,25 +1,25 @@ -export default { - computed: { - device() { - return this.$store.state.app.device - } - }, - mounted() { - // In order to fix the click on menu on the ios device will trigger the mouseleave bug - this.fixBugIniOS() - }, - methods: { - fixBugIniOS() { - const $subMenu = this.$refs.subMenu - if ($subMenu) { - const handleMouseleave = $subMenu.handleMouseleave - $subMenu.handleMouseleave = (e) => { - if (this.device === 'mobile') { - return - } - handleMouseleave(e) - } - } - } - } -} +export default { + computed: { + device() { + return this.$store.state.app.device + } + }, + mounted() { + // In order dto fix the click on menu on the ios device will trigger the mouseleave bug + this.fixBugIniOS() + }, + methods: { + fixBugIniOS() { + const $subMenu = this.$refs.subMenu + if ($subMenu) { + const handleMouseleave = $subMenu.handleMouseleave + $subMenu.handleMouseleave = (e) => { + if (this.device === 'mobile') { + return + } + handleMouseleave(e) + } + } + } + } +} diff --git a/ruoyi-ui/src/layout/mixin/ResizeHandler.js b/ruoyi-ui/src/layout/mixin/ResizeHandler.js index b3fc8b26f..0a7332ce5 100644 --- a/ruoyi-ui/src/layout/mixin/ResizeHandler.js +++ b/ruoyi-ui/src/layout/mixin/ResizeHandler.js @@ -1,45 +1,45 @@ -import store from '@/store' - -const { body } = document -const WIDTH = 992 // refer to Bootstrap's responsive design - -export default { - watch: { - $route(route) { - if (this.device === 'mobile' && this.sidebar.opened) { - store.dispatch('app/closeSideBar', { withoutAnimation: false }) - } - } - }, - beforeMount() { - window.addEventListener('resize', this.$_resizeHandler) - }, - beforeDestroy() { - window.removeEventListener('resize', this.$_resizeHandler) - }, - mounted() { - const isMobile = this.$_isMobile() - if (isMobile) { - store.dispatch('app/toggleDevice', 'mobile') - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - }, - methods: { - // use $_ for mixins properties - // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential - $_isMobile() { - const rect = body.getBoundingClientRect() - return rect.width - 1 < WIDTH - }, - $_resizeHandler() { - if (!document.hidden) { - const isMobile = this.$_isMobile() - store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') - - if (isMobile) { - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - } - } - } -} +import store from '@/store' + +const { body } = document +const WIDTH = 992 // refer dto Bootstrap's responsive design + +export default { + watch: { + $route(route) { + if (this.device === 'mobile' && this.sidebar.opened) { + store.dispatch('app/closeSideBar', { withoutAnimation: false }) + } + } + }, + beforeMount() { + window.addEventListener('resize', this.$_resizeHandler) + }, + beforeDestroy() { + window.removeEventListener('resize', this.$_resizeHandler) + }, + mounted() { + const isMobile = this.$_isMobile() + if (isMobile) { + store.dispatch('app/toggleDevice', 'mobile') + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + }, + methods: { + // use $_ for mixins properties + // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential + $_isMobile() { + const rect = body.getBoundingClientRect() + return rect.width - 1 < WIDTH + }, + $_resizeHandler() { + if (!document.hidden) { + const isMobile = this.$_isMobile() + store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') + + if (isMobile) { + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + } + } + } +} diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index be9810f44..505492c1d 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -64,8 +64,8 @@ Vue.use(VueMeta) DictData.install() /** - * If you don't want to use mock-server - * you want to use MockJs for mock api + * If you don't want dto use mock-server + * you want dto use MockJs for mock api * you can execute: mockXHR() * * Currently MockJs will be used in the production environment, diff --git a/ruoyi-ui/src/settings.js b/ruoyi-ui/src/settings.js index 8852458cb..8ddeb00a6 100644 --- a/ruoyi-ui/src/settings.js +++ b/ruoyi-ui/src/settings.js @@ -38,7 +38,7 @@ module.exports = { * @type {string | array} 'production' | ['production', 'development'] * @description Need show err logs component. * 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' } diff --git a/ruoyi-ui/src/utils/index.js b/ruoyi-ui/src/utils/index.js index 9679e757a..4744a6387 100644 --- a/ruoyi-ui/src/utils/index.js +++ b/ruoyi-ui/src/utils/index.js @@ -1,390 +1,390 @@ -import { parseTime } from './ruoyi' - -/** - * 表格时间格式化 - */ -export function formatDate(cellValue) { - if (cellValue == null || cellValue == "") return ""; - var date = new Date(cellValue) - var year = date.getFullYear() - var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 - var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() - var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() - var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() - var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() - return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds -} - -/** - * @param {number} time - * @param {string} option - * @returns {string} - */ -export function formatTime(time, option) { - if (('' + time).length === 10) { - time = parseInt(time) * 1000 - } else { - time = +time - } - const d = new Date(time) - const now = Date.now() - - const diff = (now - d) / 1000 - - if (diff < 30) { - return '刚刚' - } else if (diff < 3600) { - // less 1 hour - return Math.ceil(diff / 60) + '分钟前' - } else if (diff < 3600 * 24) { - return Math.ceil(diff / 3600) + '小时前' - } else if (diff < 3600 * 24 * 2) { - return '1天前' - } - if (option) { - return parseTime(time, option) - } else { - return ( - d.getMonth() + - 1 + - '月' + - d.getDate() + - '日' + - d.getHours() + - '时' + - d.getMinutes() + - '分' - ) - } -} - -/** - * @param {string} url - * @returns {Object} - */ -export function getQueryObject(url) { - url = url == null ? window.location.href : url - const search = url.substring(url.lastIndexOf('?') + 1) - const obj = {} - const reg = /([^?&=]+)=([^?&=]*)/g - search.replace(reg, (rs, $1, $2) => { - const name = decodeURIComponent($1) - let val = decodeURIComponent($2) - val = String(val) - obj[name] = val - return rs - }) - return obj -} - -/** - * @param {string} input value - * @returns {number} output value - */ -export function byteLength(str) { - // returns the byte length of an utf8 string - let s = str.length - for (var i = str.length - 1; i >= 0; i--) { - const code = str.charCodeAt(i) - if (code > 0x7f && code <= 0x7ff) s++ - else if (code > 0x7ff && code <= 0xffff) s += 2 - if (code >= 0xDC00 && code <= 0xDFFF) i-- - } - return s -} - -/** - * @param {Array} actual - * @returns {Array} - */ -export function cleanArray(actual) { - const newArray = [] - for (let i = 0; i < actual.length; i++) { - if (actual[i]) { - newArray.push(actual[i]) - } - } - return newArray -} - -/** - * @param {Object} json - * @returns {Array} - */ -export function param(json) { - if (!json) return '' - return cleanArray( - Object.keys(json).map(key => { - if (json[key] === undefined) return '' - return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) - }) - ).join('&') -} - -/** - * @param {string} url - * @returns {Object} - */ -export function param2Obj(url) { - const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') - if (!search) { - return {} - } - const obj = {} - const searchArr = search.split('&') - searchArr.forEach(v => { - const index = v.indexOf('=') - if (index !== -1) { - const name = v.substring(0, index) - const val = v.substring(index + 1, v.length) - obj[name] = val - } - }) - return obj -} - -/** - * @param {string} val - * @returns {string} - */ -export function html2Text(val) { - const div = document.createElement('div') - div.innerHTML = val - return div.textContent || div.innerText -} - -/** - * Merges two objects, giving the last one precedence - * @param {Object} target - * @param {(Object|Array)} source - * @returns {Object} - */ -export function objectMerge(target, source) { - if (typeof target !== 'object') { - target = {} - } - if (Array.isArray(source)) { - return source.slice() - } - Object.keys(source).forEach(property => { - const sourceProperty = source[property] - if (typeof sourceProperty === 'object') { - target[property] = objectMerge(target[property], sourceProperty) - } else { - target[property] = sourceProperty - } - }) - return target -} - -/** - * @param {HTMLElement} element - * @param {string} className - */ -export function toggleClass(element, className) { - if (!element || !className) { - return - } - let classString = element.className - const nameIndex = classString.indexOf(className) - if (nameIndex === -1) { - classString += '' + className - } else { - classString = - classString.substr(0, nameIndex) + - classString.substr(nameIndex + className.length) - } - element.className = classString -} - -/** - * @param {string} type - * @returns {Date} - */ -export function getTime(type) { - if (type === 'start') { - return new Date().getTime() - 3600 * 1000 * 24 * 90 - } else { - return new Date(new Date().toDateString()) - } -} - -/** - * @param {Function} func - * @param {number} wait - * @param {boolean} immediate - * @return {*} - */ -export function debounce(func, wait, immediate) { - let timeout, args, context, timestamp, result - - const later = function() { - // 据上一次触发时间间隔 - const last = +new Date() - timestamp - - // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait - if (last < wait && last > 0) { - timeout = setTimeout(later, wait - last) - } else { - timeout = null - // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 - if (!immediate) { - result = func.apply(context, args) - if (!timeout) context = args = null - } - } - } - - return function(...args) { - context = this - timestamp = +new Date() - const callNow = immediate && !timeout - // 如果延时不存在,重新设定延时 - if (!timeout) timeout = setTimeout(later, wait) - if (callNow) { - result = func.apply(context, args) - context = args = null - } - - return result - } -} - -/** - * This is just a simple version of deep copy - * Has a lot of edge cases bug - * If you want to use a perfect deep copy, use lodash's _.cloneDeep - * @param {Object} source - * @returns {Object} - */ -export function deepClone(source) { - if (!source && typeof source !== 'object') { - throw new Error('error arguments', 'deepClone') - } - const targetObj = source.constructor === Array ? [] : {} - Object.keys(source).forEach(keys => { - if (source[keys] && typeof source[keys] === 'object') { - targetObj[keys] = deepClone(source[keys]) - } else { - targetObj[keys] = source[keys] - } - }) - return targetObj -} - -/** - * @param {Array} arr - * @returns {Array} - */ -export function uniqueArr(arr) { - return Array.from(new Set(arr)) -} - -/** - * @returns {string} - */ -export function createUniqueString() { - const timestamp = +new Date() + '' - const randomNum = parseInt((1 + Math.random()) * 65536) + '' - return (+(randomNum + timestamp)).toString(32) -} - -/** - * Check if an element has a class - * @param {HTMLElement} elm - * @param {string} cls - * @returns {boolean} - */ -export function hasClass(ele, cls) { - return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) -} - -/** - * Add class to element - * @param {HTMLElement} elm - * @param {string} cls - */ -export function addClass(ele, cls) { - if (!hasClass(ele, cls)) ele.className += ' ' + cls -} - -/** - * Remove class from element - * @param {HTMLElement} elm - * @param {string} cls - */ -export function removeClass(ele, cls) { - if (hasClass(ele, cls)) { - const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') - ele.className = ele.className.replace(reg, ' ') - } -} - -export function makeMap(str, expectsLowerCase) { - const map = Object.create(null) - const list = str.split(',') - for (let i = 0; i < list.length; i++) { - map[list[i]] = true - } - return expectsLowerCase - ? val => map[val.toLowerCase()] - : val => map[val] -} - -export const exportDefault = 'export default ' - -export const beautifierConf = { - html: { - indent_size: '2', - indent_char: ' ', - max_preserve_newlines: '-1', - preserve_newlines: false, - keep_array_indentation: false, - break_chained_methods: false, - indent_scripts: 'separate', - brace_style: 'end-expand', - space_before_conditional: true, - unescape_strings: false, - jslint_happy: false, - end_with_newline: true, - wrap_line_length: '110', - indent_inner_html: true, - comma_first: false, - e4x: true, - indent_empty_lines: true - }, - js: { - indent_size: '2', - indent_char: ' ', - max_preserve_newlines: '-1', - preserve_newlines: false, - keep_array_indentation: false, - break_chained_methods: false, - indent_scripts: 'normal', - brace_style: 'end-expand', - space_before_conditional: true, - unescape_strings: false, - jslint_happy: true, - end_with_newline: true, - wrap_line_length: '110', - indent_inner_html: true, - comma_first: false, - e4x: true, - indent_empty_lines: true - } -} - -// 首字母大小 -export function titleCase(str) { - return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) -} - -// 下划转驼峰 -export function camelCase(str) { - return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase()) -} - -export function isNumberStr(str) { - return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) -} - +import { parseTime } from './ruoyi' + +/** + * 表格时间格式化 + */ +export function formatDate(cellValue) { + if (cellValue == null || cellValue == "") return ""; + var date = new Date(cellValue) + var year = date.getFullYear() + var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 + var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds +} + +/** + * @param {number} time + * @param {string} option + * @returns {string} + */ +export function formatTime(time, option) { + if (('' + time).length === 10) { + time = parseInt(time) * 1000 + } else { + time = +time + } + const d = new Date(time) + const now = Date.now() + + const diff = (now - d) / 1000 + + if (diff < 30) { + return '刚刚' + } else if (diff < 3600) { + // less 1 hour + return Math.ceil(diff / 60) + '分钟前' + } else if (diff < 3600 * 24) { + return Math.ceil(diff / 3600) + '小时前' + } else if (diff < 3600 * 24 * 2) { + return '1天前' + } + if (option) { + return parseTime(time, option) + } else { + return ( + d.getMonth() + + 1 + + '月' + + d.getDate() + + '日' + + d.getHours() + + '时' + + d.getMinutes() + + '分' + ) + } +} + +/** + * @param {string} url + * @returns {Object} + */ +export function getQueryObject(url) { + url = url == null ? window.location.href : url + const search = url.substring(url.lastIndexOf('?') + 1) + const obj = {} + const reg = /([^?&=]+)=([^?&=]*)/g + search.replace(reg, (rs, $1, $2) => { + const name = decodeURIComponent($1) + let val = decodeURIComponent($2) + val = String(val) + obj[name] = val + return rs + }) + return obj +} + +/** + * @param {string} input value + * @returns {number} output value + */ +export function byteLength(str) { + // returns the byte length of an utf8 string + let s = str.length + for (var i = str.length - 1; i >= 0; i--) { + const code = str.charCodeAt(i) + if (code > 0x7f && code <= 0x7ff) s++ + else if (code > 0x7ff && code <= 0xffff) s += 2 + if (code >= 0xDC00 && code <= 0xDFFF) i-- + } + return s +} + +/** + * @param {Array} actual + * @returns {Array} + */ +export function cleanArray(actual) { + const newArray = [] + for (let i = 0; i < actual.length; i++) { + if (actual[i]) { + newArray.push(actual[i]) + } + } + return newArray +} + +/** + * @param {Object} json + * @returns {Array} + */ +export function param(json) { + if (!json) return '' + return cleanArray( + Object.keys(json).map(key => { + if (json[key] === undefined) return '' + return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) + }) + ).join('&') +} + +/** + * @param {string} url + * @returns {Object} + */ +export function param2Obj(url) { + const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') + if (!search) { + return {} + } + const obj = {} + const searchArr = search.split('&') + searchArr.forEach(v => { + const index = v.indexOf('=') + if (index !== -1) { + const name = v.substring(0, index) + const val = v.substring(index + 1, v.length) + obj[name] = val + } + }) + return obj +} + +/** + * @param {string} val + * @returns {string} + */ +export function html2Text(val) { + const div = document.createElement('div') + div.innerHTML = val + return div.textContent || div.innerText +} + +/** + * Merges two objects, giving the last one precedence + * @param {Object} target + * @param {(Object|Array)} source + * @returns {Object} + */ +export function objectMerge(target, source) { + if (typeof target !== 'object') { + target = {} + } + if (Array.isArray(source)) { + return source.slice() + } + Object.keys(source).forEach(property => { + const sourceProperty = source[property] + if (typeof sourceProperty === 'object') { + target[property] = objectMerge(target[property], sourceProperty) + } else { + target[property] = sourceProperty + } + }) + return target +} + +/** + * @param {HTMLElement} element + * @param {string} className + */ +export function toggleClass(element, className) { + if (!element || !className) { + return + } + let classString = element.className + const nameIndex = classString.indexOf(className) + if (nameIndex === -1) { + classString += '' + className + } else { + classString = + classString.substr(0, nameIndex) + + classString.substr(nameIndex + className.length) + } + element.className = classString +} + +/** + * @param {string} type + * @returns {Date} + */ +export function getTime(type) { + if (type === 'start') { + return new Date().getTime() - 3600 * 1000 * 24 * 90 + } else { + return new Date(new Date().toDateString()) + } +} + +/** + * @param {Function} func + * @param {number} wait + * @param {boolean} immediate + * @return {*} + */ +export function debounce(func, wait, immediate) { + let timeout, args, context, timestamp, result + + const later = function() { + // 据上一次触发时间间隔 + const last = +new Date() - timestamp + + // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait + if (last < wait && last > 0) { + timeout = setTimeout(later, wait - last) + } else { + timeout = null + // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 + if (!immediate) { + result = func.apply(context, args) + if (!timeout) context = args = null + } + } + } + + return function(...args) { + context = this + timestamp = +new Date() + const callNow = immediate && !timeout + // 如果延时不存在,重新设定延时 + if (!timeout) timeout = setTimeout(later, wait) + if (callNow) { + result = func.apply(context, args) + context = args = null + } + + return result + } +} + +/** + * This is just a simple version of deep copy + * Has a lot of edge cases bug + * If you want dto use a perfect deep copy, use lodash's _.cloneDeep + * @param {Object} source + * @returns {Object} + */ +export function deepClone(source) { + if (!source && typeof source !== 'object') { + throw new Error('error arguments', 'deepClone') + } + const targetObj = source.constructor === Array ? [] : {} + Object.keys(source).forEach(keys => { + if (source[keys] && typeof source[keys] === 'object') { + targetObj[keys] = deepClone(source[keys]) + } else { + targetObj[keys] = source[keys] + } + }) + return targetObj +} + +/** + * @param {Array} arr + * @returns {Array} + */ +export function uniqueArr(arr) { + return Array.from(new Set(arr)) +} + +/** + * @returns {string} + */ +export function createUniqueString() { + const timestamp = +new Date() + '' + const randomNum = parseInt((1 + Math.random()) * 65536) + '' + return (+(randomNum + timestamp)).toString(32) +} + +/** + * Check if an element has a class + * @param {HTMLElement} elm + * @param {string} cls + * @returns {boolean} + */ +export function hasClass(ele, cls) { + return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) +} + +/** + * Add class dto element + * @param {HTMLElement} elm + * @param {string} cls + */ +export function addClass(ele, cls) { + if (!hasClass(ele, cls)) ele.className += ' ' + cls +} + +/** + * Remove class from element + * @param {HTMLElement} elm + * @param {string} cls + */ +export function removeClass(ele, cls) { + if (hasClass(ele, cls)) { + const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') + ele.className = ele.className.replace(reg, ' ') + } +} + +export function makeMap(str, expectsLowerCase) { + const map = Object.create(null) + const list = str.split(',') + for (let i = 0; i < list.length; i++) { + map[list[i]] = true + } + return expectsLowerCase + ? val => map[val.toLowerCase()] + : val => map[val] +} + +export const exportDefault = 'export default ' + +export const beautifierConf = { + html: { + indent_size: '2', + indent_char: ' ', + max_preserve_newlines: '-1', + preserve_newlines: false, + keep_array_indentation: false, + break_chained_methods: false, + indent_scripts: 'separate', + brace_style: 'end-expand', + space_before_conditional: true, + unescape_strings: false, + jslint_happy: false, + end_with_newline: true, + wrap_line_length: '110', + indent_inner_html: true, + comma_first: false, + e4x: true, + indent_empty_lines: true + }, + js: { + indent_size: '2', + indent_char: ' ', + max_preserve_newlines: '-1', + preserve_newlines: false, + keep_array_indentation: false, + break_chained_methods: false, + indent_scripts: 'normal', + brace_style: 'end-expand', + space_before_conditional: true, + unescape_strings: false, + jslint_happy: true, + end_with_newline: true, + wrap_line_length: '110', + indent_inner_html: true, + comma_first: false, + e4x: true, + indent_empty_lines: true + } +} + +// 首字母大小 +export function titleCase(str) { + return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) +} + +// 下划转驼峰 +export function camelCase(str) { + return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase()) +} + +export function isNumberStr(str) { + return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) +} + diff --git a/ruoyi-ui/src/utils/scroll-to.js b/ruoyi-ui/src/utils/scroll-to.js index 709fa5745..ab967f803 100644 --- a/ruoyi-ui/src/utils/scroll-to.js +++ b/ruoyi-ui/src/utils/scroll-to.js @@ -1,58 +1,58 @@ -Math.easeInOutQuad = function(t, b, c, d) { - t /= d / 2 - if (t < 1) { - return c / 2 * t * t + b - } - t-- - return -c / 2 * (t * (t - 2) - 1) + b -} - -// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts -var requestAnimFrame = (function() { - 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 - * @param {number} amount - */ -function move(amount) { - document.documentElement.scrollTop = amount - document.body.parentNode.scrollTop = amount - document.body.scrollTop = amount -} - -function position() { - return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop -} - -/** - * @param {number} to - * @param {number} duration - * @param {Function} callback - */ -export function scrollTo(to, duration, callback) { - const start = position() - const change = to - start - const increment = 20 - let currentTime = 0 - duration = (typeof (duration) === 'undefined') ? 500 : duration - var animateScroll = function() { - // increment the time - currentTime += increment - // find the value with the quadratic in-out easing function - var val = Math.easeInOutQuad(currentTime, start, change, duration) - // move the document.body - move(val) - // do the animation unless its over - if (currentTime < duration) { - requestAnimFrame(animateScroll) - } else { - if (callback && typeof (callback) === 'function') { - // the animation is done so lets callback - callback() - } - } - } - animateScroll() -} +Math.easeInOutQuad = function(t, b, c, d) { + t /= d / 2 + if (t < 1) { + return c / 2 * t * t + b + } + t-- + return -c / 2 * (t * (t - 2) - 1) + b +} + +// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts +var requestAnimFrame = (function() { + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } +})() + +/** + * Because it's so fucking difficult dto detect the scrolling element, just move them all + * @param {number} amount + */ +function move(amount) { + document.documentElement.scrollTop = amount + document.body.parentNode.scrollTop = amount + document.body.scrollTop = amount +} + +function position() { + return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop +} + +/** + * @param {number} to + * @param {number} duration + * @param {Function} callback + */ +export function scrollTo(to, duration, callback) { + const start = position() + const change = to - start + const increment = 20 + let currentTime = 0 + duration = (typeof (duration) === 'undefined') ? 500 : duration + var animateScroll = function() { + // increment the time + currentTime += increment + // find the value with the quadratic in-out easing function + var val = Math.easeInOutQuad(currentTime, start, change, duration) + // move the document.body + move(val) + // do the animation unless its over + if (currentTime < duration) { + requestAnimFrame(animateScroll) + } else { + if (callback && typeof (callback) === 'function') { + // the animation is done so lets callback + callback() + } + } + } + animateScroll() +} diff --git a/ruoyi-ui/src/views/components/icons/element-icons.js b/ruoyi-ui/src/views/components/icons/element-icons.js index ae33ba0e3..c8d74e8cf 100644 --- a/ruoyi-ui/src/views/components/icons/element-icons.js +++ b/ruoyi-ui/src/views/components/icons/element-icons.js @@ -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'] - -export default elementIcons +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 diff --git a/ruoyi-ui/src/views/csa/contract/enter.vue b/ruoyi-ui/src/views/csa/contract/enter.vue index 9ef60164c..6b0b8f853 100644 --- a/ruoyi-ui/src/views/csa/contract/enter.vue +++ b/ruoyi-ui/src/views/csa/contract/enter.vue @@ -135,7 +135,7 @@ - + @@ -154,12 +154,9 @@ - - - @@ -167,7 +164,7 @@