algo_manage.vue
6.63 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<template>
<div class="innnerBox">
<div class="algobox">
<el-row>
<el-col :span="8" class="itembox" >
<el-card shadow="always" class="sfbox">
<div class="sfboxcontent" @click="showsfdetail(1,'交通算法')">
<div class="left-icon">
<i class="icon-fanxing-teshucheliangzongliang"></i>
</div>
<div class="right-content">
<div class="sflx">交通算法</div>
<div class="sfzl">算法种类 {{jiaotong.length}}</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="8" class="itembox">
<el-card shadow="always" class="sfbox">
<div class="sfboxcontent" @click="showsfdetail(2,'城市综合治理算法')">
<div class="left-icon">
<i class="icon-fanxing-shanchu2"></i>
</div>
<div class="right-content">
<div class="sflx">城市综合治理算法</div>
<div class="sfzl">算法种类 {{zongzhi.length}}</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="8" class="itembox" >
<el-card shadow="always" class="sfbox">
<div class="sfboxcontent" @click="showsfdetail(3,'社区管理算法')">
<div class="left-icon">
<i class="el-icon-s-flag"></i>
</div>
<div class="right-content">
<div class="sflx">社区管理算法</div>
<div class="sfzl">算法种类 {{shequ.length}}</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="8" class="itembox">
<el-card shadow="always" class="sfbox">
<div class="sfboxcontent" @click="showsfdetail(4,'人脸识别算法')">
<div class="left-icon">
<i class="el-icon-user"></i>
</div>
<div class="right-content">
<div class="sflx">人脸识别算法</div>
<div class="sfzl">算法种类 {{renlian.length}}</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="8" class="itembox">
<el-card shadow="always" class="sfbox" >
<div class="sfboxcontent" @click="showsfdetail(5,'语义分析算法')">
<div class="left-icon">
<i class="el-icon-question"></i>
</div>
<div class="right-content">
<div class="sflx">语义分析算法</div>
<div class="sfzl">算法种类 {{yuyi.length}}</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="8" class="itembox">
<el-card shadow="always" class="sfbox">
<div class="sfboxcontent" @click="showsfdetail(6,'文本识别算法')">
<div class="left-icon">
<i class="el-icon-s-claim"></i>
</div>
<div class="right-content">
<div class="sflx">文本识别算法</div>
<div class="sfzl">算法种类 {{wenben.length}}</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
<el-dialog :title="title" :visible.sync="isShow" width="80%" class="add-algomanage-box">
<div class="detailtable">
<el-table
:data="tableData"
height="500px"
style="width: 100%">
<el-table-column
prop="sfname"
label="算法名称"
>
</el-table-column>
<el-table-column
prop="sflb"
label="算法类别">
</el-table-column>
<el-table-column
prop="sfly"
label="来源">
</el-table-column>
<el-table-column
prop="yjzc"
label="硬件支持">
</el-table-column>
<el-table-column
prop="cj"
label="厂家">
</el-table-column>
<el-table-column
prop="fbsj"
label="发布时间">
</el-table-column>
<el-table-column
prop="bbh"
label="版本号">
</el-table-column>
<el-table-column
prop="info"
label="其他信息">
</el-table-column>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false">取 消</el-button>
<el-button type="primary" @click="isShow = false">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {zongzhi,jiaotong,shequ,renlian,yuyi,wenben} from './algotype'
export default {
data() {
return {
tableData: [],
isShow: false,
details: [],
title:'',
jiaotong:[],
zongzhi:[],
renlian:[],
shequ:[],
yuyi:[],
wenben:[]
};
},
methods: {
showsfdetail(index,title){
this.title = title;
this.isShow = true;
switch (index) {
case 1:
this.tableData = this.jiaotong
break;
case 2:
this.tableData = this.zongzhi
break;
case 3:
this.tableData = this.shequ
break;
case 4:
this.tableData = this.renlian
break;
case 5:
this.tableData = this.yuyi
break;
case 6:
this.tableData = this.wenben
break;
default:
break;
}
}
},
destroyed() {
this.zongzhi = []
},
created() {
//jiaotong
this.jiaotong = JSON.parse(JSON.stringify(jiaotong));
this.zongzhi = JSON.parse(JSON.stringify(zongzhi));
this.shequ = JSON.parse(JSON.stringify(shequ));
this.renlian = JSON.parse(JSON.stringify(renlian));
this.wenben = JSON.parse(JSON.stringify(wenben));
this.yuyi = JSON.parse(JSON.stringify(yuyi));
var plugData = JSON.parse(localStorage.getItem("plugData")?localStorage.getItem("plugData"):'[]');
plugData.map(ele=> {
if(ele.algotype == 'jiaotong'){
this.jiaotong.push(ele);
}
if(ele.algotype == 'zongzhi'){
this.zongzhi.push(ele);
}
if(ele.algotype == 'shequ'){
this.shequ.push(ele);
}
if(ele.algotype == 'renlian'){
this.renlian.push(ele);
}
if(ele.algotype == 'yuyi'){
this.yuyi.push(ele);
}
if(ele.algotype == 'wenben'){
this.wenben.push(ele);
}
})
}
};
</script>
<style lang="stylus" scoped>
.itembox {
padding: 40px 0px;
}
.algobox {
min-height: 800px;
}
.sfbox {
height: 180px;
width: 400px;
margin: 0 auto;
display: flex;
cursor pointer
}
.sfboxcontent{
display flex
}
.left-icon {
line-height: 130px;
padding-left 40px;
i {
font-size: 40px;
color #1890ff
}
}
.right-content{
font-size 20px
margin-left 70px
.sflx{
margin-top 30px
font-size 24px
}
.sfzl{
margin-top 20px
color #696c70
}
}
</style>