Bläddra i källkod

添加管理员

gzb
guozhongbo 9 månader sedan
förälder
incheckning
6024d62b4b
2 ändrade filer med 53 tillägg och 38 borttagningar
  1. 27
    22
      src/views/dope/dope.vue
  2. 26
    16
      src/views/regionSection/regionManage/adminManage.vue

+ 27
- 22
src/views/dope/dope.vue Visa fil

@@ -63,7 +63,7 @@
63 63
           时间:{{ viewInfo.createtime }}
64 64
         </div>
65 65
         <div class="comm">{{ viewInfo.comm }}</div>
66
-        <div class="comm">设备号:{{ viewInfo.sn }}</div>
66
+        <div class="comm sn">设备号:{{ viewInfo.sn }}</div>
67 67
       </div>
68 68
       <div slot="footer" style="text-align: center">
69 69
         <div>
@@ -107,27 +107,29 @@ export default {
107 107
   },
108 108
   methods: {
109 109
     headleView(item) {
110
-      logdoperatemsg_edit_read({ ldomid: item.ldomid }).then((res) => {
111
-        if (res.code === 0) {
112
-          this.searchForm.list.forEach((v) => {
113
-            if (item.ldomid === v.ldomid) {
114
-              //改状态为已读
115
-              v.hasread = 1;
116
-            }
117
-          });
118
-          this.viewInfo = {
119
-            show: true,
120
-            classname: item.classname,
121
-            username: item.username,
122
-            schoolName: item.schoolName,
123
-            createtime: item.createtime,
124
-            comm: item.comm,
125
-            sn: item.sn
126
-          };
127
-        } else {
128
-          this.$Message.error(res.msg);
129
-        }
130
-      });
110
+      this.viewInfo = {
111
+        show: true,
112
+        classname: item.classname,
113
+        username: item.username,
114
+        schoolName: item.schoolName,
115
+        createtime: item.createtime,
116
+        comm: item.comm,
117
+        sn: item.sn
118
+      };
119
+      if (item.hasread != 1) {
120
+        logdoperatemsg_edit_read({ ldomid: item.ldomid }).then((res) => {
121
+          if (res.code === 0) {
122
+            this.searchForm.list.forEach((v) => {
123
+              if (item.ldomid === v.ldomid) {
124
+                //改状态为已读
125
+                v.hasread = 1;
126
+              }
127
+            });
128
+          } else {
129
+            this.$Message.error(res.msg);
130
+          }
131
+        });
132
+      }
131 133
     },
132 134
     showReadChange() {
133 135
       this.searchForm.showRead = this.searchForm.showRead ? 1 : 0;
@@ -253,6 +255,9 @@ export default {
253 255
     font-weight: 400;
254 256
     line-height: 30px;
255 257
   }
258
+  .sn {
259
+    user-select: text;
260
+  }
256 261
 }
257 262
 .nodeta {
258 263
   min-height: 300px;

+ 26
- 16
src/views/regionSection/regionManage/adminManage.vue Visa fil

@@ -169,16 +169,13 @@
169 169
           </RadioGroup>
170 170
         </FormItem>
171 171
         <FormItem label="地址" style="width: 100%">
172
-          <Input
173
-              v-model="adminInfo.address"
174
-              placeholder="请输入地址"
175
-          ></Input>
172
+          <Input v-model="adminInfo.address" placeholder="请输入地址"></Input>
176 173
         </FormItem>
177 174
         <FormItem label="描述信息" style="width: 100%">
178 175
           <Input
179
-              type="textarea"
180
-              v-model="adminInfo.comm"
181
-              placeholder="请输入描述信息"
176
+            type="textarea"
177
+            v-model="adminInfo.comm"
178
+            placeholder="请输入描述信息"
182 179
           ></Input>
183 180
         </FormItem>
184 181
         <FormItem label="账号类型" style="width: 100%">
@@ -187,7 +184,7 @@
187 184
             <Radio :label="2">学校管理员</Radio>
188 185
           </RadioGroup>
189 186
         </FormItem>
190
-        <FormItem v-if="adminInfo.userType === 1" label="所属区域" prop="regionid" style="width: 100%">
187
+        <FormItem label="所属区域" prop="regionid" style="width: 100%">
191 188
           <Select
192 189
             :transfer="true"
193 190
             v-model="adminInfo.regionid"
@@ -201,17 +198,22 @@
201 198
             >
202 199
           </Select>
203 200
         </FormItem>
204
-        <FormItem v-if="adminInfo.userType === 2" label="选择学校" class="require" style="width: 100%">
201
+        <FormItem
202
+          v-if="adminInfo.userType === 2"
203
+          label="选择学校"
204
+          prop="schoolid"
205
+          style="width: 100%"
206
+        >
205 207
           <Select
206
-              :transfer="true"
207
-              v-model="adminInfo.schoolid"
208
-              style="width: 180px"
208
+            :transfer="true"
209
+            v-model="adminInfo.schoolid"
210
+            style="width: calc(50% - 65px)"
209 211
           >
210 212
             <Option
211
-                v-for="item in searchForm.schoolList"
212
-                :value="item.schoolid"
213
-                :key="item.schoolid"
214
-            >{{ item.schoolName }}</Option
213
+              v-for="item in searchForm.schoolList"
214
+              :value="item.schoolid"
215
+              :key="item.schoolid"
216
+              >{{ item.schoolName }}</Option
215 217
             >
216 218
           </Select>
217 219
         </FormItem>
@@ -369,6 +371,14 @@ export default {
369 371
             message: "请选择区域",
370 372
             trigger: "change"
371 373
           }
374
+        ],
375
+        schoolid: [
376
+          {
377
+            required: true,
378
+            type: "number",
379
+            message: "请选择学校",
380
+            trigger: "change"
381
+          }
372 382
         ]
373 383
       },
374 384
       // 新建/编辑

Laddar…
Avbryt
Spara