Tang vor 4 Jahren
Ursprung
Commit
3d94bb4eb9

+ 8 - 0
package-lock.json

@@ -12382,6 +12382,14 @@
       "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=",
       "dev": true
     },
+    "v-distpicker": {
+      "version": "1.2.12",
+      "resolved": "https://registry.npmjs.org/v-distpicker/-/v-distpicker-1.2.12.tgz",
+      "integrity": "sha512-hREPQ1gg0nDwySofg0WAnmVnbtJHeelSqSQU/hyPwokjBNr2tFVOu++JXNZMVhG9Gt4IitgfdiNz+UYnB3H6bw==",
+      "requires": {
+        "vue": "^2.6.10"
+      }
+    },
     "validate-npm-package-license": {
       "version": "3.0.4",
       "resolved": "https://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz",

+ 1 - 0
package.json

@@ -17,6 +17,7 @@
     "element-ui": "^2.15.0",
     "nprogress": "^0.2.0",
     "quill": "1.3.7",
+    "v-distpicker": "^1.2.12",
     "vue": "^2.5.2",
     "vue-echarts": "^6.0.0-rc.6",
     "vue-router": "^3.0.1",

+ 2 - 1
src/api/activeConfiguration.js

@@ -25,10 +25,11 @@ export default {
         })
     },
     //查询活动配置列表
-    inquireActiveConfiguration() {
+    inquireActiveConfiguration(data) {
         return request({
             url: '/system/configuration/list',
             method: 'get',
+            params: data
         })
     },
     //获取活动配置详细信息

+ 2 - 1
src/api/advertising.js

@@ -17,10 +17,11 @@ export default {
         })
     },
     //查询广告发布储存列表
-    inquireAdvertisingStorage() {
+    inquireAdvertisingStorage(data) {
         return request({
             url: '/system/advertising/list',
             method: 'get',
+            params: data
         })
     },
     //修改广告发布储存

+ 6 - 2
src/api/api.js

@@ -15,7 +15,7 @@ import paperquestioninfo from './paperquestioninfo'//题库详情管理
 import questionConfiguration from './questionConfiguration'//考题配置
 import userlist from './userlist'//用户信息管理
 import orderList from './orderList'//订单列表
-import arrangement from './arrangement'//考试安排
+import arrangement from './arrangement'//考试安排......等
 import appuser from './appuser'//客户端用户管理
 
 import advertising from './advertising'//广告发布储存管理
@@ -23,9 +23,11 @@ import operationLog from './operationLog'//操作日志记录
 import activeConfiguration from './activeConfiguration'//活动配置管理
 import userInformationManagement from './userInformationManagement'//用户信息管理
 import jobManagement from './jobManagement'//岗位管理
+import hierarchical from './hierarchical'//等级管理
+import taskManagement from './taskManagement'//任务存储管理
 import roleInfoManagement from './roleInfoManagement'//角色信息管理
 import department from './department'//部门信息管理
-import universityType from './universityType'//高校类型管理
+import universityType from './universityType'//高校管理
 import ossUpload from './ossUpload'//上传文件
 import menu from './menu'//菜单管理
 import dictdata from './dictData'//字典数据
@@ -63,4 +65,6 @@ export default {
     ...userlist,
     ...orderList,
     ...appuser,
+    ...hierarchical,
+    ...taskManagement,
 }

+ 15 - 0
src/api/appuser.js

@@ -32,6 +32,14 @@ export default {
             params: data
         })
     },
+    //客户端用户学习记录列表
+    inquirestudyRecordlists(data) {
+        return request({
+            url: '/app/user/studyRecordList',
+            method: 'get',
+            params: data
+        })
+    },
     //获取客户端用户详细信息
     obtainappuser(data) {
         return request({
@@ -39,4 +47,11 @@ export default {
             method: 'get',
         })
     },
+    //获取客户端用户详细信息
+    obtainappuserschoolinfo(data) {
+        return request({
+            url: `/app/user/school/info/` + data,
+            method: 'get',
+        })
+    },
 }

+ 48 - 19
src/api/arrangement.js

@@ -1,51 +1,80 @@
 import request from '@/utils/request' //引入axios请求及拦截器
 export default {
-    //新增考试安排,包含考试指引
-    arrangementAddExam(data) {
+    //新增考试安排
+    addExamexamarrangement(data) {
         return request({
-            url: '/modules.exam/arrangement/addExam',
+            url: '/exam/arrangement/addExam',
             method: 'post',
             data
         })
     },
-    //修改考试安排,包含考试指引
-    arrangementEditExam(data) {
+    //修改考试安排
+    editExamexamarrangement(data) {
         return request({
-            url: '/modules.exam/arrangement/editExam',
+            url: '/exam/arrangement/editExam',
             method: 'post',
             data
         })
     },
-    //删除考试安排,包含考试指引
-    arrangemenDelExam(data) {
+    // 考试安排列表
+    examarrangementlist(data) {
         return request({
-            url: '/modules.exam/arrangement/ids',
+            url: '/exam/arrangement/list',
+            method: 'get',
+            params: data
+        })
+    },
+    // 考试安排详情
+    examarrangementId(data) {
+        return request({
+            url: '/exam/arrangement/' + data,
+            method: 'get',
+        })
+    },
+
+
+    //新增【考试指南】
+    addGuideexamarrangement(data) {
+        return request({
+            url: '/exam/arrangement/addGuide',
             method: 'post',
             data
         })
     },
-    // 学员考试计划
-    arrangementlistExamUser(data) {
+    //修改【考试指南】
+    editGuideexamarrangement(data) {
         return request({
-            url: '/modules.exam/arrangement/listExamUser',
+            url: '/exam/arrangement/editGuide',
+            method: 'post',
+            data
+        })
+    },
+    // 考试指南列表
+    examarrangementlistGuide(data) {
+        return request({
+            url: '/exam/arrangement/listGuide',
             method: 'get',
             params: data
         })
     },
-    // 查询学员考试安排列表
-    arrangement(data) {
+
+
+
+
+    // 学员计划列表
+    examarrangementlistExamUser(data) {
         return request({
-            url: '/modules.exam/arrangement/listExamUser',
+            url: '/exam/arrangement/listExamUser',
             method: 'get',
             params: data
         })
     },
-    //获取考试安排,包含考试指引详细信息
-    obtainArrangementid(data) {
+    // 订阅人数列表
+    examarrangementlistlistSub(data) {
         return request({
-            url: `
-            /modules.exam/arrangement/${data}`,
+            url: '/exam/arrangement/listSub',
             method: 'get',
+            params: data
         })
     },
 

+ 34 - 0
src/api/hierarchical.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //新增等级积分
+    addsystemgrade(data) {
+        return request({
+            url: '/system/grade/addGrade',
+            method: 'post',
+            data
+        })
+    },
+    //修改等级积分
+    editsystemgrade(data) {
+        return request({
+            url: '/system/grade/editGrade',
+            method: 'post',
+            data
+        })
+    },
+    //查询等级管理列表
+    inquiresystemgradeList(data) {
+        return request({
+            url: '/system/grade/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //获取等级管理详细信息
+    obtainsystemgrade(data) {
+        return request({
+            url: `/system/grade/` + data,
+            method: 'get',
+        })
+    },
+}

+ 46 - 14
src/api/orderList.js

@@ -1,34 +1,66 @@
 import request from '@/utils/request' //引入axios请求及拦截器
 export default {
-    //新增题库试卷
-    addbankexam(data) {
+    //修改订单
+    editOrder(data) {
         return request({
-            url: '/bank/exam',
+            url: '/order/edit',
             method: 'post',
             data
         })
     },
-    //修改题库试卷
-    editbankexam(data) {
+    //查询订单列表
+    inquireorderlist(data) {
         return request({
-            url: '/bank/exam/edit',
-            method: 'post',
-            data
+            url: '/order/list',
+            method: 'get',
+            params: data
         })
     },
-    //查询题库试卷列表
-    inquirebankexamList(data) {
+    //查询订单和商品列表
+    inquireorderlistAll(data) {
         return request({
-            url: '/bank/exam/list',
+            url: '/order/listAll',
             method: 'get',
             params: data
         })
     },
-    //获取题库试卷详细信息
-    obtainbankexam(data) {
+    //获取订单详细信息
+    inquireOrderId(data) {
         return request({
-            url: `/bank/exam/` + data,
+            url: '/order/' + data,
+            method: 'get'
+        })
+    },
+
+    //查询订单商品列表
+    ordergoodslist(data) {
+        return request({
+            url: '/order/goods/list',
             method: 'get',
+            params: data
+        })
+    },
+    //获取订单商品详细信息
+    inquireOrdergoodsId(data) {
+        return request({
+            url: '/order/goods/' + data,
+            method: 'get'
+        })
+    },
+    //查询订单优惠券 列表
+    ordercouponlist(data) { 
+        return request({
+            url: '/order/coupon/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //查询用户订单数据
+    orderlistUserOrder(data) { 
+        return request({
+            url: '/order/listUserOrder',
+            method: 'get',
+            params: data
         })
     },
 }

+ 34 - 0
src/api/taskManagement.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //新增任务存储
+    activitytaskaddTask(data) {
+        return request({
+            url: '/activity/task/addTask',
+            method: 'post',
+            data
+        })
+    },
+    //修改任务存储
+    activitytaskeditTask(data) {
+        return request({
+            url: '/activity/task/editTask',
+            method: 'post',
+            data
+        })
+    },
+    //查询任务存储列表
+    activitytasklist(data) {
+        return request({
+            url: '/activity/task/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //获取任务存储详细信息
+    activitytask(data) {
+        return request({
+            url: `/activity/task/` + data,
+            method: 'get',
+        })
+    },
+}

+ 13 - 20
src/api/universityType.js

@@ -1,40 +1,33 @@
 import request from '@/utils/request' //引入axios请求及拦截器
 export default {
-    //新增高校类型
-    addUniversityType(data) {
+    //新增高校
+    adduserschool(data) {
         return request({
-            url: '/system/type',
+            url: '/user/school',
             method: 'post',
             data
         })
     },
-    //删除高校类型
-    delUniversityType(data) {
+    //修改高校
+    edituserschool(data) {
         return request({
-            url: '/system/type/delete',
+            url: '/user/school/edit',
             method: 'post',
             data
         })
     },
-    //修改高校类型
-    modifyUniversityType(data) {
+    //查询高校列表
+    inquireuserschoolList(data) { 
         return request({
-            url: '/system/type/edit',
-            method: 'post',
-            data
-        })
-    },
-    //查询高校类型列表
-    inquireUniversityList(data) {
-        return request({
-            url: '/system/type/list',
+            url: '/user/school/list',
             method: 'get',
+            params: data
         })
     },
-    //获取高校类型详细信息
-    obtainCollegesInfo(data) {
+    //获取高校详细信息
+    obtainuserschool(data) {
         return request({
-            url: `/system/type/${data}`,
+            url: `/user/school/${data}`,
             method: 'get',
         })
     },

+ 10 - 0
src/components/searchBox.vue

@@ -42,6 +42,16 @@
             end-placeholder="结束日期"
             align="right"
             :size="size"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+          <el-date-picker
+            v-else-if="item.scope === 'datePickerA'"
+            v-model="formData[item.prop]"
+            type="datetime"
+            :size="size"
+            placeholder="选择日期时间"
+            value-format="timestamp"
           >
           </el-date-picker>
           <el-input

+ 174 - 0
src/components/tableList.vue

@@ -128,6 +128,110 @@
                 ? "关闭"
                 : "未知"
             }}</span>
+            <span v-else-if="item.scope === 'reStatus'">{{
+              Number(scope.row[item.prop]) === 1
+                ? "定时发布"
+                : Number(scope.row[item.prop]) === 0
+                ? "手动发布"
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'statusRe'">{{
+              Number(scope.row[item.prop]) === 0
+                ? "已删除"
+                : Number(scope.row[item.prop]) === 1 &&
+                  Number(scope.row["reStatus"]) === 1
+                ? "待发布"
+                : Number(scope.row[item.prop]) === 1 &&
+                  Number(scope.row["reStatus"]) === 0
+                ? "未发布"
+                : Number(scope.row[item.prop]) === 2
+                ? "已撤回"
+                : Number(scope.row[item.prop]) === 3
+                ? "已发布"
+                : Number(scope.row[item.prop]) === 4
+                ? "已到期"
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'TimeVoBtn'">
+              <el-popover placement="left" trigger="click">
+                <div
+                  v-for="(items, indexs) in scope.row[item.prop]"
+                  :key="indexs"
+                  style="margin-bottom:6px;"
+                >
+                  {{ $methodsTools.onlyForma(items.startTime) }} ~
+                  {{ $methodsTools.onlyForma(items.endTime) }}
+                </div>
+                <el-button slot="reference" size="mini">查看</el-button>
+              </el-popover>
+            </span>
+            <span v-else-if="item.scope === 'activityType'">{{
+              Number(scope.row[item.prop]) === 0
+                ? "优惠券"
+                : Number(scope.row[item.prop]) === 1
+                ? "折扣券"
+                : Number(scope.row[item.prop]) === 2
+                ? "线上直播"
+                : Number(scope.row[item.prop]) === 3
+                ? "定价"
+                : Number(scope.row[item.prop]) === 4
+                ? "优惠"
+                : Number(scope.row[item.prop]) === 5
+                ? "折扣"
+                : Number(scope.row[item.prop]) === 6
+                ? "线下活动"
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'activityRemarks'">{{
+              Number(scope.row[item.prop]) === 0
+                ? "金额:¥" + scope.row["price"]
+                : Number(scope.row[item.prop]) === 1
+                ? "折扣:" + scope.row["price"] + "折"
+                : Number(scope.row[item.prop]) === 2
+                ? "直播内容:" + scope.row["liveContent"]
+                : Number(scope.row[item.prop]) === 3
+                ? "商品金额:¥" + scope.row["price"]
+                : Number(scope.row[item.prop]) === 4
+                ? "优惠金额:¥" + scope.row["price"]
+                : Number(scope.row[item.prop]) === 5
+                ? "商品折扣:" + scope.row["price"] + "折"
+                : Number(scope.row[item.prop]) === 6
+                ? "活动地点:" + scope.row["liveAdress"]
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'statusActivity'">{{
+              Number(scope.row[item.prop]) === 0
+                ? "已删除"
+                : Number(scope.row[item.prop]) === 1
+                ? "已结束"
+                : Number(scope.row[item.prop]) === 2
+                ? "已撤回"
+                : Number(scope.row[item.prop]) === 3
+                ? "已开始"
+                : Number(scope.row[item.prop]) === 4
+                ? "未开始"
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'statusFB'">{{
+              scope.row[item.prop] === 0
+                ? "删除"
+                : scope.row[item.prop] === 1
+                ? "发布"
+                : scope.row[item.prop] === 2
+                ? "撤回"
+                : scope.row[item.prop] === 3
+                ? "未发布"
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'typeStatus'">{{
+              scope.row[item.prop] === 0
+                ? "报名指引"
+                : scope.row[item.prop] === 1
+                ? "打印准考证"
+                : scope.row[item.prop] === 2
+                ? "成绩查询指引"
+                : "未知"
+            }}</span>
             <span v-else-if="item.scope === 'typeId'">{{
               scope.row[item.prop] === 1
                 ? "普通练习"
@@ -137,9 +241,58 @@
                 ? "真题试卷"
                 : "未知"
             }}</span>
+            <span v-else-if="item.scope === 'taskType'">{{
+              scope.row[item.prop] === 0
+                ? "每日签到"
+                : scope.row[item.prop] === 1
+                ? "完善信息"
+                : scope.row[item.prop] === 2
+                ? "邀请好友"
+                : scope.row[item.prop] === 3
+                ? "每日分享"
+                : scope.row[item.prop] === 4
+                ? "视频学习"
+                : scope.row[item.prop] === 5
+                ? "模拟考试"
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'releaseType'">{{
+              scope.row[item.prop] === 0
+                ? "手动发布"
+                : scope.row[item.prop] === 1
+                ? "定时发布"
+                : "未知"
+            }}</span>
+            <span v-else-if="item.scope === 'releaseStatus'">{{
+              scope.row[item.prop] === 0
+                ? "删除"
+                : scope.row[item.prop] === 1
+                ? "待发布"
+                : scope.row[item.prop] === 2
+                ? "撤回"
+                : scope.row[item.prop] === 3
+                ? "发布成功"
+                : scope.row[item.prop] === 4
+                ? "未发布"
+                : scope.row[item.prop] === 5
+                ? "已结束"
+                : "未知"
+            }}</span>
             <span v-else-if="item.scope === 'numberAll'">{{
               scope.row[item.prop1] + scope.row[item.prop2]
             }}</span>
+            <span v-else-if="item.scope === 'moreLists'">{{
+              scope.row[item.prop1] + " ~ " + scope.row[item.prop2]
+            }}</span>
+            <span v-else-if="item.scope === 'TimeLists'"
+              >{{ $methodsTools.onlyForma(scope.row[item.prop1]) }} ~
+              {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}</span
+            >
+            <span v-else-if="item.scope === 'aTimeList'">{{
+              scope.row[item.prop] === null
+                ? "--"
+                : $methodsTools.onlyForma(scope.row[item.prop])
+            }}</span>
             <span v-else-if="item.scope === 'topic'">{{
               scope.row[item.prop] === 1
                 ? "单选题"
@@ -151,6 +304,19 @@
                 ? "案例题"
                 : "未知"
             }}</span>
+            <span v-else-if="item.scope === 'statusOrder'">{{
+              scope.row[item.prop] === -2
+                ? "超时关闭"
+                : scope.row[item.prop] === -1
+                ? "手动关闭"
+                : scope.row[item.prop] === 0
+                ? "待付款"
+                : scope.row[item.prop] === 1
+                ? "已付款"
+                : scope.row[item.prop] === 3
+                ? "成功"
+                : "未知"
+            }}</span>
             <span v-else-if="item.scope === 'cType'">
               <el-tag
                 type="success"
@@ -188,6 +354,11 @@
             <span v-else-if="item.scope === 'time'">{{
               numTime(scope.row[item.prop])
             }}</span>
+            <span v-else-if="item.scope === 'timeBtn'">{{
+              numTime(scope.row[item.prop])
+            }}
+              <el-button type="text" @click="getxq(scope.row)">详情</el-button>
+            </span>
             <span v-else-if="item.scope === 'minute'">{{
               numTimeminute(scope.row[item.prop])
             }}</span>
@@ -380,6 +551,9 @@ export default {
     load(tree, treeNode, resolve) {
       this.$emit("load", tree, treeNode, resolve);
     },
+    getxq(option){
+      this.$emit("getxq",option.userId)
+    },
   },
 };
 </script>

+ 382 - 0
src/components/userInfoS.vue

@@ -0,0 +1,382 @@
+<template>
+  <div id="userInfoS">
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="1080px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">详情</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :gutter="30">
+        <el-col :span="5">
+          <div>
+            <div style="width: 100%; margin-bottom: 20px">
+              <img
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(propData.avatar)"
+                alt="加载失败"
+              />
+            </div>
+            <p style="text-align: center">
+              姓名:<span>{{ propData.realname }}</span>
+            </p>
+          </div>
+        </el-col>
+        <el-col :span="19">
+          <table
+            class="trList"
+            border="1px"
+            cellpadding="0"
+            cellspacing="0"
+            style="
+              width: 100%;
+              border-color: rgb(249, 250, 252);
+              margin-bottom: 20px;
+            "
+          >
+            <tr>
+              <th colspan="4">基本信息</th>
+            </tr>
+            <tr>
+              <td class="label">性别</td>
+              <td class="flex">{{ propData.sex === 1 ? "男" : "女" }}</td>
+              <td class="label">户口/国籍</td>
+              <td class="flex">
+                {{
+                  propData.houseProvince +
+                  propData.houseCity +
+                  propData.houseDistrict
+                }}
+              </td>
+            </tr>
+            <tr>
+              <td class="label">身份证</td>
+              <td class="flex">{{ propData.idCard }}</td>
+              <td class="label">婚姻状况</td>
+              <td class="flex">{{ propData.marry === 1 ? "已婚" : "未婚" }}</td>
+            </tr>
+            <tr>
+              <td class="label">手机号</td>
+              <td class="flex">{{ propData.telphone }}</td>
+              <td class="label">所在城市</td>
+              <td class="flex">
+                {{ propData.province + propData.city + propData.district }}
+              </td>
+            </tr>
+            <tr>
+              <td class="label">年龄</td>
+              <td class="flex">
+                {{ $methodsTools.computedAge(propData.userBirth) }}
+              </td>
+              <td class="label">注册时间</td>
+              <td class="flex">
+                {{ $methodsTools.onlyForma(propData.createTime) }}
+              </td>
+            </tr>
+            <tr>
+              <td class="label">邮箱</td>
+              <td class="flex">{{ propData.email }}</td>
+              <td class="label">出生日期</td>
+              <td class="flex">{{ propData.userBirth }}</td>
+            </tr>
+            <tr>
+              <td class="label">政治面貌</td>
+              <td class="flex">{{ propData.politic }}</td>
+              <td class="label"></td>
+              <td class="flex"></td>
+            </tr>
+            <tr>
+              <td class="label">学信网学籍证明</td>
+              <td class="flex">
+                <img
+                  style="width: 100%"
+                  :src="
+                    $methodsTools.splitImgHost(propData.studentCertificateImg)
+                  "
+                  alt=""
+                />
+              </td>
+              <td class="label">一寸照片</td>
+              <td class="flex">
+                <img
+                  style="width: 100%"
+                  :src="$methodsTools.splitImgHost(propData.oneInchPhotos)"
+                  alt=""
+                />
+              </td>
+            </tr>
+            <tr>
+              <td class="label">身份证人像面</td>
+              <td class="flex">
+                <img
+                  style="width: 100%"
+                  :src="$methodsTools.splitImgHost(propData.idCardImg1)"
+                  alt=""
+                />
+              </td>
+              <td class="label">身份证国徽面</td>
+              <td class="flex">
+                <img
+                  style="width: 100%"
+                  :src="$methodsTools.splitImgHost(propData.idCardImg2)"
+                  alt=""
+                />
+              </td>
+            </tr>
+          </table>
+          <table
+            class="trList"
+            border="1px"
+            cellpadding="0"
+            cellspacing="0"
+            style="
+              width: 100%;
+              border-color: rgb(249, 250, 252);
+              margin-bottom: 20px;
+            "
+          >
+            <tr>
+              <th colspan="4">教育信息</th>
+            </tr>
+            <tr>
+              <td class="label">学校名称</td>
+              <td class="flex">{{ education.schoolName }}</td>
+              <td class="label">学位</td>
+              <td class="flex">
+                {{ education.academicDegree }}
+              </td>
+            </tr>
+            <tr>
+              <td class="label">全日制</td>
+              <td class="flex">{{ education.fullTimeSchool }}</td>
+              <td class="label">学制</td>
+              <td class="flex">{{ education.educationalSystem }}</td>
+            </tr>
+            <tr>
+              <td class="label">入学时间</td>
+              <td class="flex">{{ education.admissionTime }}</td>
+              <td class="label">院系</td>
+              <td class="flex">
+                {{ education.department }}
+              </td>
+            </tr>
+            <tr>
+              <td class="label">毕业时间</td>
+              <td class="flex">{{ education.graduationTime }}</td>
+              <td class="label">专业</td>
+              <td class="flex">{{ education.major }}</td>
+            </tr>
+            <tr>
+              <td class="label">学历</td>
+              <td class="flex">{{ education.education }}</td>
+              <td class="label">班级</td>
+              <td class="flex">{{ education.grade }}</td>
+            </tr>
+          </table>
+          <p style="margin: 20px 0px">统计信息</p>
+          <table
+            class="trList"
+            border="1px"
+            cellpadding="0"
+            cellspacing="0"
+            style="
+              width: 100%;
+              border-color: rgb(249, 250, 252);
+              margin-bottom: 20px;
+              text-align:center;
+            "
+          >
+            <tr class="trLists">
+              <td>消费金额</td>
+              <td>订单数量</td>
+              <td>折扣券</td>
+              <td>优惠券</td>
+              <td>等级名称</td>
+              <td>经验值</td>
+            </tr>
+            <tr>
+              <td>{{cjInfo.price}}</td>
+              <td>{{cjInfo.orderNum}}</td>
+              <td>{{cjInfo.couponDiscount}}</td>
+              <td>{{cjInfo.coupon}}</td>
+              <td>{{cjInfo.userLevel}}</td>
+              <td>{{cjInfo.integral}}</td>
+            </tr>
+            <tr class="trLists">
+              <td>学习时长</td>
+              <td>课程</td>
+              <td>题库</td>
+              <td>收藏课程</td>
+              <td>收藏题库</td>
+              <td>参加活动场数</td>
+            </tr>
+            <tr>
+              <td>{{cjInfo.studyNum}}</td>
+              <td>{{cjInfo.courseNum}}</td>
+              <td>{{cjInfo.bankNum}}</td>
+              <td>{{cjInfo.collectBankNum}}</td>
+              <td>{{cjInfo.collectCourseNum}}</td>
+              <td>{{cjInfo.activityNum}}</td>
+            </tr>
+          </table>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      fullscreen: false,
+      dialogBox: false,
+      propData: {},
+      education: {},
+      cjInfo: {},
+    };
+  },
+  methods: {
+    async getInfos(v) {
+      const waits1 = await this.$api.obtainappuser(v);
+      this.propData = waits1.data;
+      const waits2 = await this.$api.obtainappuserschoolinfo(v);
+      this.education = waits2.data;
+      const waits3 = await this.$api.orderlistUserOrder({userId: v});
+      this.cjInfo = waits3.data;
+      this.dialogBox = true;
+    },
+    closeBefore() {
+      this.dialogBox = false;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.trLists {
+  td {
+    background-color: rgb(249, 250, 252);
+    font-weight: 600;
+  }
+}
+td {
+  padding: 10px;
+}
+th {
+  padding: 10px;
+  background-color: rgb(249, 250, 252);
+}
+.label {
+  text-align: right;
+  background-color: rgb(249, 250, 252);
+  width: 15%;
+}
+.flex {
+  width: 35%;
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+</style>

+ 310 - 0
src/components/userStudyInfo.vue

@@ -0,0 +1,310 @@
+<template>
+  <div id="userInfoS">
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="1080px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">详情</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :gutter="30">
+        <div style="padding: 0px 20px">
+          <search-box :formList="formList" @search="search" @init="init" />
+          <table-list
+            :tableSets="tableSet"
+            :tableData="tableData"
+            :navText="navText"
+            @addClick="addClick"
+            :loading="loading"
+          >
+            <!-- <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="userInfos(props.scope.row)"
+          >学生信息</el-button
+        >
+      </template> -->
+          </table-list>
+          <pagination
+            :total="total"
+            :pageSize="pageSize"
+            :currentPage="currentPage"
+            @handleSizeChange="handleSizeChange"
+            @handleCurrentChange="handleCurrentChange"
+          />
+        </div>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  components: { searchBox, tableList, pagination },
+  data() {
+    return {
+      fullscreen: false,
+      dialogBox: false,
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "学员考试安排",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: true,
+        tableHide:true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      tableSet: [
+        {
+          label: "姓名",
+          prop: "realname",
+          hidden: true,
+        },
+        {
+          label: "手机号",
+          prop: "telphone",
+          hidden: true,
+        },
+        {
+          label: "课程名称",
+          prop: "courseName",
+          hidden: true,
+        },
+        {
+          label: "视频名称",
+          prop: "title",
+          hidden: true,
+        },
+        {
+          label: "开始学习时间",
+          prop: "startTime",
+          hidden: true,
+          scope: 'aTimeList'
+        },
+        {
+          label: "结束学习时间",
+          prop: "endTime",
+          hidden: true,
+          scope: 'aTimeList'
+        },
+        {
+          label: "实际学习时长",
+          prop: "studyDuration",
+          hidden: true,
+          scope: 'time'
+        },
+      ], //表头信息
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      formList: [
+        {
+          label: "开始时间",
+          prop: "TimeList1",
+          scope: "datePicker",
+        },
+        {
+          label: "结束时间",
+          prop: "TimeList2",
+          scope: "datePicker",
+        },
+        {
+          label: "课程名称",
+          prop: "courseName",
+          placeholder: "请输入课程名称",
+        },
+        {
+          label: "视频名称",
+          prop: "title",
+          placeholder: "请输入视频名称",
+        }
+      ], //搜索
+      userId: null
+    };
+  },
+  methods: {
+    getInfos(v){
+      this.userId = v
+      this.search()
+    },
+    search(v) {
+      if (v === undefined) {
+        v = {
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        };
+      }
+      var data = {
+        userId:this.userId,
+        startTime1: v.TimeList1 ? (v.TimeList1[0] / 1000).toFixed(0) : "",
+        startTime2: v.TimeList1 ? (v.TimeList1[1] / 1000).toFixed(0) : "",
+        endTime1: v.TimeList2 ? (v.TimeList2[0] / 1000).toFixed(0) : "",
+        endTime2: v.TimeList2 ? (v.TimeList2[1] / 1000).toFixed(0) : "",
+        courseName: v.courseName,
+        title:v.title,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+       this.loading = true;
+      this.$api.inquirestudyRecordlists(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+        this.dialogBox = true
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
+    addClick(v, int) {},
+    closeBefore() {
+      this.dialogBox = false;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.trLists {
+  td {
+    background-color: rgb(249, 250, 252);
+    font-weight: 600;
+  }
+}
+td {
+  padding: 10px;
+}
+th {
+  padding: 10px;
+  background-color: rgb(249, 250, 252);
+}
+.label {
+  text-align: right;
+  background-color: rgb(249, 250, 252);
+  width: 15%;
+}
+.flex {
+  width: 35%;
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+</style>

+ 22 - 5
src/utils/methodsTool.js

@@ -1,19 +1,36 @@
 const BASE_IMG_URL = 'https://file-dev.xyyxt.net'
 export default {
 	isLogin() {
-		if(uni.getStorageSync('union_id')){
+		if (uni.getStorageSync('union_id')) {
 			return true;
-		}else{
+		} else {
 			return false
 		}
 	},
 	splitImgHost(url) {
-		if(!url){
+		if (!url) {
 			return ''
 		}
-		if(url.indexOf("http") != -1||url.indexOf("https") != -1||url.indexOf("base64") != -1){
+		if (url.indexOf("http") != -1 || url.indexOf("https") != -1 || url.indexOf("base64") != -1) {
 			return url;
 		}
-		return BASE_IMG_URL+ '/' + url
+		return BASE_IMG_URL + '/' + url
 	},
+	onlyForma(timeStamp) {
+		var date = new Date(timeStamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
+		var Y = date.getFullYear() + '-';
+		var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+		var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
+		var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+		var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
+		var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
+		return Y + M + D + ' ' + h + m + s; //时分秒可以根据自己的需求加上
+	},
+	computedAge(birthday) {
+		let birthDayTime = new Date(birthday).getTime(); 
+		//当前时间 毫秒
+		let nowTime = new Date().getTime(); 
+		//一年毫秒数(365 * 86400000 = 31536000000)
+		return Math.ceil((nowTime-birthDayTime)/31536000000);
+	}
 }

+ 2 - 1
src/utils/request.js

@@ -6,7 +6,8 @@ import cookie from '@/utils/cookie'
 
 // axios 配置
 axios.defaults.timeout = 5000; //设置连接超时时间
-axios.defaults.baseURL = "http://192.168.0.222/"; //这是调用数据接口,项目上线的时候修改这个地方就可以了
+axios.defaults.baseURL = "http://192.168.1.222/"; //这是调用数据接口,项目上线的时候修改这个地方就可以了
+// axios.defaults.baseURL = "http://192.168.1.20:9099/"; //这是调用数据接口,项目上线的时候修改这个地方就可以了
 
 // 也可以这样书写
 const service = axios

+ 26 - 0
src/view/courseQuestionBank/courseManagement/index.vue

@@ -107,6 +107,16 @@
                 <template slot="append">元</template>
               </el-input>
             </el-col>
+            <el-col :span="24">
+              <header>排序:</header>
+              <el-input-number
+              :disabled="statusPop === 2"
+                v-model="poppleData.sort"
+                controls-position="right"
+                :min="0"
+                 placeholder="请输入排序"
+              ></el-input-number>
+            </el-col>
           </el-col>
           <el-col :span="12">
             <el-col :span="24">
@@ -440,6 +450,11 @@ export default {
           scope: "time",
           width: "200px",
         },
+        {
+          label: "排序",
+          prop: "sort",
+          hidden: true,
+        },
         {
           label: "启用状态",
           prop: "status",
@@ -712,6 +727,10 @@ export default {
         this.$message.error("请输入价格");
         return;
       }
+      if (this.poppleData.sort === undefined) {
+        this.$message.error("请输入排序");
+        return;
+      }
       if (!this.priceTest.test(this.poppleData.price)) {
         this.$message.error("请输入正确价格");
         this.poppleData.price = "";
@@ -735,6 +754,7 @@ export default {
         duration: 0,
         introduction: this.poppleData.introduction,
         price: this.poppleData.price,
+        sort:this.poppleData.sort,
         status: this.poppleData.status,
         teacherIds: this.poppleData.teacherIds.join(","),
       };
@@ -761,6 +781,7 @@ export default {
       this.$api
         .editCourse(data)
         .then((res) => {
+          console.log(data)
           this.$message.success("修改成功!");
           this.dialogBox = false;
           this.search();
@@ -810,6 +831,10 @@ export default {
         this.$message.error("请输入价格");
         return;
       }
+      if (this.poppleData.sort === undefined) {
+        this.$message.error("请输入排序");
+        return;
+      }
       if (!this.priceTest.test(this.poppleData.price)) {
         this.$message.error("请输入正确价格");
         this.poppleData.price = "";
@@ -831,6 +856,7 @@ export default {
         categoryId: this.poppleData.categoryId,
         courseName: this.poppleData.courseName,
         duration: 0,
+        sort: this.poppleData.sort,
         introduction: this.poppleData.introduction,
         price: this.poppleData.price,
         status: this.poppleData.status,

+ 22 - 4
src/view/courseQuestionBank/questionBankManagement/index.vue

@@ -74,7 +74,7 @@
               <header>题库名称:</header>
               <el-input
                 :disabled="statusPop === 2"
-                placeholder="请输入课程名称"
+                placeholder="请输入课程名称"
                 v-model="poppleData.bankName"
               />
             </el-col>
@@ -97,7 +97,7 @@
                 style="width: 100%"
                 multiple
                 v-model="poppleData.teacherIds"
-                placeholder="请选择主讲名师"
+                placeholder="请选择主讲名师"
               >
                 <el-option
                   v-for="item in optionsTeach"
@@ -111,13 +111,23 @@
             <el-col :span="24">
               <header>价格:</header>
               <el-input
-                placeholder="请输入价格"
+                placeholder="请输入价格"
                 :disabled="statusPop === 2"
                 v-model="poppleData.price"
               >
                 <template slot="append">元</template>
               </el-input>
             </el-col>
+            <el-col :span="24">
+              <header>排序:</header>
+              <el-input-number
+              :disabled="statusPop === 2"
+                v-model="poppleData.sort"
+                controls-position="right"
+                :min="0"
+                 placeholder="请输入排序"
+              ></el-input-number>
+            </el-col>
           </el-col>
           <el-col :span="12">
             <el-col :span="24">
@@ -125,7 +135,10 @@
               <div class="imgBox">
                 <label class="imgLabel" for="inputs">
                   <div class="msPhoto" v-if="poppleData.coverUrl">
-                    <img :src="$methodsTools.splitImgHost(poppleData.coverUrl)" alt="图片加载失败" />
+                    <img
+                      :src="$methodsTools.splitImgHost(poppleData.coverUrl)"
+                      alt="图片加载失败"
+                    />
                   </div>
                   <div class="imgbbx" v-else>
                     <p style="margin-top: 49px">
@@ -1052,6 +1065,10 @@ export default {
         this.$message.error("请输入价格");
         return;
       }
+      if (this.poppleData.sort === undefined) {
+        this.$message.error("请输入排序");
+        return;
+      }
       if (!this.priceTest.test(this.poppleData.price)) {
         this.$message.error("请输入正确价格");
         this.poppleData.price = "";
@@ -1076,6 +1093,7 @@ export default {
         introduction: this.poppleData.introduction,
         price: this.poppleData.price,
         status: this.poppleData.status,
+        sort: this.poppleData.sort,
         teacherIds:
           this.poppleData.typeId !== 3
             ? this.poppleData.teacherIds.join(",")

+ 813 - 4
src/view/eventManagement/activeConfiguration/index.vue

@@ -1,16 +1,825 @@
 <template>
-  <!-- 活动配置 -->
-  <div id="activeConfiguration">活动配置</div>
+  <div id="activeConfiguration">
+    <search-box :formList="formList" @search="search" @init="init" />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 3)"
+          v-if="props.scope.row.status === 2 || props.scope.row.status === 4"
+          >开始</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 1)"
+          v-if="props.scope.row.status === 3"
+          >结束</el-button
+        >
+        <el-button type="text" @click="addClick(props.scope.row, 2)"
+          >详情</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 2)"
+          v-if="props.scope.row.status === 3"
+          >撤回</el-button
+        >
+        <el-button
+          type="text"
+          @click="addClick(props.scope.row, 0)"
+          v-if="props.scope.row.status === 2 || props.scope.row.status === 4"
+          >修改</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 0)"
+          v-if="props.scope.row.status === 4"
+          >删除</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="920px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-col :span="12">
+          <el-col :span="24">
+            <header>活动名称:</header>
+            <el-input
+              :disabled="statusPop === 2"
+              placeholder="请输入活动名称"
+              v-model="formLabelAlign.activityName"
+          /></el-col>
+          <el-col :span="24">
+            <header>活动链接:</header>
+            <el-input
+              :disabled="statusPop === 2"
+              placeholder="请输入活动链接"
+              v-model="formLabelAlign.activityUrl"
+            />
+          </el-col>
+          <el-col :span="24">
+            <header>活动类型:</header>
+            <el-select
+              style="width: 100%"
+              v-model="formLabelAlign.activityType"
+              placeholder="请选择活动类型"
+              :disabled="statusPop === 2"
+            >
+              <el-option
+                v-for="item in activityList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-col>
+          <el-col :span="24" v-if="formLabelAlign.activityType !== 2">
+            <header>活动范围:</header>
+            <el-select
+              style="width: 100%"
+              multiple
+              v-model="formLabelAlign.courses"
+              placeholder="请选择活动类型"
+              :disabled="statusPop === 2"
+            >
+              <el-option
+                v-for="(item, index) in courseList"
+                :key="index"
+                :label="item.courseName"
+                :value="item.courseId"
+              >
+              </el-option>
+            </el-select>
+          </el-col>
+          <el-col :span="24" v-if="formLabelAlign.activityType !== 2">
+            <header>
+              {{
+                formLabelAlign.activityType === 0
+                  ? "金额"
+                  : formLabelAlign.activityType === 1
+                  ? "折扣"
+                  : formLabelAlign.activityType === 3
+                  ? "商品金额"
+                  : formLabelAlign.activityType === 4
+                  ? "优惠金额"
+                  : formLabelAlign.activityType === 5
+                  ? "商品折扣"
+                  : "未定义"
+              }}:
+            </header>
+            <el-input
+              placeholder="请输入"
+              v-model="formLabelAlign.price"
+              :disabled="statusPop === 2"
+            >
+              <template slot="append">{{
+                formLabelAlign.activityType === 0 ||
+                formLabelAlign.activityType === 3 ||
+                formLabelAlign.activityType === 4 ||
+                formLabelAlign.activityType === 5
+                  ? "¥"
+                  : "折"
+              }}</template>
+            </el-input>
+          </el-col>
+          <el-col
+            :span="24"
+            v-if="
+              formLabelAlign.activityType === 0 ||
+              formLabelAlign.activityType === 1
+            "
+          >
+            <header>
+              {{
+                formLabelAlign.activityType === 0
+                  ? "优惠券"
+                  : formLabelAlign.activityType === 1
+                  ? "折扣券"
+                  : "未定义"
+              }}有效期:
+            </header>
+            <el-input
+              placeholder="请输入有效期"
+              v-model="formLabelAlign.couponEnd"
+              :disabled="statusPop === 2"
+            >
+              <template slot="append">月</template>
+            </el-input>
+          </el-col>
+          <el-col :span="24">
+            <header>备注:</header>
+            <el-input
+              :disabled="statusPop === 2"
+              placeholder="请输入备注"
+              v-model="formLabelAlign.description"
+            />
+          </el-col>
+        </el-col>
+        <el-col :span="12">
+          <el-col :span="24">
+            <header>活动图标:</header>
+            <div class="imgBox">
+              <label class="imgLabel" for="inputs">
+                <div class="msPhoto" v-if="formLabelAlign.activityLogo">
+                  <img
+                    :src="
+                      $methodsTools.splitImgHost(formLabelAlign.activityLogo)
+                    "
+                    alt="图片加载失败"
+                  />
+                </div>
+                <div class="imgbbx" v-else>
+                  <p style="margin-top: 49px">点击添加或将文件拖拽到这里上传</p>
+                  <i class="el-icon-plus"></i>
+                  <p style="margin-bottom: 37px">
+                    图片格式:.jpg/.png/jpeg/bmp
+                  </p>
+                </div>
+                <input
+                  id="inputs"
+                  type="file"
+                  ref="file"
+                  :disabled="statusPop === 2"
+                  style="display: none"
+                  @change="getImgFile"
+                />
+              </label>
+              <p>请上传分辨率为100x100且大小小于2m的图片</p>
+            </div>
+          </el-col>
+          <el-col :span="24">
+            <header>活动时间:</header>
+            <el-date-picker
+              :disabled="statusPop === 2"
+              v-model="releaseTime"
+              type="datetimerange"
+              range-separator="~"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              value-format="timestamp"
+            >
+            </el-date-picker>
+          </el-col>
+          <el-col :span="24" v-if="formLabelAlign.activityType === 2">
+            <header>直播内容:</header>
+            <el-input
+              :disabled="statusPop === 2"
+              placeholder="请输入直播内容"
+              v-model="formLabelAlign.liveContent"
+            />
+          </el-col>
+          <el-col :span="24" v-if="formLabelAlign.activityType !== 2">
+            <header>发放数量:</header>
+            <el-input-number
+              :disabled="statusPop === 2"
+              v-model="formLabelAlign.quantity"
+              controls-position="right"
+              :min="0"
+              style="width: 100%"
+            ></el-input-number>
+          </el-col>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="rulesTableSumbit"
+          v-if="statusPop !== 2"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
 export default {
+  components: { searchBox, tableList, pagination },
   data() {
-    return {};
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "活动配置",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      statusPop: 0,
+      fullscreen: false,
+      dialogBox: false,
+      activityList: [
+        {
+          label: "优惠券",
+          value: 0,
+        },
+        {
+          label: "折扣券",
+          value: 1,
+        },
+        {
+          label: "线上直播",
+          value: 2,
+        },
+        {
+          label: "定价",
+          value: 3,
+        },
+        {
+          label: "优惠",
+          value: 4,
+        },
+        {
+          label: "折扣",
+          value: 5,
+        },
+      ],
+      //搜索
+      formList: [
+        {
+          label: "活动类型",
+          prop: "activityType",
+          placeholder: "请选择活动类型",
+          scope: "select",
+          options: [
+            {
+              label: "优惠券",
+              value: 0,
+            },
+            {
+              label: "折扣券",
+              value: 1,
+            },
+            {
+              label: "线上直播",
+              value: 2,
+            },
+            {
+              label: "定价",
+              value: 3,
+            },
+            {
+              label: "优惠",
+              value: 4,
+            },
+            {
+              label: "折扣",
+              value: 5,
+            },
+          ],
+        },
+        {
+          label: "活动状态",
+          prop: "status",
+          placeholder: "请选择活动状态",
+          scope: "select",
+          options: [
+            {
+              label: "已删除",
+              value: 0,
+            },
+            {
+              label: "已结束",
+              value: 1,
+            },
+            {
+              label: "已撤回",
+              value: 2,
+            },
+            {
+              label: "已开始",
+              value: 3,
+            },
+            {
+              label: "未开始",
+              value: 4,
+            },
+          ],
+        },
+        {
+          label: "活动时间",
+          prop: "startTimeList",
+          scope: "datePicker",
+        },
+        {
+          label: "活动名称",
+          prop: "activityName",
+          placeholder: "请输入活动名称",
+        },
+      ],
+      // 表单
+      tableSet: [
+        {
+          label: "活动名称",
+          prop: "activityName",
+          hidden: true,
+        },
+        {
+          label: "活动类型",
+          prop: "activityType",
+          hidden: true,
+          scope: "activityType",
+        },
+        {
+          label: "活动说明",
+          prop: "activityType",
+          hidden: true,
+          scope: "activityRemarks",
+        },
+        {
+          label: "活动时间",
+          prop1: "startTime",
+          prop2: "endTime",
+          hidden: true,
+          scope: "TimeLists",
+        },
+        {
+          label: "活动状态",
+          prop: "status",
+          hidden: true,
+          scope: "statusActivity",
+        },
+        {
+          label: "发放数量",
+          prop: "quantity",
+          hidden: true,
+        },
+        {
+          label: "参与人数",
+          prop: "userNumber",
+          hidden: true,
+        },
+        {
+          label: "备注",
+          prop: "description",
+          hidden: true,
+        },
+      ],
+      formLabelAlign: {},
+      releaseTime: [],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      beif: {},
+      courseList: [],
+    };
+  },
+  mounted() {
+    this.search();
+    this.getCourse();
+  },
+  methods: {
+    getCourse() {
+      this.$api
+        .inquireCourseList({
+          status: 1,
+        })
+        .then((res) => {
+          if (res.code === 200) {
+            this.courseList = res.rows;
+          }
+        });
+    },
+    getImgFile() {
+      var self = this;
+      var file = this.$refs.file.files[0];
+      if (file === undefined) {
+        self.$set(self.formLabelAlign, "activityLogo", "");
+        return;
+      }
+      if (file.size > 2 * 1024 * 1024) {
+        this.$message.error("图片不得大于2MB");
+        return;
+      }
+      var type = this.$refs.file.value.toLowerCase().split(".").splice(-1);
+      if (
+        type[0] != "jpg" &&
+        type[0] != "png" &&
+        type[0] != "jpeg" &&
+        type[0] != "bmp"
+      ) {
+        this.$message.error("上传格式需为:.jpg/.png/.jpeg/bmp");
+        this.$refs.file.value = "";
+        return;
+      }
+      var reader = new FileReader();
+      reader.readAsDataURL(file);
+      reader.onload = function (ev) {
+        self.$set(self.formLabelAlign, "activityLogo", ev.target.result);
+      };
+    },
+    search(v) {
+      this.loading = true;
+      if (v === undefined) {
+        v = {
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        };
+      }
+      var data = {
+        activityName: v.activityName,
+        status: v.status,
+        activityType: v.activityType,
+        startTime: v.startTimeList ? (v.startTimeList[0] / 1000).toFixed(0) : "",
+        endTime: v.startTimeList ? (v.startTimeList[1] / 1000).toFixed(0) : "",
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.$api.inquireActiveConfiguration(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    addClick(v, int) {
+      if (int === undefined) {
+        this.statusPop = 1;
+        this.formLabelAlign = {};
+      } else {
+        this.beif = JSON.stringify(v);
+        this.formLabelAlign = JSON.parse(this.beif);
+        this.releaseTime = [
+          this.formLabelAlign.startTime * 1000,
+          this.formLabelAlign.endTime * 1000,
+        ];
+        this.statusPop = int;
+      }
+      this.dialogBox = true;
+    },
+    closeBefore() {
+      if (this.statusPop === 2) {
+        this.dialogBox = false;
+        this.fullscreen = false;
+      } else {
+        this.$confirm("此操作将关闭窗口, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.dialogBox = false;
+            this.fullscreen = false;
+            this.formLabelAlign = {};
+          })
+          .catch(() => {});
+      }
+    },
+    async rulesTableSumbit() {
+      if (!this.formLabelAlign.activityName) {
+        this.$message.error("请输入活动名称");
+        return;
+      }
+      if (
+        this.formLabelAlign.activityLogo === "" ||
+        this.formLabelAlign.activityLogo === undefined
+      ) {
+        this.$message.error("请上传活动图标");
+        return;
+      }
+      if (!this.formLabelAlign.activityUrl) {
+        this.$message.error("请输入跳转链接");
+        return;
+      }
+      if (!this.releaseTime) {
+        this.$message.error("请选择活动时间");
+        return;
+      }
+      if (this.formLabelAlign.activityType !== 2) {
+        if (this.formLabelAlign.courses.length === 0) {
+          this.$message.error("请选择活动范围");
+          return;
+        }
+        if (
+          this.formLabelAlign.price === "" ||
+          this.formLabelAlign.price == undefined ||
+          this.formLabelAlign.price === null
+        ) {
+          this.$message.error("请选择金额/折扣/优惠金额");
+          return;
+        }
+        if (
+          this.formLabelAlign.quantity === "" ||
+          this.formLabelAlign.quantity == undefined ||
+          this.formLabelAlign.quantity === null
+        ) {
+          this.$message.error("请输入发放数量");
+          return;
+        }
+      } else {
+        if (!this.formLabelAlign.liveContent) {
+          this.$message.error("请输入直播内容");
+          return;
+        }
+      }
+      if (this.statusPop === 0) {
+        var objNew = JSON.parse(this.beif);
+        if (this.formLabelAlign.activityLogo !== objNew.activityLogo) {
+          const awtimg = await this.imgUpload(0);
+        }
+      } else {
+        const awtimg = await this.imgUpload(0);
+      }
+      var data = {
+        activityName: this.formLabelAlign.activityName,
+        activityUrl: this.formLabelAlign.activityUrl,
+        activityType: this.formLabelAlign.activityType,
+        startTime: Number(this.releaseTime[0]) / 1000,
+        endTime: Number(this.releaseTime[1]) / 1000,
+        description: this.formLabelAlign.description,
+        activityLogo: this.formLabelAlign.activityLogo,
+      };
+      if (this.formLabelAlign.activityType !== 2) {
+        if (
+          this.formLabelAlign.activityType === 0 ||
+          this.formLabelAlign.activityType === 1
+        ) {
+          data.couponEnd = this.formLabelAlign.couponEnd;
+        }
+        data.coursesId = this.formLabelAlign.courses;
+        data.price = this.formLabelAlign.price;
+        data.quantity = this.formLabelAlign.quantity;
+      } else {
+        data.liveContent = this.formLabelAlign.liveContent;
+      }
+      if (this.statusPop === 1) {
+        data.status = 4;
+        this.$api.addActiveConfiguration(data).then((sult) => {
+          this.$message.success("添加成功!");
+          this.dialogBox = false;
+          this.search();
+        });
+      } else {
+        data.id = this.formLabelAlign.id;
+        data.status = this.formLabelAlign.status;
+        this.$api.editActiveConfiguration(data).then((sult) => {
+          this.$message.success("修改成功!");
+          this.dialogBox = false;
+          this.search();
+        });
+      }
+    },
+    changeStatus(v, int) {
+      var self = this;
+      var data = {
+        id: v.id,
+        status: int,
+      };
+      this.$api.editActiveConfiguration(data).then((res) => {
+        if (res.code === 200) {
+          if (int === 0) {
+            self.$message.success("删除成功");
+          } else if (int === 1) {
+            self.$message.success("结束成功");
+          } else if (int === 2) {
+            self.$message.success("撤回成功");
+          } else if (int === 3) {
+            self.$message.success("开始成功");
+          }
+          this.search();
+        }
+      });
+    },
+    imgUpload(int) {
+      return new Promise((resolve, reject) => {
+        this.$upload
+          .upload(this.$refs.file.files[0], int)
+          .then((res) => {
+            console.log(res);
+            this.$set(this.formLabelAlign, "activityLogo", res);
+            resolve();
+          })
+          .catch((err) => {
+            this.$message.error("图片上传错误");
+          });
+      });
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
   },
-  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__body {
+    padding: 0;
+    .contentBox {
+      padding: 20px 20px 5px;
+      .el-col {
+        padding: 0px 20px;
+        margin-bottom: 30px;
+        header {
+          margin-bottom: 6px;
+          color: #2f4378;
+          font-size: 14px;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>
+

+ 633 - 4
src/view/eventManagement/advertising/index.vue

@@ -1,16 +1,645 @@
 <template>
-  <!-- 广告发布 -->
-  <div id="advertising">广告发布</div>
+  <div id="advertising">
+    <search-box :formList="formList" @search="search" @init="init" />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row, 2)"
+          >详情</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 3)"
+          v-if="props.scope.row.status === 1 || props.scope.row.status === 2"
+          >发布</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 2)"
+          v-if="props.scope.row.status === 3"
+          >撤回</el-button
+        >
+        <el-button
+          type="text"
+          @click="addClick(props.scope.row, 0)"
+          v-if="props.scope.row.status === 1 || props.scope.row.status === 2"
+          >修改</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 0)"
+          v-if="props.scope.row.status === 1"
+          >删除</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="920px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-col :span="12">
+          <el-col :span="24">
+            <header>广告名称:</header>
+            <el-input
+              :disabled="statusPop === 2"
+              placeholder="请输入广告名称"
+              v-model="formLabelAlign.advName"
+          /></el-col>
+          <el-col :span="24">
+            <header>跳转链接:</header>
+            <el-input
+              :disabled="statusPop === 2"
+              placeholder="请输入跳转链接"
+              v-model="formLabelAlign.jumpUrl"
+            />
+          </el-col>
+          <el-col :span="24">
+            <header>发布方式:</header>
+            <el-radio-group v-model="formLabelAlign.reStatus">
+              <el-radio :label="0" :disabled="statusPop === 2"
+                >手动发布</el-radio
+              >
+              <el-radio :label="1" :disabled="statusPop === 2"
+                >定时发布</el-radio
+              >
+            </el-radio-group>
+          </el-col>
+          <el-col :span="24">
+            <header>有效期:</header>
+            <el-date-picker
+              :disabled="statusPop === 2"
+              v-model="releaseTime"
+              type="datetimerange"
+              range-separator="~"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              value-format="timestamp"
+            >
+            </el-date-picker>
+          </el-col>
+          <el-col :span="24">
+            <header>备注:</header>
+            <el-input
+              :disabled="statusPop === 2"
+              placeholder="请输入备注"
+              v-model="formLabelAlign.remarks"
+            />
+          </el-col>
+        </el-col>
+        <el-col :span="12">
+          <el-col :span="24">
+            <header>广告图片:</header>
+            <div class="imgBox">
+              <label class="imgLabel" for="inputs">
+                <div class="msPhoto" v-if="formLabelAlign.adverUrl">
+                  <img
+                    :src="$methodsTools.splitImgHost(formLabelAlign.adverUrl)"
+                    alt="图片加载失败"
+                  />
+                </div>
+                <div class="imgbbx" v-else>
+                  <p style="margin-top: 49px">点击添加或将文件拖拽到这里上传</p>
+                  <i class="el-icon-plus"></i>
+                  <p style="margin-bottom: 37px">
+                    图片格式:.jpg/.png/jpeg/bmp
+                  </p>
+                </div>
+                <input
+                  id="inputs"
+                  type="file"
+                  ref="file"
+                  :disabled="statusPop === 2"
+                  style="display: none"
+                  @change="getImgFile"
+                />
+              </label>
+              <p>请上传比例为16:9且小于2m的图片</p>
+            </div>
+          </el-col>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="rulesTableSumbit"
+          v-if="statusPop !== 2"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
 export default {
+  components: { searchBox, tableList, pagination },
   data() {
-    return {};
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "广告合计",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      statusPop: 0,
+      fullscreen: false,
+      dialogBox: false,
+      releaseTime: [],
+      //搜索
+      formList: [
+        {
+          label: "发布状态",
+          prop: "status",
+          placeholder: "请选择发布状态",
+          scope: "select",
+          options: [
+            {
+              label: "已删除",
+              value: 0,
+            },
+            {
+              label: "待发布",
+              value: 1,
+            },
+            {
+              label: "已撤回",
+              value: 2,
+            },
+            {
+              label: "已发布",
+              value: 3,
+            },
+          ],
+        },
+        {
+          label: "发布方式",
+          prop: "reStatus",
+          placeholder: "请选择发布方式",
+          scope: "select",
+          options: [
+            {
+              label: "手动发布",
+              value: 0,
+            },
+            {
+              label: "定时发布",
+              value: 1,
+            },
+          ],
+        },
+        {
+          label: "添加时间",
+          prop: "startTimeList",
+          scope: "datePicker",
+        },
+        {
+          label: "发布时间",
+          prop: "issueTimeList",
+          scope: "datePicker",
+        },
+        {
+          label: "到期时间",
+          prop: "TimeList",
+          scope: "datePicker",
+        },
+        {
+          label: "广告名称",
+          prop: "advName",
+          placeholder: "请输入广告名称",
+        },
+      ],
+      // 表单
+      tableSet: [
+        {
+          label: "名称",
+          prop: "advName",
+          hidden: true,
+        },
+        {
+          label: "添加时间",
+          prop: "createTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "发布时间",
+          prop: "startTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "发布方式",
+          prop: "reStatus",
+          hidden: true,
+          scope: "reStatus",
+        },
+        {
+          label: "有效期",
+          prop1: "startTime",
+          prop2: "endTime",
+          hidden: true,
+          scope: "TimeLists",
+        },
+        {
+          label: "发布状态",
+          prop: "status",
+          hidden: true,
+          scope: "statusRe",
+        },
+        {
+          label: "备注",
+          prop: "remarks",
+          hidden: true,
+        },
+      ],
+      formLabelAlign: {
+        reStatus: 1,
+      },
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      beif: {},
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  methods: {
+    getImgFile() {
+      var self = this;
+      var file = this.$refs.file.files[0];
+      if (file === undefined) {
+        self.$set(self.formLabelAlign, "adverUrl", "");
+        return;
+      }
+      if (file.size > 2 * 1024 * 1024) {
+        this.$message.error("图片不得大于2MB");
+        return;
+      }
+      var type = this.$refs.file.value.toLowerCase().split(".").splice(-1);
+      if (
+        type[0] != "jpg" &&
+        type[0] != "png" &&
+        type[0] != "jpeg" &&
+        type[0] != "bmp"
+      ) {
+        this.$message.error("上传格式需为:.jpg/.png/.jpeg/bmp");
+        this.$refs.file.value = "";
+        return;
+      }
+      var reader = new FileReader();
+      reader.readAsDataURL(file);
+      reader.onload = function (ev) {
+        self.$set(self.formLabelAlign, "adverUrl", ev.target.result);
+      };
+    },
+    search(v) {
+      this.loading = true;
+      if (v === undefined) {
+        v = {
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        };
+      }
+      var data = {
+        advName: v.advName || "",
+        status: v.status,
+        reStatus: v.reStatus,
+        startCreateTime: v.startTimeList
+          ? (v.startTimeList[0] / 1000).toFixed(0)
+          : "",
+        endCreateTime: v.startTimeList
+          ? (v.startTimeList[1] / 1000).toFixed(0)
+          : "",
+        starIssueTime: v.issueTimeList
+          ? (v.issueTimeList[0] / 1000).toFixed(0)
+          : "",
+        endIssueTime: v.issueTimeList
+          ? (v.issueTimeList[1] / 1000).toFixed(0)
+          : "",
+        startTime: v.TimeList ? (v.TimeList[0] / 1000).toFixed(0) : "",
+        endTime: v.TimeList ? (v.TimeList[1] / 1000).toFixed(0) : "",
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.$api.inquireAdvertisingStorage(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    addClick(v, int) {
+      if (int === undefined) {
+        this.statusPop = 1;
+        this.formLabelAlign = {};
+      } else {
+        this.beif = JSON.stringify(v);
+        this.formLabelAlign = JSON.parse(this.beif);
+        this.releaseTime = [
+          this.formLabelAlign.startTime * 1000,
+          this.formLabelAlign.endTime * 1000,
+        ];
+        this.statusPop = int;
+      }
+      this.dialogBox = true;
+    },
+    closeBefore() {
+      if (this.statusPop === 2) {
+        this.dialogBox = false;
+        this.fullscreen = false;
+      } else {
+        this.$confirm("此操作将关闭窗口, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.dialogBox = false;
+            this.fullscreen = false;
+            this.formLabelAlign = {};
+          })
+          .catch(() => {});
+      }
+    },
+    async rulesTableSumbit() {
+      if (!this.formLabelAlign.advName) {
+        this.$message.error("请输入广告名称");
+        return;
+      }
+      if (!this.formLabelAlign.jumpUrl) {
+        this.$message.error("请输入跳转链接");
+        return;
+      }
+      if (
+        this.formLabelAlign.reStatus !== 0 &&
+        this.formLabelAlign.reStatus !== 1
+      ) {
+        this.$message.error("请选择发布方式");
+        return;
+      }
+      if (!this.releaseTime) {
+        this.$message.error("请选择有效期");
+        return;
+      }
+      if (
+        this.formLabelAlign.adverUrl === "" ||
+        this.formLabelAlign.adverUrl === undefined
+      ) {
+        this.$message.error("请上传广告图片");
+        return;
+      }
+      if (this.statusPop === 0) {
+        var objNew = JSON.parse(this.beif);
+        if (this.formLabelAlign.adverUrl !== objNew.adverUrl) {
+          const awtimg = await this.imgUpload(0);
+        }
+      } else {
+        const awtimg = await this.imgUpload(0);
+      }
+      var data = {
+        advName: this.formLabelAlign.advName,
+        jumpUrl: this.formLabelAlign.jumpUrl,
+        reStatus: this.formLabelAlign.reStatus,
+        startTime: Number(this.releaseTime[0]) / 1000,
+        endTime: Number(this.releaseTime[1]) / 1000,
+        remarks: this.formLabelAlign.remarks,
+        adverUrl: this.formLabelAlign.adverUrl,
+      };
+      if (this.statusPop === 1) {
+        this.$api.addAdvertisingStorage(data).then((sult) => {
+          this.$message.success("添加成功!");
+          this.dialogBox = false;
+          this.search();
+        });
+      } else {
+        data.id = this.formLabelAlign.id;
+        this.$api.modifyAdvertisingStorage(data).then((sult) => {
+          this.$message.success("修改成功!");
+          this.dialogBox = false;
+          this.search();
+        });
+      }
+    },
+    changeStatus(v, int) {
+      var self = this;
+      var data = {
+        id: v.id,
+        status: int,
+      };
+      this.$api.modifyAdvertisingStorage(data).then((res) => {
+        if (res.code === 200) {
+          if (int === 0) {
+            self.$message.success("删除成功");
+          } else if (int === 2) {
+            self.$message.success("撤回成功");
+          } else if (int === 3) {
+            self.$message.success("发布成功");
+          }
+          this.search();
+        }
+      });
+    },
+    imgUpload(int) {
+      return new Promise((resolve, reject) => {
+        this.$upload
+          .upload(this.$refs.file.files[0], int)
+          .then((res) => {
+            console.log(res);
+            this.$set(this.formLabelAlign, "adverUrl", res);
+            resolve();
+          })
+          .catch((err) => {
+            this.$message.error("图片上传错误");
+          });
+      });
+    },
+    close() {},
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
   },
-  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__body {
+    padding: 0;
+    .contentBox {
+      padding: 20px 20px 5px;
+      .el-col {
+        padding: 0px 20px;
+        margin-bottom: 30px;
+        header {
+          margin-bottom: 6px;
+          color: #2f4378;
+          font-size: 14px;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>
+

+ 532 - 4
src/view/eventManagement/hierarchicalManagement/index.vue

@@ -1,16 +1,544 @@
 <template>
-  <!-- 等级管理 -->
-  <div id="hierarchicalManagement">等级管理</div>
+  <div id="hierarchicalManagement">
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row, 2)"
+          >详情</el-button
+        >
+        <el-button type="text" @click="addClick(props.scope.row, 0)"
+          >修改</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="1040px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <div style="padding: 30rpx">
+        <el-form
+          label-position="right"
+          label-width="80px"
+          :model="formLabelAlign"
+        >
+          <el-row>
+            <el-col :span="24" style="display: flex; align-items: center">
+              <el-form-item label="等级">
+                <el-input-number
+                  v-model="formLabelAlign.grade"
+                  controls-position="right"
+                  :min="1"
+                  :max="10"
+                  size="small"
+                ></el-input-number>
+              </el-form-item>
+              <el-form-item label="等级名称">
+                <el-input
+                  v-model="formLabelAlign.gradeName"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="所需积分">
+                <div style="display: flex; align-items: center">
+                  <el-input-number
+                    v-model="formLabelAlign.needIntegralStart"
+                    controls-position="right"
+                    :min="0"
+                    size="small"
+                  ></el-input-number>
+                  ~
+                  <el-input-number
+                    v-model="formLabelAlign.needIntegralEnd"
+                    controls-position="right"
+                    :min="0"
+                    size="small"
+                  ></el-input-number></div></el-form-item
+            ></el-col>
+            <el-col
+              :span="24"
+              style="display: flex; align-items: center; flex-wrap: wrap"
+              v-for="(item, index) in formLabelAlign.activityGradePrivilegesVo"
+              :key="index"
+            >
+              <el-form-item label="等级特权">
+                <el-select
+                  v-model="item.priType"
+                  placeholder="请选择"
+                  size="small"
+                >
+                  <el-option
+                    v-for="items in options"
+                    :key="items.value"
+                    :label="items.label"
+                    :value="items.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="特权范围" v-if="item.priType !== 2">
+                <el-select
+                  v-model="item.courseVo"
+                  placeholder="特权范围"
+                  clearable
+                  filterable
+                  multiple
+                  collapse-tags
+                >
+                  <el-option
+                    v-for="itemz in optionsList"
+                    :key="itemz.value"
+                    :label="itemz.label"
+                    :value="itemz.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item
+                :label="item.priType === 0 ? '优惠金额' : '折扣'"
+                v-if="item.priType !== 2 || item.priType !== 3"
+              >
+                <el-input v-model="item.couponPrice" size="small">
+                  <template slot="append">¥</template></el-input
+                ></el-form-item
+              >
+              <el-form-item
+                label="有效期"
+                v-if="item.priType !== 2 || item.priType !== 3"
+              >
+                <el-input v-model="item.endTimeSum" size="small"
+                  ><template slot="append">月</template></el-input
+                ></el-form-item
+              >
+              <el-form-item :label="item.priType === 3 ? '课时' : '数量'">
+                <el-input-number
+                  v-model="item.quantity"
+                  controls-position="right"
+                  :min="0"
+                  size="small"
+                ></el-input-number
+              ></el-form-item>
+              <el-form-item label="操作">
+                <el-button @click="delList(index)">删除</el-button>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-button @click="addList">新增</el-button>
+            </el-col>
+            <el-col
+              :span="24"
+              style="display: flex; align-items: center; flex-wrap: wrap"
+            >
+              <el-form-item label="备注">
+                <el-input
+                  type="textarea"
+                  :rows="2"
+                  placeholder="请输入内容"
+                  v-model="formLabelAlign.remarks"
+                >
+                </el-input
+              ></el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="rulesTableSumbit"
+          v-if="statusPop !== 2"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
 export default {
+  components: { searchBox, tableList, pagination },
   data() {
-    return {};
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "查出等级管理",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      // optionsList: [{
+      //   label: '课程',
+      //   value: 1,
+      //   children:[]
+      // },{
+      //   label: '题库',
+      //   value: 2,
+      //   children:[]
+      // }],
+      optionsList: [],
+      options: [
+        {
+          label: "优惠券",
+          value: 0,
+        },
+        {
+          label: "折扣券",
+          value: 1,
+        },
+        {
+          label: "解锁题库",
+          value: 2,
+        },
+        {
+          label: "解锁课程",
+          value: 3,
+        },
+      ],
+      // 表单
+      tableSet: [
+        {
+          label: "等级",
+          prop: "grade",
+          hidden: true,
+        },
+        {
+          label: "名称",
+          prop: "gradeName",
+          hidden: true,
+        },
+        {
+          label: "所需积分",
+          prop1: "needIntegralStart",
+          prop2: "needIntegralEnd",
+          hidden: true,
+          scope: "moreLists",
+        },
+        {
+          label: "用户数量",
+          prop: "userNum",
+          hidden: true,
+        },
+        {
+          label: "备注",
+          prop: "remarks",
+          hidden: true,
+        },
+      ],
+      formLabelAlign: {
+        activityGradePrivilegesVo: [],
+      },
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      statusPop: 0,
+      fullscreen: false,
+      dialogBox: false,
+    };
+  },
+  mounted() {
+    this.search();
+    this.getCn();
+  },
+  methods: {
+    addList() {
+      this.formLabelAlign.activityGradePrivilegesVo.push({});
+    },
+    delList(v) {
+      this.formLabelAlign.activityGradePrivilegesVo.splice(v, 1);
+    },
+    changeList(v) {
+      console.log(v);
+    },
+    getCn() {
+      var self = this;
+      this.$api.inquireCourseList({ status: 1 }).then((res) => {
+        var arrNull = [];
+        res.rows.forEach((item, index) => {
+          arrNull.push({ label: item.courseName, value: item.courseId });
+        });
+        this.optionsList = arrNull;
+      });
+    },
+    search() {
+      this.loading = true;
+      var data = {
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.$api.inquiresystemgradeList(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    closeBefore() {
+      if (this.statusPop === 2) {
+        this.dialogBox = false;
+        this.fullscreen = false;
+      } else {
+        this.$confirm("此操作将关闭窗口, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.dialogBox = false;
+            this.fullscreen = false;
+            this.formLabelAlign = {};
+          })
+          .catch(() => {});
+      }
+    },
+    rulesTableSumbit() {
+      if (
+        this.formLabelAlign.grade === "" ||
+        this.formLabelAlign.grade == undefined ||
+        this.formLabelAlign.grade === null
+      ) {
+        this.$message.error("请输入等级");
+        return;
+      }
+      if (
+        this.formLabelAlign.gradeName === "" ||
+        this.formLabelAlign.gradeName == undefined ||
+        this.formLabelAlign.gradeName === null
+      ) {
+        this.$message.error("请输入等级名称");
+        return;
+      }
+      if (
+        this.formLabelAlign.needIntegralStart === "" ||
+        this.formLabelAlign.needIntegralStart == undefined ||
+        this.formLabelAlign.needIntegralStart === null
+      ) {
+        this.$message.error("请输入所需积分最小值");
+        return;
+      }
+      if (
+        this.formLabelAlign.needIntegralEnd === "" ||
+        this.formLabelAlign.needIntegralEnd == undefined ||
+        this.formLabelAlign.needIntegralEnd === null
+      ) {
+        this.$message.error("请输入所需积分最大值");
+        return;
+      }
+      var data = {
+        grade: this.formLabelAlign.grade,
+        gradeName: this.formLabelAlign.gradeName,
+        needIntegralEnd: this.formLabelAlign.needIntegralEnd,
+        needIntegralStart: this.formLabelAlign.needIntegralStart,
+        remarks: this.formLabelAlign.remarks,
+      };
+      if(this.statusPop === 1){
+        data.activityGradePrivilegeAddBos = this.formLabelAlign.activityGradePrivilegesVo
+        this.$api.addsystemgrade(data).then(res => {
+          if(res.code === 200){
+            this.$message.success('新增成功')
+            this.search()
+            this.dialogBox = false
+          }
+        })
+      }else{
+        data.activityGradePrivilegeEditBos = this.formLabelAlign.activityGradePrivilegesVo
+        data.id = this.formLabelAlign.id
+        this.$api.editsystemgrade(data).then(res => {
+          if(res.code === 200){
+            this.$message.success('修改成功')
+            this.search()
+            this.dialogBox = false
+          }
+        })
+      }
+    },
+    addClick(v, int) {
+      if (int === undefined) {
+        this.statusPop = 1;
+        this.formLabelAlign = {
+          activityGradePrivilegesVo: [],
+        };
+      } else {
+        this.$api.obtainsystemgrade(v.id).then((res) => {
+          if (res.code === 200) {
+            this.formLabelAlign = res.data;
+            this.formLabelAlign.activityGradePrivilegesVo.forEach(
+              (item, index) => {
+                item.priType = Number(item.priType);
+              }
+            );
+          }
+        });
+        this.statusPop = int;
+      }
+      this.dialogBox = true;
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
   },
-  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>
+

+ 657 - 4
src/view/eventManagement/taskManagement/index.vue

@@ -1,16 +1,669 @@
 <template>
-  <!-- 任务管理 -->
-  <div id="taskManagement">任务管理</div>
+  <div id="taskManagement">
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button
+          type="text"
+          v-if="props.scope.row.status === 1"
+          @click="statusChange(props.scope.row, 0)"
+          >关闭</el-button
+        >
+        <el-button
+          type="text"
+          v-if="props.scope.row.status === 0"
+          @click="statusChange(props.scope.row, 1)"
+          >启用</el-button
+        >
+        <el-button type="text" @click="addClick(props.scope.row, 0)"
+          >配置</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="520px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <div>
+        <el-form
+          label-position="right"
+          label-width="80px"
+          :model="formLabelAlign"
+        >
+          <el-form-item label="任务名称">
+            <el-select
+              :disabled="statusPop !== 1"
+              v-model="formLabelAlign.taskType"
+              placeholder="请选择"
+              size="mini"
+            >
+              <el-option
+                v-for="item in optionsList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="初始积分" v-if="formLabelAlign.taskType === 0">
+            <el-input-number
+              v-model="formLabelAlign.startIntegral"
+              controls-position="right"
+              :min="0"
+              size="mini"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item label="最低分数" v-if="formLabelAlign.taskType === 5">
+            <el-input-number
+              v-model="formLabelAlign.minNum"
+              controls-position="right"
+              :min="0"
+              size="mini"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item label="增加积分" v-if="formLabelAlign.taskType === 0">
+            <el-input-number
+              v-model="formLabelAlign.accIntegral"
+              controls-position="right"
+              :min="0"
+              size="mini"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item label="奖励次数" v-if="formLabelAlign.taskType === 5">
+            <el-input-number
+              v-model="formLabelAlign.countDay"
+              controls-position="right"
+              :min="0"
+              size="mini"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item label="最短时长" v-if="formLabelAlign.taskType === 4">
+            <el-input-number
+              v-model="formLabelAlign.longTime"
+              controls-position="right"
+              :min="0"
+              size="mini"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item
+            label="奖励积分"
+            v-if="
+              formLabelAlign.taskType === 1 ||
+              formLabelAlign.taskType === 2 ||
+              formLabelAlign.taskType === 3 ||
+              formLabelAlign.taskType === 4
+            "
+          >
+            <el-input-number
+              size="mini"
+              v-model="formLabelAlign.startIntegral"
+              controls-position="right"
+              :min="0"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item
+            :label="
+              formLabelAlign.taskType === 0 || formLabelAlign.taskType === 4
+                ? '积分上限'
+                : formLabelAlign.taskType === 3
+                ? '分享上限'
+                : '未定义'
+            "
+            v-if="
+              formLabelAlign.taskType === 0 ||
+              formLabelAlign.taskType === 4 ||
+              formLabelAlign.taskType === 3
+            "
+          >
+            <el-input-number
+              size="mini"
+              v-model="formLabelAlign.endIntegral"
+              controls-position="right"
+              :min="0"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item label="积分奖励" v-if="formLabelAlign.taskType === 5">
+            <div
+              v-for="(item, index) in formLabelAlign.activityTaskTimeVo"
+              :key="index"
+            >
+              <el-input-number
+                style="width: 100px"
+                size="mini"
+                v-model="item.startRange"
+                controls-position="right"
+                :min="0"
+              ></el-input-number
+              >~<el-input-number
+                size="mini"
+                style="width: 100px"
+                v-model="item.endRange"
+                controls-position="right"
+                :min="0"
+              ></el-input-number>
+              :
+              <el-input-number
+                size="mini"
+                style="width: 100px"
+                v-model="item.integral"
+                controls-position="right"
+                :min="0"
+              ></el-input-number
+              ><el-button size="mini" @click="delLists(index)">删除</el-button>
+            </div>
+            <el-button size="mini" @click="addListzs">新增</el-button>
+          </el-form-item>
+          <el-form-item label="说明">
+            <el-input
+              type="textarea"
+              :rows="2"
+              placeholder="请输入内容"
+              v-model="formLabelAlign.description"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item label="备注">
+            <el-input
+              type="textarea"
+              :rows="2"
+              placeholder="请输入内容"
+              v-model="formLabelAlign.remarks"
+            >
+            </el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="rulesTableSumbit"
+          v-if="statusPop !== 2"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
 export default {
+  components: { searchBox, tableList, pagination },
   data() {
-    return {};
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "查出任务管理配置",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      statusPop: 0,
+      fullscreen: false,
+      dialogBox: false,
+      // 表单
+      tableSet: [
+        {
+          label: "任务名称",
+          prop: "taskType",
+          hidden: true,
+          scope: "taskType",
+        },
+        {
+          label: "说明",
+          prop: "description",
+          hidden: true,
+        },
+        {
+          label: "状态",
+          prop: "status",
+          hidden: true,
+          scope: "status",
+        },
+        {
+          label: "备注",
+          prop: "remarks",
+          hidden: true,
+        },
+      ],
+      optionsList: [
+        {
+          label: "每日签到",
+          value: 0,
+        },
+        {
+          label: "完善信息",
+          value: 1,
+        },
+        {
+          label: "邀请好友",
+          value: 2,
+        },
+        {
+          label: "每日分享",
+          value: 3,
+        },
+        {
+          label: "视频学习",
+          value: 4,
+        },
+        {
+          label: "模拟考试",
+          value: 5,
+        },
+      ],
+      formLabelAlign: {
+        activityTaskTimeVo: [],
+      },
+      releaseTime: [],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  methods: {
+    delLists(v) {
+      this.formLabelAlign.activityTaskTimeVo.splice(v, 1);
+    },
+    addListzs() {
+      if (!this.formLabelAlign.activityTaskTimeVo) {
+        this.formLabelAlign.activityTaskTimeVo = [{}];
+      } else {
+        this.formLabelAlign.activityTaskTimeVo.push({});
+      }
+    },
+    statusChange(v, int) {
+      var self = this;
+      this.$api.activitytaskeditTask({ id: v.id, status: int }).then((res) => {
+        if (res.code === 200) {
+          if (int === 0) {
+            self.$message.success("关闭成功");
+          }
+          if (int === 1) {
+            self.$message.success("启用成功");
+          }
+        }
+        this.search();
+      });
+    },
+    search() {
+      this.loading = true;
+      var data = {
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.$api.activitytasklist(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    addClick(v, int) {
+      if (int === undefined) {
+        this.statusPop = 1;
+        this.formLabelAlign = {
+          activityTaskTimeVo: [],
+        };
+      } else {
+        this.formLabelAlign = v;
+        this.statusPop = int;
+      }
+      this.dialogBox = true;
+    },
+    closeBefore() {
+      if (this.statusPop === 2) {
+        this.dialogBox = false;
+        this.fullscreen = false;
+      } else {
+        this.$confirm("此操作将关闭窗口, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.dialogBox = false;
+            this.fullscreen = false;
+            this.formLabelAlign = {};
+          })
+          .catch(() => {});
+      }
+    },
+    async rulesTableSumbit() {
+      if (
+        this.formLabelAlign.taskType === "" ||
+        this.formLabelAlign.taskType == undefined ||
+        this.formLabelAlign.taskType === null
+      ) {
+        this.$message.error("请选择任务名称");
+        return;
+      }
+      if (this.formLabelAlign.taskType === 0) {
+        if (
+          this.formLabelAlign.startIntegral === "" ||
+          this.formLabelAlign.startIntegral == undefined ||
+          this.formLabelAlign.startIntegral === null
+        ) {
+          this.$message.error("请输入初始积分");
+          return;
+        }
+        if (
+          this.formLabelAlign.accIntegral === "" ||
+          this.formLabelAlign.accIntegral == undefined ||
+          this.formLabelAlign.accIntegral === null
+        ) {
+          this.$message.error("请输入增加积分");
+          return;
+        }
+        if (
+          this.formLabelAlign.endIntegral === "" ||
+          this.formLabelAlign.endIntegral == undefined ||
+          this.formLabelAlign.endIntegral === null
+        ) {
+          this.$message.error("请输入初始积分");
+          return;
+        }
+      }
+      if (
+        this.formLabelAlign.taskType === 1 ||
+        this.formLabelAlign.taskType === 2
+      ) {
+        if (
+          this.formLabelAlign.startIntegral === "" ||
+          this.formLabelAlign.startIntegral == undefined ||
+          this.formLabelAlign.startIntegral === null
+        ) {
+          this.$message.error("请输入奖励积分");
+          return;
+        }
+      }
+      if (this.formLabelAlign.taskType === 3) {
+        if (
+          this.formLabelAlign.startIntegral === "" ||
+          this.formLabelAlign.startIntegral == undefined ||
+          this.formLabelAlign.startIntegral === null
+        ) {
+          this.$message.error("请输入奖励积分");
+          return;
+        }
+        if (
+          this.formLabelAlign.endIntegral === "" ||
+          this.formLabelAlign.endIntegral == undefined ||
+          this.formLabelAlign.endIntegral === null
+        ) {
+          this.$message.error("请输入分享上限");
+          return;
+        }
+      }
+      if (this.formLabelAlign.taskType === 4) {
+        if (
+          this.formLabelAlign.longTime === "" ||
+          this.formLabelAlign.longTime == undefined ||
+          this.formLabelAlign.longTime === null
+        ) {
+          this.$message.error("请输入最短时长");
+          return;
+        }
+        if (
+          this.formLabelAlign.startIntegral === "" ||
+          this.formLabelAlign.startIntegral == undefined ||
+          this.formLabelAlign.startIntegral === null
+        ) {
+          this.$message.error("请输入奖励积分");
+          return;
+        }
+        if (
+          this.formLabelAlign.endIntegral === "" ||
+          this.formLabelAlign.endIntegral == undefined ||
+          this.formLabelAlign.endIntegral === null
+        ) {
+          this.$message.error("请输入积分上限");
+          return;
+        }
+      }
+      if (this.formLabelAlign.taskType === 5) {
+        if (
+          this.formLabelAlign.minNum === "" ||
+          this.formLabelAlign.minNum == undefined ||
+          this.formLabelAlign.minNum === null
+        ) {
+          this.$message.error("请输入最低分数");
+          return;
+        }
+        if (
+          this.formLabelAlign.countDay === "" ||
+          this.formLabelAlign.countDay == undefined ||
+          this.formLabelAlign.countDay === null
+        ) {
+          this.$message.error("请输入奖励次数");
+          return;
+        }
+        if (this.formLabelAlign.activityTaskTimeVo.length === 0) {
+          this.$message.error("请输入积分奖励");
+          return;
+        }
+      }
+
+      var data = {
+        accIntegral: this.formLabelAlign.accIntegral,
+        countDay: this.formLabelAlign.countDay,
+        description: this.formLabelAlign.description,
+        endIntegral: this.formLabelAlign.endIntegral,
+        longTime: this.formLabelAlign.longTime,
+        minNum: this.formLabelAlign.minNum,
+        remarks: this.formLabelAlign.remarks,
+        startIntegral: this.formLabelAlign.startIntegral,
+        status: 1,
+        taskType: this.formLabelAlign.taskType,
+      };
+      if (this.statusPop === 1) {
+        data.activityTaskTimeAddBo = this.formLabelAlign.activityTaskTimeVo;
+        this.$api.activitytaskaddTask(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("新增成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      } else {
+        data.id = this.formLabelAlign.id;
+        data.activityTaskTimeEditBoList =
+          this.formLabelAlign.activityTaskTimeVo;
+        this.$api.activitytaskeditTask(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("修改成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      }
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
   },
-  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  // .el-dialog__body {
+  //   padding: 0;
+  //   .contentBox {
+  //     padding: 20px 20px 5px;
+  //     .el-col {
+  //       padding: 0px 20px;
+  //       margin-bottom: 30px;
+  //       header {
+  //         margin-bottom: 6px;
+  //         color: #2f4378;
+  //         font-size: 14px;
+  //       }
+  //     }
+  //   }
+  // }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>
+

+ 34 - 32
src/view/examManagement/collegePlan/index.vue

@@ -9,13 +9,9 @@
       :loading="loading"
     >
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="addClick(props.scope.row, 2)"
-          >详情</el-button
+        <el-button type="text" @click="userInfos(props.scope.row)"
+          >学生信息</el-button
         >
-        <el-button type="text" @click="addClick(props.scope.row, 0)"
-          >修改</el-button
-        >
-        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
       </template>
     </table-list>
     <pagination
@@ -25,6 +21,7 @@
       @handleSizeChange="handleSizeChange"
       @handleCurrentChange="handleCurrentChange"
     />
+    <user-info ref="child"></user-info>
   </div>
 </template>
 
@@ -32,8 +29,9 @@
 import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
+import userInfo from "@/components/userInfoS";
 export default {
-  components: { searchBox, tableList, pagination },
+  components: { searchBox, tableList, pagination, userInfo },
   data() {
     return {
       loading: false, //当前表单加载是否加载动画
@@ -59,31 +57,31 @@ export default {
           label: "身份证号",
           prop: "idCard",
           hidden: true,
-          width: '220px'
         },
         {
           label: "考试类型",
-          prop: "examArrangementVo.examType",
+          prop: "examType",
           hidden: true,
         },
         {
-          label: "考试期次",
-          prop: "examArrangementVo.examPeriod",
+          label: "专业",
+          prop: "major",
           hidden: true,
         },
         {
-          label: "考试时间",
-          prop: "examArrangementVo.examArrangementTimeVo.startTime",
+          label: "考试期次",
+          prop: "examArrangementTimeVo",
           hidden: true,
+          scope: "TimeVoBtn",
         },
         {
           label: "考试地点",
-          prop: "examArrangementVo.examAdress",
+          prop: "examAdress",
           hidden: true,
         },
         {
           label: "备注",
-          prop: "examArrangementVo.remarks",
+          prop: "remarks",
           hidden: true,
         },
       ], //表头信息
@@ -105,9 +103,8 @@ export default {
         },
         {
           label: "考试时间",
-          prop: "startTime",
-          placeholder: "选择考试时间",
-          scope: 'datePicker'
+          prop: "TimeList",
+          scope: "datePicker",
         },
         {
           label: "考试期次",
@@ -116,7 +113,7 @@ export default {
         },
         {
           label: "姓名",
-          prop: "examTypeId",
+          prop: "realname",
           placeholder: "请输入姓名",
         },
         {
@@ -133,6 +130,9 @@ export default {
     this.initCascader();
   },
   methods: {
+    userInfos(option) {
+      this.$refs.child.getInfos(option.userId);
+    },
     totalScores() {},
     search(v) {
       if (v === undefined) {
@@ -142,24 +142,26 @@ export default {
         };
       }
       var data = {
-        // categoryId: v.categoryId,
+        examTypeId: v.examTypeId,
+        examPeriod: v.examPeriod,
+        startTime: v.TimeList ? (v.TimeList[0] / 1000).toFixed(0) : "",
+        endTime: v.TimeList ? (v.TimeList[1] / 1000).toFixed(0) : "",
+        realname: v.realname,
+        idCard: v.idCard,
         pageSize: this.pageSize,
         pageNum: this.currentPage,
       };
       this.loading = true;
-      this.$api
-        .arrangementlistExamUser(data)
-        .then((res) => {
-          this.tableData = res.rows;
-          this.total = res.total;
-          this.navText.index = res.total;
-          this.loading = false;
-        })
-        .catch((err) => {
-          this.loading = false;
-        });
+      this.$api.examarrangementlistExamUser(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
     },
-    init() {},
     del() {},
     addClick(v, int) {},
     submit() {},

+ 654 - 4
src/view/examManagement/examArrangement/index.vue

@@ -1,16 +1,666 @@
 <template>
-  <!-- 考试安排 -->
-  <div id="examArrangement">考试安排</div>
+  <div id="examArrangement">
+    <search-box :formList="formList" @search="search" @init="init" />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row, 2)"
+          >详情</el-button
+        >
+        <el-button
+          v-if="
+            props.scope.row.status === 1 ||
+            props.scope.row.status === 2 ||
+            props.scope.row.status === 4
+          "
+          type="text"
+          @click="changeStatus(props.scope.row, 3)"
+          >发布</el-button
+        >
+        <el-button
+          type="text"
+          v-if="
+            props.scope.row.status === 1 ||
+            props.scope.row.status === 2 ||
+            props.scope.row.status === 4
+          "
+          @click="addClick(props.scope.row, 0)"
+          >修改</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 0)"
+          v-if="props.scope.row.status === 1 || props.scope.row.status === 4"
+          >删除</el-button
+        >
+        <el-button
+          type="text"
+          @click="changeStatus(props.scope.row, 2)"
+          v-if="props.scope.row.status === 3"
+          >撤回</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="580px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-form label-position="right" label-width="80px" :model="poppleData">
+          <el-form-item label="考试类型">
+            <el-cascader
+             :disabled="statusPop === 2" 
+              v-model="poppleData.examTypeId"
+              :options="optionsTion"
+              size="small"
+              :props="{
+                label: 'categoryName',
+                value: 'categoryId',
+                checkStrictly: true,
+                emitPath: false,
+              }"
+            ></el-cascader>
+          </el-form-item>
+          <el-form-item label="考试期次">
+            <el-input :disabled="statusPop === 2"  v-model="poppleData.examPeriod"></el-input>
+          </el-form-item>
+          <el-form-item label="报名时间">
+            <el-date-picker
+             :disabled="statusPop === 2" 
+              v-model="poppleData.bmTime1"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              align="right"
+              size="small"
+              value-format="timestamp"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="考试时间">
+            <div v-for="(items, indexs) in poppleData.arays" :key="indexs">
+              <el-date-picker
+               :disabled="statusPop === 2" 
+                v-model="poppleData.arays[indexs]"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                align="right"
+                size="small"
+                value-format="timestamp"
+              >
+              </el-date-picker>
+              <i
+              v-if="statusPop !== 2" 
+                style="color: red; font-size: 20px"
+                class="el-icon-remove"
+                @click="delListsTimes(indexs)"
+              ></i>
+            </div>
+            <i
+             v-if="statusPop !== 2" 
+              style="color: rgb(45, 195, 32); font-size: 20px"
+              class="el-icon-circle-plus"
+              @click="addListsTimes"
+            ></i>
+          </el-form-item>
+          <el-form-item label="考试地点">
+            <el-input :disabled="statusPop === 2"  v-model="poppleData.examAdress"></el-input>
+          </el-form-item>
+          <el-form-item label="报名网址">
+            <el-input :disabled="statusPop === 2"  v-model="poppleData.examUrl"></el-input>
+          </el-form-item>
+          <el-form-item label="备注">
+            <el-input :disabled="statusPop === 2"  type="textarea" v-model="poppleData.remarks"></el-input>
+          </el-form-item>
+          <el-form-item label="发布方式">
+            <el-radio-group v-model="poppleData.releaseNum">
+              <el-radio :disabled="statusPop === 2" :label="0">手动发布</el-radio>
+              <el-radio :disabled="statusPop === 2"  :label="1">定时发布</el-radio>
+            </el-radio-group>
+            <el-date-picker
+            v-if="poppleData.releaseNum === 1"
+             :disabled="statusPop === 2" 
+              v-model="poppleData.releaseTime"
+              type="datetime"
+              placeholder="选择日期时间"
+              size="small"
+              value-format="timestamp"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="rulesTableSumbit"
+          v-if="statusPop !== 2"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
 export default {
+  components: { searchBox, tableList, pagination },
   data() {
-    return {};
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "学员考试安排",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      tableSet: [
+        {
+          label: "考试类型",
+          prop: "examType",
+          hidden: true,
+        },
+        {
+          label: "考试期次",
+          prop: "examPeriod",
+          hidden: true,
+        },
+        {
+          label: "报名时间",
+          prop1: "signStartTime",
+          prop2: "signEndTime",
+          hidden: true,
+          scope: "TimeLists",
+        },
+        {
+          label: "考试时间",
+          prop: "examArrangementTimeVo",
+          hidden: true,
+          scope: "TimeVoBtn",
+        },
+        {
+          label: "考试地点",
+          prop: "examAdress",
+          hidden: true,
+        },
+        {
+          label: "报名网址",
+          prop: "examUrl",
+          hidden: true,
+        },
+        {
+          label: "订阅人数",
+          prop: "subscrPe",
+          hidden: true,
+        },
+        {
+          label: "报名人数",
+          prop: "signUpPe",
+          hidden: true,
+        },
+        {
+          label: "发布时间",
+          prop: "examTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "发布方式",
+          prop: "releaseNum",
+          hidden: true,
+          scope: "releaseType",
+        },
+        {
+          label: "发布状态",
+          prop: "status",
+          hidden: true,
+          scope: "releaseStatus",
+        },
+        {
+          label: "备注",
+          prop: "remarks",
+          hidden: true,
+        },
+      ], //表头信息
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      formList: [
+        {
+          label: "考试类型",
+          prop: "examTypeId",
+          scope: "cascader",
+          placeholder: "选择考试类型",
+          options: [],
+          props: {
+            label: "categoryName",
+            value: "categoryId",
+          },
+        },
+        {
+          label: "报名时间",
+          prop: "TimeList1",
+          scope: "datePicker",
+        },
+        {
+          label: "考试时间",
+          prop: "TimeList2",
+          scope: "datePicker",
+        },
+        {
+          label: "考试期次",
+          prop: "examPeriod",
+          placeholder: "请输入考试期次",
+        },
+      ], //搜索
+      optionsTion: [],
+      statusPop: 0,
+      poppleData: {
+        arays: [],
+      },
+      dialogBox: false,
+      fullscreen: false,
+    };
+  },
+  mounted() {
+    this.search();
+    this.initCascader();
+  },
+  methods: {
+    addListsTimes() {
+      this.poppleData.arays.push([]);
+    },
+    delListsTimes(v) {
+      this.poppleData.arays.splice(v, 1);
+    },
+    search(v) {
+      if (v === undefined) {
+        v = {
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        };
+      }
+      var data = {
+        examTypeId: v.examTypeId,
+        examPeriod: v.examPeriod,
+        signStartTime: v.TimeList1 ? (v.TimeList1[0] / 1000).toFixed(0) : "",
+        signEndTime: v.TimeList1 ? (v.TimeList1[1] / 1000).toFixed(0) : "",
+        startTime: v.TimeList2 ? (v.TimeList2[0] / 1000).toFixed(0) : "",
+        endTime: v.TimeList2 ? (v.TimeList2[1] / 1000).toFixed(0) : "",
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.loading = true;
+      this.$api.examarrangementlist(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    addClick(v, int) {
+      if (int === undefined) {
+        this.statusPop = 1;
+        this.poppleData = {
+          arays: [],
+        };
+      } else {
+        this.$api.examarrangementId(v.id).then((res) => {
+          var arays = [];
+          res.data.bmTime1 = [
+            res.data.signStartTime * 1000,
+            res.data.signEndTime * 1000,
+          ];
+          res.data.releaseTime = Number(res.data.releaseTime) * 1000
+          res.data.examArrangementTimeVo.forEach((item, index) => {
+            arays.push([item.startTime * 1000, item.endTime * 1000]);
+          });
+          res.data.arays = arays;
+          this.poppleData = res.data;
+        });
+        this.statusPop = int;
+      }
+      this.dialogBox = true;
+    },
+    rulesTableSumbit() {
+      if (!this.poppleData.examTypeId) {
+        this.$message.error("请选择考试类型");
+        return;
+      }
+      if (!this.poppleData.examPeriod) {
+        this.$message.error("请输入考试期次");
+        return;
+      }
+      if (
+        this.poppleData.bmTime1 === "" ||
+        this.poppleData.bmTime1 == undefined ||
+        this.poppleData.bmTime1 === null
+      ) {
+        this.$message.error("请选择报名时间");
+        return;
+      }
+      if (this.poppleData.arays.length === 0) {
+        this.$message.error("请选择考试时间");
+        return;
+      }
+      if (!this.poppleData.examAdress) {
+        this.$message.error("请输入考试地点");
+        return;
+      }
+      if (!this.poppleData.examUrl) {
+        this.$message.error("请输入报名网址");
+        return;
+      }
+      if (
+        this.poppleData.releaseNum === "" ||
+        this.poppleData.releaseNum == undefined ||
+        this.poppleData.releaseNum === null
+      ) {
+        this.$message.error("请选择发布方式");
+        return;
+      }
+      if(this.poppleData.releaseNum === 1){
+        if(!this.poppleData.releaseTime){
+          this.$message.error("请选择定时发布时间");
+        return;
+        }
+      }
+      var objs = [];
+      var typeNames = "";
+      this.poppleData.arays.forEach((item, index) => {
+        objs.push({
+          endTime: (item[0] / 1000).toFixed(0),
+          startTime: (item[1] / 1000).toFixed(0),
+        });
+      });
+      this.optionsTion.forEach((item, index) => {
+        if (item.categoryId === this.poppleData.examTypeId) {
+          typeNames = item.categoryName;
+        }
+      });
+      var data = {
+        releaseNum: this.poppleData.releaseNum,
+        remarks: this.poppleData.remarks,
+        examUrl: this.poppleData.examUrl,
+        examAdress: this.poppleData.examAdress,
+        examPeriod: this.poppleData.examPeriod,
+        examType: typeNames,
+        examTypeId: this.poppleData.examTypeId,
+        signStartTime: (this.poppleData.bmTime1[0] / 1000).toFixed(0),
+        signEndTime: (this.poppleData.bmTime1[1] / 1000).toFixed(0),
+        status: this.poppleData.status || 4,
+      };
+      if(this.poppleData.releaseNum === 1){
+        data.releaseTime = (Number(this.poppleData.releaseTime) / 1000).toFixed(0)
+      }
+      if (this.statusPop === 1) {
+        data.examArrangementTimeAddBo = objs;
+        this.$api.addExamexamarrangement(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("添加成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      } else {
+        data.id = this.poppleData.id;
+        data.examArrangementTimeEditBoList = objs;
+        this.$api.editExamexamarrangement(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("修改成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      }
+    },
+    changeStatus(v, int) {
+      this.$api
+        .editExamexamarrangement({ id: v.id, status: int })
+        .then((res) => {
+          if (res.code === 200) {
+            if (int === 3) {
+              this.$message.success("发布成功");
+            } else if (int === 0) {
+              this.$message.success("删除成功");
+            } else if (int === 2) {
+              this.$message.success("撤回成功");
+            }
+            this.search();
+          }
+        });
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
+    //级联选择器数据
+    initCascader() {
+      this.$api
+        .inquireProfessionClassification()
+        .then((res) => {
+          this.arrayChangeType(res.rows);
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 接口数据转换级联类型
+    arrayChangeType(options) {
+      let result = [];
+      if (!Array.isArray(options)) {
+        return result;
+      }
+      options.forEach((item) => {
+        delete item.children;
+      });
+      let map = {};
+      options.forEach((item) => {
+        map[item.categoryId] = item;
+      });
+      options.forEach((item) => {
+        let parent = map[item.pid];
+        if (parent) {
+          (parent.children || (parent.children = [])).push(item);
+        } else {
+          result.push(item);
+        }
+      });
+      result = result.sort(this.sortBy("sort", true));
+      result.forEach((item, index) => {
+        if (item.children) {
+          item.children.sort(this.sortBy("sort", true));
+        }
+      });
+      this.formList.forEach((item, index) => {
+        if (item.prop === "examTypeId") {
+          item.options = result;
+          this.optionsTion = result;
+        }
+      });
+      return result;
+    },
+    closeBefore() {
+      if (this.statusPop === 2) {
+        this.dialogBox = false;
+        this.fullscreen = false;
+      } else {
+        this.$confirm("此操作将关闭窗口, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.dialogBox = false;
+            this.fullscreen = false;
+            this.poppleData = {};
+          })
+          .catch(() => {});
+      }
+    },
+    sortBy(attr, rev) {
+      //第二个参数没有传递 默认升序排列
+      if (rev == undefined) {
+        rev = 1;
+      } else {
+        rev = rev ? 1 : -1;
+      }
+
+      return function (a, b) {
+        a = a[attr];
+        b = b[attr];
+        if (a < b) {
+          return rev * -1;
+        }
+        if (a > b) {
+          return rev * 1;
+        }
+        return 0;
+      };
+    },
   },
-  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
 </style>

+ 547 - 4
src/view/examManagement/examGuide/index.vue

@@ -1,16 +1,559 @@
 <template>
-  <!-- 考试指南 -->
-  <div id="examGuide">考试指南</div>
+  <div id="examGuide">
+    <search-box :formList="formList" @search="search" @init="init" />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row, 2)"
+          >详情</el-button
+        >
+        <el-button
+          v-if="props.scope.row.status === 2 || props.scope.row.status === 3"
+          type="text"
+          @click="changeFBI(props.scope.row, 1)"
+          >发布</el-button
+        >
+        <el-button
+          v-if="props.scope.row.status === 1"
+          type="text"
+          @click="changeFBI(props.scope.row, 2)"
+          >撤回</el-button
+        >
+        <el-button
+          v-if="props.scope.row.status === 2 || props.scope.row.status === 3"
+          type="text"
+          @click="addClick(props.scope.row, 0)"
+          >修改</el-button
+        >
+        <el-button
+          v-if="props.scope.row.status === 3"
+          type="text"
+          @click="changeFBI(props.scope.row, 0)"
+          >删除</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="920px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-col :span="24">
+          <el-col :span="12">
+            <el-col :span="24">
+              <header>考试类型</header>
+              <el-cascader
+                style="width: 100%"
+                v-model="poppleData.examTypeId"
+                :options="optionsTion"
+                :size="'medium'"
+                @change="changeOptions"
+                :disabled="statusPop === 2"
+                clearable
+                :props="{
+                  label: 'categoryName',
+                  value: 'categoryId',
+                  checkStrictly: true,
+                  emitPath: false,
+                }"
+              ></el-cascader>
+            </el-col>
+            <el-col :span="24">
+              <header>专业:</header>
+              <el-input
+                :disabled="statusPop === 2"
+                placeholder="请输入专业:"
+                v-model="poppleData.major"
+              />
+            </el-col>
+          </el-col>
+          <el-col :span="12">
+            <el-col :span="24">
+              <header>指引类型:</header>
+              <el-radio-group
+                v-model="poppleData.typeNum"
+                :disabled="statusPop === 2"
+                style="display: flex"
+              >
+                <el-radio :label="0">报名指引</el-radio>
+                <el-radio :label="1">打印准考证</el-radio>
+                <el-radio :label="2">成绩查询指引</el-radio>
+              </el-radio-group>
+            </el-col>
+          </el-col>
+          <el-col :span="24">
+            <header>考试指南说明:</header>
+            <div
+              style="
+                max-height: 700px;
+                overflow-y: auto;
+                border: 1px solid #e2e2e2;
+                border-radius: 8px;
+                padding: 13px;
+              "
+              v-if="statusPop === 2"
+              v-html="poppleData.typeText"
+            ></div>
+            <editor
+              v-else
+              v-model="poppleData.typeText"
+              :min-height="300"
+              :max-height="700"
+              :uploadStatus="uploadStatus"
+            />
+          </el-col>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="rulesTableSumbit"
+          v-if="statusPop !== 2"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+import Editor from "@/components/Editor";
 export default {
+  components: { searchBox, tableList, pagination, Editor },
   data() {
-    return {};
+    return {
+      uploadStatus: 2, //富文本组件传值
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "考试指南",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      poppleData: {},
+      statusPop: 0,
+      fullscreen: false,
+      dialogBox: false,
+      tableSet: [
+        {
+          label: "考试类型",
+          prop: "examType",
+          hidden: true,
+        },
+        {
+          label: "专业",
+          prop: "major",
+          hidden: true,
+        },
+        {
+          label: "指引类型",
+          prop: "typeNum",
+          hidden: true,
+          scope: "typeStatus",
+        },
+        {
+          label: "指引内容",
+          prop: "typeText",
+          hidden: true,
+        },
+        {
+          label: "发布状态",
+          prop: "status",
+          hidden: true,
+          scope: "statusFB",
+        },
+        {
+          label: "发布时间",
+          prop: "issueTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "备注",
+          prop: "remarks",
+          hidden: true,
+        },
+      ], //表头信息
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      formList: [
+        {
+          label: "考试类型",
+          prop: "examTypeId",
+          scope: "cascader",
+          placeholder: "选择考试类型",
+          options: [],
+          props: {
+            label: "categoryName",
+            value: "categoryId",
+          },
+        },
+      ], //搜索
+      optionsTion: [],
+    };
+  },
+  mounted() {
+    this.search();
+    this.initCascader();
+  },
+  methods: {
+    changeFBI(optoin, v) {
+      this.$api
+        .editGuideexamarrangement({ id: optoin.id, status: v })
+        .then((res) => {
+          if (res.code === 200) {
+            if (v === 0) {
+              this.$message.success("删除成功");
+            } else if (v === 1) {
+              this.$message.success("发布成功");
+            } else if (v === 2) {
+              this.$message.success("撤回成功");
+            }
+            this.search();
+          }
+        });
+    },
+    changeOptions(v) {
+      console.log(v);
+    },
+    closeBefore() {
+      if (this.statusPop === 2) {
+        this.dialogBox = false;
+        this.fullscreen = false;
+      } else {
+        this.$confirm("此操作将关闭窗口, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.dialogBox = false;
+            this.fullscreen = false;
+            this.poppleData = {};
+          })
+          .catch(() => {});
+      }
+    },
+    totalScores() {},
+    search(v) {
+      if (v === undefined) {
+        v = {
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        };
+      }
+      var data = {
+        examTypeId: v.examTypeId,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.loading = true;
+      this.$api.examarrangementlistGuide(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    del() {},
+    addClick(v, int) {
+      if (int === undefined) {
+        this.statusPop = 1;
+      } else {
+        this.statusPop = int;
+        this.poppleData = v;
+      }
+      this.dialogBox = true;
+    },
+    async rulesTableSumbit(v, int) {
+      if (/^\\d+$/.test(this.poppleData.examTypeId)) {
+        this.$message.error("请选择考试类型");
+        return;
+      }
+      if (/^\\d+$/.test(this.poppleData.typeNum)) {
+        this.$message.error("请选择指引类型");
+        return;
+      }
+      if (!this.poppleData.typeText) {
+        this.$message.error("请输入考试指南");
+        return;
+      }
+      var nameCode = "";
+      const awitY = await this.$api.inquireProfessionClassification({
+        status: 1,
+      });
+      awitY.rows.forEach((results, indexs) => {
+        if (results.categoryId === this.poppleData.examTypeId) {
+          nameCode = results.categoryName;
+        }
+      });
+      var data = {
+        examType: nameCode,
+        examTypeId: this.poppleData.examTypeId,
+        major: this.poppleData.major,
+        status: this.poppleData.status || 3,
+        typeNum: this.poppleData.typeNum,
+        typeText: this.poppleData.typeText,
+      };
+      if (this.statusPop === 1) {
+        this.$api.addGuideexamarrangement(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("新增成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      } else {
+        data.id = this.poppleData.id;
+        this.$api.editGuideexamarrangement(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("修改成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      }
+    },
+    close() {
+      this.$confirm("是否关闭该窗口", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {})
+        .catch(() => {});
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
+    //级联选择器数据
+    initCascader() {
+      this.$api
+        .inquireProfessionClassification({ status: 1 })
+        .then((res) => {
+          this.arrayChangeType(res.rows);
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 接口数据转换级联类型
+    arrayChangeType(options) {
+      let result = [];
+      if (!Array.isArray(options)) {
+        return result;
+      }
+      options.forEach((item) => {
+        delete item.children;
+      });
+      let map = {};
+      options.forEach((item) => {
+        map[item.categoryId] = item;
+      });
+      options.forEach((item) => {
+        let parent = map[item.pid];
+        if (parent) {
+          (parent.children || (parent.children = [])).push(item);
+        } else {
+          result.push(item);
+        }
+      });
+      result = result.sort(this.sortBy("sort", true));
+      result.forEach((item, index) => {
+        if (item.children) {
+          item.children.sort(this.sortBy("sort", true));
+        }
+      });
+      this.formList.forEach((item, index) => {
+        if (item.prop === "examTypeId") {
+          item.options = result;
+          this.optionsTion = result;
+        }
+      });
+      return result;
+    },
+    sortBy(attr, rev) {
+      //第二个参数没有传递 默认升序排列
+      if (rev == undefined) {
+        rev = 1;
+      } else {
+        rev = rev ? 1 : -1;
+      }
+
+      return function (a, b) {
+        a = a[attr];
+        b = b[attr];
+        if (a < b) {
+          return rev * -1;
+        }
+        if (a > b) {
+          return rev * 1;
+        }
+        return 0;
+      };
+    },
   },
-  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__body {
+    padding: 0;
+    .contentBox {
+      padding: 20px 20px 5px;
+      .el-col {
+        padding: 0px 20px;
+        margin-bottom: 30px;
+        header {
+          margin-bottom: 6px;
+          color: #2f4378;
+          font-size: 14px;
+        }
+      }
+      .juscon {
+        float: none;
+        width: 50%;
+        margin: 0 auto;
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
 </style>

+ 407 - 82
src/view/orderManagement/orderList/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="orderManagement">
+  <div id="orderList">
     <search-box :formList="formList" @search="search" @init="init" />
     <table-list
       :tableSets="tableSet"
@@ -9,13 +9,9 @@
       :loading="loading"
     >
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="addClick(props.scope.row, 2)"
-          >详情</el-button
+        <el-button type="text" @click="addClick(props.scope.row)"
+          >详情订单</el-button
         >
-        <el-button type="text" @click="addClick(props.scope.row, 0)"
-          >修改</el-button
-        >
-        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
       </template>
     </table-list>
     <pagination
@@ -25,6 +21,169 @@
       @handleSizeChange="handleSizeChange"
       @handleCurrentChange="handleCurrentChange"
     />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="920px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">详情</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-steps
+          :active="
+            poppleData.orderStatus === -2
+              ? 1
+              : poppleData.orderStatus === -1
+              ? 1
+              : poppleData.orderStatus === 0
+              ? 1
+              : poppleData.orderStatus === 1
+              ? 2
+              : poppleData.orderStatus === 3
+              ? 2
+              : 1
+          "
+          style="width: 480px; margin: 0px auto"
+          align-center
+        >
+          <el-step
+            title="确定订单"
+            :description="$methodsTools.onlyForma(poppleData.createTime)"
+          ></el-step>
+          <el-step
+            title="支付订单"
+            :description="
+              poppleData.payTime === null
+                ? '未支付'
+                : $methodsTools.onlyForma(poppleData.payTime)
+            "
+          ></el-step>
+        </el-steps>
+        <div class="statusBox" style="padding-left: 20px">
+          当前订单状态:
+          {{
+            poppleData.orderStatus === -2
+              ? "超时关闭"
+              : poppleData.orderStatus === -1
+              ? "手动关闭"
+              : poppleData.orderStatus === 0
+              ? "待付款"
+              : poppleData.orderStatus === 1
+              ? "已付款"
+              : poppleData.orderStatus === 3
+              ? "订单完成"
+              : "未知"
+          }}
+        </div>
+        <div style="margin-bottom: 10px">
+          <header style="margin-bottom: 10px">基本信息</header>
+          <el-table :data="tableData1" border>
+            <el-table-column
+              v-for="(item, index) in tableSet1"
+              :key="index"
+              align="center"
+              header-align="center"
+              :label="item.label"
+            >
+              <template slot-scope="scope">
+                <span v-if="item.scope === 'typeStatus'">{{
+                  scope.row[item.prop] === 1
+                    ? "微信"
+                    : scope.row[item.prop] === 2
+                    ? "支付宝"
+                    : scope.row[item.prop] === 3
+                    ? "金币"
+                    : "未知"
+                }}</span>
+                <span v-else-if="item.scope === 'activeInfo'">
+                  {{ tableData1[0].orderInfos }}
+                </span>
+                <span v-else>{{ scope.row[item.prop] }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- <div style="margin-bottom: 10px;">
+          <header style="margin-bottom: 10px;">发票信息</header>
+          <el-table :data="tableData2" border>
+            <template slot-scope="scope">
+              <el-table-column
+                v-for="(item, index) in tableSet2"
+                :key="index"
+                align="center"
+                header-align="center"
+                :label="item.label"
+              >
+              <span v-if="item.scope === 'asd'">123</span>
+              <span v-else>123123</span>
+              </el-table-column>
+            </template>
+          </el-table>
+        </div> -->
+        <div style="margin-bottom: 10px">
+          <header style="margin-bottom: 10px">费用信息</header>
+          <table
+            style="width: 100%; border-color: #f2f6fc"
+            border="1"
+            cellpadding="0"
+            cellspacing="0"
+          >
+            <tr class="trs">
+              <th>商品图片</th>
+              <th>商品名称</th>
+              <th>价格</th>
+              <th>属性</th>
+              <th>数量</th>
+              <th>小计</th>
+            </tr>
+            <tr class="trs" v-for="(items, indexs) in tableData3" :key="indexs">
+              <td style="width: 160px; heigth: 90px">
+                <img
+                  style="width: 100%; heigth: 100%"
+                  :src="$methodsTools.splitImgHost(items.coverUrl)"
+                  alt="加载失败..."
+                />
+              </td>
+              <td>{{ items.goodsName }}</td>
+              <td>¥{{ items.goodsPrice }}</td>
+              <td>类型:{{ items.categoryName }}</td>
+              <td>{{ items.num }}</td>
+              <td>¥{{ items.goodsPrice }}</td>
+            </tr>
+            <tr class="yh">
+              <td style="text-align: right" colspan="5">优惠</td>
+              <td style="text-align: center">
+                ¥{{
+                  Number(poppleData.payPrice) - Number(poppleData.orderPrice)
+                }}
+              </td>
+            </tr>
+            <tr class="yh" style="background-color: rgb(249, 250, 252)">
+              <td style="text-align: right" colspan="6">
+                合计:<span style="font-weight: bold; color: red"
+                  >¥{{ poppleData.payPrice }}</span
+                >
+              </td>
+            </tr>
+          </table>
+        </div>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -38,43 +197,22 @@ export default {
     return {
       loading: false, //当前表单加载是否加载动画
       navText: {
-        title: "考题配置",
+        title: "订单列表",
         index: 0,
-        ch: "",
+        ch: "",
         num: true,
         choice: true,
+        addHide: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
         },
       },
-      tableSet: [
-        {
-          label: "订单编号",
-          prop: "oderSn",
-          hidden: true,
-        },
-        {
-          label: "订单完成时间",
-          prop: "finishTime",
-          hidden: true,
-        },
-        {
-          label: "姓名",
-          prop: "userId",
-          hidden: true,
-        },
-        {
-          label: "订单状态",
-          prop: "orderStatus",
-          hidden: true,
-          scope: "orderStatus",
-        },
-      ], //表头信息
-      tableData: [], //表单数据
-      total: 0, //一共多少条
-      pageSize: 10, //每页多少条数据
-      currentPage: 1, //当前页码
+      poppleData: {},
+      statusPop: 0,
+      fullscreen: false,
+      dialogBox: false,
+      //搜索
       formList: [
         {
           label: "订单编号",
@@ -84,8 +222,8 @@ export default {
         {
           label: "订单状态",
           prop: "orderStatus",
+          placeholder: "请选择订单状态",
           scope: "select",
-          placeholder: "选择订单状态",
           options: [
             {
               label: "超时关闭",
@@ -96,80 +234,201 @@ export default {
               value: -1,
             },
             {
-              label: "普通状态",
+              label: "待付款",
               value: 0,
             },
             {
               label: "已付款",
               value: 1,
             },
-            {
-              label: "已完成",
-              value: 2,
-            },
           ],
         },
         {
-          label: '订单完成时间',
-          prop: 'finishTime',
-          scope: 'datePicker'
+          label: "确定时间",
+          prop: "finishTime",
+          scope: "datePicker",
         },
         {
-          label: '姓名',
-          prop: 'userId',
-          placeholder: '请输入姓名'
-        },{
-          label: '订单金额',
-          prop: 'orderPrice',
-          placeholder: '请输入订单金额'
-        }
-      ], //搜索栏
+          label: "姓名",
+          prop: "nickname",
+          placeholder: "请输入姓名",
+        },
+        {
+          label: "手机号",
+          prop: "telphone",
+          placeholder: "请输入手机号",
+        },
+        {
+          label: "订单金额",
+          prop: "payType",
+          placeholder: "请输入订单金额",
+        },
+      ],
+      // 表单
+      tableSet: [
+        {
+          label: "确定时间",
+          prop: "finishTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "姓名",
+          prop: "nickname",
+          hidden: true,
+        },
+        {
+          label: "用户手机号",
+          prop: "telphone",
+          hidden: true,
+        },
+        {
+          label: "订单金额",
+          prop: "orderPrice",
+          hidden: true,
+        },
+        {
+          label: "订单状态",
+          prop: "orderStatus",
+          hidden: true,
+          scope: "statusOrder",
+        },
+      ],
+      //基本信息表格
+      tableSet1: [
+        {
+          label: "订单编号",
+          prop: "oderSn",
+        },
+        {
+          label: "用户账号",
+          prop: "telphone",
+        },
+        {
+          label: "支付方式",
+          prop: "payType",
+          scope: "typeStatus",
+        },
+        {
+          label: "活动信息",
+          prop: "orderInfos",
+          scope: "activeInfo",
+        },
+      ],
+      //发票信息
+      tableSet2: [
+        {
+          label: "发票类型",
+          prop: "finishTime",
+        },
+        {
+          label: "发票抬头",
+          prop: "telphone",
+        },
+        {
+          label: "发票内容",
+          prop: "orderPrice",
+        },
+        {
+          label: "收票人信息",
+          prop: "orderStatus",
+        },
+      ],
+      //费用信息
+      tableSet3: [
+        // {
+        //   label: "商品图片",
+        //   prop: "finishTime",
+        // },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+        },
+        {
+          label: "价格",
+          prop: "goodsPrice",
+        },
+        {
+          label: "属性",
+          prop: "categoryName",
+          scope: "type",
+        },
+        {
+          label: "数量",
+          prop: "num",
+        },
+        {
+          label: "小计",
+          prop: "goodsPrice",
+        },
+      ],
+      tableData: [], //表单数据
+      tableData1: [],
+      tableData2: [],
+      tableData3: [],
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
     };
   },
   mounted() {
     this.search();
   },
   methods: {
-    totalScores() {},
+    rulesTableSumbit() {},
+    closeBefore() {
+      this.dialogBox = false;
+      this.fullscreen = false;
+      this.poppleData = {};
+    },
     search(v) {
+      this.loading = true;
       if (v === undefined) {
         v = {
-          status: "0,1",
           pageSize: this.pageSize,
           pageNum: this.currentPage,
         };
       }
       var data = {
-        categoryId: v.categoryId,
-        status: v.status === undefined ? "0,1" : v.status,
+        oderSn: v.oderSn,
+        orderStatus: v.orderStatus || "",
+        startTime: v.finishTime ? (v.finishTime[0] / 1000).toFixed(0) : "",
+        endTime: v.finishTime ? (v.finishTime[1] / 1000).toFixed(0) : "",
         pageSize: this.pageSize,
         pageNum: this.currentPage,
       };
-      this.loading = true;
-      this.$api
-        .inquireexamconfigList(data)
-        .then((res) => {
-          this.tableData = res.rows;
-          this.total = res.total;
-          this.navText.index = res.total;
-          this.loading = false;
-        })
-        .catch((err) => {
-          this.loading = false;
-        });
+      this.$api.inquireorderlistAll(data).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
     },
-    init() {},
-    del() {},
-    addClick(v, int) {},
-    submit() {},
-    close() {
-      this.$confirm("是否关闭该窗口", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {})
-        .catch(() => {});
+    init() {
+      this.search();
+    },
+    async addClick(v) {
+      console.log(v);
+      var self = this;
+      this.poppleData = v;
+      var tableDatalist = [];
+      tableDatalist.push(v);
+      const awizti = await this.$api.ordercouponlist({ orderSn: v.oderSn });
+      if (awizti.data.length) {
+        console.log(123);
+        var ins = awizti.data[0].couponType === 0 ? "元" : "折";
+        tableDatalist[0].orderInfos =
+          awizti.data[0].activityName + awizti.data[0].price + ins;
+        this.tableData1 = tableDatalist;
+      } else {
+        this.tableData1 = tableDatalist;
+      }
+      this.$api.ordergoodslist({ orderSn: v.oderSn }).then((res) => {
+        if (res.code === 200) {
+          this.tableData3 = res.data;
+        }
+      });
+      this.dialogBox = true;
     },
     handleSizeChange(v) {
       this.pageSize = v;
@@ -185,6 +444,33 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.trs {
+  height: 40px;
+  td {
+    text-align: center;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    max-width: 150px;
+    padding: 6px;
+  }
+  th {
+    background-color: rgb(249, 250, 252);
+  }
+}
+.yh {
+  height: 40px;
+  td {
+    padding: 0px 6px;
+  }
+}
+.statusBox {
+  height: 60px;
+  line-height: 60px;
+  color: red;
+  background-color: #eee;
+  margin: 20px 0px;
+}
 /deep/.el-button {
   border-radius: 8px;
 }
@@ -216,6 +502,21 @@ export default {
       }
     }
   }
+  .el-dialog__body {
+    padding: 0;
+    .contentBox {
+      padding: 20px 20px 5px;
+      .el-col {
+        padding: 0px 20px;
+        margin-bottom: 30px;
+        header {
+          margin-bottom: 6px;
+          color: #2f4378;
+          font-size: 14px;
+        }
+      }
+    }
+  }
   .el-dialog__footer {
     padding: 0;
     .dialog-footer {
@@ -274,4 +575,28 @@ export default {
     margin: 5px 0px;
   }
 }
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>
+

+ 170 - 9
src/view/userManagement/personalManagement/index.vue

@@ -7,11 +7,10 @@
       :navText="navText"
       @addClick="addClick"
       :loading="loading"
+      @getxq="getxq"
     >
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="addClick(props.scope.row, 2)"
-          >详情</el-button
-        >
+        <el-button type="text" @click="xq(props.scope.row)">详情</el-button>
         <el-button type="text" @click="addClick(props.scope.row, 0)"
           >修改</el-button
         >
@@ -25,6 +24,118 @@
       @handleSizeChange="handleSizeChange"
       @handleCurrentChange="handleCurrentChange"
     />
+    <user-info ref="child"></user-info>
+    <user-study-info ref="studyInfo"></user-study-info>
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="780px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="close"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="close" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-steps :active="1" finish-status="success" align-center>
+          <el-step title="基础信息"></el-step>
+          <el-step title="教育信息"></el-step>
+        </el-steps>
+        <el-form
+          label-position="right"
+          label-width="120px"
+          :model="poppleData1"
+          :rules="rules"
+          ref="poppleData1"
+        >
+          <el-form-item label="姓名" prop="realname">
+            <el-input v-model="poppleData1.realname"></el-input>
+          </el-form-item>
+          <el-form-item label="性别" prop="dictCode">
+            <el-radio-group v-model="poppleData1.sex">
+              <el-radio :label="1">男</el-radio>
+              <el-radio :label="2">女</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="身份证">
+            <el-input v-model="poppleData1.idCard"></el-input>
+          </el-form-item>
+          <el-form-item label="手机号码">
+            <el-input v-model="poppleData1.telphone"></el-input>
+          </el-form-item>
+          <el-form-item label="邮箱">
+            <el-input v-model="poppleData1.email"></el-input>
+          </el-form-item>
+          <!-- <el-form-item label="政治面貌">
+            <el-select v-model="poppleData1.politic" placeholder="请选择">
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="婚姻状况">
+            <el-select v-model="poppleData1.marry" placeholder="请选择">
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item> -->
+          <el-form-item label="户籍/国籍">
+            <v-distpicker
+              :province="poppleData1.province"
+              :city="poppleData1.city"
+              :area="poppleData1.district"
+            ></v-distpicker>
+          </el-form-item>
+          <el-form-item label="所在城市">
+            <v-distpicker
+              :province="poppleData1.houseProvince"
+              :city="poppleData1.houseCity"
+              :area="poppleData1.houseDistrict"
+            ></v-distpicker>
+          </el-form-item>
+          <el-form-item label="出生日期">
+            <el-date-picker
+              v-model="poppleData1.userBirth"
+              type="date"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="身份证人像面"> 123 </el-form-item>
+          <el-form-item label="身份证国徽面"> 123 </el-form-item>
+          <el-form-item label="启用状态">
+            <el-radio-group v-model="poppleData1.status">
+              <el-radio :label="1">启用</el-radio>
+              <el-radio :label="0">停用</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-form>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">关闭</el-button>
+        <el-button type="primary">确定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -32,8 +143,18 @@
 import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
+import userInfo from "@/components/userInfoS";
+import userStudyInfo from "@/components/userStudyInfo";
+import VDistpicker from "v-distpicker";
 export default {
-  components: { searchBox, tableList, pagination },
+  components: {
+    searchBox,
+    tableList,
+    pagination,
+    userInfo,
+    userStudyInfo,
+    VDistpicker,
+  },
   data() {
     return {
       loading: false, //当前表单加载是否加载动画
@@ -64,13 +185,23 @@ export default {
           label: "身份证号",
           prop: "idCard",
           hidden: true,
-          width: "220px",
+        },
+        {
+          label: "课程数量",
+          prop: "courseNum",
+          hidden: true,
+        },
+        {
+          label: "学习时长(小时)",
+          prop: "studyTime",
+          hidden: true,
+          scope: "timeBtn",
         },
         {
           label: "账号启用状态",
           prop: "status",
           hidden: true,
-          scope: 'status'
+          scope: "status",
         },
       ], //表头信息
       tableData: [], //表单数据
@@ -116,11 +247,17 @@ export default {
           ],
         },
       ], //搜索
-      // optionsTion: [],
+      fullscreen: false,
+      dialogBox: false,
+      statusPop: 0,
+      poppleData1: {},
+      poppleData2: {},
+      marryList:{},
     };
   },
   mounted() {
     this.search();
+    this.getDictData()
   },
   methods: {
     search(v) {
@@ -154,10 +291,28 @@ export default {
         });
     },
     init() {
-      this.search()
+      this.search();
     },
     del() {},
-    addClick(v, int) {},
+    getDictData(){
+      this.$api.obtaindictdata({dictTypeId:22}).then(res => {
+        this.marryList = res.rows
+      })
+    },
+    addClick(v, int) {
+      this.statusPop = int;
+      this.$api.obtainappuser(v.userId).then((res) => {
+        if (res.code === 200) {
+          this.poppleData1 = res.data;
+        }
+      });
+      this.$api.obtainappuserschoolinfo(v.userId).then((res) => {
+        if (res.code === 200) {
+          this.poppleData2 = res.data;
+        }
+      });
+      this.dialogBox = true;
+    },
     submit() {},
     close() {
       this.$confirm("是否关闭该窗口", "提示", {
@@ -177,6 +332,12 @@ export default {
       this.currentPage = v;
       this.search();
     },
+    xq(option) {
+      this.$refs.child.getInfos(option.userId);
+    },
+    getxq(option) {
+      this.$refs.studyInfo.getInfos(option);
+    },
   },
 };
 </script>

+ 483 - 4
src/view/userManagement/schoolManagement/index.vue

@@ -1,16 +1,495 @@
 <template>
-  <!-- 学校管理 -->
-  <div id="schoolManagement">学校管理</div>
+  <div id="schoolManagement">
+    <search-box :formList="formList" @search="search" @init="init" />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row, 0)"
+          >修改</el-button
+        >
+        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="560px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :before-close="closeBefore"
+      :fullscreen="fullscreen"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-form
+          label-position="right"
+          label-width="120px"
+          :model="poppleData"
+          :rules="rules"
+          ref="poppleData"
+        >
+          <el-form-item label="学校名称" prop="schoolName">
+            <el-input v-model="poppleData.schoolName"></el-input>
+          </el-form-item>
+          <el-form-item label="学校等级" prop="dictCode">
+            <el-select
+              v-model="poppleData.dictCode"
+              placeholder="请选择学校等级"
+            >
+              <el-option
+                v-for="item in optionsList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="是否启用" prop="status">
+            <el-radio-group v-model="poppleData.status">
+              <el-radio :label="1">启用</el-radio>
+              <el-radio :label="0">停用</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="学校联系人">
+            <el-input v-model="poppleData.contact"></el-input>
+          </el-form-item>
+          <el-form-item label="联系方式">
+            <el-input v-model="poppleData.phone"></el-input>
+          </el-form-item>
+          <el-form-item label="优势专业">
+            <el-input v-model="poppleData.advantageSpecialty"></el-input>
+          </el-form-item>
+          <el-form-item label="地点">
+            <el-input v-model="poppleData.address"></el-input>
+          </el-form-item>
+          <el-form-item label="简介">
+            <el-input
+              type="textarea"
+              :rows="2"
+              placeholder="请输入简介"
+              v-model="poppleData.introduction"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeBefore">关闭</el-button>
+        <el-button @click="submitForm('poppleData')" type="primary"
+          >确定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
 export default {
+  components: { searchBox, tableList, pagination },
   data() {
-    return {};
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "查出学校共有",
+        index: 0,
+        ch: "所",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          label: "学校名称",
+          prop: "schoolName",
+          placeholder: "请输入学校名称",
+        },
+        {
+          label: "学校联系人",
+          prop: "contact",
+          placeholder: "请输入学校联系人",
+        },
+        {
+          label: "联系方式",
+          prop: "phone",
+          placeholder: "请输入联系方式",
+        },
+        {
+          label: "学校等级",
+          prop: "dictCode",
+          placeholder: "请选择学校等级",
+          scope: "select",
+          options: [],
+        },
+        {
+          label: "学校状态",
+          prop: "status",
+          placeholder: "请选择学校状态",
+          scope: "select",
+          options: [
+            {
+              label: "启用",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+      ],
+      // 表单
+      tableSet: [
+        {
+          label: "学校名称",
+          prop: "schoolName",
+          hidden: true,
+        },
+        {
+          label: "学校联系人",
+          prop: "contact",
+          hidden: true,
+        },
+        {
+          label: "联系方式",
+          prop: "phone",
+          hidden: true,
+        },
+        {
+          label: "学校等级",
+          prop: "dictLabel",
+          hidden: true,
+        },
+        {
+          label: "优势专业",
+          prop: "advantageSpecialty",
+          hidden: true,
+        },
+        {
+          label: "地址",
+          prop: "address",
+          hidden: true,
+        },
+        {
+          label: "启用状态",
+          prop: "status",
+          hidden: true,
+          scope: "status",
+        },
+        {
+          label: "简介",
+          prop: "introduction",
+          hidden: true,
+        },
+      ],
+      poppleData: {},
+      tableData: [], //表单数据
+      total: 0, //一共多少条+
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      fullscreen: false,
+      dialogBox: false,
+      optionsList: [],
+      statusPop: 0,
+      rules: {
+        schoolName: [
+          { required: true, message: "请输入学校名称", trigger: "blur" },
+        ],
+        dictCode: [
+          { required: true, message: "请选择学校等级", trigger: "change" },
+        ],
+        status: [
+          { required: true, message: "请选择是否启用", trigger: "change" },
+        ],
+      },
+    };
+  },
+  mounted() {
+    this.search();
+    this.getSchoolType();
+  },
+  methods: {
+    getSchoolType() {
+      this.$api.obtaindictdata({ dictTypeId: 11 }).then((res) => {
+        var listsT = [];
+        res.rows.forEach((item, index) => {
+          var ac = {
+            value: item.dictCode,
+            label: item.dictLabel,
+          };
+          listsT.push(ac);
+        });
+        this.formList.forEach((item, index) => {
+          if (item.prop === "dictCode") {
+            item.options = listsT;
+            this.optionsList = listsT;
+          }
+        });
+      });
+    },
+    submitForm(formName) {
+      var self = this;
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          self.rulesTableSumbit();
+        } else {
+          return false;
+        }
+      });
+    },
+    search(v) {
+      this.loading = true;
+      if (v === undefined) {
+        v = {
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        };
+      }
+      var data = {
+        schoolName: v.schoolName,
+        contact: v.contact,
+        phone: v.phone,
+        dictCode: v.dictCode,
+        status: v.status === undefined ? "0,1" : v.status,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.$api.inquireuserschoolList(data).then((res) => {
+        this.tableData = res.data;
+        this.total = res.total;
+        this.navText.index = res.total;
+      });
+      this.loading = false;
+    },
+    init() {
+      this.search();
+    },
+    rulesTableSumbit() {
+      var data = {
+        address: this.poppleData.address,
+        advantageSpecialty: this.poppleData.advantageSpecialty,
+        contact: this.poppleData.contact,
+        dictCode: this.poppleData.dictCode,
+        introduction: this.poppleData.introduction,
+        phone: this.poppleData.phone,
+        schoolCity: this.poppleData.schoolCity,
+        schoolName: this.poppleData.schoolName,
+        status: this.poppleData.status,
+      };
+      if(this.statusPop === 1){
+        this.$api.adduserschool(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("新增成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      }else{
+        data.id = this.poppleData.id
+        this.$api.edituserschool(data).then((res) => {
+          if (res.code === 200) {
+            this.$message.success("修改成功");
+            this.search();
+            this.dialogBox = false;
+          }
+        });
+      }
+    },
+    del(options) {
+      this.$api.edituserschool({ id: options.id, status: -1,schoolName:options.schoolName }).then((res) => {
+        if (res.code === 200) {
+          this.$message.success("删除成功");
+          this.search();
+        }
+      });
+    },
+    closeBefore() {
+      this.dialogBox = false;
+      this.fullscreen = false;
+      this.poppleData = {};
+    },
+    addClick(v, int) {
+      if (v === undefined) {
+        this.statusPop = 1;
+        this.poppleData = {};
+      } else {
+        this.statusPop = int;
+        this.$api.obtainuserschool(v.id).then((res) => {
+          this.poppleData = res.data;
+        });
+      }
+      this.dialogBox = true;
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
   },
-  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__body {
+    padding: 0;
+    .contentBox {
+      padding: 20px 20px 5px;
+      .el-col {
+        padding: 0px 20px;
+        margin-bottom: 30px;
+        header {
+          margin-bottom: 6px;
+          color: #2f4378;
+          font-size: 14px;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>
+