From e5827f9a6528f5dc39ec6b58d3bb8174052d55e6 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Fri, 24 Jun 2022 21:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/tinymce/plugins/indent2em/plugin.js | 62 +++++++++++++++++++ .../tinymce/plugins/indent2em/plugin.min.js | 62 +++++++++++++++++++ src/components/Tinymce/index.vue | 2 +- src/views/active/activity.vue | 13 +++- src/views/order/parkorder.vue | 13 ++++ src/views/resource/addressinfo.vue | 16 ++++- src/views/resource/parking.vue | 25 ++++++-- 7 files changed, 180 insertions(+), 13 deletions(-) create mode 100755 public/tinymce/plugins/indent2em/plugin.js create mode 100755 public/tinymce/plugins/indent2em/plugin.min.js diff --git a/public/tinymce/plugins/indent2em/plugin.js b/public/tinymce/plugins/indent2em/plugin.js new file mode 100755 index 0000000..b9d8382 --- /dev/null +++ b/public/tinymce/plugins/indent2em/plugin.js @@ -0,0 +1,62 @@ +tinymce.PluginManager.add('indent2em', function(editor, url) { + var pluginName='首行缩进'; + var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); + var indent2em_val = editor.getParam('indent2em_val', '2em'); + var doAct = function () { + var dom = editor.dom; + var blocks = editor.selection.getSelectedBlocks(); + var act = ''; + global$1.each(blocks, function (block) { + if(act==''){ + act = dom.getStyle(block,'text-indent')==indent2em_val ? 'remove' : 'add'; + } + if( act=='add' ){ + dom.setStyle(block, 'text-indent', indent2em_val); + }else{ + var style=dom.getAttrib(block,'style'); + var reg = new RegExp('text-indent:[\\s]*' + indent2em_val + ';', 'ig'); + style = style.replace(reg, ''); + dom.setAttrib(block,'style',style); + } + + }); + }; + + editor.ui.registry.getAll().icons.indent2em || editor.ui.registry.addIcon('indent2em',''); + + var stateSelectorAdapter = function (editor, selector) { + return function (buttonApi) { + return editor.selection.selectorChangedWithUnbind(selector.join(','), buttonApi.setActive).unbind; + }; + }; + + editor.ui.registry.addToggleButton('indent2em', { + icon: 'indent2em', + tooltip: pluginName, + onAction: function () { + doAct(); + }, + onSetup: stateSelectorAdapter(editor, [ + '*[style*="text-indent"]', + '*[data-mce-style*="text-indent"]', + ]) + }); + + editor.ui.registry.addMenuItem('indent2em', { + text: pluginName, + onAction: function() { + doAct(); + } + }); + + editor.addCommand('indent2em', doAct ); + + return { + getMetadata: function () { + return { + name: pluginName, + url: "http://tinymce.ax-z.cn/more-plugins/indent2em.php", + }; + } + }; +}); diff --git a/public/tinymce/plugins/indent2em/plugin.min.js b/public/tinymce/plugins/indent2em/plugin.min.js new file mode 100755 index 0000000..b9d8382 --- /dev/null +++ b/public/tinymce/plugins/indent2em/plugin.min.js @@ -0,0 +1,62 @@ +tinymce.PluginManager.add('indent2em', function(editor, url) { + var pluginName='首行缩进'; + var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); + var indent2em_val = editor.getParam('indent2em_val', '2em'); + var doAct = function () { + var dom = editor.dom; + var blocks = editor.selection.getSelectedBlocks(); + var act = ''; + global$1.each(blocks, function (block) { + if(act==''){ + act = dom.getStyle(block,'text-indent')==indent2em_val ? 'remove' : 'add'; + } + if( act=='add' ){ + dom.setStyle(block, 'text-indent', indent2em_val); + }else{ + var style=dom.getAttrib(block,'style'); + var reg = new RegExp('text-indent:[\\s]*' + indent2em_val + ';', 'ig'); + style = style.replace(reg, ''); + dom.setAttrib(block,'style',style); + } + + }); + }; + + editor.ui.registry.getAll().icons.indent2em || editor.ui.registry.addIcon('indent2em',''); + + var stateSelectorAdapter = function (editor, selector) { + return function (buttonApi) { + return editor.selection.selectorChangedWithUnbind(selector.join(','), buttonApi.setActive).unbind; + }; + }; + + editor.ui.registry.addToggleButton('indent2em', { + icon: 'indent2em', + tooltip: pluginName, + onAction: function () { + doAct(); + }, + onSetup: stateSelectorAdapter(editor, [ + '*[style*="text-indent"]', + '*[data-mce-style*="text-indent"]', + ]) + }); + + editor.ui.registry.addMenuItem('indent2em', { + text: pluginName, + onAction: function() { + doAct(); + } + }); + + editor.addCommand('indent2em', doAct ); + + return { + getMetadata: function () { + return { + name: pluginName, + url: "http://tinymce.ax-z.cn/more-plugins/indent2em.php", + }; + } + }; +}); diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue index bcd4633..b08c826 100644 --- a/src/components/Tinymce/index.vue +++ b/src/components/Tinymce/index.vue @@ -134,7 +134,7 @@ imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'], default_link_target: '_blank', link_title: false, - nonbreaking_force_tab: true, // inserting nonbreaking space   need Nonbreaking Space Plugin + nonbreaking_force_tab: true, // inserting nonbreaking space   need Nonbreaking Space Plugin init_instance_callback: editor => { if (_this.value) { editor.setContent(_this.value) diff --git a/src/views/active/activity.vue b/src/views/active/activity.vue index 8e4d3ef..898cde3 100644 --- a/src/views/active/activity.vue +++ b/src/views/active/activity.vue @@ -176,7 +176,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -559,7 +559,7 @@ return false; } // console.log(a) - + // that.form.end_time = that.form.start_time.substring(0, 10) + " " + that.form.end_time; let listUrl = []; for (var m of that.bannersList) { @@ -725,3 +725,10 @@ } }; + diff --git a/src/views/order/parkorder.vue b/src/views/order/parkorder.vue index f53530e..a67a6ad 100644 --- a/src/views/order/parkorder.vue +++ b/src/views/order/parkorder.vue @@ -22,6 +22,11 @@
+
+
+
小车位
+
大车位
+
残疾人车位
{{scope.row[column.field]}}
@@ -59,6 +64,9 @@
大车位 +
+
+ 残疾人车位
@@ -139,6 +147,11 @@ field: "plate", title: "车牌号", type: "string", + }, + { + field: "type", + title: "车位类型", + type: "type", }, { field: "mobile", diff --git a/src/views/resource/addressinfo.vue b/src/views/resource/addressinfo.vue index 96c94a1..437c67f 100644 --- a/src/views/resource/addressinfo.vue +++ b/src/views/resource/addressinfo.vue @@ -45,10 +45,16 @@ - +
+ +
+
- +
+ +
+
@@ -181,6 +187,8 @@ let result = Object.assign(that.form, res); that.form = result; this.$refs.tiny.setContent(result.content); + this.$refs.tiny1.setContent(result.team_notice); + this.$refs.tiny2.setContent(result.person_notice); }).catch(error => { }) @@ -217,7 +225,9 @@ }, resetForm(formName) { var that = this; - this.$refs.tiny.setContent(""); + this.$refs.tiny.setContent(""); + this.$refs.tiny1.setContent(""); + this.$refs.tiny2.setContent(""); this.$refs[formName].resetFields(); that.dialogFormVisible = false; }, diff --git a/src/views/resource/parking.vue b/src/views/resource/parking.vue index fc5305a..c10d1c1 100644 --- a/src/views/resource/parking.vue +++ b/src/views/resource/parking.vue @@ -99,11 +99,6 @@ - - - - - @@ -113,6 +108,16 @@ + + + + + + + + + + @@ -165,7 +170,8 @@ end_time: "", charge_total: "", small_park_total: "", - big_park_total: "", + big_park_total: "", + special_park_total:"", longitude: "", latitude: "", }, @@ -206,6 +212,13 @@ type: "string", align: "center", width: 120 + }, + { + field: "special_park_total", + title: "残疾人车位数", + type: "string", + align: "center", + width: 120 }, { field: "status",