Commit 34239eb2 by 李伟康

v3.12.0需求

1 parent d69abfc1
<template>
<van-overlay
:show="show"
@click="$emit('update:value', false)"
z-index="99"
:lock-scroll="false"
>
<div class="image-wrapper">
<div
class="image-close"
@click="$emit('update:value', false)"
>
<img src="https://img01.glsx.com.cn/weapp/resource/scrm-mobile/psd/close.png">
</div>
<template v-if="text">
<div
class="text-box"
@click.stop
>
<div class="text-title flex">文字喜报</div>
<div
class="content"
v-html="text"
></div>
<van-button
block
round
color="#3975C6"
class="btn"
@click="$emit('update:value', false)"
>确定</van-button>
</div>
</template>
<template v-else>
<div
class="image-box"
@click.stop
>
<img :src="imageUrl" />
</div>
<div
class="image-tips flex"
@click.stop
>
<img src="https://img01.glsx.com.cn/weapp/resource/scrm-mobile/psd/longtap.png">
长按图片保存
</div>
</template>
</div>
</van-overlay>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'PaperDialog',
props: {
value: Boolean,
imageUrl: String,
text: String
},
data () {
return {
show: false
}
},
watch: {
value (n) {
this.show = n
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.image-wrapper {
user-select: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.image-close {
position: absolute;
width: 28px;
height: 28px;
right: 0;
top: -44px;
}
.image-box {
width: 279px;
height: 400px;
// max-height: 454px;
background: #ffffff;
border-radius: 6px 6px 0 0;
padding: 16px;
box-sizing: border-box;
overflow-y: scroll;
img {
height: auto;
// object-fit: contain;
}
}
.image-tips {
width: 279px;
height: 45px;
background: #f7f8fa;
border-radius: 0 0 6px 6px;
justify-content: center;
font-weight: 500;
font-size: 16px;
color: #3975c6;
transform: translateY(-1px);
img {
margin-right: 6px;
width: 20px;
height: 20px;
}
}
.text-box {
background-color: #fff;
width: 279px;
max-height: 457px;
background: #ffffff;
border-radius: 6px;
box-sizing: border-box;
padding-bottom: 20px;
.text-title {
font-weight: 500;
font-size: 16px;
color: #282829;
height: 52px;
justify-content: center;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
}
.content {
user-select: text;
padding: 16px;
box-sizing: border-box;
max-height: 320px;
overflow-y: scroll;
font-size: 14px;
line-height: 24px;
color: #666666ff;
}
.btn {
width: 247px !important;
margin: 24px auto 0;
height: 40px;
background: #3975c6;
border-radius: 21px;
font-weight: 600;
font-size: 16px;
letter-spacing: 1px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
title: '嘀加企微助手', title: '嘀加企微助手',
envVersion: 'trial', envVersion: 'trial',
request: { request: {
baseURL: '//scrm.test.glsx.com.cn', // 本地测试项目地址, baseURL: '//scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
</tab> </tab>
</div> </div>
<template v-if="flag"> <template v-if="flag">
<template v-if="list.length"> <scroll-view
<scroll-view class="list-box"
class="list-box" @ReachBottom="onReachBottom"
@ReachBottom="onReachBottom" ref="scrollView"
ref="scrollView" :disabledRefresh="false"
:disabledRefresh="false" @onRefresh="clearData"
@onRefresh="clearData" >
> <template v-if="list.length">
<div class="box"> <div class="box">
<template v-for="(i,index) in list"> <template v-for="(i,index) in list">
<div <div
...@@ -62,64 +62,36 @@ ...@@ -62,64 +62,36 @@
</template> </template>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
推送类型:<span>{{ { 推送类型:<span>{{ tabList[i.pushType] }}</span>
1:'早报',
2:'SA个人喜报',
3:'SA喜报',
4:'收款喜报',
}[i.pushType] }}</span>
<van-button <van-button
block block
round round
color="#3975C6" color="#3975C6"
class="bottom-btn" class="bottom-btn"
@click="handleViewImage(i.fileUrl)" @click="handleViewImage(i)"
>查看</van-button> >查看</van-button>
</div> </div>
</div> </div>
</template> </template>
</div> </div>
</scroll-view> </template>
</template> <template v-else>
<template v-else> <nothing
<nothing class="nothing-box"
class="nothing-box" image="https://img01.glsx.com.cn/weapp/resource/scrm-mobile/psd/list-nothing.png"
image="https://img01.glsx.com.cn/weapp/resource/scrm-mobile/psd/list-nothing.png" >暂无数据-</nothing>
>暂无数据-</nothing> </template>
</template> </scroll-view>
</template> </template>
<date-popup <date-popup
:value.sync="showDatePopup" :value.sync="showDatePopup"
@confirm="confirmDate" @confirm="confirmDate"
></date-popup> ></date-popup>
<van-overlay <paper-dialog
:show="showImagePreview" :value.sync="showImagePreview"
@click="showImagePreview = false" :imageUrl="imageUrl"
z-index="99" :text="text"
:lock-scroll="false" ></paper-dialog>
>
<div class="image-wrapper">
<div
class="image-close"
@click="showImagePreview = false"
>
<img src="https://img01.glsx.com.cn/weapp/resource/scrm-mobile/psd/close.png">
</div>
<div
class="image-box"
@click.stop
>
<img :src="imageUrl" />
</div>
<div
class="image-tips flex"
@click.stop
>
<img src="https://img01.glsx.com.cn/weapp/resource/scrm-mobile/psd/longtap.png">
长按图片保存
</div>
</div>
</van-overlay>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
...@@ -129,7 +101,7 @@ export default { ...@@ -129,7 +101,7 @@ export default {
name: 'paper', name: 'paper',
data () { data () {
return { return {
tabList: ['全部', '早报', 'SA个人喜报', 'SA喜报', '收款喜报'], tabList: ['全部', '早报', 'SA个人喜报', 'SA喜报', '收款喜报', '文字喜报'],
contentItem: [ contentItem: [
{ {
label: '推送时间', label: '推送时间',
...@@ -151,14 +123,15 @@ export default { ...@@ -151,14 +123,15 @@ export default {
params: { params: {
startTime: '', startTime: '',
endTime: '', endTime: '',
pushType: '',//早报(即战报)=1 SA个人喜报 = 2 SA喜 =3 收款喜报 = 4 pushType: '',//早报(即战报)=1 SA个人喜报 = 2 SA喜 =3 收款喜报 = 4 文字喜报 = 5
searchName: '', searchName: '',
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
}, },
total: 0, total: 0,
showImagePreview: false, showImagePreview: false,
imageUrl: '' imageUrl: '',
text: ''//文字喜报
} }
}, },
mounted () { mounted () {
...@@ -178,8 +151,13 @@ export default { ...@@ -178,8 +151,13 @@ export default {
} }
this.flag = true this.flag = true
}, },
handleViewImage (e) { handleViewImage ({
this.imageUrl = e pushType,
fileUrl,
text
}) {
if (pushType == 5) this.text = text
else this.imageUrl = fileUrl
this.$nextTick(() => { this.$nextTick(() => {
this.showImagePreview = true this.showImagePreview = true
}) })
...@@ -196,7 +174,7 @@ export default { ...@@ -196,7 +174,7 @@ export default {
this.clearData() this.clearData()
}, },
change (index) { change (index) {
const {pushType} = this.params const { pushType } = this.params
if (pushType == index || (pushType == '' && index == 0)) return if (pushType == index || (pushType == '' && index == 0)) return
this.params.pushType = index == 0 ? '' : index this.params.pushType = index == 0 ? '' : index
this.clearData() this.clearData()
...@@ -319,51 +297,8 @@ export default { ...@@ -319,51 +297,8 @@ export default {
} }
} }
.nothing-box { .nothing-box {
height: calc(100vh - 99px); height: calc(100vh - 100px);
} width: 100vw;
transform: translate(-16px, -10px);
.image-wrapper {
user-select: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.image-close {
position: absolute;
width: 28px;
height: 28px;
right: 0;
top: -44px;
}
.image-box {
width: 279px;
height: 400px;
// max-height: 454px;
background: #ffffff;
border-radius: 6px 6px 0 0;
padding: 16px;
box-sizing: border-box;
overflow-y: scroll;
img {
height: auto;
// object-fit: contain;
}
}
.image-tips {
width: 279px;
height: 45px;
background: #f7f8fa;
border-radius: 0 0 6px 6px;
justify-content: center;
font-weight: 500;
font-size: 16px;
color: #3975c6;
transform: translateY(-1px);
img {
margin-right: 6px;
width: 20px;
height: 20px;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!