import { upcloud_base_strategy,  } from "@/config/serviceSettings";
const tablecolumns = {
  //策略表
  grid: {
    items: [
      {
        type: 'input',
        name: 'field-input',
        label: '算法名称',
        value: ''
      },
      {
        type: 'number',
        name: 'field-number',
        label: '算法分类',
        value: '',
        disabled: false
      },
      {
        type: 'searchModal',
        name: 'field-search',
        label: '搜索弹出框',
        targetClick: true,
        targetValueKey: 'name',
        remoteUrl: '/mock/getPlatFormData',
        toolBar: {
          rowId: 'id',
          items: [
            {
              type: 'input',
              name: 'name',
              label: '姓名',
              value: ''
            },
            {
              type: 'input',
              name: 'ages',
              label: '证件名称',
              value: ''
            }
          ]
        },
        on: {
          search: () => {
            this.params = { name: 'hdwss' }
          }
        },
        tableConfig: {
          rowKey: 'id',
          columns: [
            {
              dataIndex: 'id',
              title: 'ID',
              hidden: true
            },
            {
              dataIndex: 'name',
              title: '姓名'
            },
            {
              dataIndex: 'ages',
              title: '年龄'
            }
          ]
        }
      },
   

      {
        span: 8,
        type: 'buttonGroup',
        style: { textAlign: 'right' },
        options: [
          {
            value: '查询',
            icon: 'search',
            btnType: 'primary',
            style: 'margin-right:10px',
            htmlType: 'submit'
          },
          {
            value: '重置',
            name: 'ccz',
            icon: 'redo',
            on: {
              click(event, form) {
              }
            }
          }
        ]
      }
    ]
  },
  MainTable: {
    ref: 'MainTable',
    rowkey: 'id',
    columns: [
      {
        title: '算法名称',
        dataIndex: 'name',
        key: 'name'
      },
      {
        title: '算法分类',
        dataIndex: 'category',
        key: 'category'
      },

      {
        title: '语言',
        dataIndex: 'language',
        key: 'language'
      },
      {
        title: '脚本',
        key: 'scriptData',
        dataIndex: 'scriptData',
        width: 500,
        align: 'center'
      },

      {
        title: '操作',
        key: 'operation',
        scopedSlots: { customRender: 'operation' },
        align: 'center'
      }
    ],
    RemoteUrl: {
      url: upcloud_base_strategy + '/algorithm/v1/page	',
      method: 'get',
      headers: {
        'Content-Type': 'application/JSON'
      }
      // data: JSON.stringify({ pageNum: 1, pageSize: 10 }),
    }
  },
  RuleTable: {
    ref: 'rule',
    rowkey: 'key',
    columns: [
      {
        title: '优先级',
        dataIndex: 'name',
        key: 'name'
      },
      {
        title: '规则名称',
        dataIndex: 'age',
        key: 'age'
      },
      {
        title: '规则状态',
        dataIndex: 'address',
        key: 'address'
      },

      {
        title: '操作',
        key: 'operation',
        align: 'center',
        scopedSlots: { customRender: 'operation' }
      }
    ]
  }
}

export default tablecolumns
