qinzhipeng_v 6 anni fa
parent
commit
5134bca129

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

@@ -263,7 +263,7 @@ export default {
         switch (this.ClientData.pftResult) {
           case 1: this.pftResult = '通过'; this.pftResult1.color = 'green'; break
           case 2: this.pftResult = '未通过'; this.pftResult1.color = 'red'; break
-          case 3: this.pftResult = '未执行'; this.pftResult1.color = 'yellow'; break
+          case 3: this.pftResult = '未执行'; this.pftResult1.color = 'Orange'; break
         }
         switch (this.ClientData.sctResult) {
           case 1: this.sctResult = '测试通过'; this.sctResult1.color = 'green'; break
@@ -272,7 +272,7 @@ export default {
         switch (this.ClientData.acceptanceResult) {
           case 1: this.acceptanceResult = '通过'; this.acceptanceResult1.color = 'green'; break
           case 2: this.acceptanceResult = '未通过'; this.acceptanceResult1.color = 'red'; break
-          case 3: this.acceptanceResult = '未执行'; this.acceptanceResult1.color = 'yellow'; break
+          case 3: this.acceptanceResult = '未执行'; this.acceptanceResult1.color = 'Orange'; break
         }
         this.editorElem1 = this.ClientData.projectBackground
         this.editorElems1 = this.ClientData.fctInfo

+ 20 - 4
src/views/Platform/presentation/acceptTheReport.vue

@@ -23,10 +23,6 @@
             <el-col :span="12">
               <el-form-item label="是否延期 : ">
                 <span :style="lateStatus1">{{ lateStatus }}</span>
-                <!-- <el-radio-group v-model="lateStatus">
-                  <el-radio label="1" disabled>是</el-radio>
-                  <el-radio label="2" disabled>否</el-radio>
-                </el-radio-group> -->
               </el-form-item><br>
               <el-form-item v-show="showDelay" label="延期原因 : ">{{ fromCreateData.lateReason }}</el-form-item>
             </el-col>
@@ -38,6 +34,15 @@
               <el-form-item label="是否跟版 : ">{{ fromCreateData.isEdition }}</el-form-item>
             </el-col>
           </el-row>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="涉及安全项">
+                <span :style="safeStatus1">{{ safeStatus }}</span>
+              </el-form-item>
+              <el-form-item v-show="showData" label="完成结果">{{ fromCreateData.safeInfo }}</el-form-item>
+            </el-col>
+          </el-row>
+          <a href="http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=237016271" style="color:blue; font-size:13px;">普惠SDL准入标准</a>
           <el-row><el-col><el-form-item label="prd地址 : "> {{ fromCreateData.prdUrl }}</el-form-item></el-col></el-row>
           <el-row><el-col><el-form-item label="设计方案 : ">{{ fromCreateData.devUrl }}</el-form-item></el-col></el-row>
 
@@ -150,14 +155,17 @@ export default {
       configInfo1: { color: 'green' },
       dependentComponents1: { color: 'green' },
       lateStatus1: { color: 'green' },
+      safeStatus1: { color: 'green' },
       showDelay: false,
       showDelay1: false,
       showDelay2: false,
       towShow: false,
       oneShow: false,
+      showData: false,
       labelWidth: '60px',
       joinTestOne: '',
       lateStatus: '',
+      safeStatus: '',
       name: '',
       haha: '',
       moduleInfoOne: '',
@@ -206,6 +214,14 @@ export default {
       this.name = this.fromCreateData.name
       this.joinTestOne = this.fromCreateData.joinTest
       this.moduleInfoOne = this.fromCreateData.moduleInfo
+      if (this.fromCreateData.safeInfo !== null) {
+        this.showData = true
+        this.safeStatus = '是'
+      } else {
+        this.showData = false
+        this.safeStatus = '否'
+        this.safeStatus1.color = 'red'
+      }
       if (this.fromCreateData.lateStatus === 1) {
         this.showDelay = true
         this.lateStatus = '是'

+ 26 - 1
src/views/Platform/presentation/presentationReport.vue

@@ -50,6 +50,18 @@
           <el-form-item label="是否跟版" style="margin-left:75px;"><el-input v-model="fromCreateData.isEdition" style="width:30vw;" /></el-form-item>
         </el-col>
       </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="涉及安全项">
+            <el-radio v-model="lateSta" style="margin: 0 109px;" label="1" @change="showStatusData">是</el-radio>
+            <el-radio v-model="lateSta" label="2" @change="showStatusData">否</el-radio>
+            <a href="http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=237016271" style="color:blue; font-size:13px;padding-right: 10px;">普惠SDL准入标准</a>
+          </el-form-item>
+          <el-form-item v-show="showData" label="完成结果" prop="safeInfo" style="margin-left:75px;">
+            <el-input v-model="fromCreateData.safeInfo" style="width:29.2vw;" />
+          </el-form-item>
+        </el-col>
+      </el-row>
       <el-row :gutter="23">
         <el-col :span="23">
           <el-form-item label="prd地址 " prop="prdUrl">
@@ -130,6 +142,7 @@ export default {
         name: [{ required: true, message: '报告标题不能为空', trigger: 'change' }],
         // by: [{ required: true, message: 'by不能为空', trigger: 'change' }],
         devTimeStart: [{ required: true, message: '开发时间不能为空', trigger: 'change' }],
+        safeInfo: [{ required: true, message: '涉及安全项不能为空', trigger: 'change' }],
         lateStatus: [{ required: true, message: '是否延期不能为空', trigger: 'change' }],
         lateReason: [{ required: true, message: '延期原因不能为空', trigger: 'change' }],
         planLaunchTime: [{ required: true, message: '计划提测时间不能为空', trigger: 'change' }],
@@ -147,8 +160,10 @@ export default {
       showDelay: false,
       labelWidth: '60px',
       lateStatus: '1',
+      lateSta: '1',
       fromCreateData: {},
       editorContent: '',
+      showData: false,
       DetailsOfProposal: ''
     }
   },
@@ -190,6 +205,13 @@ export default {
           this.lateStatus = '2'
           this.showDelay = false
         }
+        if (this.fromCreateData.safeInfo !== null) {
+          this.lateSta = '1'
+          this.showData = true
+        } else {
+          this.lateSta = '2'
+          this.showData = false
+        }
       }
     },
     getRouterData1() {
@@ -243,8 +265,11 @@ export default {
       })
     },
     lateStatusChange(e) {
+      e === '1' ? this.showDelay = true : this.showDelay = false
+    },
+    showStatusData(e) {
       console.log(e)
-      e === 1 ? this.showDelay = true : this.showDelay = false
+      e === '1' ? this.showData = true : this.showData = false
     },
     clickPreview(ele) {
       this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { data: ele }})

+ 6 - 6
src/views/Platform/presentation/testPresenyL.vue

@@ -17,15 +17,15 @@
 
       <span class="titleStyle">一、进度和风险</span><br>
 
-      <el-row><el-col style="width:68vw;"><div class="rich" v-html="projectProgress" /></el-col></el-row>
+      <el-row><el-col style="width:68vw;font-size:15px;color:#606266;"><div class="rich" v-html="projectProgress" /></el-col></el-row>
 
       <span class="titleStyle">二、测试情况</span>
 
-      <el-row><el-col style="width:68vw;"><div class="rich" v-html="TestProgress" /></el-col></el-row>
+      <el-row><el-col style="width:68vw;font-size:15px;color:#606266;"><div class="rich" v-html="TestProgress" /></el-col></el-row>
 
       <span class="titleStyle">三、bug情况</span>
 
-      <div style="border: 1px,solid #ccc;">
+      <div style="border: 1px,solid #ccc;font-size:14px;color:#606266;">
         <label class="title">1、bug统计</label>
         <el-row :gutter="20">
           <el-col :span="12"><div id="lineShow" style="width: 600px;height:400px;" /></el-col>
@@ -207,7 +207,7 @@ export default {
     padding-right: 40px;
     font-size: 15px;
   }
- .rich>>> table tr td{border:1px solid #ccc;font-size: 15px; color: #606266}
-  .rich>>> table th{border:1px solid #ccc; font-size: 15px; color: #606266}
-  .rich>>> table {border:1px solid #ccc; border-collapse: collapse;line-height: 30px; text-align: center;font-size: 15px; color: #606266}
+  .rich>>> table tr td{border:1px solid #ccc;font-size: 14px; color: #606266}
+  .rich>>> table th{border:1px solid #ccc; font-size: 14px; color: #606266}
+  .rich>>> table {border:1px solid #ccc; border-collapse: collapse;line-height: 30px; text-align: center;font-size: 14px; color: #606266}
 </style>

+ 36 - 9
src/views/Platform/projectPage.vue

@@ -221,10 +221,15 @@
                 <el-option v-for="item in priorityStrings" :key="item.value" :label="item.name" :value="item.value" />
               </el-select>
             </el-form-item>
+            <el-form-item label="进展" prop="stageString" label-width="100px">
+              <el-select v-model="formTask.stageString" placeholder="进展">
+                <el-option v-for="item in stageStrings" :key="item.value" :label="item.name" :value="item.value" />
+              </el-select>
+            </el-form-item>
           </div>
           <div style="flex:1;">
-            <el-form-item label="type" prop="type" label-width="100px">
-              <el-select v-model="formTask.type" placeholder="type">
+            <el-form-item label="平台类型" prop="type" label-width="100px">
+              <el-select v-model="formTask.type" placeholder="平台类型" @change="clickType(formTask.type)">
                 <el-option v-for="item in typeString" :key="item.value" :label="item.name" :value="item.value" />
               </el-select>
             </el-form-item>
@@ -233,11 +238,16 @@
                 <el-option v-for="item in statusOptionss" :key="item.value" :label="item.name" :value="item.value" />
               </el-select>
             </el-form-item>
+            <el-form-item label="任务类型" prop="taskType" label-width="100px">
+              <el-select v-model="formTask.taskType" placeholder="任务类型">
+                <el-option v-for="item in taskTypeStr" :key="item.code" :label="item.name" :value="item.name" />
+              </el-select>
+            </el-form-item>
           </div>
           <div style="flex:1;">
-            <el-form-item label="进展" prop="stageString" label-width="100px">
-              <el-select v-model="formTask.stageString" placeholder="进展">
-                <el-option v-for="item in stageStrings" :key="item.value" :label="item.name" :value="item.value" />
+            <el-form-item label="业务模块" prop="businessType" label-width="100px">
+              <el-select v-model="formTask.businessType" placeholder="业务模块">
+                <el-option v-for="item in businessTypeStr" :key="item.value" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
             <el-form-item label="是否免测" prop="notest" label-width="100px">
@@ -479,6 +489,7 @@
           </el-form>
           <el-form style="flex:1;" label="right" size="mini" label-width="110px">
             <el-form-item label="打回次数 :"><span>{{ taskDatas.reopen }}</span></el-form-item>
+            <el-form-item label="业务模块 :"><span>{{ taskDatas.businessType }}</span></el-form-item>
           </el-form>
         </div>
         <el-form label="right" style="margin-left:30px;" size="mini" label-width="210px">
@@ -597,6 +608,8 @@ export default {
       listTaskDatas: [],
       projectTestReports: [],
       dailyTestReports: [],
+      businessTypeStr: [],
+      taskTypeStr: [],
       tabPosition: 'top',
       textarea: '',
       CallBackTheReason: '',
@@ -644,6 +657,7 @@ export default {
       projectShow: '',
       statusproject: false,
       projectData: {},
+      Arra: [],
       bizData: {},
       dialogStatus: '',
       bizJson: '',
@@ -685,15 +699,19 @@ export default {
       formTask: {},
       taskDatas: {},
       codeData: '',
+      clientTypeEnumList: '',
+      serviceTypeEnumList: '',
       serviceDataRules: {
-        notest: [{ required: true, message: 'notest不能为空', trigger: 'change' }],
-        type: [{ required: true, message: 'type不能为空', trigger: 'change' }],
+        notest: [{ required: true, message: '是否免测不能为空', trigger: 'change' }],
+        type: [{ required: true, message: '平台类型不能为空', trigger: 'change' }],
         name: [{ 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' }],
-        pm: [{ required: true, message: 'pm不能为空', trigger: 'change' }]
+        pm: [{ required: true, message: 'pm不能为空', trigger: 'change' }],
+        taskType: [{ required: true, message: '任务类型不能为空', trigger: 'change' }],
+        businessType: [{ required: true, message: '业务模块不能为空', trigger: 'change' }]
       }
     }
   },
@@ -713,6 +731,9 @@ export default {
       projectInit(this.queryListData).then(response => {
         this.list = response.data
         this.total = response.total
+        this.serviceTypeEnumList = response.query.serviceTypeEnumList
+        this.clientTypeEnumList = response.query.clientTypeEnumList
+        this.taskTypeStr = response.query.taskAndRoutineEnumList
       })
     },
     // 新增
@@ -814,12 +835,14 @@ export default {
 
     // 查询
     querychange(val) {
+      this.Arra = []
+      val.statusString !== '' ? this.Arra.push(val.statusString) : ''
       this.bizJson = localStorage.getItem('key')
       this.bizData = { bizId: this.bizJson }
       this.queryListData = val
       this.queryListData.ename = this.userNames
       this.queryListData.bizId = this.bizJson
-      this.queryListData.status = val.statusString
+      this.queryListData.status = this.Arra
       this.queryListData.pageSize = this.pageSize
       this.queryListData.curIndex = this.curIndex
       projectInit(this.queryListData).then(response => {
@@ -877,6 +900,7 @@ export default {
     queryTaskData(ele) {
       this.showYes = true
       this.codeTitle = '任务编辑'
+      ele.type === '服务端' ? this.businessTypeStr = this.clientTypeEnumList : this.businessTypeStr = this.serviceTypeEnumList
       this.formTask = ele
     },
     // 任务新增
@@ -1018,6 +1042,9 @@ export default {
         res.code === 200 ? this.successFun() : this.errorFun()
       })
     },
+    clickType(e) {
+      e === 1 ? this.businessTypeStr = this.serviceTypeEnumList : this.businessTypeStr = this.clientTypeEnumList
+    },
     yesCallBack1(e, ele) {
       this.centerDialogVisible = true
       this.CallBackStatus = e

+ 50 - 106
src/views/Platform/useCasePage.vue

@@ -49,31 +49,17 @@
                 <el-date-picker v-model="createParticipation.createTime" style="width:20%;margin-right:5px;" type="datetime" placeholder="开始日期" />-
                 <el-date-picker v-model="createParticipation.modifyTime" style="width:20%;margin-right:5px;" type="datetime" placeholder="结束日期" />
                 创建人 <el-input v-model="createParticipation.creator" placeholder="创建人" clearable style="width: 20%;" class="filter-item" />
-                <input
-                  id="imFile"
-                  type="file"
-                  style="display: none"
-                  accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-                  @change="importFile(this)"
-                >
-                <a id="downlink" />
-                <el-button id="upload" type="primary" style="margin-left:6%;" @click="uploadFile()">导入</el-button>
+                <input id="imFile" ref="imFile" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" @change="importFile(this)">
+                <el-button type="primary" style="margin-left:6%;" @click="uploadFile()">导入</el-button>
                 <el-button type="primary" @click="createGetShow">新增</el-button>
               </div>
             </el-col>
           </el-row>
         </el-header>
         <el-main>
-          <!--错误信息提示-->
-          <el-dialog v-model="errorDialog" title="提示" size="tiny">
-            <span>{{ errorMsg }}</span>
-            <span slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="errorDialog=false">确认</el-button>
-            </span>
-          </el-dialog>
           <el-table :data="gridData" fit height="570vh" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
             <el-table-column type="selection" width="55" align="center" />
-            <el-table-column prop="id" label="ID" width="40px" align="center">
+            <el-table-column prop="id" label="ID" width="60px" align="center">
               <template slot-scope="scope">
                 <span>{{ scope.row.id }}</span>
               </template>
@@ -81,8 +67,8 @@
             <el-table-column prop="caseName" label="用例名" width="150" align="center" />
             <el-table-column prop="expectedResult" label="期望结果" width="150" align="center" />
             <el-table-column prop="casePriorityName" label="用例优先级" width="80" align="center" />
-            <el-table-column prop="creatorName" label="创建人" width="120" align="center" />
-            <el-table-column prop="modifierName" label="修改人" width="120" align="center" />
+            <el-table-column prop="creatorName" label="创建人" width="100" align="center" />
+            <el-table-column prop="modifierName" label="修改人" width="100" align="center" />
             <el-table-column prop="createTime" label="创建时间" width="200" align="center" />
             <el-table-column prop="address" label="操作" min-width="220px" align="center" fixed="right">
               <template slot-scope="scope">
@@ -237,10 +223,9 @@ export default {
       data1: [],
       tableData: [],
       excelData: [],
-      imFile: '', // 导入文件el
-      outFile: '', // 导出文件el
-      errorDialog: false, // 错误信息弹窗
-      errorMsg: '' // 错误信息内容
+      imFile: '',
+      failNum: '',
+      successNum: ''
     }
   },
   created() {
@@ -249,7 +234,6 @@ export default {
   },
   mounted() {
     this.imFile = document.getElementById('imFile')
-    this.outFile = document.getElementById('downlink')
   },
   methods: {
     AllQueryFolderData() {
@@ -310,6 +294,7 @@ export default {
       if (vel !== '' && e === '新增') {
         this.caseData = vel
         this.caseData.creator = this.userInformation
+        this.caseData.creatorName = this.userNames
         this.caseData.modifier = this.userInformation
         this.caseData.pageSize = 5
         this.caseData.curIndex = 0
@@ -379,10 +364,14 @@ export default {
           modifier: this.userInformation
         }
         createFolderData(this.formData).then(res => {
-          this.centerDialogVisible = false
-          this.successFun()
-          this.data1 = []
-          this.AllQueryFolderData()
+          if (res.code === 200) {
+            this.centerDialogVisible = false
+            this.successFun()
+            this.data1 = []
+            this.AllQueryFolderData()
+          } else {
+            this.errorFun(res.msg)
+          }
         })
       } else {
         this.errorFun('目录名称不能为空')
@@ -447,7 +436,6 @@ export default {
             id: this.codeId,
             modifier: this.userInformation
           }
-          // this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           deleteFolderData(this.formData).then(res => {
             if (res.code === 200) {
               this.$message({ type: 'success', message: '已删除' })
@@ -479,8 +467,6 @@ export default {
                 this.data1 = []
                 this.AllQueryFolderData()
                 this.createParticipation.caseFolderId = this.startId
-                // this.createParticipation.pageSize = this.pageSize
-                // this.createParticipation.curIndex = this.curIndex
                 queryCasesData(this.createParticipation).then(res => {
                   this.gridData = res.data
                 })
@@ -515,7 +501,7 @@ export default {
       }
     },
     importFile() { // 导入excel
-      const obj = this.imFile
+      var obj = this.imFile
       if (!obj.files) {
         return
       }
@@ -530,82 +516,27 @@ export default {
       }
       formData.append('caseInfo', JSON.stringify(caseInfo))
       const config = {
-        headers: {
-          'Content-Type': 'multipart/form-data'
-          // 'Content-Type': 'multipart/form-data;boundary = ' + new Date().getTime()
-        }
+        headers: { 'Content-Type': 'multipart/form-data' }
       }
-      axios.post('http://10.179.24.176:8980/case/uploadCase', formData, config).then(function(res) {
-        console.log(res.message)
-        if (res.code === 200) {
-          /* 这里做处理*/
+      axios.post('http://10.179.24.176:8980/case/uploadCase', formData, config).then(res => {
+        var code = res.data.data
+        this.successNum = code.successNum
+        this.failNum = code.failNum
+        console.log(this.failNum)
+        if (res.status === 200) {
+          if (this.failNum === 0) {
+            this.$notify({ title: 'Success', message: '上传成功', type: 'success', duration: 15000 })
+          } else {
+            this.haha = '上传成功' + this.successNum + '上传失败' + this.failNum
+            this.$notify({ title: 'Success', message: this.haha, type: 'success', duration: 15000 })
+          }
+          this.updateCaseListData()
+          this.$refs.imFile.value = null
+        } else {
+          this.$message({ type: 'success', message: '导入失败' })
         }
       })
-      // console.log(formData.get('abc'))
-      // var caseFrom = {
-      //   bizId: this.bizJson,
-      //   creator: this.userNames,
-      //   modifier: this.userNames,
-      //   caseFolderId: 11
-      // }
-      // caseUploadCaseData(formData).then(res => {
-      //   console.log(res)
-      // })
-      // var reader = new FileReader()
-      // const $t = this
-      // reader.onload = function(e) {
-      //   var data = e.target.result
-      //   if ($t.rABS) {
-      //     $t.wb = XLSX.read(btoa(this.fixdata(data)), { // 手动转化
-      //       type: 'base64'
-      //     })
-      //   } else {
-      //     $t.wb = XLSX.read(data, {
-      //       type: 'binary'
-      //     })
-      //   }
-    //     const json = XLSX.utils.sheet_to_json($t.wb.Sheets[$t.wb.SheetNames[0]])
-    //     $t.dealFile($t.analyzeData(json)) // analyzeData: 解析导入数据
-    //   }
-    //   if (this.rABS) {
-    //     reader.readAsArrayBuffer(f)
-    //   } else {
-    //     reader.readAsBinaryString(f)
-    //   }
-    // },
-    // analyzeData: function(data) { // 此处可以解析导入数据
-    //   return data
-    // },
-    // dealFile: function(data) { // 处理导入的数据
-    //   this.imFile.value = ''
-    //   if (data.length <= 0) {
-    //     this.errorDialog = true
-    //     this.errorMsg = '请导入正确信息'
-    //   } else {
-    //     this.excelData = data
-    //     caseUploadCaseData(this.excelData).then(res => {
-    //       console.log(res)
-    //     })
-    //   }
     },
-    // s2ab: function(s) { // 字符串转字符流
-    //   var buf = new ArrayBuffer(s.length)
-    //   var view = new Uint8Array(buf)
-    //   for (var i = 0; i !== s.length; ++i) {
-    //     view[i] = s.charCodeAt(i) & 0xFF
-    //   }
-    //   return buf
-    // },
-    // getCharCol: function(n) { // 将指定的自然数转换为26进制表示。映射关系:[0-25] -> [A-Z]。
-    //   let s = ''
-    //   let m = 0
-    //   while (n > 0) {
-    //     m = n % 26 + 1
-    //     s = String.fromCharCode(m + 64) + s
-    //     n = (n - m) / 26
-    //   }
-    //   return s
-    // },
     fixdata: function(data) { // 文件流转BinaryString
       var o = ''
       var l = 0
@@ -617,9 +548,22 @@ export default {
       return o
     },
     uploadFile() { // 按钮导入
-      this.imFile.click()
+      if (this.startId === '') {
+        this.$notify({ title: '提示', message: '请选择目录', duration: 2000 })
+      } else {
+        console.log(this.imFile)
+        this.$refs.imFile.click()
+        // this.imFile = document.getElementById('imFile')
+        // this.imFile.click()
+      }
+    },
+    updateCaseListData() {
+      this.createParticipation.caseFolderId = this.startId
+      queryCasesData(this.createParticipation).then(res => {
+        this.gridData = res.data
+        this.successFun()
+      })
     }
-
   }
 }
 </script>