|
@@ -1,14 +1,707 @@
|
1
|
1
|
<template>
|
2
|
|
- <div class="main_root">白名单</div>
|
|
2
|
+ <div class="main_root">
|
|
3
|
+ <div class="search_header">
|
|
4
|
+ <div class="search_left">
|
|
5
|
+ <Input
|
|
6
|
+ v-model="searchForm.whiteName"
|
|
7
|
+ placeholder="请输入名称"
|
|
8
|
+ search
|
|
9
|
+ @on-search="searchList()"
|
|
10
|
+ style="width: 150px"
|
|
11
|
+ />
|
|
12
|
+ </div>
|
|
13
|
+ <Button type="primary" class="primary_btn" @click="toAdd()">新建</Button>
|
|
14
|
+ </div>
|
|
15
|
+ <div class="table_wrap">
|
|
16
|
+ <Table :columns="columns" :data="searchForm.list">
|
|
17
|
+ <template slot-scope="{ row }" slot="whiteName">
|
|
18
|
+ <div class="name_slot">
|
|
19
|
+ <div class="name_content" :title="row.whiteName">
|
|
20
|
+ {{ row.whiteName }}
|
|
21
|
+ </div>
|
|
22
|
+ <div v-if="row.whiteType === 2" class="app_tag">公用</div>
|
|
23
|
+ </div>
|
|
24
|
+ </template>
|
|
25
|
+ <template slot-scope="{ row }" slot="actionSlot">
|
|
26
|
+ <div class="action_list">
|
|
27
|
+ <div @click="toView(row)">查看</div>
|
|
28
|
+ <div @click="toEdit(row)">编辑</div>
|
|
29
|
+ <div class="action_del" @click="toDel(row)">删除</div>
|
|
30
|
+ </div>
|
|
31
|
+ </template>
|
|
32
|
+ </Table>
|
|
33
|
+ </div>
|
|
34
|
+ <div class="page_wrap">
|
|
35
|
+ <Page
|
|
36
|
+ :transfer="true"
|
|
37
|
+ :total="searchForm.total"
|
|
38
|
+ :current="searchForm.page"
|
|
39
|
+ :page-size="searchForm.size"
|
|
40
|
+ :page-size-opts="[10, 20, 40, 60]"
|
|
41
|
+ @on-change="pageChange"
|
|
42
|
+ @on-page-size-change="pageSizeChange"
|
|
43
|
+ show-total
|
|
44
|
+ show-sizer
|
|
45
|
+ ></Page>
|
|
46
|
+ </div>
|
|
47
|
+ <!-- 新建/编辑 -->
|
|
48
|
+ <Modal
|
|
49
|
+ class="modal1 white"
|
|
50
|
+ :mask-closable="false"
|
|
51
|
+ v-model="whiteLibraryInfo.show"
|
|
52
|
+ :title="whiteLibraryInfo.whiteid ? '编辑' : '新建'"
|
|
53
|
+ >
|
|
54
|
+ <Form
|
|
55
|
+ v-if="whiteLibraryInfo.show"
|
|
56
|
+ ref="addForm"
|
|
57
|
+ :model="whiteLibraryInfo"
|
|
58
|
+ :rules="rules"
|
|
59
|
+ :label-width="90"
|
|
60
|
+ inline
|
|
61
|
+ >
|
|
62
|
+ <FormItem label="名称" prop="whiteName" style="width: 100%">
|
|
63
|
+ <Input
|
|
64
|
+ v-model="whiteLibraryInfo.whiteName"
|
|
65
|
+ placeholder="请输入名称"
|
|
66
|
+ ></Input>
|
|
67
|
+ </FormItem>
|
|
68
|
+ <FormItem label="简介" style="width: 100%">
|
|
69
|
+ <Input
|
|
70
|
+ v-model="whiteLibraryInfo.comm"
|
|
71
|
+ type="textarea"
|
|
72
|
+ :rows="4"
|
|
73
|
+ :maxlength="255"
|
|
74
|
+ placeholder="请输入简介"
|
|
75
|
+ ></Input>
|
|
76
|
+ <div class="appcomm">
|
|
77
|
+ 应用简介不能超过255个字符<span class="red">{{
|
|
78
|
+ whiteLibraryInfo.comm.length
|
|
79
|
+ }}</span
|
|
80
|
+ >/255
|
|
81
|
+ </div>
|
|
82
|
+ </FormItem>
|
|
83
|
+ <FormItem label="网址" prop="website" style="width: 100%">
|
|
84
|
+ <Input
|
|
85
|
+ type="textarea"
|
|
86
|
+ :rows="4"
|
|
87
|
+ v-model="whiteLibraryInfo.website"
|
|
88
|
+ placeholder="请填写正确的IP地址或者域名,多个IP或域名之间用英文分号隔开"
|
|
89
|
+ ></Input>
|
|
90
|
+ <div style="color: #7c8db5">
|
|
91
|
+ 说明:IP例如:192.168.1.200或者192.168.1.200/24,域名例如:new.iflytek.com
|
|
92
|
+ </div>
|
|
93
|
+ </FormItem>
|
|
94
|
+ <FormItem label="选择学校" style="width: 100%" class="require">
|
|
95
|
+ <RadioGroup v-model="whiteLibraryInfo.targetSchool">
|
|
96
|
+ <Radio :label="1">所有学校</Radio>
|
|
97
|
+ <Radio :label="2">自定义学校</Radio>
|
|
98
|
+ </RadioGroup>
|
|
99
|
+ <div class="targetSchool" v-if="whiteLibraryInfo.targetSchool === 2">
|
|
100
|
+ <div class="allSchool">
|
|
101
|
+ <Input
|
|
102
|
+ v-model="whiteLibraryInfo.schoolname"
|
|
103
|
+ placeholder="请输入关键字"
|
|
104
|
+ search
|
|
105
|
+ @on-search="getSchool"
|
|
106
|
+ ></Input>
|
|
107
|
+ <div class="school_list">
|
|
108
|
+ <Tree
|
|
109
|
+ @on-check-change="getSelectedNodes"
|
|
110
|
+ :data="school_list"
|
|
111
|
+ show-checkbox
|
|
112
|
+ ></Tree>
|
|
113
|
+ </div>
|
|
114
|
+ </div>
|
|
115
|
+ <div class="selectSchool">
|
|
116
|
+ <div class="school_num">
|
|
117
|
+ 已选<span class="num">{{ select_schools.length }}</span
|
|
118
|
+ >所学校
|
|
119
|
+ </div>
|
|
120
|
+ <div class="school_list">
|
|
121
|
+ <span
|
|
122
|
+ class="school_item"
|
|
123
|
+ v-for="(item, index) in this.select_schools"
|
|
124
|
+ :key="item.schoolid"
|
|
125
|
+ >
|
|
126
|
+ <span class="title" :title="item.title">{{
|
|
127
|
+ item.title
|
|
128
|
+ }}</span>
|
|
129
|
+ <img
|
|
130
|
+ @click="delSchool(item)"
|
|
131
|
+ class="del"
|
|
132
|
+ src="../../../assets/img/guanbi_red.png"
|
|
133
|
+ />
|
|
134
|
+ </span>
|
|
135
|
+ </div>
|
|
136
|
+ </div>
|
|
137
|
+ </div>
|
|
138
|
+ </FormItem>
|
|
139
|
+ </Form>
|
|
140
|
+ <div slot="footer">
|
|
141
|
+ <Button @click="whiteLibraryInfo.show = false">取消</Button>
|
|
142
|
+ <Button @click="saveAddInfo()" type="primary">保存</Button>
|
|
143
|
+ </div>
|
|
144
|
+ </Modal>
|
|
145
|
+ <!-- 查看 -->
|
|
146
|
+ <Modal
|
|
147
|
+ class="modal1"
|
|
148
|
+ :mask-closable="false"
|
|
149
|
+ v-model="viewInfo.show"
|
|
150
|
+ title="查看"
|
|
151
|
+ >
|
|
152
|
+ <div class="view_title">
|
|
153
|
+ <div>{{ viewInfo.whiteName }}</div>
|
|
154
|
+ <div v-if="viewInfo.whiteType === 2" class="wltype_1">公共</div>
|
|
155
|
+ </div>
|
|
156
|
+ <Form :label-width="80" inline>
|
|
157
|
+ <FormItem label="简介" style="margin-bottom: 0; width: 100%">{{
|
|
158
|
+ viewInfo.comm
|
|
159
|
+ }}</FormItem>
|
|
160
|
+ <FormItem label="网址" style="margin-bottom: 0; width: 100%">{{
|
|
161
|
+ viewInfo.website
|
|
162
|
+ }}</FormItem>
|
|
163
|
+ <FormItem label="授权" style="margin-bottom: 0; width: 100%">
|
|
164
|
+ <Table border :columns="columns1" :data="viewInfo.schools"> </Table>
|
|
165
|
+ </FormItem>
|
|
166
|
+ </Form>
|
|
167
|
+ <div slot="footer" style="text-align: center">
|
|
168
|
+ <Button @click="viewInfo.show = false">关闭</Button>
|
|
169
|
+ </div>
|
|
170
|
+ </Modal>
|
|
171
|
+ </div>
|
3
|
172
|
</template>
|
4
|
173
|
|
5
|
174
|
<script>
|
|
175
|
+import {
|
|
176
|
+ white_list,
|
|
177
|
+ white_edit,
|
|
178
|
+ white_add,
|
|
179
|
+ white_detail,
|
|
180
|
+ white_delete
|
|
181
|
+} from "@/api/whiteLibrary";
|
|
182
|
+import { region_list_rs } from "@/api/region";
|
6
|
183
|
export default {
|
7
|
184
|
data() {
|
8
|
|
- return {};
|
|
185
|
+ return {
|
|
186
|
+ searchForm: {
|
|
187
|
+ whiteName: "",
|
|
188
|
+ regionid: "",
|
|
189
|
+ page: 1,
|
|
190
|
+ size: 10,
|
|
191
|
+ list: [],
|
|
192
|
+ total: 0
|
|
193
|
+ },
|
|
194
|
+ rules: {
|
|
195
|
+ whiteName: [
|
|
196
|
+ {
|
|
197
|
+ required: true,
|
|
198
|
+ message: "请输入名称",
|
|
199
|
+ trigger: "change"
|
|
200
|
+ }
|
|
201
|
+ ],
|
|
202
|
+ website: [
|
|
203
|
+ {
|
|
204
|
+ required: true,
|
|
205
|
+ message: "请输入网址",
|
|
206
|
+ trigger: "change"
|
|
207
|
+ }
|
|
208
|
+ ],
|
|
209
|
+ versionname: [
|
|
210
|
+ {
|
|
211
|
+ required: true,
|
|
212
|
+ message: "请输入版本名称",
|
|
213
|
+ trigger: "change"
|
|
214
|
+ }
|
|
215
|
+ ]
|
|
216
|
+ },
|
|
217
|
+ // 新建/编辑
|
|
218
|
+ whiteLibraryInfo: {
|
|
219
|
+ show: false,
|
|
220
|
+ whiteid: null,
|
|
221
|
+ rversion: null,
|
|
222
|
+ whiteName: "",
|
|
223
|
+ targetSchool: 1,
|
|
224
|
+ website: "",
|
|
225
|
+ regionid: "",
|
|
226
|
+ comm: "",
|
|
227
|
+ schoolids: []
|
|
228
|
+ },
|
|
229
|
+ // 查看
|
|
230
|
+ viewInfo: {
|
|
231
|
+ show: false,
|
|
232
|
+ whiteName: "",
|
|
233
|
+ // 1app 2网页
|
|
234
|
+ wltype: 1,
|
|
235
|
+ website: "",
|
|
236
|
+ versionname: "",
|
|
237
|
+ comm: "",
|
|
238
|
+ whiteAddress: ""
|
|
239
|
+ },
|
|
240
|
+ userInfo: {},
|
|
241
|
+ curRegion: [],
|
|
242
|
+ school_list: [],
|
|
243
|
+ select_schools: [],
|
|
244
|
+ columns: [
|
|
245
|
+ {
|
|
246
|
+ title: "序号",
|
|
247
|
+ align: "center",
|
|
248
|
+ width: 70,
|
|
249
|
+ render: (h, params) => {
|
|
250
|
+ return h(
|
|
251
|
+ "span",
|
|
252
|
+ params.index +
|
|
253
|
+ (this.searchForm.page - 1) * this.searchForm.size +
|
|
254
|
+ 1
|
|
255
|
+ );
|
|
256
|
+ }
|
|
257
|
+ },
|
|
258
|
+ {
|
|
259
|
+ title: "名称",
|
|
260
|
+ slot: "whiteName",
|
|
261
|
+ align: "center"
|
|
262
|
+ },
|
|
263
|
+ {
|
|
264
|
+ title: "网址",
|
|
265
|
+ key: "website",
|
|
266
|
+ align: "center"
|
|
267
|
+ },
|
|
268
|
+ {
|
|
269
|
+ title: "操作人",
|
|
270
|
+ key: "updatename",
|
|
271
|
+ width: 140,
|
|
272
|
+ align: "center"
|
|
273
|
+ },
|
|
274
|
+ {
|
|
275
|
+ title: "操作时间",
|
|
276
|
+ key: "updatetime",
|
|
277
|
+ width: 190,
|
|
278
|
+ align: "center"
|
|
279
|
+ },
|
|
280
|
+ {
|
|
281
|
+ title: "操作",
|
|
282
|
+ slot: "actionSlot",
|
|
283
|
+ width: 180,
|
|
284
|
+ align: "center"
|
|
285
|
+ }
|
|
286
|
+ ],
|
|
287
|
+ columns1: [
|
|
288
|
+ {
|
|
289
|
+ title: "序号",
|
|
290
|
+ align: "center",
|
|
291
|
+ width: 70,
|
|
292
|
+ type: "index"
|
|
293
|
+ },
|
|
294
|
+ {
|
|
295
|
+ title: "学校名称",
|
|
296
|
+ key: "schoolName",
|
|
297
|
+ align: "center"
|
|
298
|
+ },
|
|
299
|
+ {
|
|
300
|
+ title: "所属区域",
|
|
301
|
+ key: "regionName",
|
|
302
|
+ align: "center"
|
|
303
|
+ },
|
|
304
|
+ {
|
|
305
|
+ title: "操作时间",
|
|
306
|
+ key: "createtime",
|
|
307
|
+ align: "center"
|
|
308
|
+ }
|
|
309
|
+ ]
|
|
310
|
+ };
|
9
|
311
|
},
|
10
|
|
- methods: {}
|
|
312
|
+ created() {
|
|
313
|
+ this.userInfo = JSON.parse(
|
|
314
|
+ localStorage.getItem("xh_control_userInfo")
|
|
315
|
+ ).content;
|
|
316
|
+ this.init();
|
|
317
|
+ this.searchList();
|
|
318
|
+ },
|
|
319
|
+ methods: {
|
|
320
|
+ init() {
|
|
321
|
+ //获取区域学校
|
|
322
|
+ region_list_rs({ regionid: this.userInfo.regionid }).then((res) => {
|
|
323
|
+ if (res.code === 0) {
|
|
324
|
+ this.getHandleData(res.obj[0]);
|
|
325
|
+ this.curRegion = res.obj;
|
|
326
|
+ } else {
|
|
327
|
+ this.$Message.error(res.msg);
|
|
328
|
+ }
|
|
329
|
+ });
|
|
330
|
+ },
|
|
331
|
+ delSchool(item) {
|
|
332
|
+ this.select_schools = this.select_schools.filter(
|
|
333
|
+ (v) => v.schoolid != item.schoolid
|
|
334
|
+ );
|
|
335
|
+ //取消选择
|
|
336
|
+ this.getSelectSchool(this.school_list[0], item.schoolid, 0);
|
|
337
|
+ },
|
|
338
|
+ //选中区域学校
|
|
339
|
+ getSelectedNodes(data) {
|
|
340
|
+ this.select_schools = data.filter((v) => v.schoolid);
|
|
341
|
+ },
|
|
342
|
+ getSelectSchool(node, schoolid, type) {
|
|
343
|
+ if (schoolid) {
|
|
344
|
+ //删除
|
|
345
|
+ if (node.schoolid && node.schoolid === schoolid) {
|
|
346
|
+ let checked = type ? true : false;
|
|
347
|
+ this.$set(node, "checked", checked);
|
|
348
|
+ }
|
|
349
|
+ } else {
|
|
350
|
+ //保存
|
|
351
|
+ if (node.schoolid) {
|
|
352
|
+ this.whiteLibraryInfo.schoolids.push(node.schoolid);
|
|
353
|
+ }
|
|
354
|
+ }
|
|
355
|
+ if (node.children && node.children.length > 0) {
|
|
356
|
+ for (let child of node.children) {
|
|
357
|
+ this.getSelectSchool(child, schoolid, type);
|
|
358
|
+ }
|
|
359
|
+ }
|
|
360
|
+ },
|
|
361
|
+ getSchool() {
|
|
362
|
+ //获取区域学校
|
|
363
|
+ region_list_rs({
|
|
364
|
+ regionid: this.userInfo.regionid,
|
|
365
|
+ regionName: this.whiteLibraryInfo.schoolname
|
|
366
|
+ }).then((res) => {
|
|
367
|
+ if (res.code === 0) {
|
|
368
|
+ this.getHandleData(res.obj[0]);
|
|
369
|
+ this.school_list = res.obj;
|
|
370
|
+ } else {
|
|
371
|
+ this.$Message.error(res.msg);
|
|
372
|
+ }
|
|
373
|
+ });
|
|
374
|
+ },
|
|
375
|
+ getHandleData(node) {
|
|
376
|
+ node.title = node.regionName;
|
|
377
|
+ node.expand = true;
|
|
378
|
+ if (node.children && node.children.length > 0) {
|
|
379
|
+ for (let child of node.children) {
|
|
380
|
+ this.getHandleData(child);
|
|
381
|
+ }
|
|
382
|
+ }
|
|
383
|
+ },
|
|
384
|
+ // 搜索
|
|
385
|
+ searchList() {
|
|
386
|
+ this.searchForm.page = 1;
|
|
387
|
+ this.getList();
|
|
388
|
+ },
|
|
389
|
+ // 页码改变
|
|
390
|
+ pageChange(page) {
|
|
391
|
+ this.searchForm.page = page;
|
|
392
|
+ this.getList();
|
|
393
|
+ },
|
|
394
|
+ // 每页显示数量改变
|
|
395
|
+ pageSizeChange(size) {
|
|
396
|
+ this.searchForm.size = size;
|
|
397
|
+ this.searchForm.page = 1;
|
|
398
|
+ this.getList();
|
|
399
|
+ },
|
|
400
|
+ // 获取列表
|
|
401
|
+ getList() {
|
|
402
|
+ white_list({
|
|
403
|
+ page: this.searchForm.page,
|
|
404
|
+ size: this.searchForm.size,
|
|
405
|
+ whiteName: this.searchForm.whiteName,
|
|
406
|
+ regionid: this.userInfo.regionid
|
|
407
|
+ }).then((data) => {
|
|
408
|
+ if (data.code === 0) {
|
|
409
|
+ this.searchForm.list = data.obj.data;
|
|
410
|
+ this.searchForm.total = data.obj.total;
|
|
411
|
+ } else {
|
|
412
|
+ this.$Message.error(data.msg);
|
|
413
|
+ }
|
|
414
|
+ });
|
|
415
|
+ },
|
|
416
|
+ // 新建
|
|
417
|
+ toAdd() {
|
|
418
|
+ this.school_list = JSON.parse(JSON.stringify(this.curRegion));
|
|
419
|
+ this.whiteLibraryInfo = {
|
|
420
|
+ show: true,
|
|
421
|
+ whiteid: null,
|
|
422
|
+ rversion: null,
|
|
423
|
+ whiteName: "",
|
|
424
|
+ targetSchool: 1,
|
|
425
|
+ website: "",
|
|
426
|
+ regionid: "",
|
|
427
|
+ comm: "",
|
|
428
|
+ schoolids: []
|
|
429
|
+ };
|
|
430
|
+ },
|
|
431
|
+ // 保存新建
|
|
432
|
+ saveAddInfo() {
|
|
433
|
+ this.$refs.addForm.validate((valid) => {
|
|
434
|
+ if (valid) {
|
|
435
|
+ if (this.whiteLibraryInfo.targetSchool === 1) {
|
|
436
|
+ //获取全部学校
|
|
437
|
+ this.getSelectSchool(this.curRegion[0], null);
|
|
438
|
+ } else {
|
|
439
|
+ //获取选中学校
|
|
440
|
+ for (let school of this.select_schools) {
|
|
441
|
+ this.whiteLibraryInfo.schoolids.push(school.schoolid);
|
|
442
|
+ }
|
|
443
|
+ }
|
|
444
|
+ if (this.whiteLibraryInfo.schoolids.length === 0) {
|
|
445
|
+ this.$Message.error("请选择学校!");
|
|
446
|
+ return;
|
|
447
|
+ }
|
|
448
|
+ let api = this.whiteLibraryInfo.whiteid ? white_edit : white_add;
|
|
449
|
+ let form = {
|
|
450
|
+ whiteName: this.whiteLibraryInfo.whiteName,
|
|
451
|
+ targetSchool: this.whiteLibraryInfo.targetSchool,
|
|
452
|
+ regionid: this.userInfo.regionid,
|
|
453
|
+ website: this.whiteLibraryInfo.website,
|
|
454
|
+ comm: this.whiteLibraryInfo.comm,
|
|
455
|
+ schoolids: this.whiteLibraryInfo.schoolids
|
|
456
|
+ };
|
|
457
|
+ //编辑
|
|
458
|
+ if (this.whiteLibraryInfo.whiteid && this.whiteLibraryInfo.rversion) {
|
|
459
|
+ form.whiteid = this.whiteLibraryInfo.whiteid;
|
|
460
|
+ form.rversion = this.whiteLibraryInfo.rversion;
|
|
461
|
+ }
|
|
462
|
+ api(form).then((data) => {
|
|
463
|
+ if (data.code === 0) {
|
|
464
|
+ this.whiteLibraryInfo.show = false;
|
|
465
|
+ this.searchList();
|
|
466
|
+ this.$Message.success(data.msg);
|
|
467
|
+ } else {
|
|
468
|
+ this.$Message.error(data.msg);
|
|
469
|
+ }
|
|
470
|
+ });
|
|
471
|
+ }
|
|
472
|
+ });
|
|
473
|
+ },
|
|
474
|
+ // 查看
|
|
475
|
+ toView(row) {
|
|
476
|
+ white_detail({ whiteid: row.whiteid }).then((res) => {
|
|
477
|
+ if (res.code === 0) {
|
|
478
|
+ this.viewInfo = {
|
|
479
|
+ show: true,
|
|
480
|
+ whiteid: res.obj.whiteid,
|
|
481
|
+ rversion: res.obj.rversion,
|
|
482
|
+ whiteName: res.obj.whiteName,
|
|
483
|
+ targetSchool: res.obj.targetSchool,
|
|
484
|
+ website: res.obj.website,
|
|
485
|
+ regionid: res.obj.regionid,
|
|
486
|
+ comm: res.obj.comm,
|
|
487
|
+ schools: res.obj.schools
|
|
488
|
+ };
|
|
489
|
+ } else {
|
|
490
|
+ this.$Message.error(res.msg);
|
|
491
|
+ }
|
|
492
|
+ });
|
|
493
|
+ },
|
|
494
|
+ // 编辑
|
|
495
|
+ toEdit(row) {
|
|
496
|
+ this.school_list = JSON.parse(JSON.stringify(this.curRegion));
|
|
497
|
+ white_detail({ whiteid: row.whiteid }).then((res) => {
|
|
498
|
+ if (res.code === 0) {
|
|
499
|
+ this.whiteLibraryInfo = {
|
|
500
|
+ show: true,
|
|
501
|
+ whiteid: res.obj.whiteid,
|
|
502
|
+ rversion: res.obj.rversion,
|
|
503
|
+ whiteName: res.obj.whiteName,
|
|
504
|
+ targetSchool: res.obj.targetSchool,
|
|
505
|
+ website: res.obj.website,
|
|
506
|
+ regionid: res.obj.regionid,
|
|
507
|
+ comm: res.obj.comm,
|
|
508
|
+ schoolids: []
|
|
509
|
+ };
|
|
510
|
+ if (this.whiteLibraryInfo.targetSchool === 2) {
|
|
511
|
+ //回显学校
|
|
512
|
+ this.select_schools = res.obj.schools.map((v) => {
|
|
513
|
+ //默认选择学校
|
|
514
|
+ this.getSelectSchool(this.school_list[0], v.schoolid, 1);
|
|
515
|
+ v.title = v.schoolName;
|
|
516
|
+ return v;
|
|
517
|
+ });
|
|
518
|
+ }
|
|
519
|
+ } else {
|
|
520
|
+ this.$Message.error(res.msg);
|
|
521
|
+ }
|
|
522
|
+ });
|
|
523
|
+ },
|
|
524
|
+ // 删除
|
|
525
|
+ toDel(row) {
|
|
526
|
+ this.$Modal.confirm({
|
|
527
|
+ title: "提示",
|
|
528
|
+ content: "您确定删除选中数据吗?",
|
|
529
|
+ onOk: () => {
|
|
530
|
+ white_delete({
|
|
531
|
+ whiteid: row.whiteid,
|
|
532
|
+ rversion: row.rversion
|
|
533
|
+ }).then((data) => {
|
|
534
|
+ if (data.code === 0) {
|
|
535
|
+ this.searchList();
|
|
536
|
+ this.$Message.success(data.msg);
|
|
537
|
+ } else {
|
|
538
|
+ this.$Message.error(data.msg);
|
|
539
|
+ }
|
|
540
|
+ });
|
|
541
|
+ },
|
|
542
|
+ onCancel: () => {}
|
|
543
|
+ });
|
|
544
|
+ }
|
|
545
|
+ }
|
11
|
546
|
};
|
12
|
547
|
</script>
|
13
|
548
|
|
14
|
|
-<style lang="less" scoped></style>
|
|
549
|
+<style lang="less" scoped>
|
|
550
|
+.search_header {
|
|
551
|
+ display: flex;
|
|
552
|
+ justify-content: space-between;
|
|
553
|
+ align-items: center;
|
|
554
|
+ margin: 16px 16px;
|
|
555
|
+ .search_left {
|
|
556
|
+ display: flex;
|
|
557
|
+ justify-content: flex-start;
|
|
558
|
+ align-items: center;
|
|
559
|
+ }
|
|
560
|
+}
|
|
561
|
+.white {
|
|
562
|
+ .appcomm {
|
|
563
|
+ height: 20px;
|
|
564
|
+ line-height: 20px;
|
|
565
|
+ text-align: right;
|
|
566
|
+ color: #b8c2d9;
|
|
567
|
+ font-size: 14px;
|
|
568
|
+ .red {
|
|
569
|
+ display: inline-block;
|
|
570
|
+ margin: 0 4px;
|
|
571
|
+ color: #f0153f;
|
|
572
|
+ }
|
|
573
|
+ }
|
|
574
|
+ .targetSchool {
|
|
575
|
+ width: 100%;
|
|
576
|
+ height: 400px;
|
|
577
|
+ border: 1px solid #ced9f2;
|
|
578
|
+ border-radius: 8px;
|
|
579
|
+ margin-top: 10px;
|
|
580
|
+ display: flex;
|
|
581
|
+ .allSchool {
|
|
582
|
+ border-right: 1px solid #ced9f2;
|
|
583
|
+ width: 50%;
|
|
584
|
+ padding: 10px;
|
|
585
|
+ .school_list {
|
|
586
|
+ margin-top: 10px;
|
|
587
|
+ height: calc(100% - 42px);
|
|
588
|
+ overflow-y: auto;
|
|
589
|
+ }
|
|
590
|
+ }
|
|
591
|
+ .selectSchool {
|
|
592
|
+ width: 50%;
|
|
593
|
+ padding: 10px;
|
|
594
|
+ .school_num {
|
|
595
|
+ height: 32px;
|
|
596
|
+ display: flex;
|
|
597
|
+ align-items: center;
|
|
598
|
+ .num {
|
|
599
|
+ color: #339cff;
|
|
600
|
+ font-weight: bold;
|
|
601
|
+ margin: 0 2px;
|
|
602
|
+ }
|
|
603
|
+ }
|
|
604
|
+ .school_list {
|
|
605
|
+ margin-top: 10px;
|
|
606
|
+ height: calc(100% - 42px);
|
|
607
|
+ overflow-y: auto;
|
|
608
|
+ .school_item {
|
|
609
|
+ display: inline-block;
|
|
610
|
+ width: calc(50% - 10px);
|
|
611
|
+ height: 28px;
|
|
612
|
+ line-height: 28px;
|
|
613
|
+ border-radius: 6px;
|
|
614
|
+ font-size: 14px;
|
|
615
|
+ padding: 0 30px 0 10px;
|
|
616
|
+ margin-right: 10px;
|
|
617
|
+ margin-bottom: 10px;
|
|
618
|
+ background: #f3f4fc;
|
|
619
|
+ position: relative;
|
|
620
|
+ .title {
|
|
621
|
+ display: inline-block;
|
|
622
|
+ width: calc(100% - 10px);
|
|
623
|
+ white-space: nowrap;
|
|
624
|
+ text-overflow: ellipsis;
|
|
625
|
+ overflow: hidden;
|
|
626
|
+ }
|
|
627
|
+ .del {
|
|
628
|
+ width: 20px;
|
|
629
|
+ height: 20px;
|
|
630
|
+ object-fit: cover;
|
|
631
|
+ position: absolute;
|
|
632
|
+ right: 10px;
|
|
633
|
+ top: 4px;
|
|
634
|
+ cursor: pointer;
|
|
635
|
+ }
|
|
636
|
+ }
|
|
637
|
+ }
|
|
638
|
+ }
|
|
639
|
+ }
|
|
640
|
+}
|
|
641
|
+.view_title {
|
|
642
|
+ display: flex;
|
|
643
|
+ justify-content: center;
|
|
644
|
+ align-items: center;
|
|
645
|
+ margin-bottom: 16px;
|
|
646
|
+ font-size: 18px;
|
|
647
|
+ font-weight: bold;
|
|
648
|
+ text-align: center;
|
|
649
|
+ .wltype_1 {
|
|
650
|
+ margin-left: 10px;
|
|
651
|
+ padding: 0 10px;
|
|
652
|
+ line-height: 20px;
|
|
653
|
+ color: #fff;
|
|
654
|
+ font-weight: normal;
|
|
655
|
+ font-size: 12px;
|
|
656
|
+ border-radius: 4px;
|
|
657
|
+ background: #7854f6;
|
|
658
|
+ }
|
|
659
|
+ .wltype_2 {
|
|
660
|
+ margin-left: 10px;
|
|
661
|
+ padding: 0 10px;
|
|
662
|
+ line-height: 20px;
|
|
663
|
+ color: #fff;
|
|
664
|
+ font-weight: normal;
|
|
665
|
+ font-size: 12px;
|
|
666
|
+ border-radius: 4px;
|
|
667
|
+ background: #52c41a;
|
|
668
|
+ }
|
|
669
|
+}
|
|
670
|
+.name_slot {
|
|
671
|
+ display: flex;
|
|
672
|
+ justify-content: center;
|
|
673
|
+ align-items: center;
|
|
674
|
+ .name_content {
|
|
675
|
+ max-width: calc(100% - 38px);
|
|
676
|
+ overflow: hidden;
|
|
677
|
+ text-overflow: ellipsis;
|
|
678
|
+ white-space: nowrap;
|
|
679
|
+ }
|
|
680
|
+ .app_tag {
|
|
681
|
+ margin-left: 4px;
|
|
682
|
+ width: 32px;
|
|
683
|
+ text-align: center;
|
|
684
|
+ color: #fff;
|
|
685
|
+ line-height: 1.6;
|
|
686
|
+ font-size: 12px;
|
|
687
|
+ border-radius: 5px;
|
|
688
|
+ background-color: #7854f6;
|
|
689
|
+ }
|
|
690
|
+ .web_tag {
|
|
691
|
+ margin-left: 4px;
|
|
692
|
+ width: 32px;
|
|
693
|
+ text-align: center;
|
|
694
|
+ color: #fff;
|
|
695
|
+ line-height: 1.6;
|
|
696
|
+ font-size: 12px;
|
|
697
|
+ border-radius: 5px;
|
|
698
|
+ background-color: #52c41a;
|
|
699
|
+ }
|
|
700
|
+}
|
|
701
|
+.white_address {
|
|
702
|
+ max-width: 100%;
|
|
703
|
+ overflow: hidden;
|
|
704
|
+ text-overflow: ellipsis;
|
|
705
|
+ white-space: nowrap;
|
|
706
|
+}
|
|
707
|
+</style>
|