Browse Source

优化排期时间

qinzhipeng_v 5 years ago
parent
commit
13447922d8

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

@@ -241,7 +241,6 @@ export default {
 
     // 上传成功回调
     handleChange(response, file, fileList) {
-      this.fileDbList = []
       this.fileDbList.push({ 'name': file.name, 'url': 'http:' + file.response.url })
       this.accessory = JSON.stringify(this.fileDbList)
       this.dis = false
@@ -264,7 +263,7 @@ export default {
         this.clientTypeEnumList = res.data.clientTypeEnumList
         this.serviceTypeEnumList = res.data.serviceTypeEnumList
       })
-      await taskListCreate({}).then(res => { // 获取任务数据 (后期用this.taskStatus)
+      await taskListCreate({ statusList: [5, 6, 7, 8, 9, 10] }).then(res => { // 获取任务数据 (后期用this.taskStatus)
         this.taskIdStr = res.data
       })
       if (this.$route.query.id) {

+ 47 - 3
src/views/Platform/bugManage/bugQuery.vue

@@ -53,6 +53,7 @@
         </div>
         <div class="display-messege-end">
           <div class="divide-threeparts">reopen次数 :&nbsp;&nbsp;&nbsp;{{ form.reopenTimes }}</div>
+          <div class="divide-threeparts">reopen原因 :&nbsp;&nbsp;&nbsp;{{ form.reopenReason }}</div>
         </div>
       </div>
       <div class="block-end">
@@ -159,6 +160,17 @@
         <el-button type="primary" @click="queryFormDataRepair">确 定</el-button>
       </div>
     </el-dialog>
+    <el-dialog :visible.sync="dialogInReopen" width="40%">
+      <el-form ref="refeshReopenDialog" :model="pauseData" :rules="serviceDataRules">
+        <el-form-item label="reopen原因" prop="pauseReopenReason" label-width="30%">
+          <el-input v-model="pauseData.pauseReopenReason" type="textarea" autocomplete="off" rows="3" style="width:76%;" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogInReopen = false">取 消</el-button>
+        <el-button type="primary" @click="queryFormDataReopen">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -174,6 +186,7 @@ export default {
         id: ''
       },
       fileList: [],
+      dialogInReopen: false,
       uptataKey: [],
       formUpdateValue: {},
       dialogVisible: false,
@@ -183,13 +196,16 @@ export default {
         bugTypePause: '',
         pauseCurrentHandler: '',
         pauseRepairResult: '',
-        pauseReasonsAndSolutionForTheProblem: ''
+        pauseReasonsAndSolutionForTheProblem: '',
+        pauseReopenReason: ''
       },
       serviceDataRules: {
         pauseCurrentHandler: [{ required: true, message: '处理人不能为空', trigger: 'blur' }],
         reasonPause: [{ required: true, message: '问题原因不能为空', trigger: 'change' }],
         bugTypePause: [{ required: true, message: 'bug类型不能为空', trigger: 'change' }],
-        pauseRepairResult: [{ required: true, message: '修复结果不能为空', trigger: 'change' }]
+        pauseRepairResult: [{ required: true, message: '修复结果不能为空', trigger: 'change' }],
+        pauseReopenReason: [{ required: true, message: 'reopen原因不能为空', trigger: 'change' }]
+        // pauseReasonsAndSolutionForTheProblem: [{ required: true, message: '修复方式不能为空', trigger: 'change' }]
       },
       bizId: '',
       optionsCurrentHandlerQA: [],
@@ -262,7 +278,7 @@ export default {
       bugGet(this.$route.query.id).then(res => {
         this.form = res.data
         this.$nextTick(() => {
-          document.getElementById('specialP').childNodes[0].style.cssText = 'margin-top:0'
+          if (document.getElementById('specialP').childNodes[0])document.getElementById('specialP').childNodes[0].style.cssText = 'margin-top:0'
           if (document.getElementById('specialPAnother').childNodes[0])document.getElementById('specialPAnother').childNodes[0].style.cssText = 'margin-top:0'
         })
         this.fileList = []
@@ -311,6 +327,32 @@ export default {
     cancelInput() {
       this.pauseData.pauseCurrentHandler = ''
     },
+    // reopen弹窗
+    queryFormDataReopen() {
+      this.$refs.refeshReopenDialog.validate((valid) => {
+        if (valid) {
+          this.formUpdateValue.currentHandler = this.form.currentHandler
+          this.formUpdateValue.id = this.form.id
+          this.formUpdateValue.status = this.form.status
+          this.formUpdateValue.reopenReason = this.pauseData.pauseReopenReason
+          this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+          this.objData = { bugBaseInfo: this.formUpdateValue, user: this.userData }
+          bugUpdate(this.objData).then(res => {
+            if (res.code === 200) {
+              this.successFun()
+              this._initBegin()
+              if (this.$refs.refeshReopenDialog !== undefined) {
+                this.$refs.refeshReopenDialog.resetFields()
+              }
+            } else {
+              this.errorFun()
+            }
+          })
+          this.dialogInReopen = false
+          this.formUpdateValue = {}
+        }
+      })
+    },
     statusChange(e) {
       if (e === 1) {
         this.dialogInDevelopment = true
@@ -323,6 +365,8 @@ export default {
         this.pauseData.bugTypePause = this.form.bugType
       } else if (e === 3) {
         this.dialogInRepairResult = true
+      } else if (e === 4) {
+        this.dialogInReopen = true
       } else {
         this.formUpdateValue.currentHandler = this.form.currentHandler
         this.formUpdateValue.id = this.form.id

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

@@ -337,7 +337,7 @@ export default {
     },
     // 获取任务数据
     taskIdGet() {
-      taskListCreate({}).then(res => {
+      taskListCreate({ statusList: [5, 6, 7, 8, 9, 10] }).then(res => {
         this.taskIdStr = res.data
       })
     },
@@ -439,7 +439,6 @@ export default {
             this.form.appVersion = this.form.appVersionList.join(',')
             delete this.form.appVersionList
           }
-          // form.reopenTimes = parseInt(form.reopenTimes)
           form.accessory = this.accessory
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.objData = { bugBaseInfo: form, user: this.userData }

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

@@ -177,7 +177,6 @@ export default {
       if (newVisible) {
         if (this.title === '编辑需求') {
           this.form = JSON.parse(JSON.stringify(this.data))
-          console.log(this.form.pm, 'csdaac')
           this.form.pm = this.form.pm[0].idap
           this.init()
           this.form.modifier = localStorage.getItem('username')

+ 13 - 5
src/views/projectManage/taskList/taskViewDetails.vue

@@ -178,7 +178,7 @@
               <template slot-scope="scope">{{ scope.row.desc }}</template>
             </el-table-column>
             <el-table-column label="排期" min-width="200" align="center">
-              <template slot-scope="scope">{{ scope.row.startTime }} - {{ scope.row.endTime }}</template>
+              <template slot-scope="scope">{{ scope.row.startTime | naspOut }} - {{ scope.row.endTime | naspOut }}</template>
             </el-table-column>
             <el-table-column label="人员" min-width="200" align="center">
               <template slot-scope="scope">
@@ -204,7 +204,7 @@
             style="margin: 2% 3%; color: #333B4A; padding-bottom:2%;border-bottom:1px solid #E9E9E9;"
           >
             <el-col :span="12">
-              <div class="dateSet">排期汇总:{{ tiem_date.startTime }} ~ {{ tiem_date.endTime }}</div>
+              <div class="dateSet">排期汇总:{{ tiem_date.startTime | naspOut }} ~ {{ tiem_date.endTime | naspOut }}</div>
             </el-col>
           </el-row>
           <el-row
@@ -212,13 +212,13 @@
             style="margin: 2% 3%; color: #333B4A; padding-bottom:2%;border-bottom:1px solid #E9E9E9;"
           >
             <el-col :span="8">
-              <div class="dateSet">实际提测时间:{{ task_form.launchTestRealTime }}</div>
+              <div class="dateSet">实际提测时间:{{ task_form.launchTestRealTime | naspOut }}</div>
             </el-col>
             <el-col :span="8">
-              <div class="dateSet">实际准出时间:{{ task_form.testFinishRealTime }}</div>
+              <div class="dateSet">实际准出时间:{{ task_form.testFinishRealTime | naspOut }}</div>
             </el-col>
             <el-col :span="8">
-              <div class="dateSet">实际上线完成时间:{{ task_form.onlineRealTime }}</div>
+              <div class="dateSet">实际上线完成时间:{{ task_form.onlineRealTime | naspOut }}</div>
             </el-col>
           </el-row>
           <el-row
@@ -550,6 +550,14 @@ export default {
     openDialog,
     Gantt
   },
+  filters: {
+    naspOut(value) {
+      if (!value) return ''
+      var da = value.split(/\s+/)
+      console.log(da)
+      return da[0]
+    }
+  },
   data() {
     return {
       dialog_open: false,