Browse Source

添加管理员

gzb
guozhongbo 9 months ago
parent
commit
6024d62b4b
2 changed files with 53 additions and 38 deletions
  1. 27
    22
      src/views/dope/dope.vue
  2. 26
    16
      src/views/regionSection/regionManage/adminManage.vue

+ 27
- 22
src/views/dope/dope.vue View File

63
           时间:{{ viewInfo.createtime }}
63
           时间:{{ viewInfo.createtime }}
64
         </div>
64
         </div>
65
         <div class="comm">{{ viewInfo.comm }}</div>
65
         <div class="comm">{{ viewInfo.comm }}</div>
66
-        <div class="comm">设备号:{{ viewInfo.sn }}</div>
66
+        <div class="comm sn">设备号:{{ viewInfo.sn }}</div>
67
       </div>
67
       </div>
68
       <div slot="footer" style="text-align: center">
68
       <div slot="footer" style="text-align: center">
69
         <div>
69
         <div>
107
   },
107
   },
108
   methods: {
108
   methods: {
109
     headleView(item) {
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
     showReadChange() {
134
     showReadChange() {
133
       this.searchForm.showRead = this.searchForm.showRead ? 1 : 0;
135
       this.searchForm.showRead = this.searchForm.showRead ? 1 : 0;
253
     font-weight: 400;
255
     font-weight: 400;
254
     line-height: 30px;
256
     line-height: 30px;
255
   }
257
   }
258
+  .sn {
259
+    user-select: text;
260
+  }
256
 }
261
 }
257
 .nodeta {
262
 .nodeta {
258
   min-height: 300px;
263
   min-height: 300px;

+ 26
- 16
src/views/regionSection/regionManage/adminManage.vue View File

169
           </RadioGroup>
169
           </RadioGroup>
170
         </FormItem>
170
         </FormItem>
171
         <FormItem label="地址" style="width: 100%">
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
         </FormItem>
173
         </FormItem>
177
         <FormItem label="描述信息" style="width: 100%">
174
         <FormItem label="描述信息" style="width: 100%">
178
           <Input
175
           <Input
179
-              type="textarea"
180
-              v-model="adminInfo.comm"
181
-              placeholder="请输入描述信息"
176
+            type="textarea"
177
+            v-model="adminInfo.comm"
178
+            placeholder="请输入描述信息"
182
           ></Input>
179
           ></Input>
183
         </FormItem>
180
         </FormItem>
184
         <FormItem label="账号类型" style="width: 100%">
181
         <FormItem label="账号类型" style="width: 100%">
187
             <Radio :label="2">学校管理员</Radio>
184
             <Radio :label="2">学校管理员</Radio>
188
           </RadioGroup>
185
           </RadioGroup>
189
         </FormItem>
186
         </FormItem>
190
-        <FormItem v-if="adminInfo.userType === 1" label="所属区域" prop="regionid" style="width: 100%">
187
+        <FormItem label="所属区域" prop="regionid" style="width: 100%">
191
           <Select
188
           <Select
192
             :transfer="true"
189
             :transfer="true"
193
             v-model="adminInfo.regionid"
190
             v-model="adminInfo.regionid"
201
             >
198
             >
202
           </Select>
199
           </Select>
203
         </FormItem>
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
           <Select
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
             <Option
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
           </Select>
218
           </Select>
217
         </FormItem>
219
         </FormItem>
369
             message: "请选择区域",
371
             message: "请选择区域",
370
             trigger: "change"
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
       // 新建/编辑

Loading…
Cancel
Save