Ver código fonte

Merge branch 'http_test' into usecase_daily_0.0.2

洪海涛 4 anos atrás
pai
commit
a6eea45ce0

+ 9 - 1
src/api/workSchedule.js

@@ -1,6 +1,6 @@
 // 个人工作台和团队工作台
 import request from '@/utils/request'
-import { TeamManagement } from '@/apiConfig/api'
+import { TeamManagement, teamWorkbenchUrl } from '@/apiConfig/api'
 
 // 获取用户团队列表
 export function queryTeamInfoList(data) {
@@ -278,3 +278,11 @@ export function settingGetCalendar() {
     method: 'get'
   })
 }
+
+// 获取用户信息
+export function getStaffByUsername(name) {
+  return request({
+    url: teamWorkbenchUrl + `/api/staff/getStaffByUsername?username=${name}`,
+    method: 'get'
+  })
+}

+ 2 - 0
src/apiConfig/api.js

@@ -17,6 +17,8 @@ export const vehicleUrl_online = 'http://10.190.9.230:9999' // 虚拟硬件 zhih
 
 export const projectManagementUrl = requestIp + '/project-management' //项目管理
 
+export const teamWorkbenchUrl = requestIp + '/ldip-server' // 团队工作台
+
 export const ldapServer = requestIp + '/ldap-server' //邮箱查询
 
 export const TeamManagement = projectManagementUrl // 团队配置 项目

+ 7 - 0
src/styles/index.scss

@@ -89,3 +89,10 @@ div:focus {
 .app-container {
   padding: 20px;
 }
+
+.el-dialog__title {
+  line-height: 24px;
+  font-size: 16px;
+  color: #303133;
+  padding-left: 10px;
+}

+ 16 - 1
src/views/ToConfigure/components/bizConfigure.vue

@@ -52,6 +52,16 @@
     </el-radio-group>
     <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
     <el-button v-if="!taskBtnShow" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
+    <p class="biz_property">
+      是否需要技术文档
+      <i v-if="file" class="el-icon-edit icon-sty" @click="file = false" />
+    </p>
+    <el-radio-group v-model="isTaskDoc" :disabled="file" class="biz_radio">
+      <el-radio :label="1"> 是 </el-radio>
+      <el-radio :label="0"> 否</el-radio>
+    </el-radio-group>
+    <el-button v-if="!file" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
+    <el-button v-if="!file" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
   </div>
 </template>
 
@@ -63,8 +73,10 @@ export default {
     return {
       radio: '1',
       taskClose: 0, // 任务关闭code
+      isTaskDoc: 0,
       Prohibit: true,
       taskBtnShow: true, // 任务关闭按钮
+      file: true, // 是否需要技术文档
       Schedule: true, // 排期同步望岳
       isCkEdit: false, // checklist编辑
       ckStatus: '0', // ckecklist状态
@@ -93,20 +105,23 @@ export default {
         this.radio = JSON.stringify(this.bizObj.isSecret)
         this.ckStatus = '' + this.bizObj.isChecklistIntercept
         this.taskClose = this.bizObj.isTaskClose
+        this.isTaskDoc = this.bizObj.isTaskDoc
       }
     },
     async preservation() { // 保存业务线配置
-      const res = await settingUpdateBiz({ id: this.bizId, isSecret: Number(this.radio), bizName: this.bizObj.name, isChecklistIntercept: Number(this.ckStatus), isTaskClose: this.taskClose })
+      const res = await settingUpdateBiz({ id: this.bizId, isSecret: Number(this.radio), bizName: this.bizObj.name, isChecklistIntercept: Number(this.ckStatus), isTaskClose: this.taskClose, isTaskDoc: this.isTaskDoc })
       if (res.code === 200) {
         this.Prohibit = true
         this.taskBtnShow = true
         this.isCkEdit = false
+        this.file = true
         this.$message({ message: '修改成功', type: 'success', duration: 1000, offset: 150 })
       }
     },
     cancel() {
       this.Prohibit = true
       this.taskBtnShow = true
+      this.file = true
       this.isCkEdit = false
       this.radio = JSON.stringify(this.bizObj.isSecret)
       this.ckStatus = '' + this.bizObj.isChecklistIntercept

+ 1 - 1
src/views/projectManage/projectList/components/taskList.vue

@@ -230,7 +230,7 @@ export default {
       isEx ? this.expandArr = this.all_task.map(item => item.id) : this.expandArr = []
     },
     async changeStatus(e) { // 状态改变
-      if (e.status === 70 || e.status === 90 || e.status === 100) {
+      if (e.status === 60 || e.status === 70 || e.status === 90 || e.status === 100) {
         this.taskId = e
         this.allStatus.map(item => {
           item.code === e.status ? this.taskId.statusString = item.msg : ''

+ 1 - 1
src/views/projectManage/requirement/components/taskList.vue

@@ -230,7 +230,7 @@ export default {
       isEx ? this.expandArr = this.all_task.map(item => item.id) : this.expandArr = []
     },
     async changeStatus(e) { // 状态改变
-      if (e.status === 70 || e.status === 90 || e.status === 100) {
+      if (e.status === 60 || e.status === 70 || e.status === 90 || e.status === 100) {
         this.taskId = e
         this.allStatus.map(item => {
           item.code === e.status ? this.taskId.statusString = item.msg : ''

+ 70 - 2
src/views/projectManage/taskList/dialog/taskDialog.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog :visible.sync="visible" :show="show" class="deleteClassName public_task" title="状态变更" width="30%" :close-on-click-modal="false" :destroy-on-close="true" @close="OnClose()">
     <div class="blueStripe" />
-    <div align="center">
+    <div v-if="tabStatus" align="center">
       <div style=" margin-bottom: 5%; white-space:nowrap;">{{ name }}</div>
       <div style=" margin: 2% 3%; display: flex; justify-content: space-between; align-items: center; white-space:nowrap;">
         <span>{{ codeName }}:</span>
@@ -15,19 +15,36 @@
         />
       </div>
     </div>
+    <div v-else>
+      <div class="qz_layout">
+        <div class="qz_label"><span style="color: red">*</span> 开发负责人:</div>
+        <search-people :value.sync="form_query.rdOwner" style="width: 100%;" />
+      </div>
+      <div class="qz_layout">
+        <div class="qz_label"><span style="color: red">*</span> 测试负责人:</div>
+        <search-people :value.sync="form_query.qaOwner" style="width: 100%;" />
+      </div>
+      <div v-if="taskData.isTaskDoc" class="qz_layout">
+        <div class="qz_label"><span style="color: red">*</span> 技术文档:</div>
+        <el-input v-model="form_query.devUrl" size="medium" style="width: 100%;" placeholder="请输入" />
+      </div>
+    </div>
     <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="OnClose">取 消</el-button>
-      <el-button size="small" type="primary" @click="task_status_uptate(date)">确 定</el-button>
+      <el-button v-if="tabStatus" size="small" type="primary" @click="task_status_uptate(date)">确 定</el-button>
+      <el-button v-else size="small" type="primary" @click="taskStatus(form_query)">确 定</el-button>
     </span>
   </el-dialog>
 </template>
 
 <script>
+import searchPeople from '@/components/select/searchPeople'
 import { taskGet } from '@/api/taskIndex' // 更新状态接口
 import { taskUpdate } from '@/api/projectViewDetails'
 import '@/styles/PublicStyle/index.scss'
 export default {
   name: 'TemplateDialog',
+  components: { searchPeople },
   props: {
     show: { type: Boolean, default: false }, // 弹窗展示
     statusName: { type: String, default: null }, // 状态name
@@ -38,9 +55,15 @@ export default {
       visible: this.show,
       date: new Date(),
       name: '',
+      tabStatus: true,
       task_Id: this.taskId,
       codeName: '',
       taskData: {},
+      form_query: {
+        rdOwner: '',
+        qaOwner: '',
+        devUrl: ''
+      },
       measurementTimeName: '实际提测时间',
       exitTimeName: '实际准出时间',
       onlineTimeName: '实际上线完成时间',
@@ -65,6 +88,11 @@ export default {
     statusName: {
       immediate: true,
       handler(statusName) {
+        if (statusName === '开发中') {
+          this.tabStatus = false
+        } else {
+          this.tabStatus = true
+        }
         if (statusName === '已提测') {
           this.name = this.measurementTime
           this.codeName = this.measurementTimeName
@@ -87,6 +115,9 @@ export default {
     getTaskData() {
       taskGet(this.task_Id).then(res => {
         this.taskData = res.data
+        this.form_query.rdOwner = this.taskData.rdOwner
+        this.form_query.qaOwner = this.taskData.qaOwner
+        this.form_query.devUrl = this.taskData.devUrl
       })
     },
     OnClose() {
@@ -116,8 +147,45 @@ export default {
           this.$message({ message: res.msg, type: 'success' })
         }
       })
+    },
+    taskStatus(data) {
+      if (!this.form_query.qaOwner) {
+        this.$message({ type: 'warning', message: '开发负责人、测试负责人不能为空' })
+        return
+      }
+      if (!this.form_query.rdOwner) {
+        this.$message({ type: 'warning', message: '开发负责人、测试负责人不能为空' })
+        return
+      }
+      if (this.taskData.isTaskDoc && !this.form_query.devUrl) {
+        this.$message({ type: 'warning', message: '开发负责人、测试负责人、技术文档不能为空' })
+        return
+      }
+      this.taskData.status = 60
+      this.taskData.rdOwner = this.form_query.rdOwner
+      this.taskData.qaOwner = this.form_query.qaOwner
+      this.taskData.isTaskDoc ? this.taskData.devUrl = this.form_query.devUrl : ''
+      const taskInfoDO = this.taskData
+      const user = this.userData
+      taskUpdate({ taskInfoDO, user }).then(res => {
+        if (res.code === 200) {
+          this.$emit('update:show', false)
+          this.$emit('getList')
+          this.$emit('changeStatusAll')
+          this.$message({ message: res.msg, type: 'success' })
+        }
+      })
     }
 
   }
 }
 </script>
+
+<style lang="scss" scoped>
+.qz_layout {
+  display: flex; justify-content: space-between; align-items: center;margin-bottom: 20px;
+}
+.qz_label {
+  width: 120px;
+}
+</style>

+ 1 - 1
src/views/projectManage/taskList/taskViewDetail.vue

@@ -810,7 +810,7 @@ export default {
       }
     },
     async updateStatus(e) { // 状态改变
-      if (e.status === 70 || e.status === 90 || e.status === 100) {
+      if (e.status === 60 || e.status === 70 || e.status === 90 || e.status === 100) {
         this.taskIds = this.form_query
         this.allStatus.map(item => {
           item.code === e.status ? this.taskIds.statusString = e.label : ''

+ 1 - 1
src/views/workbench/team/components/taskList.vue

@@ -260,7 +260,7 @@ export default {
       }
     },
     async changeStatus(e) { // 状态改变
-      if (e.status === 70 || e.status === 90 || e.status === 100) {
+      if (e.status === 60 || e.status === 70 || e.status === 90 || e.status === 100) {
         this.taskId = e
         this.allStatus.map(item => {
           item.code === e.status ? this.taskId.statusString = item.msg : ''

+ 7 - 1
src/views/workbench/team/index.vue

@@ -206,7 +206,8 @@ import {
   getTeamBugSummary,
   getTeamBugDisDataBy,
   teamReminding,
-  settingQueryBizAndTeamInfo
+  settingQueryBizAndTeamInfo,
+  getStaffByUsername
 } from '@/api/workSchedule'
 import { getSeprateDayInfo, scheduleDelete } from '@/api/projectViewDetails'
 import modifySchedule from '@/views/projectManage/projectList/components/modifySchedule'
@@ -343,11 +344,16 @@ export default {
   mounted() {
     this.queryTeamInfoList([-1])
     this.teamReminding()
+    this.getStaffByUsername()
   },
   methods: {
     setCascader() {
       this.$refs.cascader.$el.click()
     },
+    async getStaffByUsername() {
+      const res = await getStaffByUsername('qinzhipeng_v')
+      console.log(res, 'cdcdc')
+    },
     handleBizIdChange(val, option) {
       if (val.length > 0) {
         const one = val[0]