Преглед изворни кода

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

panxiandiao_i пре 5 година
родитељ
комит
73bdcfe4fb

+ 5 - 0
src/App.vue

@@ -10,11 +10,16 @@ import { getUserInfo } from '@/api/user.js'
 export default {
   name: 'App',
   mounted() {
+    // if (location.href.indexOf('localhost') < 0) {
     getUserInfo()
       .then(res => {
         localStorage.setItem('realname', res.data.realname)
         localStorage.setItem('username', res.data.username)
       })
+    // } else {
+    //   localStorage.setItem('realname', 'unlogin')
+    //   localStorage.setItem('username', 'unlogin')
+    // }
   }
 }
 </script>

+ 2 - 1
src/api/httprule.js

@@ -2,7 +2,7 @@ import request from '@/utils/request'
 import { mockUrl } from '@/apiConfig/mock'
 // ================================== Rule ======================================
 // const mockUrl = 'http://mock.Intra.xiaojukeji.com'
-// const mockUrl = 'http://172.23.160.90:8089'
+// const mockUrl = 'http://10.179.88.110:8089'
 
 export function fetchRuleById(data) {
   return request({
@@ -59,3 +59,4 @@ export function getExpress() {
     method: 'get'
   })
 }
+

+ 1 - 1
src/apiConfig/api.js

@@ -2,7 +2,7 @@
 export const mockUrl = 'http://10.179.24.176:8980' // 线下
 // export const mockUrl = 'http://10.179.24.123:8980' // 线上
 
-// export const mockUrl = 'http://172.23.162.48:8980' // 美双姐本地
+// export const mockUrl = 'http://172.23.164.114:8980' // 美双姐本地
 
 export const qualityUrl = 'http://10.179.209.19:8898' // 质量度量
 

+ 3 - 2
src/apiConfig/mock.js

@@ -1,3 +1,4 @@
-/*eslint-disable*/ //规避eslint的检查,如没有eslint可不写
+/*eslint-disable*/   //规避eslint的检查,如没有eslint可不写
+export const mockUrl = 'http://10.179.88.110:8089' // stable
 // export const mockUrl = 'http://mock.Intra.xiaojukeji.com' // 线上
-export const mockUrl = 'http://10.179.101.226:8089' // 线下
+// export const mockUrl = 'http://10.179.101.226:8089' // test

+ 20 - 2
src/layout/components/Navbar.vue

@@ -3,6 +3,10 @@
     <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
 
     <breadcrumb class="breadcrumb-container" />
+    <span v-show="configShowMain" style="display: inline-block;" class="config">
+      <a href="http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=213729138#id-11%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C-11%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C-%E4%B8%80%E3%80%81%E6%8E%A5%E5%85%A5httpmock" target="_blank">配置指南
+      </a>
+    </span>
 
     <div class="right-menu">
       <el-dropdown class="avatar-container" @command="handleCommand">
@@ -51,7 +55,9 @@ export default {
       navbarLogo: {
         name: 'navbarLogo',
         src: navbarLogo
-      }
+      },
+      routeName: this.$route.name,
+      configShowMain: false
     }
   },
   computed: {
@@ -65,6 +71,7 @@ export default {
   },
   created() {
     this.getBizId()
+    this.configShow()
   },
   methods: {
     toggleSideBar() {
@@ -89,6 +96,14 @@ export default {
       this.bizShow = ele
       localStorage.setItem('key', this.bizShow)
       window.location.reload()
+    },
+    configShow() {
+      if (this.$route.meta.title === 'httpmock') {
+        console.log(this.routeName + 'la')
+        this.configShowMain = true
+      } else {
+        this.configShowMain = false
+      }
     }
   }
 }
@@ -101,7 +116,10 @@ export default {
   position: relative;
   background: #fff;
   box-shadow: 0 1px 4px rgba(0,21,41,.08);
-
+  .config {
+    margin-left: 10px;
+    margin-top: 15px;
+  }
   .hamburger-container {
     line-height: 46px;
     height: 100%;

+ 9 - 1
src/views/Platform/bugManage/bugCreate.vue

@@ -242,8 +242,16 @@ export default {
   },
   methods: {
     handleChange(file, fileList) {
+      this.fileDbList = []
       this.fileList = fileList.slice(-3)
-      console.log(this.fileList)
+      for (var a of this.fileList) {
+        this.fileDbList.push({ name: a.name, url: 'http' + a.response.url })
+      }
+      var arr = []
+      for (var el of this.fileDbList) {
+        arr.push({ 'name': el.name, 'url': 'http' + el.response.url })
+      }
+      console.log(arr)
     },
     async bugListSelect() {
       await bugGetEnum().then(res => {

+ 4 - 2
src/views/Platform/defectManagement.vue

@@ -472,8 +472,10 @@ export default {
       for (var a of this.fileList) {
         this.fileDbList.push({ name: a.name, url: 'http' + a.response.url })
       }
-      this.form.accessory = this.fileDbList
-      console.log(this.fileDbList)
+      var arr = []
+      for (var el of this.fileDbList) {
+        arr.push({ 'name': el.name, 'url': el.response.url })
+      }
     },
 
     successFun() {

+ 6 - 11
src/views/Platform/presentation/ResultPageyL.vue

@@ -55,7 +55,7 @@
 
           <div class="marage">4、缺陷分析</div>
 
-          <el-table :data="tableData" border @cell-dblclick="celledit">
+          <el-table :data="tableData" border>
             <el-table-column prop="totalBug" label="bug总数" min-width="200" align="center" edit="false">
               <template slot-scope="scope">
                 <el-input v-if="scope.row.totalBug.edit" ref="totalBug" v-model="scope.row.totalBug.value" style="width: 100%" @blur="scope.row.totalBug.edit = false" />
@@ -174,7 +174,7 @@
 
           <div class="titleStyle">五. bug指标</div>
 
-          <el-table :data="tableData" border @cell-dblclick="celledit">
+          <el-table :data="tableData" border>
             <el-table-column prop="totalBug" label="bug总数" min-width="200" align="center" edit="false">
               <template slot-scope="scope">
                 <el-input v-if="scope.row.totalBug.edit" ref="totalBug" v-model="scope.row.totalBug.value" style="width: 100%" @blur="scope.row.totalBug.edit = false" />
@@ -267,7 +267,10 @@ export default {
       tableData: [],
       bugNum: {},
       status1: { color: 'green' },
-      fctResult: ''
+      fctResult: '',
+      moniterResult: '',
+      rqtResult: '',
+      safeResult: ''
     }
   },
   created() {
@@ -384,14 +387,6 @@ export default {
         }
       })
     },
-    // celledit(row, column, cell, event) {
-    //   if (row[column.property]) {
-    //     row[column.property].edit = true
-    //     setTimeout(() => {
-    //       this.$refs[column.property].focus()
-    //     }, 20)
-    //   }
-    // },
     download() {
       this.getPdf('resumeId', this.name)
     },

+ 257 - 177
src/views/Platform/workbench.vue

@@ -1,139 +1,156 @@
 <template>
   <!-- -------------------------- 待处理 ----------------------------- -->
+  <div class="bgColorSz">
+    <el-tabs v-model="activeName" class="abc" @tab-click="handleClick">
+      <el-tab-pane label="待处理" name="first">
+        <div class="titStyle">近期代办</div>
+        <div style="height:6em;margin: 1.5% 0% 0% 2%;">
+          <el-button v-show="show1" type="primary" class="itemName" size="small" plain @click="clickNum(1)">{{ oneData.name }}</el-button>
+          <el-button v-show="show2" type="primary" class="itemName" size="small" plain @click="clickNum(2)">{{ oneData1.name }}</el-button>
+          <el-button v-show="show3" type="primary" class="itemName" size="small" plain @click="clickNum(3)">{{ oneData2.name }}</el-button>
+          <el-button v-show="show1" style="margin-bottom:24px;" type="primary" size="mini" @click="clickNum(4)"> · · · </el-button>
+        </div>
+        <!-- <div style="height:6em;margin: 2%;">
+          <el-badge v-show="show1" :value="num1" class="item"><el-button type="primary" class="itemName" size="small" plain @click="clickNum(1)">{{ oneData.name }}</el-button></el-badge>
+          <el-badge v-show="show2" :value="num2" class="item"><el-button type="primary" class="itemName" size="small" plain @click="clickNum(2)">{{ oneData1.name }}</el-button></el-badge>
+          <el-badge v-show="show3" :value="num3" class="item"><el-button type="primary" class="itemName" size="small" plain @click="clickNum(3)">{{ oneData2.name }}</el-button></el-badge>
+          <el-badge v-show="show1" style="margin-bottom:24px;"><el-button type="primary" size="mini" @click="clickNum(4)"> · · · </el-button></el-badge>
+        </div> -->
+        <div style="background:#F2F3F6;padding: 1%;" />
+        <div style="height:50vh%; text-align:center; border-radius:8px;">
+          <div align="center" style="height:55vh;">
+            类型
+            <el-select v-model="bugOrTask1.isBugOrTask" size="medium" style="width: 13%;margin: 2% 5% 2% 1%;" clearable placeholder="类型" @change="getstatus(bugOrTask1.isBugOrTask)">
+              <el-option v-for="item in bugTask" :key="item.value" :label="item.name" :value="item.value" />
+            </el-select>
+            状态
+            <el-select v-model="bugOrTask1.status" size="medium" multiple collapse-tags style="width: 13%;margin: 2% 5% 2% 1%;" clearable placeholder="状态">
+              <el-option v-for="item in bugStatusStr1" :key="item.code" :label="item.name" :value="item.code" />
+            </el-select>
+            优先级
+            <el-select v-model="bugOrTask1.priority" size="medium" style="width: 13%;margin: 2% 5% 2% 1%;" clearable placeholder="优先级">
+              <el-option v-for="item in bugLevelStr" :key="item.code" :label="item.name" :value="item.code" />
+            </el-select>
+            主题 <el-input v-model="bugOrTask1.titles" size="medium" placeholder="主题" clearable style="width: 14%; margin: 2% 5% 2% 1%;" />
 
-  <div style="background:#F2F3F6">
-    <div style="background:#F2F3F6;font-size:0.9rem;margin: 0% 4% 0% 4%;">
-      <el-tabs v-model="activeName" @tab-click="handleClick">
-        <el-tab-pane label="待处理" name="first">
-          <div style="white-space:nowrap;margin:1% 0;"><img v-show="img" style="width:10px;height:10px;margin: 0 1% 0.45% 0" :src="imgUrl"><span class="titStyle">近期代办</span></div>
-          <div style="height:44em;">
-            <el-badge v-show="show1" :value="num1" class="item"><el-button type="primary" class="itemName" size="small" style="overflow: hidden; text-overflow:ellipsis;" plain @click="clickNum(1)">{{ oneData.name }}</el-button></el-badge>
-            <el-badge v-show="show2" :value="num2" class="item"><el-button type="primary" class="itemName" size="small" style="overflow: hidden; text-overflow:ellipsis;" plain @click="clickNum(2)">{{ oneData1.name }}</el-button></el-badge>
-            <el-badge v-show="show3" :value="num3" class="item"><el-button type="primary" class="itemName" size="small" style="overflow: hidden; text-overflow:ellipsis;" plain @click="clickNum(3)">{{ oneData2.name }}</el-button></el-badge>
-            <el-badge v-show="show1" style="margin-bottom:24px;"><el-button type="primary" size="small" @click="clickNum(4)"> 更 多 </el-button></el-badge>
-            <div align="center" style="background:#FFFFFF; height:60vh%; text-align:center; border-radius:8px;">
-              <div align="center" style="height:35em;">
-                类型
-                <el-select v-model="bugOrTask1.isBugOrTask" size="small" style="width: 13%;margin: 2% 5% 2% 1%;" clearable placeholder="类型" @change="getstatus(bugOrTask1.isBugOrTask)">
-                  <el-option v-for="item in bugTask" :key="item.value" :label="item.name" :value="item.value" />
-                </el-select>
-                状态
-                <el-select v-model="bugOrTask1.status" size="small" multiple collapse-tags style="width: 13%;margin: 2% 5% 2% 1%;" clearable placeholder="状态">
-                  <el-option v-for="item in bugStatusStr1" :key="item.code" :label="item.name" :value="item.code" />
-                </el-select>
-                优先级
-                <el-select v-model="bugOrTask1.priority" size="small" style="width: 13%;margin: 2% 5% 2% 1%;" clearable placeholder="优先级">
-                  <el-option v-for="item in bugLevelStr" :key="item.code" :label="item.name" :value="item.code" />
-                </el-select>
-                主题 <el-input v-model="bugOrTask1.title" size="small" placeholder="主题" clearable style="width: 14%;margin: 2% 5% 2% 1%;" />
+            <el-button type="primary" size="small" style="margin:2% 0%;" @click="clickQuery(bugOrTask1)">查询</el-button>
 
-                <el-button type="primary" size="small" style="margin:2% 0%;" @click="clickQuery(bugOrTask1)">查询</el-button>
-
-                <el-table v-if="bug" :data="tableType" border max-height="390" :header-cell-style="getRowClass" style="width:95%;" align="center" @row-click="clickQueryTableTask">
-                  <el-table-column type="index" label="序号" width="150" align="center" />
-                  <el-table-column label="类型" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.isBugOrTask }}</template></el-table-column>
-                  <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
-                  <el-table-column label="优先级" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.priorityName }}</template></el-table-column>
-                  <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.bugStatusName }}</el-tag></template></el-table-column>
-                  <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.gmtModify }}</template></el-table-column>
-                </el-table>
-                <el-table v-if="task" :data="tableType" border max-height="390" :header-cell-style="getRowClass" style="width: 95%" align="center" @row-click="clickQueryTableTask">
-                  <el-table-column type="index" label="序号" width="150" align="center" />
-                  <el-table-column label="类型" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.isBugOrTask }}</template></el-table-column>
-                  <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
-                  <el-table-column label="优先级" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
-                  <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
-                  <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
-                </el-table>
-              </div>
-            </div>
+            <el-table v-if="bug" :data="tableType" border max-height="335" :header-cell-style="getRowClass" style="width:95%;cursor:pointer" align="center" @row-click="clickQueryTableTask">
+              <el-table-column type="index" label="序号" width="150" align="center" />
+              <el-table-column label="类型" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.isBugOrTask }}</template></el-table-column>
+              <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
+              <el-table-column label="优先级" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.priorityName }}</template></el-table-column>
+              <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.bugStatusName }}</el-tag></template></el-table-column>
+              <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.gmtModify }}</template></el-table-column>
+            </el-table>
+            <el-table v-if="task" :data="tableType" border max-height="335" :header-cell-style="getRowClass" style="width: 95%;cursor:pointer" align="center" @row-click="clickQueryTableTask">
+              <el-table-column type="index" label="序号" width="150" align="center" />
+              <el-table-column label="类型" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.isBugOrTask }}</template></el-table-column>
+              <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+              <el-table-column label="优先级" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
+              <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
+              <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
+            </el-table>
           </div>
-        </el-tab-pane>
 
-        <!-- ------------------------- 工作统计 ------------------------------ -->
+        </div>
+      </el-tab-pane>
 
-        <el-tab-pane label="工作统计" name="second">
-          <div style="white-space:nowrap;margin:1% 0;"><img v-show="img" style="width:10px;height:10px;margin: 0 1% 0.45% 0" :src="imgUrl"><span class="titStyle">本周统计</span></div>
-          <div style="height:44em;">
-            <el-badge :value="HashSet" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(1)">任务进行中</el-button></el-badge>
-            <el-badge :value="HashSet1" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(2)">任务已上线</el-button></el-badge>
-            <el-badge :value="Vector" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(3)">bug待解决</el-button></el-badge>
-            <el-badge :value="Vector1" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(4)">bug已解决</el-button></el-badge>
+      <!-- ------------------------- 工作统计 ------------------------------ -->
 
-            <div style="background:#FFFFFF; height:60vh%; text-align:center; border-radius:8px;">
-              <div style="white-space:nowrap; padding: 0 2.5%;">
-                时间
-                <el-date-picker v-model="bugOrTask.value2" size="small" style="margin: 2% 6% 2% 1%;" type="datetimerange" :picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right" />
-                类型
-                <el-select v-model="bugOrTask.isBugOrTask" size="small" style="width: 13%;  margin: 2% 6% 2% 1%;" clearable placeholder="类型" @change="Setstatus(bugOrTask.isBugOrTask)">
-                  <el-option v-for="item in bugTask" :key="item.value" :label="item.name" :value="item.value" />
-                </el-select>
-                状态
-                <el-select v-model="bugOrTask.status" size="small" style="width: 13%;margin: 2% 6% 2% 1%;" clearable placeholder="状态">
-                  <el-option v-for="item in bugStatusStr" :key="item.value" :label="item.name" :value="item.value" />
-                </el-select>
-                <el-button type="primary" size="small" @click="clickQueryTaskAndBug(bugOrTask)">查询</el-button>
-              </div>
-              <div align="center" style="height:30em;">
-                <el-table v-if="taskShow" :data="tableData" :header-cell-style="getRowClass" border max-height="390" style="width: 95%" align="center" @row-click="clickQueryTableTask">
-                  <el-table-column type="index" label="序号" width="150" align="center" />
-                  <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
-                  <el-table-column label="类型" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.isBugOrTask }}</template></el-table-column>
-                  <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
-                  <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
-                </el-table>
+      <el-tab-pane label="工作统计" name="second">
+        <div style="white-space:nowrap;"><img v-show="img" style="width:10px;height:10px;margin: 0 1% 0.45% 0" :src="imgUrl"><span class="titStyle">本周统计</span></div>
+        <div style=" margin: 2% 0 0 2%;">
+          <el-badge :value="HashSet" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(1)">任务进行中</el-button></el-badge>
+          <el-badge :value="HashSet1" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(2)">任务已上线</el-button></el-badge>
+          <el-badge :value="Vector" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(3)">bug待解决</el-button></el-badge>
+          <el-badge :value="Vector1" class="item"><el-button type="primary" class="itemName" size="small" plain @click="queryClickTable(4)">bug已解决</el-button></el-badge>
+        </div>
+        <div style="height:55vh; text-align:center;">
+          <div style="white-space:nowrap; padding: 0 2.5%;">
+            时间
+            <el-date-picker v-model="bugOrTask.value2" size="medium" style="margin: 2% 6% 2% 1%;" type="datetimerange" :picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right" />
+            类型
+            <el-select v-model="bugOrTask.isBugOrTask" size="medium" style="width: 13%;  margin: 2% 6% 2% 1%;" clearable placeholder="类型" @change="Setstatus(bugOrTask.isBugOrTask)">
+              <el-option v-for="item in bugTask" :key="item.value" :label="item.name" :value="item.value" />
+            </el-select>
+            状态
+            <el-select v-model="bugOrTask.status" size="medium" multiple collapse-tags style="width: 13%;margin: 2% 6% 2% 1%;" clearable placeholder="状态">
+              <el-option v-for="item in bugStatusStr" :key="item.code" :label="item.name" :value="item.code" />
+            </el-select>
+            <el-button type="primary" size="small" @click="clickQueryTaskAndBug(bugOrTask)">查询</el-button>
+          </div>
+          <div align="center" style="height:auto;">
+            <el-table v-if="taskShow" :data="tableData" :header-cell-style="getRowClass" border max-height="335" style="width: 95%;cursor:pointer" align="center" @row-click="clickQueryTableTask">
+              <el-table-column type="index" label="序号" width="150" align="center" />
+              <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+              <el-table-column label="类型" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.isBugOrTask }}</template></el-table-column>
+              <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
+              <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
+            </el-table>
 
-                <el-table v-if="bugShow" :data="tableData" :header-cell-style="getRowClass" border max-height="390" style="width: 95%" align="center" @row-click="clickQueryTableTask">
-                  <el-table-column type="index" label="序号" width="150" align="center" />
-                  <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
-                  <el-table-column label="进展" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.stageName }}</template></el-table-column>
-                  <el-table-column label="优先级" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.priorityName }}</template></el-table-column>
-                  <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.bugStatusName }}</el-tag></template></el-table-column>
-                  <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.gmtModify }}</template></el-table-column>
-                </el-table>
-              </div>
-            </div>
+            <el-table v-if="bugShow" :data="tableData" :header-cell-style="getRowClass" border max-height="335" style="width: 95%;cursor:pointer" align="center" @row-click="clickQueryTableTask">
+              <el-table-column type="index" label="序号" width="150" align="center" />
+              <el-table-column label="主题" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
+              <el-table-column label="进展" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.stageName }}</template></el-table-column>
+              <el-table-column label="优先级" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.priorityName }}</template></el-table-column>
+              <el-table-column label="状态" min-width="100" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.bugStatusName }}</el-tag></template></el-table-column>
+              <el-table-column label="最近更新时间" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.gmtModify }}</template></el-table-column>
+            </el-table>
           </div>
-        </el-tab-pane>
-      </el-tabs>
+        </div>
+      </el-tab-pane>
+    </el-tabs>
+
+    <!-- 项目展示 -->
+    <el-dialog tltle="详情" :visible.sync="dialogTableVisible" width="70%">
+      <el-table :data="gridData" max-height="390" style="cursor:pointer" @row-click="clickQueryTable">
+        <el-table-column type="index" label="序号" min-width="120" align="center" />
+        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+        <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
+        <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
+        <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
+        <el-table-column label="最近更新时间" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
+      </el-table>
+    </el-dialog>
 
-      <!-- 项目展示 -->
-      <el-dialog tltle="详情" :visible.sync="dialogTableVisible" width="70%">
-        <el-table :data="gridData" max-height="390" @row-click="clickQueryTable">
-          <el-table-column type="index" label="序号" min-width="120" align="center" />
-          <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
-          <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
-          <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
-          <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
-          <el-table-column label="最近更新时间" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
-        </el-table>
-      </el-dialog>
+    <!-- 项目转任务 -->
+    <el-dialog tltle="详情" :visible.sync="dialogTableVisible0" width="70%">
+      <el-table :data="gridData3" max-height="390" style="cursor:pointer" @row-click="clickQueryTable1">
+        <el-table-column type="index" label="序号" min-width="120" align="center" />
+        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+        <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
+        <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
+        <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
+        <el-table-column label="最近更新时间" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
+      </el-table>
+    </el-dialog>
 
-      <!-- 任务展示 -->
-      <el-dialog tltle="详情" :visible.sync="dialogTableVisible1" width="70%">
-        <el-table :data="gridData1" max-height="390" :header-cell-style="getRowClass" @row-click="clickQueryTable2">
-          <el-table-column type="index" label="序号" min-width="120" align="center" />
-          <el-table-column label="平台类型" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.typeString }}</template></el-table-column>
-          <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
-          <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
-          <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
-          <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
-          <el-table-column label="最近更新时间" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
-        </el-table>
-      </el-dialog>
+    <!-- 任务展示 -->
+    <el-dialog tltle="详情" :visible.sync="dialogTableVisible1" width="70%">
+      <el-table :data="gridData1" max-height="390" style="cursor:pointer" :header-cell-style="getRowClass" @row-click="clickQueryTable2">
+        <el-table-column type="index" label="序号" min-width="120" align="center" />
+        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+        <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
+        <el-table-column label="平台类型" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.typeString }}</template></el-table-column>
+        <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
+        <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
+        <el-table-column label="最近更新时间" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.modifyTime }}</template></el-table-column>
+      </el-table>
+    </el-dialog>
+
+    <!-- 缺陷展示 -->
+    <el-dialog tltle="详情" :visible.sync="dialogTableVisibleTow" width="70%">
+      <el-table :data="gridData2" max-height="390" style="cursor:pointer" :header-cell-style="getRowClass" @row-click="clickQueryTable3">
+        <el-table-column type="index" label="序号" min-width="120" align="center" />
+        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
+        <el-table-column label="类型" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.bugTypeName }}</template></el-table-column>
+        <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityName }}</template></el-table-column>
+        <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.bugStatusName }}</el-tag></template></el-table-column>
+        <el-table-column label="最近更新时间" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.gmtModify }}</template></el-table-column>
+      </el-table>
+    </el-dialog>
 
-      <!-- 缺陷展示 -->
-      <el-dialog tltle="详情" :visible.sync="dialogTableVisibleTow" width="70%">
-        <el-table :data="gridData2" max-height="390" :header-cell-style="getRowClass" @row-click="clickQueryTable3">
-          <el-table-column type="index" label="序号" min-width="120" align="center" />
-          <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
-          <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stage }}</template></el-table-column>
-          <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priority }}</template></el-table-column>
-          <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.status }}</el-tag></template></el-table-column>
-          <el-table-column label="最近更新时间" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.gmtModify }}</template></el-table-column>
-        </el-table>
-      </el-dialog>
-    </div>
   </div>
 </template>
 <script>
@@ -152,6 +169,7 @@ export default {
       bizJson: localStorage.getItem('key'),
       dialogTableVisible: false,
       dialogTableVisible1: false,
+      dialogTableVisible0: false,
       dialogTableVisibleTow: false,
       img: false,
       clievent: '{ background:#409EFF; color: #FFFFFF;}',
@@ -173,6 +191,7 @@ export default {
       gridData: [],
       gridData1: [],
       gridData2: [],
+      gridData3: [],
       isBugOrTask: '',
       oneData: {},
       oneData1: {},
@@ -181,9 +200,6 @@ export default {
       show1: false,
       show2: false,
       show3: false,
-      num1: '',
-      num2: '',
-      num3: '',
       task: true,
       bug: false,
       bugShow: false,
@@ -192,29 +208,33 @@ export default {
       HashSet1: '',
       Vector: '',
       Vector1: '',
+      selectData: '',
       pickerOptions: {
         shortcuts: [{
           text: '最近一周',
           onClick(picker) {
+            localStorage.setItem('selectData', 0)
             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) {
+            localStorage.setItem('selectData', 1)
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+            picker.$emit('pick', [start, end])
+          }
         }]
       }
     }
   },
   created() {
     this.getTopShowData()
+    this.Setstatus(1)
   },
   methods: {
     // 待处理  list
@@ -224,24 +244,24 @@ export default {
         if (res.code === 200) {
           if (res.data.list[0]) {
             this.oneData = res.data.list[0]
-            this.num1 = res.data.list[0].taskCount
+            // this.num1 = res.data.list[0].taskCount
             this.show1 = true
           }
           if (res.data.list[1]) {
             this.oneData1 = res.data.list[1]
-            this.num2 = res.data.list[1].taskCount
+            // this.num2 = res.data.list[1].taskCount
             this.show2 = true
           }
           if (res.data.list[2]) {
             this.oneData2 = res.data.list[2]
-            this.num3 = res.data.list[2].taskCount
+            // this.num3 = res.data.list[2].taskCount
             this.show3 = true
           }
-          if (this.num1 + this.num2 + this.num3 === 0) {
-            this.img = false
-          } else {
-            this.img = true
-          }
+          // if (this.num1 + this.num2 + this.num3 === 0) {
+          //   this.img = false
+          // } else {
+          //   this.img = true
+          // }
           this.oneData3 = res.data.list
         }
       })
@@ -259,38 +279,46 @@ export default {
       switch (e) {
         case 1:
           this.gridData = this.oneData.taskInfoDOList
+          this.dialogTableVisible = true
           break
         case 2:
           this.gridData = this.oneData1.taskInfoDOList
+          this.dialogTableVisible = true
           break
         case 3:
           this.gridData = this.oneData2.taskInfoDOList
+          this.dialogTableVisible = true
           break
         case 4:
-          this.gridData = this.oneData3
+          this.gridData3 = this.oneData3
+          this.dialogTableVisible0 = true
       }
-      this.dialogTableVisible = true
     },
 
     // 待处理 查询
     clickQuery(e) {
-      console.log(e)
+      e.status === '' ? e.status = [] : ''
       if (e.isBugOrTask === 0 || e.isBugOrTask === 1) {
         this.isBugOrTask = e.isBugOrTask
         this.userName = e
         this.userName.status = e.status
         this.userName.bizId = this.bizJson
         this.userName.handlerPerson = this.userInformation
-        this.userName.title = e.title
+        this.userName.title = e.titles
         personalworkstationQueryBackLogBugAndTask(this.userName).then(res => {
-          res.data.taskInfoList === null ? this.total = res.data.bugBaseInfoList.list.length : this.total = res.data.taskInfoList.length
-          res.data.taskInfoList === null ? this.tableType = res.data.bugBaseInfoList.list : this.tableType = res.data.taskInfoList
-          res.data.taskInfoList === null ? this.task = false : this.task = true
-          res.data.bugBaseInfoList === null ? this.bug = false : this.bug = true
+          if (e.isBugOrTask === 0) {
+            res.data.bugBaseInfoList.list === null ? this.total = 0 : this.total = res.data.bugBaseInfoList.list.length
+            res.data.bugBaseInfoList.list === null ? this.tableType = [] : this.tableType = res.data.bugBaseInfoList.list
+          }
+          if (e.isBugOrTask === 1) {
+            res.data.taskInfoList === null ? this.total = 0 : this.total = res.data.taskInfoList.length
+            res.data.taskInfoList === null ? this.tableType = [] : this.tableType = res.data.taskInfoList
+          }
           for (var a of this.tableType) {
-            e.isBugOrTask === 0 ? this.isBugOrTask = '缺陷' : this.isBugOrTask = '任务'
-            a.isBugOrTask = this.isBugOrTask
+            e.isBugOrTask === 1 ? a.isBugOrTask = '任务' : a.isBugOrTask = '缺陷'
           }
+          res.data.taskInfoList === null ? this.task = false : this.task = true
+          res.data.bugBaseInfoList === null ? this.bug = false : this.bug = true
         })
       } else {
         this.$message({ message: '请选择类型', type: 'success', center: true })
@@ -299,15 +327,16 @@ export default {
 
     // 待处理的缺陷和任务切换
     getstatus(e) {
+      this.$set(this.bugOrTask1, 'status', '')
       this.tableType = []
       this.Informationen.isBugOrTask = e
       this.Informationen.bizId = this.bizJson
       this.Informationen.handlerPerson = this.userInformation
       personalworkstationQueryStatusAndPriority(this.Informationen).then(res => {
-        var statusList = res.data.statusList
+        var backLogStatusList = res.data.backLogStatusList
         var arr = []
-        for (var a in statusList) {
-          arr.push({ 'code': a, 'name': statusList[a] })
+        for (var a in backLogStatusList) {
+          arr.push({ 'code': a, 'name': backLogStatusList[a] })
         }
         var priorityList = res.data.priorityList
         var brr = []
@@ -322,8 +351,9 @@ export default {
     // 工作统计全局list
     handleClick(tab) {
       this.total = 0
+      this.$set(this.bugOrTask, 'isBugOrTask', 1)
       if (tab.label === '工作统计') {
-        this.userName = { bizId: this.bizJson, handlerPerson: this.userInformation, timeType: 1 }
+        this.userName = { bizId: this.bizJson, handlerPerson: this.userInformation, timeType: 0 }
         personalworkstationQueryPeriodBugAndTask(this.userName).then(res => {
           this.HashSet = res.data.taskInfoDoingList.length
           this.HashSetArray = res.data.taskInfoDoingList
@@ -360,25 +390,31 @@ export default {
 
     // 工作统计查询
     clickQueryTaskAndBug(e) {
+      this.selectData = localStorage.getItem('selectData')
+      if (this.selectData === null) {
+        this.selectData = 2
+      }
+      e.status === '' ? e.status = [] : ''
       this.isBugOrTask = e.isBugOrTask
       if (e.value2) {
         if (e.value2 !== '') {
           var obj = {
             bizId: this.bizJson,
-            timeType: 0,
-            // status: e.status,
+            timeType: this.selectData,
+            status: e.status,
             isBugOrTask: e.isBugOrTask,
             startTime: e.value2[0],
             endTime: e.value2[1],
             handlerPerson: this.userInformation
           }
           personalworkstationQueryPeriodBugAndTask(obj).then(res => {
+            localStorage.removeItem('selectData')
             if (obj.isBugOrTask === 0) {
-              this.tableData = res.data.bugBaseInfoDoingList
+              this.tableData = res.data.bugBaseInfoList.list
               this.bugShow = true
               this.taskShow = false
             } else {
-              this.tableData = res.data.taskInfoDoingList
+              this.tableData = res.data.taskInfoList
               this.bugShow = false
               this.taskShow = true
             }
@@ -397,58 +433,102 @@ export default {
 
     // 工作统计状态切换
     Setstatus(e) {
+      this.$set(this.bugOrTask, 'status', '')
+      this.Informationen.isBugOrTask = e
+      this.Informationen.bizId = this.bizJson
+      this.Informationen.handlerPerson = this.userInformation
+      personalworkstationQueryStatusAndPriority(this.Informationen).then(res => {
+        if (res.code === 200) {
+          var periodStatusList = res.data.periodStatusList
+          var arr = []
+          for (var a in periodStatusList) {
+            arr.push({ 'code': a, 'name': periodStatusList[a] })
+          }
+          this.bugStatusStr = arr
+        // e === 0 ? this.bugStatusStr = arr : this.bugStatusStr = brr
+        }
+      })
       e === 1 ? this.tableData.isBugOrTask = '任务' : this.tableData.isBugOrTask = '缺陷'
-      e === 0 ? this.bugStatusStr = this.bugStatus : this.bugStatusStr = this.taskStatus
     },
 
+    clickQueryTable1(e) {
+      this.$router.push({ path: '/Platform/presentation/projectQuery', query: { id: e.id }})
+    },
     clickQueryTable(e) {
-      this.$router.push({ path: '/Platform/presentation/projectQuery', query: { id: e.projectId }})
+      this.$router.push({ path: '/Platform/presentation/taskQuery', query: { id: e.id }})
     },
     clickQueryTable2(e) {
       this.$router.push({ path: '/Platform/presentation/taskQuery', query: { id: e.id }})
     },
     clickQueryTable3(e) {
-      // this.$router.push({ path: '/Platform/presentation/defectManageQuery', query: { id: e.id }})
+      this.$router.push({ path: '/Platform/defectManagement/bugQuery', query: { id: e.id }})
     },
     clickQueryTableTask(e) {
       if (e.isBugOrTask === '任务') {
         this.$router.push({ path: '/Platform/presentation/taskQuery', query: { id: e.id }})
       }
       if (e.isBugOrTask === '缺陷') {
-        // this.$router.push({ path: '/Platform/presentation/defectManageQuery', query: { id: e.id }})
+        this.$router.push({ path: '/Platform/defectManagement/bugQuery', query: { id: e.id }})
       }
     }
   }
 }
 </script>
+<style lang="scss">
+  .abc .el-tabs__nav-wrap::after {
+    background-color:#FFFFFF !important;
+  }
+  .el-tabs__nav-scroll {
+    padding: 1% 2% !important;
+  }
+  .item .el-badge__content.is-fixed {
+    right: 50px;
+  }
+</style>
 <style scoped>
-  .titStyle {
-    font-size:25px;
-    color: #333B4A;
-    font-weight:bold;
-    padding:1% 0;
+  .abc {
+    background:#FFFFFF;
+    border-radius:8px;
+    margin: 0 3%;
+    width: 100%;
   }
 
-  .item {
-  margin-top: 0.625em;
-  margin-right: 2.5em;
+  .titStyle {
+    font-size: 20px;
+    color: #333B4A;
+    font-weight: bold;
+    margin-left: 2%;
   }
 
-.item1 {
-  margin-top: 0.3em;
-  margin-right: 0.4em;
+  .bgColorSz {
+    width: 100%;
+    height: 96vh;
+    background: #F2F3F6;
+    font-size: 0.9rem;
+    display: flex;
+    justify-content: center;
+    align-items: center;
   }
 
 .itemName {
-  width: 8.875em;
+  margin-right: 2.5em;
+  width: 13em;
   height: 3.25em;
   font-size: 1em;
   border: 1px solid #BFC6DC;
   border-radius:  0.25em;
   background: #FFFFFF;
   color:#6F7C93;
-  margin-bottom: 25%;
+  margin-bottom: 24%;
+  overflow: hidden;
+  text-overflow:ellipsis;
   }
+
+  .item {
+  margin-top: 10px;
+  margin-right: 4%;
+}
+
 .itemName:hover {
     background:#409EFF;
     color: #FFFFFF;

+ 11 - 7
src/views/home/index.vue

@@ -14,7 +14,7 @@
       <el-menu-item index="3">数据中心</el-menu-item>
       <el-menu-item index="4">流程管控</el-menu-item>
       <el-menu-item index="5" disabled>自动化</el-menu-item>
-      <el-menu-item index="6" disabled>虚拟硬件</el-menu-item>
+      <el-menu-item index="6">虚拟硬件</el-menu-item>
       <div class="div-login">
         <svg-icon icon-class="yonghu" />
         <el-dropdown style="color: #ffffff" @command="handleCommand">
@@ -72,21 +72,22 @@
         <div class="div-module-introduction">数据构造、统计、备份、分析</div>
       </el-card>
       <br>
-      <el-card style="margin-left: 0;margin-top: 36pt;" @click.native="handleSelect('4')">
+      <el-card shadow="hover" @click.native="handleSelect('4')">
         <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_流程管控@3x.png">
         <div class="div-title">流程管控</div>
         <div class="div-module-introduction">简单、明了、一站式流程管理</div>
       </el-card>
+      <el-card shadow="hover" @click.native="handleSelect('6')">
+        <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_虚拟硬件@3x.png">
+        <div class="div-title">虚拟硬件</div>
+        <div class="div-module-introduction">设备一键生成,自由管控</div>
+      </el-card>
       <el-card class="expect" shadow="never" @click.native="handleSelect('5')">
         <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_自动化未上线@3x.png">
         <div class="div-title" style="color: #999999">自动化-敬请期待</div>
         <div class="div-module-introduction">简洁优雅实现自动化</div>
       </el-card>
-      <el-card class="expect" shadow="never" @click.native="handleSelect('6')">
-        <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_虚拟硬件未上线@3x.png">
-        <div class="div-title" style="color: #999999">虚拟硬件-敬请期待</div>
-        <div class="div-module-introduction">设备一键生成,自由管控</div>
-      </el-card>
+
     </div>
     <div style="height: 180pt;width 100%;background-color: #1B2341;">
       <div class="div-footer1" style="margin-top: 45pt;margin-left: 165pt;">
@@ -313,6 +314,9 @@ export default {
           break
         case '4' :
           this.$router.push({ name: 'workbench' })
+          break
+        case '6' :
+          this.$router.push({ name: '电单车' })
       }
     },
     handleScroll() {

+ 156 - 52
src/views/mock/httpmock.vue

@@ -5,12 +5,12 @@
         <el-input v-model="listQuery.id" placeholder="接口ID" style="width: 80px;" class="filter-item" @keyup.enter.native="handleFilter" />
         <el-input v-model="listQuery.customName" placeholder="接口名称" style="width: 150px;" class="filter-item" @keyup.enter.native="handleFilter" />
         <el-input v-model="listQuery.url" placeholder="url" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter" />
-        <!-- <el-select v-model="listQuery.method" placeholder="method" style="width: 100px;" class="filter-item" filterable clearable @change="getMethod(listQuery.method)">
-          <el-option v-for="item in envMethod" :key="item.str" :label="item.str" :value="item.str" />
-        </el-select> -->
-        <el-select v-model="listQuery.returnDataTypeStr" placeholder="返回值data类型" style="width: 200px;" class="filter-item" filterable clearable @change="getDataType(listQuery.returnDataType)">
-          <el-option v-for="item in envSelectDataType" :key="item.code" :label="item.msg" :value="item.code" />
-        </el-select>
+        <!--<el-select v-model="listQuery.method" placeholder="method" style="width: 100px;" class="filter-item" filterable clearable @change="getMethod(listQuery.method)">-->
+        <!--<el-option v-for="item in envMethod" :key="item.str" :label="item.str" :value="item.str" />-->
+        <!--</el-select>-->
+        <!--<el-select v-model="listQuery.returnDataTypeStr" placeholder="返回值data类型" style="width: 200px;" class="filter-item" filterable clearable @change="getDataType(listQuery.returnDataType)">-->
+        <!--<el-option v-for="item in envSelectDataType" :key="item.code" :label="item.msg" :value="item.code" />-->
+        <!--</el-select>-->
         <el-select v-model="listQuery.status" placeholder="状态" style="width: 100px;" class="filter-item" filterable clearable>
           <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
@@ -34,12 +34,12 @@
       <el-table-column label="mockURL" min-width="180px" align="center">
         <template slot-scope="scope"><span>{{ scope.row.mockUrl }}</span></template>
       </el-table-column>
-      <!-- <el-table-column label="method" min-min-width="60px">
-        <template slot-scope="{row}"><span>{{ row.method }}</span></template>
-      </el-table-column> -->
-      <el-table-column label="返回值data类型" min-width="110px" align="center">
-        <template slot-scope="scope"><span>{{ scope.row.returnDataTypeStr }}</span></template>
-      </el-table-column>
+      <!--<el-table-column label="method" min-min-width="60px">-->
+      <!--<template slot-scope="{row}"><span>{{ row.method }}</span></template>-->
+      <!--</el-table-column>-->
+      <!--<el-table-column label="返回值data类型" min-width="110px" align="center">-->
+      <!--<template slot-scope="scope"><span>{{ scope.row.returnDataTypeStr }}</span></template>-->
+      <!--</el-table-column>-->
       <el-table-column label="状态" class-name="status-col" min-width="100">
         <template slot-scope="{row}"><el-tag :type="row.status | statusFilter">{{ statusMaps.get(row.status) }}</el-tag></template>
       </el-table-column>
@@ -55,45 +55,57 @@
       <el-table-column v-if="showReviewer" label="备注" min-width="110px" align="center">
         <template slot-scope="scope"><span style="color:red;">{{ scope.row.remark }}</span></template>
       </el-table-column>
-      <el-table-column label="操作" align="center" min-width="370px" class-name="small-padding fixed-width" fixed="right">
+      <el-table-column label="操作" align="center" min-width="410" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="{row}">
           <el-button type="primary" size="mini" @click="handleCheck(row)">查看</el-button>
           <el-button type="primary" size="mini" @click="handleUpdate(row)">编辑</el-button>
           <el-button type="primary" size="mini" @click="handleCopy(row)">复制</el-button>
           <el-button v-if="row.status!=1" size="mini" type="success" @click="handleModifyStatus(row, 1)">开启</el-button>
           <el-button v-if="row.status!=0" size="mini" type="danger" @click="handleModifyStatus(row, 0)">关闭</el-button>
-          <el-button type="primary" size="mini" @click="redirectTo(row.id, row.customName, methodProtocol)">规则 >></el-button>
+          <el-button type="primary" style="width:auto;" size="mini" @click="redirectTo(row.id, row.customName, methodProtocol)">mock结果 >></el-button>
         </template>
       </el-table-column>
     </el-table>
     <pagination v-show="total>0" :total="total" :page.sync="listQuery.curIndex" :limit.sync="listQuery.pageSize" @pagination="getList" />
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="65%">
-      <el-form ref="serviceDataForms" :rules="serviceDataRules" :model="serviceData" label-position="left" label-width="120px" style="width: 500px; margin-left:80px;">
+      <el-form ref="serviceDataForms" :rules="checkRequest" :model="serviceData" label-position="left" label-width="120px" style="width: 500px; margin-left:80px;">
         <el-form-item label="接口名称" prop="customName">
           <el-input v-model="serviceData.customName" :disabled="shouldShow" placeholder="接口名称" />
         </el-form-item>
         <el-form-item label="url" prop="url">
-          <el-input v-model="serviceData.url" :disabled="shouldShow" placeholder="url" />
+          <el-input v-model="serviceData.url" :disabled="shouldShow" placeholder="/getUserinfo" />
         </el-form-item>
-        <!-- <el-form-item label="method" prop="method">
-          <el-select v-model="serviceData.method" :disabled="shouldShow" class="filter-item" filterable clearable placeholder="method">
-            <el-option v-for="item in envMethod" :key="item.str" :label="item.str" :value="item.str" />
-          </el-select>
-        </el-form-item> -->
-        <el-form-item label="返回值data类型" prop="returnDataType">
-          <el-select v-model="serviceData.returnDataTypeStr" :disabled="shouldShow" class="filter-item" filterable clearable placeholder="data类型">
-            <el-option v-for="item in envSelectDataType" :key="item.code" :label="item.msg" :value="item.code" />
-          </el-select>
+        <!--<el-form-item label="method" prop="method">-->
+        <!--<el-select v-model="serviceData.method" :disabled="shouldShow" class="filter-item" filterable clearable placeholder="method">-->
+        <!--<el-option v-for="item in envMethod" :key="item.str" :label="item.str" :value="item.str" />-->
+        <!--</el-select>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item label="返回值data类型" prop="returnDataType">-->
+        <!--<el-select v-model="serviceData.returnDataTypeStr" :disabled="shouldShow" class="filter-item" filterable clearable placeholder="data类型">-->
+        <!--<el-option v-for="item in envSelectDataType" :key="item.code" :label="item.msg" :value="item.code" />-->
+        <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-form-item label="请求转发" prop="forWard">
+          <el-switch
+            v-model="serviceData.requestForWard"
+            @change="showTrueUrl"
+          />
         </el-form-item>
-        <el-form-item label="真实服务url" prop="actualUrl">
-          <el-input v-model="serviceData.actualUrl" :disabled="shouldShow" placeholder="真实服务url" />
+        <el-form-item v-show="trueUrl" label="真实服务url" prop="actualUrl">
+          <el-input v-model="serviceData.actualUrl" :disabled="shouldShow" placeholder="http://10.179.1.22:8089" />
         </el-form-item>
       </el-form>
-      <span class="showBtn" @mouseover="explain" @mouseout="explain">配置指南</span>
-      <div v-if="showexplain" class="showInfo">
-        <div class="showZm" />
-        <div class="showInfo">配置指南</div>
-      </div>
+      <span class="showBtn">
+        <a href="http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=213729138#id-11%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C-11%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C-%E4%B8%80%E3%80%81%E6%8E%A5%E5%85%A5httpmock" target="_blank">配置指南
+        </a>
+      </span>
+      <!--<div v-if="showexplain" class="showInfo">-->
+      <!--<div class="showZm" />-->
+      <!--<div class="showInfo">-->
+      <!--<a href="http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=213729138#id-11%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C-11%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C-%E4%B8%80%E3%80%81%E6%8E%A5%E5%85%A5httpmock" target="_blank">配置指南-->
+      <!--</a>-->
+      <!--</div>-->
+      <!--</div>-->
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
         <el-button v-if="showSubmitBtn" type="primary" @click="dialogStatus==='create'?createData(serviceData):updateData(serviceData)">确定</el-button>
@@ -164,7 +176,8 @@ export default {
         curIndex: 1,
         pageSize: 20,
         sort: '+id',
-        id: null
+        id: null,
+        redirect: ''
       },
       importanceOptions: [1, 2, 3],
       envSelectDataType: [],
@@ -197,7 +210,10 @@ export default {
         id: '',
         status: 1,
         actualUrl: '',
-        creator: ''
+        creator: '',
+        ruleDesc: '',
+        redirect: '',
+        requestForWard: false
       },
       serviceDataExt: {
         id: 0
@@ -215,7 +231,23 @@ export default {
         url: [{ required: true, message: 'url不能为空', trigger: 'change' }],
         method: [{ required: true, message: 'method不能为空', trigger: 'change' }]
       },
-      downloadLoading: false
+      downloadLoading: false,
+      trueUrl: false,
+      serviceRequestFoward: {
+        customName: [{ required: true, message: '接口名称不能为空', trigger: 'change' }],
+        url: [{ required: true, message: 'url不能为空', trigger: 'change' }],
+        method: [{ required: true, message: 'method不能为空', trigger: 'change' }],
+        actualUrl: [{ required: true, message: '真实服务url不能为空', trigger: 'change' }]
+      }
+    }
+  },
+  computed: {
+    checkRequest: function() {
+      if (this.serviceData.requestForWard) {
+        return this.serviceRequestFoward
+      } else {
+        return this.serviceDataRules
+      }
     }
   },
   created() {
@@ -233,13 +265,13 @@ export default {
         this.listLoading = false
       })
     },
-    explain() {
-      if (this.showexplain === false) {
-        this.showexplain = true
-      } else {
-        this.showexplain = false
-      }
-    },
+    // explain() {
+    //   if (this.showexplain === false) {
+    //     this.showexplain = true
+    //   } else {
+    //     this.showexplain = false
+    //   }
+    // },
     // 获取method方法
     mockGetMethod() {
       this.envMethod = []
@@ -314,7 +346,9 @@ export default {
         id: '',
         status: 1,
         actualUrl: '',
-        creator: ''
+        creator: '',
+        ruleDesc: '',
+        requestForWard: false
       }
     },
     // hearder新增时调用
@@ -324,6 +358,8 @@ export default {
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
       this.showSubmitBtn = true
+      this.serviceData.requestForWard = false
+      this.trueUrl = false
       this.$nextTick(() => {
         this.$refs['serviceDataForms'].clearValidate()
       })
@@ -334,7 +370,8 @@ export default {
         if (valid) {
           this.serviceData = ele
           this.serviceData.id = ''
-          this.serviceData.returnDataType === '' ? this.serviceData.returnDataType = '512' : this.serviceData.returnDataType = ele.returnDataTypeStr
+          this.serviceData.returnDataType === 512
+          if (this.serviceData.requestForWard) { this.serviceData.redirect = 1 } else { this.serviceData.redirect = 0 }
           createService(this.serviceData).then(response => {
             if (response.code === 200) {
               this.dialogFormVisible = false
@@ -349,19 +386,50 @@ export default {
     },
     // 编辑
     handleUpdate(row) {
-      this.serviceData = row
+      var queryData = {
+        id: row.id,
+        url: row.url,
+        customName: row.customName,
+        returnDataType: '512',
+        actualUrl: row.actualUrl,
+        creator: row.creator,
+        method: row.method,
+        // returnDataTypeStr: row.returnDataTypeStr,
+        mockUrl: row.mockUrl,
+        redirect: row.redirect
+      }
+      var rowList = row
       this.shouldShow = false
-      this.dialogStatus = 'update'
-      this.dialogFormVisible = true
-      this.showSubmitBtn = true
-      this.$nextTick(() => {
-        this.$refs['serviceDataForms'].clearValidate()
+      updateService(queryData).then(response => {
+        if (response.data) {
+          this.serviceData.id = rowList.id
+          this.serviceData.url = rowList.url
+          this.serviceData.customName = rowList.customName
+          this.serviceData.returnDataType = rowList.returnDataType
+          this.serviceData.status = rowList.status
+          this.serviceData.actualUrl = rowList.actualUrl
+          this.serviceData.creator = rowList.creator
+          this.serviceData.method = rowList.method
+          this.serviceData.returnDataTypeStr = rowList.returnDataTypeStr
+          this.serviceData.mockUrl = rowList.mockUrl
+          this.serviceData.redirect = row.redirect
+          if (this.serviceData.redirect === 1) { this.serviceData.requestForWard = true } else { this.serviceData.requestForWard = false }
+          this.serviceData.actualUrl = row.actualUrl
+          this.showTrueUrl()
+          this.dialogStatus = 'update'
+          this.dialogFormVisible = true
+          this.showSubmitBtn = true
+          this.requestForWard = false
+          this.$nextTick(() => {
+            this.$refs['serviceDataForms'].clearValidate()
+          })
+        }
       })
     },
     // 查看
     handleCheck(row) {
       this.shouldShow = true
-      this.serviceData = row
+      // this.serviceData = row
       // var queryData = { id: row.id }
       // fetchServiceList(queryData).then(response => {
       // var rowData = response.data.mockMethodList
@@ -376,9 +444,16 @@ export default {
       // this.serviceData.method = row.method
       // this.serviceData.returnDataTypeStr = row.returnDataTypeStr
       // this.serviceData.mockUrl = row.mockUrl
+      this.serviceData.customName = row.customName
       this.dialogStatus = 'update'
       this.dialogFormVisible = true
       this.showSubmitBtn = false
+      // this.serviceData.redirect = 1
+      this.serviceData.redirect = row.redirect
+      if (this.serviceData.redirect === 1) { this.serviceData.requestForWard = true } else { this.serviceData.requestForWard = false }
+      this.serviceData.actualUrl = row.actualUrl
+      this.showTrueUrl()
+      // this.serviceData.requestForWard === 'true' ? this.serviceData.redirect === 1 : this.serviceData.redirect
       // this.$nextTick(() => {
       //   this.$refs['serviceDataForms'].clearValidate()
       // })
@@ -402,6 +477,10 @@ export default {
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
       this.showSubmitBtn = true
+      this.serviceData.redirect = row.redirect
+      if (this.serviceData.redirect === 1) { this.serviceData.requestForWard = true } else { this.serviceData.requestForWard = false }
+      this.serviceData.actualUrl = row.actualUrl
+      this.showTrueUrl()
       // this.$nextTick(() => {
       //   this.$refs['serviceDataForms'].clearValidate()
       // })
@@ -410,7 +489,21 @@ export default {
     updateData(ele) {
       this.$refs['serviceDataForms'].validate((valid) => {
         if (valid) {
-          updateService(ele).then(response => {
+          console.log(ele)
+          const tempData = {
+            id: this.serviceData.id,
+            customName: this.serviceData.customName,
+            url: this.serviceData.url,
+            envChannel: this.serviceData.envChannel,
+            method: ele.method,
+            actualUrl: this.serviceData.actualUrl,
+            status: this.serviceData.status,
+            creator: this.serviceData.creator,
+            returnDataType: '512',
+            mockUrl: this.serviceData.mockUrl,
+            redirect: this.serviceData.redirect
+          }
+          updateService(tempData).then(response => {
             if (response.code === 200) {
               this.dialogFormVisible = false
               this.getList()
@@ -436,6 +529,17 @@ export default {
       this.$router.push({
         path: `/mock/httpmock/${id}`, query: { mehtodName: mehtodName, methodProtocol: methodProtocol }
       })
+    },
+    showTrueUrl() {
+      if (this.serviceData.requestForWard === true) {
+        this.trueUrl = true
+        this.serviceData.requestForWard = true
+        this.serviceData.redirect = 1
+      } else {
+        this.trueUrl = false
+        this.serviceData.requestForWard = false
+        this.serviceData.redirect = 0
+      }
     }
   }
 }

Разлика између датотеке није приказан због своје велике величине
+ 334 - 586
src/views/mock/httprule.vue


+ 14 - 11
src/views/mock/interface.vue

@@ -89,7 +89,7 @@
           <span style="color:red;">{{ scope.row.remark }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" min-width="370px" class-name="small-padding fixed-width" fixed="right">
+      <el-table-column label="操作" align="center" min-width="410px" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="{row}">
           <el-button type="primary" size="mini" @click="handleCheck(row)">
             查看
@@ -106,8 +106,8 @@
           <el-button v-if="row.methodStatus!=0" size="mini" type="danger" @click="handleModifyStatus(row, 0)">
             关闭
           </el-button>
-          <el-button type="primary" size="mini" @click="redirectTo(row.id, row.methodName)">
-            规则 >>
+          <el-button type="primary" style="width:auto;" size="mini" @click="redirectTo(row.id, row.methodName)">
+            mock结果 >>
           </el-button>
         </template>
       </el-table-column>
@@ -126,7 +126,11 @@
           </el-form-item>
           <el-form-item prop="envId" style="flex:1; margin-left:-120px;">
             <el-select v-model="serviceData.envId" class="filter-item" :title="Edition" style="width: 190px;" filterable placeholder="环境" @change="envUpdate(serviceData.envId)">
-              <el-option v-for="item in envSelections" :key="item.key" :label="item.display_name" :value="item.key" :title="item.registryAddress" />
+              <div v-for="item in envSelections" :key="item.key">
+                <el-tooltip class="item" effect="light" :content="item.registryAddress" placement="right">
+                  <el-option :label="item.display_name" :value="item.key" />
+                </el-tooltip>
+              </div>
             </el-select>
           </el-form-item>
         </div>
@@ -139,11 +143,11 @@
         <el-form-item label="服务版本" prop="serviceVersion">
           <el-input v-model="serviceData.serviceVersion" placeholder="1.0.0_test" />
         </el-form-item>
-        <el-form-item label="协议" prop="protocol">
+        <!-- <el-form-item label="协议" prop="protocol">
           <el-select v-model="serviceData.protocol" class="filter-item" filterable clearable placeholder="协议">
             <el-option v-for="item in protocols" :key="item.key" :label="item.display_name" :value="item.key" />
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="消费者" prop="consumerIds">
           <el-select v-model="serviceData.consumerIds" class="filter-item" multiple placeholder="消费者">
             <el-option v-for="item in consumerSelections" :key="item.key" :label="item.display_name" :value="item.key" />
@@ -308,7 +312,7 @@ export default {
         // bizModuleId: 0,
         customName: '',
         interfaceName: '',
-        protocol: '',
+        // protocol: '',
         serviceVersion: '',
         envChannel: 1,
         envId: 0,
@@ -340,7 +344,7 @@ export default {
         envId: [{ required: true, message: '请选择环境', trigger: 'change' }],
         interfaceName: [{ required: true, message: '接口名称不能为空', trigger: 'change' }],
         serviceVersion: [{ required: true, message: '服务版本不能为空', trigger: 'change' }],
-        protocol: [{ required: true, message: '请选择协议类型', trigger: 'change' }],
+        // protocol: [{ required: true, message: '请选择协议类型', trigger: 'change' }],
         consumerIds: [{ required: false, message: '请选择消费者', trigger: 'change' }],
         methodName: [{ required: true, message: '方法名称不能为空', trigger: 'change' }]
         // methodParamsTypes: [{ required: true, message: '入参类型不能为空', trigger: 'change' }],
@@ -524,7 +528,7 @@ export default {
         // bizModuleId: 0,
         customName: '',
         interfaceName: '',
-        protocol: '',
+        // protocol: '',
         serviceVersion: '',
         envChannel: 1,
         envId: 0,
@@ -685,7 +689,7 @@ export default {
             bizModuleId: this.serviceDataExt.bizModuleId,
             customName: this.serviceData.customName,
             interfaceName: this.serviceData.interfaceName,
-            protocol: this.serviceData.protocol,
+            // protocol: this.serviceData.protocol,
             serviceVersion: this.serviceData.serviceVersion,
             envChannel: this.serviceData.envChannel,
             envId: this.serviceData.envId,
@@ -730,7 +734,6 @@ export default {
       }))
     },
     redirectTo(id, methodName) {
-      // console.log(id,methodName)
       this.$router.push({
         path: `/mock/interface/${id}`,
         query: {

+ 24 - 31
src/views/mock/rule.vue

@@ -34,10 +34,9 @@
       @sort-change="sortChange"
     >
       <el-table-column label="ID" prop="id" sortable="custom" align="center" min-width="80px">
-        <template slot-scope="scope">
-          <span>{{ scope.row.id }}</span>
-        </template>
+        <template slot-scope="scope">{{ scope.row.id }}</template>
       </el-table-column>
+
       <el-table-column label="方法名" min-width="150px" align="center">
         <!-- <template slot-scope="scope"> -->
         <span>{{ this.$route.query.methodName }}</span>
@@ -51,17 +50,16 @@
         <span>{{ this.$route.path.split('/')[3] }}</span>
         <!-- </template> -->
       </el-table-column>
-      <el-table-column label="规则" min-min-width="60px">
-        <template slot-scope="{row}">
-          <span>{{ row.whenScript }}</span>
-          <!-- <el-tag>{{ row.type | typeFilter }}</el-tag> -->
-        </template>
+
+      <el-table-column label="条件" min-min-width="60px">
+        <template slot-scope="{row}">{{ row.whenScript }} </template>
+        <!-- <el-tag>{{ row.type | typeFilter }}</el-tag> -->
       </el-table-column>
+
       <el-table-column label="优先级" min-width="110px" align="center">
-        <template slot-scope="scope">
-          <span>{{ scope.row.execSort }}</span>
-        </template>
+        <template slot-scope="scope">{{ scope.row.execSort }}</template>
       </el-table-column>
+
       <el-table-column label="状态" class-name="status-col" min-width="100">
         <template slot-scope="{row}">
           <el-tag :type="row.status | statusFilter">
@@ -69,11 +67,19 @@
           </el-tag>
         </template>
       </el-table-column>
+
       <el-table-column label="更新时间" min-width="170px" align="center">
-        <template slot-scope="scope">
-          <span>{{ scope.row.updateTimeStr }}</span>
-        </template>
+        <template slot-scope="scope">{{ scope.row.updateTimeStr }}</template>
       </el-table-column>
+
+      <el-table-column label="创建人" min-width="110px" align="center">
+        <template slot-scope="scope">{{ scope.row.creator }}</template>
+      </el-table-column>
+
+      <el-table-column label="更新人" min-width="110px" align="center">
+        <template slot-scope="scope">{{ scope.row.updator }}</template>
+      </el-table-column>
+
       <el-table-column v-if="showReviewer" label="返回值" min-width="110px" align="center">
         <template slot-scope="scope">
           <span style="color:red;">{{ scope.row.returnMessage }}</span>
@@ -105,7 +111,7 @@
     <pagination v-show="total>0" :total="total" :page.sync="listQuery.curIndex" :limit.sync="listQuery.pageSize" @pagination="getList" />
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="65%" @open="returnMessageData">
       <el-form ref="ruleDataForm" :rules="roleDataRules" :model="ruleData" label-position="left" label-width="120px" style="width: 500px; margin-left:80px;">
-        <el-form-item label="规则" prop="whenScript">
+        <el-form-item label="条件" prop="whenScript">
           <el-input v-model="ruleData.whenScript" placeholder="any" disabled />
         </el-form-item>
         <el-form-item label="优先级" prop="execSort">
@@ -174,6 +180,7 @@ export default {
       styleObj: {
         'color': 'rgba(0, 0, 0, 0.726)'
       },
+      userNames: localStorage.getItem('realname'),
       tableKey: 0,
       list: null,
       total: 0,
@@ -239,7 +246,6 @@ export default {
       this.listLoading = true
       this.listQuery.methodId = parseInt(this.$route.path.split('/')[3])
       fetchRuleList(this.listQuery).then(response => {
-        console.log(this.listQuery)
         this.list = response.data.mockRuleList
         this.total = response.data.total
         // Just to simulate the time of the request
@@ -250,7 +256,6 @@ export default {
       this.getFormatJsonStrFromStringRule1(this.ruleData.returnMessage)
     },
     getFormatJsonStrFromStringRule: function(jsonStr) {
-      console.log(jsonStr)
       var res = ''
       for (var i = 0, j = 0, k = 0, ii, ele; i < jsonStr.length; i++) { // k:缩进,j:""个数
         ele = jsonStr.charAt(i)
@@ -272,7 +277,6 @@ export default {
       return this.jsonTit = res
     },
     getFormatJsonStrFromStringRule1: function(jsonStr) {
-      console.log(jsonStr)
       var res = ''
       for (var i = 0, j = 0, k = 0, ii, ele; i < jsonStr.length; i++) { // k:缩进,j:""个数
         ele = jsonStr.charAt(i)
@@ -294,7 +298,6 @@ export default {
       return this.ruleData.returnMessage = res
     },
     updateEnvChannel(v) {
-      console.log(v)
       this.ruleData.envChannel = v
       this.envSelections = []
       fetchEnvInfo(v).then(response => {
@@ -355,6 +358,7 @@ export default {
           if (valid) {
             delete this.ruleData.id
             this.ruleData.methodId = parseInt(this.$route.path.split('/')[3])
+            this.ruleData.creator = this.userNames
             createRule(this.ruleData).then(response => {
               // this.list.unshift(this.serviceData)
               if (response.code === 200) {
@@ -382,13 +386,9 @@ export default {
     handleUpdate(row) {
       var queryData = { id: row.id }
       fetchRuleById(queryData).then(response => {
-        console.log(response)
         var row_data = response.data.mockRuleList
         // this.ruleData.timestamp = new Date(this.temp.timestamp)
-        // console.log(this.ruleData)
-        // console.log(row_data)
         this.ruleData = Object.assign({}, row_data[0])
-        // console.log(this.ruleData)
         this.ruleData.timestamp = new Date(this.ruleData.timestamp)
         this.dialogStatus = 'update'
         this.dialogFormVisible = true
@@ -403,9 +403,7 @@ export default {
         id: row.id,
         status: status
       }
-      // console.log(statusData)
       changeStatus(statusData).then(response => {
-        // console.log(response)
         if (response.code === 200) {
           row.status = status
           this.$message({
@@ -437,8 +435,7 @@ export default {
           const tempData = {
             id: this.ruleData.id,
             methodId: parseInt(this.$route.path.split('/')[3]),
-            creator: '',
-            updator: '',
+            updator: this.userNames,
             execSort: this.ruleData.execSort,
             whenScript: this.ruleData.whenScript,
             returnMessage: this.ruleData.returnMessage,
@@ -477,13 +474,9 @@ export default {
     handleCheck(row) {
       var queryData = { id: row.id }
       fetchRuleById(queryData).then(response => {
-        console.log(response)
         var row_data = response.data.mockRuleList
         // this.ruleData.timestamp = new Date(this.temp.timestamp)
-        // console.log(this.ruleData)
-        // console.log(row_data)
         this.ruleData = Object.assign({}, row_data[0])
-        // console.log(this.ruleData)
         this.ruleData.timestamp = new Date(this.ruleData.timestamp)
         this.dialogStatus = 'update'
         this.dialogFormVisible = true

Неке датотеке нису приказане због велике количине промена