css
shj
2022-07-18 9f4e449a4159c9debf5520a797393bd5df2e5908
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
<template>
    <div class="box">
        <el-button type="primary" :icon="Plus" @click="openD">新建</el-button>
         <el-table :data="tableData" style="width: 100%"  row-key="id">
    <el-table-column align="center" prop="date" label="是否为设备内容"/>
    <el-table-column align="center" prop="name" label="巡检" />
    <el-table-column align="center" prop="address" label="检测" />
    <el-table-column align="center" prop="address" label="类别名称" />
    <el-table-column align="center" label="操作">
        <template #default>
         <el-button type="primary" link :icon="View">查看</el-button>
         <el-button type="primary" link :icon="EditPen">修改</el-button>
         <el-button type="primary" link :icon="Delete">删除</el-button>
         <el-button type="primary" link :icon="CirclePlus">添加下级设备设施类型管理</el-button>
        </template>
    </el-table-column>
  </el-table>
   <Dailog ref="Show"></Dailog>
    </div>
</template>
<script lang="ts">
import { defineComponent,ref } from 'vue'
import {Plus,View,EditPen,Delete,CirclePlus} from '@element-plus/icons-vue'
import Dailog from "./component/Dailog.vue"
export default defineComponent({
    components:{Dailog},
    setup() {
      const tableData = [
  {
    id: 1,
    date: '2016-05-02',
    name: 'wangxiaohu',
  },
  {
    id: 2,
    date: '2016-05-04',
    name: 'wangxiaohu',
  },
  {
    id: 3,
    date: '2016-05-01',
    name: 'wangxiaohu',
    children: [
      {
        id: 31,
        date: '2016-05-01',
        name: 'wangxiaohu',
         children: [
      {
        id: 35,
        date: '2016-05-01',
        name: 'wangxiaohu',
      },
      {
        id: 36,
        date: '2016-05-01',
        name: 'wangxiaohu',
      },
    ],
      },
      {
        id: 32,
        date: '2016-05-01',
        name: 'wangxiaohu',
      },
    ],
  },
  {
    id: 4,
    date: '2016-05-03',
    name: 'wangxiaohu',
  },
]
    const Show=ref()
    const openD=()=>{
        Show.value.openDailog()
    }
       return{
           tableData,
           Show,
           openD,
           Plus,
           View,
           EditPen,
           Delete,
           CirclePlus
       } 
    },
})
</script>
<style scoped>
.box{
    padding: 20px;
    background-color: #fff;
}
</style>