2023西安数博会CIM演示-【前端】-Web
AdaKing88
2023-08-21 bc03b832caa49bbcd2674fe4cae3701b5059bf95
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
<!--
 * @Descripttion: 
 * @version: 1.0.0
 * @Author: glc
 * @Date: 2022-04-29 16:13:29
 * @LastEditors: Andy
 * @LastEditTime: 2023-02-15 08:47:38
-->
<template>
  <el-row align="middle">
    <el-col
      :span="6"
      v-for="(item, index) in tabledata"
      :key="index"
      :offset="0"
    >
      <el-card shadow="hover" class="appcard">
        <div style="display: flex; cursor: pointer" @click="openApp(item)">
          <div class="card_left">
            <img
              style="width: 100%"
              :src="require('../../assets/img/dataedit/' + item.imagefile)"
            />
          </div>
          <div class="card_center">
            <div class="app_item_name">应用名称:{{ item.appname }}</div>
            <div class="app_item_name">应用类型:{{ item.typename }}</div>
            <div class="app_item_name">创建时间:{{ item.createtime }}</div>
            <div class="app_item_name" v-show="activetag === 1">
              创建人:{{ item.creator }}
            </div>
            <div class="app_item_bottom" v-show="activetag === 2">
              <el-button type="text" @click="deleteApp(item)" size="small"
                >删除</el-button
              >
              <el-button type="text" @click="renameApp(item)" size="small"
                >重命名</el-button
              >
              <el-checkbox
                v-model="item.ispublic"
                size="mini"
                style="margin-left: 5px"
                @change="(checked) => handleSelectChange(checked, item)"
                >公开</el-checkbox
              >
            </div>
          </div>
        </div>
      </el-card>
    </el-col>
  </el-row>
</template>
<script>
export default {
  props: ["data", "refresh", "total", "activetag"],
  data() {
    return {};
  },
  methods: {
    openApp(app) {
      console.log(app.appname);
    },
    handleSelectChange(checked, item) {},
  },
  computed: {
    tabledata() {
      return this.data;
    },
  },
};
</script>
<style lang="less" scoped>
.appcard {
  margin-top: 15px;
  width: 420px;
  height: 170px;
  .card_left {
    display: inline-block;
    width: 50%;
    padding: 5px;
  }
  .card_center {
    display: inline-block;
    width: 45%;
    padding: 5px;
    .app_item_name {
      font-weight: bold;
      margin: 5px 2px;
    }
    .app_item_bottom {
      width: 100%;
      text-align: left;
      display: inline-block;
    }
  }
}
</style>