You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

426 lines
11 KiB

2 years ago
<template>
<div class="container">
<div class="content">
<div class="content-top">
<div class="content-top-left">
<div class="content-top-left-data1">
2 years ago
{{ date }}
2 years ago
</div>
<div class="content-top-left-data2">
<div>
{{ dataNow(3) }}
</div>
<div>{{ dataNow(2) }}</div>
</div>
</div>
<div class="content-top-right">
2 years ago
<div class="content-top-fanhui">
2 years ago
<div class="content-top-fanhui-main" @click="fanhuimenhu">
2 years ago
<div class='black-bg'></div>
<span>返回门户</span>
2 years ago
</div>
</div>
2 years ago
<div class="userInfo">
2 years ago
<!-- <img src="@/assets/images/profile.jpg" alt="" /> -->
2 years ago
<el-dropdown trigger="click" @command="tuichudengl">
2 years ago
<span class="el-dropdown-link">
1 year ago
您好,{{ userName }}<i class="el-icon-arrow-down"></i>
2 years ago
</span>
2 years ago
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0">退出登录</el-dropdown-item>
2 years ago
</el-dropdown-menu>
</el-dropdown>
</div>
2 years ago
</div>
</div>
2 years ago
<div class="title">
<img src="@/assets/images/daping/guangxian.png" alt="" />
<div>产品画像搜索</div>
</div>
<div class="content-bottom-box">
<div class="content-bottom">
<div class="input">
2 years ago
<el-input v-model="input" placeholder="请输入产品名称、批准文号/备案编号"></el-input>
2 years ago
</div>
<div class="sousuo" @click="gotoBgpage">
<img src="@/assets/images/daping/searchicon.png" alt="" />
搜索
</div>
<div class="box-dialog" v-loading="loading" v-if="dialog">
2 years ago
<div class="dialog-item" v-for='(item, index) in searchList' :key="index" @click="getValue(item)">
2 years ago
{{ item.name }}
</div>
</div>
2 years ago
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: '',
components: {},
data() {
return {
2 years ago
input: "",
2 years ago
date: '',
2 years ago
dialog: false,
loading: true,
2 years ago
searchList: [],
getData: {},
userName: '',
2 years ago
}
},
2 years ago
watch: {
async input(newValue, oldValue) {
2 years ago
// let data = await this.$api.productPortrayal.findByName({current:1,size:10});
2 years ago
if (newValue) {
2 years ago
this.loading = true;
this.dialog = true;
2 years ago
// let a = this.throttle(this.getsearchList,500)
this.getsearchList(newValue);
2 years ago
} else {
this.dialog = false;
this.searchList = [];
this.loading = false;
}
}
},
created() { this.dataNow(1) },
2 years ago
mounted() {
this.getDataInterval(1)
2 years ago
console.log(localStorage.getItem('userDto'))
let user = JSON.parse(localStorage.getItem('userDto'))
console.log(user)
this.userName = user.realName
},
2 years ago
methods: {
gotoBgpage() {
2 years ago
if (this.input) {
console.log(this.searchList, 'this.searchList')
console.log( this.getData.code," this.getData");
if (this.searchList.length == 1 || this.getData.code) {
2 years ago
this.$router.push({ path: "/bgpage", query: { code: this.getData.code, name: this.getData.name, type: this.getData.type } })
2 years ago
this.searchList = [];
2 years ago
} else if (this.searchList.length > 1) {
this.$router.push({ path: "/bgpage", query: { code: this.searchList[0].code, name: this.searchList[0].name, type: this.searchList[0].type } })
2 years ago
this.searchList = [];
}
}
},
2 years ago
getDataInterval(index) {
2 years ago
setInterval(() => {
this.dataNow(index)
}, 1000);
2 years ago
},
dataNow(index) {
let now = new Date();
if (index == 1) {
let hour = now.getHours();
if (hour < 10) hour = "0" + hour
let minute = now.getMinutes();
if (minute < 10) minute = "0" + minute
let second = now.getSeconds();
if (second < 10) second = "0" + second
2 years ago
this.date = `${hour}:${minute}:${second}`
2 years ago
} else if (index == 2) {
let year = now.getFullYear();
if (year < 10) year = "0" + year
let month = now.getMonth() + 1;
if (month < 10) month = "0" + month
let day = now.getDate();
if (day < 10) day = "0" + day
2 years ago
return `${year}/${month}/${day}`
2 years ago
} else if (index == 3) {
let dayOfWeek = now.getDay();
// 将星期几转换为对应的中文表示
let weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
let chineseDayOfWeek = weekDays[dayOfWeek];
return chineseDayOfWeek
}
2 years ago
},
2 years ago
getValue(item) {
2 years ago
this.input = item.name;
this.getData = item;
setTimeout(() => {
this.dialog = false;
}, 200);
2 years ago
},
2 years ago
async getsearchList(newValue) {
let data = await this.$api.productPortrayal.findByName({ name: newValue });
if (data.code == 200) {
2 years ago
this.loading = false;
this.searchList = data.data;
2 years ago
if (this.searchList.length < 1) {
2 years ago
this.dialog = false;
}
}
},
2 years ago
tuichudengl() {
console.log(111);
2 years ago
location.href = `${location.origin}/login`;
2 years ago
},
fanhuimenhu() {
location.href = `${location.origin}/ims/workbench/`;
2 years ago
}
2 years ago
},
computed: {}
}
</script>
<style scoped lang='scss'>
@import '../assets/styles/theme.scss';
.container {
width: 100vw;
height: 100vh;
padding: 10px 40px 0;
background-color: #000000;
position: relative;
/* 将内容水平居中对齐 */
2 years ago
background: url('../assets/images/daping/searchbg.png') no-repeat center;
background-size: cover;
2 years ago
}
.content-top {
display: flex;
justify-content: space-between;
align-items: center;
.content-top-left {
display: flex;
align-items: center;
color: #ffffff;
.content-top-left-data1 {
font-family: DIN;
margin: 0 20px 0 0;
2 years ago
font-size: 24px;
// font-family: Helvetica;
font-weight: bold;
color: #FFFFFF;
opacity: 0.72;
}
2 years ago
2 years ago
.content-top-left-data2 {
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
opacity: 0.72;
2 years ago
}
}
.content-top-right {
display: flex;
align-items: center;
color: #ffffff;
.content-top-fanhui {
2 years ago
margin-right: 10px;
2 years ago
background: linear-gradient(0deg, rgba(103, 200, 255, 0.2) 0%, rgba(111, 176, 231, 0.1) 100%);
2 years ago
cursor: pointer;
2 years ago
2 years ago
.content-top-fanhui-main {
padding: 2px 15px;
border: 1px solid;
border-image: linear-gradient(0deg, #1865F2, #7BAAFF) 10 10;
border-radius: 4px;
display: flex;
align-items: center;
2 years ago
2 years ago
.black-bg {
width: 36px;
height: 34px;
background: url('../assets/images/daping/back.png') no-repeat center;
background-size: cover;
margin-top: 3px;
}
2 years ago
2 years ago
span {
font-size: 16px;
font-family: SourceHanSansSC;
font-weight: bold;
color: #FEFFFF;
2 years ago
text-shadow: 0px 4px 9px rgba(0, 0, 0, 0.29);
2 years ago
background: linear-gradient(0deg, #CAFFFF 0%, #CAFFFF 0%, #FFFFFF 0%, #74B4F4 38.96484375%, #3883FF 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
2 years ago
}
2 years ago
.userInfo {
2 years ago
cursor: pointer;
2 years ago
display: flex;
align-items: center;
2 years ago
2 years ago
img {
width: 31px;
height: 31px;
border-radius: 50%;
margin-right: 10px;
}
}
2 years ago
2 years ago
.el-dropdown-link {
2 years ago
font-size: 16px;
font-family: SourceHanSansSC;
font-weight: 400;
color: #FFFFFF;
2 years ago
}
}
}
2 years ago
.title {
margin-top: 250px;
color: #fff;
2 years ago
2 years ago
// display: flex;
// justify-content: center;
div {
padding-left: 50px;
text-align: center;
font-size: 48px;
font-family: Tensentype;
font-weight: normal;
color: #FFFFFF;
line-height: 18px;
2 years ago
text-shadow: 0px 8px 16px rgba(24, 118, 172, 0.6);
2 years ago
// background: linear-gradient(0deg, #C2E5FF 100%);
// -webkit-background-clip: text;
// -webkit-text-fill-color: transparent;
z-index: 20;
}
2 years ago
2 years ago
img {
width: 316px;
height: 316px;
position: absolute;
top: 220px;
left: 830px;
}
}
2 years ago
2 years ago
.content-bottom-box {
2 years ago
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
2 years ago
2 years ago
.content-bottom {
position: relative;
// width: 800px;
display: flex;
align-items: center;
color: #ffffff;
2 years ago
2 years ago
.input {
width: 739px;
2 years ago
2 years ago
::v-deep .el-input {
background-color: transparent;
2 years ago
2 years ago
input {
border: none;
background-color: transparent;
height: 150px;
background: url('../assets/images/daping/searchinputbg.png') no-repeat center;
background-size: 100% 100%;
padding-left: 50px;
font-size: 20px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #9CB4E2;
line-height: 18px;
1 year ago
overflow: hidden;
padding-right: 30px;
2 years ago
}
}
}
2 years ago
2 years ago
.sousuo {
position: absolute;
left: 710px;
// padding: 3px 5px;
width: 162px;
height: 55px;
display: flex;
align-items: center;
justify-content: center;
background: url('../assets/images/daping/searchbuttonbg.png') no-repeat center;
background-size: 100% 100%;
font-size: 24px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #FFFFFF;
line-height: 18px;
cursor: pointer;
2 years ago
2 years ago
img {
width: 25px;
height: 25px;
margin-right: 10px;
}
}
.box-dialog {
position: absolute;
width: 690px;
height: 300px;
top: 120px;
left: 10px;
padding: 2px;
2 years ago
background: linear-gradient(to right, rgba(24, 101, 242, 0.1), rgba(24, 101, 242, 0.1));
overflow: scroll;
2 years ago
.dialog-item {
// padding: 15px 27px;
padding: 5px 10px;
font-size: 18px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
2 years ago
cursor: pointer;
2 years ago
// line-height: 50px;
// background-color: rgb(63,110,204)
// background-color: rgba(205,235,243,0.1)
}
2 years ago
2 years ago
.dialog-item:hover {
2 years ago
background-color: rgb(63, 110, 204)
2 years ago
}
}
2 years ago
}
}
2 years ago
2 years ago
//设置遮罩层颜色
2 years ago
::v-deep .el-loading-mask {
background-color: rgba(205, 235, 243, 0.1);
2 years ago
}
2 years ago
2 years ago
//设置图标颜色
// ::v-deep .el-loading-spinner .path{
// stroke: #005432;
// }
//设置文字颜色
// ::v-deep .el-loading-spinner .el-loading-text{
// color: #005432;
1 year ago
// }
</style>
2 years ago