From fa8f1b1320fd2ad21884ccd6df792bf88270e2a1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 06 七月 2023 18:13:51 +0800
Subject: [PATCH] 2023-07-06

---
 src/menu/components/calendar/index.jsx |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/calendar/index.jsx b/src/menu/components/calendar/index.jsx
index 8338dbb..e4bf1fb 100644
--- a/src/menu/components/calendar/index.jsx
+++ b/src/menu/components/calendar/index.jsx
@@ -15,6 +15,7 @@
 const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
 const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
 const SearchComponent = asyncComponent(() => import('@/templates/sharecomponent/searchcomponent'))
+const ActionComponent = asyncComponent(() => import('@/menu/components/share/actioncomponent'))
 const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
 const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
 const CalendarBoard = asyncComponent(() => import('./board'))
@@ -34,6 +35,7 @@
     const { card } = this.props
 
     if (card.isNew) {
+      let btnId = Utils.getuuid()
       let _card = {
         uuid: card.uuid,
         type: card.type,
@@ -44,12 +46,40 @@
         name: card.name,
         subtype: card.subtype,
         setting: { interType: 'system' },
-        wrap: { title: '', name: card.name, width: card.width || 24, levels: ['day', 'month'] },
+        wrap: { title: '', name: card.name, width: card.width || 24, levels: ['day', 'month', 'year'] },
         style: { marginLeft: '0px', marginRight: '0px', marginTop: '0px', marginBottom: '0px' },
         headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' },
         search: [],
         columns: [],
         scripts: [],
+        action: [{
+          $fixed: true,
+          uuid: btnId,
+          label: '娣诲姞',
+          OpenType: 'popview',
+          popClose: 'grid',
+          display: 'modal',
+          icon: '',
+          class: 'green',
+          ratio: 85,
+          style: {
+            color: 'rgb(255, 255, 255)',
+            background: 'rgb(38, 194, 129)',
+            marginRight: '15px'
+          },
+          config: {
+            uuid: btnId,
+            MenuID: btnId,
+            ParentId: card.uuid,
+            enabled: false,
+            MenuName: '娣诲姞',
+            tables: [],
+            Template: 'CustomPage',
+            components: [],
+            viewType: 'popview',
+            style: { backgroundColor: '#ffffff', paddingTop: '16px', paddingBottom: '40px', paddingLeft: '16px', paddingRight: '16px' }
+          }
+        }]
       }
 
       if (card.config) {
@@ -164,6 +194,15 @@
     this.updateComponent({...card, wrap: res})
   }
 
+  setSubConfig = (item) => {
+    const { card } = this.state
+    let btn = fromJS(item).toJS()
+
+    if (btn.OpenType === 'popview') {
+      MKEmitter.emit('changePopview', card, btn)
+    }
+  }
+
   render() {
     const { card } = this.state
 
@@ -187,6 +226,7 @@
           <ToolOutlined />
         </Popover>
         <SearchComponent config={card} updatesearch={this.updateComponent}/>
+        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
         <CalendarBoard config={card} />
         <div className="component-name">
           <div className="center">

--
Gitblit v1.8.0