From b106dc00fc0ff552e0f86a2f7fa675e296ba2287 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 27 三月 2024 21:37:39 +0800 Subject: [PATCH] 2024-03-27 --- src/tabviews/custom/components/chart/antv-X6/index.scss | 33 ++++++++++++++-- src/tabviews/custom/components/chart/antv-X6/index.jsx | 35 +++++++++++++---- src/menu/debug/index.jsx | 8 ---- src/views/mkiframe/index.jsx | 5 ++ src/templates/zshare/verifycard/customscript/index.jsx | 13 +----- src/utils/utils.js | 8 ---- 6 files changed, 61 insertions(+), 41 deletions(-) diff --git a/src/menu/debug/index.jsx b/src/menu/debug/index.jsx index d4e4395..62a02cb 100644 --- a/src/menu/debug/index.jsx +++ b/src/menu/debug/index.jsx @@ -770,14 +770,6 @@ } _sql = `Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50)${_declarefields} ` - - if (verify.workFlow === 'true' && process) { - _sql += ` - /* 宸ヤ綔娴佸彉閲忓畾涔変笌璧嬪�� */ - Declare @works_flow_code nvarchar(50),@works_flow_name nvarchar(50),@works_flow_param nvarchar(4000),@works_flow_detail_id nvarchar(50),@status int,@statusname nvarchar(50), @work_group nvarchar(50),@work_grade int, @start_type nvarchar(50),@check_type nvarchar(50),@notice_type nvarchar(50),@check_userids nvarchar(512),@notice_userids nvarchar(512) - select @works_flow_code=@works_flow_code@,@works_flow_name=@works_flow_name@,@works_flow_param=@works_flow_param@,@works_flow_detail_id=@works_flow_detail_id@,@status=@status@,@statusname=@statusname@,@work_group=@work_group@,@work_grade=@work_grade@, @start_type=@start_type@,@check_type=@check_type@,@notice_type=@notice_type@,@check_userids=@check_userids@,@notice_userids=@notice_userids@ - ` - } let userName = 'User_Name' let fullName = 'Full_Name' diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx index bbbc859..4e155ba 100644 --- a/src/tabviews/custom/components/chart/antv-X6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/index.jsx @@ -1,8 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Spin, Tooltip, message, Modal, notification, Switch } from 'antd' -import { UndoOutlined, RedoOutlined, VerticalAlignTopOutlined, VerticalAlignBottomOutlined, SaveOutlined, ZoomInOutlined, ZoomOutOutlined, OneToOneOutlined, QuestionCircleOutlined, ClearOutlined } from '@ant-design/icons' +import { Spin, Tooltip, message, Modal, notification, Switch, Button } from 'antd' +import { UndoOutlined, RedoOutlined, VerticalAlignTopOutlined, VerticalAlignBottomOutlined, ZoomInOutlined, ZoomOutOutlined, OneToOneOutlined, QuestionCircleOutlined, ClearOutlined } from '@ant-design/icons' import { Graph, Shape } from '@antv/x6' import { Stencil } from '@antv/x6-plugin-stencil' import { Transform } from '@antv/x6-plugin-transform' @@ -1544,6 +1544,26 @@ this.mkGraph.zoomTo(1) } + close = () => { + const { config } = this.state + + let nodes = this.mkGraph.toJSON() + + if (!is(fromJS(nodes.cells), fromJS(this.cells))) { + confirm({ + title: '娴佺▼鍥惧凡淇敼锛岀‘瀹氬叧闂悧?', + okText: '纭畾', + cancelText: '鍙栨秷', + onOk() { + MKEmitter.emit('closeTabView', config.$pageId) + }, + onCancel() {} + }) + } else { + MKEmitter.emit('closeTabView', config.$pageId) + } + } + save = () => { const { BID, plot, status, flowname, flowcode } = this.state @@ -1638,6 +1658,7 @@ loading: false, status: _status }) + this.cells = nodes.cells } else { notification.error({ top: 92, @@ -1659,6 +1680,7 @@ loading: false, status: _status }) + this.cells = nodes.cells } } else { notification.error({ @@ -2270,12 +2292,9 @@ </div> <div className="flow-name">{flowname}</div> <div className="right-tool"> - <Tooltip title="鍚敤/鍋滅敤"> - <Switch size="large" style={{marginRight: '10px'}} checked={status === 10} onChange={this.changeStatus} /> - </Tooltip> - <Tooltip title="淇濆瓨"> - <SaveOutlined style={{marginRight: '10px'}} onClick={this.save}/> - </Tooltip> + <Switch size="large" checked={status === 10} checkedChildren="鍚�" unCheckedChildren="鍋�" onChange={this.changeStatus} /> + <Button className="save" onClick={this.save}>淇濆瓨</Button> + <Button className="close" onClick={this.close}>鍏抽棴</Button> </div> </div> <div className="canvas" style={{width: '100%', minHeight: config.plot.height, height: config.plot.height}} id={config.uuid + 'canvas'}> diff --git a/src/tabviews/custom/components/chart/antv-X6/index.scss b/src/tabviews/custom/components/chart/antv-X6/index.scss index 7888b42..5fc7c62 100644 --- a/src/tabviews/custom/components/chart/antv-X6/index.scss +++ b/src/tabviews/custom/components/chart/antv-X6/index.scss @@ -32,11 +32,34 @@ .right-tool { float: right; line-height: 40px; - .anticon { - margin: 0 10px; - font-size: 22px; - cursor: pointer; - vertical-align: middle; + + .ant-switch { + min-width: 60px; + height: 28px; + line-height: 28px; + margin-top: -2px; + .ant-switch-inner { + font-size: 14px; + } + } + .ant-switch:after { + width: 24px; + height: 24px; + } + .save, .save:hover, .save:active, .save:focus { + border-color: var(--mk-sys-color); + background-color: var(--mk-sys-color); + color: #ffffff; + margin: 0 15px; + height: 30px; + } + .close { + margin-right: 15px; + } + .close:hover, .close:active, .close:focus { + border-color: var(--mk-sys-color); + color: var(--mk-sys-color); + height: 30px; } } } diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index e373407..e738f2a 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -128,16 +128,7 @@ } } - let sql = this.props.initsql - if (window.GLOB.process && workFlow === 'true') { - sql += ` - /* 宸ヤ綔娴佸彉閲忓畾涔変笌璧嬪�� */ - Declare @works_flow_code nvarchar(50),@works_flow_name nvarchar(50),@works_flow_param nvarchar(4000),@works_flow_detail_id nvarchar(50),@status int,@statusname nvarchar(50), @work_group nvarchar(50),@work_grade int, @start_type nvarchar(50),@check_type nvarchar(50),@notice_type nvarchar(50),@check_userids nvarchar(512),@notice_userids nvarchar(512) - select @works_flow_code=@works_flow_code@,@works_flow_name=@works_flow_name@,@works_flow_param=@works_flow_param@,@works_flow_detail_id=@works_flow_detail_id@,@status=@status@,@statusname=@statusname@,@work_group=@work_group@,@work_grade=@work_grade@, @start_type=@start_type@,@check_type=@check_type@,@notice_type=@notice_type@,@check_userids=@check_userids@,@notice_userids=@notice_userids@ - ` - } - - sql += _initCustomScript + _prevCustomScript + let sql = this.props.initsql + _initCustomScript + _prevCustomScript if (useDefaultSql) { sql += `\n/* 榛樿sql */ @@ -360,11 +351,11 @@ {!_type ? <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�"><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</span></Tooltip>, + {window.GLOB.process && workFlow === 'true' ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="宸ヤ綔娴佸彉閲忥紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�"><span style={{color: '#26C281'}}>works_flow_code, works_flow_name, works_flow_param, works_flow_detail_id, status, statusname, work_group, work_grade, start_type, check_type, notice_type, check_userids, notice_userids, </span></Tooltip> : null} <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��"><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted</span></Tooltip>, <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�"><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip> {formfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="琛ㄥ崟鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��">, <span style={{color: '#8E44AD'}}>{formfields}</span></Tooltip> : ''} {colfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="瀛楁闆嗗彉閲忥紝绯荤粺浼氬畾涔夊彉閲忓苟璧嬪�笺��">, {colfields}</Tooltip> : ''} - {window.GLOB.process && workFlow === 'true' ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="宸ヤ綔娴佸彉閲忥紝绯荤粺浼氬畾涔夊彉閲忓苟璧嬪�硷紝涔熷彲鎸夌収@xxx@鏍煎紡浣跨敤銆�">,<span style={{color: 'purple'}}> works_flow_code, works_flow_name, works_flow_param, works_flow_detail_id, status, statusname, work_group, work_grade, start_type, check_type, notice_type, check_userids, notice_userids</span></Tooltip> : null} </Form.Item> </Col> : null} {!_type ? <Col span={8} style={{whiteSpace: 'nowrap'}}> diff --git a/src/utils/utils.js b/src/utils/utils.js index 6d953ff..39f1c5d 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1650,14 +1650,6 @@ Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50)${_declarefields} ` - if (btn.$process && verify.workFlow === 'true' && window.GLOB.UserCacheMap.has(btn.$flowId)) { - _sql += ` - /* 宸ヤ綔娴佸彉閲忓畾涔変笌璧嬪�� */ - Declare @works_flow_code nvarchar(50),@works_flow_name nvarchar(50),@works_flow_param nvarchar(4000),@works_flow_detail_id nvarchar(50),@status int,@statusname nvarchar(50), @work_group nvarchar(50),@work_grade int, @start_type nvarchar(50),@check_type nvarchar(50),@notice_type nvarchar(50),@check_userids nvarchar(512),@notice_userids nvarchar(512) - select @works_flow_code=@works_flow_code@,@works_flow_name=@works_flow_name@,@works_flow_param=@works_flow_param@,@works_flow_detail_id=@works_flow_detail_id@,@status=@status@,@statusname=@statusname@,@work_group=@work_group@,@work_grade=@work_grade@, @start_type=@start_type@,@check_type=@check_type@,@notice_type=@notice_type@,@check_userids=@check_userids@,@notice_userids=@notice_userids@ - ` - } - let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' let RoleID = sessionStorage.getItem('role_id') || '' diff --git a/src/views/mkiframe/index.jsx b/src/views/mkiframe/index.jsx index 2547d9d..75aa79c 100644 --- a/src/views/mkiframe/index.jsx +++ b/src/views/mkiframe/index.jsx @@ -183,7 +183,10 @@ let historys = sessionStorage.getItem('page_historys') historys = historys ? JSON.parse(historys) : [] - if (historys.length === 0) return + if (historys.length === 0) { + window.close() + return + } let tab = historys.shift() -- Gitblit v1.8.0