qinzhipeng_v преди 5 години
родител
ревизия
f74af2e722

+ 5 - 2
src/apiConfig/api.js

@@ -1,3 +1,6 @@
 /*eslint-disable*/   //规避eslint的检查,如没有eslint可不写
-// export const mockUrl = 'http://10.179.24.176:8980' // 线下
-export const mockUrl = 'http://10.179.24.123:8980' // 线上
+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' // 美双姐本地
+

+ 2 - 2
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' // 线上
+export const mockUrl = 'http://10.179.88.110:8089' // 线下
+// export const mockUrl = 'http://mock.Intra.xiaojukeji.com' // 线上

+ 37 - 4
src/views/Platform/presentation/Acceptance.vue

@@ -156,7 +156,9 @@ export default {
       editorEle: '',
       editorSix: '',
       editorEight: '',
-      editorNine: ''
+      editorNine: '',
+      bizIdCode: '',
+      projectIdCode: ''
     }
   },
   created() {
@@ -240,7 +242,20 @@ export default {
     getRouterData() {
       this.showButton = true
       this.showButton1 = false
-      if (this.$route.query.data) {
+
+      if (this.$route.query.projectId) { // 项目页面新建
+        this.ClientData = {}
+        this.bizIdCode = this.$route.query.projectId.bizId
+        this.projectIdCode = this.$route.query.projectId.id
+      }
+
+      if (this.$route.query.task) { // 任务页面新建
+        this.ClientData = {}
+        this.bizIdCode = this.$route.query.task.bizId
+        this.projectIdCode = this.$route.query.task.id
+      }
+
+      if (this.$route.query.data) { // 报告主页更新
         this.showButton1 = true
         this.showButton = false
         this.ClientData = this.$route.query.data
@@ -286,6 +301,8 @@ export default {
         .then(() => { this.$message({ type: 'info', message: '继续修改' }) })
         .catch(action => { action === 'cancel' ? this.$router.go(-1) : '' })
     },
+
+    // 更新准出报告
     getQueryData(ele) {
       this.ClientData = ele
       typeof (this.editorElem) === 'string' ? this.ClientData.projectBackground = this.editorElem : ''
@@ -299,6 +316,14 @@ export default {
       typeof (this.editorEight) === 'string' ? this.ClientData.safeResultInfo = this.editorEight : ''
       typeof (this.editorNine) === 'string' ? this.ClientData.moniterResultInfo = this.editorNine : ''
       this.ClientData.status = this.status
+      // if (this.$route.query.projectId) { // 项目页面
+      //   this.ClientData.bizId = this.bizIdCode
+      //   this.ClientData.projectId = this.projectIdCode
+      // }
+      // if (this.$route.query.task) { // 任务页面
+      //   this.ClientData.bizId = this.bizIdCode
+      //   this.ClientData.projectId = this.projectIdCode
+      // }
       this.ClientData.taskLateStatus = this.taskLateStatus
       this.userData = { id: '', ename: this.userInformation, name: this.userNames }
       this.objData = { projectTestReport: this.ClientData, user: this.userData }
@@ -310,6 +335,8 @@ export default {
         }
       })
     },
+
+    // 新建准出提交
     getCreateData(ele) {
       this.$refs['ClientData'].validate((valid) => {
         if (valid) {
@@ -325,8 +352,14 @@ export default {
           typeof (this.editorEight) === 'string' ? this.ClientData.safeResultInfo = this.editorEight : ''
           typeof (this.editorNine) === 'string' ? this.ClientData.moniterResultInfo = this.editorNine : ''
           this.$route.query.id ? this.ClientData.taskId = this.$route.query.id : ''
-          this.$route.query.projectId ? this.ClientData.projectId = this.$route.query.projectId : ''
-          this.ClientData.bizId = this.bizIdData
+          if (this.$route.query.projectId) { // 项目页面
+            this.ClientData.bizId = this.bizIdCode
+            this.ClientData.projectId = this.projectIdCode
+          }
+          if (this.$route.query.task) { // 任务页面
+            this.ClientData.bizId = this.bizIdCode
+            this.ClientData.taskId = this.projectIdCode
+          }
           this.ClientData.status = this.status
           this.ClientData.taskLateStatus = this.taskLateStatus
           this.ClientData.type = 2

+ 28 - 7
src/views/Platform/presentation/ClientAcceptance.vue

@@ -29,8 +29,8 @@
       <el-col :span="23">
         <el-form-item label="开发人员" prop="developer" class="backStyle"><el-input v-model=" ClientData.developer" style="width:30.5vw;" /></el-form-item>
         <el-form-item label="开发周期" prop="devTimeEnd" class="backStyle" style="margin-left:80px;">
-          <el-date-picker v-model="ClientData.devTimeEnd" style="width:14.5vw;" type="date" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" /> —
-          <el-date-picker v-model="ClientData.devTimeStart" style="width:14.5vw;" type="date" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" />
+          <el-date-picker v-model="ClientData.devTimeEnd" style="width:14.5vw;" type="date" placeholder="选择日期" /> —
+          <el-date-picker v-model="ClientData.devTimeStart" style="width:14.5vw;" type="date" placeholder="选择日期" />
         </el-form-item>
       </el-col>
     </el-row>
@@ -104,7 +104,6 @@ export default {
       objData: '',
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
-      bizIdData: localStorage.getItem('key'),
       serviceDataRules: {
         reportName: [{ required: true, message: '报告标题不能为空', trigger: 'change' }],
         ownner: [{ required: true, message: 'by不能为空', trigger: 'change' }],
@@ -130,7 +129,9 @@ export default {
       acceptanceResult: '',
       ClientData: {},
       editorElem: [],
-      editorElems: []
+      editorElems: [],
+      bizIdCode: '',
+      projectIdCode: ''
     }
   },
   created() {
@@ -174,10 +175,24 @@ export default {
     this.getRouterData1()
   },
   methods: {
+
     getRouterData() {
       this.showButton = true
       this.showButton1 = false
-      if (this.$route.query.data) {
+      if (this.$route.query.projectId) { // 项目页面新建
+        console.log(this.$route.query.projectId)
+        this.ClientData = {}
+        this.bizIdCode = this.$route.query.projectId.bizId
+        this.projectIdCode = this.$route.query.projectId.id
+      }
+
+      if (this.$route.query.task) { // 任务页面新建
+        alert(' 任务页面新建')
+        this.ClientData = {}
+        this.bizIdCode = this.$route.query.task.bizId
+        this.projectIdCode = this.$route.query.task.id
+      }
+      if (this.$route.query.data) { // 准出主页面
         this.showButton1 = true
         this.showButton = false
         this.ClientData = this.$route.query.data
@@ -229,8 +244,14 @@ export default {
           this.ClientData.pftResult = this.pftResult
           this.ClientData.sctResult = this.sctResult
           this.ClientData.acceptanceResult = this.acceptanceResult
-          this.ClientData.taskId = this.$route.query.id
-          this.ClientData.bizId = this.bizIdData
+          if (this.$route.query.projectId) { // 项目页面
+            this.ClientData.bizId = this.bizIdCode
+            this.ClientData.projectId = this.projectIdCode
+          }
+          if (this.$route.query.task) { // 任务页面
+            this.ClientData.bizId = this.bizIdCode
+            this.ClientData.taskId = this.projectIdCode
+          }
           this.ClientData.status = this.status
           this.ClientData.taskLateStatus = this.taskLateStatus
           this.ClientData.type = 1

+ 37 - 29
src/views/Platform/presentation/DailyNewsAdded.vue

@@ -88,29 +88,21 @@ export default {
     return {
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
-      bizJson: localStorage.getItem('key'),
+      // bizJson: localStorage.getItem('key'),
       serviceDataRules: {
         reportName: [{ required: true, message: '报告标题不能为空', trigger: 'change' }],
         ownner: [{ required: true, message: 'by不能为空', trigger: 'change' }]
       },
-      value: '',
       todos: [
         { data: `<li><a>li</a></li>` },
         { data: `<li>li</li>` },
         { data: `<li>li</li>` }
       ],
-      steps: [],
-      content: null,
-      dialogFormVisible: false,
-      editorContent: '',
-      showDelay: false,
       showbut1: false,
       showbut: '',
-      sel: '1',
       showButton1: '',
       bugshow: '',
       showButton: true,
-      labelWidth: '60px',
       progressExplain: '', //  项目节点
       testExplain: '', // 测试情况
       bugNumCount: '', // bug统计
@@ -139,9 +131,9 @@ export default {
       statusMap: [],
       statusList: [],
       statusMap1: [],
-      swiper: '',
       pro: '',
-      gmtCreateEnd: ''
+      idCode: '', // 项目 任务的id
+      bizIdCode: '' // 业务线
     }
   },
   created() {
@@ -171,22 +163,27 @@ export default {
     getRouterData() {
       if (this.$route.query.data) {
         this.fromCreateData = this.$route.query.data
-        this.gntCreateEnd = this.fromCreateData.gmtCreate
         this.bugshow = this.fromCreateData.bugExplain
         this.showButton1 = true
         this.showButton = false
-      } else if (this.$route.query.id) {
+      }
+      if (this.$route.query.task) { // 任务页面
         this.fromCreateData = {}
-        this.fromCreateData.taskId = this.$route.query.id
         this.showButton1 = false
         this.showButton = true
-      } else if (this.$route.query.projectId) {
+        this.bizIdCode = this.$route.query.task.bizId
+        this.idCode = this.$route.query.task.id
+        this.pro = { taskId: this.idCode, bizId: this.fromCreateData.bizId }
+      }
+      if (this.$route.query.projectId) { // 项目页面
         this.fromCreateData = {}
-        this.fromCreateData.projectId = this.$route.query.projectId
         this.showButton1 = false
         this.showButton = true
+        this.bizIdCode = this.$route.query.projectId.bizId
+        this.idCode = this.$route.query.projectId.id
+        this.pro = { projectId: this.idCode, bizId: this.fromCreateData.bizId }
       }
-      this.pro = { taskId: this.fromCreateData.taskId, gntCreateEnd: this.gntCreateEnd }
+
       bugDailyList(this.pro).then(res => {
         this.dateList = res.data.dateList
         this.statusMap = res.data.statusMap
@@ -223,6 +220,8 @@ export default {
     getContent3(ele) {
       this.bugExplain = ele
     },
+
+    // 返回
     open(ele) {
       this.$confirm('是否放弃修改,离开页面?', '确认信息', {
         distinguishCancelAndClose: true,
@@ -232,18 +231,27 @@ export default {
         .then(() => { this.$message({ type: 'info', message: '继续修改' }) })
         .catch(action => { action === 'cancel' ? this.$router.go(-1) : '' })
     },
+
+    // 新建bug提交
     getCreateData(ele) {
+      console.log(ele)
       this.$refs['fromCreateData'].validate((valid) => {
         if (valid) {
           this.fromCreateData = ele
           typeof (this.TestProgress) === 'string' ? this.fromCreateData.testExplain = this.TestProgress : ''
-          // this.fromCreateData.testExplain = this.TestProgress
           typeof (this.bugExplain) === 'string' ? this.fromCreateData.bugExplain = this.bugExplain : ''
-          // this.fromCreateData.bugExplain = this.bugExplain
           typeof (this.projectProgress) === 'string' ? this.fromCreateData.problemRisks = this.projectProgress : ''
-          // this.fromCreateData.problemRisks = this.projectProgress
-          this.fromCreateData.taskId = this.$route.query.id
-          this.fromCreateData.bizId = this.bizJson
+          // this.fromCreateData.taskId !== '' ? this.fromCreateData.taskId = this.idCode : this.fromCreateData.projectId = this.idCode
+          if (this.$route.query.task) { // 任务页面
+            this.fromCreateData.taskId = this.idCode
+            this.fromCreateData.bizId = this.$route.query.task.bizId
+          }
+          if (this.$route.query.projectId) { // 项目页面
+            this.fromCreateData.projectId = this.idCode
+            this.fromCreateData.bizId = this.$route.query.projectId.bizId
+          }
+
+          this.fromCreateData.bizId = this.bizIdCode
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.objData = { dailyTestReport: this.fromCreateData, user: this.userData }
           dailyReportCreate(this.objData).then(res => {
@@ -259,12 +267,13 @@ export default {
         }
       })
     },
+
+    // 更新bug提交
     getQueryData(ele) {
       this.fromCreateData = ele
-      // this.fromCreateData.testExplain = this.TestProgress
       typeof (this.TestProgress) === 'string' ? this.fromCreateData.testExplain = this.TestProgress : ''
-      this.fromCreateData.bugExplain = this.bugExplain
-      // this.fromCreateData.problemRisks = this.projectProgress
+      typeof (this.bugExplain) === 'string' ? this.fromCreateData.bugExplain = this.bugExplain : ''
+      // this.fromCreateData.bugExplain = this.bugExplain
       typeof (this.projectProgress) === 'string' ? this.fromCreateData.problemRisks = this.projectProgress : ''
       this.userData = { id: '', ename: this.userInformation, name: this.userNames }
       this.objData = { dailyTestReport: this.fromCreateData, user: this.userData }
@@ -276,9 +285,12 @@ export default {
         }
       })
     },
+
+    // 预览跳转
     clickPreview(ele) {
       this.$router.push({ path: '/Platform/presentation/testPresenyL', query: { data: ele }})
     },
+
     deleteProject(e) {
       if (e === 1) {
         this.showbut1 = true
@@ -364,10 +376,6 @@ export default {
     border: 2px solid #ccc;
     background-color: #ccc;
     }
-    /* .selected:after{
-    background-color: #ccc;
-    border-color: #ccc;
-    } */
     .filling_line{
     position: absolute;
     z-index: 1;

+ 15 - 7
src/views/Platform/presentation/PresentReport.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 提测报告,新增报告 -->
+  <!-- 提测报告,新增客户端报告 -->
   <div>
     <el-form ref="dataChange" :inline="true" :model="dataChange" :rules="serviceDataRules" style="padding:30px; margin:7% 3%;background:#fff;">
       <el-row :gutter="20">
@@ -148,7 +148,6 @@ export default {
       objData: '',
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
-      bizIdData: localStorage.getItem('key'),
       id: '',
       name: '',
       labelWidth: '60px',
@@ -156,7 +155,9 @@ export default {
       DetailsOfProposal: '',
       lateStatus: '',
       configInfo: '',
-      dependentComponents: ''
+      dependentComponents: '',
+      bizIdCode: '',
+      projectIdCode: ''
     }
   },
   created() {
@@ -175,6 +176,10 @@ export default {
     getRouterData() {
       this.showButton = true
       this.showButton1 = false
+      if (this.$route.query.task) {
+        this.bizIdCode = this.$route.query.task.bizId
+        this.projectIdCode = this.$route.query.task.id
+      }
       if (this.$route.query.data) {
         this.showButton1 = true
         this.showButton = false
@@ -205,7 +210,7 @@ export default {
     getQueryData(ele) {
       this.dataChange = ele
       typeof (this.DetailsOfProposal) === 'string' ? this.dataChange.joinTest = this.DetailsOfProposal : ''
-      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      this.userData = { ename: this.userInformation, name: this.userNames }
       this.objData = { launchTestInfo: this.dataChange, user: this.userData }
       launchTestUpdate(this.objData).then(res => {
         if (res.code === 200) {
@@ -221,13 +226,16 @@ export default {
           this.dataChange = ele
           typeof (this.DetailsOfProposal) === 'string' ? this.dataChange.joinTest = this.DetailsOfProposal : ''
           // this.dataChange.joinTest = this.DetailsOfProposal
-          this.dataChange.taskId = this.$route.query.id
-          this.dataChange.bizId = this.bizIdData
+          if (this.$route.query.task) {
+            this.dataChange.taskId = this.projectIdCode
+            this.dataChange.bizId = this.bizIdCode
+          }
+
           this.dataChange.type = 1
           this.dataChange.lateStatus === 1 ? this.dataChange.lateStatus = 1 : this.dataChange.lateStatus = 2
           this.dataChange.configInfo === 1 ? this.dataChange.configInfo = ele.lateReason : this.dataChange.configInfo = ''
           this.dataChange.dependentComponents === 1 ? this.dataChange.dependentComponents = ele.lateReason : this.dataChange.dependentComponents = ''
-          this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+          this.userData = { ename: this.userInformation, name: this.userNames }
           this.objData = { launchTestInfo: this.dataChange, user: this.userData }
           launchTestCreate(this.objData).then(res => {
             if (res.code === 200) {

+ 13 - 5
src/views/Platform/presentation/presentationReport.vue

@@ -132,7 +132,6 @@
 
 <script>
 import { launchTestUpdate, launchTestCreate } from '@/api/InterfaceReport'
-
 import E from 'wangeditor'
 
 export default {
@@ -142,7 +141,6 @@ export default {
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
       priorityStrings: [{ name: 'p0', value: 0 }, { name: 'p1', value: 1 }, { name: 'p2', value: 2 }, { name: 'p3', value: 3 }],
-      bizIdData: localStorage.getItem('key'),
       serviceDataRules: {
         name: [{ required: true, message: '报告标题不能为空', trigger: 'change' }],
         submitter: [{ required: true, message: 'by不能为空', trigger: 'change' }],
@@ -171,7 +169,9 @@ export default {
       fromCreateData: {},
       editorContent: '',
       showData: false,
-      DetailsOfProposal: ''
+      DetailsOfProposal: '',
+      bizIdCode: '',
+      projectIdCode: ''
     }
   },
   created() {
@@ -201,6 +201,10 @@ export default {
     getRouterData() {
       this.showButton = true
       this.showButton1 = false
+      if (this.$route.query.task) { // 任务提测
+        this.bizIdCode = this.$route.query.task.bizId
+        this.projectIdCode = this.$route.query.task.id
+      }
       if (this.$route.query.data) {
         this.showButton1 = true
         this.showButton = false
@@ -257,8 +261,11 @@ export default {
           typeof (this.DetailsOfProposal) === 'string' ? this.fromCreateData.moduleInfo = this.DetailsOfProposal : ''
           this.fromCreateData.lateReason = ele.lateReason
           this.fromCreateData.lateStatus = this.lateStatus
-          this.fromCreateData.taskId = this.$route.query.id
-          this.fromCreateData.bizId = this.bizIdData
+
+          if (this.$route.query.task) { // 任务提测
+            this.fromCreateData.bizId = this.bizIdCode
+            this.fromCreateData.taskId = this.projectIdCode
+          }
           this.fromCreateData.type = 2
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.objData = { launchTestInfo: this.fromCreateData, user: this.userData }
@@ -276,6 +283,7 @@ export default {
       })
     },
     lateStatusChange(e) {
+      this.lateStatus = e
       e === '1' ? this.showDelay = true : this.showDelay = false
     },
     showStatusData(e) {

+ 88 - 78
src/views/Platform/projectPage.vue

@@ -17,34 +17,22 @@
 
     <el-table :data="list" style="width: 100%;margin-bottom: 20px;margin-top: 20px;" row-key="id" lazy>
       <el-table-column label="序号" prop="id" sortable align="center" min-width="80">
-        <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="200px" align="center">
-        <template v-slot="scope">
-          <el-tooltip content="点击进入详情页面" placement="top"><el-tag class="tag" @click="projectShowData(scope.row.id, scope.row)">{{ scope.row.name }}</el-tag></el-tooltip>
-        </template>
+        <template v-slot="scope"><el-tag style="cursor: pointer;" @click="projectShowData(scope.row.id, scope.row)">{{ scope.row.name }}</el-tag></template>
       </el-table-column>
       <el-table-column label="状态" min-width="80px" align="center">
-        <template slot-scope="scope">
-          <el-tag type="success"><span>{{ scope.row.statusString }}</span></el-tag>
-        </template>
+        <template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template>
       </el-table-column>
       <el-table-column label="创建时间" min-width="200px" align="center">
-        <template slot-scope="{row}">
-          <span>{{ row.createTime }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="上线时间" min-width="200px" align="center">
-        <template slot-scope="scope">
-          <span>{{ scope.row.allOnlineTime }}</span>
-        </template>
+        <template slot-scope="{row}">{{ row.createTime }}</template>
       </el-table-column>
+      <!-- <el-table-column label="上线时间" min-width="200px" align="center">
+        <template slot-scope="scope">{{ scope.row.allOnlineTime }}</template>
+      </el-table-column> -->
       <el-table-column v-if="statusproject" label="进展" min-width="200px" align="center">
-        <template slot-scope="scope">
-          <span>{{ scope.row.stageString }}</span>
-        </template>
+        <template slot-scope="scope">{{ scope.row.stageString }}</template>
       </el-table-column>
       <el-table-column label="操作" align="center" min-width="250px" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="{row}">
@@ -53,25 +41,19 @@
         </template>
       </el-table-column>
     </el-table>
-    <el-pagination
-      :current-page="curIndex"
-      :page-sizes="[5, 10, 20]"
-      :page-size="pageSize"
-      layout="total, sizes, prev, pager, next, jumper"
-      :total="total"
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-    />
+    <el-pagination :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+
+    <!----------------------------- 项目新增 ------------------------------>
 
-    <el-dialog :title="titleName" width="80%" :visible.sync="dialogFormVisible" @close="closeDialog">
-      <el-form ref="serviceDataForms" :model="form" :rules="serviceDataRules" style="width:93%;">
+    <el-dialog title="项目新增" width="80%" :visible.sync="dialogFormVisible" @close="closeDialog">
+      <el-form ref="form" :model="form" :rules="serviceDataRules" style="width:93%;">
         <el-form-item label="项目名称" prop="name" :label-width="formLabelWidths">
           <el-input v-model="form.name" autocomplete="off" placeholder="项目名称" />
         </el-form-item>
         <div style="display: flex;">
           <div style="flex:1;">
-            <el-form-item label="业务线" prop="bizIdString" :label-width="formLabelWidths">
-              <el-select v-model="form.bizIdString" placeholder="业务线">
+            <el-form-item label="业务线" prop="bizId" :label-width="formLabelWidths">
+              <el-select v-model="form.bizId" placeholder="业务线">
                 <el-option v-for="item in bizOptions" :key="item.value" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
@@ -202,59 +184,61 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogFormVisible = true, titleName === '新增'?createCode(form):updateData(form)">确 定</el-button>
+        <el-button type="primary" @click="dialogFormVisible = true, createCode(form)">确 定</el-button>
       </div>
     </el-dialog>
 
-    <el-dialog :title="titleName" width="80%" :visible.sync="dialogFormVisible1" @close="closeDialog">
-      <el-form ref="serviceDataForms" :model="form" :rules="serviceDataRules" style="width:93%;">
+    <!----------------------------- 项目编辑 ------------------------------>
+
+    <el-dialog title="项目编辑" width="80%" :visible.sync="dialogFormVisible1" @close="closeDialog">
+      <el-form ref="formQuery" :model="formQuery" :rules="serviceDataRules" style="width:93%;">
         <el-form-item label="项目名称" prop="name" :label-width="formLabelWidths">
-          <el-input v-model="form.name" autocomplete="off" placeholder="项目名称" />
+          <el-input v-model="formQuery.name" autocomplete="off" placeholder="项目名称" />
         </el-form-item>
         <div style="display: flex;">
           <div style="flex:1;">
-            <el-form-item label="业务线" prop="bizIdString" :label-width="formLabelWidths">
-              <el-select v-model="form.bizIdString" placeholder="业务线">
+            <el-form-item label="业务线" prop="bizId" :label-width="formLabelWidths">
+              <el-select v-model="formQuery.bizId" placeholder="业务线">
                 <el-option v-for="item in bizOptions" :key="item.value" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
             <el-form-item label="状态" prop="statusString" :label-width="formLabelWidths">
-              <el-select v-model="form.statusString" placeholder="状态">
+              <el-select v-model="formQuery.statusString" placeholder="状态">
                 <el-option v-for="item in statusOptionss" :key="item.value" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
             <el-form-item label="平台类型" prop="platForm" :label-width="formLabelWidths">
-              <el-select v-model="form.platForm" placeholder="平台类型">
+              <el-select v-model="formQuery.platForm" placeholder="平台类型">
                 <el-option v-for="item in platFormString" :key="item.code" :label="item.name" :value="item.code" />
               </el-select>
             </el-form-item>
           </div>
           <div style="flex:1;">
             <el-form-item label="优先级" prop="priorityString" :label-width="formLabelWidths">
-              <el-select v-model="form.priorityString" placeholder="优先级">
+              <el-select v-model="formQuery.priorityString" placeholder="优先级">
                 <el-option v-for="item in priorityStrings" :key="item.value" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
             <el-form-item label="进展" prop="stageString" :label-width="formLabelWidths">
-              <el-select v-model="form.stageString" placeholder="进展">
+              <el-select v-model="formQuery.stageString" placeholder="进展">
                 <el-option v-for="item in stageStrings" :key="item.value" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
           </div>
           <div style="flex:1;">
             <el-form-item label="PM" prop="pm" :label-width="formLabelWidths">
-              <el-input v-model="form.pm" autocomplete="off" />
+              <el-input v-model="formQuery.pm" autocomplete="off" />
             </el-form-item>
             <el-form-item label="版本" :label-width="formLabelWidths">
-              <el-input v-model="form.version" autocomplete="off" />
+              <el-input v-model="formQuery.version" autocomplete="off" />
             </el-form-item>
             <el-form-item v-show="false" label="创建人" :label-width="formLabelWidths">
-              <el-input v-model="form.creater" autocomplete="off" />
+              <el-input v-model="formQuery.creater" autocomplete="off" />
             </el-form-item>
           </div>
         </div>
         <el-form-item label="需求文档" :label-width="formLabelWidths">
-          <el-input v-model="form.mrdUrl" autocomplete="off" />
+          <el-input v-model="formQuery.mrdUrl" autocomplete="off" />
         </el-form-item>
         <el-button type="primary" round size="mini" icon="el-icon-arrow-down" style="cursor: pointer;" @click="show2 = !show2">详细添加</el-button>
         <transition name="el-zoom-in-top">
@@ -262,18 +246,18 @@
             <div style="display: flex;">
               <div style="flex;1;">
                 <el-form-item label="UE " :label-width="formLabelWidths">
-                  <el-input v-model="form.ue" style="width:220px;" autocomplete="off" />
+                  <el-input v-model="formQuery.ue" style="width:220px;" autocomplete="off" />
                 </el-form-item>
                 <el-form-item label="UI " :label-width="formLabelWidths">
-                  <el-input v-model="form.ui" style="width:220px;" autocomplete="off" />
+                  <el-input v-model="formQuery.ui" style="width:220px;" autocomplete="off" />
                 </el-form-item>
               </div>
               <div style="flex:1;margin-left:135px;">
                 <el-form-item label="RD " :label-width="formLabelWidths">
-                  <el-input v-model="form.rd" style="width:220px;" autocomplete="off" />
+                  <el-input v-model="formQuery.rd" style="width:220px;" autocomplete="off" />
                 </el-form-item>
                 <el-form-item label="QA " :label-width="formLabelWidths">
-                  <el-input v-model="form.qa" style="width:220px;" autocomplete="off" />
+                  <el-input v-model="formQuery.qa" style="width:220px;" autocomplete="off" />
                 </el-form-item>
               </div>
             </div>
@@ -285,16 +269,16 @@
         </transition>
         <div style="display: flex; padding-top:30px; width: 100%;">
           <el-form-item label="备注" style="flex:1;" label-width="180px">
-            <el-input v-model="form.remarks" type="textarea" :rows="4" placeholder="备注" />
+            <el-input v-model="formQuery.remarks" type="textarea" :rows="4" placeholder="备注" />
           </el-form-item>
           <el-form-item label="描述" style="flex:1;" label-width="130px">
-            <el-input v-model="form.description" type="textarea" :rows="4" placeholder="请输入内容" />
+            <el-input v-model="formQuery.description" type="textarea" :rows="4" placeholder="请输入内容" />
           </el-form-item>
         </div>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible1 = false">取 消</el-button>
-        <el-button type="primary" @click="dialogFormVisible1 = true, titleName === '新增'?createCode(form):updateData(form)">确 定</el-button>
+        <el-button type="primary" @click="dialogFormVisible1 = true, updateData(formQuery)">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -308,11 +292,11 @@ export default {
   name: 'Projects',
   data() {
     return {
+      show: false,
       list: [],
       show2: false,
       test: false,
       time: false,
-      titleName: '',
       formLabelWidths: '160px',
       formLabelWidth: '150px',
       curIndex: 1, // 初始页
@@ -339,6 +323,7 @@ export default {
       bizJson: '',
       deleteCode: '',
       userData: '',
+      formQuery: {},
       pickerOptions: {
         disabledDate(time) {
           return time.getTime() > Date.now()
@@ -373,7 +358,7 @@ export default {
         notest: [{ required: true, message: '是否免测不能为空', trigger: 'change' }],
         type: [{ required: true, message: '平台类型不能为空', trigger: 'change' }],
         name: [{ required: true, message: '项目名称不能为空', trigger: 'change' }],
-        bizIdString: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
+        bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
         statusString: [{ required: true, message: '状态不能为空', trigger: 'change' }],
         priorityString: [{ required: true, message: '优先级不能为空', trigger: 'change' }],
         stageString: [{ required: true, message: '进展不能为空', trigger: 'change' }],
@@ -398,10 +383,32 @@ export default {
         pageSize: this.pageSize,
         curIndex: this.curIndex
       }
-      projectInit(this.queryListData).then(response => {
-        this.list = response.data
-        this.total = this.list.length
-        this.platFormString = response.query.platformTypeEnumList
+      projectInit(this.queryListData).then(res => {
+        if (res.data === null) {
+          this.list = []
+          this.total = 0
+        } else {
+          this.list = res.data
+          this.total = this.list.length
+        }
+        this.platFormString = res.query.platformTypeEnumList
+      })
+    },
+
+    // dialog返回数据
+    createdData(data) {
+      this.bizData = data
+      typeof (this.timeInfo) === 'string' ? this.bizData.timeInfo = this.timeInfo : ''
+      this.userData = { ename: this.userInformation, name: this.userNames }
+      this.objData = { projectInfo: this.bizData, user: this.userData }
+      addProject(this.objData).then(response => {
+        if (response.code === 200) {
+          this.getList()
+          this.successFun(response.msg)
+          this.show = false
+        } else {
+          this.errorFun(response.msg)
+        }
       })
     },
 
@@ -412,12 +419,11 @@ export default {
       this.timeInfo.customConfig.onchange = (html) => { this.timeInfo = html }
     },
 
-    // 新建项目
+    // 点击新建项目
     changeaddData() {
       this.$nextTick(() => {
-        this.$refs['serviceDataForms'].clearValidate()
+        this.$refs['form'].clearValidate()
       })
-      this.titleName = '新增'
 
       setTimeout(() => {
         this.testInfo.customConfig.uploadImgServer = '/upload-img' // 上传图片到服务器
@@ -441,10 +447,12 @@ export default {
       this.form = {}
     },
 
+    // 新建项目
     createCode(vel) {
-      this.$refs['serviceDataForms'].validate((valid) => {
+      this.$refs['form'].validate((valid) => {
         if (valid) {
           this.bizData = vel
+          console.log(this.bizData)
           typeof (this.timeInfo) === 'string' ? this.bizData.timeInfo = this.timeInfo : ''
           for (var a of this.statusOptionss) {
             vel.statusString === a.name ? this.bizData.status = a.value : ''
@@ -455,18 +463,20 @@ export default {
           for (var f of this.stageStrings) {
             vel.stageString === f.name ? this.bizData.stage = f.value : ''
           }
-          this.bizData.bizId = this.bizJson
+          for (var e of this.bizOptions) {
+            vel.bizId === e.name ? this.bizData.bizId = e.value : ''
+          }
         } else {
           console.log('error submit!!')
           return false
         }
 
-        this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+        this.userData = { ename: this.userInformation, name: this.userNames }
         this.objData = { projectInfo: this.bizData, user: this.userData }
         addProject(this.objData).then(response => {
           if (response.code === 200) {
             this.getList()
-            this.successFun()
+            this.successFun(response.msg)
             this.dialogFormVisible = false
           } else {
             this.errorFun(response.msg)
@@ -475,6 +485,7 @@ export default {
       })
     },
 
+    // 关闭dialog回掉
     closeDialog() {
       this.testInfo = new E('#testInfo')
       this.timeInfo = new E('#timeInfo')
@@ -485,12 +496,14 @@ export default {
 
     // 项目编辑
     changeData(vel) {
-      this.titleName = '编辑'
       for (var a of this.list) {
         if (a.id === vel.id) {
-          this.form = a
+          this.formQuery = a
         }
       }
+      for (var e of this.bizOptions) {
+        this.formQuery.bizId === e.value ? this.formQuery.bizId = e.name : ''
+      }
       for (var b of this.platFormString) {
         b.code === this.projectData.platForm ? this.projectData.platForm = b.name : ''
       }
@@ -504,10 +517,11 @@ export default {
         this.timeInfo.customConfig.menus = ['bold', 'foreColor', 'italic', 'underline', 'list', 'justify', 'table']
         this.timeInfo.customConfig.onchange = (html) => { this.timeInfo = html }
         this.timeInfo.create()
-        this.timeInfo.txt.html(this.form.timeInfo)
+        this.timeInfo.txt.html(this.formQuery.timeInfo)
       }, 100)
     },
 
+    // 项目编辑提交
     updateData(vel) {
       this.bizData = vel
       typeof (this.timeInfo) === 'string' ? this.bizData.timeInfo = this.timeInfo : ''
@@ -518,7 +532,7 @@ export default {
         vel.priorityString === s.name ? this.bizData.priority = s.value : ''
       }
       for (var d of this.bizOptions) {
-        vel.bizIdString === d.name ? this.bizData.bizId = d.value : ''
+        vel.bizId === d.name ? this.bizData.bizId = d.value : ''
       }
       for (var f of this.stageStrings) {
         vel.stageString === f.name ? this.bizData.stage = f.value : ''
@@ -530,9 +544,9 @@ export default {
       } else {
         this.bizData.id = vel.id
       }
-      this.bizData.status = vel.status
-      this.bizData.priority = vel.priority
-      this.bizData.stage = vel.stage
+      // this.bizData.status = vel.status
+      // this.bizData.priority = vel.priority
+      // this.bizData.stage = vel.stage
       this.userData = { id: '', ename: this.userInformation, name: this.userNames }
       this.objData = { projectInfo: this.bizData, user: this.userData }
       updateProject(this.objData).then(response => {
@@ -573,7 +587,6 @@ export default {
       deleteProject(e, this.userData).then(response => {
         if (response.code === 200) {
           this.getList()
-          this.successFun()
         } else {
           this.errorFun(response.msg)
         }
@@ -629,7 +642,4 @@ export default {
     border: 2px solid #ccc;
     height: auto;
   }
-  .tag {
-    cursor: pointer;
-  }
 </style>

+ 58 - 68
src/views/Platform/projectQuery/projectQuery.vue

@@ -9,47 +9,42 @@
         <el-divider />
         <div>
           <div style=" diaplay: flex; padding-top:30px;">
-            <span class="tableproject" style="flex:1;">状态</span>
+            <span style="flex:1;">状态</span>
             <el-select v-model="projectData.status" style="width: 100px;" size="mini" placeholder="状态" @change="updateData(projectData)">
               <el-option v-for="item in processStatusEnumList" :key="item.code" :label="item.name" :value="item.code" />
             </el-select>
-            <span class="tableproject" style="flex:1;">优先级</span>
+            <span style="flex:1;">优先级</span>
             <el-select v-model="projectData.priority" style="width: 100px;" size="mini" placeholder="优先级" @change="updateData(projectData)">
               <el-option v-for="item in priorityEnumList" :key="item.code" :label="item.name" :value="item.code" />
             </el-select>
-            <span class="tableproject" style="flex:1;">进展</span>
+            <span style="flex:1;">进展</span>
             <el-select v-model="projectData.stage" placeholder="进展" style="width: 100px;" size="mini" @change="updateData(projectData)">
               <el-option v-for="item in stageEnumList" :key="item.code" :label="item.name" :value="item.code" />
             </el-select>
-            <el-button type="primary" size="small" @click="createReport(2, projectData)">新建日报报告</el-button>
-            <el-button type="primary" size="small" @click="createReport(3, projectData)">新建准出报告</el-button>
+            <el-button type="primary" size="small" @click="createDailyReport(projectData)">新建日报报告</el-button>
+            <el-button type="primary" size="small" @click="createReport(projectData)">新建准出报告</el-button>
             <el-button type="primary" size="small" @click=" dialogFormTaskVisible = true, changeaddTaskData(projectData, 1)">新建任务</el-button>
             <el-button type="primary" size="small" style="float:right;margin-right:7%" @click="dialogFormVisible = true, changeData(projectData)">编辑</el-button>
           </div>
           <el-divider />
-          <!-- <el-form style=" padding-left: 100px;" label="right" size="mini" label-width="110px">
-            <el-form-item label="项目名称 :"><span>{{ projectData.name }}</span></el-form-item>
-          </el-form> -->
           <div style="display:flex;">
             <el-form style="flex:1; padding-left: 100px;" label="right" size="mini" label-width="110px">
-              <el-form-item label="项目名称 :"><span>{{ projectData.name }}</span></el-form-item>
-              <el-form-item label="PM :"><span>{{ projectData.pm }}</span></el-form-item>
-              <el-form-item label="版本 :"><span>{{ projectData.version }}</span></el-form-item>
-              <!-- <el-form-item label="计划上线时间 :"><span>{{ projectData.allOnlineTime }}</span></el-form-item> -->
-              <!-- <el-form-item label="开始时间 :"><span>{{ projectData.createTime }}</span></el-form-item> -->
+              <el-form-item label="项目名称 :">{{ projectData.name }}</el-form-item>
+              <el-form-item label="PM :">{{ projectData.pm }}</el-form-item>
+              <el-form-item label="版本 :">{{ projectData.version }}</el-form-item>
+              <!-- <el-form-item label="计划上线时间 :">{{ projectData.allOnlineTime }}</el-form-item> -->
+              <!-- <el-form-item label="开始时间 :">{{ projectData.createTime }}</el-form-item> -->
             </el-form>
             <el-form style="flex:1; padding-left: 100px;" label="right" size="mini" label-width="110px">
-              <el-form-item label="平台类型 :"><span>{{ projectData.platForm }}</span></el-form-item>
-              <el-form-item label="QA :"><span>{{ projectData.qa }}</span></el-form-item>
-              <el-form-item label="RD :"><span>{{ projectData.rd }}</span></el-form-item>
+              <el-form-item label="平台类型 :">{{ projectData.platForm }}</el-form-item>
+              <el-form-item label="QA :">{{ projectData.qa }}</el-form-item>
+              <el-form-item label="RD :">{{ projectData.rd }}</el-form-item>
             </el-form>
           </div>
           <el-form style=" padding-left: 100px;" label="right" size="mini" label-width="110px">
-            <el-form-item label="需求文档 :"><span>{{ projectData.mrdUrl }}</span></el-form-item>
-          </el-form>
-
-          <el-form style=" padding-left: 100px;" label="right" size="mini" label-width="110px">
-            <el-form-item label="描述 :"><span>{{ projectData.description }}</span></el-form-item>
+            <el-form-item label="需求文档 :">{{ projectData.mrdUrl }}</el-form-item>
+            <el-form-item label="描述 :">{{ projectData.description }}</el-form-item>
+            <el-form-item label="备注 :">{{ projectData.remarks }}</el-form-item>
           </el-form>
         </div>
         <el-button type="primary" round size="mini" icon="el-icon-arrow-down" style="cursor: pointer;" @click="show2 = !show2">详细查看</el-button>
@@ -57,10 +52,10 @@
           <div v-show="show2" style="width:100%; padding-top:30px;">
             <div style="display: flex;">
               <el-form style="flex:1.7; margin-left: 100px;" label="right" size="mini" label-width="100px">
-                <el-form-item label="UE :"><span>{{ projectData.ue }}</span></el-form-item>
+                <el-form-item label="UE :">{{ projectData.ue }}</el-form-item>
               </el-form>
               <el-form style="flex:1; margin-right: 130px;" label="right" size="mini" label-width="100px">
-                <el-form-item label="UI :"><span>{{ projectData.ui }}</span></el-form-item>
+                <el-form-item label="UI :">{{ projectData.ui }}</el-form-item>
               </el-form>
             </div>
             <div>
@@ -68,27 +63,27 @@
             </div>
             <!-- <div style="display: flex;">
               <el-form style="flex:1; margin-left: 50px;" label="right" size="mini" label-width="150px">
-                <el-form-item label="需求评审时间 :"><span>{{ projectData.mrdTime }}</span></el-form-item>
-                <el-form-item label="服务端开始开发时间 :"><span>{{ projectData.serviceDevTime }}</span></el-form-item>
+                <el-form-item label="需求评审时间 :">{{ projectData.mrdTime }}</el-form-item>
+                <el-form-item label="服务端开始开发时间 :">{{ projectData.serviceDevTime }}</el-form-item>
               </el-form>
               <el-form style="flex:1; margin-right: -50px;" label="right" size="mini" label-width="150px">
-                <el-form-item label="全量时间 :"><span>{{ projectData.allOnlineTime }}</span></el-form-item>
-                <el-form-item label="客户端提测时间 :"><span>{{ projectData.clientLaunchTestTime }}</span></el-form-item>
+                <el-form-item label="全量时间 :">{{ projectData.allOnlineTime }}</el-form-item>
+                <el-form-item label="客户端提测时间 :">{{ projectData.clientLaunchTestTime }}</el-form-item>
               </el-form>
             </div> -->
-            <!-- <el-form style="margin-left: 95px;"><el-form-item label="开发联调时间 :"><span>{{ projectData.joinTestTime }}</span></el-form-item></el-form>
+            <!-- <el-form style="margin-left: 95px;"><el-form-item label="开发联调时间 :">{{ projectData.joinTestTime }}</el-form-item></el-form>
             <div style="display: flex;">
               <el-form style="flex:1; margin-left: 50px;" label="right" size="mini" label-width="150px">
-                <el-form-item label="服务端测试完成时间 :"><span>{{ projectData.serviceFinishTestTime }}</span></el-form-item>
-                <el-form-item label="服务端提测时间 :"><span>{{ projectData.serviceLaunchTestTime }}</span></el-form-item>
-                <el-form-item label="服务端上线时间 :"><span>{{ projectData.serverOnLine }}</span></el-form-item>
-                <el-form-item label="产品验收时间 :"><span>{{ projectData.pmTestTime }}</span></el-form-item>
+                <el-form-item label="服务端测试完成时间 :">{{ projectData.serviceFinishTestTime }}</el-form-item>
+                <el-form-item label="服务端提测时间 :">{{ projectData.serviceLaunchTestTime }}</el-form-item>
+                <el-form-item label="服务端上线时间 :">{{ projectData.serverOnLine }}</el-form-item>
+                <el-form-item label="产品验收时间 :">{{ projectData.pmTestTime }}</el-form-item>
               </el-form>
               <el-form style="flex:1; margin-left: 50px;" label="right" size="mini" label-width="150px">
-                <el-form-item label="客户端开始开发时间 :"><span>{{ projectData.clientDevTime }}</span></el-form-item>
-                <el-form-item label="客户端测试完成时间 :"><span>{{ projectData.clientFinishTestTime }}</span></el-form-item>
-                <el-form-item label="客户端上线时间 :"><span>{{ projectData.clientOnlineTime }}</span></el-form-item>
-                <el-form-item label="灰度时间 :"><span>{{ projectData.pmTestTime }}</span></el-form-item>
+                <el-form-item label="客户端开始开发时间 :">{{ projectData.clientDevTime }}</el-form-item>
+                <el-form-item label="客户端测试完成时间 :">{{ projectData.clientFinishTestTime }}</el-form-item>
+                <el-form-item label="客户端上线时间 :">{{ projectData.clientOnlineTime }}</el-form-item>
+                <el-form-item label="灰度时间 :">{{ projectData.pmTestTime }}</el-form-item>
               </el-form>
             </div> -->
           </div>
@@ -98,10 +93,10 @@
           <el-tabs tab-position="top" style="height: 200px; width:100%;">
             <el-tab-pane label="任务信息">
               <el-table :data="listData" style="width: 100%" max-height="310">
-                <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope"><span>{{ scope.row.id }}</span></template></el-table-column>
-                <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope"><el-tooltip content="点击查看详情页面" placement="top" style="cursor: pointer;"><el-tag class="tag" @click="getClickId(scope.row)">{{ scope.row.name }}</el-tag></el-tooltip></template></el-table-column>
-                <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope"><span>{{ scope.row.createTime }}</span></template></el-table-column>
-                <el-table-column label="状态" prop="statusString" align="center" min-width="80"><template slot-scope="scope"><span>{{ scope.row.statusString }}</span></template></el-table-column>
+                <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope">{{ scope.row.id }}</template></el-table-column>
+                <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope"><el-tag style="cursor: pointer;" @click="getClickId(scope.row)">{{ scope.row.name }}</el-tag></template></el-table-column>
+                <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.createTime }}</template></el-table-column>
+                <el-table-column label="状态" prop="statusString" align="center" min-width="80"><template slot-scope="scope">{{ scope.row.statusString }}</template></el-table-column>
                 <el-table-column label="操作" align="center" min-width="150">
                   <template slot-scope="{row}">
                     <el-button type="primary" size="mini" @click=" dialogFormTaskVisible = true, changeaddTaskData(row, 2)">编辑</el-button>
@@ -114,14 +109,14 @@
               <el-table :data="dailyTestReports" max-height="390" style="width: 100%">
                 <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope">{{ scope.row.id }}</template></el-table-column>
                 <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope">{{ scope.row.reportName }}</template></el-table-column>
-                <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.createTime }}</template></el-table-column>
+                <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.gmtCreate }}</template></el-table-column>
               </el-table>
             </el-tab-pane>
             <el-tab-pane label="准出报告">
               <el-table :data="projectTestReports" max-height="390" style="width: 100%">
                 <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope">{{ scope.row.id }}</template></el-table-column>
                 <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope">{{ scope.row.reportName }}</template></el-table-column>
-                <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.createTime }}</template></el-table-column>
+                <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.gmtCreate }}</template></el-table-column>
                 <el-table-column label="状态" prop="status" align="center" min-width="80"><template slot-scope="scope">{{ scope.row.statusString }}</template></el-table-column>
               </el-table>
             </el-tab-pane>
@@ -309,7 +304,7 @@
           <div style="flex:1;">
             <el-form-item label="平台类型" prop="type" label-width="100px">
               <el-select v-model="formTask.type" placeholder="平台类型" @change="changeType(formTask.type)">
-                <el-option v-for="item in typeString" :key="item.code" :label="item.name" :value="item.code" />
+                <el-option v-for="item in typeString" :key="item.code" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
             <el-form-item label="状态" prop="status" label-width="100px">
@@ -336,7 +331,7 @@
             </el-form-item>
             <el-form-item v-if="osTypeShow" label="端类型" prop="osType" label-width="100px">
               <el-select v-model="formTask.osType" placeholder="端类型">
-                <el-option v-for="item in osTypeEnum" :key="item.code" :label="item.name" :value="item.code" />
+                <el-option v-for="item in osTypeEnum" :key="item.code" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
           </div>
@@ -525,6 +520,8 @@ export default {
           for (var a of this.platFormString) {
             a.code === this.projectData.platForm ? this.projectData.platForm = a.name : ''
           }
+          this.form.clientType !== '' ? this.business = true : this.business = false
+          this.business === false ? this.osTypeShow = false : this.osTypeShow = true
           this.parameter = res.data.id
         })
       }
@@ -613,7 +610,7 @@ export default {
     // chnage 平台类型
     changeType(e) {
       for (var b of this.typeString) {
-        if (e === b.code) {
+        if (e === b.name) {
           this.businessTypeStr = b.child
           b.child !== null ? this.business = true : this.business = false
         }
@@ -707,23 +704,23 @@ export default {
             })
             this.codeTitle = '任务新增'
             this.formTask = {}
+            this.business = false
+            this.osTypeShow = false
             break
           case 2:
             this.codeTitle = '任务编辑'
             this.formTask = ele
-            ele.clientType !== null ? this.business = true : this.business = false
-            ele.osType !== null ? this.osTypeShow = true : this.osTypeShow = false
+            ele.clientType !== '' ? this.business = true : this.business = false
+            ele.osType !== '' ? this.osTypeShow = true : this.osTypeShow = false
+            this.business === false ? this.osTypeShow = false : ''
             for (var b of this.bizIdEnumList) {
               ele.bizId === b.code ? this.typeString = b.child : ''
             }
             for (var s of this.typeString) {
-              ele.type === s.code ? this.businessTypeStr = s.child : ''
+              ele.type === s.name ? this.businessTypeStr = s.child : ''
             }
-            // for (var c of this.typeString) {
-            //   ele.clientType === c.name ? this.businessTypeStr = c.child : ''
-            // }
             for (var d of this.businessTypeStr) {
-              ele.osType === d.code ? this.osTypeEnum = d.child : ''
+              ele.osType === d.name ? this.osTypeEnum = d.child : ''
             }
         }
       })
@@ -755,24 +752,17 @@ export default {
       })
     },
 
-    // 新建准出,日报报告跳转
-    createReport(e, ele) {
+    // 新建日报报告
+    createDailyReport(ele) {
+      this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { projectId: ele }})
+    },
+
+    // 新建准出报告
+    createReport(ele) {
       if (ele.platForm !== '服务端') {
-        switch (e) {
-          case 2:
-            this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { projectId: this.parameter }})
-            break
-          case 3:
-            this.$router.push({ path: '/Platform/presentation/ClientAcceptance', query: { projectId: this.parameter }})
-        }
+        this.$router.push({ path: '/Platform/presentation/ClientAcceptance', query: { projectId: ele }}) // 客户端
       } else {
-        switch (e) {
-          case 2:
-            this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { projectId: this.parameter }})
-            break
-          case 3:
-            this.$router.push({ path: '/Platform/presentation/Acceptance', query: { projectId: this.parameter }})
-        }
+        this.$router.push({ path: '/Platform/presentation/Acceptance', query: { projectId: ele }}) // 服务端
       }
     },
 

+ 30 - 47
src/views/Platform/projectQuery/taskQuery.vue

@@ -7,11 +7,11 @@
         <el-divider />
         <div width="70%" style="padding-top:30px;">
           <div style="padding-bottom:5px; diaplay: flex;">
-            <span class="tableproject" style="flex:1;">状态</span>
+            <span style="flex:1;">状态</span>
             <el-select v-model="form.status" style="width: 100px;" size="mini" placeholder="状态" @change="updateaddTaskData(form)">
               <el-option v-for="item in processStatusEnumList" :key="item.code" :label="item.name" :value="item.code" />
             </el-select>
-            <span class="tableproject" style="flex:1;">优先级</span>
+            <span style="flex:1;">优先级</span>
             <el-select v-model="form.priority" style="width: 100px;" size="mini" placeholder="优先级" @change="updateaddTaskData(form)">
               <el-option v-for="item in bugLevelStr" :key="item.code" :label="item.name" :value="item.code" />
             </el-select>
@@ -77,11 +77,11 @@
           <div style="margin-top:20px; width=100%">
             <el-tabs tab-position="top" style="height: 200px; width:100%;">
               <el-tab-pane label="提测报告">
-                <el-table :data="listTaskDatas" style="width: 100%" max-height="390" @row-click="queryData">
-                  <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope"><span>{{ scope.row.id }}</span></template></el-table-column>
-                  <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
-                  <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope"><span>{{ scope.row.gmtCreate }}</span></template></el-table-column>
-                  <el-table-column label="状态" prop="statusString" align="center" min-width="80"><template slot-scope="scope"><span>{{ scope.row.statusString }}</span></template></el-table-column>
+                <el-table :data="listTaskDatas" style="width: 100%" max-height="390">
+                  <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope">{{ scope.row.id }}</template></el-table-column>
+                  <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope"><el-tag style="cursor: pointer;" @click="queryData(scope.row)">{{ scope.row.name }}</el-tag></template></el-table-column>
+                  <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.gmtCreate }}</template></el-table-column>
+                  <el-table-column label="状态" prop="statusString" align="center" min-width="80"><template slot-scope="scope">{{ scope.row.statusString }}</template></el-table-column>
                   <el-table-column label="操作" align="center" min-width="150">
                     <template slot-scope="scope">
                       <el-button type="primary" size="small" disabled>查看</el-button>
@@ -94,14 +94,14 @@
               <el-tab-pane label="日报报告">
                 <el-table :data="dailyTestReports" max-height="390" style="width: 100%">
                   <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope">{{ scope.row.id }}</template></el-table-column>
-                  <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope"><el-tooltip content="点击查看详情页面" placement="top" style="cursor: pointer;"><el-tag class="tag" @click="getClickId(scope.row)">{{ scope.row.reportName }}</el-tag></el-tooltip></template></el-table-column>
+                  <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope"><el-tag style="cursor: pointer;" @click="getClickId(scope.row)">{{ scope.row.reportName }}</el-tag></template></el-table-column>
                   <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.gmtCreate }}</template></el-table-column>
                 </el-table>
               </el-tab-pane>
               <el-tab-pane label="准出报告">
                 <el-table :data="projectTestReports" max-height="390" style="width: 100%">
                   <el-table-column label="ID" prop="id" align="center" min-width="60"><template slot-scope="scope">{{ scope.row.id }}</template></el-table-column>
-                  <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope">{{ scope.row.reportName }}</template></el-table-column>
+                  <el-table-column label="标题" prop="name" align="center" min-width="100"><template slot-scope="scope"><el-tag style="cursor: pointer;">{{ scope.row.reportName }}</el-tag></template></el-table-column>
                   <el-table-column label="创建时间" prop="gmtCreate" align="center" min-width="150"><template slot-scope="scope">{{ scope.row.gmtCreate }}</template></el-table-column>
                   <el-table-column label="状态" prop="status" align="center" min-width="80"><template slot-scope="scope">{{ scope.row.statusString }}</template></el-table-column>
                 </el-table>
@@ -150,7 +150,7 @@
             <div style="flex:1;">
               <el-form-item label="平台类型" prop="type" label-width="100px">
                 <el-select v-model="fromCode.type" placeholder="平台类型" @change="changeType(fromCode.type)">
-                  <el-option v-for="item in typeString" :key="item.code" :label="item.name" :value="item.code" />
+                  <el-option v-for="item in typeString" :key="item.code" :label="item.name" :value="item.name" />
                 </el-select>
               </el-form-item>
               <el-form-item label="状态" prop="status" label-width="100px">
@@ -177,7 +177,7 @@
               </el-form-item>
               <el-form-item v-if="osTypeShow" label="端类型" prop="osType" label-width="100px">
                 <el-select v-model="fromCode.osType" placeholder="端类型">
-                  <el-option v-for="item in osTypeEnum" :key="item.code" :label="item.name" :value="item.code" />
+                  <el-option v-for="item in osTypeEnum" :key="item.code" :label="item.name" :value="item.name" />
                 </el-select>
               </el-form-item>
             </div>
@@ -338,16 +338,17 @@ export default {
       taskIdStr: '',
       url: '',
       arrurl: '',
-      show2: false
+      show2: false,
+      cun: ''
     }
   },
   created() {
-    this.beforeCreate()
     this.bugListSelect()
     this.getList()
   },
   methods: {
     getList() {
+      this.beforeCreate()
       this.url = window.location.href // 获取url中"?"符后的字串
       this.arrurl = this.url.split('?id=')
       getTaskData(this.arrurl[1]).then(res => {
@@ -358,24 +359,14 @@ export default {
         this.dailyTestReports = res.data.dailyTestReports
         this.projectBug = res.data.bugBaseInfoDOS
         this.form = res.data
-        // console.log(this.form)
         this.fromCode = res.data
-        // console.log(typeof (this.form.osType))
-        if (typeof (this.form.osType) === 'number') {
-          for (var a of this.osTypeEnum) {
-            this.form.osType === a.code ? this.form.osType = a.name : ''
-          }
-        }
-        if (typeof (this.form.type) === 'number') {
-          for (var s of this.bizIdEnumList) {
-            this.form.bizId === s.code ? this.typeString = s.child : ''
-            for (var d of this.typeString) {
-              this.form.type === d.code ? this.form.type = d.name : ''
-            }
-          }
+
+        for (var s of this.bizIdEnumList) { // 获取bizId
+          this.form.bizId === s.code ? this.typeString = s.child : ''
         }
+        this.fromCode.osType === '' ? this.osTypeShow = false : this.osTypeShow = true
         this.form.clientType !== '' ? this.business = true : this.business = false
-        this.business === false ? this.osTypeShow = false : this.osTypeShow = true
+        this.business === false ? this.osTypeShow = false : ''
       })
     },
 
@@ -384,12 +375,6 @@ export default {
       this.$refs['fromCode'].validate((valid) => {
         if (valid) {
           this.fromCode = vel
-          for (var ele of this.typeString) {
-            this.fromCode.type === ele.name ? this.fromCode.type = ele.code : ''
-          }
-          for (var q of this.osTypeEnum) {
-            this.fromCode.osType === q.name ? this.fromCode.osType = q.code : ''
-          }
           this.osTypeShow === false ? this.$set(this.fromCode, 'osType', '') : ''
           this.business === false ? this.$set(this.fromCode, 'clientType', '') : ''
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
@@ -403,8 +388,6 @@ export default {
               this.errorFun(response.msg)
             }
           })
-        } else {
-          return false
         }
       })
     },
@@ -424,7 +407,7 @@ export default {
     // chnage 平台类型
     changeType(e) {
       for (var b of this.typeString) {
-        if (e === b.code) {
+        if (e === b.name) {
           this.businessTypeStr = b.child
           b.child !== null ? this.business = true : this.business = false
         }
@@ -515,34 +498,34 @@ export default {
 
     // 创建日报 提测 准出报告跳转
     createReport(e, ele) {
-      if (ele.typeString === '客户端') {
+      if (ele.typeString !== '服务端') {
         switch (e) {
           case 1:
-            this.$router.push({ path: '/Platform/presentation/PresentReport', query: { id: ele.id }})
+            this.$router.push({ path: '/Platform/presentation/PresentReport', query: { task: ele }}) // 客户端提测
             break
           case 2:
-            this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { id: ele.id }})
+            this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { task: ele }}) // 客户端日报
             break
           case 3:
-            this.$router.push({ path: '/Platform/presentation/ClientAcceptance', query: { id: ele.id }})
+            this.$router.push({ path: '/Platform/presentation/ClientAcceptance', query: { task: ele }}) // 客户端准出
             break
           case 4:
-            this.$router.push({ path: '/Platform/defectManagement', query: { id: ele.id, code: 4 }})
+            this.$router.push({ path: '/Platform/defectManagement', query: { id: ele.id, code: 4 }}) // 缺陷报告
             break
         }
       } else {
         switch (e) {
           case 1:
-            this.$router.push({ path: '/Platform/presentation/presentationReport', query: { id: ele.id }})
+            this.$router.push({ path: '/Platform/presentation/presentationReport', query: { task: ele }}) // 服务端提测
             break
           case 2:
-            this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { id: ele.id }})
+            this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { task: ele }}) // 服务端日报
             break
           case 3:
-            this.$router.push({ path: '/Platform/presentation/Acceptance', query: { id: ele.id }})
+            this.$router.push({ path: '/Platform/presentation/Acceptance', query: { task: ele }}) // 服务端准出
             break
           case 4:
-            this.$router.push({ path: '/Platform/defectManagement', query: { id: ele.id, code: 4 }})
+            this.$router.push({ path: '/Platform/defectManagement', query: { id: ele.id, code: 4 }}) // 缺陷报告
             break
         }
       }
@@ -570,7 +553,7 @@ export default {
 
     // Dialog 关闭的回调
     Refresh() {
-      this.osTypeShow === false ? this.$set(this.fromCode, 'osType', '') : ''
+      this.fromCode.osType === '' ? this.$set(this.fromCode, 'osType', '') : ''
       this.getList()
     },