king
2022-02-09 d59f518f466274b2caeb2e01c10c92deafe7c93b
src/views/appmanage/scriptform/index.jsx
@@ -1,6 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, notification } from 'antd'
import { Form, Row, Col, Input, Select, notification, Tooltip } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
@@ -66,6 +67,7 @@
  changeApp = (val) => {
    const { applist } = this.props
    const { type } = this.state
    let app = applist.filter(item => `${item.ID},${item.kei_no}` === val)[0]
@@ -84,7 +86,10 @@
    this.setState({sublist, subAppId, appId}, () => {
      this.getViews()
    })
    this.props.form.setFieldsValue({subAppId})
    if (type !== 'app') {
      this.props.form.setFieldsValue({subAppId})
    }
  }
  changeSubApp = (val) => {
@@ -155,7 +160,11 @@
      <Form {...formItemLayout} className="app-script-form">
        <Row gutter={24}>
          <Col span={12}>
            <Form.Item label="类型">
            <Form.Item label={
              <Tooltip placement="topLeft" title="1、初次升级或应用基本信息修改时,请首先添加应用(基本信息);2、子应用整体升级时,请添加子应用(升级内容包括页面及权限树);3、单个页面升级时,请添加页面;4、涉及权限更新时,请添加权限树">
                <QuestionCircleOutlined className="mk-form-tip" />类型
              </Tooltip>
            }>
              {getFieldDecorator('VType', {
                initialValue: 'subapp',
                rules: [{
@@ -164,6 +173,7 @@
                }]
              })(
                <Select onChange={this.changeType}>
                  <Select.Option value="app">应用(基本信息)</Select.Option>
                  <Select.Option value="subapp">子应用</Select.Option>
                  <Select.Option value="view">页面</Select.Option>
                  <Select.Option value="role">权限树</Select.Option>
@@ -188,7 +198,7 @@
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
          {type !== 'app' ? <Col span={12}>
            <Form.Item label="子应用">
              {getFieldDecorator('subAppId', {
                initialValue: subAppId,
@@ -204,7 +214,7 @@
                </Select>
              )}
            </Form.Item>
          </Col>
          </Col> : null}
          {type === 'view' ? <Col span={12}>
            <Form.Item label="页面">
              {getFieldDecorator('viewId', {