城阳pc工作端前端代码
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.

163 lines
4.0 KiB

<template>
<div class="info-dialog" :style="'left:' + position.x + 'px; top:' + position.y + 'px;'">
<img src="../../../../../../assets/img/plugins/close.png" class="info-dialog-close" @click="closeDialog">
<div class="card-title">
<img class="title-icon" src="../../../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">信息详情</div>
</div>
4 years ago
<div class="info-dialog-content" v-if="infoDetail">
<div class="info-dialog-content-item">
4 years ago
<img class="info-dialog-content-item-img" :src="infoDetail.avatar">
<div class="info-dialog-content-item-info">
4 years ago
<div class="info-dialog-content-item-info-name">{{infoDetail.name}}</div>
<div class="info-dialog-content-item-info-mobile">手机号{{infoDetail.mobile}}</div>
<div class="info-dialog-content-item-info-mobile">类别{{infoDetail.categoryName}}</div>
</div>
</div>
<div class="info-dialog-content-intro" style="margin-top: 30px;">简介{{infoDetail.interoduction}}</div>
</div>
</div>
</template>
<script>
4 years ago
import { requestPost } from "@/js/dai/request"
export default {
name: 'info-dialog',
props: {
axisStructId: {
type: String,
default: ''
},
leaderId: {
type: String,
default: ''
},
position: {
type: Object,
default: function () {
return {
x: '',
y: ''
}
}
}
},
watch: {
axisStructId (newVal, oldVal) {
this.getInfo()
}
},
4 years ago
data () {
return {
infoDetail: {}
}
},
created () {
this.getInfo()
},
methods: {
closeDialog () {
this.$emit('close')
},
4 years ago
async getInfo () {
// console.log(this.axisStructId, this.leaderId)
const url = "/pli/power/data/axis/leader"
let params = {
axisStructId: this.axisStructId,
leaderId: this.leaderId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.infoDetail = data
} else {
this.$message.error(msg)
}
}
}
}
</script>
<style lang="scss" scoped>
.card-title {
display: flex;
align-items: center;
margin: 27px 20px;
cursor: pointer;
.title-icon {
display: block;
width: 46px;
height: 34px;
box-sizing: border-box;
margin-right: 6px;
}
3 years ago
.title-label {
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 18px;
color: #fff;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-down::before {
content: "\e790";
}
}
}
}
.info-dialog {
width: 494px;
height: 372px;
background: url('../../../../../../assets/img/plugins/tanchuang.png') no-repeat;
background-size: 100% 100%;
position: absolute;
z-index: 999;
&-close {
position: absolute;
right: -15px;
top: -10px;
}
&-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
padding: 0 20px 20px 20px;
box-sizing: border-box;
&-item {
display: flex;
padding-left: 40px;
box-sizing: border-box;
&-img {
width: 120px;
height: 140px;
height: 140px;
}
&-info {
margin-left: 20px;
display: flex;
flex-direction: column;
justify-content: center;
&-name {
font-size: 20px;
font-weight: bold;
margin-bottom: 30px;
}
&-mobile {
font-size: 14px;
margin-bottom: 12px;
}
}
}
&-intro {
padding-left: 40px;
box-sizing: border-box;
word-break: break-all;
}
}
}
</style>