Browse Source

完成个人数据页的内容、考试详情页的新增考试成绩表与未参考人员表的信息展示,试卷的下载、新增用户的密码输入框的修改[样式、
最大输入长度50]、登录页的密码框的最大长度输入限制为50

yellowtaotao 3 years ago
parent
commit
f875fed054

+ 2 - 0
src/api/modules/exam.js

@@ -9,6 +9,8 @@ export default {
     INTERFACE_DELETE_EXAMS: "admin/someexams",
     // 查询某场考试的详细信息
     INTERFACE_GET_EXAM_DETAIL: "exams/{examId}",
+    // 查询某场考试的详细信息的额外信息
+    INTERFACE_GET_EXAM_DETAIL_MORE: "admin/exams/{examId}/details",
     // 查询某场考试的试题信息
     INTERFACE_GET_EXAM_QUESTIONS_LIST: "exams/{examId}/questions",
     // 手动/自动 新建考试-基本信息

+ 4 - 0
src/api/modules/user.js

@@ -9,5 +9,9 @@ export default {
     INTERFACE_POST_USER_ADMIN: "admin/register",
     // 删除管理员
     INTERFACE_DELETE_USER_ADMIN: "admin/users",
+    // 获取所有用户积分数据
+    INTERFACE_GET_USER_POINTS_LIST: 'admin/user/points/data',
+    // 导出试卷接口
+    INTERFACE_GET_EXAM_WORD: 'admin/downloadExamFile/{examId}'
   }
 };

+ 4 - 0
src/router/menu.js

@@ -11,6 +11,10 @@ export default [
         path: '/home/personData',
         meta: { title: '个人数据' },
       },
+      {
+        path: '/home/personData/detail',
+        meta: { title: '个人数据 / 详情', isDisplay: true },
+      },
     ],
   },
   {

+ 7 - 0
src/router/modules/count.js

@@ -17,5 +17,12 @@ export default {
       meta: { title: '个人数据' },
       component: () => import('@/views/count/personData'),
     },
+    {
+      path: 'personData/detail',
+      name: 'personData-detaile',
+      meta: { title: '详情' },
+      component: () =>
+        import('@/views/count/personDataDetail'),
+    },
   ],
 };

+ 457 - 4
src/views/articleManagement/articleCreateThird.vue

@@ -1,13 +1,201 @@
 <template>
-  <div class="">这里是新建第三方文章</div>
+  <div class="app-container">
+    <div class="common-card basic-information-box">
+      <div class="basic-information-title">基本信息</div>
+      <div class="basic-information-form">
+        <a-form
+          :form="form"
+          :label-col="{ span: 6 }"
+          :wrapper-col="{ span: 18 }"
+          style="width: 515px"
+          @submit="handleSubmit"
+        >
+          <a-form-item label="文章标题">
+            <a-input
+              placeholder="请输入文章标题"
+              :maxLength="100"
+              v-decorator="[
+                'name',
+                {
+                  rules: [{ required: true, message: '请输入文章标题' }],
+                },
+              ]"
+            />
+          </a-form-item>
+          <!-- <a-form-item label="文章描述">
+            <a-textarea
+              placeholder="请输入文章描述"
+              :auto-size="{ minRows: 3, maxRows: 5 }"
+              :maxLength="100"
+              v-decorator="[
+                'description',
+                {
+                  rules: [{ message: '请输入文章描述' }],
+                  initialValue: description,
+                },
+              ]"
+            />
+          </a-form-item> -->
+          <a-form-item label="文章分类">
+            <!-- 文章分类父类 -->
+            <a-select
+              v-decorator="[
+                'articleParentClass',
+                {
+                  rules: [
+                    {
+                      required: optionType == 'create',
+                      message: '请选择文章分类父类',
+                    },
+                  ],
+                  initialValue: articleParentClass.name,
+                },
+              ]"
+              @change="articleClassParentChange"
+            >
+              <a-select-option
+                v-for="(item, index) in articleParentClassArr"
+                :key="index"
+                >{{ articleParentClassArr[index].name }}</a-select-option
+              >
+            </a-select>
+          </a-form-item>
+          <a-form-item label="文章子类">
+            <!-- 文章分类子类 -->
+            <a-select
+              v-decorator="[
+                'articleChildClass',
+                {
+                  rules: [
+                    {
+                      required: optionType == 'create',
+                      message: '请选择文章分类子类',
+                    },
+                  ],
+                  initialValue: articleChildClass.name,
+                },
+              ]"
+              :disabled="!articleChildClass || !articleChildClass.id"
+              @change="articleClassChildChange"
+            >
+              <a-select-option
+                v-for="(item, index) in articleChildClassArr"
+                :key="index"
+                >{{ articleChildClassArr[index].name }}</a-select-option
+              >
+            </a-select>
+          </a-form-item>
+          <a-form-item label="工种类别">
+            <a-select
+              v-decorator="[
+                'engineerType',
+                {
+                  rules: [{ required: true, message: '请选择工种' }],
+                  initialValue: engineerType.name,
+                },
+              ]"
+              @change="engineerTypeChange"
+            >
+              <a-select-option
+                v-for="(item, index) in engineerTypeArray"
+                :key="index"
+                >{{ engineerTypeArray[index].name }}</a-select-option
+              >
+            </a-select>
+          </a-form-item>
+          <a-form-item label="必学日期:">
+            <a-date-picker
+              placeholder="请选择日期"
+              @change="learnDateChoose"
+              v-decorator="[
+                'learnDate',
+                {
+                  initialValue: learnDate,
+                },
+              ]"
+              style="width: 100%"
+            />
+          </a-form-item>
+
+          <a-form-item label="文章链接">
+            <a-textarea
+              placeholder="请输入文章链接"
+              :auto-size="{ minRows: 3, maxRows: 5 }"
+              :maxLength="1000"
+              v-decorator="[
+                'articleLink',
+                {
+                  rules: [{ required: true, message: '请输入文章链接' }],
+                  initialValue: articleLink,
+                },
+              ]"
+            />
+            <!-- <a-input
+              placeholder="请输入文章链接"
+              :maxLength="1000"
+              v-decorator="[
+                'articleLink',
+                {
+                  rules: [{ required: true, message: '请输入文章链接' }],
+                  initialValue: articleLink,
+                },
+              ]"
+            /> -->
+          </a-form-item>
+          <a-form-item label="推荐:">
+            <a-radio-group
+              @change="recommendChange"
+              v-decorator="[
+                'recommand',
+                {
+                  initialValue: recommand,
+                },
+              ]"
+            >
+              <a-radio value="true"> 是 </a-radio>
+              <a-radio value="false"> 否 </a-radio>
+            </a-radio-group>
+          </a-form-item>
+          <a-form-item :wrapper-col="{ span: 20, offset: 10 }">
+            <a-button
+              id="articleCreateThirdSubmit"
+              type="primary"
+              html-type="submit"
+              >提交</a-button
+            >
+          </a-form-item>
+        </a-form>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
+import {
+  formatePathParams,
+  formateStringDate,
+  formateDateToString,
+} from '@/filters';
 export default {
+  name: 'articleCreateThird',
   props: {},
   components: {},
   data() {
-    return {};
+    return {
+      form: this.$form.createForm(this, { name: 'articleCreateThird' }),
+      articleParentClassArr: [],
+      articleChildClassArr: [],
+      engineerTypeArray: [],
+      articleParentClass: {},
+      articleChildClass: {},
+      engineerType: '',
+      learnDate: '',
+      recommand: 'false',
+      optionType: '',
+      description: '',
+      defaultFileList: [],
+      articleLink: '',
+    };
   },
   created() {
     this.initDataFun(); // 初始化数据
@@ -18,11 +206,276 @@ export default {
   watch: {},
   methods: {
     // 初始化数据
-    initDataFun() {},
+    async initDataFun() {
+      await this.getArticleParentClass();
+      await this.getEngineersWork();
+      let type = this.$route.query.type;
+      this.optionType = type ? type : 'create';
+      // 判断是新增文章还是编辑文章
+      if ('edit' === type) {
+        console.log('---edit---');
+        await this.getArticleContent();
+      } else if ('create' === type) {
+        console.log('---create---');
+      }
+    },
+    // 查询文章分类父级
+    getArticleParentClass() {
+      this.$_http
+        .get(this.$_API.INTERFACE_GET_CATEGORIES)
+        .then((res) => {
+          this.articleParentClassArr = res.data;
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    // 查询文章分类子集
+    getArticleChildClass() {
+      if (!this.articleParentClass.id) {
+        return;
+      }
+      let pathParamsData = { categoryId: this.articleParentClass.id };
+      this.$_http
+        .get(
+          formatePathParams(
+            this.$_API.INTERFACE_GET_CATEGORIES_CATEGROYID,
+            pathParamsData
+          )
+        )
+        .then((res) => {
+          if (res && res.data.length !== 0) {
+            this.articleChildClassArr = res.data;
+            this.articleChildClass = this.articleChildClassArr[0];
+            this.form.setFieldsValue({
+              articleChildClass: this.articleChildClass.name,
+            });
+          }
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    // 查询工作类别
+    async getEngineersWork() {
+      await this.$_http
+        .get(this.$_API.INTERFACE_GET_ENGINEERINGWORK_LIST)
+        .then((res) => {
+          this.engineerTypeArray = [...res.data];
+          this.engineerType = this.engineerTypeArray[0];
+        });
+    },
+    // 文章分类父类变化
+    articleClassParentChange(value) {
+      this.articleParentClass = this.articleParentClassArr[value];
+      // 子类选项清空
+      this.articleChildClassArr = [];
+      this.form.setFieldsValue({
+        articleChildClass: '',
+      });
+      // 获取子类的值
+      this.getArticleChildClass();
+    },
+    // 文章分类子类变化
+    articleClassChildChange(value) {
+      this.articleChildClass = this.articleChildClassArr[value];
+    },
+    // 工种变化
+    engineerTypeChange(index) {
+      this.engineerType = this.engineerTypeArray[index];
+    },
+    // 必学日期选择
+    learnDateChoose(date, dateString) {
+      this.learnDate = dateString;
+    },
+    // 推荐选择
+    recommendChange(date) {
+      this.recommand = date.target.value;
+      console.log('------' + this.recommand);
+    },
+    // 查询文章内容
+    getArticleContent() {
+      let pathParamsData = { materialId: this.$route.query.id };
+      this.$_http
+        .get(
+          formatePathParams(this.$_API.INTERFACE_GET_MATERIALS, pathParamsData)
+        )
+        .then((res) => {
+          console.log('----' + JSON.stringify(res));
+          this.initEditArticleForm(res.data);
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    initEditArticleForm(item) {
+      console.log('--------' + JSON.stringify(item));
+      //   文章标题
+      this.form.setFieldsValue({
+        name: item.name,
+      });
+      //   文章描述
+      this.description = item.description ? item.description : '';
+      // 文章分类-父类:
+      this.articleParentClass = item.rootMaterialCategory;
+      this.getArticleChildClass(); // 获取子类列表的值
+      // 文章分类-子类
+      this.articleChildClass = item.materialCategory;
+      //   选中工种
+      if (item.engineerTypes.length !== 0) {
+        let engineerId = item.engineerTypes[0];
+        for (let i = 0; i < this.engineerTypeArray.length; i++) {
+          let element = this.engineerTypeArray[i];
+          if (element.id === engineerId) {
+            this.engineerTypeChange(i);
+          }
+        }
+      }
+      let learnDate = item.tags.length > 0 ? item.tags[0] : null;
+      // 必学日期
+      this.learnDate = learnDate ? formateStringDate(learnDate) : null;
+      // 第三方链接
+      this.articleLink = item.contents;
+      console.log('编辑初始化时间为YYYY-MM-DD', this.learnDate, learnDate);
+      this.recommand = item.recommand + '';
+      console.log('--推荐--' + item.recommand);
+      // 附件内容
+      item.links.forEach((element) => {
+        let upFile = {
+          uid: this.getUid(),
+          name: this.getUrlName(element),
+          status: 'done',
+          url: element,
+        };
+        this.defaultFileList.push(upFile);
+      });
+      console.log(this.defaultFileList);
+    },
+    // 提交表单
+    handleSubmit(e) {
+      e.preventDefault();
+      if ('create' === this.optionType) {
+        console.log('创建第三方文章');
+        this.createArtical();
+      } else if ('edit' === this.optionType) {
+        console.log('更新第三方文章');
+        this.updateArtical();
+      }
+    },
+    createArtical() {
+      this.form.setFieldsValue({
+        articleParentClass: this.articleParentClass.name,
+      });
+      this.form.setFieldsValue({
+        articleChildClass: this.articleChildClass.name,
+      });
+      this.form.setFieldsValue({
+        engineerType: this.engineerType.name,
+      });
+      this.form.setFieldsValue({
+        recommand: this.recommand,
+      });
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          // 新建文章
+          let that = this;
+          that.$confirm({
+            title: '新建第三方文章',
+            content: `确认新建第三方文章吗?`,
+            okText: '确认',
+            cancelText: '取消',
+            onOk() {
+              that.loading = true;
+              let params = {
+                categoryid: that.articleChildClass.id,
+                engineertypeid: that.engineerType.id,
+              };
+              let tag = formateDateToString(that.learnDate);
+              let bodyParams = {
+                name: values.name,
+                description: values.description,
+                type: 'THIRD_PARTY',
+                tags: tag ? [tag] : [],
+                engineerTypes: [that.engineerType.id],
+                contents: values.articleLink,
+                recommand: eval(that.recommand.toLowerCase()),
+              };
+              that.$_http
+                .post(that.$_API.INTERFACE_POST_ADMIN_MATERIALS, bodyParams, {
+                  params,
+                })
+                .then(() => {
+                  that.$message.success('新建第三方文章成功');
+                  that.$router.push({ path: 'list' });
+                });
+            },
+            onCancel() {},
+          });
+        }
+      });
+    },
+    updateArtical() {
+      let pathParamsData = { materialId: this.$route.query.id };
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          // 更新文章
+          let that = this;
+          that.$confirm({
+            title: '更新第三方文章',
+            content: `确认更新第三方文章吗?`,
+            okText: '确认',
+            cancelText: '取消',
+            onOk() {
+              that.loading = true;
+              let params = {
+                categoryid: that.articleChildClass.id,
+                engineertypeid: that.engineerType.id,
+              };
+              let tag = formateDateToString(that.learnDate);
+              let bodyParams = {
+                id: that.$route.query.id,
+                name: values.name,
+                description: values.description,
+                type: 'THIRD_PARTY',
+                tags: tag ? [tag] : [],
+                engineerTypes: [that.engineerType.id],
+                contents: values.articleLink,
+                recommand: eval(that.recommand.toLowerCase()),
+              };
+              console.log(
+                '保存修改日期格式为YYYYMMDD',
+                bodyParams.tags,
+                that.learnDate
+              );
+              that.$_http
+                .put(
+                  formatePathParams(
+                    that.$_API.INTERFACE_PUT_ADMIN_MATERIALS,
+                    pathParamsData
+                  ),
+                  bodyParams,
+                  {
+                    params,
+                  }
+                )
+                .then(() => {
+                  that.$message.success('更新第三方文章成功');
+                });
+            },
+            onCancel() {},
+          });
+        }
+      });
+    },
   },
 };
 </script>
 
 <style lang="less"></style>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+@import '~@/styles/common/variable.less';
+</style>

+ 63 - 5
src/views/articleManagement/articleList.vue

@@ -121,10 +121,23 @@
             </div>
             <div class="article-list-item-info-right">
               <div class="article-option-button-box">
-                <a-button type="primary" @click="handleEditArticleItem(item)"
+                <a-button
+                  type="primary"
+                  @click="handleEditArticleItemRecommand(item)"
+                  style="background-color:#FF8D1A;border-color:#FF8D1A;"
+                >
+                  {{ item.recommand ? '取消推荐' : '推荐' }}</a-button
+                >
+                <a-button
+                  type="primary"
+                  @click="handleEditArticleItem(item)"
+                  style="margin-left:20px;"
                   >编辑</a-button
                 >
-                <a-button type="danger" @click="handleDeleteArticleItem(item)"
+                <a-button
+                  type="danger"
+                  @click="handleDeleteArticleItem(item)"
+                  style="margin-left:20px;"
                   >删除</a-button
                 >
               </div>
@@ -362,6 +375,11 @@ export default {
           path: '/articleManagement/videoCreate',
           query: { id: item.id, type: 'edit' },
         });
+      } else if (item.type === 'THIRD_PARTY') {
+        this.$router.push({
+          path: '/articleManagement/articleCreateThird',
+          query: { id: item.id, type: 'edit' },
+        });
       }
     },
     //  // 操作:编辑文章
@@ -379,6 +397,46 @@ export default {
       console.log('---' + content);
       return JSON.parse(content);
     },
+    // 操作: 更新文章的推荐状态
+    handleEditArticleItemRecommand(item) {
+      if (!item) {
+        return;
+      }
+      console.log(item);
+      let that = this;
+      that.$confirm({
+        title: '更新文章',
+        content: `确认更新文章吗?`,
+        okText: '确认',
+        cancelText: '取消',
+        onOk() {
+          that.loading = true;
+          let pathParamsData = { materialId: item.id };
+          // let params = {
+          //   categoryid: item.materialCategory,
+          //   engineertypeid: item.engineerTypes?item.engineerTypes[0]:'',
+          // };
+          let bodyParams = {
+            id: that.$route.query.id,
+            recommand: !item.recommand,
+          };
+          that.$_http
+            .put(
+              formatePathParams(
+                that.$_API.INTERFACE_PUT_ADMIN_MATERIALS,
+                pathParamsData
+              ),
+              bodyParams
+            )
+            .then(() => {
+              item.recommand = !item.recommand;
+              that.loading = false;
+              that.$message.success('更新文章成功');
+            });
+        },
+        onCancel() {},
+      });
+    },
   },
 };
 </script>
@@ -449,9 +507,9 @@ export default {
       }
       .article-list-item-info-right {
         .article-option-button-box {
-          width: 150px;
-          display: flex;
-          justify-content: space-between;
+          // width: 150px;
+          // display: flex;
+          // justify-content: space-between;
         }
       }
     }

+ 126 - 4
src/views/count/personData.vue

@@ -1,13 +1,56 @@
 <template>
-  <div class="">这里是个人数据</div>
+  <div class="app-container">
+    <a-spin :spinning="loading">
+      <div class="common-card a-card-margin-top basic-information-box">
+        <!-- 表单 -->
+        <a-table
+          :columns="columns"
+          :data-source="tableData"
+          :row-key="(record, index) => index"
+          :pagination="false"
+        >
+          <template slot="action" slot-scope="text, record">
+            <a @click="personDetail(record)">详情</a>
+          </template>
+        </a-table>
+        <!-- 分页 -->
+        <div class="a-pagination-display">
+          <a-pagination
+            v-model="pagination.current"
+            :pageSize="pagination.pageSize"
+            :total.sync="pagination.total"
+            show-less-items
+            show-quick-jumper
+            @change="getAdminListFun"
+          />
+        </div>
+      </div>
+    </a-spin>
+    <!-- <div class="company-info">
+      <span>
+        copyright © 浮游科技有限公司出品
+      </span>
+    </div> -->
+  </div>
 </template>
 
 <script>
 export default {
+  name: 'personData',
   props: {},
   components: {},
   data() {
-    return {};
+    return {
+      loading: false, // 是否显示加载动画
+      // table
+      columns: {}, // 表格列配置
+      tableData: [], // 表格数据
+      pagination: {
+        pageSize: 10,
+        current: 1,
+        total: 0,
+      }, // 分页参数
+    };
   },
   created() {
     this.initDataFun(); // 初始化数据
@@ -18,11 +61,90 @@ export default {
   watch: {},
   methods: {
     // 初始化数据
-    initDataFun() {},
+    initDataFun() {
+      // 表单的列的配置参数
+      this.columns = [
+        {
+          title: '姓名',
+          dataIndex: 'userName',
+          key: 'userName',
+        },
+        {
+          title: '性别',
+          dataIndex: 'six',
+          key: 'six',
+          align: 'center',
+        },
+        {
+          title: '学习积分',
+          dataIndex: 'learningPoints',
+          key: 'learningPoints',
+          align: 'center',
+        },
+        {
+          title: '考试积分',
+          dataIndex: 'examPoints',
+          key: 'examPoints',
+          align: 'center',
+        },
+        {
+          title: '总积分',
+          dataIndex: 'totalPoints',
+          key: 'totalPoints',
+          align: 'center',
+        },
+        {
+          title: '排名',
+          dataIndex: 'rank',
+          key: 'rank',
+          align: 'center',
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          key: 'action',
+          scopedSlots: { customRender: 'action' },
+          width: 100,
+        },
+      ];
+      this.getAdminListFun(); // 查询:已有账号列表
+    },
+
+    // 查询:已有账号列表
+    getAdminListFun() {
+      this.loading = true;
+      let params = {
+        page: this.pagination.current - 1,
+        size: this.pagination.pageSize,
+      };
+      this.$_http
+        .get(this.$_API.INTERFACE_GET_USER_POINTS_LIST, { params })
+        .then((res) => {
+          let resdData = res.data.content;
+          this.tableData = [...resdData];
+          this.pagination.total = res.data.totalElements; // 总条数
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    // 个人数据的详情
+    personDetail(record) {
+      if (!record) {
+        return;
+      }
+      // this.$router.push({
+      //   path: '/home/personData/detail',
+      //   query: { id: record.userName },
+      // });
+    },
   },
 };
 </script>
 
 <style lang="less"></style>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+@import '~@/styles/common/variable.less';
+</style>

+ 30 - 0
src/views/count/personDataDetail.vue

@@ -0,0 +1,30 @@
+<template>
+  <div class="">内容</div>
+</template>
+
+<script>
+export default {
+  props: {},
+  components: {},
+  data() {
+    return {};
+  },
+  created() {
+    this.initDataFun(); //初始化数据
+  },
+  mounted() {},
+  beforeDestroy() {},
+  watch: {},
+  computed: {},
+  methods: {
+    //初始化数据
+    initDataFun() {
+      console.log(this.$route.query.id);
+    },
+  },
+};
+</script>
+
+<style lang="less"></style>
+
+<style lang="less" scoped></style>

+ 41 - 5
src/views/examManagement/examManagementDetail.vue

@@ -1,11 +1,14 @@
 <template>
   <div class="app-container" ref="tableBody">
-    <div class="common-card exam-detail-body">
-      <a-spin :spinning="loading">
+    <a-spin :spinning="loading">
+      <div class="common-card exam-detail-body">
         <!-- 考试详情 -->
         <div class="exam-detail-info" ref="filterCard">
           <div class="exam-detail-name-row">
             <div class="exam-detail-name">{{ examDetailData.name }}</div>
+            <a-button type="primary" @click="handleExportExam"
+              >导出试卷</a-button
+            >
             <!-- <a-button
               type="primary"
               :disabled="examDetailData.disabled"
@@ -116,8 +119,9 @@
             @change="getQusetionsListFun"
           />
         </div>
-      </a-spin>
-    </div>
+      </div>
+      <ExamManagementDetailMore :examId="examId" />
+    </a-spin>
     <!-- <div class="company-info">
       <span>
         copyright © 浮游科技有限公司出品
@@ -143,10 +147,13 @@ import {
   EXAM_STATUS_TYPE_TXT,
   EXAM_STATUS_TYPE,
 } from '@/common/Constant';
+import ExamManagementDetailMore from './examManagementDetailMore.vue';
 export default {
   name: 'examManagementDetail',
   props: {},
-  components: {},
+  components: {
+    ExamManagementDetailMore,
+  },
   data() {
     return {
       // tableHeight: 400, // 表格高度
@@ -163,6 +170,7 @@ export default {
       examStatusTypeTxt: EXAM_STATUS_TYPE_TXT, // 考试状态属性文字
       isVisible: false, // 是否显示详情浮窗
       questionDetail: {}, // 需要展示的试题详情
+      examId: 0, // 考試ID
     };
   },
   created() {
@@ -193,6 +201,7 @@ export default {
         this.$message.error('页面异常,请重新进入当前页面');
         return;
       }
+      this.examId = this.$route.query.id;
       // 工种类别
       this.engineeringWorkList = [
         { name: '不限', id: '' },
@@ -361,6 +370,33 @@ export default {
         },
       });
     },
+    // 操作:导出试卷
+    handleExportExam() {
+      console.log('导出试卷');
+      let that = this;
+      that.$confirm({
+        title: '导出试卷',
+        content: `确认导出试卷吗?`,
+        okText: '确认',
+        cancelText: '取消',
+        onOk() {
+          that.loading = true;
+          let params = {
+            examId: that.examId,
+          };
+          that.$_http
+            .get(formatePathParams(that.$_API.INTERFACE_GET_EXAM_WORD, params))
+            .then(() => {
+              that.loading = false;
+              // that.$message.success('导出试卷成功');
+            })
+            .catch(() => {
+              that.loading = false;
+            });
+        },
+        onCancel() {},
+      });
+    },
     // 操作:详情
     toQuestionDetailFun(record) {
       this.questionDetail = record;

+ 205 - 0
src/views/examManagement/examManagementDetailMore.vue

@@ -0,0 +1,205 @@
+<template>
+  <div class="">
+    <!-- 考试成绩表 -->
+    <div class="common-card a-card-margin-top">
+      <div class="information-title">考试成绩</div>
+      <a-table
+        :columns="testScoreTableColumns"
+        :data-source="testScoreTableData"
+        :row-key="(record) => record.id"
+        :pagination="false"
+      >
+        <template slot="userName" slot-scope="text, record">
+          <span>{{ record.user ? record.user.userName : '' }}</span>
+        </template>
+      </a-table>
+      <div class="a-pagination-display">
+        <a-pagination
+          v-model="testScoreTablePagination.current"
+          :pageSize="testScoreTablePagination.pageSize"
+          :total.sync="testScoreTablePagination.total"
+          show-less-items
+          show-quick-jumper
+          @change="getTestScoreList"
+        />
+      </div>
+    </div>
+
+    <!-- 未参考人员表 -->
+    <div class="common-card a-card-margin-top">
+      <div class="information-title">未参考人员</div>
+      <a-table
+        :columns="unReferencedColumns"
+        :data-source="unReferencedTableData"
+        :row-key="(record) => record.id"
+        :pagination="false"
+      >
+        <template slot="userName" slot-scope="text, record">
+          <span>{{ record.user ? record.user.userName : '' }}</span>
+        </template>
+      </a-table>
+      <div class="a-pagination-display">
+        <a-pagination
+          v-model="unReferencedPagination.current"
+          :pageSize="unReferencedPagination.pageSize"
+          :total.sync="unReferencedPagination.total"
+          show-less-items
+          show-quick-jumper
+          @change="getUnReferencedList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { formatePathParams } from '@/filters';
+export default {
+  props: {
+    examId: {
+      type: [Number, String],
+    },
+  },
+  components: {},
+  data() {
+    return {
+      tableDataAll: [], // 所有数据
+
+      testScoreTableColumns: [],
+      testScoreTablePagination: {
+        pageSize: 10,
+        current: 1,
+        total: 0,
+      }, // 分页参数
+      testScoreTableData: [], // 列表
+      unReferencedColumns: [],
+      unReferencedPagination: {
+        pageSize: 10,
+        current: 1,
+        total: 0,
+      }, // 分页参数
+      unReferencedTableData: [], // 列表
+    };
+  },
+  created() {
+    this.initDataFun(); //初始化数据
+  },
+  mounted() {},
+  beforeDestroy() {},
+  watch: {},
+  computed: {},
+  methods: {
+    //初始化数据
+    initDataFun() {
+      if (!this.examId) {
+        return;
+      }
+      // 表单的列的配置参数
+      this.testScoreTableColumns = [
+        {
+          title: '姓名',
+          dataIndex: 'userName',
+          key: 'userName',
+          scopedSlots: { customRender: 'userName' },
+        },
+        {
+          title: '成绩',
+          dataIndex: 'totalPoints',
+          key: 'totalPoints',
+        },
+        {
+          title: '时间',
+          dataIndex: 'endTime',
+          key: 'endTime',
+        },
+      ];
+      this.unReferencedColumns = [
+        {
+          title: '姓名',
+          dataIndex: 'userName',
+          key: 'userName',
+          scopedSlots: { customRender: 'userName' },
+        },
+      ];
+      this.getExamCountInfo(); // 查询:考试的统计信息
+    },
+
+    // 查询:考试的统计信息
+    getExamCountInfo() {
+      let params = {
+        examId: this.examId,
+      };
+      this.$_http
+        .get(
+          formatePathParams(this.$_API.INTERFACE_GET_EXAM_DETAIL_MORE, params)
+        )
+        .then((res) => {
+          let resData = res.data;
+          if (resData.historyList) {
+            this.tableDataAll = resData.historyList;
+
+            this.testScoreTablePagination.current = 1;
+            this.testScoreTablePagination.total = this.tableDataAll.length;
+            this.testScoreTableData = this.getCurrenPageData(
+              this.tableDataAll,
+              this.testScoreTablePagination.current,
+              this.testScoreTablePagination.pageSize
+            );
+
+            this.unReferencedPagination.current = 1;
+            this.unReferencedPagination.total = this.tableDataAll.length;
+            this.unReferencedTableData = this.getCurrenPageData(
+              this.tableDataAll,
+              this.unReferencedPagination.current,
+              this.unReferencedPagination.pageSize
+            );
+          } else {
+            this.tableDataAll = [];
+            this.testScoreTableData = [];
+            this.testScoreTablePagination.total = 0;
+            this.unReferencedTableData = [];
+            this.unReferencedPagination.total = 0;
+          }
+        })
+        .catch(() => {});
+    },
+
+    // 获取指定页码的数据
+    getCurrenPageData(array, current, pageSize) {
+      let returnArr = [];
+      for (let i = 0; i < array.length; i++) {
+        if (i + 1 > (current - 1) * pageSize && i + 1 <= current * pageSize) {
+          returnArr.push(array[i]);
+        }
+      }
+      return returnArr;
+    },
+    getTestScoreList() {
+      this.testScoreTableData = this.getCurrenPageData(
+        this.tableDataAll,
+        this.testScoreTablePagination.current,
+        this.testScoreTablePagination.pageSize
+      );
+    },
+    getUnReferencedList() {
+      this.unReferencedTableData = this.getCurrenPageData(
+        this.tableDataAll,
+        this.testScoreTablePagination.current,
+        this.testScoreTablePagination.pageSize
+      );
+    },
+  },
+};
+</script>
+
+<style lang="less"></style>
+
+<style lang="less" scoped>
+@import '~@/styles/common/variable.less';
+.information-title {
+  font-size: 18px;
+  font-weight: bold;
+  color: @mainColorBlack65;
+  margin-bottom: @paddingMarginVal;
+}
+</style>

+ 1 - 1
src/views/login/login.vue

@@ -32,7 +32,7 @@
           <a-form-item>
             <a-input-password
               placeholder="密码"
-              :maxLength="10"
+              :maxLength="50"
               v-decorator="[
                 'loginPassword',
                 {

+ 4 - 4
src/views/user/userManagementList.vue

@@ -34,9 +34,9 @@
               :label-col="labelCol"
               :wrapper-col="wrapperCol"
             >
-              <a-input
+              <a-input-password
                 placeholder="输入密码"
-                :maxLength="10"
+                :maxLength="50"
                 autocomplete="off"
                 allow-clear
                 v-decorator="[
@@ -53,9 +53,9 @@
               :label-col="labelCol"
               :wrapper-col="wrapperCol"
             >
-              <a-input
+              <a-input-password
                 placeholder="确认密码"
-                :maxLength="10"
+                :maxLength="50"
                 autocomplete="off"
                 allow-clear
                 v-decorator="[