bug
jiangping
2023-12-06 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<template>
  <TableLayout v-permissions="['ext:planimportext:query']">
     <!-- <TableLayout> -->
    <!-- 搜索表单 -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-suffix=":" label-width="100px" inline>
      <el-form-item label="导入文件" prop="fileName">
        <el-input v-model="searchForm.fileName" placeholder="请输入" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="导入状态" prop="status">
        <el-select v-model="searchForm.status" placeholder="全部">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.name"
            :value="item.id"
          ></el-option>
        </el-select>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
      </section>
    </el-form>
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <el-table
        v-loading="isWorking.search"
        :data="tableData.list"
        stripe
        border
        
        @selection-change="handleSelectionChange"
      >
        <!-- <el-table-column type="selection" width="55"></el-table-column> -->
        <el-table-column prop="fileName" label="导入文件" min-width="100px"></el-table-column>
        <!-- <el-table-column prop="status" label="导入状态" min-width="100px">
           <template slot-scope="{row}">
            <span v-if="row.status == '1'" >成功</span>
            <span v-if="row.status == '0'">失败</span>
          </template>
        </el-table-column> -->
        <el-table-column prop="createTime" label="导入时间" min-width="100px"></el-table-column>
        <el-table-column prop="dmodel.name" label="所在部门" min-width="100px"></el-table-column>
        <el-table-column prop="umodel.realname" label="导入用户" min-width="100px"></el-table-column>
        <!-- <el-table-column
          label="操作"
          min-width="120"
          fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" @click="downLoad(row)" style="color:#2E68EC">下载</el-button>
          </template>
        </el-table-column> -->
      </el-table>
      <pagination
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
        :pagination="tableData.pagination"
      ></pagination>
    </template>
  </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
export default {
  name: 'PlanImportExt',
  extends: BaseTable,
  components: { TableLayout, Pagination },
  data () {
    return {
      options: [
        { name: '成功', id: '1' },
        { name: '失败', id: '2' }
      ],
      // 搜索
      searchForm: {
        // status: '',
        // fileName: ''
      }
    }
  },
  created () {
    this.config({
      module: '计划导入记录',
      api: '/ext/planImportExt',
      'field.id': 'id',
      'field.main': 'name',
      sorts: [{ direction: 'DESC', property: 'CREATE_TIME' }]
    })
    this.search()
  },
  methods: {
    downLoad (row) {
      // console.log(row.fileName)
    },
    
  }
}
</script>
<style lang="scss" scoped>
.divide{
  width: 100%;
  height: 2px;
  background-color: rgb(204, 204, 204);
}
 
</style>