Browse Source

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

gzb
wangzhonglu 9 months ago
parent
commit
4b6cc9b610

+ 62
- 0
src/api/stPad.js View File

@@ -30,3 +30,65 @@ export const stPad_edit_enable = (data) =>
30 30
  */
31 31
 export const stPad_edit_unenable = (data) =>
32 32
   setRequest("stPad/edit_unenable", data);
33
+/**
34
+ * 6.1.8 平板策略-授权
35
+ */
36
+export const stPad_add_empower = (data) =>
37
+  setRequest("stPad/add_empower", data);
38
+/**
39
+ * 6.1.9 平板策略-学校班级详情
40
+ */
41
+export const stPad_detail_obj = (data) => setRequest("stPad/detail_obj", data);
42
+/**
43
+ * 6.1.10 平板策略-个人策略
44
+ */
45
+export const stPad_list_user = (data) => setRequest("stPad/list_user", data);
46
+/**
47
+ * 6.1.11 平板策略-平板用户
48
+ */
49
+export const stPad_detail_pad = (data) => setRequest("stPad/detail_pad", data);
50
+/**
51
+ * 6.2.1 应用策略-公共策略列表
52
+ */
53
+export const stApp_list = (data) => setRequest("stApp/list", data);
54
+/**
55
+ * 6.2.1 应用策略-选择列表
56
+ */
57
+export const stApp_list_sel = (data) => setRequest("stApp/list_sel", data);
58
+/**
59
+ * 6.2.2 应用策略-新增
60
+ */
61
+export const stApp_add = (data) => setRequest("stApp/add", data);
62
+/**
63
+ * 6.2.3 应用策略-更新
64
+ */
65
+export const stApp_edit = (data) => setRequest("stApp/edit", data);
66
+/**
67
+ * 6.2.3.2 应用策略-启用
68
+ */
69
+export const stApp_enable = (data) => setRequest("stApp/enable", data);
70
+/**
71
+ * v6.2.3.3 应用策略-禁用
72
+ */
73
+export const stApp_disabled = (data) => setRequest("stApp/disabled", data);
74
+/**
75
+ * 6.2.4 应用策略-删除
76
+ */
77
+export const stApp_delete = (data) => setRequest("stApp/delete", data);
78
+/**
79
+ * 6.2.5 应用策略-详情
80
+ */
81
+export const stApp_detail = (data) => setRequest("stApp/detail", data);
82
+/**
83
+ * 6.2.6 应用策略-授权
84
+ */
85
+export const stApp_add_empower = (data) =>
86
+  setRequest("stApp/add_empower", data);
87
+/**
88
+ * 6.2.7 应用策略-学校/班级引用详情
89
+ */
90
+export const stApp_detail_obj = (data) => setRequest("stApp/detail_obj", data);
91
+/**
92
+ * 6.2.8 应用策略--平板用户
93
+ */
94
+export const stApp_list_pad = (data) => setRequest("stApp/list_pad", data);

+ 1
- 1
src/views/schoolSection/strategy/personalStrategy.vue View File

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="main_root"></div>
2
+  <div class="index2">2</div>
3 3
 </template>
4 4
 
5 5
 <script>

+ 73
- 2
src/views/schoolSection/strategy/publicStrategy.vue View File

@@ -1,5 +1,48 @@
1 1
 <template>
2
-  <div class="main_root"></div>
2
+  <div class="index1">
3
+    <div class="strategy_list">
4
+      <div class="strategy_title">
5
+        <div><span></span>时间限制策略</div>
6
+        <div>
7
+          <span>修改</span>
8
+          <span>重置</span>
9
+          <span>引用</span>
10
+        </div>
11
+      </div>
12
+    </div>
13
+    <div class="strategy_list">
14
+      <div class="strategy_title">
15
+        <div><span></span>应用策略</div>
16
+        <div>
17
+        </div>
18
+      </div>
19
+      <div class="strategy_content">
20
+        <div class="strategy_top">授权应用</div>
21
+        <div class="strategy_bottom"></div>
22
+      </div>
23
+    </div>
24
+    <div class="strategy_list">
25
+      <div class="strategy_title">
26
+        <div><span></span>设备策略</div>
27
+        <div>
28
+        </div>
29
+      </div>
30
+    </div>
31
+    <div class="strategy_list">
32
+      <div class="strategy_title">
33
+        <div><span></span>Wifi白名单策略</div>
34
+        <div>
35
+        </div>
36
+      </div>
37
+    </div>
38
+    <div class="strategy_list">
39
+      <div class="strategy_title">
40
+        <div><span></span>违规处理</div>
41
+        <div>
42
+        </div>
43
+      </div>
44
+    </div>
45
+  </div>
3 46
 </template>
4 47
 
5 48
 <script>
@@ -11,4 +54,32 @@ export default {
11 54
 };
12 55
 </script>
13 56
 
14
-<style lang="less" scoped></style>
57
+<style lang="less" scoped>
58
+.index1 {
59
+  height: calc(100% - 40px);
60
+  overflow-y: auto;
61
+  .strategy_list {
62
+    font-family: "SourceHanSansCN";
63
+    .strategy_title {
64
+      height: 40px;
65
+      font-size: 16px;
66
+      display: flex;
67
+      justify-content: space-between;
68
+      align-items: center;
69
+      div:first-of-type {
70
+        font-weight: bold;
71
+      }
72
+      div:last-of-type {
73
+        span {
74
+          color: #7c8db5;
75
+          margin-left: 20px;
76
+          &:hover {
77
+            color: #339dff;
78
+            cursor: pointer;
79
+          }
80
+        }
81
+      }
82
+    }
83
+  }
84
+}
85
+</style>

+ 147
- 4
src/views/schoolSection/strategy/strategyManage.vue View File

@@ -1,14 +1,157 @@
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.id === 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="login_type">
19
+        <div @click="strategy = 1" :class="[strategy == 1 ? 'active' : '']">
20
+          公共策略
21
+        </div>
22
+        <div @click="strategy = 2" :class="[strategy == 2 ? 'active' : '']">
23
+          个人策略
24
+        </div>
25
+      </div>
26
+      <PublicStrategy v-if="strategy === 1"></PublicStrategy>
27
+      <PersonalStrategy v-else></PersonalStrategy>
28
+    </div>
29
+  </div>
3 30
 </template>
4 31
 
5 32
 <script>
33
+import { class_list } from "@/api/school";
34
+import PublicStrategy from "./publicStrategy.vue";
35
+import PersonalStrategy from "./personalStrategy";
6 36
 export default {
37
+  components: {
38
+    PublicStrategy,
39
+    PersonalStrategy
40
+  },
7 41
   data() {
8
-    return {};
42
+    return {
43
+      userInfo: {},
44
+      showLoading: false,
45
+      schoolInfo: {
46
+        name: "",
47
+        children: []
48
+      },
49
+      curClass: {},
50
+      strategy: 1
51
+    };
52
+  },
53
+  created() {
54
+    this.userInfo = JSON.parse(
55
+      localStorage.getItem("xh_control_userInfo")
56
+    ).content;
57
+    this.init();
9 58
   },
10
-  methods: {}
59
+  methods: {
60
+    selectClass(item) {
61
+      this.curClass = item;
62
+      console.log(this.curClass);
63
+    },
64
+    init() {
65
+      this.showLoading = true;
66
+      class_list({ schoolid: 1 }).then((res) => {
67
+        this.showLoading = false;
68
+        if (res.code === 0) {
69
+          this.schoolInfo = res.obj;
70
+          if (this.schoolInfo.children.length > 0) {
71
+            this.curClass = this.schoolInfo.children[0];
72
+          }
73
+        } else {
74
+          this.$Message.error(res.msg);
75
+        }
76
+      });
77
+    }
78
+  }
11 79
 };
12 80
 </script>
13 81
 
14
-<style lang="less" scoped></style>
82
+<style lang="less" scoped>
83
+.main_root {
84
+  width: calc(100% - 32px);
85
+  height: calc(100% - 60px);
86
+  background-color: transparent;
87
+  border: none;
88
+  display: flex;
89
+  .schoolInfo {
90
+    width: 200px;
91
+    border-radius: 15px;
92
+    margin-right: 16px;
93
+    height: 100%;
94
+    padding: 10px;
95
+    background-color: white;
96
+    .schoolname {
97
+      font-size: 16px;
98
+      line-height: 40px;
99
+      font-weight: bold;
100
+      text-align: center;
101
+    }
102
+    .class_list {
103
+      div {
104
+        line-height: 30px;
105
+        height: 30px;
106
+        text-align: center;
107
+        cursor: pointer;
108
+      }
109
+      .active {
110
+        border-radius: 6px;
111
+        background: #dbeeff;
112
+      }
113
+    }
114
+  }
115
+  .user_list {
116
+    width: calc(100% - 216px);
117
+    padding: 16px;
118
+    height: 100%;
119
+    overflow-y: auto;
120
+    border-radius: 15px;
121
+    background-color: white;
122
+    .login_type {
123
+      padding-left: 5px;
124
+      margin-bottom: 16px;
125
+      height: 30px;
126
+      display: flex;
127
+      align-items: center;
128
+      margin-bottom: 10px;
129
+      div {
130
+        width: 66px;
131
+        text-align: center;
132
+        color: #7c8db5;
133
+        font-size: 16px;
134
+        font-family: "SourceHanSansCN";
135
+        cursor: pointer;
136
+        &:first-of-type {
137
+          margin-right: 20px;
138
+        }
139
+      }
140
+      .active {
141
+        color: #339dff;
142
+        position: relative;
143
+        &::after {
144
+          display: block;
145
+          content: "";
146
+          height: 2px;
147
+          width: 76px;
148
+          background-color: #339dff;
149
+          position: absolute;
150
+          top: 24px;
151
+          left: -5px;
152
+        }
153
+      }
154
+    }
155
+  }
156
+}
157
+</style>

Loading…
Cancel
Save