From 256478d27c57f313b40c7ab8c3fbf2b6c256c116 Mon Sep 17 00:00:00 2001 From: zhanglipeng Date: Sat, 22 May 2021 10:54:04 +0800 Subject: [PATCH] =?UTF-8?q?tag=20title=20=E5=85=AC=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/rolling-notice/index.vue | 131 ++++++++++++++++++ ruoyi-ui/src/router/index.js | 2 +- ruoyi-ui/src/store/modules/tagsView.js | 8 +- .../views/benyi/dayflowassessment/details.vue | 4 + .../views/benyi/dayflowassessment/index.vue | 8 +- ruoyi-ui/src/views/index.vue | 4 + .../benyi/ByDayflowassessmentMapper.xml | 4 +- 7 files changed, 156 insertions(+), 5 deletions(-) create mode 100644 ruoyi-ui/src/components/rolling-notice/index.vue diff --git a/ruoyi-ui/src/components/rolling-notice/index.vue b/ruoyi-ui/src/components/rolling-notice/index.vue new file mode 100644 index 000000000..897295d3d --- /dev/null +++ b/ruoyi-ui/src/components/rolling-notice/index.vue @@ -0,0 +1,131 @@ + + + \ No newline at end of file diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 6aa9bf3e8..db5d6fc88 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -515,7 +515,7 @@ export const constantRoutes = [ component: () => import("@/views/benyi/dayflowassessment/details"), name: "dayflowassessmentteacherdetails", meta: { - title: "一日流程评估详情", + title: `一日流程评估详情`, icon: "" } } diff --git a/ruoyi-ui/src/store/modules/tagsView.js b/ruoyi-ui/src/store/modules/tagsView.js index 476e55572..f9cfd15ea 100644 --- a/ruoyi-ui/src/store/modules/tagsView.js +++ b/ruoyi-ui/src/store/modules/tagsView.js @@ -6,9 +6,15 @@ const state = { const mutations = { ADD_VISITED_VIEW: (state, view) => { if (state.visitedViews.some(v => v.path === view.path)) return + let title = view.meta.title || 'no-name'; + console.log(view) + if(view && view.query && view.query.dayflowassessmentteacherdetails) { + title = view.query.dayflowassessmentteacherdetails; + } + state.visitedViews.push( Object.assign({}, view, { - title: view.meta.title || 'no-name' + title }) ) }, diff --git a/ruoyi-ui/src/views/benyi/dayflowassessment/details.vue b/ruoyi-ui/src/views/benyi/dayflowassessment/details.vue index e15408d30..b66372f6c 100644 --- a/ruoyi-ui/src/views/benyi/dayflowassessment/details.vue +++ b/ruoyi-ui/src/views/benyi/dayflowassessment/details.vue @@ -118,6 +118,10 @@ export default { this.getTaskList(); }, methods: { + setTitle() { + // const $tag = document.querySelector('.tags-view-item.router-link-exact-active.router-link-active.active'); + // console.log(tag); + }, getDetail() { getDayflowassessment(this.id).then((response) => { //console.log(response); diff --git a/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue b/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue index 3472a45a8..f01742cce 100644 --- a/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue +++ b/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue @@ -284,7 +284,13 @@ export default { }, handleAssessment(row) { const id = row.id; - this.$router.push({ path: "/benyi/dayflowassessments/details/" + id }); + this.$router.push({ + path: "/benyi/dayflowassessments/details/" + id, + query: { + dayflowassessmentteacherdetails: + "一日流程评估(" + row.pgdxxm + ")", + }, + }); }, handleAdd() { this.$router.push({ diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 5cf381b49..11b2cfbe0 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -1,5 +1,6 @@