diff --git a/src/api/business/import.js b/src/api/business/import.js
index 3124286..399d9e4 100644
--- a/src/api/business/import.js
+++ b/src/api/business/import.js
@@ -60,3 +60,29 @@ export function printImport(query) {
params: query
})
}
+
+// 开始导入任务
+export function startImport(id) {
+ return request({
+ url: '/business/import/start/' + id,
+ method: 'post',
+ })
+}
+
+// 导入任务日志
+export function importLog(id, offset) {
+ return request({
+ url: '/business/import/log/' + id,
+ method: 'get',
+ params: {offset}
+ })
+}
+
+// 下载导入任务日志
+export function downloadLog(id) {
+ return request({
+ url: '/business/import/downloadLog/' + id,
+ method: 'get',
+ responseType: 'blob',
+ })
+}
diff --git a/src/assets/images/app/location.png b/src/assets/images/app/location.png
new file mode 100644
index 0000000..7f69ef4
Binary files /dev/null and b/src/assets/images/app/location.png differ
diff --git a/src/components/house/MapField.vue b/src/components/gis/MapField.vue
similarity index 100%
rename from src/components/house/MapField.vue
rename to src/components/gis/MapField.vue
diff --git a/src/store/getters.js b/src/store/getters.js
index f42973b..5fed973 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -10,6 +10,7 @@ const getters = {
id: state => state.user.id,
name: state => state.user.name,
nickName: state => state.user.nickName,
+ user: state => state.user,
introduction: state => state.user.introduction,
roles: state => state.user.roles,
permissions: state => state.user.permissions,
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 2c7baeb..9b098fc 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -12,6 +12,7 @@ const user = {
name: '',
nickName: '',
avatar: '',
+ user: {},
roles: [],
permissions: [],
//获取登录页相关标题
@@ -42,13 +43,15 @@ const user = {
SET_AVATAR: (state, avatar) => {
state.avatar = avatar
},
+ SET_USER: (state, user) => {
+ state.user = user
+ },
SET_ROLES: (state, roles) => {
state.roles = roles
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
},
-
SET_STSTEMCONFIGlIST: (state, systemConfigList) => {
state.systemConfigList = systemConfigList
},
@@ -103,6 +106,7 @@ const user = {
commit('SET_NAME', user.userName)
commit('SET_NICK_NAME', user.nickName)
commit('SET_AVATAR', avatar)
+ commit('SET_USER', user)
/* 初始密码提示 */
if(res.isDefaultModifyPwd) {
MessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
diff --git a/src/utils/index.js b/src/utils/index.js
index 9375db7..8dd6b7d 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -388,3 +388,31 @@ export function isNumberStr(str) {
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
}
+export function save(name, src) {
+ let a = 0;
+ let url = null;
+ try
+ {
+ url = window.URL.createObjectURL(new Blob([src]))
+ a = document.createElement('a');
+ document.body.append(a);
+ a.style.display = 'none'
+ a.href = url;
+ a.setAttribute('download', name)
+ a.click();
+ return true;
+ }
+ catch(e)
+ {
+ console.error(e);
+ return false;
+ }
+ finally
+ {
+ if(a)
+ a.remove();
+ if(url)
+ window.URL.revokeObjectURL(url);
+ }
+}
+
diff --git a/src/views/app/detail.vue b/src/views/app/detail.vue
index e26f3d5..bab88b1 100644
--- a/src/views/app/detail.vue
+++ b/src/views/app/detail.vue
@@ -42,10 +42,10 @@
-
+
-
+
@@ -61,6 +61,8 @@
data() {
return {
value:'',
+ // 项目路径
+ baseRoutingUrll: '/api',//process.env.VUE_APP_BASE_API
form:{}
};
},
diff --git a/src/views/app/index.vue b/src/views/app/index.vue
index fe8b531..ec9f6ba 100644
--- a/src/views/app/index.vue
+++ b/src/views/app/index.vue
@@ -5,8 +5,8 @@
-
张晋升
-
常家围子村委会
+
{{ nickName }}
+
{{ deptName }}
@@ -14,7 +14,7 @@
-
+
通知
@@ -43,6 +43,8 @@
},
created() {
this.getMenuApp();
+ this.nickName = this.$store.getters.user.user.nickName;
+ this.deptName = this.$store.getters.user.user.dept.deptName;
},
methods: {
getMenuApp(){
diff --git a/src/views/app/list.vue b/src/views/app/list.vue
index 4ca28e4..2ec67cc 100644
--- a/src/views/app/list.vue
+++ b/src/views/app/list.vue
@@ -1,12 +1,6 @@
-
+
@@ -17,23 +11,11 @@
-
+
-
-
+
@@ -59,7 +40,6 @@
+
diff --git a/src/views/app/map.vue b/src/views/app/map.vue
index 76b83fb..d9b1e2b 100644
--- a/src/views/app/map.vue
+++ b/src/views/app/map.vue
@@ -13,182 +13,183 @@
搜索
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+

+
+
+
-
-
-
属性数据 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ dict.dictLabel }}
-
-
-
-
-
-
-
-
-
-
-
-
- 关闭弹窗
- 删除地块
- 保存信息
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -634,6 +619,25 @@
color: #000000;
}
}
+ .location{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 50px;
+ height: 50px;
+ margin: 2vh;
+ position: absolute;
+ top: 12vh;
+ right: 0vw;
+ z-index: 9;
+ background-color: rgba(0,0,0,0.5);
+ border-radius: 10px;
+ img{
+ width: 30px;
+ height: 30px;
+ border: 1px dashed #ffffff;
+ }
+ }
.van-popup{
background: linear-gradient( 180deg, #E5FFF4 0%, #ffffff 100%);
.landPopup{
@@ -860,4 +864,31 @@
width: 20vw;
}
}
+
+ #land-btn-wrap {
+ position: relative;
+ width: 40%;
+ left: 60%;
+ bottom: 95%;
+ z-index: 2000;
+ }
+
+ #landMapBox {
+ width: 100%;
+ height: 100%;
+ }
+ .ant-btn-red {
+ position: relative;
+ display: inline-block;
+ background: #D0EEFF;
+ border: 1px solid #99D3F5;
+ border-radius: 4px;
+ padding: 4px 12px;
+ overflow: hidden;
+ color: #1E88C7;
+ text-decoration: none;
+ text-indent: 0;
+ line-height: 20px;
+ right: -36%;
+ }
diff --git a/src/views/app/user.vue b/src/views/app/user.vue
index 208f60d..9dd9e02 100644
--- a/src/views/app/user.vue
+++ b/src/views/app/user.vue
@@ -7,8 +7,8 @@
-
张晋升
-
常家围子村委会
+
{{ nickName }}
+
{{ deptName }}
@@ -24,7 +24,7 @@

-
+
@@ -40,16 +40,23 @@
name: "appUser",
data() {
return {
-
+ nickName: null,
+ deptName: null
};
},
created() {
-
+ this.nickName = this.$store.getters.user.user.nickName;
+ this.deptName = this.$store.getters.user.user.dept.deptName;
},
methods: {
goBack(){
history.go(-1)
- }
+ },
+ logOut() {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/app/index'
+ })
+ },
},
};
diff --git a/src/views/business/import/index.vue b/src/views/business/import/index.vue
index 342eef4..2b4244d 100644
--- a/src/views/business/import/index.vue
+++ b/src/views/business/import/index.vue
@@ -105,7 +105,8 @@
查看
修改
- 执行
+ 执行
+ 日志
更多
@@ -134,7 +135,7 @@
是否更新已经存在的导入任务
- 1、仅允许导入xls、xlsx格式文件;
+ 1、仅允许导入zip格式文件;
2、覆盖导入:指先将所选区划当前在库数据删除,然后按新数据包解析导入;
3、增量导入:指按新数据包解析并追加导入;
下载模板
@@ -201,17 +202,37 @@
取 消
+
+
+
+
+
+
+
diff --git a/src/views/login.vue b/src/views/login.vue
index 27e0f07..57b6585 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -191,7 +191,7 @@ export default {
bottom: 0;
width: 100%;
text-align: center;
- color: #fff;
+ color: #000000;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
diff --git a/src/views/resource/land/index.vue b/src/views/resource/land/index.vue
index 3cfc725..a984ce2 100644
--- a/src/views/resource/land/index.vue
+++ b/src/views/resource/land/index.vue
@@ -226,7 +226,7 @@
-
+
@@ -332,18 +332,19 @@
-
-
-
+
+
+
+
@@ -357,14 +358,13 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css"
import "splitpanes/dist/splitpanes.css"
import { deptTreeSelect } from "@/api/system/user"
import {getConfigKey} from "@/api/system/config";
-import {getDept,getInfoByImportCode} from "@/api/system/dept";
-import MapField from "@/components/house/MapField";
+import {getDept, getInfoByImportCode} from "@/api/system/dept";
import $ from "jquery";
export default {
name: "Land",
dicts: ['ownership_type', 'land_use_type', 'survey_status', 'is_common', 'land_grade_type', 'land_type', 'land_use'],
- components: { Treeselect, Splitpanes, Pane,MapField },
+ components: { Treeselect, Splitpanes, Pane },
data() {
return {
// 遮罩层
@@ -407,15 +407,13 @@ export default {
children: "children",
label: "label"
},
- // 遮罩按钮新增点击状态
- diglogStatus: true,
- //地图
+ //地图参数
openMap: false,
mapTheGeomId: null,
mapTheGeom: null,
drawInsert:null,
- tGeoOrganizationLng: null,
- tGeoOrganizationLat: null,
+ jingdu: null,
+ weidu: null,
// 查询参数
queryParams: {
pageNum: 1,
@@ -447,7 +445,6 @@ export default {
scmjm: [
{ required: true, message: "实测面积不能为空", trigger: "blur" }
],
-
},
// EXCEL导入
upload: {
@@ -464,7 +461,6 @@ export default {
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/resource/land/importData"
},
-
}
},
watch: {
@@ -476,6 +472,7 @@ export default {
created() {
this.getDeptTree()
this.getList()
+
// 获取geoserver的地址
this.getGeoServerUrl();
// 获取地块图层名称
@@ -500,7 +497,7 @@ export default {
this.open = false
this.reset()
},
- // 取消按钮
+ // 取消地图按钮
cancelMap() {
this.openMap = false;
this.reset();
@@ -535,7 +532,6 @@ export default {
deptName: null,
sfzwd: '2'
}
- this.diglogStatus = true;
this.resetForm("form")
},
/** 搜索按钮操作 */
@@ -772,8 +768,8 @@ export default {
getDept(deptId).then(response => {
let insertCode = response.data;
if (insertCode != null) {
- this.tGeoOrganizationLat = insertCode.latitude;
- this.tGeoOrganizationLng = insertCode.longitude;
+ this.weidu = insertCode.latitude;
+ this.jingdu = insertCode.longitude;
}
});
},
@@ -783,8 +779,8 @@ export default {
getInfoByImportCode(row.importCode).then((res) => {
let insertCode = res.data;
if (insertCode != null) {
- this.tGeoOrganizationLat = insertCode.latitude;
- this.tGeoOrganizationLng = insertCode.longitude;
+ this.weidu = insertCode.latitude;
+ this.jingdu = insertCode.longitude;
}
const tableRow = { importCode: row.importCode };
listLandQuery(tableRow).then(response => {
@@ -798,43 +794,40 @@ export default {
},
/** 地图提交按钮 */
submitFormMap() {
- this.diglogStatus = false;
if(this.drawInsert !=null && this.drawInsert !=""){
this.mapTheGeomId.theGeom = JSON.stringify(this.drawInsert);
}else{
this.mapTheGeomId.theGeom = this.mapTheGeomId.theGeomText
}
- let sysGis = { tableName: 't_resource_land',priId: 'fid',id: this.mapTheGeomId.fid,theGeom: this.mapTheGeomId.theGeom };
+ let sysGis = { tableName: 't_resource_land', priId: 'fid', id: this.mapTheGeomId.fid, theGeom: this.mapTheGeomId.theGeom };
if (this.mapTheGeomId != null) {
areaSavePri(sysGis).then(response => {
this.$modal.msgSuccess("修改成功");
this.openMap = false;
- this.getList();
- this.diglogStatus = true;
+ //this.getList();
});
}
},
/** 清除坐标点图层 */
clearMapLayer() {
- let sysGis = { tableName: 't_resource_land',priId: 'fid',id: this.mapTheGeomId.fid};
+ let sysGis = { tableName: 't_resource_land', priId: 'fid', id: this.mapTheGeomId.fid};
cleanSavePri(sysGis).then(response => {
this.$modal.msgSuccess("清除成功");
this.openMap = false;
- this.getList();
+ //this.getList();
});
},
pointDarw(resourceList) {
//加载地图编辑
var that = this;
var map;
- //var hc_land;
- var draw; // global so we can remove it later
+ var draw;
var vector_drawing;
var startDarw =false;
var openDarw = false;
this.mapTheGeomId = resourceList.find((land) => {
//model就是上面的数据源
- return land.fid === this.mapTheGeomId.fid; //筛选出匹配数据
+ return land.fid === this.mapTheGeomId.fid;
});
if (this.mapTheGeomId.theGeom != null && this.mapTheGeomId.theGeom != ""
&& this.mapTheGeomId.theGeom != undefined) {
@@ -844,9 +837,10 @@ export default {
startDarw = false;
openDarw = true;
}
+
if (startDarw) {
document.getElementById("mapWrap").innerHTML = '';
- var hc_land;
+ var thePolygon;
var draw; // global so we can remove it later
var vector_drawing;
var projection = new ol.proj.Projection({
@@ -855,7 +849,6 @@ export default {
units: "degrees",
//extent:extent
});
-
var aerial = new ol.layer.Tile({
source: new ol.source.XYZ({
url: "http://t0.tianditu.gov.cn/img_w/wmts?" +
@@ -865,7 +858,6 @@ export default {
isGroup: true,
name: "卫星影像图",
});
-
var yingxzi = new ol.layer.Tile({
source: new ol.source.XYZ({
url: "https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067",
@@ -882,8 +874,8 @@ export default {
view: new ol.View({
//center: ol.proj.fromLonLat([115.452752, 31.789033]),
zoom: 17.8,
- minZoom: 0, //地图缩小限制
- maxZoom: 18.3, //地图放大限制
+ minZoom: 0,
+ maxZoom: 18.3,
}),
});
// 添加村边界
@@ -899,7 +891,6 @@ export default {
name: 'villageBorderLayer'
});
map.addLayer(mapBorder);
-
// 添加已经存在的资源图层
let vectorSource = new ol.source.Vector();
for (let resource of resourceList) {
@@ -911,7 +902,6 @@ export default {
vectorSource.addFeature(feature);
}
}
-
let resourceLayer = new ol.layer.Vector({
source: vectorSource,
style: (feature, resolution) => {
@@ -929,8 +919,8 @@ export default {
}
});
map.addLayer(resourceLayer);
- //图层查询定位开始 ---------start
- hc_land = new ol.layer.Vector({
+ //当前图层查询定位
+ thePolygon = new ol.layer.Vector({
title: "add Layer",
source: new ol.source.Vector({
projection: projection,
@@ -950,24 +940,21 @@ export default {
}),
}),
});
- map.addLayer(hc_land);
- var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
+ map.addLayer(thePolygon);
+ var maxXMap = thePolygon.values_.source.featuresRtree_.rbush_.data.maxX;
+ var maxYMap = thePolygon.values_.source.featuresRtree_.rbush_.data.maxY;
+ var minXMap = thePolygon.values_.source.featuresRtree_.rbush_.data.minX;
+ var minYMap = thePolygon.values_.source.featuresRtree_.rbush_.data.minY;
+ var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]);
map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 17.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
+ center: center,
+ zoom: 17.8,
+ rotation: undefined,
+ duration: 1000,
});
- //图层查询定位结束 ---------end
//开始绘制地图
$("#drawPolygon").off("click").on("click", function () {
- map.removeLayer(hc_land);
+ map.removeLayer(thePolygon);
map.removeLayer(vector_drawing);
that.drawInsert = null;
//var source = new ol.source.Vector({wrapX: false});
@@ -975,7 +962,6 @@ export default {
source: new ol.source.Vector(),
});
map.addLayer(vector_drawing);
-
function addInteraction() {
draw = new ol.interaction.Draw({
source: vector_drawing.getSource(),
@@ -990,12 +976,11 @@ export default {
});
map.addInteraction(draw);
}
-
addInteraction();
});
//清除画图鼠标点击事件
$("#drawRemove").off("click").on("click", function () {
- //map.addLayer(hc_land);
+ //map.addLayer(thePolygon);
map.removeInteraction(draw);
//map.removeLayer(vector_drawing);
});
@@ -1003,10 +988,11 @@ export default {
$("#drawReset").off("click").on("click", function () {
map.removeInteraction(draw);
map.removeLayer(vector_drawing);
- map.addLayer(hc_land);
+ map.addLayer(thePolygon);
that.drawInsert = null;
});
}
+
if (openDarw) {
document.getElementById("mapWrap").innerHTML = '';
var projection = new ol.proj.Projection({
@@ -1015,7 +1001,6 @@ export default {
units: "degrees",
//extent:extent
});
-
var aerial = new ol.layer.Tile({
source: new ol.source.XYZ({
url: "http://t0.tianditu.gov.cn/img_w/wmts?" +
@@ -1035,9 +1020,8 @@ export default {
});
//获取坐标是否存在
var Zb;
- if (this.tGeoOrganizationLng != null && this.tGeoOrganizationLat != null && this.tGeoOrganizationLng !=""
- && this.tGeoOrganizationLat !="" && this.tGeoOrganizationLng !=undefined && this.tGeoOrganizationLat !=undefined) {
- Zb = [this.tGeoOrganizationLng, this.tGeoOrganizationLat]
+ if (this.jingdu != null && this.jingdu !="") {
+ Zb = [this.jingdu, this.weidu]
} else {
Zb = [115.452752, 31.789033];
}
@@ -1069,7 +1053,6 @@ export default {
name: 'villageBorderLayer'
});
map.addLayer(mapBorder);
-
// 添加已经存在的资源图层
let vectorSource = new ol.source.Vector();
for (let resource of resourceList) {
@@ -1081,7 +1064,6 @@ export default {
vectorSource.addFeature(feature);
}
}
-
let resourceLayer = new ol.layer.Vector({
source: vectorSource,
style: (feature, resolution) => {
@@ -1100,10 +1082,9 @@ export default {
});
map.addLayer(resourceLayer);
- //图层查询定位结束 ---------end
//开始绘制地图
$("#drawPolygon").off("click").on("click", function () {
- //map.removeLayer(hc_land);
+ //map.removeLayer(thePolygon);
map.removeLayer(vector_drawing);
that.drawInsert = null;
map.removeInteraction(draw);
@@ -1130,20 +1111,21 @@ export default {
});
map.addInteraction(draw);
}
-
addInteraction();
});
+
//清除画图鼠标点击事件
$("#drawRemove").off("click").on("click", function () {
- //map.addLayer(hc_land);
+ //map.addLayer(thePolygon);
map.removeInteraction(draw);
//map.removeLayer(vector_drawing);
});
+
//还原之前图层
$("#drawReset").off("click").on("click", function () {
map.removeInteraction(draw);
map.removeLayer(vector_drawing);
- //map.addLayer(hc_land);
+ //map.addLayer(thePolygon);
that.drawInsert = null;
});
}
@@ -1156,6 +1138,7 @@ export default {
height: 75vh;
overflow-y: scroll;
}
+
#land-btn-wrap {
position: relative;
width: 40%;
@@ -1163,7 +1146,6 @@ export default {
bottom: 95%;
z-index: 2000;
}
-
#mapWrap {
width: 100%;
height: 100%;
diff --git a/vue.config.js b/vue.config.js
index 0824733..1203326 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -10,7 +10,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE
//const baseUrl = 'http://localhost:8080' // 后端接口
-const baseUrl = 'http://192.168.0.109:8080' // 后端接口 zzl
+const baseUrl = 'http://192.168.0.106:8080' // 后端接口 zzl
const port = process.env.port || process.env.npm_config_port || 80 // 端口