Explorar el Código

对接履职页面接口,调整全局样式

凉纪 hace 2 años
padre
commit
bee3f1c295

+ 6 - 2
src/assets/css/index.scss

@@ -6,11 +6,15 @@ body .app {
   height: 100vh;
   color: #333333;
   font-family: Arial, Helvetica, 'STHeiti STXihei', 'Microsoft YaHei', Tohoma, sans-serif;
-  background-color: $background-color;
+  background-color: rgb(245, 245, 249);
 
 }
 
 .app-container {
   padding-bottom: 100px;
-  -background-color: rgb(245, 245, 249);
+  background-color: rgb(245, 245, 249);
+}
+
+.layout-content{
+
 }

+ 1 - 1
src/components/DatePicker/index.vue

@@ -82,7 +82,7 @@ export default {
       console.log(day,'day')
       let dayLine = day.classes[7].substring(5);
       this.num = dayLine -1;
-      this.$emit('day',day.id)
+      this.$emit('change',day.id)
     },
   }
 }

+ 5 - 5
src/utils/globalMixins.js

@@ -26,11 +26,11 @@ export default {
             callBack(data)
         }
       })
-    }
-    //组件使用方法参考下边注释
-    // this.getDictHandler('core_check_type',res=>{
-    //     console.log(res);
-    // })
+    },
+    //根据字典类型获取字典值,返回字典label
+    getState(s,dict){
+      return  this[dict].find(v=> s == v.dictValue).dictLabel;
+    },
   }
 
 }

+ 0 - 46
src/views/home/isMy.vue

@@ -25,52 +25,6 @@ export default {
 <style lang="scss">
 .about-container {
   /* 你的命名空间 */
-  background: #fff;
-  height: 100vh;
-  box-sizing: border-box;
-  .warpper {
-    padding: 50px 12px 12px 12px;
-    .list {
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      color: #666;
-      font-size: 14px;
-      .demo-home__title {
-        margin: 0 0 6px;
-        font-size: 32px;
-        .demo-home__title img,
-        .demo-home__title span {
-          display: inline-block;
-          vertical-align: middle;
-        }
-      }
-      .item {
-        font-size: 14px;
-        line-height: 34px;
-        a {
-          text-decoration: underline;
-        }
-        .van-button {
-          /* vant-ui 元素*/
-          background: #ff5500;
-        }
-      }
 
-      .logo {
-        width: 120px;
-        height: 120px;
-        background: url($cdn + '/weapp/logo.png') center / contain no-repeat;
-      }
-      .wechat {
-        width: 200px;
-        height: 200px;
-        img {
-          width: 100%;
-          height: auto;
-        }
-      }
-    }
-  }
 }
 </style>

+ 1 - 1
src/views/home/menu.vue

@@ -145,7 +145,7 @@ export default {
 }
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped >
   .menu-container{
     background-color: rgba(237, 252, 255, 1)
   }

+ 1 - 29
src/views/home/works.vue

@@ -15,34 +15,6 @@ export default {
 
 <style lang="scss" scoped>
 .index-container {
-  .warpper {
-    padding: 24px;
-    background: #fff;
-    .demo-home__title {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      margin: 0 0 6px;
-      font-size: 56px;
-      .demo-home__title img,
-      .demo-home__title span {
-        display: inline-block;
-        vertical-align: middle;
-      }
-      img {
-        width: 64px;
-      }
-      span {
-        margin-left: 16px;
-        font-weight: 500;
-      }
-    }
-    .demo-home__desc {
-      text-align: center;
-      margin: 0 0 20px;
-      color: rgba(69, 90, 100, 0.6);
-      font-size: 28px;
-    }
-  }
+
 }
 </style>

+ 1 - 1
src/views/menu/LZRegister/api.js

@@ -1,7 +1,7 @@
 import request from "@/utils/request";
 export function dataList(data) {
   return request({
-    url: "/core/api/resumption/taskList",
+    url: "/core/api/resumption/newTaskList",
     method: "post",
     data,
   });

+ 2 - 3
src/views/menu/LZRegister/edit.vue

@@ -164,12 +164,11 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-
   .lz-edit{
+    height: 100%;
+    overflow: hidden;
   }
   .page-container{
-
-    background-color: #f1f1f1;
     overflow: auto;
     padding: 20px;
   }

+ 105 - 65
src/views/menu/LZRegister/index.vue

@@ -1,91 +1,101 @@
 <template>
-  <div class="lvzhi" ref="container">
+  <div class="lvzhi" >
     <nav-bar></nav-bar>
-    <div class="lz-container"  >
-      <van-sticky :container="container" style="padding: 0 20px;">
-        <DatePicker></DatePicker>
+    <div class="lz-container" ref="container">
+      <van-sticky :container="container">
+        <DatePicker @change="changeDate"></DatePicker>
       </van-sticky>
       <div class="lz-list">
         <div class="list-item">
           <p>今日履职</p>
           <van-tabs >
             <van-tab title="待完成">
-                <template #title>待完成 {{1}} </template>
+                <template #title>待完成 {{dayList.unfinished.length}} </template>
               <van-cell-group>
-                <van-cell title="单元格" is-link to="lz-edit" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
+                <van-cell
+                  v-for="v in dayList.unfinished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime)"
+                  is-link
+                  to="lz-edit"
+                  :value="getState(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
               </van-cell-group>
             </van-tab>
             <van-tab title="未完成">
-              <template #title>未完成 {{1}} </template>
+              <template #title>未完成 {{dayList.proceed.length}} </template>
               <van-cell-group>
-                <van-cell title="单元格" value="内容" />
-                <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-red`" />
+                <van-cell
+                  v-for="v in dayList.proceed"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime)"
+                  is-link
+                  to="lz-edit"
+                  :value="getState(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
               </van-cell-group>
             </van-tab>
             <van-tab title="已完成">
-              <template #title>已完成 {{1}} </template>
+              <template #title>已完成 {{dayList.finished.length}} </template>
               <van-cell-group>
-                <van-cell title="单元格" value="内容" />
-                <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-green`"/>
+                <van-cell
+                  v-for="v in dayList.finished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime)"
+                  is-link
+                  to="lz-edit"
+                  :value="getState(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
               </van-cell-group>
             </van-tab>
           </van-tabs>
         </div>
         <div class="list-item">
-          <p>今日履职</p>
-          <van-tabs >
-            <van-tab title="待完成">
-              <template #title>待完成 {{1}} </template>
-              <van-cell-group>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-              </van-cell-group>
-            </van-tab>
-            <van-tab title="未完成">
-              <template #title>未完成 {{1}} </template>
-              <van-cell-group>
-                <van-cell title="单元格" value="内容" />
-                <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-red`" />
-              </van-cell-group>
-            </van-tab>
-            <van-tab title="已完成">
-              <template #title>已完成 {{1}} </template>
-              <van-cell-group>
-                <van-cell title="单元格" value="内容" />
-                <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-green`"/>
-              </van-cell-group>
-            </van-tab>
-          </van-tabs>
-        </div>
-        <div class="list-item">
-          <p>今日履职</p>
+          <p>周期履职</p>
           <van-tabs >
             <van-tab title="待完成">
-              <template #title>待完成 {{1}} </template>
+              <template #title>待完成 {{otherList.finished.length}} </template>
               <van-cell-group>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
-                <van-cell title="单元格" is-link to="index" value="内容" :value-class="`title-orange`"/>
+                <van-cell
+                  v-for="v in otherList.unfinished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime)"
+                  is-link
+                  to="lz-edit"
+                  :value="getState(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
               </van-cell-group>
             </van-tab>
             <van-tab title="未完成">
-              <template #title>未完成 {{1}} </template>
+              <template #title>未完成 {{otherList.finished.length}} </template>
               <van-cell-group>
-                <van-cell title="单元格" value="内容" />
-                <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-red`" />
+                <van-cell
+                  v-for="v in otherList.proceed"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime)"
+                  is-link
+                  to="lz-edit"
+                  :value="getState(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
               </van-cell-group>
             </van-tab>
             <van-tab title="已完成">
-              <template #title>已完成 {{1}} </template>
+              <template #title>已完成 {{otherList.finished.length}} </template>
               <van-cell-group>
-                <van-cell title="单元格" value="内容" />
-                <van-cell title="单元格" value="内容" label="描述信息" :value-class="`title-green`"/>
+                <van-cell
+                  v-for="v in otherList.finished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime)"
+                  is-link
+                  to="lz-edit"
+                  :value="getState(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
               </van-cell-group>
             </van-tab>
           </van-tabs>
@@ -99,40 +109,72 @@
 import NavBar from '@/components/NavBar';
 import DatePicker from '@/components/DatePicker';
 import {mapGetters} from "vuex";
-import {dataList} from "./api"
+import {dataList} from "./api";
+import dayjs from "dayjs";
+
 export default {
   components:{NavBar,DatePicker},
   data(){
     return{
       date:new Date(),
       container: null,
-      typeCode:['day','mouth','year'],
+      dayList: {
+        unfinished:[],
+        proceed:[],
+        finished:[],
+      },
+      otherList:{
+        unfinished:[],
+        proceed:[],
+        finished:[],
+      },
+      dicts: ['resumption_status'],
     }
   },
   mounted() {
     this.container = this.$refs.container;
-    this.getDatalist();
+    this.initDatalist();
   },
   computed:{
     ...mapGetters(['orgName','orgId']),
   },
   methods:{
-    getDatalist(){
+    formatTime(start,end){
+      return `${dayjs(start).format('HH:mm')}-${dayjs(end).format('HH:mm')}`
+    },
+    initDatalist(){
       let data = {
-        dateTime: this.date,
+        dateTime: dayjs(new Date()).format('YYYY-MM-DD'),
         orgId: this.orgId,
         roleId:this.roleId,
-        typeCode:null,
       }
       dataList(data).then(res=>{
         console.log(res,'ressss')
       })
     },
+    getDatalist(){
+      let data = {
+       // dateTime: this.date,
+        orgid: 4358025846341633,
+        roleId:2,
+      }
+      dataList(data).then(res=>{
+        //今日
+        this.dayList.unfinished = res.data.day['1'];
+        this.dayList.proceed = res.data.day['3']
+        this.dayList.finished = res.data.day['2'];
+        //周期
+        this.otherList.unfinished = res.data.noDay['1'];
+        this.otherList.proceed = res.data.noDay['3']
+        this.otherList.finished = res.data.noDay['2'];
+      })
+    },
     queryMoth(){
 
     },
-    onDayClick(){
-
+    changeDate(val){
+      console.log(val,'val')
+      this.getDatalist();
     },
   }
 }
@@ -144,7 +186,6 @@ export default {
     overflow: hidden;
   }
   .lz-container{
-    height: calc(100vh - 90px);
     overflow: auto;
   }
   .top-date-box{
@@ -152,7 +193,6 @@ export default {
   }
   .lz-list{
     box-sizing: border-box;
-    background-color: #f1f1f1;
     overflow: auto;
   }
   .list-item{