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 @@ +<template> + <div class="advert-top" v-if="message"> + <div class="ico-horn"> + <!-- <img src="https://t7.baidu.com/it/u=2222012502,2910942051&fm=193" alt=""> --> + <i class="el-icon-warning-outline icon"></i>公告内容: + </div> + <!-- 滚动文字区域 --> + <div class="marquee-wrap"> + <ul class="marquee-box" id="marquee-box"> + <li class="marquee-list" :key="i" v-for="i in 3" v-html="message" :id="i==1?'marquee':''"></li> + </ul> + </div> + </div> +</template> +<script type="text/javascript"> +export default { + name: 'notice', + props: { + message: { + type: String, + required: true + } + }, + data() { + return { + + }; + }, + mounted: function() { + // 延时滚动 + setTimeout(() => { + this.runMarquee(); + }, 1000); + }, + methods: { + runMarquee() { + // 获取文字 计算后宽度 + var width = document.getElementById("marquee").getBoundingClientRect() + .width, + marquee = document.getElementById("marquee-box"), + disx = 0; // 位移距离 + //设置位移 + setInterval(() => { + disx--; // disx-=1; 滚动步长 + if (-disx >= width) { + disx = 10; // 如果位移超过文字宽度,则回到起点 marquee-list的margin值 + } + // marquee.style.transform = 'translateX(' + disx + 'px)' + marquee.style.left = disx + "px"; + }, 30); //滚动速度 + } + } +}; +// JavaScript Document +(function px2rem(doc, win) { + var docEl = doc.documentElement, + resizeEvt = "orientationchange" in window ? "orientationchange" : "resize", + recalc = function() { + var clientWidth = docEl.clientWidth; + if (!clientWidth) return; + docEl.style.fontSize = 100 * (clientWidth / 750) + "px"; + }; + if (!doc.addEventListener) return; + // 窗口大小发生变化,初始化 + win.addEventListener(resizeEvt, recalc, false); + doc.addEventListener("DOMContentLoaded", recalc, false); + setTimeout(function() { + px2rem(doc, win); + }, 200); +})(document, window); +</script> +<style> +body, +div, +html, +img, +li, +ul { + margin: 0; + padding: 0; + border: 0; +} +li { + list-style: none; +} +.advert-top { + position: relative; + display: flex; + width: 100%; + height: 30px; + background-color: #fff; + color: #999; + font-size: 14px; + align-items: center; +} +.ico-horn { + display: flex; + justify-content: center; + align-items: center; + color: #E6A23C; + flex: 0 0 100px; +} +.ico-horn .icon { + font-size: 24px; + color: #E6A23C; +} +/* 以下代码与滚动相关 */ +.marquee-wrap { + position: relative; + display: flex; + overflow: hidden; + width: 100%; + height: 100%; + margin-left: 8px; +} +.marquee-box { + position: absolute; + top: 50%; + display: flex; + white-space: nowrap; + transform: translateY(-50%); +} +.marquee-list { + margin-right: 10px; +} +.marquee-list span { + padding: 0 0.04rem; + color: #ffe17b; + font-weight: 700; +} +</style> \ 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 @@ <template> <div class="dashboard-editor-container"> + <notice :message="message"></notice> <el-row :gutter="30"> <el-col :xs="24" :sm="24" :lg="8"> <div class="chart-wrapper"> @@ -51,6 +52,7 @@ </template> <script> +import notice from "@/components/rolling-notice"; import RaddarChart from "./dashboard/RaddarChart"; import PieChart from "./dashboard/PieChart"; import BarChart from "./dashboard/BarChart"; @@ -63,6 +65,7 @@ export default { name: "Index", name: "calendar", components: { + notice, RaddarChart, PieChart, BarChart, @@ -70,6 +73,7 @@ export default { }, data() { return { + message: `本一智慧平台可用手机微信登录啦!关注“本一智慧平台”公众号,点击左下角菜单“智慧平台”,进入2.0平台入口。首次登录输入账号密码,根据提示绑定微信号码!以后登录,可以使用手机直接微信登录,无需再输入账号密码,方便快捷!`, code: "", calendarData: [], value: new Date(), diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml index 454531ee2..192fbd455 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml @@ -68,7 +68,7 @@ </resultMap> <sql id="selectByDayflowassessmentVo"> - select d.id, d.planid, d.dept_id, d.classid, e.bjmc, d.bzbh, d.bzxm, d.pbbh, d.pbxm, d.zlbh, d.zlxm, d.xnxq, d.bzid, d.bzmf, d.kfz, d.kfcs, d.zzdf, d.classdf, d.items, d.values, d.pgdx, d.pgdxxm, d.create_userid, d.create_time, + select d.id, d.planid, d.dept_id, d.classid, e.bjmc, d.bzbh, d.bzxm, d.pbbh, d.pbxm, d.zlbh, d.zlxm, d.xnxq, d.bzid, d.bzmf, d.kfz, d.kfcs, d.zzdf, d.classdf, d.items, d.values, d.pgdx, f.nick_name as pgdxxm, d.create_userid, d.create_time, (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='早间接待')) as zjjdpjf, (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='用餐')) as ycpjf, (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='早间坐圈')) as zjzqpjf, @@ -84,7 +84,7 @@ (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='规则与纪律约束')) as gzyjlyspjf, (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='微型课程')) as wxkcpjf, (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='潜课程')) as qkcpjf - from by_dayflowassessment d left join by_class e on d.classid=e.bjbh + from by_dayflowassessment d left join by_class e on d.classid=e.bjbh left join sys_user f on d.pgdx=f.user_id </sql> <select id="selectByDayflowassessmentList" parameterType="ByDayflowassessment"