Commit da9f5f1a by xinla

Merge branch 'front_end_dev_1.5'

2 parents 8e6f5e1e e2ace889
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"performance_test_plugins_milk": "^0.0.7",
"promise.prototype.finally": "^3.1.2", "promise.prototype.finally": "^3.1.2",
"screenfull": "4.2.0", "screenfull": "4.2.0",
"sortablejs": "1.8.4", "sortablejs": "1.8.4",
......
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=wI3zLlyN01Ej3ZD6ZD4WiuoE8N6AC6Lm"></script> <!-- <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=wI3zLlyN01Ej3ZD6ZD4WiuoE8N6AC6Lm"></script> -->
<title><%= VUE_APP_TITLE %></title> <title>
<%= VUE_APP_TITLE %>
</title>
<style> <style>
html, html,
body, body,
...@@ -197,18 +199,17 @@ ...@@ -197,18 +199,17 @@
color: #FFF; color: #FFF;
opacity: 0.5; opacity: 0.5;
} }
</style> </style>
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<!-- <div id="loader-wrapper"> <div id="loader-wrapper">
<div id="loader"></div> <div id="loader"></div>
<div class="loader-section section-left"></div> <div class="loader-section section-left"></div>
<div class="loader-section section-right"></div> <div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div> <div class="load_title">正在加载系统资源,请耐心等待</div>
</div> --> </div>
</div> </div>
</body> </body>
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length>=1"> <div v-if="personList.length >= 1">
<ul> <ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)"> <li
v-for="(item, index) in personList"
:key="index"
@click="liClick(item)"
>
<el-row style="padding:10px"> <el-row style="padding:10px">
<span class="fl"> <img :src="item.finalChatContext.fromInfo.avatar"></span> <span class="fl">
<img :src="item.finalChatContext.fromInfo.avatar"
/></span>
<span class="fl" style="margin-left:8px;"> <span class="fl" style="margin-left:8px;">
<p>{{item.roomInfo.groupName}} <span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p> <p>
<p class="gray " v-if="item.finalChatContext.text">{{item.finalChatContext.text.content}}</p> {{ item.roomInfo.groupName }}
<span class="fr gray">{{
parseTime(item.finalChatContext.msgtime)
}}</span>
</p>
<p class="gray " v-if="item.finalChatContext.text">
{{ item.finalChatContext.text.content }}
</p>
</span> </span>
</el-row> </el-row>
</li> </li>
...@@ -17,8 +30,8 @@ ...@@ -17,8 +30,8 @@
</div> </div>
</template> </template>
<script> <script>
import {parseTime} from '@/utils/common.js' import { parseTime } from '@/utils/common.js'
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
...@@ -27,49 +40,65 @@ ...@@ -27,49 +40,65 @@
loading: { loading: {
type: Boolean, type: Boolean,
defluat: false defluat: false
}, }
}, },
data() { data() {
return{ return {
loadings:true loadings: true
} }
}, },
methods:{ methods: {
liClick(e){ liClick(e) {
this.$emit('chatFn',e) this.$emit('chatFn', e)
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
*{ padding: 0; // * {
margin: 0;} // padding: 0;
.fl{float: left;} // margin: 0;
.list { // }
overflow-y:scroll; .fl {
float: left;
}
.list {
overflow-y: scroll;
height: 652px; height: 652px;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
/deep/ .el-loading-spinner{margin-top: 20px;} /deep/ .el-loading-spinner {
.fr{float:right;} margin-top: 20px;
.gray{color: #999;} }
.padt10{padding-top: 10px;} .fr {
float: right;
}
.gray {
color: #999;
}
.padt10 {
padding-top: 10px;
}
ul li { ul li {
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
cursor: pointer; cursor: pointer;
p{white-space:nowrap; p {
overflow:hidden; white-space: nowrap;
text-overflow:ellipsis;} overflow: hidden;
:hover{ background: #efefef;} text-overflow: ellipsis;
}
:hover {
background: #efefef;
}
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
float: left float: left;
}
} }
} }
}
</style> </style>
<template> <template>
<div class="takecontent"> <div class="takecontent">
<ul> <ul>
<li v-for="(item,index) in allChat" :key="index"> <li v-for="(item, index) in allChat" :key="index">
<div :style="{'color':item.action=='send'?'#199ed8':'#999'}">{{item.from}} <span <div :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }">
:style="{'color':item.action=='send'?'#199ed8':'#999'}">{{parseTime(item.msgtime)}}</span></div> {{ item.from }}
<div v-if="item.msgtype=='text'" class="msgtypetext"> <span
{{item.text.content}} :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }"
>{{ parseTime(item.msgtime) }}</span
>
</div> </div>
<div v-else-if="item.msgtype=='image'" class="msgtypeimg"> <div v-if="item.msgtype == 'text'" class="msgtypetext">
<img :src="item.image.attachment"> {{ item.text.content }}
</div> </div>
<div v-else-if="item.msgtype=='file'" class="msgtypefile" @click="down(item.file)"> <div v-else-if="item.msgtype == 'image'" class="msgtypeimg">
{{item.file.filename}} <img :src="item.image.attachment" />
</div> </div>
<div v-else-if="item.msgtype=='voice'" class="msgtypevoice"> <div
<i class="el-icon-video-play" @click="play(item,'voice')"></i> v-else-if="item.msgtype == 'file'"
class="msgtypefile"
@click="down(item.file)"
>
{{ item.file.filename }}
</div> </div>
<div v-else-if="item.msgtype=='video'" class="msgtypevideo"> <div v-else-if="item.msgtype == 'voice'" class="msgtypevoice">
<i class="el-icon-video-play" @click="play(item,'video')"></i> <i class="el-icon-video-play" @click="play(item, 'voice')"></i>
</div>
<div v-else-if="item.msgtype == 'video'" class="msgtypevideo">
<i class="el-icon-video-play" @click="play(item, 'video')"></i>
</div> </div>
<div v-else-if="item.msgtype=='location'" class="msgtypecard "> <div v-else-if="item.msgtype == 'location'" class="msgtypecard ">
<div class="card_name"></div> <div class="card_name"></div>
<div class="card_foot">{{item.location.address}}</div> <div class="card_foot">{{ item.location.address }}</div>
</div> </div>
<div v-else-if="item.msgtype=='weapp'" class="msgtypecard "> <div v-else-if="item.msgtype == 'weapp'" class="msgtypecard ">
<div class="card_name"></div> <div class="card_name"></div>
<div class="card_foot">小程序</div> <div class="card_foot">小程序</div>
</div> </div>
<div v-else-if="item.msgtype=='card'" class="msgtypecard "> <div v-else-if="item.msgtype == 'card'" class="msgtypecard ">
<div class="card_name">{{item.card.corpname}}</div> <div class="card_name">{{ item.card.corpname }}</div>
<div class="card_foot">个人名片</div> <div class="card_foot">个人名片</div>
</div> </div>
</li> </li>
</ul> </ul>
<el-dialog :visible.sync="dia" :show-close='false'> <el-dialog :visible.sync="dia" :show-close="false">
<p>播放</p> <p>播放</p>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import { parseTime, yearMouthDay } from '@/utils/common.js'
parseTime, export default {
yearMouthDay,
} from '@/utils/common.js'
export default {
props: { props: {
allChat: { allChat: {
type: Array, type: Array,
...@@ -64,19 +68,14 @@ ...@@ -64,19 +68,14 @@
play() { play() {
this.dia = true this.dia = true
}, },
down(e){ down(e) {
//下载文件 //下载文件
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
* { .takecontent {
padding: 0;
margin: 0;
}
.takecontent {
text-align: left; text-align: left;
width: 100%; width: 100%;
height: 600px; height: 600px;
...@@ -108,7 +107,10 @@ ...@@ -108,7 +107,10 @@
text-indent: 10px; text-indent: 10px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 4px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 4px 0 rgba(0, 0, 0, 0.19);
} }
.card_name{ line-height: 80px;text-indent: 10px;} .card_name {
line-height: 80px;
text-indent: 10px;
}
.msgtypevideo { .msgtypevideo {
margin: 10px; margin: 10px;
font-size: 40px; font-size: 40px;
...@@ -128,7 +130,8 @@ ...@@ -128,7 +130,8 @@
height: 140px; height: 140px;
margin: 10px; margin: 10px;
border-radius: 8px; border-radius: 8px;
-webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 8px 0 rgba(0, 0, 0, 0.19); -webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),
0 6px 8px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 8px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 8px 0 rgba(0, 0, 0, 0.19);
position: relative; position: relative;
...@@ -144,6 +147,5 @@ ...@@ -144,6 +147,5 @@
width: 100%; width: 100%;
} }
} }
}
}
</style> </style>
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length>=1"> <div v-if="personList.length >= 1">
<ul> <ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)"> <li
v-for="(item, index) in personList"
:key="index"
@click="liClick(item)"
>
<el-row style="padding:10px"> <el-row style="padding:10px">
<el-col :span="3"><img :src="item.receiveWeUser.avatarMediaid" ></el-col> <el-col :span="3"
><img :src="item.receiveWeUser.avatarMediaid"
/></el-col>
<el-col :span="21"> <el-col :span="21">
<p>{{item.receiveWeUser.name}} <span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p> <p>
<p class="gray padt10" v-if="item.finalChatContext.text">{{item.finalChatContext.text.content}}</p> {{ item.receiveWeUser.name }}
<span class="fr gray">{{
parseTime(item.finalChatContext.msgtime)
}}</span>
</p>
<p class="gray padt10" v-if="item.finalChatContext.text">
{{ item.finalChatContext.text.content }}
</p>
</el-col> </el-col>
</el-row> </el-row>
</li> </li>
...@@ -17,8 +30,8 @@ ...@@ -17,8 +30,8 @@
</div> </div>
</template> </template>
<script> <script>
import {parseTime} from '@/utils/common.js' import { parseTime } from '@/utils/common.js'
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
...@@ -27,49 +40,59 @@ ...@@ -27,49 +40,59 @@
loading: { loading: {
type: Boolean, type: Boolean,
defluat: false defluat: false
}, }
}, },
data() { data() {
return{ return {
loadings:true loadings: true
} }
}, },
methods:{ methods: {
liClick(e){ liClick(e) {
this.$emit('chatFn',e) this.$emit('chatFn', e)
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
*{ padding: 0; .list {
margin: 0;} overflow-y: scroll;
.list {
overflow-y:scroll;
height: 651px; height: 651px;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
/deep/ .el-loading-spinner{margin-top: 20px;} /deep/ .el-loading-spinner {
.fr{float:right;} margin-top: 20px;
.gray{color: #999;} }
.padt10{padding-top: 10px;} .fr {
float: right;
}
.gray {
color: #999;
}
.padt10 {
padding-top: 10px;
}
ul li { ul li {
padding: 10px; padding: 10px;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
cursor: pointer; cursor: pointer;
p{white-space:nowrap; p {
overflow:hidden; white-space: nowrap;
text-overflow:ellipsis;} overflow: hidden;
:hover{ background: #efefef;} text-overflow: ellipsis;
}
:hover {
background: #efefef;
}
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
float: left float: left;
}
} }
} }
}
</style> </style>
...@@ -2,19 +2,39 @@ ...@@ -2,19 +2,39 @@
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList"> <div v-if="personList">
<ul> <ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)"> <li
<el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='text'"> v-for="(item, index) in personList"
:key="index"
@click="liClick(item)"
>
<el-row
style="padding:10px"
v-if="item.finalChatContext.msgtype == 'text'"
>
<span class="fl"> <span class="fl">
<div class="ninebox"> <div class="ninebox">
<ul v-if="item.roomInfo"> <ul v-if="item.roomInfo">
<li v-for="(a,i) in item.roomInfo.avatar.split(',')" :key="i"><img :src="a" ></li> <li
v-for="(a, i) in item.roomInfo.avatar.split(',')"
:key="i"
>
<img :src="a" />
</li>
</ul> </ul>
</div> </div>
</span> </span>
<span class="fl" style="margin-left:8px;line-height:60px"> <span class="fl" style="margin-left:8px;line-height:60px">
<p>{{item.finalChatContext.roomInfo.name}} <span class="fr gray">{{parseTime(item.finalChatContext.fromInfo.updateTime)}}</span></p> <p>
<p class="gray" v-if="item.finalChatContext.fromInfo">{{item.finalChatContext.fromInfo.name}}:{{item.finalChatContext.text.content}}</p> {{ item.finalChatContext.roomInfo.name }}
<span class="fr gray">{{
parseTime(item.finalChatContext.fromInfo.updateTime)
}}</span>
</p>
<p class="gray" v-if="item.finalChatContext.fromInfo">
{{ item.finalChatContext.fromInfo.name }}:{{
item.finalChatContext.text.content
}}
</p>
</span> </span>
</el-row> </el-row>
<!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'"> <!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'">
...@@ -33,8 +53,8 @@ ...@@ -33,8 +53,8 @@
</div> </div>
</template> </template>
<script> <script>
import {parseTime} from '@/utils/common.js' import { parseTime } from '@/utils/common.js'
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
...@@ -43,58 +63,71 @@ ...@@ -43,58 +63,71 @@
loading: { loading: {
type: Boolean, type: Boolean,
defluat: false defluat: false
}, }
}, },
data() { data() {
return{ return {
loadings:true loadings: true
} }
}, },
methods:{ methods: {
liClick(e){ liClick(e) {
this.$emit('groupFn',e) this.$emit('groupFn', e)
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
*{ padding: 0; .ninebox {
.fl{float: left;} width: 54px;
margin: 0;} height: 52px;
.ninebox{ width: 54px; height: 52px; border: 1px solid #199ed8;; border: 1px solid #199ed8;
ul li{ ul li {
float: left; float: left;
width: 15px; width: 15px;
height: 15px; height: 15px;
padding: 0!important; padding: 0 !important;
margin:1px 1px 1px 1px; margin: 1px 1px 1px 1px;
}} }
.list { }
overflow-y:scroll; .list {
overflow-y: scroll;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
/deep/ .el-loading-spinner{margin-top: 20px;} /deep/ .el-loading-spinner {
.fr{float:right;} margin-top: 20px;
.gray{color: #999;} }
.padt10{padding-top: 10px;} .fr {
float: right;
}
.gray {
color: #999;
}
.padt10 {
padding-top: 10px;
}
ul li { ul li {
padding:3px 10px; padding: 3px 10px;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
cursor: pointer; cursor: pointer;
p{white-space:nowrap; p {
overflow:hidden; white-space: nowrap;
text-overflow:ellipsis;} overflow: hidden;
:hover{ background: #efefef;} text-overflow: ellipsis;
}
:hover {
background: #efefef;
}
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
float: left float: left;
}
} }
} }
}
</style> </style>
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length>=1"> <div v-if="personList.length >= 1">
<ul> <ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)"> <li
v-for="(item, index) in personList"
:key="index"
@click="liClick(item)"
>
<el-row style="padding:10px"> <el-row style="padding:10px">
<span class="fl"> <img :src="item.finalChatContext.fromInfo.avatarMediaid"></span> <span class="fl">
<img :src="item.finalChatContext.fromInfo.avatarMediaid"
/></span>
<span class="fl" style="margin-left:8px"> <span class="fl" style="margin-left:8px">
<p>{{item.finalChatContext.fromInfo.name}} </p> <p>{{ item.finalChatContext.fromInfo.name }}</p>
</span> </span>
</el-row> </el-row>
</li> </li>
...@@ -16,8 +22,8 @@ ...@@ -16,8 +22,8 @@
</div> </div>
</template> </template>
<script> <script>
import {parseTime} from '@/utils/common.js' import { parseTime } from '@/utils/common.js'
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
...@@ -26,51 +32,60 @@ ...@@ -26,51 +32,60 @@
loading: { loading: {
type: Boolean, type: Boolean,
defluat: false defluat: false
}, }
}, },
data() { data() {
return{ return {
loadings:true loadings: true
} }
}, },
methods:{ methods: {
liClick(e){ liClick(e) {
console.log(e) console.log(e)
this.$emit('chatFn',e) this.$emit('chatFn', e)
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
*{ padding: 0; .list {
margin: 0;} overflow-y: scroll;
.fl{float: left;}
.list {
overflow-y:scroll;
height: 708px; height: 708px;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
/deep/ .el-loading-spinner{margin-top: 20px;} /deep/ .el-loading-spinner {
.fr{float:right;} margin-top: 20px;
.gray{color: #999;} }
.padt10{padding-top: 10px;} .fr {
float: right;
}
.gray {
color: #999;
}
.padt10 {
padding-top: 10px;
}
ul li { ul li {
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
cursor: pointer; cursor: pointer;
p{white-space:nowrap; p {
overflow:hidden; white-space: nowrap;
overflow: hidden;
line-height: 40px; line-height: 40px;
text-overflow:ellipsis;} text-overflow: ellipsis;
:hover{ background: #efefef;} }
:hover {
background: #efefef;
}
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
float: left float: left;
}
} }
} }
}
</style> </style>
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length>=1"> <div v-if="personList.length >= 1">
<ul> <ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)"> <li
v-for="(item, index) in personList"
:key="index"
@click="liClick(item)"
>
<el-row style="padding:10px"> <el-row style="padding:10px">
<span class="fl"> <img :src="item.receiveWeCustomer.avatar"></span> <span class="fl"> <img :src="item.receiveWeCustomer.avatar"/></span>
<span class="fl" style="margin-left:8px"> <span class="fl" style="margin-left:8px">
<p>{{item.receiveWeCustomer.name}} </p> <p>{{ item.receiveWeCustomer.name }}</p>
</span> </span>
</el-row> </el-row>
</li> </li>
...@@ -16,8 +20,8 @@ ...@@ -16,8 +20,8 @@
</div> </div>
</template> </template>
<script> <script>
import {parseTime} from '@/utils/common.js' import { parseTime } from '@/utils/common.js'
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
...@@ -26,52 +30,61 @@ ...@@ -26,52 +30,61 @@
loading: { loading: {
type: Boolean, type: Boolean,
defluat: false defluat: false
}, }
}, },
data() { data() {
return{ return {
loadings:true loadings: true
} }
}, },
methods:{ methods: {
liClick(e){ liClick(e) {
console.log(e,'liClick') console.log(e, 'liClick')
this.$emit('chatFn',e) this.$emit('chatFn', e)
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
*{ padding: 0; .list {
margin: 0;} overflow-y: scroll;
.fl{float: left;}
.list {
overflow-y:scroll;
height: 708px; height: 708px;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
/deep/ .el-loading-spinner{margin-top: 20px;} /deep/ .el-loading-spinner {
.fr{float:right;} margin-top: 20px;
.gray{color: #999;} }
.padt10{padding-top: 10px;} .fr {
float: right;
}
.gray {
color: #999;
}
.padt10 {
padding-top: 10px;
}
ul li { ul li {
padding: 10px; padding: 10px;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
cursor: pointer; cursor: pointer;
p{white-space:nowrap; p {
overflow:hidden; white-space: nowrap;
overflow: hidden;
line-height: 40px; line-height: 40px;
text-overflow:ellipsis;} text-overflow: ellipsis;
:hover{ background: #efefef;} }
:hover {
background: #efefef;
}
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
float: left float: left;
}
} }
} }
}
</style> </style>
...@@ -4,34 +4,33 @@ ...@@ -4,34 +4,33 @@
<el-tab-pane label="员工检索" name="1"> <el-tab-pane label="员工检索" name="1">
<employee></employee> <employee></employee>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="客户检索" name="2" > <el-tab-pane label="客户检索" name="2">
<user v-if="activeName==2"></user> <user v-if="activeName == 2"></user>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="全局检索" name="3"> <el-tab-pane label="全局检索" name="3">
<role v-if="activeName==3"></role> <role v-if="activeName == 3"></role>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<script> <script>
import employee from './page/employeeTest.vue' import employee from './page/employeeTest.vue'
import user from './page/userTest.vue' import user from './page/userTest.vue'
import role from './page/roleTest.vue' import role from './page/roleTest.vue'
export default { export default {
components:{employee,user,role}, components: { employee, user, role },
data() { data() {
return { return {
activeName: '1', activeName: '1'
} }
}, },
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event)
}
} }
} }
}
</script> </script>
<style scoped> <style scoped>
*{margin: 0;padding: 0;} /* *{margin: 0;padding: 0;} */
</style> </style>
<template> <template>
<div class="security"> <div class="security">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName">
<el-tab-pane label="敏感词触发" name="1"> <el-tab-pane label="敏感词触发" name="1">
<sensitive-list /> <sensitive-list />
</el-tab-pane> </el-tab-pane>
...@@ -18,20 +18,20 @@ import alarmingSensitive from './securityPage/alarmingSensitive.vue' ...@@ -18,20 +18,20 @@ import alarmingSensitive from './securityPage/alarmingSensitive.vue'
import sensitiveList from './securityPage/sensitiveList.vue' import sensitiveList from './securityPage/sensitiveList.vue'
import setSensitiveWord from './securityPage/setSensitiveWord' import setSensitiveWord from './securityPage/setSensitiveWord'
export default { export default {
components:{ components: {
sensitiveList, sensitiveList,
setSensitiveWord, setSensitiveWord,
alarmingSensitive alarmingSensitive
}, },
data() { data() {
return { return {
activeName: '1', activeName: '1'
} }
}, },
methods: { methods: {
handleClick(tab, event) { // handleClick(tab, event) {
console.log(tab, event); // console.log(tab, event);
} // }
} }
} }
</script> </script>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!