|
@@ -1,64 +1,76 @@
|
|
|
<template>
|
|
|
<div class="scene-layout">
|
|
|
- <div class="tab-search">
|
|
|
- <input
|
|
|
- v-model="searchKey"
|
|
|
- @keyup.enter="gotoSearch(searchKey)"
|
|
|
- type="text"
|
|
|
- :placeholder="langScenes.placeholder.searchID"
|
|
|
- />
|
|
|
- <i class="iconfont icon-sousuo" @click="gotoSearch(searchKey)"></i>
|
|
|
+ <div class="d-header">
|
|
|
+ <ul class="tab-list">
|
|
|
+ <li @click="tabActive = item.id" :class="{active:tabActive === item.id}" v-for="(item,i) in langScenes.tabList" :key="i">
|
|
|
+ {{item.name}}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="tab-search">
|
|
|
+ <input
|
|
|
+ v-model="searchKey"
|
|
|
+ @keyup.enter="gotoSearch(searchKey)"
|
|
|
+ type="text"
|
|
|
+ :placeholder="langScenes.placeholder.searchID"
|
|
|
+ />
|
|
|
+ <i class="iconfont icon-sousuo" @click="gotoSearch(searchKey)"></i>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
<ul v-if="total" ref="ulMenu">
|
|
|
- <li v-for="(item,index) in myscene.list" :key="index">
|
|
|
- <div @click="((item.status === 1||item.status===-2)&&item.payStatus !== -2) && goto(item.webSite)" class="a-tap">
|
|
|
- <div class="share-btn" v-if="((item.status === 1||item.status===-2)&&item.payStatus !== -2)" @click.stop="handleShare(item)"></div>
|
|
|
- <div class="cooperation" v-if="item.cooperationUserName"><i class="iconfont icon-geren"></i><span>{{item.cooperationUserName}}</span></div>
|
|
|
- <div class="card-img" :style="{backgroundImage: `url(${getSceneImg(item)})`}"></div>
|
|
|
- <div class="loading-hover" v-if="item.status === 0">
|
|
|
- <div class="loading-icon">
|
|
|
- <span class="refreshing-loader"></span>
|
|
|
- <p>{{langScenes.share.calcule}}</p>
|
|
|
+ <template>
|
|
|
+ <li v-for="(item,index) in myscene.list" :key="index">
|
|
|
+ <div @click="((item.status === 1||item.status===-2)&&item.payStatus !== -2) && goto(item.webSite)" class="a-tap">
|
|
|
+ <div class="share-btn" v-if="((item.status === 1||item.status===-2)&&item.payStatus !== -2)" @click.stop="handleShare(item)"></div>
|
|
|
+ <div class="cooperation" v-if="item.cooperationUserName"><i class="iconfont icon-case_teamwork"></i><span>{{langScenes.user}}: {{item.cooperationUserName}}</span></div>
|
|
|
+ <div class="card-img" :style="{backgroundImage: `url(${getSceneImg(item)})`}"></div>
|
|
|
+ <div class="loading-hover" v-if="item.status === 0">
|
|
|
+ <div class="loading-icon">
|
|
|
+ <span class="refreshing-loader"></span>
|
|
|
+ <p>{{langScenes.share.calcule}}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div @click.stop class="loading-hover" v-if="item.payStatus === -2">
|
|
|
- <div class="loading-icon" style="width:100%">
|
|
|
- <p style="font-weight:bold;" v-html="langScenes.limit.insufficient"></p>
|
|
|
+ <div @click.stop class="loading-hover" v-if="item.payStatus === -2">
|
|
|
+ <div class="loading-icon" style="width:100%">
|
|
|
+ <p style="font-weight:bold;" v-html="langScenes.limit.insufficient"></p>
|
|
|
+ </div>
|
|
|
+ <p class="huifu" @click.stop="rechargeTip(item)">{{langScenes.limit.recharge}}</p>
|
|
|
</div>
|
|
|
- <p class="huifu" @click.stop="rechargeTip(item)">{{langScenes.limit.recharge}}</p>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="name" >
|
|
|
- <div class="title">{{item.sceneName}}</div>
|
|
|
- <div class="oper">
|
|
|
- <div @click="handleMenu(index)">
|
|
|
- <span class="spot"></span>
|
|
|
- </div>
|
|
|
- <ul v-if="ulActive === index">
|
|
|
- <li v-if="item.status === 1||item.status===-2" @click="gotoEdit(item)">{{langScenes.edit}}</li>
|
|
|
- <li @click="handleCooperation(item)">{{item.cooperationUserId?'取消协作':'分配协作'}}</li>
|
|
|
- <li v-if="item.status !== 0" @click="del(item)">{{langScenes.delete}}</li>
|
|
|
- </ul>
|
|
|
- <!-- <div v-if="item.status !== 0" @click="del(item)">
|
|
|
- <span >{{langScenes.delete}}</span>
|
|
|
+ <div class="name" >
|
|
|
+ <div class="title">{{item.sceneName}}</div>
|
|
|
+ <div class="oper">
|
|
|
+ <template v-if="tabActive===1">
|
|
|
+ <div @click="handleMenu(index)">
|
|
|
+ <span class="spot"></span>
|
|
|
+ </div>
|
|
|
+ <ul v-if="ulActive === index" :style="{minWidth: language==='en'?'150px': '90px'}">
|
|
|
+ <li v-if="item.status === 1||item.status===-2" @click="gotoEdit(item)">{{langScenes.edit}}</li>
|
|
|
+ <li @click="handleCooperation(item)" v-if="item.status === 1||item.status===-2">{{item.cooperationUserId?langScenes.qxfp:langScenes.fenpei}}</li>
|
|
|
+ <li v-if="item.status !== 0" @click="del(item)">{{langScenes.delete}}</li>
|
|
|
+ </ul>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="tabActive===2">
|
|
|
+ <div
|
|
|
+ class="b_default"
|
|
|
+ v-if="item.status === 1||item.status===-2"
|
|
|
+ @click="gotoEdit(item)">
|
|
|
+ <span>{{langScenes.edit}}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-if="item.status === 1||item.status===-2"
|
|
|
- class="primary"
|
|
|
- @click="gotoEdit(item)">
|
|
|
- <span>{{langScenes.edit}}</span>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span>{{langScenes.shooting}}</span>
|
|
|
- <span>{{item.createTime}}</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span>{{langScenes.id}}</span>
|
|
|
- <span>{{!deviceLogin?(item.snCode||item.childName):(cameradetail.snCode||cameradetail.childName)}}</span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
+ <div>
|
|
|
+ <span>{{langScenes.shooting}}</span>
|
|
|
+ <span>{{item.createTime}}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>{{langScenes.id}}</span>
|
|
|
+ <span>{{!deviceLogin?(item.snCode||item.childName):(cameradetail.snCode||cameradetail.childName)}}</span>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </template>
|
|
|
</ul>
|
|
|
<div class="scene-nothing" v-else>
|
|
|
<img :src="`${$cdn}images/nothing.png`" />
|
|
@@ -145,7 +157,8 @@ export default {
|
|
|
lheight: 480,
|
|
|
url: 'https://www.4dkankan.com/showProPC.html?m=KcMeJlOr8',
|
|
|
item: '',
|
|
|
- ulActive: ''
|
|
|
+ ulActive: '',
|
|
|
+ tabActive: 1
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -160,6 +173,9 @@ export default {
|
|
|
this.getList(newVal)
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ tabActive (newVal) {
|
|
|
+ this.currentPage === 1 ? this.getList() : this.currentPage = 1
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -230,11 +246,11 @@ export default {
|
|
|
})
|
|
|
let data = result.data
|
|
|
if (data.code === 0) {
|
|
|
- this.$toast.show('success', '取消协作成功', () => {
|
|
|
+ this.$toast.show('success', this.langToast['45'], () => {
|
|
|
this.getList()
|
|
|
})
|
|
|
} else {
|
|
|
- return this.$toast.show('warn', data.msg, () => {})
|
|
|
+ return this.$toast.show('warn', this.langToast[data.code], () => {})
|
|
|
}
|
|
|
} else {
|
|
|
this.$toast.showCooperation(item.num, () => {
|
|
@@ -368,9 +384,13 @@ export default {
|
|
|
searchKey: this.searchKey,
|
|
|
cameraType
|
|
|
}
|
|
|
- cameraId
|
|
|
- ? await this.$store.dispatch('getScanScene', params)
|
|
|
- : await this.$store.dispatch('getUserScene', params)
|
|
|
+ if (this.tabActive === 2) {
|
|
|
+ await this.$store.dispatch('getCooperationScene', params)
|
|
|
+ } else {
|
|
|
+ cameraId
|
|
|
+ ? await this.$store.dispatch('getScanScene', params)
|
|
|
+ : await this.$store.dispatch('getUserScene', params)
|
|
|
+ }
|
|
|
this.pageSize = this.myscene.pageSize
|
|
|
this.total = this.myscene.total || 0
|
|
|
},
|
|
@@ -406,6 +426,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+$theme-color: #1fe4dc;
|
|
|
+$font-color: #2d2d2d;
|
|
|
+
|
|
|
.huifu{
|
|
|
position: absolute;
|
|
|
bottom: 10px;
|
|
@@ -418,6 +441,49 @@ export default {
|
|
|
}
|
|
|
.scene-layout {
|
|
|
width: 100%;
|
|
|
+ margin-top: 30px;
|
|
|
+ .d-header{
|
|
|
+ margin-left: 40px;
|
|
|
+ height: 30px;
|
|
|
+ .tab-list{
|
|
|
+ display: inline-block;
|
|
|
+ li{
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 40px;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 1.5;
|
|
|
+ }
|
|
|
+ .active{
|
|
|
+ color: $theme-color;
|
|
|
+ border-bottom: 1px solid $theme-color;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tab-search{
|
|
|
+ float: right;
|
|
|
+ position: relative;
|
|
|
+ width: 230px;
|
|
|
+ padding-left: 10px;
|
|
|
+ margin-right: 120px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ display: flex;
|
|
|
+ .iconfont{
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ padding: 6px;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #e4e4e4;
|
|
|
+ }
|
|
|
+ input{
|
|
|
+ width: 100%;
|
|
|
+ font-size: 14px;
|
|
|
+ appearance: none;
|
|
|
+ line-height: 28px;
|
|
|
+ height: 28px;
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
> ul {
|
|
|
padding: 30px 0 0 40px;
|
|
|
> li {
|
|
@@ -533,7 +599,7 @@ export default {
|
|
|
min-width: 90px;
|
|
|
box-shadow:0px 1px 6px rgba(0,0,0,0.16);
|
|
|
>li{
|
|
|
- text-align: center;
|
|
|
+ text-align: left;
|
|
|
width: 100%;
|
|
|
line-height: 2.5;
|
|
|
padding: 0 10px;
|
|
@@ -543,35 +609,61 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .b_default{
|
|
|
+ display: inline-block;
|
|
|
+ background: #fff;
|
|
|
+ color: #000;
|
|
|
+ border: 1px solid #777;
|
|
|
+ border-radius: 2px;
|
|
|
+ font-size: 12px;
|
|
|
+ width: 52px;
|
|
|
+ height: 22px;
|
|
|
+ line-height: 22px;
|
|
|
+ text-align: center;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin-left: 4px;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+ cursor: pointer;
|
|
|
+ position: relative;
|
|
|
+ >span{
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ -webkit-transform: translate(-50%,-50%);
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .tab-search {
|
|
|
- float: right;
|
|
|
- position: relative;
|
|
|
- width: 230px;
|
|
|
- padding-left: 10px;
|
|
|
- border: 1px solid #ccc;
|
|
|
- top: -30px;
|
|
|
- right: 6vw;
|
|
|
- display: flex;
|
|
|
- .iconfont {
|
|
|
- width: 28px;
|
|
|
- height: 28px;
|
|
|
- padding: 6px;
|
|
|
- background: #e4e4e4;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- input {
|
|
|
- width: 100%;
|
|
|
- font-size: 14px;
|
|
|
- appearance: none;
|
|
|
- line-height: 28px;
|
|
|
- height: 28px;
|
|
|
- border: 0;
|
|
|
- }
|
|
|
- }
|
|
|
+ // .tab-search {
|
|
|
+ // float: right;
|
|
|
+ // position: relative;
|
|
|
+ // width: 230px;
|
|
|
+ // padding-left: 10px;
|
|
|
+ // border: 1px solid #ccc;
|
|
|
+ // top: -30px;
|
|
|
+ // right: 6vw;
|
|
|
+ // display: flex;
|
|
|
+ // .iconfont {
|
|
|
+ // width: 28px;
|
|
|
+ // height: 28px;
|
|
|
+ // padding: 6px;
|
|
|
+ // background: #e4e4e4;
|
|
|
+ // cursor: pointer;
|
|
|
+ // }
|
|
|
+ // input {
|
|
|
+ // width: 100%;
|
|
|
+ // font-size: 14px;
|
|
|
+ // appearance: none;
|
|
|
+ // line-height: 28px;
|
|
|
+ // height: 28px;
|
|
|
+ // border: 0;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
.scene-nothing {
|
|
|
width: 75%;
|
|
|
padding: 42px 0 210px 0;
|
|
@@ -805,8 +897,8 @@ export default {
|
|
|
@media screen and (max-width: 1400px){
|
|
|
.scene-layout {
|
|
|
width: 100%;
|
|
|
- ul {
|
|
|
- li {
|
|
|
+ > ul {
|
|
|
+ > li {
|
|
|
width: 265px;
|
|
|
margin-right: 35px;
|
|
|
.a-tap {
|
|
@@ -820,8 +912,8 @@ export default {
|
|
|
@media screen and (max-width: 1300px) {
|
|
|
.scene-layout {
|
|
|
width: 100%;
|
|
|
- ul {
|
|
|
- li {
|
|
|
+ > ul {
|
|
|
+ > li {
|
|
|
width: 240px;
|
|
|
margin-right: 10px;
|
|
|
.a-tap {
|