From 6830aad220f6b8f263b2e64eaaae56a6ad785afd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 06 十二月 2023 10:18:06 +0800 Subject: [PATCH] 2023-12-06 --- src/index.js | 1 src/views/rolemanage/index.jsx | 32 +++++++++++++++- src/menu/components/chart/antv-bar/chartcompile/index.jsx | 10 ++-- src/menu/components/chart/antv-bar/index.jsx | 4 ++ src/views/design/sidemenu/index.scss | 4 ++ src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 9 ++-- src/views/design/header/index.jsx | 1 src/views/design/sidemenu/index.jsx | 2 public/README.txt | 1 9 files changed, 52 insertions(+), 12 deletions(-) diff --git a/public/README.txt b/public/README.txt index 4c9b587..bbd418f 100644 --- a/public/README.txt +++ b/public/README.txt @@ -17,4 +17,5 @@ probation -- 璇曠敤鏈燂紙YYYY-MM-DD锛夛紝鍦ㄦ寮忕郴缁熶腑锛岃瘯鐢ㄦ湡鍐呰皟鐢ㄧ郴缁熸帴鍙g殑鑴氭湰浼氳褰曚笅鏉� transfer -- 鏄惁浣跨敤杞帴鍙o紝浣跨敤杞帴鍙f椂璇疯缃负 true, 浣跨敤杞帴鍙f椂锛屽閮ㄦ帴鍙h皟鐢ㄥ墠涓嶄細鍋氱櫥褰曢獙璇� keepPassword -- 璁颁綇瀵嗙爜锛岄粯璁ゅ紑鍚紝褰撳�间负 false 鏃剁鐢� +updateStatus -- 鏄惁鏇存柊寮�鍙戠姸鎬侊紝榛樿寮�鍚紝褰撳�间负 false 鏃剁鐢� platforms -- 绉诲姩绔彲浣跨敤鐨勫钩鍙扮被鍨嬶紝榛樿涓� ["H5", "wechat", "android", "ios", "wxMiniProgram"] 鍒嗗埆浠h〃H5椤甸潰銆佸井淇″叕浼楀彿銆佸畨鍗揂PP銆佽嫻鏋淎PP銆佸井淇″皬绋嬪簭 \ No newline at end of file diff --git a/src/index.js b/src/index.js index b0c1060..155e3ac 100644 --- a/src/index.js +++ b/src/index.js @@ -49,6 +49,7 @@ GLOB.watermark = config.watermark + '' !== 'false' GLOB.transfer = config.transfer + '' === 'true' GLOB.keepKey = config.keepPassword + '' !== 'false' + GLOB.upStatus = config.updateStatus + '' !== 'false' GLOB.nginx = config.nginx + '' === 'true' GLOB.WXAppID = config.WXAppID || '' GLOB.WXminiAppID = config.WXminiAppID || '' diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index f983cf6..eb4498f 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -240,10 +240,11 @@ shapes = [ { field: 'rect', label: 'rect锛堢煩褰級' }, { field: 'hollow-rect', label: 'hollow-rect锛堢┖蹇冪煩褰級' }, - { field: 'line', label: 'line锛堢嚎鏉★級' }, - { field: 'tick', label: 'tick锛堟尝鍔級' }, - // { field: 'funnel', label: 'funnel' }, - { field: 'pyramid', label: 'pyramid锛堣閿ワ級' } + // { field: 'hollow', label: 'hollow锛堢┖蹇冪煩褰級' }, + // { field: 'line', label: 'line锛堢嚎鏉★級' }, + // { field: 'tick', label: 'tick锛堟尝鍔級' }, + // { field: 'funnel', label: 'funnel锛堟紡鏂楀浘锛�' }, + { field: 'pyramid', label: 'pyramid锛堥噾瀛楀锛�' } ] } diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.jsx b/src/menu/components/chart/antv-bar/chartcompile/index.jsx index da6cd0d..d7ba22d 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/index.jsx @@ -249,10 +249,10 @@ children: [ { value: 'rect', label: 'rect锛堢煩褰級' }, { value: 'hollow-rect', label: 'hollow-rect锛堢┖蹇冪煩褰級' }, - { value: 'line', label: 'line锛堢嚎鏉★級' }, - { value: 'tick', label: 'tick锛堟尝鍔級' }, - // { value: 'funnel', label: 'funnel' }, - { value: 'pyramid', label: 'pyramid锛堣閿ワ級' } + // { value: 'line', label: 'line锛堢嚎鏉★級' }, + // { value: 'tick', label: 'tick锛堟尝鍔級' }, + // { value: 'funnel', label: 'funnel锛堟紡鏂楀浘锛�' }, + { value: 'pyramid', label: 'pyramid锛堥噾瀛楀锛�' } ], } ] @@ -653,7 +653,7 @@ {datatype === 'statistics' ? <EditTable actions={['edit', 'move', 'del']} data={plot.colors || []} columns={plot.ramp ==='true' ? rampStatColorColumns : statColorColumns} onChange={this.changeColor}/> : null} {datatype !== 'statistics' ? <EditTable actions={['edit']} data={plot.colors || []} columns={plot.ramp ==='true' ? rampColorColumns : colorColumns} onChange={this.changeColor}/> : null} {plot.chartType === 'bar' && plot.datatype === 'query' ? <div className="mk-bar-colors"> - <p>鏌卞舰棰滆壊锛氬彲鏍规嵁鏌卞浘搴忓彿璁剧疆棰滆壊锛堣璁剧疆鏌卞舰瀹藉害锛夈�傛敞锛氫娇鐢ㄨ嚜瀹氫箟鍥惧舰璁剧疆鎴栧鏍规煴鍥炬椂鏃犳晥銆�</p> + <p>鏌卞舰棰滆壊锛氬彲鏍规嵁鏌卞浘搴忓彿璁剧疆棰滆壊銆傛敞锛氫娇鐢ㄨ嚜瀹氫箟鍥惧舰璁剧疆鎴栧鏍规煴鍥炬椂鏃犳晥銆�</p> <div className="bar-color-add"><PlusOutlined onClick={this.addbarColor}/></div> <EditTable actions={['edit', 'move', 'del']} data={plot.barcolors || []} columns={barColorColumns} onChange={this.changebarColor}/> </div> : null} diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx index 717559d..8074b88 100644 --- a/src/menu/components/chart/antv-bar/index.jsx +++ b/src/menu/components/chart/antv-bar/index.jsx @@ -1353,6 +1353,10 @@ }) } + if (card.plot.barcolors && (card.plot.enabled === 'true' || card.plot.datatype === 'statistics')) { + card.plot.barcolors = null + } + this.updateComponent(card) } diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx index aac2998..e8c88b3 100644 --- a/src/views/design/header/index.jsx +++ b/src/views/design/header/index.jsx @@ -141,6 +141,7 @@ EasyCode: trd.EasyCode, type: 'CommonTable', // 榛樿鍊间负甯哥敤琛� OpenType: 'newtab', // 鎵撳紑鏂瑰紡 + up_action: window.GLOB.upStatus && trd.up_action === 'Y', level: 'third' } diff --git a/src/views/design/sidemenu/index.jsx b/src/views/design/sidemenu/index.jsx index 959ed2d..83ff546 100644 --- a/src/views/design/sidemenu/index.jsx +++ b/src/views/design/sidemenu/index.jsx @@ -326,7 +326,7 @@ {item.children.map(cell => { return ( <Menu.Item key={cell.MenuID}> - <span className="editable-menu-item" onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam && cell.PageParam.interfaces === 'true' ? <ApiOutlined title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{cell.MenuName}</span> + <span className={'editable-menu-item ' + (cell.up_action ? 'unupdate' : '')} onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam && cell.PageParam.interfaces === 'true' ? <ApiOutlined title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{cell.MenuName}</span> </Menu.Item> ) })} diff --git a/src/views/design/sidemenu/index.scss b/src/views/design/sidemenu/index.scss index bf1a210..3521e56 100644 --- a/src/views/design/sidemenu/index.scss +++ b/src/views/design/sidemenu/index.scss @@ -24,6 +24,10 @@ color: orange; } } + + .editable-menu-item.unupdate { + color: orange; + } } .ant-menu-sub.ant-menu-inline { position: relative; diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index e246e2b..3a273df 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -23,6 +23,7 @@ app: null, loading: false, menulist: [], + sortType: '', columns: [ { title: '鑿滃崟鍚嶇О', dataIndex: 'MenuName', key: 'MenuName', align: 'center', render: (text, record) => { @@ -36,6 +37,14 @@ }, { title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo', align: 'center' + }, + { + title: '淇敼鏃堕棿', dataIndex: 'modifydate', key: 'modifydate', align: 'center', sorter: true, render: (text, record) => { + if (window.GLOB.upStatus && record.up_action === 'Y') { + return <span style={{color: 'orange'}}>{text}</span> + } + return text + } }, { title: '鎿嶄綔', @@ -878,12 +887,30 @@ window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`)) } + changeTable = (pagination, filters, sorter) => { + this.setState({sortType: sorter.order || ''}) + } + render () { - const { app, loading, columns, menulist, trees, searchkey } = this.state - let _menulist = menulist + const { app, loading, columns, menulist, trees, searchkey, sortType } = this.state + let _menulist = fromJS(menulist).toJS() if (searchkey) { _menulist = _menulist.filter(item => item.MenuName.toLowerCase().indexOf(searchkey.toLowerCase()) > -1) + } + + if (sortType === 'ascend') { + _menulist.sort((a, b) => { + if (a.modifydate > b.modifydate) return 1 + if (a.modifydate < b.modifydate) return -1 + return 0 + }) + } else if (sortType === 'descend') { + _menulist.sort((a, b) => { + if (a.modifydate < b.modifydate) return 1 + if (a.modifydate > b.modifydate) return -1 + return 0 + }) } return ( @@ -907,6 +934,7 @@ columns={columns} dataSource={_menulist} pagination={false} + onChange={this.changeTable} /> </div> </div> -- Gitblit v1.8.0