wente
2024-03-12 3c08a64d7829849811ef19a0ba11d41b6268fa5e
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
<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sysPictureBase-sysPictureBase}">
      <zt-table-wraper query-url="/sysPictureBase/SysPictureBase/page" delete-url="/sysPictureBase/SysPictureBase/"
                       v-slot="{ table }">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
          <el-form-item>
            <el-input v-model="dataForm.contentType" placeholder="请输入检索关键字" clearable></el-input>
 
          </el-form-item>
          <el-form-item>
            <zt-dict v-model="dataForm.systemMark" dict="product" placeholder="请选择系统标识" clearable></zt-dict>
          </el-form-item>
          <el-form-item>
            <zt-button type="query" @click="table.query()"/>
            <zt-button type="add"  @click="table.editHandle()"/>
            <zt-button type="delete"  @click="table.deleteHandle()"/>
          </el-form-item>
        </el-form>
        <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
                  border @selection-change="table.selectionChangeHandle">
          <el-table-column type="selection" width="40" align="center"/>
          <el-table-column prop="sortNo" label="排序"/>
          <el-table-column prop="name" label="图片名称"/>
          <el-table-column label="图片" align="center">
            <template v-slot="{ row }">
              <el-image v-if="row.accessoryMap" :src="getPath(row)" style="height: 50px;width: 50px"></el-image>
            </template >
          </el-table-column>
          <el-table-column prop="contentType" label="检索关键字"/>
          <zt-table-column-dict prop="systemMark" label="系统标识" dict="product"/>
          <zt-table-column-handle :table="table"
                                  delete-perm="sysPictureBase::delete"/>
        </el-table>
        <!-- 弹窗, 新增 / 修改 -->
        <add-or-update @refreshDataList="table.query"/>
      </zt-table-wraper>
    </div>
  </el-card>
</template>
 
<script>
  import AddOrUpdate from './SysPictureBase-AddOrUpdate'
 
  export default {
    data() {
      return {
        dataForm: {
          contentType: '',
          systemMark: '',
          sortNo:''
        },
      }
    },
    components: {
      AddOrUpdate
    },
    methods: {
      getPath(row) {
          if (row.accessoryMap){
            for (let key in row.accessoryMap) {
              return key
            }
          }
      },
      indexFormat(index) {
        return index += 1
      },
    }
  }
</script>