qinzhipeng_v@didiglobal.com 4 anos atrás
pai
commit
df931c0922

+ 2 - 2
src/views/monthlyReport/components/header.vue

@@ -34,11 +34,11 @@ export default {
     background-color: #ffffff;
     border-radius: 0 0 6px 6px;
     box-shadow: 0 0 11px #eef0f5;
-    height: 73px;
+    height: 60px;
     margin-bottom: 10px;
 
     .el-col {
-      padding: 20px 30px;
+      padding: 15px 30px;
       font-size: 14px;
 
       .header-hover:hover {

+ 2 - 2
src/views/monthlyReport/components/monthlyEards.vue

@@ -2,8 +2,8 @@
   <el-card shadow="always" class="card">
     <div class="Layout-flex report-header">
       <span>{{ data.bizName }}</span>
-      <el-button v-show="data.status === 20 || data.status === 30" type="text" @click="$router.push({ path: '/monthlyReport/edit', query: { pageType: 'readAll', reportId: data.bizNam, subActive: data.bizName }})">查看更多</el-button>
-      <el-button v-show="data.status === 10" type="text">{{ '填写' }}</el-button>
+      <el-button v-show="data.status === 20 || data.status === 30" type="text" @click="$router.push({ path: '/monthlyReport/edit', query: { pageType: data.status === 0 ? 'edit' : 'read', subReportId: data.subReportId }})">查看更多</el-button>
+      <el-button v-show="data.status === 10" type="text" @click="$router.push({ path: '/monthlyReport/edit', query: { pageType: 'edit', subReportId: data.subReportId }})">填写</el-button>
     </div>
     <div class="report-title">
       <svg-icon class="report-icon-title" icon-class="icon-red" />重点问题

+ 13 - 7
src/views/monthlyReport/index.vue

@@ -21,15 +21,15 @@
     <div class="content-wrapper">
       <div class="content-reportName">
         {{ reportName }}
-        <el-button v-if="reportStatus.status === 30" type="text" @click="$router.push({ path: '/monthlyReport/edit', query: { pageType: 'read', reportId: reportValue }})"> 查看完整报告</el-button>
-        <el-button v-if="reportStatus.status === 20 || reportStatus.status === 10" type="text" @click="$router.push({ path: '/monthlyReport/edit', query: { pageType: 'edit', reportId: res.data.id }})"> 发布确认</el-button>
+        <el-button v-if="reportStatus.status === 30" type="text" @click="$router.push({ path: '/monthlyReport/edit', query: { pageType: 'readAll', reportId: reportValue }})"> 查看完整报告</el-button>
+        <el-button v-if="reportStatus.status === 20 || reportStatus.status === 10" type="text" @click="sendConfirm(reportData)"> 发布确认</el-button>
       </div>
-      <div v-if="tagData.analysisList || tagData.confirmeList" class="report-bottom">
+      <div v-show="tagData.analysisList || tagData.confirmeList || tagData.toBeConfirmList" class="report-bottom">
         <i class="el-icon-warning report-icon-warning" />
         <span v-if="tagData.analysisList"> 本月质量月报<b>{{ tagData.analysisList }}</b>有您负责的重点问题需要分析反馈,请点击<b>{{ tagData.analysisList }}</b>的"查看更多"按钮进入填写!</span>
-        <span v-if="tagData.confirmeList && tagData.toBeConfirmList"> 已确认业务线<b>{{ tagData.confirmeList }}</b> ,未确认业务线<b>{{ tagData.toBeConfirmList }}</b>。 </span>
+        <span v-if="tagData.confirmeList || tagData.toBeConfirmList"> 已确认业务线<b>{{ tagData.confirmeList }}</b> ,未确认业务线<b>{{ tagData.toBeConfirmList }}</b>。 </span>
       </div>
-      <el-row :gutter="12" style="height: calc(100vh - 160px); overflow-y: auto;">
+      <el-row :gutter="12" style="height: calc(100vh - 150px); overflow-y: auto;">
         <el-col v-for="(i, k) in tagData.subReportList" :key="k" :span="8">
           <monthlyEards :datas="i" />
         </el-col>
@@ -80,6 +80,7 @@ import normalDialog from '@/components/dialog/normalDialog'
 import headerCom from './components/header'
 import monthlyEards from './components/monthlyEards'
 import { getAvaliableInfo, monthlyReportIndex, getReportBizInfo, createMonthlyReport } from '@/api/qualityMonthlyReport'
+import { sendConfirm } from '@/api/qualityMonthlyReport/edit'
 
 export default {
   name: '',
@@ -143,15 +144,20 @@ export default {
           const data = { ...this.setReportData, startTime: this.setReportData.startAndEnd[0], endTime: this.setReportData.startAndEnd[1] }
           createMonthlyReport(data).then(res => {
             if (res.code === 200) {
-              console.log(res)
               this.loading = false
-              // this.$store.commit('monthlyReportEdit/INIT_PAGE_DATA', { ...res.data })
               this.$router.push({ path: '/monthlyReport/edit', query: { pageType: 'editAll', reportId: res.data.id }})
             }
           })
         }
       })
     },
+    async sendConfirm() {
+      console.log(this.reportStatus)
+      const res = await sendConfirm({ id: this.reportStatus.id })
+      if (res.code === 200) {
+        this.getAvaliableInfo()
+      }
+    },
     getReportStatus(e) {
       this.monthlyReportIndex(e.id)
       this.reportName = e.reportName