<template>
  <a-card :bordered="false">
<pre><code>&lt;!-- table区域-begin --&gt;
&lt;div&gt;
  &lt;div class=&quot;ant-alert ant-alert-info&quot; style=&quot;margin-bottom: 16px;&quot;&gt;
    &lt;i class=&quot;anticon anticon-info-circle ant-alert-icon&quot;&gt;&lt;/i&gt; 已选择 &lt;a style=&quot;font-weight: 600&quot;&gt;{{ selectedRowKeys.length }}&lt;/a&gt;项
    &lt;a style=&quot;margin-left: 24px&quot; @click=&quot;onClearSelected&quot;&gt;清空&lt;/a&gt;
  &lt;/div&gt;

  &lt;a-table
    ref=&quot;table&quot;
    size=&quot;middle&quot;
    bordered
    rowKey=&quot;id&quot;
    :columns=&quot;columns&quot;
    :dataSource=&quot;dataSource&quot;
    :pagination=&quot;ipagination&quot;
    :loading=&quot;loading&quot;
    :rowSelection=&quot;{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}&quot;
    class=&quot;j-table-force-nowrap&quot;
    @change=&quot;handleTableChange&quot;&gt;

    &lt;template slot=&quot;htmlSlot&quot; slot-scope=&quot;text&quot;&gt;
      &lt;div v-html=&quot;text&quot;&gt;&lt;/div&gt;
    &lt;/template&gt;

    &lt;span slot=&quot;action&quot; slot-scope=&quot;text, record&quot;&gt;
      &lt;a @click=&quot;handleEdit(record)&quot;&gt;编辑&lt;/a&gt;

      &lt;a-divider type=&quot;vertical&quot; /&gt;
      &lt;a-dropdown&gt;
        &lt;a class=&quot;ant-dropdown-link&quot;&gt;更多 &lt;a-icon type=&quot;down&quot; /&gt;&lt;/a&gt;
        &lt;a-menu slot=&quot;overlay&quot;&gt;
          &lt;a-menu-item&gt;
            &lt;a-popconfirm title=&quot;确定删除吗?&quot; @confirm=&quot;() =&gt; handleDelete(record.id)&quot;&gt;
              &lt;a&gt;删除&lt;/a&gt;
            &lt;/a-popconfirm&gt;
          &lt;/a-menu-item&gt;
        &lt;/a-menu&gt;
      &lt;/a-dropdown&gt;
    &lt;/span&gt;

  &lt;/a-table&gt;
&lt;/div&gt;

&lt;vmiReplaceRecord-modal ref=&quot;modalForm&quot; @ok=&quot;modalFormOk&quot;&gt;&lt;/vmiReplaceRecord-modal&gt;
</code></pre>
  </a-card>
</template>
<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import VmiReplaceRecordModal from './modules/VmiReplaceRecordModal'

  export default {
    name: "VmiReplaceRecordList",
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      VmiReplaceRecordModal
    },
    data () {
      return {
        description: 'vmi替换记录管理页面',
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
           {
            title:'单位',
            align:"center",
            dataIndex: 'unit',
            render: (text, record) => 'KG'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            // fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/vmiReplaceRecordService/vmiReplaceRecord/list",
        },
        dictOptions:{},
      }
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
      initDictConfig(){
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>
VMI 替换记录管理 - 列表页面

原文地址: http://www.cveoy.top/t/topic/hzvM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录