diff --git a/resources/assets/js/functions/web.js b/resources/assets/js/functions/web.js index f832901a7..dcac88ae1 100755 --- a/resources/assets/js/functions/web.js +++ b/resources/assets/js/functions/web.js @@ -60,14 +60,13 @@ /** * 项目配置模板 * @param project_id - * @returns {{showMy: boolean, showUndone: boolean, project_id, chat: boolean, showHelp: boolean, showCompleted: boolean, cardInit: boolean, card: boolean, completedTask: boolean}} + * @returns {{showMy: boolean, showUndone: boolean, project_id, chat: boolean, showHelp: boolean, showCompleted: boolean, menuType: string, menuInit: boolean, completedTask: boolean}} */ projectParameterTemplate(project_id) { return { project_id, - card: true, - menuType: 'card', - cardInit: false, + menuInit: false, + menuType: 'column', chat: false, showMy: true, showHelp: true, diff --git a/resources/assets/js/pages/manage/components/ProjectList.vue b/resources/assets/js/pages/manage/components/ProjectList.vue index a116b0ebd..4e879bcb0 100644 --- a/resources/assets/js/pages/manage/components/ProjectList.vue +++ b/resources/assets/js/pages/manage/components/ProjectList.vue @@ -82,14 +82,15 @@
-
-
-
+
+
+
+
-
+
-
+
# {{$L('任务名称')}} @@ -312,12 +313,12 @@
-
- - +
+
item.project_id == project_id) } const cache = state.cacheProjectParameter[index]; - if (!$A.isJson(key) && !value) { - key = {[key]: !cache[key]}; - } - if (value) { - key = {[key]: value}; + if (!$A.isJson(key)) { + key = {[key]: value || !cache[key]}; } state.cacheProjectParameter.splice(index, 1, Object.assign(cache, key)) setTimeout(() => { @@ -861,12 +858,12 @@ export default { // 判断只有1列的时候默认版面为表格模式 if (state.cacheColumns.filter(item => item.project_id == project_id).length === 1) { const cache = state.cacheProjectParameter.find(item => item.project_id == project_id) || {}; - if (typeof cache.cardInit === "undefined" || cache.cardInit === false) { + if (typeof cache.menuInit === "undefined" || cache.menuInit === false) { dispatch("toggleProjectParameter", { project_id, key: { - card: false, - cardInit: true, + menuInit: true, + menuType: 'table', } }); } diff --git a/resources/assets/js/store/getters.js b/resources/assets/js/store/getters.js index 638501e4e..924fae912 100644 --- a/resources/assets/js/store/getters.js +++ b/resources/assets/js/store/getters.js @@ -34,6 +34,9 @@ export default { cache = $A.projectParameterTemplate(state.projectId) state.cacheProjectParameter.push(cache); } + if (key === 'menuType' && typeof cache[key] === "undefined") { + return 'column' + } return cache[key]; } }, diff --git a/resources/assets/sass/pages/components/project-list.scss b/resources/assets/sass/pages/components/project-list.scss index e0fc2cec6..2ce80f19d 100644 --- a/resources/assets/sass/pages/components/project-list.scss +++ b/resources/assets/sass/pages/components/project-list.scss @@ -193,9 +193,18 @@ border-radius: 6px; height: 30px; position: relative; - transition: box-shadow 0.2s; + transition: all 0.2s; .active { color: $primary-color; + } + .slider { + position: absolute; + top: 0; + left: 0; + width: 33.3%; + height: 100%; + z-index: 0; + color: $primary-color; border-radius: 6px; border: 1px solid $primary-color; background-color: rgba($primary-color, 0.1); @@ -204,15 +213,6 @@ &:hover { box-shadow: 0 0 10px #e6ecfa; } - &:before { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 33.3%; - height: 100%; - z-index: 0; - } > div { z-index: 1; width: 32px; @@ -956,6 +956,10 @@ } } } + .project-gantt { + height: 100%; + position: relative + } } .project-list-more-dropdown-menu { > li {