浏览代码

Merge branch 'http_test' into pern

qinzhipeng_v 5 年之前
父节点
当前提交
72f060dcb0

+ 4 - 2
src/components/input/textArea.vue

@@ -122,8 +122,10 @@ export default {
       }
     },
     handlerText(val) {
-      const reg = new RegExp(/<\/?p[^>]*>/gi)
-      return val.replace(reg, '')
+      if (val) {
+        const reg = new RegExp(/<\/?p[^>]*>/gi)
+        return val.replace(reg, '')
+      }
     }
   }
 }

+ 2 - 1
src/components/picker/SelDatePicker.vue

@@ -32,7 +32,8 @@
 <script>
 const _ = require('lodash')
 import moment from 'moment'
-import 'moment/locale/zh-cn'
+import 'moment/locale/zh-hk'
+moment.locale('zh-hk')
 import locale from 'ant-design-vue/es/date-picker/locale/zh_CN'
 import { getHolidayDayInfo } from '@/api/projectViewDetails'
 export default {

+ 18 - 4
src/views/projectManage/bugList/details/bugTableDialog.vue

@@ -18,7 +18,7 @@
       <el-table-column prop="priorityName" label="缺陷等级" align="center" />
       <el-table-column prop="bugStatusName" label="状态" min-width="110" align="center">
         <template slot-scope="scope">
-          <statusChange :status-code="Number(scope.row.status)" :bug-data="scope.row" />
+          <statusChange :status-code="Number(scope.row.status)" :bug-data="scope.row" :status-obj="statusObj" />
         </template>
       </el-table-column>
       <el-table-column v-if="noShow !== 'taskName'" prop="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />
@@ -41,7 +41,7 @@
       />
     </div>
 
-    <el-drawer :visible.sync="drawerShow" :modal="false" :with-header="false" size="50%" class="bug_manage_drawer" @click.stop>
+    <el-drawer v-if="drawerShow" :visible.sync="drawerShow" :modal="false" :with-header="false" size="50%" class="bug_manage_drawer" @click.stop>
       <div @click.stop>
         <bug-details
           :id="bugQuery.id+''"
@@ -59,7 +59,7 @@
 
 <script>
 import statusChange from '@/views/projectManage/bugList/details/statusChange'
-import { bugList } from '@/api/defectManage'
+import { bugList, bugGetEnum } from '@/api/defectManage'
 import BugDetails from './index'
 import '@/styles/PublicStyle/index.scss'
 
@@ -97,7 +97,8 @@ export default {
       drawerShow: false, // drawer展示
       queryData: {}, // 查询条件
       data: {}, // 查询条件
-      bizId: Number(localStorage.getItem('bizId')) // 业务线
+      bizId: Number(localStorage.getItem('bizId')), // 业务线
+      statusObj: null // 状态对象
     }
   },
   computed: {
@@ -119,7 +120,20 @@ export default {
       immediate: true
     }
   },
+  created() {
+    this.getBugSelect()
+  },
   methods: {
+    async getBugSelect() { //  获取下拉菜单option
+      const res = await bugGetEnum()
+      if (res.code === 200) {
+        this.statusObj = {
+          bugEnumList: res.data.bugEnumList, // status
+          repairResultEnumList: res.data.repairResultEnumList, // 修复结果
+          bugReasonEnumList: res.data.bugReasonEnumList // 缺陷原因
+        }
+      }
+    },
     bugGetTableList(e, index) {
       this.queryData = e
       this.data = {}

+ 16 - 30
src/views/projectManage/bugList/details/index.vue

@@ -3,7 +3,7 @@
     <div v-if="type!=='page'" style="padding: 15px 5px 5px 30px" class="Layout_space_between bug_manage_container bug_manage_title">
       <div class="Layout_flex_start">
         <span style="font-size:18px;font-weight:500;color:#333b4a; margin-right: 20px;">{{ 'BUG-'+ id }}</span>
-        <statusChange v-if="map.bugEnumList && typeof bug.status !== 'undefined'" :status-code="bug.status" :bug-data="bug" @bugGet="updateBugStatus" />
+        <statusChange :status-code="bug.status" :bug-data="bug" :status-obj="statusObj" @bugGet="updateBugStatus" />
       </div>
       <div style="display: inline-block;float:right">
         <span class="newBtn" @click="getToDetails()"><i class="el-icon-document" /> 查看详情</span>
@@ -50,7 +50,7 @@
                   />
                 </el-form-item>
                 <el-form-item id="itemLength1" style="margin:0">
-                  <statusChange v-if="map.bugEnumList && typeof bug.status !== 'undefined'" :status-code="bug.status" :bug-data="bug" />
+                  <statusChange :status-code="bug.status" :bug-data="bug" :status-obj="statusObj" @bugGet="updateBugStatus" />
                 </el-form-item>
                 <el-form-item id="itemLength2" style="margin:0;float:right">
                   <el-button size="small" class="button_delete2" @click="openDeleteDialog()">删除</el-button>
@@ -677,7 +677,8 @@ export default {
           { required: true, message: '请输入图片名称', trigger: 'blur' },
           { min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' }
         ]
-      }
+      },
+      statusObj: null // 状态对象
     }
   },
   watch: {
@@ -697,6 +698,7 @@ export default {
     }
   },
   created() {
+    this.getBugSelect()
     if (this.type !== 'page') {
       var height = window.innerHeight > document.body.clientHeight ? window.innerHeight : document.body.clientHeight
       height -= 130
@@ -725,6 +727,16 @@ export default {
     })
   },
   methods: {
+    async getBugSelect() { //  获取下拉菜单option
+      const res = await bugGetEnum()
+      if (res.code === 200) {
+        this.statusObj = {
+          bugEnumList: res.data.bugEnumList, // status
+          repairResultEnumList: res.data.repairResultEnumList, // 修复结果
+          bugReasonEnumList: res.data.bugReasonEnumList // 缺陷原因
+        }
+      }
+    },
     handleClick() {
       operationLogBug(this.id).then(res => {
         this.changeRecord = res.data
@@ -734,6 +746,7 @@ export default {
       this.$emit('close', false)
     },
     init() {
+      this.getBugSelect()
       this.formHeight = ''
       this.formHeight1 = ''
       this.bugGet(this.id, false).then(res => {
@@ -927,33 +940,6 @@ export default {
       this.bug.bugName = this.bugNameForm.bugName
       this.bugUpdate(this.bug, 'title')
     },
-    bugStatusList(status) { // 不同状态返回不同的option
-      if (status === '待修复') {
-        return this.enums.bugEnumList.filter(item => {
-          return item.code === 0 || item.code === 2 || item.code === 5
-        })
-      }
-      if (status === '待测试') {
-        return this.enums.bugEnumList.filter(item => {
-          return item.code === 2 || item.code === 3 || item.code === 4
-        })
-      }
-      if (status === '已完成') {
-        return this.enums.bugEnumList.filter(item => {
-          return item.code === 3
-        })
-      }
-      if (status === 'Reopen') {
-        return this.enums.bugEnumList.filter(item => {
-          return item.code === 2 || item.code === 5 || item.code === 4
-        })
-      }
-      if (status === 'Hold') {
-        return this.enums.bugEnumList.filter(item => {
-          return item.code === 5 || item.code === 2
-        })
-      }
-    },
     RichText() {
       this.editor = new E('#wage', '#wage1')
       this.editor.customConfig.zIndex = 0

+ 19 - 11
src/views/projectManage/bugList/details/statusChange.vue

@@ -57,12 +57,17 @@
 
 <script>
 import '@/styles/PublicStyle/index.scss'
-import { bugGetEnum, bugUpdate } from '@/api/defectManage'
+import { bugUpdate } from '@/api/defectManage'
 export default {
   props: {
     bugId: { type: Number, default: null },
     statusCode: { type: Number, default: null }, // 状态值
-    bugData: { type: Object, default: null } // 行数据
+    bugData: { type: Object, default: null }, // 行数据
+    statusObj: {
+      type: Object,
+      default: () => { return {} },
+      required: false
+    }
   },
   data() {
     return {
@@ -91,20 +96,23 @@ export default {
         this.status = newV
       },
       immediate: true
+    },
+    statusObj: {
+      handler(newV) {
+        if (newV) {
+          this.bugEnumList = newV.bugEnumList || []// status
+          this.repairResultEnumList = newV.repairResultEnumList || []// 修复结果
+          this.bugReasonEnumList = newV.bugReasonEnumList || []// 缺陷原因
+          this.bugStatusList(this.status)
+        }
+      },
+      deep: true,
+      immediate: true
     }
   },
   mounted() {
-    this.getBugSelect() // 获取下拉菜单option
   },
   methods: {
-    getBugSelect() { //  获取下拉菜单option
-      console.log(this.bugDatas.id === this.bugIds)
-      bugGetEnum().then(res => {
-        this.bugEnumList = res.data.bugEnumList // status
-        this.repairResultEnumList = res.data.repairResultEnumList // 修复结果
-        this.bugReasonEnumList = res.data.bugReasonEnumList // 缺陷原因
-      })
-    },
     statusDialogConfirm() { // 点击确定 验证 修改
       this.$refs.statusDialogForm.validate((valid) => {
         if (valid) {

+ 3 - 3
src/views/projectManage/dialog_vue.vue

@@ -252,9 +252,9 @@ export default {
               that.$set(that.task_form, 'bizId', Number(localStorage.getItem('bizId')))
               that.task_form.followVersion === 2 ? that.show_Client = false : ''
               if (data) {
-                that.task_form.requireId = data.requirementId
-                that.task_form.name = data.name
-                that.task_form.priority = data.priority
+                that.$set(that.task_form, 'requireId', data.requirementId)
+                that.$set(that.task_form, 'name', data.name)
+                that.$set(that.task_form, 'priority', data.priority)
               }
             }, 300)
           })

+ 0 - 1
src/views/projectManage/projectList/components/modifySchedule.vue

@@ -193,7 +193,6 @@ export default {
     isDelete: {
       handler(newV, old) {
         this.isDeleteStatus = newV
-        console.log(this.isDeleteStatus)
       },
       immediate: true,
       deep: true

+ 1 - 0
src/views/projectManage/projectList/projectViewDetails.vue

@@ -290,6 +290,7 @@ export default {
     initRequirementCreateDialog() { // 初始化新建需求弹框
       this.requirement.belongingProject = this.projectId // 这里传入项目id
       this.requirement.bizId = localStorage.getItem('bizId') // 这里传入业务线id
+      this.requirement.dependOnRelease = 0 // 这里传入是否依赖发版
     },
     closeDioang() { // 关闭新建需求弹框
       this.need_open = false

+ 1 - 1
src/views/projectManage/requirement/list/create.vue

@@ -75,8 +75,8 @@
       <div style="display: flex;justify-content: space-between; align-items: center;">
         <el-form-item label="是否依赖发版" prop="dependOnRelease">
           <el-radio-group v-model="form.dependOnRelease" style="width:20vw">
-            <el-radio :label="1">是</el-radio>
             <el-radio :label="0">否</el-radio>
+            <el-radio :label="1">是</el-radio>
           </el-radio-group>
         </el-form-item>
         <el-form-item v-if="form.dependOnRelease" label="涉及的客户端" prop="referredClientType">

+ 18 - 4
src/views/projectManage/requirement/requirementDetail.vue

@@ -57,10 +57,9 @@
           </div>
           <div class="detail-info">
             <el-form :inline="true" :model="form_query" class="demo-form-inline" label-position="right" label-width="100px">
-              <el-form-item label="所属项目:">
-                <el-select v-model="form_query.belongingProject" placeholder="请选择" @change="changeArea">
-                  <el-option v-for="(item,index) in belongProjectList" :key="item.name + index" :label="item.name" :value="item.id" />
-                </el-select>
+              <el-form-item label="所属项目:" class="module">
+                <div v-if="form_query.belongingProject !== -1" @click="jump('项目详情',form_query.belongingProject)">{{ form_query.belongingProjectName }}</div>
+                <template v-else>{{ form_query.belongingProjectName }}</template>
               </el-form-item>
               <el-form-item label="所属迭代:">
                 <el-select v-model="form_query.iterationId" placeholder="请选择" @change="changeArea">
@@ -449,6 +448,9 @@ export default {
         this.$refs.createdBug.init(1)
       })
     },
+    jump(page, id) { // 跳转
+      this.$router.push({ name: page, query: { id: id }})
+    },
     reloadList() {
       this.getRequirementById()
       if (this.$refs['bugTableDialog']) {
@@ -554,6 +556,18 @@ export default {
     }
   }
 }
+>>>.module .el-form-item__content {
+    display: inline-block;
+    width: calc(100% - 100px);
+    div {
+      line-height: 18px;
+      padding-top: 12px;
+      cursor: pointer;
+    }
+    div:hover{
+      color: #409EFF;
+    }
+  }
 >>>.el-input--small {
   font-size: 14px;
 }

+ 0 - 1
src/views/projectManage/taskList/components/modifySchedule.vue

@@ -184,7 +184,6 @@ export default {
   },
   created() {
     this.getType()
-    this.remoteMethod()
     if (this.detailData === null) {
       this.init()
     }

+ 7 - 7
src/views/projectManage/taskList/components/reportList.vue

@@ -9,11 +9,11 @@
         <el-table
           :data="testData"
           size="small"
-          :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500', textAlign: 'center' }"
+          :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500' }"
           show-overflow-tooltip="true"
           max-height="300"
         >
-          <el-table-column label="标题名称" min-width="150" align="center">
+          <el-table-column label="标题名称" min-width="120">
             <template slot-scope="scope">
               <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</a>
             </template>
@@ -26,7 +26,7 @@
           <el-table-column label="创建人" min-width="100" align="center">
             <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
           </el-table-column>
-          <el-table-column label="创建日期" min-width="150" align="center">
+          <el-table-column label="创建日期" min-width="100" align="center">
             <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
           </el-table-column>
           <el-table-column label="操作" width="200">
@@ -76,8 +76,8 @@
         <div class="title-left-name">测试日报</div>
       </div>
       <div class="detail-info">
-        <el-table :data="dailyData" size="small" :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500', textAlign: 'center' }" show-overflow-tooltip="true">
-          <el-table-column label="标题名称" min-width="100" align="center">
+        <el-table :data="dailyData" size="small" :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500' }" show-overflow-tooltip="true">
+          <el-table-column label="标题名称" min-width="120">
             <template slot-scope="scope">
               <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 0)">{{ scope.row.reportName }}</a>
             </template>
@@ -136,8 +136,8 @@
         <div class="title-left-name">准出报告</div>
       </div>
       <div class="detail-info">
-        <el-table :data="clientData" size="small" :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500', textAlign: 'center' }" show-overflow-tooltip="true">
-          <el-table-column label="标题名称" min-width="100" align="center">
+        <el-table :data="clientData" size="small" :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500' }" show-overflow-tooltip="true">
+          <el-table-column label="标题名称" min-width="120">
             <template slot-scope="scope">
               <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 1)">{{ scope.row.reportName }}</a>
             </template>

+ 20 - 10
src/views/projectManage/taskList/taskViewDetail.vue

@@ -71,22 +71,24 @@
           </div>
           <div class="detail-info">
             <el-form :inline="true" :model="form_query" class="demo-form-inline" label-position="right" label-width="100px">
-              <el-form-item label="所属项目:">
-                {{ form_query.projectName }}
+              <el-form-item label="所属项目:" class="module">
+                <div v-if="form_query.projectId !== -1" @click="jump('项目详情',form_query.projectId)">{{ form_query.projectName }}</div>
+                <template v-else>{{ form_query.projectName }}</template>
               </el-form-item>
-              <el-form-item label="所属需求:">
-                {{ form_query.requireName }}
+              <el-form-item label="所属需求:" class="module">
+                <div v-if="form_query.requireId !== -1" @click="jump('项目详情',form_query.requireId)">{{ form_query.requireName }}</div>
+                <template v-else>{{ form_query.requireName }}</template>
               </el-form-item>
               <el-form-item label="所属模块:" class="module">
-                <span>{{ form_query.moduleInfoName }}</span>
+                <div>{{ form_query.moduleInfoName }}</div>
               </el-form-item>
             </el-form>
             <el-form :inline="true" :model="form_query" class="demo-form-inline" label-position="right" label-width="100px">
               <el-form-item label="开发负责人:">
-                <search-people :value.sync="form_query.rdOwner" @change="changeArea" />
+                <search-people :value.sync="form_query.rdOwner || ''" @change="changeArea" />
               </el-form-item>
               <el-form-item label="测试负责人:">
-                <search-people :value.sync="form_query.qaOwner" @change="changeArea" />
+                <search-people :value.sync="form_query.qaOwner || ''" @change="changeArea" />
               </el-form-item>
               <el-form-item label="是否跟版:">
                 <el-select v-model="form_query.followVersion" size="small" filterable placeholder="请选择" @change="changeArea">
@@ -465,6 +467,9 @@ export default {
           break
       }
     },
+    jump(page, id) { // 跳转
+      this.$router.push({ name: page, query: { id: id }})
+    },
     reloadList() {
       this.taskGet()
       if (this.$refs['bugTableDialog']) {
@@ -595,9 +600,14 @@ export default {
 >>>.module .el-form-item__content {
     display: inline-block;
     width: calc(100% - 100px);
-    white-space:nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
+    div {
+      line-height: 18px;
+      padding-top: 12px;
+      cursor: pointer;
+    }
+    div:hover{
+      color: #409EFF;
+    }
   }
 .form-progress {
   width: 200px;

+ 8 - 2
src/views/workbench/bugTableList.vue

@@ -26,7 +26,7 @@
       <el-table-column prop="priorityName" label="缺陷等级" align="center" />
       <el-table-column prop="bugStatusName" label="状态" min-width="110" align="center">
         <template slot-scope="scope">
-          <statusChange :bug-id="scope.row.id" :status-code="Number(scope.row.status)" :bug-data="scope.row" @bugGet="bugGetTableList" />
+          <statusChange :bug-id="scope.row.id" :status-code="Number(scope.row.status)" :bug-data="scope.row" :status-obj="statusObj" @bugGet="bugGetTableList" />
         </template>
       </el-table-column>
       <el-table-column prop="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />
@@ -99,7 +99,8 @@ export default {
       total: 0, // 总数
       bugQuery: '', // bug详情
       drawerShow: false, // drawer展示
-      bugProcessStatusList: [] // 筛选
+      bugProcessStatusList: [], // 筛选
+      statusObj: null // 状态对象
     }
   },
   computed: {
@@ -133,6 +134,11 @@ export default {
           this.title = '待团队成员处理'
           this.bugProcessStatusList = res.data.bugProcessTeamStatusList // 待团队成员处理
         }
+        this.statusObj = {
+          bugEnumList: res.data.bugEnumList, // status
+          repairResultEnumList: res.data.repairResultEnumList, // 修复结果
+          bugReasonEnumList: res.data.bugReasonEnumList // 缺陷原因
+        }
       })
     },
     async bugGetTableList(name, value) {

+ 1 - 0
src/views/workbench/person/components/myFullCalendar.vue

@@ -24,6 +24,7 @@
       v-show="activeName === '1'"
       :id="type + '-calendar'"
       ref="fullCalendar"
+      height="auto"
       :class="type + '-calendar'"
       default-view="dayGridMonth"
       theme-system="bootstrap"