diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc48ae0..9a9bbc4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,38 +3,41 @@
### 🌟 新功能
范围|描述|commitId
--|--|--
- - | app.vue | [970cf9a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/970cf9a)
- - | first commit | [8dc26de](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8dc26de)
- project | 日常任务面板添加 | [b3f16ff](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b3f16ff)
- theme | theme demo | [9175758](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/9175758)
- - | vue3 | [12ed2ad](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/12ed2ad)
- - | 使用uview完成api请求 | [1b3efd8](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b3efd8)
- - | 日历页添加 | [1b46a91](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b46a91)
+ - | 表单验证 | [8f3bc1e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8f3bc1e)
+ - | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc)
- | 日历页首页 | [561c8e6](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/561c8e6)
- - | 时间轴展示 | [8b1b380](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8b1b380)
+ - | 日历页添加 | [1b46a91](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b46a91)
- | 时间轴接口 | [a95d005](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a95d005)
- | 时间轴页面 | [e926b75](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/e926b75)
- - | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc)
+ - | 时间轴展示 | [8b1b380](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8b1b380)
+ - | 使用uview完成api请求 | [1b3efd8](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b3efd8)
+ - | 手机号登录 | [565585b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/565585b)
- | 添加 timeline | [72dad2b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/72dad2b)
- - | 表单验证 | [8f3bc1e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8f3bc1e)
- - | 账户名密码登录 | [ebf456e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf456e)
- - | 项目列表 | [a52e6d5](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a52e6d5)
- | 项目操作面板 | [3beb05e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3beb05e)
+ - | 项目列表 | [a52e6d5](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a52e6d5)
+ - | 项目列表新 | [88cf48d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/88cf48d)
+ - | 账户名密码登录 | [ebf456e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf456e)
+ - | app.vue | [970cf9a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/970cf9a)
+ - | first commit | [8dc26de](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8dc26de)
+ project | 日常任务面板添加 | [b3f16ff](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b3f16ff)
+ theme | theme demo | [9175758](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/9175758)
+ - | vue3 | [12ed2ad](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/12ed2ad)
### 🎨 代码样式
范围|描述|commitId
--|--|--
- - | calender格式及细节调整 | [db9602b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/db9602b)
- | 细节调整 | [bdd5f87](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/bdd5f87)
+ - | calender格式及细节调整 | [db9602b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/db9602b)
### 🐛 Bug 修复
范围|描述|commitId
--|--|--
+ - | 修复一些内容 | [3cdb1ce](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3cdb1ce)
app.vue | 修复获取token报错的问题 | [9120d54](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/9120d54)
createTask | 修复createTask v-model的问题 | [b20d3f0](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b20d3f0)
- - | 修复一些内容 | [3cdb1ce](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3cdb1ce)
+ - | defineExpose, defineEmits不需要引入 | [902cacc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/902cacc)
### 📦 持续集成
@@ -42,13 +45,14 @@
--|--|--
- | 修改.drone.yml | [f5b52e3](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/f5b52e3)
- | 添加drone.yml | [9fbae89](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/9fbae89)
+ - | 修改.drone.yml | [f5b52e3](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/f5b52e3)
### 🔨 代码重构
范围|描述|commitId
--|--|--
- - | project init 重构 | [2457a87](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/2457a87)
- | 重构project init 部分 | [c7bf2df](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/c7bf2df)
+ - | project init 重构 | [2457a87](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/2457a87)
### 🚀 性能优化
diff --git a/apis/plugin.js b/apis/plugin.js
new file mode 100644
index 0000000..e881ec5
--- /dev/null
+++ b/apis/plugin.js
@@ -0,0 +1,21 @@
+import Config from '@/common/js/config.js'
+
+const apiUrl = Config.apiUrl;
+const defaultwbs = `${apiUrl}/defaultwbs`;
+
+export function setupPlugin(app) {
+ uni.$u.api = { ...uni.$u.api } || {};
+ // 获取插件信息
+ uni.$u.api.getOtherPlugin = param => uni.$u.post(`${apiUrl}/pluginshop/plugin/query?pluginId=${param.pluginId}&styleType=${param.styleType}`);
+
+ // 查询子任务
+ uni.$u.api.findSonTask = param => uni.$u.post(`${defaultwbs}/task/findSonTask`, param);
+ // 查询子项目
+ uni.$u.api.findSonProject = param => uni.$u.post(`${defaultwbs}/project/findSonProject`, param);
+ // 提交交付物
+ uni.$u.api.saveDeliver = param => uni.$u.post(`${defaultwbs}/deliver/save`, param);
+ // 查询任务的交付物历史记录
+ uni.$u.api.queryDeliverOfTask = param => uni.$u.post(`${defaultwbs}/deliver/queryDeliverOfTask`, param);
+ // 检查交付物
+ uni.$u.api.checkDeliver = param => uni.$u.post(`${defaultwbs}/deliver/checkDeliver`, param);
+};
diff --git a/apis/tall.js b/apis/tall.js
index fcb1872..8dc53aa 100644
--- a/apis/tall.js
+++ b/apis/tall.js
@@ -2,6 +2,7 @@ import Config from '@/common/js/config.js'
const apiUrl = Config.apiUrl;
const tall = `${apiUrl}/tall3/v3.0`;
+const tall1 = `http://101.201.226.163/gateway/ptos`;
export function setupTall(app) {
uni.$u.api = { ...uni.$u.api } || {};
@@ -21,7 +22,7 @@ export function setupTall(app) {
// 修改用户信息
uni.$u.api.updateUserInfo = params => uni.$u.http.post(`${tall}/users/userInfo`, params);
// 获取项目列表
- uni.$u.api.getProjects = (startTime, endTime) => uni.$u.post(`${tall}/project/query`, { startTime, endTime });
+ uni.$u.api.getProjects = (startTime, endTime) => uni.$u.post(`${tall1}/project/query`, { startTime, endTime });
// 查询日历是否有小红点
uni.$u.api.findRedPoint = (startTime, endTime) => uni.$u.post(`${tall}/project/day`, { startTime, endTime });
// 设置项目顺序
diff --git a/apis/wbs.js b/apis/wbs.js
index 2816f08..d3d0a20 100644
--- a/apis/wbs.js
+++ b/apis/wbs.js
@@ -3,5 +3,5 @@ import Config from "@/common/js/config.js"
export function setupWbs(app) {
uni.$u.api = { ...uni.$u.api } || {};
// 导入wbs
- uni.$u.api.import = formData => this.$upload.chooseAndUpload(`${Config.apiUrl}/wbs`, formData);
+ uni.$u.api.import = formData => uni.$upload.chooseAndUpload(`${Config.apiUrl}/wbs`, formData);
}
\ No newline at end of file
diff --git a/common/styles/tailwind.scss b/common/styles/tailwind.scss
index 62fc09b..aff246f 100644
--- a/common/styles/tailwind.scss
+++ b/common/styles/tailwind.scss
@@ -2425,6 +2425,18 @@
grid-auto-flow: column dense;
}
+.gap-1{
+ gap: 0.25rem;
+}
+
+.gap-2{
+ gap: 0.5rem;
+}
+
+.gap-3{
+ gap: 0.75rem;
+}
+
.auto-rows-auto {
grid-auto-rows: auto;
}
diff --git a/common/styles/theme/default.scss b/common/styles/theme/default.scss
index 29733e9..f851f5a 100644
--- a/common/styles/theme/default.scss
+++ b/common/styles/theme/default.scss
@@ -1,8 +1,16 @@
// 默认主题文件
.theme-default {
- background-color: #333;
+ background-color: #007aff;
+ color: #fff;
.u-card {
font-size: 24px !important;
color: #0f0;
}
+ .u-navbar {
+ background-color: #007aff !important;
+ color: #fff;
+ .uicon-nav-back {
+ color: #fff !important;
+ }
+ }
}
diff --git a/common/styles/theme/test.scss b/common/styles/theme/test.scss
index e29dddc..33db59c 100644
--- a/common/styles/theme/test.scss
+++ b/common/styles/theme/test.scss
@@ -5,4 +5,7 @@
font-size: 24px !important;
background-color: #ff0 !important;
}
+ .u-navbar {
+ background-color: #ff0 !important;
+ }
}
diff --git a/components/ChooseChecker/ChooseChecker.vue b/components/ChooseChecker/ChooseChecker.vue
new file mode 100644
index 0000000..f57d375
--- /dev/null
+++ b/components/ChooseChecker/ChooseChecker.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+ ...
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/Globals/Globals.vue b/components/Globals/Globals.vue
index e8d5f9c..07c37c9 100644
--- a/components/Globals/Globals.vue
+++ b/components/Globals/Globals.vue
@@ -11,8 +11,7 @@
>
-
-
+
@@ -53,8 +52,8 @@ const sysHeight = uni.getSystemInfoSync().screenHeight; // 屏幕的高度
const globalsHeight = Math.floor(((sysHeight - 44 - 30 - 10) / 5) * 4); // 全局任务的最大高度
const store = useStore();
const isShrink = computed(() => store.state.task.isShrink); // 全局任务是否收缩
+const showGlobalSkeleton = computed(() => store.state.task.showGlobalSkeleton); // 全局任务骨架屏
const globals = computed(() => store.getters['task/globals']);
-console.log('globals: ', globals.value);
// 手动展开日常任务
function openCard() {
diff --git a/components/Plugin/Plugin.vue b/components/Plugin/Plugin.vue
index 6382c31..d740eca 100644
--- a/components/Plugin/Plugin.vue
+++ b/components/Plugin/Plugin.vue
@@ -1,29 +1,10 @@
- 插件面板
-
-
-
+
+
-
-
+
+
+
+
diff --git a/components/TimeLine/TimeLine.vue b/components/TimeLine/TimeLine.vue
index 2b308d9..489c680 100644
--- a/components/TimeLine/TimeLine.vue
+++ b/components/TimeLine/TimeLine.vue
@@ -22,7 +22,7 @@
+
+
diff --git a/components/uni-popup/uni-popup-message.vue b/components/uni-popup/uni-popup-message.vue
new file mode 100644
index 0000000..fe401a7
--- /dev/null
+++ b/components/uni-popup/uni-popup-message.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
diff --git a/components/uni-popup/uni-popup-share.vue b/components/uni-popup/uni-popup-share.vue
new file mode 100644
index 0000000..224a9b7
--- /dev/null
+++ b/components/uni-popup/uni-popup-share.vue
@@ -0,0 +1,171 @@
+
+
+
+
+
+
diff --git a/components/uni-popup/uni-popup.vue b/components/uni-popup/uni-popup.vue
new file mode 100644
index 0000000..4d3b867
--- /dev/null
+++ b/components/uni-popup/uni-popup.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+
diff --git a/config/plugin.js b/config/plugin.js
new file mode 100644
index 0000000..a12856b
--- /dev/null
+++ b/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/hooks/user/userMixin.js b/hooks/user/userMixin.js
index 3ab2cd0..a5b4a0c 100644
--- a/hooks/user/userMixin.js
+++ b/hooks/user/userMixin.js
@@ -1,11 +1,13 @@
-import { ref, computed } from 'vue';
-import { useStore } from 'vuex';
-import clipboard from "@/common/js/dc-clipboard/clipboard.js"
+import { ref, computed, reactive } from 'vue';
+import { useStore } from 'vuex';
+import { onReady } from '@dcloudio/uni-app';
+import clipboard from "@/common/js/dc-clipboard/clipboard.js";
+import Config from '@/common/js/config.js'
export default function userMixin() {
const store = useStore();
const user = computed(() => store.state.user.user);
- const rules = ref({
+ const rules = {
phone: [{
required: true,
message: '请输入手机号',
@@ -78,46 +80,146 @@ export default function userMixin() {
trigger: ['change', 'blur'],
}
],
- });
- const errorType = ['message'];
- const labelPosition = 'left';
- const border = false;
- const smsCode = ref(''); // 短信验证码
+ };
+ const smsCode = ref(null); // 短信验证码
const showInterval = ref(false);
const interval = ref(120);
const codeTimer = ref(null);
- const showPaste = ref(false);
-
- // 获取图形验证码
- async function getImageCode() {
- console.log('5555')
- uni.$ui.showLoading();
- try {
- const data = await uni.$u.api.getImageCode();
- const { imageBase64, verificationCodeId } = data;
- imageBase64 = imageBase64 || '';
- verificationCodeId = verificationCodeId || '';
- uni.$ui.hideLoading();
- } catch (error) {
- uni.$ui.hideLoading();
- uni.$ui.showToast(error);
- }
+ const showPaste = ref(false);
+
+ //有图片验证码的值
+ function hasvalue(form) {
+ if(form.smsCode || form.showPaste) return
+ if (!verifyPhone(form.phone)) {
+ uni.$ui.showToast('请输入正确的手机号');
+ return;
+ }
+ if (!form.verificationCodeValue) {
+ uni.$ui.showToast('请输入图形验证码');
+ return;
+ }
+ getCode();
+ }
+
+ // 获取验证码
+ async function getCode() {
+ try {
+ if (!verificationCodeId.value || !form.verificationCodeValue) {
+ showToast('缺少图形验证码参数');
+ return;
+ }
+ const params = {
+ phone: form.phone,
+ verificationCodeId: verificationCodeId.value,
+ verificationCodeValue: form.verificationCodeValue,
+ };
+ const date = await store.dispatch('user/sendCode', params);
+ getCodeInterval();
+ showPaste.value = true;
+ } catch (err) {
+ throw err;
+ }
+ }
+
+ // 获取验证码倒计时
+ function getCodeInterval() {
+ showInterval.value = true;
+ codeTimer.value = setInterval(() => {
+ if (interval.value === 0) {
+ clearInterval(codeTimer.value);
+ codeTimer.value = null;
+ showInterval.value = false;
+ interval.value = 120;
+ return;
+ }
+ interval.value = interval.value - 1;
+ }, 1000);
+ }
+
+ // 粘贴
+ function setCode() {
+ // 获取粘贴板内容
+ // 小程序平台
+ //#ifdef MP-WEIXIN
+ uni.getClipboardData({
+ success (res) {
+ smsCode.value = res.data;
+ }
+ });
+ //#endif
+
+ // 非小程序平台
+ //#ifndef MP-WEIXIN
+ getClipboardContents()
+ //#endif
+ }
+
+ // 非小程序平台粘贴
+ async function getClipboardContents() {
+ try {
+ const text = await navigator.clipboard.readText();
+ smsCode.value = text;
+ } catch (err) {
+ console.error('Failed to read clipboard contents: ', err);
+ }
+ }
+
+ // 验证信息
+ function checkRules() {
+ if (!verifyPhone(phone.value)) {
+ uni.$ui.showToast('请输入正确的手机号');
+ return false;
+ }
+ if (!smsCode.value) {
+ uni.$ui.showToast('验证码无效');
+ return false;
+ }
+
+ if (phone.value === user.value.phone) {
+ uni.$ui.showToast('新手机号不能与旧手机号相同');
+ return;
+ }
+ return true;
+ }
+
+ /**
+ * 验证手机号格式
+ * @param {string} phone 手机号
+ */
+ function verifyPhone(phone) {
+ const phoneExg = /^1\d{10}$/;
+ return phoneExg.test(phone);
+ }
+
+ /**
+ * 验证账号/密码 格式
+ * @param {string} account 账号
+ */
+ function verifyLoginname(account) {
+ const accountExg = /^[a-zA-Z0-9._-]{2,20}$/;
+ return accountExg.test(account);
+ }
+
+ // 微信登录
+ function handleWxLogin() {
+ const origin = `${Config.baseUrl}/pt-mui`; // 测试
+ const appid = 'wxd1842e073e0e6d91';
+ const state = 'wx_web';
+ const href = 'https://open.weixin.qq.com/connect/qrconnect';
+ // eslint-disable-next-line
+ window.location.href =
+ `${href}?appid=${appid}&redirect_uri=${origin}&response_type=code&scope=snsapi_login&state=${state}#wechat_redirect`;
}
return {
- rules,
- errorType,
- labelPosition,
- border,
- getImageCode,
- // hasvalue,
- // getCode,
- // getCodeInterval,
- // checkRules,
- // setCode,
- // getClipboardContents,
- // verifyPhone,
- // verifyLoginname,
- // handleWxLogin
+ rules,
+ showPaste,
+ showInterval,
+ interval,
+ hasvalue,
+ checkRules,
+ setCode,
+ verifyLoginname,
+ handleWxLogin
}
}
diff --git a/main.js b/main.js
index 06e6f74..8f37209 100644
--- a/main.js
+++ b/main.js
@@ -9,12 +9,14 @@ import { setupRole } from '@/apis/role.js';
import { setupTall } from '@/apis/tall.js';
import { setupTask } from '@/apis/task.js';
import { setupWbs } from '@/apis/wbs.js';
+import { setupPlugin } from '@/apis/plugin.js';
import storage from '@/utils/storage.js';
import store from './store';
import task from '@/utils/task.js';
import time from '@/utils/time.js';
import timeConfig from '@/config/time';
import taskConfig from '@/config/task';
+import pluginConfig from '@/config/plugin';
import uView from './uni_modules/vk-uview-ui'; // 引入 uView UI
import ui from '@/utils/ui.js';
import upload from '@/utils/upload.js';
@@ -31,6 +33,7 @@ export function createApp() {
app.config.globalProperties.$task = task;
app.config.globalProperties.$timeConfig = timeConfig;
app.config.globalProperties.$taskConfig = taskConfig;
+ app.config.globalProperties.$pluginConfig = pluginConfig;
uni.$cache = cache;
uni.$catchReq = cacheAndRequest;
@@ -41,6 +44,7 @@ export function createApp() {
uni.$task = task;
uni.$timeConfig = timeConfig;
uni.$taskConfig = taskConfig;
+ uni.$pluginConfig = pluginConfig;
setupDayjs(app);
app.use(uView); // 使用 uView UI
@@ -51,6 +55,7 @@ export function createApp() {
setupRole(app);
setupTask(app);
setupWbs(app);
+ setupPlugin(app);
return {
app,
diff --git a/pages.json b/pages.json
index a3be40c..feb8e1e 100644
--- a/pages.json
+++ b/pages.json
@@ -12,13 +12,22 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
- },
+ },
+ // 用户名密码登录
{
"path": "pages/user/accountLogin",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
+ },
+ // 手机号登录
+ {
+ "path": "pages/user/login",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
}
],
"globalStyle": {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5b0349e..7daadb6 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -7,7 +7,7 @@
-
+登录
@@ -75,20 +75,22 @@ const onDateChange = event => {
// 导入成功
const onUploadSuccess = () => {
- uTips.show({
- title: '导入成功,即将打开新项目',
- type: 'success',
- duration: '3000',
- });
+ uni.$ui.showToast('导入成功,即将打开新项目', 3000);
+ // uTips.show({
+ // title: '导入成功,即将打开新项目',
+ // type: 'success',
+ // duration: '3000',
+ // });
};
// 导入失败
const onUploadError = error => {
- uTips.show({
- title: error || '导入失败',
- type: 'error',
- duration: '6000',
- });
+ uni.$ui.showToast('导入失败', 6000);
+ // uTips.show({
+ // title: error || '导入失败',
+ // type: 'error',
+ // duration: '6000',
+ // });
};
// 监听触摸滑动 切换日历的模式 月/周
@@ -104,6 +106,10 @@ function onMove(event) {
prevY = y;
data.value.calendar.initDate();
}
+
+function toLogin() {
+ uni.navigateTo({ url: '/pages/user/accountLogin' })
+}
diff --git a/pages/user/login.vue b/pages/user/login.vue
index 48d48ea..2f375cc 100644
--- a/pages/user/login.vue
+++ b/pages/user/login.vue
@@ -1,8 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 粘贴
+ {{ mixinInit.interval }}
+
+
+
+
+ 忘记密码
+
+
+
+
+ 立即登录
+
+
+
+ 新用户注册
+ 用户名登录
+
+
+
+ 快速登录
+
+
+
+
+
-
-
diff --git a/pages/user/rigister.vue b/pages/user/rigister.vue
new file mode 100644
index 0000000..48d48ea
--- /dev/null
+++ b/pages/user/rigister.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/plugins/p-deliver-check/p-deliver-check.vue b/plugins/p-deliver-check/p-deliver-check.vue
new file mode 100644
index 0000000..2bbab16
--- /dev/null
+++ b/plugins/p-deliver-check/p-deliver-check.vue
@@ -0,0 +1,62 @@
+
+
+
+
+ {{ wordNum }}/140
+
+
+
+
+
+
+
+ 提交
+ 取消
+
+
+
+
+
+
+
diff --git a/plugins/p-delivery-history/p-delivery-history.vue b/plugins/p-delivery-history/p-delivery-history.vue
new file mode 100644
index 0000000..928fd6b
--- /dev/null
+++ b/plugins/p-delivery-history/p-delivery-history.vue
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+ {{ list.name }}
+ {{ $moment(+list.time).format('YYYY-MM-DD HH:mm:ss') }}
+
+
+ {{ list.content }}
+ {{ list.content }}
+
+
+
+
+ {{ checker.checkerName }}
+ (我)
+
+
+ 通过
+ 驳回
+ {{ checker.score }}分
+ 未审核
+
+ 驳回
+ 通过
+
+
+
+ {{ checker.remark }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/p-delivery-history/p-delivery-history1.vue b/plugins/p-delivery-history/p-delivery-history1.vue
new file mode 100644
index 0000000..f97cb1c
--- /dev/null
+++ b/plugins/p-delivery-history/p-delivery-history1.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+ {{ list.name }}
+ {{ $moment(+list.time).format('YYYY-MM-DD HH:mm:ss') }}
+
+
+ {{
+ list.content
+ }}
+ {{ list.content }}
+
+
+
+
+ {{ checker.checkerName }}
+ (我)
+
+
+ 通过
+ 驳回
+ {{ checker.score }}分
+ 未审核
+
+
+ 通过
+
+ 驳回
+
+
+
+ {{ checker.remark }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/p-manage-member/p-manage-member.vue b/plugins/p-manage-member/p-manage-member.vue
new file mode 100644
index 0000000..220e966
--- /dev/null
+++ b/plugins/p-manage-member/p-manage-member.vue
@@ -0,0 +1,6 @@
+
+ 成员管理
+
+
+
diff --git a/plugins/p-manage-project/p-manage-project.vue b/plugins/p-manage-project/p-manage-project.vue
new file mode 100644
index 0000000..65a16bb
--- /dev/null
+++ b/plugins/p-manage-project/p-manage-project.vue
@@ -0,0 +1,6 @@
+
+ 项目管理
+
+
+
diff --git a/plugins/p-manage-role/p-manage-role.vue b/plugins/p-manage-role/p-manage-role.vue
new file mode 100644
index 0000000..51558a0
--- /dev/null
+++ b/plugins/p-manage-role/p-manage-role.vue
@@ -0,0 +1,6 @@
+
+ 角色管理
+
+
+
diff --git a/plugins/p-manage-task/p-manage-task.vue b/plugins/p-manage-task/p-manage-task.vue
new file mode 100644
index 0000000..575e828
--- /dev/null
+++ b/plugins/p-manage-task/p-manage-task.vue
@@ -0,0 +1,6 @@
+
+ 任务管理
+
+
+
diff --git a/plugins/p-subproject/p-subproject.vue b/plugins/p-subproject/p-subproject.vue
new file mode 100644
index 0000000..a53419c
--- /dev/null
+++ b/plugins/p-subproject/p-subproject.vue
@@ -0,0 +1,54 @@
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/plugins/p-subtasks/p-subtasks.vue b/plugins/p-subtasks/p-subtasks.vue
new file mode 100644
index 0000000..1edc4e0
--- /dev/null
+++ b/plugins/p-subtasks/p-subtasks.vue
@@ -0,0 +1,31 @@
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/plugins/p-task-countdown/p-task-countdown.vue b/plugins/p-task-countdown/p-task-countdown.vue
new file mode 100644
index 0000000..ee7bf8f
--- /dev/null
+++ b/plugins/p-task-countdown/p-task-countdown.vue
@@ -0,0 +1,10 @@
+
+
+ 任务倒计时插件
+
+
+
+
+
diff --git a/plugins/p-task-description/p-task-description.vue b/plugins/p-task-description/p-task-description.vue
new file mode 100644
index 0000000..bd4bdc9
--- /dev/null
+++ b/plugins/p-task-description/p-task-description.vue
@@ -0,0 +1,9 @@
+
+
+ {{ task.description }}
+
+
+
diff --git a/plugins/p-task-duration-delay/p-task-duration-delay.vue b/plugins/p-task-duration-delay/p-task-duration-delay.vue
new file mode 100644
index 0000000..ab9aba4
--- /dev/null
+++ b/plugins/p-task-duration-delay/p-task-duration-delay.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+ +{{ $time.formatDuration(realDuration - planDuration) }}
+
+
+
+ -{{ $time.formatDuration(planDuration - realDuration) }}
+
+
+
+
+
diff --git a/plugins/p-task-start-time-delay/p-task-start-time-delay.vue b/plugins/p-task-start-time-delay/p-task-start-time-delay.vue
new file mode 100644
index 0000000..df4daeb
--- /dev/null
+++ b/plugins/p-task-start-time-delay/p-task-start-time-delay.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+ {{ $time.formatDuration(+realStart - +planStart) }}
+
+
+
+
diff --git a/plugins/p-upload-deliverable/p-upload-deliverable.vue b/plugins/p-upload-deliverable/p-upload-deliverable.vue
new file mode 100644
index 0000000..951ab3f
--- /dev/null
+++ b/plugins/p-upload-deliverable/p-upload-deliverable.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/p-wbs-import/p-wbs-import.vue b/plugins/p-wbs-import/p-wbs-import.vue
new file mode 100644
index 0000000..8b1b9de
--- /dev/null
+++ b/plugins/p-wbs-import/p-wbs-import.vue
@@ -0,0 +1,71 @@
+
+
+ {{ task.name }}
+ {{ task.name }}
+
+
+
+
+
+
diff --git a/store/task/actions.js b/store/task/actions.js
index 2ff1f56..15a5909 100644
--- a/store/task/actions.js
+++ b/store/task/actions.js
@@ -5,7 +5,9 @@ const actions = {
* @param {string} roleId 角色id
*/
getPermanent({ commit }, param) {
+ commit('setShowGlobalSkeleton', true);
uni.$catchReq.getPermanent(param, (err, data) => {
+ commit('setShowGlobalSkeleton', false);
if (err) {
console.error('err: ', err);
} else {
@@ -20,7 +22,9 @@ const actions = {
* @param {object} param 请求参数 roleId, timeNode, timeUnit
*/
getGlobal({ commit }, param) {
+ commit('setShowGlobalSkeleton', true);
uni.$catchReq.getGlobal(param, (err, data) => {
+ commit('setShowGlobalSkeleton', false);
if (err) {
console.error('err: ', err);
} else {
diff --git a/store/task/mutations.js b/store/task/mutations.js
index 01d9dd7..af17063 100644
--- a/store/task/mutations.js
+++ b/store/task/mutations.js
@@ -225,6 +225,15 @@ const mutations = {
state.showSkeleton = show;
},
+ /**
+ * 设置日常任务骨架屏是否显示
+ * @param {Object} state
+ * @param {Boolean} show
+ */
+ setShowGlobalSkeleton(state, show) {
+ state.showGlobalSkeleton = show;
+ },
+
/**
* 是否设置时间轴自动滚动的位置
* @param {Object} state
diff --git a/store/task/state.js b/store/task/state.js
index 023378d..ae3cca5 100644
--- a/store/task/state.js
+++ b/store/task/state.js
@@ -18,6 +18,7 @@ const state = {
dailyTasks: [], // 日常任务
tasks: [], // 所有的定期任务
showSkeleton: false, // 定期任务骨架屏
+ showGlobalSkeleton: false, // 日常任务骨架屏
newProjectInfo: {},
showScrollTo: false, // 是否可以设置时间轴自动滚动的位置
};
diff --git a/utils/cacheAndRequest.js b/utils/cacheAndRequest.js
index f04baa7..cb0598a 100644
--- a/utils/cacheAndRequest.js
+++ b/utils/cacheAndRequest.js
@@ -83,7 +83,6 @@ export default {
uni.$cache
.getStorageRegularTask(params)
.then(data => {
- console.log('cache data: ', data);
!remote && fn(null, data);
})
.catch(err => !remote && fn(err));
@@ -93,7 +92,6 @@ export default {
uni.$u.api
.getRegularTask(params)
.then(data => {
- console.log('api data: ', uni.$u.deepClone(data));
remote = true;
fn(null, uni.$u.deepClone(data));
diff --git a/utils/upload.js b/utils/upload.js
index 91139d3..60e4d25 100644
--- a/utils/upload.js
+++ b/utils/upload.js
@@ -55,8 +55,8 @@ export default {
*/
chooseAndUpload(url, formData = {}, extension = ['.xls', '.xlsx'], name = 'param') {
uni.hideLoading();
- clearTimeout(timer);
let timer = null;
+ clearTimeout(timer);
return new Promise((resolve, reject) => {
const token = uni.$storage.getStorageSync('anyringToken');
if (!token) {