Przeglądaj źródła

Merge remote-tracking branch 'origin/monthly_report_daily_0.0.1' into monthly_report_daily_0.0.1

洪海涛 4 lat temu
rodzic
commit
ca89ff13cb

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/content.vue

@@ -34,8 +34,8 @@
       <!--   可变文本:VarText   -->
       <div v-else-if="item.type === 'VarText'">
         <VarText
-          style='margin-top: -10px;'
           v-model="item.value"
+          style="margin-top: -10px;"
           :title="item.title"
           :name="item.name"
           :dom-key="item.domKey"

+ 21 - 65
src/views/monthlyReport/childrenPage/setReport/components/general.vue

@@ -1,14 +1,15 @@
 <template>
   <div class="reportSetting">
-    <headTitle title="月报发起人" :open-btn="true" class="report-headTitle" style="margin-top: 15px;">
-      <span slot="handleSlot">
-        <span class="report-addSponsor" @click="showSaveSearch = true">添加</span>
-      </span>
-    </headTitle>
+    <headTitle title="月报发起人" class="report-headTitle" />
 
-    <div v-loading="sponsorList.length > 0 ? false : true" class="report-bottom">
-      <el-tag v-for="item in sponsorList" :key="item.id" closable type="info" style="margin: 0 10px 10px 0;" @close="handleClose(item)">{{ item.name }}</el-tag>
-    </div>
+    <over-click id="priority-select" style="padding-bottom: 20px;">
+      <template slot="active">
+        <searchPeople :value.sync="monthlySponsor.sponsors" :multiple="true" :size="'small'" style="width: 100%;" @change="createmonthlySponsor" />
+      </template>
+      <template slot="overMouse">
+        <span style="color: #333333;">{{ sponsorList.join(',') }}</span>
+      </template>
+    </over-click>
 
     <headTitle title="业务线设置" class="report-headTitle" />
 
@@ -62,20 +63,6 @@
         </el-row>
       </el-col>
     </el-row>
-    <!-- 添加 -->
-    <normal-dialog :show-dialog="showSaveSearch" :title="'添加'" :width="'35%'" @confirm="createmonthlySponsor('searchForm')" @cancel="showSaveSearch = false, monthlySponsor.sponsor = ''">
-      <el-form :model="monthlySponsor" label-width="100px">
-        <el-form-item label="月报发起人" prop="name">
-          <searchPeople :value.sync="monthlySponsor.sponsor" style="width: 100%;" />
-        </el-form-item>
-      </el-form>
-    </normal-dialog>
-    <!-- 删除人员 -->
-    <normal-dialog :show-dialog="deleteDialog" :title="'删除'" :width="'35%'" @confirm="deleteSponsor('searchForm')" @cancel="deleteDialog=false">
-      <div class="report-delete">
-        是否删除月报发起人 <span class="report-delete-content">{{ memberData.name }}</span> ?
-      </div>
-    </normal-dialog>
     <!-- 技术模块 -->
     <normal-dialog ref="succes" is-succes :show-dialog="showSModules" :title="'技术模块'" :width="'40%'" @succes="updateModule" @cancel="showSModules = false">
       <el-radio-group v-model="radio">
@@ -99,7 +86,7 @@ import normalDialog from '@/components/dialog/normalDialog'
 import overClick from '@/components/click/overClick'
 import headTitle from '@/components/headTitle'
 import { settingGetBizList } from '@/api/projectIndex'
-import { getSponsorList, createSponsor, deleteSponsor, monthlyReportSettingList, monthlyReportUpdatSetting } from '@/api/qualityMonthlyReport'
+import { getSponsorList, createSponsor, monthlyReportSettingList, monthlyReportUpdatSetting } from '@/api/qualityMonthlyReport'
 import searchPeople from '@/components/select/searchPeople'
 export default {
   components: { headTitle, overClick, normalDialog, searchPeople },
@@ -114,17 +101,14 @@ export default {
       moduleId: '', // 模块Id
       radio: 3, // 技术模块
       showSModules: false, // 技术模块
-      deleteDialog: false, // 删除
-      showSaveSearch: false, // 添加
       bizSetList: [], // 业务线设置list
-      memberData: {}, // 要删除掉的月报发起人数据
       bizList: [], // 业务线List
       numberValidateForm: {},
       bizModules: [], // 点击的模块
       generalSet: {},
       bool: true,
       monthlySponsor: {
-        sponsor: ''
+        sponsors: null
       }, // 月报发起人
       isDoubleEndList: [{ value: true, label: '是' }, { value: false, label: '否' }],
       sponsorList: []
@@ -138,8 +122,8 @@ export default {
     async getSponsorList() {
       const res = await getSponsorList() // 获取月报发起人
       if (res.code === 200) {
-        this.sponsorList = res.data
-        this.monthlySponsor.sponsor = ''
+        this.sponsorList = res.data ? res.data.map(x => { return x.name }) : ''
+        this.monthlySponsor.sponsors = res.data ? res.data.map(x => { return x.ename }) : ''
       }
       const resBiz = await monthlyReportSettingList() // 获取业务线设置
       if (resBiz.code === 200 && resBiz.data.length > 0) {
@@ -151,7 +135,6 @@ export default {
           Confirmation: item.confirmer ? item.confirmer.map(x => { return x.idap }) : null,
           confirmerNames: item.confirmer ? item.confirmer.map(x => { return x.name }) : null
         }))
-        console.log(this.bizSetList)
       }
     },
     async GetReportBizInfo() { // 获取业务线option
@@ -161,28 +144,16 @@ export default {
       }
     },
     async createmonthlySponsor() { // 添加月报发起人
-      if (this.monthlySponsor.sponsor) {
-        const res = await createSponsor({ sponsor: this.monthlySponsor.sponsor })
+      if (this.monthlySponsor.sponsors) {
+        const res = await createSponsor({ sponsors: this.monthlySponsor.sponsors })
         if (res.code === 200) {
           this.getSponsorList()
-          this.showSaveSearch = false
           this.$message({ type: 'success', message: '添加成功' })
         }
       } else {
         this.$message({ type: 'warning', message: '月报发起人不能为空' })
       }
     },
-    handleClose(tag) { // 点击删除月报发起人
-      this.deleteDialog = true
-      this.memberData = tag
-    },
-    async deleteSponsor() { // 确认删除月报发起人
-      const res = await deleteSponsor({ id: this.memberData.id })
-      if (res.code === 200) {
-        this.getSponsorList()
-        this.$message({ type: 'success', message: '已删除' })
-      }
-    },
     updateModule(cancel) {
       if (this.radio === 3) {
         this.updatabizSetting({ id: this.moduleId, isAll: true })
@@ -194,7 +165,6 @@ export default {
             this.$message({ message: '模块不能为空', type: 'warning' })
           }
         })
-        console.log(this.bizModules, this.bool, '你知道吗')
         this.bool && this.updatabizSetting({ id: this.moduleId, isAll: false, bizModules: this.bizModules })
       }
     },
@@ -202,12 +172,10 @@ export default {
       const res = await monthlyReportUpdatSetting(val)
       if (res.code === 200) {
         this.getSponsorList()
-        this.showSaveSearch = false
         this.$message({ type: 'success', message: '已修改' })
       }
     },
     clickModules(row) {
-      console.log(row, '你几点睡')
       this.moduleId = row.id
       this.bizModules = row.bizModules
       this.radio = row.isAll ? 3 : 6
@@ -218,18 +186,13 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-  .reportSetting {
-    >>>label {
-        font-weight: 400;
-      }
-  }
+.reportSetting {
+  >>>label {
+      font-weight: 400;
+    }
+}
 .report-headTitle {
-  margin-bottom: 20px;
-  .report-addSponsor {
-    margin-left: 10px;
-    color: #409EFF;
-    cursor: pointer;
-  }
+  margin: 20px 0;
 }
 .report-bizSet {
   font-size: 14px;
@@ -257,13 +220,6 @@ export default {
     color: #409EFF;
   }
 }
-.report-delete {
-  text-align: center;
-  color: #333333;
-  .report-delete-content {
-    font-weight: 600;
-  }
-}
 .report-selectModule {
   color: #666666;
   margin: 20px 0;

+ 6 - 7
src/views/monthlyReport/components/monthlyEards.vue

@@ -9,17 +9,15 @@
       <svg-icon class="report-icon-title" icon-class="icon-red" />重点问题
     </div>
     <section class="report-content-data">
-      <div class="div_ellipsis">
+      <div class="div_ellipsis" style="color: #FAAD14;">
         待反馈:
         <el-tooltip class="item" effect="dark" :content="data.feedback" placement="top-start">
-          <span>{{ data.feedback }}</span>
+          {{ data.feedback }}
         </el-tooltip>
       </div>
-      <div style="margin-bottom: 10px;">
-        改进项:
-        <span>{{ data.improveNum }}</span>
-        已完成:
-        <span>{{ data.finishNum }}</span>
+      <div style="margin-bottom: 10px; color: #FAAD14;">
+        改进项:{{ data.improveNum }}
+        已完成:{{ data.finishNum }}
       </div>
       <div class="div_ellipsis">
         本月新增线上问题 {{ data.problem.key }} 个,
@@ -48,6 +46,7 @@
         进展:
         <span>{{ item.process }}</span>
       </div>
+      <div v-if="!data.lastMonthImprovment.improve">暂无数据</div>
     </section>
   </el-card>
 </template>