From 9ab680e396120ccd9437919c19f8ef01c4e51db5 Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Tue, 7 Dec 2021 17:42:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=BB=BA=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +- package.json | 3 +- .../TimeLine/component/TimeStatus.vue | 107 +++- src/components/Title/Title.vue | 1 - .../Title/components/CreateTask copy.vue | 466 ++++++++++++++++++ .../Title/components/CreateTask.vue | 287 +++++++---- tsconfig.json | 1 + 7 files changed, 766 insertions(+), 102 deletions(-) create mode 100644 src/components/Title/components/CreateTask copy.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index c4fe18f..dbd47a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-11-18) +# 0.1.0 (2021-12-07) ### 🌟 新功能 范围|描述|commitId @@ -226,6 +226,7 @@ 范围|描述|commitId --|--|-- - | 1.时间轴筛选相同的时间替换数据 2.整理代码 | e082ccb + - | 本地缓存 | c615924 - | 测试接口 | 215e074 - | 插件查询及展示 | 4dba770 - | 角色栏文字颜色修改 | 215c6b3 diff --git a/package.json b/package.json index fca8b3c..102ee37 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@dcloudio/uni-h5": "^2.0.0-31920210709003", "@dcloudio/uni-helper-json": "*", "@dcloudio/uni-i18n": "^2.0.0-31920210709003", + "@dcloudio/uni-cli-i18n": "^2.0.0-31920210709003", "@dcloudio/uni-mp-vue": "^2.0.0-31920210709003", "@dcloudio/uni-mp-weixin": "^2.0.0-31920210709003", "@dcloudio/uni-quickapp-native": "^2.0.0-31920210709003", @@ -42,7 +43,7 @@ "regenerator-runtime": "^0.12.1", "uview-ui": "^1.8.4", "vue": "^2.6.11", - "vue-clipboard2": "^0.3.1", + "vue-clipboard2": "^0.3.3", "vuex": "^3.2.0" }, "devDependencies": { diff --git a/src/components/TimeLine/component/TimeStatus.vue b/src/components/TimeLine/component/TimeStatus.vue index 7055166..536e533 100644 --- a/src/components/TimeLine/component/TimeStatus.vue +++ b/src/components/TimeLine/component/TimeStatus.vue @@ -36,14 +36,33 @@ + + + + + + + + + + diff --git a/src/components/Title/components/CreateTask.vue b/src/components/Title/components/CreateTask.vue index 6d8d38c..70b7d08 100644 --- a/src/components/Title/components/CreateTask.vue +++ b/src/components/Title/components/CreateTask.vue @@ -2,20 +2,54 @@
- 新建任务 -
-
名称*
- + 新建任务 +
+
名称*
+
+ + +
+
开始时间*
+
+ + +
+
+ + +
+
结束时间*
+
+ + +
+
+ -
+ + -
-
负责人*
-
{{ roleName }}
+
+
负责人*
+
{{ roleName }}
@@ -34,79 +68,80 @@
- -
- - + + +
+
描述
+ +
+ + +
+
所属项目*
+
{{ project.name }}
- -
- -
-
描述:
- -
- -
-
所属项目*
-
{{ project.name }}
-
- -
-
所属任务:
-
{{ task.name }}
+ + +
+
所属任务
+
{{ task.name }}
+
+ + +
+
上道工序
+ +
+ + +
+
检查人*
+
+ + + +
+ {{ checkoutOption.name }} + +
+
+
+
- -
-
上道工序:
- + + +
+ 是否是日常任务 + +
+ +
+
{{ `交付物${sortIndex + 1}` }}
+
+
- -
-
检查人*
-
- - - -
- {{ checkoutOption.name }} - -
-
-
-
-
-
- -
- 是否是日常任务: - -
-
-
交付物:
-
- -
-
-
+ +
提交
@@ -130,6 +165,10 @@ export default { type: Object, default: null, }, + source: { + type: String, + default: '', + }, }, data() { return { @@ -138,7 +177,9 @@ export default { isGlobal: false, //是否日常任务 name: '', //名称 showChooseTime: false, - timeValue: '', //起止时间 + // timeValue: '', //起止时间 + // taskStartTime: '', // 新建任务开始时间 + // taskEndTime: '', // 新建任务结束时间 description: '', //描述 projectShow: false, //所属项目模糊搜索展示 processTaskId: '', //上道工序 @@ -165,13 +206,13 @@ export default { ...mapGetters('project', ['projectId']), }, - watch: { - endTime(val) { - if (val) { - this.timeValue = this.startTime + ' 至 ' + val; - } - }, - }, + // watch: { + // endTime(val) { + // if (val) { + // this.timeValue = this.startTime + ' 至 ' + val; + // } + // }, + // }, mounted() { // 获取负责人和检查人列表 @@ -301,9 +342,30 @@ export default { isGlobal, } = this; if (!name) { - this.$t.ui.showToast('请输入名称'); + this.$t.ui.showToast('请输入任务名称'); return; } + if (this.source) { + if (!startTime) { + this.$t.ui.showToast('请选择开始时间'); + return; + } + + if (!endTime) { + this.$t.ui.showToast('请选择结束时间'); + return; + } + } + + if (startTime && endTime) { + let start = startTime ? this.$moment(startTime).format('x') - 0 : ''; + let end = endTime ? this.$moment(endTime).format('x') - 0 : ''; + if (start > end) { + this.$t.ui.showToast('结束时间不能小于开始时间'); + return; + } + } + if ((!roleIdList || !roleIdList.length) && !hasRole) { this.$t.ui.showToast('请选择负责人'); return; @@ -422,8 +484,8 @@ export default { diff --git a/tsconfig.json b/tsconfig.json index 730626d..7b76c1e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "allowJs": true, "types": [ "@dcloudio/types", "miniprogram-api-typings",