Sfoglia il codice sorgente

工时管家——后台百度统计

ZhouRuiTing 5 anni fa
parent
commit
39360ed667
100 ha cambiato i file con 1529 aggiunte e 2 eliminazioni
  1. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/application-dev.yml
  2. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml
  3. 19 0
      fhKeeper/formulahousekeeper/timesheet_wx/app.js
  4. 25 0
      fhKeeper/formulahousekeeper/timesheet_wx/app.json
  5. 10 0
      fhKeeper/formulahousekeeper/timesheet_wx/app.wxss
  6. 81 0
      fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.js
  7. 4 0
      fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.json
  8. 20 0
      fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.wxml
  9. 60 0
      fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.wxss
  10. 47 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.js
  11. 8 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.json
  12. 23 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.wxml
  13. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.wxss
  14. 37 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.js
  15. 7 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.json
  16. 15 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.wxml
  17. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.wxss
  18. 20 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.js
  19. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.json
  20. 4 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.wxml
  21. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.wxss
  22. 29 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.js
  23. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.json
  24. 5 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.wxml
  25. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.wxss
  26. 37 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/base/index.js
  27. 80 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.js
  28. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.json
  29. 20 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.wxml
  30. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.wxss
  31. 26 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.js
  32. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.json
  33. 11 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.wxml
  34. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.wxss
  35. 33 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/cell-group/index.js
  36. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/cell-group/index.json
  37. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/cell-group/index.wxml
  38. 86 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.js
  39. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.json
  40. 16 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.wxml
  41. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.wxss
  42. 38 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.js
  43. 7 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.json
  44. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.wxml
  45. 0 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.wxss
  46. 56 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.js
  47. 7 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.json
  48. 8 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.wxml
  49. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.wxss
  50. 20 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.js
  51. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.json
  52. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.wxml
  53. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.wxss
  54. 46 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.js
  55. 7 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.json
  56. 9 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.wxml
  57. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.wxss
  58. 31 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.js
  59. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.json
  60. 4 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.wxml
  61. 0 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.wxss
  62. 90 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.js
  63. 4 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.json
  64. 4 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.wxml
  65. 0 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.wxss
  66. 25 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.js
  67. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.json
  68. 19 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.wxml
  69. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.wxss
  70. 33 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.js
  71. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.json
  72. 6 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.wxml
  73. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.wxss
  74. 10 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.js
  75. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.json
  76. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.wxml
  77. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.wxss
  78. 16 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.js
  79. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.json
  80. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.wxml
  81. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.wxss
  82. 10 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.js
  83. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.json
  84. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.wxml
  85. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.wxss
  86. 50 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.js
  87. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.json
  88. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.wxml
  89. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.wxss
  90. 22 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.js
  91. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.json
  92. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.wxml
  93. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.wxss
  94. 32 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.js
  95. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.json
  96. 11 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.wxml
  97. 1 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.wxss
  98. 158 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/index/index.js
  99. 3 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/index/index.json
  100. 0 0
      fhKeeper/formulahousekeeper/timesheet_wx/dist/index/index.wxml

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application-dev.yml

@@ -13,7 +13,7 @@ spring:
       max-request-size: 10000MB
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://118.190.47.230:3306/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    url: jdbc:mysql://118.190.47.230:3306/man2?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
     username: root
     password: p011430seya1026
     hikari:

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -14,7 +14,7 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://118.190.47.230:3306/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    url: jdbc:mysql://118.190.47.230:3306/man2?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
     username: root
     password: p011430seya1026
     hikari:

+ 19 - 0
fhKeeper/formulahousekeeper/timesheet_wx/app.js

@@ -0,0 +1,19 @@
+//app.js
+App({
+    onLaunch: function () {
+        // 展示本地存储能力
+        // var logs = wx.getStorageSync('logs') || []
+        // logs.unshift(Date.now())
+        // wx.setStorageSync('logs', logs)
+        // console.log(wx.getStorageSync('userInfo'))
+    },
+    globalData: {
+		// 服务器ip
+		// serverUrl:"http://worktime.ttkuaiban.com",
+		// fileUrl: "http://worktime.ttkuaiban.com",
+        
+		// 测试环境ip
+        serverUrl:"http://192.168.5.184:10010",
+		fileUrl: "http://192.168.5.184:10010",
+    }
+})

+ 25 - 0
fhKeeper/formulahousekeeper/timesheet_wx/app.json

@@ -0,0 +1,25 @@
+{
+    "pages": [
+		"pages/home/index",
+		"pages/index/index",
+		
+        "pages/report/edit",
+        "pages/initCloud/initCloud",
+        "pages/detail/receiver",
+        "pages/book/book",
+        "pages/book/pdf",
+        "pages/cloud/cloud",
+        "pages/detail/detail",
+		"pages/detail/order",
+        "pages/share/share",
+        "pages/test/test"
+    ],
+    "window": {
+        "backgroundTextStyle": "light",
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "WeChat",
+        "navigationBarTextStyle": "black",
+        "withShareTicket": true
+    },
+    "sitemapLocation": "sitemap.json"
+}

+ 10 - 0
fhKeeper/formulahousekeeper/timesheet_wx/app.wxss

@@ -0,0 +1,10 @@
+/**app.wxss**/
+.container {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: space-between;
+	padding: 200rpx 0;
+	box-sizing: border-box;
+} 

+ 81 - 0
fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.js

@@ -0,0 +1,81 @@
+
+// 本组件为搜索组件
+// 需要传入addflag   值为true / false (搜索框右侧部分)
+// 若显示搜索框右侧部分   需传入右侧图标url以及addhandle函数
+
+Component({
+
+  properties: {
+
+    addflag: {    //显示搜索框右侧部分
+        type: Boolean,
+        value: false,
+        observer(newVal, oldVal, changedPath) {
+        }
+    },
+    addimg: {       //显示搜索框右侧部分icon
+        type: String,
+        value: ''
+    },
+    searchstr: {     //input  值
+        type: String,
+        value: '值'
+    },
+    searchflag: {
+        type: Boolean,
+        value: false,
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    // searchflag: false,   //搜索框 取消按钮显示与隐藏
+  },
+
+  /**
+   * 组件的方法列表
+
+   */
+  methods: {
+
+    //获得焦点
+    getfocus() {
+      this.setData({
+        searchflag: true,
+      })
+    },
+    //搜索框右侧按钮事件
+    addhandle() {
+      this.triggerEvent("addhandle");
+    },
+    //搜索输入
+    searchList(e) {
+      this.triggerEvent("searchList", e);
+    },
+    //查询
+    endsearchList(e) {
+
+      this.triggerEvent("endsearchList");
+    },
+    //失去焦点
+    blursearch() {
+      // console.log('失去焦点')
+
+    },
+    // 取消
+    cancelsearch() {
+      this.setData({
+        searchflag: false,
+      })
+      this.triggerEvent("cancelsearch");
+    },
+    //清空搜索框
+    activity_clear(e) {
+
+      this.triggerEvent("activity_clear");
+    },
+
+  }
+})

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 20 - 0
fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.wxml

@@ -0,0 +1,20 @@
+<!-- 组件模板 -->
+<view class="wrapper">
+
+  <slot></slot>
+  <!-- 搜索框开始 -->
+    <view class='tit_seabox'>
+        <view class="tit_seabox_bar">
+        <!-- {{addflag?'tit_seabox_add':''}} {{searchflag?'tit_start_search':''}} -->
+            <icon type='search' size="32rpx"></icon>
+            <input type="text" bindinput="searchList" bindconfirm="endsearchList" bindfocus='getfocus' bindblur="blursearch" confirm-type='search' value='{{searchstr}}' placeholder='搜索' />
+            <icon bindtap='activity_clear' wx:if="{{searchflag}}" type='clear' size="28rpx"></icon>
+        </view>
+        <!-- <view wx:if="{{searchflag}}" bindtap='cancelsearch' class="activity_seabtn">取消</view> -->
+        <view class='activity_seabtn' wx:if="{{addflag}}" bindtap='addhandle'>搜索</view>
+        <!-- <image src='{{addimg}}'></image> -->
+    </view>
+<!-- 搜索框结束 -->
+
+   
+</view>

+ 60 - 0
fhKeeper/formulahousekeeper/timesheet_wx/components/searchBox/searchBox.wxss

@@ -0,0 +1,60 @@
+/*搜索 开始*/
+.tit_seabox{
+  width: calc( 100% - 64rpx );
+  background: #fff;
+  height: 60rpx;
+  padding:20rpx 32rpx;
+  display: flex;
+  align-items: center;
+  overflow: hidden;
+}
+.tit_seabox_bar{
+    width: calc( 100% - 32rpx );
+    height: 60rpx;
+    display: flex;
+    align-items: center;
+    border-radius: 30rpx;
+    background: #DCDCDE;
+    padding-left: 32rpx;
+}
+/*有权限添加活动*/
+.tit_seabox_bar.tit_seabox_add{
+  width:calc( 100% - 122rpx );
+}
+/*开始搜索时*/
+.tit_seabox_bar.tit_start_search{
+  width: calc( 100% - 102rpx );
+}
+/*开始搜索且有权限添加*/
+.tit_seabox_bar.tit_start_search.tit_seabox_add{
+width:calc( 100% - 192rpx );
+}
+.tit_seabox_bar icon{
+  margin-right: 20rpx;
+
+}
+.tit_seabox input{
+  height:60rpx;
+  line-height:60rpx;
+  font-size:28rpx;
+  width:100%;
+  margin-right:32rpx;
+
+}
+.activity_add{
+  width:60rpx;
+  text-align:right;
+  border-left:4rpx solid #f2f2f2;
+  margin-left:20rpx;
+
+}
+.activity_add image{
+  width: 40rpx;
+  height: 40rpx;
+}
+.activity_seabtn{
+  font-size: 28rpx;
+  width: 70rpx;
+  text-align: right;
+}
+/*搜索 结束*/

+ 47 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.js

@@ -0,0 +1,47 @@
+Component({
+    externalClasses: ['i-class', 'i-class-mask', 'i-class-header'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    properties: {
+        visible: {
+            type: Boolean,
+            value: false
+        },
+        maskClosable: {
+            type: Boolean,
+            value: true
+        },
+        showCancel: {
+            type: Boolean,
+            value: false
+        },
+        cancelText: {
+            type: String,
+            value: '取消'
+        },
+        actions: {
+            type: Array,
+            value: []
+        }
+    },
+
+    methods: {
+        handleClickMask () {
+            if (!this.data.maskClosable) return;
+            this.handleClickCancel();
+        },
+
+        handleClickItem ({ currentTarget = {} }) {
+            const dataset = currentTarget.dataset || {};
+            const { index } = dataset;
+            this.triggerEvent('click', { index });
+        },
+
+        handleClickCancel () {
+            this.triggerEvent('cancel');
+        }
+    }
+});

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents":
+  {
+    "i-button": "../button/index",
+    "i-icon": "../icon/index"
+  }
+}

+ 23 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.wxml

@@ -0,0 +1,23 @@
+<view class="i-as-mask i-class-mask {{ visible ? 'i-as-mask-show' : '' }}" bindtap="handleClickMask"></view>
+<view class="i-class i-as {{ visible ? 'i-as-show' : '' }}">
+    <view class="i-as-header i-class-header"><slot name="header"></slot></view>
+    <view class="i-as-actions">
+        <view class="i-as-action-item" wx:for="{{ actions }}" wx:key="{{ item.name }}">
+            <i-button
+                bind:click="handleClickItem"
+                data-index="{{ index }}"
+                open-type="{{ item.openType }}"
+                type="ghost"
+                size="large"
+                long
+            >
+                <view class="i-as-btn-loading" wx:if="{{ item.loading }}"></view>
+                <i-icon wx:if="{{ item.icon }}" type="{{ item.icon }}" i-class="i-as-btn-icon"></i-icon>
+                <view class="i-as-btn-text" style="{{ item.color ? 'color: ' + item.color : '' }}">{{ item.name }}</view>
+            </i-button>
+        </view>
+    </view>
+    <view class="i-as-cancel" wx:if="{{ showCancel }}">
+        <i-button i-class="i-as-cancel-btn" type="ghost" size="large" long="true" bind:click="handleClickCancel">{{ cancelText }}</i-button>
+    </view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/action-sheet/index.wxss


+ 37 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.js

@@ -0,0 +1,37 @@
+Component({
+    externalClasses: ['i-class'],
+    options: {
+        multipleSlots: true
+    },
+    properties: {
+        //info, success, warning, error
+        type: {
+            type: String,
+            value: 'info'
+        },
+        closable: {
+            type: Boolean,
+            value: false
+        },
+        showIcon: {
+            type: Boolean,
+            default: false
+        },
+        desc: {
+            type: Boolean,
+            default: false
+        },
+    },
+    data: {
+        closed: false
+    },
+    methods: {
+        handleTap() {
+            this.setData({
+                closed: !this.data.closed,
+            });
+            this.triggerEvent('close');
+        },
+
+    }
+});

+ 7 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-icon": "../icon/index"
+    }
+}

+ 15 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.wxml

@@ -0,0 +1,15 @@
+<view class="i-class i-alert {{'i-alert-'+type}} {{showIcon?'i-alert-with-icon':''}} {{desc?'i-alert-with-desc':''}}" wx:if="{{!closed}}">
+    <view wx:if="{{ showIcon }}" class="i-alert-icon">
+        <i-icon type="prompt" wx:if="{{ type === 'info' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="success" wx:if="{{ type === 'success' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="warning" wx:if="{{ type === 'warning' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="delete" wx:if="{{ type === 'error' }}" size="{{desc?24:16}}"></i-icon>
+    </view>
+    <slot></slot>
+    <view class="i-alert-desc">
+        <slot name="desc"></slot>
+    </view>
+    <view class="i-alert-close" wx:if="{{ closable }}" bindtap="handleTap">
+        <i-icon type="close"></i-icon>
+    </view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/alert/index.wxss


+ 20 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.js

@@ -0,0 +1,20 @@
+Component({
+    externalClasses: ['i-class'],
+
+    properties: {
+        // circle || square
+        shape: {
+            type: String,
+            value: 'circle'
+        },
+        // small || large || default
+        size: {
+            type: String,
+            value: 'default'
+        },
+        src: {
+            type: String,
+            value: ''
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.wxml

@@ -0,0 +1,4 @@
+<view class="i-class i-avatar i-avatar-{{ shape }} i-avatar-{{ size }} {{ src ? 'i-avatar-image' : '' }}">
+    <image src="{{ src }}" wx:if="{{ src !== '' }}"></image>
+    <view class="i-avatar-string" wx:else><slot></slot></view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/avatar/index.wxss


+ 29 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.js

@@ -0,0 +1,29 @@
+Component({
+    externalClasses: ['i-class', 'i-class-alone'],
+
+    properties: {
+        count: {
+            type: Number,
+            value: 0,
+            observer: 'finalCount'
+        },
+        overflowCount: {
+            type: Number,
+            value: 99
+        },
+        dot: {
+            type: Boolean,
+            value: false
+        },
+    },
+    data: {
+        finalCount: 0
+    },
+    methods: {
+        finalCount() {
+            this.setData({
+                finalCount: parseInt(this.data.count) >= parseInt(this.data.overflowCount) ? `${this.data.overflowCount}+` : this.data.count
+            });
+        },
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.wxml

@@ -0,0 +1,5 @@
+<view class="i-class i-badge">
+    <slot></slot>
+    <view class="i-badge-dot" wx:if="{{ dot }}"></view>
+    <view class="i-badge-count i-class-alone" wx:elif="{{ count !== 0 }}">{{ finalCount }}</view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/badge/index.wxss


+ 37 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/base/index.js

@@ -0,0 +1,37 @@
+function getCtx (selector) {
+    const pages = getCurrentPages();
+    const ctx = pages[pages.length - 1];
+
+    const componentCtx = ctx.selectComponent(selector);
+
+    if (!componentCtx) {
+        console.error('无法找到对应的组件,请按文档说明使用组件');
+        return null;
+    }
+    return componentCtx;
+}
+
+function Toast(options) {
+    const { selector = '#toast' } = options;
+    const ctx = getCtx(selector);
+
+    ctx.handleShow(options);
+}
+
+Toast.hide = function (selector = '#toast') {
+    const ctx = getCtx(selector);
+
+    ctx.handleHide();
+};
+
+function Message(options) {
+    const { selector = '#message' } = options;
+    const ctx = getCtx(selector);
+
+    ctx.handleShow(options);
+}
+
+module.exports = {
+    $Toast: Toast,
+    $Message: Message
+};

+ 80 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.js

@@ -0,0 +1,80 @@
+Component({
+    externalClasses: ['i-class'],
+
+    properties: {
+        // default, primary, ghost, info, success, warning, error
+        type: {
+            type: String,
+            value: '',
+        },
+        inline: {
+            type: Boolean,
+            value: false
+        },
+        // default, large, small
+        size: {
+            type: String,
+            value: '',
+        },
+        // circle, square
+        shape: {
+            type: String,
+            value: 'square'
+        },
+        disabled: {
+            type: Boolean,
+            value: false,
+        },
+        loading: {
+            type: Boolean,
+            value: false,
+        },
+        long: {
+            type: Boolean,
+            value: false
+        },
+        openType: String,
+        appParameter: String,
+        hoverStopPropagation: Boolean,
+        hoverStartTime: {
+            type: Number,
+            value: 20
+        },
+        hoverStayTime: {
+            type: Number,
+            value: 70
+        },
+        lang: {
+            type: String,
+            value: 'en'
+        },
+        sessionFrom: {
+            type: String,
+            value: ''
+        },
+        sendMessageTitle: String,
+        sendMessagePath: String,
+        sendMessageImg: String,
+        showMessageCard: Boolean
+    },
+
+    methods: {
+        handleTap () {
+            if (this.data.disabled) return false;
+
+            this.triggerEvent('click');
+        },
+        bindgetuserinfo({ detail = {} } = {}) {
+            this.triggerEvent('getuserinfo', detail);
+        },
+        bindcontact({ detail = {} } = {}) {
+            this.triggerEvent('contact', detail);
+        },
+        bindgetphonenumber({ detail = {} } = {}) {
+            this.triggerEvent('getphonenumber', detail);
+        },
+        binderror({ detail = {} } = {}) {
+            this.triggerEvent('error', detail);
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 20 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.wxml

@@ -0,0 +1,20 @@
+<button
+    class="i-class i-btn {{ long ? 'i-btn-long' : '' }} {{ 'i-btn-' + size }} {{ 'i-btn-' + type }} {{ 'i-btn-' + shape }} {{ loading ? 'i-btn-loading' : '' }} {{ disabled ? 'i-btn-disabled' : ''}} {{ inline ? 'i-btn-inline' : '' }}"
+    hover-class="i-btn-hover"
+    bindtap="handleTap"
+    open-type="{{ openType }}"
+    app-parameter="{{ appParameter }}"
+    hover-stop-propagation="{{ hoverStopPropagation }}"
+    hover-start-time="{{ hoverStartTime }}"
+    hover-stay-time="{{ hoverStayTime }}"
+    session-from="{{ sessionFrom }}"
+    send-message-title="{{ sendMessageTitle }}"
+    send-message-path="{{ sendMessagePath }}"
+    send-message-img="{{ sendMessageImg }}"
+    show-message-card="{{ showMessageCard }}"
+    bindcontact="bindcontact"
+    bindgetuserinfo="bindgetuserinfo"
+    bindgetphonenumber="bindgetphonenumber"
+    binderror="binderror"
+    plain="true"
+><view class="i-btn-loading-inner" wx:if="{{loading}}"></view><slot></slot></button>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/button/index.wxss


+ 26 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.js

@@ -0,0 +1,26 @@
+Component({
+    externalClasses: ['i-class'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    properties: {
+        full: {
+            type: Boolean,
+            value: false
+        },
+        thumb: {
+            type: String,
+            value: ''
+        },
+        title: {
+            type: String,
+            value: ''
+        },
+        extra: {
+            type: String,
+            value: ''
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 11 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.wxml

@@ -0,0 +1,11 @@
+<view class="i-class i-card {{ full ? 'i-card-full' : '' }}">
+    <view class="i-class i-card-header">
+        <view class="i-card-header-content">
+            <image class="i-card-header-thumb" src="{{ thumb }}" mode="aspectFit" wx:if="{{ thumb }}" />
+            {{ title }}
+        </view>
+        <view class="i-card-header-extra" wx:if="{{ extra }}">{{ extra }}</view>
+    </view>
+    <view class="i-class i-card-body"><slot name="content"></slot></view>
+    <view class="i-class i-card-footer"><slot name="footer"></slot></view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/card/index.wxss


+ 33 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/cell-group/index.js

@@ -0,0 +1,33 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../cell/index': {
+            type: 'child',
+            linked () {
+                this._updateIsLastCell();
+            },
+            linkChanged () {
+                this._updateIsLastCell();
+            },
+            unlinked () {
+                this._updateIsLastCell();
+            }
+        }
+    },
+
+    methods: {
+        _updateIsLastCell() {
+            let cells = this.getRelationNodes('../cell/index');
+            const len = cells.length;
+
+            if (len > 0) {
+                let lastIndex = len - 1;
+
+                cells.forEach((cell, index) => {
+                    cell.updateIsLastCell(index === lastIndex);
+                });
+            }
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/cell-group/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/cell-group/index.wxml

@@ -0,0 +1,3 @@
+<view class="i-class i-cell-group">
+    <slot></slot>
+</view>

+ 86 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.js

@@ -0,0 +1,86 @@
+const warn = (msg, getValue) => {
+    console.warn(msg);
+    console.log('接受到的值为:', getValue);
+};
+
+Component({
+    externalClasses: ['i-class'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    relations: {
+        '../cell-group/index': {
+            type: 'parent'
+        }
+    },
+
+    properties: {
+        // 左侧标题
+        title: {
+            type: String
+        },
+        // 标题下方的描述信息
+        label: {
+            type: String
+        },
+        // 右侧内容
+        value: {
+            type: String
+        },
+        // 只有点击 footer 区域才触发 tab 事件
+        onlyTapFooter: {
+            type: Boolean
+        },
+        // 是否展示右侧箭头并开启尝试以 url 跳转
+        isLink: {
+            type: null,
+            value: ''
+        },
+        // 链接类型,可选值为 navigateTo,redirectTo,switchTab,reLaunch
+        linkType: {
+            type: String,
+            value: 'navigateTo'
+        },
+        url: {
+            type: String,
+            value: ''
+        }
+    },
+
+    data: {
+        isLastCell: true
+    },
+
+    methods: {
+        navigateTo () {
+            const { url } = this.data;
+            const type = typeof this.data.isLink;
+
+            this.triggerEvent('click', {});
+
+            if (!this.data.isLink || !url || url === 'true' || url === 'false') return;
+
+            if (type !== 'boolean' && type !== 'string') {
+                warn('isLink 属性值必须是一个字符串或布尔值', this.data.isLink);
+                return;
+            }
+
+            if (['navigateTo', 'redirectTo', 'switchTab', 'reLaunch'].indexOf(this.data.linkType) === -1) {
+                warn('linkType 属性可选值为 navigateTo,redirectTo,switchTab,reLaunch', this.data.linkType);
+                return;
+            }
+            wx[this.data.linkType].call(wx, {url});
+        },
+        handleTap () {
+            if (!this.data.onlyTapFooter) {
+                this.navigateTo();
+            }
+        },
+
+        updateIsLastCell (isLastCell) {
+            this.setData({ isLastCell });
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 16 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.wxml

@@ -0,0 +1,16 @@
+<view bindtap="handleTap" class="i-class i-cell {{ isLastCell ? 'i-cell-last' : '' }} {{ isLink ? 'i-cell-access' : '' }}">
+    <view class="i-cell-icon">
+        <slot name="icon"></slot>
+    </view>
+    <view class="i-cell-bd">
+        <view wx:if="{{ title }}" class="i-cell-text">{{ title }}</view>
+        <view wx:if="{{ label }}" class="i-cell-desc">{{ label }}</view>
+        <slot></slot>
+    </view>
+    <view catchtap="navigateTo" class="i-cell-ft">
+        <block wx:if="{{value}}">{{ value }}</block>
+        <block wx:else>
+            <slot name="footer"></slot>
+        </block>
+    </view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/cell/index.wxss


+ 38 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.js

@@ -0,0 +1,38 @@
+Component({
+    externalClasses: ['i-class'],
+    relations: {
+        '../checkbox/index': {
+            type: 'child',
+            linked() {
+                this.changeCurrent();
+            },
+            linkChanged() {
+                this.changeCurrent();
+            },
+            unlinked() {
+                this.changeCurrent();
+            }
+        }
+    },
+    properties: {
+        current: {
+            type: Array,
+            value: [],
+            observer: 'changeCurrent'
+        },
+    },
+    methods: {
+        changeCurrent(val = this.data.current) {
+            let items = this.getRelationNodes('../checkbox/index');
+            const len = items.length;
+            if (len > 0) {
+                items.forEach(item => {
+                    item.changeCurrent(val.indexOf(item.data.value) !== -1);
+                });
+            }
+        },
+        emitEvent(current) {
+            this.triggerEvent('change', current);
+        }
+    }
+});

+ 7 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-cell-group": "../cell-group/index"
+    }
+}

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.wxml

@@ -0,0 +1,3 @@
+<i-cell-group class="i-class">
+    <slot></slot>
+</i-cell-group>

+ 0 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox-group/index.wxss


+ 56 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.js

@@ -0,0 +1,56 @@
+const prefixCls = 'i-checkbox';
+
+Component({
+    externalClasses: ['i-class'],
+    relations: {
+        '../checkbox-group/index': {
+            type: 'parent'
+        }
+    },
+    properties: {
+        value: {
+            type: String,
+            value: ''
+        },
+        checked: {
+            type: Boolean,
+            value: false
+        },
+        disabled: {
+            type: Boolean,
+            value: false
+        },
+        color: {
+            type: String,
+            value: '#2d8cf0'
+        },
+        position: {
+            type: String,
+            value: 'left', //left right
+            observer: 'setPosition'
+        }
+    },
+    data: {
+        checked: true,
+        positionCls: `${prefixCls}-checkbox-left`,
+    },
+    attached() {
+        this.setPosition();
+    },
+    methods: {
+        changeCurrent(current) {
+            this.setData({ checked: current });
+        },
+        checkboxChange() {
+            if (this.data.disabled) return;
+            const item = { current: !this.data.checked, value: this.data.value };
+            const parent = this.getRelationNodes('../checkbox-group/index')[0];
+            parent ? parent.emitEvent(item) : this.triggerEvent('change', item);
+        },
+        setPosition() {
+            this.setData({
+                positionCls: this.data.position.indexOf('left') !== -1 ? `${prefixCls}-checkbox-left` : `${prefixCls}-checkbox-right`,
+            });
+        }
+    }
+});

+ 7 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-cell": "../cell/index"
+    }
+}

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.wxml

@@ -0,0 +1,8 @@
+<view class="i-class i-checkbox" catchtap="checkboxChange">
+    <i-cell i-class="i-checkbox-cell">
+        <label>
+            <radio value="{{value}}" checked="{{checked}}" color="{{checked?color:''}}" disabled="{{disabled}}" class="i-checkbox-radio {{positionCls}}" />
+            <view class="i-checkbox-title">{{value}}</view>
+        </label>
+    </i-cell>
+</view>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/checkbox/index.wxss

@@ -0,0 +1 @@
+.i-checkbox-cell::after{display:block}.i-checkbox-checkbox-left{float:left}.i-checkbox-checkbox-right{float:right}.i-checkbox-radio{vertical-align:middle}.i-checkbox-title{display:inline-block;vertical-align:middle}

+ 20 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.js

@@ -0,0 +1,20 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../row/index': {
+            type: 'parent'
+        }
+    },
+
+    properties: {
+        span: {
+            value: 0,
+            type: Number
+        },
+        offset: {
+            value: 0,
+            type: Number
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-col {{ span ? 'i-col-span-' + span : '' }} {{ offset ? 'i-col-offset-' + offset : '' }}"><slot></slot></view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/col/index.wxss


+ 46 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.js

@@ -0,0 +1,46 @@
+Component({
+    externalClasses: ['i-class-content', 'i-class-title', 'i-class'],
+
+    relations: {
+        '../collapse/index': {
+            type: 'parent',
+            linked: function (target) {
+                const options = {
+                    accordion: target.data.accordion
+                }
+                if (target.data.name === this.data.name) {
+                    options.showContent = 'i-collapse-item-show-content';
+                }
+                this.setData(options);
+            }
+        }
+    },
+
+    properties: {
+        title: String,
+        name: String
+    },
+
+    data: {
+        showContent: '',
+        accordion: false
+    },
+
+    options: {
+        multipleSlots: true
+    },
+
+    methods: {
+        trigger(e) {
+            const data = this.data;
+            if (data.accordion) {
+                this.triggerEvent('collapse', {name: data.name}, {composed: true, bubbles: true});
+            } else {
+                this.setData({
+                    showContent: data.showContent ? '' : 'i-collapse-item-show-content'
+                });
+            }
+        },
+    }
+});
+

+ 7 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.json

@@ -0,0 +1,7 @@
+
+{
+  "component": true,
+  "usingComponents": {
+    "i-icon": "../icon/index"
+  }
+}

+ 9 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.wxml

@@ -0,0 +1,9 @@
+<view id="{{name}}" class="i-class i-collapse-item ">
+    <view class="i-collapse-item-title-wrap" bindtap="trigger">
+        <i-icon size="16" type="enter" i-class="{{ showContent ? 'i-collapse-item-arrow-show' : 'i-collapse-item-arrow' }}"/>
+        <text class="i-collapse-item-title i-class-title">{{title}}</text>
+    </view>
+    <view class="i-collapse-item-content {{showContent}}  i-class-content">
+        <slot name="content"></slot>
+    </view>
+</view>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse-item/index.wxss

@@ -0,0 +1 @@
+.i-collapse-item{padding:2px 8px;border-top:1px solid #dddee1}.i-collapse-item-title{vertical-align:middle}.i-collapse-item-title-wrap{padding:2px 0 0}.i-collapse-item-content{padding:6px;display:none}.i-collapse-item-show-content{display:block}.i-collapse-item-arrow{transition:transform .2s ease-in-out}.i-collapse-item-arrow-show{transition:transform .2s ease-in-out;transform:rotate(90deg)}

+ 31 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.js

@@ -0,0 +1,31 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../collapse-item/index': {
+            type: 'child'
+        }
+    },
+    properties: {
+        name: String,
+        accordion: Boolean
+    },
+    methods: {
+        clickfn(e) {
+            const params = e.detail;
+            const allList = this.getRelationNodes('../collapse-item/index');
+            allList.forEach((item) => {
+                if (params.name === item.data.name) {
+                    item.setData({
+                        showContent: 'i-collapse-item-show-content'
+                    });
+                } else {
+                    item.setData({
+                        showContent: ''
+                    });
+                }
+            });
+        },
+    }
+});
+

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.wxml

@@ -0,0 +1,4 @@
+<view class="i-class i-collapse" bindcollapse="clickfn">
+  <slot></slot>
+</view>
+

+ 0 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/collapse/index.wxss


+ 90 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.js

@@ -0,0 +1,90 @@
+Component({
+    properties: {
+        target: Number,
+        showDay: Boolean,
+        callback: String,
+        format: Array,
+        clearTimer: Boolean
+    },
+    externalClasses: ['countdown-class'],
+    data: {
+        time: '',
+        resultFormat: [],
+        changeFormat: false
+    },
+    ready() {
+        this.getFormat();
+
+    },
+    methods: {
+        getFormat() {
+            const data = this.data;
+            const len = data.format.length;
+
+            if (!data.showDay) data.resultFormat.push('');
+
+            if (len >= 3) {
+                for (let i = 0; i < len; i++) {
+                    if (data.resultFormat.length >= 4) break;
+                    if (data.format[i]) {
+                        data.resultFormat.push(data.format[i].toString());
+                    }
+                }
+
+                if (data.resultFormat.length >= 4) data.changeFormat = true;
+            }
+
+            this.getLastTime();
+        },
+        init() {
+            const self = this;
+            setTimeout(function () {
+                self.getLastTime.call(self);
+            }, 1000);
+        },
+        getLastTime() {
+            const data = this.data;
+            const gapTime = Math.ceil((data.target - new Date().getTime()) / 1000);
+            let result = '';
+            let time = '00:00:00';
+            let day = '00';
+            const format = data.resultFormat;
+
+            if (gapTime > 0) {
+                day = this.formatNum(parseInt(gapTime / 86400));
+                let lastTime = gapTime % 86400;
+                const hour = this.formatNum(parseInt(lastTime / 3600));
+                lastTime = lastTime % 3600;
+                const minute = this.formatNum(parseInt(lastTime / 60));
+                const second = this.formatNum(lastTime % 60);
+
+                if (data.changeFormat) time = `${hour}${format[1]}${minute}${format[2]}${second}${format[3]}`;
+                else time = `${hour}:${minute}:${second}`;
+
+                if (!data.clearTimer) this.init.call(this);
+            } else {
+                this.endfn();
+            }
+
+            if (data.showDay) {
+                if (data.changeFormat) {
+                    result = `${day}${format[0]} ${time}`;
+                } else {
+                    result = `${day}d ${time}`;
+                }
+            } else {
+                result = time;
+            }
+            this.setData({
+                time: result
+            });
+
+        },
+        formatNum(num) {
+            return num > 9 ? num : `0${num}`;
+        },
+        endfn() {
+            this.triggerEvent('callback', {});
+        }
+    }
+});

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.json

@@ -0,0 +1,4 @@
+
+{
+  "component": true
+}

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.wxml

@@ -0,0 +1,4 @@
+<text class="countdown-class">
+  {{time}}
+</text>
+

+ 0 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/count-down/index.wxss


+ 25 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.js

@@ -0,0 +1,25 @@
+Component({
+    externalClasses: ['i-class'],
+    properties: {
+        content: {
+            type: String,
+            value: ''
+        },
+        height : {
+            type: Number,
+            value: 48
+        },
+        color : {
+            type : String,
+            value : '#80848f'
+        },
+        lineColor : {
+            type : String,
+            value : '#e9eaec'
+        },
+        size : {
+            type: String,
+            value: 12
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 19 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.wxml

@@ -0,0 +1,19 @@
+<view class="i-divider i-class" style="{{parse.getStyle(color,size,height)}}">
+    <view class="i-divider-content" wx:if="{{content !== ''}}">
+        {{content}}
+    </view>
+    <view class="i-divider-content" wx:else>
+        <slot></slot>
+    </view>
+    <view class="i-divider-line" style="background:{{lineColor}}"></view>
+</view>
+<wxs module="parse">
+    module.exports = {
+        getStyle : function(color,size,height){
+            var color = 'color:' + color +';';
+            var size = 'font-size:' + size + 'px;';
+            var height = 'height:' + height+'px;'      
+            return color + size + height;
+        }
+    }
+</wxs>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/divider/index.wxss

@@ -0,0 +1 @@
+.i-divider{width:100%;text-align:center;font-size:12px;position:relative;display:flex;align-items:center;justify-content:center}.i-divider-line{position:absolute;left:0;width:100%;height:1rpx;background-color:#f7f7f7;top:50%}.i-divider-content{background:#fff;position:relative;z-index:1;display:inline-block;padding:0 10px}

+ 33 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.js

@@ -0,0 +1,33 @@
+Component({
+    externalClasses: ['i-class'],
+    properties: {
+        visible: {
+            type: Boolean,
+            value: false
+        },
+
+        mask: {
+            type: Boolean,
+            value: true
+        },
+
+        maskClosable: {
+            type: Boolean,
+            value: true
+        },
+
+        mode: {
+            type: String,
+            value: 'left' // left right
+        }
+    },
+    data: {},
+    methods: {
+        handleMaskClick() {
+            if (!this.data.maskClosable) {
+                return;
+            }
+            this.triggerEvent('close', {});
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 6 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.wxml

@@ -0,0 +1,6 @@
+<view class="i-class i-drawer {{ visible ? 'i-drawer-show' : '' }} {{ 'i-drawer-' + mode }}">
+    <view wx:if="{{ mask }}" class="i-drawer-mask" bindtap="handleMaskClick"></view>
+    <view class="i-drawer-container">
+        <slot></slot>
+    </view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/drawer/index.wxss


+ 10 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.js

@@ -0,0 +1,10 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../grid-item/index': {
+            type: 'parent'
+        }
+    },
+
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-grid-icon"><slot></slot></view>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-icon/index.wxss

@@ -0,0 +1 @@
+.i-grid-icon{display:block;width:28px;height:28px;margin:0 auto}.i-grid-icon image{width:100%;height:100%}

+ 16 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.js

@@ -0,0 +1,16 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../grid/index': {
+            type: 'parent'
+        },
+        '../grid-icon/index': {
+            type: 'child'
+        }
+    },
+
+    data: {
+        width: '33.33%'
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-grid-item" style="width: {{ width }}"><slot></slot></view>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-item/index.wxss

@@ -0,0 +1 @@
+.i-grid-item{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #e9eaec;border-bottom:1rpx solid #e9eaec}

+ 10 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.js

@@ -0,0 +1,10 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../grid-item/index': {
+            type: 'parent'
+        }
+    },
+
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-grid-label"><slot></slot></view>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid-label/index.wxss

@@ -0,0 +1 @@
+.i-grid-label{margin-top:5px;display:block;text-align:center;color:#1c2438;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}

+ 50 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.js

@@ -0,0 +1,50 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../grid-item/index': {
+            type: 'child',
+            linked () {
+                this.setGridItemWidth();
+            },
+            linkChanged () {
+                this.setGridItemWidth();
+            },
+            unlinked () {
+                this.setGridItemWidth();
+            }
+        }
+    },
+
+    methods: {
+        setGridItemWidth () {
+            const nodes = this.getRelationNodes('../grid-item/index');
+
+            // const len = nodes.length;
+            // if (len < 3) {
+            //     nodes.forEach(item => {
+            //         item.setData({
+            //             'width': '33.33%'
+            //         });
+            //     });
+            // } else {
+            //     const width = 100 / nodes.length;
+            //     nodes.forEach(item => {
+            //         item.setData({
+            //             'width': width + '%'
+            //         });
+            //     });
+            // }
+            const width = 100 / nodes.length;
+            nodes.forEach(item => {
+                item.setData({
+                    'width': width + '%'
+                });
+            });
+        }
+    },
+
+    ready () {
+        this.setGridItemWidth();
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-grid"><slot></slot></view>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/grid/index.wxss

@@ -0,0 +1 @@
+.i-grid{border-top:1rpx solid #e9eaec;border-left:1rpx solid #e9eaec;overflow:hidden}

+ 22 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.js

@@ -0,0 +1,22 @@
+Component({
+    externalClasses: ['i-class'],
+
+    properties: {
+        type: {
+            type: String,
+            value: ''
+        },
+        custom: {
+            type: String,
+            value: ''
+        },
+        size: {
+            type: Number,
+            value: 14
+        },
+        color: {
+            type: String,
+            value: ''
+        }
+    }
+});

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-icon {{ type === '' ? '' : 'i-icon-' +  type }} {{ custom }}" style="font-size: {{ size }}px; {{ color ? 'color:' + color : '' }}"></view>

File diff suppressed because it is too large
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/icon/index.wxss


+ 32 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.js

@@ -0,0 +1,32 @@
+Component({
+    externalClasses: ['i-class'],
+    properties : {
+        name : {
+            type : String,
+            value : ''
+        }
+    },
+    relations : {
+        '../index/index' : {
+            type : 'parent'
+        }
+    },
+    data : {
+        top : 0,
+        height : 0,
+        currentName : ''
+    },
+    methods: {
+        updateDataChange() {
+            const className = '.i-index-item';
+            const query = wx.createSelectorQuery().in(this);
+            query.select( className ).boundingClientRect((res)=>{
+                    this.setData({
+                        top : res.top,
+                        height : res.height,
+                        currentName : this.data.name
+                    })
+            }).exec()
+        }
+    }
+})

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 11 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.wxml

@@ -0,0 +1,11 @@
+<view class="i-index-item i-class">
+    <view class="i-index-item-header">{{name}}</view>
+    <view class="i-index-item-content">
+        <slot></slot>
+    </view>
+</view>
+<wxs module="parse">
+    module.exports = {
+       
+    }
+</wxs>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/index-item/index.wxss

@@ -0,0 +1 @@
+.i-index-item-header{height:30px;line-height:30px;background:#eee;font-size:14px;padding-left:10px;width:100%;box-sizing:border-box}.i-index-item-content{font-size:14px}

+ 158 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/index/index.js

@@ -0,0 +1,158 @@
+Component({
+    externalClasses: ['i-class'],
+    properties : {
+        height : {
+            type : String,
+            value : '300'
+        },
+        itemHeight : {
+            type : Number,
+            value : 18
+        }
+    },
+    relations : {
+        '../index-item/index' : {
+            type : 'child',
+            linked(){
+                this._updateDataChange();
+            },
+            linkChanged () {
+                this._updateDataChange();
+            },
+            unlinked () {
+                this._updateDataChange();
+            }
+        }
+    },
+    data : {
+        scrollTop : 0,
+        fixedData : [],
+        current : 0,
+        timer : null,
+        startTop : 0,
+        itemLength : 0,
+        currentName : '',
+        isTouches : false
+    },
+    methods : {
+        loop(){},
+        _updateDataChange( ){
+            const indexItems = this.getRelationNodes('../index-item/index');
+            const len = indexItems.length;
+            const fixedData = this.data.fixedData;
+            /*
+             * 使用函数节流限制重复去设置数组内容进而限制多次重复渲染
+             * 暂时没有研究微信在渲染的时候是否会进行函数节流
+            */
+            if (len > 0) {
+
+                if( this.data.timer ){
+                    clearTimeout( this.data.timer )
+                    this.setData({
+                        timer : null
+                    })
+                }
+                
+                this.data.timer = setTimeout(()=>{
+                    const data = [];
+                    indexItems.forEach((item) => {
+                        if( item.data.name && fixedData.indexOf( item.data.name ) === -1 ){
+                            data.push(item.data.name);
+                            item.updateDataChange();
+                        }
+                    })
+                    this.setData({
+                        fixedData : data,
+                        itemLength : indexItems.length
+                    })
+                    //组件加载完成之后重新设置顶部高度
+                    this.setTouchStartVal();
+                },0);
+                this.setData({
+                    timer : this.data.timer
+                })
+                
+            }
+        },
+        handlerScroll(event){
+            const detail = event.detail;
+            const scrollTop = detail.scrollTop;
+            const indexItems = this.getRelationNodes('../index-item/index');
+            indexItems.forEach((item,index)=>{
+                let data = item.data;
+                let offset = data.top + data.height;
+                if( scrollTop < offset && scrollTop >= data.top ){
+                    this.setData({
+                        current : index,
+                        currentName : data.currentName
+                    })
+                }
+            })
+        },
+        getCurrentItem(index){
+            const indexItems = this.getRelationNodes('../index-item/index');
+            let result = {};
+            result = indexItems[index].data;
+            result.total = indexItems.length;
+            return result;
+        },
+        triggerCallback(options){
+            this.triggerEvent('change',options)
+        },
+        handlerFixedTap(event){
+            const eindex = event.currentTarget.dataset.index;
+            const item = this.getCurrentItem(eindex);
+            this.setData({
+                scrollTop : item.top,
+                currentName : item.currentName,
+                isTouches : true
+            })
+            this.triggerCallback({
+                index : eindex,
+                current : item.currentName
+            })
+        },
+        handlerTouchMove(event){
+            const data = this.data;
+            const touches = event.touches[0] || {};
+            const pageY = touches.pageY;
+            const rest = pageY - data.startTop;
+            let index = Math.ceil( rest/data.itemHeight );
+            index = index >= data.itemLength ? data.itemLength -1 : index;
+            const movePosition = this.getCurrentItem(index);
+
+           /*
+            * 当touch选中的元素和当前currentName不相等的时候才震动一下
+            * 微信震动事件
+           */
+            if( movePosition.name !== this.data.currentName ){
+                wx.vibrateShort();
+            }
+
+            this.setData({
+                scrollTop : movePosition.top,
+                currentName : movePosition.name,
+                isTouches : true
+            })
+
+            this.triggerCallback({
+                index : index,
+                current : movePosition.name
+            })
+        },
+        handlerTouchEnd(){
+            this.setData({
+                isTouches : false
+            })
+        },
+        setTouchStartVal(){
+            const className = '.i-index-fixed';
+            const query = wx.createSelectorQuery().in(this);
+            query.select( className ).boundingClientRect((res)=>{
+                this.setData({
+                    startTop : res.top
+                })
+            }).exec()
+        }
+    }
+})

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/index/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 0 - 0
fhKeeper/formulahousekeeper/timesheet_wx/dist/index/index.wxml


Some files were not shown because too many files changed in this diff