diff --git a/package.json b/package.json index f816f50..72f160e 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "9.18.5", + "jquery": "^3.7.1", "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", diff --git a/rongxin.dashboard.iml b/rongxin.dashboard.iml new file mode 100644 index 0000000..8021953 --- /dev/null +++ b/rongxin.dashboard.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/api/business/cjqy.js b/src/api/business/cjqy.js new file mode 100644 index 0000000..04f5811 --- /dev/null +++ b/src/api/business/cjqy.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询村级区域列表 +export function listCjqy(query) { + return request({ + url: '/business/cjqy/list', + method: 'get', + params: query + }) +} + +// 查询村级区域详细 +export function getCjqy(fid) { + return request({ + url: '/business/cjqy/' + fid, + method: 'get' + }) +} + +// 查询村级区域详细 +export function getCjqyDetail(fid) { + return request({ + url: '/business/cjqy/detail/' + fid, + method: 'get' + }) +} + + +// 新增村级区域 +export function addCjqy(data) { + return request({ + url: '/business/cjqy/add', + method: 'post', + data: data + }) +} + +// 修改村级区域 +export function updateCjqy(data) { + return request({ + url: '/business/cjqy/update', + method: 'post', + data: data + }) +} + +// 删除村级区域 +export function delCjqy(fid) { + return request({ + url: '/business/cjqy/delete/' + fid, + method: 'get' + }) +} + +// 打印村级区域 +export function printCjqy(query) { + return request({ + url: '/business/cjqy/print', + method: 'get', + params: query + }) +} diff --git a/src/api/business/export.js b/src/api/business/export.js new file mode 100644 index 0000000..e25f8ce --- /dev/null +++ b/src/api/business/export.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询导出任务列表 +export function listExport(query) { + return request({ + url: '/business/export/list', + method: 'get', + params: query + }) +} + +// 查询导出任务详细 +export function getExport(id) { + return request({ + url: '/business/export/' + id, + method: 'get' + }) +} + +// 查询导出任务详细 +export function getExportDetail(id) { + return request({ + url: '/business/export/detail/' + id, + method: 'get' + }) +} + + +// 新增导出任务 +export function addExport(data) { + return request({ + url: '/business/export/add', + method: 'post', + data: data + }) +} + +// 修改导出任务 +export function updateExport(data) { + return request({ + url: '/business/export/update', + method: 'post', + data: data + }) +} + +// 删除导出任务 +export function delExport(id) { + return request({ + url: '/business/export/delete/' + id, + method: 'get' + }) +} + +// 打印导出任务 +export function printExport(query) { + return request({ + url: '/business/export/print', + method: 'get', + params: query + }) +} diff --git a/src/api/business/import.js b/src/api/business/import.js new file mode 100644 index 0000000..3124286 --- /dev/null +++ b/src/api/business/import.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询导入任务列表 +export function listImport(query) { + return request({ + url: '/business/import/list', + method: 'get', + params: query + }) +} + +// 查询导入任务详细 +export function getImport(id) { + return request({ + url: '/business/import/' + id, + method: 'get' + }) +} + +// 查询导入任务详细 +export function getImportDetail(id) { + return request({ + url: '/business/import/detail/' + id, + method: 'get' + }) +} + + +// 新增导入任务 +export function addImport(data) { + return request({ + url: '/business/import/add', + method: 'post', + data: data + }) +} + +// 修改导入任务 +export function updateImport(data) { + return request({ + url: '/business/import/update', + method: 'post', + data: data + }) +} + +// 删除导入任务 +export function delImport(id) { + return request({ + url: '/business/import/delete/' + id, + method: 'get' + }) +} + +// 打印导入任务 +export function printImport(query) { + return request({ + url: '/business/import/print', + method: 'get', + params: query + }) +} diff --git a/src/api/business/xjqy.js b/src/api/business/xjqy.js new file mode 100644 index 0000000..5a5237d --- /dev/null +++ b/src/api/business/xjqy.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询乡级区域列表 +export function listXjqy(query) { + return request({ + url: '/business/xjqy/list', + method: 'get', + params: query + }) +} + +// 查询乡级区域详细 +export function getXjqy(fid) { + return request({ + url: '/business/xjqy/' + fid, + method: 'get' + }) +} + +// 查询乡级区域详细 +export function getXjqyDetail(fid) { + return request({ + url: '/business/xjqy/detail/' + fid, + method: 'get' + }) +} + + +// 新增乡级区域 +export function addXjqy(data) { + return request({ + url: '/business/xjqy/add', + method: 'post', + data: data + }) +} + +// 修改乡级区域 +export function updateXjqy(data) { + return request({ + url: '/business/xjqy/update', + method: 'post', + data: data + }) +} + +// 删除乡级区域 +export function delXjqy(fid) { + return request({ + url: '/business/xjqy/delete/' + fid, + method: 'get' + }) +} + +// 打印乡级区域 +export function printXjqy(query) { + return request({ + url: '/business/xjqy/print', + method: 'get', + params: query + }) +} diff --git a/src/api/business/xjxzq.js b/src/api/business/xjxzq.js new file mode 100644 index 0000000..7abcb44 --- /dev/null +++ b/src/api/business/xjxzq.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询县级区域列表 +export function listXjxzq(query) { + return request({ + url: '/business/xjxzq/list', + method: 'get', + params: query + }) +} + +// 查询县级区域详细 +export function getXjxzq(fid) { + return request({ + url: '/business/xjxzq/' + fid, + method: 'get' + }) +} + +// 查询县级区域详细 +export function getXjxzqDetail(fid) { + return request({ + url: '/business/xjxzq/detail/' + fid, + method: 'get' + }) +} + + +// 新增县级区域 +export function addXjxzq(data) { + return request({ + url: '/business/xjxzq/add', + method: 'post', + data: data + }) +} + +// 修改县级区域 +export function updateXjxzq(data) { + return request({ + url: '/business/xjxzq/update', + method: 'post', + data: data + }) +} + +// 删除县级区域 +export function delXjxzq(fid) { + return request({ + url: '/business/xjxzq/delete/' + fid, + method: 'get' + }) +} + +// 打印县级区域 +export function printXjxzq(query) { + return request({ + url: '/business/xjxzq/print', + method: 'get', + params: query + }) +} diff --git a/src/api/resource/land.js b/src/api/resource/land.js new file mode 100644 index 0000000..25a17d3 --- /dev/null +++ b/src/api/resource/land.js @@ -0,0 +1,70 @@ +import request from '@/utils/request' + +// 查询地块属性列表 +export function listLand(query) { + return request({ + url: '/resource/land/list', + method: 'get', + params: query + }) +} + +// 查询地块属性详细 +export function getLand(fid) { + return request({ + url: '/resource/land/' + fid, + method: 'get' + }) +} + +// 查询地块属性详细 +export function getLandDetail(fid) { + return request({ + url: '/resource/land/detail/' + fid, + method: 'get' + }) +} + +// 查询地块经营详细 +export function getLandDetailByDkbm(dkbm) { + return request({ + url: '/resource/land/detailByDkbm/' + dkbm, + method: 'get' + }) +} + + +// 新增地块属性 +export function addLand(data) { + return request({ + url: '/resource/land/add', + method: 'post', + data: data + }) +} + +// 修改地块属性 +export function updateLand(data) { + return request({ + url: '/resource/land/update', + method: 'post', + data: data + }) +} + +// 删除地块属性 +export function delLand(fid) { + return request({ + url: '/resource/land/delete/' + fid, + method: 'get' + }) +} + +// 打印地块属性 +export function printLand(query) { + return request({ + url: '/resource/land/print', + method: 'get', + params: query + }) +} diff --git a/src/api/resource/operation.js b/src/api/resource/operation.js new file mode 100644 index 0000000..55dca02 --- /dev/null +++ b/src/api/resource/operation.js @@ -0,0 +1,70 @@ +import request from '@/utils/request' + +// 查询地块经营列表 +export function listOperation(query) { + return request({ + url: '/resource/operation/list', + method: 'get', + params: query + }) +} + +// 查询地块经营详细 +export function getOperation(id) { + return request({ + url: '/resource/operation/' + id, + method: 'get' + }) +} + +// 查询地块经营详细 +export function getOperationDetail(id) { + return request({ + url: '/resource/operation/detail/' + id, + method: 'get' + }) +} + +// 查询地块经营详细 +export function getOperationDetailByDkbm(dkbm) { + return request({ + url: '/resource/operation/detailByDkbm/' + dkbm, + method: 'get' + }) +} + + +// 新增地块经营 +export function addOperation(data) { + return request({ + url: '/resource/operation/add', + method: 'post', + data: data + }) +} + +// 修改地块经营 +export function updateOperation(data) { + return request({ + url: '/resource/operation/update', + method: 'post', + data: data + }) +} + +// 删除地块经营 +export function delOperation(id) { + return request({ + url: '/resource/operation/delete/' + id, + method: 'get' + }) +} + +// 打印地块经营 +export function printOperation(query) { + return request({ + url: '/resource/operation/print', + method: 'get', + params: query + }) +} diff --git a/src/api/system/menuapp.js b/src/api/system/menuapp.js index 57073bc..145ffe3 100644 --- a/src/api/system/menuapp.js +++ b/src/api/system/menuapp.js @@ -17,11 +17,19 @@ export function getMenuapp(id) { }) } +// 查询手机菜单详细 +export function getMenuappDetail(id) { + return request({ + url: '/system/menuapp/detail/' + id, + method: 'get' + }) +} + // 新增手机菜单 export function addMenuapp(data) { return request({ - url: '/system/menuapp', + url: '/system/menuapp/add', method: 'post', data: data }) @@ -30,8 +38,8 @@ export function addMenuapp(data) { // 修改手机菜单 export function updateMenuapp(data) { return request({ - url: '/system/menuapp', - method: 'put', + url: '/system/menuapp/update', + method: 'post', data: data }) } @@ -39,8 +47,8 @@ export function updateMenuapp(data) { // 删除手机菜单 export function delMenuapp(id) { return request({ - url: '/system/menuapp/' + id, - method: 'delete' + url: '/system/menuapp/delete/' + id, + method: 'get' }) } diff --git a/src/assets/images/dataScreen/plotPremises/mark.png b/src/assets/images/dataScreen/plotPremises/mark.png new file mode 100644 index 0000000..f5f29b0 Binary files /dev/null and b/src/assets/images/dataScreen/plotPremises/mark.png differ diff --git a/src/assets/images/login-background.jpg b/src/assets/images/login-background.jpg index 8a89eb8..6ae5e6d 100644 Binary files a/src/assets/images/login-background.jpg and b/src/assets/images/login-background.jpg differ diff --git a/src/assets/images/pay.png b/src/assets/images/pay.png deleted file mode 100644 index bb8b967..0000000 Binary files a/src/assets/images/pay.png and /dev/null differ diff --git a/src/assets/images/profile.jpg b/src/assets/images/profile.jpg index b3a940b..3df4a1d 100644 Binary files a/src/assets/images/profile.jpg and b/src/assets/images/profile.jpg differ diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 5b424b5..a2b6295 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -20,10 +20,9 @@ 选取文件
- 请上传 - - - 的文件 + + +
diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index b9940a5..9104654 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -24,10 +24,8 @@
- 请上传 - - - 的文件 + +
diff --git a/src/components/house/MapField.vue b/src/components/house/MapField.vue new file mode 100644 index 0000000..e531168 --- /dev/null +++ b/src/components/house/MapField.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/src/utils/ol_map.js b/src/utils/ol_map.js new file mode 100644 index 0000000..b93efd4 --- /dev/null +++ b/src/utils/ol_map.js @@ -0,0 +1,727 @@ + +const MAP_FIELD_DRAW_LAYER_NAME = '_Draw_layer'; +const MAP_FIELD_INIT_LAYER_NAME = '_Init_layer'; + +export const olMap = function(selector) { + this.selector = selector; + this.mapObject = null; + this.minMapZoom = 16; + this.maxMapZoom = 18; + this.allowDraw = false; + this.allowSelect = false; + this.allowMark = false; + this.coord = [115.452752, 31.789033]; + this.isInited = false; + this.error = null; + this.userLayers = []; + this.callback = { + 'draw::start': [], + 'draw::end': [], + 'draw::remove': [], + 'draw::reset': [], + 'interactive::select': [], + 'mark::start': [], + 'mark::end': [], + 'mark::reset': [], + }; + // 当前支持的配置和默认值, 支持.拼接的字符串作为键(只能一级) + const SUPPORT_CONFIG = { + style: { + fill: { + color: 'rgba(204, 255, 204, 0.3)', // 多边形填充颜色 + 'color::SELECTED': "rgb(204, 255, 255, 0.5)", // 选择模式下选中时的多边形填充颜色 + }, + stroke: { + color: '#47c68f', // 线颜色 + width: 3, // 线宽 + 'color::SELECTED': '#00FFFF', // 选择模式下选中时的线颜色 + 'width::SELECTED': 8, // 选择模式下选中时的线宽 + }, + text: { + font: 'normal 12px 微软雅黑', // 字体 + fill: { + color: '#FF0000', // 文字颜色 + } + } + } + }; + this.drawResult = null; + this.draw = null; + this.currentSelect = null; + this.markResult = null; + + this.__ASSERT = function(cond, msg) { + if(!cond) + this.__SetError(msg || '错误'); + return !!cond; + }; + // 设置回调 + this.SetCallback = function(type, func) { + if(!func || !this.callback.hasOwnProperty(type)) + return false; + let arr = this.callback[type]; + if(arr.includes(func)) + return false; + arr.push(func); + return func; + }; + // 移除回调, 函数为空则移除该回调类型下的所有函数 + this.RemoveCallback = function(type, func = null) { + if(!this.callback.hasOwnProperty(type)) + return false; + if(func) + { + let arr = this.callback[type]; + let index = arr.indexOf(func); + if(index >= 0) + { + arr.splice(index, 1); + return true; + } + return false; + } + else + { + this.callback[type] = []; + return true; + } + }; + // 清空全部回调 + this.ClearCallback = function() { + for(let k in this.callback) + this.callback[k] = []; + }; + // private 调用回调 + this.__Callback = function(type/*, 其他参数 */) { + let args = []; + for(let i = 1; i < arguments.length; i++) + args.push(arguments[i]); + this.callback[type].forEach((x) => x(...args)); + }; + // private 请求必须初始化, 未初始化则错误 + this.__RequireInited = function() { + return this.__ASSERT(this.IsInited(), '地图未初始化'); + }; + // private 设置当前错误, 并抛出错误 + this.__SetError = function(err) { + this.error = err; + if(this.error) + { + console.error(err); + throw this.error; + } + }; + // 是否完成初始化 + this.IsInited = function() { + return this.mapObject !== null; + }; + // 初始化, 如果已初始化则错误 + this.Init = function() { + this.__ASSERT(!this.IsInited(), '已经初始化'); + this.__CreateMap(this.selector); + this.isInited = true; + }; + // 销毁地图对象, 如果未初始化则返回 + this.DestroyMap = function() { + if(!this.IsInited()) + return; + this.ClearCallback(); + this.userLayers = []; + //delete this.mapObject; + document.querySelector('#' + this.selector).innerHTML = ''; + this.mapObject = null; + }; + // private 创建地图元素, 已初始化则错误, 元素ID未指定则错误 + this.__CreateMap = function() { + this.__ASSERT(!this.IsInited(), '已经初始化'); + this.__ASSERT(this.selector, '元素ID缺失'); + + let projection = new ol.proj.Projection({ + //地图投影类型 + code: "EPSG:3857", + units: "degrees", + //extent:extent + }); + let aerial = new ol.layer.Tile({ + source: new ol.source.XYZ({ + url: "http://t0.tianditu.gov.cn/img_w/wmts?" + + "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" + + "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067", + }), + isGroup: true, + name: "卫星影像图", + }); + + let 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", + }), + isGroup: true, + name: "天地图文字标注--卫星影像图", + }); + + //加载地图 + let map = new ol.Map({ + // interactions: ol.interaction.DragPan({ + // onFocusOnly: false + // }), + controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮 + layers: [aerial, yingxzi], + projection: projection, + target: this.selector, + logo: 'false', + view: new ol.View({ + center: ol.proj.fromLonLat(this.coord), + //zoom: false, + zoom: 17.9, + minZoom: this.minMapZoom, //地图缩小限制 + maxZoom: this.maxMapZoom, //地图放大限制 + }), + }); + + this.mapObject = map; + //console.log(map, map.getProperties()); + }; + // 获取配置值 + this.__GetConfig = function(config, name, defVal) { + if(!config || typeof(config) !== 'object') + return defVal; + if(config.hasOwnProperty(name)) + return config[name]; + let arr = name.split('.'); + let ptr = config; + for(let i in arr) + { + ptr = ptr[arr[i]]; + //console.log(arr[i], JSON.stringify(ptr)); + if(!ptr) + break; + } + //console.log(`__GetConfig(${name}) -> ${ptr}`); + if(ptr === undefined || ptr === null || ptr === '') + return defVal; + return ptr; + }; + // 获取默认配置值 + this.GetDefaultConfig = function(name) { + let arr = name.split('.'); + let ptr = SUPPORT_CONFIG; + for(let i in arr) + { + ptr = ptr[arr[i]]; + if(!ptr) + break; + } + return ptr; + }; + // 设置当前坐标点 + this.SetCoord = function(lng, lat) { + this.__RequireInited(); + this.mapObject.getView().setCenter(ol.proj.fromLonLat([lng, lat])); + //console.log('SetCoord', lng, lat,this.mapObject); + return true; + }; + // 获取地图投影对象 + this.GetProjection = function() { + this.__RequireInited(); + return this.mapObject.get('view').getProjection(); + }; + // 检查名称是否存在 + this.ExistsName = function(name) { + if(this.userLayers.length === 0) + return false; + let res = this.userLayers.findIndex((x) => { + return x.name === name; + }); + return res !== -1; + }; + // private 检查名称是否存在, 存在则错误 + this.__CheckNameExists = function(name) { + return this.__ASSERT(!this.ExistsName(name), `标识重复: ${name}`); + }; + // private 放入图层, 名称存在则错误 + this.__PushLayer = function(name, layer, title = null, data = null, config = null) { + this.__RequireInited(); + this.__CheckNameExists(name); + this.mapObject.addLayer(layer); + //console.log(name, layer); + this.userLayers.push({ + name: name, + layer: layer, + visible: true, + title: title, + data: data, + config: config, + }); + return true; + }; + // 根据索引获取图层, 索引可为负数, 索引无效则错误 + this.GetLayer = function(index) { + if(this.userLayers.length === 0) + return null; + let i = index < 0 ? this.userLayers.length + index : index; + this.__ASSERT(i >= 0 && i < this.userLayers.length, `无效索引: ${index}`); + return this.userLayers[i]; + }; + // 根据名称查找图层, 名称不存在返回null + this.FindLayer = function(name) { + if(this.userLayers.length === 0) + return null; + return this.userLayers.find((x) => x.name === name); + }; + // private 搜索图层, 索引/名称, orFail为真, 则未找到时错误 + this.__SearchLayer = function(name, orFail = false) { + let layer = null; + let index = -1; + if(typeof(name) === 'number') + { + let i = name < 0 ? this.userLayers.length + name : name; + if(i >= 0 && i < this.userLayers.length) + { + layer = this.userLayers[i]; + index = i; + } + } + else + { + let i = this.userLayers.findIndex((x) => x.name === name); + if(i >= 0) + { + layer = this.userLayers[i]; + index = i; + } + } + if(orFail && index === -1) + this.__SetError(`未找到图层: ${name}(${typeof(name)})`); + return [layer, index]; + }; + // 带出图层数据 索引/名称, 未找到则返回null, 找到会移除图层数据, 但不会从地图移除图层 + this.__TakeLayer = function(name) { + if(this.userLayers.length === 0) + return null; + let [layer, index] = this.__SearchLayer(name); + if(index !== -1) + this.userLayers.splice(index, 1); + return layer; + }; + // 移除图层, 如果不指定name, 则移除最后一个 + this.PopLayer = function(name = null) { + this.__RequireInited(); + //console.log("pop", name, typeof(name)); + if(name === null) + name = -1; + let layer = this.__TakeLayer(name); + if(layer) + this.mapObject.removeLayer(layer.layer); + return layer !== null; + }; + // 设置图层显隐 + this.SetLayerVisible = function(name, on) { + this.__RequireInited(); + let [layer, ] = this.__SearchLayer(name, true); + layer.visible = true; + layer.layer.setVisible(on); + return true; + }; + // 隐藏图层 + this.HideLayer = function(name) { + return this.SetLayerVisible(name, false); + }; + // 显示图层 + this.ShowLayer = function(name) { + return this.SetLayerVisible(name, true); + }; + // 开始绘制 + this.StartDraw = function() { + this.__RequireInited(); + this.__ASSERT(this.allowDraw, '未开启绘制'); + this.drawResult = null; + this.__Callback('draw::start'); + + this.PopLayer(MAP_FIELD_DRAW_LAYER_NAME); + this.mapObject.removeInteraction(this.draw); + let drawLayer = new ol.layer.Vector({ + source: new ol.source.Vector(), + }); + + this.__PushLayer(MAP_FIELD_DRAW_LAYER_NAME, drawLayer); + this.draw = new ol.interaction.Draw({ + source: drawLayer.getSource(), + type: "Polygon" + }); + let self = this; + this.draw.on('drawend', function (evt) { + self.mapObject.removeInteraction(self.draw); + let feature = evt.feature; + let geometry = feature.getGeometry(); + let coordinate = geometry.getCoordinates(); + self.drawResult = coordinate; + self.__Callback('draw::end', self.drawResult); + }); + this.mapObject.addInteraction(this.draw); + //console.log("drawPolygon"); + }; + // 移除绘制 + this.ClearDraw = function() { + this.__RequireInited(); + this.__ASSERT(this.draw, '没有开始绘制'); + this.mapObject.removeInteraction(this.draw); + this.PopLayer(MAP_FIELD_DRAW_LAYER_NAME); + this.draw = null; + this.drawResult = null; + this.__Callback('draw::remove'); + this.__Callback('draw::end', ''); + }; + // 重置绘制 + this.ResetDraw = function() { + this.ClearDraw(); + this.StartDraw(); + this.__Callback('draw::reset'); + }; + // 设置是否启用绘制 + this.SetAllowDraw = function(on) { + this.__RequireInited(); + if(this.allowDraw == on) + return; + this.allowDraw = on; + this.RemoveDrawLayer(); + }; + this.RemoveDrawLayer = function() { + this.__RequireInited(); + if(this.draw) + { + this.ClearDraw(); + this.draw = null; + } + this.PopLayer(MAP_FIELD_DRAW_LAYER_NAME); + this.drawResult = null; + this.markResult = null; + }; + // 更新视图 + this.Update = function() { + this.__RequireInited(); + this.mapObject.updateSize(); + }; + // 新增/替换图层 + this.SetLayer = function(name, theGeom, title = null, data = null, config = null) { + this.__RequireInited(); + this.PopLayer(name); + this.AddLayer(name, theGeom, title, data, config); + }; + // 新增图层(name不可存在) + this.AddLayer = function(name, theGeom, title = null, data = null, config = null) { + //console.log("pop", name, theGeom); + if(!theGeom) + return false; + this.__RequireInited(); + this.__CheckNameExists(name); + if(typeof(theGeom) !== 'object') + theGeom = JSON.parse(theGeom); + let features = { + type: 'Feature', + geometry: theGeom, + properties: { + name: name, + title: title, + data: data, + }, + }; + //地图只加载一次 + //加载地图编辑 + //图层查询定位开始 ---------start + let hc_land = new ol.layer.Vector({ + title: name, + source: new ol.source.Vector({ + projection: this.GetProjection(), + features: new ol.format.GeoJSON().readFeatures(JSON.stringify(features)), + }), + style: new ol.style.Style({ + fill: new ol.style.Fill({ + //矢量图层填充颜色,以及透明度 + color: this.__GetConfig(config, 'style.fill.color', "rgba(204, 255, 204, 0.3)"), + }), + stroke: new ol.style.Stroke({ + //边界样式 + color: this.__GetConfig(config, 'style.stroke.color', "#47c68f"), + width: this.__GetConfig(config, 'style.stroke.width', 3), + }), + //矢量标注样式设置函数,设置image为图标ol.style.Icon + text: new ol.style.Text({ + textAlign: "center", //位置 + textBaseline: "middle", //基准线 + font: this.__GetConfig(config, 'style.text.font', "normal 12px 微软雅黑"), //文字样式 + text: title, //文本内容 + fill: new ol.style.Fill({ + //文本填充样式(即文字颜色) + color: this.__GetConfig(config, 'style.text.fill.color', "#FF0000"), + }), + }), + }), + }); + if(!this.__PushLayer(name, hc_land, title, data, config)) + return false; + let maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX; + let maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY; + let minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX; + let minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY; + //定位查询位置 + let center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 + this.mapObject.getView().animate({ + // 只设置需要的属性即可 + center: center, // 中心点 + zoom: 17.9, // 缩放级别 + rotation: undefined, // 缩放完成view视图旋转弧度 + duration: 1000, // 缩放持续时间,默认不需要设置 + }); + return true; + }; + // 新增图层列表 + this.AddLayers = function(list /* name, theGeom, title = null, data = null, config = null */) { + if(!list.length) + return; + this.__RequireInited(); + for(let i in list) + { + let {name, theGeom, title, data, config} = list[i]; + this.AddLayer(name, theGeom, title, data, config); + } + }; + // 清除所有用户图层 + this.Clear = function() { + this.__RequireInited(); + for(let i in this.userLayers) + this.PopLayer(name); + this.userLayers = []; + }; + // 设置图层列表 + this.SetLayers = function(list /* name, theGeom, title = null, data = null, config = null */) { + this.Clear(); + this.AddLayers(list); + }; + this.SetAllowSelect = function(on) { + this.__RequireInited(); + if(this.allowSelect == on) + return; + this.allowSelect = on; + this.ClearSelection(); + if(this.allowSelect) + { + let self = this; + this.mapObject.on("singleclick", function (evt) { + let feature = self.mapObject.forEachFeatureAtPixel( + evt.pixel, + (feature) => feature, + ); + self.SetSelection(feature ? feature.values_.name : null, true); + }); + } + else + { + this.mapObject.on("singleclick", null); + } + }; + this.ClearSelection = function() { + this.__RequireInited(); + if(this.currentSelect) + { + this.__ResetStyle(this.currentSelect); + this.currentSelect = null; + } + }; + this.SetSelection = function(name, callback = false) { + this.__RequireInited(); + if(name) + { + if(name !== this.currentSelect) + { + this.ClearSelection(); + this.__HighlightStyle(name); + } + else if(this.currentSelect) + { + name = null; + this.ClearSelection(); + } + } + else + { + if(this.currentSelect) + { + name = null; + this.ClearSelection(); + } + } + this.currentSelect = name; + if(callback) + this.__Callback('interactive::select', this.currentSelect); + }; + this.__ResetStyle = function(name) { + let ulayer = this.FindLayer(name); + let style = ulayer.layer.getStyle(); + style.setFill(new ol.style.Fill({ + //矢量图层填充颜色,以及透明度 + color: this.__GetConfig(ulayer.config, 'style.fill.color', "rgba(204, 255, 204, 0.3)"), + })); + style.setStroke(new ol.style.Stroke({ + //边界样式 + color: this.__GetConfig(ulayer.config, 'style.stroke.color', "#47c68f"), + width: this.__GetConfig(ulayer.config, 'style.stroke.width', 3), + })); + ulayer.layer.setStyle(style); + }; + this.__HighlightStyle = function(name) { + let ulayer = this.FindLayer(name); + //console.log(this.mapObject, ulayer, ulayer.layer.getStyle()); + let style = ulayer.layer.getStyle(); + style.setFill(new ol.style.Fill({ + //矢量图层填充颜色,以及透明度 + color: this.__GetConfig(ulayer.config, 'style.fill.color::SELECTED', "rgb(204, 255, 255, 0.5)"), + })); + style.setStroke(new ol.style.Stroke({ + //边界样式 + color: this.__GetConfig(ulayer.config, 'style.stroke.color::SELECTED', "#00FFFF"), + width: this.__GetConfig(ulayer.config, 'style.stroke.width::SELECTED', 8), + })); + ulayer.layer.setStyle(style); + }; + // 设置是否启用标记 + this.SetAllowMark = function(on) { + this.__RequireInited(); + if(this.allowMark == on) + return; + this.allowMark = on; + this.RemoveDrawLayer(); + }; + // 开始标记 + this.StartMark = function() { + this.__RequireInited(); + this.__ASSERT(this.allowMark, '未开启标记'); + this.markResult = null; + this.__Callback('mark::start'); + + this.PopLayer(MAP_FIELD_DRAW_LAYER_NAME); + let sourceMap = new ol.source.Vector({wrapX: false}); + let drawLayer = new ol.layer.Vector({ + source: sourceMap, + }); + + this.__PushLayer(MAP_FIELD_DRAW_LAYER_NAME, drawLayer); + this.draw = new ol.interaction.Draw({ + source: drawLayer.getSource(), + type: "Point" + }); + //this.draw.__sourceMap = sourceMap; + let self = this; + this.draw.on('drawend', function (evt) { + if(self.draw) + { + self.__ClearMark(); + self.StartMark(); + } + let feature = evt.feature; + let geometry = feature.getGeometry(); + let coordinate = geometry.getCoordinates(); + self.markResult = coordinate; + let newFeature = new ol.Feature({ + geometry: new ol.geom.Point(coordinate), //几何信息 + //name: "标注点", + }); + newFeature.setStyle(new ol.style.Style({ + image: new ol.style.Icon({ + //设置图标偏移 + anchor: [0.5, 1], + //标注样式的起点位置 + anchorOrigin: "top-right", + //X方向单位:分数 + anchorXUnits: "fraction", + //Y方向单位:像素 + anchorYUnits: "fraction", + //偏移起点位置的方向 + offsetOrigin: "top-right", + //透明度 + opacity: 0.9, + //图片路径 + src: require("@/assets/images/dataScreen/plotPremises/mark.png"), + }), +/* text: new ol.style.Text({ + textAlign: "center", //位置 + textBaseline: "middle", //基准线 + font: "normal 12px 微软雅黑", //文字样式 + //text: "标注点", //文本内容 + fill: new ol.style.Fill({ + //文本填充样式(即文字颜色) + color: "#ff0000", + }), + }),*/ + zIndex: 9999, + })); + self.draw.source_.addFeature(newFeature); + self.__Callback('mark::end', self.markResult); + }); + this.mapObject.addInteraction(this.draw); + //console.log("drawPolygon"); + }; + // 移除标记 + this.__ClearMark = function() { + this.__RequireInited(); + this.__ASSERT(this.draw, '没有开始标记'); + this.mapObject.removeInteraction(this.draw); + this.draw = null; + }; + // 重置标记 + this.ResetMark = function() { + this.__RequireInited(); + this.__ASSERT(this.draw, '没有标记'); + this.mapObject.removeInteraction(this.draw); + this.PopLayer(MAP_FIELD_DRAW_LAYER_NAME); + this.markResult = null; + this.__Callback('mark::reset'); + }; + + // 构造初始化 + if(this.selector) + this.Init(); + return this; +}; + +// olMap类静态成员 +olMap.MAP_FIELD_DRAW_LAYER_NAME = MAP_FIELD_DRAW_LAYER_NAME; +olMap.MAP_FIELD_INIT_LAYER_NAME = MAP_FIELD_INIT_LAYER_NAME; +olMap.gen_multipoint = function() { + let json = { + type: 'MultiPoint', + coordinates: [], + }; + for(let i in arguments) + { + json.coordinates.push(arguments[i]); + } + return json; +}; +olMap.gen_multipoint_json = function() { + return JSON.stringify(this.gen_multipoint(...arguments)); +}; +olMap.gen_point = function(x, y, z) { + let json = { + type: 'Point', + coordinates: Array.isArray(x) ? x : (z !== undefined ? [x, y, z] : [x, y]), + }; + return json; +}; +olMap.gen_point_json = function(x, y, z) { + return JSON.stringify(this.gen_point(x, y, z)); +}; +olMap.gen_polygon = function() { + let json = { + type: 'Polygon', + coordinates: [], + }; + for(let i in arguments) + { + json.coordinates.push(arguments[i]); + } + return json; +}; +olMap.gen_polygon_json = function(x, y, z) { + return JSON.stringify(this.gen_polygon(x, y, z)); +}; diff --git a/src/views/business/cjqy/index.vue b/src/views/business/cjqy/index.vue new file mode 100644 index 0000000..0b3a43c --- /dev/null +++ b/src/views/business/cjqy/index.vue @@ -0,0 +1,422 @@ + + + diff --git a/src/views/business/export/index.vue b/src/views/business/export/index.vue new file mode 100644 index 0000000..626a98d --- /dev/null +++ b/src/views/business/export/index.vue @@ -0,0 +1,541 @@ + + + + diff --git a/src/views/business/import/index.vue b/src/views/business/import/index.vue new file mode 100644 index 0000000..342eef4 --- /dev/null +++ b/src/views/business/import/index.vue @@ -0,0 +1,598 @@ + + + + diff --git a/src/views/business/xjqy/index.vue b/src/views/business/xjqy/index.vue new file mode 100644 index 0000000..ce998f8 --- /dev/null +++ b/src/views/business/xjqy/index.vue @@ -0,0 +1,422 @@ + + + diff --git a/src/views/business/xjxzq/index.vue b/src/views/business/xjxzq/index.vue new file mode 100644 index 0000000..8bc824c --- /dev/null +++ b/src/views/business/xjxzq/index.vue @@ -0,0 +1,422 @@ + + + diff --git a/src/views/index.vue b/src/views/index.vue index 2a08729..a3a9579 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -2,38 +2,75 @@
-

用户增长趋势

+

资源调查进度

- -
-

产品销售统计

-
-
-
-

用户分布比例

-
-
-
-

总用户数

+

总地块数

12,345

↑ 12% 同比

-

本月销售额

+

已调查数

+

¥ 456,789

+

↑ 8% 环比

+
+
+ +
+
+

待调查数

+

8,642

+

↓ 3% 环比

+
+
+

承包总金额

¥ 456,789

↑ 8% 环比

+
+ +
-

活跃用户

+

兑现总额

8,642

↓ 3% 环比

+
+

尚欠总额

+

¥ 456,789

+

↑ 8% 环比

+
+
+ +
+
+

年总收益

+

8,642

+

↓ 3% 环比

+
+
+

经营总面积

+

¥ 456,789

+

↑ 8% 环比

+
+
+ +
+
+

年总收益

+

8,642

+

↓ 3% 环比

+
+
+

经营总面积

+

¥ 456,789

+

↑ 8% 环比

+
@@ -46,8 +83,7 @@ name: 'Dashboard', mounted() { this.initLineChart(); - this.initBarChart(); - this.initPieChart(); + }, methods: { initLineChart() { @@ -57,7 +93,7 @@ trigger: 'axis' }, legend: { - data: ['新增用户', '活跃用户', '付费用户'] + data: ['已调查', '待调查'] }, grid: { left: '3%', @@ -68,27 +104,14 @@ xAxis: { type: 'category', boundaryGap: false, - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'] + data: ['A市', 'B市', 'C市', 'D市', 'E市', 'F市', 'G市'] }, yAxis: { type: 'value' }, series: [ { - name: '新增用户', - type: 'line', - data: [120, 132, 101, 134, 90, 230, 210], - smooth: true, - lineStyle: { - width: 3, - color: '#5470C6' - }, - itemStyle: { - color: '#5470C6' - } - }, - { - name: '活跃用户', + name: '已调查', type: 'line', data: [220, 182, 191, 234, 290, 330, 310], smooth: true, @@ -101,7 +124,7 @@ } }, { - name: '付费用户', + name: '待调查', type: 'line', data: [150, 232, 201, 154, 190, 330, 410], smooth: true, @@ -120,107 +143,6 @@ chart.resize(); }); }, - initBarChart() { - const chart = echarts.init(this.$refs.barChart); - const option = { - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } - }, - legend: { - data: ['2022', '2023'] - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - xAxis: { - type: 'value' - }, - yAxis: { - type: 'category', - data: ['产品A', '产品B', '产品C', '产品D', '产品E'] - }, - series: [ - { - name: '2022', - type: 'bar', - data: [320, 302, 341, 374, 390], - itemStyle: { - color: '#91CC75' - } - }, - { - name: '2023', - type: 'bar', - data: [420, 432, 401, 454, 590], - itemStyle: { - color: '#5470C6' - } - } - ] - }; - chart.setOption(option); - window.addEventListener('resize', function() { - chart.resize(); - }); - }, - initPieChart() { - const chart = echarts.init(this.$refs.pieChart); - const option = { - tooltip: { - trigger: 'item' - }, - legend: { - orient: 'vertical', - right: 10, - top: 'center' - }, - series: [ - { - name: '用户分布', - type: 'pie', - radius: ['40%', '70%'], - avoidLabelOverlap: false, - itemStyle: { - borderRadius: 10, - borderColor: '#fff', - borderWidth: 2 - }, - label: { - show: false, - position: 'center' - }, - emphasis: { - label: { - show: true, - fontSize: '18', - fontWeight: 'bold' - } - }, - labelLine: { - show: false - }, - data: [ - { value: 1048, name: '华北地区' }, - { value: 735, name: '华东地区' }, - { value: 580, name: '华南地区' }, - { value: 484, name: '西部地区' }, - { value: 300, name: '东北地区' } - ], - color: ['#5470C6', '#91CC75', '#EE6666', '#FAC858', '#73C0DE'] - } - ] - }; - chart.setOption(option); - window.addEventListener('resize', function() { - chart.resize(); - }); - } } }; diff --git a/src/views/index_v2.vue b/src/views/index_v2.vue new file mode 100644 index 0000000..2a08729 --- /dev/null +++ b/src/views/index_v2.vue @@ -0,0 +1,312 @@ + + + + + diff --git a/src/views/resource/land/index.vue b/src/views/resource/land/index.vue new file mode 100644 index 0000000..a12195c --- /dev/null +++ b/src/views/resource/land/index.vue @@ -0,0 +1,708 @@ + + + + diff --git a/src/views/resource/operation/index.vue b/src/views/resource/operation/index.vue new file mode 100644 index 0000000..47f249e --- /dev/null +++ b/src/views/resource/operation/index.vue @@ -0,0 +1,703 @@ + + + + diff --git a/src/views/system/menuapp/index.vue b/src/views/system/menuapp/index.vue index a4f1a09..e181731 100644 --- a/src/views/system/menuapp/index.vue +++ b/src/views/system/menuapp/index.vue @@ -132,7 +132,7 @@ - + {{dict.label}} @@ -148,7 +148,7 @@