Эх сурвалжийг харах

Merge branch 'http_mock' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_mock

qinzhipeng_v 5 жил өмнө
parent
commit
093aec9b4a

+ 142 - 84
src/router/index.js

@@ -37,14 +37,14 @@ import Home from '@/views/home/index'
 export const constantRoutes = [{
   path: '/login',
   component: () =>
-      import('@/views/login/index'),
+    import('@/views/login/index'),
   hidden: true
 },
 
 {
   path: '/404',
   component: () =>
-      import('@/views/404'),
+    import('@/views/404'),
   hidden: true
 },
 
@@ -69,7 +69,7 @@ export const constantRoutes = [{
   children: [{
     path: 'person',
     component: () =>
-          import('@/views/workbench/person/index.vue'),
+      import('@/views/workbench/person/index.vue'),
     meta: { title: '个人工作台' }
   }
   ]
@@ -84,7 +84,7 @@ export const constantRoutes = [{
     {
       path: 'team',
       component: () =>
-          import('@/views/workbench/team/index.vue'),
+        import('@/views/workbench/team/index.vue'),
       meta: { title: '团队工作台' }
     }
   ]
@@ -99,7 +99,7 @@ export const constantRoutes = [{
     path: 'projectIndex',
     name: '项目',
     component: () =>
-              import('@/views/projectManage/projectList/projectIndex'),
+      import('@/views/projectManage/projectList/projectIndex'),
     meta: { title: '项目' }
   },
   {
@@ -107,14 +107,14 @@ export const constantRoutes = [{
     name: '项目详情',
     hidden: true,
     component: () =>
-              import('@/views/projectManage/projectList/projectViewDetails'),
+      import('@/views/projectManage/projectList/projectViewDetails'),
     meta: { title: '项目详情' }
   },
   {
     path: 'requirement',
     name: '需求',
     component: () =>
-              import('@/views/projectManage/requirement/list/index.vue'),
+      import('@/views/projectManage/requirement/list/index.vue'),
     meta: { title: '需求' }
   },
   {
@@ -123,14 +123,14 @@ export const constantRoutes = [{
     hidden: true,
     props: true,
     component: () =>
-              import('@/views/projectManage/requirement/details/index.vue'),
+      import('@/views/projectManage/requirement/details/index.vue'),
     meta: { title: '需求详情' }
   },
   {
     path: 'taskIndex',
     name: '任务',
     component: () =>
-              import('@/views/projectManage/taskList/taskIndex'),
+      import('@/views/projectManage/taskList/taskIndex'),
     meta: { title: '任务' }
   },
   {
@@ -138,28 +138,28 @@ export const constantRoutes = [{
     name: '任务详情',
     hidden: true,
     component: () =>
-              import('@/views/projectManage/taskList/taskViewDetails'),
+      import('@/views/projectManage/taskList/taskViewDetails'),
     meta: { title: '任务详情' }
   },
   {
     path: '/Platform/projectManage/version',
     name: '版本',
     component: () =>
-          import('@/views/Platform/presentation/testa'),
+      import('@/views/Platform/presentation/testa'),
     redirect: '/Platform/projectManage/version',
     meta: { title: '版本' },
     children: [{
       path: 'version',
       name: '版本1',
       component: () =>
-                import('@/views/projectManage/version/list/index.vue'),
+        import('@/views/projectManage/version/list/index.vue'),
       meta: { title: '版本' }
     },
     {
       path: 'versionsCalendar',
       name: '版本日历',
       component: () =>
-                import('@/views/projectManage/taskList/versionsCalendar'),
+        import('@/views/projectManage/taskList/versionsCalendar'),
       meta: { title: '版本日历' }
     }
     ]
@@ -168,7 +168,7 @@ export const constantRoutes = [{
     path: '/projectManage/bugList/bugindex',
     name: '缺陷',
     component: () =>
-          import('@/views/projectManage/bugList/bugindex'),
+      import('@/views/projectManage/bugList/bugindex'),
     meta: { title: '缺陷' }
   },
   {
@@ -177,21 +177,21 @@ export const constantRoutes = [{
     hidden: true,
     props: true,
     component: () =>
-              import('@/views/projectManage/bugList/details/index.vue'),
+      import('@/views/projectManage/bugList/details/index.vue'),
     meta: { title: '缺陷详情' }
   },
   {
     path: '/Platform/presentation',
     name: '报告',
     component: () =>
-          import('@/views/Platform/presentation/testa'),
+      import('@/views/Platform/presentation/testa'),
     redirect: '/Platform/presentation/testPresentation',
     meta: { title: '报告' },
     children: [{
       path: 'testPresentation',
       name: '报告',
       component: () =>
-              import('@/views/Platform/presentation/testPresentation'),
+        import('@/views/Platform/presentation/testPresentation'),
       meta: { title: '报告' }
     },
     {
@@ -199,7 +199,7 @@ export const constantRoutes = [{
       name: '新增日报报告',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/DailyNewsAdded'),
+        import('@/views/Platform/presentation/DailyNewsAdded'),
       meta: { title: '新增日报报告' }
     },
     {
@@ -207,7 +207,7 @@ export const constantRoutes = [{
       name: '新增服务器提测报告',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/presentationReport'),
+        import('@/views/Platform/presentation/presentationReport'),
       meta: { title: '新增服务器提测报告' }
     },
     {
@@ -215,7 +215,7 @@ export const constantRoutes = [{
       name: '提测预览',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/acceptTheReport'),
+        import('@/views/Platform/presentation/acceptTheReport'),
       meta: { title: '提测预览' }
     },
     {
@@ -223,7 +223,7 @@ export const constantRoutes = [{
       name: '日报预览',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/testPresenyL'),
+        import('@/views/Platform/presentation/testPresenyL'),
       meta: { title: '日报预览' }
     },
     {
@@ -231,7 +231,7 @@ export const constantRoutes = [{
       name: '准出预览',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/ResultPageyL'),
+        import('@/views/Platform/presentation/ResultPageyL'),
       meta: { title: '准出预览' }
     },
     {
@@ -239,7 +239,7 @@ export const constantRoutes = [{
       name: '新增服务器端准出报告',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/Acceptance'),
+        import('@/views/Platform/presentation/Acceptance'),
       meta: { title: '新增服务器端准出报告' }
     },
     {
@@ -247,7 +247,7 @@ export const constantRoutes = [{
       name: '新增客户端准出报告',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/ClientAcceptance'),
+        import('@/views/Platform/presentation/ClientAcceptance'),
       meta: { title: '新增客户端准出报告' }
     },
     {
@@ -255,7 +255,7 @@ export const constantRoutes = [{
       name: '新增客户端提测报告',
       hidden: true,
       component: () =>
-              import('@/views/Platform/presentation/PresentReport'),
+        import('@/views/Platform/presentation/PresentReport'),
       meta: { title: '新增客户端提测报告' }
     }
     ]
@@ -271,7 +271,7 @@ export const constantRoutes = [{
     path: 'useCasePage',
     name: '测试用例',
     component: () =>
-            import('@/views/Platform/useCasePage'),
+      import('@/views/Platform/useCasePage'),
     meta: { title: '测试用例' }
   },
   {
@@ -279,7 +279,7 @@ export const constantRoutes = [{
     name: '用例新增',
     hidden: true,
     component: () =>
-            import('@/views/Platform/useCase/createUse'),
+      import('@/views/Platform/useCase/createUse'),
     meta: { title: '用例新增' }
   },
   {
@@ -287,14 +287,14 @@ export const constantRoutes = [{
     name: '用例查看',
     hidden: true,
     component: () =>
-            import('@/views/Platform/useCase/queryUse'),
+      import('@/views/Platform/useCase/queryUse'),
     meta: { title: '用例查看' }
   },
   {
     path: 'testPage',
     name: '测试计划',
     component: () =>
-            import('@/views/Platform/testPage.vue'),
+      import('@/views/Platform/testPage.vue'),
     meta: { title: '测试计划' }
   }
   ]
@@ -306,61 +306,120 @@ export const constantRoutes = [{
   name: '环境',
   meta: { title: '环境管理', icon: '环境管理' },
   children: [{
-    path: 'env',
-    name: 'env',
-    component: () =>
-          import('@/views/env/index.vue'),
-    meta: { title: '环境管理' }
-
-  },
-  {
-    path: 'businessline',
-    name: 'businessline',
+    path: 'operate',
+    name: '操作',
     component: () =>
+      import('@/views/env/index.vue'),
+    meta: { title: '操作' },
+    children: [
+      {
+        path: 'env',
+        name: 'env',
+        component: () =>
           import('@/views/env/index.vue'),
-    meta: { title: '业务线管理' }
-  },
-  {
-    path: 'whitelist',
-    name: 'whitelist',
-    component: () =>
+        meta: { title: '环境管理' }
+      }, {
+        path: 'mq',
+        name: 'mq',
+        component: () =>
           import('@/views/env/index.vue'),
-    meta: { title: '白名单管理' }
-  },
-  {
-    path: 'module',
-    name: 'module',
-    component: () =>
+        meta: { title: 'MQ管理' }
+      }, {
+        path: 'database',
+        name: 'database',
+        component: () =>
           import('@/views/env/index.vue'),
-    meta: { title: '模块管理' }
+        meta: { title: '数据库管理' }
+      }
+    ]
   },
   {
-    path: 'group',
-    name: 'group',
+    path: 'b2b',
+    name: '企业级',
     component: () =>
+      import('@/views/env/index.vue'),
+    meta: { title: '企业级' },
+    children: [
+      {
+        path: 'front-end',
+        name: 'b2b/front-end',
+        component: () =>
           import('@/views/env/index.vue'),
-    meta: { title: 'Group管理' }
-  },
-  {
-    path: 'topic',
-    name: 'topic',
-    component: () =>
+        meta: { title: '前端部署' }
+      },
+      {
+        path: 'after-end',
+        name: 'b2b/after-end',
+        component: () =>
           import('@/views/env/index.vue'),
-    meta: { title: 'Topic管理' }
+        meta: { title: '后端部署' }
+      }
+    ]
   },
   {
-    path: 'mq',
-    name: 'mq',
+    path: 'data-maintain',
+    name: '信息维护',
     component: () =>
-          import('@/views/env/index.vue'),
-    meta: { title: 'MQ管理' }
+      import('@/views/env/index.vue'),
+    meta: { title: '信息维护' },
+    children: [{
+      path: 'businessline',
+      name: 'businessline',
+      component: () =>
+        import('@/views/env/index.vue'),
+      meta: { title: '业务线管理' }
+    },
+    {
+      path: 'whitelist',
+      name: 'whitelist',
+      component: () =>
+        import('@/views/env/index.vue'),
+      meta: { title: '白名单管理' }
+    },
+    {
+      path: 'module',
+      name: 'module',
+      component: () =>
+        import('@/views/env/index.vue'),
+      meta: { title: '模块管理' }
+    },
+    {
+      path: 'group',
+      name: 'group',
+      component: () =>
+        import('@/views/env/index.vue'),
+      meta: { title: 'Group管理' }
+    },
+    {
+      path: 'topic',
+      name: 'topic',
+      component: () =>
+        import('@/views/env/index.vue'),
+      meta: { title: 'Topic管理' }
+    },
+    {
+      path: 'userContainer',
+      name: 'userContainer',
+      component: () =>
+        import('@/views/env/index.vue'),
+      meta: { title: '用户容器外网' }
+    }]
   },
   {
-    path: 'data',
-    name: 'data',
+    path: 'other',
+    name: 'other',
     component: () =>
+      import('@/views/env/index.vue'),
+    meta: { title: '其他' },
+    children: [
+      {
+        path: 'data',
+        name: 'data',
+        component: () =>
           import('@/views/env/index.vue'),
-    meta: { title: '数据统计' }
+        meta: { title: '数据统计' }
+      }
+    ]
   }
   ]
 },
@@ -377,12 +436,11 @@ export const constantRoutes = [{
       path: 'problemList',
       name: '线上问题1',
       component: () =>
-            import('@/views/onlineProblem/problemList.vue'),
+        import('@/views/onlineProblem/problemList.vue'),
       meta: { title: '线上问题' }
     }
   ]
 },
-
 {
   path: '/quality',
   component: Layout,
@@ -393,7 +451,7 @@ export const constantRoutes = [{
     path: 'qualityMeasurement',
     name: '质量大盘',
     component: () =>
-          import('@/views/quality/qualityMeasurement.vue'),
+      import('@/views/quality/qualityMeasurement.vue'),
     meta: { title: '统计分析' }
   },
   {
@@ -401,7 +459,7 @@ export const constantRoutes = [{
     name: '上线过程',
     hidden: true,
     component: () =>
-          import('@/views/quality/qualityProcess.vue'),
+      import('@/views/quality/qualityProcess.vue'),
     meta: { title: '上线过程' }
   },
   {
@@ -409,7 +467,7 @@ export const constantRoutes = [{
     name: '缺陷过程',
     hidden: true,
     component: () =>
-          import('@/views/quality/qualityDefectProcess.vue'),
+      import('@/views/quality/qualityDefectProcess.vue'),
     meta: { title: '缺陷过程' }
   },
   {
@@ -417,7 +475,7 @@ export const constantRoutes = [{
     name: '热修复过程',
     hidden: true,
     component: () =>
-          import('@/views/quality/qualityHotpatchProcess.vue'),
+      import('@/views/quality/qualityHotpatchProcess.vue'),
     meta: { title: '热修复过程' }
   },
   // {
@@ -433,7 +491,7 @@ export const constantRoutes = [{
     name: '新建线上问题',
     hidden: true,
     component: () =>
-          import('@/views/onlineProblem/problemCreate'),
+      import('@/views/onlineProblem/problemCreate'),
     meta: { title: '新建线上问题' }
   },
   {
@@ -441,7 +499,7 @@ export const constantRoutes = [{
     name: '查看线上问题',
     hidden: true,
     component: () =>
-          import('@/views/onlineProblem/problemQuery'),
+      import('@/views/onlineProblem/problemQuery'),
     meta: { title: '查看线上问题' }
   },
   {
@@ -449,7 +507,7 @@ export const constantRoutes = [{
     name: '更新线上问题',
     hidden: true,
     component: () =>
-          import('@/views/onlineProblem/problemUpdate'),
+      import('@/views/onlineProblem/problemUpdate'),
     meta: { title: '更新线上问题' }
   }
   ]
@@ -465,7 +523,7 @@ export const constantRoutes = [{
       path: '/views/mock',
       name: 'Mock服务',
       component: () =>
-    import('@/views/Platform/presentation/testa'),
+        import('@/views/Platform/presentation/testa'),
       meta: { title: 'Mock服务' },
       children: [{
         path: 'interface',
@@ -502,7 +560,7 @@ export const constantRoutes = [{
     {
       path: '/online-quality',
       component: () =>
-    import('@/views/Platform/presentation/testa'),
+        import('@/views/Platform/presentation/testa'),
       redirect: '/online-quality/check-list',
       name: '上线质检',
       meta: { title: '上线质检' },
@@ -510,14 +568,14 @@ export const constantRoutes = [{
         path: 'check-list',
         name: '模板管理',
         component: () =>
-            import('@/views/online-quality/CheckConfig/index.vue'),
+          import('@/views/online-quality/CheckConfig/index.vue'),
         meta: { title: '模板管理' }
       },
       {
         path: 'history-task',
         name: '历史任务',
         component: () =>
-            import('@/views/online-quality/HistoryTask/index.vue'),
+          import('@/views/online-quality/HistoryTask/index.vue'),
         meta: { title: '历史任务' }
       },
       {
@@ -526,14 +584,14 @@ export const constantRoutes = [{
         name: '历史任务详情',
         hidden: true,
         component: () =>
-            import('@/views/online-quality/HistoryTask/taskDetails.vue'),
+          import('@/views/online-quality/HistoryTask/taskDetails.vue'),
         meta: { title: '历史任务详情' }
       },
       {
         path: 'block-server',
         name: '阻断服务',
         component: () =>
-            import('@/views/online-quality/BlockServer/index.vue'),
+          import('@/views/online-quality/BlockServer/index.vue'),
         meta: { title: '阻断服务' }
       }
       ]
@@ -594,7 +652,7 @@ export const constantRoutes = [{
       path: 'configure',
       name: '配置',
       component: () =>
-          import('@/views/ToConfigure/configure'),
+        import('@/views/ToConfigure/configure'),
       meta: { title: '配置' }
     }
   ]

+ 12 - 5
src/views/ToConfigure/configure.vue

@@ -593,26 +593,33 @@ export default {
       return newArr
     },
     handlerModule(type, data, index) { // 模块处理
-      console.log(data)
-      this.moduleDialog = true
       this.curcentModule = type
       this.moduleForm = { bizId: null, moduleNames: [null], parentId: -1, id: null }// 初始化
       this.curcentParent = '无'
       this.moduleTitle = '新增模块'
       if (data && type === 'add') {
+        this.moduleDialog = true
         this.moduleTitle = '新增模块'
         this.curcentParent = data.moduleName
         this.moduleForm.parentId = data.id
       } else if (data && type === 'edit') {
+        this.moduleDialog = true
         this.moduleTitle = '编辑模块'
         this.moduleForm.id = data.id
         this.curcentParent = data.parentId === -1 ? '无' : data.parentModuleName
         this.moduleForm.parentId = data.parentId
         this.moduleForm.moduleNames[0] = data.moduleName
       } else if (data && type === 'delete') {
-        this.moduleTitle = '删除确认'
-        this.moduleForm.id = data.id
-        this.moduleForm.moduleNames[0] = data.moduleName
+        if (data.childModules && data.childModules.length > 0) {
+          this.$message({ message: '该模块下存在子模块', type: 'error' })
+        } else {
+          this.moduleDialog = true
+          this.moduleTitle = '删除确认'
+          this.moduleForm.id = data.id
+          this.moduleForm.moduleNames[0] = data.moduleName
+        }
+      } else {
+        this.moduleDialog = true
       }
     },
     confirmModule(formName) { // 模块操作确认

+ 1 - 1
src/views/home/index.vue

@@ -309,7 +309,7 @@ export default {
     handleSelect(key, keyPath) {
       switch (key) {
         case '1':
-          this.$router.push({ name: '环境' })
+          this.$router.push({ name: 'env' })
           break
         case '2':
           this.$router.push({ name: 'Mock' })

+ 37 - 3
src/views/projectManage/projectList/projectViewDetails.vue

@@ -266,7 +266,7 @@
               <el-col :span="1" class="item-click">|</el-col>
               <el-col :span="2" class="item-click" @click.native="handlePlan('test')">提测</el-col>
               <el-col :span="2" class="item-click" @click.native="handlePlan('allow')">准出</el-col>
-              <el-col :span="4" class="item-click">建立测试日报</el-col>
+              <el-col :span="4" class="item-click" @click.native="handlePlan('daily')">建立测试日报</el-col>
               <el-col :span="4" class="item-click" @click.native="handlePlan('cancel')">取消选择</el-col>
             </el-row>
             <el-table
@@ -570,6 +570,9 @@
       @cancel="closeDioang()"
       @confirm="createDialogVisible=false"
     />
+    <TestReport v-if="dialogTestReport" ref="TestReport" />
+    <DailyReport v-if="dialogDailyReport" ref="DailyReport" />
+    <ClientReport v-if="dialogClientReport" ref="ClientReport" />
   </div>
 </template>
 
@@ -593,11 +596,17 @@ import RequirementCreate from '@/views/projectManage/requirement/list/create'
 import { showRequirementEnum } from '@/api/requirement.js'
 import createdBug from '@/views/projectManage/bugList/file/createdBug'
 import '@/views/projectManage/projectList/css/index.css'
+import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
+import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 export default {
   components: {
     openDialog,
     RequirementCreate,
-    createdBug
+    createdBug,
+    TestReport,
+    DailyReport,
+    ClientReport
   },
   filters: {
     dateStr(value) {
@@ -736,7 +745,10 @@ export default {
       curcentList: [], // 当前已选择的列表
       curcentChecked: 0, // 当前已选择的数量
       planChecked: false,
-      planHandleType: '' // 任务列表操作类型
+      planHandleType: '', // 任务列表操作类型
+      dialogTestReport: false, // 提测
+      dialogDailyReport: false, // 日报
+      dialogClientReport: false// 准出
     }
   },
   created() {
@@ -1151,6 +1163,9 @@ export default {
       val.length > 0 ? this.showHeader = false : this.showHeader = true
       this.curcentChecked = val.length
       this.curcentList = val
+      if (val.length === this.all_task.length) {
+        this.planChecked = true
+      }
     },
     changeCheck(val) {
       if (val) {
@@ -1170,6 +1185,9 @@ export default {
         case 'allow':
           this.filtrateAllow()
           break
+        case 'daily':
+          this.filtrateDaily()
+          break
         case 'cancel':
           this.$refs.planTable.clearSelection()
           break
@@ -1186,6 +1204,11 @@ export default {
           duration: 3000,
           offset: 150
         })
+      } else {
+        this.dialogTestReport = true
+        this.$nextTick(() => {
+          this.$refs.TestReport.init()
+        })
       }
     },
     filtrateAllow() { // 准出筛选
@@ -1199,7 +1222,18 @@ export default {
           duration: 3000,
           offset: 150
         })
+      } else {
+        this.dialogClientReport = true
+        this.$nextTick(() => {
+          this.$refs.ClientReport.init()
+        })
       }
+    },
+    filtrateDaily() { // 建立日报
+      this.dialogDailyReport = true
+      this.$nextTick(() => {
+        this.$refs.DailyReport.init()
+      })
     }
   }
 }