king
2021-12-02 d87530a16ed85534432e3c60c644dc96d63f6f69
Merge branch 'master' into bms
23个文件已修改
652 ■■■■ 已修改文件
public/options.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkSelect/index.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/dragaction/card.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/index.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 105 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/customscript/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/submutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/header/index.jsx 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -10,7 +10,7 @@
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "debugger": false,
  "licenseKey": "",
  "licenseKey": "7EFE13KIKKILIJ7C8CFC",
  "probation": "",
  "host": "http://bms-test.kresstools.cn",
  "service": "oc/"
src/assets/css/viewstyle.scss
@@ -438,6 +438,20 @@
      border-color: $color6;
    }
  }
  .ant-carousel {
    .slick-dots {
      >li {
        button {
          background-color: $color3;
        }
      }
      >li.slick-active {
        button {
          background-color: $color6;
        }
      }
    }
  }
}
body.hidden-split-line #root { // 去除登录页分割线
src/menu/components/card/cardcellcomponent/index.jsx
@@ -671,7 +671,15 @@
            maskClosable={false}
            okText={dict['model.submit']}
            onOk={this.verifySubmit}
            onCancel={() => { this.setState({ profVisible: false }) }}
            onCancel={() => {
              if (this.verifyRef.handleCancel) {
                this.verifyRef.handleCancel().then(() => {
                  this.setState({ profVisible: false })
                })
              } else {
                this.setState({ profVisible: false })
              }
            }}
            destroyOnClose
          >
            {card && !card.execMode && card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut' ?
src/menu/components/form/formaction/index.jsx
@@ -251,7 +251,15 @@
          maskClosable={false}
          okText={dict['model.submit']}
          onOk={this.verifySubmit}
          onCancel={() => { this.setState({ profVisible: false }) }}
          onCancel={() => {
            if (this.verifyRef.handleCancel) {
              this.verifyRef.handleCancel().then(() => {
                this.setState({ profVisible: false })
              })
            } else {
              this.setState({ profVisible: false })
            }
          }}
          destroyOnClose
        >
          <VerifyCard
src/menu/components/share/actioncomponent/index.jsx
@@ -496,7 +496,15 @@
          maskClosable={false}
          okText={dict['model.submit']}
          onOk={this.verifySubmit}
          onCancel={() => { this.setState({ profVisible: false }) }}
          onCancel={() => {
            if (this.verifyRef.handleCancel) {
              this.verifyRef.handleCancel().then(() => {
                this.setState({ profVisible: false })
              })
            } else {
              this.setState({ profVisible: false })
            }
          }}
          destroyOnClose
        >
          {card && !card.execMode && card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut' ?
src/menu/datasource/verifycard/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Tabs, Popconfirm, Icon, notification, Modal, Typography, Spin, message } from 'antd'
import { StopOutlined, CheckCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
@@ -117,15 +118,15 @@
        width: '13%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <Icon style={{marginLeft: '5px'}} type="stop" theme="twoTone" twoToneColor="#ff4d4f" />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <Icon style={{marginLeft: '5px'}} type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
src/router/index.js
@@ -84,8 +84,9 @@
    let _s = md5('mksoft' + moment().format('YYYYMMDD'))
    let isauth = authCode && authCode.includes(_s)
    let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6)
    let key1 = window.GLOB.licenseKey ? window.GLOB.licenseKey.substring(0, 6) : ''
    if (window.GLOB.licenseKey === key) {
    if (key1 === key) {
      isauth = true
    }
src/tabviews/custom/components/card/balcony/index.jsx
@@ -100,7 +100,7 @@
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
    }, () => {
      if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
      if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true') {
        this.loadData()
      }
    })
src/tabviews/zshare/mutilform/mkSelect/index.jsx
@@ -17,6 +17,19 @@
      } else {
        value = []
      }
    } else if (value) {
      let option = null
      if (config.setAll === 'true') {
        option= config.oriOptions[1]
      } else {
        option= config.oriOptions[0]
      }
      if (typeof(value) === 'string' && option && typeof(option.value) === 'number') {
        value = +value
        if (isNaN(value)) {
          value = config.initval
        }
      }
    }
    this.state = {
@@ -40,7 +53,7 @@
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { config } = this.state
    const { config, value } = this.state
    if (!is(fromJS(config.oriOptions), fromJS(nextProps.config.oriOptions))) {
      this.setState({
@@ -52,6 +65,21 @@
        this.setState({
          value: nextProps.config.initval,
        })
      } else {
        let option = null
        if (config.setAll === 'true') {
          option= nextProps.config.oriOptions[1]
        } else {
          option= nextProps.config.oriOptions[0]
        }
        if (option && typeof(option.value) === 'number') {
          let val = +value
          if (!isNaN(val)) {
            this.setState({
              value: val
            })
          }
        }
      }
    }
  }
src/tabviews/zshare/topSearch/index.jsx
@@ -520,9 +520,16 @@
      this.props.form.validateFields((err, values) => {
        if (err) return
  
        let searches = this.getFieldsValues(values)
        let { searches, error } = this.getFieldsValues(values)
  
        if (this.state.hasReqFields) {
        if (error) {
          notification.warning({
            top: 92,
            message: error,
            duration: 3
          })
          return
        } else if (this.state.hasReqFields) {
          let requireFields = searches.filter(item => item.required && item.value === '')
          if (requireFields.length > 0) {
            let labels = requireFields.map(item => item.label)
@@ -580,6 +587,7 @@
    // 获取搜索条件值
    let search = []
    let error = null
    searchlist.forEach(item => {
      if (item.type === 'group') {
        search.push({
@@ -601,10 +609,37 @@
        })
      } else {
        let type = item.type
        let val = values[item.field] !== undefined ? values[item.field] : ''
        if (type === 'multiselect' || (type === 'checkcard' && item.multiple === 'true')) {
          type = 'multi'
        } else if (type === 'text' && !error) {
          if (/'/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用英文状态的单引号。`
          } else if (/(^|\s)select\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字select。`
          } else if (/\sfrom(\s|\()/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字from。`
          } else if (/(^|\s)insert\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字insert。`
          } else if (/(^|\s)delete\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字delete。`
          } else if (/(^|\s)update\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字update。`
          } else if (/(^|\s)where\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字where。`
          } else if (/(^|\s)drop\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字drop。`
          } else if (/(^|\s)exec\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字exec。`
          } else if (/(^|\s)truncate\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字truncate。`
          } else if (/(^|\s)while\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字while。`
          } else if (/(^|\s)for\s/ig.test(val)) {
            error = `搜索条件${item.label}中,不可使用关键字for。`
          }
        }
        let val = values[item.field] !== undefined ? values[item.field] : ''
        if (typeof(val) === 'string') {
          val = val.replace(/(^\s*|\s*$)/ig, '')
@@ -622,7 +657,7 @@
      }
    })
    return search
    return {searches: search, error}
  }
  handleOk = (values) => {
src/templates/formtabconfig/index.jsx
@@ -2019,7 +2019,15 @@
          maskClosable={false}
          okText={this.state.dict['model.submit']}
          onOk={this.verifySubmit}
          onCancel={() => { this.setState({ profileVisible: false }) }}
          onCancel={() => {
            if (this.verifyRef.handleCancel) {
              this.verifyRef.handleCancel().then(() => {
                this.setState({ profileVisible: false })
              })
            } else {
              this.setState({ profileVisible: false })
            }
          }}
          destroyOnClose
        >
          <VerifyCard
src/templates/sharecomponent/actioncomponent/dragaction/card.jsx
@@ -28,10 +28,17 @@
  const opacity = isDragging ? 0 : 1
  let hasProfile = false
  let forbidSql = false
  if (['pop', 'prompt', 'exec'].includes(card.OpenType)) {
    hasProfile = true
    if (card.verify && card.verify.default === 'false') {
      forbidSql = true
    }
  } else if (card.OpenType === 'excelIn' || card.OpenType === 'excelOut') {
    hasProfile = true
    if (card.verify && card.verify.default === 'false') {
      forbidSql = true
    }
  } else if (card.funcType === 'print') {
    hasProfile = true
  }
@@ -53,7 +60,7 @@
            key={card.uuid}
            onDoubleClick={() => doubleClickCard(id)}
          >
            {card.label}{card.position === 'grid' && <Icon type="table" />}
            {card.label}{card.position === 'grid' && <Icon type="table" />}{forbidSql && <Icon type="disconnect" />}
          </Button>
        </div>
      </div>
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -912,7 +912,15 @@
          maskClosable={false}
          okText={dict['model.submit']}
          onOk={this.verifySubmit}
          onCancel={() => { this.setState({ profVisible: false }) }}
          onCancel={() => {
            if (this.verifyRef.handleCancel) {
              this.verifyRef.handleCancel().then(() => {
                this.setState({ profVisible: false })
              })
            } else {
              this.setState({ profVisible: false })
            }
          }}
          destroyOnClose
        >
          {card && !card.execMode && card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut' ?
src/templates/sharecomponent/actioncomponent/index.scss
@@ -23,6 +23,12 @@
        right: 1px;
        bottom: 0px;
      }
      .anticon-disconnect {
        font-size: 10px;
        position: absolute;
        right: 1px;
        top: 0px;
      }
    }
  }
}
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -1,8 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Tabs, Row, Col, Input, Button, Table, Popconfirm, Icon, Tooltip, notification, Modal, message, InputNumber, Radio, Typography } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import { Form, Tabs, Row, Col, Input, Button, Popconfirm, Icon, Tooltip, notification, Modal, message, InputNumber, Radio, Typography } from 'antd'
import { QuestionCircleOutlined, StopOutlined, CheckCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
@@ -153,15 +153,15 @@
        inputType: 'switch',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <Icon style={{marginLeft: '5px'}} type="stop" theme="twoTone" twoToneColor="#ff4d4f" />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <Icon style={{marginLeft: '5px'}} type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
@@ -189,15 +189,13 @@
        dataIndex: 'position',
        width: '10%',
        render: (text, record) => {
          let _text = ''
          if (record.position === 'front') {
            _text = 'sql前'
          } else if (record.position === 'init') {
            _text = '初始化'
          if (record.position === 'init') {
            return <span style={{color: 'orange'}}>初始化</span>
          } else if (record.position === 'front') {
            return <span style={{color: '#26C281'}}>sql前</span>
          } else {
            _text = 'sql后'
            return <span style={{color: '#1890ff'}}>sql后</span>
          }
          return _text
        }
      },
      {
@@ -206,28 +204,26 @@
        width: '10%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <Icon style={{marginLeft: '5px'}} type="stop" theme="twoTone" twoToneColor="#ff4d4f" />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <Icon style={{marginLeft: '5px'}} type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
      {
        title: '操作',
        align: 'center',
        width: '20%',
        width: '140px',
        dataIndex: 'operation',
        render: (text, record) =>
          (<div>
          (<div style={{textAlign: 'center'}}>
            <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><Icon type="edit" /></span>
            <span className="operation-btn" title={this.props.dict['header.form.up']} onClick={() => this.handleUpDown(record, 'scripts', 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span>
            <span className="operation-btn" title={this.props.dict['header.form.down']} onClick={() => this.handleUpDown(record, 'scripts', 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span>
            <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><Icon type="swap" /></span>
            <Popconfirm
              overlayClassName="popover-confirm"
@@ -587,68 +583,6 @@
    })
  }
  handleUpDown = (record, type, direction) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let index = 0
    if (type === 'columns') {
      verify.columns = verify.columns.filter((item, i) => {
        if (item.uuid === record.uuid) {
          index = i
        }
        return item.uuid !== record.uuid
      })
      if ((index === 0 && direction === 'up') || (index === verify.columns.length && direction === 'down')) {
        return
      }
      if (direction === 'up') {
        verify.columns.splice(index - 1, 0, record)
      } else {
        verify.columns.splice(index + 1, 0, record)
      }
    } else if (type === 'unique') {
      verify.uniques = verify.uniques.filter((item, i) => {
        if (item.uuid === record.uuid) {
          index = i
        }
        return item.uuid !== record.uuid
      })
      if ((index === 0 && direction === 'up') || (index === verify.uniques.length && direction === 'down')) {
        return
      }
      if (direction === 'up') {
        verify.uniques.splice(index - 1, 0, record)
      } else {
        verify.uniques.splice(index + 1, 0, record)
      }
    } else if (type === 'scripts') {
      verify.scripts = verify.scripts.filter((item, i) => {
        if (item.uuid === record.uuid) {
          index = i
        }
        return item.uuid !== record.uuid
      })
      if ((index === 0 && direction === 'up') || (index === verify.scripts.length && direction === 'down')) {
        return
      }
      if (direction === 'up') {
        verify.scripts.splice(index - 1, 0, record)
      } else {
        verify.scripts.splice(index + 1, 0, record)
      }
    }
    this.setState({
      verify: verify
    })
  }
  handleConfirm = () => {
    const { verify } = this.state
    // 表单提交时检查输入值是否正确
@@ -878,14 +812,15 @@
              scriptsChange={this.scriptsChange}
              wrappedComponentRef={(inst) => this.scriptsForm = inst}
            />
            <Table
            <EditTable actions={['move']} data={verify.scripts} columns={scriptsColumns} onChange={(scripts) => {this.setState({verify: {...verify, scripts}})}}/>
            {/* <Table
              bordered
              rowKey="uuid"
              className="custom-table"
              dataSource={verify.scripts}
              columns={scriptsColumns}
              pagination={false}
            />
            /> */}
          </TabPane> : null}
          <TabPane tab="信息提示" key="tip">
            <Form {...formItemLayout}>
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Icon, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd'
import { StopOutlined, CheckCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Utils from '@/utils/utils.js'
@@ -55,9 +56,9 @@
        width: '13%',
        render: (text, record) => {
          if (record.position === 'front') {
            return 'sql前'
            return <span style={{color: '#26C281'}}>sql前</span>
          } else {
            return 'sql后'
            return <span style={{color: '#1890ff'}}>sql后</span>
          }
        }
      },
@@ -67,15 +68,15 @@
        width: '12%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <Icon style={{marginLeft: '5px'}} type="stop" theme="twoTone" twoToneColor="#ff4d4f" />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <Icon style={{marginLeft: '5px'}} type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
src/templates/zshare/customscript/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Icon, Button, notification, Select, Popconfirm, Typography } from 'antd'
import { StopOutlined, CheckCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Utils from '@/utils/utils.js'
@@ -54,15 +55,15 @@
        width: '12%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <Icon style={{marginLeft: '5px'}} type="stop" theme="twoTone" twoToneColor="#ff4d4f" />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <Icon style={{marginLeft: '5px'}} type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
src/templates/zshare/verifycard/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { is, fromJS } from 'immutable'
import { Form, Tabs, Row, Col, Radio, Button, Select, Popconfirm, notification, Modal, message, InputNumber, Tooltip, Typography } from 'antd'
import { QuestionCircleOutlined, CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -97,15 +97,15 @@
        inputType: 'switch',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <StopOutlined style={{marginLeft: '5px', color: '#ff4d4f'}} />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <CheckCircleOutlined style={{marginLeft: '5px', color: '#52c41a'}}/>
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      }
@@ -133,15 +133,15 @@
        inputType: 'switch',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <StopOutlined style={{marginLeft: '5px', color: '#ff4d4f'}} />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <CheckCircleOutlined style={{marginLeft: '5px', color: '#52c41a'}}/>
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
@@ -207,15 +207,15 @@
        inputType: 'switch',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <StopOutlined style={{marginLeft: '5px', color: '#ff4d4f'}} />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <CheckCircleOutlined style={{marginLeft: '5px', color: '#52c41a'}}/>
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      }
@@ -228,7 +228,7 @@
        render: (text) => {
          let title = text.match(/^\s*\/\*.+\*\//)
          title = title && title[0] ? title[0] : ''
          text = title ? text.replace(title, '') : text
          // text = title ? text.replace(title, '') : text
          return (
            <div>
@@ -259,15 +259,15 @@
        width: '9%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <StopOutlined style={{marginLeft: '5px', color: '#ff4d4f'}} />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <CheckCircleOutlined style={{marginLeft: '5px', color: '#52c41a'}}/>
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
@@ -298,7 +298,7 @@
        render: (text) => {
          let title = text.match(/^\s*\/\*.+\*\//)
          title = title && title[0] ? title[0] : ''
          text = title ? text.replace(title, '') : text
          // text = title ? text.replace(title, '') : text
          return (
            <div>
@@ -314,11 +314,11 @@
        width: '10%',
        render: (text, record) => {
          if (record.position === 'init') {
            return '初始化'
            return <span style={{color: 'orange'}}>初始化</span>
          } else if (record.position === 'front') {
            return 'sql前'
            return <span style={{color: '#26C281'}}>sql前</span>
          } else {
            return 'sql后'
            return <span style={{color: '#1890ff'}}>sql后</span>
          }
        }
      },
@@ -328,22 +328,22 @@
        width: '10%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <StopOutlined style={{marginLeft: '5px', color: '#ff4d4f'}} />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <CheckCircleOutlined style={{marginLeft: '5px', color: '#52c41a'}}/>
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
      {
        title: '操作',
        align: 'center',
        width: '20%',
        width: '140px',
        dataIndex: 'operation',
        render: (text, record) =>
          (<div style={{textAlign: 'center'}}>
@@ -367,7 +367,7 @@
        render: (text) => {
          let title = text.match(/^\s*\/\*.+\*\//)
          title = title && title[0] ? title[0] : ''
          text = title ? text.replace(title, '') : text
          // text = title ? text.replace(title, '') : text
          return (
            <div>
@@ -383,9 +383,9 @@
        width: '10%',
        render: (text, record) => {
          if (record.position === 'front') {
            return 'sql前'
            return <span style={{color: '#26C281'}}>sql前</span>
          } else {
            return 'sql后'
            return <span style={{color: '#1890ff'}}>sql后</span>
          }
        }
      },
@@ -395,15 +395,15 @@
        width: '10%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <StopOutlined style={{marginLeft: '5px', color: '#ff4d4f'}} />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <CheckCircleOutlined style={{marginLeft: '5px', color: '#52c41a'}}/>
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
@@ -496,15 +496,15 @@
        width: '8%',
        render: (text, record) => record.status === 'false' ?
          (
            <div>
            <div style={{color: '#ff4d4f'}}>
              {this.props.dict['model.status.forbidden']}
              <StopOutlined style={{marginLeft: '5px', color: '#ff4d4f'}} />
              <StopOutlined style={{marginLeft: '5px'}} />
            </div>
          ) :
          (
            <div>
            <div style={{color: '#26C281'}}>
              {this.props.dict['model.status.open']}
              <CheckCircleOutlined style={{marginLeft: '5px', color: '#52c41a'}}/>
              <CheckCircleOutlined style={{marginLeft: '5px'}}/>
            </div>
          )
      },
@@ -573,9 +573,20 @@
      })
    }
    _verify.customverifys.forEach((item, i) => {
      item.$index = i + 1
    })
    _verify.scripts.forEach((item, i) => {
      item.$index = i + 1
    })
    _verify.cbScripts.forEach((item, i) => {
      item.$index = i + 1
    })
    this.setState({
      setting: config.setting || {},
      verify: _verify
      verify: _verify,
      oriVerify: fromJS(_verify).toJS()
    })
    if (config.Template !== 'FormTab' && (card.intertype === 'inner' || card.intertype === 'outer')) { // 内部或外部接口
@@ -1398,6 +1409,45 @@
    })
  }
  handleCancel = () => {
    const { verify, oriVerify } = this.state
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
      let msg = ''
      if (this.customForm && this.customForm.state.editItem) {
        msg = '自定义验证'
      } else if (this.customForm && this.customForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.customForm.props.form.getFieldValue('sql'))) {
        msg = '自定义验证'
      } else if (this.orderForm && this.orderForm.state.editItem) {
        msg = '单号生成'
      } else if (this.scriptsForm && this.scriptsForm.state.editItem) {
        msg = '自定义脚本'
      } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
        msg = '自定义脚本'
      }
      if (!is(fromJS(verify), fromJS(oriVerify))) {
        confirm({
          content: '验证信息已修改,确定取消吗?',
          onOk() {
            resolve()
          },
          onCancel() {}
        })
      } else if (msg) {
        confirm({
          content: msg + '未保存,确定取消吗?',
          onOk() {
            resolve()
          },
          onCancel() {}
        })
      } else {
        resolve()
      }
    })
  }
  /**
   * @description 组件销毁,清除state更新
   */
src/templates/zshare/verifycard/index.scss
@@ -69,4 +69,7 @@
    padding: 0 5px;
    cursor: pointer;
  }
  .operation-btn:not(:first-child) {
    margin-left: 5px;
  }
}
src/views/appmanage/submutilform/index.jsx
@@ -158,7 +158,7 @@
          </Col>
          {typename !== 'pc' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用公众号授权登录时,是否需要绑定用户。">
              <Tooltip placement="topLeft" title="使用公众号授权登录或使用小程序时,是否需要绑定用户。">
                <QuestionCircleOutlined className="mk-form-tip" />
                用户绑定
              </Tooltip>
src/views/design/header/index.jsx
@@ -241,34 +241,36 @@
  componentDidMount () {
    if (window.GLOB.systemType !== 'production') {
      Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
        if (res.status) {
          let _permFuncField = []
          let _sysRoles = []
          if (res.Roles && res.Roles.length > 0) {
            _sysRoles = res.Roles.map(role => {
              return {
                uuid: Utils.getuuid(),
                value: role.RoleID,
                text: role.RoleName
              }
            })
      setTimeout(() => {
        Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
          if (res.status) {
            let _permFuncField = []
            let _sysRoles = []
            if (res.Roles && res.Roles.length > 0) {
              _sysRoles = res.Roles.map(role => {
                return {
                  uuid: Utils.getuuid(),
                  value: role.RoleID,
                  text: role.RoleName
                }
              })
            }
            if (res.sModular && res.sModular.length > 0) {
              res.sModular.forEach(field => {
                if (field.ModularNo) {
                  _permFuncField.push(field.ModularNo)
                }
              })
              _permFuncField = _permFuncField.sort()
            }
            sessionStorage.setItem('sysRoles', JSON.stringify(_sysRoles))
            sessionStorage.setItem('permFuncField', JSON.stringify(_permFuncField))
          }
          if (res.sModular && res.sModular.length > 0) {
            res.sModular.forEach(field => {
              if (field.ModularNo) {
                _permFuncField.push(field.ModularNo)
              }
            })
            _permFuncField = _permFuncField.sort()
          }
          sessionStorage.setItem('sysRoles', JSON.stringify(_sysRoles))
          sessionStorage.setItem('permFuncField', JSON.stringify(_permFuncField))
        }
      })
        })
      }, 50)
    } else if (window.GLOB.systemType === 'production') {
      this.props.resetEditLevel('HS')
      this.props.modifyMainMenu({
src/views/login/index.jsx
@@ -337,16 +337,85 @@
    let _s = md5('mksoft' + moment().format('YYYYMMDD'))
    authCode = authCode ? authCode.split(',') : []
    let index = authCode.findIndex(key => key === _s)
    let license = false
    let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6)
    if (window.GLOB.licenseKey) {
      if (window.GLOB.licenseKey.length !== 20) {
        Modal.warning({
          title: `本地授权码已失效,请联系管理员。`,
          okText: '知道了'
        })
      } else {
        let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6)
        let key1 = window.GLOB.licenseKey.substring(0, 6)
        let key2 = window.GLOB.licenseKey.substring(6, 14)
        let key3 = window.GLOB.licenseKey.substring(14)
        let key4 = md5(key1 + key2).toUpperCase().substr(-6)
        if (key === key1 && key3 === key4) {
          let last = window.GLOB.appkey[window.GLOB.appkey.length - 1]
          let offset = 0
          let keys = {}
          if (!isNaN(+last)) {
            offset = (10 - last) % 10
          } else {
            last = last.charCodeAt() - 65
            offset = (30 - last) % 10
          }
          for (let i = 0; i < 26; i++) {
            let char = String.fromCharCode(65 + i)
            keys[char] = (offset + i) % 10
          }
          let lictime = +key2.replace(/[A-Z]/ig, (s) => {
            return keys[s]
          })
          let curtime = +moment().format('YYYYMMDD')
          let licday = lictime - curtime
          let _mindUrl = window.location.href.split('#')[0] + 'notMind'
    if (index > -1 || window.GLOB.licenseKey === key) {
          if (licday < 0 || isNaN(licday)) {
            Modal.warning({
              title: '本地授权码已失效,请联系管理员。',
              okText: '知道了'
            })
          } else if (licday > 20) {
            license = true
            localStorage.removeItem(_mindUrl)
          } else {
            license = true
            if (localStorage.getItem(_mindUrl) !== 'false') {
              Modal.confirm({
                title: `距离授权到期还剩${licday}天,请联系管理员。`,
                okText: '不在提醒',
                cancelText: '关闭',
                onOk() {
                  localStorage.setItem(_mindUrl, 'false')
                },
                onCancel() {},
              })
            }
          }
        } else {
          Modal.warning({
            title: '本地授权码已失效,请联系管理员。',
            okText: '知道了'
          })
        }
      }
    }
    if ((!window.GLOB.licenseKey && index > -1) || license) {
      this.setState({
        auth: true
      })
    }
    if (window.GLOB.licenseKey !== key && (index === -1 || index > 5)) {
    if (!window.GLOB.licenseKey && (index === -1 || index > 5)) {
      let _appId = window.GLOB.appId
  
      if (options.sysType === 'cloud') { // 云端使用系统配置appid
@@ -399,6 +468,13 @@
            this.setState({
              auth: true
            })
            if (res.warning_day && res.warning_day < 20) {
              Modal.warning({
                title: `距离授权到期还剩${res.warning_day}天,请联系管理员。`,
                okText: '知道了'
              })
            }
          } else {
            localStorage.removeItem(_authUrl)
            this.setState({
src/views/mobdesign/index.jsx
@@ -734,14 +734,6 @@
                title: cell.label,
              })
            })
            card.backElements && card.backElements.forEach(cell => {
              if (cell.eleType !== 'button') return
              this.checkBtn(cell)
              m.children.push({
                key: cell.uuid,
                title: cell.label,
              })
            })
          })
        } else if (item.type === 'carousel' || item.type === 'timeline') {
          item.subcards.forEach(card => {
@@ -835,10 +827,86 @@
  }
  getMiniStyle = (config) => {
    console.log(config)
    config.miniStyle = this.transferStyle(config.style)
    let traversal = (components) => {
      return components.map(item => {
        if (item.style) {
          item.miniStyle = this.transferStyle(item.style)
        }
        if (item.headerStyle) {
          item.miniHeaderStyle = this.transferStyle(item.headerStyle)
        }
        if (item.action && item.action.length > 0) {
          item.action = item.action.map(btn => {
            btn.miniStyle = this.transferStyle(btn.style)
            return btn
          })
        }
        if (item.type === 'tabs') {
          item.subtabs.forEach(tab => {
            tab.components = traversal(tab.components)
          })
        } else if (item.type === 'group') {
          item.components = traversal(item.components)
        } else if (['card', 'carousel', 'timeline'].includes(item.type) || (item.type === 'table' && item.subtype === 'tablecard')) {
          item.subcards.forEach(card => {
            card.miniStyle = this.transferStyle(card.style)
            card.elements = card.elements.map(cell => {
              cell.miniStyle = this.transferStyle(cell.style)
              return cell
            })
          })
        } else if (item.type === 'balcony') {
          item.elements && item.elements.forEach(cell => {
            cell.miniStyle = this.transferStyle(cell.style)
          })
        } else if (item.type === 'menubar') {
          item.subMenus = item.subMenus.map(menu => {
            menu.miniStyle = this.transferStyle(menu.style)
            return menu
          })
        } else if (item.type === 'table' && item.subtype === 'normaltable') {
          let getCols = (cols) => {
            return cols.map(col => {
              if (col.type === 'colspan') {
                col.subcols = getCols(col.subcols || [])
              } else if (col.type === 'custom' || col.type === 'action') {
                col.elements = col.elements.map(cell => {
                  cell.miniStyle = this.transferStyle(cell.style)
                  return cell
                })
              }
              return col
            })
          }
          item.cols = getCols(item.cols)
        }
        return item
      })
    }
    config.components = traversal(config.components)
    return config
  }
  transferStyle = (style = {}) => {
    let _style = ''
    Object.keys(style).forEach(key => {
      if (['hShadow', 'vShadow', 'shadowBlur', 'shadowColor'].includes(key)) return
      if (!style[key]) return
      _style += `${key.replace(/[A-Z]/g, m => '-' + m.toLowerCase())}:${style[key]};`
    })
    return _style
  }
  submitConfig = () => {
    let config = fromJS(this.state.config).toJS()