Jelajahi Sumber

第一次提交

谢杰标 2 tahun lalu
induk
melakukan
36b1323b31
100 mengubah file dengan 49 tambahan dan 8990 penghapusan
  1. 1 1
      package.json
  2. 1 164
      src/api/api.js
  3. 0 28
      src/api/education/classManageMent.js
  4. 0 9
      src/api/monitor/cache.js
  5. 0 80
      src/api/monitor/job.js
  6. 0 35
      src/api/monitor/jobLog.js
  7. 0 35
      src/api/monitor/logininfor.js
  8. 0 18
      src/api/monitor/online.js
  9. 0 35
      src/api/monitor/operlog.js
  10. 0 9
      src/api/monitor/server.js
  11. 0 114
      src/api/resource/good.js
  12. 0 39
      src/api/resource/videoManagement.js
  13. 0 47
      src/api/resource/volumeManagement.js
  14. 0 69
      src/api/system/config.js
  15. 0 68
      src/api/system/dept.js
  16. 0 61
      src/api/system/dict/data.js
  17. 0 69
      src/api/system/dict/type.js
  18. 0 60
      src/api/system/menu.js
  19. 0 44
      src/api/system/notice.js
  20. 0 53
      src/api/system/post.js
  21. 0 120
      src/api/system/role.js
  22. 0 144
      src/api/system/user.js
  23. 0 76
      src/api/tool/gen.js
  24. TEMPAT SAMPAH
      src/assets/images/404.png
  25. TEMPAT SAMPAH
      src/assets/images/404@2x.png
  26. TEMPAT SAMPAH
      src/assets/images/Avatar@2x.png
  27. TEMPAT SAMPAH
      src/assets/images/Max@2x.png
  28. TEMPAT SAMPAH
      src/assets/images/bell@2x.png
  29. TEMPAT SAMPAH
      src/assets/images/dc.png
  30. TEMPAT SAMPAH
      src/assets/images/dr.png
  31. TEMPAT SAMPAH
      src/assets/images/idcardF.png
  32. TEMPAT SAMPAH
      src/assets/images/idcardZ.png
  33. TEMPAT SAMPAH
      src/assets/images/imgpng.png
  34. TEMPAT SAMPAH
      src/assets/images/imgsqty.png
  35. TEMPAT SAMPAH
      src/assets/images/left@2x.png
  36. TEMPAT SAMPAH
      src/assets/images/left_slices/left.png
  37. TEMPAT SAMPAH
      src/assets/images/left_slices/left@2x.png
  38. TEMPAT SAMPAH
      src/assets/images/login-background.jpg
  39. TEMPAT SAMPAH
      src/assets/images/loginPage/bag@2x.png
  40. TEMPAT SAMPAH
      src/assets/images/loginPage/bg2@2x.png
  41. TEMPAT SAMPAH
      src/assets/images/loginPage/bg@2x.png
  42. TEMPAT SAMPAH
      src/assets/images/loginPage/card@2x.png
  43. TEMPAT SAMPAH
      src/assets/images/loginPage/kc@2x.png
  44. TEMPAT SAMPAH
      src/assets/images/loginPage/ks@2x.png
  45. TEMPAT SAMPAH
      src/assets/images/loginPage/pass.png
  46. TEMPAT SAMPAH
      src/assets/images/loginPage/passno.png
  47. TEMPAT SAMPAH
      src/assets/images/loginPage/qz@2x.png
  48. TEMPAT SAMPAH
      src/assets/images/loginPage/welcome@2x.png
  49. TEMPAT SAMPAH
      src/assets/images/logo@2x.png
  50. TEMPAT SAMPAH
      src/assets/images/logo@2xS1.png
  51. TEMPAT SAMPAH
      src/assets/images/pdf@3x.png
  52. TEMPAT SAMPAH
      src/assets/images/peopleImg.png
  53. TEMPAT SAMPAH
      src/assets/images/telPhoto.png
  54. TEMPAT SAMPAH
      src/assets/images/登录页3_slices/left@2x.png
  55. TEMPAT SAMPAH
      src/assets/images/登录页3_slices/smile@2x.png
  56. TEMPAT SAMPAH
      src/assets/index_images/sl1.png
  57. TEMPAT SAMPAH
      src/assets/index_images/sl10.png
  58. TEMPAT SAMPAH
      src/assets/index_images/sl11.png
  59. TEMPAT SAMPAH
      src/assets/index_images/sl2.png
  60. TEMPAT SAMPAH
      src/assets/index_images/sl3.png
  61. TEMPAT SAMPAH
      src/assets/index_images/sl4.png
  62. TEMPAT SAMPAH
      src/assets/index_images/sl5.png
  63. TEMPAT SAMPAH
      src/assets/index_images/sl6.png
  64. TEMPAT SAMPAH
      src/assets/index_images/sl7.png
  65. TEMPAT SAMPAH
      src/assets/index_images/sl8.png
  66. TEMPAT SAMPAH
      src/assets/index_images/sl9.png
  67. TEMPAT SAMPAH
      src/assets/logo/logo.png
  68. TEMPAT SAMPAH
      src/assets/model_images/model1.png
  69. TEMPAT SAMPAH
      src/assets/model_images/model2.png
  70. TEMPAT SAMPAH
      src/assets/model_images/model3.png
  71. TEMPAT SAMPAH
      src/assets/model_images/model4.png
  72. TEMPAT SAMPAH
      src/assets/model_images/示例.png
  73. 0 265
      src/components/Comon/batchImportDialog.vue
  74. 0 179
      src/components/Crontab/day.vue
  75. 0 122
      src/components/Crontab/hour.vue
  76. 0 425
      src/components/Crontab/index.vue
  77. 0 120
      src/components/Crontab/min.vue
  78. 0 128
      src/components/Crontab/month.vue
  79. 0 566
      src/components/Crontab/result.vue
  80. 0 133
      src/components/Crontab/second.vue
  81. 0 167
      src/components/Crontab/week.vue
  82. 0 144
      src/components/Crontab/year.vue
  83. 0 21
      src/components/DictData/index.js
  84. 0 379
      src/components/Editor/index.vue
  85. 0 240
      src/components/Study/StudentInfo.vue
  86. 0 245
      src/components/bankInfo.vue
  87. 0 261
      src/components/bankMsg/index.vue
  88. 0 437
      src/components/busIns.vue
  89. 0 353
      src/components/goodsList/index.vue
  90. 0 238
      src/components/modelView/index.vue
  91. 0 67
      src/components/numInput.vue
  92. 0 1014
      src/components/questionBank.vue
  93. 0 194
      src/components/quickLogin/index.vue
  94. 0 192
      src/components/salesmanInfo/index.vue
  95. 0 181
      src/components/searchBox.vue
  96. 14 28
      src/components/searchBoxNew.vue
  97. 12 790
      src/components/tableList.vue
  98. 0 496
      src/components/testPaperPreview/index.vue
  99. 0 227
      src/components/videoPreview/index.vue
  100. 21 0
      src/directive/common/int.js

+ 1 - 1
package.json

@@ -41,7 +41,7 @@
     "af-table-column": "^1.0.3",
     "axios": "0.21.0",
     "clipboard": "2.0.6",
-    "core-js": "3.8.1",
+    "core-js": "^3.30.2",
     "echarts": "4.9.0",
     "element-ui": "2.15.6",
     "file-saver": "^2.0.5",

+ 1 - 164
src/api/api.js

@@ -1,169 +1,6 @@
 
-//新系统API存放位置
-import courseEducationType from '../newApi/courseEducationType'//教育类型
-import courseProjectType from '../newApi/courseProjectType'//项目类型
-import applyAreas from '../newApi/applyAreas'//报考地区
-import business from '../newApi/business'//业务层次
-import certificate from '../newApi/certificate'//证书 
-import subject from '../newApi/subject'//科目/类目
-import testPeriod from '../newApi/testPeriod'//考期
-import colleges from '../newApi/colleges'//院校
-import label from '../newApi/label'//标签
-import professional from '../newApi/professional'//专业
-import streaming from '../newApi/streaming'//课程-流媒体管理
-import festival from '../newApi/festival'//课程-节管理
-import gigChapter from '../newApi/gigChapter'//课程大章
-import modules from '../newApi/modules'//课程模块
-import course from '../newApi/course'//课程管理
-import goods from '../newApi/goods'//商品
-import goodmenuCourses from '../newApi/menuCourse'//课程目录
-import paper from '../newApi/paper' //题库试卷管理
-import bankChapter from '../newApi/bankChapter'//题库大章管理
-import moduleBank from '../newApi/moduleBank'//题库模块管理
-
-
-import pay from '../newApi/pay'//支付
-import payee from '../newApi/payee'//收款方
-import payeeInfo from '../newApi/payeeInfo'//收款方详情
-import source from '../newApi/source'//渠道来源
-import visit from '../newApi/visit'//到访校区
-import serve from '../newApi/serve'//服务模式
-import supply from '../newApi/supply'//供应方
-import nature from '../newApi/nature'//收费
-import cost from '../newApi/cost'//费用类型
-import knowLedge from '../newApi/knowLedge'//知识点
-import appuser from '../newApi/appuser'//客户端用户管理
-import userInformationManagement from '../newApi/userInformationManagement'//用户信息管理
-import roleInfoManagement from '../newApi/roleInfoManagement'//角色信息管理
-import menu from '../newApi/menu'//菜单管理
-import dictdata from '../newApi/dictData'//字典数据
-import dicttype from '../newApi/dictType'//字典类型 
-import ossUpload from '../newApi/ossUpload'//上传文件
-import jobManagement from '../newApi/jobManagement'//岗位管理
-import paperquestion from '../newApi/paperquestion'//题库题目管理
-import department from '../newApi/department'//部门信息管理
-import operationLog from '../newApi/operationLog'//操作日志记录
-import handout from '../newApi/handout'//讲义
-import order from '../newApi/order'//订单
-import orderSheet from '../newApi/orderSheet'//订单计费单
-import classTab from '../newApi/classTab'//班级
-import studentList from '../newApi/studentList'//学员
-import profile from '../newApi/profile'//资料模板
-import notification from '../newApi/notification'//通知
-import notificationFL from '../newApi/notificationFL'//通知分类
-import systemRemind from '../newApi/systemRemind'//提醒设置
-import teacher from '../newApi/teacher'//教师
-import examPlace from '../newApi/examPlace'//考试地点管理
-import examNum from '../newApi/examNum'//考试次数配置管理
-import examapply from '../newApi/examapply'//考试安排
-import qianpeiApi from '../newApi/qianpeiApi'//前培
-import applicationData from '../newApi/applicationData'//报考数据
-import polyv from '../newApi/polyv'//保利威
-import profiles from '../newApi/profiles'//填写资料审核管理
-import profileStamp from '../newApi/profileStamp'//盖章资料审核管理
-import recordList from '../newApi/recordList'//试卷做题记录
-import adv from '../newApi/adv'//广告位管理
-import advList from '../newApi/advList'//广告位发布储存管理
-import answer from '../newApi/answer'//答疑管理
-import rolesBusin from '../newApi/rolesBusin'//角色和业务层次关联
-import reviewer from '../newApi/reviewer'//学时审核用户
-import invoice from '../newApi/invoice'//订单发票
-import orderBusiness from '../newApi/orderBusiness'//录单配置
-import orderConfigBusiness from '../newApi/orderConfigBusiness'//配置详情
-import newOrder from '../newApi/newOrder'//录单管理
-import refund from '../newApi/refund'//退费管理
-import activityRecommend from '../newApi/activityRecommend'//商品推荐管理
-import homeApi from '../newApi/homeApi'//控制台学员数据
-import studyAccountStatus from '../newApi/studyAccountStatus'//学习账号标记
-import mock from '../newApi/mock'//模考管理
-import mockSub from '../newApi/mockSub'//预约模考管理
-import systemExam from '../newApi/systemExam'//模考活动列表
-//分销相关
-
-import poster from '../fxApi/poster'//海报列表
-import temp from '../fxApi/temp'//分销活动列表
-
-
-
 // 导入对应模块------------------------
 export default {
-    ...poster,
-    ...temp,
-    ...courseEducationType,
-    ...courseProjectType,
-    ...applyAreas,
-    ...business,
-    ...certificate,
-    ...subject,
-    ...testPeriod,
-    ...colleges,
-    ...label,
-    ...professional,
-    ...streaming,
-    ...festival,
-    ...pay,
-    ...payee,
-    ...source,
-    ...serve,
-    ...visit,
-    ...supply,
-    ...nature,
-    ...cost,
-    ...gigChapter,
-    ...modules,
-    ...course,
-    ...goods,
-    ...goodmenuCourses,
-    ...knowLedge,
-    ...paper,
-    ...bankChapter,
-    ...moduleBank,
-    ...payeeInfo,
-    ...appuser,
-    ...userInformationManagement,
-    ...roleInfoManagement,
-    ...menu,
-    ...dictdata,
-    ...dicttype,
-    ...ossUpload,
-    ...paperquestion,
-    ...jobManagement,
-    ...department,
-    ...operationLog,
-    ...handout,
-    ...order,
-    ...orderSheet,
-    ...classTab,
-    ...studentList,
-    ...profile,
-    ...notification,
-    ...notificationFL,
-    ...systemRemind,
-    ...teacher,
-    ...examPlace,
-    ...examNum,
-    ...examapply,
-    ...qianpeiApi,
-    ...applicationData,
-    ...polyv,
-    ...profiles,
-    ...profileStamp,
-    ...recordList,
-    ...adv,
-    ...advList,
-    ...answer,
-    ...rolesBusin,
-    ...reviewer,
-    ...invoice,
-    ...orderBusiness,
-    ...orderConfigBusiness,
-    ...newOrder,
-    ...refund,
-    ...activityRecommend,
-    ...homeApi,
-    ...studyAccountStatus,
-    ...mock,
-    ...mockSub,
-    ...systemExam,
+  
 
 }

+ 0 - 28
src/api/education/classManageMent.js

@@ -1,28 +0,0 @@
-import request from '@/utils/request'
-
-// 通过打回二审状态
-export function rollBackPeriod(data) {
-    return request({
-        url: `/grade/grade/confirm/rollbackPeriod`,
-        method: 'post',
-        data
-    })
-}
-
-// 商品关联的班级
-export function getListGoods(query) {
-    return request({
-        url: `/grade/grade/listGoods`,
-        method: 'GET',
-        params: query
-    })
-}
-
-// 更换班级
-export function changeGradeFree(data) {
-    return request({
-        url: `/grade/grade/changeGradeFree`,
-        method: 'post',
-        data
-    })
-}

+ 0 - 9
src/api/monitor/cache.js

@@ -1,9 +0,0 @@
-import request from '@/utils/request'
-
-// 查询缓存详细
-export function getCache() {
-  return request({
-    url: '/monitor/cache',
-    method: 'get'
-  })
-}

+ 0 - 80
src/api/monitor/job.js

@@ -1,80 +0,0 @@
-import request from '@/utils/request'
-
-// 查询定时任务调度列表
-export function listJob(query) {
-  return request({
-    url: '/monitor/job/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询定时任务调度详细
-export function getJob(jobId) {
-  return request({
-    url: '/monitor/job/' + jobId,
-    method: 'get'
-  })
-}
-
-// 新增定时任务调度
-export function addJob(data) {
-  return request({
-    url: '/monitor/job',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改定时任务调度
-export function updateJob(data) {
-  return request({
-    url: '/monitor/job',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除定时任务调度
-export function delJob(jobId) {
-  return request({
-    url: '/monitor/job/' + jobId,
-    method: 'delete'
-  })
-}
-
-// 导出定时任务调度
-export function exportJob(query) {
-  return request({
-    url: '/monitor/job/export',
-    method: 'get',
-    params: query
-  })
-}
-
-// 任务状态修改
-export function changeJobStatus(jobId, status) {
-  const data = {
-    jobId,
-    status
-  }
-  return request({
-    url: '/monitor/job/changeStatus',
-    method: 'put',
-    data: data
-  })
-}
-
-
-// 定时任务立即执行一次
-export function runJob(jobId, jobGroup) {
-  const data = {
-    jobId,
-    jobGroup
-  }
-  return request({
-    url: '/monitor/job/run',
-    method: 'put',
-    data: data
-  })
-}

+ 0 - 35
src/api/monitor/jobLog.js

@@ -1,35 +0,0 @@
-import request from '@/utils/request'
-
-// 查询调度日志列表
-export function listJobLog(query) {
-  return request({
-    url: '/monitor/jobLog/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 删除调度日志
-export function delJobLog(jobLogId) {
-  return request({
-    url: '/monitor/jobLog/' + jobLogId,
-    method: 'delete'
-  })
-}
-
-// 清空调度日志
-export function cleanJobLog() {
-  return request({
-    url: '/monitor/jobLog/clean',
-    method: 'delete'
-  })
-}
-
-// 导出调度日志
-export function exportJobLog(query) {
-  return request({
-    url: '/monitor/jobLog/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 35
src/api/monitor/logininfor.js

@@ -1,35 +0,0 @@
-import request from '@/utils/request'
-
-// 查询登录日志列表
-export function list(query) {
-  return request({
-    url: '/monitor/logininfor/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 删除登录日志
-export function delLogininfor(infoId) {
-  return request({
-    url: '/monitor/logininfor/' + infoId,
-    method: 'delete'
-  })
-}
-
-// 清空登录日志
-export function cleanLogininfor() {
-  return request({
-    url: '/monitor/logininfor/clean',
-    method: 'delete'
-  })
-}
-
-// 导出登录日志
-export function exportLogininfor(query) {
-  return request({
-    url: '/monitor/logininfor/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 18
src/api/monitor/online.js

@@ -1,18 +0,0 @@
-import request from '@/utils/request'
-
-// 查询在线用户列表
-export function list(query) {
-  return request({
-    url: '/monitor/online/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 强退用户
-export function forceLogout(tokenId) {
-  return request({
-    url: '/monitor/online/' + tokenId,
-    method: 'delete'
-  })
-}

+ 0 - 35
src/api/monitor/operlog.js

@@ -1,35 +0,0 @@
-import request from '@/utils/request'
-
-// 查询操作日志列表
-export function list(query) {
-  return request({
-    url: '/monitor/operlog/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 删除操作日志
-export function delOperlog(operId) {
-  return request({
-    url: '/monitor/operlog/' + operId,
-    method: 'delete'
-  })
-}
-
-// 清空操作日志
-export function cleanOperlog() {
-  return request({
-    url: '/monitor/operlog/clean',
-    method: 'delete'
-  })
-}
-
-// 导出操作日志
-export function exportOperlog(query) {
-  return request({
-    url: '/monitor/operlog/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 9
src/api/monitor/server.js

@@ -1,9 +0,0 @@
-import request from '@/utils/request'
-
-// 查询服务器详细
-export function getServer() {
-  return request({
-    url: '/monitor/server',
-    method: 'get'
-  })
-}

+ 0 - 114
src/api/resource/good.js

@@ -1,114 +0,0 @@
-import request from '@/utils/request'
-
-// 查询模板列表
-export function getSpecList(query) {
-    return request({
-        url: '/system/template/list',
-        method: 'get',
-        params: query
-    })
-}
-
-// 企业列表
-export function getTenantList(query) {
-    return request({
-        url: '/common/tenant/list',
-        method: 'get',
-        params: query
-    })
-}
-// 商品复制
-export function goodsCopy(data) {
-    return request({
-        url: `/goods/batch/copy/add`,
-        method: 'post',
-        data
-    })
-}
-
-// 新增或修改模板
-export function changeSpec(data) {
-    return request({
-        url: `/system/template/${data.specTemplateId ? 'edit' : 'addSpec'}`,
-        method: 'post',
-        data
-    })
-}
-
-
-// 删除规格模板
-export function delSpec(id) {
-    return request({
-        url: '/system/template/del/' + id,
-        method: 'get',
-    })
-}
-
-// 模板详情
-export function getSpecDetail(id) {
-    return request({
-        url: '/system/template/detail/' + id,
-        method: 'get',
-    })
-}
-
-// 新增规格属性关联
-export function relation(data, b) {
-    return request({
-        url: `/system/relation/${b ? 'edit' : ''}`,
-        method: 'post',
-        data
-    })
-}
-
-// 获得商品模板列表
-export function getGoodsSpecList(id) {
-    return request({
-        url: '/goods/spec/list/' + id,
-        method: 'get',
-    })
-}
-
-// 修改商品默认规格模板
-export function goodsUpdateSpec(data) {
-    return request({
-        url: `/goods/update/spec`,
-        method: 'post',
-        data
-    })
-}
-
-// 商品批量上下架
-export function goodsUpdateStatus(data) {
-    return request({
-        url: `/goods/batch/updateStatus`,
-        method: 'post',
-        data
-    })
-}
-
-// 商品批量删除
-export function goodsDel(data) {
-    return request({
-        url: `/goods/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-// 商品取消绑定规格模板
-export function goodCancelBind(data) {
-    return request({
-        url: `/goods/cancel/spec`,
-        method: 'post',
-        data
-    })
-}
-// 新增每日一练试卷时间
-export function addExamTime(data) {
-    return request({
-        url: `/goods/addExamTime`,
-        method: 'post',
-        data
-    })
-}

+ 0 - 39
src/api/resource/videoManagement.js

@@ -1,39 +0,0 @@
-import request from '@/utils/request'
-
-// 课程批量删除
-export function courseBatchDel(data) {
-    return request({
-        url: `/course/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-
-// 模块批量删除
-export function moduleBatchDel(data) {
-    return request({
-        url: `/course/module/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-// 章批量删除
-export function chapterBatchDel(data) {
-    return request({
-        url: `/course/chapter/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-
-// 节批量删除
-export function sectionBatchDel(data) {
-    return request({
-        url: `/course/section/batch/del`,
-        method: 'post',
-        data
-    })
-}

+ 0 - 47
src/api/resource/volumeManagement.js

@@ -1,47 +0,0 @@
-import request from '@/utils/request'
-
-// 模块卷批量删除
-export function moduleVolumeBatchDel(data) {
-    return request({
-        url: `/bank/module/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-// 章批量删除
-export function chapterVolumeBatchDel(data) {
-    return request({
-        url: `/bank/chapter/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-
-// 试卷批量删除
-export function paperBatchDel(data) {
-    return request({
-        url: `/bank/exam/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-// 题目批量删除
-export function questionBatchDel(data) {
-    return request({
-        url: `/bank/question/batch/del`,
-        method: 'post',
-        data
-    })
-}
-
-// 知识点列表
-export function knowledgeList(query) {
-    return request({
-        url: `/exam/knowledge/list`,
-        method: 'get',
-        params: query
-    })
-}

+ 0 - 69
src/api/system/config.js

@@ -1,69 +0,0 @@
-import request from '@/utils/request'
-
-// 查询参数列表
-export function listConfig(query) {
-  return request({
-    url: '/system/config/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询参数详细
-export function getConfig(configId) {
-  return request({
-    url: '/system/config/' + configId,
-    method: 'get'
-  })
-}
-
-// 根据参数键名查询参数值
-export function getConfigKey(configKey) {
-  return request({
-    url: '/system/config/configKey/' + configKey,
-    method: 'get'
-  })
-}
-
-// 新增参数配置
-export function addConfig(data) {
-  return request({
-    url: '/system/config',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改参数配置
-export function updateConfig(data) {
-  return request({
-    url: '/system/config',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除参数配置
-export function delConfig(configId) {
-  return request({
-    url: '/system/config/' + configId,
-    method: 'delete'
-  })
-}
-
-// 刷新参数缓存
-export function refreshCache() {
-  return request({
-    url: '/system/config/refreshCache',
-    method: 'delete'
-  })
-}
-
-// 导出参数
-export function exportConfig(query) {
-  return request({
-    url: '/system/config/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 68
src/api/system/dept.js

@@ -1,68 +0,0 @@
-import request from '@/utils/request'
-
-// 查询部门列表
-export function listDept(query) {
-  return request({
-    url: '/system/dept/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询部门列表(排除节点)
-export function listDeptExcludeChild(deptId) {
-  return request({
-    url: '/system/dept/list/exclude/' + deptId,
-    method: 'get'
-  })
-}
-
-// 查询部门详细
-export function getDept(deptId) {
-  return request({
-    url: '/system/dept/' + deptId,
-    method: 'get'
-  })
-}
-
-// 查询部门下拉树结构
-export function treeselect() {
-  return request({
-    url: '/system/dept/treeselect',
-    method: 'get'
-  })
-}
-
-// 根据角色ID查询部门树结构
-export function roleDeptTreeselect(roleId) {
-  return request({
-    url: '/system/dept/roleDeptTreeselect/' + roleId,
-    method: 'get'
-  })
-}
-
-// 新增部门
-export function addDept(data) {
-  return request({
-    url: '/system/dept',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改部门
-export function updateDept(data) {
-  return request({
-    url: '/system/dept',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除部门
-export function delDept(deptId) {
-  return request({
-    url: '/system/dept/' + deptId,
-    method: 'delete'
-  })
-}

+ 0 - 61
src/api/system/dict/data.js

@@ -1,61 +0,0 @@
-import request from '@/utils/request'
-
-// 查询字典数据列表
-export function listData(query) {
-  return request({
-    url: '/system/dict/data/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询字典数据详细
-export function getData(dictCode) {
-  return request({
-    url: '/system/dict/data/' + dictCode,
-    method: 'get'
-  })
-}
-
-// 根据字典类型查询字典数据信息
-export function getDicts(dictType) {
-  return request({
-    url: '/system/dict/data/type/' + dictType,
-    method: 'get'
-  })
-}
-
-// 新增字典数据
-export function addData(data) {
-  return request({
-    url: '/system/dict/data',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改字典数据
-export function updateData(data) {
-  return request({
-    url: '/system/dict/data',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除字典数据
-export function delData(dictCode) {
-  return request({
-    url: '/system/dict/data/' + dictCode,
-    method: 'delete'
-  })
-}
-
-// 导出字典数据
-export function exportData(query) {
-  return request({
-    url: '/system/dict/data/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 69
src/api/system/dict/type.js

@@ -1,69 +0,0 @@
-import request from '@/utils/request'
-
-// 查询字典类型列表
-export function listType(query) {
-  return request({
-    url: '/system/dict/type/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询字典类型详细
-export function getType(dictId) {
-  return request({
-    url: '/system/dict/type/' + dictId,
-    method: 'get'
-  })
-}
-
-// 新增字典类型
-export function addType(data) {
-  return request({
-    url: '/system/dict/type',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改字典类型
-export function updateType(data) {
-  return request({
-    url: '/system/dict/type',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除字典类型
-export function delType(dictId) {
-  return request({
-    url: '/system/dict/type/' + dictId,
-    method: 'delete'
-  })
-}
-
-// 刷新字典缓存
-export function refreshCache() {
-  return request({
-    url: '/system/dict/type/refreshCache',
-    method: 'delete'
-  })
-}
-
-// 导出字典类型
-export function exportType(query) {
-  return request({
-    url: '/system/dict/type/export',
-    method: 'get',
-    params: query
-  })
-}
-
-// 获取字典选择框列表
-export function optionselect() {
-  return request({
-    url: '/system/dict/type/optionselect',
-    method: 'get'
-  })
-}

+ 0 - 60
src/api/system/menu.js

@@ -1,60 +0,0 @@
-import request from '@/utils/request'
-
-// 查询菜单列表
-export function listMenu(query) {
-  return request({
-    url: '/system/menu/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询菜单详细
-export function getMenu(menuId) {
-  return request({
-    url: '/system/menu/' + menuId,
-    method: 'get'
-  })
-}
-
-// 查询菜单下拉树结构
-export function treeselect() {
-  return request({
-    url: '/system/menu/treeselect',
-    method: 'get'
-  })
-}
-
-// 根据角色ID查询菜单下拉树结构
-export function roleMenuTreeselect(roleId) {
-  return request({
-    url: '/system/menu/roleMenuTreeselect/' + roleId,
-    method: 'get'
-  })
-}
-
-// 新增菜单
-export function addMenu(data) {
-  return request({
-    url: '/system/menu',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改菜单
-export function updateMenu(data) {
-  return request({
-    url: '/system/menu',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除菜单
-export function delMenu(menuId) {
-  return request({
-    url: '/system/menu/' + menuId,
-    method: 'delete'
-  })
-}

+ 0 - 44
src/api/system/notice.js

@@ -1,44 +0,0 @@
-import request from '@/utils/request'
-
-// 查询公告列表
-export function listNotice(query) {
-  return request({
-    url: '/system/notice/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询公告详细
-export function getNotice(noticeId) {
-  return request({
-    url: '/system/notice/' + noticeId,
-    method: 'get'
-  })
-}
-
-// 新增公告
-export function addNotice(data) {
-  return request({
-    url: '/system/notice',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改公告
-export function updateNotice(data) {
-  return request({
-    url: '/system/notice',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除公告
-export function delNotice(noticeId) {
-  return request({
-    url: '/system/notice/' + noticeId,
-    method: 'delete'
-  })
-}

+ 0 - 53
src/api/system/post.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询岗位列表
-export function listPost(query) {
-  return request({
-    url: '/system/post/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询岗位详细
-export function getPost(postId) {
-  return request({
-    url: '/system/post/' + postId,
-    method: 'get'
-  })
-}
-
-// 新增岗位
-export function addPost(data) {
-  return request({
-    url: '/system/post',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改岗位
-export function updatePost(data) {
-  return request({
-    url: '/system/post',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除岗位
-export function delPost(postId) {
-  return request({
-    url: '/system/post/' + postId,
-    method: 'delete'
-  })
-}
-
-// 导出岗位
-export function exportPost(query) {
-  return request({
-    url: '/system/post/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 120
src/api/system/role.js

@@ -1,120 +0,0 @@
-import request from '@/utils/request'
-
-// 查询角色列表
-export function listRole(query) {
-  return request({
-    url: '/system/role/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询角色详细
-export function getRole(roleId) {
-  return request({
-    url: '/system/role/' + roleId,
-    method: 'get'
-  })
-}
-
-// 新增角色
-export function addRole(data) {
-  return request({
-    url: '/system/role',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改角色
-export function updateRole(data) {
-  return request({
-    url: '/system/role',
-    method: 'put',
-    data: data
-  })
-}
-
-// 角色数据权限
-export function dataScope(data) {
-  return request({
-    url: '/system/role/dataScope',
-    method: 'put',
-    data: data
-  })
-}
-
-// 角色状态修改
-export function changeRoleStatus(roleId, status) {
-  const data = {
-    roleId,
-    status
-  }
-  return request({
-    url: '/system/role/changeStatus',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除角色
-export function delRole(roleId) {
-  return request({
-    url: '/system/role/' + roleId,
-    method: 'delete'
-  })
-}
-
-// 导出角色
-export function exportRole(query) {
-  return request({
-    url: '/system/role/export',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询角色已授权用户列表
-export function allocatedUserList(query) {
-  return request({
-    url: '/system/role/authUser/allocatedList',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询角色未授权用户列表
-export function unallocatedUserList(query) {
-  return request({
-    url: '/system/role/authUser/unallocatedList',
-    method: 'get',
-    params: query
-  })
-}
-
-// 取消用户授权角色
-export function authUserCancel(data) {
-  return request({
-    url: '/system/role/authUser/cancel',
-    method: 'put',
-    data: data
-  })
-}
-
-// 批量取消用户授权角色
-export function authUserCancelAll(data) {
-  return request({
-    url: '/system/role/authUser/cancelAll',
-    method: 'put',
-    params: data
-  })
-}
-
-// 授权用户选择
-export function authUserSelectAll(data) {
-  return request({
-    url: '/system/role/authUser/selectAll',
-    method: 'put',
-    params: data
-  })
-}

+ 0 - 144
src/api/system/user.js

@@ -1,144 +0,0 @@
-import request from '@/utils/request'
-import { praseStrEmpty } from "@/utils/ruoyi";
-
-// 查询用户列表
-export function listUser(query) {
-  return request({
-    url: '/system/user/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询用户详细
-export function getUser(userId) {
-  return request({
-    url: '/system/user/' + praseStrEmpty(userId),
-    method: 'get'
-  })
-}
-
-// 新增用户
-export function addUser(data) {
-  return request({
-    url: '/system/user',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改用户
-export function updateUser(data) {
-  return request({
-    url: '/system/user',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除用户
-export function delUser(userId) {
-  return request({
-    url: '/system/user/' + userId,
-    method: 'delete'
-  })
-}
-
-// 导出用户
-export function exportUser(query) {
-  return request({
-    url: '/system/user/export',
-    method: 'get',
-    params: query
-  })
-}
-
-// 用户密码重置
-export function resetUserPwd(userId, password) {
-  const data = {
-    userId,
-    password
-  }
-  return request({
-    url: '/system/user/resetPwd',
-    method: 'put',
-    data: data
-  })
-}
-
-// 用户状态修改
-export function changeUserStatus(userId, status) {
-  const data = {
-    userId,
-    status
-  }
-  return request({
-    url: '/system/user/changeStatus',
-    method: 'put',
-    data: data
-  })
-}
-
-// 查询用户个人信息
-export function getUserProfile() {
-  return request({
-    url: '/system/user/profile',
-    method: 'get'
-  })
-}
-
-// 修改用户个人信息
-export function updateUserProfile(data) {
-  return request({
-    url: '/system/user/profile',
-    method: 'put',
-    data: data
-  })
-}
-
-// 用户密码重置
-export function updateUserPwd(oldPassword, newPassword) {
-  const data = {
-    oldPassword,
-    newPassword
-  }
-  return request({
-    url: '/system/user/profile/updatePwd',
-    method: 'put',
-    params: data
-  })
-}
-
-// 用户头像上传
-export function uploadAvatar(data) {
-  return request({
-    url: '/system/user/profile/avatar',
-    method: 'post',
-    data: data
-  })
-}
-
-// 下载用户导入模板
-export function importTemplate() {
-  return request({
-    url: '/system/user/importTemplate',
-    method: 'get'
-  })
-}
-
-// 查询授权角色
-export function getAuthRole(userId) {
-  return request({
-    url: '/system/user/authRole/' + userId,
-    method: 'get'
-  })
-}
-
-// 保存授权角色
-export function updateAuthRole(data) {
-  return request({
-    url: '/system/user/authRole',
-    method: 'put',
-    params: data
-  })
-}

+ 0 - 76
src/api/tool/gen.js

@@ -1,76 +0,0 @@
-import request from '@/utils/request'
-
-// 查询生成表数据
-export function listTable(query) {
-  return request({
-    url: '/tool/gen/list',
-    method: 'get',
-    params: query
-  })
-}
-// 查询db数据库列表
-export function listDbTable(query) {
-  return request({
-    url: '/tool/gen/db/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询表详细信息
-export function getGenTable(tableId) {
-  return request({
-    url: '/tool/gen/' + tableId,
-    method: 'get'
-  })
-}
-
-// 修改代码生成信息
-export function updateGenTable(data) {
-  return request({
-    url: '/tool/gen',
-    method: 'put',
-    data: data
-  })
-}
-
-// 导入表
-export function importTable(data) {
-  return request({
-    url: '/tool/gen/importTable',
-    method: 'post',
-    params: data
-  })
-}
-
-// 预览生成代码
-export function previewTable(tableId) {
-  return request({
-    url: '/tool/gen/preview/' + tableId,
-    method: 'get'
-  })
-}
-
-// 删除表数据
-export function delTable(tableId) {
-  return request({
-    url: '/tool/gen/' + tableId,
-    method: 'delete'
-  })
-}
-
-// 生成代码(自定义路径)
-export function genCode(tableName) {
-  return request({
-    url: '/tool/gen/genCode/' + tableName,
-    method: 'get'
-  })
-}
-
-// 同步数据库
-export function synchDb(tableName) {
-  return request({
-    url: '/tool/gen/synchDb/' + tableName,
-    method: 'get'
-  })
-}

TEMPAT SAMPAH
src/assets/images/404.png


TEMPAT SAMPAH
src/assets/images/404@2x.png


TEMPAT SAMPAH
src/assets/images/Avatar@2x.png


TEMPAT SAMPAH
src/assets/images/Max@2x.png


TEMPAT SAMPAH
src/assets/images/bell@2x.png


TEMPAT SAMPAH
src/assets/images/dc.png


TEMPAT SAMPAH
src/assets/images/dr.png


TEMPAT SAMPAH
src/assets/images/idcardF.png


TEMPAT SAMPAH
src/assets/images/idcardZ.png


TEMPAT SAMPAH
src/assets/images/imgpng.png


TEMPAT SAMPAH
src/assets/images/imgsqty.png


TEMPAT SAMPAH
src/assets/images/left@2x.png


TEMPAT SAMPAH
src/assets/images/left_slices/left.png


TEMPAT SAMPAH
src/assets/images/left_slices/left@2x.png


TEMPAT SAMPAH
src/assets/images/login-background.jpg


TEMPAT SAMPAH
src/assets/images/loginPage/bag@2x.png


TEMPAT SAMPAH
src/assets/images/loginPage/bg2@2x.png


TEMPAT SAMPAH
src/assets/images/loginPage/bg@2x.png


TEMPAT SAMPAH
src/assets/images/loginPage/card@2x.png


TEMPAT SAMPAH
src/assets/images/loginPage/kc@2x.png


TEMPAT SAMPAH
src/assets/images/loginPage/ks@2x.png


TEMPAT SAMPAH
src/assets/images/loginPage/pass.png


TEMPAT SAMPAH
src/assets/images/loginPage/passno.png


TEMPAT SAMPAH
src/assets/images/loginPage/qz@2x.png


TEMPAT SAMPAH
src/assets/images/loginPage/welcome@2x.png


TEMPAT SAMPAH
src/assets/images/logo@2x.png


TEMPAT SAMPAH
src/assets/images/logo@2xS1.png


TEMPAT SAMPAH
src/assets/images/pdf@3x.png


TEMPAT SAMPAH
src/assets/images/peopleImg.png


TEMPAT SAMPAH
src/assets/images/telPhoto.png


TEMPAT SAMPAH
src/assets/images/登录页3_slices/left@2x.png


TEMPAT SAMPAH
src/assets/images/登录页3_slices/smile@2x.png


TEMPAT SAMPAH
src/assets/index_images/sl1.png


TEMPAT SAMPAH
src/assets/index_images/sl10.png


TEMPAT SAMPAH
src/assets/index_images/sl11.png


TEMPAT SAMPAH
src/assets/index_images/sl2.png


TEMPAT SAMPAH
src/assets/index_images/sl3.png


TEMPAT SAMPAH
src/assets/index_images/sl4.png


TEMPAT SAMPAH
src/assets/index_images/sl5.png


TEMPAT SAMPAH
src/assets/index_images/sl6.png


TEMPAT SAMPAH
src/assets/index_images/sl7.png


TEMPAT SAMPAH
src/assets/index_images/sl8.png


TEMPAT SAMPAH
src/assets/index_images/sl9.png


TEMPAT SAMPAH
src/assets/logo/logo.png


TEMPAT SAMPAH
src/assets/model_images/model1.png


TEMPAT SAMPAH
src/assets/model_images/model2.png


TEMPAT SAMPAH
src/assets/model_images/model3.png


TEMPAT SAMPAH
src/assets/model_images/model4.png


TEMPAT SAMPAH
src/assets/model_images/示例.png


+ 0 - 265
src/components/Comon/batchImportDialog.vue

@@ -1,265 +0,0 @@
-<template>
-  <div>
-    <Base-dialog
-      title="导入"
-      width="660px"
-      :isShow.sync="isShow"
-      :isShowFooter="false"
-    >
-      <div>
-        <div class="swq">
-          <img
-            style="width: 182px; height: 168px"
-            src="@/assets/images/dr.png"
-            alt=""
-          />
-        </div>
-        <div style="padding-left: 100px">
-          <p>第一步:下载导入模板</p>
-          <p style="padding-left: 50px">
-            <i class="el-icon-upload"></i
-            ><span class="dowmStys" @click="getDowm">下载模板</span>
-          </p>
-          <p>第二步:(批量新增):点击“上传{{ type }}”完成导入</p>
-          <div
-            v-loading="loading"
-            element-loading-text="正在处理中"
-            style="margin: 0 0 20px 50px; width: 130px; height: 60px"
-          >
-            <label
-              v-show="!loading"
-              for="mobles"
-              class="el-button el-button--primary"
-              >上传 {{ type }}</label
-            ><input
-              style="display: none"
-              type="file"
-              id="mobles"
-              ref="input1"
-              @change="importMobleadd"
-            />
-          </div>
-        </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="isShow = false">取消</el-button>
-        </span>
-      </div>
-    </Base-dialog>
-    <Base-dialog
-      title="提示"
-      width="660px"
-      :isShow.sync="isShowErr"
-      :isShowFooter="false"
-    >
-      <div>
-        <div>
-          <h4 style="margin-top: 0px; font-weight: bold; text-align: center">
-            导入失败原因
-          </h4>
-          <el-input
-            readonly
-            type="textarea"
-            :autosize="{ minRows: 6, maxRows: 24 }"
-            v-model="errorData"
-          >
-          </el-input>
-        </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="isShowErr = false">确定</el-button>
-        </span>
-      </div>
-    </Base-dialog>
-  </div>
-</template>
-
-<script>
-import * as baseUrls from "@/utils/request.js";
-export default {
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false,
-    },
-    temUrl: {
-      type: String,
-    },
-    apiKey: {
-      type: String,
-    },
-    checkKey: {
-      type: String,
-    },
-    newSujectApis: {
-      type: Array,
-      default: () => {
-        return [];
-      },
-    },
-    isCheck: {
-      type: Boolean,
-      default: true,
-    },
-    isShowTip: {
-      type: Boolean,
-      default: true,
-    },
-    param: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-    type: {
-      type: String,
-      default: "Excel",
-    },
-    isSuccessBack: {
-      type: Boolean,
-      default: false,
-    },
-  },
-  data() {
-    return {
-      loading: false,
-      errorData: [],
-      isShowErr: false,
-    };
-  },
-  methods: {
-    getDowm() {
-      let url =
-        baseUrls.BASE_IMG_URL +
-        this.temUrl +
-        `?time=${this.$methodsTools.getNewTime()}`;
-      let link = document.createElement("a");
-      let fileName = "导入模板" + ".xlsx";
-      document.body.appendChild(link);
-      link.href = url;
-      link.dowmload = fileName;
-      link.click();
-      link.remove();
-    },
-    importMobleadd(e) {
-      var file = e.target.files[0];
-      if (file === undefined) {
-        e.target.value = "";
-        return;
-      }
-      var type = e.target.value.toLowerCase().split(".").splice(-1);
-      if (this.type == "Excel") {
-        if (type[0] != "xlsx" && type[0] != "xls") {
-          e.target.value = "";
-          this.$message.error("请上传excel文件,且上传格式需为:.xlsx、.xls");
-          return;
-        }
-      } else {
-        if (type[0] != "docx") {
-          e.target.value = "";
-          this.$message.error("请上传word文件,且上传格式需为:.docx");
-          return;
-        }
-      }
-      this.loading = true;
-      let formData = new FormData();
-      formData.append("file", file);
-      for (const key in this.param) {
-        formData.append(key, this.param[key]);
-      }
-      this.$api[this.apiKey](formData)
-        .then((res) => {
-          if (res.code === 200) {
-            this.isCheck && this.getFestivalList(res.data);
-            this.getErrorData(res.data || res);
-          }
-        })
-        .finally(() => {
-          e.target.value = "";
-          this.loading = false;
-        });
-    },
-    /**
-     *
-     * @param {Strings} ids 查询编码
-     * @param {Number} type 1为成功2为失败
-     * @remards 失败时也需查询是否有成功的数据导入数据库,如存在 则加列队列同时提示
-     */
-    getFestivalList({ importNo, errorLog }) {
-      this.$api[this.checkKey]({ importNo })
-        .then((res) => {
-          if (res.rows.length) {
-            errorLog &&
-              this.$message({
-                type: "success",
-                message: `成功导入${res.rows.length}条数据,`,
-                customClass: "myMessageClass",
-              });
-            this.$emit("success", res.rows);
-          }
-        })
-        .catch(() => {});
-    },
-    getErrorData(data) {
-      this.isShow = false;
-      let { errorLog } = data;
-      if (errorLog) {
-        let ary = errorLog.split("\r\n");
-        ary = ary
-          .filter((item) => {
-            return item.length > 0;
-          })
-          .reverse();
-        this.$message({
-          message: `${ary.length}条数据导入失败,请查看失败原因`,
-          customClass: "myMessageClass",
-        });
-        ary = ary.join("\r\n");
-        this.errorData = ary;
-        this.isShowErr = true;
-      } else {
-        this.isShowTip &&
-          this.$message({
-            type: "success",
-            message: `添加成功`,
-            customClass: "myMessageClass",
-          });
-      }
-      if (!errorLog || this.isSuccessBack) {
-        this.$emit("success", data);
-      }
-    },
-  },
-  computed: {
-    isShow: {
-      get() {
-        return this.dialogVisible;
-      },
-      set(val) {
-        this.$emit("update:dialogVisible", false);
-      },
-    },
-  },
-};
-</script>
-
-<style  lang="less" scoped>
-.swq {
-  text-align: center;
-  border-bottom: 1px solid #eee;
-}
-.dowmStys {
-  color: blue;
-  cursor: pointer;
-}
-/deep/.el-dialog {
-  .el-dialog__body {
-    padding: 30px 20px 0;
-  }
-  .dialog-footer {
-    height: 80px;
-    border-top: 1px solid #e2e2e2;
-    display: flex;
-    align-items: center;
-    justify-content: flex-end;
-  }
-}
-</style>

+ 0 - 179
src/components/Crontab/day.vue

@@ -1,179 +0,0 @@
-<template>
-	<el-form size="small">
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="1">
-				日,允许的通配符[, - * / L M]
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="2">
-				不指定
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="3">
-				周期从
-				<el-input-number v-model='cycle01' :min="0" :max="31" /> -
-				<el-input-number v-model='cycle02' :min="0" :max="31" /> 日
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="4">
-				从
-				<el-input-number v-model='average01' :min="0" :max="31" /> 号开始,每
-				<el-input-number v-model='average02' :min="0" :max="31" /> 日执行一次
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="5">
-				每月
-				<el-input-number v-model='workday' :min="0" :max="31" /> 号最近的那个工作日
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="6">
-				本月最后一天
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="7">
-				指定
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
-					<el-option v-for="item in 31" :key="item" :value="item">{{item}}</el-option>
-				</el-select>
-			</el-radio>
-		</el-form-item>
-	</el-form>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			radioValue: 1,
-			workday: 1,
-			cycle01: 1,
-			cycle02: 2,
-			average01: 1,
-			average02: 1,
-			checkboxList: [],
-			checkNum: this.$options.propsData.check
-		}
-	},
-	name: 'crontab-day',
-	props: ['check', 'cron'],
-	methods: {
-		// 单选按钮值变化时
-		radioChange() {
-			('day rachange');
-			if (this.radioValue === 1) {
-				this.$emit('update', 'day', '*', 'day');
-				this.$emit('update', 'week', '?', 'day');
-				this.$emit('update', 'month', '*', 'day');
-			} else {
-				if (this.cron.hour === '*') {
-					this.$emit('update', 'hour', '0', 'day');
-				}
-				if (this.cron.min === '*') {
-					this.$emit('update', 'min', '0', 'day');
-				}
-				if (this.cron.second === '*') {
-					this.$emit('update', 'second', '0', 'day');
-				}
-			}
-
-			switch (this.radioValue) {
-				case 2:
-					this.$emit('update', 'day', '?');
-					break;
-				case 3:
-					this.$emit('update', 'day', this.cycle01 + '-' + this.cycle02);
-					break;
-				case 4:
-					this.$emit('update', 'day', this.average01 + '/' + this.average02);
-					break;
-				case 5:
-					this.$emit('update', 'day', this.workday + 'W');
-					break;
-				case 6:
-					this.$emit('update', 'day', 'L');
-					break;
-				case 7:
-					this.$emit('update', 'day', this.checkboxString);
-					break;
-			}
-			('day rachange end');
-		},
-		// 周期两个值变化时
-		cycleChange() {
-			if (this.radioValue == '3') {
-				this.$emit('update', 'day', this.cycleTotal);
-			}
-		},
-		// 平均两个值变化时
-		averageChange() {
-			if (this.radioValue == '4') {
-				this.$emit('update', 'day', this.averageTotal);
-			}
-		},
-		// 最近工作日值变化时
-		workdayChange() {
-			if (this.radioValue == '5') {
-				this.$emit('update', 'day', this.workday + 'W');
-			}
-		},
-		// checkbox值变化时
-		checkboxChange() {
-			if (this.radioValue == '7') {
-				this.$emit('update', 'day', this.checkboxString);
-			}
-		},
-		// 父组件传递的week发生变化触发
-		weekChange() {
-			//判断week值与day不能同时为“?”
-			if (this.cron.week == '?' && this.radioValue == '2') {
-				this.radioValue = '1';
-			} else if (this.cron.week !== '?' && this.radioValue != '2') {
-				this.radioValue = '2';
-			}
-		},
-	},
-	watch: {
-		"radioValue": "radioChange",
-		'cycleTotal': 'cycleChange',
-		'averageTotal': 'averageChange',
-		'workdayCheck': 'workdayChange',
-		'checkboxString': 'checkboxChange',
-	},
-	computed: {
-		// 计算两个周期值
-		cycleTotal: function () {
-			this.cycle01 = this.checkNum(this.cycle01, 1, 31)
-			this.cycle02 = this.checkNum(this.cycle02, 1, 31)
-			return this.cycle01 + '-' + this.cycle02;
-		},
-		// 计算平均用到的值
-		averageTotal: function () {
-			this.average01 = this.checkNum(this.average01, 1, 31)
-			this.average02 = this.checkNum(this.average02, 1, 31)
-			return this.average01 + '/' + this.average02;
-		},
-		// 计算工作日格式
-		workdayCheck: function () {
-			this.workday = this.checkNum(this.workday, 1, 31)
-			return this.workday;
-		},
-		// 计算勾选的checkbox值合集
-		checkboxString: function () {
-			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
-		}
-	}
-}
-</script>

+ 0 - 122
src/components/Crontab/hour.vue

@@ -1,122 +0,0 @@
-<template>
-	<el-form size="small">
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="1">
-				小时,允许的通配符[, - * /]
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="2">
-				周期从
-				<el-input-number v-model='cycle01' :min="0" :max="60" /> -
-				<el-input-number v-model='cycle02' :min="0" :max="60" /> 小时
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="3">
-				从
-				<el-input-number v-model='average01' :min="0" :max="60" /> 小时开始,每
-				<el-input-number v-model='average02' :min="0" :max="60" /> 小时执行一次
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="4">
-				指定
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
-					<el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option>
-				</el-select>
-			</el-radio>
-		</el-form-item>
-	</el-form>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			radioValue: 1,
-			cycle01: 0,
-			cycle02: 1,
-			average01: 0,
-			average02: 1,
-			checkboxList: [],
-			checkNum: this.$options.propsData.check
-		}
-	},
-	name: 'crontab-hour',
-	props: ['check', 'cron'],
-	methods: {
-		// 单选按钮值变化时
-		radioChange() {
-			if (this.radioValue === 1) {
-				this.$emit('update', 'hour', '*', 'hour');
-				this.$emit('update', 'day', '*', 'hour');
-			} else {
-				if (this.cron.min === '*') {
-					this.$emit('update', 'min', '0', 'hour');
-				}
-				if (this.cron.second === '*') {
-					this.$emit('update', 'second', '0', 'hour');
-				}
-			}
-			switch (this.radioValue) {
-				case 2:
-					this.$emit('update', 'hour', this.cycle01 + '-' + this.cycle02);
-					break;
-				case 3:
-					this.$emit('update', 'hour', this.average01 + '/' + this.average02);
-					break;
-				case 4:
-					this.$emit('update', 'hour', this.checkboxString);
-					break;
-			}
-		},
-		// 周期两个值变化时
-		cycleChange() {
-			if (this.radioValue == '2') {
-				this.$emit('update', 'hour', this.cycleTotal);
-			}
-		},
-		// 平均两个值变化时
-		averageChange() {
-			if (this.radioValue == '3') {
-				this.$emit('update', 'hour', this.averageTotal);
-			}
-		},
-		// checkbox值变化时
-		checkboxChange() {
-			if (this.radioValue == '4') {
-				this.$emit('update', 'hour', this.checkboxString);
-			}
-		}
-	},
-	watch: {
-		"radioValue": "radioChange",
-		'cycleTotal': 'cycleChange',
-		'averageTotal': 'averageChange',
-		'checkboxString': 'checkboxChange'
-	},
-	computed: {
-		// 计算两个周期值
-		cycleTotal: function () {
-			this.cycle01 = this.checkNum(this.cycle01, 0, 23)
-			this.cycle02 = this.checkNum(this.cycle02, 0, 23)
-			return this.cycle01 + '-' + this.cycle02;
-		},
-		// 计算平均用到的值
-		averageTotal: function () {
-			this.average01 = this.checkNum(this.average01, 0, 23)
-			this.average02 = this.checkNum(this.average02, 1, 23)
-			return this.average01 + '/' + this.average02;
-		},
-		// 计算勾选的checkbox值合集
-		checkboxString: function () {
-			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
-		}
-	}
-}
-</script>

+ 0 - 425
src/components/Crontab/index.vue

@@ -1,425 +0,0 @@
-<template>
-  <div>
-    <el-tabs type="border-card">
-      <el-tab-pane label="秒" v-if="shouldHide('second')">
-        <CrontabSecond @update="updateCrontabValue" :check="checkNumber" ref="cronsecond" />
-      </el-tab-pane>
-
-      <el-tab-pane label="分钟" v-if="shouldHide('min')">
-        <CrontabMin
-          @update="updateCrontabValue"
-          :check="checkNumber"
-          :cron="crontabValueObj"
-          ref="cronmin"
-        />
-      </el-tab-pane>
-
-      <el-tab-pane label="小时" v-if="shouldHide('hour')">
-        <CrontabHour
-          @update="updateCrontabValue"
-          :check="checkNumber"
-          :cron="crontabValueObj"
-          ref="cronhour"
-        />
-      </el-tab-pane>
-
-      <el-tab-pane label="日" v-if="shouldHide('day')">
-        <CrontabDay
-          @update="updateCrontabValue"
-          :check="checkNumber"
-          :cron="crontabValueObj"
-          ref="cronday"
-        />
-      </el-tab-pane>
-
-      <el-tab-pane label="月" v-if="shouldHide('month')">
-        <CrontabMonth
-          @update="updateCrontabValue"
-          :check="checkNumber"
-          :cron="crontabValueObj"
-          ref="cronmonth"
-        />
-      </el-tab-pane>
-
-      <el-tab-pane label="周" v-if="shouldHide('week')">
-        <CrontabWeek
-          @update="updateCrontabValue"
-          :check="checkNumber"
-          :cron="crontabValueObj"
-          ref="cronweek"
-        />
-      </el-tab-pane>
-
-      <el-tab-pane label="年" v-if="shouldHide('year')">
-        <CrontabYear
-          @update="updateCrontabValue"
-          :check="checkNumber"
-          :cron="crontabValueObj"
-          ref="cronyear"
-        />
-      </el-tab-pane>
-    </el-tabs>
-
-    <div class="popup-main">
-      <div class="popup-result">
-        <p class="title">时间表达式</p>
-        <table>
-          <thead>
-            <th v-for="item of tabTitles" width="40" :key="item">{{item}}</th>
-            <th>Cron 表达式</th>
-          </thead>
-          <tbody>
-            <td>
-              <span>{{crontabValueObj.second}}</span>
-            </td>
-            <td>
-              <span>{{crontabValueObj.min}}</span>
-            </td>
-            <td>
-              <span>{{crontabValueObj.hour}}</span>
-            </td>
-            <td>
-              <span>{{crontabValueObj.day}}</span>
-            </td>
-            <td>
-              <span>{{crontabValueObj.month}}</span>
-            </td>
-            <td>
-              <span>{{crontabValueObj.week}}</span>
-            </td>
-            <td>
-              <span>{{crontabValueObj.year}}</span>
-            </td>
-            <td>
-              <span>{{crontabValueString}}</span>
-            </td>
-          </tbody>
-        </table>
-      </div>
-      <CrontabResult :ex="crontabValueString"></CrontabResult>
-
-      <div class="pop_btn">
-        <el-button size="small" type="primary" @click="submitFill">确定</el-button>
-        <el-button size="small" type="warning" @click="clearCron">重置</el-button>
-        <el-button size="small" @click="hidePopup">取消</el-button>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import CrontabSecond from "./second.vue";
-import CrontabMin from "./min.vue";
-import CrontabHour from "./hour.vue";
-import CrontabDay from "./day.vue";
-import CrontabMonth from "./month.vue";
-import CrontabWeek from "./week.vue";
-import CrontabYear from "./year.vue";
-import CrontabResult from "./result.vue";
-
-export default {
-  data() {
-    return {
-      tabTitles: ["秒", "分钟", "小时", "日", "月", "周", "年"],
-      tabActive: 0,
-      myindex: 0,
-      crontabValueObj: {
-        second: "*",
-        min: "*",
-        hour: "*",
-        day: "*",
-        month: "*",
-        week: "?",
-        year: "",
-      },
-    };
-  },
-  name: "vcrontab",
-  props: ["expression", "hideComponent"],
-  methods: {
-    shouldHide(key) {
-      if (this.hideComponent && this.hideComponent.includes(key)) return false;
-      return true;
-    },
-    resolveExp() {
-      // 反解析 表达式
-      if (this.expression) {
-        let arr = this.expression.split(" ");
-        if (arr.length >= 6) {
-          //6 位以上是合法表达式
-          let obj = {
-            second: arr[0],
-            min: arr[1],
-            hour: arr[2],
-            day: arr[3],
-            month: arr[4],
-            week: arr[5],
-            year: arr[6] ? arr[6] : "",
-          };
-          this.crontabValueObj = {
-            ...obj,
-          };
-          for (let i in obj) {
-            if (obj[i]) this.changeRadio(i, obj[i]);
-          }
-        }
-      } else {
-        // 没有传入的表达式 则还原
-        this.clearCron();
-      }
-    },
-    // tab切换值
-    tabCheck(index) {
-      this.tabActive = index;
-    },
-    // 由子组件触发,更改表达式组成的字段值
-    updateCrontabValue(name, value, from) {
-      "updateCrontabValue", name, value, from;
-      this.crontabValueObj[name] = value;
-      if (from && from !== name) {
-        console.log(`来自组件 ${from} 改变了 ${name} ${value}`);
-        this.changeRadio(name, value);
-      }
-    },
-    // 赋值到组件
-    changeRadio(name, value) {
-      let arr = ["second", "min", "hour", "month"],
-        refName = "cron" + name,
-        insValue;
-
-      if (!this.$refs[refName]) return;
-
-      if (arr.includes(name)) {
-        if (value === "*") {
-          insValue = 1;
-        } else if (value.indexOf("-") > -1) {
-          let indexArr = value.split("-");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].cycle01 = 0)
-            : (this.$refs[refName].cycle01 = indexArr[0]);
-          this.$refs[refName].cycle02 = indexArr[1];
-          insValue = 2;
-        } else if (value.indexOf("/") > -1) {
-          let indexArr = value.split("/");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].average01 = 0)
-            : (this.$refs[refName].average01 = indexArr[0]);
-          this.$refs[refName].average02 = indexArr[1];
-          insValue = 3;
-        } else {
-          insValue = 4;
-          this.$refs[refName].checkboxList = value.split(",");
-        }
-      } else if (name == "day") {
-        if (value === "*") {
-          insValue = 1;
-        } else if (value == "?") {
-          insValue = 2;
-        } else if (value.indexOf("-") > -1) {
-          let indexArr = value.split("-");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].cycle01 = 0)
-            : (this.$refs[refName].cycle01 = indexArr[0]);
-          this.$refs[refName].cycle02 = indexArr[1];
-          insValue = 3;
-        } else if (value.indexOf("/") > -1) {
-          let indexArr = value.split("/");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].average01 = 0)
-            : (this.$refs[refName].average01 = indexArr[0]);
-          this.$refs[refName].average02 = indexArr[1];
-          insValue = 4;
-        } else if (value.indexOf("W") > -1) {
-          let indexArr = value.split("W");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].workday = 0)
-            : (this.$refs[refName].workday = indexArr[0]);
-          insValue = 5;
-        } else if (value === "L") {
-          insValue = 6;
-        } else {
-          this.$refs[refName].checkboxList = value.split(",");
-          insValue = 7;
-        }
-      } else if (name == "week") {
-        if (value === "*") {
-          insValue = 1;
-        } else if (value == "?") {
-          insValue = 2;
-        } else if (value.indexOf("-") > -1) {
-          let indexArr = value.split("-");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].cycle01 = 0)
-            : (this.$refs[refName].cycle01 = indexArr[0]);
-          this.$refs[refName].cycle02 = indexArr[1];
-          insValue = 3;
-        } else if (value.indexOf("#") > -1) {
-          let indexArr = value.split("#");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].average01 = 1)
-            : (this.$refs[refName].average01 = indexArr[0]);
-          this.$refs[refName].average02 = indexArr[1];
-          insValue = 4;
-        } else if (value.indexOf("L") > -1) {
-          let indexArr = value.split("L");
-          isNaN(indexArr[0])
-            ? (this.$refs[refName].weekday = 1)
-            : (this.$refs[refName].weekday = indexArr[0]);
-          insValue = 5;
-        } else {
-          this.$refs[refName].checkboxList = value.split(",");
-          insValue = 7;
-        }
-      } else if (name == "year") {
-        if (value == "") {
-          insValue = 1;
-        } else if (value == "*") {
-          insValue = 2;
-        } else if (value.indexOf("-") > -1) {
-          insValue = 3;
-        } else if (value.indexOf("/") > -1) {
-          insValue = 4;
-        } else {
-          this.$refs[refName].checkboxList = value.split(",");
-          insValue = 5;
-        }
-      }
-      this.$refs[refName].radioValue = insValue;
-    },
-    // 表单选项的子组件校验数字格式(通过-props传递)
-    checkNumber(value, minLimit, maxLimit) {
-      // 检查必须为整数
-      value = Math.floor(value);
-      if (value < minLimit) {
-        value = minLimit;
-      } else if (value > maxLimit) {
-        value = maxLimit;
-      }
-      return value;
-    },
-    // 隐藏弹窗
-    hidePopup() {
-      this.$emit("hide");
-    },
-    // 填充表达式
-    submitFill() {
-      this.$emit("fill", this.crontabValueString);
-      this.hidePopup();
-    },
-    clearCron() {
-      // 还原选择项
-      ("准备还原");
-      this.crontabValueObj = {
-        second: "*",
-        min: "*",
-        hour: "*",
-        day: "*",
-        month: "*",
-        week: "?",
-        year: "",
-      };
-      for (let j in this.crontabValueObj) {
-        this.changeRadio(j, this.crontabValueObj[j]);
-      }
-    },
-  },
-  computed: {
-    crontabValueString: function() {
-      let obj = this.crontabValueObj;
-      let str =
-        obj.second +
-        " " +
-        obj.min +
-        " " +
-        obj.hour +
-        " " +
-        obj.day +
-        " " +
-        obj.month +
-        " " +
-        obj.week +
-        (obj.year == "" ? "" : " " + obj.year);
-      return str;
-    },
-  },
-  components: {
-    CrontabSecond,
-    CrontabMin,
-    CrontabHour,
-    CrontabDay,
-    CrontabMonth,
-    CrontabWeek,
-    CrontabYear,
-    CrontabResult,
-  },
-  watch: {
-    expression: "resolveExp",
-    hideComponent(value) {
-      // 隐藏部分组件
-    },
-  },
-  mounted: function() {
-    this.resolveExp();
-  },
-};
-</script>
-<style scoped>
-.pop_btn {
-  text-align: center;
-  margin-top: 20px;
-}
-.popup-main {
-  position: relative;
-  margin: 10px auto;
-  background: #fff;
-  border-radius: 5px;
-  font-size: 12px;
-  overflow: hidden;
-}
-.popup-title {
-  overflow: hidden;
-  line-height: 34px;
-  padding-top: 6px;
-  background: #f2f2f2;
-}
-.popup-result {
-  box-sizing: border-box;
-  line-height: 24px;
-  margin: 25px auto;
-  padding: 15px 10px 10px;
-  border: 1px solid #ccc;
-  position: relative;
-}
-.popup-result .title {
-  position: absolute;
-  top: -28px;
-  left: 50%;
-  width: 140px;
-  font-size: 14px;
-  margin-left: -70px;
-  text-align: center;
-  line-height: 30px;
-  background: #fff;
-}
-.popup-result table {
-  text-align: center;
-  width: 100%;
-  margin: 0 auto;
-}
-.popup-result table span {
-  display: block;
-  width: 100%;
-  font-family: arial;
-  line-height: 30px;
-  height: 30px;
-  white-space: nowrap;
-  overflow: hidden;
-  border: 1px solid #e8e8e8;
-}
-.popup-result-scroll {
-  font-size: 12px;
-  line-height: 24px;
-  height: 10em;
-  overflow-y: auto;
-}
-</style>

+ 0 - 120
src/components/Crontab/min.vue

@@ -1,120 +0,0 @@
-<template>
-	<el-form size="small">
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="1">
-				分钟,允许的通配符[, - * /]
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="2">
-				周期从
-				<el-input-number v-model='cycle01' :min="0" :max="60" /> -
-				<el-input-number v-model='cycle02' :min="0" :max="60" /> 分钟
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="3">
-				从
-				<el-input-number v-model='average01' :min="0" :max="60" /> 分钟开始,每
-				<el-input-number v-model='average02' :min="0" :max="60" /> 分钟执行一次
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="4">
-				指定
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
-					<el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option>
-				</el-select>
-			</el-radio>
-		</el-form-item>
-	</el-form>
-
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			radioValue: 1,
-			cycle01: 1,
-			cycle02: 2,
-			average01: 0,
-			average02: 1,
-			checkboxList: [],
-			checkNum: this.$options.propsData.check
-		}
-	},
-	name: 'crontab-min',
-	props: ['check', 'cron'],
-	methods: {
-		// 单选按钮值变化时
-		radioChange() {
-			if (this.radioValue !== 1 && this.cron.second === '*') {
-				this.$emit('update', 'second', '0', 'min');
-			}
-			switch (this.radioValue) {
-				case 1:
-					this.$emit('update', 'min', '*', 'min');
-					this.$emit('update', 'hour', '*', 'min');
-					break;
-				case 2:
-					this.$emit('update', 'min', this.cycle01 + '-' + this.cycle02, 'min');
-					break;
-				case 3:
-					this.$emit('update', 'min', this.average01 + '/' + this.average02, 'min');
-					break;
-				case 4:
-					this.$emit('update', 'min', this.checkboxString, 'min');
-					break;
-			}
-		},
-		// 周期两个值变化时
-		cycleChange() {
-			if (this.radioValue == '2') {
-				this.$emit('update', 'min', this.cycleTotal, 'min');
-			}
-		},
-		// 平均两个值变化时
-		averageChange() {
-			if (this.radioValue == '3') {
-				this.$emit('update', 'min', this.averageTotal, 'min');
-			}
-		},
-		// checkbox值变化时
-		checkboxChange() {
-			if (this.radioValue == '4') {
-				this.$emit('update', 'min', this.checkboxString, 'min');
-			}
-		},
-
-	},
-	watch: {
-		"radioValue": "radioChange",
-		'cycleTotal': 'cycleChange',
-		'averageTotal': 'averageChange',
-		'checkboxString': 'checkboxChange',
-	},
-	computed: {
-		// 计算两个周期值
-		cycleTotal: function () {
-			this.cycle01 = this.checkNum(this.cycle01, 0, 59)
-			this.cycle02 = this.checkNum(this.cycle02, 0, 59)
-			return this.cycle01 + '-' + this.cycle02;
-		},
-		// 计算平均用到的值
-		averageTotal: function () {
-			this.average01 = this.checkNum(this.average01, 0, 59)
-			this.average02 = this.checkNum(this.average02, 1, 59)
-			return this.average01 + '/' + this.average02;
-		},
-		// 计算勾选的checkbox值合集
-		checkboxString: function () {
-			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
-		}
-	}
-}
-</script>

+ 0 - 128
src/components/Crontab/month.vue

@@ -1,128 +0,0 @@
-<template>
-	<el-form size='small'>
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="1">
-				月,允许的通配符[, - * /]
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="2">
-				周期从
-				<el-input-number v-model='cycle01' :min="1" :max="12" /> -
-				<el-input-number v-model='cycle02' :min="1" :max="12" /> 月
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="3">
-				从
-				<el-input-number v-model='average01' :min="1" :max="12" /> 月开始,每
-				<el-input-number v-model='average02' :min="1" :max="12" /> 月月执行一次
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="4">
-				指定
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
-					<el-option v-for="item in 12" :key="item" :value="item">{{item}}</el-option>
-				</el-select>
-			</el-radio>
-		</el-form-item>
-	</el-form>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			radioValue: 1,
-			cycle01: 1,
-			cycle02: 2,
-			average01: 1,
-			average02: 1,
-			checkboxList: [],
-			checkNum: this.check
-		}
-	},
-	name: 'crontab-month',
-	props: ['check', 'cron'],
-	methods: {
-		// 单选按钮值变化时
-		radioChange() {
-			if (this.radioValue === 1) {
-				this.$emit('update', 'month', '*');
-				this.$emit('update', 'year', '*');
-			} else {
-				if (this.cron.day === '*') {
-					this.$emit('update', 'day', '0', 'month');
-				}
-				if (this.cron.hour === '*') {
-					this.$emit('update', 'hour', '0', 'month');
-				}
-				if (this.cron.min === '*') {
-					this.$emit('update', 'min', '0', 'month');
-				}
-				if (this.cron.second === '*') {
-					this.$emit('update', 'second', '0', 'month');
-				}
-			}
-			switch (this.radioValue) {
-				case 2:
-					this.$emit('update', 'month', this.cycle01 + '-' + this.cycle02);
-					break;
-				case 3:
-					this.$emit('update', 'month', this.average01 + '/' + this.average02);
-					break;
-				case 4:
-					this.$emit('update', 'month', this.checkboxString);
-					break;
-			}
-		},
-		// 周期两个值变化时
-		cycleChange() {
-			if (this.radioValue == '2') {
-				this.$emit('update', 'month', this.cycleTotal);
-			}
-		},
-		// 平均两个值变化时
-		averageChange() {
-			if (this.radioValue == '3') {
-				this.$emit('update', 'month', this.averageTotal);
-			}
-		},
-		// checkbox值变化时
-		checkboxChange() {
-			if (this.radioValue == '4') {
-				this.$emit('update', 'month', this.checkboxString);
-			}
-		}
-	},
-	watch: {
-		"radioValue": "radioChange",
-		'cycleTotal': 'cycleChange',
-		'averageTotal': 'averageChange',
-		'checkboxString': 'checkboxChange'
-	},
-	computed: {
-		// 计算两个周期值
-		cycleTotal: function () {
-			this.cycle01 = this.checkNum(this.cycle01, 1, 12)
-			this.cycle02 = this.checkNum(this.cycle02, 1, 12)
-			return this.cycle01 + '-' + this.cycle02;
-		},
-		// 计算平均用到的值
-		averageTotal: function () {
-			this.average01 = this.checkNum(this.average01, 1, 12)
-			this.average02 = this.checkNum(this.average02, 1, 12)
-			return this.average01 + '/' + this.average02;
-		},
-		// 计算勾选的checkbox值合集
-		checkboxString: function () {
-			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
-		}
-	}
-}
-</script>

+ 0 - 566
src/components/Crontab/result.vue

@@ -1,566 +0,0 @@
-<template>
-	<div class="popup-result">
-		<p class="title">最近5次运行时间</p>
-		<ul class="popup-result-scroll">
-			<template v-if='isShow'>
-				<li v-for='item in resultList' :key="item">{{item}}</li>
-			</template>
-			<li v-else>计算结果中...</li>
-		</ul>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			dayRule: '',
-			dayRuleSup: '',
-			dateArr: [],
-			resultList: [],
-			isShow: false
-		}
-	},
-	name: 'crontab-result',
-	methods: {
-		// 表达式值变化时,开始去计算结果
-		expressionChange() {
-
-			// 计算开始-隐藏结果
-			this.isShow = false;
-			// 获取规则数组[0秒、1分、2时、3日、4月、5星期、6年]
-			let ruleArr = this.$options.propsData.ex.split(' ');
-			// 用于记录进入循环的次数
-			let nums = 0;
-			// 用于暂时存符号时间规则结果的数组
-			let resultArr = [];
-			// 获取当前时间精确至[年、月、日、时、分、秒]
-			let nTime = new Date();
-			let nYear = nTime.getFullYear();
-			let nMonth = nTime.getMonth() + 1;
-			let nDay = nTime.getDate();
-			let nHour = nTime.getHours();
-			let nMin = nTime.getMinutes();
-			let nSecond = nTime.getSeconds();
-			// 根据规则获取到近100年可能年数组、月数组等等
-			this.getSecondArr(ruleArr[0]);
-			this.getMinArr(ruleArr[1]);
-			this.getHourArr(ruleArr[2]);
-			this.getDayArr(ruleArr[3]);
-			this.getMonthArr(ruleArr[4]);
-			this.getWeekArr(ruleArr[5]);
-			this.getYearArr(ruleArr[6], nYear);
-			// 将获取到的数组赋值-方便使用
-			let sDate = this.dateArr[0];
-			let mDate = this.dateArr[1];
-			let hDate = this.dateArr[2];
-			let DDate = this.dateArr[3];
-			let MDate = this.dateArr[4];
-			let YDate = this.dateArr[5];
-			// 获取当前时间在数组中的索引
-			let sIdx = this.getIndex(sDate, nSecond);
-			let mIdx = this.getIndex(mDate, nMin);
-			let hIdx = this.getIndex(hDate, nHour);
-			let DIdx = this.getIndex(DDate, nDay);
-			let MIdx = this.getIndex(MDate, nMonth);
-			let YIdx = this.getIndex(YDate, nYear);
-			// 重置月日时分秒的函数(后面用的比较多)
-			const resetSecond = function () {
-				sIdx = 0;
-				nSecond = sDate[sIdx]
-			}
-			const resetMin = function () {
-				mIdx = 0;
-				nMin = mDate[mIdx]
-				resetSecond();
-			}
-			const resetHour = function () {
-				hIdx = 0;
-				nHour = hDate[hIdx]
-				resetMin();
-			}
-			const resetDay = function () {
-				DIdx = 0;
-				nDay = DDate[DIdx]
-				resetHour();
-			}
-			const resetMonth = function () {
-				MIdx = 0;
-				nMonth = MDate[MIdx]
-				resetDay();
-			}
-			// 如果当前年份不为数组中当前值
-			if (nYear !== YDate[YIdx]) {
-				resetMonth();
-			}
-			// 如果当前月份不为数组中当前值
-			if (nMonth !== MDate[MIdx]) {
-				resetDay();
-			}
-			// 如果当前“日”不为数组中当前值
-			if (nDay !== DDate[DIdx]) {
-				resetHour();
-			}
-			// 如果当前“时”不为数组中当前值
-			if (nHour !== hDate[hIdx]) {
-				resetMin();
-			}
-			// 如果当前“分”不为数组中当前值
-			if (nMin !== mDate[mIdx]) {
-				resetSecond();
-			}
-
-			// 循环年份数组
-			goYear: for (let Yi = YIdx; Yi < YDate.length; Yi++) {
-				let YY = YDate[Yi];
-				// 如果到达最大值时
-				if (nMonth > MDate[MDate.length - 1]) {
-					resetMonth();
-					continue;
-				}
-				// 循环月份数组
-				goMonth: for (let Mi = MIdx; Mi < MDate.length; Mi++) {
-					// 赋值、方便后面运算
-					let MM = MDate[Mi];
-					MM = MM < 10 ? '0' + MM : MM;
-					// 如果到达最大值时
-					if (nDay > DDate[DDate.length - 1]) {
-						resetDay();
-						if (Mi == MDate.length - 1) {
-							resetMonth();
-							continue goYear;
-						}
-						continue;
-					}
-					// 循环日期数组
-					goDay: for (let Di = DIdx; Di < DDate.length; Di++) {
-						// 赋值、方便后面运算
-						let DD = DDate[Di];
-						let thisDD = DD < 10 ? '0' + DD : DD;
-
-						// 如果到达最大值时
-						if (nHour > hDate[hDate.length - 1]) {
-							resetHour();
-							if (Di == DDate.length - 1) {
-								resetDay();
-								if (Mi == MDate.length - 1) {
-									resetMonth();
-									continue goYear;
-								}
-								continue goMonth;
-							}
-							continue;
-						}
-
-						// 判断日期的合法性,不合法的话也是跳出当前循环
-						if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') {
-							resetDay();
-							continue goMonth;
-						}
-						// 如果日期规则中有值时
-						if (this.dayRule == 'lastDay') {
-							// 如果不是合法日期则需要将前将日期调到合法日期即月末最后一天
-
-							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
-								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
-									DD--;
-
-									thisDD = DD < 10 ? '0' + DD : DD;
-								}
-							}
-						} else if (this.dayRule == 'workDay') {
-							// 校验并调整如果是2月30号这种日期传进来时需调整至正常月底
-							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
-								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
-									DD--;
-									thisDD = DD < 10 ? '0' + DD : DD;
-								}
-							}
-							// 获取达到条件的日期是星期X
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
-							// 当星期日时
-							if (thisWeek == 0) {
-								// 先找下一个日,并判断是否为月底
-								DD++;
-								thisDD = DD < 10 ? '0' + DD : DD;
-								// 判断下一日已经不是合法日期
-								if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
-									DD -= 3;
-								}
-							} else if (thisWeek == 6) {
-								// 当星期6时只需判断不是1号就可进行操作
-								if (this.dayRuleSup !== 1) {
-									DD--;
-								} else {
-									DD += 2;
-								}
-							}
-						} else if (this.dayRule == 'weekDay') {
-							// 如果指定了是星期几
-							// 获取当前日期是属于星期几
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
-							// 校验当前星期是否在星期池(dayRuleSup)中
-							if (Array.indexOf(this.dayRuleSup, thisWeek) < 0) {
-								// 如果到达最大值时
-								if (Di == DDate.length - 1) {
-									resetDay();
-									if (Mi == MDate.length - 1) {
-										resetMonth();
-										continue goYear;
-									}
-									continue goMonth;
-								}
-								continue;
-							}
-						} else if (this.dayRule == 'assWeek') {
-							// 如果指定了是第几周的星期几
-							// 获取每月1号是属于星期几
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
-							if (this.dayRuleSup[1] >= thisWeek) {
-								DD = (this.dayRuleSup[0] - 1) * 7 + this.dayRuleSup[1] - thisWeek + 1;
-							} else {
-								DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1;
-							}
-						} else if (this.dayRule == 'lastWeek') {
-							// 如果指定了每月最后一个星期几
-							// 校验并调整如果是2月30号这种日期传进来时需调整至正常月底
-							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
-								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
-									DD--;
-									thisDD = DD < 10 ? '0' + DD : DD;
-								}
-							}
-							// 获取月末最后一天是星期几
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
-							// 找到要求中最近的那个星期几
-							if (this.dayRuleSup < thisWeek) {
-								DD -= thisWeek - this.dayRuleSup;
-							} else if (this.dayRuleSup > thisWeek) {
-								DD -= 7 - (this.dayRuleSup - thisWeek)
-							}
-						}
-						// 判断时间值是否小于10置换成“05”这种格式
-						DD = DD < 10 ? '0' + DD : DD;
-
-						// 循环“时”数组
-						goHour: for (let hi = hIdx; hi < hDate.length; hi++) {
-							let hh = hDate[hi] < 10 ? '0' + hDate[hi] : hDate[hi]
-
-							// 如果到达最大值时
-							if (nMin > mDate[mDate.length - 1]) {
-								resetMin();
-								if (hi == hDate.length - 1) {
-									resetHour();
-									if (Di == DDate.length - 1) {
-										resetDay();
-										if (Mi == MDate.length - 1) {
-											resetMonth();
-											continue goYear;
-										}
-										continue goMonth;
-									}
-									continue goDay;
-								}
-								continue;
-							}
-							// 循环"分"数组
-							goMin: for (let mi = mIdx; mi < mDate.length; mi++) {
-								let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi];
-
-								// 如果到达最大值时
-								if (nSecond > sDate[sDate.length - 1]) {
-									resetSecond();
-									if (mi == mDate.length - 1) {
-										resetMin();
-										if (hi == hDate.length - 1) {
-											resetHour();
-											if (Di == DDate.length - 1) {
-												resetDay();
-												if (Mi == MDate.length - 1) {
-													resetMonth();
-													continue goYear;
-												}
-												continue goMonth;
-											}
-											continue goDay;
-										}
-										continue goHour;
-									}
-									continue;
-								}
-								// 循环"秒"数组
-								goSecond: for (let si = sIdx; si <= sDate.length - 1; si++) {
-									let ss = sDate[si] < 10 ? '0' + sDate[si] : sDate[si];
-									// 添加当前时间(时间合法性在日期循环时已经判断)
-									if (MM !== '00' && DD !== '00') {
-										resultArr.push(YY + '-' + MM + '-' + DD + ' ' + hh + ':' + mm + ':' + ss)
-										nums++;
-									}
-									// 如果条数满了就退出循环
-									if (nums == 5) break goYear;
-									// 如果到达最大值时
-									if (si == sDate.length - 1) {
-										resetSecond();
-										if (mi == mDate.length - 1) {
-											resetMin();
-											if (hi == hDate.length - 1) {
-												resetHour();
-												if (Di == DDate.length - 1) {
-													resetDay();
-													if (Mi == MDate.length - 1) {
-														resetMonth();
-														continue goYear;
-													}
-													continue goMonth;
-												}
-												continue goDay;
-											}
-											continue goHour;
-										}
-										continue goMin;
-									}
-								} //goSecond
-							} //goMin
-						}//goHour
-					}//goDay
-				}//goMonth
-			}
-			// 判断100年内的结果条数
-			if (resultArr.length == 0) {
-				this.resultList = ['没有达到条件的结果!'];
-			} else {
-				this.resultList = resultArr;
-				if (resultArr.length !== 5) {
-					this.resultList.push('最近100年内只有上面' + resultArr.length + '条结果!')
-				}
-			}
-			// 计算完成-显示结果
-			this.isShow = true;
-
-
-		},
-		// 用于计算某位数字在数组中的索引
-		getIndex(arr, value) {
-			if (value <= arr[0] || value > arr[arr.length - 1]) {
-				return 0;
-			} else {
-				for (let i = 0; i < arr.length - 1; i++) {
-					if (value > arr[i] && value <= arr[i + 1]) {
-						return i + 1;
-					}
-				}
-			}
-		},
-		// 获取"年"数组
-		getYearArr(rule, year) {
-			this.dateArr[5] = this.getOrderArr(year, year + 100);
-			if (rule !== undefined) {
-				if (rule.indexOf('-') >= 0) {
-					this.dateArr[5] = this.getCycleArr(rule, year + 100, false)
-				} else if (rule.indexOf('/') >= 0) {
-					this.dateArr[5] = this.getAverageArr(rule, year + 100)
-				} else if (rule !== '*') {
-					this.dateArr[5] = this.getAssignArr(rule)
-				}
-			}
-		},
-		// 获取"月"数组
-		getMonthArr(rule) {
-			this.dateArr[4] = this.getOrderArr(1, 12);
-			if (rule.indexOf('-') >= 0) {
-				this.dateArr[4] = this.getCycleArr(rule, 12, false)
-			} else if (rule.indexOf('/') >= 0) {
-				this.dateArr[4] = this.getAverageArr(rule, 12)
-			} else if (rule !== '*') {
-				this.dateArr[4] = this.getAssignArr(rule)
-			}
-		},
-		// 获取"日"数组-主要为日期规则
-		getWeekArr(rule) {
-			// 只有当日期规则的两个值均为“”时则表达日期是有选项的
-			if (this.dayRule == '' && this.dayRuleSup == '') {
-				if (rule.indexOf('-') >= 0) {
-					this.dayRule = 'weekDay';
-					this.dayRuleSup = this.getCycleArr(rule, 7, false)
-				} else if (rule.indexOf('#') >= 0) {
-					this.dayRule = 'assWeek';
-					let matchRule = rule.match(/[0-9]{1}/g);
-					this.dayRuleSup = [Number(matchRule[0]), Number(matchRule[1])];
-					this.dateArr[3] = [1];
-					if (this.dayRuleSup[1] == 7) {
-						this.dayRuleSup[1] = 0;
-					}
-				} else if (rule.indexOf('L') >= 0) {
-					this.dayRule = 'lastWeek';
-					this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]);
-					this.dateArr[3] = [31];
-					if (this.dayRuleSup == 7) {
-						this.dayRuleSup = 0;
-					}
-				} else if (rule !== '*' && rule !== '?') {
-					this.dayRule = 'weekDay';
-					this.dayRuleSup = this.getAssignArr(rule)
-				}
-				// 如果weekDay时将7调整为0【week值0即是星期日】
-				if (this.dayRule == 'weekDay') {
-					for (let i = 0; i < this.dayRuleSup.length; i++) {
-						if (this.dayRuleSup[i] == 7) {
-							this.dayRuleSup[i] = 0;
-						}
-					}
-				}
-			}
-		},
-		// 获取"日"数组-少量为日期规则
-		getDayArr(rule) {
-			this.dateArr[3] = this.getOrderArr(1, 31);
-			this.dayRule = '';
-			this.dayRuleSup = '';
-			if (rule.indexOf('-') >= 0) {
-				this.dateArr[3] = this.getCycleArr(rule, 31, false)
-				this.dayRuleSup = 'null';
-			} else if (rule.indexOf('/') >= 0) {
-				this.dateArr[3] = this.getAverageArr(rule, 31)
-				this.dayRuleSup = 'null';
-			} else if (rule.indexOf('W') >= 0) {
-				this.dayRule = 'workDay';
-				this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]);
-				this.dateArr[3] = [this.dayRuleSup];
-			} else if (rule.indexOf('L') >= 0) {
-				this.dayRule = 'lastDay';
-				this.dayRuleSup = 'null';
-				this.dateArr[3] = [31];
-			} else if (rule !== '*' && rule !== '?') {
-				this.dateArr[3] = this.getAssignArr(rule)
-				this.dayRuleSup = 'null';
-			} else if (rule == '*') {
-				this.dayRuleSup = 'null';
-			}
-		},
-		// 获取"时"数组
-		getHourArr(rule) {
-			this.dateArr[2] = this.getOrderArr(0, 23);
-			if (rule.indexOf('-') >= 0) {
-				this.dateArr[2] = this.getCycleArr(rule, 24, true)
-			} else if (rule.indexOf('/') >= 0) {
-				this.dateArr[2] = this.getAverageArr(rule, 23)
-			} else if (rule !== '*') {
-				this.dateArr[2] = this.getAssignArr(rule)
-			}
-		},
-		// 获取"分"数组
-		getMinArr(rule) {
-			this.dateArr[1] = this.getOrderArr(0, 59);
-			if (rule.indexOf('-') >= 0) {
-				this.dateArr[1] = this.getCycleArr(rule, 60, true)
-			} else if (rule.indexOf('/') >= 0) {
-				this.dateArr[1] = this.getAverageArr(rule, 59)
-			} else if (rule !== '*') {
-				this.dateArr[1] = this.getAssignArr(rule)
-			}
-		},
-		// 获取"秒"数组
-		getSecondArr(rule) {
-			this.dateArr[0] = this.getOrderArr(0, 59);
-			if (rule.indexOf('-') >= 0) {
-				this.dateArr[0] = this.getCycleArr(rule, 60, true)
-			} else if (rule.indexOf('/') >= 0) {
-				this.dateArr[0] = this.getAverageArr(rule, 59)
-			} else if (rule !== '*') {
-				this.dateArr[0] = this.getAssignArr(rule)
-			}
-		},
-		// 根据传进来的min-max返回一个顺序的数组
-		getOrderArr(min, max) {
-			let arr = [];
-			for (let i = min; i <= max; i++) {
-				arr.push(i);
-			}
-			return arr;
-		},
-		// 根据规则中指定的零散值返回一个数组
-		getAssignArr(rule) {
-			let arr = [];
-			let assiginArr = rule.split(',');
-			for (let i = 0; i < assiginArr.length; i++) {
-				arr[i] = Number(assiginArr[i])
-			}
-			arr.sort(this.compare)
-			return arr;
-		},
-		// 根据一定算术规则计算返回一个数组
-		getAverageArr(rule, limit) {
-			let arr = [];
-			let agArr = rule.split('/');
-			let min = Number(agArr[0]);
-			let step = Number(agArr[1]);
-			while (min <= limit) {
-				arr.push(min);
-				min += step;
-			}
-			return arr;
-		},
-		// 根据规则返回一个具有周期性的数组
-		getCycleArr(rule, limit, status) {
-			// status--表示是否从0开始(则从1开始)
-			let arr = [];
-			let cycleArr = rule.split('-');
-			let min = Number(cycleArr[0]);
-			let max = Number(cycleArr[1]);
-			if (min > max) {
-				max += limit;
-			}
-			for (let i = min; i <= max; i++) {
-				let add = 0;
-				if (status == false && i % limit == 0) {
-					add = limit;
-				}
-				arr.push(Math.round(i % limit + add))
-			}
-			arr.sort(this.compare)
-			return arr;
-		},
-		// 比较数字大小(用于Array.sort)
-		compare(value1, value2) {
-			if (value2 - value1 > 0) {
-				return -1;
-			} else {
-				return 1;
-			}
-		},
-		// 格式化日期格式如:2017-9-19 18:04:33
-		formatDate(value, type) {
-			// 计算日期相关值
-			let time = typeof value == 'number' ? new Date(value) : value;
-			let Y = time.getFullYear();
-			let M = time.getMonth() + 1;
-			let D = time.getDate();
-			let h = time.getHours();
-			let m = time.getMinutes();
-			let s = time.getSeconds();
-			let week = time.getDay();
-			// 如果传递了type的话
-			if (type == undefined) {
-				return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s);
-			} else if (type == 'week') {
-				return week;
-			}
-		},
-		// 检查日期是否存在
-		checkDate(value) {
-			let time = new Date(value);
-			let format = this.formatDate(time)
-			return value == format ? true : false;
-		}
-	},
-	watch: {
-		'ex': 'expressionChange'
-	},
-	props: ['ex'],
-	mounted: function () {
-		// 初始化 获取一次结果
-		this.expressionChange();
-	}
-}
-
-</script>

+ 0 - 133
src/components/Crontab/second.vue

@@ -1,133 +0,0 @@
-<template>
-	<el-form size="small">
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="1">
-				秒,允许的通配符[, - * /]
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="2">
-				周期从
-				<el-input-number v-model='cycle01' :min="0" :max="60" /> -
-				<el-input-number v-model='cycle02' :min="0" :max="60" /> 秒
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="3">
-				从
-				<el-input-number v-model='average01' :min="0" :max="60" /> 秒开始,每
-				<el-input-number v-model='average02' :min="0" :max="60" /> 秒执行一次
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="4">
-				指定
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
-					<el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option>
-				</el-select>
-			</el-radio>
-		</el-form-item>
-	</el-form>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			radioValue: 1,
-			cycle01: 1,
-			cycle02: 2,
-			average01: 0,
-			average02: 1,
-			checkboxList: [],
-			checkNum: this.$options.propsData.check
-		}
-	},
-	name: 'crontab-second',
-	props: ['check', 'radioParent'],
-	methods: {
-		// 单选按钮值变化时
-		radioChange() {
-			switch (this.radioValue) {
-				case 1:
-					this.$emit('update', 'second', '*', 'second');
-					this.$emit('update', 'min', '*', 'second');
-					break;
-				case 2:
-					this.$emit('update', 'second', this.cycle01 + '-' + this.cycle02);
-					break;
-				case 3:
-					this.$emit('update', 'second', this.average01 + '/' + this.average02);
-					break;
-				case 4:
-					this.$emit('update', 'second', this.checkboxString);
-					break;
-			}
-		},
-		// 周期两个值变化时
-		cycleChange() {
-			if (this.radioValue == '2') {
-				this.$emit('update', 'second', this.cycleTotal);
-			}
-		},
-		// 平均两个值变化时
-		averageChange() {
-			if (this.radioValue == '3') {
-				this.$emit('update', 'second', this.averageTotal);
-			}
-		},
-		// checkbox值变化时
-		checkboxChange() {
-			if (this.radioValue == '4') {
-				this.$emit('update', 'second', this.checkboxString);
-			}
-		},
-		othChange() {
-			// 反解析
-			let ins = this.cron.second
-			('反解析 second', ins);
-			if (ins === '*') {
-				this.radioValue = 1;
-			} else if (ins.indexOf('-') > -1) {
-				this.radioValue = 2
-			} else if (ins.indexOf('/') > -1) {
-				this.radioValue = 3
-			} else {
-				this.radioValue = 4
-				this.checkboxList = ins.split(',')
-			}
-		}
-	},
-	watch: {
-		"radioValue": "radioChange",
-		'cycleTotal': 'cycleChange',
-		'averageTotal': 'averageChange',
-		'checkboxString': 'checkboxChange',
-		radioParent() {
-			this.radioValue = this.radioParent
-		}
-	},
-	computed: {
-		// 计算两个周期值
-		cycleTotal: function () {
-			this.cycle01 = this.checkNum(this.cycle01, 0, 59)
-			this.cycle02 = this.checkNum(this.cycle02, 0, 59)
-			return this.cycle01 + '-' + this.cycle02;
-		},
-		// 计算平均用到的值
-		averageTotal: function () {
-			this.average01 = this.checkNum(this.average01, 0, 59)
-			this.average02 = this.checkNum(this.average02, 1, 59)
-			return this.average01 + '/' + this.average02;
-		},
-		// 计算勾选的checkbox值合集
-		checkboxString: function () {
-			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
-		}
-	}
-}
-</script>

+ 0 - 167
src/components/Crontab/week.vue

@@ -1,167 +0,0 @@
-<template>
-	<el-form size='small'>
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="1">
-				周,允许的通配符[, - * / L #]
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="2">
-				不指定
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="3">
-				周期从星期
-				<el-input-number v-model='cycle01' :min="1" :max="7" /> -
-				<el-input-number v-model='cycle02' :min="1" :max="7" />
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="4">
-				第
-				<el-input-number v-model='average01' :min="1" :max="4" /> 周的星期
-				<el-input-number v-model='average02' :min="1" :max="7" />
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="5">
-				本月最后一个星期
-				<el-input-number v-model='weekday' :min="1" :max="7" />
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio v-model='radioValue' :label="6">
-				指定
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
-					<el-option v-for="(item,index) of weekList" :key="index" :value="index+1">{{item}}</el-option>
-				</el-select>
-			</el-radio>
-		</el-form-item>
-
-	</el-form>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			radioValue: 2,
-			weekday: 1,
-			cycle01: 1,
-			cycle02: 2,
-			average01: 1,
-			average02: 1,
-			checkboxList: [],
-			weekList: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
-			checkNum: this.$options.propsData.check
-		}
-	},
-	name: 'crontab-week',
-	props: ['check', 'cron'],
-	methods: {
-		// 单选按钮值变化时
-		radioChange() {
-			if (this.radioValue === 1) {
-				this.$emit('update', 'week', '*');
-				this.$emit('update', 'year', '*');
-			} else {
-				if (this.cron.month === '*') {
-					this.$emit('update', 'month', '0', 'week');
-				}
-				if (this.cron.day === '*') {
-					this.$emit('update', 'day', '0', 'week');
-				}
-				if (this.cron.hour === '*') {
-					this.$emit('update', 'hour', '0', 'week');
-				}
-				if (this.cron.min === '*') {
-					this.$emit('update', 'min', '0', 'week');
-				}
-				if (this.cron.second === '*') {
-					this.$emit('update', 'second', '0', 'week');
-				}
-			}
-			switch (this.radioValue) {
-				case 2:
-					this.$emit('update', 'week', '?');
-					break;
-				case 3:
-					this.$emit('update', 'week', this.cycle01 + '-' + this.cycle02);
-					break;
-				case 4:
-					this.$emit('update', 'week', this.average01 + '#' + this.average02);
-					break;
-				case 5:
-					this.$emit('update', 'week', this.weekday + 'L');
-					break;
-				case 6:
-					this.$emit('update', 'week', this.checkboxString);
-					break;
-			}
-		},
-		// 根据互斥事件,更改radio的值
-
-		// 周期两个值变化时
-		cycleChange() {
-			if (this.radioValue == '3') {
-				this.$emit('update', 'week', this.cycleTotal);
-			}
-		},
-		// 平均两个值变化时
-		averageChange() {
-			if (this.radioValue == '4') {
-				this.$emit('update', 'week', this.averageTotal);
-			}
-		},
-		// 最近工作日值变化时
-		weekdayChange() {
-			if (this.radioValue == '5') {
-				this.$emit('update', 'week', this.weekday + 'L');
-			}
-		},
-		// checkbox值变化时
-		checkboxChange() {
-			if (this.radioValue == '6') {
-				this.$emit('update', 'week', this.checkboxString);
-			}
-		},
-	},
-	watch: {
-		"radioValue": "radioChange",
-		'cycleTotal': 'cycleChange',
-		'averageTotal': 'averageChange',
-		'weekdayCheck': 'weekdayChange',
-		'checkboxString': 'checkboxChange',
-	},
-	computed: {
-		// 计算两个周期值
-		cycleTotal: function () {
-			this.cycle01 = this.checkNum(this.cycle01, 1, 7)
-			this.cycle02 = this.checkNum(this.cycle02, 1, 7)
-			return this.cycle01 + '-' + this.cycle02;
-		},
-		// 计算平均用到的值
-		averageTotal: function () {
-			this.average01 = this.checkNum(this.average01, 1, 4)
-			this.average02 = this.checkNum(this.average02, 1, 7)
-			return this.average01 + '#' + this.average02;
-		},
-		// 最近的工作日(格式)
-		weekdayCheck: function () {
-			this.weekday = this.checkNum(this.weekday, 1, 7)
-			return this.weekday;
-		},
-		// 计算勾选的checkbox值合集
-		checkboxString: function () {
-			let str = this.checkboxList.join();
-			return str == '' ? '*' : str;
-		}
-	}
-}
-</script>

+ 0 - 144
src/components/Crontab/year.vue

@@ -1,144 +0,0 @@
-<template>
-	<el-form size="small">
-		<el-form-item>
-			<el-radio :label="1" v-model='radioValue'>
-				不填,允许的通配符[, - * /]
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio :label="2" v-model='radioValue'>
-				每年
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio :label="3" v-model='radioValue'>
-				周期从
-				<el-input-number v-model='cycle01' :min='fullYear' /> -
-				<el-input-number v-model='cycle02' :min='fullYear' />
-			</el-radio>
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio :label="4" v-model='radioValue'>
-				从
-				<el-input-number v-model='average01' :min='fullYear' /> 年开始,每
-				<el-input-number v-model='average02' :min='fullYear' /> 年执行一次
-			</el-radio>
-
-		</el-form-item>
-
-		<el-form-item>
-			<el-radio :label="5" v-model='radioValue'>
-				指定
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple>
-					<el-option v-for="item in 9" :key="item" :value="item - 1 + fullYear" :label="item -1 + fullYear" />
-				</el-select>
-			</el-radio>
-		</el-form-item>
-	</el-form>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			fullYear: 0,
-			radioValue: 1,
-			cycle01: 0,
-			cycle02: 0,
-			average01: 0,
-			average02: 1,
-			checkboxList: [],
-			checkNum: this.$options.propsData.check
-		}
-	},
-	name: 'crontab-year',
-	props: ['check', 'month', 'cron'],
-	methods: {
-		// 单选按钮值变化时
-		radioChange() {
-			if (this.cron.month === '*') {
-				this.$emit('update', 'month', '0', 'year');
-			}
-			if (this.cron.day === '*') {
-				this.$emit('update', 'day', '0', 'year');
-			}
-			if (this.cron.hour === '*') {
-				this.$emit('update', 'hour', '0', 'year');
-			}
-			if (this.cron.min === '*') {
-				this.$emit('update', 'min', '0', 'year');
-			}
-			if (this.cron.second === '*') {
-				this.$emit('update', 'second', '0', 'year');
-			}
-			switch (this.radioValue) {
-				case 1:
-					this.$emit('update', 'year', '');
-					break;
-				case 2:
-					this.$emit('update', 'year', '*');
-					break;
-				case 3:
-					this.$emit('update', 'year', this.cycle01 + '-' + this.cycle02);
-					break;
-				case 4:
-					this.$emit('update', 'year', this.average01 + '/' + this.average02);
-					break;
-				case 5:
-					this.$emit('update', 'year', this.checkboxString);
-					break;
-			}
-		},
-		// 周期两个值变化时
-		cycleChange() {
-			if (this.radioValue == '3') {
-				this.$emit('update', 'year', this.cycleTotal);
-			}
-		},
-		// 平均两个值变化时
-		averageChange() {
-			if (this.radioValue == '4') {
-				this.$emit('update', 'year', this.averageTotal);
-			}
-		},
-		// checkbox值变化时
-		checkboxChange() {
-			if (this.radioValue == '5') {
-				this.$emit('update', 'year', this.checkboxString);
-			}
-		}
-	},
-	watch: {
-		"radioValue": "radioChange",
-		'cycleTotal': 'cycleChange',
-		'averageTotal': 'averageChange',
-		'checkboxString': 'checkboxChange'
-	},
-	computed: {
-		// 计算两个周期值
-		cycleTotal: function () {
-			this.cycle01 = this.checkNum(this.cycle01, this.fullYear, this.fullYear + 100)
-			this.cycle02 = this.checkNum(this.cycle02, this.fullYear + 1, this.fullYear + 101)
-			return this.cycle01 + '-' + this.cycle02;
-		},
-		// 计算平均用到的值
-		averageTotal: function () {
-			this.average01 = this.checkNum(this.average01, this.fullYear, this.fullYear + 100)
-			this.average02 = this.checkNum(this.average02, 1, 10)
-			return this.average01 + '/' + this.average02;
-		},
-		// 计算勾选的checkbox值合集
-		checkboxString: function () {
-			let str = this.checkboxList.join();
-			return str;
-		}
-	},
-	mounted: function () {
-		// 仅获取当前年份
-		this.fullYear = Number(new Date().getFullYear());
-	}
-}
-</script>

+ 0 - 21
src/components/DictData/index.js

@@ -1,21 +0,0 @@
-import Vue from 'vue'
-import DataDict from '@/utils/dict'
-import { getDicts as getDicts } from '@/api/system/dict/data'
-
-function install() {
-  Vue.use(DataDict, {
-    metas: {
-      '*': {
-        labelField: 'dictLabel',
-        valueField: 'dictValue',
-        request(dictMeta) {
-          return getDicts(dictMeta.type).then(res => res.data)
-        },
-      },
-    },
-  })
-}
-
-export default {
-  install,
-}

+ 0 - 379
src/components/Editor/index.vue

@@ -1,379 +0,0 @@
-<template>
-  <div>
-    <el-upload
-      :action="uploadUrl"
-      :on-error="handleUploadError"
-      name="file"
-      :show-file-list="false"
-      :headers="headers"
-      style="display: none"
-      ref="upload"
-      :http-request="imageChange"
-    >
-    </el-upload>
-    <div class="editor" ref="editor" :style="styles"></div>
-  </div>
-</template>
-
-<script>
-import Quill from "quill";
-import "quill/dist/quill.core.css";
-import "quill/dist/quill.snow.css";
-import "quill/dist/quill.bubble.css";
-import { getToken } from "@/utils/auth";
-import ImageResize from "quill-image-resize-module";
-
-export default {
-  name: "Editor",
-  props: {
-    /* 编辑器的内容 */
-    value: {
-      type: String,
-      default: "",
-    },
-    /* 高度 */
-    height: {
-      type: Number,
-      default: null,
-    },
-    /* 最小高度 */
-    minHeight: {
-      type: Number,
-      default: null,
-    },
-    /* 最大高度 */
-    maxHeight: {
-      type: Number,
-      default: null,
-    },
-    /* 只读 */
-    readOnly: {
-      type: Boolean,
-      default: false,
-    },
-    // /* 上传地址 */
-    uploadStatus: {
-      type: Number,
-      default: null,
-    },
-  },
-  data() {
-    return {
-      datas: {},
-      uploadUrl: "",
-      headers: {
-        AuthorizationToken: "Bearer " + getToken(),
-      },
-      Quill: null,
-      currentValue: "",
-      options: {
-        theme: "snow",
-        bounds: document.body,
-        debug: "warn",
-        modules: {
-          clipboard: {
-            // 粘贴版,处理粘贴时候带图片
-            matchers: [[Node.ELEMENT_NODE, this.handleCustomMatcher]],
-          },
-          // 工具栏配置
-          toolbar: [
-            ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
-            ["blockquote", "code-block"], // 引用  代码块
-            [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
-            [{ indent: "-1" }, { indent: "+1" }], // 缩进
-            [{ size: ["small", false, "large", "huge"] }], // 字体大小
-            [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
-            [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
-            [{ align: [] }], // 对齐方式
-            ["clean"], // 清除文本格式
-            ["link", "image"], // 链接、图片
-          ],
-          imageResize: {
-            displayStyles: {
-              backgroundColor: "black",
-              border: "none",
-              color: "white",
-            },
-            modules: ["Resize", "DisplaySize", "Toolbar"],
-          },
-        },
-        placeholder: "请输入内容",
-        readOnly: this.readOnly,
-      },
-    };
-  },
-  computed: {
-    styles() {
-      let style = {};
-      if (this.minHeight) {
-        style.minHeight = `${this.minHeight}px`;
-      }
-      if (this.maxHeight) {
-        style.maxHeight = `${this.maxHeight}px`;
-      }
-      if (this.height) {
-        style.height = `${this.height}px`;
-      }
-      return style;
-    },
-  },
-  watch: {
-    value: {
-      handler(val) {
-        if (val !== this.currentValue) {
-          this.currentValue = val === null ? "" : val;
-          if (this.Quill) {
-            this.Quill.pasteHTML(this.currentValue);
-          }
-        }
-      },
-      immediate: true,
-    },
-  },
-  mounted() {
-    Quill.register("modules/imageResize", ImageResize);
-    new Promise((resolve, reject) => {
-      var datats = {
-        imageStatus: this.uploadStatus,
-      };
-      this.$api.getPolicy(datats).then((res) => {
-        this.datas = res.data.resultContent;
-        console.log(res.data.resultContent.host)
-        this.uploadUrl = res.data.resultContent.host;
-        resolve();
-      });
-    }).then(() => {
-      this.init();
-    });
-  },
-  beforeDestroy() {
-    this.Quill = null;
-  },
-  methods: {
-    handleCustomMatcher(node, Delta) {
-      console.log("handleCustomMatcher")
-      let ops = [];
-      Delta.ops.forEach((op) => {
-        if (op.insert && typeof op.insert === "string") {
-          // 如果粘贴了图片,这里会是一个对象,所以可以这样处理
-          ops.push({
-            insert: op.insert,
-          });
-        } else {
-          if (op.insert.image.includes("data:image")) {
-            /**
-             * 粘贴图片
-             */
-            let arr = op.insert.image.split(",");
-            let mime = arr[0].match(/:(.*?);/)[1];
-            let bytes = atob(arr[1]);
-            let n = bytes.length;
-            let ia = new Uint8Array(n);
-            while (n--) {
-              ia[n] = bytes.charCodeAt(n);
-            }
-            let arry = new File([ia], "随机名称", { type: mime });
-            this.imageChange({
-              file: arry,
-            });
-          } else {
-            ops.push({
-              insert: op.insert,
-            });
-          }
-        }
-      });
-      Delta.ops = ops;
-      return Delta;
-    },
-    base64ToFile(base64, fileName) {
-      console.log("base64ToFile")
-      return new Promise((resolve, reject) => {
-        let arr = base64.split(",");
-        let mime = arr[0].match(/:(.*?);/)[1];
-        let bytes = atob(arr[1]);
-        let n = bytes.length;
-        let ia = new Uint8Array(n);
-        while (n--) {
-          ia[n] = bytes.charCodeAt(n);
-        }
-        let arry = new File([ia], fileName, { type: mime });
-        this.$upload.upload(arry, 2).then((res) => {
-          resolve(this.$methodsTools.splitImgHost(res));
-        });
-      });
-    },
-    init() {
-      console.log("init")
-      const editor = this.$refs.editor;
-      this.Quill = new Quill(editor, this.options);
-      // 如果设置了上传地址则自定义图片上传事件
-      if (this.uploadUrl) {
-        let toolbar = this.Quill.getModule("toolbar");
-        toolbar.addHandler("image", (value) => {
-          this.uploadType = "image";
-          if (value) {
-            // document.querySelector(".avatar-uploader input").click();
-            this.$refs.upload.$children[0].$refs.input.click();
-          } else {
-            this.quill.format("image", false);
-          }
-        });
-        toolbar.addHandler("video", (value) => {
-          this.uploadType = "video";
-          if (value) {
-            this.$refs.upload.$children[0].$refs.input.click();
-          } else {
-            this.quill.format("video", false);
-          }
-        });
-      }
-
-      this.Quill.enable(false);
-      this.Quill.pasteHTML(this.currentValue);
-      // this.$nextTick(function() {
-      //   this.Quill.blur();
-      //   this.Quill.enable(true);
-      // });
-      this.Quill.on("text-change", (delta, oldDelta, source) => {
-        const html = this.$refs.editor.children[0].innerHTML;
-        const text = this.Quill.getText();
-        const quill = this.Quill;
-        this.currentValue = html;
-        this.$emit("input", html);
-        this.$emit("on-change", { html, text, quill });
-        this.$emit("on-text-change", delta, oldDelta, source);
-      });
-      this.Quill.on("selection-change", (range, oldRange, source) => {
-        this.$emit("on-selection-change", range, oldRange, source);
-      });
-      this.Quill.on("editor-change", (eventName, ...args) => {
-        this.$emit("on-editor-change", eventName, ...args);
-      });
-
-      editor.onclick = () => {
-        this.Quill.enable(true);
-        this.Quill.focus();
-      };
-    },
-    imageChange(param, type) {
-      console.log("imageChange")
-      this.$upload
-        .upload(param.file, this.uploadStatus)
-        .then((res) => {
-          let quill = this.Quill;
-          // 获取光标所在位置
-          let length = quill.getSelection().index;
-          // 插入图片  res.url为服务器返回的图片地址
-          quill.insertEmbed(
-            length,
-            "image",
-            this.$methodsTools.splitImgHost(res)
-          );
-          // 调整光标到最后
-          quill.setSelection(length + 1);
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    },
-    handleUploadError() {
-      this.$message.error("图片插入失败");
-    },
-  },
-};
-</script>
-
-<style>
-.editor,
-.ql-toolbar {
-  white-space: pre-wrap !important;
-  line-height: normal !important;
-}
-.ql-toolbar.ql-snow {
-  border-top-left-radius: 8px;
-  border-top-right-radius: 8px;
-}
-.ql-container {
-  border-bottom-left-radius: 8px;
-  border-bottom-right-radius: 8px;
-  overflow: auto;
-}
-.quill-img {
-  display: none;
-}
-.ql-snow .ql-tooltip[data-mode="link"]::before {
-  content: "请输入链接地址:";
-}
-.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
-  border-right: 0px;
-  content: "保存";
-  padding-right: 0px;
-}
-
-.ql-snow .ql-tooltip[data-mode="video"]::before {
-  content: "请输入视频地址:";
-}
-
-.ql-snow .ql-picker.ql-size .ql-picker-label::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item::before {
-  content: "14px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
-  content: "10px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
-  content: "18px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
-  content: "32px";
-}
-
-.ql-snow .ql-picker.ql-header .ql-picker-label::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item::before {
-  content: "文本";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
-  content: "标题1";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
-  content: "标题2";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
-  content: "标题3";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
-  content: "标题4";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
-  content: "标题5";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
-  content: "标题6";
-}
-
-.ql-snow .ql-picker.ql-font .ql-picker-label::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item::before {
-  content: "标准字体";
-}
-.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
-  content: "衬线字体";
-}
-.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
-  content: "等宽字体";
-}
-.ql-toolbar {
-  background-color: #eee !important;
-}
-</style>

+ 0 - 240
src/components/Study/StudentInfo.vue

@@ -1,240 +0,0 @@
-<template>
-  <div class="studyInfo">
-    <header>
-      <div class="left"><i></i><span>学员信息</span></div>
-      <div class="goods_info">
-        <span v-for="(item, i) in headList" :key="i">
-          <strong style="color: red">「{{ i + 1 }}」</strong>
-          {{ item.lebel }}
-          <span v-if="item.key != 'num' && item.key != 'time'">{{
-            userData[item.key]
-          }}</span>
-          <span v-else-if="item.key == 'num'"
-            >完成{{ userData.stuAllNum + userData.recordNum }}节的内容学习</span
-          >
-          <span v-else-if="item.key == 'time'"
-            >{{ $methodsTools.onlyForma(userData.studyStartTime, false) }} -
-            {{ $methodsTools.onlyForma(userData.studyEndTime, false) }}</span
-          >
-        </span>
-      </div>
-
-      <el-button class="btn" type="primary" size="mini" @click="packUp">{{
-        showBox ? "收起" : "展开"
-      }}</el-button>
-    </header>
-
-    <div class="info_img" v-show="showBox">
-      <ul>
-        <li>学员编码:{{ userData.studentCode }}</li>
-        <li>学员姓名:{{ userData.realName }}</li>
-        <li>学员身份证号码:{{ userData.idCard }}</li>
-        <li>绑定手机号码:{{ userData.telPhone }}</li>
-      </ul>
-      <div class="img_by">
-        <div class="photoSty1">
-          <img
-            v-if="!userData.oneInchPhotos"
-            src="@/assets/images/peopleImg.png"
-            alt=""
-          />
-          <el-image
-            v-else
-            style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(userData.oneInchPhotos)"
-            :preview-src-list="[
-              $methodsTools.splitImgHost(userData.oneInchPhotos),
-            ]"
-          >
-          </el-image>
-          <div class="pos_bottom">一寸头像图</div>
-        </div>
-        <div class="photoSty2">
-          <img
-            v-if="!userData.idCardImg1"
-            src="@/assets/images/idcardF.png"
-            alt=""
-          />
-          <el-image
-            v-else
-            style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(userData.idCardImg1)"
-            :preview-src-list="[
-              $methodsTools.splitImgHost(userData.idCardImg1),
-            ]"
-          >
-          </el-image>
-          <div class="pos_bottom">身份证头像照</div>
-        </div>
-        <div class="photoSty2" style="margin-right: 0px">
-          <img
-            v-if="!userData.idCardImg2"
-            src="@/assets/images/idcardZ.png"
-            alt=""
-          />
-          <el-image
-            v-else
-            style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(userData.idCardImg2)"
-            :preview-src-list="[
-              $methodsTools.splitImgHost(userData.idCardImg2),
-            ]"
-          >
-          </el-image>
-          <div class="pos_bottom">身份证国徽照</div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    userData: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-    all: {
-      type: Boolean,
-      default: true,
-    },
-  },
-  data() {
-    return {
-      showBox: true,
-    };
-  },
-  methods: {
-    packUp() {
-      this.showBox = !this.showBox;
-      this.$emit("change");
-    },
-  },
-  computed: {
-    headList() {
-      const list = [
-        { lebel: "所在班级:", key: "className" },
-        { lebel: "学时:", key: "classHours" },
-        { lebel: "", key: "num" },
-        { lebel: "学习时间:", key: "time" },
-      ];
-      if (this.all) {
-        list.unshift({ lebel: "所购商品:", key: "goodsName" });
-      }
-      return list;
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.studyInfo {
-  background: #ffffff;
-  box-shadow: 0px 0px 8px 0px rgba(217, 217, 217, 0.8);
-  border-radius: 8px;
-  padding: 8px 16px;
-  overflow: hidden;
-  & > header {
-    display: flex;
-    position: relative;
-    flex-wrap: wrap;
-    // height: 48px;
-    line-height: 48px;
-    & > .left {
-      display: flex;
-      align-items: center;
-      white-space: nowrap;
-      margin-right: 40px;
-      i {
-        display: inline-block;
-        width: 2px;
-        height: 18px;
-        background: #0c5dfb;
-        margin-right: 8px;
-      }
-      span {
-        color: #666;
-        font-weight: bold;
-      }
-    }
-    & > .goods_info {
-      display: flex;
-      flex-wrap: wrap;
-      span {
-        font-size: 14px;
-        padding-left: 20px;
-        white-space: nowrap;
-      }
-    }
-    .btn {
-      position: absolute;
-      right: 0;
-      top: 10px;
-    }
-  }
-  & > .info_img {
-    display: flex;
-    height: 210px;
-    ul {
-      width: 320px;
-      li {
-        margin-bottom: 12px;
-        font-size: 14px;
-      }
-    }
-    .img_by {
-      flex: 1;
-      display: flex;
-      align-items: center;
-      .pos_bottom {
-        position: absolute;
-        z-index: 1;
-        bottom: 0px;
-        width: 100%;
-        height: 32px;
-        background-color: rgba(53, 53, 53, 0.6);
-        text-align: center;
-        color: #fff;
-        font-size: 16px;
-        line-height: 32px;
-      }
-      & > .photoSty1 {
-        width: 152px;
-        height: 208px;
-        position: relative;
-        overflow: hidden;
-        border-radius: 8px;
-        background-color: #f5f5f5;
-        margin-right: 75px;
-        & > img {
-          width: 106px;
-          height: 150px;
-          margin: 29px auto 0px;
-          display: block;
-        }
-      }
-      & > .photoSty2 {
-        width: 328px;
-        height: 208px;
-        position: relative;
-        overflow: hidden;
-        border-radius: 8px;
-        background-color: #f5f5f5;
-        margin-right: 75px;
-        & > img {
-          width: 243px;
-          height: 154px;
-          margin: 27px auto 0px;
-          display: block;
-        }
-        &:last-of-type {
-          margin-right: 0px;
-        }
-      }
-    }
-  }
-}
-</style>>

+ 0 - 245
src/components/bankInfo.vue

@@ -1,245 +0,0 @@
-<template>
-  <div id="bankInfo">
-    <el-dialog
-      :visible.sync="dialogCG"
-      width="660px"
-      :show-close="false"
-      :close-on-click-modal="false"
-    >
-      <div slot="title" class="hearders">
-        <div class="leftTitle">预览题目</div>
-        <div class="rightBoxs">
-          <img
-            src="@/assets/images/Close@2x.png"
-            alt=""
-            @click="dialogCG = false"
-          />
-        </div>
-      </div>
-      <div>
-        <el-form label-width="80px">
-          <el-form-item label="题目类型">
-            <span v-if="listData.type === 1">单选题</span>
-            <span v-if="listData.type === 2">多选题</span>
-            <span v-if="listData.type === 3">判断题</span>
-            <span v-if="listData.type === 4">案例题</span>
-            <span v-if="listData.type === 5">简答题</span>
-          </el-form-item>
-          <el-form-item label="题目标题">
-            <div v-html="listData.content"></div>
-          </el-form-item>
-          <el-form-item v-if="listData.type === 4">
-            <div v-for="(items, indexs) in listData.jsonStr" :key="indexs">
-              <div>第{{ indexs + 1 }}题</div>
-              <el-form-item label="题目类型">
-                <span v-if="items.type === 1">单选题</span>
-                <span v-if="items.type === 2">多选题</span>
-                <span v-if="items.type === 3">判断题</span>
-                <span v-if="items.type === 5">简答题</span>
-              </el-form-item>
-              <el-form-item label="题目标题">
-                <div v-html="items.content"></div>
-              </el-form-item>
-              <el-form-item label="题目选项" v-if="items.type !== 3">
-                <ul>
-                  <li
-                    v-for="(item, index) in items.optionsList"
-                    :key="index"
-                    class="dis_flex"
-                  >
-                    <span>{{ index + 1 }}:</span>
-                    <span>{{ item.content }}</span>
-                    <img
-                      v-if="item.imgUrl"
-                      style="width: 50px; height: 50px"
-                      :src="$methodsTools.splitImgHost(item.imgUrl)"
-                      alt=""
-                    />
-                  </li>
-                </ul>
-              </el-form-item>
-              <el-form-item label="正确选项">
-                <span v-if="items.type === 3">{{
-                  items.answerQuestion == 1
-                    ? "正确"
-                    : items.answerQuestion == 0
-                    ? "错误"
-                    : ""
-                }}</span>
-                <span v-else>{{ items.answerQuestion }}</span>
-              </el-form-item>
-              <el-form-item label="答案解析">
-                <div v-html="items.analysisContent"></div>
-              </el-form-item>
-            </div>
-          </el-form-item>
-          <div v-else>
-            <el-form-item label="题目选项" v-if="listData.type !== 3">
-              <ul>
-                <li
-                  v-for="(item, index) in listData.jsonStr"
-                  :key="index"
-                  class="dis_flex"
-                >
-                  <span>{{ index + 1 }}:</span>
-                  <span>{{ item.content }}</span>
-                  <img
-                    v-if="item.imgUrl"
-                    style="width: 50px; height: 50px"
-                    :src="$methodsTools.splitImgHost(item.imgUrl)"
-                    alt=""
-                  />
-                </li>
-              </ul>
-            </el-form-item>
-            <el-form-item label="正确选项">
-              <span v-if="listData.type === 3">{{
-                listData.answerQuestion == 1
-                  ? "正确"
-                  : listData.answerQuestion == 0
-                  ? "错误"
-                  : ""
-              }}</span>
-              <span v-else>{{ listData.answerQuestion }}</span>
-            </el-form-item>
-          </div>
-          <el-form-item label="答案解析">
-            <div v-html="listData.analysisContent"></div>
-          </el-form-item>
-        </el-form>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogCG = false">返回</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      dialogCG: false,
-      listData: {},
-    };
-  },
-  mounted() {
-    this.$nextTick(function () {
-      this.$on("childmethod", function (v) {
-        this.getInfos(v);
-      });
-    });
-  },
-  methods: {
-    getInfos(v) {
-      this.$api
-        .inquirebankexamquestionList({ examId: v.examId })
-        .then((res) => {
-          if (res.data.length) {
-            res.data.map((item) => {
-              item.jsonStr = JSON.parse(item.jsonStr);
-            });
-            this.listData = res.data[v.topicNum - 1];
-            this.dialogCG = true;
-          }
-        });
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.dis_flex {
-  display: flex;
-  align-items: center;
-}
-/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>

+ 0 - 261
src/components/bankMsg/index.vue

@@ -1,261 +0,0 @@
-<template>
-  <div id="bankMsg">
-    <div class="dis_flex">
-      <span class="span_sty">题目内容:</span>
-      <div>
-        <div class="divPy" v-html="imgExiz(bankMsg.content)"></div>
-        <div v-if="bankMsg.type === 4">
-          <div
-            style="
-              background: #eee;
-              padding: 10px;
-              border-bottom: 1px solid #a4a4a4;
-            "
-            v-for="(its, inds) in JSON.parse(bankMsg.jsonStr)"
-            :key="inds"
-          >
-            <div class="dis_flex">
-              <span class="span_sty">题目类型:</span>
-              <div>
-                <span>{{ getTypeName(its.type) }}</span>
-              </div>
-            </div>
-            <div class="dis_flex">
-              <span class="span_sty">题目内容:</span>
-              <div>
-                <div class="divPy" v-html="imgExiz(its.content)"></div>
-              </div>
-            </div>
-            <div
-              class="dis_flex"
-              v-if="its.type !== 4 && its.type !== 5 && its.type !== 3"
-            >
-              <span class="span_sty">选项内容:</span>
-              <div>
-                <ul>
-                  <li
-                    v-for="(itemsxs, indexsxs) in its.optionsList"
-                    :key="indexsxs"
-                    style="margin-bottom: 10px"
-                  >
-                    {{ Gest(indexsxs + 1) }}:{{ itemsxs.content }}
-                    <div style="margin: 10px 0px">
-                      <el-image
-                        v-if="itemsxs.imgUrl"
-                        style="
-                          max-width: 100%;
-                          max-height: 100%;
-                          vertical-align: middle;
-                        "
-                        :src="$methodsTools.splitImgHost(itemsxs.imgUrl)"
-                        :preview-src-list="[
-                          $methodsTools.splitImgHost(itemsxs.imgUrl),
-                        ]"
-                      >
-                      </el-image>
-                    </div>
-                  </li>
-                </ul>
-              </div>
-            </div>
-            <div class="dis_flex" v-if="its.type !== 5">
-              <span class="span_sty">正确答案:</span>
-              <div>
-                <span v-if="its.type === 3">
-                  {{ its.answerQuestion == 1 ? "正确" : "错误" }}
-                </span>
-                <span v-else>
-                  {{ getDictChanges(its.answerQuestion) }}
-                </span>
-              </div>
-            </div>
-            <div class="dis_flex">
-              <span class="span_sty">答案解析:</span>
-              <div>
-                <div v-html="imgExiz(its.analysisContent)"></div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div
-      class="dis_flex"
-      v-if="bankMsg.type !== 4 && bankMsg.type !== 5 && bankMsg.type !== 3"
-    >
-      <span class="span_sty">选项内容:</span>
-      <div>
-        <ul>
-          <li
-            v-for="(items, indexs) in JSON.parse(bankMsg.jsonStr)"
-            :key="indexs"
-            style="margin-bottom: 10px"
-          >
-            {{ Gest(indexs + 1) }}:{{ items.content }}
-
-            <div style="margin: 10px 0px">
-              <el-image
-                v-if="items.imgUrl"
-                style="
-                  max-width: 100%;
-                  max-height: 100%;
-                  vertical-align: middle;
-                "
-                :src="$methodsTools.splitImgHost(items.imgUrl)"
-                :preview-src-list="[$methodsTools.splitImgHost(items.imgUrl)]"
-              >
-              </el-image>
-            </div>
-          </li>
-        </ul>
-      </div>
-    </div>
-    <div class="dis_flex" v-if="bankMsg.type !== 5 && bankMsg.type !== 4">
-      <span class="span_sty">正确答案:</span>
-      <div>
-        <span v-if="bankMsg.type === 3">
-          {{ bankMsg.answerQuestion == 1 ? "正确" : "错误" }}
-        </span>
-        <span v-else>
-          {{ getDictChanges(bankMsg.answerQuestion) }}
-        </span>
-      </div>
-    </div>
-    <div class="dis_flex" v-if="bankMsg.type !== 4">
-      <span class="span_sty">答案解析:</span>
-      <div><div v-html="imgExiz(bankMsg.analysisContent)"></div></div>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  props: ["bankMsg"],
-  data() {
-    return {};
-  },
-  computed: {
-    /**
-     * 题目类型转换名称
-     */
-    getTypeName: function () {
-      return function (type) {
-        let typeName = "";
-        switch (type) {
-          case 1:
-            typeName = "单选题";
-            break;
-          case 2:
-            typeName = "多选题";
-            break;
-          case 3:
-            typeName = "判断题";
-            break;
-          case 4:
-            typeName = "案例题";
-            break;
-          case 5:
-            typeName = "简答题";
-            break;
-
-          default:
-            break;
-        }
-        return typeName;
-      };
-    },
-
-    imgExiz: function () {
-      return function (vms) {
-        if (!vms) {
-          return vms;
-        } else {
-          var ast1 = vms.replace(/<p/gi, '<p style="margin:0px;"');
-          var ast = ast1.replace(/<img/gi, '<img style="max-width:100%;"');
-          return ast;
-        }
-      };
-    },
-  },
-  methods: {
-    /**
-     * 选项转换
-     */
-    Gest(ints) {
-      var int = parseInt(ints);
-      var ast = "";
-      switch (int) {
-        case 1:
-          ast = "A";
-          break;
-        case 2:
-          ast = "B";
-          break;
-        case 3:
-          ast = "C";
-          break;
-        case 4:
-          ast = "D";
-          break;
-        case 5:
-          ast = "E";
-          break;
-        case 6:
-          ast = "F";
-          break;
-        case 7:
-          ast = "G";
-          break;
-        case 8:
-          ast = "H";
-          break;
-        default:
-          ast = "X";
-          break;
-      }
-      return ast;
-    },
-    getDictChanges(dan) {
-      var arst = [];
-      var arrays;
-      if (dan instanceof Object) {
-        arrays = dan;
-      } else {
-        if (dan) {
-          arrays = dan.toString().split(",");
-        } else {
-          return "";
-        }
-      }
-      for (let i = 0; i < arrays.length; i++) {
-        arst.push(this.Gest(arrays[i]));
-      }
-      return arst.join(",");
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-#bankMsg {
-  width: 100%;
-}
-.dis_flex {
-  display: flex;
-  margin-bottom: 6px;
-  & > span {
-    width: 90px;
-    flex-shrink: 0;
-  }
-  & > div {
-    flex: 1;
-    white-space: initial;
-    ul {
-      margin: 0;
-    }
-  }
-}
-.span_sty {
-  font-weight: bold;
-}
-</style>

+ 0 - 437
src/components/busIns.vue

@@ -1,437 +0,0 @@
-<template>
-  <div id="busIns">
-    <el-form label-position="right" label-width="110px" :model="listData">
-      <el-form-item
-        v-for="(items, indexs) in listitem"
-        :key="indexs"
-        :label="items.label"
-        :prop="items.prop"
-        :required="true"
-      >
-        <div v-if="items.scope === 'buss'">
-          <el-select
-            v-model="eduType"
-            placeholder="请选择教育类型"
-            @change="changeEduType"
-          >
-            <el-option
-              v-for="(item, index) in eduTypeOptions"
-              :key="index"
-              :label="item.educationName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            v-model="courType"
-            placeholder="请选择业务层次"
-            @change="changecourseType"
-          >
-            <el-option
-              v-for="(item, index) in newCourTypeOptions"
-              :key="index"
-              :label="item.projectName + '-' + item.businessName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-popover
-            ref="popovers"
-            placement="bottom"
-            trigger="click"
-            @show="showHandle"
-            @hide="hideHandle"
-            :disabled="courType ? false : true"
-          >
-            <el-checkbox
-              v-model="checkAll"
-              @change="handleCheckAllChange"
-              :indeterminate="isIndeterminate"
-              >全选</el-checkbox
-            >
-            <el-checkbox-group
-              v-model="sujectArray"
-              class="checkboxSty"
-              @change="handleCheckedCitiesChange"
-            >
-              <el-checkbox
-                v-for="(item, index) in newSujectOption"
-                :label="item.newId"
-                :key="index"
-                >{{ item.subjectName }}</el-checkbox
-              >
-            </el-checkbox-group>
-            <div style="display: block; text-align: center; margin-top: 10px">
-              <el-button size="mini" type="primary" @click="submitSujectArray"
-                >确定</el-button
-              >
-            </div>
-            <el-button
-              slot="reference"
-              style="margin-left: 12px"
-              @click="getMessage"
-              >请选择科目</el-button
-            >
-          </el-popover>
-        </div>
-        <div v-else>
-          <div :class="changeHeight ? 'ach' : 'clh'">
-            <div
-              v-for="(item, index) in newSujectApis"
-              :key="index"
-              class="listBoxStys"
-            >
-              {{
-                item.educationName +
-                " - " +
-                item.projectName +
-                " - " +
-                item.businessName +
-                " - " +
-                item.subjectName
-              }}
-              <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
-            </div>
-          </div>
-          <el-popover
-            placement="bottom-start"
-            trigger="hover"
-            :close-delay="50"
-          >
-            <ul style="margin: 0; max-width: 600px">
-              <li
-                class="copyDataLi"
-                :class="changeSty(itemT)"
-                v-for="(itemT, indexT) in localData"
-                :key="indexT"
-                @click="unTime(itemT)"
-              >
-                {{
-                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
-                }}
-              </li>
-            </ul>
-            <el-button
-              v-show="localData.length"
-              type="danger"
-              slot="reference"
-              size="mini"
-              style="margin-right: 10px"
-              >最近选择</el-button
-            >
-          </el-popover>
-          <el-button
-            size="mini"
-            v-if="newSujectApis.length > 1"
-            @click="changeType"
-            >{{ changeHeight ? "展开" : "关闭" }}</el-button
-          ><el-button
-            size="mini"
-            v-if="newSujectApis.length > 0"
-            @click="sujectApis = []"
-            >清空</el-button
-          >
-          <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
-        </div>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-export default {
-  props: ["typeBus", "sujectApisTable", "newSujectApisTable"],
-  data() {
-    return {
-      isIndeterminate: false,
-      checkAll: false,
-      changeHeight: false,
-      eduTypeOptions: [], //教育类型数据
-      projectTypeOptions: [], //项目类型数据
-      courTypeOptions: [], //业务层次数据
-      newCourTypeOptions: [], //当前业务层次数据
-      sujectOption: [], //科目数据
-      newSujectOption: [], //当前科目数据数据
-      eduType: "", //当前选中教育类型
-      courType: "", //当前选中业务层次
-      sujectApis: [], //当前存在的科目
-      newSujectApis: [],
-      sujectArray: [], //选中的科目
-      listData: {},
-      listitem: [
-        {
-          label: "适用业务层级",
-          scope: "buss",
-        },
-        {
-          label: "",
-          scope: "activeBox",
-        },
-      ],
-    };
-  },
-  watch: {
-    sujectApis: {
-      immediate: true,
-      handler(newName, oldName) {
-        this.changeTypes();
-      },
-    },
-    sujectApisTable: {
-      handler(newVal, oldVal) {
-        this.sujectApis = newVal;
-      },
-      // 立即处理 进入页面就触发
-      immediate: true,
-    },
-    newSujectApisTable: {
-      handler(newVal, oldVal) {
-        this.newSujectApis = newVal;
-      },
-      // 立即处理 进入页面就触发
-      immediate: true,
-    },
-    newSujectApis: {
-      handler(newVal, oldVal) {
-        if (newVal && newVal.length > 0) {
-          const finds = newVal.findIndex((item) => {
-            return item.businessName === "安管三类";
-          });
-          this.$emit("disableType", finds);
-        }else{
-          this.$emit("disableType", -1);
-        }
-      },
-      immediate: true,
-    },
-  },
-  created() {
-    this.localData = this.$methodsTools.getBusinessList();
-  },
-  mounted() {
-    this.getDict();
-  },
-  methods: {
-    UPDates() {
-      this.localData = this.$methodsTools.getBusinessList();
-    },
-    unTime(val) {
-      let a = `${val.businessId}-${val.subjectId}`;
-      if (this.sujectApis.includes(a)) {
-        this.sujectApis.splice(this.sujectApis.indexOf(a), 1);
-      } else {
-        this.sujectApis.push(a);
-      }
-    },
-    changeSty(val) {
-      var arr = "";
-      this.sujectApis.forEach((item) => {
-        let arr1 = item.split("-").map(Number);
-        if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
-          arr = "activeStyIcons";
-        }
-      });
-      return arr;
-    },
-    handleCheckedCitiesChange() {
-      let nid = this.newSujectOption.map((item) => {
-        return item.newId;
-      });
-      this.checkAll = this.sujectArray.length === nid.length;
-      this.isIndeterminate =
-        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
-    },
-    setFunc(arr) {
-      var arrays = [];
-      for (let i = 0; i < arr.length; i++) {
-        if (!arrays.includes(arr[i])) {
-          arrays.push(arr[i]);
-        }
-      }
-      return arrays;
-    },
-    handleCheckAllChange(val) {
-      if (val) {
-        let nid = this.newSujectOption.map((item) => {
-          return item.newId;
-        });
-        let arrays = this.sujectArray.concat(nid);
-        this.sujectArray = this.setFunc(arrays);
-        this.isIndeterminate = false;
-      } else {
-        let nid = this.newSujectOption.map((item) => {
-          return item.newId;
-        });
-        let newArr = [];
-        this.sujectArray.forEach((item) => {
-          if (!nid.includes(item)) {
-            newArr.push(item);
-          }
-        });
-        this.sujectArray = newArr;
-        this.isIndeterminate = false;
-      }
-    },
-    getMessage() {
-      if (!this.courType) {
-        this.$message.warning("请先选择业务层级");
-      }
-    },
-    changeTypes() {
-      var self = this;
-      var arrays = [];
-      this.sujectApis.map((item, index) => {
-        this.courTypeOptions.map((items) => {
-          if (items.id === item.split("-").map(Number)[0]) {
-            var obj = {
-              type: self.typeBus,
-              educationTypeId: items.educationId,
-              educationName: items.educationName,
-              projectId: items.projectId,
-              projectName: items.projectName,
-              businessId: items.id,
-              businessName: items.businessName,
-            };
-            self.sujectOption.map((i) => {
-              if (
-                i.id === item.split("-").map(Number)[1] &&
-                i.courseArrays.indexOf(items.projectId) !== -1
-              ) {
-                obj.subjectName = i.subjectName;
-                obj.subjectId = i.id;
-              }
-            });
-            arrays.push(obj);
-          }
-        });
-      });
-      this.newSujectApis = arrays;
-    },
-    getDict() {
-      this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
-        this.eduTypeOptions = res.rows;
-      });
-      this.$api.inquireCourseProjectType({ status: 1 }).then((res) => {
-        this.projectTypeOptions = res.rows;
-      });
-      this.$api.inquirebusinessList({ status: 1 }).then((res) => {
-        this.courTypeOptions = res.rows;
-        this.newCourTypeOptions = res.rows;
-      });
-      this.$api.inquireCourseSubject({ status: 1 }).then((res) => {
-        res.rows.map((item, index) => {
-          var array = [];
-          item.courseProjectTypes.map((items, indexs) => {
-            array.push(items.id);
-          });
-          item.courseArrays = array;
-        });
-        this.sujectOption = res.rows;
-      });
-    },
-
-    changeType() {
-      this.changeHeight = !this.changeHeight;
-    },
-    changeEduType() {
-      if (!(this.courType === undefined || this.courType === "")) {
-        this.courType = "";
-      }
-      var arrays = [];
-      this.courTypeOptions.map((item) => {
-        if (item.educationId === this.eduType) {
-          arrays.push(item);
-        }
-      });
-      this.newCourTypeOptions = arrays;
-    },
-    changecourseType() {
-      this.newCourTypeOptions.map((item, index) => {
-        if (item.id === this.courType) {
-          this.eduType = item.educationId;
-          var array = [];
-          this.sujectOption.map((items, indexs) => {
-            if (items.courseArrays.indexOf(item.projectId) !== -1) {
-              array.push(items);
-            }
-          });
-          this.newSujectOption = array;
-        }
-      });
-      var arrays = [];
-      this.courTypeOptions.map((item) => {
-        if (item.educationId === this.eduType) {
-          arrays.push(item);
-        }
-      });
-      this.newCourTypeOptions = arrays;
-      this.$refs.popovers[0].doClose();
-      this.$emit("amdis", this.courType);
-    },
-    submitSujectArray() {
-      var self = this;
-      this.sujectApis = this.sujectApis.filter((item, index) => {
-        return item.split("-").map(Number)[0] !== Number(self.courType);
-      });
-      for (let i = 0; i < this.sujectArray.length; i++) {
-        this.sujectApis.push(this.sujectArray[i]);
-      }
-      this.$refs.popovers[0].doClose();
-    },
-    hideHandle() {},
-    showHandle() {
-      var array = [];
-      for (let i = 0; i < this.sujectApis.length; i++) {
-        if (
-          this.sujectApis[i].split("-").map(Number)[0] === Number(this.courType)
-        ) {
-          array.push(this.sujectApis[i]);
-        }
-      }
-      this.sujectArray = array;
-      if (!this.newSujectOption.length) {
-        this.$message.warning("该业务层次暂无关联科目");
-        this.$refs.popovers[0].doClose();
-        return;
-      }
-      this.newSujectOption.map((item) => {
-        item.newId = this.courType + "-" + item.id;
-      });
-      this.handleCheckedCitiesChange();
-    },
-    closeType(index) {
-      this.sujectApis.splice(index, 1);
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.checkboxSty {
-  display: flex;
-  flex-direction: column;
-}
-.listBoxStys {
-  flex-shrink: 0;
-  padding: 0px 10px;
-  border-radius: 8px;
-  border: 1px solid #eee;
-  margin-right: 10px;
-  margin-bottom: 6px;
-}
-.closeIcons {
-  color: red;
-  cursor: pointer;
-  margin-left: 6px;
-}
-.ach {
-  display: flex;
-  align-items: center;
-  overflow: hidden;
-}
-.clh {
-  display: flex;
-  align-items: center;
-  flex-wrap: wrap;
-}
-</style>

+ 0 - 353
src/components/goodsList/index.vue

@@ -1,353 +0,0 @@
-<template>
-  <div id="">
-    <el-dialog
-      :visible.sync="dialogVisible"
-      width="1088px"
-      :show-close="false"
-      :close-on-click-modal="false"
-      destroy-on-close
-      @closed="close"
-    >
-      <div slot="title" class="hearders">
-        <div class="leftTitle">选择商品</div>
-        <div class="rightBoxs">
-          <img
-            src="@/assets/images/Close@2x.png"
-            alt=""
-            @click="dialogVisible = false"
-          />
-        </div>
-      </div>
-      <search-box-new
-        ref="searchBox"
-        :formData="formData"
-        :formList="formList"
-        @search="search"
-        @init="search(2)"
-        :topType="topType"
-      />
-      <el-table
-        ref="table"
-        row-key="goodsId"
-        :data="tableData"
-        v-loading="loading"
-        border
-        style="width: 100%"
-        @selection-change="selectionChange"
-      >
-        <el-table-column
-          type="selection"
-          width="55"
-          align="center"
-          reserve-selection
-          :selectable="dis_active"
-        >
-        </el-table-column>
-        <el-table-column
-          align="center"
-          type="index"
-          :disabled="true"
-        ></el-table-column>
-        <template v-for="(item, index) in tableSet">
-          <el-table-column
-            header-align="center"
-            :align="item.align ? item.align : 'center'"
-            :prop="item.prop"
-            :label="item.label"
-            :width="item.width || ''"
-            ><template slot-scope="scope"
-              ><div v-if="item.scope === 'options'">
-                <template v-for="(itemt, indext) in item.options">
-                  <span v-if="itemt.value === scope.row[item.prop]">{{
-                    itemt.label
-                  }}</span>
-                </template>
-              </div>
-              <span v-else-if="item.scope === 'leftCh'"
-                >{{ item.ch }}{{ scope.row[item.prop] }}</span
-              >
-              <span v-else>{{ scope.row[item.prop] }}</span></template
-            >
-          </el-table-column>
-        </template>
-      </el-table>
-      <div style="margin-top: 10px; text-align: center">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="formData.pageNum"
-          :page-sizes="[10, 20, 50, 100]"
-          :page-size="formData.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-        >
-        </el-pagination>
-      </div>
-
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submitTable" :loading="disbtn"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import searchBoxNew from "@/components/searchBoxNew";
-export default {
-  components: { searchBoxNew },
-  data() {
-    return {
-      topType: true,
-      disbtn: false,
-      dialogVisible: false,
-      //搜索
-      formList: [
-        {
-          prop: "educationTypeId",
-          placeholder: "教育类型",
-          scope: "educationType",
-        },
-        {
-          prop: "businessId",
-          placeholder: "业务层次",
-          scope: "businessLevel",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "schoolId",
-          placeholder: "院校",
-          scope: "schoolList",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "majorId",
-          placeholder: "专业",
-          scope: "Professional",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "subjectId",
-          placeholder: "科目",
-          scope: "sujectType",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "status",
-          placeholder: "商品状态",
-          scope: "select",
-          noClear: false,
-          options: [
-            {
-              label: "全部状态",
-              value: "0,1",
-            },
-            {
-              label: "有效",
-              value: 1,
-            },
-            {
-              label: "无效",
-              value: 0,
-            },
-          ],
-        },
-        {
-          prop: "goodsStatus",
-          placeholder: "前台可售状态",
-          scope: "select",
-          options: [
-            {
-              label: "已上架",
-              value: 1,
-            },
-            {
-              label: "未上架",
-              value: 0,
-            },
-          ],
-        },
-        {
-          prop1: "validityStartTime",
-          prop2: "validityEndTime",
-          placeholder1: "商品有效期开始时间",
-          placeholder2: "商品有效期结束时间",
-          scope: "moreDataPicker",
-        },
-        // {
-        //   prop: "orderGoodsStatus",
-        //   placeholder: "退款状态",
-        //   scope: "select",
-        //   options: [
-        //     {
-        //       label: "已退款",
-        //       value: 1,
-        //     },
-        //     {
-        //       label: "退款中",
-        //       value: 2,
-        //     },
-        //     {
-        //       label: "拒绝退款",
-        //       value: 3,
-        //     },
-        //   ],
-        // },
-        {
-          prop: "goodsName",
-          placeholder: "请输入商品名称",
-        },
-      ],
-      formData: {
-        goodsType: "",
-        status: "0,1",
-        pageSize: 10,
-        pageNum: 1,
-      },
-      // 表单
-      tableSet: [
-        {
-          label: "商品名称",
-          prop: "goodsName",
-          hidden: true,
-        },
-        {
-          label: "商品编码",
-          prop: "code",
-          hidden: true,
-        },
-        {
-          label: "科目",
-          prop: "subjectNames",
-          hidden: true,
-        },
-        {
-          label: "学时",
-          prop: "classHours",
-          hidden: true,
-        },
-        {
-          label: "商品价格",
-          prop: "standPrice",
-          hidden: true,
-          scope: "leftCh",
-          ch: "¥",
-        },
-        {
-          label: "商品划线价",
-          prop: "linePrice",
-          hidden: true,
-          scope: "leftCh",
-          ch: "¥",
-        },
-        {
-          label: "可售状态",
-          prop: "goodsStatus",
-          hidden: true,
-          scope: "options",
-          options: [
-            {
-              label: "正常",
-              value: 1,
-            },
-            {
-              label: "关闭",
-              value: 0,
-            },
-          ],
-        },
-      ],
-      tableData: [],
-      loading: false,
-      total: 0,
-      outActive: [], //置灰列表
-      active: [], //当前选中
-    };
-  },
-  methods: {
-    selectionChange(e) {
-      this.active = e;
-    },
-    showBox(e) {
-      if (e && e.length > 0) {
-        this.outActive = e;
-      }
-      this.search(2);
-      this.dialogVisible = true;
-    },
-    dis_active(e) {
-      return this.outActive.includes(e.goodsId) ? false : true;
-    },
-    search(int) {
-      if (int === 2) {
-        this.formData = {
-          pageSize: 10,
-          pageNum: 1,
-          goodsType: "",
-          status: "0,1",
-        };
-      }
-      if (int === 3) {
-        this.formData.pageNum = 1;
-      }
-      var data = JSON.parse(JSON.stringify(this.formData));
-      if (this.formData.validityStartTime) {
-        data.validityStartTime = data.validityStartTime / 1000;
-      }
-      if (this.formData.validityEndTime) {
-        data.validityEndTime = data.validityEndTime / 1000;
-      }
-      this.loading = true;
-      this.$api
-        .inquireGoods(data)
-        .then((res) => {
-          this.tableData = res.rows;
-          this.total = res.total;
-        })
-        .finally(() => {
-          this.loading = false;
-        });
-    },
-    submitTable() {
-      if (this.active.length === 0) {
-        this.$message.warning("请勾选商品");
-        return;
-      }
-      this.disbtn = true;
-      const array = this.active.map((item) => {
-        return {
-          goodsId: item.goodsId,
-          goodsName: item.goodsName,
-          goodsPrice: item.standPrice,
-          profitMax: "",
-          profitType: 1,
-          profitOne: "",
-          profitTwo: "",
-          profitThree: "",
-        };
-      });
-      this.dialogVisible = false;
-      this.$emit("backGoodsList", array);
-    },
-    close() {
-      this.disbtn = false;
-      this.$refs.table.clearSelection();
-      this.outActive = [];
-      this.active = [];
-    },
-    handleSizeChange(e) {
-      this.formData.pageSize = e;
-      this.formData.pageNum = 1;
-      this.search();
-    },
-    handleCurrentChange(e) {
-      this.formData.pageNum = e;
-      this.search();
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 238
src/components/modelView/index.vue

@@ -1,238 +0,0 @@
-<template>
-  <div
-    id="left"
-    class="left"
-    ref="modelView"
-    :style="IMGSHOW ? '' : 'border:none'"
-  >
-    <img
-      :style="modelData.background.css"
-      v-if="modelData.background.checked"
-      :src="$methodsTools.splitImgHost(modelData.background.name)"
-      alt=""
-      crossorigin="anonymous"
-    />
-    <!-- 标题 -->
-    <vue-draggable-resizable
-      @dragstop="onDragstop1"
-      @resizestop="onResizeStop1"
-      :w="modelData.title.width"
-      :h="modelData.title.height"
-      :x="modelData.title.left"
-      :y="modelData.title.top"
-      :parent="true"
-      v-if="modelData.title.checked"
-    >
-      <p :style="modelData.title.css">{{ modelData.title.name }}</p>
-    </vue-draggable-resizable>
-    <!-- 商品图 -->
-    <vue-draggable-resizable
-      @dragstop="onDragstop2"
-      @resizestop="onResizeStop2"
-      :w="modelData.goods.width"
-      :h="modelData.goods.height"
-      :x="modelData.goods.left"
-      :y="modelData.goods.top"
-      :parent="true"
-      v-if="modelData.goods.checked"
-      :style="
-        modelData.goods.name ? '' : 'border: 1px dotted rgba(225,225,225,.4)'
-      "
-    >
-      <img
-        crossorigin="anonymous"
-        v-if="modelData.goods.name"
-        :style="modelData.goods.css"
-        :src="$methodsTools.splitImgHost(modelData.goods.name)"
-        alt=""
-      />
-    </vue-draggable-resizable>
-    <!-- 分销码 -->
-    <vue-draggable-resizable
-      @dragstop="onDragstop3"
-      @resizestop="onResizeStop3"
-      :w="modelData.distribution.width"
-      :h="modelData.distribution.height"
-      :x="modelData.distribution.left"
-      :y="modelData.distribution.top"
-      :parent="true"
-      v-if="modelData.distribution.checked"
-      v-show="IMGSHOW"
-      style="border: 1px solid skyblue"
-      :lock-aspect-ratio="true"
-    >
-      <!-- <img
-        :style="modelData.distribution.css"
-        :src="modelData.distribution.name"
-        alt=""
-      /> -->
-    </vue-draggable-resizable>
-    <!-- 电子名片码 -->
-    <vue-draggable-resizable
-      @dragstop="onDragstop4"
-      @resizestop="onResizeStop4"
-      :w="modelData.cardCode.width"
-      :h="modelData.cardCode.height"
-      :x="modelData.cardCode.left"
-      :y="modelData.cardCode.top"
-      :parent="true"
-      v-if="modelData.cardCode.checked"
-      v-show="IMGSHOW"
-      style="border: 1px solid skyblue"
-      :lock-aspect-ratio="true"
-    >
-      <!-- <img
-        :style="modelData.cardCode.css"
-        :src="modelData.cardCode.name"
-        alt=""
-      /> -->
-    </vue-draggable-resizable>
-    <!-- 广告语 -->
-    <vue-draggable-resizable
-      @dragstop="onDragstop5"
-      @resizestop="onResizeStop5"
-      :w="modelData.advertise.width"
-      :h="modelData.advertise.height"
-      :x="modelData.advertise.left"
-      :y="modelData.advertise.top"
-      :parent="true"
-      v-if="modelData.advertise.checked"
-    >
-      <p style="white-space:pre-wrap;" :style="modelData.advertise.css">{{ modelData.advertise.name }}</p>
-    </vue-draggable-resizable>
-    <!-- 机构 -->
-    <vue-draggable-resizable
-      @dragstop="onDragstop6"
-      @resizestop="onResizeStop6"
-      :w="modelData.mechanism.width"
-      :h="modelData.mechanism.height"
-      :x="modelData.mechanism.left"
-      :y="modelData.mechanism.top"
-      :parent="true"
-      v-if="modelData.mechanism.checked"
-    >
-      <p :style="modelData.mechanism.css">{{ modelData.mechanism.name }}</p>
-    </vue-draggable-resizable>
-  </div>
-</template>
-
-<script>
-import html2Canvas from "html2canvas";
-import VueDraggableResizable from "vue-draggable-resizable";
-import "vue-draggable-resizable/dist/VueDraggableResizable.css";
-export default {
-  components: { VueDraggableResizable },
-  props: {
-    modelData: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-  },
-  data() {
-    return {
-      IMGSHOW: true, //截图过程先隐藏二维码窗口
-    };
-  },
-  methods: {
-    //标签转oss图片路径
-    changeFile() {
-      return new Promise((resolve, reject) => {
-        this.IMGSHOW = false;
-        this.$nextTick(() => {
-          html2Canvas(this.$refs.modelView, { useCORS: true, allowTaint: true })
-            .then((canvas) => {
-              const jpeg = canvas.toDataURL("image/jpeg", 1.0);
-              this.$upload
-                .upload(this.base64ToFile(jpeg), 0)
-                .then((res) => {
-                  resolve(res);
-                })
-                .catch(() => {
-                  reject();
-                });
-            })
-            .catch(() => {
-              reject();
-            })
-            .finally(() => {
-              this.IMGSHOW = true;
-            });
-        });
-      });
-    },
-    //格式转换
-    base64ToFile(urlData) {
-      const arr = urlData.split(",");
-      const mime = arr[0].match(/:(.*?);/)[1];
-      const bytes = atob(arr[1]);
-      let n = bytes.length;
-      const ia = new Uint8Array(n);
-      while (n--) {
-        ia[n] = bytes.charCodeAt(n);
-      }
-      return new File([ia], "jpeg", { type: mime });
-    },
-    onDragstop1(left, top) {
-      this.backData("title", left, top);
-    },
-    onResizeStop1(left, top, width, height) {
-      this.backData("title", left, top, width, height);
-    },
-    onDragstop2(left, top) {
-      this.backData("goods", left, top);
-    },
-    onResizeStop2(left, top, width, height) {
-      this.backData("goods", left, top, width, height);
-    },
-    onDragstop3(left, top) {
-      this.backData("distribution", left, top);
-    },
-    onResizeStop3(left, top, width, height) {
-      this.backData("distribution", left, top, width, height);
-    },
-    onDragstop4(left, top) {
-      this.backData("cardCode", left, top);
-    },
-    onResizeStop4(left, top, width, height) {
-      this.backData("cardCode", left, top, width, height);
-    },
-    onDragstop5(left, top) {
-      this.backData("advertise", left, top);
-    },
-    onResizeStop5(left, top, width, height) {
-      this.backData("advertise", left, top, width, height);
-    },
-    onDragstop6(left, top) {
-      this.backData("mechanism", left, top);
-    },
-    onResizeStop6(left, top, width, height) {
-      this.backData("mechanism", left, top, width, height);
-    },
-
-    backData(name, left, top, width, height) {
-      this.$emit("changeModelData", { name, left, top, width, height });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-#left {
-  position: relative;
-  width: 375px;
-  height: 667px;
-  border: 1px solid #333;
-  margin-right: 20px;
-  flex-shrink: 0;
-  box-sizing: content-box;
-  overflow: hidden;
-}
-.vdr {
-  border-color: transparent;
-}
-.active {
-  border: 1px dashed #000;
-}
-</style>

+ 0 - 67
src/components/numInput.vue

@@ -1,67 +0,0 @@
-<template>
-  <div id="numInput" class="inputBoxs">
-      <input
-        type="text"
-        :placeholder="placeholder"
-        class="inputSty"
-        :value="value"
-        @blur="changeValue($event)"
-        :class="!value ? 'errSty' : ''"
-      />
-      <div v-if="!value && message" class="labelSty">{{message}}</div>
-  </div>
-</template>
-
-<script>
-export default {
-  props:['value','placeholder','message','min'],
-  data() {
-    return {};
-  },
-  methods: {
-    changeValue(e) {
-      if (isNaN(Number(e.target.value))) {
-        this.$message.warning("请输入数值");
-        this.$emit('changevalues','')
-      } else if (this.min != null && this.min != undefined && this.min != '' && Number(e.target.value) <= Number(this.min)) {
-        this.$message.warning("请输入大于"+ this.min +"的数值");
-        this.$emit('changevalues','')
-      } else {
-        this.$emit('changevalues',Number(e.target.value))
-      }
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.inputBoxs {
-  vertical-align: top;
-  display: inline-block;
-  margin: 0px 6px 6px 0px;
-  background-color: #fff;
-  & .inputSty {
-    outline: none;
-    padding: 6px 10px;
-    border-radius: 6px;
-    color: #606266;
-    border: 1px solid #dcdfe6;
-    transition: all 0.3s;
-    &:focus {
-      border-color: #409eff;
-    }
-  }
-  & .errSty {
-    border-color: #f56c6c !important;
-    &::placeholder {
-      color: #f56c6c;
-    }
-  }
-  & .labelSty {
-    color: #f56c6c;
-    font-size: 12px;
-    height: 20px;
-    line-height: 20px;
-  }
-}
-</style>

+ 0 - 1014
src/components/questionBank.vue

@@ -1,1014 +0,0 @@
-<!-- 题目编辑组件 -->
-<template>
-  <div id="questionBank">
-    <el-col :span="24" style="display: flex; justify-content: center">
-      <el-col
-        :span="2"
-        style="
-          display: flex;
-          align-items: center;
-          justify-content: flex-start;
-          cursor: pointer;
-        "
-      >
-        <el-button
-          type="success"
-          icon="el-icon-arrow-left"
-          circle
-          size="small"
-          @click="back"
-          v-if="statusPop === 2"
-        ></el-button>
-      </el-col>
-      <el-col :span="20" class="contentMore">
-        <div class="marg_play">
-          <span class="spans">题目类型:</span>
-          <el-radio-group v-model="dingForm.type" @change="changeTypes">
-            <el-radio
-              v-for="(item, index) in radioArrays"
-              :key="index"
-              :disabled="computedDisabled(item)"
-              :label="item.value"
-              >{{ item.label }}</el-radio
-            >
-          </el-radio-group>
-        </div>
-        <div class="marg_play">
-          <span class="spans"><span style="color: red">* </span>题目:</span>
-          <div>
-            <editor
-              v-model="dingForm.content"
-              :max-height="300"
-              :uploadStatus="uploadStatus"
-            />
-          </div>
-        </div>
-        <!-- <div class="marg_play">
-          <span class="spans">图片:</span>
-          <div>
-            <div class="imgBoxTopic">
-              <label class="imgLabel">
-                <div class="msPhoto" v-if="dingForm.imgUrl">
-                  <img
-                    :src="$methodsTools.splitImgHost(dingForm.imgUrl)"
-                    alt="图片加载失败"
-                  />
-                </div>
-                <div class="imgbbx" v-else>
-                  <p>点击添加图片</p>
-                  <i class="el-icon-plus"></i>
-                </div>
-                <input
-                  :disabled="statusPop === 2"
-                  :id="'inputstopic' + nums"
-                  type="file"
-                  ref="filetopic"
-                  style="display: none"
-                  @change="getImgFiletopic(nums, $event)"
-                />
-              </label>
-            </div>
-            <p style="color: #999999; line-height: 22px">
-              支持扩展名:.jpeg .bmp .png .jpg...<br />为保证显示效果,请上传分辨率为100x100且大小小于2M图片
-            </p>
-          </div>
-        </div> -->
-        <div
-          class="marg_play"
-          v-if="dingForm.type === 1 || dingForm.type === 2"
-        >
-          <span class="spans"
-            ><span style="color: red" v-if="dingForm.type !== 5">* </span
-            >选项:</span
-          >
-          <div style="flex: 1">
-            <div
-              style="display: flex; align-items: center; margin-bottom: 8px"
-              v-for="(options, indexsop) in dingForm.optionsList"
-              :key="indexsop"
-            >
-              <span>选项{{ indexsop + 1 }}:</span>
-              <el-input
-                style="flex: 1; margin: 0px 10px"
-                type="textarea"
-                :disabled="statusPop === 2"
-                v-model="options.content"
-                placeholder="请输入内容"
-                :autosize="{ minRows: 2, maxRows: 2 }"
-                maxlength="500"
-              ></el-input>
-              <span>{{ options.content.length }}/500</span>
-              <el-button
-                v-if="statusPop === 1"
-                @click="delList(indexsop)"
-                style="border-radius: 50%; margin: 0px 6px"
-                type="danger"
-                icon="el-icon-delete"
-                size="mini"
-                circle
-              ></el-button>
-              <label class="btnSty" v-if="statusPop !== 2"
-                ><input
-                  type="file"
-                  style="display: none"
-                  @change="uploadListImg(indexsop, $event)"
-                />{{
-                  options.imgUrl !== null && options.imgUrl
-                    ? "更换图片"
-                    : "上传图片"
-                }}</label
-              >
-              <el-image
-                v-if="options.imgUrl !== null && options.imgUrl"
-                style="
-                  width: 50px;
-                  height: 50px;
-                  border-radius: 4px;
-                  border: 1px dotted #a4a4a4;
-                  padding: 4px;
-                "
-                :src="$methodsTools.splitImgHost(options.imgUrl)"
-                :preview-src-list="[$methodsTools.splitImgHost(options.imgUrl)]"
-              >
-              </el-image>
-              <!-- <img
-                v-if="options.imgUrl !== null && options.imgUrl"
-                style="
-                  width: 50px;
-                  height: 50px;
-                  border-radius: 4px;
-                  border: 1px dotted #a4a4a4;
-                  padding: 4px;
-                "
-                :src="$methodsTools.splitImgHost(options.imgUrl)"
-                alt=""
-              /> -->
-            </div>
-            <div
-              style="display: flex; align-items: center"
-              v-if="statusPop !== 2"
-            >
-              <i
-                class="el-icon-circle-plus"
-                style="margin-right: 5px; font-size: 30px; cursor: pointer"
-                @click="addListcontent"
-              ></i>
-              <span
-                style="color: #409eff; cursor: pointer"
-                @click="addListcontent"
-                >添加选项</span
-              >
-            </div>
-          </div>
-        </div>
-        <div style="margin-bottom: 15px" v-if="dingForm.type === 4">
-          <div
-            style="display: flex; align-items: center"
-            v-if="statusPop !== 2"
-          >
-            <i
-              class="el-icon-circle-plus"
-              style="margin-right: 5px; font-size: 30px; cursor: pointer"
-              @click="addListItem"
-            ></i
-            ><span style="color: #409eff; cursor: pointer" @click="addListItem"
-              >添加问题</span
-            >
-          </div>
-          <!-- 案例题 -->
-          <div style="padding-left: 50px">
-            <div v-for="(ans, ain) in dingForm.optionsList" :key="ain">
-              <div class="marg_play">
-                <el-button
-                  v-if="statusPop !== 2"
-                  @click="delAnliChi(ain)"
-                  style="border-radius: 50%; margin: 0px 6px"
-                  type="danger"
-                  icon="el-icon-delete"
-                  size="mini"
-                  circle
-                ></el-button>
-                <span class="spans">题目类型:</span>
-                <el-radio-group
-                  v-model="ans.type"
-                  @change="changeTypeChild(ain)"
-                >
-                  <el-radio
-                    v-for="(tng, nindex) in radioArray"
-                    :key="nindex"
-                    :label="tng.value"
-                    :disabled="computedDisabled(tng)"
-                    >{{ tng.label }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-              <div class="marg_play">
-                <span class="spans"
-                  ><span style="color: red">* </span>题目:</span
-                >
-                <div>
-                  <editor
-                    v-model="ans.content"
-                    :max-height="300"
-                    :uploadStatus="uploadStatus"
-                  />
-                </div>
-              </div>
-              <!-- <div class="marg_play">
-                <span class="spans">图片:</span>
-                <div>
-                  <div class="imgBoxTopic">
-                    <label class="imgLabel">
-                      <div class="msPhoto" v-if="ans.imgUrl">
-                        <img
-                          :src="$methodsTools.splitImgHost(ans.imgUrl)"
-                          alt="图片加载失败"
-                        />
-                      </div>
-                      <div class="imgbbx" v-else>
-                        <p>点击添加图片</p>
-                        <i class="el-icon-plus"></i>
-                      </div>
-                      <input
-                        :id="'inputstopi' + nums + ain"
-                        type="file"
-                        :disabled="statusPop === 2"
-                        style="display: none"
-                        @change="getImgFiletopics(ain, $event)"
-                      />
-                    </label>
-                  </div>
-                  <p style="color: #999999; line-height: 22px">
-                    支持扩展名:.jpeg .bmp .png .jpg...<br />为保证显示效果,请上传分辨率为100x100且大小小于2M图片
-                  </p>
-                </div>
-              </div> -->
-              <div class="marg_play" v-if="ans.type === 1 || ans.type === 2">
-                <span class="spans"
-                  ><span style="color: red" v-if="ans.type !== 5">* </span
-                  >选项:</span
-                >
-                <div style="flex: 1">
-                  <div
-                    style="
-                      display: flex;
-                      align-items: center;
-                      margin-bottom: 8px;
-                    "
-                    v-for="(answerItem, indexsops) in ans.optionsList"
-                    :key="indexsops"
-                  >
-                    <span>选项{{ indexsops + 1 }}:</span>
-                    <el-input
-                      style="flex: 1; margin: 0px 10px"
-                      type="textarea"
-                      :disabled="statusPop === 2"
-                      v-model="answerItem.content"
-                      placeholder="请输入内容"
-                      :autosize="{ minRows: 2, maxRows: 2 }"
-                      maxlength="500"
-                    ></el-input>
-                    <span>{{ answerItem.content.length }}/500</span>
-                    <el-button
-                      v-if="statusPop === 1"
-                      @click="delListchi(ain, indexsops)"
-                      style="border-radius: 50%; margin: 0px 6px"
-                      type="danger"
-                      icon="el-icon-delete"
-                      size="mini"
-                      circle
-                    ></el-button>
-                    <label class="btnSty" v-if="statusPop !== 2"
-                      ><input
-                        type="file"
-                        style="display: none"
-                        @change="uploadListImgchi(ain, indexsops, $event)"
-                      />{{
-                        answerItem.imgUrl !== null && answerItem.imgUrl
-                          ? "更换图片"
-                          : "上传图片"
-                      }}</label
-                    >
-                    <el-image
-                      v-if="answerItem.imgUrl !== null && answerItem.imgUrl"
-                      style="
-                        width: 50px;
-                        height: 50px;
-                        border-radius: 4px;
-                        border: 1px dotted #a4a4a4;
-                        padding: 4px;
-                      "
-                      :src="$methodsTools.splitImgHost(answerItem.imgUrl)"
-                      :preview-src-list="[
-                        $methodsTools.splitImgHost(answerItem.imgUrl),
-                      ]"
-                    >
-                    </el-image>
-                    <!-- <img
-                      v-if="answerItem.imgUrl !== null && answerItem.imgUrl"
-                      style="
-                        width: 50px;
-                        height: 50px;
-                        border-radius: 4px;
-                        border: 1px dotted #a4a4a4;
-                        padding: 4px;
-                      "
-                      :src="$methodsTools.splitImgHost(answerItem.imgUrl)"
-                      alt=""
-                    /> -->
-                  </div>
-                  <div
-                    style="display: flex; align-items: center"
-                    v-if="statusPop !== 2"
-                  >
-                    <i
-                      class="el-icon-circle-plus"
-                      style="
-                        margin-right: 5px;
-                        font-size: 30px;
-                        cursor: pointer;
-                      "
-                      @click="addListcontentchi(ain)"
-                    ></i>
-                    <span
-                      style="color: #409eff; cursor: pointer"
-                      @click="addListcontentchi(ain)"
-                      >添加选项</span
-                    >
-                  </div>
-                </div>
-              </div>
-              <div class="marg_play" v-if="ans.type === 1">
-                <span class="spans"
-                  ><span style="color: red">* </span>正确答案:</span
-                >
-                <el-radio-group
-                  v-for="(oAsz, oindexsz) in ans.optionsList"
-                  :key="oindexsz"
-                  v-model="ans.answerQuestion"
-                >
-                  <el-radio
-                    style="margin-right: 12px"
-                    :disabled="statusPop === 2"
-                    :label="oindexsz + 1 + ''"
-                    >选项{{ oindexsz + 1 }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-              <div class="marg_play" v-else-if="ans.type === 2">
-                <span class="spans"
-                  ><span style="color: red">* </span>正确答案:</span
-                >
-                <el-checkbox-group v-model="ans.answerQuestionList">
-                  <el-checkbox
-                    style="margin-right: 12px"
-                    v-for="(oAsz, oindexsz) in ans.optionsList"
-                    :key="oindexsz"
-                    :disabled="statusPop === 2"
-                    :label="oindexsz + 1"
-                    >选项{{ oindexsz + 1 }}</el-checkbox
-                  >
-                </el-checkbox-group>
-              </div>
-              <div class="marg_play" v-if="ans.type === 3">
-                <span class="spans"
-                  ><span style="color: red">* </span>正确答案:</span
-                >
-                <el-radio-group v-model="ans.answerQuestion">
-                  <el-radio :disabled="statusPop === 2" label="1"
-                    >正确</el-radio
-                  >
-                  <el-radio :disabled="statusPop === 2" label="0"
-                    >错误</el-radio
-                  >
-                </el-radio-group>
-              </div>
-              <div class="marg_play">
-                <span class="spans">答案解析:</span>
-                <div>
-                  <editor
-                    v-model="ans.analysisContent"
-                    :max-height="300"
-                    :uploadStatus="uploadStatus"
-                  />
-                </div>
-              </div>
-            </div>
-          </div>
-          <!-- 案例题 -->
-        </div>
-        <div class="marg_play" v-if="dingForm.type === 1">
-          <span class="spans"
-            ><span style="color: red">* </span>正确答案:</span
-          >
-          <el-radio-group
-            v-for="(oA, oindex) in dingForm.optionsList"
-            :key="oindex"
-            v-model="dingForm.answerQuestion"
-          >
-            <el-radio
-              style="margin-right: 12px"
-              :disabled="statusPop === 2"
-              :label="oindex + 1 + ''"
-              >选项{{ oindex + 1 }}</el-radio
-            >
-          </el-radio-group>
-        </div>
-        <div class="marg_play" v-else-if="dingForm.type === 2">
-          <span class="spans"
-            ><span style="color: red">* </span>正确答案:</span
-          >
-          <el-checkbox-group v-model="dingForm.answerQuestionList">
-            <el-checkbox
-              style="margin-right: 12px"
-              v-for="(oA, oindex) in dingForm.optionsList"
-              :key="oindex"
-              :disabled="statusPop === 2"
-              :label="oindex + 1"
-              >选项{{ oindex + 1 }}</el-checkbox
-            >
-          </el-checkbox-group>
-        </div>
-        <div class="marg_play" v-if="dingForm.type === 3">
-          <span class="spans"
-            ><span style="color: red">* </span>正确答案:</span
-          >
-          <el-radio-group v-model="dingForm.answerQuestion">
-            <el-radio :disabled="statusPop === 2" label="1">正确</el-radio>
-            <el-radio :disabled="statusPop === 2" label="0">错误</el-radio>
-          </el-radio-group>
-        </div>
-        <div class="marg_play" v-if="dingForm.type !== 4">
-          <span class="spans">答案解析:</span>
-          <div>
-            <editor
-              v-model="dingForm.analysisContent"
-              :max-height="300"
-              :uploadStatus="uploadStatus"
-            />
-          </div>
-        </div>
-        <!-- <div class="marg_play">
-          <span class="spans">是否启用:</span>
-          <el-radio-group v-model="dingForm.status">
-            <el-radio :disabled="statusPop === 2" :label="1">启用</el-radio>
-            <el-radio :disabled="statusPop === 2" :label="0">停用</el-radio>
-          </el-radio-group>
-        </div> -->
-      </el-col>
-      <el-col
-        :span="2"
-        style="
-          display: flex;
-          align-items: center;
-          justify-content: flex-end;
-          cursor: pointer;
-        "
-      >
-        <el-button
-          type="success"
-          icon="el-icon-arrow-right"
-          circle
-          @click="next"
-          v-if="statusPop === 2"
-        ></el-button>
-      </el-col>
-    </el-col>
-  </div>
-</template>
-
-<script>
-import Editor from "@/components/Editor";
-export default {
-  components: { Editor },
-  name: "questionBank",
-  props: ["nums", "dingFormInfo", "disableTypeStatus"],
-  data() {
-    return {
-      dingForm: {},
-      uploadStatus: 2,
-      statusPop: 1,
-      innerVisiblePaperTopic: false,
-      fullscreenChildPaperTopic: false, //当前打开窗数据
-      radioArrays: [
-        {
-          label: "单选题",
-          value: 1,
-        },
-        {
-          label: "多选题",
-          value: 2,
-        },
-        {
-          label: "判断题",
-          value: 3,
-        },
-        {
-          label: "简答题",
-          value: 5,
-        },
-        {
-          label: "案例题",
-          value: 4,
-        },
-      ],
-      radioArray: [
-        {
-          label: "单选题",
-          value: 1,
-        },
-        {
-          label: "多选题",
-          value: 2,
-        },
-        {
-          label: "判断题",
-          value: 3,
-        },
-        {
-          label: "简答题",
-          value: 5,
-        },
-      ],
-      queryData: 1,
-    };
-  },
-  mounted() {
-    // this.$nextTick(function () {
-    //   this.$on("childmethods", function (v, int) {
-    //     this.addClick(v, int);
-    //   });
-    // });
-  },
-  watch: {
-    dingFormInfo: {
-      handler(newVal, oldVal) {
-        console.log(newVal);
-        this.dingForm = newVal;
-      },
-      // 立即处理 进入页面就触发
-      immediate: true,
-    },
-  },
-  computed: {
-    computedDisabled: function () {
-      return function (item) {
-        if (this.statusPop === 2 || this.statusPop === 0) {
-          return true;
-        } else if (this.disableTypeStatus && item.value === 5) {
-          return true;
-        } else {
-          return false;
-        }
-      };
-    },
-  },
-  methods: {
-    changeTypes(int) {
-      var data = {
-        questionId: this.dingForm.questionId ? this.dingForm.questionId : "",
-        type: int,
-        optionsList: [],
-        answerQuestionList: [],
-        answerQuestion: "",
-        content: "",
-        analysisContent: "",
-      };
-      switch (int) {
-        case 1:
-          for (let i = 0; i < 4; i++) {
-            data.optionsList.push({
-              content: "",
-              imgUrl: null,
-              optionsId: i + 1,
-            });
-          }
-          break;
-        case 2:
-          for (let i = 0; i < 5; i++) {
-            data.optionsList.push({
-              content: "",
-              imgUrl: null,
-              optionsId: i + 1,
-            });
-          }
-          break;
-        case 4:
-          var datas = {
-            analysisContent: "",
-            answerQuestion: "",
-            answerQuestionList: [],
-            content: "",
-            optionsList: [],
-            type: 1,
-          };
-          for (let i = 0; i < 4; i++) {
-            datas.optionsList.push({
-              content: "",
-              imgUrl: null,
-              optionsId: i + 1,
-            });
-          }
-          data.optionsList.push(datas);
-        default:
-          break;
-      }
-      this.dingForm = data;
-    },
-    changeTypeChild(index) {
-      this.dingForm.optionsList[index].optionsList = [];
-      this.dingForm.optionsList[index].answerQuestion = "";
-      switch (this.dingForm.optionsList[index].type) {
-        case 1:
-          for (let i = 0; i < 4; i++) {
-            this.dingForm.optionsList[index].optionsList.push({
-              content: "",
-              imgUrl: null,
-              optionsId: i + 1,
-            });
-          }
-          break;
-        case 2:
-          for (let i = 0; i < 5; i++) {
-            this.dingForm.optionsList[index].optionsList.push({
-              content: "",
-              imgUrl: null,
-              optionsId: i + 1,
-            });
-          }
-          break;
-        default:
-          break;
-      }
-      // this.dingForm.optionsList[index].optionsList = [];
-      // this.dingForm.optionsList[index].answerQuestion = "";
-    },
-    getInfosPage() {
-      return this.dingForm;
-    },
-    back() {
-      this.tableData.forEach((item, index) => {
-        if (item.questionId === this.dingForm.questionId) {
-          if (index === 0) {
-            this.$message.warning("这是当前页第一题了");
-          } else {
-            var datas = this.tableData[index - 1].questionId;
-            this.$api.obtainbankquestion(datas).then((res) => {
-              this.dingForm = res.data;
-            });
-          }
-        }
-      });
-    },
-    next() {
-      this.tableData.forEach((item, index) => {
-        if (item.questionId === this.dingForm.questionId) {
-          if (this.tableData.length - 1 === index) {
-            this.$message.warning("这是当前页最后一题了");
-          } else {
-            var datas = this.tableData[index + 1].questionId;
-            this.$api.obtainbankquestion(datas).then((res) => {
-              this.dingForm = res.data;
-            });
-          }
-        }
-      });
-    },
-    addClick(v, int) {
-      if (v === undefined) {
-        this.dingForm = {
-          optionsList: [],
-          status: 1,
-        };
-        this.statusPop = 1;
-      } else {
-        var datas = v.questionId;
-        this.statusPop = int;
-        this.$api.obtainbankquestion(datas).then((res) => {
-          this.dingForm = res.data;
-        });
-      }
-      this.innerVisiblePaperTopic = true;
-    },
-    delTopic() {
-      this.$confirm("此操作将删除该题目, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          var data = JSON.parse(JSON.stringify(this.dingForm));
-          data.parentType = Number(this.queryData.typeId);
-          // data.status = -1;
-          console.log(data);
-          this.$message.success("删除成功");
-          this.search();
-          this.innerVisiblePaperTopic = false;
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
-    },
-    //删除案例问题
-    delAnliChi(int) {
-      this.dingForm.optionsList.splice(int, 1);
-    },
-    //删除选项 非案例
-    delList(index) {
-      this.dingForm.optionsList.splice(index, 1);
-      this.dingForm.optionsList.map((items, indexs) => {
-        items.optionsId = indexs + 1;
-      });
-      if (this.dingForm.type === 1) {
-        this.dingForm.answerQuestion = "";
-      }
-      if (this.dingForm.type === 2) {
-        this.dingForm.answerQuestionList = [];
-      }
-    },
-    //删除选项 案例
-    delListchi(fatherIndex, childrenIndex) {
-      this.dingForm.optionsList[fatherIndex].optionsList.splice(
-        childrenIndex,
-        1
-      );
-      this.dingForm.optionsList[fatherIndex].optionsList.map(
-        (items, indexs) => {
-          items.optionsId = indexs + 1;
-        }
-      );
-      if (this.dingForm.optionsList[fatherIndex].type === 1) {
-        this.dingForm.optionsList[fatherIndex].answerQuestion = "";
-      }
-      if (this.dingForm.optionsList[fatherIndex].type === 2) {
-        this.dingForm.optionsList[fatherIndex].answerQuestionList = [];
-      }
-    },
-    //新增选项 非案例
-    addListcontent() {
-      var data = {
-        content: "",
-        imgUrl: null,
-        optionsId: this.dingForm.optionsList.length + 1,
-      };
-      this.dingForm.optionsList.push(data);
-    },
-    //新增选项 案例
-    addListcontentchi(int) {
-      var data = {
-        content: "",
-        imgUrl: null,
-        optionsId: this.dingForm.optionsList[int].optionsList.length + 1,
-      };
-      this.dingForm.optionsList[int].optionsList.push(data);
-    },
-    //新增问题 案例
-    addListItem() {
-      var data = {
-        analysisContent: "",
-        answerQuestion: "",
-        answerQuestionList: [],
-        content: "",
-        optionsList: [],
-        type: 1,
-      };
-      for (let i = 0; i < 4; i++) {
-        data.optionsList.push({
-          content: "",
-          imgUrl: null,
-          optionsId: i + 1,
-        });
-      }
-      this.dingForm.optionsList.push(data);
-    },
-    // 上传图片
-    async getImgFiletopic(nums, e) {
-      var file = e.target.files[0];
-      if (file === undefined) {
-        return;
-      }
-      if (file.size > 2 * 1024 * 1024) {
-        this.$message.error("图片不得大于2MB");
-        return;
-      }
-      var type = e.target.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");
-        return;
-      }
-      const imgUrls = await this.imgUpload(file, 2);
-      console.log(this.dingForm, nums);
-      this.$set(this.dingForm, "imgUrl", imgUrls);
-    },
-    // 上传内容list图片
-    async uploadListImg(k, e) {
-      var file = e.target.files[0];
-      if (file === undefined) {
-        return;
-      }
-      if (file.size > 2 * 1024 * 1024) {
-        this.$message.error("图片不得大于2MB");
-        return;
-      }
-      var type = e.target.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");
-        return;
-      }
-      const imgUrls = await this.imgUpload(file, 2);
-      this.$set(this.dingForm.optionsList[k], "imgUrl", imgUrls);
-    },
-    // 案例上传内容list图片
-    async uploadListImgchi(fatherIndex, k, e) {
-      var file = e.target.files[0];
-      if (file === undefined) {
-        return;
-      }
-      if (file.size > 2 * 1024 * 1024) {
-        this.$message.error("图片不得大于2MB");
-        return;
-      }
-      var type = e.target.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");
-        return;
-      }
-      const imgUrls = await this.imgUpload(file, 2);
-      this.$set(
-        this.dingForm.optionsList[fatherIndex].optionsList[k],
-        "imgUrl",
-        imgUrls
-      );
-    },
-    //案例 子题目图片
-    async getImgFiletopics(int, e) {
-      var file = e.target.files[0];
-      if (file === undefined) {
-        return;
-      }
-      if (file.size > 2 * 1024 * 1024) {
-        this.$message.error("图片不得大于2MB");
-        return;
-      }
-      var type = e.target.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");
-        return;
-      }
-      const imgUrls = await this.imgUpload(file, 2);
-      this.$set(this.dingForm.optionsList[int], "imgUrl", imgUrls);
-    },
-    imgUpload(file, int) {
-      var self = this;
-      return new Promise((resolve, reject) => {
-        this.$upload
-          .upload(file, int)
-          .then((res) => {
-            resolve(res);
-          })
-          .catch((err) => {
-            self.$message.error("图片上传错误");
-          });
-      });
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.contentMore {
-  border: 1px solid #999;
-  padding: 10px;
-}
-.marg_play {
-  display: flex;
-  margin-bottom: 15px;
-  .spans {
-    flex-shrink: 0;
-    text-align: right;
-    width: 80px;
-  }
-}
-.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;
-  }
-}
-
-.imgBoxTopic {
-  width: 150px;
-  height: 150px;
-  border: 1px solid #e2e2e2;
-  border-radius: 8px;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  .imgLabel {
-    flex: 1;
-    width: 100%;
-    background-color: #f9f9f9;
-    color: #999;
-    font-size: 14px;
-    cursor: pointer;
-    border-radius: 8px;
-    .msPhoto {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      height: 100%;
-      max-width: 100%;
-      max-height: 150px;
-      img {
-        max-width: 100%;
-        max-height: 150px;
-      }
-    }
-    .imgbbx {
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-      width: 100%;
-      height: 100%;
-      i {
-        font-weight: bold;
-        margin: 8px 0;
-        font-size: 20px;
-      }
-    }
-  }
-}
-.btnSty {
-  cursor: pointer;
-  padding: 4px 10px;
-  background-color: #409eff;
-  color: #fff;
-  text-align: center;
-  border-radius: 8px;
-  margin-right: 6px;
-}
-</style>

+ 0 - 194
src/components/quickLogin/index.vue

@@ -1,194 +0,0 @@
-<template>
-  <div id="quickLogin">
-    <el-dialog
-      @closed="loadingClose"
-      :visible.sync="dialogVisible"
-      width="500px"
-      :show-close="false"
-      :close-on-click-modal="false"
-    >
-      <div slot="title" class="hearders">
-        <div class="leftTitle">快捷验证登录:</div>
-        <div class="rightBoxs">
-          <img
-            src="@/assets/images/Close@2x.png"
-            alt=""
-            @click="dialogVisible = false"
-          />
-        </div>
-      </div>
-      <div>
-        <el-form
-          label-position="right"
-          label-width="100px"
-          :model="formLabelAlign"
-          :rules="rules"
-          ref="formLabelAlign"
-        >
-          <el-form-item label="验证码:" prop="yzm">
-            <el-input v-model="formLabelAlign.yzm"
-              ><el-button
-                type="text"
-                slot="append"
-                @click="getCode"
-                :disabled="changeStatus"
-                >{{
-                  changeStatus ? `倒计时${time}秒` : "获取验证码"
-                }}</el-button
-              ></el-input
-            >
-          </el-form-item>
-          <el-form-item label="密码:" prop="password">
-            <el-input v-model="formLabelAlign.password"></el-input>
-          </el-form-item>
-        </el-form>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('formLabelAlign')"
-          :loading="disabledBtn"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      loading: false,
-      size: "small",
-      dialogVisible: false,
-      disabledBtn: false,
-      list: [],
-      formLabelAlign: {},
-      time: 120,
-      setFunc: null,
-      changeStatus: false,
-      rules: {
-        yzm: [{ required: true, message: "请输入验证码", trigger: "blur" }],
-        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
-      },
-    };
-  },
-  methods: {
-    /**
-     * 获取验证码
-     */
-    getCode() {
-      this.changeStatus = true;
-      this.$api
-        .gradesendCode()
-        .then((res) => {
-          this.$message.success("验证码已发送");
-          this.setFunc = setInterval(() => {
-            this.time--;
-            if (this.time <= 0) {
-              clearInterval(this.setFunc);
-              this.time = 120;
-              this.changeStatus = false;
-            }
-          }, 1000);
-        })
-        .finally(() => {
-          this.changeStatus = false;
-        });
-    },
-    loadingClose() {
-      this.$refs.formLabelAlign.resetFields();
-      this.disabledBtn = false;
-      this.list = [];
-    },
-    /**
-     * status 从有接口数据标记进来 false 班级学员进来 true
-     */
-    openBoxs(arr, goodsId, status = true) {
-      if (status) {
-        this.$api.obtainGoods(goodsId).then((res) => {
-          if (res.data.categoryName) {
-            this.list = arr.map((item) => {
-              return {
-                id: item.id,
-                realname: item.realname,
-                idCard: item.idCard,
-                telphone: item.telPhone,
-                workTypeName: res.data.categoryName,
-              };
-            });
-            this.dialogVisible = true;
-          } else {
-            this.$message.error("请前往商品列表编辑设置该商品专业");
-            return;
-          }
-        });
-      } else {
-        const CHECKNAME = arr.every((item) => {
-          return item.categoryName != null;
-        });
-        if (!CHECKNAME) {
-          this.$message.error("勾选的商品必须设置专业");
-          return;
-        }
-        const GFSTATUS = arr.every((item) => {
-          return item.learnStatus !== 1;
-        });
-        if (!GFSTATUS) {
-          this.$message.error("勾选的数据不能包含账号标记已开通的数据");
-          return;
-        }
-        this.list = arr.map((item) => {
-          return {
-            id: item.id,
-            realname: item.realname,
-            idCard: item.idCard,
-            telphone: item.telPhone,
-            workTypeName: item.categoryName,
-          };
-        });
-        this.dialogVisible = true;
-      }
-    },
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          this.submitApi();
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    submitApi() {
-      this.disabledBtn = true;
-      let data = {
-        studyAccountStatusQueryBos: this.list,
-        trainYear: new Date().getFullYear(),
-      };
-      data = Object.assign(data, this.formLabelAlign);
-      this.$api
-        .gradeOpenQdyAccount(data)
-        .then((res) => {
-          this.$message.success("开通成功");
-          this.$emit("backData");
-          this.dialogVisible = false;
-        })
-        .finally(() => {
-          this.disabledBtn = false;
-        });
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-/deep/ .el-input-group__append {
-  background-color: #fff;
-  width: 100px;
-  text-align: center;
-  color: #409eff;
-}
-</style>

+ 0 - 192
src/components/salesmanInfo/index.vue

@@ -1,192 +0,0 @@
-<template>
-  <div id="">
-    <BaseDialog
-      width="1000px"
-      :isShow.sync="isShow"
-      title="业务员分销订单"
-      @close="close"
-      @submit="submit"
-      :isShowFooter="false"
-    >
-      <template>
-        <table-list
-          rowKey="orderGoodsId"
-          ref="tableList"
-          :tableSets="tableSet"
-          :tableData="tableData"
-          :navText="navText"
-          :loading="loading"
-        >
-          <template slot="btn" slot-scope="props">
-            <el-button type="text" @click="editClick(props.scope.row)"
-              >详情</el-button
-            >
-          </template>
-        </table-list>
-        <pagination
-          :total="total"
-          :pageSize="formData.pageSize"
-          :currentPage="formData.pageNum"
-          @handleSizeChange="handleSizeChange"
-          @handleCurrentChange="handleCurrentChange"
-        />
-      </template>
-    </BaseDialog>
-  </div>
-</template>
-
-<script>
-import tableList from "@/components/tableList";
-import pagination from "@/components/pagination";
-export default {
-  components: { tableList, pagination },
-  data() {
-    return {
-      isShow: false,
-      loading: false, //当前表单加载是否加载动画
-      navText: {
-        tableHide: true,
-        title: "业务员分销订单",
-        index: 0,
-        ch: "条",
-        num: true,
-        choice: false,
-        addHide: true,
-        openCheckMore: true,
-        changeWidth: "100px",
-        backFatherBtn: {
-          status: false,
-          title: "配置下单填选模板",
-        },
-      },
-      tableSet: [
-        {
-          label: "订单号",
-          prop: "orderSn",
-          width: "180",
-          hidden: true,
-        },
-        {
-          label: "订单金额",
-          prop: "orderPrice",
-          hidden: true,
-        },
-        {
-          label: "订单时间",
-          prop: "orderTime",
-          scope: "aTimeList",
-          width: "160",
-          hidden: true,
-        },
-        {
-          label: "所属活动",
-          prop: "distributionName",
-          width: "180",
-          hidden: true,
-        },
-        {
-          label: "下单人",
-          prop: "orderUserName",
-          hidden: true,
-        },
-        {
-          label: "佣金类型",
-          prop: "cashType",
-          hidden: true,
-          scope: "isOptions",
-          options: [
-            {
-              label: "百分比",
-              value: 1,
-            },
-            {
-              label: "固定金额",
-              value: 2,
-            },
-          ],
-        },
-        {
-          label: "佣金比例",
-          prop: "cashRatio",
-          hidden: true,
-          scope: "cashRatio",
-        },
-        {
-          label: "佣金金额(元)",
-          prop: "cash",
-          hidden: true,
-        },
-        {
-          label: "佣金结算时间",
-          prop: "cashTime",
-          hidden: true,
-          scope: "aTimeList",
-          width: "160",
-        },
-        {
-          label: "佣金状态",
-          prop: "cashStatus",
-          hidden: true,
-          scope: "isOptions",
-          options: [
-            {
-              label: "冻结",
-              value: 1,
-            },
-            {
-              label: "正常",
-              value: 2,
-            },
-          ],
-        },
-      ],
-      tableData: [],
-      formData: {
-        sellerId: "",
-        tenantId: "",
-        pageSize: 10,
-        pageNum: 1,
-      },
-      total: 0,
-    };
-  },
-  methods: {
-    showBox(e) {
-      this.formData.sellerId = e.sellerId;
-      this.formData.tenantId = e.tenantId;
-      this.search(2);
-      this.isShow = true;
-    },
-    search(e) {
-      this.loading = true;
-      if (e === 2) {
-        this.formData.pageSiz = 10;
-        this.formData.pageNum = 1;
-      }
-      this.$api
-        .distributiontempcashdetail(this.formData)
-        .then((res) => {
-          this.tableData = res.rows;
-          this.total = res.total;
-          this.navText.index = res.total;
-        })
-        .finally(() => {
-          this.loading = false;
-        });
-    },
-    close() {},
-    submit() {},
-    handleSizeChange(v) {
-      this.formData.pageSize = v;
-      this.formData.pageNum = 1;
-      this.search();
-    },
-    handleCurrentChange(v) {
-      this.formData.pageNum = v;
-      this.search();
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 181
src/components/searchBox.vue

@@ -1,181 +0,0 @@
-<template>
-  <div id="searchBox">
-    <div class="inputListBox">
-      <el-form :inline="true" :model="formData" class="demo-form-inline">
-        <el-form-item
-          v-for="(item, index) in formList"
-          :key="index"
-          :label="item.label"
-        >
-          <el-select
-            v-if="item.scope === 'select'"
-            v-model="formData[item.prop]"
-            :placeholder="item.placeholder"
-            :size="size"
-          >
-            <el-option
-              v-for="(items, indexs) in item.options"
-              :key="indexs"
-              :label="items.label"
-              :value="items.value"
-            ></el-option>
-          </el-select>
-          <div v-else-if="item.scope === 'numList'">
-            <el-input-number
-            :controls="false"
-            v-model="formData[item.prop1]"
-            controls-position="right"
-            :min="0"
-            :max="100"
-            size="small"
-             @change="handleChanges(formData[item.prop1],formData[item.prop2])"
-          ></el-input-number>~
-          <el-input-number
-          :controls="false"
-            v-model="formData[item.prop2]"
-            controls-position="right"
-            :min="0"
-            :max="100"
-            size="small"
-            @change="handleChanges(formData[item.prop1],formData[item.prop2])"
-          ></el-input-number>
-          </div>
-          <el-input-number
-            v-else-if="item.scope === 'inputNumber'"
-            v-model="formData[item.prop]"
-            controls-position="right"
-            :min="0"
-            :max="100"
-            size="small"
-          ></el-input-number>
-          <el-cascader
-            v-else-if="item.scope === 'cascader'"
-            v-model="formData[item.prop]"
-            :options="item.options"
-            :size="size"
-            :props="{
-              label: item.props.label,
-              value: item.props.value,
-              checkStrictly: true,
-              emitPath: false,
-            }"
-          ></el-cascader>
-          <el-date-picker
-            v-else-if="item.scope === 'datePicker'"
-            v-model="formData[item.prop]"
-            type="datetimerange"
-            :picker-options="pickerOptions"
-            range-separator="至"
-            start-placeholder="开始日期"
-            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
-            v-else
-            v-model="formData[item.prop]"
-            :placeholder="item.placeholder"
-            :size="size"
-          ></el-input>
-        </el-form-item>
-      </el-form>
-    </div>
-    <el-form :inline="true" class="btnListBox">
-      <el-form-item>
-        <el-button :size="size" type="primary" @click="search">查询</el-button>
-        <el-button :size="size" @click="init">重置</el-button>
-      </el-form-item></el-form
-    >
-  </div>
-</template>
-
-<script>
-export default {
-  props: ["formList"], //参考文档 component.md
-  data() {
-    return {
-      size: "medium", //输入框尺寸类型
-      formData: {}, //表单数据收集
-      pickerOptions: {
-        //日期选择器近期功能
-        shortcuts: [
-          {
-            text: "最近一周",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-          {
-            text: "最近三个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-    };
-  },
-  created(){
-    var self = this
-    document.onkeydown = function (e) {
-      var key = window.event.keyCode;
-      if (key === 13) {
-        self.search();
-      }
-    };
-  },
-  methods: {
-    //搜索
-    search() {
-      this.$emit("search", this.formData);
-    },
-    //重置
-    init() {
-      this.formData = {};
-      this.$emit("init");
-    },
-    handleChanges(int1,int2){
-      if(int1 !== undefined && int2 !== undefined){
-        if(int1 > int2){
-          this.$message.error('请规范输入取值范围')
-        }
-      }
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-#searchBox {
-  display: flex;
-  .inputListBox {
-    flex: 1;
-  }
-}
-</style>

+ 14 - 28
src/components/searchBoxNew.vue

@@ -1,18 +1,5 @@
 <template>
   <div id="searchBoxNew">
-    <div class="inputListBox" v-if="topType">
-      <div class="fon_s">商品类型:</div>
-      <div>
-        <el-button
-          :type="formData.goodsType === item.value ? 'primary' : ''"
-          :size="size"
-          v-for="(item, index) in $methodsTools.getGoodsType(false)"
-          :key="index"
-          @click="topSearch(item.value)"
-          >{{ item.label }}</el-button
-        >
-      </div>
-    </div>
     <div class="inputListBox" v-if="pendingType">
       <div class="fon_s">审核状态:</div>
       <div>
@@ -78,20 +65,10 @@
       </div>
     </div> -->
     <div class="inputListBoxs">
-      <div class="fon_sIcon" v-if="redIcon">
-        <el-tooltip
-          effect="light"
-          class="item"
-          content="该页面中的数据查询,针对的是「有效、有课程内容」的视频商品"
-          placement="bottom-start"
-        >
-          <i class="el-icon-warning-outline iconStyS"></i>
-        </el-tooltip>
-      </div>
       <div
         class="fon_s"
         style="padding-top: 10px; width: 70px; text-align: end"
-        v-else
+        v-if="!redIcon"
       >
         筛选:
       </div>
@@ -116,7 +93,10 @@
           >
             <el-option
               v-for="(items, indexs) in educationType"
-              v-show="!item.filter || (item.filter && items.educationName === '继续教育')"
+              v-show="
+                !item.filter ||
+                (item.filter && items.educationName === '继续教育')
+              "
               :key="indexs"
               :label="items.educationName"
               :value="items.id"
@@ -147,7 +127,13 @@
             <el-option
               v-for="(items, indexs) in newBusinessLevel"
               :key="indexs"
-              v-show="!item.filter || (item.filter && (items.projectName === '造价师' || items.projectName === '建造师') && items.businessName === '二级')"
+              v-show="
+                !item.filter ||
+                (item.filter &&
+                  (items.projectName === '造价师' ||
+                    items.projectName === '建造师') &&
+                  items.businessName === '二级')
+              "
               :label="items.projectName + '-' + items.businessName"
               :value="items.id"
             ></el-option>
@@ -708,7 +694,7 @@ export default {
       "beforeLists",
       "applySiteAddress",
       "certificate",
-      "systemtenantlist"
+      "systemtenantlist",
     ]),
     /**
      * @remarks 过滤选择器列表
@@ -1045,4 +1031,4 @@ export default {
     margin-bottom: 0px;
   }
 }
-</style>
+</style>

File diff ditekan karena terlalu besar
+ 12 - 790
src/components/tableList.vue


+ 0 - 496
src/components/testPaperPreview/index.vue

@@ -1,496 +0,0 @@
-<template>
-  <div id="testPaperPreview">
-    <el-dialog
-      :visible.sync="diavos"
-      width="1080px"
-      :show-close="false"
-      :close-on-click-modal="false"
-    >
-      <div slot="title" class="hearders">
-        <div class="leftTitle">试卷预览</div>
-        <div class="rightBoxs">
-          <img src="@/assets/images/Close@2x.png" alt="" @click="clears" />
-        </div>
-      </div>
-      <div>
-        <table class="table_style" border>
-          <tr>
-            <td>当前总分</td>
-            <td>及格分数</td>
-            <td>答卷时长</td>
-            <td>答卷次数</td>
-            <td>做题类型</td>
-          </tr>
-          <tr>
-            <td>{{ topData.getAllpocis }}</td>
-            <td>{{ topData.passScore }}</td>
-            <td>
-              {{ topData.answerTime === 0 ? "无限时长" : topData.answerTime }}
-            </td>
-            <td>
-              {{ topData.answerNum === 0 ? "无限次" : topData.answerNum }}
-            </td>
-            <td>
-              {{
-                topData.doType === 1
-                  ? "练习"
-                  : topData.doType === 2
-                  ? "考试"
-                  : ""
-              }}
-            </td>
-          </tr>
-        </table>
-        <div class="bank_style">
-          <div v-for="(item, index) in tableData" :key="index">
-            <div class="header_style">
-              <span>题目{{ index + 1 }}</span>
-              <span>{{ getTypeName(item.type) }}</span>
-              <span>分值:{{ item.score }}</span>
-              <el-button
-                size="mini"
-                style="float: right"
-                @click="changeDatas(item)"
-                v-if="type === 2"
-                >修改</el-button
-              >
-              <div style="clear: both"></div>
-            </div>
-            <div class="dis_flex">
-              <span>题目内容:</span>
-              <div>
-                <div class="divPy" v-html="imgExiz(item.content)"></div>
-                <div v-if="item.type === 4">
-                  <div
-                    style="background: #e0e0e0; padding: 10px"
-                    v-for="(its, inds) in JSON.parse(item.jsonStr)"
-                    :key="inds"
-                  >
-                    <div class="header_style">
-                      <span>题目{{ inds + 1 }}</span>
-                      <span>{{ getTypeName(its.type) }}</span>
-                    </div>
-                    <div class="dis_flex">
-                      <span>题目内容:</span>
-                      <div>
-                        <div class="divPy" v-html="imgExiz(its.content)"></div>
-                      </div>
-                    </div>
-                    <div
-                      class="dis_flex"
-                      v-if="its.type !== 4 && its.type !== 5 && its.type !== 3"
-                    >
-                      <span>选项内容:</span>
-                      <div>
-                        <ul>
-                          <li
-                            v-for="(itemsxs, indexsxs) in its.optionsList"
-                            :key="indexsxs"
-                            :style="
-                              indexsxs === its.optionsList.length - 1
-                                ? 'margin-bottom: 0px'
-                                : 'margin-bottom: 10px'
-                            "
-                          >
-                            {{ Gest(indexsxs + 1) }}:{{ itemsxs.content }}
-
-                            <div style="margin: 10px 0px">
-                              <el-image
-                                v-if="itemsxs.imgUrl"
-                                style="
-                                  max-width: 100%;
-                                  max-height: 100%;
-                                  vertical-align: middle;
-                                "
-                                :src="
-                                  $methodsTools.splitImgHost(itemsxs.imgUrl)
-                                "
-                                :preview-src-list="[
-                                  $methodsTools.splitImgHost(itemsxs.imgUrl),
-                                ]"
-                              >
-                              </el-image>
-                            </div>
-                          </li>
-                        </ul>
-                      </div>
-                    </div>
-                    <div class="dis_flex" v-if="its.type !== 5">
-                      <span>正确答案:</span>
-                      <div>
-                        <span v-if="its.type === 3">
-                          {{ its.answerQuestion == 1 ? "正确" : "错误" }}
-                        </span>
-                        <span v-else>
-                          {{ getDictChanges(its.answerQuestion) }}
-                        </span>
-                      </div>
-                    </div>
-                    <div class="dis_flex">
-                      <span>答案解析:</span>
-                      <div>
-                        <div v-html="imgExiz(its.analysisContent)"></div>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-            <div
-              class="dis_flex"
-              v-if="item.type !== 3 && item.type !== 4 && item.type !== 5"
-            >
-              <span>选项内容:</span>
-              <div>
-                <ul v-if="item.type !== 4">
-                  <li
-                    v-for="(items, indexs) in item.optionsList"
-                    :key="indexs"
-                    :style="
-                      indexs === item.optionsList.length - 1
-                        ? 'margin-bottom: 0px'
-                        : 'margin-bottom: 10px'
-                    "
-                  >
-                    {{ Gest(indexs + 1) }}:{{ items.content }}
-                    <div style="margin: 10px 0px">
-                      <el-image
-                        v-if="items.imgUrl"
-                        style="
-                          max-width: 100%;
-                          max-height: 100%;
-                          vertical-align: middle;
-                        "
-                        :src="$methodsTools.splitImgHost(items.imgUrl)"
-                        :preview-src-list="[
-                          $methodsTools.splitImgHost(items.imgUrl),
-                        ]"
-                      >
-                      </el-image>
-                    </div>
-                  </li>
-                </ul>
-              </div>
-            </div>
-            <div class="dis_flex" v-if="item.type !== 5 && item.type !== 4">
-              <span>正确答案:</span>
-              <div>
-                <span v-if="item.type === 3">
-                  {{ item.answerQuestion == 1 ? "正确" : "错误" }}
-                </span>
-                <span v-else>
-                  {{ getDictChanges(item.answerQuestion) }}
-                </span>
-              </div>
-            </div>
-            <div class="dis_flex" v-if="item.type !== 4">
-              <span>答案解析:</span>
-              <div><div v-html="imgExiz(item.analysisContent)"></div></div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="clears">确 认</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      diavos: false,
-      tableData: [], //题目内容
-      topData: {}, //顶部表格数据
-      type: "",
-    };
-  },
-  computed: {
-    /**
-     * 题目类型转换名称
-     */
-    getTypeName: function () {
-      return function (type) {
-        let typeName = "";
-        switch (type) {
-          case 1:
-            typeName = "单选题";
-            break;
-          case 2:
-            typeName = "多选题";
-            break;
-          case 3:
-            typeName = "判断题";
-            break;
-          case 4:
-            typeName = "案例题";
-            break;
-          case 5:
-            typeName = "简答题";
-            break;
-
-          default:
-            break;
-        }
-        return typeName;
-      };
-    },
-
-    imgExiz: function () {
-      return function (vms) {
-        if (!vms) {
-          return vms;
-        } else {
-          var ast1 = vms.replace(/<p/gi, '<p style="margin:0px;"');
-          var ast = ast1.replace(/<img/gi, '<img style="max-width:100%;"');
-          return ast;
-        }
-      };
-    },
-  },
-  methods: {
-    /**
-     * type = 1时Id获取数据row = ID, 2时直接获取数据row = 数据
-     */
-    openBox(type, row) {
-      const ROWS = JSON.parse(JSON.stringify(row));
-      this.type = type;
-      if (type === 1) {
-        //搜索Id处理数据
-        this.$api.obtainbankexam(row).then((res) => {
-          this.topData = {
-            answerTime: res.data.answerTime,
-            answerNum: res.data.answerNum,
-            doType: res.data.doType,
-            passScore: res.data.passScore,
-          };
-          this.$api.inquirebankexamquestionList({ examId: row }).then((res) => {
-            res.data.map((item) => {
-              item.optionsList = JSON.parse(item.jsonStr);
-            });
-            this.tableData = res.data;
-            var num = 0;
-            res.data.forEach((item) => {
-              num += item.score;
-            });
-            this.topData.getAllpocis = num;
-
-            this.diavos = true;
-          });
-        });
-      }
-      if (type === 2) {
-        this.topData = ROWS.topData;
-        this.tableData = ROWS.tableData;
-        this.diavos = true;
-      }
-    },
-    changeDatas(row) {
-      this.$parent.addClick(row, 0, row.index, true);
-    },
-    clears() {
-      this.diavos = false;
-    },
-    changeUploadStatus(data) {
-      let index = this.tableData.findIndex((item) => {
-        return item.index === data.index;
-      });
-      this.$set(this.tableData, index, data);
-      console.log(data);
-    },
-    /**
-     * 选项转换
-     */
-    Gest(ints) {
-      var int = parseInt(ints);
-      var ast = "";
-      switch (int) {
-        case 1:
-          ast = "A";
-          break;
-        case 2:
-          ast = "B";
-          break;
-        case 3:
-          ast = "C";
-          break;
-        case 4:
-          ast = "D";
-          break;
-        case 5:
-          ast = "E";
-          break;
-        case 6:
-          ast = "F";
-          break;
-        case 7:
-          ast = "G";
-          break;
-        case 8:
-          ast = "H";
-          break;
-        default:
-          ast = "X";
-          break;
-      }
-      return ast;
-    },
-    getDictChanges(dan) {
-      var arst = [];
-      var arrays;
-      if (dan instanceof Object) {
-        arrays = dan;
-      } else {
-        if (dan) {
-          arrays = dan.toString().split(",");
-        } else {
-          return "";
-        }
-      }
-      for (let i = 0; i < arrays.length; i++) {
-        arst.push(this.Gest(arrays[i]));
-      }
-      return arst.join(",");
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.table_style {
-  width: 100%;
-  border-collapse: collapse;
-  text-align: center;
-  margin-bottom: 14px;
-  tr {
-    &:first-of-type {
-      background-color: rgb(255, 255, 204);
-      font-weight: bold;
-    }
-    td {
-      padding: 6px;
-    }
-  }
-}
-.bank_style {
-  max-height: 600px;
-  overflow: auto;
-  & > div {
-    padding: 10px;
-    background-color: #eee;
-    margin-bottom: 11px;
-  }
-  & .header_style {
-    border-bottom: 1px dotted #999;
-    padding-bottom: 6px;
-    & > span {
-      margin-right: 10px;
-    }
-  }
-  & .dis_flex {
-    display: flex;
-    margin-bottom: 6px;
-    & > span {
-      width: 90px;
-      flex-shrink: 0;
-    }
-    & > div {
-      flex: 1;
-      ul {
-        margin: 0;
-      }
-    }
-  }
-}
-/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>

+ 0 - 227
src/components/videoPreview/index.vue

@@ -1,227 +0,0 @@
-<template>
-  <div id="videoPreview">
-    <el-dialog
-      :visible.sync="diavos"
-      width="840px"
-      @opened="isOkBf"
-      @close="clears"
-      :show-close="false"
-      :close-on-click-modal="false"
-    >
-      <div slot="title" class="hearders">
-        <div class="leftTitle">视频预览</div>
-        <div class="rightBoxs">
-          <img src="@/assets/images/Close@2x.png" alt="" @click="clears" />
-        </div>
-      </div>
-      <div>
-        <div id="player" v-if="listData.sectionType === 1"></div>
-        <div id="playerzb" v-if="listData.sectionType === 2"></div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="clears">取 消</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      vodPlayerJs: "https://player.polyv.net/script/player.js",
-      vid: "",
-      vidzb: "",
-      playerJs:
-        "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
-      uidzb: "egsxlptzdq",
-      fileSetting: {
-        desc: "i am desc", // 描述
-        cataid: "1639399775001", // 分类ID 可以后端传递 也可以不写 或写死
-        tag: "i am tag", // 标签
-        luping: 0, // 是否开启视频课件优化处理,对于上传录屏类视频清晰度有所优化:0为不开启,1为开启
-        keepsource: 1, // 是否源文件播放(不对视频进行编码):0为编码,1为不编码
-      },
-      diavos: false,
-      listData: {}, //数据
-    };
-  },
-  methods: {
-    diavosFun(item) {
-      if (item.sectionType === 1) {
-        this.vid = item.recordingUrl;
-      }
-      if (item.sectionType === 2) {
-        this.vidzb = item.liveUrl;
-      }
-      this.listData = item;
-      this.diavos = true;
-    },
-    isOkBf() {
-      if (this.listData.sectionType === 1) {
-        this.loadPlayerScript(this.loadPlayer);
-      }
-      if (this.listData.sectionType === 2) {
-        this.loadPlayerScriptzb(this.loadPlayerzb);
-      }
-    },
-    loadPlayerScript(callback) {
-      if (!window.polyvPlayer) {
-        const myScript = document.createElement("script");
-        myScript.setAttribute("src", this.vodPlayerJs);
-        myScript.onload = callback;
-        document.body.appendChild(myScript);
-      } else {
-        callback();
-        this.player.on("serverError", (...params) => {
-          this.$message.error(returnTitle(params[1]));
-          console.log(params);
-        });
-      }
-    },
-    loadPlayer() {
-      var self = this;
-      const polyvPlayer = window.polyvPlayer;
-      self.player = polyvPlayer({
-        wrap: "#player",
-        width: 800,
-        height: 533,
-        vid: self.vid,
-        teaser_show: 0,
-        playsafe: function (vid, next) {
-          self.$api.obtainpolyvvideosign(vid).then((res) => {
-            next(res.data);
-          });
-        },
-      });
-    },
-    /**
-     * @param {String} 关闭视频窗口-销毁实例
-     */
-    clears() {
-      this.diavos = false;
-      if (this.listData.sectionType === 1 && this.player) {
-        this.player.destroy();
-      }
-      if (this.listData.sectionType === 2 && this.playerzb) {
-        this.playerzb.destroy();
-      }
-      this.listData = {};
-    },
-    loadPlayerScriptzb(callback) {
-      if (!window.polyvLivePlayer) {
-        const myScript = document.createElement("script");
-        myScript.setAttribute("src", this.playerJs);
-        myScript.onload = callback;
-        document.body.appendChild(myScript);
-      } else {
-        callback();
-      }
-    },
-
-    loadPlayerzb() {
-      var self = this;
-      const polyvLivePlayer = window.polyvLivePlayer;
-      self.playerzb = polyvLivePlayer({
-        wrap: "#playerzb",
-        width: 800,
-        height: 533,
-        uid: self.uidzb,
-        vid: self.vidzb,
-      });
-    },
-  },
-};
-</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>

+ 21 - 0
src/directive/common/int.js

@@ -0,0 +1,21 @@
+import { checkNum } from "@/utils/index";
+export default {
+  inserted(el, binding, vnode) {
+    el.addEventListener("keyup", (e) => {
+      let value = e.target.value;
+      if (!value) {
+        return;
+      }
+      const { max, set = 2 } = binding.value || {};
+      if (max && value > max) {
+        value = max + "";
+      }
+      e.target.value = checkNum(value, set) || null;
+      el.firstElementChild.dispatchEvent(
+        new Event("input", {
+          bubbles: true,
+        })
+      );
+    });
+  },
+};

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini