tag title 公告

This commit is contained in:
zhanglipeng 2021-05-22 10:54:04 +08:00
parent 42df499ff1
commit 256478d27c
7 changed files with 156 additions and 5 deletions

View File

@ -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-listmargin
}
// 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>

View File

@ -515,7 +515,7 @@ export const constantRoutes = [
component: () => import("@/views/benyi/dayflowassessment/details"),
name: "dayflowassessmentteacherdetails",
meta: {
title: "一日流程评估详情",
title: `一日流程评估详情`,
icon: ""
}
}

View File

@ -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
})
)
},

View File

@ -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);

View File

@ -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({

View File

@ -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(),

View File

@ -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"