king
2023-11-21 41accaed7b2260f9033701f048b5b65b01a6369d
2023-11-21
15个文件已修改
535 ■■■■■ 已修改文件
src/menu/components/chart/antv-bar/chartcompile/index.jsx 309 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/mkSelect/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/searchform/index.jsx 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -137,133 +137,7 @@
        }
      },
    ],
    cusColumns: [
      {
        title: '指标',
        dataIndex: 'name',
        editable: false,
        width: '14%'
      },
      {
        title: '形状',
        dataIndex: 'shape',
        inputType: 'cascader',
        editable: true,
        width: '12%',
        render: (text, record) => {
          return text.join(' / ').replace('line', '折线').replace('bar', '柱形')
        },
        options: [
          {
            value: 'line',
            label: '折线',
            children: [
              { value: 'smooth', label: 'smooth' },
              { value: 'line', label: 'line' },
              { value: 'dot', label: 'dot' },
              { value: 'dash', label: 'dash' },
              { value: 'hv', label: 'hv' },
              { value: 'vh', label: 'vh' },
              { value: 'hvh', label: 'hvh' },
              { value: 'vhv', label: 'vhv' }
            ]
          },
          {
            value: 'bar',
            label: '柱形',
            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' }
            ],
          }
        ]
      },
      {
        title: '坐标轴',
        dataIndex: 'axis',
        inputType: 'select',
        editable: true,
        width: '12%',
        options: [
          { value: 'true', text: '显示'},
          { value: 'false', text: '隐藏'}
        ],
        render: (text, record) => {
          let trans = {'true': '显示', 'false': '隐藏'}
          return trans[text] || '隐藏'
        }
      },
      {
        title: '标注',
        dataIndex: 'label',
        inputType: 'select',
        editable: true,
        width: '12%',
        options: [
          { value: 'true', text: '显示'},
          { value: 'false', text: '隐藏'}
        ],
        render: (text, record) => {
          let trans = {'true': '显示', 'false': '隐藏'}
          return trans[text] || ''
        }
      },
      {
        title: '标题',
        dataIndex: 'title',
        inputType: 'select',
        editable: true,
        required: false,
        width: '12%',
        options: [
          { value: 'true', text: '显示'},
          { value: 'false', text: '隐藏'}
        ],
        render: (text, record) => {
          let trans = {'true': '显示', 'false': '隐藏'}
          return trans[text] || ''
        }
      },
      {
        title: '显示(值/%)',
        dataIndex: 'show',
        inputType: 'select',
        editable: true,
        required: false,
        width: '12%',
        options: [
          { value: 'value', text: '数值'},
          { value: 'percent', text: '百分比'},
          { value: 'thdSeparator', text: '千分位'}
        ],
        render: (text, record) => {
          let trans = {value: '数值', percent: '百分比', thdSeparator: '千分位'}
          return trans[text] || ''
        }
      },
      {
        title: '最小值',
        dataIndex: 'min',
        inputType: 'number',
        editable: true,
        max: 9999999999,
        required: false,
        width: '12%'
      },
      {
        title: '最大值',
        dataIndex: 'max',
        inputType: 'number',
        editable: true,
        max: 9999999999,
        required: false,
        width: '12%'
      },
    ]
    cusColumns: []
  }
  showDrawer = () => {
@@ -302,6 +176,18 @@
      }
    }
    if (!plot.zoomYaxis && plot.customs) {
      plot.customs.forEach(item => {
        if (item.min || item.min === 0) {
          plot.zoomYaxis = 'custom'
        } else if (item.max || item.max === 0) {
          plot.zoomYaxis = 'custom'
        }
      })
    }
    plot.zoomYaxis = plot.zoomYaxis || 'default'
    this.setState({
      visible: true,
      view: 'base',
@@ -310,7 +196,8 @@
      fieldName: fieldName,
      plot: plot,
      baseFormlist: getBaseForm(plot, config.columns),
      formlist: getOptionForm(plot, config.columns)
      formlist: getOptionForm(plot, config.columns),
      cusColumns: this.getCusColumns(plot.zoomYaxis)
    })
  }
@@ -494,6 +381,153 @@
    this.setState({plot: {...plot, enabled: val}})
  }
  zoomChange = (e) => {
    const { plot } = this.state
    let val = e.target.value
    this.setState({plot: {...plot, zoomYaxis: val}, cusColumns: this.getCusColumns(val)})
  }
  getCusColumns = (zoomYaxis) => {
    let cusColumns = [
      {
        title: '指标',
        dataIndex: 'name',
        editable: false,
        width: '12%'
      },
      {
        title: '形状',
        dataIndex: 'shape',
        inputType: 'cascader',
        editable: true,
        width: '12%',
        render: (text, record) => {
          return text.join(' / ').replace('line', '折线').replace('bar', '柱形')
        },
        options: [
          {
            value: 'line',
            label: '折线',
            children: [
              { value: 'smooth', label: 'smooth' },
              { value: 'line', label: 'line' },
              { value: 'dot', label: 'dot' },
              { value: 'dash', label: 'dash' },
              { value: 'hv', label: 'hv' },
              { value: 'vh', label: 'vh' },
              { value: 'hvh', label: 'hvh' },
              { value: 'vhv', label: 'vhv' }
            ]
          },
          {
            value: 'bar',
            label: '柱形',
            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' }
            ],
          }
        ]
      },
      {
        title: '坐标轴',
        dataIndex: 'axis',
        inputType: 'select',
        editable: true,
        width: '12%',
        options: [
          { value: 'true', text: '显示'},
          { value: 'false', text: '隐藏'}
        ],
        render: (text, record) => {
          let trans = {'true': '显示', 'false': '隐藏'}
          return trans[text] || '隐藏'
        }
      },
      {
        title: '标注',
        dataIndex: 'label',
        inputType: 'select',
        editable: true,
        width: '12%',
        options: [
          { value: 'true', text: '显示'},
          { value: 'false', text: '隐藏'}
        ],
        render: (text, record) => {
          let trans = {'true': '显示', 'false': '隐藏'}
          return trans[text] || ''
        }
      },
      {
        title: '标题',
        dataIndex: 'title',
        inputType: 'select',
        editable: true,
        required: false,
        width: '12%',
        options: [
          { value: 'true', text: '显示'},
          { value: 'false', text: '隐藏'}
        ],
        render: (text, record) => {
          let trans = {'true': '显示', 'false': '隐藏'}
          return trans[text] || ''
        }
      },
      {
        title: '显示(值/%)',
        dataIndex: 'show',
        inputType: 'select',
        editable: true,
        required: false,
        width: '12%',
        options: [
          { value: 'value', text: '数值'},
          { value: 'percent', text: '百分比'},
          { value: 'thdSeparator', text: '千分位'}
        ],
        render: (text, record) => {
          let trans = {value: '数值', percent: '百分比', thdSeparator: '千分位'}
          return trans[text] || ''
        }
      },
      {
        title: '最小值',
        dataIndex: 'min',
        inputType: 'number',
        editable: true,
        max: 9999999999,
        required: false,
        width: '12%'
      },
      {
        title: '最大值',
        dataIndex: 'max',
        inputType: 'number',
        editable: true,
        max: 9999999999,
        required: false,
        width: '12%'
      },
    ]
    if (zoomYaxis !== 'custom') {
      cusColumns.pop()
      cusColumns.pop()
      cusColumns.forEach(item => {
        item.width = '16%'
      })
    }
    return cusColumns
  }
  mutilBarChange = (e) => {
    const { plot } = this.state
    let val = e.target.value
@@ -540,8 +574,8 @@
            _plot.customs = []
            delete _plot.Yaxis
          } else if (!is(fromJS(values.Yaxis), fromJS(plot.Yaxis || []))) {
            _plot.enabled = 'false'
            _plot.colors = null
            // _plot.enabled = 'false'
            // _plot.colors = null
            let labels = {}
            config.columns.forEach(col => {
@@ -872,7 +906,7 @@
              </div>
            </TabPane> : null}
            {plot ? <TabPane tab="自定义图形设置" disabled={datatype === 'statistics'} key="custom">
              <Col span={12}>
              <Col span={8}>
                <Form {...formItemLayout}>
                  <Form.Item label="是否启用" style={{marginBottom: 10}}>
                    <Radio.Group value={plot.enabled || 'false'} onChange={this.enabledChange}>
@@ -882,7 +916,7 @@
                  </Form.Item>
                </Form>
              </Col>
              <Col span={12}>
              <Col span={8}>
                <Form {...formItemLayout}>
                  <Form.Item label="多柱排列" style={{marginBottom: 10}}>
                    <Radio.Group value={plot.mutilBar || 'dodge'} onChange={this.mutilBarChange}>
@@ -893,6 +927,17 @@
                  </Form.Item>
                </Form>
              </Col>
              <Col span={8}>
                <Form {...formItemLayout}>
                  <Form.Item label="Y轴区间" style={{marginBottom: 10}}>
                    <Radio.Group value={plot.zoomYaxis} onChange={this.zoomChange}>
                      <Radio value="default">默认</Radio>
                      <Radio value="custom">自定义</Radio>
                      <Radio value="adjust">自适应</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Form>
              </Col>
              <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:使用自定义设置时,显示的坐标轴第一个在左侧,第二个在右侧,多余的不生效。</Col>
              <EditTable indexShow={false} actions={['edit', 'move']} data={plot.customs || []} columns={cusColumns} onChange={this.changeCustom}/>
            </TabPane> : null}
src/menu/components/chart/antv-bar/index.jsx
@@ -1335,6 +1335,17 @@
    this.updateComponent(_card)
  }
  plotchange = (card) => {
    if (card.plot.enabled === 'true' && card.plot.zoomYaxis !== 'custom' && card.plot.customs) {
      card.plot.customs.forEach(item => {
        item.min = ''
        item.max = ''
      })
    }
    this.updateComponent(card)
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -1359,7 +1370,7 @@
          <div className="mk-popover-control">
            {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={this.addSearch}/> : null}
            {appType !== 'mob' ? <PlusSquareOutlined className="plus" title="添加按钮" onClick={this.addButton}/> : null}
            <ChartCompileForm config={card} plotchange={this.updateComponent}/>
            <ChartCompileForm config={card} plotchange={this.plotchange}/>
            <CopyComponent type="line" card={card}/>
            <PasteComponent config={card} options={['action', 'search']} updateConfig={this.updateComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
src/menu/datasource/index.jsx
@@ -212,6 +212,9 @@
      if (config.subtype !== 'dualdatacard') {
        delete res.subColumns
        if (config.type === 'interface') {
          res.setting.laypage = 'false'
        }
      } else {
        res.subColumns = res.subColumns.map(item => {
          if (/int/ig.test(item.datatype)) {
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -160,6 +160,12 @@
        _config.plot.$label = label
      }
      if (_config.plot.zoomYaxis === 'adjust' && _config.plot.mutilBar === 'stack') {
        if (_config.plot.Bar_axis) {
          _config.plot.zoomFields = _config.plot.Yaxis.filter(cell => !_config.plot.Bar_axis.includes(cell))
        }
      }
    } else {
      _config.plot.enabled = 'false'
    }
@@ -1191,6 +1197,41 @@
   */
  customrender = (data) => {
    const { plot, transfield } = this.state
    let max = 0
    if (plot.zoomYaxis === 'adjust') {
      data.forEach(item => {
        if (plot.zoomFields) {
          plot.zoomFields.forEach(f => {
            if (item[f] > max) {
              max = item[f]
            }
          })
          let sum = 0
          plot.Bar_axis.forEach(f => {
            sum += item[f]
          })
          if (sum > max) {
            max = sum
          }
        } else {
          plot.Yaxis.forEach(f => {
            if (item[f] > max) {
              max = item[f]
            }
          })
        }
      })
      if (!isNaN(max)) {
        max = Math.ceil(max)
        let s = Math.pow(10, (max + '').length - 1)
        max = Math.ceil(max / s) * s
      } else {
        max = 0
      }
    }
    const ds = new DataSet()
    const dv = ds.createView().source(data)
@@ -1303,11 +1344,19 @@
        range: [0, 0.9]
      }
  
      if (plot.min || plot.min === 0) {
        c.min = plot.min
      }
      if (plot.max || plot.max === 0) {
        c.max = plot.max
      if (plot.zoomYaxis === 'adjust') {
        if (max) {
          c.min = 0
          c.max = max
        }
      } else {
        if (plot.min || plot.min === 0) {
          c.min = plot.min
        }
        if (plot.max || plot.max === 0) {
          c.max = plot.max
          c.min = c.min || 0
        }
      }
      view1.scale('value', c)
      view1.axis('value', plot.$yc)
@@ -1318,7 +1367,7 @@
      let colorIndex = 0
  
      if (plot.adjust !== 'stack') {
      if (plot.mutilBar !== 'stack') {
        let _chart = view1
          .interval()
          .position(`${plot.Xaxis}*value`)
@@ -1386,7 +1435,7 @@
        if (plot.barRadius) {
          _chart.style({ radius: [plot.barRadius, plot.barRadius, 0, 0] })
        }
      } else if (plot.adjust === 'stack') {
      } else if (plot.mutilBar === 'stack') {
        let _chart = view1
          .interval()
          .position(`${plot.Xaxis}*value`)
@@ -1478,11 +1527,18 @@
          range: [0, 0.9]
        }
    
        if (item.min || item.min === 0) {
          c.min = item.min
        }
        if (item.max || item.max === 0) {
          c.max = item.max
        if (plot.zoomYaxis === 'adjust') {
          if (max) {
            c.min = 0
            c.max = max
          }
        } else {
          if (item.min || item.min === 0) {
            c.min = item.min
          }
          if (item.max || item.max === 0) {
            c.max = item.max
          }
        }
        view2.scale(item.name, c)
@@ -1544,11 +1600,18 @@
          range: [0, 0.9]
        }
    
        if (item.min || item.min === 0) {
          c.min = item.min
        }
        if (item.max || item.max === 0) {
          c.max = item.max
        if (plot.zoomYaxis === 'adjust') {
          if (max) {
            c.min = 0
            c.max = max
          }
        } else {
          if (item.min || item.min === 0) {
            c.min = item.min
          }
          if (item.max || item.max === 0) {
            c.max = item.max
          }
        }
        view2.scale(item.name, c)
@@ -1695,6 +1758,7 @@
    }
    if (plot.max || plot.max === 0) {
      c.max = plot.max
      c.min = c.min || 0
    }
    chart.scale(_valfield, c)
src/tabviews/custom/index.jsx
@@ -1065,6 +1065,8 @@
      component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
      component.setting.useMSearch = component.setting.useMSearch === 'true'
      component.setting.laypage = component.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
      if (component.setting.useMSearch) {
        if (!window.GLOB.SearchBox.has(component.$searchId)) {
          component.setting.useMSearch = false
@@ -1077,10 +1079,14 @@
        component.setting.sync = 'false'
      }
      if (component.format === 'object') {
        component.setting.laypage = false
        component.setting.$top = true
      }
      if (component.setting.interType !== 'system') { // 不使用系统函数时
        component.setting.sync = 'false'
        component.setting.dataresource = ''
        component.setting.laypage = component.setting.laypage === 'true'
        return component
      }
@@ -1101,8 +1107,7 @@
      delete component.scripts
      component.setting.$name = component.$menuname || ''
      component.setting.execute = component.setting.execute !== 'false'  // 默认sql是否执行,转为boolean 统一格式
      component.setting.laypage = component.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
      if (!component.setting.execute) {
        component.setting.dataresource = ''
      }
@@ -1218,6 +1223,8 @@
        inter.setting.onload = 'false'
      }
      inter.setting.laypage = false
      inter.setting.$top = true
      inter.setting.useMSearch = inter.setting.useMSearch === 'true'
      inter.setting.arr_field = inter.columns.map(col => col.field).join(',')
@@ -1241,7 +1248,6 @@
      inter.setting.$name = '公共数据源-' + inter.setting.name
      inter.setting.execute = inter.setting.execute !== 'false'
      inter.setting.laypage = true
      if (!inter.setting.execute) {
        inter.setting.dataresource = ''
src/tabviews/custom/popview/index.jsx
@@ -754,6 +754,8 @@
      component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
      component.setting.useMSearch = component.setting.useMSearch === 'true'
      component.setting.laypage = component.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
      if (component.setting.useMSearch) {
        if (!window.GLOB.SearchBox.has(component.$searchId)) {
          component.setting.useMSearch = false
@@ -762,10 +764,14 @@
        }
      }
      if (component.format === 'object') {
        component.setting.laypage = false
        component.setting.$top = true
      }
      if (component.setting.interType !== 'system') { // 不使用系统函数时
        component.setting.sync = 'false'
        component.setting.dataresource = ''
        component.setting.laypage = component.setting.laypage === 'true'
        return component
      }
@@ -786,7 +792,6 @@
      delete component.scripts
      component.setting.$name = component.$menuname || ''
      component.setting.execute = component.setting.execute !== 'false'  // 默认sql是否执行,转为boolean 统一格式
      component.setting.laypage = component.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
      if (!component.setting.execute) {
        component.setting.dataresource = ''
src/tabviews/zshare/topSearch/index.jsx
@@ -426,6 +426,7 @@
  }
  resetSearch = (result) => {
    let trigger = false
    let _searchlist = fromJS(this.state.searchlist).toJS().map(item => {
      if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(item.type) && result[item.field] && result[item.field].length > 0) {
        let options = []
@@ -491,12 +492,23 @@
        item.options = item.oriOptions
      }
      if (item.$first && item.options.length > 0) {
        item.initval = item.options[0].Value
        trigger = true
      }
      return item
    })
    this.setState({
      searchlist: _searchlist
    })
    if (trigger) {
      setTimeout(() => {
        this.handleSubmit()
      }, 10)
    }
  }
  recordChange = (val, defer, item) => {
src/tabviews/zshare/topSearch/mkSelect/index.jsx
@@ -46,6 +46,12 @@
        config: fromJS(nextProps.config).toJS(),
        options: fromJS(nextProps.config.options).toJS()
      })
      if (config.$first && nextProps.config.initval) {
        this.setState({
          value: nextProps.config.initval
        })
      }
    }
  }
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -901,7 +901,7 @@
          } key="excelcolumn">
            <ColumnForm columnChange={this.columnChange}/>
            <Button className="excel-col-add mk-green" title="添加显示列字段" onClick={this.columnFieldInput}>
              同步显示列
              同步字段集
            </Button>
            <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}>
              清空Excel列
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -965,7 +965,7 @@
          } key="columns">
            <ColumnForm columnChange={this.columnChange}/>
            <Button className="excel-col-add mk-green" title="添加显示列字段" onClick={this.columnFieldInput}>
              同步显示列
              同步字段集
            </Button>
            <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}>
              清空Excel列
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -288,6 +288,25 @@
      reLabel.field = '类型字段'
    }
    reTooltip.initval = ''
    if (type === 'select') {
      if (this.record.resourceType === '0') {
        reTooltip.initval = '初始值应为数据的Value值,可使用@username@、@fullName@'
      } else if (this.record.resourceType === '1') {
        reTooltip.initval = '初始值应为《值·字段》的值,可使用@username@、@fullName@、$first。注:使用$first时,搜索条件应为必填。'
      }
    } else if (type === 'link') {
      if (this.record.resourceType === '0') {
        reTooltip.initval = '初始值应为数据的Value值。'
      } else if (this.record.resourceType === '1') {
        reTooltip.initval = '初始值应为《值·字段》的值,可使用$first。注:使用$first时,搜索条件应为必填。'
      }
    } else if (type === 'text') {
      reTooltip.initval = '可使用@username@、@fullName@。'
    } else if (type === 'range') {
      reTooltip.initval = '使用逗号拼接,例如 3,10'
    }
    return {
      shows,
      reOptions,
@@ -690,6 +709,23 @@
            values.field = values.field.join(',')
          }
          if (['select', 'link'].includes(values.type)) {
            if (values.resourceType === '1') {
              if (/\$first/.test(values.initval) && values.initval.replace(/\s/g, '') === '$first') {
                values.initval = '$first'
              }
              if (values.initval === '$first' && values.required !== 'true') {
                notification.warning({
                  top: 92,
                  message: '使用$first时,搜索条件应为必填!',
                  duration: 5
                })
                return
              }
            }
          }
          // 下拉菜单或联动菜单
          if (['multiselect', 'select', 'link', 'radio'].includes(values.type)) {
            if (values.resourceType === '0') {
src/templates/zshare/formconfig.jsx
@@ -166,7 +166,6 @@
      type: 'text',
      key: 'initval',
      label: '初始值',
      tooltip: '类型为下拉菜单时,初始值应为数据的Value值(使用数据源时,应为《值·字段》的值);类型为数值(区间)时,初始值使用逗号拼接,例如 3,10;文本与下拉菜单中可使用@username@、@fullName@',
      initVal: card.initval,
      required: false
    },
src/utils/utils-datamanage.js
@@ -204,8 +204,14 @@
        } else {
          DateCount = `/*system_query*/select count(1) as total from ${_dataresource} ${_search}`
        }
      } else if (setting.$top) {
        if (orderBy) {
          LText = `/*system_query*/select top 1 ${arr_field} from ${_dataresource} ${_search} order by ${orderBy} `
        } else {
          LText = `/*system_query*/select top 1 ${arr_field} from ${_dataresource} ${_search}  `
        }
      } else if (orderBy) {
        LText = `/*system_query*/select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
        LText = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search} order by ${orderBy} `
      } else {
        LText = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search}  `
      }
@@ -458,8 +464,14 @@
    _search = _search ? 'where ' + _search : ''
  }
  if (setting.order && _dataresource) {
    _dataresource = `select top 1000 ${setting.arr_field} from (select ${setting.arr_field} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
  if (setting.$top) {
    if (setting.order && _dataresource) {
      _dataresource = `select top 1 ${setting.arr_field} from ${_dataresource} ${_search} order by ${setting.order} `
    } else if (_dataresource) {
      _dataresource = `select top 1 ${setting.arr_field} from ${_dataresource} ${_search} `
    }
  } else if (setting.order && _dataresource) {
    _dataresource = `select top 1000 ${setting.arr_field} from ${_dataresource} ${_search} order by ${setting.order} `
  } else if (_dataresource) {
    _dataresource = `select top 1000 ${setting.arr_field} from ${_dataresource} ${_search} `
  }
src/utils/utils.js
@@ -348,6 +348,9 @@
          item.initval = ''
          item.initType = ''
        }
      } else if ((item.type === 'select' || item.type === 'link') && item.initval === '$first' && item.resourceType === '1') {
        item.initval = ''
        item.$first = true
      }
      
      item.oriInitval = item.initval
src/views/billprint/index.jsx
@@ -461,6 +461,11 @@
          if (!component.format) return component  // 没有动态数据  数据格式 array 或 object
          component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
          component.setting.laypage = false   // 是否分页,转为boolean 统一格式
          if (component.format === 'object') {
            component.setting.$top = true
          }
          if (component.setting.interType !== 'system') { // 不使用系统函数时
            component.setting.sync = 'false'
@@ -484,7 +489,6 @@
          delete component.scripts
    
          component.setting.execute = component.setting.execute !== 'false'  // 默认sql是否执行,转为boolean 统一格式
          component.setting.laypage = false   // 是否分页,转为boolean 统一格式
          component.setting.onload = 'true'   // 默认加载
    
          if (!component.setting.execute) {
@@ -673,7 +677,8 @@
      inter.setting.$name = '公共数据源-' + inter.setting.name
      inter.setting.execute = inter.setting.execute !== 'false'
      inter.setting.laypage = true
      inter.setting.laypage = false
      inter.setting.$top = true
      if (!inter.setting.execute) {
        inter.setting.dataresource = ''