diff --git a/.env.development b/.env.development index 6652e84..c2ca9a4 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ VUE_APP_NODE_ENV=development -VUE_APP_BASE_URL=https://test.tall.wiki -VUE_APP_API_URL=https://test.tall.wiki/gateway -VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws -VUE_APP_PROJECT_PATH=https://test.tall.wiki/tall-project +VUE_APP_BASE_URL=https://www.tall.wiki +VUE_APP_API_URL=https://www.tall.wiki/gateway +VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws +VUE_APP_PROJECT_PATH=https://www.tall.wiki/tall-project VUE_APP_VERSION=v3.2.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fef9b4..531aa2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-10-25) +# 0.1.0 (2021-10-29) ### 🌟 新功能 范围|描述|commitId @@ -138,6 +138,7 @@ - | 提示信息显示bug及日常任务收缩问题 | f2f06c5 - | 跳转详情页返回路径修改 | c5e17c0 - | 下拉加载定期任务传参,时间格式化修改 | 0b95a0e + - | 项目操作按钮弹框显示问题 | 1d8d73e - | 项目操作弹框显示不对 | b55a915 项目列表排序 | 项目列表排序 | 402c563 - | 项目列表排序修改 | fd3c3ac diff --git a/package.json b/package.json index 6e70166..f0e6b92 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "regenerator-runtime": "^0.12.1", "uview-ui": "^1.8.4", "vue": "^2.6.11", + "vue-clipboard2": "^0.3.3", "vuex": "^3.2.0" }, "devDependencies": { diff --git a/src/apis/plugin.js b/src/apis/plugin.js new file mode 100644 index 0000000..e01ef1e --- /dev/null +++ b/src/apis/plugin.js @@ -0,0 +1,20 @@ +// 插件的地址是固定的 +const url = process.env.VUE_APP_API_URL; + +const install = (Vue, vm) => { + vm.$u.api = { ...vm.$u.api } || {}; + // 获取插件信息 + vm.$u.api.getOtherPlugin = param => vm.$u.post(`${url}/pluginshop/plugin/query?pluginId=${param.pluginId}&styleType=${param.styleType}`); + // 查询子任务 + 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 }; diff --git a/src/apis/project.js b/src/apis/project.js new file mode 100644 index 0000000..fd893a0 --- /dev/null +++ b/src/apis/project.js @@ -0,0 +1,16 @@ +const install = (Vue, vm) => { + vm.$u.api = { ...vm.$u.api } || {}; + //根据id获取项目信息 + vm.$u.api.findProjectById = param => vm.$u.post(`${uni.$t.domain}/project/findProjectById`, param); + + //创建分享连接 + vm.$u.api.createShare = param => vm.$u.post(`${uni.$t.domain}/share/create`, param); + + //点击分享连接 + vm.$u.api.clickShare = param => vm.$u.post(`${uni.$t.domain}/share/click`, param); + + //查询医院是否填写了调查问卷 + vm.$u.api.queryNotWrite = param => vm.$u.post(`${uni.$t.domain}/questionnaire/queryNotWrite`, param); +}; + +export default { install }; diff --git a/src/apis/role.js b/src/apis/role.js new file mode 100644 index 0000000..d0cc264 --- /dev/null +++ b/src/apis/role.js @@ -0,0 +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 }; diff --git a/src/apis/task.js b/src/apis/task.js new file mode 100644 index 0000000..b11d0a3 --- /dev/null +++ b/src/apis/task.js @@ -0,0 +1,17 @@ +const install = (Vue, vm) => { + vm.$u.api = { ...vm.$u.api } || {}; + vm.$u.api.getGlobal = param => vm.$u.post(`${uni.$t.domain}/task/global`, param); + vm.$u.api.getPermanent = param => vm.$u.post(`${uni.$t.domain}/task/permanent`, param); + //根据时间基准点和角色查找定期任务 + vm.$u.api.getRegularTask = param => vm.$u.post(`${uni.$t.domain}/task/regular`, param); + //修改任务状态 + vm.$u.api.updateTaskType = param => vm.$u.post(`${uni.$t.domain}/task/type`, param); + //新建任务 + vm.$u.api.saveTask = param => vm.$u.post(`${uni.$t.domain}/task/save`, param); + //克隆任务 + vm.$u.api.cloneTask = param => vm.$u.post(`${uni.$t.domain}/task/clone`, param); + //模糊查询 查找项目下的任务 + vm.$u.api.queryTaskOfProject = param => vm.$u.post(`${uni.$t.domain}/task/queryTaskOfProject`, param); +}; + +export default { install }; diff --git a/src/components/ChooseChecker/ChooseChecker.vue b/src/components/ChooseChecker/ChooseChecker.vue new file mode 100644 index 0000000..2a2f927 --- /dev/null +++ b/src/components/ChooseChecker/ChooseChecker.vue @@ -0,0 +1,87 @@ + + + diff --git a/src/components/Globals/Globals.vue b/src/components/Globals/Globals.vue new file mode 100644 index 0000000..a2af6da --- /dev/null +++ b/src/components/Globals/Globals.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/src/components/InputSearch/InputSearch.vue b/src/components/InputSearch/InputSearch.vue new file mode 100644 index 0000000..133446b --- /dev/null +++ b/src/components/InputSearch/InputSearch.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/src/components/Plugin/Plugin.vue b/src/components/Plugin/Plugin.vue new file mode 100644 index 0000000..3917c72 --- /dev/null +++ b/src/components/Plugin/Plugin.vue @@ -0,0 +1,149 @@ + + + diff --git a/src/components/Projects/ProjectItem.vue b/src/components/Projects/ProjectItem.vue index 9d139cc..395b6bc 100644 --- a/src/components/Projects/ProjectItem.vue +++ b/src/components/Projects/ProjectItem.vue @@ -121,7 +121,7 @@ export default { openProject(project) { const { name, id, url } = project; url && (uni.$t.domain = url); - this.$u.route('pages/project-webview/project-webview', { + this.$u.route('pages/project/project', { u: this.userId, p: id, pname: name, diff --git a/src/components/Roles/Roles.vue b/src/components/Roles/Roles.vue new file mode 100644 index 0000000..09f6300 --- /dev/null +++ b/src/components/Roles/Roles.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/src/components/Skeleton/READ_ME.md b/src/components/Skeleton/READ_ME.md new file mode 100644 index 0000000..09ccf28 --- /dev/null +++ b/src/components/Skeleton/READ_ME.md @@ -0,0 +1,84 @@ +# skeleton组件 + +### 1.描述 +> 此组件用于加载数据时占位图显示,跟vant-ui骨架屏用法相似,但比vant-ui更灵活 + + + +### 2.用法 + +- 基本用法 + +代码: +```vue +//基本用法 + + + content + + +``` + + +- **显示 title ——通过 **title 属性显示title占位图 + +代码: +```vue +//显示 title——通过 title 属性显示title占位图 + + + content + + +``` + + +- 显示头像(上面)——通过avatar=‘top’让头像的占位图上面显示 + +代码: +```vue + + + content + + +``` + + +- 显示头像(左边)——通过avatar=‘left’让头像的占位图左边显示 + +代码: +```vue + + + content + + +``` + + +- 显示banner**——通过 **banner属性显示banner占位图(只显示banner,不显示内容占位图时设置row="0") + +代码: +```vue + + + content + + +``` +### +### 3. API +### Props +| **属性名** | **说明** | **类型** | **默认值** | 可取值 | +| --- | --- | --- | --- | --- | +| loading | 是否显示骨架屏 | Boolean | true | true/false | +| row | 段落行数 | Number | String | 3 | 0表示不展现 | +| rowWidth | 段落行宽度 | Boolean | Number | '100%' | | +| title | 是否显示标题 | Boolean | String | false | | +| banner | 是否显示banner | Boolean | String | false | | +| animate | 是否开启动画 | Boolean | String | false | | +| avatar | 头像位置 | Boolean | String | ''空 | left/top | +| avatarSize | 头像大小 | String | - | | +| avatarShape | 头像形状 | String | circle | circle/round | + diff --git a/src/components/Skeleton/Skeleton.vue b/src/components/Skeleton/Skeleton.vue new file mode 100644 index 0000000..6be25bb --- /dev/null +++ b/src/components/Skeleton/Skeleton.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/src/components/TimeLine/TimeLine.vue b/src/components/TimeLine/TimeLine.vue new file mode 100644 index 0000000..171b013 --- /dev/null +++ b/src/components/TimeLine/TimeLine.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/components/TimeLine/component/Barrier.vue b/src/components/TimeLine/component/Barrier.vue new file mode 100644 index 0000000..590e4f9 --- /dev/null +++ b/src/components/TimeLine/component/Barrier.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/components/TimeLine/component/TaskTools.vue b/src/components/TimeLine/component/TaskTools.vue new file mode 100644 index 0000000..a5d31fb --- /dev/null +++ b/src/components/TimeLine/component/TaskTools.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/src/components/TimeLine/component/TimeBox.vue b/src/components/TimeLine/component/TimeBox.vue new file mode 100644 index 0000000..5b14178 --- /dev/null +++ b/src/components/TimeLine/component/TimeBox.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/components/TimeLine/component/TimeStatus.vue b/src/components/TimeLine/component/TimeStatus.vue new file mode 100644 index 0000000..7055166 --- /dev/null +++ b/src/components/TimeLine/component/TimeStatus.vue @@ -0,0 +1,231 @@ + + + + + diff --git a/src/components/TimeLine/component/Title.vue b/src/components/TimeLine/component/Title.vue new file mode 100644 index 0000000..fafec0b --- /dev/null +++ b/src/components/TimeLine/component/Title.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/Tips/Tips.vue b/src/components/Tips/Tips.vue new file mode 100644 index 0000000..b485f10 --- /dev/null +++ b/src/components/Tips/Tips.vue @@ -0,0 +1,95 @@ + + + diff --git a/src/components/Title/Title.vue b/src/components/Title/Title.vue new file mode 100644 index 0000000..4b3b6c2 --- /dev/null +++ b/src/components/Title/Title.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/src/components/Title/components/CreateTask.vue b/src/components/Title/components/CreateTask.vue new file mode 100644 index 0000000..536c360 --- /dev/null +++ b/src/components/Title/components/CreateTask.vue @@ -0,0 +1,460 @@ + + + + + diff --git a/src/components/Title/components/ShareProject.vue b/src/components/Title/components/ShareProject.vue new file mode 100644 index 0000000..ddb9a4b --- /dev/null +++ b/src/components/Title/components/ShareProject.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/components/Upload/Upload.vue b/src/components/Upload/Upload.vue index f23e6e9..b268f46 100644 --- a/src/components/Upload/Upload.vue +++ b/src/components/Upload/Upload.vue @@ -19,7 +19,7 @@ export default { this.$emit('success'); data.url && (uni.$t.domain = data.url); setTimeout(() => { - this.$u.route('/pages/project-webview/project-webview', { + this.$u.route('/pages/project/project', { u: this.userId, p: data.id, pname: data.pname, diff --git a/src/components/uni-popup/message.js b/src/components/uni-popup/message.js new file mode 100644 index 0000000..577dd33 --- /dev/null +++ b/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(); + } + }, + }, +}; diff --git a/src/components/uni-popup/popup.js b/src/components/uni-popup/popup.js new file mode 100644 index 0000000..b646013 --- /dev/null +++ b/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], +}; diff --git a/src/components/uni-popup/uni-popup-dialog.vue b/src/components/uni-popup/uni-popup-dialog.vue new file mode 100644 index 0000000..9102286 --- /dev/null +++ b/src/components/uni-popup/uni-popup-dialog.vue @@ -0,0 +1,246 @@ + + + + + diff --git a/src/components/uni-popup/uni-popup-message.vue b/src/components/uni-popup/uni-popup-message.vue new file mode 100644 index 0000000..fe401a7 --- /dev/null +++ b/src/components/uni-popup/uni-popup-message.vue @@ -0,0 +1,115 @@ + + + + diff --git a/src/components/uni-popup/uni-popup-share.vue b/src/components/uni-popup/uni-popup-share.vue new file mode 100644 index 0000000..224a9b7 --- /dev/null +++ b/src/components/uni-popup/uni-popup-share.vue @@ -0,0 +1,171 @@ + + + + diff --git a/src/components/uni-popup/uni-popup.vue b/src/components/uni-popup/uni-popup.vue new file mode 100644 index 0000000..4d3b867 --- /dev/null +++ b/src/components/uni-popup/uni-popup.vue @@ -0,0 +1,289 @@ + + + + diff --git a/src/components/uni-transition/uni-transition.vue b/src/components/uni-transition/uni-transition.vue new file mode 100644 index 0000000..9458e3b --- /dev/null +++ b/src/components/uni-transition/uni-transition.vue @@ -0,0 +1,276 @@ + + + + + diff --git a/src/config/db.js b/src/config/db.js new file mode 100644 index 0000000..2f0d965 --- /dev/null +++ b/src/config/db.js @@ -0,0 +1,3 @@ +export const db = null; // indexedDB 对象 +export const name = 'TALL_indexedDB'; // indexDB name +export const version = 1; // indexDB version diff --git a/src/config/plugin.js b/src/config/plugin.js new file mode 100644 index 0000000..a12856b --- /dev/null +++ b/src/config/plugin.js @@ -0,0 +1,97 @@ +// 定义插件相关信息 +/* eslint-disable */ +export default { + defaults: [ + { + id: 1, + name: 'TASK_NAME', + description: '任务名插件', + component: 'p-task-title', + }, + { + id: 2, + name: 'TASK_DESCRIPTION', + description: '任务描述插件', + component: 'p-task-description', + }, + { + id: 3, + name: 'TASK_DURATION_DELAY', + description: '任务时长延迟插件(+-1min)时间格式可设置', + component: 'p-task-duration-delay', + }, + { + id: 4, + name: 'TASK_START_TIME_DELAY', + description: '任务开始时间延迟插件(+-1hour)', + component: 'p-task-start-time-delay', + }, + { + id: 5, + name: 'DELIVERABLE', + description: '交付物插件(人 + 交付物)可配置【仅人】 or 【仅交付物】 or 【人+交付物】', + component: 'p-deliverable', + }, + { + id: 6, + name: 'SUBTASKS', + description: '子任务插件:显示子任务', + component: 'p-subtasks', + }, + { + id: 7, + name: 'SUB_PROJECT', + description: '子项目插件:显示子项目', + component: 'p-sub-project', + }, + { + id: 8, + name: 'TASK_COUNTDOWN', + description: '任务倒计时插件', + component: 'p-task-countdown', + }, + { + id: 9, + name: 'MANAGE_PROJECT', + description: '项目信息管理插件', + component: 'p-manage-project', + }, + + { + id: 10, + name: 'MANAGE_ROLE', + description: '角色信息管理插件', + component: 'p-manage-role', + }, + { + id: 11, + name: 'MANAGE_MEMBER', + description: '成员信息管理插件', + component: 'p-manage-member', + }, + { + id: 12, + name: 'MANAGE_TASK', + description: '任务信息管理插件', + component: 'p-manage-task', + }, + { + id: 13, + name: 'WBS_IMPORT', + description: '导入WBS新建项目', + component: 'p-wbs-import', + }, + { + id: 14, + name: 'WBS_IMPORT_UPDATE', + description: '导入WBS更新项目', + component: 'p-wbs-update', + }, + { + id: 15, + name: 'DELIVER_CHECK', + description: '交付物检查', + component: 'p-deliver-check', + }, + ], // 默认插件id列表 +}; diff --git a/src/config/task.js b/src/config/task.js new file mode 100644 index 0000000..95327d7 --- /dev/null +++ b/src/config/task.js @@ -0,0 +1,2 @@ +// 每页加载颗粒度的个数 +export default { pageCount: 10 }; diff --git a/src/config/time.js b/src/config/time.js new file mode 100644 index 0000000..27e412e --- /dev/null +++ b/src/config/time.js @@ -0,0 +1,17 @@ +export default { + timeUnits: [ + // 时间颗粒度 + { id: 0, value: '毫秒', format: 'x', cycle: 'YY-M-D HH:mm:ss', granularity: 'millisecond' }, + { id: 1, value: '秒', format: 'x', cycle: 'YY-M-D HH:mm:ss', granularity: 'second' }, + { id: 2, value: '分', format: 'ss', cycle: 'YY-M-D HH:mm', granularity: 'minute' }, + { id: 3, value: '时', format: 'mm', cycle: 'YY-M-D HH时', granularity: 'hour' }, + { id: 4, value: '天', format: 'D日 HH:mm', cycle: 'YY-M-D', granularity: 'day' }, + { id: 5, value: '周', format: 'D日 HH:mm', cycle: '', granularity: 'week' }, + { id: 6, value: '月', format: 'D日 H:m', cycle: 'YYYY年', granularity: 'month' }, + { id: 7, value: '季度', format: '', cycle: 'YYYY年', granularity: 'quarter' }, + { id: 8, value: '年', format: 'YYYY', cycle: '', granularity: 'year' }, + { id: 9, value: '年代', format: '', cycle: '', granularity: '' }, + { id: 10, value: '世纪', format: '', cycle: '', granularity: '' }, + { id: 11, value: '千年', format: '', cycle: '', granularity: '' }, + ], +}; diff --git a/src/main.js b/src/main.js index 6c35177..5fa4fac 100644 --- a/src/main.js +++ b/src/main.js @@ -1,10 +1,15 @@ import App from './App'; import Tall from '@/utils/tall'; import Vue from 'vue'; +import VueClipboard from 'vue-clipboard2'; import dayjs from 'dayjs'; +import plugin from '@/apis/plugin.js'; +import project from '@/apis/project.js'; import request from '@/utils/request.js'; +import role from '@/apis/role.js'; import store from './store'; import tall from '@/apis/tall.js'; +import task from '@/apis/task.js'; import uView from 'uview-ui'; import wbs from '@/apis/wbs.js'; @@ -18,6 +23,8 @@ import wbs from '@/apis/wbs.js'; // Vue.use(indexedDB); //#endif +Vue.use(VueClipboard); + Vue.config.productionTip = false; Vue.prototype.$moment = dayjs; Vue.use(uView); @@ -33,6 +40,10 @@ const app = new Vue({ ...App, store }); Vue.use(request, app); Vue.use(tall, app); +Vue.use(project, app); +Vue.use(task, app); +Vue.use(plugin, app); +Vue.use(role, app); Vue.use(wbs, app); app.$mount(); diff --git a/src/pages.json b/src/pages.json index d29817a..0367420 100644 --- a/src/pages.json +++ b/src/pages.json @@ -4,27 +4,28 @@ "path": "pages/index/index", "style": { "navigationBarText": "TALL", - //#ifdef H5 "navigationStyle": "custom" - //#endif } }, { "path": "pages/phone-bind/phone-bind", "style": { "navigationBarTitleText": "绑定手机号", - //#ifdef H5 "navigationStyle": "custom" - //#endif } }, { "path": "pages/project-webview/project-webview", "style": { "navigationBarTitleText": "项目详情页", - //#ifdef H5 "navigationStyle": "custom" - //#endif + } + }, + { + "path": "pages/project/project", + "style": { + "navigationBarTitleText": "项目详情页", + "navigationStyle": "custom" } } ], diff --git a/src/pages/project/project.vue b/src/pages/project/project.vue new file mode 100644 index 0000000..91c1e4e --- /dev/null +++ b/src/pages/project/project.vue @@ -0,0 +1,425 @@ +