king
2022-10-17 e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5
src/templates/formtabconfig/source.jsx
@@ -1,23 +1,13 @@
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/comtable.js'
import enUS from '@/locales/en-US/comtable.js'
const CommonDict = (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS
class CommonTableBaseData {
  baseConfig = {
    type: 'formTab',
    Template: 'FormTab',
    enabled: false,
    setting: {
      tableName: '',
      primaryKey: '',
      dataresource: '',
      interType: 'inner',
      innerFunc: '',
      interface: '',
      outerFunc: '',
      cols: 2,
      subtabs: []
      datatype: 'query',
      cols: '2',
      width: 90
    },
    tables: [],
    groups: [
@@ -35,15 +25,8 @@
            initval: '',
            type: 'text',
            resourceType: '0',
            setAll: 'false',
            options: [],
            dataSource: '',
            linkField: '',
            valueField: '',
            valueText: '',
            orderBy: '',
            orderType: 'asc',
            match: 'like'
            orderType: 'asc'
          }, {
            origin: true,
            uuid: Utils.getuuid(),
@@ -52,15 +35,8 @@
            initval: '',
            type: 'select',
            resourceType: '0',
            setAll: 'false',
            options: [],
            dataSource: '',
            linkField: '',
            valueField: '',
            valueText: '',
            orderBy: '',
            orderType: 'asc',
            match: 'equal'
            orderType: 'asc'
          }, {
            origin: true,
            uuid: Utils.getuuid(),
@@ -69,147 +45,65 @@
            initval: '',
            type: 'date',
            resourceType: '0',
            setAll: 'false',
            options: [],
            dataSource: '',
            linkField: '',
            valueField: '',
            valueText: '',
            orderBy: '',
            orderType: 'asc',
            match: 'greater'
            orderType: 'asc'
          }
        ]
      }
    ],
    search: [
      {
        origin: true,
        uuid: Utils.getuuid(),
        label: 'label',
        field: '',
        initval: '',
        type: 'text',
        resourceType: '0',
        setAll: 'false',
        options: [],
        dataSource: '',
        linkField: '',
        valueField: '',
        valueText: '',
        orderBy: '',
        orderType: 'asc',
        match: 'like'
      }, {
        origin: true,
        uuid: Utils.getuuid(),
        label: 'label',
        field: '',
        initval: '',
        type: 'select',
        resourceType: '0',
        setAll: 'false',
        options: [],
        dataSource: '',
        linkField: '',
        valueField: '',
        valueText: '',
        orderBy: '',
        orderType: 'asc',
        match: 'equal'
      }, {
        origin: true,
        uuid: Utils.getuuid(),
        label: 'label',
        field: '',
        initval: '',
        type: 'date',
        resourceType: '0',
        setAll: 'false',
        options: [],
        dataSource: '',
        linkField: '',
        valueField: '',
        valueText: '',
        orderBy: '',
        orderType: 'asc',
        match: 'greater'
      }
    ],
    action: [
      {
        origin: true,
        btnType: 'confirm',
        uuid: Utils.getuuid(),
        label: 'add',
        intertype: 'inner',
        label: '确定',
        intertype: 'system',
        innerFunc: '',
        interface: '',
        method: 'POST',
        outerFunc: '',
        sql: '',
        sqlType: '',
        callbackFunc: '',
        Ot: 'notRequired',
        position: 'toolbar',
        execSuccess: 'grid',
        execError: 'never',
        errorTime: 15,
        OpenType: 'pop',
        pageTemplate: '',
        url: '',
        icon: 'plus',
        class: 'green',
        OpenType: 'exec',
        icon: '',
        class: 'border-primary',
        verify: null
      }, {
        origin: true,
        btnType: 'cancel',
        uuid: Utils.getuuid(),
        label: 'update',
        intertype: 'inner',
        innerFunc: '',
        interface: '',
        method: 'POST',
        outerFunc: '',
        sql: '',
        sqlType: '',
        callbackFunc: '',
        Ot: 'requiredSgl',
        position: 'grid',
        label: '关闭',
        execSuccess: 'grid',
        execError: 'never',
        errorTime: 15,
        OpenType: 'pop',
        OpenType: 'exec',
        pageTemplate: '',
        url: '',
        icon: 'form',
        class: 'purple',
        verify: null
        icon: '',
        class: 'border-danger'
      }
    ],
    tabs: [
      {
        origin: true,          // 是否为示例
        groupId: 'tabs',
        uuid: Utils.getuuid(),
        label: 'tab1',
        icon: '',
        type: 'SubTable',
        linkTab: '',
        subtabs: [],
        supMenu: ''
      },
      {
        origin: true,
        groupId: 'tabs',
        uuid: Utils.getuuid(),
        label: 'tab2',
        icon: '',
        type: 'SubTable',
        linkTab: '',
        subtabs: [],
        supMenu: ''
      }
    ],
    tabgroups: ['tabs']
    tabgroups: [{
      uuid: 'tabs',
      sublist: [
        {
          origin: true,          // 是否为示例
          uuid: Utils.getuuid(),
          label: 'tab1',
          type: 'SubTable',
          linkTab: '',
          supMenu: ''
        },
        {
          origin: true,
          uuid: Utils.getuuid(),
          label: 'tab2',
          type: 'SubTable',
          linkTab: '',
          supMenu: ''
        }
      ]
    }]
  }
  searchItems = [
@@ -266,13 +160,13 @@
  actionItems = [
    {
      type: 'action',
      label: CommonDict['header.form.prompt'],
      label: '提示框',
      subType: 'prompt',
      url: ''
    },
    {
      type: 'action',
      label: CommonDict['header.form.exec'],
      label: '直接执行',
      subType: 'exec',
      url: ''
    }
@@ -281,7 +175,7 @@
  tabItems = [
    {
      type: 'tabs',
      label: CommonDict['header.menu.tab.subtable'],
      label: '子表',
      subType: 'SubTable',
    }
  ]