Browse Source

refactor: 界面样式调整

tall
wally 4 years ago
parent
commit
4367249583
  1. 2
      .env.development
  2. 2
      .env.production
  3. 141
      CHANGELOG.md
  4. 7885
      package-lock.json
  5. 91
      package.json
  6. 11
      src/.hbuilderx/launch.json
  7. 3
      src/common/styles/index.css
  8. 41
      src/components/Globals/Globals.vue
  9. 18
      src/components/Plugin/Plugin.vue
  10. 86
      src/components/TimeLine/TimeLine.vue
  11. 32
      src/components/TimeLine/component/TimeBox.vue
  12. 23
      src/components/TimeLine/component/TimeStatus.vue
  13. 4
      src/main.js
  14. 163
      src/manifest.json
  15. 34
      src/pages.json
  16. 49
      src/pages/project/project.vue
  17. 3
      src/plugins/p-deliverable/p-deliverable.vue
  18. 3
      src/plugins/p-subproject/p-subproject.vue
  19. 2
      src/plugins/p-subtasks/p-subtasks.vue
  20. 3
      src/plugins/p-task-countdown/p-task-countdown.vue
  21. 3
      src/plugins/p-task-description/p-task-description.vue
  22. 12
      src/plugins/p-task-duration-delay/p-task-duration-delay.vue
  23. 6
      src/plugins/p-task-start-time-delay/p-task-start-time-delay.vue
  24. 3
      src/plugins/p-task-title/p-task-title.vue
  25. 8
      src/store/home/mutations.js
  26. 4
      src/store/home/state.js
  27. 9
      tailwind.config.js
  28. 4
      vue.config.js
  29. 13434
      yarn.lock

2
.env.development

@ -2,4 +2,4 @@ VUE_APP_NODE_ENV=development
VUE_APP_BASE_URL=https://test.tall.wiki VUE_APP_BASE_URL=https://test.tall.wiki
VUE_APP_API_URL=https://test.tall.wiki/gateway VUE_APP_API_URL=https://test.tall.wiki/gateway
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws
VUE_APP_PUBLIC_PATH=/pt-dev/ VUE_APP_PUBLIC_PATH=/tall/v3.0.0/static/

2
.env.production

@ -2,4 +2,4 @@ VUE_APP_NODE_ENV=production
VUE_APP_BASE_URL=https://www.tall.wiki VUE_APP_BASE_URL=https://www.tall.wiki
VUE_APP_API_URL=https://www.tall.wiki/gateway VUE_APP_API_URL=https://www.tall.wiki/gateway
VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws
VUE_APP_PUBLIC_PATH=/pt-dev/ VUE_APP_PUBLIC_PATH=/tall/v3.0.0/static/

141
CHANGELOG.md

@ -1,109 +1,110 @@
# 0.1.0 (2021-07-26) # 0.1.0 (2021-07-28)
### 🌟 新功能 ### 🌟 新功能
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | 标题栏变化 | [3898cfe](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/3898cfe) - | db store | 6414c4f
- | 标题栏变化 | [c0fcd9d](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c0fcd9d) - | indexedDB | 687394e
- | 标题栏角色栏全局任务组件新建 | [0500cb4](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/0500cb4) pinch | alloy finger实现图片的pinch放大缩小 | de01343
- | 插件数据获取 | [5b91bdc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/5b91bdc) - | post 封装 | da52e94
- | 存token | [b8a178d](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/b8a178d) - | tall插件封装 | 1bcb920
- | 定期任务面板骨架屏添加 | [b2698c0](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/b2698c0) - | ws storage | 21b3a06
- | 角色栏实现 | [94cd671](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/94cd671) - | 全局插件及默认插件位置修改 | 6c80d08
- | 模拟接口测试 | [69e7931](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/69e7931) - | 字体大小更改 | 82cfdd4
- | 配置默认插件接口 | [f0c177d](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f0c177d) - | 存token | b8a178d
- | 全局插件及默认插件位置修改 | [6c80d08](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/6c80d08) - | 定期任务面板骨架屏添加 | b2698c0
- | 时间基准线,默认插件 | [a33ba1e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/a33ba1e) 富文本插件 | 富文本插件demo测试 | ed3d644
- | 时间轴界面 | [33927e9](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/33927e9) - | 引入dayjs | 29b8b93
- | 时间轴修改状态时提示框增加 | [e841392](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e841392) - | 提交到本地 | 9cbe411
- | 提交到本地 | [9cbe411](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/9cbe411) - | 插件数据获取 | 5b91bdc
- | 添加时间轴上下滚动 | [2b81bbc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/2b81bbc) - | 时间基准线,默认插件 | a33ba1e
- | 引入dayjs | [29b8b93](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/29b8b93) - | 时间轴修改状态时提示框增加 | e841392
- | 字体大小更改 | [82cfdd4](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/82cfdd4) - | 时间轴界面 | 33927e9
- | db store | [6414c4f](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/6414c4f) - | 标题栏变化 | 3898cfe
- | indexedDB | [687394e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/687394e) - | 标题栏变化 | c0fcd9d
- | post 封装 | [da52e94](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da52e94) - | 标题栏角色栏全局任务组件新建 | 0500cb4
- | tall插件封装 | [1bcb920](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/1bcb920) - | 模拟接口测试 | 69e7931
- | ws storage | [21b3a06](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/21b3a06) - | 添加时间轴上下滚动 | 2b81bbc
富文本插件 | 富文本插件demo测试 | [ed3d644](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/ed3d644) - | 角色栏实现 | 94cd671
pinch | alloy finger实现图片的pinch放大缩小 | [de01343](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/de01343) - | 距调整pc端 | 5069aa1
- | 配置默认插件接口 | f0c177d
### 🎨 代码样式 ### 🎨 代码样式
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | 代码格式细节调整 | [cb2532b](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/cb2532b) - | 代码格式细节调整 | cb2532b
- | 更新代码 | [8c27e68](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/8c27e68) - | 任务快捷方式图标增加 | 4aba872
- | 更新代码 | [1f40a76](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/1f40a76) - | 修改角色样式 | 73e268e
- | 任务快捷方式图标增加 | [4aba872](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4aba872) - | 删除插件携带的多余文件 | 0f392bb
- | 日常任务修改 | [dfa7ee2](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/dfa7ee2) - | 图标修改 | 54bca09
- | 删除插件携带的多余文件 | [0f392bb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/0f392bb) - | 无基本变化 | 21ac4bb
- | 添加插件数据 | [2f11b42](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/2f11b42) - | 日常任务修改 | dfa7ee2
- | 图标修改 | [54bca09](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/54bca09) - | 更新代码 | 8c27e68
- | 无基本变化 | [21ac4bb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/21ac4bb) - | 更新代码 | 1f40a76
- | 修改角色样式 | [73e268e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/73e268e) - | 添加插件数据 | 2f11b42
- | 组件新建 | [89c0035](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/89c0035) - | 组件新建 | 89c0035
### 🐛 Bug 修复 ### 🐛 Bug 修复
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | 定期任务接口 | [aa4981c](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/aa4981c) - | 上下滑动加载定期任务 | 4090d89
- | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71) - | 上下滚动时间轴 | d533a01
- | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6) - | 下拉加载定期任务传参,时间格式化修改 | 0b95a0e
- | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da1eece) - | 修改main | 749ae9a
- | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/d533a01) - | 修改角色栏组件 | a54c601
- | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89) - | 定期任务接口 | aa4981c
- | 时间轴插件 | [225d3cc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/225d3cc) - | 提示信息显示bug及日常任务收缩问题 | f2f06c5
- | 时间轴上下滚动数据加载bug修改 | [e82ede4](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e82ede4) - | 时间轴上下滑动 | 4d0ae46
- | 时间轴上下滑动 | [4d0ae46](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4d0ae46) - | 时间轴上下滚动数据加载bug修改 | e82ede4
- | 提示信息显示bug及日常任务收缩问题 | [f2f06c5](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f2f06c5) - | 时间轴插件 | 225d3cc
- | 下拉加载定期任务传参,时间格式化修改 | [0b95a0e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/0b95a0e) - | 角色栏修改 | 19228d6
- | 修改角色栏组件 | [a54c601](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/a54c601) - | 解决时间轴报错 | da1eece
- | 修改main | [749ae9a](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/749ae9a) - | 骨架屏替换 | e9fdd71
### 📝 文档 ### 📝 文档
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | README.md | [ab0eb05](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/ab0eb05) - | README.md | ab0eb05
### 🔨 代码重构 ### 🔨 代码重构
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | 下滑时间轴添加备注 | [4fd20e3](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4fd20e3) - | project 代码健壮性完善 | a3202c5
- | project 代码健壮性完善 | [a3202c5](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/a3202c5) template | eslint prettier sass uview tailwindcss | 9c966a1
template | eslint prettier sass uview tailwindcss | [9c966a1](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/9c966a1) - | 下滑时间轴添加备注 | 4fd20e3
### 🚀 性能优化 ### 🚀 性能优化
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | 测试接口 | [215e074](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/215e074) - | 插件查询及展示 | 4dba770
- | 插件查询及展示 | [4dba770](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4dba770) - | 测试接口 | 215e074
- | 角色栏文字颜色修改 | [215c6b3](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/215c6b3) - | 组件文件夹新建 | 22bfe7b
- | 解决警告 | [c932b09](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c932b09) - | 组件文件夹新建 | 17bb8c9
- | 组件文件夹新建 | [22bfe7b](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/22bfe7b) - | 组件文件夹新建 | 1421504
- | 组件文件夹新建 | [17bb8c9](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/17bb8c9) - | 角色栏文字颜色修改 | 215c6b3
- | 组件文件夹新建 | [1421504](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/1421504) - | 解决警告 | c932b09
### chore ### chore
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | api 封装 | [8dcb8a2](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/8dcb8a2) - | api 封装 | 8dcb8a2
- | env host修改 | [a79a4a5](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/a79a4a5) - | env host修改 | a79a4a5
- | merge globals | [b0957cc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/b0957cc) - | merge globals | b0957cc
- | mock | [51c24a5](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/51c24a5) - | mock | 51c24a5
pwa 小程序 | 移除了pwa,alloyFinger添加平台判断 | [875fab4](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/875fab4) pwa 小程序 | 移除了pwa,alloyFinger添加平台判断 | 875fab4
- | uview-ui | [a9ea34b](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/a9ea34b) - | uview-ui | a9ea34b
信息配置 | 配置eslint等配置 | [7421443](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/7421443) 信息配置 | 配置eslint等配置 | 7421443
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | style:index | [978f272](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/978f272) - | style:index | 978f272
- | !2 基础模板v1.1.0 | [f5e61dd](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f5e61dd) - | !2 基础模板v1.1.0 | f5e61dd
- | init | [c0f1deb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c0f1deb) - | init | c0f1deb

7885
package-lock.json

File diff suppressed because it is too large

91
package.json

@ -9,9 +9,10 @@
"fix": "vue-cli-service lint --fix", "fix": "vue-cli-service lint --fix",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --mode development", "dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --mode development",
"dev:mock": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --mode mock", "dev:mock": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --mode mock",
"build:h5-test": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build --mode development",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build --mode production",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build", "build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom", "build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build", "build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build", "build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build", "build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
@ -47,33 +48,27 @@
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i" "test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app-plus": "^2.0.0-31920210609001", "@dcloudio/uni-app-plus": "^2.0.0-31920210709003",
"@dcloudio/uni-h5": "^2.0.0-31920210609001", "@dcloudio/uni-h5": "^2.0.0-31920210709003",
"@dcloudio/uni-i18n": "^2.0.0-31920210609001", "@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-mp-360": "^2.0.0-31920210609001", "@dcloudio/uni-i18n": "^2.0.0-31920210709003",
"@dcloudio/uni-mp-alipay": "^2.0.0-31920210609001", "@dcloudio/uni-mp-360": "^2.0.0-31920210709003",
"@dcloudio/uni-mp-baidu": "^2.0.0-31920210609001", "@dcloudio/uni-mp-alipay": "^2.0.0-31920210709003",
"@dcloudio/uni-mp-kuaishou": "^2.0.0-31920210609001", "@dcloudio/uni-mp-baidu": "^2.0.0-31920210709003",
"@dcloudio/uni-mp-qq": "^2.0.0-31920210609001", "@dcloudio/uni-mp-kuaishou": "^2.0.0-31920210709003",
"@dcloudio/uni-mp-toutiao": "^2.0.0-31920210609001", "@dcloudio/uni-mp-qq": "^2.0.0-31920210709003",
"@dcloudio/uni-mp-vue": "^2.0.0-31920210609001", "@dcloudio/uni-mp-toutiao": "^2.0.0-31920210709003",
"@dcloudio/uni-mp-weixin": "^2.0.0-31920210609001", "@dcloudio/uni-mp-vue": "^2.0.0-31920210709003",
"@dcloudio/uni-quickapp-native": "^2.0.0-31920210609001", "@dcloudio/uni-mp-weixin": "^2.0.0-31920210709003",
"@dcloudio/uni-quickapp-webview": "^2.0.0-31920210609001", "@dcloudio/uni-quickapp-native": "^2.0.0-31920210709003",
"@dcloudio/uni-stat": "^2.0.0-31920210609001", "@dcloudio/uni-quickapp-webview": "^2.0.0-31920210709003",
"@tailwindcss/postcss7-compat": "^2.2.4", "@dcloudio/uni-stat": "^2.0.0-31920210709003",
"@vue/shared": "^3.0.0", "@vue/shared": "^3.0.0",
"alloyfinger": "^0.1.16", "alloyfinger": "^0.1.16",
"autoprefixer": "^9.8.6",
"core-js": "^3.6.5",
"lodash": "^4.17.21",
"dayjs": "^1.10.6", "dayjs": "^1.10.6",
"postcss": "^7", "flyio": "^0.6.2",
"postcss-loader": "^6.1.1", "lodash": "^4.17.21",
"regenerator-runtime": "^0.12.1", "regenerator-runtime": "^0.12.1",
"register-service-worker": "^1.7.1",
"right-pad": "^1.0.1",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.4",
"uview-ui": "^1.8.4", "uview-ui": "^1.8.4",
"vue": "^2.6.11", "vue": "^2.6.11",
"vuex": "^3.2.0" "vuex": "^3.2.0"
@ -81,43 +76,47 @@
"devDependencies": { "devDependencies": {
"@babel/runtime": "~7.12.0", "@babel/runtime": "~7.12.0",
"@dcloudio/types": "*", "@dcloudio/types": "*",
"@dcloudio/uni-automator": "^2.0.0-31920210609001", "@dcloudio/uni-automator": "^2.0.0-31920210709003",
"@dcloudio/uni-cli-shared": "^2.0.0-31920210609001", "@dcloudio/uni-cli-shared": "^2.0.0-31920210709003",
"@dcloudio/uni-migration": "^2.0.0-31920210609001", "@dcloudio/uni-migration": "^2.0.0-31920210709003",
"@dcloudio/uni-template-compiler": "^2.0.0-31920210609001", "@dcloudio/uni-template-compiler": "^2.0.0-31920210709003",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-31920210609001", "@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-31920210709003",
"@dcloudio/vue-cli-plugin-uni": "^2.0.0-31920210609001", "@dcloudio/vue-cli-plugin-uni": "^2.0.0-31920210709003",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-31920210609001", "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-31920210709003",
"@dcloudio/webpack-uni-mp-loader": "^2.0.0-31920210609001", "@dcloudio/webpack-uni-mp-loader": "^2.0.0-31920210709003",
"@dcloudio/webpack-uni-pages-loader": "^2.0.0-31920210609001", "@dcloudio/webpack-uni-pages-loader": "^2.0.0-31920210709003",
"@tailwindcss/postcss7-compat": "^2.2.7",
"@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"autoprefixer": "^9.8.6",
"babel-plugin-import": "^1.11.0",
"core-js": "^3.15.2",
"cross-env": "^7.0.2",
"jest": "^25.4.0",
"mini-types": "*",
"miniprogram-api-typings": "*",
"sass-loader": "^8.0.2",
"node-sass": "^4.14.1",
"postcss": "^7.0.36",
"postcss-comment": "^2.0.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.7",
"vue-template-compiler": "^2.6.11",
"@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.11.0",
"commitizen": "^4.0.3", "commitizen": "^4.0.3",
"commitlint": "^8.2.0", "commitlint": "^8.2.0",
"conventional-changelog-cli": "^2.0.28", "conventional-changelog-cli": "^2.0.28",
"cross-env": "^7.0.2",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1", "eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"husky": "^3.0.9", "husky": "^3.0.9",
"jest": "^25.4.0",
"lint-staged": "^11.0.0", "lint-staged": "^11.0.0",
"mini-types": "*", "right-pad": "^1.0.1",
"miniprogram-api-typings": "*",
"node-sass": "^6.0.0",
"postcss-class-rename": "^1.0.1", "postcss-class-rename": "^1.0.1",
"postcss-comment": "^2.0.0",
"prettier": "^2.2.1", "prettier": "^2.2.1",
"sass": "^1.35.1", "vue-cli-plugin-commitlint": "~1.0.12"
"sass-loader": "10",
"vue-cli-plugin-commitlint": "~1.0.12",
"vue-cli-plugin-mock": "^1.0.3",
"vue-template-compiler": "^2.6.11"
}, },
"browserslist": [ "browserslist": [
"Android >= 4", "Android >= 4",

11
src/.hbuilderx/launch.json

@ -0,0 +1,11 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "local"
}
}
]
}

3
src/common/styles/index.css

@ -1,5 +1,6 @@
/* ./src/common/src/index.css */ /* ./src/common/styles/index.css */
/*! @import */
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;

41
src/components/Globals/Globals.vue

@ -1,19 +1,26 @@
<template> <template>
<view class="m-2"> <view class="m-2">
<u-card :show-foot="false" :show-head="false" :style="{ height: isShrink ? '96rpx' : '300rpx' }" border-radius="25" margin="0"> <u-card :show-foot="false" :show-head="false" :style="{ height: isShrink ? '106rpx' : '340rpx' }" border-radius="25" margin="0">
<view slot="body"> <view slot="body">
<scroll-view :scrollY="true" :style="{ height: isShrink ? '40rpx' : '240rpx' }"> <scroll-view :scrollY="true" :style="{ height: isShrink ? '50rpx' : '280rpx' }">
<skeleton :banner="false" :loading="!plugins.length" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton> <skeleton :banner="false" :loading="!tasks.length" :row="4" animate class="u-line-2 skeleton"></skeleton>
<view class="p-0 u-col-between"> <view class="grid gap-2">
<view class="grid grid-cols-3 gap-2 h-auto" v-if="plugins.length"> <template v-for="item in tasks">
<Plugin <template v-if="item.plugins">
:class="getClass(plugin.colspan, plugin.rowspan)" <template v-for="pluginArr in item.plugins">
:key="pluginIndex" <template class="p-0 u-col-between" v-if="pluginArr.length">
:pluginId="plugin.pluginId" <Plugin
:styleType="plugin.styleType || 0" :class="getClass(plugin.col, plugin.row)"
v-for="(plugin, pluginIndex) in plugins" :item="item"
/> :key="plugin.pluginTaskId"
</view> :pluginId="plugin.pluginId"
:styleType="plugin.styleType || 0"
v-for="plugin in pluginArr"
/>
</template>
</template>
</template>
</template>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -28,20 +35,16 @@ import Skeleton from '@/components/Skeleton/Skeleton';
export default { export default {
name: 'Global', name: 'Global',
components: { Skeleton }, components: { Skeleton },
props: { plugins: { type: Array, default: () => [] } }, props: { tasks: { type: Array, default: () => [] } },
data() { data() {
return { return {
// loading: true, // loading: true,
pluginId: 0,
styleType: 0,
task: null, task: null,
}; };
}, },
// mounted() {
// setTimeout(() => (this.loading = false), 2000);
// },
computed: mapState('home', ['isShrink']), computed: mapState('home', ['isShrink']),
methods: { methods: {
getClass(col, row) { getClass(col, row) {
return [`row-span-${row}`, `col-span-${col}`]; return [`row-span-${row}`, `col-span-${col}`];

18
src/components/Plugin/Plugin.vue

@ -9,7 +9,8 @@
<p-task-title :item="item" v-if="pluginId === '1'" /> <p-task-title :item="item" v-if="pluginId === '1'" />
<p-task-description :item="item" v-if="pluginId === '2'" /> <p-task-description :item="item" v-if="pluginId === '2'" />
<p-task-duration-delay :item="item" v-if="pluginId === '3'" /> <p-task-duration-delay :item="item" v-if="pluginId === '3'" />
<p-task-start-time-delay :item="item" v-if="pluginId === '4'" /> <p-task-start-time-delay :item="item" />
<!-- <p-task-start-time-delay :item="item" v-if="pluginId === '4'" /> -->
<p-deliverable :item="item" v-if="pluginId === '5'" /> <p-deliverable :item="item" v-if="pluginId === '5'" />
<p-subtasks :item="item" v-if="pluginId === '6'" /> <p-subtasks :item="item" v-if="pluginId === '6'" />
<p-subproject :item="item" v-if="pluginId === '7'" /> <p-subproject :item="item" v-if="pluginId === '7'" />
@ -29,26 +30,35 @@ export default {
type: Object, type: Object,
}, },
pluginId: { pluginId: {
default: '0', default: '1',
type: String, type: String,
}, },
styleType: { styleType: {
default: 0, default: 0,
type: Number, type: Number,
}, },
pluginTaskId: {
default: '0',
type: String,
},
}, },
data() { data() {
return { pluginContent: null }; return { pluginContent: null };
}, },
async created() { async created() {
await this.getPlugin(); await this.getPlugin();
if (this.pluginContent.js) { let domList = Array.from(document.getElementsByTagName('script'));
const index = domList.findIndex(item => item.id === `p${this.pluginContent.pluginId}`);
if (this.pluginContent.js && index === -1) {
var scriptDom = document.createElement('script'); var scriptDom = document.createElement('script');
scriptDom.id = `p${this.pluginContent.pluginId}`; scriptDom.id = `p${this.pluginContent.pluginId}`;
scriptDom.innerHTML = this.pluginContent.js; scriptDom.innerHTML = this.pluginContent.js;
document.body.append(scriptDom); document.body.append(scriptDom);
} }
}, },
methods: { methods: {
async getPlugin() { async getPlugin() {
const { pluginId, styleType } = this; const { pluginId, styleType } = this;
@ -56,9 +66,7 @@ export default {
pluginId, pluginId,
styleType, styleType,
}); });
this.$emit('changeLoading', false);
this.pluginContent = res; this.pluginContent = res;
console.log(this.pluginContent);
}, },
}, },
}; };

86
src/components/TimeLine/TimeLine.vue

@ -38,7 +38,7 @@ export default {
}, },
methods: { methods: {
...mapMutations('home', ['setScrollTop', 'setShrink', 'setRoleId']), ...mapMutations('home', ['setScrollTop', 'setShrink', 'setRoleId', 'setUpTasks', 'setDownTasks']),
// //
scroll(e) { scroll(e) {
@ -50,26 +50,79 @@ export default {
// //
async handleScrollTop() { async handleScrollTop() {
if (this.topEnd) return; if (this.topEnd) return;
const upQuery = { const startTime = this.tasks[0].planStart - 0;
timeNode: +this.tasks[0].planStart, console.log('this.topEnd: ', this.topEnd);
queryType: 0, console.log('this.tasks: ', this.tasks);
queryNum: 6, console.log('this.tasks[0].plugins: ', this.tasks[0].plugins);
}; if (this.tasks[0].plugins && this.tasks[0].plugins.length === 0 && !this.topEnd) {
await this.$emit('getTasks', upQuery); //
console.log('没有数据时: ');
const addTasks = [
{
panel: {},
plugins: [],
planStart: this.$t.time.add(startTime, -3, 'day').valueOf(),
},
{
panel: {},
plugins: [],
planStart: this.$t.time.add(startTime, -2, 'day').valueOf(),
},
{
panel: {},
plugins: [],
planStart: this.$t.time.add(startTime, -1, 'day').valueOf(),
},
];
this.setUpTasks([...addTasks.concat(this.tasks)]);
} else {
//
console.log('有数据时: ');
const upQuery = {
timeNode: startTime,
queryType: 0,
queryNum: 6,
};
await this.$emit('getTasks', upQuery);
}
}, },
// //
async handleScrollBottom() { async handleScrollBottom() {
if (this.bottomEnd) return; if (this.bottomEnd) return;
// =+ const startTime = this.tasks[this.tasks.length - 1].planStart - 0;
const cycle = this.$t.time.computeCycle('天'); if (this.tasks[0].plugins && this.tasks[0].plugins.length === 0 && !this.topEnd) {
const timeNode = this.$t.time.add(+this.tasks[this.tasks.length - 1].planStart, 1, cycle).valueOf(); //
const downQuery = { console.log('没有数据时: ');
timeNode, const addTasks = [
queryType: 1, {
queryNum: 6, panel: {},
}; plugins: [],
await this.$emit('getTasks', downQuery); planStart: this.$t.time.add(startTime, 1, 'day').valueOf(),
},
{
panel: {},
plugins: [],
planStart: this.$t.time.add(startTime, 2, 'day').valueOf(),
},
{
panel: {},
plugins: [],
planStart: this.$t.time.add(startTime, 3, 'day').valueOf(),
},
];
this.setDownTasks([...this.tasks.concat(addTasks)]);
} else {
// =+
const cycle = this.$t.time.computeCycle('天');
const timeNode = this.$t.time.add(startTime, 1, cycle).valueOf();
const downQuery = {
timeNode,
queryType: 1,
queryNum: 6,
};
await this.$emit('getTasks', downQuery);
}
}, },
// //
@ -80,7 +133,6 @@ export default {
const scrollHeight = document.getElementById('scroll').clientHeight; const scrollHeight = document.getElementById('scroll').clientHeight;
let width = document.documentElement.clientWidth; let width = document.documentElement.clientWidth;
for (let i = 0; i < 3; i++) { for (let i = 0; i < 3; i++) {
// TODO:
if (tasks[i].panel && tasks[i].panel.height) { if (tasks[i].panel && tasks[i].panel.height) {
// + 42 // + 42
tasksHeight += +tasks[i].panel.height + 42; tasksHeight += +tasks[i].panel.height + 42;

32
src/components/TimeLine/component/TimeBox.vue

@ -16,8 +16,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class="plugin border-l-2 border-gray-300 ml-3.5 my-2"> <view class="border-l-2 border-gray-300 plugin">
<view class="ml-4 overflow-hidden shadow-lg task-box"> <view class="ml-3 overflow-hidden shadow-lg task-box">
<u-card <u-card
:show-foot="false" :show-foot="false"
:show-head="false" :show-head="false"
@ -25,24 +25,23 @@
@click="changeTimeNode(item.planStart)" @click="changeTimeNode(item.planStart)"
class="h-16" class="h-16"
margin="0" margin="0"
v-if="item.plugins && item.plugins.length" v-if="item.plugins"
> >
<!-- 任务面板插件 --> <!-- 任务面板插件 -->
<view slot="body"> <view slot="body">
<view v-if="!item.plugins && !item.plugins.length && taskLoading"> <view v-if="!item.plugins.length">
<skeleton :banner="false" :loading="true" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton> <skeleton :banner="false" :loading="true" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton>
</view> </view>
<view class="p-0 u-col-between" v-else> <view class="p-0 u-col-between" v-else>
<view :key="pIndex" v-for="(p, pIndex) in item.plugins"> <view :key="pIndex" v-for="(p, pIndex) in item.plugins">
<view class="grid gap-2" v-if="p.length"> <view class="grid gap-2" v-if="p.length">
<Plugin <Plugin
:class="getClass(plugin.colspan, plugin.rowspan)" :class="getClass(plugin.col, plugin.row)"
:item="item" :item="item"
:key="pluginIndex" :key="plugin.pluginTaskId"
:pluginId="plugin.pluginId" :pluginId="plugin.pluginId"
:styleType="styleType" :styleType="styleType || 0"
@changeLoading="taskLoading = false" v-for="plugin in p"
v-for="(plugin, pluginIndex) in p"
/> />
</view> </view>
</view> </view>
@ -65,10 +64,10 @@ export default {
name: 'TimeBox', name: 'TimeBox',
components: { TimeStatus, Skeleton }, components: { TimeStatus, Skeleton },
data() { data() {
return { currentComponent: '', styleType: 0, taskLoading: true }; return { currentComponent: '', styleType: 0 };
}, },
computed: mapState('home', ['roleId', 'timeNode', 'timeUnit', 'tasks']), computed: mapState('home', ['roleId', 'timeNode', 'timeUnit', 'tasks', 'taskLoading']),
created() {}, created() {},
@ -108,6 +107,15 @@ export default {
height: 33px; height: 33px;
} }
.plugin { .plugin {
margin: 8px auto; margin-top: 8px;
margin-bottom: 8px;
margin-left: 15px;
}
/deep/ .ml-2 {
margin-left: 16px;
}
/deep/ .ml-3 {
margin-left: 20px;
} }
</style> </style>

23
src/components/TimeLine/component/TimeStatus.vue

@ -1,6 +1,10 @@
<template> <template>
<view class="u-font-14"> <view class="u-font-14">
<view class="iconColumn flex items-center justify-center text-blue-400 rounded-full" v-if="status === 0" @tap="changeStatus($event, 0)"> <view
class="flex items-center justify-center text-blue-400 rounded-full icon-column"
v-if="status === 0"
@tap="changeStatus($event, 0)"
>
<u-circle-progress :percent="100" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="4" width="66"> <u-circle-progress :percent="100" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="4" width="66">
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
@ -10,7 +14,8 @@
</view> </view>
</u-circle-progress> </u-circle-progress>
</view> </view>
<view class="iconColumn flex items-center justify-center text-black rounded-full" v-if="status === 1" @tap="changeStatus($event, 1)">
<view class="flex items-center justify-center text-black rounded-full icon-column" v-if="status === 1" @tap="changeStatus($event, 1)">
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> <u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66">
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
@ -18,7 +23,11 @@
</view> </view>
</u-circle-progress> </u-circle-progress>
</view> </view>
<view class="iconColumn flex items-center justify-center text-gray-400 rounded-full" v-if="status === 2" @tap="changeStatus($event, 2)"> <view
class="flex items-center justify-center text-gray-400 rounded-full icon-column"
v-if="status === 2"
@tap="changeStatus($event, 2)"
>
<u-circle-progress :percent="40" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> <u-circle-progress :percent="40" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66">
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
@ -29,11 +38,11 @@
</u-circle-progress> </u-circle-progress>
</view> </view>
<view <view
class="iconColumn flex items-center justify-center font-black text-red-800 rounded-full" class="flex items-center justify-center font-black text-red-800 rounded-full icon-column"
v-if="status === 3"
@tap="changeStatus($event, 3)" @tap="changeStatus($event, 3)"
v-if="status === 3"
> >
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> <u-circle-progress :percent="80" active-color="#2979ff" bg-color="rgba(255,255,255,0)" borderWidth="6" width="66">
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
<view class="u-progress-info"> <view class="u-progress-info">
@ -97,7 +106,7 @@ export default {
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.iconColumn { .icon-column {
height: 33px; height: 33px;
width: 33px; width: 33px;
} }

4
src/main.js

@ -1,13 +1,13 @@
import Vue from 'vue'; import Vue from 'vue';
import dayjs from 'dayjs';
import uView from 'uview-ui'; import uView from 'uview-ui';
import Tall from '@/utils/tall'; import Tall from '@/utils/tall';
import App from './App'; import App from './App';
import './common/styles/index.css'; import './common/styles/index.css';
import store from './store'; import store from './store';
import dayjs from 'dayjs';
//#ifdef H5 //#ifdef H5
import './registerServiceWorker'; // import './registerServiceWorker';
import AlloyFinger from 'alloyfinger'; import AlloyFinger from 'alloyfinger';
import AlloyFingerPlugin from 'alloyfinger/vue/alloy_finger_vue'; import AlloyFingerPlugin from 'alloyfinger/vue/alloy_finger_vue';
Vue.use(AlloyFingerPlugin, { AlloyFinger }); Vue.use(AlloyFingerPlugin, { AlloyFinger });

163
src/manifest.json

@ -1,75 +1,92 @@
{ {
"name": "", "name": "",
"appid": "", "appid": "",
"description": "", "description": "",
"versionName": "1.0.0", "versionName": "1.0.0",
"versionCode": "100", "versionCode": "100",
"transformPx": false, "transformPx": false,
"app-plus": { /* 5+App */ "app-plus": {
"usingComponents": true, /* 5+App */ "usingComponents": true,
"splashscreen": { "splashscreen": {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender": true,
"waiting": true, "waiting": true,
"autoclose": true, "autoclose": true,
"delay": 0 "delay": 0
}, },
"modules": { /* */ "modules": {
/* */
}, },
"distribute": { /* */ "distribute": {
"android": { /* android */ /* */
"permissions": ["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "android": {
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", /* android */
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", "permissions": [
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
] "<uses-feature android:name=\"android.hardware.camera\"/>",
}, "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"ios": { /* ios */ "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
}, },
"sdkConfigs": { /* SDK */ "ios": {
/* ios */
} },
} "sdkConfigs": {
}, /* SDK */
"quickapp": { /* */ }
},
"mp-weixin": { /* */
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"mp-qq" : {
"usingComponents" : true
} }
} },
"quickapp": {
/* */
},
"mp-weixin": {
/* */ "appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"mp-qq": {
"usingComponents": true
},
"h5": {
"router": {
"base": "/tall/v3.0.0"
},
"title": "时物链条",
"sdkConfigs": {
"maps": {}
},
"optimization": {
"treeShaking": {
"enable": false
}
}
}
}

34
src/pages.json

@ -4,39 +4,15 @@
"path": "pages/project/project", "path": "pages/project/project",
"style": { "style": {
"navigationStyle": "custom" , "navigationStyle": "custom" ,
"titleNView": "false", "navigationBarTextStyle": "white"
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/plugin-test/plugin-test",
"style": {
"navigationBarTitleText": "iframe-测试"
}
},
{
"path": "pages/rich-text/rich-text",
"style": {
"navigationBarTitleText": "rich-text 测试"
}
},
{
"path": "pages/pinch/pinch",
"style": {
"navigationBarTitleText": "pinch 测试"
}
},
{
"path": "components/Title/Title",
"style": {
"navigationStyle": "custom" ,
"navigationBarTextStyle": "white"
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationStyle": "custom" , "navigationBarTextStyle": "black",
"titleNView": "false" "navigationBarTitleText": "TALL",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}, },
"easycom": { "easycom": {
"autoscan": true, "autoscan": true,

49
src/pages/project/project.vue

@ -5,9 +5,7 @@
<view class="container flex flex-col flex-1 overflow-hidden bg-gray-100" style="margin: auto"> <view class="container flex flex-col flex-1 overflow-hidden bg-gray-100" style="margin: auto">
<!-- 角色栏 --> <!-- 角色栏 -->
<Roles @getTasksByRole="getTasksByRole" /> <Roles @getTasksByRole="getTasksByRole" />
<!-- 日常任务 --> <Globals :tasks="allPlugins.concat(timePlugins)" />
<Globals :plugins="plugins" />
<!-- 定期任务 -->
<TimeLine @getTasks="getTasks" class="flex-1 overflow-hidden" ref="child" /> <TimeLine @getTasks="getTasks" class="flex-1 overflow-hidden" ref="child" />
</view> </view>
</view> </view>
@ -18,7 +16,7 @@ import { mapState, mapMutations, mapActions } from 'vuex';
export default { export default {
data() { data() {
return { height: '', plugins: [] }; return { height: '', plugins: [], allPlugins: [], timePlugins: [] };
}, },
computed: { computed: {
@ -36,20 +34,24 @@ export default {
* 重新根据时间和角色查询普通日常任务 * 重新根据时间和角色查询普通日常任务
* 永久日常任务不发生改变 * 永久日常任务不发生改变
*/ */
async timeNode() { async timeNode(val) {
// if (val) {
await this.getGlobal(); //
await this.getGlobal();
}
}, },
/** /**
* 当角色发生变化时 * 当角色发生变化时
* 重新查询永久日常任务和普通日常任务 * 重新查询永久日常任务和普通日常任务
*/ */
async roleId() { async roleId(val) {
this.setTimeNode(new Date().getTime()); if (val) {
// this.setTimeNode(new Date().getTime());
await this.getPermanent(); //
// await this.getPermanent();
await this.getGlobal(); //
await this.getGlobal();
}
}, },
}, },
@ -167,10 +169,12 @@ export default {
try { try {
this.allPlugins = []; this.allPlugins = [];
const res = await this.$u.api.getPermanent({ roleId: this.roleId }); const res = await this.$u.api.getPermanent({ roleId: this.roleId });
for (let item of res) { // for (let item of res) {
this.allPlugins = this.allPlugins.concat(item.plugins); // if (item.plugins) {
} // this.allPlugins = this.allPlugins.concat(item.plugins);
console.log('res', res); // }
// }
this.allPlugins = res;
} catch (error) { } catch (error) {
console.log('error: ', error); console.log('error: ', error);
} }
@ -188,11 +192,12 @@ export default {
const { roleId, timeNode, timeUnit } = this; const { roleId, timeNode, timeUnit } = this;
const params = { roleId, timeNode, timeUnit }; const params = { roleId, timeNode, timeUnit };
const res = await this.$u.api.getGlobal(params); const res = await this.$u.api.getGlobal(params);
for (let task of res) { // for (let task of res) {
for (let item of task.plugins) { // for (let item of task.plugins) {
this.timePlugins.push(...item); // this.timePlugins.push(...item);
} // }
} // }
this.timePlugins = res;
this.setDailyTasks(res); this.setDailyTasks(res);
} catch (error) { } catch (error) {
console.log('error: ', error); console.log('error: ', error);

3
src/plugins/p-deliverable/p-deliverable.vue

@ -1,5 +1,6 @@
<template> <template>
<div>交付物</div> <!-- 交付物 -->
<view>交付物</view>
</template> </template>
<script> <script>

3
src/plugins/p-subproject/p-subproject.vue

@ -1,5 +1,6 @@
<template> <template>
<div>子项目插件显示子项目</div> <!-- 子项目插件 -->
<view>子项目插件显示子项目</view>
</template> </template>
<script> <script>

2
src/plugins/p-subtasks/p-subtasks.vue

@ -1,5 +1,5 @@
<template> <template>
<div>子任务插件显示子任务</div> <view>子任务插件显示子任务</view>
</template> </template>
<script> <script>

3
src/plugins/p-task-countdown/p-task-countdown.vue

@ -1,5 +1,6 @@
<template> <template>
<div>任务倒计时插件</div> <!-- 任务倒计时插件 -->
<view>任务倒计时插件</view>
</template> </template>
<script> <script>

3
src/plugins/p-task-description/p-task-description.vue

@ -1,5 +1,6 @@
<template> <template>
<div>{{ item.description }}</div> <!-- 任务描述 -->
<view>{{ item.description }}</view>
</template> </template>
<script> <script>

12
src/plugins/p-task-duration-delay/p-task-duration-delay.vue

@ -1,5 +1,15 @@
<template> <template>
<div>任务时长延迟插件+-1min时间格式可设置</div> <view v-if="item.realDuration && item.planDuration">
<!-- 任务时长延迟插件 -->
<!-- 超时 -->
<span class="text-green-500 font-bold" v-if="+item.realDuration > +item.planDuration"
>+{{ $t.time.formatDuration(+item.realDuration - +item.planDuration) }}</span
>
<!-- 延时 -->
<span class="text-red-500 font-bold" v-if="+item.realDuration < +item.planDuration"
>-{{ $t.time.formatDuration(+item.planDuration - +item.realDuration) }}</span
>
</view>
</template> </template>
<script> <script>

6
src/plugins/p-task-start-time-delay/p-task-start-time-delay.vue

@ -1,5 +1,9 @@
<template> <template>
<div>任务开始时间延迟插件+-1hour</div> <view v-if="item.realStart && item.planStart">
<!-- 任务开始时间延迟插件 -->
<!-- 超时 -->
<span>{{ $t.time.formatDuration(+item.realStart - +item.planStart) }}</span>
</view>
</template> </template>
<script> <script>

3
src/plugins/p-task-title/p-task-title.vue

@ -1,5 +1,6 @@
<template> <template>
<div>{{ item.name }}</div> <!-- 任务名插件 -->
<view>{{ item.name }}</view>
</template> </template>
<script> <script>

8
src/store/home/mutations.js

@ -125,7 +125,6 @@ const mutations = {
if (!data || !data.length) { if (!data || !data.length) {
state.topEnd = true; state.topEnd = true;
} }
console.log('!state.tasks.plugins.length: ', !state.tasks[0].name);
if (!state.tasks[0].name) { if (!state.tasks[0].name) {
state.tasks = [...data]; state.tasks = [...data];
} else { } else {
@ -154,21 +153,22 @@ const mutations = {
* @param {Object} state * @param {Object} state
*/ */
setTasks(state) { setTasks(state) {
const time = +new Date().getTime();
const data = [ const data = [
{ {
panel: {}, panel: {},
plugins: [], plugins: [],
planStart: new Date().getTime(), planStart: uni.$t.time.add(time, -1, 'day').valueOf(),
}, },
{ {
panel: {}, panel: {},
plugins: [], plugins: [],
planStart: new Date().getTime(), planStart: time,
}, },
{ {
panel: {}, panel: {},
plugins: [], plugins: [],
planStart: new Date().getTime(), planStart: uni.$t.time.add(time, 1, 'day').valueOf(),
}, },
]; ];
state.tasks = data; state.tasks = data;

4
src/store/home/state.js

@ -18,7 +18,7 @@ const state = {
{ {
panel: {}, panel: {},
plugins: [], plugins: [],
planStart: new Date().getTime(), planStart: uni.$t.time.add(+new Date().getTime(), -1, 'day').valueOf(),
}, },
{ {
panel: {}, panel: {},
@ -28,7 +28,7 @@ const state = {
{ {
panel: {}, panel: {},
plugins: [], plugins: [],
planStart: new Date().getTime(), planStart: uni.$t.time.add(+new Date().getTime(), 1, 'day').valueOf(),
}, },
], // 定期任务 ], // 定期任务
topEnd: false, // 时间轴向上查任务到顶了 topEnd: false, // 时间轴向上查任务到顶了

9
tailwind.config.js

@ -1,12 +1,5 @@
/*
* @Author: aBin
* @email: binbin0314@126.com
* @Date: 2021-07-19 10:09:22
* @LastEditors: aBin
* @LastEditTime: 2021-07-19 11:48:41
*/
module.exports = { module.exports = {
purge: [], purge: ['./public/index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
darkMode: false, // or 'media' or 'class' darkMode: false, // or 'media' or 'class'
theme: { extend: {} }, theme: { extend: {} },
variants: { extend: {} }, variants: { extend: {} },

4
vue.config.js

@ -1,9 +1,11 @@
const path = require('path'); const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin'); // 最新版本copy-webpack-plugin插件暂不兼容,推荐v5.0.0 const CopyWebpackPlugin = require('copy-webpack-plugin'); // 最新版本copy-webpack-plugin插件暂不兼容,推荐v5.0.0
const publicPath = process.env.VUE_APP_PUBLIC_PATH;
module.exports = { module.exports = {
lintOnSave: process.env.NODE_ENV !== 'production', lintOnSave: process.env.NODE_ENV !== 'production',
productionSourceMap: false, productionSourceMap: false,
publicPath: process.env.NODE_ENV === 'production' ? publicPath : '/',
devServer: { devServer: {
// open: true, // open: true,
// host: '127.0.0.1', // host: '127.0.0.1',
@ -13,6 +15,6 @@ module.exports = {
configureWebpack: { plugins: [] }, configureWebpack: { plugins: [] },
// , disable: true // , disable: true
pluginOptions: { pluginOptions: {
mock: { entry: './src/mock/mock.js', debug: true }, // mock: { entry: './src/mock/mock.js', debug: true, disable: true },
}, },
}; };

13434
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save