Browse Source

2023-5-29

codeMan 2 years ago
parent
commit
8b0769fff2

+ 14 - 1
src/HDrpManagement/workReport/modules/aside/index.vue

@@ -13,8 +13,10 @@
     </div>
     <div class="list" v-load="load">
       <div v-if="list.length">
+
         <div 
-          class="list-item" 
+          class="list-item"
+          :class="item.readstatus == '未读' ? 'no-read' : ''"
           :style="currentIndex == item.sys_workreportid ? '--borderColor:#3874F6' : '--borderColor:#cccccc'" 
           v-for="item in list" 
           :key="'item' + item.sys_workreportid" 
@@ -178,6 +180,17 @@ export default {
   margin-bottom: 10px;
   cursor: pointer;
   transition: all .2s ease-in-out;
+  position: relative;
+}
+.list .no-read::before {
+  content:'';
+  width:5px;
+  height: 5px;
+  border-radius: 5px;
+  background: red;
+  position: absolute;
+  top: -3px;
+  right: -2px;
 }
 .list .list-item .item-left {
   display: flex;

+ 21 - 16
src/HDrpManagement/workReport/modules/createReport/index.vue

@@ -3,7 +3,7 @@
   <div>
     <el-dropdown  @command="handleCommand">
       <el-button type="primary" size="mini">
-        创建汇报
+        开始汇报
       </el-button>
       <el-dropdown-menu slot="dropdown">
         <el-dropdown-item :command="{name:item.reportname,id:item.sys_workreportmodelid}" v-for="(item,index) in modelList" :key="index">{{ item.reportname }}</el-dropdown-item>
@@ -45,7 +45,6 @@
 
 <script>
 import upload from '@/SManagement/orderclue/components/upload'
-import { log } from '@antv/g2plot/lib/utils'
 export default {
   components:{upload},
   data () {
@@ -82,6 +81,7 @@ export default {
       this.detail = res.data
       this.detail.forEach(item => {
         item.content.forEach(item2 => {
+          if (item.title == '数据统计') return 
           item2.content = `${item2.rowindex}、${item2.content}`
         })
       })
@@ -97,7 +97,7 @@ export default {
       let copyDetail = JSON.parse(JSON.stringify(this.detail))
       copyDetail.forEach((item,index) => {
         if (index >= result.length || !item.editable) return
-        item.content = [result[index]]
+        item.content = [result[index-1]]
       })
       let res = await this.$api.requested({
           "id": "20230523094702",
@@ -113,19 +113,24 @@ export default {
           "ownerid": res.data.sys_workreportid,
           "usetype": 'default',
         }
-        this.loading = true
-        let index = 0
-        this.$refs['upload'].toUpload(() => {
-          if (!index) this.uploadIndex = this.$refs.upload.fileList.length
-          index++
-          if (this.uploadIndex == index) {
-            this.loading = false
-            this.drawer = false
-            res.data.name = res.data.createby
-            this.$emit('onSuccess',res.data)
-          }
-          
-        })
+        if (!this.$refs.upload.fileList.length) {
+          this.drawer = false
+          res.data.name = res.data.createby
+          this.$emit('onSuccess',res.data)
+        } else {
+          this.loading = true
+          let index = 0
+          this.$refs['upload'].toUpload(() => {
+            if (!index) this.uploadIndex = this.$refs.upload.fileList.length
+            index++
+            if (this.uploadIndex == index) {
+              this.loading = false
+              this.drawer = false
+              res.data.name = res.data.createby
+              this.$emit('onSuccess',res.data)
+            }
+          })
+        }
       })
       console.log(res);
     },

+ 11 - 5
src/HDrpManagement/workReport/modules/reportContent/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="detail">
     <div class="detail-header">
-      <p>{{ detail.reportname }}</p>
-      <p>{{ detail.createdate }}</p>
+      <span>{{ detail.createby }}-{{ detail.reportname }}</span>
+      <span>{{ detail.createdate }}</span>
     </div>
     <div class="detail-content" v-if="detail.items">
       <div class="content-item" style="margin-bottom:20px" v-for="item in detail.items">
@@ -10,6 +10,7 @@
         <div v-if="item.content[0]">
           <p v-for="(item2,index) in item.content[0].content" style="font-size:12px">{{ item2 }}</p>
         </div>
+        <span v-else>暂无</span>
       </div>
       <file-item 
         :marginRight="10"
@@ -46,10 +47,15 @@ export default {
       if (this.detail.items) {
         this.detail.items.forEach(item => {
           if (item.content.length) {
-            item.content[0].content = item.content[0].content.split('/n')
+            if (item.title == '数据统计') {
+              item.content[0].content = [item.content[0].content]
+            } else {
+              item.content[0].content = item.content[0].content.split('\n')
+            }
           }
         })
       }
+      console.log(this.detail.items);
     },
     deleteFile (data) {
       this.detail.forEach(item => {
@@ -79,8 +85,9 @@ export default {
   text-align: center;
   margin-bottom: 20px;
 }
-.detail .detail-header p:nth-of-type(2) {
+.detail .detail-header span:nth-of-type(2) {
   font-size: 12px;
+  margin-left:15px;
 }
 .content-item {
   margin-bottom: 20px;
@@ -90,6 +97,5 @@ export default {
 }
 .normal-title{
   font-size: 14px;
-  font-weight: normal;
 }
 </style>

+ 1 - 4
src/HDrpManagement/workReport/modules/reportSet/components/add.vue

@@ -177,10 +177,7 @@ export default {
         ],
         reporttodeps:[
           { required: true, message: '请选择上级部门', trigger: 'change'}
-        ],
-        reporttohrids:[
-          { required: true, message: '请选择汇报对象', trigger: 'change'}
-        ],
+        ]
       },
       selectPeople:[],
       selectReport:[],

+ 1 - 4
src/HDrpManagement/workReport/modules/reportSet/components/edit.vue

@@ -190,10 +190,7 @@ export default {
         ],
         reporttodeps:[
           { required: true, message: '请选择上级部门', trigger: 'change'}
-        ],
-        reporttohrids:[
-          { required: true, message: '请选择汇报对象', trigger: 'change'}
-        ],
+        ]
       },
       selectPeople:[],
       selectReport:[],