From ca5f73fd17140a284b0952b2db08f03b239f4708 Mon Sep 17 00:00:00 2001
From: LCZ1097641742 <1151568399@qq.com>
Date: Thu, 13 Apr 2023 22:03:41 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E8=87=AA=E9=80=82=E5=BA=94?=
=?UTF-8?q?=E6=8F=92=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
plugin.xml | 2 +-
.../plugin/sqy/kj/calendar/js/plugin_main.js | 123 +++++++++++++++++-
2 files changed, 123 insertions(+), 2 deletions(-)
diff --git a/plugin.xml b/plugin.xml
index 49c6b55..73b2b02 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -3,7 +3,7 @@
yes
1.1.1
- 10.0
+ 10.0~11.0
yy
2021-05-26
diff --git a/src/main/resources/com/fr/plugin/sqy/kj/calendar/js/plugin_main.js b/src/main/resources/com/fr/plugin/sqy/kj/calendar/js/plugin_main.js
index 704210b..55c3579 100644
--- a/src/main/resources/com/fr/plugin/sqy/kj/calendar/js/plugin_main.js
+++ b/src/main/resources/com/fr/plugin/sqy/kj/calendar/js/plugin_main.js
@@ -1400,4 +1400,125 @@
$.shortcut("sqy_cell_calendar",FR.sqy_calendar);
$.shortcut("sqy_parameter_calendar",FR.sqy_calendar);
$.shortcut("sqy_form_calendar",FR.sqy_calendar);
-})(jQuery);
\ No newline at end of file
+})(jQuery);
+
+
+!(function () {
+ try {
+ try {
+ var provider = BI.Providers.getProvider("report.controller.provider");
+ } catch (e) {
+ return ;
+ }
+ if (provider && provider.get('sqy_form_calendar') !== 'report.main.parameter_container.controller.empty') {
+ return;
+ }
+ var ImplClass = provider.getImpl();
+
+ var Widget = BI.inherit(ImplClass, {
+ mounted: function() {
+ var self = this;
+
+ this.widget = FR.createWidget(BI.extend({}, this.options, {
+ type: 'sqy_form_calendar',
+ listeners: this.options.xlisteners,
+ renderEl: this.element[0]
+ }));
+
+ this.widget.on('click', function () {
+ self.fireEvent('EVENT_CHANGE');
+ });
+ },
+
+ initData: function() { return (this.widget && this.widget.initData.apply(this.widget, arguments)) },
+
+ focusDown: function() { return (this.widget && this.widget.focusDown.apply(this.widget, arguments)) },
+
+ focusUp: function() { return (this.widget && this.widget.focusUp.apply(this.widget, arguments)) },
+
+ setOptions: function() { return (this.widget && this.widget.setOptions.apply(this.widget, arguments)) },
+
+ setTraversal: function() { return (this.widget && this.widget.setTraversal.apply(this.widget, arguments)) },
+
+ checkViewScroll: function() { return (this.widget && this.widget.checkViewScroll.apply(this.widget, arguments)) },
+
+ initFilterData: function() { return (this.widget && this.widget.initFilterData.apply(this.widget, arguments)) },
+
+ dealWithDisplayValue: function() { return (this.widget && this.widget.dealWithDisplayValue.apply(this.widget, arguments)) },
+
+ getValue: function() { return (this.widget && this.widget.getValue.apply(this.widget, arguments)) },
+
+ getEditValue: function() { return (this.widget && this.widget.getEditValue.apply(this.widget, arguments)) },
+
+ getFullPathValue: function() { return (this.widget && this.widget.getFullPathValue.apply(this.widget, arguments)) },
+
+ recoveryValue: function() { return (this.widget && this.widget.recoveryValue.apply(this.widget, arguments)) },
+
+ getText: function() { return (this.widget && this.widget.getText.apply(this.widget, arguments)) },
+
+ fixViewWidth: function() { return (this.widget && this.widget.fixViewWidth.apply(this.widget, arguments)) },
+
+ isComboBoxTree: function() { return (this.widget && this.widget.isComboBoxTree.apply(this.widget, arguments)) },
+
+ reset: function() { return (this.widget && this.widget.reset.apply(this.widget, arguments)) },
+
+ getValueNodes: function() { return (this.widget && this.widget.getValueNodes.apply(this.widget, arguments)) },
+
+ getNode: function() { return (this.widget && this.widget.getNode.apply(this.widget, arguments)) },
+
+ getSelectedNodes: function() { return (this.widget && this.widget.getSelectedNodes.apply(this.widget, arguments)) },
+
+ getNodeByID: function() { return (this.widget && this.widget.getNodeByID.apply(this.widget, arguments)) },
+
+ isValueInList: function() { return (this.widget && this.widget.isValueInList.apply(this.widget, arguments)) },
+
+ isValidate: function() { return (this.widget && this.widget.isValidate.apply(this.widget, arguments)) },
+
+ preGetValidation: function() { return { result: this.isValidate.apply(this, arguments) } },
+
+ postGetValidation: function () {
+ const { errorMsg } = this.options;
+ const valid = this.isValidate.apply(this, arguments);
+ if (!valid) {
+ return {
+ result: false,
+ errorMsg: errorMsg || BI.i18nText('Fine-Report_Preview_Can_Not_Null'),
+ }
+ }
+ return { result: true };
+ },
+ postValidateAndToast: function () {
+ const validation = this.getValidation();
+ if (validation.result) {
+ return true;
+ }
+ this.showBubble(validation.errorMsg);
+ return false;
+ },
+
+ getBubbleParents: function() { return (this.widget && this.widget.getBubbleParents.apply(this.widget, arguments)) },
+
+ getCascadeParents: function() { return (this.widget && this.widget.getCascadeParents.apply(this.widget, arguments)) },
+
+ setInteractValue: function(v) {
+ this.widget && this.widget.reset();
+ this.widget && this.widget.setValue.apply(this.widget, [v ? v.value : ""]);
+ },
+
+ setControllerValue: function() { this.widget && this.widget.setValue.apply(this.widget, arguments) },
+
+ resize: function(width, height) {
+ this.widget && this.widget.doResize({
+ width: width,
+ height: height
+ });
+ }
+ });
+
+ Widget.xtype = "report.sqy_form_calendar";
+ BI.shortcut(Widget.xtype, Widget);
+ provider.set('sqy_form_calendar', Widget.xtype);
+ } catch (e) {
+ console.error(e);
+ }
+})();
\ No newline at end of file