From 87712dd66caec13feaad6282d9c42a924b14b375 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 12 六月 2023 14:56:37 +0800
Subject: [PATCH] 2023-06-12

---
 src/templates/zshare/modalform/index.jsx                               |    3 +++
 src/menu/components/card/cardcellcomponent/index.jsx                   |    4 ++++
 src/views/pcdesign/index.jsx                                           |    1 +
 src/menu/components/share/actioncomponent/dragaction/card.jsx          |    6 ++++++
 src/templates/zshare/formconfig.jsx                                    |    1 +
 src/menu/components/card/cardcellcomponent/dragaction/action.jsx       |    7 +++++++
 src/menu/components/share/actioncomponent/index.jsx                    |    4 ++++
 src/templates/zshare/modalform/index.scss                              |    6 ++++++
 src/views/tabledesign/index.jsx                                        |    1 +
 src/menu/components/table/edit-table/columns/editColumn/index.scss     |    6 ++++++
 src/menu/components/table/edit-table/columns/editColumn/index.jsx      |    3 +++
 src/views/mobdesign/index.jsx                                          |    1 +
 src/views/menudesign/index.jsx                                         |    1 +
 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx |    1 +
 14 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx
index 5b2b78c..0fb5013 100644
--- a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx
+++ b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -82,6 +82,12 @@
     className += ' ' + card.checkType
   }
 
+  let updateTime = null
+
+  if (card.updateTime && card.updateTime.indexOf(window.GLOB.curDate) > -1) {
+    updateTime = card.updateTime.substr(11)
+  }
+
   return (
     <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
       <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}>
@@ -90,6 +96,7 @@
         <CloseOutlined className="close" title="鍒犻櫎" onClick={() => delCard(id)} />
         <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={() => changeStyle(id)} />
         {hasProfile ? <ProfileOutlined className="profile" title="setting" onClick={() => profileCard(id)} /> : null}
+        {updateTime}
       </div>
     } trigger="hover">
       <div ref={node => drag(drop(node))} style={_style_} className={'ant-col card-button-cell ant-col-' + className} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}>
diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index 4d09c7e..756e8a2 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -2,6 +2,7 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { Modal, Button } from 'antd'
+import moment from 'moment'
 
 import asyncComponent from '@/utils/asyncComponent'
 import { getCardCellForm } from './formconfig'
@@ -464,6 +465,8 @@
             res.style = {...res.style, ...style}
           }
 
+          res.updateTime = moment().format('YYYY-MM-DD HH:mm')
+
           return res
         }
         return cell
@@ -520,6 +523,7 @@
       let _elements = elements.map(cell => {
         if (cell.uuid === card.uuid) {
           cell.verify = res
+          cell.updateTime = moment().format('YYYY-MM-DD HH:mm')
         }
 
         return cell
diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx
index 3163444..4735517 100644
--- a/src/menu/components/share/actioncomponent/dragaction/card.jsx
+++ b/src/menu/components/share/actioncomponent/dragaction/card.jsx
@@ -97,6 +97,11 @@
     )
   }
 
+  let updateTime = null
+  if (card.updateTime && card.updateTime.indexOf(window.GLOB.curDate) > -1) {
+    updateTime = card.updateTime.substr(11)
+  }
+
   return (
     <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
       <div className="mk-popover-control">
@@ -105,6 +110,7 @@
         <CloseOutlined className="close" onClick={() => delCard(id)} />
         {type !== 'datacard' && type !== 'basetable' ? <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={() => changeStyle(id)}/> : ''}
         {hasProfile ? <ProfileOutlined className="profile" title="楠岃瘉" onClick={() => profileCard(id)} /> : null}
+        {updateTime}
       </div>
     } trigger="hover">
       <div className="page-card" style={{ opacity: opacity}}>
diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx
index 71fd65a..5746ac8 100644
--- a/src/menu/components/share/actioncomponent/index.jsx
+++ b/src/menu/components/share/actioncomponent/index.jsx
@@ -2,6 +2,7 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { Modal, notification, Button } from 'antd'
+import moment from 'moment'
 
 import Utils, { FuncUtils } from '@/utils/utils.js'
 import { getActionForm, getBaseTableActionForm } from './formconfig'
@@ -433,6 +434,8 @@
               btn.style = {}
             }
           }
+
+          btn.updateTime = moment().format('YYYY-MM-DD HH:mm')
           return btn
         } else {
           return item
@@ -505,6 +508,7 @@
       _actionlist = _actionlist.map(item => {
         if (item.uuid === card.uuid) {
           item.verify = res
+          item.updateTime = moment().format('YYYY-MM-DD HH:mm')
         }
   
         return item
diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
index ae3c8f1..263da80 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -265,6 +265,7 @@
       key: 'dataSource',
       label: '鏁版嵁婧�',
       initVal: card.dataSource || '',
+      placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆�',
       required: true,
     },
     {
diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index 9a0143c..06b4348 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -373,6 +373,9 @@
         className = 'text-area'
 
         extra = <span className="add-resource-empty" onClick={this.handleEmpty}>绌�</span>
+        if (item.placeholder) {
+          extra = <><span className="resource-public-var">{item.placeholder}</span>{extra}</>
+        }
 
         content = <CodeMirror />
       } else if (item.type === 'options') {
diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.scss b/src/menu/components/table/edit-table/columns/editColumn/index.scss
index 4b369ac..05b0e19 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.scss
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.scss
@@ -37,6 +37,12 @@
     cursor: pointer;
     font-size: 14px;
   }
+  .resource-public-var {
+    position: absolute;
+    left: 0px;
+    top: -25px;
+    font-size: 14px;
+  }
   >.ant-row >.ant-col {
     display: inline-block;
     vertical-align: top;
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index bd96bbb..9512ea7 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -2854,6 +2854,7 @@
       key: 'dataSource',
       label: '鏁版嵁婧�',
       initVal: card.dataSource || '',
+      placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆�',
       required: true,
       readonly: false
     },
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index 335f222..e766b8b 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -727,6 +727,9 @@
         if (this.record.type === 'select' || this.record.type === 'link') {
           extra = <span className="add-resource-empty" onClick={this.handleEmpty}>绌�</span>
         }
+        if (item.placeholder) {
+          extra = <><span className="resource-public-var">{item.placeholder}</span>{extra}</>
+        }
 
         content = <CodeMirror />
       } else if (item.type === 'textarea') {
diff --git a/src/templates/zshare/modalform/index.scss b/src/templates/zshare/modalform/index.scss
index ee25254..23d5929 100644
--- a/src/templates/zshare/modalform/index.scss
+++ b/src/templates/zshare/modalform/index.scss
@@ -47,6 +47,12 @@
     cursor: pointer;
     font-size: 14px;
   }
+  .resource-public-var {
+    position: absolute;
+    left: 0px;
+    top: -25px;
+    font-size: 14px;
+  }
   >.ant-row >.ant-col {
     display: inline-block;
     vertical-align: top;
diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index 9c6ac42..eac50e4 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -82,6 +82,7 @@
 
     sessionStorage.setItem('editMenuType', 'menu') // 缂栬緫鑿滃崟绫诲瀷
 
+    window.GLOB.curDate = moment().format('YYYY-MM-DD')
     window.GLOB.UserComponentMap = new Map() // 缂撳瓨鐢ㄦ埛鑷畾涔夌粍浠�
     window.GLOB.TabsMap = new Map()          // 缂撳瓨鐢ㄦ埛鎿嶄綔鐨勬爣绛鹃〉
     window.GLOB.urlFields = []               // url鍙橀噺
diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index a79b390..9fca5e9 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -111,6 +111,7 @@
         window.GLOB.winHeight = 738
         window.GLOB.shellWidth = 376
         window.GLOB.shellHeight = 680
+        window.GLOB.curDate = moment().format('YYYY-MM-DD')
 
         let adapters = sessionStorage.getItem('adapter')
         if (adapters) {
diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index fd6fec5..2badd14 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -87,6 +87,7 @@
 
     sessionStorage.setItem('editMenuType', 'menu') // 缂栬緫鑿滃崟绫诲瀷
 
+    window.GLOB.curDate = moment().format('YYYY-MM-DD')
     window.GLOB.TabsMap = new Map()          // 缂撳瓨鐢ㄦ埛鎿嶄綔鐨勬爣绛鹃〉
     window.GLOB.CacheIndependent = new Map()
     window.GLOB.urlFields = []               // url鍙橀噺
diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx
index d99589e..25d0d54 100644
--- a/src/views/tabledesign/index.jsx
+++ b/src/views/tabledesign/index.jsx
@@ -72,6 +72,7 @@
     
     sessionStorage.setItem('editMenuType', 'menu') // 缂栬緫鑿滃崟绫诲瀷
 
+    window.GLOB.curDate = moment().format('YYYY-MM-DD')
     window.GLOB.UserComponentMap = new Map() // 缂撳瓨鐢ㄦ埛鑷畾涔夌粍浠�
     window.GLOB.TabsMap = new Map()          // 缂撳瓨鐢ㄦ埛鎿嶄綔鐨勬爣绛鹃〉
     window.GLOB.urlFields = []               // url鍙橀噺

--
Gitblit v1.8.0