李志伟 hace 3 años
padre
commit
cf41372ea1

+ 0
- 29
src/api/answer.js Ver fichero

@@ -1,29 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存答案
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveAnswer = (data) => request({
9
-  url: '/admin/answer',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 删除答案
16
- * @param {*} data
17
- * @returns
18
- */
19
-export const deleteAnswer = (id) => request({
20
-  url: `/admin/answer/${id}`, method: 'delete'
21
-})
22
-/**
23
- * 更新答案
24
- * @param {*} data
25
- * @returns
26
- */
27
-export const UpdateAnswer = (data, id) => request({
28
-  url: `/admin/answer/${id}`, method: 'put', data
29
-})

+ 0
- 38
src/api/attachment.js Ver fichero

@@ -1,38 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存照片墙
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveAttachment = (data) => request({
9
-  url: '/admin/attachment',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 照片墙列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getAttachmentList = (params) => request({
20
-  url: '/admin/attachment', params
21
-})
22
-
23
-/**
24
- * 删除照片墙
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteAttachment = (id) => request({
29
-  url: `/admin/attachment/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新照片墙
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateAttachment = (data, id) => request({
37
-  url: `/admin/attachment/${id}`, method: 'put', data
38
-})

+ 0
- 38
src/api/attchPack.js Ver fichero

@@ -1,38 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存照片墙分组
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveAttchPack = (data) => request({
9
-  url: '/admin/attch-pack',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 照片墙分组列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getAttchPackList = (params) => request({
20
-  url: '/admin/attchPack', params
21
-})
22
-
23
-/**
24
- * 删除照片墙分组
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteAttchPack = (id) => request({
29
-  url: `/admin/attch-pack/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新照片墙分组
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateAttchPack = (data, id) => request({
37
-  url: `/admin/attch-pack/${id}`, method: 'put', data
38
-})

+ 0
- 46
src/api/banners.js Ver fichero

@@ -1,46 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存轮播图
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveBanner = (data) => request({
9
-  url: '/admin/banner',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 轮播图列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getBannerList = (params) => request({
20
-  url: '/admin/banner', params
21
-})
22
-
23
-/**
24
- * 删除轮播图
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteBanner = (id) => request({
29
-  url: `/admin/banner/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新轮播图
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateBanner = (data, id) => request({
37
-  url: `/admin/banner/${id}`, method: 'put', data
38
-})
39
-/**
40
- * 查询轮播图详情
41
- * @param {*} params
42
- * @returns
43
- */
44
-export const getBannerDetail = (id) => request({
45
-  url: `/admin/banner/${id}`
46
-})

+ 10
- 0
src/api/city.js Ver fichero

@@ -0,0 +1,10 @@
1
+import request from '@/utils/request'
2
+
3
+/**
4
+ * 地区列表
5
+ * @param {*} params
6
+ * @returns
7
+ */
8
+export const getCityList = (lv) => request({
9
+  url: `/admin/city?level=${lv}`
10
+})

+ 0
- 46
src/api/course.js Ver fichero

@@ -1,46 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存课程
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveCourse = (data) => request({
9
-  url: '/admin/course',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 课程列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getCourseList = (params) => request({
20
-  url: '/admin/course', params
21
-})
22
-
23
-/**
24
- * 删除课程
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteCourse = (id) => request({
29
-  url: `/admin/course/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新课程
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateCourse = (data, id) => request({
37
-  url: `/admin/course/${id}`, method: 'put', data
38
-})
39
-/**
40
- * 查询课程详情
41
- * @param {*} params
42
- * @returns
43
- */
44
-export const getCourseDetail = (id) => request({
45
-  url: `/admin/course/${id}`
46
-})

+ 0
- 46
src/api/game.js Ver fichero

@@ -1,46 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存游戏
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveGame = (data) => request({
9
-  url: '/admin/game',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 游戏列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getGameList = (params) => request({
20
-  url: '/admin/game', params
21
-})
22
-
23
-/**
24
- * 删除游戏
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteGame = (id) => request({
29
-  url: `/admin/game/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新游戏
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateGame = (data, id) => request({
37
-  url: `/admin/game/${id}`, method: 'put', data
38
-})
39
-/**
40
- * 查询游戏详情
41
- * @param {*} params
42
- * @returns
43
- */
44
-export const getGameDetail = (id) => request({
45
-  url: `/admin/game/${id}`
46
-})

+ 0
- 54
src/api/question.js Ver fichero

@@ -1,54 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存游戏题库
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveQuestion = (data) => request({
9
-  url: '/admin/question',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 游戏题库列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getQuestionList = (params) => request({
20
-  url: '/admin/question', params
21
-})
22
-
23
-/**
24
- * 删除游戏题库
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteQuestion = (id) => request({
29
-  url: `/admin/question/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新游戏题库
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateQuestion = (data, id) => request({
37
-  url: `/admin/question/${id}`, method: 'put', data
38
-})
39
-/**
40
- * 拖拽排序
41
- * @param {*} data
42
- * @returns
43
- */
44
-export const UpdateQuestionSort = (data, id) => request({
45
-  url: `/admin/question/sort?queId=${id}`, method: 'put', data
46
-})
47
-/**
48
- * 查询游戏题库详情
49
- * @param {*} params
50
- * @returns
51
- */
52
-export const getQuestionDetail = (id, params) => request({
53
-  url: `/admin/question/${id}`, params
54
-})

+ 0
- 46
src/api/questionnaire.js Ver fichero

@@ -1,46 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存问卷调查
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveQuestionnaire = (data) => request({
9
-  url: '/admin/questionnaire',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 问卷调查列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getQuestionnaireList = (params) => request({
20
-  url: '/admin/questionnaire', params
21
-})
22
-
23
-/**
24
- * 删除问卷调查
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteQuestionnaire = (id) => request({
29
-  url: `/admin/questionnaire/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新问卷调查
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateQuestionnaire = (data, id) => request({
37
-  url: `/admin/questionnaire/${id}`, method: 'put', data
38
-})
39
-/**
40
- * 查询问卷调查详情
41
- * @param {*} params
42
- * @returns
43
- */
44
-export const getQuestionnaireDetail = (id) => request({
45
-  url: `/admin/questionnaire/${id}`
46
-})

+ 19
- 0
src/api/register.js Ver fichero

@@ -0,0 +1,19 @@
1
+import request from '@/utils/request'
2
+
3
+/**
4
+ * 报名表列表
5
+ * @param {*} params
6
+ * @returns
7
+ */
8
+export const getRegisterList = (params) => request({
9
+  url: '/admin/register', params
10
+})
11
+
12
+/**
13
+ * 查询报名表详情
14
+ * @param {*} params
15
+ * @returns
16
+ */
17
+export const getRegisterDetail = (id) => request({
18
+  url: `/admin/register/${id}`
19
+})

+ 0
- 46
src/api/schoolClass.js Ver fichero

@@ -1,46 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
-* 保存班级
5
-* @param {*} data
6
-* @returns
7
-*/
8
-export const saveSchoolClass = (data) => request({
9
-  url: '/admin/school-class',
10
-  method: 'post',
11
-  data
12
-})
13
-
14
-/**
15
- * 班级列表
16
- * @param {*} params
17
- * @returns
18
- */
19
-export const getSchoolClassList = (params) => request({
20
-  url: '/admin/school-class', params
21
-})
22
-
23
-/**
24
- * 删除班级
25
- * @param {*} data
26
- * @returns
27
- */
28
-export const deleteSchoolClass = (id) => request({
29
-  url: `/admin/school-class/${id}`, method: 'delete'
30
-})
31
-/**
32
- * 更新班级
33
- * @param {*} data
34
- * @returns
35
- */
36
-export const UpdateSchoolClass = (data, id) => request({
37
-  url: `/admin/school-class/${id}`, method: 'put', data
38
-})
39
-/**
40
- * 查询班级详情
41
- * @param {*} params
42
- * @returns
43
- */
44
-export const getSchoolClassDetail = (id) => request({
45
-  url: `/admin/school-class/${id}`
46
-})

+ 0
- 27
src/api/student.js Ver fichero

@@ -1,27 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-/**
4
- * 学员列表
5
- * @param {*} params
6
- * @returns
7
- */
8
-export const getStudentList = (params) => request({
9
-  url: '/admin/student', params
10
-})
11
-
12
-/**
13
- * 删除学员
14
- * @param {*} data
15
- * @returns
16
- */
17
-export const deleteStudent = (id) => request({
18
-  url: `/admin/student/${id}`, method: 'delete'
19
-})
20
-/**
21
- * 查询学员详情
22
- * @param {*} params
23
- * @returns
24
- */
25
-export const getStudentDetail = (id) => request({
26
-  url: `/admin/student/${id}`
27
-})

+ 0
- 174
src/components/Question/drawer.vue Ver fichero

@@ -1,174 +0,0 @@
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>
46
-</template>
47
-<script>
48
-import { saveAnswer, UpdateAnswer } from '@/api/answer'
49
-export default {
50
-  props: {
51
-    dialog: Boolean,
52
-    questionId: String,
53
-    answer: {
54
-      type: Object,
55
-      default: () => {}
56
-    }
57
-  },
58
-  data() {
59
-    return {
60
-      rules: {
61
-        content: [
62
-          { required: true, message: '请输入答案内容', trigger: 'blur' }
63
-        ],
64
-        score: [
65
-          { required: true, message: '请输入分数', trigger: 'blur' }
66
-        ]
67
-      },
68
-      form: {
69
-        optCode: undefined,
70
-        content: undefined,
71
-        score: undefined
72
-      },
73
-      formLabelWidth: '120px',
74
-      options: [
75
-        {
76
-          value: 'A',
77
-          label: 'A'
78
-        },
79
-        {
80
-          value: 'B',
81
-          label: 'B'
82
-        },
83
-        {
84
-          value: 'C',
85
-          label: 'C'
86
-        },
87
-        {
88
-          value: 'D',
89
-          label: 'D'
90
-        },
91
-        {
92
-          value: 'true',
93
-          label: '对'
94
-        },
95
-        {
96
-          value: 'false',
97
-          label: '错'
98
-        }
99
-      ]
100
-    }
101
-  },
102
-  watch: {
103
-    answer() {
104
-      if (this.answer) {
105
-        this.form = this.answer
106
-      }
107
-    }
108
-  },
109
-  methods: {
110
-    // 非空判断方法
111
-    handelNull() {
112
-      if (this.form.optCode) {
113
-        if (this.form.content) {
114
-          if (Number(this.form.score) >= 0) {
115
-            return true
116
-          } else {
117
-            this.$message('请输入分数仅限正整数')
118
-            return false
119
-          }
120
-        } else {
121
-          this.$message('请输入答案')
122
-          return false
123
-        }
124
-      } else {
125
-        this.$message('请在灰色下拉菜单中添加选项')
126
-        return false
127
-      }
128
-    },
129
-    onSubmit(form) {
130
-      this.$refs[form].validate((valid) => {
131
-        if (valid) {
132
-          if (this.handelNull()) {
133
-            const data = { ...this.form, score: Number(this.form.score) }
134
-            if (this.answer.answerId) {
135
-              UpdateAnswer(data, this.answer.answerId).then((res) => {
136
-                this.$message('修改成功')
137
-                this.$emit('handleEditDrawer', true)
138
-                this.form = {
139
-                  optCode: undefined,
140
-                  content: undefined,
141
-                  score: undefined
142
-                }
143
-              })
144
-            } else {
145
-              data.questionId = this.questionId
146
-              saveAnswer(data).then((res) => {
147
-                this.$message('添加成功')
148
-                this.$emit('handleEditDrawer', true)
149
-                this.form = {
150
-                  optCode: undefined,
151
-                  content: undefined,
152
-                  score: undefined
153
-                }
154
-              })
155
-            }
156
-          }
157
-        } else {
158
-          return false
159
-        }
160
-      })
161
-    },
162
-    handleClose() {
163
-      this.$emit('handleCloseDrawer', true)
164
-      this.form = {
165
-        optCode: undefined,
166
-        content: undefined,
167
-        score: undefined
168
-      }
169
-    }
170
-  }
171
-}
172
-</script>
173
-<style>
174
-</style>

+ 0
- 206
src/components/Question/edit.vue Ver fichero

@@ -1,206 +0,0 @@
1
-<template>
2
-  <div style="padding: 20px">
3
-    <h2 style="text-align: center">
4
-      问卷题目{{ questionId ? "编辑" : "添加" }}
5
-    </h2>
6
-    <el-form ref="form" :model="form" label-width="90px">
7
-      <el-form-item label="题目:">
8
-        <el-input v-model="form.content" placeholder="请输入问题名(必填)">
9
-          <el-select slot="prepend" v-model="form.questionType" style="width:100px" placeholder="请选择">
10
-            <el-option label="单选题" value="radio" />
11
-            <el-option label="多选题" value="checkBox" />
12
-            <el-option label="判断题" value="switch" />
13
-            <el-option label="简答题" value="textarea" />
14
-          </el-select>
15
-        </el-input>
16
-      </el-form-item>
17
-      <el-form-item>
18
-        <el-button type="primary" @click="onSubmit">确定</el-button>
19
-        <el-button @click="$router.go(-1)">返回</el-button>
20
-      </el-form-item>
21
-    </el-form>
22
-    <el-card v-if="questionId && form.questionType !== 'textarea'" shadow="never" body-style="padding:0" class="box-card">
23
-      <div slot="header" class="clearfix">
24
-        <h3 style="float:left">答案列表</h3>
25
-        <el-button
26
-          type="primary"
27
-          style="float: right"
28
-          icon="el-icon-plus"
29
-          @click="onAddAnswer"
30
-        >添加答案</el-button>
31
-      </div>
32
-      <ul style="list-style-type: none;margin:24px 0 24px -40px">
33
-        <li v-for="answer in form.answerList" :key="answer.answerId" class="answerli">
34
-          <div style="flex:1;width: 100%;overflow: hidden;display: flex;" @click="handleEdit(answer)">
35
-            <span style="width:45px">{{ answer.optCode }}</span>
36
-            <span style="flex:1">{{ answer.content }}</span>
37
-            <span style="width:30px">{{ answer.score }}分</span>
38
-          </div>
39
-          <el-popconfirm
40
-            style="width:30px;margin-left:8px"
41
-            icon="el-icon-info"
42
-            icon-color="red"
43
-            title="确定删除这个答案吗?"
44
-            @onConfirm="handleDelete(answer)"
45
-          >
46
-            <el-button slot="reference" type="text" class="deleteQuestion" style="color:red">删除</el-button>
47
-          </el-popconfirm>
48
-        </li>
49
-      </ul>
50
-    </el-card>
51
-    <QuestionDrawer
52
-      :dialog="dialog"
53
-      :question-id="form.questionId"
54
-      :answer="answer"
55
-      :que-id="queId"
56
-      @handleCloseDrawer="handleCloseDrawer"
57
-      @handleEditDrawer="handleEditDrawer"
58
-    />
59
-  </div>
60
-</template>
61
-<script>
62
-
63
-import { saveQuestion, UpdateQuestion, getQuestionDetail } from '@/api/question'
64
-import { deleteAnswer } from '@/api/answer'
65
-import QuestionDrawer from '@/components/Question/drawer.vue'
66
-
67
-export default {
68
-  components: {
69
-    QuestionDrawer
70
-  },
71
-  props: {
72
-    questionId: {
73
-      type: String,
74
-      required: true
75
-    },
76
-    queId: {
77
-      type: String,
78
-      required: true
79
-    },
80
-    total: {
81
-      type: Number,
82
-      required: true
83
-    }
84
-  },
85
-  data() {
86
-    return {
87
-      form: {
88
-        content: undefined,
89
-        questionType: undefined,
90
-        queId: undefined,
91
-        questionId: undefined,
92
-        answerList: []
93
-      },
94
-      answer: {},
95
-      // 正确答案数据源
96
-      dialog: false
97
-    }
98
-  },
99
-  watch: {
100
-    // 用于点击左边改变右边的页面
101
-    questionId: function() {
102
-      if (this.questionId) {
103
-        getQuestionDetail(this.questionId).then((res) => {
104
-          this.form = res.data
105
-        })
106
-      } else {
107
-        this.form = {
108
-          content: undefined,
109
-          questionType: undefined,
110
-          queId: this.queId,
111
-          questionId: undefined,
112
-          answerList: []
113
-        }
114
-      }
115
-    }
116
-  },
117
-  methods: {
118
-    // 添加答案
119
-    onAddAnswer() {
120
-      this.answer = {}
121
-      this.dialog = true
122
-    },
123
-    // 编辑答案
124
-    handleEdit(val) {
125
-      this.answer = val
126
-      this.dialog = true
127
-    },
128
-    // 删除答案
129
-    handleDelete(val) {
130
-      deleteAnswer(val.answerId).then((res) => {
131
-        this.$message('删除答案成功')
132
-        getQuestionDetail(this.questionId).then((res) => {
133
-          this.form = res.data
134
-        })
135
-      })
136
-    },
137
-    // 关闭答案抽屉
138
-    handleCloseDrawer() {
139
-      this.dialog = false
140
-    },
141
-    // 编辑答案抽屉成功重新查询列表
142
-    handleEditDrawer(val) {
143
-      this.handleCloseDrawer()
144
-      getQuestionDetail(this.questionId).then((res) => {
145
-        this.form = res.data
146
-      })
147
-    },
148
-    // 转换特征数组数据格式
149
-    handleToString(list) {
150
-      const nameList = []
151
-      list?.map(item => {
152
-        nameList.push(item.name)
153
-      })
154
-      return nameList.toString()
155
-    },
156
-    // 非空判断方法
157
-    handelNull() {
158
-      if (this.form.questionType) {
159
-        if (this.form.content) {
160
-          return true
161
-        } else {
162
-          this.$message('请输入题目')
163
-          return false
164
-        }
165
-      } else {
166
-        this.$message('请选择题型')
167
-        return false
168
-      }
169
-    },
170
-    onSubmit() {
171
-      if (this.handelNull()) {
172
-        const data = { ...this.form }
173
-        if (!this.questionId) {
174
-          saveQuestion({ ...data, queId: this.queId, sortNo: this.total }).then((res) => {
175
-            this.$message('添加问题成功')
176
-            this.$emit('handleRefreshQuestion', true)
177
-            this.$emit('handleEditQuestion', res.data.questionId)
178
-          })
179
-        } else {
180
-          UpdateQuestion({ ...data, queId: this.queId }, this.questionId).then((res) => {
181
-            this.$message('修改问题成功')
182
-            this.$emit('handleRefreshQuestion', true)
183
-          })
184
-        }
185
-      }
186
-    }
187
-  }
188
-}
189
-</script>
190
-<style scoped lang="scss">
191
-.answerli {
192
-  width: 100%;
193
-  overflow: hidden;
194
-  display: flex;
195
-  line-height:40px;
196
-  background-color: white;
197
-  padding:0 8px;
198
-  border: 1px solid #f0f2f5;
199
-}
200
-.answerli:hover {
201
-  background-color: rgb(230, 247, 255);
202
-}
203
-.answerli:nth-of-type(even) {
204
-  background: #f0f2f5;
205
-}
206
-</style>

+ 0
- 149
src/components/Question/index.vue Ver fichero

@@ -1,149 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never" body-style="padding:0">
4
-      <div slot="header" class="clearfix">
5
-        <h3 style="float:left">题库列表</h3>
6
-        <el-button
7
-          type="primary"
8
-          style="float: right"
9
-          icon="el-icon-plus"
10
-          @click="handleAdd"
11
-        >添加题目</el-button>
12
-      </div>
13
-      <draggable v-model="tableData" chosen-class="chosen" force-fallback="true" group="people" animation="1000" @end="onEnd">
14
-        <transition-group>
15
-          <div v-for="item,index in tableData" :key="index" class="questionli" @click="handleEdit(item)">
16
-            <span style="width:45px">第{{ index+1 }}题</span>
17
-            <span style="width:45px">{{ item.questionType === 'radio'?'单选题':item.questionType==='checkBox'?'多选题':item.questionType==='switch'?'判断题':'简答题' }}</span>
18
-            <span style="flex:1">{{ item.content }}</span>
19
-            <el-popconfirm
20
-              style="width:30px"
21
-              icon="el-icon-info"
22
-              icon-color="red"
23
-              title="确定删除这个问题吗?"
24
-              @onConfirm="handleDelete(item)"
25
-            >
26
-              <el-button slot="reference" type="text" style="color:red">删除</el-button>
27
-            </el-popconfirm>
28
-          </div>
29
-        </transition-group>
30
-      </draggable>
31
-      <el-pagination
32
-        v-show="Total!==0"
33
-        style="float:right; margin:24px 0"
34
-        :total="Total"
35
-        :current-page="currentPage"
36
-        :page-size="pageSize"
37
-        layout="total, prev, pager, next, sizes"
38
-        @size-change="handleSizeChange"
39
-        @current-change="handleCurrentChange"
40
-      />
41
-    </el-card>
42
-  </div>
43
-</template>
44
-<script>
45
-import { getQuestionList, deleteQuestion, UpdateQuestionSort } from '@/api/question'
46
-import draggable from 'vuedraggable'
47
-
48
-export default {
49
-  // 注册draggable组件
50
-  components: {
51
-    draggable
52
-  },
53
-  props: {
54
-    queId: {
55
-      type: String,
56
-      required: true
57
-    }
58
-  },
59
-  data() {
60
-    return {
61
-      tableData: [],
62
-      pageSize: 20,
63
-      currentPage: 1,
64
-      Total: 0 // 条目总数
65
-    }
66
-  },
67
-  watch: {
68
-    queId: {
69
-      handler(val) {
70
-        if (val) {
71
-          this.onSearch()
72
-        }
73
-      },
74
-      immediate: true // 页面加载时就启动
75
-    }
76
-  },
77
-  mounted() {
78
-    this.onSearch()
79
-  },
80
-  methods: {
81
-    // 拖拽结束事件
82
-    onEnd() {
83
-      const sortList = []
84
-      this.tableData.map((item, index) => {
85
-        sortList.push({ ...item, sortNo: index })
86
-      })
87
-      UpdateQuestionSort(sortList, this.queId)
88
-    },
89
-    handleSizeChange(val) {
90
-      this.pageSize = val
91
-      this.changePagination()
92
-    },
93
-    handleCurrentChange(val) {
94
-      this.currentPage = val
95
-      this.changePagination()
96
-    },
97
-    changePagination() {
98
-      getQuestionList({ queId: this.queId, pageSize: this.pageSize, pageNum: this.currentPage }).then(
99
-        (res) => {
100
-          this.tableData = res.data.records
101
-        }
102
-      )
103
-    },
104
-    // 添加问题
105
-    handleAdd() {
106
-      this.$emit('handleAddQuestion', true)
107
-    },
108
-    handleEdit(row) {
109
-      // 向外传送数据row.questionId
110
-      this.$emit('handleEditQuestion', row.questionId)
111
-    },
112
-    handleDelete(row) {
113
-      deleteQuestion(row.questionId).then(() => {
114
-        this.$message('删除问题成功')
115
-        this.onSearch()
116
-        // 关闭编辑问题页面防止编辑页面还没关闭就删除当前问题了
117
-        this.$emit('handleCloseQuestion', true)
118
-      })
119
-    },
120
-    onSearch() {
121
-      getQuestionList({ queId: this.queId, pageSize: this.pageSize }).then(
122
-        (res) => {
123
-          this.tableData = res.data.records
124
-          this.Total = res.data.total
125
-          this.pageSize = res.data.size
126
-          this.$emit('setQuestionTotal', res.data.total)
127
-        }
128
-      )
129
-    }
130
-  }
131
-}
132
-</script>
133
-<style scoped lang="scss">
134
-.questionli {
135
-  width: 100%;
136
-  overflow: hidden;
137
-  display: flex;
138
-  line-height:40px;
139
-  background-color: white;
140
-  padding:0 8px;
141
-  border: 1px solid #f0f2f5;
142
-}
143
-.questionli:nth-of-type(even) {
144
-  background: #f0f2f5;
145
-}
146
-.questionli:hover {
147
-  background-color: rgb(230, 247, 255);
148
-}
149
-</style>

+ 1
- 1
src/layout/components/Sidebar/Logo.vue Ver fichero

@@ -24,7 +24,7 @@ export default {
24 24
   },
25 25
   data() {
26 26
     return {
27
-      title: '电网教培信息管理系统',
27
+      title: 'COLMO后台管理系统',
28 28
       logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png'
29 29
     }
30 30
   }

+ 10
- 138
src/router/index.js Ver fichero

@@ -42,156 +42,28 @@ export const constantRoutes = [
42 42
     }]
43 43
   },
44 44
 
45
-  // 学员管理
46
-  {
47
-    path: '/students',
48
-    component: Layout,
49
-    meta: { title: '学员管理', icon: 'form' },
50
-    children: [
51
-      {
52
-        path: 'schoolTerm',
53
-        name: '学期列表',
54
-        component: () => import('@/views/students/schoolTerm/list'),
55
-        meta: { title: '学期列表', icon: 'schoolTerm' }
56
-      },
57
-      {
58
-        hidden: true,
59
-        path: 'schoolTerm/edit',
60
-        name: 'schoolTermEdit',
61
-        component: () => import('@/views/students/schoolTerm/edit'),
62
-        meta: { title: '学期编辑', icon: 'question' }
63
-      },
64
-      {
65
-        path: 'schoolClass',
66
-        name: '班级列表',
67
-        component: () => import('@/views/students/schoolClass/list'),
68
-        meta: { title: '班级列表', icon: 'schoolClass' }
69
-      },
70
-      {
71
-        hidden: true,
72
-        path: 'schoolClass/edit',
73
-        name: 'schoolClassEdit',
74
-        component: () => import('@/views/students/schoolClass/edit'),
75
-        meta: { title: '班级编辑', icon: 'question' }
76
-      },
77
-      {
78
-        path: 'sutdentsList',
79
-        name: '学员列表',
80
-        component: () => import('@/views/students/studentsList'),
81
-        meta: { title: '学员列表', icon: 'student' }
82
-      },
83
-      {
84
-        hidden: true,
85
-        path: 'students/detail',
86
-        name: 'studentDetail',
87
-        component: () => import('@/views/students/studentDetail'),
88
-        meta: { title: '学员详情', icon: 'question' }
89
-      }
90
-    ]
91
-  },
92
-
93 45
   // 课程管理
94 46
   {
95
-    path: '/course',
47
+    path: '/register',
96 48
     component: Layout,
97
-    meta: { title: '课程管理', icon: 'course' },
49
+    meta: { title: '报名管理', icon: 'course' },
98 50
     children: [
99 51
       {
100
-        path: 'course',
101
-        name: '课程列表',
102
-        component: () => import('@/views/course/index'),
103
-        meta: { title: '课程列表', icon: 'course' }
52
+        path: 'register',
53
+        name: '报名列表',
54
+        component: () => import('@/views/register/list'),
55
+        meta: { title: '报名列表', icon: 'course' }
104 56
       },
105 57
       {
106 58
         hidden: true,
107
-        path: 'course/edit',
108
-        name: 'courseEdit',
109
-        component: () => import('@/views/course/edit'),
110
-        meta: { title: '课程编辑', icon: 'question' }
59
+        path: 'register/detail',
60
+        name: 'registerDetail',
61
+        component: () => import('@/views/register/detail'),
62
+        meta: { title: '报名详情', icon: 'question' }
111 63
       }
112 64
     ]
113 65
   },
114 66
 
115
-  // 签到管理
116
-  {
117
-    path: '/signIn',
118
-    component: Layout,
119
-    meta: { title: '签到管理', icon: 'signIn' },
120
-    children: [
121
-      {
122
-        path: 'signIn',
123
-        name: '签到列表',
124
-        component: () => import('@/views/signIn/index'),
125
-        meta: { title: '签到列表', icon: 'signIn' }
126
-      },
127
-      {
128
-        hidden: true,
129
-        path: 'signIn/edit',
130
-        name: 'signInEdit',
131
-        component: () => import('@/views/signIn/edit'),
132
-        meta: { title: '签到编辑', icon: 'question' }
133
-      }
134
-    ]
135
-  },
136
-
137
-  // 轮播图
138
-  {
139
-    path: '/banners',
140
-    component: Layout,
141
-    meta: { title: '轮播图管理', icon: 'banner' },
142
-    children: [
143
-      {
144
-        path: 'banners',
145
-        name: '轮播图列表',
146
-        component: () => import('@/views/banners/index'),
147
-        meta: { title: '轮播图列表', icon: 'banner' }
148
-      },
149
-      {
150
-        hidden: true,
151
-        path: 'banners/edit',
152
-        name: 'bannersEdit',
153
-        component: () => import('@/views/banners/edit'),
154
-        meta: { title: '轮播图编辑', icon: 'question' }
155
-      }
156
-    ]
157
-  },
158
-
159
-  // 照片墙
160
-  {
161
-    path: '/photoWall',
162
-    component: Layout,
163
-    meta: { title: '照片墙', icon: 'form' },
164
-    children: [
165
-      {
166
-        path: 'photoWall',
167
-        name: '照片列表',
168
-        component: () => import('@/views/photoWall/index'),
169
-        meta: { title: '照片墙', icon: 'photoWall' }
170
-      }
171
-    ]
172
-  },
173
-
174
-  // 问卷调查
175
-  {
176
-    path: '/questionnaire',
177
-    component: Layout,
178
-    meta: { title: '问卷调查', icon: 'form' },
179
-    children: [
180
-      {
181
-        path: 'questionnaire',
182
-        name: '问卷列表',
183
-        component: () => import('@/views/questionnaire/index'),
184
-        meta: { title: '问卷列表', icon: 'questionnaire' }
185
-      },
186
-      {
187
-        hidden: true,
188
-        path: 'questionnaire/edit',
189
-        name: 'questionnaireEdit',
190
-        component: () => import('@/views/questionnaire/edit'),
191
-        meta: { title: '问卷编辑', icon: 'question' }
192
-      }
193
-    ]
194
-  },
195 67
   {
196 68
     path: '/login',
197 69
     component: () => import('@/views/login/index'),

+ 1
- 1
src/settings.js Ver fichero

@@ -1,6 +1,6 @@
1 1
 module.exports = {
2 2
 
3
-  title: '电网教培信息管理系统',
3
+  title: 'COLMO后台管理系统',
4 4
 
5 5
   /**
6 6
    * @type {boolean} true | false

+ 0
- 148
src/views/banners/edit.vue Ver fichero

@@ -1,148 +0,0 @@
1
-<template>
2
-  <div>
3
-    <el-card class="box-card" style="text-align:center" shadow="never">
4
-      <h2>{{ bannerId ? '修改' : '新建' }}轮播图</h2>
5
-      <el-form
6
-        ref="bannerForm"
7
-        :model="bannerForm"
8
-        :rules="rules"
9
-        label-width="10vw"
10
-        style="width:50%;margin:auto"
11
-        class="demo-bannerForm"
12
-      >
13
-        <el-form-item label="课程名" prop="courseId">
14
-          <el-select v-model="bannerForm.courseId" style="width:100%" filterable placeholder="请选择">
15
-            <el-option
16
-              v-for="item in options"
17
-              :key="item.courseId"
18
-              :label="item.title"
19
-              :value="item.courseId"
20
-            />
21
-          </el-select>
22
-        </el-form-item>
23
-        <el-form-item label="轮播图" prop="thumb">
24
-          <upload-image
25
-            style="float:left"
26
-            :icon="bannerForm.thumb"
27
-            @handleChange="handleChange"
28
-            @handleDeleteIcon="handleDeleteIcon"
29
-          />
30
-        </el-form-item>
31
-        <el-form-item label="轮播图位置" prop="position">
32
-          <el-select v-model="bannerForm.position" style="width:100%" placeholder="请选择">
33
-            <el-option
34
-              v-for="item in positionOptions"
35
-              :key="item.value"
36
-              :label="item.label"
37
-              :value="item.value"
38
-            />
39
-          </el-select>
40
-        </el-form-item>
41
-        <el-form-item label="sortNo" prop="排序">
42
-          <el-input v-model="bannerForm.sortNo" min="0" type="number" />
43
-        </el-form-item>
44
-        <el-form-item label-width="0">
45
-          <el-button
46
-            type="primary"
47
-            @click="submitForm('bannerForm')"
48
-          >{{ !bannerId?'新建轮播图':'修改轮播图' }}</el-button>
49
-          <el-button @click="$router.go(-1)">返回</el-button>
50
-        </el-form-item>
51
-      </el-form>
52
-    </el-card>
53
-  </div>
54
-</template>
55
-
56
-<script>
57
-import { saveBanner, getBannerDetail, UpdateBanner } from '@/api/banners'
58
-import { getCourseList } from '@/api/course'
59
-import UploadImage from '@/components/UploadImage/index.vue'
60
-
61
-export default {
62
-  components: {
63
-    UploadImage
64
-  },
65
-  data() {
66
-    return {
67
-      options: [],
68
-      bannerId: '',
69
-      bannerForm: {
70
-        courseId: undefined,
71
-        thumb: undefined,
72
-        position: undefined,
73
-        sortNo: undefined
74
-      },
75
-      rules: {
76
-        courseId: [
77
-          { required: true, message: '请选择课程', trigger: 'blur' }
78
-        ],
79
-        thumb: [{ required: true, message: '请上传图片', trigger: 'blur' }],
80
-        position: [{ required: true, message: '请选择轮播图位置', trigger: 'blur' }]
81
-      },
82
-      positionOptions: [
83
-        { label: '培训通知', value: 'Training' },
84
-        { label: '精彩锦集', value: 'Wonderful' }
85
-      ]
86
-    }
87
-  },
88
-  mounted() {
89
-    if (this.$route?.query.bannerId) {
90
-      this.bannerId = this.$route.query.bannerId
91
-      getBannerDetail(this.bannerId)
92
-        .then((res) => {
93
-          this.bannerForm = res.data
94
-        })
95
-        .catch((e) => {})
96
-    }
97
-    getCourseList().then((res) => {
98
-      this.options = res.data.records
99
-    })
100
-  },
101
-  methods: {
102
-    handleChange(val) {
103
-      this.bannerForm.thumb = val
104
-    },
105
-    handleDeleteIcon() {
106
-      this.bannerForm.thumb = ''
107
-    },
108
-    submitForm(formName) {
109
-      this.$refs[formName].validate((valid) => {
110
-        if (valid) {
111
-          var title
112
-          this.options.map(item => {
113
-            if (item.courseId === this.bannerForm.courseId) {
114
-              title = item.title
115
-            }
116
-          })
117
-          if (this.bannerId) {
118
-            UpdateBanner({ ...this.bannerForm, title }, this.bannerId)
119
-              .then((res) => {
120
-                this.$message.success('修改成功')
121
-                this.$router.go(-1)
122
-              })
123
-              .catch((e) => {})
124
-          } else {
125
-            saveBanner({ ...this.bannerForm, title })
126
-              .then((e) => {
127
-                this.$message.success('保存成功')
128
-                this.$router.go(-1)
129
-              })
130
-              .catch((e) => {})
131
-          }
132
-        } else {
133
-          return false
134
-        }
135
-      })
136
-    }
137
-  }
138
-}
139
-</script>
140
-
141
-<style scoped >
142
-.demo-bannerForm {
143
-  margin-top: 1em;
144
-}
145
-</style>
146
-
147
-<style lang="scss" scoped>
148
-</style>

+ 0
- 170
src/views/banners/index.vue Ver fichero

@@ -1,170 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never">
4
-      轮播图位置:<el-select v-model="position" placeholder="请选择">
5
-        <el-option
6
-          v-for="item in options"
7
-          :key="item.value"
8
-          :label="item.label"
9
-          :value="item.value"
10
-        />
11
-      </el-select>
12
-      <div style="float:right">
13
-        <el-button type="primary" @click="onSearch">查询</el-button>
14
-        <el-button @click="onReset">重置</el-button>
15
-        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建轮播图</el-button>
16
-      </div>
17
-    </el-card>
18
-    <el-table stripe :data="tableData" border style="width: 100%">
19
-      <el-table-column prop="title" label="课程名称" />
20
-      <el-table-column prop="thumb" label="图片">
21
-        <template slot-scope="scope">
22
-          <el-image :src="scope.row.thumb" style="width:100px" />
23
-        </template>
24
-      </el-table-column>
25
-      <el-table-column prop="position" label="位置">
26
-        <template slot-scope="scope">{{ scope.row.position === 'Training' ? '培训通知' : '精彩锦集' }}</template>
27
-      </el-table-column>
28
-      <el-table-column prop="sortNo" label="排序">
29
-        <template slot-scope="scope">{{ scope.row.sortNo ? scope.row.sortNo : 0 }}</template>
30
-      </el-table-column>
31
-      <el-table-column prop="state" label="状态" width="100">
32
-        <template slot-scope="scope">
33
-          {{ scope.row.state === 1 ? '发布' : '未发布' }}
34
-        </template>
35
-      </el-table-column>
36
-      <el-table-column align="center" label="操作" min-width="100" width="210">
37
-        <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">
40
-            <router-link
41
-              :to="{path:'banners/edit',query: { bannerId: scope.row.bannerId }}"
42
-            >编辑</router-link>
43
-          </el-link>
44
-          <el-popconfirm
45
-            icon="el-icon-info"
46
-            icon-color="red"
47
-            title="确定要删除该轮播图吗?"
48
-            @onConfirm="handleDelete(scope.row)"
49
-          >
50
-            <el-link slot="reference" :underline="false" type="danger">删除</el-link>
51
-          </el-popconfirm>
52
-        </template>
53
-      </el-table-column>
54
-    </el-table>
55
-    <el-pagination
56
-      v-show="Total!==0"
57
-      style="float:right; margin:20px 0"
58
-      :total="Total"
59
-      :current-page="currentPage"
60
-      :page-size="pageSize"
61
-      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
62
-      layout="total, prev, pager, next, sizes"
63
-      @size-change="handleSizeChange"
64
-      @current-change="handleCurrentChange"
65
-    />
66
-  </div>
67
-</template>
68
-<script>
69
-import { getBannerList, deleteBanner, UpdateBanner } from '@/api/banners'
70
-export default {
71
-  data() {
72
-    return {
73
-      position: undefined,
74
-      tableData: [],
75
-      options: [
76
-        { label: '培训通知', value: 'Training' },
77
-        { label: '精彩锦集', value: 'Wonderful' }
78
-      ],
79
-      //
80
-      pageSize: 10,
81
-      currentPage: 1,
82
-      Total: 0 // 条目总数
83
-    }
84
-  },
85
-  mounted() {
86
-    this.onSearch()
87
-  },
88
-  methods: {
89
-    // 改变每页显示条数
90
-    handleSizeChange(val) {
91
-      this.pageSize = val
92
-      this.changePagination()
93
-    },
94
-    // 改变页码
95
-    handleCurrentChange(val) {
96
-      this.currentPage = val
97
-      this.changePagination()
98
-    },
99
-    // 改变分页组件重新查询数据
100
-    changePagination() {
101
-      getBannerList({
102
-        position: this.position,
103
-        pageNum: this.currentPage,
104
-        pageSize: this.pageSize
105
-      }).then((res) => {
106
-        this.tableData = res.data.records
107
-      })
108
-    },
109
-
110
-    handleAdd() {
111
-      this.$router.push({ path: 'banners/edit' })
112
-    },
113
-    handleDelete(row) {
114
-      deleteBanner(row.bannerId).then(() => {
115
-        this.onSearch()
116
-      })
117
-    },
118
-    onSearch() {
119
-      getBannerList({
120
-        position: this.position,
121
-        pageNum: this.currentPage,
122
-        pageSize: this.pageSize
123
-      }).then((res) => {
124
-        this.tableData = res.data.records
125
-        this.pageSize = res.data.size
126
-        this.Total = res.data.total
127
-      })
128
-    },
129
-    toggleState(val) {
130
-      if (val.state === 1) {
131
-        this.$confirm('是否将本轮播图取消发布,取消后移动端将不再显示相关信息?', '提示', {
132
-          confirmButtonText: '确定',
133
-          cancelButtonText: '取消',
134
-          type: 'warning'
135
-        }).then(() => {
136
-          UpdateBanner({ ...val, state: 0 }, val.bannerId).then(() => {
137
-            this.$message({
138
-              type: 'success',
139
-              message: '已取消发布!'
140
-            })
141
-            this.onSearch()
142
-          })
143
-        }).catch(() => {})
144
-      } else {
145
-        this.$confirm('是否将本轮播图发布,发布后移动端将显示相关信息?', '提示', {
146
-          confirmButtonText: '确定',
147
-          cancelButtonText: '取消',
148
-          type: 'warning'
149
-        }).then(() => {
150
-          UpdateBanner({ ...val, state: 1 }, val.bannerId).then(() => {
151
-            this.$message({
152
-              type: 'success',
153
-              message: '发布成功!'
154
-            })
155
-            this.onSearch()
156
-          })
157
-        }).catch(() => {})
158
-      }
159
-    },
160
-    onReset() {
161
-      this.position = undefined
162
-      this.currentPage = 1
163
-      this.pageSize = 10
164
-      this.onSearch()
165
-    }
166
-  }
167
-}
168
-</script>
169
-<style lang="scss" scoped>
170
-</style>

+ 0
- 153
src/views/course/edit.vue Ver fichero

@@ -1,153 +0,0 @@
1
-<template>
2
-  <div>
3
-    <el-card class="box-card" style="text-align:center" shadow="never">
4
-      <h2>{{ courseId ? '修改' : '新建' }}课程</h2>
5
-      <el-form
6
-        ref="courseForm"
7
-        :model="courseForm"
8
-        :rules="rules"
9
-        label-width="10vw"
10
-        style="width:50%;margin:auto"
11
-        class="demo-courseForm"
12
-      >
13
-        <el-form-item label="课程名" prop="title">
14
-          <el-input v-model="courseForm.title" />
15
-        </el-form-item>
16
-        <el-form-item label="课程简介" prop="subTitle">
17
-          <el-input v-model="courseForm.subTitle" />
18
-        </el-form-item>
19
-        <el-form-item label="封面图" prop="thumb">
20
-          <upload-image
21
-            style="float:left"
22
-            :icon="courseForm.thumb"
23
-            @handleChange="handleThumbChange"
24
-            @handleDeleteIcon="handleThumbDelete"
25
-          />
26
-        </el-form-item>
27
-        <el-form-item label="课程内容" prop="content">
28
-          <upload-image
29
-            style="float:left"
30
-            :icon="courseForm.content"
31
-            @handleChange="handleChange"
32
-            @handleDeleteIcon="handleDeleteIcon"
33
-          />
34
-        </el-form-item>
35
-        <el-form-item label="开始时间" prop="startDate">
36
-          <el-date-picker
37
-            v-model="courseForm.startDate"
38
-            format="yyyy-MM-dd HH:mm"
39
-            type="datetime"
40
-            placeholder="选择日期时间"
41
-            style="width:100%"
42
-          />
43
-        </el-form-item>
44
-        <el-form-item label="结束时间" prop="endDate">
45
-          <el-date-picker
46
-            v-model="courseForm.endDate"
47
-            format="yyyy-MM-dd HH:mm"
48
-            type="datetime"
49
-            style="width:100%"
50
-            placeholder="选择日期时间"
51
-          />
52
-        </el-form-item>
53
-        <el-form-item label-width="0">
54
-          <el-button
55
-            type="primary"
56
-            @click="submitForm('courseForm')"
57
-          >{{ !courseId?'新建课程':'修改课程' }}</el-button>
58
-          <el-button @click="$router.go(-1)">返回</el-button>
59
-        </el-form-item>
60
-      </el-form>
61
-    </el-card>
62
-  </div>
63
-</template>
64
-
65
-<script>
66
-import { saveCourse, getCourseDetail, UpdateCourse } from '@/api/course'
67
-import UploadImage from '@/components/UploadImage/index.vue'
68
-
69
-export default {
70
-  components: {
71
-    UploadImage
72
-  },
73
-  data() {
74
-    return {
75
-      courseId: '',
76
-      courseForm: {
77
-        title: undefined,
78
-        subTitle: undefined,
79
-        thumb: undefined,
80
-        content: undefined,
81
-        startDate: undefined,
82
-        endDate: undefined
83
-      },
84
-      rules: {
85
-        title: [{ required: true, message: '请输入课程名称', trigger: 'blur' }],
86
-        subTitle: [{ required: true, message: '请输入课程简介', trigger: 'blur' }],
87
-        thumb: [{ required: true, message: '请上传封面图(上传成功右上角有沟否则请删除图片重新上传)', trigger: 'blur' }],
88
-        content: [{ required: true, message: '请输入课程内容长图(上传成功右上角有沟否则请删除图片重新上传)', trigger: 'blur' }],
89
-        startDate: [{ required: true, message: '请输入课程开始时间', trigger: 'blur' }],
90
-        endDate: [{ required: true, message: '请输入课程结束时间', trigger: 'blur' }]
91
-      }
92
-    }
93
-  },
94
-  mounted() {
95
-    if (this.$route?.query.courseId) {
96
-      this.courseId = this.$route.query.courseId
97
-      getCourseDetail(this.courseId)
98
-        .then((res) => {
99
-          this.courseForm = res.data
100
-        })
101
-        .catch((e) => {})
102
-    }
103
-  },
104
-  methods: {
105
-    handleThumbChange(val) {
106
-      this.courseForm.thumb = val
107
-    },
108
-    handleThumbDelete() {
109
-      this.courseForm.thumb = undefined
110
-    },
111
-    handleChange(val) {
112
-      this.courseForm.content = val
113
-    },
114
-    handleDeleteIcon() {
115
-      this.courseForm.content = undefined
116
-    },
117
-    submitForm(formName) {
118
-      this.$refs[formName].validate((valid) => {
119
-        if (valid) {
120
-          if (this.courseForm.startDate > this.courseForm.endDate) {
121
-            this.$message.success('结束时间不能小于开始时间')
122
-          } else if (this.courseId) {
123
-            UpdateCourse(this.courseForm, this.courseId)
124
-              .then((res) => {
125
-                this.$message.success('修改成功')
126
-                this.$router.go(-1)
127
-              })
128
-              .catch((e) => {})
129
-          } else {
130
-            saveCourse(this.courseForm)
131
-              .then((e) => {
132
-                this.$message.success('保存成功')
133
-                this.$router.go(-1)
134
-              })
135
-              .catch((e) => {})
136
-          }
137
-        } else {
138
-          return false
139
-        }
140
-      })
141
-    }
142
-  }
143
-}
144
-</script>
145
-
146
-<style scoped >
147
-.demo-courseForm {
148
-  margin-top: 1em;
149
-}
150
-</style>
151
-
152
-<style lang="scss" scoped>
153
-</style>

+ 0
- 186
src/views/course/index.vue Ver fichero

@@ -1,186 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never">
4
-      课程名称:
5
-      <el-input v-model="title" style="width: 200px; margin-right: 20px" />
6
-      开课时间:<el-date-picker
7
-        v-model="daterange"
8
-        type="daterange"
9
-        range-separator="至"
10
-        start-placeholder="开始日期"
11
-        end-placeholder="结束日期"
12
-        value-format="yyyy-MM-dd"
13
-        style="margin-right: 20px"
14
-        @change="dateChange"
15
-      />
16
-      <div style="float:right">
17
-        <el-button type="primary" @click="onSearch">查询</el-button>
18
-        <el-button @click="onReset">重置</el-button>
19
-        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建课程</el-button>
20
-      </div>
21
-    </el-card>
22
-    <el-table stripe :data="tableData" border style="width: 100%">
23
-      <el-table-column prop="title" label="课程名" />
24
-      <el-table-column prop="subTitle" label="课程简介" />
25
-      <el-table-column prop="startDate" label="开始时间">
26
-        <template slot-scope="scope">{{ formate(scope.row.startDate) }}</template>
27
-      </el-table-column>
28
-      <el-table-column prop="endDate" label="结束时间">
29
-        <template slot-scope="scope">{{ formate(scope.row.endDate) }}</template>
30
-      </el-table-column>
31
-      <el-table-column prop="state" label="状态" width="100">
32
-        <template slot-scope="scope">
33
-          {{ scope.row.state === 1 ? '发布' : '未发布' }}
34
-        </template>
35
-      </el-table-column>
36
-      <el-table-column align="center" label="操作" min-width="100" width="280">
37
-        <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">
40
-            <router-link
41
-              :to="{path:'course/edit',query: { courseId: scope.row.courseId }}"
42
-            >编辑</router-link>
43
-          </el-link>
44
-          <el-popconfirm
45
-            icon="el-icon-info"
46
-            icon-color="red"
47
-            title="确定要删除该课程吗?"
48
-            @onConfirm="handleDelete(scope.row)"
49
-          >
50
-            <el-link slot="reference" :underline="false" type="danger">删除</el-link>
51
-          </el-popconfirm>
52
-        </template>
53
-      </el-table-column>
54
-    </el-table>
55
-    <el-pagination
56
-      v-show="Total!==0"
57
-      style="float:right; margin:20px 0"
58
-      :total="Total"
59
-      :current-page="currentPage"
60
-      :page-size="pageSize"
61
-      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
62
-      layout="total, prev, pager, next, sizes"
63
-      @size-change="handleSizeChange"
64
-      @current-change="handleCurrentChange"
65
-    />
66
-  </div>
67
-</template>
68
-<script>
69
-import { getCourseList, deleteCourse, UpdateCourse } from '@/api/course'
70
-import dayjs from 'dayjs'
71
-export default {
72
-  data() {
73
-    return {
74
-      title: undefined,
75
-      appName: undefined,
76
-      daterange: undefined,
77
-      tableData: [],
78
-      endDate: undefined,
79
-      startDate: undefined,
80
-      //
81
-      pageSize: 10,
82
-      currentPage: 1,
83
-      Total: 0 // 条目总数
84
-    }
85
-  },
86
-  mounted() {
87
-    this.onSearch()
88
-  },
89
-  methods: {
90
-    formate(val) {
91
-      return dayjs(val).add(8, 'hour').format('YYYY-MM-DD HH:mm')
92
-    },
93
-    // 改变每页显示条数
94
-    handleSizeChange(val) {
95
-      this.pageSize = val
96
-      this.changePagination()
97
-    },
98
-    // 改变页码
99
-    handleCurrentChange(val) {
100
-      this.currentPage = val
101
-      this.changePagination()
102
-    },
103
-    // 改变分页组件重新查询数据
104
-    changePagination() {
105
-      getCourseList({
106
-        title: this.title,
107
-        startDate: this.startDate,
108
-        endDate: this.endDate,
109
-        pageNum: this.currentPage,
110
-        pageSize: this.pageSize
111
-      }).then((res) => {
112
-        this.tableData = res.data.records
113
-      })
114
-    },
115
-
116
-    handleAdd() {
117
-      this.$router.push({ path: 'course/edit' })
118
-    },
119
-
120
-    handleDelete(row) {
121
-      deleteCourse(row.courseId).then(() => {
122
-        this.onSearch()
123
-      })
124
-    },
125
-    dateChange(val) {
126
-      this.startDate = this.daterange[0]
127
-      this.endDate = this.daterange[1]
128
-    },
129
-    onSearch() {
130
-      getCourseList({
131
-        title: this.title,
132
-        startDate: this.startDate,
133
-        endDate: this.endDate,
134
-        pageNum: this.currentPage,
135
-        pageSize: this.pageSize
136
-      }).then((res) => {
137
-        this.tableData = res.data.records
138
-        this.pageSize = res.data.size
139
-        this.Total = res.data.total
140
-      })
141
-    },
142
-    toggleState(val) {
143
-      if (val.state === 1) {
144
-        this.$confirm('是否将本课程取消发布,取消后移动端将不再显示相关信息?', '提示', {
145
-          confirmButtonText: '确定',
146
-          cancelButtonText: '取消',
147
-          type: 'warning'
148
-        }).then(() => {
149
-          UpdateCourse({ ...val, state: 0 }, val.courseId).then(() => {
150
-            this.$message({
151
-              type: 'success',
152
-              message: '已取消发布!'
153
-            })
154
-            this.onSearch()
155
-          })
156
-        }).catch(() => {})
157
-      } else {
158
-        this.$confirm('是否将本课程发布,发布后移动端将显示相关信息?', '提示', {
159
-          confirmButtonText: '确定',
160
-          cancelButtonText: '取消',
161
-          type: 'warning'
162
-        }).then(() => {
163
-          UpdateCourse({ ...val, state: 1 }, val.courseId).then(() => {
164
-            this.$message({
165
-              type: 'success',
166
-              message: '发布成功!'
167
-            })
168
-            this.onSearch()
169
-          })
170
-        }).catch(() => {})
171
-      }
172
-    },
173
-    onReset() {
174
-      this.title = undefined
175
-      this.daterange = undefined
176
-      this.startDate = undefined
177
-      this.endDate = undefined
178
-      this.currentPage = 1
179
-      this.pageSize = 10
180
-      this.onSearch()
181
-    }
182
-  }
183
-}
184
-</script>
185
-<style lang="scss" scoped>
186
-</style>

+ 1
- 1
src/views/login/index.vue Ver fichero

@@ -9,7 +9,7 @@
9 9
       label-position="left"
10 10
     >
11 11
       <div class="title-container">
12
-        <h3 class="title">电网教培信息管理系统</h3>
12
+        <h3 class="title">COLMO后台管理系统</h3>
13 13
       </div>
14 14
 
15 15
       <el-form-item prop="userName">

+ 0
- 219
src/views/photoWall/index.vue Ver fichero

@@ -1,219 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never">
4
-      <div class="text item">
5
-        <upload-image-list
6
-          v-show="packId"
7
-          style="float: right;line-height:48px"
8
-          @handleChange="handleChange"
9
-        />
10
-        <el-row style="padding-top: 20px">
11
-          <el-col :span="18">
12
-            <div v-show="packId" style="padding:16px">
13
-              <p style="margin-left:8px">{{ currentPack }}</p>
14
-              <div v-for="item in images" :key="item.attchId" style="display:inline-block;position:relative;margin:8px" @click="deletePhoto(item)">
15
-                <el-image :src="item.url" class="photoWall" style="width:160px;" />
16
-                <div class="mask"><el-image class="maskImg" :src="deleteImg" /></div>
17
-              </div>
18
-            </div>
19
-          </el-col>
20
-          <el-col :span="6">
21
-            <el-collapse v-model="activeNames" accordion>
22
-              <el-collapse-item title="照片墙分组" name="1">
23
-                <el-tag
24
-                  v-for="tag in dynamicTags"
25
-                  :key="tag"
26
-                  type="info"
27
-                  style="margin-bottom:8px"
28
-                  closable
29
-                  :disable-transitions="false"
30
-                  @close="handleClose(tag)"
31
-                  @click="handleCurrent(tag)"
32
-                >
33
-                  {{ tag }}
34
-                </el-tag>
35
-                <el-input
36
-                  v-if="inputVisible"
37
-                  ref="saveTagInput"
38
-                  v-model="inputValue"
39
-                  class="input-new-tag"
40
-                  size="small"
41
-                  style="width:200px"
42
-                  @keyup.enter.native="handleInputConfirm"
43
-                  @blur="handleInputConfirm"
44
-                />
45
-                <el-button
46
-                  v-else
47
-                  class="button-new-tag"
48
-                  size="small"
49
-                  @click="showInput"
50
-                >新建照片墙分组</el-button>
51
-              </el-collapse-item>
52
-            </el-collapse>
53
-          </el-col>
54
-        </el-row>
55
-      </div>
56
-    </el-card>
57
-  </div>
58
-</template>
59
-<script>
60
-import { getAttchPackList, saveAttchPack, deleteAttchPack } from '@/api/attchPack'
61
-import { getAttachmentList, saveAttachment, deleteAttachment } from '@/api/attachment'
62
-import UploadImageList from '@/components/UploadImageList/index.vue'
63
-
64
-export default {
65
-  components: {
66
-    UploadImageList
67
-  },
68
-  data() {
69
-    return {
70
-      deleteImg: require('../../assets/delete.png'),
71
-      activeNames: ['1'],
72
-      // 图片数据源
73
-      attachList: [],
74
-      // 分组名数组 字符串数组
75
-      dynamicTags: [],
76
-      inputVisible: false,
77
-      inputValue: undefined,
78
-      currentPack: undefined,
79
-      // 分组数据源(对象数组)包含全部数据
80
-      attchPackList: [],
81
-      packId: undefined,
82
-      images: []
83
-    }
84
-  },
85
-  watch: {
86
-    packId() {
87
-      if (this.packId) {
88
-        getAttachmentList({ attchType: 'image', packId: this.packId, pageSize: 999 }).then(res => {
89
-          this.images = res.data.records
90
-        })
91
-      }
92
-    }
93
-  },
94
-  mounted() {
95
-    this.onsearch()
96
-  },
97
-  methods: {
98
-    // 图片上传成功会执行一次 每张图片都会执行一次
99
-    handleChange(val) {
100
-      saveAttachment({ attchType: 'image', packId: this.packId, packName: this.currentPack, url: val }).then(() => {
101
-        getAttachmentList({ attchType: 'image', packId: this.packId, pageSize: 999 }).then(res => {
102
-          this.images = res.data.records
103
-        })
104
-      })
105
-    },
106
-    deletePhoto(val) {
107
-      deleteAttachment(val.attchId).then(() => {
108
-        this.$message('删除照片成功')
109
-        getAttachmentList({ attchType: 'image', packId: this.packId, pageSize: 999 }).then(res => {
110
-          this.images = res.data.records
111
-        })
112
-      })
113
-    },
114
-    onsearch() {
115
-      this.dynamicTags = []
116
-      getAttchPackList().then((res) => {
117
-        this.attchPackList = res.data.records
118
-        this.attchPackList.map(item => {
119
-          this.dynamicTags.push(item.name)
120
-        })
121
-        this.packId = res.data.records[0].packId
122
-      })
123
-    },
124
-    // 删除分组
125
-    handleClose(tag) {
126
-      this.$confirm('此操作将永久删除该分组, 是否继续?', '提示', {
127
-        confirmButtonText: '确定',
128
-        cancelButtonText: '取消',
129
-        type: 'warning'
130
-      }).then(() => {
131
-        var id
132
-        this.attchPackList.map(item => {
133
-          if (item.name === tag) {
134
-            id = item.packId
135
-          }
136
-        })
137
-        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
138
-        deleteAttchPack(id).then(() => {
139
-          this.onsearch()
140
-          this.packId = undefined
141
-          this.$message('删除成功')
142
-        })
143
-      }).catch(() => { })
144
-    },
145
-
146
-    showInput() {
147
-      this.inputVisible = true
148
-      this.$nextTick(_ => {
149
-        this.$refs.saveTagInput.$refs.input.focus()
150
-      })
151
-    },
152
-    // 添加分组
153
-    handleInputConfirm() {
154
-      const inputValue = this.inputValue
155
-      if (inputValue) {
156
-        saveAttchPack({ name: inputValue }).then(() => {
157
-          this.$message({
158
-            type: 'success',
159
-            message: '添加成功'
160
-          })
161
-          this.onsearch()
162
-        })
163
-      }
164
-      this.inputVisible = false
165
-      this.inputValue = ''
166
-    },
167
-    // 展开照片墙
168
-    handleCurrent(tag) {
169
-      this.currentPack = tag
170
-      this.attchPackList.map(item => {
171
-        if (item.name === tag) {
172
-          this.packId = item.packId
173
-        }
174
-      })
175
-    }
176
-  }
177
-}
178
-</script>
179
-<style lang="scss" scoped>
180
-.el-tag + .el-tag {
181
-  margin-left: 10px;
182
-}
183
-.button-new-tag {
184
-  margin-left: 10px;
185
-  height: 32px;
186
-  line-height: 30px;
187
-  padding-top: 0;
188
-  padding-bottom: 0;
189
-}
190
-.input-new-tag {
191
-  width: 90px;
192
-  margin-left: 10px;
193
-  vertical-align: bottom;
194
-}
195
-.mask {
196
-  position: absolute;
197
-  width: 100%;
198
-  height: 100%;
199
-  top: 0;
200
-  left: 0;
201
-
202
-  &:hover {
203
-    background-color: rgba(0,0,0,.2);
204
-  }
205
-  &:hover .maskImg{
206
-    opacity:1
207
-  }
208
-  .maskImg {
209
-    position:absolute;
210
-    left:calc( 50% - 8px );
211
-    top:calc( 50% - 8px );
212
-    width:16px;
213
-    opacity: 0;
214
-  }
215
-}
216
-// .photoWall:hover {
217
-//   opacity: 0.4;
218
-// }
219
-</style>

+ 0
- 127
src/views/questionnaire/edit.vue Ver fichero

@@ -1,127 +0,0 @@
1
-<template>
2
-  <div class="body_edit">
3
-    <el-tabs v-model="activeName">
4
-      <el-tab-pane label="问卷详情" name="questionnaire">
5
-        <el-form ref="form" :rules="rules" class="questionnaireForm" :model="questionnaireForm" label-width="100px">
6
-          <el-form-item label="问卷名称:" prop="name">
7
-            <el-input v-model="questionnaireForm.name" />
8
-          </el-form-item>
9
-          <el-form-item class="editBottomItem">
10
-            <el-button type="primary" @click="onSubmit('form')">保存</el-button>
11
-            <el-button @click="onCancel">取消</el-button>
12
-          </el-form-item>
13
-        </el-form>
14
-      </el-tab-pane>
15
-      <el-tab-pane label="问卷题库" name="question" :disabled="queId ? false : true">
16
-        <el-row :gutter="20" style="padding-top: 20px">
17
-          <el-col :span="12">
18
-            <Question
19
-              v-if="queId"
20
-              ref="Question"
21
-              :que-id="queId"
22
-              @handleAddQuestion="questionId = ''"
23
-              @handleCloseQuestion="questionId = ''"
24
-              @handleEditQuestion="handleEditQuestion"
25
-              @setQuestionTotal="setQuestionTotal"
26
-            />
27
-          </el-col>
28
-          <el-col :span="12">
29
-            <QuestionEdit
30
-              v-if="queId"
31
-              :total="total"
32
-              :question-id="questionId"
33
-              :que-id="queId"
34
-              @handleRefreshQuestion="handleRefreshQuestion"
35
-              @handleEditQuestion="handleEditQuestion"
36
-            />
37
-          </el-col>
38
-        </el-row>
39
-      </el-tab-pane>
40
-    </el-tabs>
41
-  </div>
42
-</template>
43
-<script>
44
-import { saveQuestionnaire, UpdateQuestionnaire, getQuestionnaireDetail } from '@/api/questionnaire'
45
-import Question from '@/components/Question/index.vue'
46
-import QuestionEdit from '@/components/Question/edit.vue'
47
-export default {
48
-  components: {
49
-    Question,
50
-    QuestionEdit
51
-  },
52
-  data() {
53
-    return {
54
-      rules: {
55
-        name: [{ required: true, message: '请输入问卷名称', trigger: 'blur' }]
56
-      },
57
-      questionnaireForm: {
58
-        name: undefined
59
-      },
60
-      queId: undefined,
61
-      activeName: 'questionnaire',
62
-      questionId: '',
63
-      total: 0
64
-    }
65
-  },
66
-  watch: {
67
-    '$route.query.id': {
68
-      handler(val) {
69
-        if (val) {
70
-          // 有值代表是编辑状态 查询详情  没有值就是新增
71
-          this.queId = val
72
-          getQuestionnaireDetail(val).then((res) => {
73
-            this.questionnaireForm = res.data
74
-          })
75
-        }
76
-      },
77
-      immediate: true // 页面加载时就启动
78
-    }
79
-  },
80
-  methods: {
81
-    onCancel() {
82
-      this.$router.go(-1)
83
-    },
84
-    onSubmit(form) {
85
-      this.$refs[form].validate((valid) => {
86
-        if (valid) {
87
-          if (this.queId) {
88
-            const data = { ...this.questionnaireForm }
89
-            UpdateQuestionnaire(data, this.queId).then((res) => {
90
-              this.$message('修改成功')
91
-              this.$router.go(-1)
92
-            })
93
-          } else {
94
-            saveQuestionnaire(this.questionnaireForm).then((res) => {
95
-              this.$message('保存成功')
96
-              this.$router.replace({
97
-                name: 'questionnaireEdit',
98
-                query: { id: res.data.queId }
99
-              })
100
-            })
101
-          }
102
-        } else {
103
-          return false
104
-        }
105
-      })
106
-    },
107
-    handleEditQuestion(val) {
108
-      this.questionId = val
109
-    },
110
-    handleRefreshQuestion() {
111
-      this.$refs.Question.onSearch()
112
-    },
113
-    setQuestionTotal(val) {
114
-      this.total = Number(val)
115
-    }
116
-  }
117
-}
118
-</script>
119
-<style scoped>
120
-.questionnaireForm {
121
-  width: 700px;
122
-}
123
-.editBottomItem > div {
124
-  margin: 0 !important;
125
-  text-align: center;
126
-}
127
-</style>

+ 0
- 118
src/views/questionnaire/index.vue Ver fichero

@@ -1,118 +0,0 @@
1
-<template>
2
-  <div class="body" style="font-size:14px">
3
-    <el-card class="box-card" shadow="never">
4
-      问卷名称:
5
-      <el-input v-model="name" style="width: 200px; margin-right: 20px" />
6
-      <div style="float:right">
7
-        <el-button type="primary" @click="onSearch">查询</el-button>
8
-        <el-button @click="onReset">重置</el-button>
9
-        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">添加问卷</el-button>
10
-      </div>
11
-    </el-card>
12
-    <el-table stripe :data="tableData" border style="width: 100%">
13
-      <el-table-column prop="name" label="问卷名" />
14
-      <el-table-column prop="createDate" label="创建时间">
15
-        <template slot-scope="scope">
16
-          {{
17
-            scope.row.createDate.substr(0, 10)
18
-          }}
19
-        </template>
20
-      </el-table-column>
21
-      <el-table-column fixed="right" label="操作">
22
-        <template slot-scope="scope">
23
-          <el-link :underline="false" style="margin-right:1em" type="primary">
24
-            <router-link
25
-              :to="{name: 'questionnaireEdit', query: { id: scope.row.queId }}"
26
-            >编辑</router-link>
27
-          </el-link>
28
-          <el-popconfirm
29
-            icon="el-icon-info"
30
-            icon-color="red"
31
-            title="确定删除这个问卷吗?"
32
-            @onConfirm="handleDelete(scope.row)"
33
-          >
34
-            <el-button slot="reference" type="text" style="color:red">删除</el-button>
35
-          </el-popconfirm>
36
-        </template>
37
-      </el-table-column>
38
-    </el-table>
39
-    <div v-show="false" id="qrcode" ref="qrcode" />
40
-    <el-pagination
41
-      v-show="Total!==0"
42
-      style="float:right; margin:20px 0"
43
-      :total="Total"
44
-      :current-page="currentPage"
45
-      :page-sizes="[4, 10, 20, 50]"
46
-      :page-size="pageSize"
47
-      layout="total, prev, pager, next, sizes"
48
-      @size-change="handleSizeChange"
49
-      @current-change="handleCurrentChange"
50
-    />
51
-  </div>
52
-</template>
53
-<script>
54
-import { getQuestionnaireList, deleteQuestionnaire } from '@/api/questionnaire'
55
-export default {
56
-  data() {
57
-    return {
58
-      name: undefined,
59
-      tableData: [],
60
-      //
61
-      pageSize: 10,
62
-      currentPage: 1,
63
-      Total: 0 // 条目总数
64
-    }
65
-  },
66
-  mounted() {
67
-    this.onSearch()
68
-  },
69
-  methods: {
70
-    // 改变每页显示条数
71
-    handleSizeChange(val) {
72
-      this.pageSize = val
73
-      this.changePagination()
74
-    },
75
-    // 改变页码
76
-    handleCurrentChange(val) {
77
-      this.currentPage = val
78
-      this.changePagination()
79
-    },
80
-    // 改变分页组件重新查询数据
81
-    changePagination() {
82
-      getQuestionnaireList({
83
-        name: this.name,
84
-        pageNum: this.currentPage,
85
-        pageSize: this.pageSize
86
-      }).then((res) => {
87
-        this.tableData = res.data.records
88
-      })
89
-    },
90
-    handleAdd() {
91
-      this.$router.push({ name: 'questionnaireEdit' })
92
-    },
93
-    handleDelete(row) {
94
-      deleteQuestionnaire(row.queId).then(() => {
95
-        this.onSearch()
96
-      })
97
-    },
98
-    onSearch() {
99
-      getQuestionnaireList({
100
-        name: this.name,
101
-        pageSize: this.pageSize
102
-      }).then((res) => {
103
-        this.tableData = res.data.records
104
-        this.Total = res.data.total
105
-        this.pageSize = res.data.size
106
-      })
107
-    },
108
-    onReset() {
109
-      this.name = undefined
110
-      this.currentPage = 1
111
-      this.pageSize = 10
112
-      this.onSearch()
113
-    }
114
-  }
115
-}
116
-</script>
117
-<style>
118
-</style>

src/views/students/schoolTerm/edit.vue → src/views/register/detail.vue Ver fichero


+ 345
- 0
src/views/register/list.vue Ver fichero

@@ -0,0 +1,345 @@
1
+<template>
2
+  <div class="body">
3
+    <el-card class="box-card" shadow="never">
4
+      姓名:
5
+      <el-input v-model="name" style="width: 200px; margin-right: 20px" />
6
+      手机号:<el-input v-model="phone" style="width: 200px; margin-right: 20px" />
7
+      报名地区:
8
+
9
+      <el-cascader
10
+        v-model="area2"
11
+        :options="options"
12
+        @change="handleChange"
13
+      />
14
+
15
+      <el-input v-model="area" style="width: 200px; margin-right: 20px" />
16
+      签到时间:<el-date-picker
17
+        v-model="daterange"
18
+        type="daterange"
19
+        range-separator="至"
20
+        start-placeholder="开始日期"
21
+        end-placeholder="结束日期"
22
+        value-format="yyyy-MM-dd"
23
+        style="margin-right: 20px"
24
+        @change="dateChange"
25
+      />
26
+      <div style="float:right">
27
+        <el-button type="primary" @click="onSearch">查询</el-button>
28
+        <el-button @click="onReset">重置</el-button>
29
+      </div>
30
+    </el-card>
31
+    <el-table stripe :data="tableData" border style="width: 100%">
32
+      <el-table-column prop="name" label="姓名" />
33
+      <el-table-column prop="phone" label="手机号" />
34
+      <el-table-column prop="areaName" label="所在地" />
35
+      <el-table-column prop="createDate" label="报名时间">
36
+        <template slot-scope="scope">{{ formate(scope.row.createDate) }}</template>
37
+      </el-table-column>
38
+      <el-table-column align="center" label="操作" min-width="100" width="280">
39
+        <template slot-scope="scope">
40
+          <el-link :underline="false" style="margin-right:1em" type="primary">
41
+            <router-link
42
+              :to="{path:'register/detail',query: { regId: scope.row.regId }}"
43
+            >详情</router-link>
44
+          </el-link>
45
+        </template>
46
+      </el-table-column>
47
+    </el-table>
48
+    <el-pagination
49
+      v-show="Total!==0"
50
+      style="float:right; margin:20px 0"
51
+      :total="Total"
52
+      :current-page="currentPage"
53
+      :page-size="pageSize"
54
+      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
55
+      layout="total, prev, pager, next, sizes"
56
+      @size-change="handleSizeChange"
57
+      @current-change="handleCurrentChange"
58
+    />
59
+  </div>
60
+</template>
61
+<script>
62
+import { getRegisterList } from '@/api/register'
63
+import { getCityList } from '@/api/city'
64
+
65
+import dayjs from 'dayjs'
66
+export default {
67
+  data() {
68
+    return {
69
+      area2: undefined,
70
+
71
+      options: [
72
+        {
73
+          value: 'zhinan',
74
+          label: '指南',
75
+          children: [{
76
+            value: 'shejiyuanze',
77
+            label: '设计原则',
78
+            children: [{
79
+              value: 'yizhi',
80
+              label: '一致'
81
+            }, {
82
+              value: 'fankui',
83
+              label: '反馈'
84
+            }, {
85
+              value: 'xiaolv',
86
+              label: '效率'
87
+            }, {
88
+              value: 'kekong',
89
+              label: '可控'
90
+            }]
91
+          }, {
92
+            value: 'daohang',
93
+            label: '导航',
94
+            children: [{
95
+              value: 'cexiangdaohang',
96
+              label: '侧向导航'
97
+            }, {
98
+              value: 'dingbudaohang',
99
+              label: '顶部导航'
100
+            }]
101
+          }]
102
+        }, {
103
+          value: 'zujian',
104
+          label: '组件',
105
+          children: [{
106
+            value: 'basic',
107
+            label: 'Basic',
108
+            children: [{
109
+              value: 'layout',
110
+              label: 'Layout 布局'
111
+            }, {
112
+              value: 'color',
113
+              label: 'Color 色彩'
114
+            }, {
115
+              value: 'typography',
116
+              label: 'Typography 字体'
117
+            }, {
118
+              value: 'icon',
119
+              label: 'Icon 图标'
120
+            }, {
121
+              value: 'button',
122
+              label: 'Button 按钮'
123
+            }]
124
+          }, {
125
+            value: 'form',
126
+            label: 'Form',
127
+            children: [{
128
+              value: 'radio',
129
+              label: 'Radio 单选框'
130
+            }, {
131
+              value: 'checkbox',
132
+              label: 'Checkbox 多选框'
133
+            }, {
134
+              value: 'input',
135
+              label: 'Input 输入框'
136
+            }, {
137
+              value: 'input-number',
138
+              label: 'InputNumber 计数器'
139
+            }, {
140
+              value: 'select',
141
+              label: 'Select 选择器'
142
+            }, {
143
+              value: 'cascader',
144
+              label: 'Cascader 级联选择器'
145
+            }, {
146
+              value: 'switch',
147
+              label: 'Switch 开关'
148
+            }, {
149
+              value: 'slider',
150
+              label: 'Slider 滑块'
151
+            }, {
152
+              value: 'time-picker',
153
+              label: 'TimePicker 时间选择器'
154
+            }, {
155
+              value: 'date-picker',
156
+              label: 'DatePicker 日期选择器'
157
+            }, {
158
+              value: 'datetime-picker',
159
+              label: 'DateTimePicker 日期时间选择器'
160
+            }, {
161
+              value: 'upload',
162
+              label: 'Upload 上传'
163
+            }, {
164
+              value: 'rate',
165
+              label: 'Rate 评分'
166
+            }, {
167
+              value: 'form',
168
+              label: 'Form 表单'
169
+            }]
170
+          }, {
171
+            value: 'data',
172
+            label: 'Data',
173
+            children: [{
174
+              value: 'table',
175
+              label: 'Table 表格'
176
+            }, {
177
+              value: 'tag',
178
+              label: 'Tag 标签'
179
+            }, {
180
+              value: 'progress',
181
+              label: 'Progress 进度条'
182
+            }, {
183
+              value: 'tree',
184
+              label: 'Tree 树形控件'
185
+            }, {
186
+              value: 'pagination',
187
+              label: 'Pagination 分页'
188
+            }, {
189
+              value: 'badge',
190
+              label: 'Badge 标记'
191
+            }]
192
+          }, {
193
+            value: 'notice',
194
+            label: 'Notice',
195
+            children: [{
196
+              value: 'alert',
197
+              label: 'Alert 警告'
198
+            }, {
199
+              value: 'loading',
200
+              label: 'Loading 加载'
201
+            }, {
202
+              value: 'message',
203
+              label: 'Message 消息提示'
204
+            }, {
205
+              value: 'message-box',
206
+              label: 'MessageBox 弹框'
207
+            }, {
208
+              value: 'notification',
209
+              label: 'Notification 通知'
210
+            }]
211
+          }, {
212
+            value: 'navigation',
213
+            label: 'Navigation',
214
+            children: [{
215
+              value: 'menu',
216
+              label: 'NavMenu 导航菜单'
217
+            }, {
218
+              value: 'tabs',
219
+              label: 'Tabs 标签页'
220
+            }, {
221
+              value: 'breadcrumb',
222
+              label: 'Breadcrumb 面包屑'
223
+            }, {
224
+              value: 'dropdown',
225
+              label: 'Dropdown 下拉菜单'
226
+            }, {
227
+              value: 'steps',
228
+              label: 'Steps 步骤条'
229
+            }]
230
+          }, {
231
+            value: 'others',
232
+            label: 'Others',
233
+            children: [{
234
+              value: 'dialog',
235
+              label: 'Dialog 对话框'
236
+            }, {
237
+              value: 'tooltip',
238
+              label: 'Tooltip 文字提示'
239
+            }, {
240
+              value: 'popover',
241
+              label: 'Popover 弹出框'
242
+            }, {
243
+              value: 'card',
244
+              label: 'Card 卡片'
245
+            }, {
246
+              value: 'carousel',
247
+              label: 'Carousel 走马灯'
248
+            }, {
249
+              value: 'collapse',
250
+              label: 'Collapse 折叠面板'
251
+            }]
252
+          }]
253
+        }, {
254
+          value: 'ziyuan',
255
+          label: '资源',
256
+          children: [{
257
+            value: 'axure',
258
+            label: 'Axure Components'
259
+          }, {
260
+            value: 'sketch',
261
+            label: 'Sketch Templates'
262
+          }, {
263
+            value: 'jiaohu',
264
+            label: '组件交互文档'
265
+          }]
266
+        }
267
+      ],
268
+
269
+      name: undefined,
270
+      phone: undefined,
271
+      area: undefined,
272
+      daterange: undefined,
273
+      endDate: undefined,
274
+      startDate: undefined,
275
+      tableData: [],
276
+      pageSize: 10,
277
+      currentPage: 1,
278
+      Total: 0 // 条目总数
279
+    }
280
+  },
281
+  mounted() {
282
+    this.onSearch()
283
+    getCityList(3).then((res) => {
284
+
285
+    })
286
+  },
287
+  methods: {
288
+
289
+    handleChange(value) {
290
+      console.log(value)
291
+    },
292
+
293
+    formate(val) {
294
+      return dayjs(val).format('YYYY-MM-DD HH:mm:ss')
295
+    },
296
+    // 改变每页显示条数
297
+    handleSizeChange(val) {
298
+      this.pageSize = val
299
+      this.changePagination()
300
+    },
301
+    dateChange(val) {
302
+      this.startDate = this.daterange[0]
303
+      this.endDate = this.daterange[1]
304
+    },
305
+    // 改变页码
306
+    handleCurrentChange(val) {
307
+      this.currentPage = val
308
+      this.changePagination()
309
+    },
310
+    // 改变分页组件重新查询数据
311
+    changePagination() {
312
+      getRegisterList({
313
+        name: this.name,
314
+        phone: this.phone,
315
+        area: this.area,
316
+        pageNum: this.currentPage,
317
+        pageSize: this.pageSize
318
+      }).then((res) => {
319
+        this.tableData = res.data.records
320
+      })
321
+    },
322
+    onSearch() {
323
+      getRegisterList({
324
+        name: this.name,
325
+        phone: this.phone,
326
+        area: this.area,
327
+        pageNum: this.currentPage,
328
+        pageSize: this.pageSize
329
+      }).then((res) => {
330
+        this.tableData = res.data.records
331
+        this.Total = res.data.total
332
+      })
333
+    },
334
+    onReset() {
335
+      this.name = undefined
336
+      this.phone = undefined
337
+      this.area = undefined
338
+      this.daterange = undefined
339
+      this.onSearch()
340
+    }
341
+  }
342
+}
343
+</script>
344
+<style lang="scss" scoped>
345
+</style>

+ 0
- 299
src/views/signIn/edit.vue Ver fichero

@@ -1,299 +0,0 @@
1
-<template>
2
-  <div>
3
-    <el-card class="box-card" style="text-align:center" shadow="never">
4
-      <el-row :gutter="20" style="padding-top: 20px">
5
-        <el-col :span="12">
6
-          <h2>{{ signId ? '修改' : '新建' }}签到</h2>
7
-          <el-form
8
-            ref="signForm"
9
-            :model="signForm"
10
-            :rules="rules"
11
-            label-width="7vw"
12
-            style="width:80%;margin:auto"
13
-            class="demo-signForm"
14
-          >
15
-            <el-form-item label="签到名" prop="name">
16
-              <el-input v-model="signForm.name" />
17
-            </el-form-item>
18
-            <el-form-item label="开始时间" prop="startTime">
19
-              <el-date-picker
20
-                v-model="signForm.startTime"
21
-                format="yyyy-MM-dd HH:mm"
22
-                type="datetime"
23
-                placeholder="选择日期时间"
24
-                style="width:100%"
25
-              />
26
-            </el-form-item>
27
-            <el-form-item label="结束时间" prop="endTime">
28
-              <el-date-picker
29
-                v-model="signForm.endTime"
30
-                format="yyyy-MM-dd HH:mm"
31
-                type="datetime"
32
-                style="width:100%"
33
-                placeholder="选择日期时间"
34
-              />
35
-            </el-form-item>
36
-            <el-form-item label-width="0">
37
-              <el-button
38
-                type="primary"
39
-                @click="submitForm('signForm')"
40
-              >{{ !signId?'新建签到':'修改签到' }}</el-button>
41
-              <el-button v-show="signId" type="primary" @click="downloadQrcode">下载二维码</el-button>
42
-              <el-button @click="$router.go(-1)">返回</el-button>
43
-            </el-form-item>
44
-          </el-form>
45
-          <div v-show="false" id="qrcode" ref="qrcode" />
46
-        </el-col>
47
-        <el-col :span="12">
48
-          <h2>签到池</h2>
49
-          <el-form
50
-            ref="signForm"
51
-            :model="signForm"
52
-            :rules="rules"
53
-            label-width="7vw"
54
-            style="width:80%;margin:auto"
55
-            class="demo-signForm"
56
-          >
57
-            <el-form-item label="学期">
58
-              <el-checkbox v-model="checkAllTerm" :indeterminate="isIndeterminateTerm" @change="handleCheckAllTermChange">全选</el-checkbox>
59
-              <el-checkbox-group v-model="checkedTerms" @change="handleCheckedTermsChange">
60
-                <el-checkbox v-for="item in termList" :key="item.termId" :label="item.termId">{{ item.name }}</el-checkbox>
61
-              </el-checkbox-group>
62
-            </el-form-item>
63
-            <el-form-item label="班级">
64
-              <el-checkbox v-if="classList.length!==0" v-model="checkAllClass" :indeterminate="isIndeterminateClass" @change="handleCheckAllClassChange">全选</el-checkbox>
65
-              <el-checkbox-group v-model="checkedClasss" @change="handleCheckedClasssChange">
66
-                <el-checkbox v-for="item in classList" :key="item.classId" :label="item.classId">{{ item.name }}</el-checkbox>
67
-              </el-checkbox-group>
68
-            </el-form-item>
69
-            <el-form-item label-width="0">
70
-              <el-button
71
-                type="primary"
72
-                @click="editSignClass"
73
-              >保存签到池</el-button>
74
-            </el-form-item>
75
-          </el-form>
76
-        </el-col>
77
-      </el-row>
78
-    </el-card>
79
-  </div>
80
-</template>
81
-
82
-<script>
83
-import { saveSignIn, getSignInDetail, UpdateSignIn, saveSignClass, getSignClassList } from '@/api/signIn'
84
-import { getSchoolTermList } from '@/api/schoolTerm'
85
-import { getSchoolClassList } from '@/api/schoolClass'
86
-import QRCode from 'qrcodejs2'
87
-
88
-export default {
89
-  data() {
90
-    return {
91
-      signId: '',
92
-      signForm: {
93
-        name: undefined,
94
-        startTime: undefined,
95
-        endTime: undefined
96
-      },
97
-      rules: {
98
-        name: [
99
-          { required: true, message: '请输入签到名称', trigger: 'blur' }
100
-        ],
101
-        startTime: [{ required: true, message: '请输入签到开始时间', trigger: 'blur' }],
102
-        endTime: [{ required: true, message: '请输入签到结束时间', trigger: 'blur' }]
103
-      },
104
-      allClassList: [],
105
-      classList: [],
106
-      isIndeterminateClass: false,
107
-      checkAllClass: false,
108
-      checkedClasss: [],
109
-
110
-      termList: [],
111
-      isIndeterminateTerm: false,
112
-      checkAllTerm: false,
113
-      checkedTerms: []
114
-    }
115
-  },
116
-  watch: {
117
-    checkedTerms() {
118
-      if (this.checkedTerms.length > 0) {
119
-        const finalArr = this.allClassList.filter((item) => this.checkedTerms.includes(item.termId))
120
-        this.classList = finalArr
121
-        const finalArr2 = finalArr.filter((item) => this.checkedClasss.includes(item.classId))
122
-        this.checkedClasss = []
123
-        finalArr2.map(item => {
124
-          this.checkedClasss.push(item.classId)
125
-        })
126
-      } else {
127
-        this.classList = []
128
-        this.checkedClasss = []
129
-      }
130
-    },
131
-    checkedClasss() {
132
-      if (this.checkedClasss.length === 0) {
133
-        this.isIndeterminateClass = false
134
-        this.checkAllClass = false
135
-      }
136
-    }
137
-  },
138
-  mounted() {
139
-    if (this.$route?.query.signId) {
140
-      this.signId = this.$route.query.signId
141
-      getSignInDetail(this.signId)
142
-        .then((res) => {
143
-          this.signForm = res.data
144
-        })
145
-        .catch((e) => {})
146
-    }
147
-    getSchoolTermList().then((res) => {
148
-      this.termList = res.data.records
149
-    })
150
-    getSchoolClassList().then((res) => {
151
-      this.allClassList = res.data.records
152
-    })
153
-    getSignClassList(this.signId).then(res => {
154
-      var thisList = res.data
155
-      if (thisList) {
156
-        thisList.map(item => {
157
-          this.checkedClasss.push(item.classId)
158
-          this.checkedTerms.push(item.termId)
159
-        })
160
-      }
161
-    })
162
-  },
163
-  methods: {
164
-    // 学期
165
-    handleCheckAllTermChange(val) {
166
-      var list = []
167
-      this.termList.map(item => {
168
-        list.push(item.termId)
169
-      })
170
-      this.checkedTerms = val ? list : []
171
-      this.isIndeterminateTerm = false
172
-    },
173
-    handleCheckedTermsChange(value) {
174
-      const checkedCount = value.length
175
-      this.checkAllTerm = checkedCount === this.termList.length
176
-      this.isIndeterminateTerm = checkedCount > 0 && checkedCount < this.termList.length
177
-    },
178
-    // 班级
179
-    handleCheckAllClassChange(val) {
180
-      var list = []
181
-      this.classList.map(item => {
182
-        list.push(item.classId)
183
-      })
184
-      this.checkedClasss = val ? list : []
185
-      this.isIndeterminateClass = false
186
-    },
187
-    handleCheckedClasssChange(value) {
188
-      const checkedCount = value.length
189
-      this.checkAllClass = checkedCount === this.classList.length
190
-      this.isIndeterminateClass = checkedCount > 0 && checkedCount < this.classList.length
191
-    },
192
-    // 修改签到池
193
-    editSignClass() {
194
-      var submitList = []
195
-      var serialNo = 0
196
-      this.classList.map((item, index) => {
197
-        if (this.checkedClasss.indexOf(item.classId) !== -1) {
198
-          submitList.push({ classId: item.classId, termId: item.termId, signId: this.signId, serialNo: serialNo++ })
199
-        }
200
-      })
201
-      saveSignClass(submitList, this.signId).then(() => {
202
-        this.$message('签到池修改成功')
203
-      })
204
-    },
205
-    submitForm(formName) {
206
-      this.$refs[formName].validate((valid) => {
207
-        if (valid) {
208
-          if (this.signForm.startTime > this.signForm.endTime) {
209
-            this.$message.success('结束时间不能小于开始时间')
210
-          } else if (this.signId) {
211
-            UpdateSignIn(this.signForm, this.signId)
212
-              .then((res) => {
213
-                this.$message.success('修改成功')
214
-                this.$router.go(-1)
215
-              })
216
-              .catch((e) => {})
217
-          } else {
218
-            saveSignIn(this.signForm)
219
-              .then((e) => {
220
-                this.$message.success('保存成功')
221
-                this.$router.go(-1)
222
-              })
223
-              .catch((e) => {})
224
-          }
225
-        } else {
226
-          return false
227
-        }
228
-      })
229
-    },
230
-    // 生成二维码
231
-    qrcode(val) {
232
-      // eslint-disable-next-line no-unused-vars
233
-      const qrcode = new QRCode('qrcode', {
234
-        width: 200,
235
-        height: 200, // 高度
236
-        text: 'http://192.168.89.76:8080/signIn?signId=' + val
237
-      })
238
-    },
239
-    // 下载二维码
240
-    downloadQrcode() {
241
-      document.getElementById('qrcode').innerHTML = ''
242
-      this.qrcode(this.signId) // 下载之前首先要有二维码
243
-      // 先找到canvas节点下的二维码图片
244
-      const myCanvas = document.getElementById('qrcode').getElementsByTagName('canvas')
245
-      const img = document.getElementById('qrcode').getElementsByTagName('img')
246
-      // 创建一个a节点
247
-      const a = document.createElement('a')
248
-      // 设置a的href属性将canvas变成png格式
249
-      const imgURL = myCanvas[0].toDataURL('image/jpg')
250
-      const ua = navigator.userAgent
251
-      if (ua.indexOf('Trident') !== -1 && ua.indexOf('Windows') !== -1) { // IE内核 并且  windows系统 情况下 才执行;
252
-        var bstr = atob(imgURL.split(',')[1])
253
-        var n = bstr.length
254
-        var u8arr = new Uint8Array(n)
255
-        while (n--) {
256
-          u8arr[n] = bstr.charCodeAt(n)
257
-        }
258
-        var blob = new Blob([u8arr])
259
-        window.navigator.msSaveOrOpenBlob(blob, this.signForm.name + '.png')
260
-      } else if (ua.indexOf('Firefox') > -1) { // 火狐兼容下载
261
-        const blob = this.base64ToBlob(imgURL) // new Blob([content]);
262
-        const evt = document.createEvent('HTMLEvents')
263
-        evt.initEvent('click', true, true)// initEvent 不加后两个参数在FF下会报错  事件类型,是否冒泡,是否阻止浏览器的默认行为
264
-        a.download = this.signForm.name + '.png'// 下载图片名称,如果填内容识别不到,下载为未知文件,所以我这里就不填为空
265
-        a.href = URL.createObjectURL(blob)
266
-        a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))// 兼容火狐
267
-      } else { // 谷歌兼容下载
268
-        img.src = imgURL
269
-        a.href = img.src
270
-        // 设置下载文件的名字
271
-        a.download = this.signForm.name + '.png'
272
-        // 点击
273
-        a.click()
274
-      }
275
-    },
276
-    // base64转blob
277
-    base64ToBlob(code) {
278
-      const parts = code.split(';base64,')
279
-      const contentType = parts[0].split(':')[1]
280
-      const raw = window.atob(parts[1])
281
-      const rawLength = raw.length
282
-      const uInt8Array = new Uint8Array(rawLength)
283
-      for (let i = 0; i < rawLength; ++i) {
284
-        uInt8Array[i] = raw.charCodeAt(i)
285
-      }
286
-      return new Blob([uInt8Array], { type: contentType })
287
-    }
288
-  }
289
-}
290
-</script>
291
-
292
-<style scoped >
293
-.demo-signForm {
294
-  margin-top: 1em;
295
-}
296
-</style>
297
-
298
-<style lang="scss" scoped>
299
-</style>

+ 0
- 147
src/views/signIn/index.vue Ver fichero

@@ -1,147 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never">
4
-      签到名称:
5
-      <el-input v-model="name" style="width: 200px; margin-right: 20px" />
6
-      签到时间:<el-date-picker
7
-        v-model="daterange"
8
-        type="daterange"
9
-        range-separator="至"
10
-        start-placeholder="开始日期"
11
-        end-placeholder="结束日期"
12
-        value-format="yyyy-MM-dd"
13
-        style="margin-right: 20px"
14
-        @change="dateChange"
15
-      />
16
-      <div style="float:right">
17
-        <el-button type="primary" @click="onSearch">查询</el-button>
18
-        <el-button @click="onReset">重置</el-button>
19
-        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建签到</el-button>
20
-      </div>
21
-    </el-card>
22
-    <el-table stripe :data="tableData" border style="width: 100%">
23
-      <el-table-column prop="name" label="签到名" />
24
-      <el-table-column prop="startTime" label="开始时间">
25
-        <template slot-scope="scope">{{ formate(scope.row.startTime) }}</template>
26
-      </el-table-column>
27
-      <el-table-column prop="endTime" label="结束时间">
28
-        <template slot-scope="scope">{{ formate(scope.row.endTime) }}</template>
29
-      </el-table-column>
30
-      <el-table-column align="center" label="操作" min-width="100" width="280">
31
-        <template slot-scope="scope">
32
-          <el-link :underline="false" style="margin-right:1em" type="primary">
33
-            <router-link
34
-              :to="{path:'signIn/edit',query: { signId: scope.row.signId }}"
35
-            >编辑</router-link>
36
-          </el-link>
37
-          <el-popconfirm
38
-            icon="el-icon-info"
39
-            icon-color="red"
40
-            title="确定要删除该签到吗?"
41
-            @onConfirm="handleDelete(scope.row)"
42
-          >
43
-            <el-link slot="reference" :underline="false" type="danger">删除</el-link>
44
-          </el-popconfirm>
45
-        </template>
46
-      </el-table-column>
47
-    </el-table>
48
-    <el-pagination
49
-      v-show="Total!==0"
50
-      style="float:right; margin:20px 0"
51
-      :total="Total"
52
-      :current-page="currentPage"
53
-      :page-size="pageSize"
54
-      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
55
-      layout="total, prev, pager, next, sizes"
56
-      @size-change="handleSizeChange"
57
-      @current-change="handleCurrentChange"
58
-    />
59
-  </div>
60
-</template>
61
-<script>
62
-import { getSignInList, deleteSignIn } from '@/api/signIn'
63
-import dayjs from 'dayjs'
64
-export default {
65
-  data() {
66
-    return {
67
-      name: undefined,
68
-      daterange: undefined,
69
-      tableData: [],
70
-      endTime: undefined,
71
-      startTime: undefined,
72
-      //
73
-      pageSize: 10,
74
-      currentPage: 1,
75
-      Total: 0 // 条目总数
76
-    }
77
-  },
78
-  mounted() {
79
-    this.onSearch()
80
-  },
81
-  methods: {
82
-    formate(val) {
83
-      return dayjs(val).add(8, 'hour').format('YYYY-MM-DD HH:mm')
84
-    },
85
-    // 改变每页显示条数
86
-    handleSizeChange(val) {
87
-      this.pageSize = val
88
-      this.changePagination()
89
-    },
90
-    // 改变页码
91
-    handleCurrentChange(val) {
92
-      this.currentPage = val
93
-      this.changePagination()
94
-    },
95
-    // 改变分页组件重新查询数据
96
-    changePagination() {
97
-      getSignInList({
98
-        name: this.name,
99
-        startDate: this.startTime,
100
-        endDate: this.endTime,
101
-        pageNum: this.currentPage,
102
-        pageSize: this.pageSize
103
-      }).then((res) => {
104
-        this.tableData = res.data.records
105
-      })
106
-    },
107
-
108
-    handleAdd() {
109
-      this.$router.push({ path: 'signIn/edit' })
110
-    },
111
-
112
-    handleDelete(row) {
113
-      deleteSignIn(row.signId).then(() => {
114
-        this.onSearch()
115
-      })
116
-    },
117
-    dateChange(val) {
118
-      this.startTime = this.daterange[0]
119
-      this.endTime = this.daterange[1]
120
-    },
121
-    onSearch() {
122
-      getSignInList({
123
-        name: this.name,
124
-        startDate: this.startTime,
125
-        endDate: this.endTime,
126
-        pageNum: this.currentPage,
127
-        pageSize: this.pageSize
128
-      }).then((res) => {
129
-        this.tableData = res.data.records
130
-        this.pageSize = res.data.size
131
-        this.Total = res.data.total
132
-      })
133
-    },
134
-    onReset() {
135
-      this.name = undefined
136
-      this.daterange = undefined
137
-      this.startTime = undefined
138
-      this.endTime = undefined
139
-      this.currentPage = 1
140
-      this.pageSize = 10
141
-      this.onSearch()
142
-    }
143
-  }
144
-}
145
-</script>
146
-<style lang="scss" scoped>
147
-</style>

+ 0
- 107
src/views/students/schoolClass/edit.vue Ver fichero

@@ -1,107 +0,0 @@
1
-<template>
2
-  <div>
3
-    <el-card class="box-card" style="text-align:center" shadow="never">
4
-      <h2>{{ classId ? '修改' : '新建' }}班级</h2>
5
-      <el-form
6
-        ref="classForm"
7
-        :model="classForm"
8
-        :rules="rules"
9
-        label-width="10vw"
10
-        class="demo-classForm"
11
-        style="width:50%;margin:auto"
12
-      >
13
-        <el-form-item label="学期" prop="termId">
14
-          <el-select v-model="classForm.termId" style="width:100%" filterable placeholder="请选择">
15
-            <el-option
16
-              v-for="item in options"
17
-              :key="item.termId"
18
-              :label="item.name"
19
-              :value="item.termId"
20
-            />
21
-          </el-select>
22
-        </el-form-item>
23
-        <el-form-item label="班级名称" prop="name">
24
-          <el-input v-model="classForm.name" />
25
-        </el-form-item>
26
-        <el-form-item label-width="0">
27
-          <el-button type="primary" @click="submitForm('classForm')">{{
28
-            !classId ? "新建班级" : "修改班级"
29
-          }}</el-button>
30
-          <el-button @click="$router.go(-1)">返回</el-button>
31
-        </el-form-item>
32
-      </el-form>
33
-    </el-card>
34
-  </div>
35
-</template>
36
-
37
-<script>
38
-import { saveSchoolClass, getSchoolClassDetail, UpdateSchoolClass } from '@/api/schoolClass'
39
-import { getSchoolTermList } from '@/api/schoolTerm'
40
-export default {
41
-  data() {
42
-    return {
43
-      classId: undefined,
44
-      options: [],
45
-      classForm: {
46
-        termId: undefined,
47
-        name: undefined
48
-      },
49
-      rules: {
50
-        termId: [
51
-          { required: true, message: '请选择学期', trigger: 'blur' }
52
-        ],
53
-        name: [
54
-          { required: true, message: '请输入班级名称', trigger: 'blur' }
55
-        ]
56
-      }
57
-    }
58
-  },
59
-  mounted() {
60
-    if (this.$route?.query.classId) {
61
-      this.classId = this.$route.query.classId
62
-      getSchoolClassDetail(this.classId)
63
-        .then((res) => {
64
-          this.classForm = res.data
65
-        })
66
-    }
67
-    getSchoolTermList().then((res) => {
68
-      this.options = res.data.records
69
-    })
70
-  },
71
-  methods: {
72
-    submitForm(formName) {
73
-      this.$refs[formName].validate((valid) => {
74
-        if (valid) {
75
-          if (this.classId) {
76
-            UpdateSchoolClass(this.classForm, this.classId)
77
-              .then((res) => {
78
-                this.$message.success('修改成功')
79
-                this.$router.go(-1)
80
-              })
81
-              .catch((e) => {
82
-                console.log(e)
83
-              })
84
-          } else {
85
-            saveSchoolClass(this.classForm)
86
-              .then((e) => {
87
-                this.$message.success('保存成功')
88
-                this.$router.go(-1)
89
-              })
90
-          }
91
-        } else {
92
-          return false
93
-        }
94
-      })
95
-    }
96
-  }
97
-}
98
-</script>
99
-
100
-<style scoped >
101
-.demo-classForm {
102
-  margin-top: 1em;
103
-}
104
-</style>
105
-
106
-<style lang="scss" scoped>
107
-</style>

+ 0
- 126
src/views/students/schoolClass/list.vue Ver fichero

@@ -1,126 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never">
4
-      学期名称:
5
-      <el-select v-model="termId" filterable placeholder="请选择">
6
-        <el-option
7
-          v-for="item in options"
8
-          :key="item.termId"
9
-          :label="item.name"
10
-          :value="item.termId"
11
-        />
12
-      </el-select>
13
-      班级名称:
14
-      <el-input v-model="name" style="width: 200px; margin-right: 20px" />
15
-      <div style="float:right">
16
-        <el-button type="primary" @click="onSearch">查询</el-button>
17
-        <el-button @click="onReset">重置</el-button>
18
-        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建班级</el-button>
19
-      </div>
20
-    </el-card>
21
-    <el-table stripe :data="tableData" border style="width: 100%">
22
-      <el-table-column prop="termName" label="学期" />
23
-      <el-table-column prop="name" label="班级" />
24
-      <el-table-column align="center" label="操作" min-width="100" width="280">
25
-        <template slot-scope="scope">
26
-          <el-link :underline="false" style="margin-right:1em" type="primary">
27
-            <router-link
28
-              :to="{path:'schoolClass/Edit',query: { classId: scope.row.classId }}"
29
-            >编辑</router-link>
30
-          </el-link>
31
-          <el-popconfirm
32
-            icon="el-icon-info"
33
-            icon-color="red"
34
-            title="确定要删除该班级吗?"
35
-            @onConfirm="handleDelete(scope.row)"
36
-          >
37
-            <el-link slot="reference" :underline="false" type="danger">删除</el-link>
38
-          </el-popconfirm>
39
-        </template>
40
-      </el-table-column>
41
-    </el-table>
42
-    <el-pagination
43
-      v-show="Total!==0"
44
-      style="float:right; margin:20px 0"
45
-      :total="Total"
46
-      :current-page="currentPage"
47
-      :page-size="pageSize"
48
-      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
49
-      layout="total, prev, pager, next, sizes"
50
-      @size-change="handleSizeChange"
51
-      @current-change="handleCurrentChange"
52
-    />
53
-  </div>
54
-</template>
55
-<script>
56
-import { getSchoolClassList, deleteSchoolClass } from '@/api/schoolClass'
57
-import { getSchoolTermList } from '@/api/schoolTerm'
58
-export default {
59
-  data() {
60
-    return {
61
-      termId: undefined,
62
-      name: undefined,
63
-      options: [],
64
-      tableData: [],
65
-      pageSize: 10,
66
-      currentPage: 1,
67
-      Total: 0 // 条目总数
68
-    }
69
-  },
70
-  mounted() {
71
-    getSchoolTermList().then((res) => {
72
-      this.options = res.data.records
73
-    })
74
-    this.onSearch()
75
-  },
76
-  methods: {
77
-    // 改变每页显示条数
78
-    handleSizeChange(val) {
79
-      this.pageSize = val
80
-      this.changePagination()
81
-    },
82
-    // 改变页码
83
-    handleCurrentChange(val) {
84
-      this.currentPage = val
85
-      this.changePagination()
86
-    },
87
-    // 改变分页组件重新查询数据
88
-    changePagination() {
89
-      getSchoolClassList({
90
-        termId: this.termId,
91
-        name: this.name,
92
-        pageNum: this.currentPage,
93
-        pageSize: this.pageSize
94
-      }).then((res) => {
95
-        this.tableData = res.data.records
96
-      })
97
-    },
98
-    onSearch() {
99
-      getSchoolClassList({
100
-        termId: this.termId,
101
-        name: this.name,
102
-        pageNum: this.currentPage,
103
-        pageSize: this.pageSize
104
-      }).then((res) => {
105
-        this.tableData = res.data.records
106
-        this.Total = res.data.total
107
-      })
108
-    },
109
-    onReset() {
110
-      this.name = undefined
111
-      this.termId = undefined
112
-      this.onSearch()
113
-    },
114
-    handleAdd() {
115
-      this.$router.push({ path: 'schoolClass/edit' })
116
-    },
117
-    handleDelete(row) {
118
-      deleteSchoolClass(row.classId).then(() => {
119
-        this.onSearch()
120
-      })
121
-    }
122
-  }
123
-}
124
-</script>
125
-<style lang="scss" scoped>
126
-</style>

+ 0
- 144
src/views/students/schoolTerm/list.vue Ver fichero

@@ -1,144 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never">
4
-      学期名称:
5
-      <el-input v-model="name" style="width: 200px; margin-right: 20px" />
6
-      <div style="float:right">
7
-        <el-button type="primary" @click="onSearch">查询</el-button>
8
-        <el-button @click="onReset">重置</el-button>
9
-        <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建学期</el-button>
10
-      </div>
11
-    </el-card>
12
-    <el-table stripe :data="tableData" border style="width: 100%">
13
-      <el-table-column prop="name" label="学期" />
14
-      <el-table-column prop="state" label="状态" width="100">
15
-        <template slot-scope="scope">
16
-          {{ scope.row.state === 1 ? '发布' : '未发布' }}
17
-        </template>
18
-      </el-table-column>
19
-      <el-table-column align="center" label="操作" min-width="100" width="280">
20
-        <template slot-scope="scope">
21
-          <el-button style="margin-right:1em" type="text" @click="toggleState(scope.row)">{{ scope.row.state === 1 ? '取消发布' : '发布' }}</el-button>
22
-          <el-link :underline="false" style="margin-right:1em" type="primary">
23
-            <router-link
24
-              :to="{path:'schoolTerm/Edit',query: { termId: scope.row.termId }}"
25
-            >编辑</router-link>
26
-          </el-link>
27
-          <el-popconfirm
28
-            icon="el-icon-info"
29
-            icon-color="red"
30
-            title="确定要删除该学期吗?"
31
-            @onConfirm="handleDelete(scope.row)"
32
-          >
33
-            <el-link slot="reference" :underline="false" type="danger">删除</el-link>
34
-          </el-popconfirm>
35
-        </template>
36
-      </el-table-column>
37
-    </el-table>
38
-    <el-pagination
39
-      v-show="Total!==0"
40
-      style="float:right; margin:20px 0"
41
-      :total="Total"
42
-      :current-page="currentPage"
43
-      :page-size="pageSize"
44
-      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
45
-      layout="total, prev, pager, next, sizes"
46
-      @size-change="handleSizeChange"
47
-      @current-change="handleCurrentChange"
48
-    />
49
-  </div>
50
-</template>
51
-<script>
52
-import { getSchoolTermList, deleteSchoolTerm, UpdateSchoolTerm } from '@/api/schoolTerm'
53
-export default {
54
-  data() {
55
-    return {
56
-      name: undefined,
57
-      tableData: [],
58
-      pageSize: 10,
59
-      currentPage: 1,
60
-      Total: 0 // 条目总数
61
-    }
62
-  },
63
-  mounted() {
64
-    this.onSearch()
65
-  },
66
-  methods: {
67
-    // 改变每页显示条数
68
-    handleSizeChange(val) {
69
-      this.pageSize = val
70
-      this.changePagination()
71
-    },
72
-    // 改变页码
73
-    handleCurrentChange(val) {
74
-      this.currentPage = val
75
-      this.changePagination()
76
-    },
77
-    // 改变分页组件重新查询数据
78
-    changePagination() {
79
-      getSchoolTermList({
80
-        name: this.name,
81
-        pageNum: this.currentPage,
82
-        pageSize: this.pageSize
83
-      }).then((res) => {
84
-        this.tableData = res.data.records
85
-      })
86
-    },
87
-    onSearch() {
88
-      getSchoolTermList({
89
-        name: this.name,
90
-        pageNum: this.currentPage,
91
-        pageSize: this.pageSize
92
-      }).then((res) => {
93
-        this.tableData = res.data.records
94
-        this.Total = res.data.total
95
-      })
96
-    },
97
-    onReset() {
98
-      this.name = undefined
99
-      this.onSearch()
100
-    },
101
-    handleAdd() {
102
-      this.$router.push({ path: 'schoolTerm/edit' })
103
-    },
104
-    toggleState(val) {
105
-      if (val.state === 1) {
106
-        this.$confirm('是否将本学期取消发布,取消后移动端将不再显示相关信息?', '提示', {
107
-          confirmButtonText: '确定',
108
-          cancelButtonText: '取消',
109
-          type: 'warning'
110
-        }).then(() => {
111
-          UpdateSchoolTerm({ ...val, state: 0 }, val.termId).then(() => {
112
-            this.$message({
113
-              type: 'success',
114
-              message: '已取消发布!'
115
-            })
116
-            this.onSearch()
117
-          })
118
-        }).catch(() => {})
119
-      } else {
120
-        this.$confirm('是否将本学期发布,发布后移动端将显示相关信息?', '提示', {
121
-          confirmButtonText: '确定',
122
-          cancelButtonText: '取消',
123
-          type: 'warning'
124
-        }).then(() => {
125
-          UpdateSchoolTerm({ ...val, state: 1 }, val.termId).then(() => {
126
-            this.$message({
127
-              type: 'success',
128
-              message: '发布成功!'
129
-            })
130
-            this.onSearch()
131
-          })
132
-        }).catch(() => {})
133
-      }
134
-    },
135
-    handleDelete(row) {
136
-      deleteSchoolTerm(row.termId).then(() => {
137
-        this.onSearch()
138
-      })
139
-    }
140
-  }
141
-}
142
-</script>
143
-<style lang="scss" scoped>
144
-</style>

+ 0
- 55
src/views/students/studentDetail.vue Ver fichero

@@ -1,55 +0,0 @@
1
-<template>
2
-  <div>
3
-    <el-card class="box-card" style="text-align:center" shadow="never">
4
-      <h2>学员详情</h2>
5
-      <el-form
6
-        ref="studentForm"
7
-        :model="studentForm"
8
-        label-width="10vw"
9
-        style="width:50%;margin:auto"
10
-        class="demo-studentForm"
11
-      >
12
-        <el-form-item label="学期名称" prop="termName">{{ studentForm.termName }}</el-form-item>
13
-        <el-form-item label="班级名称" prop="className">{{ studentForm.className }}</el-form-item>
14
-        <el-form-item label="姓名" prop="name">{{ studentForm.name }}</el-form-item>
15
-        <el-form-item label="性别" prop="sex">{{ studentForm.sex }}</el-form-item>
16
-        <el-form-item label="手机号" prop="phone">{{ studentForm.phone }}</el-form-item>
17
-        <el-form-item label-width="0">
18
-          <el-button @click="$router.go(-1)">返回</el-button>
19
-        </el-form-item>
20
-      </el-form>
21
-    </el-card>
22
-  </div>
23
-</template>
24
-
25
-<script>
26
-import { getStudentDetail } from '@/api/student'
27
-
28
-export default {
29
-  data() {
30
-    return {
31
-      studentForm: {
32
-        name: undefined
33
-      }
34
-    }
35
-  },
36
-  mounted() {
37
-    if (this.$route?.query.studentId) {
38
-      var studentId = this.$route.query.studentId
39
-      getStudentDetail(studentId)
40
-        .then((res) => {
41
-          this.studentForm = res.data
42
-        })
43
-    }
44
-  }
45
-}
46
-</script>
47
-
48
-<style scoped >
49
-.demo-studentForm {
50
-  margin-top: 1em;
51
-}
52
-</style>
53
-
54
-<style lang="scss" scoped>
55
-</style>

+ 0
- 156
src/views/students/studentsList.vue Ver fichero

@@ -1,156 +0,0 @@
1
-<template>
2
-  <div class="body">
3
-    <el-card class="box-card" shadow="never">
4
-      学期名称:
5
-      <el-select v-model="termId" style="margin-right:8px" filterable placeholder="请选择">
6
-        <el-option
7
-          v-for="item in options"
8
-          :key="item.termId"
9
-          :label="item.name"
10
-          :value="item.termId"
11
-        />
12
-      </el-select>
13
-      班级名称:
14
-      <el-select v-model="classId" style="margin-right:8px" filterable placeholder="请选择">
15
-        <el-option
16
-          v-for="item in classOptions"
17
-          :key="item.classId"
18
-          :label="item.name"
19
-          :value="item.classId"
20
-        />
21
-      </el-select>
22
-      姓名:
23
-      <el-input v-model="name" style="width: 96px; margin-right: 8px" />
24
-      手机号:
25
-      <el-input v-model="phone" style="width: 128px;" />
26
-      <div style="float:right">
27
-        <el-button type="primary" @click="onSearch">查询</el-button>
28
-        <el-button @click="onReset">重置</el-button>
29
-      </div>
30
-    </el-card>
31
-    <el-table stripe :data="tableData" border style="width: 100%">
32
-      <el-table-column prop="termName" label="学期" />
33
-      <el-table-column prop="className" label="班级" />
34
-      <el-table-column prop="name" label="学员姓名" />
35
-      <el-table-column prop="phone" label="学员手机号" />
36
-      <el-table-column align="center" label="操作" min-width="100" width="280">
37
-        <template slot-scope="scope">
38
-          <el-link :underline="false" style="margin-right:1em" type="primary">
39
-            <router-link
40
-              :to="{path:'students/detail',query: { studentId: scope.row.studentId }}"
41
-            >详情</router-link>
42
-          </el-link>
43
-          <el-popconfirm
44
-            icon="el-icon-info"
45
-            icon-color="red"
46
-            title="确定要删除该学员吗?"
47
-            @onConfirm="handleDelete(scope.row)"
48
-          >
49
-            <el-link slot="reference" :underline="false" type="danger">删除</el-link>
50
-          </el-popconfirm>
51
-        </template>
52
-      </el-table-column>
53
-    </el-table>
54
-    <el-pagination
55
-      v-show="Total!==0"
56
-      style="float:right; margin:20px 0"
57
-      :total="Total"
58
-      :current-page="currentPage"
59
-      :page-size="pageSize"
60
-      :page-sizes="[pageSize, 20, 35,40,50,80,100]"
61
-      layout="total, prev, pager, next, sizes"
62
-      @size-change="handleSizeChange"
63
-      @current-change="handleCurrentChange"
64
-    />
65
-  </div>
66
-</template>
67
-<script>
68
-import { getStudentList, deleteStudent } from '@/api/student'
69
-import { getSchoolTermList } from '@/api/schoolTerm'
70
-import { getSchoolClassList } from '@/api/schoolClass'
71
-
72
-export default {
73
-  data() {
74
-    return {
75
-      options: [],
76
-      classOptions: [],
77
-      termId: undefined,
78
-      classId: undefined,
79
-      name: undefined,
80
-      phone: undefined,
81
-      daterange: '',
82
-      tableData: [],
83
-      endDate: undefined,
84
-      startDate: undefined,
85
-      //
86
-      pageSize: 10,
87
-      currentPage: 1,
88
-      Total: 0 // 条目总数
89
-    }
90
-  },
91
-  mounted() {
92
-    getSchoolTermList().then((res) => {
93
-      this.options = res.data.records
94
-    })
95
-    getSchoolClassList().then((res) => {
96
-      this.classOptions = res.data.records
97
-    })
98
-    this.onSearch()
99
-  },
100
-  methods: {
101
-    // 改变每页显示条数
102
-    handleSizeChange(val) {
103
-      this.pageSize = val
104
-      this.changePagination()
105
-    },
106
-    // 改变页码
107
-    handleCurrentChange(val) {
108
-      this.currentPage = val
109
-      this.changePagination()
110
-    },
111
-    // 改变分页组件重新查询数据
112
-    changePagination() {
113
-      getStudentList({
114
-        termId: this.termId,
115
-        classId: this.classId,
116
-        name: this.name,
117
-        phone: this.phone,
118
-        // title: this.title,
119
-        // startDate: this.startDate,
120
-        // endDate: this.endDate,
121
-        pageNum: this.currentPage,
122
-        pageSize: this.pageSize
123
-      }).then((res) => {
124
-        this.tableData = res.data.records
125
-      })
126
-    },
127
-    handleDelete(row) {
128
-      deleteStudent(row.studentId).then(() => {
129
-        this.onSearch()
130
-      })
131
-    },
132
-    onSearch() {
133
-      getStudentList({
134
-        termId: this.termId,
135
-        classId: this.classId,
136
-        name: this.name,
137
-        phone: this.phone,
138
-        pageNum: this.currentPage,
139
-        pageSize: this.pageSize
140
-      }).then((res) => {
141
-        this.tableData = res.data.records
142
-        this.Total = res.data.total
143
-      })
144
-    },
145
-    onReset() {
146
-      this.termId = undefined
147
-      this.classId = undefined
148
-      this.name = undefined
149
-      this.phone = undefined
150
-      this.onSearch()
151
-    }
152
-  }
153
-}
154
-</script>
155
-<style lang="scss" scoped>
156
-</style>

+ 2
- 2
vue.config.js Ver fichero

@@ -6,7 +6,7 @@ function resolve(dir) {
6 6
   return path.join(__dirname, dir)
7 7
 }
8 8
 
9
-const name = defaultSettings.title || '电网教培信息管理系统' // page title
9
+const name = defaultSettings.title || 'COLMO后台管理系统' // page title
10 10
 
11 11
 // If your port is set to 80,
12 12
 // use administrator privileges to execute the command line.
@@ -33,7 +33,7 @@ module.exports = {
33 33
     open: true,
34 34
     proxy: {
35 35
       '/api': {
36
-        target: 'http://192.168.89.147:8080',
36
+        target: 'http://192.168.89.147:8081',
37 37
         changeOrigin: true
38 38
       }
39 39
     }