Browse Source

Merge remote-tracking branch 'origin/lucky' into project

pull/1/head
wally 4 years ago
parent
commit
7c51a9eb9d
  1. 297
      CHANGELOG.md
  2. 6
      src/apis/plugin.js
  3. 4
      src/apis/role.js
  4. 24
      src/components/Plugin/Plugin.vue
  5. 335
      src/components/ld-select/ld-select.vue
  6. 22
      src/components/uni-popup/message.js
  7. 23
      src/components/uni-popup/popup.js
  8. 246
      src/components/uni-popup/uni-popup-dialog.vue
  9. 115
      src/components/uni-popup/uni-popup-message.vue
  10. 171
      src/components/uni-popup/uni-popup-share.vue
  11. 289
      src/components/uni-popup/uni-popup.vue
  12. 276
      src/components/uni-transition/uni-transition.vue
  13. 1
      src/pages/project/project.vue
  14. 61
      src/plugins/p-deliver-check/p-deliver-check.vue
  15. 20
      src/plugins/p-deliverable/p-deliverable.vue
  16. 140
      src/plugins/p-delivery-history/p-delivery-history.vue
  17. 104
      src/plugins/p-upload-deliverable/p-upload-deliverable.vue
  18. 16
      src/store/role/actions.js
  19. 12
      src/store/role/getters.js
  20. 9
      src/store/role/mutations.js
  21. 1
      src/store/role/state.js

297
CHANGELOG.md

@ -3,90 +3,92 @@
### 🌟 新功能
范围|描述|commitId
--|--|--
- | api封装 | 7d4edfc
bind phone | 图形验证码;短信验证码;绑定手机号 | 93ffea2
- | cache indexedDB处理 | 3388967
calendar, tall.js | 上下滑动切换日历的模式,tall.js中domain根据环境变量切换 | 364e25d
- | db store | 6414c4f
default plugin | 添加默认插件;项目列表;全局项目最大高度设置 | ed1d87b
- | indexedDB | 687394e
mp | 兼容小程序,去除window,document等 | 9178255
- | network控制本地缓存的使用 | 858429e
phone-bind | 验证码validate | a427250
pinch | alloy finger实现图片的pinch放大缩小 | de01343
plugin | 插件添加了token及param参数 | aeb0292
- | post 封装 | da52e94
- | tall插件封装 | 1bcb920
task status | 任务状态切换未完 | 7ffd135
- | ws storage | 21b3a06
- | 上传逻辑变化 | 3ff1dc2
- | 任务状态时间显示 | 56f5183
- | 任务进行中状态数字 | 27b7326
- | 全局插件及默认插件位置修改 | 6c80d08
- | 向右箭头图标变化 | 8e9ca55
- | 字体大小更改 | 82cfdd4
- | 存token | b8a178d
- | 定期任务面板骨架屏添加 | b2698c0
富文本插件 | 富文本插件demo测试 | ed3d644
- | 导入wbs | 1224fcb
- | 导入项目,更新项目 | 5e06adf
- | 导入项目后提示并打开项目详情页 | 410f527
- | 引入dayjs | 29b8b93
- | 提交到本地 | 9cbe411
- | 插件参数处理调整 | a3e68d3
- | 插件数据获取 | 5b91bdc
- | 日历定位;合并 | ea3f937
- | 日常任务插件调整 | c1881f9
- | 时间基准线,默认插件 | a33ba1e
- | 时间轴修改状态时提示框增加 | e841392
- | 时间轴界面 | 33927e9
- | 标题栏变化 | 3898cfe
- | 标题栏变化 | c0fcd9d
- | 标题栏角色栏全局任务组件新建 | 0500cb4
- | 模拟接口测试 | 69e7931
- | 添加子任务插件 子项目插件 | 7bda7e2
- | 添加时间轴上下滚动 | 2b81bbc
- | 添加项目排序 | a0b491b
- | 点击日历日期查询项目列表 | c458385
- | 细节调整,添加project-webview | 4d9050b
- | 绑定手机号 | 52e0352
- | 缓存修改 | 63e1f0d
- | 角色栏实现 | 94cd671
- | 设置小红点 | 9316bcb
- | 距调整pc端 | 5069aa1
- | 适配小程序;小程序登录 | cefc0eb
- | 配置默认插件接口 | f0c177d
- | 面变化首页变化 | 5e860f1
- | 项目api url设置 | 6cd5245
- | 项目列表, 项目url | 32e005b
- | 首页项目样式改变 | 8514c85
- | api封装 | [7d4edfc](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7d4edfc)
bind phone | 图形验证码;短信验证码;绑定手机号 | [93ffea2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/93ffea2)
- | cache indexedDB处理 | [3388967](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/3388967)
calendar, tall.js | 上下滑动切换日历的模式,tall.js中domain根据环境变量切换 | [364e25d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/364e25d)
- | db store | [6414c4f](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6414c4f)
default plugin | 添加默认插件;项目列表;全局项目最大高度设置 | [ed1d87b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/ed1d87b)
- | indexedDB | [687394e](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/687394e)
mp | 兼容小程序,去除window,document等 | [9178255](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/9178255)
- | network控制本地缓存的使用 | [858429e](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/858429e)
phone-bind | 验证码validate | [a427250](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a427250)
pinch | alloy finger实现图片的pinch放大缩小 | [de01343](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/de01343)
plugin | 插件添加了token及param参数 | [aeb0292](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/aeb0292)
- | post 封装 | [da52e94](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/da52e94)
- | tall插件封装 | [1bcb920](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/1bcb920)
task status | 任务状态切换未完 | [7ffd135](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7ffd135)
- | ws storage | [21b3a06](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/21b3a06)
- | 上传逻辑变化 | [3ff1dc2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/3ff1dc2)
- | 任务状态时间显示 | [56f5183](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/56f5183)
- | 任务进行中状态数字 | [27b7326](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/27b7326)
- | 全局插件及默认插件位置修改 | [6c80d08](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6c80d08)
- | 向右箭头图标变化 | [8e9ca55](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/8e9ca55)
- | 字体大小更改 | [82cfdd4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/82cfdd4)
- | 存token | [b8a178d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b8a178d)
- | 定期任务面板骨架屏添加 | [b2698c0](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b2698c0)
富文本插件 | 富文本插件demo测试 | [ed3d644](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/ed3d644)
- | 导入wbs | [1224fcb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/1224fcb)
- | 导入项目,更新项目 | [5e06adf](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5e06adf)
- | 导入项目后提示并打开项目详情页 | [410f527](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/410f527)
- | 引入dayjs | [29b8b93](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/29b8b93)
- | 提交到本地 | [9cbe411](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/9cbe411)
- | 插件参数处理调整 | [a3e68d3](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a3e68d3)
- | 插件数据获取 | [5b91bdc](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5b91bdc)
- | 日历定位;合并 | [ea3f937](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/ea3f937)
- | 日常任务插件调整 | [c1881f9](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c1881f9)
- | 时间基准线,默认插件 | [a33ba1e](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a33ba1e)
- | 时间轴修改状态时提示框增加 | [e841392](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e841392)
- | 时间轴界面 | [33927e9](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/33927e9)
- | 标题栏变化 | [3898cfe](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/3898cfe)
- | 标题栏变化 | [c0fcd9d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c0fcd9d)
- | 标题栏角色栏全局任务组件新建 | [0500cb4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0500cb4)
- | 检查交付物 | [9d92be5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/9d92be5)
- | 模拟接口测试 | [69e7931](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/69e7931)
- | 添加内置插件-交付物 | [6e0bc46](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6e0bc46)
- | 添加子任务插件 子项目插件 | [7bda7e2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7bda7e2)
- | 添加时间轴上下滚动 | [2b81bbc](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/2b81bbc)
- | 添加项目排序 | [a0b491b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a0b491b)
- | 点击日历日期查询项目列表 | [c458385](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c458385)
- | 细节调整,添加project-webview | [4d9050b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4d9050b)
- | 绑定手机号 | [52e0352](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/52e0352)
- | 缓存修改 | [63e1f0d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/63e1f0d)
- | 角色栏实现 | [94cd671](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/94cd671)
- | 设置小红点 | [9316bcb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/9316bcb)
- | 距调整pc端 | [5069aa1](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5069aa1)
- | 适配小程序;小程序登录 | [cefc0eb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/cefc0eb)
- | 配置默认插件接口 | [f0c177d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/f0c177d)
- | 面变化首页变化 | [5e860f1](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5e860f1)
- | 项目api url设置 | [6cd5245](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6cd5245)
- | 项目列表, 项目url | [32e005b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/32e005b)
- | 首页项目样式改变 | [8514c85](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/8514c85)
### 🎨 代码样式
范围|描述|commitId
--|--|--
- | calendar注释 | a2ec112
- | indexedDB.js格式整理 | b0d3a36
- | 代码审查 | d75134c
- | 代码格式细节调整 | cb2532b
- | 任务快捷方式图标增加 | 4aba872
- | 修改角色样式 | 73e268e
- | 删除calendar中多余的console | e339eec
- | 删除console.log | 5064a38
- | 删除index中没用的alert代码 | 9c9eec7
- | 删除mock,console;upload添加loading | 99d42e2
- | 删除多余字段 | 5ae3973
- | 删除插件携带的多余文件 | 0f392bb
- | 删除没用代码 | 34b20e1
- | 图标修改 | 54bca09
- | 无基本变化 | 21ac4bb
- | 日常任务修改 | dfa7ee2
- | 更新代码 | 8c27e68
- | 更新代码 | 1f40a76
- | 格式细节调整 | b907a03
- | 添加插件数据 | 2f11b42
- | 组件新建 | 89c0035
- | 细节调整 | 2cfc09a
- | calendar注释 | [a2ec112](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a2ec112)
- | indexedDB.js格式整理 | [b0d3a36](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b0d3a36)
- | 代码审查 | [d75134c](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d75134c)
- | 代码格式细节调整 | [cb2532b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/cb2532b)
- | 任务快捷方式图标增加 | [4aba872](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4aba872)
- | 修改角色样式 | [73e268e](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/73e268e)
- | 删除calendar中多余的console | [e339eec](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e339eec)
- | 删除console.log | [5064a38](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5064a38)
- | 删除index中没用的alert代码 | [9c9eec7](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/9c9eec7)
- | 删除mock,console;upload添加loading | [99d42e2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/99d42e2)
- | 删除多余字段 | [5ae3973](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5ae3973)
- | 删除插件携带的多余文件 | [0f392bb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0f392bb)
- | 删除没用代码 | [34b20e1](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/34b20e1)
- | 图标修改 | [54bca09](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/54bca09)
- | 无基本变化 | [21ac4bb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/21ac4bb)
- | 日常任务修改 | [dfa7ee2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/dfa7ee2)
- | 更新代码 | [8c27e68](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/8c27e68)
- | 更新代码 | [1f40a76](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/1f40a76)
- | 格式细节调整 | [b907a03](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b907a03)
- | 添加插件数据 | [2f11b42](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/2f11b42)
- | 组件新建 | [89c0035](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/89c0035)
- | 细节调整 | [2cfc09a](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/2cfc09a)
### 🐛 Bug 修复
@ -145,20 +147,74 @@
- | 调试定期任务bug;不能合并使用 | d641312
- | 跳转详情页返回路径修改 | c5e17c0
- | 骨架屏替换 | e9fdd71
- | 1.时间轴数据渲染 2.时间基准线 | [d643af2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d643af2)
- | api 存storage | [81032ba](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/81032ba)
ID1000343 | 解决向下预加载查询参数时间没+1颗粒度;以及滚动加载颗粒度写死的问题 | [940603a](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/940603a), closes [#ID1000343](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/issues/ID1000343)
plugin | 插件解析机制完善 | [0f5a27d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0f5a27d)
project title | 项目标题修改; 切换角色移除script | [5c20017](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5c20017)
roles | 修复默认显示不是我的角色的问题 | [b69f94f](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b69f94f)
role | 切换角色的逻辑修正完善 | [4ae534f](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4ae534f)
task任务逻辑完善 | 减少初始global及regular的不必要请求 | [bd4bd38](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/bd4bd38)
- | title.vue根据页面栈显示返回按钮;标题文本超出显示... | [0cbacf4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0cbacf4)
- | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4090d89)
- | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d533a01)
- | 下拉加载定期任务传参,时间格式化修改 | [0b95a0e](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0b95a0e)
- | 任务开始时间延迟插件 | [992a313](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/992a313)
- | 修改main | [749ae9a](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/749ae9a)
- | 修改定期任务状态0和4时不加载圆圈 | [30e352f](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/30e352f)
- | 修改小红点传参 | [87b20fd](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/87b20fd)
- | 修改报错 | [531c14d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/531c14d)
- | 修改接口路径 | [df6acf2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/df6acf2)
- | 修改角色栏组件 | [a54c601](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a54c601)
- | 切换到默认项目角色没有激活状态的bug | [438d448](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/438d448)
- | 切换日历时查询小红点 | [7091789](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7091789)
- | 初始展示角色修改 | [2ac4053](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/2ac4053)
- | 定期任务key值修改 | [c6688db](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c6688db)
- | 定期任务接口 | [aa4981c](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/aa4981c)
- | 定期任务插件 | [92b3254](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/92b3254)
- | 定期任务未加载时,显示空的时间轴并能上下滑动 | [ce38093](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/ce38093)
- | 定期任务本地缓存和api赋值,未完成 | [5a10856](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5a10856)
定期任务本地缓存和api赋值,未完成 | 定期任务本地缓存和api赋值,未完成 | [b22a366](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b22a366)
- | 定期任务骨架屏修改 | [8ff72dd](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/8ff72dd)
- | 平车演示临时去掉项目快捷方式的toast提示 | [e0b2c23](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e0b2c23)
- | 手动展开日常任务 | [0a4a622](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0a4a622)
- | 提示信息显示bug及日常任务收缩问题 | [f2f06c5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/f2f06c5)
- | 插件bug解决 | [41257eb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/41257eb)
- | 收到消息修改任务状态 | [c378063](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c378063)
- | 日历无任务时添加小绿点,时间轴刻度无任务不显示时分 | [0f90868](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0f90868)
- | 日常任务html数据查验 | [880ce5c](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/880ce5c)
- | 日常任务插件遍历时的key值修改 | [cd26285](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/cd26285)
- | 日常任务插件面板高度修改 | [249f9e4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/249f9e4)
- | 时间轴上下滑动 | [4d0ae46](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4d0ae46)
- | 时间轴上下滚动数据加载bug修改 | [e82ede4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e82ede4)
- | 时间轴插件 | [225d3cc](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/225d3cc)
- | 时间轴无任务时时间刻度加载修改 | [4921672](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4921672)
- | 时间轴滚动位置修改 | [551da63](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/551da63)
- | 时间轴骨架屏修改 | [ca78d02](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/ca78d02)
- | 检查交付物传参修改 | [37b51bc](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/37b51bc)
- | 滚动id函数优化 | [b351b67](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b351b67)
- | 监听时间基本点 | [033fca0](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/033fca0)
- | 角色显示状态修改 | [7d3b906](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7d3b906)
- | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/19228d6)
- | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/da1eece)
- | 设置时间轴自动滚动到当前位置 | [a3474f8](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a3474f8)
- | 调试定期任务bug;不能合并使用 | [d641312](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d641312)
- | 跳转详情页返回路径修改 | [c5e17c0](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c5e17c0)
- | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e9fdd71)
### 📝 文档
范围|描述|commitId
--|--|--
- | README.md | ab0eb05
- | README.md | [ab0eb05](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/ab0eb05)
### 🔧 测试
范围|描述|commitId
--|--|--
- | 暂时移除了jest浏览器配置 | 5088d01
- | 添加测试,测试utils/time.js的computeDurationText | e758010
- | 禁用任务开始操作 | b5425db
- | 暂时移除了jest浏览器配置 | [5088d01](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5088d01)
- | 添加测试,测试utils/time.js的computeDurationText | [e758010](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e758010)
- | 禁用任务开始操作 | [b5425db](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b5425db)
### 🔨 代码重构
@ -182,47 +238,62 @@
- | 界面样式调整 | 4367249
- | 重构store分层 | 5f6fff8
- | 重构时间刻度渲染任务 | 5cf7d08
calendar | 日历细节调整 | [1a8d6bf](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/1a8d6bf)
- | project 代码健壮性完善 | [a3202c5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a3202c5)
store/home | 删除store/home | [db8a3b4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/db8a3b4)
tailwindcss | tailwindcss CDN引入;移除相关配置文件及包;开启treeShaking | [15485a0](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/15485a0)
task beginTime | 格式化任务开始时间 | [fbc0301](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/fbc0301)
template | eslint prettier sass uview tailwindcss | [9c966a1](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/9c966a1)
tips | 修改任务状态方法重构 | [b57d3ac](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b57d3ac)
tip | 任务状态显示及tip组件数据的重构 | [78a5750](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/78a5750)
title.vue | 移除测试的repeat; 样式细节调整 | [c32d2bd](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c32d2bd)
- | 下滑时间轴添加备注 | [4fd20e3](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4fd20e3)
- | 任务状态重构 | [4693655](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4693655)
- | 删除多余的weekmode store里的东西 | [0841fe0](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0841fe0)
- | 删除多余的技术验证界面 | [542ae5b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/542ae5b)
- | 只保留project内容 | [7781c7b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7781c7b)
- | 界面样式调整 | [4367249](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4367249)
- | 重构store分层 | [5f6fff8](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5f6fff8)
### 🚀 性能优化
范围|描述|commitId
--|--|--
- | 1.时间轴筛选相同的时间替换数据 2.整理代码 | e082ccb
- | 修改代码格式 | 14123d7
- | 修改定期任务骨架屏高度 | 909a734
- | 小红点api缓存修改 | e992343
- | 插件查询及展示 | 4dba770
- | 整理代码 | 7a55315
- | 日历的更改 | 7353ac8
- | 测试接口 | 215e074
- | 组件文件夹新建 | 22bfe7b
- | 组件文件夹新建 | 17bb8c9
- | 组件文件夹新建 | 1421504
- | 角色栏文字颜色修改 | 215c6b3
- | 解决警告 | c932b09
- | 1.时间轴筛选相同的时间替换数据 2.整理代码 | [e082ccb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e082ccb)
- | 修改代码格式 | [14123d7](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/14123d7)
- | 修改定期任务骨架屏高度 | [909a734](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/909a734)
- | 小红点api缓存修改 | [e992343](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/e992343)
- | 插件查询及展示 | [4dba770](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4dba770)
- | 整理代码 | [7a55315](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7a55315)
- | 日历的更改 | [7353ac8](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7353ac8)
- | 测试接口 | [215e074](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/215e074)
- | 组件文件夹新建 | [22bfe7b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/22bfe7b)
- | 组件文件夹新建 | [17bb8c9](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/17bb8c9)
- | 组件文件夹新建 | [1421504](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/1421504)
- | 角色栏文字颜色修改 | [215c6b3](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/215c6b3)
- | 解决警告 | [c932b09](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c932b09)
### chore
范围|描述|commitId
--|--|--
- | api 封装 | 8dcb8a2
- | env host修改 | a79a4a5
- | merge globals | b0957cc
- | merge wrr | 5ccc7a5
- | mock | 51c24a5
package manifest | 去掉了摇树 | f7c1dd4
pwa 小程序 | 移除了pwa,alloyFinger添加平台判断 | 875fab4
- | uview-ui | a9ea34b
v3.0.1 | tall api 地址从1.0改成了3.0 | db5afd5
信息配置 | 配置eslint等配置 | 7421443
- | 修复不能build的问题 | 0b7b91e
- | 删除vuedragable及修改运行端口为9000 | c864f91
- | 删除多余的构建的命令 | 3f4eb2f
- | api 封装 | [8dcb8a2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/8dcb8a2)
- | env host修改 | [a79a4a5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a79a4a5)
- | merge globals | [b0957cc](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/b0957cc)
- | merge wrr | [5ccc7a5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5ccc7a5)
- | mock | [51c24a5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/51c24a5)
package manifest | 去掉了摇树 | [f7c1dd4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/f7c1dd4)
pwa 小程序 | 移除了pwa,alloyFinger添加平台判断 | [875fab4](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/875fab4)
- | uview-ui | [a9ea34b](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a9ea34b)
v3.0.1 | tall api 地址从1.0改成了3.0 | [db5afd5](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/db5afd5)
信息配置 | 配置eslint等配置 | [7421443](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/7421443)
- | 修复不能build的问题 | [0b7b91e](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/0b7b91e)
- | 删除vuedragable及修改运行端口为9000 | [c864f91](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c864f91)
- | 删除多余的构建的命令 | [3f4eb2f](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/3f4eb2f)
范围|描述|commitId
--|--|--
- | style:index | 978f272
- | !2 基础模板v1.1.0 | f5e61dd
- | init | c0f1deb
- | style:index | [978f272](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/978f272)
- | !2 基础模板v1.1.0 | [f5e61dd](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/f5e61dd)
- | init | [c0f1deb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/c0f1deb)

6
src/apis/plugin.js

@ -9,6 +9,12 @@ const install = (Vue, vm) => {
vm.$u.api.findSonTask = param => vm.$u.post(`${uni.$t.domain}/task/findSonTask`, param);
// 查询子项目
vm.$u.api.findSonProject = param => vm.$u.post(`${uni.$t.domain}/project/findSonProject`, param);
// 提交交付物
vm.$u.api.saveDeliver = param => vm.$u.post(`${uni.$t.domain}/deliver/save`, param);
// 查询任务的交付物历史记录
vm.$u.api.queryDeliverOfTask = param => vm.$u.post(`${uni.$t.domain}/deliver/queryDeliverOfTask`, param);
// 检查交付物
vm.$u.api.checkDeliver = param => vm.$u.post(`${uni.$t.domain}/deliver/checkDeliver`, param);
};
export default { install };

4
src/apis/role.js

@ -1,7 +1,9 @@
const install = (Vue, vm) => {
vm.$u.api = { ...vm.$u.api } || {};
//根据时间基准点和角色查找定期任务
//根据项目id查找角色
vm.$u.api.findShowRole = param => vm.$u.post(`${uni.$t.domain}/role/show`, param);
//根据项目id查找所有成员
vm.$u.api.queryChecker = param => vm.$u.post(`${uni.$t.domain}/deliver/queryChecker`, param);
};
export default { install };

24
src/components/Plugin/Plugin.vue

@ -2,19 +2,19 @@
<view class="u-font-14" style="height: 100%">
<view v-if="pluginContent">
<view
style="height: 100%"
:data-uid="userId"
:data-token="token"
:data-pid="projectId"
:data-did="task.detailId"
:data-param="param"
:data-pdu="task.planDuration"
:data-pid="projectId"
:data-pstart="task.planStart"
:data-rdu="task.realDuration"
:data-rid="roleId"
:data-rstart="task.realStart"
:data-tid="task.id"
:data-tname="task.name"
:data-pstart="task.planStart"
:data-rstart="task.realStart"
:data-pdu="task.planDuration"
:data-rdu="task.realDuration"
:data-param="param"
:data-token="token"
:data-uid="userId"
style="height: 100%"
v-html="pluginContent"
></view>
</view>
@ -26,7 +26,8 @@
<p-task-description :task="task" v-if="pluginId === '2'" />
<p-task-duration-delay :task="task" v-if="pluginId === '3'" />
<p-task-start-time-delay :task="task" v-if="pluginId === '4'" />
<!-- <p-deliverable :task="task" v-if="pluginId === '5'" /> -->
<p-upload-deliverable :task="task" v-if="pluginId === '5' && isMine" />
<p-delivery-history :task="task" v-if="pluginId === '5' && !isMine" />
<p-subtasks :task="task" v-if="pluginId === '6'" />
<p-subproject :task="task" v-if="pluginId === '7'" />
<!-- <p-task-countdown :task="task" v-if="pluginId === '8'" /> -->
@ -42,10 +43,8 @@
<script>
import { mapGetters, mapState } from 'vuex';
import pManageProject from '../../plugins/p-manage-project/p-manage-project.vue';
export default {
components: { pManageProject },
name: 'Plugin',
props: {
task: { default: () => {}, type: Object },
@ -64,6 +63,7 @@ export default {
...mapState('user', ['token']),
...mapGetters('user', ['userId']),
...mapGetters('project', ['projectId']),
...mapGetters('role', ['isMine']),
//
// pluginComponent() {

335
src/components/ld-select/ld-select.vue

@ -0,0 +1,335 @@
<template>
<view class="main">
<view class="input" :style="disabled ? 'background-color:#f5f7fa' : ''">
<input @click="showModal" v-model="_value" :style="disabled ? 'color:#c0c4cc' : ''" :placeholder="placeholder" disabled />
<u-icon v-if="clearable && !disabled && showClearable" @click="empty" name="close-circle-fill" color="#C0C4CC" size="32"></u-icon>
</view>
<view class="select-modal" :class="isShowModal ? 'show' : ''" @tap="hideModal">
<view class="select-dialog" @tap.stop="" :style="{ backgroundColor: bgColor }">
<view class="select-bar bg-white">
<view class="action text-gray" @tap="cancelClick">{{ cancelText }}</view>
<view class="action text-blue" @tap="confirmClick">{{ confirmText }}</view>
</view>
<view class="select-content">
<view
class="select-item"
v-for="(item, index) in list"
:key="index"
:style="valueIndexOf(item) ? 'color:' + selectColor + ';background-color:' + selectBgColor + ';' : 'color:' + color + ';'"
@click="select(item)"
>
<view class="title">{{ getLabelKeyValue(item) }}</view>
<u-icon name="checkbox-mark" v-if="valueIndexOf(item)"></u-icon>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return { isShowModal: false, showClearable: false };
},
props: {
value: {
type: [Number, String, Array, Object],
default: null,
},
placeholder: {
//
default: '',
type: String,
},
multiple: {
//
default: false,
type: Boolean,
},
list: {
default: () => [],
type: Array,
},
valueKey: {
// listvalueKey
default: 'value',
type: String,
},
labelKey: {
// listlabelKey
default: 'label',
type: String,
},
disabled: {
default: false,
type: Boolean,
},
clearable: {
default: false,
type: Boolean,
},
cancelText: {
default: '取消',
type: String,
},
confirmText: {
default: '确定',
type: String,
},
color: {
default: '#000000',
type: String,
},
selectColor: {
default: '#0081ff',
type: String,
},
bgColor: {
default: '#F1F1F1',
type: String,
},
selectBgColor: {
default: '#FFFFFF',
type: String,
},
},
computed: {
_value: {
get() {
return this.get_value(this.value);
},
set(val) {
this.$emit('change', val);
},
},
},
created() {},
methods: {
get_value(val) {
// ,
if (val || val === 0) {
if (Array.isArray(val)) {
if (val.length > 0) {
this.showClearable = true;
} else {
this.showClearable = false;
}
let chooseAttr = [];
val.forEach(item => {
let choose = this.list.find(temp => {
let val_val = this.getValueKeyValue(temp);
return item === val_val;
});
chooseAttr.push(choose);
});
let values = chooseAttr.map(temp => this.getLabelKeyValue(temp)).join(',');
return values;
} else {
let choose = this.list.find(temp => {
let val_val = this.getValueKeyValue(temp);
return val === val_val;
});
return this.getLabelKeyValue(choose);
}
} else {
console.log('val2', val);
return '';
}
},
select(item) {
//
let val = this.getValueKeyValue(item);
if (this.multiple) {
let _value = this.value;
let index = _value.indexOf(val);
if (index != -1) {
_value.splice(index, 1);
this.$emit('change', _value);
} else {
_value.push(val);
this.$emit('change', _value);
}
} else {
this.$emit('change', val);
this.hideModal();
}
},
valueIndexOf(item) {
let val = this.getValueKeyValue(item);
if (Array.isArray(this.value)) {
return this.value.indexOf(val) != -1;
} else {
return this.value === val;
}
},
getLabelKeyValue(item) {
// label
return item[this.labelKey];
},
getValueKeyValue(item) {
// value
return item[this.valueKey];
},
empty() {
//
if (this.multiple) {
this.$emit('change', []);
} else {
this.$emit('change', '');
}
},
cancelClick() {
//
this.$emit('cancel', this._value);
this.hideModal();
},
confirmClick() {
//
this.$emit('confirm', this._value);
this.hideModal();
},
showModal() {
// model
if (!this.disabled) {
this.isShowModal = true;
}
},
hideModal() {
// model
this.isShowModal = false;
},
},
};
</script>
<style>
@font-face {
font-family: 'selectIcon';
src: url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.eot?t=1590375117208'); /* IE9 */
src: url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.eot?t=1590375117208#iefix') format('embedded-opentype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.svg?t=1590375117208#selectIcon')
format('svg'); /* iOS 4.1- */
}
.selectIcon {
font-family: 'selectIcon' !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icongou:before {
content: '\e61c';
}
.iconcross:before {
content: '\e61a';
}
</style>
<style lang="scss" scoped>
.main {
font-size: 30rpx;
}
.bg-white {
background-color: #ffffff;
}
.text-blue {
color: #0081ff;
}
.text-green {
color: #39b54a;
}
.input {
display: flex;
align-items: center;
font-size: 28rpx;
height: 60rpx;
padding: 10rpx 20rpx;
border-radius: 8rpx;
border-style: solid;
border-width: 1rpx;
border-color: rgb(220, 223, 230);
input {
flex: 1;
}
}
.select-modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 9999;
opacity: 0;
outline: 0;
text-align: center;
-ms-transform: scale(1.185);
transform: scale(1.185);
backface-visibility: hidden;
perspective: 2000rpx;
background: rgba(0, 0, 0, 0.6);
transition: all 0.3s ease-in-out 0s;
pointer-events: none;
margin-bottom: -1000rpx;
&::before {
content: '\200B';
display: inline-block;
height: 100%;
vertical-align: bottom;
}
.select-dialog {
position: relative;
display: inline-block;
margin-left: auto;
margin-right: auto;
background-color: #f8f8f8;
overflow: hidden;
width: 100%;
border-radius: 0;
.select-content {
// background-color: #F1F1F1;
max-height: 420rpx;
overflow: auto;
.select-item {
padding: 20rpx;
display: flex;
.title {
flex: 1;
}
}
}
}
}
.select-modal.show {
opacity: 1;
transition-duration: 0.3s;
-ms-transform: scale(1);
transform: scale(1);
overflow-x: hidden;
overflow-y: auto;
pointer-events: auto;
margin-bottom: 0;
}
.select-bar {
padding: 0 20rpx;
display: flex;
position: relative;
align-items: center;
min-height: 80rpx;
justify-content: space-between;
.action {
display: flex;
align-items: center;
height: 100%;
justify-content: center;
max-width: 100%;
}
}
.uni-input-input,
.uni-input-placeholder {
color: #c0c4cc;
font-size: 28rpx;
}
</style>

22
src/components/uni-popup/message.js

@ -0,0 +1,22 @@
export default {
created() {
if (this.type === 'message') {
// 不显示遮罩
this.maskShow = false;
// 获取子组件对象
this.childrenMsg = null;
}
},
methods: {
customOpen() {
if (this.childrenMsg) {
this.childrenMsg.open();
}
},
customClose() {
if (this.childrenMsg) {
this.childrenMsg.close();
}
},
},
};

23
src/components/uni-popup/popup.js

@ -0,0 +1,23 @@
import message from './message.js';
// 定义 type 类型:弹出类型:top/bottom/center
const config = {
// 顶部弹出
top: 'top',
// 底部弹出
bottom: 'bottom',
// 居中弹出
center: 'center',
// 消息提示
message: 'top',
// 对话框
dialog: 'center',
// 分享
share: 'bottom',
};
export default {
data() {
return { config: config };
},
mixins: [message],
};

246
src/components/uni-popup/uni-popup-dialog.vue

@ -0,0 +1,246 @@
<template>
<view class="uni-popup-dialog">
<view class="uni-dialog-title">
<text class="uni-dialog-title-text" :class="['uni-popup__' + dialogType]">{{ title }}</text>
</view>
<view class="uni-dialog-content">
<text class="uni-dialog-content-text" v-if="mode === 'base'">{{ content }}</text>
<input v-else class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholder" :focus="focus" />
</view>
<view class="uni-dialog-button-group">
<view class="uni-dialog-button" @click="close">
<text class="uni-dialog-button-text">取消</text>
</view>
<view class="uni-dialog-button uni-border-left" @click="onOk">
<text class="uni-dialog-button-text uni-button-color">确定</text>
</view>
</view>
</view>
</template>
<script>
/**
* PopUp 弹出层-对话框样式
* @description 弹出层-对话框样式
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} value input 模式下的默认值
* @property {String} placeholder input 模式下输入提示
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
* @value info 消息
* @value error 错误
* @property {String} mode = [base|input] 模式
* @value base 基础对话框
* @value input 可输入对话框
* @property {String} content 对话框内容
* @property {Boolean} beforeClose 是否拦截取消事件
* @event {Function} confirm 点击确认按钮触发
* @event {Function} close 点击取消按钮触发
*/
export default {
name: 'uniPopupDialog',
props: {
value: {
type: [String, Number],
default: '',
},
placeholder: {
type: [String, Number],
default: '请输入内容',
},
/**
* 对话框主题 success/warning/info/error 默认 success
*/
type: {
type: String,
default: 'error',
},
/**
* 对话框模式 base/input
*/
mode: {
type: String,
default: 'base',
},
/**
* 对话框标题
*/
title: {
type: String,
default: '提示',
},
/**
* 对话框内容
*/
content: {
type: String,
default: '',
},
/**
* 拦截取消事件 如果拦截取消事件必须监听close事件执行 done()
*/
beforeClose: {
type: Boolean,
default: false,
},
},
data() {
return {
dialogType: 'error',
focus: false,
val: '',
};
},
inject: ['popup'],
watch: {
type(val) {
this.dialogType = val;
},
mode(val) {
if (val === 'input') {
this.dialogType = 'info';
}
},
value(val) {
this.val = val;
},
},
created() {
//
this.popup.mkclick = false;
if (this.mode === 'input') {
this.dialogType = 'info';
this.val = this.value;
} else {
this.dialogType = this.type;
}
},
mounted() {
this.focus = true;
},
methods: {
/**
* 点击确认按钮
*/
onOk() {
this.$emit(
'confirm',
() => {
this.popup.close();
if (this.mode === 'input') this.val = this.value;
},
this.mode === 'input' ? this.val : '',
);
},
/**
* 点击取消按钮
*/
close() {
if (this.beforeClose) {
this.$emit('close', () => {
this.popup.close();
});
return;
}
this.popup.close();
},
},
};
</script>
<style lang="scss" scoped>
.uni-popup-dialog {
width: 300px;
border-radius: 15px;
background-color: #fff;
}
.uni-dialog-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 15px;
padding-bottom: 5px;
}
.uni-dialog-title-text {
font-size: 16px;
font-weight: 500;
}
.uni-dialog-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
padding: 5px 15px 15px 15px;
}
.uni-dialog-content-text {
font-size: 14px;
color: #6e6e6e;
}
.uni-dialog-button-group {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
border-top-color: #f5f5f5;
border-top-style: solid;
border-top-width: 1px;
}
.uni-dialog-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
height: 45px;
}
.uni-border-left {
border-left-color: #f0f0f0;
border-left-style: solid;
border-left-width: 1px;
}
.uni-dialog-button-text {
font-size: 14px;
}
.uni-button-color {
color: $uni-color-primary;
}
.uni-dialog-input {
flex: 1;
font-size: 14px;
}
.uni-popup__success {
color: $uni-color-success;
}
.uni-popup__warn {
color: $uni-color-warning;
}
.uni-popup__error {
color: $uni-color-error;
}
.uni-popup__info {
color: #909399;
}
</style>

115
src/components/uni-popup/uni-popup-message.vue

@ -0,0 +1,115 @@
<template>
<view class="uni-popup-message" :class="'uni-popup__' + [type]">
<text class="uni-popup-message-text" :class="'uni-popup__' + [type] + '-text'">{{ message }}</text>
</view>
</template>
<script>
/**
* PopUp 弹出层-消息提示
* @description 弹出层-消息提示
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
* @value info 消息
* @value error 错误
* @property {String} message 消息提示文字
* @property {String} duration 显示时间设置为 0 则不会自动关闭
*/
export default {
name: 'UniPopupMessage',
props: {
/**
* 主题 success/warning/info/error 默认 success
*/
type: {
type: String,
default: 'success',
},
/**
* 消息文字
*/
message: {
type: String,
default: '',
},
/**
* 显示时间设置为 0 则不会自动关闭
*/
duration: {
type: Number,
default: 3000,
},
},
inject: ['popup'],
data() {
return {};
},
created() {
this.popup.childrenMsg = this;
},
methods: {
open() {
if (this.duration === 0) return;
clearTimeout(this.popuptimer);
this.popuptimer = setTimeout(() => {
this.popup.close();
}, this.duration);
},
close() {
clearTimeout(this.popuptimer);
},
},
};
</script>
<style lang="scss" scoped>
.uni-popup-message {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
background-color: #e1f3d8;
padding: 10px 15px;
border-color: #eee;
border-style: solid;
border-width: 1px;
}
.uni-popup-message-text {
font-size: 14px;
padding: 0;
}
.uni-popup__success {
background-color: #e1f3d8;
}
.uni-popup__success-text {
color: #67c23a;
}
.uni-popup__warn {
background-color: #faecd8;
}
.uni-popup__warn-text {
color: #e6a23c;
}
.uni-popup__error {
background-color: #fde2e2;
}
.uni-popup__error-text {
color: #f56c6c;
}
.uni-popup__info {
background-color: #f2f6fc;
}
.uni-popup__info-text {
color: #909399;
}
</style>

171
src/components/uni-popup/uni-popup-share.vue

@ -0,0 +1,171 @@
<template>
<view class="uni-popup-share">
<view class="uni-share-title">
<text class="uni-share-title-text">{{ title }}</text>
</view>
<view class="uni-share-content">
<view class="uni-share-content-box">
<view class="uni-share-content-item" v-for="(item, index) in bottomData" :key="index" @click.stop="select(item, index)">
<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
<text class="uni-share-text">{{ item.text }}</text>
</view>
</view>
</view>
<view class="uni-share-button-box">
<button class="uni-share-button" @click="close">取消</button>
</view>
</view>
</template>
<script>
export default {
name: 'UniPopupShare',
props: {
title: {
type: String,
default: '分享到',
},
},
inject: ['popup'],
data() {
return {
bottomData: [
{
text: '微信',
icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-2.png',
name: 'wx',
},
{
text: '支付宝',
icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-8.png',
name: 'wx',
},
{
text: 'QQ',
icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/gird-3.png',
name: 'qq',
},
{
text: '新浪',
icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-1.png',
name: 'sina',
},
{
text: '百度',
icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-7.png',
name: 'copy',
},
{
text: '其他',
icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-5.png',
name: 'more',
},
],
};
},
created() {},
methods: {
/**
* 选择内容
*/
select(item, index) {
this.$emit(
'select',
{
item,
index,
},
() => {
this.popup.close();
},
);
},
/**
* 关闭窗口
*/
close() {
this.popup.close();
},
},
};
</script>
<style lang="scss" scoped>
.uni-popup-share {
background-color: #fff;
}
.uni-share-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
height: 40px;
}
.uni-share-title-text {
font-size: 14px;
color: #666;
}
.uni-share-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 10px;
}
.uni-share-content-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: wrap;
width: 360px;
}
.uni-share-content-item {
width: 90px;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
padding: 10px 0;
align-items: center;
}
.uni-share-content-item:active {
background-color: #f5f5f5;
}
.uni-share-image {
width: 30px;
height: 30px;
}
.uni-share-text {
margin-top: 10px;
font-size: 14px;
color: #3b4144;
}
.uni-share-button-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 10px 15px;
}
.uni-share-button {
flex: 1;
border-radius: 50px;
color: #666;
font-size: 16px;
}
.uni-share-button::after {
border-radius: 50px;
}
</style>

289
src/components/uni-popup/uni-popup.vue

@ -0,0 +1,289 @@
<template>
<view v-if="showPopup" class="uni-popup" :class="[popupstyle]" @touchmove.stop.prevent="clear">
<uni-transition v-if="maskShow" :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
<view class="uni-popup__wrapper-box" @click.stop="clear">
<slot />
</view>
</uni-transition>
</view>
</template>
<script>
import uniTransition from '../uni-transition/uni-transition.vue';
import popup from './popup.js';
/**
* PopUp 弹出层
* @description 弹出层组件为了解决遮罩弹层的问题
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [top|center|bottom] 弹出方式
* @value top 顶部弹出
* @value center 中间弹出
* @value bottom 底部弹出
* @value message 消息提示
* @value dialog 对话框
* @value share 底部分享示例
* @property {Boolean} animation = [ture|false] 是否开启动画
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
* @event {Function} change 打开关闭弹窗触发e={show: false}
*/
export default {
name: 'UniPopup',
components: { uniTransition },
props: {
//
animation: {
type: Boolean,
default: true,
},
// top: bottomcenter
// message: ; dialog :
type: {
type: String,
default: 'center',
},
// maskClick
maskClick: {
type: Boolean,
default: true,
},
},
provide() {
return { popup: this };
},
mixins: [popup],
watch: {
/**
* 监听type类型
*/
type: {
handler: function (newVal) {
this[this.config[newVal]]();
},
immediate: true,
},
/**
* 监听遮罩是否可点击
* @param {Object} val
*/
maskClick(val) {
this.mkclick = val;
},
},
data() {
return {
duration: 300,
ani: [],
showPopup: false,
showTrans: false,
maskClass: {
position: 'fixed',
bottom: 0,
top: 0,
left: 0,
right: 0,
backgroundColor: 'rgba(0, 0, 0, 0.4)',
},
transClass: {
position: 'fixed',
left: 0,
right: 0,
},
maskShow: true,
mkclick: true,
popupstyle: 'top',
};
},
created() {
this.mkclick = this.maskClick;
if (this.animation) {
this.duration = 300;
} else {
this.duration = 0;
}
},
methods: {
clear(e) {
// TODO nvue
e.stopPropagation();
},
open() {
this.showPopup = true;
this.$nextTick(() => {
new Promise(resolve => {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.showTrans = true;
// fixed by mehaotian app
this.$nextTick(() => {
resolve();
});
}, 50);
}).then(res => {
console.log('res: ', res);
//
clearTimeout(this.msgtimer);
this.msgtimer = setTimeout(() => {
this.customOpen && this.customOpen();
}, 100);
this.$emit('change', {
show: true,
type: this.type,
});
});
});
},
close(type) {
this.showTrans = false;
this.$nextTick(() => {
this.$emit('change', {
show: false,
type,
});
clearTimeout(this.timer);
//
this.customOpen && this.customClose();
this.timer = setTimeout(() => {
this.showPopup = false;
}, 300);
});
},
onTap() {
if (!this.mkclick) return;
this.close();
},
/**
* 顶部弹出样式处理
*/
top() {
this.popupstyle = 'top';
this.ani = ['slide-top'];
this.transClass = {
position: 'fixed',
left: 0,
right: 0,
};
},
/**
* 底部弹出样式处理
*/
bottom() {
this.popupstyle = 'bottom';
this.ani = ['slide-bottom'];
this.transClass = {
position: 'fixed',
left: 0,
right: 0,
bottom: 0,
};
},
/**
* 中间弹出样式处理
*/
center() {
this.popupstyle = 'center';
this.ani = ['zoom-out', 'fade'];
this.transClass = {
position: 'fixed',
/* #ifndef APP-NVUE */
display: 'flex',
flexDirection: 'column',
/* #endif */
bottom: 0,
left: 0,
right: 0,
top: 0,
justifyContent: 'center',
alignItems: 'center',
};
},
},
};
</script>
<style lang="scss" scoped>
.uni-popup {
position: fixed;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.uni-popup__mask {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: $uni-bg-color-mask;
opacity: 0;
}
.mask-ani {
transition-property: opacity;
transition-duration: 0.2s;
}
.uni-top-mask {
opacity: 1;
}
.uni-bottom-mask {
opacity: 1;
}
.uni-center-mask {
opacity: 1;
}
.uni-popup__wrapper {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
}
.top {
/* #ifdef H5 */
top: var(--window-top);
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
}
.bottom {
bottom: 0;
}
.uni-popup__wrapper-box {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
/* iphonex 等安全区设置,底部安全区适配 */
/* #ifndef APP-NVUE */
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
/* #endif */
}
.content-ani {
// transition: transform 0.3s;
transition-property: transform, opacity;
transition-duration: 0.2s;
}
.uni-top-content {
transform: translateY(0);
}
.uni-bottom-content {
transform: translateY(0);
}
.uni-center-content {
transform: scale(1);
opacity: 1;
}
</style>

276
src/components/uni-transition/uni-transition.vue

@ -0,0 +1,276 @@
<template>
<view
v-if="isShow"
ref="ani"
class="uni-transition"
:class="[ani.in]"
:style="'transform:' + transform + ';' + stylesObject"
@click="change"
>
<slot></slot>
</view>
</template>
<script>
// #ifdef APP-NVUE
const animation = uni.requireNativePlugin('animation');
// #endif
/**
* Transition 过渡动画
* @description 简单过渡动画组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=985
* @property {Boolean} show = [false|true] 控制组件显示或隐藏
* @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
* @value fade 渐隐渐出过渡
* @value slide-top 由上至下过渡
* @value slide-right 由右至左过渡
* @value slide-bottom 由下至上过渡
* @value slide-left 由左至右过渡
* @value zoom-in 由小到大过渡
* @value zoom-out 由大到小过渡
* @property {Number} duration 过渡动画持续时间
* @property {Object} styles 组件样式 css 样式注意带-连接符的属性需要使用小驼峰写法如`backgroundColor:red`
*/
export default {
name: 'uniTransition',
props: {
show: {
type: Boolean,
default: false,
},
modeClass: {
type: Array,
default() {
return [];
},
},
duration: {
type: Number,
default: 300,
},
styles: {
type: Object,
default() {
return {};
},
},
},
data() {
return {
isShow: false,
transform: '',
ani: { in: '', active: '' },
};
},
watch: {
show: {
handler(newVal) {
if (newVal) {
this.open();
} else {
this.close();
}
},
immediate: true,
},
},
computed: {
stylesObject() {
let styles = {
...this.styles,
'transition-duration': this.duration / 1000 + 's',
};
let transfrom = '';
for (let i in styles) {
let line = this.toLine(i);
transfrom += line + ':' + styles[i] + ';';
}
return transfrom;
},
},
created() {
// this.timer = null
// this.nextTick = (time = 50) => new Promise(resolve => {
// clearTimeout(this.timer)
// this.timer = setTimeout(resolve, time)
// return this.timer
// });
},
methods: {
change() {
this.$emit('click', { detail: this.isShow });
},
open() {
clearTimeout(this.timer);
this.isShow = true;
this.transform = '';
this.ani.in = '';
for (let i in this.getTranfrom(false)) {
if (i === 'opacity') {
this.ani.in = 'fade-in';
} else {
this.transform += `${this.getTranfrom(false)[i]} `;
}
}
this.$nextTick(() => {
setTimeout(() => {
this._animation(true);
}, 50);
});
},
close() {
clearTimeout(this.timer);
this._animation(false);
},
_animation(type) {
let styles = this.getTranfrom(type);
// #ifdef APP-NVUE
if (!this.$refs['ani']) return;
animation.transition(
this.$refs['ani'].ref,
{
styles,
duration: this.duration, //ms
timingFunction: 'ease',
needLayout: false,
delay: 0, //ms
},
() => {
if (!type) {
this.isShow = false;
}
this.$emit('change', { detail: this.isShow });
},
);
// #endif
// #ifndef APP-NVUE
this.transform = '';
for (let i in styles) {
if (i === 'opacity') {
this.ani.in = `fade-${type ? 'out' : 'in'}`;
} else {
this.transform += `${styles[i]} `;
}
}
this.timer = setTimeout(() => {
if (!type) {
this.isShow = false;
}
this.$emit('change', { detail: this.isShow });
}, this.duration);
// #endif
},
getTranfrom(type) {
let styles = { transform: '' };
this.modeClass.forEach(mode => {
switch (mode) {
case 'fade':
styles.opacity = type ? 1 : 0;
break;
case 'slide-top':
styles.transform += `translateY(${type ? '0' : '-100%'}) `;
break;
case 'slide-right':
styles.transform += `translateX(${type ? '0' : '100%'}) `;
break;
case 'slide-bottom':
styles.transform += `translateY(${type ? '0' : '100%'}) `;
break;
case 'slide-left':
styles.transform += `translateX(${type ? '0' : '-100%'}) `;
break;
case 'zoom-in':
styles.transform += `scale(${type ? 1 : 0.8}) `;
break;
case 'zoom-out':
styles.transform += `scale(${type ? 1 : 1.2}) `;
break;
}
});
return styles;
},
_modeClassArr(type) {
let mode = this.modeClass;
if (typeof mode !== 'string') {
let modestr = '';
mode.forEach(item => {
modestr += item + '-' + type + ',';
});
return modestr.substr(0, modestr.length - 1);
} else {
return mode + '-' + type;
}
},
// getEl(el) {
// console.log(el || el.ref || null);
// return el || el.ref || null
// },
toLine(name) {
return name.replace(/([A-Z])/g, '-$1').toLowerCase();
},
},
};
</script>
<style>
.uni-transition {
transition-timing-function: ease;
transition-duration: 0.3s;
transition-property: transform, opacity;
}
.fade-in {
opacity: 0;
}
.fade-active {
opacity: 1;
}
.slide-top-in {
/* transition-property: transform, opacity; */
transform: translateY(-100%);
}
.slide-top-active {
transform: translateY(0);
/* opacity: 1; */
}
.slide-right-in {
transform: translateX(100%);
}
.slide-right-active {
transform: translateX(0);
}
.slide-bottom-in {
transform: translateY(100%);
}
.slide-bottom-active {
transform: translateY(0);
}
.slide-left-in {
transform: translateX(-100%);
}
.slide-left-active {
transform: translateX(0);
opacity: 1;
}
.zoom-in-in {
transform: scale(0.8);
}
.zoom-out-active {
transform: scale(1);
}
.zoom-out-in {
transform: scale(1.2);
}
</style>

1
src/pages/project/project.vue

@ -82,6 +82,7 @@ export default {
methods: {
...mapActions('user', ['getToken']),
...mapActions('task', ['getRegulars', 'getPermanent', 'getGlobal']),
...mapActions('role', ['getAllMembers']),
...mapMutations('user', ['setToken']),
...mapMutations('project', ['setProject', 'setProjectName']),
...mapMutations('role', ['setInvisibleRoles', 'setVisibleRoles', 'setRoleId']),

61
src/plugins/p-deliver-check/p-deliver-check.vue

@ -1,7 +1,64 @@
<template>
<view>交付物检查</view>
<!-- 上传交付物 -->
<view class="px-3 py-6 bg-white">
<u-input :auto-height="autoHeight" :border="border" :height="height" :type="type" placeholder="输入备注" v-model="remark" />
<view class="flex flex-row-reverse text-xs text-gray-400 mt-2">{{ wordNum }}/140</view>
<!-- 评分 -->
<view class="flex justify-between mt-3">
<slider :value="score" @change="sliderChange" max="100" min="0" show-value style="width: 60%" />
<u-input :border="border" :type="type1" @input="changeNumber" maxlength="100" placeholder="输入分数" v-model="score" />
</view>
<view class="flex flex-col justify-center mt-5">
<u-button @click="submit" size="medium" type="primary">提交</u-button>
<u-button @click="$emit('closeScore')" class="mt-2" size="medium">取消</u-button>
</view>
</view>
</template>
<script>
export default {};
export default {
name: 'p-deliver-check',
data() {
return {
remark: '',
type: 'textarea',
border: true,
height: 100,
autoHeight: true,
wordNum: 0,
score: 0,
type1: 'number',
};
},
watch: {
remark(val) {
this.wordNum = val.length;
},
score(val) {
this.score1 = val;
},
},
methods: {
//
submit() {
this.$emit('submit', this.remark, this.score);
},
sliderChange(e) {
this.score = e.detail.value;
},
changeNumber(e) {
if (e > 100) {
this.score = 100;
}
},
},
};
</script>
<style></style>

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

@ -1,20 +0,0 @@
<template>
<!-- 交付物 -->
<view>交付物</view>
</template>
<script>
export default {
name: 'p-deliverable',
props: { item: { type: Object, default: null } },
data() {
return {};
},
computed: {},
methods: {},
watch: {},
};
</script>
<style></style>

140
src/plugins/p-delivery-history/p-delivery-history.vue

@ -0,0 +1,140 @@
<template>
<!-- 交付物 -->
<view class="mt-3">
<view v-if="lists && lists.length">
<view :key="list.id" v-for="list in lists">
<view class="p-3 mt-3 shadow">
<view class="text-gray-400 pb-2">
<span class="mr-4">{{ list.name }}</span>
<span>{{ $moment(+list.time).format('YYYY-MM-DD HH:mm:ss') }}</span>
</view>
<view class="pb-2 flex flex-wrap overflow-hidden" v-if="list.content">
<a :href="list.content" class="text-blue-500" target="_blank" v-if="CheckUrl(list.content)">{{ list.content }}</a>
<span v-else>{{ list.content }}</span>
</view>
<view :key="checker.checkerId" v-for="checker in list.checkerList">
<view class="flex justify-between">
<view class="font-bold">
{{ checker.checkerName }}
<span v-if="checker.isMine">()</span>
</view>
<view>
<span class="text-blue-500" v-if="checker.status === 1">通过</span>
<span class="text-red-500" v-if="checker.status === 2">驳回</span>
<span class="ml-4" v-if="checker.status !== 0">{{ checker.score }}</span>
<span class="text-gray-400" v-if="checker.status === 0 && !checker.isMine">未审核</span>
<view v-if="checker.status === 0 && checker.isMine">
<u-button @click="showScore(checker.checkId, 2)" class="mr-3" plain size="mini" type="error">驳回</u-button>
<u-button @click="showScore(checker.checkId, 1)" plain size="mini" type="primary">通过</u-button>
</view>
</view>
</view>
<view class="text-gray-400 text-xs mt-1">{{ checker.remark }}</view>
</view>
</view>
</view>
</view>
<u-empty mode="history" text="暂无历史记录" v-else></u-empty>
<!-- 评分 -->
<uni-popup :maskClick="false" background-color="#fff" ref="popup" type="bottom">
<PDeliverCheck @closeScore="closeScore" @submit="submit"></PDeliverCheck>
</uni-popup>
</view>
</template>
<script>
import { mapGetters } from 'vuex';
import UniPopup from '../../components/uni-popup/uni-popup.vue';
import PDeliverCheck from '../p-deliver-check/p-deliver-check.vue';
export default {
name: 'p-delivery-history',
props: { task: { type: Object, default: null } },
components: { PDeliverCheck, UniPopup },
data() {
return {
lists: [],
show: false,
options: null,
loading: true, //
};
},
computed: mapGetters('project', ['projectId']),
mounted() {
this.getDeliverOfTask();
},
methods: {
async getDeliverOfTask() {
try {
const { projectId, task } = this;
const params = { projectId, taskSubId: task.id };
const data = await this.$u.api.queryDeliverOfTask(params);
this.lists = data;
} catch (error) {
console.error('p-delivery-history.vue getDeliverOfTask error: ', error);
this.$t.ui.showToast(error.msg || '提交失败');
}
},
showScore(checkId, status) {
// refuni-popup , type ['top','left','bottom','right','center']
this.$refs.popup.open('bottom');
this.options = { checkId, status };
},
closeScore() {
this.$refs.popup.close('bottom');
},
async submit(remark, score) {
try {
await this.checkDeliver(remark, score);
this.closeScore();
} catch (error) {
console.error('error: ', error);
}
},
/**
* 检查交付物
* @param {string} checkId 检查记录id
* @param {string} projectId 项目id
* @param {string} remark 评论
* @param {number} score 分数
* @param {number} status 检查状态(1-通过,2-驳回)
*/
async checkDeliver(remark, score) {
try {
this.show = true;
const { projectId, options } = this;
const { checkId, status } = options;
const params = { checkId, projectId, status, remark, score };
await this.$u.api.checkDeliver(params);
this.$t.ui.showToast('交付物检查成功');
this.options = null;
this.getDeliverOfTask();
} catch (error) {
console.error('p-delivery-history.vue checkDeliver error: ', error);
this.$t.ui.showToast('交付物检查失败,请稍后重试');
this.options = null;
}
},
//
CheckUrl(url) {
var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(.)+$/;
if (!reg.test(url)) {
return false;
} else {
return true;
}
},
},
};
</script>
<style></style>

104
src/plugins/p-upload-deliverable/p-upload-deliverable.vue

@ -0,0 +1,104 @@
<template>
<!-- 上传交付物 -->
<view class="py-2">
<u-input :auto-height="autoHeight" :border="border" :height="height" :type="type" v-model="content" width="100" />
<view class="flex flex-row-reverse text-xs text-gray-400 mt-2">{{ wordNum }}/140</view>
<ld-select
:list="checkers"
:multiple="true"
@change="selectChange2"
class="my-3"
clearable
label-key="label"
placeholder="选择检查人"
v-model="checkerList"
value-key="value"
></ld-select>
<view class="flex justify-between">
<u-button @click="submit" class="m-0" size="mini" type="primary">提交</u-button>
<u-icon @click="changeShowHistory" name="arrow-up" v-if="showHistory"></u-icon>
<u-icon @click="changeShowHistory" name="arrow-down" v-else></u-icon>
</view>
<p-delivery-history :task="task" v-if="showHistory" />
</view>
</template>
<script>
import ldSelect from '@/components/ld-select/ld-select.vue';
import { mapState, mapGetters } from 'vuex';
export default {
name: 'p-upload-deliverable',
components: { ldSelect },
props: { task: { type: Object, default: null } },
data() {
return {
content: '',
type: 'textarea',
border: true,
height: 30,
autoHeight: true,
wordNum: 0,
checkerList: [],
showHistory: false, //
};
},
computed: {
...mapState('role', ['members']),
...mapGetters('project', ['projectId']),
checkers() {
const arr = [];
if (this.members.length) {
this.members.forEach(member => {
const item = { value: member.memberId, label: member.name };
arr.push(item);
});
}
return arr;
},
},
watch: {
content(val) {
this.wordNum = val.length;
},
},
methods: {
selectChange2(val) {
this.checkerList = val;
},
//
changeShowHistory() {
this.showHistory = !this.showHistory;
},
//
async submit() {
try {
const { content, checkerList, projectId, task } = this;
if (!this.checkerList.length) {
this.$t.ui.showToast('请选择检查人');
return;
}
const params = { content, checkerList, projectId, taskSubId: task.id };
await this.$u.api.saveDeliver(params);
this.$t.ui.showToast('交付物提交成功');
this.content = '';
this.checkerList = [];
} catch (error) {
console.error('p-upload-deliverable.vue submit error: ', error);
this.$t.ui.showToast('交付物提交失败,请稍后重试');
}
},
},
};
</script>
<style></style>

16
src/store/role/actions.js

@ -1,3 +1,17 @@
const actions = {};
const actions = {
/**
* 根据项目id查找所有成员信息
* @param {*} commit
* @param {object} params
*/
async getAllMembers({ commit }, params) {
try {
const data = await uni.$u.api.queryChecker(params);
commit('setMembers', data);
} catch (error) {
uni.$t.ui.showToast(error.msg || '成员查询失败');
}
},
};
export default actions;

12
src/store/role/getters.js

@ -1,3 +1,13 @@
const getters = {};
const getters = {
// 是不是负责人
isMine({ roleId, invisibleRoles, visibleRoles }) {
if (!visibleRoles || !visibleRoles.length) return false;
const visible = visibleRoles.find(visible => visible.id === roleId);
if (visible) return visible.mine;
const invisible = invisibleRoles.find(invisible => invisible.id === roleId);
if (invisible) return visible.mine;
return false;
},
};
export default getters;

9
src/store/role/mutations.js

@ -25,6 +25,15 @@ const mutations = {
setRoleId(state, roleId) {
state.roleId = roleId;
},
/**
* 设置项目下所有成员信息
* @param {Object} state
* @param {Array} data 服务端返回的模板数组
*/
setMembers(state, data) {
state.members = data || [];
},
};
export default mutations;

1
src/store/role/state.js

@ -2,6 +2,7 @@ const state = {
invisibleRoles: [], // 不展示的角色信息
visibleRoles: [], // 展示的角色信息
roleId: '', // 当前展示查看的角色id
members: [], // 项目下所有成员
};
export default state;

Loading…
Cancel
Save