李志伟 2 年之前
父節點
當前提交
9d3ff43551

+ 47
- 45
src/components/Question/drawer.vue 查看文件

@@ -1,48 +1,50 @@
1 1
 <template>
2
-  <div>
3
-    <el-drawer
4
-      ref="drawer"
5
-      :show-close="false"
6
-      :wrapper-closable="false"
7
-      :title="answer.answerId ?'编辑答案' : '添加答案'"
8
-      :before-close="handleClose"
9
-      :visible.sync="dialog"
10
-      direction="ltr"
11
-      custom-class="demo-drawer"
12
-    >
13
-      <div class="demo-drawer__content">
14
-        <el-form ref="form" :model="form" :rules="rules" style="margin:20px">
15
-          <el-form-item label="答案:" prop="content" :label-width="formLabelWidth">
16
-            <el-input v-model="form.content" placeholder="请输入答案(必填)">
17
-              <el-select
18
-                slot="prepend"
19
-                v-model="form.optCode"
20
-                filterable
21
-                allow-create
22
-                default-first-option
23
-                style="width:100px"
24
-                placeholder="请选择"
25
-              >
26
-                <el-option
27
-                  v-for="item in options"
28
-                  :key="item.value"
29
-                  :label="item.label"
30
-                  :value="item.value"
31
-                />
32
-              </el-select>
33
-            </el-input>
34
-          </el-form-item>
35
-          <el-form-item label="分数:" prop="score" :label-width="formLabelWidth">
36
-            <el-input v-model="form.score" placeholder="请输入分数" />
37
-          </el-form-item>
38
-          <el-form-item style="text-align:center">
39
-            <el-button @click="handleClose">取 消</el-button>
40
-            <el-button type="primary" @click="onSubmit('form')">确 定</el-button>
41
-          </el-form-item>
42
-        </el-form>
43
-      </div>
44
-    </el-drawer>
45
-  </div>
2
+  <el-drawer
3
+    ref="drawer"
4
+    :show-close="false"
5
+    :wrapper-closable="false"
6
+    :title="answer.answerId ? '编辑答案' : '添加答案'"
7
+    :before-close="handleClose"
8
+    :visible.sync="dialog"
9
+    direction="ltr"
10
+    custom-class="demo-drawer"
11
+  >
12
+    <div class="demo-drawer__content">
13
+      <el-form ref="form" :model="form" :rules="rules" style="margin: 20px">
14
+        <el-form-item
15
+          label="答案:"
16
+          prop="content"
17
+          :label-width="formLabelWidth"
18
+        >
19
+          <el-input v-model="form.content" placeholder="请输入答案(必填)">
20
+            <el-select
21
+              slot="prepend"
22
+              v-model="form.optCode"
23
+              filterable
24
+              allow-create
25
+              default-first-option
26
+              style="width: 100px"
27
+              placeholder="请选择"
28
+            >
29
+              <el-option
30
+                v-for="item in options"
31
+                :key="item.value"
32
+                :label="item.label"
33
+                :value="item.value"
34
+              />
35
+            </el-select>
36
+          </el-input>
37
+        </el-form-item>
38
+        <el-form-item label="分数:" prop="score" :label-width="formLabelWidth">
39
+          <el-input v-model="form.score" placeholder="请输入分数" />
40
+        </el-form-item>
41
+        <el-form-item style="text-align: center">
42
+          <el-button @click="handleClose">取 消</el-button>
43
+          <el-button type="primary" @click="onSubmit('form')">确 定</el-button>
44
+        </el-form-item>
45
+      </el-form>
46
+    </div>
47
+  </el-drawer>
46 48
 </template>
47 49
 <script>
48 50
 import { saveAnswer, UpdateAnswer } from '@/api/answer'
@@ -52,7 +54,7 @@ export default {
52 54
     questionId: String,
53 55
     answer: {
54 56
       type: Object,
55
-      default: () => {}
57
+      default: () => { }
56 58
     }
57 59
   },
58 60
   data() {

+ 37
- 22
src/components/Question/edit.vue 查看文件

@@ -6,7 +6,12 @@
6 6
     <el-form ref="form" :model="form" label-width="90px">
7 7
       <el-form-item label="题目:">
8 8
         <el-input v-model="form.content" placeholder="请输入问题名(必填)">
9
-          <el-select slot="prepend" v-model="form.questionType" style="width:100px" placeholder="请选择">
9
+          <el-select
10
+            slot="prepend"
11
+            v-model="form.questionType"
12
+            style="width: 100px"
13
+            placeholder="请选择"
14
+          >
10 15
             <el-option label="单选题" value="radio" />
11 16
             <el-option label="多选题" value="checkBox" />
12 17
             <el-option label="简答题" value="textarea" />
@@ -17,9 +22,14 @@
17 22
         <el-button type="primary" @click="onSubmit">确定</el-button>
18 23
       </el-form-item>
19 24
     </el-form>
20
-    <el-card v-if="questionId && form.questionType !== 'textarea'" shadow="never" body-style="padding:0" class="box-card">
25
+    <el-card
26
+      v-if="questionId && form.questionType !== 'textarea'"
27
+      shadow="never"
28
+      body-style="padding:0"
29
+      class="box-card"
30
+    >
21 31
       <div slot="header" class="clearfix">
22
-        <h3 style="float:left">答案列表</h3>
32
+        <h3 style="float: left">答案列表</h3>
23 33
         <el-button
24 34
           type="primary"
25 35
           style="float: right"
@@ -27,21 +37,33 @@
27 37
           @click="onAddAnswer"
28 38
         >添加答案</el-button>
29 39
       </div>
30
-      <ul style="list-style-type: none;margin:24px 0 24px -40px">
31
-        <li v-for="answer in form.answerList" :key="answer.answerId" class="answerli">
32
-          <div style="flex:1;width: 100%;overflow: hidden;display: flex;" @click="handleEdit(answer)">
33
-            <span style="width:45px">{{ answer.optCode }}</span>
34
-            <span style="flex:1">{{ answer.content }}</span>
35
-            <span style="width:30px">{{ answer.score }}分</span>
40
+      <ul style="list-style-type: none; margin: 24px 0 24px -40px">
41
+        <li
42
+          v-for="answer in form.answerList"
43
+          :key="answer.answerId"
44
+          class="answerli"
45
+        >
46
+          <div
47
+            style="flex: 1; overflow: hidden; display: flex"
48
+            @click="handleEdit(answer)"
49
+          >
50
+            <span style="width: 45px">{{ answer.optCode }}</span>
51
+            <span style="flex: 1">{{ answer.content }}</span>
52
+            <span style="width: 30px">{{ answer.score }}分</span>
36 53
           </div>
37 54
           <el-popconfirm
38
-            style="width:30px;margin-left:8px"
55
+            style="width: 30px; margin-left: 8px"
39 56
             icon="el-icon-info"
40 57
             icon-color="red"
41 58
             title="确定删除这个答案吗?"
42 59
             @onConfirm="handleDelete(answer)"
43 60
           >
44
-            <el-button slot="reference" type="text" class="deleteQuestion" style="color:red">删除</el-button>
61
+            <el-button
62
+              slot="reference"
63
+              type="text"
64
+              class="deleteQuestion"
65
+              style="color: red"
66
+            >删除</el-button>
45 67
           </el-popconfirm>
46 68
         </li>
47 69
       </ul>
@@ -57,7 +79,6 @@
57 79
   </div>
58 80
 </template>
59 81
 <script>
60
-
61 82
 import { saveQuestion, UpdateQuestion, getQuestionDetail } from '@/api/question'
62 83
 import { deleteAnswer } from '@/api/answer'
63 84
 import QuestionDrawer from '@/components/Question/drawer.vue'
@@ -67,10 +88,12 @@ export default {
67 88
     QuestionDrawer
68 89
   },
69 90
   props: {
91
+    // 题目id
70 92
     questionId: {
71 93
       type: String,
72 94
       required: true
73 95
     },
96
+    // 题库id
74 97
     queId: {
75 98
       type: String,
76 99
       required: true
@@ -143,14 +166,6 @@ export default {
143 166
         this.form = res.data
144 167
       })
145 168
     },
146
-    // 转换特征数组数据格式
147
-    handleToString(list) {
148
-      const nameList = []
149
-      list?.map(item => {
150
-        nameList.push(item.name)
151
-      })
152
-      return nameList.toString()
153
-    },
154 169
     // 非空判断方法
155 170
     handelNull() {
156 171
       if (this.form.questionType) {
@@ -190,9 +205,9 @@ export default {
190 205
   width: 100%;
191 206
   overflow: hidden;
192 207
   display: flex;
193
-  line-height:40px;
208
+  line-height: 40px;
194 209
   background-color: white;
195
-  padding:0 8px;
210
+  padding: 0 8px;
196 211
   border: 1px solid #f0f2f5;
197 212
 }
198 213
 .answerli:hover {

+ 31
- 14
src/views/course/index.vue 查看文件

@@ -13,33 +13,48 @@
13 13
         style="margin-right: 20px"
14 14
         @change="dateChange"
15 15
       />
16
-      <div style="float:right">
16
+      <div style="float: right">
17 17
         <el-button type="primary" @click="onSearch">查询</el-button>
18 18
         <el-button @click="onReset">重置</el-button>
19
-        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建课程</el-button>
19
+        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">
20
+          新建课程
21
+        </el-button>
20 22
       </div>
21 23
     </el-card>
22 24
     <el-table stripe :data="tableData" border style="width: 100%">
23 25
       <el-table-column align="center" prop="title" label="课程名称" />
24 26
       <el-table-column align="center" prop="subTitle" label="课程简介" />
25 27
       <el-table-column align="center" prop="startDate" label="开始时间">
26
-        <template slot-scope="scope">{{ formate(scope.row.startDate) }}</template>
28
+        <template slot-scope="scope">{{
29
+          formate(scope.row.startDate)
30
+        }}</template>
27 31
       </el-table-column>
28 32
       <el-table-column align="center" prop="endDate" label="结束时间">
29 33
         <template slot-scope="scope">{{ formate(scope.row.endDate) }}</template>
30 34
       </el-table-column>
31 35
       <el-table-column align="center" prop="state" label="状态" width="100">
32 36
         <template slot-scope="scope">
33
-          {{ scope.row.state === 1 ? '发布' : '未发布' }}
37
+          {{ scope.row.state === 1 ? "发布" : "未发布" }}
34 38
         </template>
35 39
       </el-table-column>
36 40
       <el-table-column align="center" label="操作" min-width="100" width="280">
37 41
         <template slot-scope="scope">
38
-          <el-button style="margin-right:1em" type="text" @click="toggleState(scope.row)">{{ scope.row.state === 1 ? '取消发布' : '发布' }}</el-button>
39
-          <el-link :underline="false" style="margin-right:1em" type="primary">
42
+          <el-button
43
+            style="margin-right: 1em"
44
+            type="text"
45
+            @click="toggleState(scope.row)"
46
+          >
47
+            {{ scope.row.state === 1 ? "取消发布" : "发布" }}
48
+          </el-button>
49
+          <el-link :underline="false" style="margin-right: 1em" type="primary">
40 50
             <router-link
41
-              :to="{path:'course/edit',query: { courseId: scope.row.courseId }}"
42
-            >编辑</router-link>
51
+              :to="{
52
+                path: 'course/edit',
53
+                query: { courseId: scope.row.courseId },
54
+              }"
55
+            >
56
+              编辑
57
+            </router-link>
43 58
           </el-link>
44 59
           <el-popconfirm
45 60
             icon="el-icon-info"
@@ -47,18 +62,20 @@
47 62
             title="确定要删除该课程吗?"
48 63
             @onConfirm="handleDelete(scope.row)"
49 64
           >
50
-            <el-link slot="reference" :underline="false" type="danger">删除</el-link>
65
+            <el-link slot="reference" :underline="false" type="danger">
66
+              删除
67
+            </el-link>
51 68
           </el-popconfirm>
52 69
         </template>
53 70
       </el-table-column>
54 71
     </el-table>
55 72
     <el-pagination
56
-      v-show="Total!==0"
57
-      style="float:right; margin:20px 0"
73
+      v-show="Total !== 0"
74
+      style="float: right; margin: 20px 0"
58 75
       :total="Total"
59 76
       :current-page="currentPage"
60 77
       :page-size="pageSize"
61
-      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
78
+      :page-sizes="[pageSize, 20, 35, 40, 50, 80, 100]"
62 79
       layout="total, prev, pager, next, sizes"
63 80
       @size-change="handleSizeChange"
64 81
       @current-change="handleCurrentChange"
@@ -153,7 +170,7 @@ export default {
153 170
             })
154 171
             this.onSearch()
155 172
           })
156
-        }).catch(() => {})
173
+        }).catch(() => { })
157 174
       } else {
158 175
         this.$confirm('是否将本课程发布,发布后移动端将显示相关信息?', '提示', {
159 176
           confirmButtonText: '确定',
@@ -167,7 +184,7 @@ export default {
167 184
             })
168 185
             this.onSearch()
169 186
           })
170
-        }).catch(() => {})
187
+        }).catch(() => { })
171 188
       }
172 189
     },
173 190
     onReset() {

+ 60
- 29
src/views/photoWall/index.vue 查看文件

@@ -4,23 +4,50 @@
4 4
       <div class="text item">
5 5
         <el-row>
6 6
           <el-col :span="18">
7
-            <div v-show="packId" style="padding:16px">
8
-              <p style="margin-left:8px">
7
+            <div v-show="packId" style="padding: 16px">
8
+              <p style="margin-left: 8px">
9 9
                 {{ currentPack }}
10 10
                 <upload-image-list
11
-                  style="margin-left:8px;display:inline-block"
11
+                  style="margin-left: 8px; display: inline-block"
12 12
                   @handleChange="handleChange"
13
-                /></p>
14
-              <div v-for="item in images" :key="item.attchId" style="display:inline-block;position:relative;margin:16px">
15
-                <el-card :body-style="{ padding: '0px', height:'100%' }" style="width:320px; height:280px;text-align:center;border:0">
16
-                  <el-image fit="cover" :preview-src-list="[item.url]" :src="item.url" style="height: calc(100% - 40px); display:block" />
17
-                  <div style="width:100%;height:40px"><div class="imgbtn"><i class="el-icon-more" /></div><div class="imgbtn" style="color:red;font-size:14px" @click="deletePhoto(item)"><i class="el-icon-delete" style="margin-right:6px" />删除</div></div>
13
+                />
14
+              </p>
15
+              <div
16
+                v-for="item in images"
17
+                :key="item.attchId"
18
+                style="display: inline-block; position: relative; margin: 16px"
19
+              >
20
+                <el-card
21
+                  :body-style="{ padding: '0px', height: '100%' }"
22
+                  style="
23
+                    width: 320px;
24
+                    height: 280px;
25
+                    text-align: center;
26
+                    border: 0;
27
+                  "
28
+                >
29
+                  <el-image
30
+                    fit="cover"
31
+                    :preview-src-list="[item.url]"
32
+                    :src="item.url"
33
+                    style="height: calc(100% - 40px); display: block"
34
+                  />
35
+                  <div style="width: 100%; height: 40px">
36
+                    <div class="imgbtn"><i class="el-icon-more" /></div>
37
+                    <div
38
+                      class="imgbtn"
39
+                      style="color: red; font-size: 14px"
40
+                      @click="deletePhoto(item)"
41
+                    >
42
+                      <i class="el-icon-delete" style="margin-right: 6px" />删除
43
+                    </div>
44
+                  </div>
18 45
                 </el-card>
19 46
               </div>
20 47
             </div>
21 48
           </el-col>
22 49
           <el-col :span="6">
23
-            <el-card style="border: 0;box-shadow: none;">
50
+            <el-card style="border: 0; box-shadow: none">
24 51
               <div slot="header">
25 52
                 <span>照片墙分组</span>
26 53
               </div>
@@ -28,8 +55,8 @@
28 55
                 v-for="tag in dynamicTags"
29 56
                 :key="tag"
30 57
                 closable
31
-                style="margin-bottom:8px"
32
-                :type="currentPack===tag?'':'info' "
58
+                style="margin-bottom: 8px"
59
+                :type="currentPack === tag ? '' : 'info'"
33 60
                 :disable-transitions="false"
34 61
                 @close="handleClose(tag)"
35 62
                 @click="handleCurrent(tag)"
@@ -42,7 +69,7 @@
42 69
                 v-model="inputValue"
43 70
                 class="input-new-tag"
44 71
                 size="small"
45
-                style="width:200px"
72
+                style="width: 200px"
46 73
                 @keyup.enter.native="handleInputConfirm"
47 74
                 @blur="handleInputConfirm"
48 75
               />
@@ -70,10 +97,6 @@ export default {
70 97
   },
71 98
   data() {
72 99
     return {
73
-      deleteImg: require('../../assets/delete.png'),
74
-      activeNames: ['1'],
75
-      // 图片数据源
76
-      attachList: [],
77 100
       // 分组名数组 字符串数组
78 101
       dynamicTags: [],
79 102
       inputVisible: false,
@@ -100,8 +123,17 @@ export default {
100 123
   methods: {
101 124
     // 图片上传成功会执行一次 每张图片都会执行一次
102 125
     handleChange(val) {
103
-      saveAttachment({ attchType: 'image', packId: this.packId, packName: this.currentPack, url: val }).then(() => {
104
-        getAttachmentList({ attchType: 'image', packId: this.packId, pageSize: 999 }).then(res => {
126
+      saveAttachment({
127
+        attchType: 'image',
128
+        packId: this.packId,
129
+        packName: this.currentPack,
130
+        url: val
131
+      }).then(() => {
132
+        getAttachmentList({
133
+          attchType: 'image',
134
+          packId: this.packId,
135
+          pageSize: 999
136
+        }).then(res => {
105 137
           this.images = res.data.records
106 138
         })
107 139
       })
@@ -163,9 +195,8 @@ export default {
163 195
     },
164 196
     // 添加分组
165 197
     handleInputConfirm() {
166
-      const inputValue = this.inputValue
167
-      if (inputValue) {
168
-        saveAttchPack({ name: inputValue }).then(() => {
198
+      if (this.inputValue) {
199
+        saveAttchPack({ name: this.inputValue }).then(() => {
169 200
           this.$message({
170 201
             type: 'success',
171 202
             message: '添加成功'
@@ -211,7 +242,7 @@ export default {
211 242
   line-height: 40px;
212 243
   display: inline-block;
213 244
   &:first-child {
214
-    border-right:1px solid #f0f0f0 ;
245
+    border-right: 1px solid #f0f0f0;
215 246
   }
216 247
 }
217 248
 .mask {
@@ -222,16 +253,16 @@ export default {
222 253
   left: 0;
223 254
 
224 255
   &:hover {
225
-    background-color: rgba(0,0,0,.2);
256
+    background-color: rgba(0, 0, 0, 0.2);
226 257
   }
227
-  &:hover .maskImg{
228
-    opacity:1
258
+  &:hover .maskImg {
259
+    opacity: 1;
229 260
   }
230 261
   .maskImg {
231
-    position:absolute;
232
-    left:calc( 50% - 8px );
233
-    top:calc( 50% - 8px );
234
-    width:16px;
262
+    position: absolute;
263
+    left: calc(50% - 8px);
264
+    top: calc(50% - 8px);
265
+    width: 16px;
235 266
     opacity: 0;
236 267
   }
237 268
 }

+ 20
- 7
src/views/questionnaire/edit.vue 查看文件

@@ -1,17 +1,31 @@
1 1
 <template>
2 2
   <div class="body_edit">
3
-    <el-form ref="form" :inline="true" :rules="rules" :model="questionnaireForm" label-width="100px">
3
+    <el-form
4
+      ref="form"
5
+      :inline="true"
6
+      :rules="rules"
7
+      :model="questionnaireForm"
8
+      label-width="100px"
9
+    >
4 10
       <h3>问卷详情</h3>
5 11
       <el-form-item v-if="!queId" label="问卷名称:" prop="name">
6
-        <el-input v-model="questionnaireForm.name" style="width:700px" />
12
+        <el-input v-model="questionnaireForm.name" style="width: 700px" />
7 13
       </el-form-item>
8 14
       <el-form-item v-else label="问卷名称:" prop="name">
9
-        <el-input v-model="questionnaireForm.name" style="width:400px" />
15
+        <el-input v-model="questionnaireForm.name" style="width: 400px" />
10 16
       </el-form-item>
11 17
       <el-form-item class="editBottomItem">
12 18
         <el-button type="primary" @click="onSubmit('form')">保存</el-button>
13
-        <el-button v-show="queId" type="primary" @click="dialogVisible = true">查看二维码</el-button>
14
-        <el-button v-show="queId" type="primary" @click="downloadQrcode">下载二维码</el-button>
19
+        <el-button
20
+          v-show="queId"
21
+          type="primary"
22
+          @click="dialogVisible = true"
23
+        >查看二维码</el-button>
24
+        <el-button
25
+          v-show="queId"
26
+          type="primary"
27
+          @click="downloadQrcode"
28
+        >下载二维码</el-button>
15 29
         <el-button @click="onCancel">取消</el-button>
16 30
       </el-form-item>
17 31
     </el-form>
@@ -19,7 +33,7 @@
19 33
       title="二维码"
20 34
       :visible.sync="dialogVisible"
21 35
       width="320px"
22
-      style="text-align:center"
36
+      style="text-align: center"
23 37
     >
24 38
       <img
25 39
         style="width: 160px; height: 160px"
@@ -103,7 +117,6 @@ export default {
103 117
     this.toUrl()
104 118
   },
105 119
   methods: {
106
-    showQcode() {},
107 120
     onCancel() {
108 121
       this.$router.go(-1)
109 122
     },

+ 0
- 1
src/views/questionnaire/index.vue 查看文件

@@ -36,7 +36,6 @@
36 36
         </template>
37 37
       </el-table-column>
38 38
     </el-table>
39
-    <div v-show="false" id="qrcode" ref="qrcode" />
40 39
     <el-pagination
41 40
       v-show="Total!==0"
42 41
       style="float:right; margin:20px 0"

+ 51
- 22
src/views/signIn/edit.vue 查看文件

@@ -1,15 +1,15 @@
1 1
 <template>
2 2
   <div>
3
-    <el-card class="box-card" style="text-align:center" shadow="never">
3
+    <el-card class="box-card" style="text-align: center" shadow="never">
4 4
       <el-row :gutter="20" style="padding-top: 20px">
5 5
         <el-col :span="12">
6
-          <h2>{{ signId ? '修改' : '新建' }}签到</h2>
6
+          <h2>{{ signId ? "修改" : "新建" }}签到</h2>
7 7
           <el-form
8 8
             ref="signForm"
9 9
             :model="signForm"
10 10
             :rules="rules"
11 11
             label-width="7vw"
12
-            style="width:80%;margin:auto"
12
+            style="width: 80%; margin: auto"
13 13
             class="demo-signForm"
14 14
           >
15 15
             <el-form-item label="签到名称" prop="name">
@@ -21,7 +21,7 @@
21 21
                 format="yyyy-MM-dd HH:mm"
22 22
                 type="datetime"
23 23
                 placeholder="选择日期时间"
24
-                style="width:100%"
24
+                style="width: 100%"
25 25
               />
26 26
             </el-form-item>
27 27
             <el-form-item label="结束时间" prop="endTime">
@@ -29,11 +29,11 @@
29 29
                 v-model="signForm.endTime"
30 30
                 format="yyyy-MM-dd HH:mm"
31 31
                 type="datetime"
32
-                style="width:100%"
32
+                style="width: 100%"
33 33
                 placeholder="选择日期时间"
34 34
               />
35 35
             </el-form-item>
36
-            <el-form-item label-width="0">
36
+            <el-form-item v-show="signId" label-width="0">
37 37
               <img
38 38
                 style="width: 100px; height: 100px"
39 39
                 :src="imgURL"
@@ -41,11 +41,12 @@
41 41
               >
42 42
             </el-form-item>
43 43
             <el-form-item label-width="0">
44
-              <el-button
45
-                type="primary"
46
-                @click="submitForm('signForm')"
47
-              >{{ !signId?'新建':'修改' }}</el-button>
48
-              <el-button v-show="signId" type="primary" @click="downloadQrcode">下载二维码</el-button>
44
+              <el-button type="primary" @click="submitForm('signForm')">{{
45
+                !signId ? "新建" : "修改"
46
+              }}</el-button>
47
+              <el-button v-show="signId" type="primary" @click="downloadQrcode">
48
+                下载二维码
49
+              </el-button>
49 50
               <el-button @click="$router.go(-1)">返回</el-button>
50 51
             </el-form-item>
51 52
           </el-form>
@@ -58,19 +59,45 @@
58 59
             :model="signForm"
59 60
             :rules="rules"
60 61
             label-width="7vw"
61
-            style="width:80%;margin:auto"
62
+            style="width: 80%; margin: auto"
62 63
             class="demo-signForm"
63 64
           >
64 65
             <el-form-item label="学期">
65
-              <el-checkbox v-model="checkAllTerm" :indeterminate="isIndeterminateTerm" @change="handleCheckAllTermChange">全选</el-checkbox>
66
-              <el-checkbox-group v-model="checkedTerms" @change="handleCheckedTermsChange">
67
-                <el-checkbox v-for="item in termList" :key="item.termId" :label="item.termId">{{ item.name }}</el-checkbox>
66
+              <el-checkbox
67
+                v-model="checkAllTerm"
68
+                :indeterminate="isIndeterminateTerm"
69
+                @change="handleCheckAllTermChange"
70
+              >
71
+                全选
72
+              </el-checkbox>
73
+              <el-checkbox-group
74
+                v-model="checkedTerms"
75
+                @change="handleCheckedTermsChange"
76
+              >
77
+                <el-checkbox
78
+                  v-for="item in termList"
79
+                  :key="item.termId"
80
+                  :label="item.termId"
81
+                >{{ item.name }}
82
+                </el-checkbox>
68 83
               </el-checkbox-group>
69 84
             </el-form-item>
70 85
             <el-form-item label="班级">
71
-              <el-checkbox v-if="classList.length!==0" v-model="checkAllClass" :indeterminate="isIndeterminateClass" @change="handleCheckAllClassChange">全选</el-checkbox>
72
-              <el-checkbox-group v-model="checkedClasss" @change="handleCheckedClasssChange">
73
-                <el-checkbox v-for="item in classList" :key="item.classId" :label="item.classId">{{ item.name }}</el-checkbox>
86
+              <el-checkbox
87
+                v-if="classList.length !== 0"
88
+                v-model="checkAllClass"
89
+                :indeterminate="isIndeterminateClass"
90
+                @change="handleCheckAllClassChange"
91
+              >全选</el-checkbox>
92
+              <el-checkbox-group
93
+                v-model="checkedClasss"
94
+                @change="handleCheckedClasssChange"
95
+              >
96
+                <el-checkbox
97
+                  v-for="item in classList"
98
+                  :key="item.classId"
99
+                  :label="item.classId"
100
+                >{{ item.name }}</el-checkbox>
74 101
               </el-checkbox-group>
75 102
             </el-form-item>
76 103
             <el-form-item label-width="0">
@@ -172,7 +199,7 @@ export default {
172 199
         .then((res) => {
173 200
           this.signForm = res.data
174 201
         })
175
-        .catch((e) => {})
202
+        .catch((e) => { })
176 203
     }
177 204
     getSchoolTermList().then((res) => {
178 205
       this.termList = res.data.records
@@ -265,21 +292,21 @@ export default {
265 292
       this.$refs[formName].validate((valid) => {
266 293
         if (valid) {
267 294
           if (this.signForm.startTime > this.signForm.endTime) {
268
-            this.$message.success('结束时间不能小于开始时间')
295
+            this.$message.error('结束时间不能小于开始时间')
269 296
           } else if (this.signId) {
270 297
             UpdateSignIn(this.signForm, this.signId)
271 298
               .then((res) => {
272 299
                 this.$message.success('修改成功')
273 300
                 this.$router.go(-1)
274 301
               })
275
-              .catch((e) => {})
302
+              .catch((e) => { })
276 303
           } else {
277 304
             saveSignIn(this.signForm)
278 305
               .then((e) => {
279 306
                 this.$message.success('保存成功')
280 307
                 this.$router.go(-1)
281 308
               })
282
-              .catch((e) => {})
309
+              .catch((e) => { })
283 310
           }
284 311
         } else {
285 312
           return false
@@ -287,6 +314,8 @@ export default {
287 314
       })
288 315
     },
289 316
     // 生成二维码
317
+    // 二维码相关代码查看复工复产系统 E:\work\ubpa\pc-admin 看森哥写的
318
+    // 我这个太老了不要用了
290 319
     qrcode(val) {
291 320
       // eslint-disable-next-line no-unused-vars
292 321
       const qrcode = new QRCode('qrcode', {

+ 1
- 1
vue.config.js 查看文件

@@ -33,7 +33,7 @@ module.exports = {
33 33
     open: true,
34 34
     proxy: {
35 35
       '/api': {
36
-        target: 'http://192.168.89.147:8088',
36
+        target: 'http://192.168.89.25:8080',
37 37
         changeOrigin: true
38 38
       }
39 39
     }