diff --git a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTask.java b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTask.java index 92200226..b7d94f7a 100644 --- a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTask.java +++ b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTask.java @@ -4,9 +4,11 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import com.ruoyi.cxxm.serializer.CustomMjSerialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotation.IdType; @@ -78,6 +80,7 @@ public class ZftkTask extends BaseEntity { */ @Excel(name = "地块面积") @ApiModelProperty(value = "地块面积") + @JsonSerialize(using = CustomMjSerialize.class) private String dkmj; @@ -86,6 +89,7 @@ public class ZftkTask extends BaseEntity { */ @Excel(name = "农用地面积") @ApiModelProperty(value = "农用地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String nydmj; @@ -94,6 +98,7 @@ public class ZftkTask extends BaseEntity { */ @Excel(name = "耕地面积") @ApiModelProperty(value = "耕地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String gdmj; @@ -102,6 +107,7 @@ public class ZftkTask extends BaseEntity { */ @Excel(name = "建设用地面积") @ApiModelProperty(value = "建设用地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String jsydmj; @@ -110,6 +116,7 @@ public class ZftkTask extends BaseEntity { */ @Excel(name = "未利用用地面积") @ApiModelProperty(value = "未利用用地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String wlydmj; /** @@ -117,6 +124,7 @@ public class ZftkTask extends BaseEntity { */ @Excel(name = "永久基本农田面积") @ApiModelProperty(value = "永久基本农田面积") + @JsonSerialize(using = CustomMjSerialize.class) private String yjjbntmj; diff --git a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTaskExport.java b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTaskExport.java index 76cfcbe8..0968f7d4 100644 --- a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTaskExport.java +++ b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zftk/ZftkTaskExport.java @@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import com.ruoyi.cxxm.serializer.CustomMjSerialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -78,6 +80,7 @@ public class ZftkTaskExport extends BaseEntity { */ @Excel(name = "地块面积",needMerge = true) @ApiModelProperty(value = "地块面积") + @JsonSerialize(using = CustomMjSerialize.class) private String dkmj; @@ -86,6 +89,7 @@ public class ZftkTaskExport extends BaseEntity { */ @Excel(name = "农用地面积",needMerge = true) @ApiModelProperty(value = "农用地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String nydmj; @@ -94,6 +98,7 @@ public class ZftkTaskExport extends BaseEntity { */ @Excel(name = "耕地面积",needMerge = true) @ApiModelProperty(value = "耕地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String gdmj; @@ -102,6 +107,7 @@ public class ZftkTaskExport extends BaseEntity { */ @Excel(name = "建设用地面积",needMerge = true) @ApiModelProperty(value = "建设用地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String jsydmj; @@ -110,6 +116,7 @@ public class ZftkTaskExport extends BaseEntity { */ @Excel(name = "未利用用地面积",needMerge = true) @ApiModelProperty(value = "未利用用地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String wlydmj; /** @@ -117,6 +124,7 @@ public class ZftkTaskExport extends BaseEntity { */ @Excel(name = "永久基本农田面积",needMerge = true) @ApiModelProperty(value = "永久基本农田面积") + @JsonSerialize(using = CustomMjSerialize.class) private String yjjbntmj; diff --git a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTask.java b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTask.java index 7c3f1bb4..e46136b3 100644 --- a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTask.java +++ b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTask.java @@ -4,9 +4,11 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import com.ruoyi.cxxm.serializer.CustomMjSerialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotation.IdType; @@ -94,6 +96,7 @@ public class ZtTask extends BaseEntity { */ @Excel(name = "图标面积") @ApiModelProperty(value = "图标面积") + @JsonSerialize(using = CustomMjSerialize.class) private String tbmj; @@ -102,6 +105,7 @@ public class ZtTask extends BaseEntity { */ @Excel(name = "耕地面积") @ApiModelProperty(value = "耕地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String gdmj; @@ -110,6 +114,7 @@ public class ZtTask extends BaseEntity { */ @Excel(name = "基本农田面积") @ApiModelProperty(value = "基本农田面积") + @JsonSerialize(using = CustomMjSerialize.class) private String jbntmj; @@ -134,6 +139,7 @@ public class ZtTask extends BaseEntity { */ @Excel(name = "恢复原貌面积") @ApiModelProperty(value = "恢复原貌面积") + @JsonSerialize(using = CustomMjSerialize.class) private String hfymmj; diff --git a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTaskExport.java b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTaskExport.java index a04a6c8e..9c761b85 100644 --- a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTaskExport.java +++ b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zt/ZtTaskExport.java @@ -3,9 +3,11 @@ package com.ruoyi.cxxm.domain.entity.zt; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.cxxm.domain.entity.zftk.ZftkCheckExport; +import com.ruoyi.cxxm.serializer.CustomMjSerialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -94,6 +96,7 @@ public class ZtTaskExport extends BaseEntity { */ @Excel(name = "图标面积",needMerge = true) @ApiModelProperty(value = "图标面积") + @JsonSerialize(using = CustomMjSerialize.class) private String tbmj; @@ -102,6 +105,7 @@ public class ZtTaskExport extends BaseEntity { */ @Excel(name = "耕地面积",needMerge = true) @ApiModelProperty(value = "耕地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String gdmj; @@ -110,6 +114,7 @@ public class ZtTaskExport extends BaseEntity { */ @Excel(name = "基本农田面积",needMerge = true) @ApiModelProperty(value = "基本农田面积") + @JsonSerialize(using = CustomMjSerialize.class) private String jbntmj; @@ -134,6 +139,7 @@ public class ZtTaskExport extends BaseEntity { */ @Excel(name = "恢复原貌面积",needMerge = true) @ApiModelProperty(value = "恢复原貌面积") + @JsonSerialize(using = CustomMjSerialize.class) private String hfymmj; diff --git a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTask.java b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTask.java index c81fc88c..28c967c9 100644 --- a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTask.java +++ b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTask.java @@ -4,9 +4,11 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import com.ruoyi.cxxm.serializer.CustomMjSerialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotation.IdType; @@ -94,6 +96,7 @@ public class ZttbTask extends BaseEntity { */ @Excel(name = "图斑面积") @ApiModelProperty(value = "图斑面积") + @JsonSerialize(using = CustomMjSerialize.class) private String tbmj; @@ -102,6 +105,7 @@ public class ZttbTask extends BaseEntity { */ @Excel(name = "耕地面积") @ApiModelProperty(value = "耕地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String gdmj; @@ -110,6 +114,7 @@ public class ZttbTask extends BaseEntity { */ @Excel(name = "基本农田面积") @ApiModelProperty(value = "基本农田面积") + @JsonSerialize(using = CustomMjSerialize.class) private String jbntmj; diff --git a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTaskExport.java b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTaskExport.java index 85561349..ba9bc0ae 100644 --- a/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTaskExport.java +++ b/cxxm/src/main/java/com/ruoyi/cxxm/domain/entity/zttb/ZttbTaskExport.java @@ -3,9 +3,11 @@ package com.ruoyi.cxxm.domain.entity.zttb; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.cxxm.domain.entity.zt.ZtCheckExport; +import com.ruoyi.cxxm.serializer.CustomMjSerialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -94,6 +96,7 @@ public class ZttbTaskExport extends BaseEntity { */ @Excel(name = "图标面积",needMerge = true) @ApiModelProperty(value = "图标面积") + @JsonSerialize(using = CustomMjSerialize.class) private String tbmj; @@ -102,6 +105,7 @@ public class ZttbTaskExport extends BaseEntity { */ @Excel(name = "耕地面积",needMerge = true) @ApiModelProperty(value = "耕地面积") + @JsonSerialize(using = CustomMjSerialize.class) private String gdmj; @@ -110,6 +114,7 @@ public class ZttbTaskExport extends BaseEntity { */ @Excel(name = "基本农田面积",needMerge = true) @ApiModelProperty(value = "基本农田面积") + @JsonSerialize(using = CustomMjSerialize.class) private String jbntmj; @@ -134,6 +139,7 @@ public class ZttbTaskExport extends BaseEntity { */ @Excel(name = "恢复原貌面积",needMerge = true) @ApiModelProperty(value = "恢复原貌面积") + @JsonSerialize(using = CustomMjSerialize.class) private String hfymmj; diff --git a/cxxm/src/main/java/com/ruoyi/cxxm/serializer/CustomMjSerialize.java b/cxxm/src/main/java/com/ruoyi/cxxm/serializer/CustomMjSerialize.java new file mode 100644 index 00000000..57c1d896 --- /dev/null +++ b/cxxm/src/main/java/com/ruoyi/cxxm/serializer/CustomMjSerialize.java @@ -0,0 +1,29 @@ +package com.ruoyi.cxxm.serializer; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +import java.io.IOException; +import java.text.DecimalFormat; + +public class CustomMjSerialize extends JsonSerializer { + + private DecimalFormat df = new DecimalFormat("0.0000"); + + @Override + public void serialize(String value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + if (value == null || value.equals(" ")) { + value = "0"; + } + try { + if (value.contains(".")) { + value = df.format(Double.parseDouble(value)); + } + } catch (Exception e) { + + } finally { + jsonGenerator.writeString(value); + } + } +} \ No newline at end of file diff --git a/ruoyi-ui/src/components/Map/index.vue b/ruoyi-ui/src/components/Map/index.vue index 697f3ad7..5f269fa0 100644 --- a/ruoyi-ui/src/components/Map/index.vue +++ b/ruoyi-ui/src/components/Map/index.vue @@ -3,7 +3,7 @@
-
图层
+
测距
测面
清除
diff --git a/ruoyi-ui/src/components/Map2/index.vue b/ruoyi-ui/src/components/Map2/index.vue index 697f3ad7..46694006 100644 --- a/ruoyi-ui/src/components/Map2/index.vue +++ b/ruoyi-ui/src/components/Map2/index.vue @@ -230,7 +230,6 @@ export default { .map-gj { padding: 5px 10px; border: 1px solid #999999; - } .map-gj:last-child { diff --git a/ruoyi-ui/src/components/RuoYi/Doc/index.vue b/ruoyi-ui/src/components/RuoYi/Doc/index.vue index cc829b24..b58effbe 100644 --- a/ruoyi-ui/src/components/RuoYi/Doc/index.vue +++ b/ruoyi-ui/src/components/RuoYi/Doc/index.vue @@ -9,13 +9,19 @@ export default { name: 'RuoYiDoc', data() { return { - url: 'http://doc.ruoyi.vip/ruoyi-vue' + url: 'http://doc.ruoyi.vip/ruoyi-vue', + zjDoc: process.env.VUE_APP_BASE_API + "/profile/common/州级账号Web平台操作指导手册.pdf", + sjDoc: process.env.VUE_APP_BASE_API + "/profile/common/市、县级账号Web平台操作指导手册.pdf", } }, methods: { goto() { - window.open(this.url) + var gotoURL = this.sjDoc; + if(this.$auth.hasRoleOr(["admin", "zjgly"])){ + gotoURL = this.zjDoc + } + window.open(gotoURL) } } } - \ No newline at end of file + diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 6909ec76..04c392a1 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -1,26 +1,27 @@