diff --git a/api/oa/reportSchedule.js b/api/oa/reportSchedule.js new file mode 100644 index 0000000..043f84f --- /dev/null +++ b/api/oa/reportSchedule.js @@ -0,0 +1,44 @@ +import request from "@/util/oaRequest" + +// 查询项目排产列表 +export function listReportSchedule(query) { + return request({ + url: '/oa/reportSchedule/list', + method: 'get', + params: query + }) +} + +// 查询项目排产详细 +export function getReportSchedule(scheduleId) { + return request({ + url: '/oa/reportSchedule/' + scheduleId, + method: 'get' + }) +} + +// 新增项目排产 +export function addReportSchedule(data) { + return request({ + url: '/oa/reportSchedule', + method: 'post', + data: data + }) +} + +// 修改项目排产 +export function updateReportSchedule(data) { + return request({ + url: '/oa/reportSchedule', + method: 'put', + data: data + }) +} + +// 删除项目排产 +export function delReportSchedule(scheduleId) { + return request({ + url: '/oa/reportSchedule/' + scheduleId, + method: 'delete' + }) +} diff --git a/pages.json b/pages.json index 41fdc87..05c1a70 100644 --- a/pages.json +++ b/pages.json @@ -293,6 +293,22 @@ "navigationBarTitleText" : "任务详情", "navigationStyle": "default" } + }, + { + "path" : "pages/workbench/reportSchedule/reportSchedule", + "style" : + { + "navigationBarTitleText" : "项目排产", + "navigationStyle": "default" + } + }, + { + "path" : "pages/workbench/reportSchedule/gantt", + "style" : + { + "navigationBarTitleText" : "项目排产", + "navigationStyle": "default" + } } ], "tabBar": { diff --git a/pages/workbench/index/index.vue b/pages/workbench/index/index.vue index dfb5ef6..eace126 100644 --- a/pages/workbench/index/index.vue +++ b/pages/workbench/index/index.vue @@ -14,10 +14,14 @@ 施工进度 - - - 任务中心 - + + + 任务中心 + + + + 项目排产 + @@ -59,11 +63,16 @@ export default { url: '/pages/workbench/construction/construction' }); }, - goTask() { - uni.navigateTo({ - url: '/pages/workbench/task/task' - }) - } + goTask() { + uni.navigateTo({ + url: '/pages/workbench/task/task' + }) + }, + goSchedule() { + uni.navigateTo({ + url: '/pages/workbench/reportSchedule/reportSchedule' + }) + } }, }; diff --git a/pages/workbench/reportSchedule/gantt.vue b/pages/workbench/reportSchedule/gantt.vue new file mode 100644 index 0000000..8cde730 --- /dev/null +++ b/pages/workbench/reportSchedule/gantt.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/pages/workbench/reportSchedule/reportSchedule.vue b/pages/workbench/reportSchedule/reportSchedule.vue new file mode 100644 index 0000000..d6c20ce --- /dev/null +++ b/pages/workbench/reportSchedule/reportSchedule.vue @@ -0,0 +1,768 @@ + + + + + diff --git a/static/images/paichan.png b/static/images/paichan.png new file mode 100644 index 0000000..a276b47 Binary files /dev/null and b/static/images/paichan.png differ diff --git a/uni_modules/uni-drawer/changelog.md b/uni_modules/uni-drawer/changelog.md new file mode 100644 index 0000000..6d2488c --- /dev/null +++ b/uni_modules/uni-drawer/changelog.md @@ -0,0 +1,13 @@ +## 1.2.1(2021-11-22) +- 修复 vue3中个别scss变量无法找到的问题 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-drawer](https://uniapp.dcloud.io/component/uniui/uni-drawer) +## 1.1.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.1.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-05-12) +- 新增 组件示例地址 +## 1.0.6(2021-02-04) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-drawer/components/uni-drawer/keypress.js b/uni_modules/uni-drawer/components/uni-drawer/keypress.js new file mode 100644 index 0000000..62dda46 --- /dev/null +++ b/uni_modules/uni-drawer/components/uni-drawer/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + // this.$once('hook:beforeDestroy', () => { + // document.removeEventListener('keyup', listener) + // }) + }, + render: () => {} +} +// #endif diff --git a/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue b/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue new file mode 100644 index 0000000..2471521 --- /dev/null +++ b/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue @@ -0,0 +1,183 @@ + + + + + diff --git a/uni_modules/uni-drawer/package.json b/uni_modules/uni-drawer/package.json new file mode 100644 index 0000000..dd056e4 --- /dev/null +++ b/uni_modules/uni-drawer/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-drawer", + "displayName": "uni-drawer 抽屉", + "version": "1.2.1", + "description": "抽屉式导航,用于展示侧滑菜单,侧滑导航。", + "keywords": [ + "uni-ui", + "uniui", + "drawer", + "抽屉", + "侧滑导航" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-drawer/readme.md b/uni_modules/uni-drawer/readme.md new file mode 100644 index 0000000..dcf6e6b --- /dev/null +++ b/uni_modules/uni-drawer/readme.md @@ -0,0 +1,10 @@ + + +## Drawer 抽屉 +> **组件名:uni-drawer** +> 代码块: `uDrawer` + +抽屉侧滑菜单。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-drawer) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file