school.vue
4.76 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<template>
<div>
<back-box>
<template slot="title">
<span>学校设置</span>
</template>
<template slot="btns">
<el-tooltip effect="dark" content="导入学校名单" placement="bottom">
<el-button
type="primary"
icon="el-icon-upload2"
size="mini"
plain
circle
@click="diaUp = true"
></el-button>
</el-tooltip>
</template>
</back-box>
<div class="page-content">
<div class="content-box">
<i class="el-icon-edit"></i>
<ul class="school-info">
<li class="school-item">
<span class="s1">学校名称:</span>
<span class="s2">{{ school.title }}</span>
</li>
<li class="school-item">
<span class="s1">授课端管理密码:</span>
<span class="s2">{{ school.password }}</span>
</li>
<li class="school-item">
<span class="s1">联系人:</span>
<span class="s2">{{ school.lianxiren }}</span>
</li>
<li class="school-item">
<span class="s1">手机号码:</span>
<span class="s2">{{ school.phone }}</span>
</li>
<li class="school-item">
<span class="s1">学段:</span>
<span class="s2">{{ school.xueduan }}</span>
</li>
<li class="school-item">
<span class="s1">所属集团:</span>
<span class="s2">{{ school.jituan }}</span>
</li>
</ul>
<div class="grade-box">
<p class="h-title">年级管理</p>
<ul class="grade-info">
<li class="grade-item">
<p class="grade-name">一年级</p>
<div class="grade-class">
<p><i class="fa fa-building"></i>班级:10个</p>
<p><i class="fa fa-book"></i>科目:10个</p>
</div>
</li>
</ul>
</div>
</div>
</div>
<el-dialog title="导入学校名单" :visible.sync="diaUp" width="400">
<up-load id="downDevice" :url="url" fileName="学校名单">
<p class="down-txt" slot="down">
通过Excel名单导入学校名单,需要提供设备编码,点击
<el-link type="danger" @click="downExcel">模板下载</el-link> 。
</p>
</up-load>
<div class="dialog-footer" slot="footer">
<el-button @click="diaUp = false">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { downloadFile } from "@/utils";
export default {
data() {
return {
url: "xxx",
diaUp: false,
school: {
title: "长水实验中学",
password: "123456",
lianxiren: "张老师",
phone: "13548645321",
xueduan: "初中",
jituan: "长水集团",
},
};
},
methods: {
async downExcel() {
let data = await this.$request.downDevice({
id: this.id,
});
if (data && !data.code) {
let blob = new Blob([data], {
type: "application/vnd.ms-excel;charset=utf-8",
});
downloadFile(`设备信息.xlsx`, blob);
} else {
this.$message.error(data.message);
}
},
},
};
</script>
<style lang="scss" scoped>
.page-content {
padding: 20px;
.content-box {
background: #f8f8f8;
border-radius: 16px;
position: relative;
.el-icon-edit {
position: absolute;
top: 12px;
right: 12px;
padding:5px;
font-size:18px;
cursor: pointer;
&:hover{
color:#36f
}
}
}
.school-info {
display: flex;
flex-wrap: wrap;
padding: 16px 0;
border-bottom:.5px solid #f2f2f2;
.school-item {
width: 50%;
line-height: 48px;
padding-left: 100px;
display: flex;
box-sizing: border-box;
.s1 {
width: 160px;
font-size: 15px;
color: #888;
}
.s2 {
flex: 1;
}
}
}
.grade-box {
padding: 20px;
.grade-info{
display: flex;
flex-wrap:wrap;
padding:20px;
.grade-item{
width:300px;
margin-right:50px;
margin-bottom:40px;
box-sizing: border-box;
padding:12px 16px;
border-radius:10px;
box-shadow: 1px 1px 3px #888;
}
.grade-name{
font-size:16px;
font-weight: bold;
line-height: 18px;
padding-bottom:12px;
}
.grade-class{
display: flex;
justify-content: space-between;
font-size:15px;
padding-right:20px;
.fa{
font-size:18px;
margin-right:5px;
color:#a4a4a4
}
.fa-book{
font-size:20px;
}
}
}
}
}
</style>