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
111
112
113
114
115
116
117
118
119
120
121
122
<template>
<div class="eibs-tab">
<c-col :span="24">
<el-table
:border="true"
:data="itemList"
style="width:80%,text-align:center"
>
<el-table-column label="编号" prop="tid" width="200px" >
</el-table-column>
<el-table-column label="标题" prop="theme" width="400px" >
</el-table-column>
<el-table-column label="发布机构" prop="unit" width="200px" >
</el-table-column>
<el-table-column label="时间" prop="dat" width="200px " >
</el-table-column>
<el-table-column label="操作" width="200px" fixed="right">
<template slot-scope="scope">
<c-button type="primary" size="small" @click="handleEdit(scope.$index, scope.row)" >
修改</c-button>
<c-button type="danger" size="small" @click="handleDelete(scope.$index, scope.row)" >
删除</c-button>
</template>
</el-table-column>
</el-table>
</c-col>
<!-- <table border="1">
<tr>
<th>主题</th>
<th>发布机构</th>
<th>发布人</th>
</tr>
<tr v-for="notice in itemList" :key="notice.tid">
<td>{{notice.theme}}</td>
<td>{{notice.unit}}</td>
<td>{{notice.pubname}}</td>
</tr>
</table> -->
</div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Utils from "~/utils/index";
import Event from "~/model/Notice/Event";
import { my } from "~/service/notice";
export default {
inject: ["root"],
// props: ["model", "codes"],
mixins: [commonProcess],
data(){
return {
itemList:[
{}
],
}
},
methods:{
handleEdit(index, row) {
console.log(index, row);
},
handleDelete(index, row) {
console.log(index, row);
},
// ...Event,
getList(){
my().then(res => {
// console.log(res);
this.itemList=res
console.log(this.itemList);
})
}
},
created(){
this.getList();
},
// mounted(){
// }
}
</script>
<style>
</style>