diff --git a/src/apis/index.js b/src/apis/index.js index 0abfc9d..dc86786 100644 --- a/src/apis/index.js +++ b/src/apis/index.js @@ -5,6 +5,7 @@ import http from 'utils/axios'; const apiUrl = import.meta.env.VITE_API_URL; const users = `${apiUrl}/gateway/tall3/v3.0/users`; const tall = `${apiUrl}/gateway/tall3/v3.0`; +const experiment = `${apiUrl}/gateway/experiment`; // 根据userId 获取token // eslint-disable-next-line import/prefer-default-export @@ -17,11 +18,22 @@ export const signIn = params => http.post(`${users}/signin`, params); export const getProjects = (startTime, endTime) => http.post(`${tall}/project/query`, { param: { startTime, endTime } }); // 根据项目id查找角色 -export const findShowRole = param => http.post(`${tall}/role/show`, param); +export const findShowRole = projectId => http.post(`${experiment}/role/show`, { param: { projectId } }); // 根据项目id查找所有成员 export const queryChecker = param => http.post(`${tall}/deliver/queryChecker`, param); -export const getGlobal = params => http.post(`${tall}/task/global`, params); +// 查找带时间的日常任务 +export const getGlobal = params => http.post(`${experiment}/task/global`, params); -export const getPermanent = params => http.post(`${tall}/task/permanent`, params); +// 查找永久日常任务 +export const getPermanent = params => http.post(`${experiment}/task/permanent`, params); + +// 查找定期任务 +export const getRegularTask = params => http.post(`${experiment}/task/regular`, params); + +// 添加任务 +export const saveTask = params => http.post(`${experiment}/task/save`, params); + +// 查询子任务 +export const findSonTask = params => http.post(`${experiment}/task/findSonTask`, params); diff --git a/src/components/tall/center/ProjectDetail.vue b/src/components/tall/center/ProjectDetail.vue index f073a50..a9aa945 100644 --- a/src/components/tall/center/ProjectDetail.vue +++ b/src/components/tall/center/ProjectDetail.vue @@ -1,6 +1,6 @@ diff --git a/src/components/tall/left/Index.vue b/src/components/tall/left/Index.vue index bf36c84..ab248b4 100644 --- a/src/components/tall/left/Index.vue +++ b/src/components/tall/left/Index.vue @@ -4,47 +4,47 @@ diff --git a/src/components/tall/left/Projects.vue b/src/components/tall/left/Projects.vue index 608f31c..86e723e 100644 --- a/src/components/tall/left/Projects.vue +++ b/src/components/tall/left/Projects.vue @@ -7,7 +7,7 @@
{{ item.name }}
-
50%
+
50%
{{ dayjs(item.startTime).format('HH:mm:ss') }} 至 {{ dayjs(item.endTime).format('HH:mm:ss') }}
@@ -19,14 +19,14 @@
-
-
-
+
+
+
{{ sonItem.name }}
-
50%
+
50%
{{ dayjs(sonItem.startTime).format('HH:mm:ss') }} 至 {{ dayjs(sonItem.endTime).format('HH:mm:ss') }}
@@ -39,15 +39,22 @@
-
+
-
项目名称
-
50%
+
{{ thirdItem.name }}
+
50%
-
11-21 00:00 至 11-21 23.59
+
+ {{ dayjs(thirdItem.startTime).format('HH:mm:ss') }} 至 {{ dayjs(thirdItem.endTime).format('HH:mm:ss') }} +
@@ -66,9 +73,6 @@ import { RightOutlined, DownOutlined } from '@ant-design/icons-vue'; const store = useStore(); const projects = reactive([]); -// const projectList = computed(() => store.state.projects.projects); -// watch( projectList, ( newVal, oldVal ) => { console.log( newVal + ":===" + oldVal ) }) -// console.log('projectList', projectList) // 获取项目列表 const getProjectsList = async (startTime, endTime) => { @@ -78,8 +82,8 @@ const getProjectsList = async (startTime, endTime) => { data.forEach(item => { item.show = false; - if (item.sonsonProjectList) { - item.sonsonProjectList.forEach(sonItem => { + if (item.sonProjectList) { + item.sonProjectList.forEach(sonItem => { sonItem.show = false; }); } @@ -96,16 +100,6 @@ const getProjectsList = async (startTime, endTime) => { getProjectsList(dayjs().startOf('day').format('x'), dayjs().endOf('day').format('x')); function toDetail(project) { - // 打开项目详情 - // const { name, id, url } = project; - // url && (uni.$t.domain = url); - // this.$u.route('pages/project-webview/project-webview', { - // u: this.userId, - // p: id, - // pname: name, - // url: encodeURIComponent(url), - // }); - const obj = { u: project.userId, p: project.id, @@ -174,7 +168,7 @@ export default { name: 'Projects' }; color: #333333; } -.precent { +.precent-num { width: 48px; height: 18px; line-height: 18px; diff --git a/src/store/tall/task/index.js b/src/store/tall/task/index.js index 39cb191..71a733e 100644 --- a/src/store/tall/task/index.js +++ b/src/store/tall/task/index.js @@ -25,6 +25,7 @@ export default { showSkeleton: false, // 定期任务骨架屏 newProjectInfo: {}, showScrollTo: false, // 是否可以设置时间轴自动滚动的位置 + taskDetail: {}, // 当前点击任务信息 }, getters: { @@ -284,6 +285,13 @@ export default { setShowScrollTo(state, show) { state.showScrollTo = show; }, + + /** + * 设置当前点击的任务信息 + */ + setTaskDetail(state, show) { + state.taskDetail = show; + }, }, actions: {