Commit 2376738d authored by 夏敏伟's avatar 夏敏伟

增加时间控件 修改部分bug

parent 38ba641f
......@@ -3769,6 +3769,11 @@
"assert-plus": "^1.0.0"
}
},
"dayjs": {
"version": "1.11.10",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
},
"de-indent": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz",
......
......@@ -112,7 +112,7 @@ export default {
this.imgList = [];
tmpArr.forEach((item, index) => {
let tmpObj = { content: item, messageForm: 'TEXT' }
if (item.indexOf('data:image/jpeg;base64') == 0) {
if (item.indexOf('data:image/jpeg;base64') == 0||item.indexOf('data:image/png;base64') == 0) {
let obj = { index: index, url: item }
this.imgList.push(obj);
tmpObj.messageForm = 'PICTURE';
......
......@@ -66,11 +66,11 @@ export default {
upLoadFiles('CHAT', fd).then(res => {
this.form.attachment = res;
let type = file.name.split('.')[1];
if (type == 'png' || type == 'jpg') {
if (type == 'png' || type == 'jpg' || type == 'PNG' || type == 'JPG') {
this.form.messageForm = 'PICTURE';
} else if (type == 'mp4') {
} else if (type == 'mp4' || type == 'MP4') {
this.form.messageForm = 'VIDEO';
} else if (type == 'xlsx' || type == 'xls') {
} else if (type == 'xlsx' || type == 'xls' || type == 'XLSX' || type == 'XLS') {
this.form.messageForm = 'EXCEL';
} else {
this.form.messageForm = 'TEXT';
......
......@@ -15,8 +15,8 @@
</div>
<h1><span>业务辅助分析系统</span></h1>
<div class="home-date">
<span class="date">2023年06月14日</span>&emsp;&emsp;
<span class="week">星期三</span>
<span class="date" v-text="myDate.day"></span>&emsp;&emsp;
<span class="week" v-text="myDate.week"></span>
</div>
<div class="top-nav3">
<div class="top-nav3-content">
......@@ -81,6 +81,7 @@ import "../assets/css/home.css";
import { endLoading, get, post } from "../util/http_util";
import { queryDictItem } from '../api/dictitem';
import Push from 'push.js'
import dayjs from 'dayjs';
export default {
name: "home",
......@@ -117,7 +118,11 @@ export default {
{ id: 6, title: '新技术实验模块', eg: 'New Technology Experiment Module' },
],
},
isSelected: 0
isSelected: 0,
myDate:{
day:null,
week:null
}
};
},
methods: {
......@@ -261,6 +266,11 @@ export default {
// });
this.isSelected = this.activeIndex;
this.choiceModule(this.activeIndex);
//获取时间
this.myDate.day = dayjs().format('YYYY年MM月DD日');
const weekList = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
this.myDate.week = weekList[dayjs().get('day')]
},
computed: {
userInfo() {
......
......@@ -3,8 +3,8 @@
<div class="header">
<h1><span>业务辅助分析系统</span></h1>
<div>
<span class="date">2023年06月14日</span>&emsp;&emsp;
<span class="week">星期三</span>
<span class="date" v-text="myDate.day"></span>&emsp;&emsp;
<span class="week" v-text="myDate.week"></span>
</div>
</div>
<div class="content">
......@@ -50,6 +50,7 @@
<script>
import LeaderLine from "../util/leader-line.min";
import dayjs from 'dayjs';
export default {
name: 'homepage',
data() {
......@@ -72,7 +73,11 @@ export default {
line3:null,
line4:null,
line5:null,
line6:null
line6:null,
myDate:{
day:null,
week:null
}
}
},
methods: {
......@@ -142,6 +147,11 @@ export default {
end:document.getElementById('right33'),
});
})
//获取时间
this.myDate.day = dayjs().format('YYYY年MM月DD日');
const weekList = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
this.myDate.week = weekList[dayjs().get('day')]
},
}
</script>
......
......@@ -3,8 +3,8 @@
<div class="login-head">
<h1><span>业务辅助分析系统</span></h1>
<div>
<span class="date">2023年06月14日</span>&emsp;&emsp;
<span class="week">星期三</span>
<span class="date" v-text="myDate.day"></span>&emsp;&emsp;
<span class="week" v-text="myDate.week"></span>
</div>
</div>
<div class="login-content">
......@@ -46,6 +46,7 @@ import leftOne from '../assets/img/login/text1.png';
import leftTwo from '../assets/img/login/text2.png';
import rightOne from '../assets/img/login/text3.png';
import rightTwo from '../assets/img/login/text4.png';
import dayjs from "dayjs";
export default {
name: "login",
data() {
......@@ -60,10 +61,14 @@ export default {
checkPass: [{ required: true, message: "请输入密码", trigger: "blur" }],
},
checked: true,
leftOne:leftOne,
leftTwo:leftTwo,
rightOne:rightOne,
rightTwo:rightTwo
leftOne: leftOne,
leftTwo: leftTwo,
rightOne: rightOne,
rightTwo: rightTwo,
myDate: {
day: null,
week: null
}
};
},
methods: {
......@@ -117,6 +122,10 @@ export default {
type: "warning",
});
}
//获取时间
this.myDate.day = dayjs().format('YYYY年MM月DD日');
const weekList = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
this.myDate.week = weekList[dayjs().get('day')]
}
};
</script>
......@@ -137,6 +146,7 @@ export default {
background-size: 90% 73%;
background-repeat: no-repeat;
background-position: center 33px;
h1 {
font-size: 34px;
letter-spacing: 7px;
......@@ -145,7 +155,8 @@ export default {
margin-bottom: 0px !important;
font-family: cursive;
text-align: center;
span{
span {
background-image: linear-gradient(to right, #498ce1, #75f8d2, #498ce1);
color: transparent;
-webkit-background-clip: text;
......@@ -155,13 +166,13 @@ export default {
}
div {
margin-top: 40px;
font-size: 13px;
color: #75879b;
text-align: center;
line-height: initial;
font-weight: 900;
letter-spacing: 1;
margin-top: 40px;
font-size: 13px;
color: #75879b;
text-align: center;
line-height: initial;
font-weight: 900;
letter-spacing: 1;
}
}
......@@ -175,10 +186,10 @@ export default {
.login-left-content {
width: calc(50% - 350px);
-webkit-animation: warn 3s ease-out infinite;
-webkit-animation: warn 3s ease-out infinite;
-moz-animation: warn 3s ease-out infinite;
animation: warn 3s ease-out infinite;
animation-direction:alternate;
animation-direction: alternate;
}
.login-center-content {
......@@ -261,15 +272,22 @@ export default {
.login-right-content {
width: calc(50% - 350px);
-webkit-animation: warn 3s ease-out infinite;
-moz-animation: warn 3s ease-out infinite;
animation: warn 3s ease-out infinite;
animation-direction:alternate;
-webkit-animation: warn 3s ease-out infinite;
-moz-animation: warn 3s ease-out infinite;
animation: warn 3s ease-out infinite;
animation-direction: alternate;
}
@keyframes warn {
from { opacity:1; transform:scale(0.98); }
to { opacity:1; transform:scale(1); }
from {
opacity: 1;
transform: scale(0.98);
}
to {
opacity: 1;
transform: scale(1);
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment