diff --git a/school/src/main/resources/template/js/school/writeSchool.js b/school/src/main/resources/template/js/school/writeSchool.js index 57d657742f5f64604134bf2f6a87a2095f27ea8b..9a8df3c6e2e64fee74af95c8b4e722fbb74949d5 100644 --- a/school/src/main/resources/template/js/school/writeSchool.js +++ b/school/src/main/resources/template/js/school/writeSchool.js @@ -12,7 +12,7 @@ layui.config({ version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'form'], function (exports) { +}).define(['window', 'jquery', 'winui', 'form', 'fullscreen'], function (exports) { winui.renderColor(); var index = parent.layer.getFrameIndex(window.name); var $ = layui.$, @@ -286,10 +286,6 @@ layui.config({ }); } - function setCenter(obj){ - map.setCenter(obj[obj.options.selectedIndex].center) - } - // 取消 $("body").on("click", "#cancle", function() { parent.layer.close(index); diff --git a/seal-service/src/main/resources/template/js/serviceworker/serviceworkermap.js b/seal-service/src/main/resources/template/js/sealWorker/serviceworkermap.js similarity index 100% rename from seal-service/src/main/resources/template/js/serviceworker/serviceworkermap.js rename to seal-service/src/main/resources/template/js/sealWorker/serviceworkermap.js diff --git a/seal-service/src/main/resources/template/js/serviceworker/serviceworkershowlist.js b/seal-service/src/main/resources/template/js/sealWorker/serviceworkershowlist.js similarity index 100% rename from seal-service/src/main/resources/template/js/serviceworker/serviceworkershowlist.js rename to seal-service/src/main/resources/template/js/sealWorker/serviceworkershowlist.js diff --git a/seal-service/src/main/resources/template/js/sealWorker/writeSealWorker.js b/seal-service/src/main/resources/template/js/sealWorker/writeSealWorker.js new file mode 100644 index 0000000000000000000000000000000000000000..a733e522fe7b9da2a6385f8b721ef7c19c17b1d3 --- /dev/null +++ b/seal-service/src/main/resources/template/js/sealWorker/writeSealWorker.js @@ -0,0 +1,298 @@ + +var map, district, polygons = []; +var citySelect; +var districtSelect; +var marker = null; + +var userList = new Array();//选择用户返回的集合或者进行回显的集合 + +var longitude = "";//经度 +var latitude = "";//纬度 + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui', 'form', 'fullscreen'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$, + form = layui.form; + var id = GetUrlParam("id"); + + if (!isNull(id)) { + AjaxPostUtil.request({url: sysMainMation.sealServiceBasePath + "querySealWorkerById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { + longitude = json.bean.longitude; + latitude = json.bean.latitude; + userList.push(json.bean.userMation); + $.each(userList, function(i, item) { + $("#userName").val(item.name); + }); + + initMap(); + $("#longitude").val(longitude); + $("#latitude").val(latitude); + $("#absoluteAddress").val(json.bean.absoluteAddress); + }}); + } + matchingLanguage(); + form.render(); + + form.on('submit(formAddBean)', function (data) { + if (winui.verifyForm(data.elem)) { + var lnglatXY = [$("#longitude").val(), $("#latitude").val()];//地图上所标点的坐标 + geocoder.getAddress(lnglatXY, function(status, result) { + if (status === 'complete' && result.info === 'OK') { + var params = { + id: isNull(id) ? '' : id, + userId: userList[0].id, + longitude: $("#longitude").val(), + latitude: $("#latitude").val(), + provinceId: result.regeocode.addressComponent.province, + cityId: result.regeocode.addressComponent.city, + areaId: result.regeocode.addressComponent.district, + townshipId: '', + absoluteAddress: $("#absoluteAddress").val() + }; + AjaxPostUtil.request({url: sysMainMation.sealServiceBasePath + "writeSealWorker", params: params, type: 'json', method: 'POST', callback: function (json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + } else { + winui.window.msg('地图信息获取失败.', {icon: 2, time: 2000}); + } + }); + } + return false; + }); + + //人员选择 + $("body").on("click", "#userIdSelPeople", function (e) { + systemCommonUtil.userReturnList = [].concat(userList); + systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含 + systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 + systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 + systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) { + userList = [].concat(userReturnList); + $.each(userList, function(i, item) { + $("#userName").val(item.name); + }); + }); + }); + + initMap(); + function initMap(){ + if (!isNull(latitude) && !isNull(longitude)){ + map = new AMap.Map('container', { + resizeEnable: true, + zoom: 11, + center: [longitude, latitude] + }); + } else { + map = new AMap.Map('container', { + resizeEnable: true, + zoom: 5, + center: [113.65, 34.76] + }); + } + //加载插件 + AMap.service('AMap.Geocoder',function(){//回调函数 + //实例化Geocoder + geocoder = new AMap.Geocoder({ + }); + }); + //在地图上进行标记 + marker = new AMap.Marker({ + map:map, + bubble:true + }); + //通过地址获取经纬度 + var input = document.getElementById('absoluteAddress'); + map.on('click', function (e) { + geocoder.getAddress(e.lnglat, function(status,result){ + if(status=='complete'){ + input.value = result.regeocode.formattedAddress; + var address = input.value; + geocoder.getLocation(address, function(status, result){ + if(status == 'complete' && result.geocodes.length){ + marker.setPosition(result.geocodes[0].location); + map.setCenter(marker.getPosition()); + $("#longitude").val(result.geocodes[0].location.lng); + $("#latitude").val(result.geocodes[0].location.lat); + } + }) + } else { + } + }); + }); + input.onchange = function (e) { + var address = input.value; + geocoder.getLocation(address, function(status, result){ + if(status == 'complete' && result.geocodes.length){ + marker.setPosition(result.geocodes[0].location); + map.setCenter(marker.getPosition()); + $("#longitude").val(result.geocodes[0].location.lng); + $("#latitude").val(result.geocodes[0].location.lat); + } + }) + }; + + citySelect = document.getElementById('city'); + districtSelect = document.getElementById('district'); + //行政区划查询 + var opts = { + subdistrict: 1, //返回下一级行政区 + showbiz:false //最后一级返回街道信息 + }; + district = new AMap.DistrictSearch(opts);//注意:需要使用插件同步下发功能才能这样直接使用 + district.search('中国', function(status, result) { + if(status=='complete'){ + getData(result.districtList[0]); + } + }); + $("#qp").click(function (e) { + $("#qpDiv").fullScreen(); + }); + } + + function getData(data, level) { + var bounds = data.boundaries; + if (level === 'district') { + for (var i = 0, l = bounds.length; i < l; i++) { + var polygon = new AMap.Polygon({ + map: map, + fillColor: '#CCF3FF', + fillOpacity: 0.5, + path: bounds[i], + strokeColor: "#FF33FF",//线颜色 + strokeOpacity: 1,//线透明度 + strokeWeight: 3,//线宽 + strokeStyle: "solid"//线样式 + }); + var input = document.getElementById('absoluteAddress'); + polygon.on('click', function(e) { + geocoder.getAddress(e.lnglat, function(status, result){ + if(status=='complete'){ + input.value = result.regeocode.formattedAddress; + var address = input.value; + geocoder.getLocation(address, function(status, result){ + if(status == 'complete' && result.geocodes.length){ + marker.setPosition(result.geocodes[0].location); + map.setCenter(marker.getPosition()); + $("#longitude").val(result.geocodes[0].location.lng); + $("#latitude").val(result.geocodes[0].location.lat); + } + }) + } else { + } + }); + }); + polygons.push(polygon); + } + map.setFitView();//地图自适应 + } + + var subList = data.districtList; + if (subList) { + var contentSub = new Option('--请选择--'); + var curlevel = subList[0].level; + var curList = document.querySelector('#' + curlevel); + if (!isNull(curList)){ + curList.add(contentSub); + } + for (var i = 0, l = subList.length; i < l; i++) { + var name = subList[i].name; + var levelSub = subList[i].level; + var cityCode = subList[i].citycode; + contentSub = new Option(name); + contentSub.setAttribute("value", levelSub + i); + contentSub.center = subList[i].center; + contentSub.adcode = subList[i].adcode; + if (!isNull(curList)){ + curList.add(contentSub); + } + if(level != 'district'){ + district.search(subList[i].adcode, function(status, result) { + if(status === 'complete'){ + var bounds = result.districtList[0].boundaries; + if (bounds) { + for (var i = 0, l = bounds.length; i < l; i++) { + var polygon = new AMap.Polygon({ + map: map, + fillColor: '#CCF3FF', + fillOpacity: 0.5, + path: bounds[i], + strokeColor: "#FF33FF",//线颜色 + strokeOpacity: 1,//线透明度 + strokeWeight: 3,//线宽 + strokeStyle: "solid"//线样式 + }); + var input = document.getElementById('absoluteAddress'); + polygon.on('click', function(e) { + geocoder.getAddress(e.lnglat, function(status, result){ + if(status == 'complete'){ + input.value = result.regeocode.formattedAddress; + var address = input.value; + geocoder.getLocation(address, function(status, result){ + if(status == 'complete' && result.geocodes.length){ + marker.setPosition(result.geocodes[0].location); + map.setCenter(marker.getPosition()); + $("#longitude").val(result.geocodes[0].location.lng); + $("#latitude").val(result.geocodes[0].location.lat); + } + }) + } else { + } + }); + }); + polygons.push(polygon); + } + map.setFitView();//地图自适应 + } + } + }); + } + } + } + form.render("select"); + } + + form.on('select(province)', function(data) { + citySelect.innerHTML = ''; + districtSelect.innerHTML = ''; + form.render("select"); + search(document.getElementById('province')); + }); + form.on('select(city)', function(data) { + districtSelect.innerHTML = ''; + form.render("select"); + search(document.getElementById('city')); + }); + form.on('select(district)', function(data) { + search(document.getElementById('district')); + }); + + function search(obj) { + //清除地图上所有覆盖物 + for (var i = 0, l = polygons.length; i < l; i++) { + polygons[i].setMap(null); + } + var option = obj[obj.options.selectedIndex]; + var keyword = option.text; //关键字 + var adcode = option.adcode; + district.setLevel(option.value); //行政区级别 + district.setExtensions('all'); + //行政区查询 + //按照adcode进行查询可以保证数据返回的唯一性 + district.search(adcode, function(status, result) { + if(status === 'complete'){ + getData(result.districtList[0], obj.id); + } + }); + } + + $("body").on("click", "#cancle", function() { + parent.layer.close(index); + }); +}); \ No newline at end of file diff --git a/seal-service/src/main/resources/template/js/serviceworker/serviceworkeradd.js b/seal-service/src/main/resources/template/js/serviceworker/serviceworkeradd.js deleted file mode 100644 index 8ec2f7b6b9bee35c3c5400893244a40672000879..0000000000000000000000000000000000000000 --- a/seal-service/src/main/resources/template/js/serviceworker/serviceworkeradd.js +++ /dev/null @@ -1,291 +0,0 @@ - -var map, district, polygons = []; -var citySelect; -var districtSelect; -var marker = null; - -var longitude = "";//经度 -var latitude = "";//纬度 - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'fullscreen'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - //已选择人员 - var userList = new Array(); - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - if(userList.length == 0){ - winui.window.msg('请选择人员', {icon: 2, time: 2000}); - return false; - } - var lnglatXY = [$("#longitude").val(), $("#latitude").val()];//地图上所标点的坐标 - geocoder.getAddress(lnglatXY, function(status, result) { - if (status === 'complete' && result.info === 'OK') { - var params = { - userId: userList[0].id, - longitude: $("#longitude").val(), - latitude: $("#latitude").val(), - proName: result.regeocode.addressComponent.province, - cityName: result.regeocode.addressComponent.city, - areaName: result.regeocode.addressComponent.district, - addressDetail: $("#userAddressInput").val() - }; - AjaxPostUtil.request({url: flowableBasePath + "sealseserviceworker002", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } else { - winui.window.msg('地图信息获取失败.', {icon: 2, time: 2000}); - } - }); - } - return false; - }); - - //人员选择 - $("body").on("click", "#userIdSelPeople", function (e) { - systemCommonUtil.userReturnList = [].concat(userList); - systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含 - systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 - systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 - systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) { - userList = [].concat(userReturnList); - if(userList.length > 0){ - $("#userName").val(userList[0].name); - } else { - $("#userName").val(""); - } - }); - }); - - initMap(); - function initMap(){ - if (!isNull(latitude) && !isNull(longitude)){ - map = new AMap.Map('container', { - resizeEnable: true, - zoom: 11, - center: [latitude, longitude] - }); - } else { - map = new AMap.Map('container', { - resizeEnable: true, - zoom: 5, - center: [113.65, 34.76] - }); - } - //加载插件 - AMap.service('AMap.Geocoder',function(){//回调函数 - //实例化Geocoder - geocoder = new AMap.Geocoder({ - }); - }); - //在地图上进行标记 - marker = new AMap.Marker({ - map:map, - bubble:true - }); - //通过地址获取经纬度 - var input = document.getElementById('userAddressInput'); - map.on('click', function (e) { - geocoder.getAddress(e.lnglat, function(status,result){ - if(status=='complete'){ - input.value = result.regeocode.formattedAddress; - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - } else { - } - }); - }); - input.onchange = function (e) { - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - }; - - citySelect = document.getElementById('city'); - districtSelect = document.getElementById('district'); - //行政区划查询 - var opts = { - subdistrict: 1, //返回下一级行政区 - showbiz:false //最后一级返回街道信息 - }; - district = new AMap.DistrictSearch(opts);//注意:需要使用插件同步下发功能才能这样直接使用 - district.search('中国', function(status, result) { - if(status=='complete'){ - getData(result.districtList[0]); - } - }); - $("#qp").click(function (e) { - $("#qpDiv").fullScreen(); - }); - } - - function getData(data, level) { - var bounds = data.boundaries; - if (level === 'district') { - for (var i = 0, l = bounds.length; i < l; i++) { - var polygon = new AMap.Polygon({ - map: map, - fillColor: '#CCF3FF', - fillOpacity: 0.5, - path: bounds[i], - strokeColor: "#FF33FF",//线颜色 - strokeOpacity: 1,//线透明度 - strokeWeight: 3,//线宽 - strokeStyle: "solid"//线样式 - }); - var input = document.getElementById('userAddressInput'); - polygon.on('click', function(e) { - geocoder.getAddress(e.lnglat, function(status, result){ - if(status=='complete'){ - input.value = result.regeocode.formattedAddress; - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - } else { - } - }); - }); - polygons.push(polygon); - } - map.setFitView();//地图自适应 - } - - var subList = data.districtList; - if (subList) { - var contentSub = new Option('--请选择--'); - var curlevel = subList[0].level; - var curList = document.querySelector('#' + curlevel); - if (!isNull(curList)){ - curList.add(contentSub); - } - for (var i = 0, l = subList.length; i < l; i++) { - var name = subList[i].name; - var levelSub = subList[i].level; - var cityCode = subList[i].citycode; - contentSub = new Option(name); - contentSub.setAttribute("value", levelSub + i); - contentSub.center = subList[i].center; - contentSub.adcode = subList[i].adcode; - if (!isNull(curList)){ - curList.add(contentSub); - } - if(level != 'district'){ - district.search(subList[i].adcode, function(status, result) { - if(status === 'complete'){ - var bounds = result.districtList[0].boundaries; - if (bounds) { - for (var i = 0, l = bounds.length; i < l; i++) { - var polygon = new AMap.Polygon({ - map: map, - fillColor: '#CCF3FF', - fillOpacity: 0.5, - path: bounds[i], - strokeColor: "#FF33FF",//线颜色 - strokeOpacity: 1,//线透明度 - strokeWeight: 3,//线宽 - strokeStyle: "solid"//线样式 - }); - var input = document.getElementById('userAddressInput'); - polygon.on('click', function(e) { - geocoder.getAddress(e.lnglat, function(status, result){ - if(status == 'complete'){ - input.value = result.regeocode.formattedAddress; - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - } else { - } - }); - }); - polygons.push(polygon); - } - map.setFitView();//地图自适应 - } - } - }); - } - } - } - form.render("select"); - } - - form.on('select(province)', function(data) { - citySelect.innerHTML = ''; - districtSelect.innerHTML = ''; - form.render("select"); - search(document.getElementById('province')); - }); - form.on('select(city)', function(data) { - districtSelect.innerHTML = ''; - form.render("select"); - search(document.getElementById('city')); - }); - form.on('select(district)', function(data) { - search(document.getElementById('district')); - }); - - function search(obj) { - //清除地图上所有覆盖物 - for (var i = 0, l = polygons.length; i < l; i++) { - polygons[i].setMap(null); - } - var option = obj[obj.options.selectedIndex]; - var keyword = option.text; //关键字 - var adcode = option.adcode; - district.setLevel(option.value); //行政区级别 - district.setExtensions('all'); - //行政区查询 - //按照adcode进行查询可以保证数据返回的唯一性 - district.search(adcode, function(status, result) { - if(status === 'complete'){ - getData(result.districtList[0], obj.id); - } - }); - } - - function setCenter(obj){ - map.setCenter(obj[obj.options.selectedIndex].center) - } - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/seal-service/src/main/resources/template/js/serviceworker/serviceworkeredit.js b/seal-service/src/main/resources/template/js/serviceworker/serviceworkeredit.js deleted file mode 100644 index c40346586cc626386f5dfd49bed5513da27c37d2..0000000000000000000000000000000000000000 --- a/seal-service/src/main/resources/template/js/serviceworker/serviceworkeredit.js +++ /dev/null @@ -1,277 +0,0 @@ - -var map, district, polygons = []; -var citySelect; -var districtSelect; -var marker = null; - -var longitude = "";//经度 -var latitude = "";//纬度 - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'fullscreen'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - AjaxPostUtil.request({url: flowableBasePath + "sealseserviceworker004", params: {rowId: parent.rowId}, type: 'json', callback: function (json) { - longitude = json.bean.longitude; - latitude = json.bean.latitude; - initMap(); - $("#userName").html(json.bean.userName); - $("#longitude").val(longitude); - $("#latitude").val(latitude); - $("#userAddressInput").val(json.bean.addDetail); - matchingLanguage(); - }}); - - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var lnglatXY = [$("#longitude").val(), $("#latitude").val()];//地图上所标点的坐标 - geocoder.getAddress(lnglatXY, function(status, result) { - if (status === 'complete' && result.info === 'OK') { - var params = { - rowId: parent.rowId, - longitude: $("#longitude").val(), - latitude: $("#latitude").val(), - proName: result.regeocode.addressComponent.province, - cityName: result.regeocode.addressComponent.city, - areaName: result.regeocode.addressComponent.district, - addressDetail: $("#userAddressInput").val() - }; - AjaxPostUtil.request({url: flowableBasePath + "sealseserviceworker005", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } else { - winui.window.msg('地图信息获取失败.', {icon: 2, time: 2000}); - } - }); - } - return false; - }); - - function initMap(){ - if (!isNull(latitude) && !isNull(longitude)){ - map = new AMap.Map('container', { - resizeEnable: true, - zoom: 11, - center: [longitude, latitude] - }); - } else { - map = new AMap.Map('container', { - resizeEnable: true, - zoom: 5, - center: [113.65, 34.76] - }); - } - //加载插件 - AMap.service('AMap.Geocoder',function(){//回调函数 - //实例化Geocoder - geocoder = new AMap.Geocoder({ - }); - }); - //在地图上进行标记 - marker = new AMap.Marker({ - map:map, - bubble:true - }); - //通过地址获取经纬度 - var input = document.getElementById('userAddressInput'); - map.on('click', function (e) { - geocoder.getAddress(e.lnglat, function(status,result){ - if(status=='complete'){ - input.value = result.regeocode.formattedAddress; - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - } else { - } - }); - }); - input.onchange = function (e) { - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - }; - - citySelect = document.getElementById('city'); - districtSelect = document.getElementById('district'); - //行政区划查询 - var opts = { - subdistrict: 1, //返回下一级行政区 - showbiz:false //最后一级返回街道信息 - }; - district = new AMap.DistrictSearch(opts);//注意:需要使用插件同步下发功能才能这样直接使用 - district.search('中国', function(status, result) { - if(status=='complete'){ - getData(result.districtList[0]); - } - }); - $("#qp").click(function (e) { - $("#qpDiv").fullScreen(); - }); - } - - function getData(data, level) { - var bounds = data.boundaries; - if (level === 'district') { - for (var i = 0, l = bounds.length; i < l; i++) { - var polygon = new AMap.Polygon({ - map: map, - fillColor: '#CCF3FF', - fillOpacity: 0.5, - path: bounds[i], - strokeColor: "#FF33FF",//线颜色 - strokeOpacity: 1,//线透明度 - strokeWeight: 3,//线宽 - strokeStyle: "solid"//线样式 - }); - var input = document.getElementById('userAddressInput'); - polygon.on('click', function(e) { - geocoder.getAddress(e.lnglat, function(status, result){ - if(status=='complete'){ - input.value = result.regeocode.formattedAddress; - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - } else { - } - }); - }); - polygons.push(polygon); - } - map.setFitView();//地图自适应 - } - - var subList = data.districtList; - if (subList) { - var contentSub = new Option('--请选择--'); - var curlevel = subList[0].level; - var curList = document.querySelector('#' + curlevel); - if (!isNull(curList)){ - curList.add(contentSub); - } - for (var i = 0, l = subList.length; i < l; i++) { - var name = subList[i].name; - var levelSub = subList[i].level; - var cityCode = subList[i].citycode; - contentSub = new Option(name); - contentSub.setAttribute("value", levelSub + i); - contentSub.center = subList[i].center; - contentSub.adcode = subList[i].adcode; - if (!isNull(curList)){ - curList.add(contentSub); - } - if(level != 'district'){ - district.search(subList[i].adcode, function(status, result) { - if(status === 'complete'){ - var bounds = result.districtList[0].boundaries; - if (bounds) { - for (var i = 0, l = bounds.length; i < l; i++) { - var polygon = new AMap.Polygon({ - map: map, - fillColor: '#CCF3FF', - fillOpacity: 0.5, - path: bounds[i], - strokeColor: "#FF33FF",//线颜色 - strokeOpacity: 1,//线透明度 - strokeWeight: 3,//线宽 - strokeStyle: "solid"//线样式 - }); - var input = document.getElementById('userAddressInput'); - polygon.on('click', function(e) { - geocoder.getAddress(e.lnglat, function(status, result){ - if(status == 'complete'){ - input.value = result.regeocode.formattedAddress; - var address = input.value; - geocoder.getLocation(address, function(status, result){ - if(status == 'complete' && result.geocodes.length){ - marker.setPosition(result.geocodes[0].location); - map.setCenter(marker.getPosition()); - $("#longitude").val(result.geocodes[0].location.lng); - $("#latitude").val(result.geocodes[0].location.lat); - } - }) - } else { - } - }); - }); - polygons.push(polygon); - } - map.setFitView();//地图自适应 - } - } - }); - } - } - } - form.render("select"); - } - - form.on('select(province)', function(data) { - citySelect.innerHTML = ''; - districtSelect.innerHTML = ''; - form.render("select"); - search(document.getElementById('province')); - }); - form.on('select(city)', function(data) { - districtSelect.innerHTML = ''; - form.render("select"); - search(document.getElementById('city')); - }); - form.on('select(district)', function(data) { - search(document.getElementById('district')); - }); - - function search(obj) { - //清除地图上所有覆盖物 - for (var i = 0, l = polygons.length; i < l; i++) { - polygons[i].setMap(null); - } - var option = obj[obj.options.selectedIndex]; - var keyword = option.text; //关键字 - var adcode = option.adcode; - district.setLevel(option.value); //行政区级别 - district.setExtensions('all'); - //行政区查询 - //按照adcode进行查询可以保证数据返回的唯一性 - district.search(adcode, function(status, result) { - if(status === 'complete'){ - getData(result.districtList[0], obj.id); - } - }); - } - - function setCenter(obj){ - map.setCenter(obj[obj.options.selectedIndex].center) - } - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/seal-service/src/main/resources/template/js/serviceworker/serviceworkerlist.js b/seal-service/src/main/resources/template/js/serviceworker/serviceworkerlist.js deleted file mode 100644 index 7ed3824c474c0343e09b04e3cb310c12b8559806..0000000000000000000000000000000000000000 --- a/seal-service/src/main/resources/template/js/serviceworker/serviceworkerlist.js +++ /dev/null @@ -1,114 +0,0 @@ -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - table = layui.table; - - authBtn('1582382603658'); - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'sealseserviceworker001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'userName', title: '用户姓名', align: 'left', width: 120 }, - { field: 'proName', title: '所在省', align: 'left', width: 80 }, - { field: 'cityName', title: '所在市', align: 'left', width: 80 }, - { field: 'areaName', title: '所在区', align: 'left', width: 80 }, - { field: 'orderNumber', title: '工单数', align: 'left', width: 60 }, - { field: 'stateName', title: '状态', align: 'center', width: 80, templet: function (d) { - if(d.orderNumber > 0){ - return '' + d.stateName + ''; - } else { - return '' + d.stateName + ''; - } - }}, - { field: 'addDetail', title: '详细地址', align: 'left', width: 400 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar' } - ]], - done: function(json) { - matchingLanguage(); - initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入所在省,市,区县", function () { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - }); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - } else if (layEvent === 'delete') { //删除 - del(data); - } - }); - - // 新增 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/serviceworker/serviceworkeradd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "serviceworkeradd", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - - // 编辑 - function edit(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/serviceworker/serviceworkeredit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "serviceworkeredit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - // 删除 - function del(data, obj) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "sealseserviceworker003", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - form.render(); - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); - } - - exports('serviceworkerlist', {}); -}); \ No newline at end of file diff --git a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkermap.html b/seal-service/src/main/resources/template/tpl/sealWorker/serviceworkermap.html similarity index 100% rename from seal-service/src/main/resources/template/tpl/serviceworker/serviceworkermap.html rename to seal-service/src/main/resources/template/tpl/sealWorker/serviceworkermap.html diff --git a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkershowlist.html b/seal-service/src/main/resources/template/tpl/sealWorker/serviceworkershowlist.html similarity index 100% rename from seal-service/src/main/resources/template/tpl/serviceworker/serviceworkershowlist.html rename to seal-service/src/main/resources/template/tpl/sealWorker/serviceworkershowlist.html diff --git a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkeradd.html b/seal-service/src/main/resources/template/tpl/sealWorker/writeSealWorker.html similarity index 50% rename from seal-service/src/main/resources/template/tpl/serviceworker/serviceworkeradd.html rename to seal-service/src/main/resources/template/tpl/sealWorker/writeSealWorker.html index bdd6092437cfcedfce4e48693958e6bb6df192ff..b9515c14beccd4bde7f8c1f40c66c06b151df299 100644 --- a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkeradd.html +++ b/seal-service/src/main/resources/template/tpl/sealWorker/writeSealWorker.html @@ -26,42 +26,42 @@ -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
- 省: - 市: - 区: +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+ 省: + 市: + 区: 全屏
-
+
-
-
+
+
@@ -72,11 +72,16 @@
- + + \ No newline at end of file diff --git a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkeredit.html b/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkeredit.html deleted file mode 100644 index bb755e86460228d6f939475422e061b7594ec0be..0000000000000000000000000000000000000000 --- a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkeredit.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - -
-
-
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
- 省: - 市: - 区: - 全屏 -
-
-
-
-
-
-
- - -
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkerlist.html b/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkerlist.html deleted file mode 100644 index eb1dfb1a9a584744b9657fd6dccfb49fa2489271..0000000000000000000000000000000000000000 --- a/seal-service/src/main/resources/template/tpl/serviceworker/serviceworkerlist.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - -
注:该工单数包含待签到和待完工工单。
-
-
- - -
-
-
-
- -
- - - - - - \ No newline at end of file