index.vue 4.57 KB
<template>
  <div class="system-container">
    <div class="container">
      <search-form
        class="searchTop border-shadow"
        :formModel="searchForm"
        :formList="reportFormList"
      >
        <slot name="form-slot">
          <el-button
            type="primary"
            :size="btn_size"
            icon="el-icon-search"
            :id="reportTableParams.btnId"
          >搜索</el-button>
          <el-button
            type="primary"
            :size="btn_size"
            icon="el-icon-refresh"
          >重置</el-button>
          <el-button
            type="primary"
            :size="btn_size"
          >导出Excel</el-button>
        </slot>
      </search-form>
      <basic-table
        ref="roleTable"
        :tableParams="reportTableParams"
        :searchForm="searchForm"
        :hasNum="false"
      >
        <span
          slot="status"
          slot-scope="scope"
        >
          <span
            class="dot"
            :class="scope.scope.enableStatus ? USERSTATUS[scope.scope.enableStatus].split(',')[1] : ''"
          ></span>
          <span class="statusText">{{ scope.scope.enableStatus ? USERSTATUS[scope.scope.enableStatus].split(',')[0] : '--'}}</span>
        </span>
        <span
          slot="table-button"
          slot-scope="scope"
        >
          <el-button
            v-for="(j, idx) in reportTableParams.tableOption.btnList"
            :key="idx"
            :type="j.type"
            size="mini"
            plain
            @click="btnClick(j.pType, scope.scope)"
          >{{j.name}}</el-button>
        </span>
      </basic-table>
    </div>
  </div>
</template>

<script>
import { getProvinceList } from 'services/common';
export default {
  data() {
    return {
      searchForm: {},
      reportFormList: [
        {
          type: 'input',
          inputType: 'text',
          prop: 'status',
          placeholder: '特约店代码',
        },
        {
          type: 'input',
          inputType: 'text',
          prop: 'status',
          placeholder: '特约店名称',
        },
        {
          type: 'input',
          inputType: 'text',
          prop: 'status',
          placeholder: '承租人姓名',
        },
        {
          type: 'input',
          inputType: 'text',
          prop: 'status',
          placeholder: '联系电话',
        },
        {
          type: 'input',
          inputType: 'text',
          prop: 'status',
          placeholder: '业务类型',
        },
        {
          type: 'input',
          inputType: 'text',
          prop: 'status',
          placeholder: '项目分组',
        },
        {
          type: 'selectDate',
          prop: 'status',
          dateModel: '',
          placeholder: '请选择',
          options: [{
            label: '全部类型',
            value: 0
          }, {
            label: '试驾围栏修改审核',
            value: 1
          }, {
            label: '上牌资料审核',
            value: 2
          }]
        }
      ],
      reportTableParams: {
        btnId: new Date().getTime() + parseInt(Math.random() * 1000),
        listName: 'list',
        tableOption: false,
        tableColumns: [
          {
            label: '特约店代码',
            prop: 'roleName'
          }, {
            label: '特约店名称',
            prop: 'remark'
          }, {
            label: '车型',
            prop: 'enableStatus'
          }, {
            label: '车架号VIN码',
            prop: 'createdDate'
          }, {
            label: '时间',
            prop: 'createdDate'
          }
        ]
      },
      list: {
        "message": "success",
        "code": 200,
        "data": [
          {
            "id": 1,
            "code": "11",
            "name": "北京市",
            "regionCode": "000003",
            "regionName": "华北大区"
          },
          {
            "id": 2,
            "code": "12",
            "name": "天津市",
            "regionCode": "000003",
            "regionName": "华北大区"
          },
          {
            "id": 33,
            "code": "81",
            "name": "香港",
            "regionCode": "000008",
            "regionName": "港澳台大区"
          },
          {
            "id": 34,
            "code": "82",
            "name": "澳门",
            "regionCode": "000008",
            "regionName": "港澳台大区"
          }
        ]
      }
    }
  },
  mounted() {
    getProvinceList().then(res => {
      console.log(res)
    })
  },
  methods: {
    btnClick(type, scope) {

    }
  },
}
</script>

<style>
</style>