Browse Source

Merge remote-tracking branch 'origin/gzb' into wzl

gzb
wangzhonglu 9 months ago
parent
commit
56db052f98

+ 72
- 0
src/api/school.js View File

@@ -35,3 +35,75 @@ export const school_delete = (data) => setRequest("school/delete", data);
35 35
  * 3.1.5学校--详情
36 36
  */
37 37
 export const school_detail = (data) => setRequest("school/detail", data);
38
+/**
39
+ * 3.2.0.1用户--账号登录
40
+ */
41
+export const ulogin_login = (data) => setRequest("ulogin/login", data);
42
+/**
43
+ * 3.2.0.1用户--验证码登录
44
+ */
45
+export const ulogin_login_code = (data) => setRequest("ulogin/login_code", data);
46
+/**
47
+ * 3.2.0.2用户--校验登录状态
48
+ */
49
+export const ulogin_check_login = (data) => setRequest("ulogin/check_login", data);
50
+/**
51
+ * 3.2.0.3用户--退出登录
52
+ */
53
+export const ulogin_login_out = (data) => setRequest("ulogin/login_out", data);
54
+/**
55
+ * 3.2.1用户--管理列表
56
+ */
57
+export const user_list = (data) => setRequest("user/list", data);
58
+/**
59
+ * 3.2.1用户--导出列表
60
+ */
61
+export const user_export = (data) => setRequest("user/export", data);
62
+/**
63
+ * 3.2.2用户--学校下班级列表
64
+ */
65
+export const class_list = (data) => setRequest("class/list", data);
66
+/**
67
+ * 3.2.2用户--班级新增
68
+ */
69
+export const class_add = (data) => setRequest("class/add", data);
70
+/**
71
+ * 3.2.2用户--添加
72
+ */
73
+export const user_add = (data) => setRequest("user/add", data);
74
+/**
75
+ * 3.2.3用户--更新
76
+ */
77
+export const user_edit = (data) => setRequest("user/edit", data);
78
+/**
79
+ * 3.2.3.2用户--启用
80
+ */
81
+export const user_enable= (data) => setRequest("user/enable", data);
82
+/**
83
+ * 3.2.3.2用户--启用
84
+ */
85
+export const user_disabled= (data) => setRequest("user/disabled", data);
86
+/**
87
+ * 3.2.3.4用户--关注
88
+ */
89
+export const user_care= (data) => setRequest("user/care", data);
90
+/**
91
+ * 3.2.3.5用户--取消关注
92
+ */
93
+export const user_un_care= (data) => setRequest("user/un_care", data);
94
+/**
95
+ * 3.2.3.6用户--管控
96
+ */
97
+export const user_control= (data) => setRequest("user/control", data);
98
+/**
99
+ * 3.2.3.7用户--取消管控
100
+ */
101
+export const user_un_control= (data) => setRequest("user/un_control", data);
102
+/**
103
+ * 3.2.4用户--删除
104
+ */
105
+export const user_delete = (data) => setRequest("user/delete", data);
106
+/**
107
+ * 3.2.5用户--导入
108
+ */
109
+export const user_import = (data) => setRequest("user/import", data);

+ 317
- 311
src/views/regionSection/applicationManage/applicationManage.vue View File

@@ -114,7 +114,7 @@
114 114
       v-model="downloadInfo.show"
115 115
       title="下载"
116 116
     >
117
-      <div class="content">
117
+      <div class="content" v-if="downloadInfo.show">
118 118
         <div class="title">{{ downloadInfo.appName }}</div>
119 119
         <div class="qrcode">
120 120
           <div id="ScanShare" ref="ScanShare"></div>
@@ -136,328 +136,330 @@
136 136
       v-model="wallpaperInfo.show"
137 137
       :title="wallpaperInfo.appid ? '编辑' : '新建'"
138 138
     >
139
-      <Form
140
-        ref="addForm"
141
-        :model="wallpaperInfo"
142
-        :rules="rules"
143
-        :label-width="130"
144
-        inline
145
-      >
146
-        <FormItem label="名称" prop="appName" style="width: 100%">
147
-          <Input
148
-            v-model="wallpaperInfo.appName"
149
-            placeholder="请输入名称"
150
-          ></Input>
151
-        </FormItem>
152
-        <FormItem label="分组" style="width: 100%" class="require">
153
-          <Select
154
-            v-model="wallpaperInfo.appgroupid"
155
-            placeholder="请选择分组"
156
-            style="width: 300px"
157
-            @on-change="groupChange()"
158
-          >
159
-            <template v-if="group_list.length > 0">
160
-              <Option
161
-                v-for="item in group_list"
162
-                :value="item.appgroupid"
163
-                :key="item.appgroupid"
164
-                >{{ item.appgroupName }}</Option
165
-              >
166
-            </template>
167
-          </Select>
168
-        </FormItem>
169
-        <FormItem label="状态" style="width: 300px">
170
-          <RadioGroup v-model="wallpaperInfo.enable">
171
-            <Radio :label="1">启用</Radio>
172
-            <Radio :label="2">禁用</Radio>
173
-          </RadioGroup>
174
-        </FormItem>
175
-        <FormItem label="应用属性">
176
-          <RadioGroup v-model="wallpaperInfo.appType">
177
-            <Radio :label="1">推荐应用</Radio>
178
-            <Radio :label="2">必装应用</Radio>
179
-          </RadioGroup>
180
-        </FormItem>
181
-        <FormItem label="强制安装" style="width: 100%">
182
-          <div class="comm">
183
-            <RadioGroup v-model="wallpaperInfo.forced">
184
-              <Radio :label="1">是</Radio>
185
-              <Radio :label="0">否</Radio>
186
-            </RadioGroup>
187
-            <span>用户进入安全桌面,该应用将被强制安装。</span>
188
-          </div>
189
-        </FormItem>
190
-        <FormItem label="网址白名单例外" style="width: 100%">
191
-          <div class="comm">
192
-            <RadioGroup v-model="wallpaperInfo.whited">
193
-              <Radio :label="1">是</Radio>
194
-              <Radio :label="0">否</Radio>
195
-            </RadioGroup>
196
-            <span>选择白名单例外则该应用访问网络不受网址白名单限制。</span>
197
-          </div>
198
-        </FormItem>
199
-        <FormItem label="可信任" style="width: 100%">
200
-          <div class="comm">
201
-            <RadioGroup v-model="wallpaperInfo.trusted">
202
-              <Radio :label="1">是</Radio>
203
-              <Radio :label="0">否</Radio>
204
-            </RadioGroup>
205
-            <span
206
-              >选择可信任时,应用申请权限不需要用户确认,防止用户取消。</span
139
+      <div v-if="wallpaperInfo.show">
140
+        <Form
141
+          ref="addForm"
142
+          :model="wallpaperInfo"
143
+          :rules="rules"
144
+          :label-width="130"
145
+          inline
146
+        >
147
+          <FormItem label="名称" prop="appName" style="width: 100%">
148
+            <Input
149
+              v-model="wallpaperInfo.appName"
150
+              placeholder="请输入名称"
151
+            ></Input>
152
+          </FormItem>
153
+          <FormItem label="分组" style="width: 100%" class="require">
154
+            <Select
155
+              v-model="wallpaperInfo.appgroupid"
156
+              placeholder="请选择分组"
157
+              style="width: 300px"
158
+              @on-change="groupChange()"
207 159
             >
208
-          </div>
209
-        </FormItem>
210
-        <FormItem label="隐藏图标" style="width: 100%">
211
-          <div class="comm">
212
-            <RadioGroup v-model="wallpaperInfo.showico">
213
-              <Radio :label="1">是</Radio>
214
-              <Radio :label="0">否</Radio>
160
+              <template v-if="group_list.length > 0">
161
+                <Option
162
+                  v-for="item in group_list"
163
+                  :value="item.appgroupid"
164
+                  :key="item.appgroupid"
165
+                  >{{ item.appgroupName }}</Option
166
+                >
167
+              </template>
168
+            </Select>
169
+          </FormItem>
170
+          <FormItem label="状态" style="width: 300px">
171
+            <RadioGroup v-model="wallpaperInfo.enable">
172
+              <Radio :label="1">启用</Radio>
173
+              <Radio :label="2">禁用</Radio>
215 174
             </RadioGroup>
216
-            <span>隐藏图标时,设备安装应用后,桌面不显示应用图标。</span>
217
-          </div>
218
-        </FormItem>
219
-        <FormItem label="允许清空缓存" style="width: 100%">
220
-          <div class="comm">
221
-            <RadioGroup v-model="wallpaperInfo.cached">
222
-              <Radio :label="1">是</Radio>
223
-              <Radio :label="0">否</Radio>
175
+          </FormItem>
176
+          <FormItem label="应用属性">
177
+            <RadioGroup v-model="wallpaperInfo.appType">
178
+              <Radio :label="1">推荐应用</Radio>
179
+              <Radio :label="2">必装应用</Radio>
224 180
             </RadioGroup>
225
-            <span>选择是时,设备上允许清除该应用对应的缓存。</span>
226
-          </div>
227
-        </FormItem>
228
-        <FormItem label="添加到已有策略" style="width: 100%">
229
-          <div class="comm">
230
-            <RadioGroup v-model="wallpaperInfo.strategy">
231
-              <Radio :label="1">是</Radio>
232
-              <Radio :label="0">否</Radio>
233
-            </RadioGroup>
234
-            <span
235
-              >选择添加到已有策略,则当前应用会被添加到其授权的且不存在相同包名应用的学校策略。</span
236
-            >
237
-          </div>
238
-        </FormItem>
239
-        <FormItem label="适配设备" style="width: 100%" class="require">
240
-          <div v-for="item in device_list" :key="item.dgroupid">
241
-            <CheckboxDevice
242
-              @CheckboxDevice="CheckboxDevice"
243
-              :dgroupid="item.dgroupid"
244
-              ref="checkbevice"
245
-              :module="item"
246
-            ></CheckboxDevice>
247
-          </div>
248
-        </FormItem>
249
-        <FormItem label="应用上传" class="require" style="width: 400px">
250
-          <div class="upload_box">
251
-            <uploader
252
-              ref="uploader"
253
-              :options="options"
254
-              :autoStart="true"
255
-              :file-status-text="statusText"
256
-              @file-added="onFileAdded"
257
-              @file-progress="onFileProgress"
258
-              @file-success="onFileSuccess"
259
-              @file-error="onFileError"
260
-            >
261
-              <uploader-unsupport></uploader-unsupport>
262
-              <uploader-btn
263
-                id="global_uploader_btn"
264
-                :attrs="attrs"
265
-                ref="uploadBtn"
181
+          </FormItem>
182
+          <FormItem label="强制安装" style="width: 100%">
183
+            <div class="comm">
184
+              <RadioGroup v-model="wallpaperInfo.forced">
185
+                <Radio :label="1">是</Radio>
186
+                <Radio :label="0">否</Radio>
187
+              </RadioGroup>
188
+              <span>用户进入安全桌面,该应用将被强制安装。</span>
189
+            </div>
190
+          </FormItem>
191
+          <FormItem label="网址白名单例外" style="width: 100%">
192
+            <div class="comm">
193
+              <RadioGroup v-model="wallpaperInfo.whited">
194
+                <Radio :label="1">是</Radio>
195
+                <Radio :label="0">否</Radio>
196
+              </RadioGroup>
197
+              <span>选择白名单例外则该应用访问网络不受网址白名单限制。</span>
198
+            </div>
199
+          </FormItem>
200
+          <FormItem label="可信任" style="width: 100%">
201
+            <div class="comm">
202
+              <RadioGroup v-model="wallpaperInfo.trusted">
203
+                <Radio :label="1">是</Radio>
204
+                <Radio :label="0">否</Radio>
205
+              </RadioGroup>
206
+              <span
207
+                >选择可信任时,应用申请权限不需要用户确认,防止用户取消。</span
266 208
               >
267
-                <div class="primary_btn">上传应用</div>
268
-              </uploader-btn>
269
-            </uploader>
270
-          </div>
271
-          <div class="upProgress" v-if="file_list.length > 0">
272
-            <div v-for="file in file_list" key="file1">
273
-              <div class="file_name" :title="wallpaperInfo.appPackage">
274
-                <div class="show_name">
275
-                  {{ wallpaperInfo.appPackage }}
209
+            </div>
210
+          </FormItem>
211
+          <FormItem label="隐藏图标" style="width: 100%">
212
+            <div class="comm">
213
+              <RadioGroup v-model="wallpaperInfo.showico">
214
+                <Radio :label="1">是</Radio>
215
+                <Radio :label="0">否</Radio>
216
+              </RadioGroup>
217
+              <span>隐藏图标时,设备安装应用后,桌面不显示应用图标。</span>
218
+            </div>
219
+          </FormItem>
220
+          <FormItem label="允许清空缓存" style="width: 100%">
221
+            <div class="comm">
222
+              <RadioGroup v-model="wallpaperInfo.cached">
223
+                <Radio :label="1">是</Radio>
224
+                <Radio :label="0">否</Radio>
225
+              </RadioGroup>
226
+              <span>选择是时,设备上允许清除该应用对应的缓存。</span>
227
+            </div>
228
+          </FormItem>
229
+          <FormItem label="添加到已有策略" style="width: 100%">
230
+            <div class="comm">
231
+              <RadioGroup v-model="wallpaperInfo.strategy">
232
+                <Radio :label="1">是</Radio>
233
+                <Radio :label="0">否</Radio>
234
+              </RadioGroup>
235
+              <span
236
+                >选择添加到已有策略,则当前应用会被添加到其授权的且不存在相同包名应用的学校策略。</span
237
+              >
238
+            </div>
239
+          </FormItem>
240
+          <FormItem label="适配设备" style="width: 100%" class="require">
241
+            <div v-for="item in device_list" :key="item.dgroupid">
242
+              <CheckboxDevice
243
+                @CheckboxDevice="CheckboxDevice"
244
+                :dgroupid="item.dgroupid"
245
+                ref="checkbevice"
246
+                :module="item"
247
+              ></CheckboxDevice>
248
+            </div>
249
+          </FormItem>
250
+          <FormItem label="应用上传" class="require" style="width: 400px">
251
+            <div class="upload_box">
252
+              <uploader
253
+                ref="uploader"
254
+                :options="options"
255
+                :autoStart="true"
256
+                :file-status-text="statusText"
257
+                @file-added="onFileAdded"
258
+                @file-progress="onFileProgress"
259
+                @file-success="onFileSuccess"
260
+                @file-error="onFileError"
261
+              >
262
+                <uploader-unsupport></uploader-unsupport>
263
+                <uploader-btn
264
+                  id="global_uploader_btn"
265
+                  :attrs="attrs"
266
+                  ref="uploadBtn"
267
+                >
268
+                  <div class="primary_btn">上传应用</div>
269
+                </uploader-btn>
270
+              </uploader>
271
+            </div>
272
+            <div class="upProgress" v-if="file_list.length > 0">
273
+              <div v-for="file in file_list" key="file1">
274
+                <div class="file_name" :title="wallpaperInfo.appPackage">
275
+                  <div class="show_name">
276
+                    {{ wallpaperInfo.appPackage }}
277
+                  </div>
276 278
                 </div>
279
+                <Progress
280
+                  hide-info
281
+                  :stroke-width="8"
282
+                  :percent="getUploadProgress(file)"
283
+                  status="active"
284
+                />
277 285
               </div>
278
-              <Progress
279
-                hide-info
280
-                :stroke-width="8"
281
-                :percent="getUploadProgress(file)"
282
-                status="active"
283
-              />
284 286
             </div>
285
-          </div>
286
-        </FormItem>
287
-        <FormItem label="应用图标" class="require">
288
-          <div class="logo">
289
-            <Upload
290
-              action
291
-              :show-upload-list="false"
292
-              :before-upload="
293
-                (file) => {
294
-                  upLoadUserpic(file, 1);
295
-                  return false;
296
-                }
297
-              "
298
-              accept=".png,.jpeg,.jpg"
299
-            >
300
-              <Button type="primary" class="primary_btn">上传图标</Button>
301
-            </Upload>
302
-            <span>支持图片格式:jpg、jgeg、png</span>
303
-          </div>
304
-          <div class="app_img" style="border-radius: 20px">
305
-            <img
306
-              v-if="wallpaperInfo.appIcon"
307
-              :src="$api.showImageUrl + wallpaperInfo.appIcon"
308
-            />
309
-          </div>
310
-        </FormItem>
311
-        <FormItem label="应用截图" style="width: 100%">
312
-          <div class="logo">
313
-            <Upload
314
-              action
315
-              :show-upload-list="false"
316
-              :before-upload="
317
-                (file) => {
318
-                  upLoadUserpic(file, 2);
319
-                  return false;
320
-                }
321
-              "
322
-              accept=".png,.jpeg,.jpg"
323
-            >
324
-              <Button type="primary" class="primary_btn">上传截图</Button>
325
-            </Upload>
326
-            <span>支持图片格式:jpg、jgeg、png</span>
327
-          </div>
328
-          <div class="img_list">
329
-            <div
330
-              class="app_img"
331
-              v-for="(img, idx) in wallpaperInfo.appImg"
332
-              :key="idx"
333
-            >
334
-              <img :src="$api.showImageUrl + img" />
287
+          </FormItem>
288
+          <FormItem label="应用图标" class="require">
289
+            <div class="logo">
290
+              <Upload
291
+                action
292
+                :show-upload-list="false"
293
+                :before-upload="
294
+                  (file) => {
295
+                    upLoadUserpic(file, 1);
296
+                    return false;
297
+                  }
298
+                "
299
+                accept=".png,.jpeg,.jpg"
300
+              >
301
+                <Button type="primary" class="primary_btn">上传图标</Button>
302
+              </Upload>
303
+              <span>支持图片格式:jpg、jgeg、png</span>
304
+            </div>
305
+            <div class="app_img" style="border-radius: 20px">
335 306
               <img
336
-                @click="delAppImg(idx)"
337
-                class="del"
338
-                src="../../../assets/img/guanbi_red.png"
307
+                v-if="wallpaperInfo.appIcon"
308
+                :src="$api.showImageUrl + wallpaperInfo.appIcon"
339 309
               />
340 310
             </div>
341
-          </div>
342
-        </FormItem>
343
-        <FormItem
344
-          label="版本名称"
345
-          prop="versionName"
346
-          style="width: calc(50% - 10px)"
347
-        >
348
-          <Input
349
-            v-model="wallpaperInfo.versionName"
350
-            placeholder="请输入版本名称"
351
-          ></Input>
352
-        </FormItem>
353
-        <FormItem
354
-          label="版本号码"
355
-          class="require"
356
-          style="width: calc(50% - 10px)"
357
-        >
358
-          <Input
359
-            v-model="wallpaperInfo.versionNum"
360
-            placeholder="请输入版本号码"
361
-          ></Input>
362
-        </FormItem>
363
-        <FormItem
364
-          label="应用大小"
365
-          class="require"
366
-          style="width: calc(50% - 10px)"
367
-        >
368
-          <Input
369
-            v-model="wallpaperInfo.appSize"
370
-            placeholder="请输入应用大小"
371
-          ></Input>
372
-        </FormItem>
373
-        <FormItem label="开发者" style="width: calc(50% - 10px)">
374
-          <Input
375
-            v-model="wallpaperInfo.appDeveloper"
376
-            placeholder="请输入开发者"
377
-          ></Input>
378
-        </FormItem>
379
-        <FormItem label="应用包名" style="width: 100%">
380
-          <Input
381
-            v-model="wallpaperInfo.appPackage"
382
-            placeholder="请输入应用包名"
383
-          ></Input>
384
-        </FormItem>
385
-        <FormItem label="应用简介" style="width: 100%">
386
-          <Input
387
-            v-model="wallpaperInfo.appAbbr"
388
-            type="textarea"
389
-            :maxlength="255"
390
-            :rows="4"
391
-            placeholder="请输入应用简介"
392
-          ></Input>
393
-          <div class="appcomm">
394
-            应用简介不能超过255个字符<span class="red">{{
395
-              wallpaperInfo.appAbbr.length
396
-            }}</span
397
-            >/255
398
-          </div>
399
-        </FormItem>
400
-        <FormItem label="更新" style="width: 100%">
401
-          <Input
402
-            v-model="wallpaperInfo.appRenew"
403
-            type="textarea"
404
-            :rows="4"
405
-            :maxlength="1000"
406
-            placeholder="请输入更新描述"
407
-          ></Input>
408
-          <div class="appcomm">
409
-            更新描述不能超过1000个字符<span class="red">{{
410
-              wallpaperInfo.appRenew.length
411
-            }}</span
412
-            >/1000
413
-          </div>
414
-        </FormItem>
415
-        <FormItem label="选择学校" style="width: 100%" class="require">
416
-          <RadioGroup v-model="wallpaperInfo.targetSchool">
417
-            <Radio :label="1">所有学校</Radio>
418
-            <Radio :label="2">自定义学校</Radio>
419
-          </RadioGroup>
420
-          <div class="targetSchool" v-if="wallpaperInfo.targetSchool === 2">
421
-            <div class="allSchool">
422
-              <Input
423
-                v-model="wallpaperInfo.schoolname"
424
-                placeholder="请输入关键字"
425
-                search
426
-                @on-search="getSchool"
427
-              ></Input>
428
-              <div class="school_list">
429
-                <Tree
430
-                  @on-check-change="getSelectedNodes"
431
-                  :data="school_list"
432
-                  show-checkbox
433
-                ></Tree>
311
+          </FormItem>
312
+          <FormItem label="应用截图" style="width: 100%">
313
+            <div class="logo">
314
+              <Upload
315
+                action
316
+                :show-upload-list="false"
317
+                :before-upload="
318
+                  (file) => {
319
+                    upLoadUserpic(file, 2);
320
+                    return false;
321
+                  }
322
+                "
323
+                accept=".png,.jpeg,.jpg"
324
+              >
325
+                <Button type="primary" class="primary_btn">上传截图</Button>
326
+              </Upload>
327
+              <span>支持图片格式:jpg、jgeg、png</span>
328
+            </div>
329
+            <div class="img_list">
330
+              <div
331
+                class="app_img"
332
+                v-for="(img, idx) in wallpaperInfo.appImg"
333
+                :key="idx"
334
+              >
335
+                <img :src="$api.showImageUrl + img" />
336
+                <img
337
+                  @click="delAppImg(idx)"
338
+                  class="del"
339
+                  src="../../../assets/img/guanbi_red.png"
340
+                />
434 341
               </div>
435 342
             </div>
436
-            <div class="selectSchool">
437
-              <div class="school_num">
438
-                已选<span class="num">{{ select_schools.length }}</span
439
-                >所学校
343
+          </FormItem>
344
+          <FormItem
345
+            label="版本名称"
346
+            prop="versionName"
347
+            style="width: calc(50% - 10px)"
348
+          >
349
+            <Input
350
+              v-model="wallpaperInfo.versionName"
351
+              placeholder="请输入版本名称"
352
+            ></Input>
353
+          </FormItem>
354
+          <FormItem
355
+            label="版本号码"
356
+            class="require"
357
+            style="width: calc(50% - 10px)"
358
+          >
359
+            <Input
360
+              v-model="wallpaperInfo.versionNum"
361
+              placeholder="请输入版本号码"
362
+            ></Input>
363
+          </FormItem>
364
+          <FormItem
365
+            label="应用大小"
366
+            class="require"
367
+            style="width: calc(50% - 10px)"
368
+          >
369
+            <Input
370
+              v-model="wallpaperInfo.appSize"
371
+              placeholder="请输入应用大小"
372
+            ></Input>
373
+          </FormItem>
374
+          <FormItem label="开发者" style="width: calc(50% - 10px)">
375
+            <Input
376
+              v-model="wallpaperInfo.appDeveloper"
377
+              placeholder="请输入开发者"
378
+            ></Input>
379
+          </FormItem>
380
+          <FormItem label="应用包名" style="width: 100%">
381
+            <Input
382
+              v-model="wallpaperInfo.appPackage"
383
+              placeholder="请输入应用包名"
384
+            ></Input>
385
+          </FormItem>
386
+          <FormItem label="应用简介" style="width: 100%">
387
+            <Input
388
+              v-model="wallpaperInfo.appAbbr"
389
+              type="textarea"
390
+              :maxlength="255"
391
+              :rows="4"
392
+              placeholder="请输入应用简介"
393
+            ></Input>
394
+            <div class="appcomm">
395
+              应用简介不能超过255个字符<span class="red">{{
396
+                wallpaperInfo.appAbbr.length
397
+              }}</span
398
+              >/255
399
+            </div>
400
+          </FormItem>
401
+          <FormItem label="更新" style="width: 100%">
402
+            <Input
403
+              v-model="wallpaperInfo.appRenew"
404
+              type="textarea"
405
+              :rows="4"
406
+              :maxlength="1000"
407
+              placeholder="请输入更新描述"
408
+            ></Input>
409
+            <div class="appcomm">
410
+              更新描述不能超过1000个字符<span class="red">{{
411
+                wallpaperInfo.appRenew.length
412
+              }}</span
413
+              >/1000
414
+            </div>
415
+          </FormItem>
416
+          <FormItem label="选择学校" style="width: 100%" class="require">
417
+            <RadioGroup v-model="wallpaperInfo.targetSchool">
418
+              <Radio :label="1">所有学校</Radio>
419
+              <Radio :label="2">自定义学校</Radio>
420
+            </RadioGroup>
421
+            <div class="targetSchool" v-if="wallpaperInfo.targetSchool === 2">
422
+              <div class="allSchool">
423
+                <Input
424
+                  v-model="wallpaperInfo.schoolname"
425
+                  placeholder="请输入关键字"
426
+                  search
427
+                  @on-search="getSchool"
428
+                ></Input>
429
+                <div class="school_list">
430
+                  <Tree
431
+                    @on-check-change="getSelectedNodes"
432
+                    :data="school_list"
433
+                    show-checkbox
434
+                  ></Tree>
435
+                </div>
440 436
               </div>
441
-              <div class="school_list">
442
-                <span
443
-                  class="school_item"
444
-                  v-for="(item, index) in this.select_schools"
445
-                  :key="item.schoolid"
446
-                >
447
-                  <span class="title" :title="item.title">{{
448
-                    item.title
449
-                  }}</span>
450
-                  <img
451
-                    @click="delSchool(item)"
452
-                    class="del"
453
-                    src="../../../assets/img/guanbi_red.png"
454
-                  />
455
-                </span>
437
+              <div class="selectSchool">
438
+                <div class="school_num">
439
+                  已选<span class="num">{{ select_schools.length }}</span
440
+                  >所学校
441
+                </div>
442
+                <div class="school_list">
443
+                  <span
444
+                    class="school_item"
445
+                    v-for="(item, index) in this.select_schools"
446
+                    :key="item.schoolid"
447
+                  >
448
+                    <span class="title" :title="item.title">{{
449
+                      item.title
450
+                    }}</span>
451
+                    <img
452
+                      @click="delSchool(item)"
453
+                      class="del"
454
+                      src="../../../assets/img/guanbi_red.png"
455
+                    />
456
+                  </span>
457
+                </div>
456 458
               </div>
457 459
             </div>
458
-          </div>
459
-        </FormItem>
460
-      </Form>
460
+          </FormItem>
461
+        </Form>
462
+      </div>
461 463
       <div slot="footer">
462 464
         <Button @click="wallpaperInfo.show = false">取消</Button>
463 465
         <Button @click="saveAddInfo()" class="primary_btn" type="primary"
@@ -472,7 +474,7 @@
472 474
       v-model="deviceInfo.show"
473 475
       title="授权型号"
474 476
     >
475
-      <div class="view_content">
477
+      <div class="view_content" v-if="deviceInfo.show">
476 478
         <div class="view_title">名称</div>
477 479
         <div class="view_devices" style="width: 100%">
478 480
           <Input style="width: 100%" disabled v-model="deviceInfo.appName" />
@@ -506,7 +508,7 @@
506 508
       v-model="viewInfo.show"
507 509
       title="查看"
508 510
     >
509
-      <div class="view_conten">
511
+      <div class="view_conten" v-if="viewInfo.show">
510 512
         <div class="view_logo">
511 513
           <div>
512 514
             <img
@@ -1230,6 +1232,9 @@ export default {
1230 1232
         if (res.code === 0) {
1231 1233
           this.searchForm.list = res.obj.data;
1232 1234
           this.searchForm.total = res.obj.total;
1235
+          if (document.querySelector(".section_main")) {
1236
+            document.querySelector(".section_main").scrollTop = 0;
1237
+          }
1233 1238
           console.log(this.searchForm.list);
1234 1239
         } else {
1235 1240
           this.$Message.error(res.msg);
@@ -1830,6 +1835,7 @@ export default {
1830 1835
     text-align: center;
1831 1836
     .title {
1832 1837
       font-size: 18px;
1838
+      font-weight: bold;
1833 1839
       margin-bottom: 30px;
1834 1840
     }
1835 1841
     .qrcode {
@@ -1846,7 +1852,7 @@ export default {
1846 1852
       }
1847 1853
     }
1848 1854
     .download {
1849
-      margin-top: 10px;
1855
+      margin-top: 40px;
1850 1856
       &:hover {
1851 1857
         cursor: pointer;
1852 1858
         color: #339cff;

+ 1655
- 4
src/views/schoolSection/applicationManage/applicationList.vue
File diff suppressed because it is too large
View File


+ 375
- 4
src/views/schoolSection/userManage/userManage.vue View File

@@ -1,14 +1,385 @@
1 1
 <template>
2
-  <div class="main_root"></div>
2
+  <div class="main_root">
3
+    <div class="schoolInfo">
4
+      <div class="schoolname">{{ schoolInfo.name }}</div>
5
+      <div class="class_list">
6
+        <div v-for="item in schoolInfo.children" :key="item.id">
7
+          <div
8
+            :class="[curClass === item.id ? 'active' : '']"
9
+            :title="item.name"
10
+            @click="selectClass(item)"
11
+          >
12
+            {{ item.name }}
13
+          </div>
14
+        </div>
15
+      </div>
16
+    </div>
17
+    <div class="user_list">
18
+      <div class="search_header">
19
+        <div class="search_left">
20
+          <Select
21
+            :transfer="true"
22
+            v-model="searchForm.care"
23
+            style="width: 140px"
24
+          >
25
+            <Option v-for="item in care_list" :value="item.id" :key="item.id">{{
26
+              item.title
27
+            }}</Option>
28
+          </Select>
29
+          <Select
30
+            :transfer="true"
31
+            v-model="searchForm.enabled"
32
+            style="width: 140px; margin: 0 10px"
33
+          >
34
+            <Option
35
+              v-for="item in enabled_list"
36
+              :value="item.id"
37
+              :key="item.id"
38
+              >{{ item.title }}</Option
39
+            >
40
+          </Select>
41
+          <Select
42
+            :transfer="true"
43
+            v-model="searchForm.control"
44
+            style="width: 140px; margin-right: 10px"
45
+          >
46
+            <Option
47
+              v-for="item in control_list"
48
+              :value="item.id"
49
+              :key="item.id"
50
+              >{{ item.title }}</Option
51
+            >
52
+          </Select>
53
+          <Input
54
+            v-model="searchForm.appName"
55
+            placeholder="请输入名称"
56
+            search
57
+            @on-search="searchList()"
58
+            style="width: 150px"
59
+          />
60
+        </div>
61
+        <div>
62
+          <Button type="primary" class="primary_btn" @click="toAdd()"
63
+            >用户导入</Button
64
+          >
65
+          <Button
66
+            style="margin: 0 10px"
67
+            type="primary"
68
+            class="primary_btn"
69
+            @click="toAdd()"
70
+            >用户导出</Button
71
+          >
72
+          <Button type="primary" class="primary_btn" @click="toAdd()"
73
+            >新建</Button
74
+          >
75
+        </div>
76
+      </div>
77
+      <div class="table_wrap">
78
+        <Table :columns="columns" :data="searchForm.list">
79
+          <template slot-scope="{ row }" slot="enabled">
80
+            <i-switch
81
+              size="large"
82
+              v-model="row.enabled"
83
+              :true-value="1"
84
+              :false-value="2"
85
+              @on-change="enabledChange(row)"
86
+            >
87
+              <span slot="open">启用</span>
88
+              <span slot="close">禁用</span>
89
+            </i-switch>
90
+          </template>
91
+          <template slot-scope="{ row }" slot="actionSlot">
92
+            <div class="action_list">
93
+              <div class="action_del" @click="toDel(row)">删除</div>
94
+              <div class="action_success" @click="toCare(row)">重点关注</div>
95
+            </div>
96
+          </template>
97
+        </Table>
98
+      </div>
99
+      <div class="page_wrap">
100
+        <Page
101
+          :transfer="true"
102
+          :total="searchForm.total"
103
+          :current="searchForm.page"
104
+          :page-size="searchForm.size"
105
+          :page-size-opts="[10, 20, 40, 60]"
106
+          @on-change="pageChange"
107
+          @on-page-size-change="pageSizeChange"
108
+          show-total
109
+          show-sizer
110
+        ></Page>
111
+      </div>
112
+    </div>
113
+  </div>
3 114
 </template>
4 115
 
5 116
 <script>
117
+import { app_edit_enable, app_edit_unenable, app_list } from "@/api/appgroup";
118
+import {
119
+  class_list,
120
+  user_disabled,
121
+  user_enable,
122
+  user_list
123
+} from "@/api/school";
124
+
6 125
 export default {
7 126
   data() {
8
-    return {};
127
+    return {
128
+      userInfo: {},
129
+      showLoading: false,
130
+      care_list: [
131
+        { id: 0, title: "请选择关注状态" },
132
+        { id: 1, title: "重点关注" },
133
+        { id: 2, title: "不关注" }
134
+      ],
135
+      enabled_list: [
136
+        { id: 0, title: "请选择启动状态" },
137
+        { id: 1, title: "启用" },
138
+        { id: 2, title: "禁用" }
139
+      ],
140
+      control_list: [
141
+        { id: 0, title: "请选择管控状态" },
142
+        { id: 1, title: "管控中" },
143
+        { id: 2, title: "解除管控" }
144
+      ],
145
+      curClass: 0,
146
+      searchForm: {
147
+        page: 1,
148
+        size: 10,
149
+        schoolid: 1,
150
+        classid: 0,
151
+        care: 0,
152
+        enabled: 0,
153
+        control: 0,
154
+        username: "",
155
+        list: [],
156
+        tital: 0
157
+      },
158
+      columns: [
159
+        {
160
+          title: "序号",
161
+          align: "center",
162
+          width: 70,
163
+          render: (h, params) => {
164
+            return h(
165
+              "span",
166
+              params.index +
167
+                (this.searchForm.page - 1) * this.searchForm.size +
168
+                1
169
+            );
170
+          }
171
+        },
172
+        {
173
+          title: "登录名",
174
+          key: "loginname",
175
+          align: "center"
176
+        },
177
+        {
178
+          title: "姓名",
179
+          key: "username",
180
+          align: "center",
181
+          width: 140
182
+        },
183
+        {
184
+          title: "班级",
185
+          key: "classname",
186
+          align: "center",
187
+          width: 140
188
+        },
189
+        {
190
+          title: "状态",
191
+          slot: "enabled",
192
+          width: 100,
193
+          align: "center"
194
+        },
195
+        {
196
+          title: "最后登录时间",
197
+          key: "lasttime",
198
+          align: "center",
199
+          width: 180
200
+        },
201
+        {
202
+          title: "操作",
203
+          slot: "actionSlot",
204
+          width: 240,
205
+          align: "center"
206
+        }
207
+      ],
208
+      schoolInfo: {
209
+        children: [],
210
+        name: ""
211
+      }
212
+    };
213
+  },
214
+  created() {
215
+    this.userInfo = JSON.parse(
216
+      localStorage.getItem("xh_control_userInfo")
217
+    ).content;
218
+    console.log(this.userInfo);
219
+    this.init();
220
+    this.searchList();
9 221
   },
10
-  methods: {}
222
+  methods: {
223
+    toAdd(row) {},
224
+    toCare(row) {},
225
+    toDel(row) {},
226
+    enabledChange(row) {
227
+      let api = row.enabled === 1 ? user_enable : user_disabled;
228
+      api({
229
+        userid: row.userid,
230
+        rversion: row.rversion
231
+      }).then((data) => {
232
+        this.searchList();
233
+        if (data.code === 0) {
234
+          this.$Message.success(data.msg);
235
+        } else {
236
+          this.$Message.error(data.msg);
237
+        }
238
+      });
239
+    },
240
+    selectClass(item) {
241
+      this.curClass = item.id;
242
+    },
243
+    init() {
244
+      this.showLoading = true;
245
+      class_list({ schoolid: 1 }).then((res) => {
246
+        this.showLoading = false;
247
+        if (res.code === 0) {
248
+          this.schoolInfo = res.obj;
249
+          if (this.schoolInfo.children.length > 0) {
250
+            this.curClass = this.schoolInfo.children[0].id;
251
+          }
252
+          console.log(res.obj);
253
+        } else {
254
+          this.$Message.error(res.msg);
255
+        }
256
+      });
257
+    },
258
+    // 搜索
259
+    searchList() {
260
+      this.searchForm.page = 1;
261
+      this.getList();
262
+    },
263
+    // 页码改变
264
+    pageChange(page) {
265
+      this.searchForm.page = page;
266
+      this.getList();
267
+    },
268
+    // 每页显示数量改变
269
+    pageSizeChange(size) {
270
+      this.searchForm.size = size;
271
+      this.searchForm.page = 1;
272
+      this.getList();
273
+    },
274
+    // 获取列表
275
+    getList() {
276
+      this.showLoading = true;
277
+      user_list({
278
+        page: this.searchForm.page,
279
+        size: this.searchForm.size,
280
+        schoolid: this.searchForm.schoolid,
281
+        classid: this.curClass,
282
+        care: this.searchForm.care,
283
+        enabled: this.searchForm.enabled,
284
+        control: this.searchForm.control,
285
+        username: this.searchForm.username
286
+      }).then((res) => {
287
+        this.showLoading = false;
288
+        if (res.code === 0) {
289
+          this.searchForm.list = res.obj.data;
290
+          this.searchForm.total = res.obj.total;
291
+          console.log(this.searchForm.list);
292
+        } else {
293
+          this.$Message.error(res.msg);
294
+        }
295
+      });
296
+    }
297
+  }
11 298
 };
12 299
 </script>
13 300
 
14
-<style lang="less" scoped></style>
301
+<style lang="less" scoped>
302
+.main_root {
303
+  width: calc(100% - 32px);
304
+  height: calc(100% - 60px);
305
+  background-color: transparent;
306
+  border: none;
307
+  display: flex;
308
+  .schoolInfo {
309
+    width: 200px;
310
+    border-radius: 15px;
311
+    margin-right: 16px;
312
+    height: 100%;
313
+    padding: 10px;
314
+    background-color: white;
315
+    .schoolname {
316
+      font-size: 16px;
317
+      line-height: 40px;
318
+      font-weight: bold;
319
+      text-align: center;
320
+    }
321
+    .class_list {
322
+      div {
323
+        line-height: 30px;
324
+        height: 30px;
325
+        text-align: center;
326
+        cursor: p;
327
+      }
328
+      .active {
329
+        border-radius: 6px;
330
+        background: #dbeeff;
331
+      }
332
+    }
333
+  }
334
+  .user_list {
335
+    width: calc(100% - 216px);
336
+    height: 100%;
337
+    border-radius: 15px;
338
+    background-color: white;
339
+  }
340
+}
341
+.search_header {
342
+  display: flex;
343
+  justify-content: space-between;
344
+  align-items: center;
345
+  margin: 16px 16px;
346
+  .search_left {
347
+    display: flex;
348
+    justify-content: flex-start;
349
+    align-items: center;
350
+    .search_drop {
351
+      margin-right: 10px;
352
+      width: 150px;
353
+    }
354
+  }
355
+}
356
+.table_wrap {
357
+  .appName {
358
+    display: flex;
359
+    margin: 16px 0;
360
+    .app_logo {
361
+      flex-wrap: none;
362
+      width: 56px;
363
+      height: 56px;
364
+      border-radius: 20px;
365
+      border: 1px solid #e5e5e5;
366
+      background: #ffffff;
367
+      padding: 10px;
368
+      img {
369
+        width: 38px;
370
+        height: 38px;
371
+        object-fit: cover;
372
+      }
373
+    }
374
+    .app_comm {
375
+      flex: none;
376
+      width: 120px;
377
+      margin-left: 10px;
378
+      text-align: left;
379
+      div {
380
+        color: #339dff;
381
+      }
382
+    }
383
+  }
384
+}
385
+</style>

Loading…
Cancel
Save