From 68d77441712ba05af0da27ee611f626f59a555e9 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Thu, 18 Jan 2024 11:26:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=AD=E6=96=87=E6=94=B9=E4=B8=BA=E8=8B=B1?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/jeecgbiz/JSelectUserByDep.vue | 6 +- src/views/modules/message/SysMessageList.vue | 62 +++++++-------- .../message/SysMessageTemplateList.vue | 78 +++++++++---------- .../message/modules/SysMessageModal.vue | 38 ++++----- .../modules/SysMessageTemplateModal.vue | 47 ++++++----- .../message/modules/SysMessageTestModal.vue | 20 ++--- 6 files changed, 124 insertions(+), 127 deletions(-) diff --git a/src/components/jeecgbiz/JSelectUserByDep.vue b/src/components/jeecgbiz/JSelectUserByDep.vue index 29c9749..a668083 100644 --- a/src/components/jeecgbiz/JSelectUserByDep.vue +++ b/src/components/jeecgbiz/JSelectUserByDep.vue @@ -2,11 +2,11 @@
- 选择用户 + Select user - - + + - - + + - 查询 - 重置 + Search + Reset - {{ toggleSearchStatus ? '收起' : '展开' }} + {{ toggleSearchStatus ? 'Pack up' : 'unfold' }} @@ -39,20 +39,20 @@
- 新增 - 导出 + ADD + Export - 导入 + Import - 删除 + Delete - 批量操作 + Batch operation @@ -61,9 +61,9 @@
- 详情 + Details - 更多 + More - 编辑 + Edit - - 删除 + + Delete @@ -124,7 +124,7 @@ }, data() { return { - description: '消息管理页面', + description: 'Message management page', // 新增修改按钮是否显示 show: false, // 表头 @@ -140,43 +140,43 @@ } }, { - title: '消息标题', + title: 'Message header', align: "center", dataIndex: 'esTitle' }, { - title: '发送内容', + title: 'Send content', align: "center", dataIndex: 'esContent', scopedSlots: {customRender: 'esContent'}, }, { - title: '接收人', + title: 'receiver', align: "center", dataIndex: 'esReceiver' }, { - title: '发送次数', + title: 'Transmission times', align: "center", dataIndex: 'esSendNum' }, { - title: '发送状态', + title: 'Send state', align: 'center', dataIndex: 'esSendStatus_dictText' }, { - title: '发送时间', + title: 'Send time', align: "center", dataIndex: 'esSendTime' }, { - title: '发送方式', + title: 'Send mode', align: 'center', dataIndex: 'esType_dictText' }, { - title: '操作', + title: 'Operation', dataIndex: 'action', align: "center", scopedSlots: {customRender: 'action'}, diff --git a/src/views/modules/message/SysMessageTemplateList.vue b/src/views/modules/message/SysMessageTemplateList.vue index cef9048..714ff1d 100644 --- a/src/views/modules/message/SysMessageTemplateList.vue +++ b/src/views/modules/message/SysMessageTemplateList.vue @@ -7,33 +7,33 @@ - - + + - - + + - 查询 - 重置 + Search + Reset - {{ toggleSearchStatus ? '收起' : '展开' }} + {{ toggleSearchStatus ? 'Pack up' : 'unfold' }} @@ -45,11 +45,11 @@
- 新增 - 导出 + ADD + Export - 导入 + Import
- 编辑 + Edit - 更多 + More - 应用 + Use - 停用 + NotUse - - 删除 + + Delete - 发送测试 + Send test @@ -148,7 +148,7 @@ }, data() { return { - description: '消息模板管理页面', + description: 'Message template Management page', // 表头 columns: [ { @@ -162,48 +162,48 @@ } }, { - title: '模板CODE', + title: 'templateCode', align: "center", dataIndex: 'templateCode' }, { - title: '模板标题', + title: 'templateTitle', align: "center", dataIndex: 'templateName' }, { - title: '模板内容', + title: 'templateContent', align: "center", dataIndex: 'templateContent', scopedSlots: {customRender: 'templateContent'}, }, { - title: '模板类型', + title: 'templateType', align: "center", dataIndex: 'templateType', customRender: function (text) { if(text=='1') { - return "文本"; + return "TEXT"; } if(text=='2') { - return "富文本"; + return "Rich text"; } } }, { - title: '是否应用', + title: 'useStatus', align: "center", dataIndex: 'useStatus', customRender: function (text) { if(text=='1') { - return "是"; + return "YES"; }else{ - return '否' + return 'NO' } } }, { - title: '操作', + title: 'action', dataIndex: 'action', align: "center", scopedSlots: {customRender: 'action'}, @@ -226,7 +226,7 @@ methods: { handleTest(record){ this.$refs.testModal.open(record); - this.$refs.testModal.title = "发送测试"; + this.$refs.testModal.title = "Send test"; }, //update-begin-author:taoyan date:2022-7-8 for: 修改应用状态 updateUseStatus(record, useStatus){ @@ -251,7 +251,7 @@ }, handleMyEdit(record){ if(record.useStatus == '1'){ - this.$message.warning('此模板已被应用,禁止编辑!'); + this.$message.warning('This template has been applied and editing is prohibited!'); }else{ this.handleEdit(record); } @@ -260,11 +260,11 @@ handleDelete: function (record) { if(!this.url.delete){ - this.$message.error("请设置url.delete属性!") + this.$message.error("Please set the url.delete property!") return } if(record.useStatus=='1'){ - this.$message.error("该模板已被应用禁止删除!") + this.$message.error("The template is prohibited from being deleted by the application!") return } let id = record.id; diff --git a/src/views/modules/message/modules/SysMessageModal.vue b/src/views/modules/message/modules/SysMessageModal.vue index 9f6231c..1572965 100644 --- a/src/views/modules/message/modules/SysMessageModal.vue +++ b/src/views/modules/message/modules/SysMessageModal.vue @@ -15,70 +15,70 @@ - + label="Message header"> + - + label="Send content"> + - + label="Send required parameters"> + - + label="receiver"> + - + label="Sending mode"> + + label="Sending time"> - + label="Sending state"> + + label="Transmission times"> + label="Cause of sending failure"> + label="remark">
- 取消 - 提交 + Cancel + Submit
@@ -92,7 +92,7 @@ name: "SysMessageModal", data() { return { - title: "操作", + title: "Operation", visible: false, model: {}, labelCol: { diff --git a/src/views/modules/message/modules/SysMessageTemplateModal.vue b/src/views/modules/message/modules/SysMessageTemplateModal.vue index 6602065..bd7e16d 100644 --- a/src/views/modules/message/modules/SysMessageTemplateModal.vue +++ b/src/views/modules/message/modules/SysMessageTemplateModal.vue @@ -6,70 +6,67 @@ :confirmLoading="confirmLoading" @ok="handleOk" @cancel="handleCancel" - cancelText="关闭"> + cancelText="Cancel"> - - + + - + - + label="Template type"> + - + + label="Template title"> - + - + - + label="Template content"> + @@ -79,7 +76,7 @@ v-show="useEditor" :labelCol="labelCol" :wrapperCol="wrapperCol" - label="模板内容" + label="Template content" style="margin-left: 4px;width: 126%"> @@ -106,7 +103,7 @@ }, data() { return { - title: "操作", + title: "Operation", visible: false, disable: true, model: {}, @@ -121,11 +118,11 @@ confirmLoading: false, form: this.$form.createForm(this), validatorRules: { - templateCode: {rules: [{required: true, message: '请输入模板CODE!' },{validator: this.validateTemplateCode}]}, - templateName: {rules: [{required: true, message: '请输入模板标题!'}]}, + templateCode: {rules: [{required: true, message: 'Please enter the template Code!' },{validator: this.validateTemplateCode}]}, + templateName: {rules: [{required: true, message: 'Please enter the template title!'}]}, templateContent: {rules: []}, useStatus:{rules: []}, - templateType: {rules: [{required: true, message: '请输入模板类型!'}]}, + templateType: {rules: [{required: true, message: 'Please enter the template type!'}]}, }, url: { add: "/sys/message/sysMessageTemplate/add", diff --git a/src/views/modules/message/modules/SysMessageTestModal.vue b/src/views/modules/message/modules/SysMessageTestModal.vue index 9feb97b..56ba464 100644 --- a/src/views/modules/message/modules/SysMessageTestModal.vue +++ b/src/views/modules/message/modules/SysMessageTestModal.vue @@ -6,43 +6,43 @@ :confirmLoading="confirmLoading" @ok="handleOk" @cancel="handleCancel" - cancelText="关闭"> + cancelText="Cancel"> + label="Template title"> + label="Template content"> - + label="Test data"> + + label="Message type"> - + label="Message receiver"> + @@ -60,7 +60,7 @@ }, data() { return { - title: "操作", + title: "Operation", visible: false, model: {}, labelCol: { From 032883810c2f60a85269b7a91fc479a3c75e9689 Mon Sep 17 00:00:00 2001 From: orgin Date: Thu, 18 Jan 2024 11:40:56 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix=EF=BC=9A=E5=9C=B0=E5=9B=BE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=98=BE=E7=A4=BA=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stationOperation/components/Map.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/stationOperation/components/Map.vue b/src/views/stationOperation/components/Map.vue index b565283..8cc3564 100644 --- a/src/views/stationOperation/components/Map.vue +++ b/src/views/stationOperation/components/Map.vue @@ -65,6 +65,7 @@ export default { zoom: this.zoom, maxZoom: this.maxZoom, minZoom: this.minZoom, + extent: [-20037508.34 - 3500000, -20037508.34 , 20037508.34 + 3500000, 20037508.34], }) this.map = new Map({ From 9f6575ff04f30a5181219c3787f4bbdfe307097a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Wed, 24 Jan 2024 17:39:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8F=B0=E7=AB=99=E6=98=AFUnoperating?= =?UTF-8?q?=EF=BC=8Cicon=20=E4=B8=8A=E9=9D=A2=E7=9A=84=E6=B3=A2=E7=BA=B9?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=EF=BC=8C=20=E4=B8=8D=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=95=B0=E6=8D=AE=E6=8E=A5=E6=94=B6=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stationOperation/components/MapMarker.vue | 93 +++++++++++-------- src/views/stationOperation/index.vue | 4 +- 2 files changed, 55 insertions(+), 42 deletions(-) diff --git a/src/views/stationOperation/components/MapMarker.vue b/src/views/stationOperation/components/MapMarker.vue index 83b15e6..7b1dc75 100644 --- a/src/views/stationOperation/components/MapMarker.vue +++ b/src/views/stationOperation/components/MapMarker.vue @@ -26,30 +26,30 @@ export default { props: { list: { type: Array, - required: true + required: true, }, currList: { type: Array, - required: true + required: true, }, orgList: { type: Array, - required: true + required: true, }, markerType: { type: Number, - default: 1 + default: 1, }, radius: { - type: Number - } + type: Number, + }, }, data() { return { currStationInfo: {}, isGettingInfo: false, columns: {}, - popupTitle: '' + popupTitle: '', } }, mounted() { @@ -59,7 +59,7 @@ export default { this.changeCircleRadius() }) - this.getStationInfo = debounce(stationInfo => { + this.getStationInfo = debounce((stationInfo) => { // 查询设施详情时去抖动 if (this.isHover) { this._getStationInfo(stationInfo) @@ -69,13 +69,14 @@ export default { methods: { initCircles() { const circleRadius = this.getRadius() * 2 + console.log('this.list', this.list) this.list .filter( - stationInfo => + (stationInfo) => stationInfo.stationType !== MarkerType.NuclearFacility && stationInfo.stationType !== MarkerType.NRL ) - .forEach(stationInfo => { + .forEach((stationInfo) => { this.map.addOverlay(this.getCircle(stationInfo, circleRadius)) }) }, @@ -92,17 +93,17 @@ export default { element: circleDiv, id: `circle_${stationType}_${stationId}`, positioning: 'center-center', - className: 'circle-overlay' + className: 'circle-overlay', }) }, // 修改圆的半径 changeCircleRadius() { const overlays = this.map.getOverlays().getArray() - const circleOverlays = overlays.filter(item => item.id.indexOf('circle') == 0) // 根据id标识获取所有的圆 + const circleOverlays = overlays.filter((item) => item.id.indexOf('circle') == 0) // 根据id标识获取所有的圆 const circleRadius = this.getRadius() * 2 - circleOverlays.forEach(circle => { + circleOverlays.forEach((circle) => { const circleEle = circle.getElement() circleEle.style.width = circleRadius + 'px' circleEle.style.height = circleRadius + 'px' @@ -111,10 +112,7 @@ export default { // 半径计算 getRadius() { - const metersPerUnit = this.map - .getView() - .getProjection() - .getMetersPerUnit() + const metersPerUnit = this.map.getView().getProjection().getMetersPerUnit() const distance = (this.radius * 1000) / metersPerUnit const resolution = this.map.getView().getResolution() @@ -123,7 +121,7 @@ export default { // 初始化marker initMarkers() { - this.list.forEach(stationInfo => { + this.list.forEach((stationInfo) => { this.map.addOverlay(this.getMarker(stationInfo)) }) }, @@ -153,18 +151,19 @@ export default { position: fromLonLat([lon, lat]), element: img, id: `marker_${stationInfo.stationType}_${stationInfo.stationId}`, - positioning: 'center-center' + positioning: 'center-center', }) }, // 初始化波纹 initRipples() { this.currList + .filter((stationInfo) => stationInfo.status !== 'Unoperating') // .filter( // stationInfo => // stationInfo.stationType !== MarkerType.NuclearFacility && stationInfo.stationType !== MarkerType.NRL // ) - .forEach(stationInfo => { + .forEach((stationInfo) => { this.map.addOverlay(this.getRipple(stationInfo)) }) }, @@ -172,15 +171,15 @@ export default { getRipple({ lon, lat, stationId, stationType, quality }) { const rippleDiv = document.createElement('div') rippleDiv.className = 'custom-ripple' - if (quality == "excellent") { + if (quality == 'excellent') { rippleDiv.innerHTML = `
` - } else if (quality == "good") { + } else if (quality == 'good') { rippleDiv.innerHTML = `
` - } else if(quality == "bad"){ + } else if (quality == 'bad') { rippleDiv.innerHTML = `
` @@ -191,7 +190,7 @@ export default { element: rippleDiv, id: `ripple_${stationType}_${stationId}`, positioning: 'center-center', - className: 'ripple-overlay' + className: 'ripple-overlay', }) }, @@ -200,7 +199,7 @@ export default { this.popupOverlay = new Overlay({ element: this.$refs.mapPopupRef, positioning: 'top-center', - id: POPUP_OVERLAY_ID + id: POPUP_OVERLAY_ID, }) this.map.addOverlay(this.popupOverlay) }, @@ -220,15 +219,16 @@ export default { try { const { success, result, message } = await getAction('/jeecg-station-operation/stationOperation/findInfo', { stationId: stationInfo.stationId, - type: stationInfo.stationType + type: stationInfo.stationType, }) if (success) { result.lon = decimalToDms(result.lon || result.longitude) result.lat = decimalToDms(result.lat || result.latitude, false) - let params = this.currList.find(item => { - return item.stationId === result.stationId - }) || {} + let params = + this.currList.find((item) => { + return item.stationId === result.stationId + }) || {} this.currStationInfo = { ...result, ...params } } else { this.$message.error(message) @@ -243,7 +243,7 @@ export default { //关闭地图弹窗 closeMapPopup() { this.popupOverlay.setPosition(null) - } + }, }, watch: { list() { @@ -257,19 +257,22 @@ export default { }, currList: { handler(newVal, oldVal) { - this.orgList.forEach(item => { - var layer = this.map.getOverlays().getArray().find(layer=> { - return layer.id === `ripple_${item.stationType}_${item.stationId}`; - }); + this.orgList.forEach((item) => { + var layer = this.map + .getOverlays() + .getArray() + .find((layer) => { + return layer.id === `ripple_${item.stationType}_${item.stationId}` + }) if (layer) { - this.map.removeOverlay(layer); + this.map.removeOverlay(layer) } }) this.initRipples() }, - deep:true - } - } + deep: true, + }, + }, }