qinzhipeng_v 5 سال پیش
والد
کامیت
e509d53cf3

+ 1 - 2
src/api/httprule.js

@@ -1,8 +1,7 @@
 import request from '@/utils/request'
-
+import { mockUrl } from '@/apiConfig/mock'
 // ================================== Rule ======================================
 // const mockUrl = 'http://mock.Intra.xiaojukeji.com'
-const mockUrl = 'http://10.179.101.226:8089'
 // const mockUrl = 'http://172.23.160.90:8089'
 
 export function fetchRuleById(data) {

+ 3 - 3
src/apiConfig/mock.js

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

+ 0 - 1
src/router/index.js

@@ -94,7 +94,6 @@ export const constantRoutes = [
       {
         path: 'useCasePage',
         name: 'useCasePage',
-        hidden: true,
         component: () => import('@/views/Platform/useCasePage'),
         meta: { title: '用例管理' }
       },

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

@@ -230,7 +230,6 @@ export default {
       formLabelWidth: '11%',
       formLabelWidth1: '22%',
       userData: '',
-      submitMissionJudge: '',
       businessTypeShow: false,
       moduleTypeShow: false,
       userInformation: localStorage.getItem('username'),
@@ -291,6 +290,7 @@ export default {
     },
     // 业务线取子数据
     clickChangePlatform(e) {
+      console.log(this.form.taskId)
       this.platformTypeStr = this.bizOptions.filter(value => value.code === e)[0].child
       this.businessTypeStr = []
       this.moduleStr = []
@@ -320,9 +320,6 @@ export default {
       }
       this.$set(this.form, 'moduleId', '')
     },
-    submitJudge(e) {
-      this.submitMissionJudge = e
-    },
     // 提交表单并且返回刷新
     createFormData(form) {
       this.$refs.form.validate((valid) => {
@@ -330,16 +327,12 @@ export default {
           if (this.$route.query.id && typeof this.form.bizId === 'string') {
             form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
           }
-          if (this.$route.query.id && !this.submitMissionJudge) {
-            form.taskId = this.taskIdStr.filter(value => value.name === form.taskId)[0].id
-          }
           form.reopenTimes = parseInt(form.reopenTimes)
           form.projectId = this.taskIdStr.filter(value => value.id === this.form.taskId)[0].projectId
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.objData = { bugBaseInfo: form, user: this.userData }
           bugCreate(this.objData).then(res => {
             res.code === 200 ? this.successFun() : this.errorFun()
-            this.submitMissionJudge = ''
             this.$router.go(-1)
           })
         }

+ 0 - 1
src/views/Platform/bugManage/bugQuery.vue

@@ -153,7 +153,6 @@ export default {
     // 先后获取
     async _initBegin() {
       await bugGetEnum().then(res => {
-        console.log(res.data.reasonEnumList)
         this.bugStatusStr = res.data.bugEnumList
         this.bugLevelStr = res.data.priorityEnumList
         this.bizIdEnumList = res.data.bizIdEnumList

+ 0 - 2
src/views/Platform/bugManage/bugUpdate.vue

@@ -237,7 +237,6 @@ export default {
   methods: {
     handleChange(file, fileList) {
       this.fileList = fileList.slice(-3)
-      console.log(this.fileList)
     },
     async _initBegin() {
       await bugGetEnum().then(res => {
@@ -310,7 +309,6 @@ export default {
     // 提交表单并且返回刷新
     createFormData(form) {
       this.$refs.form.validate((valid) => {
-        console.log(form)
         if (valid) {
           form.reopenTimes = parseInt(form.reopenTimes)
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }

+ 1 - 1
src/views/Platform/defectManagement.vue

@@ -270,7 +270,7 @@ export default {
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
       bizJson: localStorage.getItem('key'),
-      pageSize: 5,
+      pageSize: 20,
       curIndex: 0,
       total: 0,
       show2: '',

+ 2 - 2
src/views/Platform/presentation/Acceptance.vue

@@ -17,7 +17,7 @@
             <el-button :type="tagBtn" style="margin: 0 2vw;" class="tag" @click="changeStatus(1)"> 通过 </el-button>
             <el-button :type="tagBtn1" class="tag" @click="changeStatus(2)"> 不通过 </el-button>
           </el-form-item>
-          <el-form-item label="准入结果" prop="smokeTestResult" style="flex: 2;text-align:right;"><el-input v-model="ClientData.launchInfo" style="width: 50vw;" placeholder="准入次数/通过次数/失败次数" /></el-form-item>
+          <el-form-item label="准入结果" prop="smokeTestResult" style="flex: 2;text-align:right;"><el-input v-model="ClientData.smokeTestResult" style="width: 50vw;" placeholder="准入次数/通过次数/失败次数" /></el-form-item>
         </div>
         <div style="display: flex; white-space: nowrap;">
           <el-form-item label="* 准出延期" style="flex: 1;" prop="taskLateStatus">
@@ -481,7 +481,7 @@ export default {
 
     getBugData(e) {
       bugFinishList(e).then(res => {
-        this.$set(this.ClientData, 'launchInfo', res.data.launchInfo)
+        this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo)
         this.tableData = [res.data]
         this.formatData()
       })

+ 3 - 3
src/views/Platform/presentation/ClientAcceptance.vue

@@ -18,7 +18,7 @@
             <el-tag :type="tagBtn" effect="dark" style="margin: 0 2vw;" class="tag" @click="changeStatus(1)"> 通过 </el-tag>
             <el-tag :type="tagBtn1" effect="dark" class="tag" @click="changeStatus(2)"> 不通过 </el-tag>
           </el-form-item>
-          <el-form-item label="准入结果" prop="smokeTestResult" style="flex: 2;text-align:right;"><el-input v-model="ClientData.launchInfo" style="width: 50vw;" placeholder="准入次数/通过次数/失败次数" /></el-form-item>
+          <el-form-item label="准入结果" prop="smokeTestResult" style="flex: 2;text-align:right;"><el-input v-model="ClientData.smokeTestResult" style="width: 50vw;" placeholder="准入次数/通过次数/失败次数" /></el-form-item>
         </div>
         <div style="display: flex; white-space: nowrap;">
           <el-form-item label="* 准出延期" style="flex: 1;" prop="taskLateStatus">
@@ -90,7 +90,7 @@
 
         <div style="margin: 2% 0 2% 0;" class="backStyle">五. 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" />
@@ -447,7 +447,7 @@ export default {
     },
     getBugData(e) {
       bugFinishList(e).then(res => {
-        this.$set(this.ClientData, 'launchInfo', res.data.launchInfo)
+        this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo)
         this.tableData = [res.data]
         this.formatData()
       })

+ 3 - 3
src/views/Platform/presentation/DailyNewsAdded.vue

@@ -174,7 +174,7 @@ export default {
         this.projectId = this.$route.query.state1.projectId
         this.taskId = this.$route.query.state1.taskId
         this.bizIdCode = this.$route.query.state1.bizId
-        this.pro = { projectId: this.projectId, bizId: this.bizIdCode, taskId: this.taskId }
+        this.pro = { projectId: this.projectId, taskId: this.taskId }
       }
       if (this.$route.query.task) { // 任务页面
         this.fromCreateData = {}
@@ -182,7 +182,7 @@ export default {
         this.showButton = true
         this.bizIdCode = this.$route.query.task.bizId
         this.idCode = this.$route.query.task.id
-        this.pro = { taskId: this.idCode, bizId: this.bizIdCode }
+        this.pro = { taskId: this.idCode }
       }
       if (this.$route.query.projectId) { // 项目页面
         this.fromCreateData = {}
@@ -190,7 +190,7 @@ export default {
         this.showButton = true
         this.bizIdCode = this.$route.query.projectId.bizId
         this.idCode = this.$route.query.projectId.id
-        this.pro = { projectId: this.idCode, bizId: this.bizIdCode }
+        this.pro = { projectId: this.idCode }
       }
 
       bugDailyList(this.pro).then(res => {

+ 1 - 1
src/views/Platform/projectPage.vue

@@ -300,7 +300,7 @@ export default {
       formLabelWidths: '160px',
       formLabelWidth: '150px',
       curIndex: 1, // 初始页
-      pageSize: 5, // 每页的数据
+      pageSize: 20, // 每页的数据
       total: 0,
       noTestString: [{ name: '测试', value: 0 }, { name: '自测', value: 1 }],
       typeString: [{ name: '服务端', value: 1 }, { name: '客户端', value: 2 }],

+ 6 - 3
src/views/Platform/projectQuery/taskQuery.vue

@@ -109,8 +109,8 @@
               <el-tab-pane label="bug报告">
                 <el-table :data="projectBug" max-height="390" style="width: 100%" @row-click="queryBugData">
                   <el-table-column label="ID" align="center" min-width="60"><template slot-scope="scope">{{ scope.row.id }}</template></el-table-column>
-                  <el-table-column label="标题" align="center" min-width="100"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
-                  <el-table-column label="状态" align="center" min-width="80"><template slot-scope="scope">{{ scope.row.status }}</template></el-table-column>
+                  <el-table-column label="标题" align="center" min-width="100"><template slot-scope="scope"><div style="background-color: #E9F8DA;color: #3BB100;width: 70%;margin: 0px auto;cursor:pointer;" @click="turnToBugCreate(scope.row.id)">{{ scope.row.bugName }}</div></template></el-table-column>
+                  <el-table-column label="状态" align="center" min-width="80"><template slot-scope="scope">{{ scope.row.bugStatusName }}</template></el-table-column>
                   <el-table-column label="当前处理人" align="center" min-width="100"><template slot-scope="scope">{{ scope.row.currentHandler }}</template></el-table-column>
                   <el-table-column label="创建时间" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.gmtCreate }}</template></el-table-column>
                 </el-table>
@@ -566,7 +566,10 @@ export default {
       // this.osTypeShow === false ? this.$set(this.fromCode, 'osType', '') : ''
       this.getList()
     },
-
+    // bug报告跳转
+    turnToBugCreate(e) {
+      this.$router.push({ path: '/Platform/defectManagement/bugQuery', query: { id: e }}) // 缺陷报告
+    },
     // 所有下拉菜单数据
     bugListSelect() {
       bugGetEnum().then(res => {

+ 6 - 6
src/views/mock/httpmock.vue

@@ -5,9 +5,9 @@
         <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-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> -->
         <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>
@@ -34,9 +34,9 @@
       <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">
+      <!-- <el-table-column label="method" min-min-width="60px">
         <template slot-scope="{row}"><span>{{ row.method }}</span></template>
-      </el-table-column>
+      </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>
@@ -75,11 +75,11 @@
         <el-form-item label="url" prop="url">
           <el-input v-model="serviceData.url" :disabled="shouldShow" placeholder="url" />
         </el-form-item>
-        <el-form-item label="method" prop="method">
+        <!-- <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> -->
         <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" />

+ 48 - 49
src/views/mock/httprule.vue

@@ -44,11 +44,11 @@
         <span>{{ this.$route.path.split('/')[3] }}</span>
         <!-- </template> -->
       </el-table-column>
-      <el-table-column label="方法协议" min-width="150px" align="center">
-        <!-- <template slot-scope="scope"> -->
+      <!-- <el-table-column label="方法协议" min-width="150px" align="center">
+
         <span>{{ this.$route.query.methodProtocol }}</span>
-        <!-- </template> -->
-      </el-table-column>
+
+      </el-table-column> -->
       <!-- <el-table-column label="规则" min-min-width="60px">
         <template slot-scope="{row}">
           <span>{{ row.whenScript }}</span> -->
@@ -136,13 +136,9 @@
                     <el-divider>
                       <el-button-group>
                         <el-button ref="and" :style="styleBtn" circle plain size="mini" @click="changeAnd(index)">{{ and }}</el-button>
+                        <!-- <el-button ref="and" :class="{ styleBtn : true }" circle plain size="mini" @click="changeAnd(index)">{{ and }}</el-button> -->
                         <el-button ref="or" circle plain size="mini" @click="changeOr(index)">{{ or }}</el-button>
                       </el-button-group>
-
-                    <!-- <div :class="{red: !isshow,blue: isshow}" @click="isshow=!isshow">并且</div>
-                    <div :class="{red: !isshow,blue: isshow}" @click="isshow=!isshow">或者</div> -->
-                    <!-- <div style="border:1px solid #000; border-radius:50% 0  0 50%;text-align:center;line-height:26px;">并且</div> -->
-
                     </el-divider>
                   </div>
                 </template>
@@ -192,8 +188,7 @@
                     </el-col>
                   </div>
 
-                </el-row>
-              </el-form-item>
+                </el-row></el-form-item>
             </div>
 
           </tr>
@@ -210,7 +205,7 @@
       <el-form label-width="150px" style="width: 880px;" />
 
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">
+        <el-button @click="clear(), dialogFormVisible = false">
           取消
         </el-button>
         <el-button v-if="showSubmit" type="primary" @click="dialogStatus==='update'?updateData() : createData()">
@@ -271,6 +266,7 @@ export default {
       // orButton:"",
       firstIndex: 1,
       isshow: true,
+      check: false,
       // isAnyshow: false,
       isNotAnyRequest: true,
       btnRequest: true,
@@ -295,7 +291,7 @@ export default {
         ruleDesc: '',
         metaRuleList: [{ operator: '', expression: '', judgeType: '', judgeValue: '', and: '', or: '', prior: '', bracket: '' }]
       },
-      metaRuleListCache: [],
+      metaRuleListCache: [{ operator: '', expression: '', judgeType: '', judgeValue: '', and: '', or: '', prior: '', bracket: '' }],
       rules: {
         execSort: '',
         ruleDesc: ''
@@ -347,15 +343,6 @@ export default {
       showReviewer: false,
       showRules: false,
       ruleData: {
-        // methodId: 0,
-        // updator: '',
-        // methodName: '',
-        // execSort: 1,
-        // whenScript: '',
-        // returnMessage: '',
-        // curIndex: 1,
-        // pageSize: 20,
-        // methodProtocol: 'http'
       },
 
       dialogFormVisible: false,
@@ -437,7 +424,8 @@ export default {
       this.ruleForm.metaRuleList[index].operator = '||'
     },
     updateStyle() {
-      // i从1开始,因为第一个不显示
+      this.priorChanged(0)
+      // i从1开始,因为第一个不显示并且/或者按钮
       for (let i = 1, len = this.ruleForm.metaRuleList.length; i < len; i++) {
         // 操作符颜色
         if (this.ruleForm.metaRuleList[i].operator === '||') {
@@ -447,6 +435,7 @@ export default {
         }
         // 优先级背景
         this.priorChanged(i)
+        console.log(this.$refs)
       }
     },
     addList(index) {
@@ -463,44 +452,28 @@ export default {
       console.log(this.num)
       console.log(index)
     },
+    anyRequestChange(status) {
+      this.isAnyRequest = status
+      this.isNotAnyRequest = !this.isAnyRequest
+    },
     chooseTest(val) {
-      console.log('chooseTest:' + val)
-      this.isNotAnyRequest = true
-      this.isAnyRequest = false
+      this.anyRequestChange(false)
       this.ruleForm.metaRuleList = this.metaRuleListCache
       this.ruleForm.metaRuleList[0].expression1 = val
-      // this.ruleForm.metaRuleList.push({'expression1': val })
       delete this.rules.whenScript
-      // this.paramOptions.push(0,0,{ name: 'any', value: 0 })
     },
     chooseTest1(val) {
       this.expression1 = val
       console.log(val)
       if (this.ruleForm.metaRuleList[0].expression1 === 'any') {
+        this.anyRequestChange(true)
         this.rules.whenScript = 'any'
-        this.isAnyRequest = true
-        this.isNotAnyRequest = false
         this.metaRuleListCache = this.ruleForm.metaRuleList
         this.ruleForm.metaRuleList = []
-        // this.isAnyshow = true
       } else {
-        this.isNotAnyRequest = true
-        this.isAnyRequest = false
-
-        // this.paramOptions.push(0,0,{ name: 'any', value: 0 })
+        this.anyRequestChange(false)
       }
     },
-
-    chooseTest2(val) {
-      this.expression2 = val
-    },
-    chooseTest3(val) {
-      this.ruleForm.metaRuleList.judgeType = val
-    },
-    chooseTest4(val) {
-      this.ruleForm.metaRuleList.judgeValue = val
-    },
-
     // 获取运算符
     getHttpOp() {
       getHttpOp().then(response => {
@@ -543,6 +516,10 @@ export default {
         this.$refs.priorBackgroup[index].$el.style.background = '#FFFFFF'
       }
     },
+
+    clear(row, status) {
+    },
+
     findMaxMinOfMetaList() {
       var maxMin = {
         max: -1,
@@ -665,7 +642,7 @@ export default {
         ruleDesc: '',
         metaRuleList: [{ operator: '', expression: '', judgeType: '', judgeValue: '', and: '', or: '', prior: '', bracket: '' }]
       }
-      this.metaRuleListCache = []
+      this.metaRuleListCache = [{ operator: '', expression: '', judgeType: '', judgeValue: '', and: '', or: '', prior: '', bracket: '' }]
     },
     handleCreate() {
       this.resetServiceData()
@@ -742,6 +719,12 @@ export default {
       })
     },
     handleUpdate(row, status) {
+      if (status === 'check') {
+        this.check = true
+      } else {
+        this.check = false
+      }
+      console.log(status + this.check)
       fetchRuleById({ id: row.id }).then(response => {
         if (response.code !== 200) {
           this.$message({
@@ -774,15 +757,23 @@ export default {
           }
           metaRule.operator = metaRule.operator.replace(/\(|\)/, '')
           // 分割表达式
+
           var exp = metaRule.expression.split('.')
           this.ruleForm.metaRuleList.push({ 'prior': prior, 'operator': metaRule.operator, 'expression1': exp[0], 'expression2': exp[1], 'judgeType': metaRule.judgeType, 'judgeValue': metaRule.judgeValue })
           console.log(this.ruleForm.metaRuleList[i])
         }
         this.rules = Object.assign({}, row_data[0])
         if (status === 'copy') {
+          this.rules.ruleDesc = this.rules.ruleDesc + '_Copy'
           delete this.rules.id
         }
 
+        if (this.rules.whenScript === 'any') {
+          this.isAnyRequest = true
+          this.isNotAnyRequest = !this.isAnyRequest
+        }
+        console.log('this.rules after fetch : ' + JSON.stringify(this.rules))
+
         // 校验个样式更新清理
         this.$nextTick(() => {
           this.$refs['ruleForm'].clearValidate()
@@ -800,12 +791,12 @@ export default {
         if (response.code === 200) {
           row.status = status
           this.$message({
-            message: row.id.toString() + ' 操作成功!',
+            message: '规则ID:' + row.id.toString() + ' 操作成功!',
             type: 'success'
           })
         } else {
           this.$message({
-            message: row.id.toString() + ' 操作失败!',
+            message: '规则ID:' + row.id.toString() + ' 操作失败!',
             type: 'danger'
           })
         }
@@ -874,3 +865,11 @@ display:initial;/*当鼠标hover时展示*/
 } */
 
 </style>
+<style lang="stylus" scoped>
+    .set-font >>> .el-input__inner
+      color #3e3c3c
+    // .set-font >>>  .is-disabled input::placeholder
+    //   color #3e3c3c
+    .set-font >>> .is-disabled input
+      color #3e3c3c
+</style>

+ 1 - 1
src/views/quality/qualityMeasurement.vue

@@ -17,7 +17,7 @@
     </el-header>
     <el-container style="height:calc(100vh - 140px);">
       <el-aside class="aside">
-        <el-tree ref="treeBox" :data="dealWithBusinessDate" :expand-on-click-node="false" node-key="id" highlight-current :props="defaultProps" style="margin-top:20px" @node-click="handleNodeClick" />
+        <el-tree ref="treeBox" :data="dealWithBusinessDate" node-key="id" highlight-current :props="defaultProps" style="margin-top:20px" @node-click="handleNodeClick" />
       </el-aside>
       <el-main class="combine-table">
         <el-menu :default-active="activeIndexSecondary" active-text-color="#409EFF" mode="horizontal" @select="handleSelectSecondary">

+ 1 - 1
src/views/quality/qualityProcess.vue

@@ -115,7 +115,7 @@ export default {
       tableData: [],
       input: '',
       curIndex: 1,
-      pageSize: 5,
+      pageSize: 10,
       total: 0
     }
   },