Browse Source

营销工具提报调整

qymljy 9 months ago
parent
commit
f4c56b7bc6

+ 7 - 7
src/SManagement/submitedit_more/index.vue

@@ -12,13 +12,13 @@
         <router-view/>
       </div>
     </el-drawer>
-    <normalLayout class="normal-card" @onRefresh="getSubmitEditAction">
-    <div slot="content" class="container">
+    <normalLayout class="normal-card" @onRefresh="getSubmitEditAction" style="overflow: auto;padding: 0">
+    <div slot="content" class="container" >
       <time-select @timeChange="timeChange" @clearSelect="clearSelect" v-if="tool.checkAuth($route.name,'read')"></time-select>
       <list :list="oneData" type="more" v-if="tool.checkAuth($route.name,'read')"></list>
       <!--分页-->
-      <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber" @pageChange="pageChange">
-      </pagination>
+<!--      <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber" @pageChange="pageChange">-->
+<!--      </pagination>-->
     </div>
   </normalLayout>
 </div>
@@ -43,7 +43,7 @@ export default {
               "nocache":true,
               "onceonly":0,
               "pageNumber": 1,
-              "pageSize": 4,
+              "pageSize": 99999,
               "where":{
                   "begdate":"",
                   "enddate":""
@@ -92,7 +92,7 @@ export default {
     },
     pageChange (n) {
       this.param.content.pageNumber = n
-      this.getSubmitEditAction() 
+      this.getSubmitEditAction()
     },
     timeChange(time) {
       this.param.content.where.begdate = time[0]
@@ -133,4 +133,4 @@ export default {
   top: 50%;
   transform: translate(-50%,-50%);
 }
-</style>
+</style>

+ 136 - 5
src/SManagement/submitedit_one/components/list.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="list" v-if="list.length != 0">
-    <div class="list-item" :class="item.ishistory == 0?'list-shadow-y':'list-shadow-g'" @click="itemClick(item.sat_submiteditmodelid,item.ishistory)" v-for="(item,index) in list" :style="{borderColor:item.ishistory == 0?'#e6a23c':'#999999'}"
+    <div class="list-item"  :class="item.ishistory == 0?'list-shadow-y':'list-shadow-g'" @click="itemClick(item.sat_submiteditmodelid,item.ishistory)" v-for="(item,index) in list" :style="{borderColor:item.ishistory == 0?'#e6a23c':'#999999'}"
       :key="index">
       <div class="headerState" :style="{backgroundColor:item.ishistory == 0?'#e6a23c':'#999999'}">
         {{item.ishistory == 0 ? $t('进行中') : $t('已结束')}}
@@ -9,16 +9,31 @@
         <div class="tag-style-border" >
           <div :class="item.isRead == 0?'no-read':'read'">{{item.isRead == 0 ? $t('未读') : $t('已读')}}</div>
         </div>
-        <div class="tag-style-border">
-          <span class="font-size-g">还剩</span><span class="font-size-b"> 0 </span><span class="font-size-g">天</span>
+        <div class="tag-style-border between-days">
+          <span class="font-size-g">还剩</span><span class="font-size-b">{{daysBetweenDates(item.begdate,item.enddate)}}</span><span class="font-size-g">天</span>
         </div>
       </div>
-      <div class="title-font-b">
+      <div class="title-font-b title-show-style">
         {{$t(item.title)}}
       </div>
-      <div class="notes-font-b">
+      <div class="notes-font-b notes-box-height">
         {{$t(item.notes)}}
       </div>
+      <div class="footer-box-style">
+        <div style="display: flex;justify-content: left">
+          <div class="avatar">
+            <p>{{item.changeby.substr(0,1)}}</p>
+          </div>
+          <div class="avatar-null">
+            <div style="margin: auto;font-weight: 1000;color: #777777">+</div>
+          </div>
+        </div>
+        <div class="font-size-g submitcount-style-box">
+          <span v-if="item.submitcount > 0">{{item.submitcount + '+'}}</span>
+          <span v-else>{{item.submitcount}}</span>
+          <span class="footer-font-postion">已提报</span>
+        </div>
+      </div>
 
 <!--      <div class="header1">-->
 <!--        <div class="handle" :class="item.ishistory == 0 ? 'action' : 'no-action'">-->
@@ -55,12 +70,21 @@ export default {
     }
   },
   computed: {
+
   },
   watch: {
   },
   mounted () {
   },
   methods: {
+    daysBetweenDates(begdate,enddate){
+      const date1 = new Date;
+      const date2 = new Date(enddate);
+      let timeDiffInMilliseconds = date2 - date1; // 计算绝对值,因为时间差可能是负数
+      let daysDiff = Math.ceil(timeDiffInMilliseconds / (1000 * 60 * 60 * 24));
+      daysDiff > 0 ? daysDiff = daysDiff : daysDiff = 0
+      return daysDiff
+    },
     itemClick (id, history) {
       window.sessionStorage.setItem('currentPath', this.$route.path)
       window.sessionStorage.setItem('history', history)
@@ -148,6 +172,66 @@ export default {
   color: #333333;
   font-size: 20px;
 }
+.notes-box-height{
+  height: 185px;
+  overflow: hidden;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 6;
+  text-overflow: ellipsis;
+}
+.footer-box-style{
+  display: flex;
+  justify-content: space-between;
+  font-size: 20px;
+  margin-top: 20px;
+}
+.avatar{
+  position: relative;
+  height:48px;
+  width: 48px;
+  margin-bottom: 5px;
+  border-radius: 100%;
+  text-align: center;
+  line-height: 48px;
+  color:#fff;
+  font-weight: 500;
+  background: #3874F6;
+  cursor: pointer;
+  overflow: hidden;
+}
+.avatar-null{
+  position: relative;
+  height:48px;
+  width: 48px;
+  margin-bottom: 5px;
+  border-radius: 100%;
+  text-align: center;
+  line-height: 48px;
+  color:#fff;
+  font-weight: 500;
+  background: #e5e5e5;
+  cursor: pointer;
+  overflow: hidden;
+  border: 2px solid #FFFFFF;
+  margin-left: -24px;
+}
+.submitcount-style-box{
+  line-height: 48px;
+  vertical-align: middle;
+}
+.footer-font-postion{
+  margin-left: 10px;
+}
+.title-show-style{
+  overflow: hidden;
+  text-overflow:ellipsis;
+  white-space:nowrap;
+}
+.between-days{
+  width:200px;
+  text-align: right;
+}
 @media(max-width: 1920px){
   .list .list-item {
     width: 200px;
@@ -199,6 +283,53 @@ export default {
     color: #333333;
     font-size: 10px;
   }
+  .notes-box-height{
+    height: 90px;
+    overflow: hidden;
+  }
+  .footer-box-style{
+    display: flex;
+    justify-content: space-between;
+    font-size: 10px;
+    margin-top: 10px;
+  }
+  .avatar{
+    position: relative;
+    height:24px;
+    width: 24px;
+    margin-bottom: 2.5px;
+    border-radius: 100%;
+    text-align: center;
+    line-height: 24px;
+    color:#fff;
+    font-weight: 500;
+    background: #3874F6;
+    cursor: pointer;
+    overflow: hidden;
+  }
+  .avatar-null{
+    position: relative;
+    height:24px;
+    width: 24px;
+    margin-bottom: 2.5px;
+    border-radius: 100%;
+    text-align: center;
+    line-height: 24px;
+    color:#fff;
+    font-weight: 500;
+    background: #e5e5e5;
+    cursor: pointer;
+    overflow: hidden;
+    border: 1px solid #FFFFFF;
+    margin-left: -12px;
+  }
+  .submitcount-style-box{
+    line-height: 24px;
+    vertical-align: middle;
+  }
+  .footer-font-postion{
+    margin-left: 5px;
+  }
 }
 /*.list .list-item:hover {*/
 /*  box-shadow: 1px 6px 6px 1px rgba(0, 0, 0, 0.35);*/

+ 5 - 5
src/SManagement/submitedit_one/index.vue

@@ -1,12 +1,12 @@
 <template>
 <div>
-  <normalLayout class="normal-card" @onRefresh="getSubmitEditAction">
-    <div class="container" slot="content">
+  <normalLayout class="normal-card" @onRefresh="getSubmitEditAction" style="overflow: auto;padding: 0">
+    <div class="container" slot="content" >
       <time-select @timeChange="timeChange" @clearSelect="clearSelect" v-if="tool.checkAuth($route.name,'read')"></time-select>
       <list :list="oneData" v-if="tool.checkAuth($route.name,'read')"></list>
       <!--分页-->
-      <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber" @pageChange="pageChange">
-      </pagination>
+<!--      <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber" @pageChange="pageChange">-->
+<!--      </pagination>-->
     </div>
   </normalLayout>
   <el-drawer
@@ -44,7 +44,7 @@ export default {
               "nocache":true,
               "onceonly":1,
               "pageNumber": 1,
-              "pageSize": 9,
+              "pageSize": 9999,
               "where":{
                   "begdate":"",
                   "enddate":""