jinlin
2024-03-14 9ad8b94e643ea2a996a10aca7bf5948643e3571d
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
<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sysPictureBase-sysPictureBase}">
      <zt-table-wraper query-url="/sysPictureBase/page" delete-url="/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.id" :src="url+row.id" 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'
  import Cookies from 'js-cookie'
 
  export default {
    data() {
      return {
        url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`,
        dataForm: {
          contentType: '',
          systemMark: '',
          sortNo: ''
        },
      }
    },
    components: {
      AddOrUpdate
    },
    mounted() {
    },
    methods: {}
  }
</script>