Commit 62934791 authored by sheng du's avatar sheng du
Browse files

接口调试完成

parent 3c9d27de
......@@ -176,7 +176,50 @@ export default {
...data,
});
},
//根据意见ID获取所有跟进情况记录
getCplComplaintReplyByCPLID(data) {
return http.post('/home/hps/curl', {
uri: 'getCplComplaintReplyByCPLID',
...data,
});
},
//获取等待审批的意见跟进记录
GetCPRWaitForApproval(data) {
return http.post('/home/hps/curl', {
uri: 'GetCPRWaitForApproval',
...data,
});
},
//意见跟进审批
ApprovalCPRByHPSUser(data) {
return http.post('/home/hps/curl', {
uri: 'ApprovalCPRByHPSUser',
...data,
});
},
//意见完结
CompleteCPLByHPSUser(data) {
return http.post('/home/hps/curl', {
uri: 'CompleteCPLByHPSUser',
...data,
});
},
//获取可以跟进意见的组别(转派意见时可以接受的组别)
GetHPSGroupsCanFollowCPL(data) {
return http.post('/home/hps/curl', {
uri: 'GetHPSGroupsCanFollowCPL',
...data,
});
},
//意见转组别)
AssignCPLOtherGroup(data) {
return http.post('/home/hps/curl', {
uri: 'AssignCPLOtherGroup',
...data,
});
},
// /**
// * 获取用户信息
......
......@@ -146,30 +146,39 @@
formData: {},
success: (uploadFileRes) => {
// uni.hideLoading();
// console.log(uploadFileRes);
const res = JSON.parse(uploadFileRes.data);
console.log(res);
if (res.status == 200) {
if (res.show_data[0]?.full_url) {
// console.log(res.show_data[0].full_url);
this.files = [...this.files, res.show_data[0].full_url];
// console.log(this.files);
let jsonData = uploadFileRes.data.replace(/\\/g, '')
try {
let res = JSON.parse(jsonData)
console.log(res);
if (res.status == 200) {
if (res.show_data[0]?.full_url) {
// console.log(res.show_data[0].full_url);
this.files = [...this.files, res.show_data[0].full_url];
// console.log(this.files);
}
// if (index !== '') {
// this.$set(this.fileUrl, index, res.data.imgUrlList);
// } else {
// this.fileUrl.push(res.data.imgUrlList)
// console.log(this.fileUrl)
// }
// this.$emit('change', this.fileUrl);
} else {
uni.showToast({
icon: 'none',
title: res.message,
duration: 2000
});
}
// if (index !== '') {
// this.$set(this.fileUrl, index, res.data.imgUrlList);
// } else {
// this.fileUrl.push(res.data.imgUrlList)
// console.log(this.fileUrl)
// }
// this.$emit('change', this.fileUrl);
} else {
uni.showToast({
icon: 'none',
title: res.message,
duration: 2000
});
} catch (e) {
let str = jsonData.match(/full_url":"(\S*)"}/)[1];
this.files = [...this.files, str];
//TODO handle the exception
}
},
complete: (over) => {
// var overdata = JSON.parse(over.data)
......
......@@ -17,7 +17,7 @@
"path": "pages/opinion/list",
"style": {
"navigationBarTitleText": "意见列表",
"enablePullDownRefresh": true
"enablePullDownRefresh": true
}
},
{
......@@ -64,52 +64,50 @@
"enablePullDownRefresh": false
}
}, {
"path": "pages/follow/followDetail",
"style": {
"navigationBarTitleText": "跟进详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/opinion/addNew",
"style": {
"navigationBarTitleText": "新增意见",
"enablePullDownRefresh": false
}
}, {
"path": "pages/opinion/opinionSuccess",
"style": {
"navigationBarTitleText": "提交成功",
"enablePullDownRefresh": false
}
}, {
"path": "pages/opinion/checkList",
"style": {
"navigationBarTitleText": "审批列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/opinion/edit",
"style": {
"navigationBarTitleText": "编辑意见",
"enablePullDownRefresh": false
}
},
{
"path": "pages/opinion/checkDetail",
"style": {
"navigationBarTitleText": "审批详情",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/follow/followDetail",
"style" :
{
"navigationBarTitleText": "跟进详情",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/opinion/addNew",
"style" :
{
"navigationBarTitleText": "新增意见",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/opinion/opinionSuccess",
"style" :
{
"navigationBarTitleText": "提交成功",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/opinion/checkList",
"style" :
{
"navigationBarTitleText": "审批列表",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/opinion/edit",
"style" :
{
"navigationBarTitleText" : "编辑意见",
"enablePullDownRefresh" : false
}
}
],
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "hehuangApp",
......
<template>
<view class="page full">
<view class="header">
<view class="flex-between head">
<view class="code">參考編號:CPL202309250001</view>
<text class="status">待跟進</text>
</view>
<view class="flex level-line">
<view class="level pub-tag warning">紧急</view>
<view class="level pub-tag">一般</view>
<view class="level pub-tag success">不紧急</view>
<view class="pub-tag success">非住客投诉</view>
</view>
</view>
<view class="pub-card">
<view class="card-title">职员跟进</view>
<view class="step">
<view class="step-item" v-for="(item,index) in stepList" :key="index">
<view class="step-item-content">
<view class="">跟進時間:2023-05-23  30:53:34</view>
<view class="">跟進人:張三</view>
<view class="text-primary" v-if="index==0">審批狀態:待審批</view>
<view class="text-primary" v-if="index==1">審批狀態:审批通过</view>
<view class="text-danger" v-if="index==2">審批狀態:审批不通过</view>
<view class="text-danger" v-if="index==2">未通过原因:原因原因原因原因原因原因原因原因</view>
<view class="flex-between">
<text>跟進內容</text>
<view class="pub-btn" v-if="index == 0">修改跟进</view>
</view>
<view class="follow-content">
<view class="card-content">
<view class="label">意见类别:</view>
<view class="content">A清洁</view>
</view>
<view class="card-content">
<view class="label">內容:</view>
<view class="content">
文本內容内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本
</view>
</view>
<view class="card-content">
<view class="label">憑證:</view>
<view class="card-file">
<view class="left flex-items-center">
<image src="@/static/images/file.png" style="width: 69rpx;height: 57rpx"
mode=""></image>
<view class="msg">
<view class="name">意見圖片.png</view>
<view class="size">4.1M</view>
</view>
</view>
<view class="pre-view">预览</view>
</view>
</view>
<view class="card-content">
<view class="label">是否可見</view>
<view class="content"></view>
</view>
<view class="card-content">
<view class="label">建議回復日期</view>
<view class="content">2023-05-23  30:53:34</view>
</view>
<view class="card-content">
<view class="label">前台顯示</view>
<view class="content"></view>
</view>
<view class="card-content">
<view class="label">前台內容</view>
<view class="content">文本內容内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容</view>
</view>
</view>
</view>
</view>
<!-- <view class="step-item"></view>
<view class="step-item"></view> -->
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
stepList: [{}, {}, {}]
}
},
methods: {
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.page {
min-height: calc(100vh - 88rpx);
overflow-y: auto;
padding-bottom: 120rpx;
}
.header {
background-color: #fff;
padding: 26rpx 36rpx;
border-top: 1px solid @uni-border-color;
}
.head {
height: 40rpx;
.code {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.status {
font-size: 24rpx;
color: @uni-color-primary;
}
}
.level-line {
padding-top: 10rpx;
.level {
margin-right: 18rpx;
}
}
.step {
padding-left: 48rpx;
}
.step-item {
min-height: 200rpx;
border-left: 1px solid #32BAEC;
position: relative;
padding-left: 32rpx;
box-sizing: border-box;
padding-right: 22rpx;
.step-item-content {
// margin-top: -30rpx;
font-size: 28rpx;
line-height: 60rpx;
transform: translateY(-10px);
}
&:before {
content: '';
position: absolute;
display: block;
left: -8rpx;
top: 0;
width: 16rpx;
height: 16rpx;
background: #32BAEC;
border-radius: 50%;
}
&:last-child {
border-left: none;
}
}
.follow-content {
width: 100%;
padding-left: 28rpx;
border-radius: 16rpx;
background: #F7F7F7;
box-sizing: border-box;
margin-top: 12rpx;
padding-bottom: 12rpx;
.card-content {
padding-left: 0;
padding-top: 10rpx;
// flex-wrap: nowrap;
}
.label {
width: 200rpx;
flex-shrink: 0;
}
.content {
// width: 100%;
width: 370rpx;
}
}
<template>
<view class="page full">
<view class="header">
<view class="flex-between head">
<view class="code">參考編號:{{detail.cpl_cplid}}</view>
<text class="status">{{$utils.getDictName('cpl_status',detail.cpl_status)}}</text>
</view>
<view class="flex level-line">
<view class="level pub-tag "
:class="detail.cpl_priority == 'H'? 'warning' : detail.cpl_priority == 'L' ? 'success' : ''">
{{$utils.getDictName('cpl_priority',detail.cpl_priority)}}
</view>
<view class="pub-tag success" v-if="!detail.cpl_otpid">非住客投诉</view>
</view>
</view>
<view class="pub-card">
<view class="card-title">职员跟进</view>
<view class="step">
<view class="step-item" v-for="(item,index) in stepList" :key="index">
<view class="step-item-content">
<view class="">跟進時間:{{item.cpr_createdate}}</view>
<!-- <view class="">跟進人:張三</view> -->
<view class="text-primary" v-if="item.cpr_cmsstatus=='P'">審批狀態:待審批</view>
<view class="text-primary" v-if="item.cpr_cmsstatus=='A'">審批狀態:审批通过</view>
<view class="text-danger" v-if="item.cpr_cmsstatus=='R'">審批狀態:审批不通过</view>
<!-- <view class="text-danger" v-if="index==2">未通过原因:原因原因原因原因原因原因原因原因</view> -->
<view class="flex-between">
<text>跟進內容</text>
<!-- <view class="pub-btn" v-if="index == 0">修改跟进</view> -->
</view>
<view class="follow-content">
<view class="card-content">
<view class="label">意見来源</view>
<view class="content">{{$utils.getDictName('cpl_method',item.cpr_method)}}</view>
</view>
<view class="card-content">
<view class="label">內容:</view>
<view class="content">
{{item.cpr_content}}
</view>
</view>
<!-- <view class="card-content">
<view class="label">憑證:</view>
<view class="card-file">
<view class="left flex-items-center">
<image src="@/static/images/file.png" style="width: 69rpx;height: 57rpx"
mode=""></image>
<view class="msg">
<view class="name">意見圖片.png</view>
<view class="size">4.1M</view>
</view>
</view>
<view class="pre-view">预览</view>
</view>
</view> -->
<view class="card-content">
<view class="label">是否可見</view>
<view class="content">{{item.cpr_confidential =='Y'?'':''}}</view>
</view>
<!-- <view class="card-content">
<view class="label">建議回復日期</view>
<view class="content">{{item.cpr_deadline}}</view>
</view> -->
<view class="card-content">
<view class="label">前台顯示</view>
<view class="content">{{item.cpr_fedisplay =='Y'?'':''}}</view>
</view>
<view class="card-content">
<view class="label">前台內容</view>
<view class="content">{{item.cpr_contentcms}}</view>
</view>
</view>
</view>
</view>
<!-- <view class="step-item"></view>
<view class="step-item"></view> -->
</view>
</view>
</view>
</template>
<script>
import config from '@/config';
import api from '@/api'
export default {
data() {
return {
stepList: [],
detail: {}
}
},
onLoad(options) {
let {
id
} = options
if (id) {
this.id = id
}
// getCplComplaintByCPLID
},
onShow() {
if (this.id) {
this.getDetail()
this.getCplComplaintReplyByCPLID()
}
},
methods: {
async getDetail() {
let res = await api.main.getCplComplaintByCPLID({
project_id: uni.getStorageSync('projectId'),
lang: config.lang,
cpl_cplid: this.id
})
if (res.show_data && res.show_data[0]) {
let detail = res.show_data[0]
this.detail = {
...detail,
}
}
},
async getCplComplaintReplyByCPLID() {
let res = await api.main.getCplComplaintReplyByCPLID({
project_id: uni.getStorageSync('projectId'),
lang: config.lang,
cpl_cplid: this.id
})
if (res.show_data && res.show_data) {
// console.log(res.show_data);
this.stepList = [...res.show_data]
}
},
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.page {
min-height: calc(100vh - 88rpx);
overflow-y: auto;
padding-bottom: 120rpx;
}
.header {
background-color: #fff;
padding: 26rpx 36rpx;
border-top: 1px solid @uni-border-color;
}
.head {
height: 40rpx;
.code {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.status {
font-size: 24rpx;
color: @uni-color-primary;
}
}
.level-line {
padding-top: 10rpx;
.level {
margin-right: 18rpx;
}
}
.step {
padding-left: 48rpx;
}
.step-item {
min-height: 200rpx;
border-left: 1px solid #32BAEC;
position: relative;
padding-left: 32rpx;
box-sizing: border-box;
padding-right: 22rpx;
.step-item-content {
// margin-top: -30rpx;
font-size: 28rpx;
line-height: 60rpx;
transform: translateY(-10px);
}
&:before {
content: '';
position: absolute;
display: block;
left: -8rpx;
top: 0;
width: 16rpx;
height: 16rpx;
background: #32BAEC;
border-radius: 50%;
}
&:last-child {
border-left: none;
}
}
.follow-content {
width: 100%;
padding-left: 28rpx;
border-radius: 16rpx;
background: #F7F7F7;
box-sizing: border-box;
margin-top: 12rpx;
padding-bottom: 12rpx;
.card-content {
padding-left: 0;
padding-top: 10rpx;
// flex-wrap: nowrap;
}
.label {
width: 200rpx;
flex-shrink: 0;
}
.content {
// width: 100%;
width: 370rpx;
}
}
</style>
\ No newline at end of file
<template>
<view class="page full">
<view class="top flex-col flex-items-center">
<image src="../../static/images/success.png" style="width: 154rpx; height: 154rpx;" mode=""></image>
<view class="top-title">跟進提交成功</view>
<view class="top-info">進提交成功,等待管理員審核!</view>
<view class="btns-box flex-between">
<view class="pub-btn plain info" @click="pageBack">返回</view>
<view class="pub-btn" @click="toFollorInfo">跟进详情</view>
</view>
</view>
<view class="pub-card">
<view class="card-title">跟进信息</view>
<view class="card-content">
<view class="label">意見類別</view>
<view class="content">公共設施</view>
</view>
<view class="card-content">
<view class="label">內容</view>
<view class="content">
文本內容内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容
</view>
</view>
<view class="card-content">
<view class="label">意見憑證</view>
<view class="card-file">
<view class="left flex-items-center">
<image src="@/static/images/file.png" style="width: 69rpx;height: 57rpx" mode=""></image>
<view class="msg">
<view class="name">意見圖片.png</view>
<view class="size">4.1M</view>
</view>
</view>
<view class="pre-view">预览</view>
</view>
</view>
<view class="card-content">
<view class="label">是否可見</view>
<view class="content"></view>
</view>
<view class="card-content">
<view class="label">建議回復日期</view>
<view class="content">2023-05-23  30:53:34</view>
</view>
<view class="card-content">
<view class="label">前台顯示</view>
<view class="content"></view>
</view>
<view class="card-content">
<view class="label">前台內容</view>
<view class="content">文本內容内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
pageBack() {
uni.navigateBack()
},
toFollorInfo() {
uni.redirectTo({
url: '/pages/follow/followDetail'
})
},
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.page {
padding-bottom: 50rpx;
}
.top {
padding-top: 107rpx;
.top-title {
font-size: 32rpx;
padding-top: 29rpx;
}
.top-info {
font-size: 26rpx;
padding-top: 26rpx;
}
}
.btns-box {
width: 470rpx;
padding-top: 85rpx;
padding-bottom: 50rpx;
}
.pub-btn {
min-width: 190rpx;
}
// .pub-card .card-content{
// color: #999;
// }
// .pub-card .card-content .content {
// color: #999;
// }
<template>
<view class="page full">
<view class="top flex-col flex-items-center">
<image src="../../static/images/success.png" style="width: 154rpx; height: 154rpx;" mode=""></image>
<view class="top-title">跟進提交成功</view>
<view class="top-info">進提交成功,等待管理員審核!</view>
<view class="btns-box flex-between">
<view class="pub-btn plain info" @click="pageBack">返回</view>
<view class="pub-btn" @click="toFollorInfo">跟进详情</view>
</view>
</view>
<view class="pub-card">
<view class="card-title">跟进信息</view>
<view class="card-content">
<view class="label">意見来源</view>
<view class="content">{{$utils.getDictName('cpl_method',detail.cpr_method)}}</view>
</view>
<view class="card-content">
<view class="label">內容</view>
<view class="content">
{{detail.cpr_content}}
</view>
</view>
<!-- <view class="card-content">
<view class="label">意見憑證</view>
<view class="card-file">
<view class="left flex-items-center">
<image src="@/static/images/file.png" style="width: 69rpx;height: 57rpx" mode=""></image>
<view class="msg">
<view class="name">意見圖片.png</view>
<view class="size">4.1M</view>
</view>
</view>
<view class="pre-view">预览</view>
</view>
</view> -->
<view class="card-content">
<view class="label">是否可見</view>
<view class="content">{{detail.cpr_confidential =='Y'?'':''}}</view>
</view>
<view class="card-content">
<view class="label">建議回復日期</view>
<view class="content">{{detail.cpr_deadline}}</view>
</view>
<view class="card-content">
<view class="label">前台顯示</view>
<view class="content">{{detail.cpr_fedisplay =='Y'?'':''}}</view>
</view>
<view class="card-content">
<view class="label">前台內容</view>
<view class="content">{{detail.cpr_contentcms}}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: ''
}
},
onLoad(option) {
this.detail = uni.getStorageSync('followSuccessData')
const {
id
} = option
if (id && id != 'undefind') {
this.id = id
}
},
methods: {
pageBack() {
uni.navigateBack()
},
toFollorInfo() {
uni.redirectTo({
url: `/pages/follow/followDetail?id=${this.id}`
})
},
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.page {
padding-bottom: 50rpx;
}
.top {
padding-top: 107rpx;
.top-title {
font-size: 32rpx;
padding-top: 29rpx;
}
.top-info {
font-size: 26rpx;
padding-top: 26rpx;
}
}
.btns-box {
width: 470rpx;
padding-top: 85rpx;
padding-bottom: 50rpx;
}
.pub-btn {
min-width: 190rpx;
}
// .pub-card .card-content{
// color: #999;
// }
// .pub-card .card-content .content {
// color: #999;
// }
</style>
\ No newline at end of file
......@@ -30,6 +30,9 @@
<checkbox value="cb" checked="true" style="transform:scale(0.7)" />
<text>已阅读并同意<text class="parmary-text">用户协议</text></text>
</view>
<view class="flex flex-items-center agreement">
<text class="parmary-text" @click="reSelect">重新选择物业</text>
</view>
</view>
</template>
......@@ -38,9 +41,11 @@
export default {
data() {
return {
username: 'kungchitak',
// username: 'kungchitak',
// username: 'eleung',
password: '123456'
// password: '123456'
username: '',
password: ''
}
},
methods: {
......@@ -89,6 +94,13 @@
}
})
},
reSelect() {
uni.clearStorage()
uni.reLaunch({
url: '/pages/login/property/property'
})
},
}
}
</script>
......
......@@ -157,7 +157,6 @@
project: uni.getStorageSync('project'),
form: {
nature: 1,
phase_id: '',
zone_id: '',
block_id: '',
......@@ -189,6 +188,13 @@
unit_id: [],
cpl_otpid: [],
},
address: {
apt_phadesc: '',
apt_zondesc: '',
apt_blkdesc: '',
apt_floor: '',
apt_flat: '',
},
}
},
......@@ -212,8 +218,10 @@
},
},
onLoad() {
this.getPhaseList()
this.init()
},
onShow() {},
// 6、获取小区下面的期(getPhaseList) 4
// 7、获取期下面的园(getZoneList) 4
......@@ -221,8 +229,27 @@
// 9、获取楼栋下面的楼层列表(getFloorList) 5
// 10、获取楼层的房屋列表(getUnitList) 5
methods: {
async getPhaseList() {
init() {
let resetForm = {}
for (let key in this.form) {
resetForm[key] = ''
}
resetForm.nature = 1
let resetOptions = {}
for (let key in this.options) {
resetOptions[key] = []
}
this.form = {
...resetForm
}
this.options = {
...resetOptions
}
this.getPhaseList()
},
async getPhaseList(val) {
this.resetSelect(['cpl_otpid', 'unit_id', 'floor_id', 'block_id', 'zone_id', 'phase_id'])
let res = await api.main.getPhaseList({
project_id: uni.getStorageSync('projectId'),
......@@ -233,6 +260,7 @@
},
async getZoneList(val) {
this.address.apt_phadesc = val.label
this.resetSelect(['cpl_otpid', 'unit_id', 'floor_id', 'block_id', 'zone_id'])
let res = await api.main.getZoneList({
......@@ -243,8 +271,8 @@
this.options.zone_id = this.typeToFilter(res.show_data, 'zone_id', 'zone_name')
},
async getBlockList() {
async getBlockList(val) {
this.address.apt_zondesc = val.label
this.resetSelect(['cpl_otpid', 'unit_id', 'floor_id', 'block_id'])
let res = await api.main.getBlockList({
project_id: uni.getStorageSync('projectId'),
......@@ -255,8 +283,8 @@
this.options.block_id = this.typeToFilter(res.show_data, 'block_id', 'block_name')
},
async getFloorList() {
async getFloorList(val) {
this.address.apt_blkdesc = val.label
this.resetSelect(['cpl_otpid', 'unit_id', 'floor_id'])
let res = await api.main.getFloorList({
project_id: uni.getStorageSync('projectId'),
......@@ -270,8 +298,8 @@
async getUnitList() {
async getUnitList(val) {
this.address.apt_floor = val.label
this.resetSelect(['cpl_otpid', 'unit_id'])
let res = await api.main.getUnitList({
project_id: uni.getStorageSync('projectId'),
......@@ -284,7 +312,8 @@
this.options.unit_id = this.typeToFilter(res.show_data, 'unit_id', 'unit_name')
},
async getUnitOwnerAccountList() {
async getUnitOwnerAccountList(val) {
this.address.apt_flat = val.label
this.resetSelect(['cpl_otpid'])
let res = await api.main.getUnitOwnerAccountList({
project_id: uni.getStorageSync('projectId'),
......@@ -481,6 +510,11 @@
title: '新增成功'
})
setTimeout(() => {
uni.setStorageSync('opinionSuccessData', {
...datas,
...this.address
})
this.toSuccess(res.show_data.cpl_id)
}, 600)
}
......@@ -489,8 +523,8 @@
},
toSuccess(id) {
uni.navigateTo({
url: `/pages/opinion/opinionSuccess?id=${id}`
uni.redirectTo({
url: `/pages/opinion/opinionSuccess?id=${id}`
})
},
}
......
<template>
<view class="page">
<view class="header">
<view class="flex-between head">
<view class="code">參考編號:{{detail.cpl_cplid}}</view>
<!-- <text class="status">{{$utils.getDictName('cpl_status',detail.cpl_status)}}</text> -->
<text class="status">待审批</text>
</view>
<view class="flex level-line">
<!-- <view class="level pub-tag warning">紧急</view> -->
<!-- <view class="level pub-tag">一般</view> -->
<!-- <view class="level pub-tag success">不紧急</view> -->
<view class="level pub-tag "
:class="detail.cpl_priority == 'H'? 'warning' : detail.cpl_priority == 'L' ? 'success' : ''">
{{$utils.getDictName('cpl_priority',detail.cpl_priority)}}
</view>
<view class="pub-tag success" v-if="!detail.cpl_otpid">非住客投诉</view>
</view>
</view>
<view class="pub-card">
<view class="card-title">新增意见</view>
<view class="card-content">
<view class="label">意见内容</view>
<view class="content">{{detail.cpl_content}}</view>
</view>
<view class="card-content">
<view class="label">意见凭证</view>
<view class="card-file" v-for="(item,index) in detail.fileList">
<view class="left flex-items-center">
<image src="../../static/images/file.png" style="width: 69rpx;height: 57rpx" mode=""></image>
<view class="msg">
<view class="name">{{$utils.getUrlFileName(item)}}</view>
<!-- <view class="size">4.1M</view> -->
</view>
</view>
<view class="pre-view" @click="$utils.preViewImg(item)">预览</view>
</view>
</view>
<view class="card-content">
<view class="label">投诉人</view>
<view class="content">{{detail.cpl_name}}</view>
</view>
<view class="card-content">
<view class="label">聯繫電話</view>
<view class="content">{{detail.cpl_contacttel}}</view>
</view>
<view class="card-content">
<view class="label">電郵地址</view>
<view class="content">{{detail.cpl_usremail}}</view>
</view>
</view>
<view class="pub-card">
<view class="card-title">职员跟进</view>
<view class="card-content">
<view class="label">意見来源</view>
<view class="content">{{$utils.getDictName('cpl_method',cpr_detail.cpr_method)}}</view>
</view>
<view class="card-content">
<view class="label">內容:</view>
<view class="content">
{{cpr_detail.cpr_content}}
</view>
</view>
<!-- <view class="card-content">
<view class="label">憑證:</view>
<view class="card-file">
<view class="left flex-items-center">
<image src="@/static/images/file.png" style="width: 69rpx;height: 57rpx"
mode=""></image>
<view class="msg">
<view class="name">意見圖片.png</view>
<view class="size">4.1M</view>
</view>
</view>
<view class="pre-view">预览</view>
</view>
</view> -->
<view class="card-content">
<view class="label">是否可見</view>
<view class="content">{{cpr_detail.cpr_confidential =='Y'?'':''}}</view>
</view>
<!-- <view class="card-content">
<view class="label">建議回復日期</view>
<view class="content">{{cpr_detail.cpr_deadline}}</view>
</view> -->
<view class="card-content">
<view class="label">前台顯示</view>
<view class="content">{{cpr_detail.cpr_fedisplay =='Y'?'':''}}</view>
</view>
<view class="card-content">
<view class="label">前台內容</view>
<view class="content">{{cpr_detail.cpr_contentcms}}</view>
</view>
</view>
<!-- 审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况 -->
<!-- <view class="pub-card">
<view class="card-title">审批情况</view>
<view class="step">
<view class="step-item">
<view class="step-item-content">
<view class="">2023-05-23  30:53:34</view>
<view class="">張三提交了跟進,待審批</view>
</view>
</view>
<view class="step-item">
<view class="step-item-content">
<view class="">2023-05-23  30:53:34</view>
<view class="">跟進審批未通過</view>
<view class="">操作人:李四</view>
<view class="">未通過原因:文字文字文字</view>
</view>
</view>
<view class="step-item"></view>
<view class="step-item"></view>
</view>
</view> -->
<view class="page-bottom-btns">
<view class="btn pub-btn" @click="checkOpen('A')">审批通过</view>
<view class="btn pub-btn plain" @click="checkOpen('R')">审批不通过</view>
</view>
<!-- 输入框示例 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" :mode="form.cpr_cmsstatus == 'A' ? 'base' : 'input'"
:title="form.cpr_cmsstatus == 'A' ? '审批通过' : '审批不通过'" content="确认审批通过吗?" value="" placeholder="请输入不通过原因"
@confirm="dialogInputConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import PubPicker from '@/components/PubPicker/PubPicker.vue'
import FileUploader from '@/components/FileUploader/FileUploader.vue'
import config from '@/config';
import api from '@/api'
import dayjs from 'dayjs'
export default {
components: {
PubPicker,
FileUploader
},
data() {
return {
cpl_cplid: '',
cpr_cprid: '',
userInfo: uni.getStorageSync('userInfo'),
fileList: [],
detail: {},
cpr_detail: {},
form: {
cpr_cmsstatus: 'A'
}
}
},
computed: {
ranges() {
const cpl_method = uni.getStorageSync('cpl_method') || []
return {
cpl_method: cpl_method.filter(item => item.value),
cpr_confidential: [{
label: '',
value: 'Y'
}, {
label: '',
value: 'N'
}],
cpr_fedisplay: [{
label: '',
value: 'Y'
}, {
label: '',
value: 'N'
}]
}
},
},
onLoad(options) {
let {
cpl_cplid,
cpr_cprid
} = options
if (cpl_cplid) {
this.cpl_cplid = cpl_cplid
}
if (cpr_cprid) {
this.cpr_cprid = cpr_cprid
}
// getCplComplaintByCPLID
},
onShow() {
if (this.cpl_cplid) {
this.getDetail()
this.getCplComplaintReplyByCPLID()
}
},
methods: {
async getDetail() {
let res = await api.main.getCplComplaintByCPLID({
project_id: uni.getStorageSync('projectId'),
lang: config.lang,
cpl_cplid: this.cpl_cplid
})
if (res.show_data && res.show_data[0]) {
let detail = res.show_data[0]
console.log(detail);
let fileList = [detail.cpl_img_path1, detail.cpl_img_path2, detail.cpl_img_path3, detail
.cpl_img_path4, detail.cpl_img_path5
]
this.detail = {
...detail,
fileList: fileList.filter(item => item)
}
}
},
async getCplComplaintReplyByCPLID() {
let res = await api.main.getCplComplaintReplyByCPLID({
project_id: uni.getStorageSync('projectId'),
lang: config.lang,
cpl_cplid: this.cpl_cplid
})
if (res.show_data && res.show_data) {
let findItem = res.show_data.find(item => item.cpr_cprid == this.cpr_cprid)
this.cpr_detail = findItem
// if (findItem) {
// this.canOver = true
// }
// // console.log(res.show_data);
// this.stepList = [...res.show_data]
}
},
checkOpen(val) {
this.form.cpr_cmsstatus = val
this.$refs.inputDialog.open()
},
dialogInputConfirm(val) {
let userInfo = uni.getStorageSync('userInfo');
const datas = {
project_id: uni.getStorageSync('projectId'),
HPSUser_id: userInfo.stf_usrid,
cpr_cprid: this.cpr_cprid,
cpr_cplid: this.cpl_cplid,
cpr_cmsstatus: this.form.cpr_cmsstatus
}
api.main.ApprovalCPRByHPSUser(datas).then(res => {
if (res) {
uni.showToast({
title: '审批成功'
})
setTimeout(() => {
uni.navigateBack(-1)
}, 600)
}
})
},
// ApprovalCPRByHPSUser
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.page {
min-height: calc(100vh - 88rpx);
overflow-y: auto;
padding-bottom: 120rpx;
}
.header {
background-color: #fff;
padding: 26rpx 36rpx;
border-top: 1px solid @uni-border-color;
}
.head {
height: 40rpx;
.code {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.status {
font-size: 24rpx;
color: @uni-color-primary;
}
}
.level-line {
padding-top: 10rpx;
.level {
margin-right: 18rpx;
}
}
.step {
padding-left: 48rpx;
}
.step-item {
min-height: 200rpx;
border-left: 1px solid #32BAEC;
position: relative;
padding-left: 32rpx;
box-sizing: border-box;
padding-right: 22rpx;
.step-item-content {
// margin-top: -30rpx;
font-size: 28rpx;
line-height: 60rpx;
transform: translateY(-10px);
}
&:before {
content: '';
position: absolute;
display: block;
left: -8rpx;
top: 0;
width: 16rpx;
height: 16rpx;
background: #32BAEC;
border-radius: 50%;
}
&:last-child {
border-left: none;
}
}
.page-bottom-btns .btn {
height: 60rpx;
border-radius: 30rpx;
padding: 0 24rpx;
font-size: 24rpx;
margin-right: 20rpx;
}
</style>
\ No newline at end of file
<template>
<view class="page">
<view class="filters flex">
<view class="filter-item flex-items-center" :class="filterValue == item.value? 'active' :''"
v-for="(item,index) in filters" :key="index" @click="chaneSelect(item)">
<text>{{item.label}}</text>
</view>
</view>
<view class="list" ref="list">
<scroll-view :scroll-top="scrollTop" scroll-y class="scroll-Y" scroll-with-animation :style="'height:100%'">
<view class="opinion" v-for="(item,index) in 6" :key="index" :id="'index'+index"
@click="toDetail(item)">
<view class="flex-between head">
<view class="code">參考編號:CPL202309250001</view>
<view class="right flex-items-center">
<text class="status">待跟進</text>
<image src="../../static/images/back.png" style="width: 32rpx;height: 32rpx;" mode="">
</image>
</view>
</view>
<view class="flex level-line">
<view class="level pub-tag warning">紧急</view>
<view class="room" v-if="index == 0">一期-8幢2單元座 6樓XXXX</view>
<view class="pub-tag success" v-else>非住客投诉</view>
</view>
<view class="content">曬台不知道在做什麼,還打了洞,架了管道,馬服務業看架了管道···</view>
<view class="flex-between bottom">
<view class="pub-tag plain">公共设施</view>
<view class="time">2023-06-28 15:25:12</view>
</view>
</view>
<!-- <div class="bottom-block" style="width: 100%;height: 180rpx;"></div> -->
</scroll-view>
</view>
</view>
</template>
<script>
import MaskSelecter from '@/components/MaskSelecter/MaskSelecter.vue'
export default {
components: {
MaskSelecter
},
data() {
return {
value: '',
scrollTop: 0,
filterValue: 4,
list: []
}
},
computed: {
filters() {
return [{
label: '待审批',
value: 1,
}, {
label: '已通過',
value: 2,
}, {
label: '未通過',
value: 3,
}, {
label: '全部',
value: 4,
}]
},
},
onLoad() {
this.$nextTick(() => {
// console.log();
// this.listHeight = this.$refs.list?.$el.clientHeight || 573
})
},
methods: {
toDetail(item) {
uni.navigateTo({
url: `/pages/opinion/detail?id=${item.id || 1}`
})
},
chaneSelect(item) {
this.filterValue = item.value
}
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.page {
overflow: hidden;
width: 100%;
height: 100vh;
background-color: @uni-bg-color-grey;
display: flex;
flex-flow: column;
}
.filters {
justify-content: flex-start;
background-color: @uni-bg-color;
flex-shrink: 0;
height: 100rpx;
font-size: 24rpx;
.filter-item {
margin: 0 30rpx;
position: relative;
&.active {
color: @uni-color-primary;
&::after {
content: '';
width: 100%;
height: 8rpx;
opacity: 1;
border-radius: 4rpx;
background: #32BAEC;
position: absolute;
bottom: 20rpx;
}
}
text {
display: inline-block;
max-width: 110rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
image {
margin-left: 16rpx;
}
}
}
::v-deep {
.uni-select {
font-size: 24rpx;
border: none;
}
}
.list {
position: relative;
width: 100%;
height: calc(100vh - 100rpx);
// padding-bottom: 200rpx;
// .scroll-Y {}
}
.add-btn {
// position: fixed;
// left: 0;
// bottom: 106rpx;
width: 100%;
height: 182rpx;
background-color: @uni-bg-color-grey;
}
.opinion {
background-color: #fff;
width: 710rpx;
margin: 0 auto;
margin-top: 20rpx;
min-height: 260rpx;
border-radius: 10rpx;
box-sizing: border-box;
padding: 26rpx 30rpx;
padding-bottom: 38rpx;
font-size: 24rpx;
.head {
height: 40rpx;
.code {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.right {
display: flex;
justify-content: flex-end;
}
.status {
font-size: 24rpx;
color: @uni-color-primary;
}
}
.level-line {
padding-top: 10rpx;
padding-bottom: 18rpx;
.level {
margin-right: 18rpx;
}
font-size: 24rpx;
}
.content {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 34rpx;
}
.bottom {
padding-top: 16rpx;
height: 40rpx;
color: #A6A6A6;
}
}
// opinion head code right status
<template>
<view class="page">
<view class="filters flex">
<view class="filter-item flex-items-center" :class="filterValue == item.value? 'active' :''"
v-for="(item,index) in filters" :key="index" @click="chaneSelect(item)">
<text>{{item.label}}</text>
</view>
</view>
<view class="list" ref="list">
<scroll-view :scroll-top="scrollTop" scroll-y class="scroll-Y" scroll-with-animation :style="'height:100%'">
<view class="opinion" v-for="(item,index) in list" :key="index" :id="'index'+index"
@click="toDetail(item)">
<view class="flex-between head">
<view class="code">參考編號:{{item.cpl_cplid}}</view>
<view class="right flex-items-center">
<text class="status">待审批</text>
<image src="../../static/images/back.png" style="width: 32rpx;height: 32rpx;" mode="">
</image>
</view>
</view>
<view class="flex level-line">
<view class="level pub-tag "
:class="item.cpl_priority == 'H'? 'warning' : item.cpl_priority == 'L' ? 'success' : ''">
{{$utils.getDictName('cpl_priority',item.cpl_priority)}}
</view>
<!-- <view class="room" v-if="index == 0">一期-8幢2單元座 6樓XXXX</view>
<view class="pub-tag success" v-else>非住客投诉</view> -->
</view>
<view class="content">{{item.cpr_content}}</view>
<view class="flex-between bottom">
<view class="pub-tag plain">公共设施</view>
<view class="time">{{item.cpr_createdate}}</view>
</view>
</view>
<!-- <div class="bottom-block" style="width: 100%;height: 180rpx;"></div> -->
</scroll-view>
</view>
</view>
</template>
<script>
import MaskSelecter from '@/components/MaskSelecter/MaskSelecter.vue'
import config from '@/config';
import api from '@/api'
export default {
components: {
MaskSelecter
},
data() {
return {
value: '',
scrollTop: 0,
filterValue: 1,
list: []
}
},
computed: {
filters() {
return [{
label: '待审批',
value: 1,
}
// , {
// label: '已通過',
// value: 2,
// }, {
// label: '未通過',
// value: 3,
// }, {
// label: '全部',
// value: 4,
// },
]
},
},
onLoad() {
this.$nextTick(() => {
// console.log();
// this.listHeight = this.$refs.list?.$el.clientHeight || 573
})
},
onShow() {
this.GetCPRWaitForApproval()
},
methods: {
async GetCPRWaitForApproval() {
let res = await api.main.GetCPRWaitForApproval({
project_id: uni.getStorageSync('projectId'),
lang: config.lang,
})
if (res.show_data) {
console.log(res.show_data);
this.list = [...res.show_data]
}
},
toDetail(item) {
uni.navigateTo({
url: `/pages/opinion/checkDetail?cpl_cplid=${item.cpl_cplid}&cpr_cprid=${item.cpr_cprid}`
})
},
chaneSelect(item) {
this.filterValue = item.value
}
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.page {
overflow: hidden;
width: 100%;
height: 100vh;
background-color: @uni-bg-color-grey;
display: flex;
flex-flow: column;
}
.filters {
justify-content: flex-start;
background-color: @uni-bg-color;
flex-shrink: 0;
height: 100rpx;
font-size: 24rpx;
.filter-item {
margin: 0 30rpx;
position: relative;
&.active {
color: @uni-color-primary;
&::after {
content: '';
width: 100%;
height: 8rpx;
opacity: 1;
border-radius: 4rpx;
background: #32BAEC;
position: absolute;
bottom: 20rpx;
}
}
text {
display: inline-block;
max-width: 110rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
image {
margin-left: 16rpx;
}
}
}
::v-deep {
.uni-select {
font-size: 24rpx;
border: none;
}
}
.list {
position: relative;
width: 100%;
height: calc(100vh - 100rpx);
// padding-bottom: 200rpx;
// .scroll-Y {}
}
.add-btn {
// position: fixed;
// left: 0;
// bottom: 106rpx;
width: 100%;
height: 182rpx;
background-color: @uni-bg-color-grey;
}
.opinion {
background-color: #fff;
width: 710rpx;
margin: 0 auto;
margin-top: 20rpx;
min-height: 260rpx;
border-radius: 10rpx;
box-sizing: border-box;
padding: 26rpx 30rpx;
padding-bottom: 38rpx;
font-size: 24rpx;
.head {
height: 40rpx;
.code {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.right {
display: flex;
justify-content: flex-end;
}
.status {
font-size: 24rpx;
color: @uni-color-primary;
}
}
.level-line {
padding-top: 10rpx;
padding-bottom: 18rpx;
.level {
margin-right: 18rpx;
}
font-size: 24rpx;
}
.content {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 34rpx;
}
.bottom {
padding-top: 16rpx;
height: 40rpx;
color: #A6A6A6;
}
}
.opinion .content {
white-space: normal;
height: 68rpx;
display: -webkit-box;
/*弹性伸缩盒子模型显示*/
-webkit-box-orient: vertical;
/*排列方式*/
-webkit-line-clamp: 2;
/*显示文本行数*/
overflow: hidden;
/*溢出隐藏*/
word-break: break-all;
}
// opinion head code right status
</style>
\ No newline at end of file
......@@ -135,10 +135,10 @@
<view class="label">内容</view>
<textarea v-model="form.cpr_content" placeholder="請輸入您的意見內容" cols="30" rows="10"></textarea>
</view>
<view class="form-item bd-bt">
<!-- <view class="form-item bd-bt">
<view class="label">上传凭证<text class="tip">(支持png、jpg、pdf格式,最多可傳9个)</text></view>
<FileUploader v-model="fileList"></FileUploader>
</view>
</view> -->
<view class="form-item flex-between bd-bt">
<view class="label">是否机密</view>
......@@ -175,15 +175,38 @@
<view class="btn pub-btn info plain" style="width:160rpx" @click="isFollow = false">取消</view>
</template>
<template v-else>
<view class="btn" v-if="userInfo.sgp_fecplreceive == 'Y' &&detail.cpl_status == 1">转单</view>
<view class="btn" v-if="canOver && detail.cpl_status != 3" @click="overOpinion">已完成</view>
<!-- <view class="btn">已完成</view> -->
<view class="btn" v-if="userInfo.sgp_fecplreceive == 'Y' && detail.cpl_status != 3" @click="openTurn">转单
</view>
<!-- <view class="btn" v-if="userInfo.sgp_iscplapproval == 'Y' &&detail.cpl_status == 1">分配人员</view> -->
<view class="btn" @click="toEdit" v-if="userInfo.sgp_fecplreceive == 'Y' && detail.cpl_status == 1">
<view class="btn" @click="toEdit" v-if="userInfo.sgp_fecplreceive == 'Y' && detail.cpl_status != 3">
修改意见
</view>
<view class="btn" v-if="detail.cpl_status != 1">查看跟进</view>
<view class="btn" v-if="stepList.length" @click="toFollorInfo">查看跟进</view>
<view class="btn" @click="handleFollow" v-if="detail.cpl_status != 3">意见跟进</view>
</template>
</view>
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content">
<view class="flex-center group-title">
转单至组
</view>
<picker-view :value="selectGroup" @change="bindChangeGroup" class="picker-view">
<picker-view-column>
<view class="item" v-for="(item,index) in groupList" :key="index">{{item.label}}</view>
</picker-view-column>
</picker-view>
<view class="flex flex-between">
<view class="btn pub-btn info plain" style="width:200rpx" @click="closeGroup">取消</view>
<view class="btn pub-btn" style="width:420rpx" @click="submitGroup">确认</view>
</view>
</view>
</uni-popup>
</view>
</template>
......@@ -213,6 +236,11 @@
cpr_fedisplay: '',
cpr_contentcms: ''
},
stepList: [],
canOver: false,
groupList: [],
selectGroup: [0]
}
},
computed: {
......@@ -249,7 +277,9 @@
onShow() {
if (this.id) {
this.getDetail()
this.getCplComplaintReplyByCPLID()
}
this.isFollow = false
},
methods: {
async getDetail() {
......@@ -281,6 +311,21 @@
}
},
async getCplComplaintReplyByCPLID() {
let res = await api.main.getCplComplaintReplyByCPLID({
project_id: uni.getStorageSync('projectId'),
lang: config.lang,
cpl_cplid: this.id
})
if (res.show_data && res.show_data) {
let findItem = res.show_data.find(item => item.cpr_cmsstatus == 'A')
if (findItem) {
this.canOver = true
}
// console.log(res.show_data);
this.stepList = [...res.show_data]
}
},
handleFollow() {
this.form = {
cpr_method: '',
......@@ -295,7 +340,9 @@
this.form.cpr_deadline = dayjs(this.detail.cpl_deadline).format('YYYY-MM-DD')
this.isFollow = true
},
//提交跟进
submit() {
let userInfo = uni.getStorageSync('userInfo');
if (!this.form.cpr_content) {
......@@ -333,7 +380,7 @@
cpr_title: '',
cpr_content: this.form.cpr_content,
cpr_method: this.form.cpr_method,
cpr_seqno: '1',
cpr_seqno: this.stepList.length + 1,
cpr_confidential: this.form.cpr_confidential,
cpr_deadline: this.form.cpr_deadline,
cpr_fedisplay: this.form.cpr_fedisplay,
......@@ -350,21 +397,116 @@
title: '跟进成功'
})
setTimeout(() => {
uni.setStorageSync('followSuccessData', datas)
this.toSuccess(res.show_data.cpl_id)
}, 600)
}
})
},
//跟进提交成功
toSuccess() {
uni.navigateTo({
url: '/pages/follow/followSuccess'
url: `/pages/follow/followSuccess?id=${this.id}`
})
},
//编辑
toEdit() {
uni.navigateTo({
url: `/pages/opinion/edit?id=${this.id}`
})
},
//跟进详情
toFollorInfo() {
uni.navigateTo({
url: `/pages/follow/followDetail?id=${this.id}`
})
},
//打开转单
async openTurn() {
this.$refs.popup.open('bottom')
let res = await api.main.GetHPSGroupsCanFollowCPL({
project_id: uni.getStorageSync('projectId'),
})
console.log(res.show_data);
res.show_data = res.show_data.map(item => {
return {
...item,
label: item.sgp_desc,
value: item.sgp_sgpid
}
})
this.groupList = [...res.show_data]
this.selectGroup = [0]
},
bindChangeGroup(e) {
console.log(e.detail.value);
this.selectGroup = e.detail.value
},
closeGroup() {
this.$refs.popup.close()
},
submitGroup() {
let that = this
let index = this.selectGroup[0]
let toGroup = this.groupList[index]
let toGroupId = toGroup.sgp_sgpid
if (toGroupId) {
let datas = {
project_id: uni.getStorageSync('projectId'),
HPSUser_id: that.userInfo.stf_usrid,
cpl_cplid: that.id,
fromGroup: that.userInfo.sgp_sgpid,
toGroup: toGroupId
}
api.main.AssignCPLOtherGroup(datas).then(res => {
if (res) {
uni.showToast({
title: '转单成功'
})
setTimeout(() => {
uni.navigateBack(-1)
}, 600)
}
})
}
// this.$refs.popup.close()
},
//完成
overOpinion() {
let that = this
uni.showModal({
title: '提示',
content: '是否完成意见?',
success: function(res) {
if (res.confirm) {
let datas = {
project_id: uni.getStorageSync('projectId'),
HPSUser_id: that.userInfo.stf_usrid,
cpl_cplid: that.id,
}
api.main.CompleteCPLByHPSUser(datas).then(res => {
if (res) {
uni.showToast({
title: '意见已完成'
})
setTimeout(() => {
that.getDetail()
that.getCplComplaintReplyByCPLID()
}, 600)
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
}
}
</script>
......@@ -446,4 +588,38 @@
border-left: none;
}
}
.page-bottom-btns .btn {
height: 60rpx;
border-radius: 30rpx;
padding: 0 24rpx;
font-size: 24rpx;
margin-right: 20rpx;
}
.popup-content {
min-height: 400rpx;
display: flex;
flex-flow: column;
justify-content: space-between;
padding: 40rpx;
.group-title {
font-size: 30rpx;
padding-bottom: 20rpx;
}
}
.picker-view {
width: 100%;
height: 360rpx;
::v-deep {
.uni-picker-view-content>* {
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>
\ No newline at end of file
......@@ -57,7 +57,7 @@
<MaskSelecter v-model="showSelect" :defaultValue="filterValues[selectKey]" :type="selectType"
:options="options[selectKey]" @change="changeFilter">
</MaskSelecter>
<view class="check-list" @click="toCheckList">
<view class="check-list" @click="toCheckList" v-if="userInfo.sgp_iscplapproval == 'Y'">
<image src="../../static/images/check-list.png" style="width: 80rpx;height: 80rpx;" mode=""></image>
<text>审批列表</text>
</view>
......@@ -81,6 +81,8 @@
},
data() {
return {
filterOver: false,
userInfo: uni.getStorageSync('userInfo'),
// listHeight: 573,
scrollTop: 0,
showSelect: false,
......@@ -172,6 +174,12 @@
this.updateDict()
// this.checkFilter()
},
onShow() {
// this.userInfo = uni.getStorageSync('userInfo')
if (this.filterOver) {
this.getList()
}
},
methods: {
getDictName: utils.getDictName,
...mapActions({
......@@ -179,6 +187,7 @@
}),
async updateDict() {
this.getAllCpl(() => {
this.filterOver = true
this.setDetaultFilter()
})
......
......@@ -17,7 +17,7 @@
{{detail.cpl_householdtype == 'H' ? '业主' :detail.cpl_householdtype == 'T' ? '租客' : '家庭成员' }}
</view>
<!-- 【H业主,T租客,F家庭成员】 -->
<view class="content" v-else>{{非业主}}</view>
<view class="content" v-else>非业主</view>
</view>
<view class="card-content">
<view class="label">小區:</view>
......@@ -86,10 +86,13 @@
let {
id
} = options
if (id) {
if (id && id != 'undefined') {
this.id = id
this.getDetail()
// this.getDetail()
} else {
// this.detail = uni.getStorageSync('opinionSuccessData')
}
this.detail = uni.getStorageSync('opinionSuccessData')
// getCplComplaintByCPLID
},
methods: {
......
<template>
<view class="page full ">
<view class="header">
<view class="header-title">我的</view>
<view class="header-content flex-between">
<view class="content">
<view class="name">张海</view>
<view class="job">管理干事</view>
<view class="dept">客服部</view>
</view>
<view class="avatar flex-center">
<image src="../../static/images/avatar.png" style="width: 102rpx;height: 115rpx;" mode=""></image>
</view>
</view>
</view>
<view class="menu-list">
<view class="menu-item flex-between bd-bt" @click="toUserInfo">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/userinfo.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">个人资料</text>
</view>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
<view class="menu-item flex-between " @click="toAboutUs">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/aboutus.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">关于我们</text>
</view>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
</view>
<view class="menu-list">
<view class="menu-item flex-between bd-bt">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/checkupdate.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">检查更新</text>
</view>
<view class="menu-item-right flex-items-center">
<text class="text">v1.0.0</text>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
</view>
<view class="menu-item flex-between ">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/clear.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">清除缓存</text>
</view>
<view class="menu-item-right flex-items-center">
<text class="text">2.3M</text>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
</view>
</view>
<view class="out-login flex-center" @click="loginOut">退出登录</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
toUserInfo() {
uni.navigateTo({
url: '/pages/user/userInfo'
})
},
toAboutUs() {
uni.navigateTo({
url: '/pages/user/aboutUs'
})
},
loginOut() {
uni.redirectTo({
url: '/pages/login/login/login'
})
}
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.header {
width: 750rpx;
height: 440rpx;
opacity: 1;
background: linear-gradient(203.46deg, rgba(50, 186, 236, 1) 0%, rgba(181, 235, 255, 1) 100%);
padding: 0 50rpx;
padding-top: 108rpx;
box-sizing: border-box;
.header-title {
margin: 0 auto;
text-align: center;
font-size: 34rpx;
line-height: 46rpx;
color: #000;
}
.content {
color: #fff;
}
.header-content {
padding-top: 50rpx;
.name {
font-size: 32rpx;
font-weight: bold;
line-height: 45rpx;
}
.job {
font-size: 24rpx;
padding-top: 20rpx;
}
.dept {
font-size: 28rpx;
padding-top: 20rpx;
}
}
.avatar {
width: 172rpx;
height: 172rpx;
opacity: 1;
background: rgba(255, 255, 255, 1);
border-radius: 50%;
}
}
.menu-list {
width: 100%;
margin-bottom: 20rpx;
.menu-item {
width: 100%;
height: 100rpx;
box-sizing: border-box;
padding-left: 35rpx;
padding-right: 27rpx;
background-color: #fff;
color: #666;
.text {
padding-left: 20rpx;
}
}
}
.out-login {
margin: 200rpx auto;
width: 560rpx;
height: 88rpx;
border-radius: 8rpx;
background: #FFFFFF;
border: 2rpx solid #32BAEC;
font-size: 28rpx;
line-height: 39.2rpx;
color: rgba(50, 186, 236, 1);
}
<template>
<view class="page full ">
<view class="header">
<view class="header-title">我的</view>
<view class="header-content flex-between">
<view class="content">
<view class="name">{{userInfo.stf_name}}</view>
<view class="job">管理干事</view>
<view class="dept">客服部</view>
</view>
<view class="avatar flex-center">
<image src="../../static/images/avatar.png" style="width: 102rpx;height: 115rpx;" mode=""></image>
</view>
</view>
</view>
<view class="menu-list">
<view class="menu-item flex-between bd-bt" @click="toUserInfo">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/userinfo.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">个人资料</text>
</view>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
<view class="menu-item flex-between " @click="toAboutUs">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/aboutus.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">关于我们</text>
</view>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
</view>
<view class="menu-list">
<view class="menu-item flex-between bd-bt">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/checkupdate.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">检查更新</text>
</view>
<view class="menu-item-right flex-items-center">
<text class="text">v1.0.0</text>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
</view>
<view class="menu-item flex-between ">
<view class="menu-item-left flex-items-center">
<image src="../../static/images/clear.png" style="width:28rpx;height: 28rpx;" mode=""></image>
<text class="text">清除缓存</text>
</view>
<view class="menu-item-right flex-items-center">
<text class="text">2.3M</text>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
</view>
</view>
</view>
<view class="out-login flex-center" @click="loginOut">退出登录</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: uni.getStorageSync('userInfo'),
}
},
methods: {
toUserInfo() {
uni.navigateTo({
url: '/pages/user/userInfo'
})
},
toAboutUs() {
uni.navigateTo({
url: '/pages/user/aboutUs'
})
},
loginOut() {
uni.showModal({
title: '提示',
content: '是否退出登录',
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('userInfo')
uni.removeStorageSync('userAuth')
uni.reLaunch({
url: '/pages/login/login/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}
</script>
<style lang="less" scoped>
@import url('@/style/index.less');
.header {
width: 750rpx;
height: 440rpx;
opacity: 1;
background: linear-gradient(203.46deg, rgba(50, 186, 236, 1) 0%, rgba(181, 235, 255, 1) 100%);
padding: 0 50rpx;
padding-top: 108rpx;
box-sizing: border-box;
.header-title {
margin: 0 auto;
text-align: center;
font-size: 34rpx;
line-height: 46rpx;
color: #000;
}
.content {
color: #fff;
}
.header-content {
padding-top: 50rpx;
.name {
font-size: 32rpx;
font-weight: bold;
line-height: 45rpx;
}
.job {
font-size: 24rpx;
padding-top: 20rpx;
}
.dept {
font-size: 28rpx;
padding-top: 20rpx;
}
}
.avatar {
width: 172rpx;
height: 172rpx;
opacity: 1;
background: rgba(255, 255, 255, 1);
border-radius: 50%;
}
}
.menu-list {
width: 100%;
margin-bottom: 20rpx;
.menu-item {
width: 100%;
height: 100rpx;
box-sizing: border-box;
padding-left: 35rpx;
padding-right: 27rpx;
background-color: #fff;
color: #666;
.text {
padding-left: 20rpx;
}
}
}
.out-login {
margin: 200rpx auto;
width: 560rpx;
height: 88rpx;
border-radius: 8rpx;
background: #FFFFFF;
border: 2rpx solid #32BAEC;
font-size: 28rpx;
line-height: 39.2rpx;
color: rgba(50, 186, 236, 1);
}
</style>
\ No newline at end of file
......@@ -15,19 +15,19 @@
<view class="menu-list">
<view class="menu-item flex-between bd-bt">
<text class="text">姓名</text>
<text class="text">张海</text>
<text class="text">{{userInfo.stf_name}}</text>
</view>
<view class="menu-item flex-between bd-bt">
<text class="text">手机号</text>
<text class="text">15278963254</text>
<text class="text">--</text>
</view>
<view class="menu-item flex-between bd-bt">
<text class="text">部门</text>
<text class="text">客服部</text>
<text class="text">--</text>
</view>
<view class="menu-item flex-between bd-bt">
<text class="text">岗位</text>
<text class="text">管理幹事</text>
<text class="text">--</text>
</view>
</view>
</view>
......@@ -36,8 +36,8 @@
<script>
export default {
data() {
return {
return {
userInfo: uni.getStorageSync('userInfo'),
}
},
methods: {
......
......@@ -67,6 +67,10 @@ const store = new Vuex.Store({
lang: config.lang
}
uni.showLoading({
title: '正在获取配置...',
mask: true
})
// let p = Promise.all( [getData1(), getData2(), getData3(), getData4() ])
let p = Promise.all([api.main.getCPLPriority(datas), api
.main
......@@ -77,6 +81,7 @@ const store = new Vuex.Store({
p.then(([priority, stage, sta, type, source]) => {
console.log(priority, stage, sta, type, source) // ['data1', 'data2', 'data3', 'data4']
uni.hideLoading()
const cpl_priority = typeToFilter(priority.show_data)
......
## 1.8.8(2024-02-20)
- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
## 1.8.7(2024-02-02)
- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
## 1.8.6(2024-01-30)
- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
## 1.8.5(2024-01-26)
- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
## 1.8.4(2023-11-15)
- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
## 1.8.3(2023-04-17)
- 修复 uni-popup 重复打开时的 bug
## 1.8.2(2023-02-02)
- uni-popup-dialog 组件新增 inputType 属性
## 1.8.1(2022-12-01)
- 修复 nvue 下 v-show 报错
## 1.8.0(2022-11-29)
- 优化 主题样式
## 1.7.9(2022-04-02)
- 修复 弹出层内部无法滚动的bug
## 1.7.8(2022-03-28)
- 修复 小程序中高度错误的bug
## 1.7.7(2022-03-17)
- 修复 快速调用open出现问题的Bug
## 1.7.6(2022-02-14)
- 修复 safeArea 属性不能设置为false的bug
## 1.7.5(2022-01-19)
- 修复 isMaskClick 失效的bug
## 1.7.4(2022-01-19)
- 新增 cancelText \ confirmText 属性 ,可自定义文本
- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
## 1.7.3(2022-01-13)
- 修复 设置 safeArea 属性不生效的bug
## 1.7.2(2021-11-26)
- 优化 组件示例
## 1.7.1(2021-11-26)
- 修复 vuedoc 文字错误
## 1.7.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
## 1.6.2(2021-08-24)
- 新增 支持国际化
## 1.6.1(2021-07-30)
- 优化 vue3下事件警告的问题
## 1.6.0(2021-07-13)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.5.0(2021-06-23)
- 新增 mask-click 遮罩层点击事件
## 1.4.5(2021-06-22)
- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
## 1.4.4(2021-06-18)
- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
## 1.4.3(2021-06-08)
- 修复 错误的 watch 字段
- 修复 safeArea 属性不生效的问题
- 修复 点击内容,再点击遮罩无法关闭的Bug
## 1.4.2(2021-05-12)
- 新增 组件示例地址
## 1.4.1(2021-04-29)
- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
## 1.4.0 (2021-04-29)
- 新增 type 属性的 left\right 值,支持左右弹出
- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
- 新增 safeArea 属性,是否适配底部安全区
- 修复 App\h5\微信小程序底部安全区占位不对的Bug
- 修复 App 端弹出等待的Bug
- 优化 提升低配设备性能,优化动画卡顿问题
- 优化 更简单的组件自定义方式
## 1.2.9(2021-02-05)
- 优化 组件引用关系,通过uni_modules引用组件
## 1.2.8(2021-02-05)
- 调整为uni_modules目录规范
## 1.2.7(2021-02-05)
- 调整为uni_modules目录规范
- 新增 支持 PC 端
- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端
// #ifdef H5
export default {
name: 'Keypress',
props: {
disable: {
type: Boolean,
default: false
}
},
mounted () {
const keyNames = {
esc: ['Esc', 'Escape'],
tab: 'Tab',
enter: 'Enter',
space: [' ', 'Spacebar'],
up: ['Up', 'ArrowUp'],
left: ['Left', 'ArrowLeft'],
right: ['Right', 'ArrowRight'],
down: ['Down', 'ArrowDown'],
delete: ['Backspace', 'Delete', 'Del']
}
const listener = ($event) => {
if (this.disable) {
return
}
const keyName = Object.keys(keyNames).find(key => {
const keyName = $event.key
const value = keyNames[key]
return value === keyName || (Array.isArray(value) && value.includes(keyName))
})
if (keyName) {
// 避免和其他按键事件冲突
setTimeout(() => {
this.$emit(keyName, {})
}, 0)
}
}
document.addEventListener('keyup', listener)
this.$once('hook:beforeDestroy', () => {
document.removeEventListener('keyup', listener)
})
},
render: () => {}
}
// #endif
<template>
<view class="uni-popup-dialog">
<view class="uni-dialog-title">
<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
</view>
<view v-if="mode === 'base'" class="uni-dialog-content">
<slot>
<text class="uni-dialog-content-text">{{content}}</text>
</slot>
</view>
<view v-else class="uni-dialog-content">
<slot>
<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
:placeholder="placeholderText" :focus="focus">
</slot>
</view>
<view class="uni-dialog-button-group">
<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
<text class="uni-dialog-button-text">{{closeText}}</text>
</view>
<view class="uni-dialog-button uni-border-left" @click="onOk">
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
</view>
</view>
</view>
</template>
<script>
import popup from '../uni-popup/popup.js'
import {
initVueI18n
} from '@dcloudio/uni-i18n'
import messages from '../uni-popup/i18n/index.js'
const {
t
} = initVueI18n(messages)
/**
* PopUp 弹出层-对话框样式
* @description 弹出层-对话框样式
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} value input 模式下的默认值
* @property {String} placeholder input 模式下输入提示
* @property {Boolean} focus input模式下是否自动聚焦,默认为true
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
* @value info 消息
* @value error 错误
* @property {String} mode = [base|input] 模式、
* @value base 基础对话框
* @value input 可输入对话框
* @showClose {Boolean} 是否显示关闭按钮
* @property {String} content 对话框内容
* @property {Boolean} beforeClose 是否拦截取消事件
* @property {Number} maxlength 输入
* @event {Function} confirm 点击确认按钮触发
* @event {Function} close 点击取消按钮触发
*/
export default {
name: "uniPopupDialog",
mixins: [popup],
emits: ['confirm', 'close'],
props: {
inputType: {
type: String,
default: 'text'
},
showClose: {
type: Boolean,
default: true
},
value: {
type: [String, Number],
default: ''
},
placeholder: {
type: [String, Number],
default: ''
},
type: {
type: String,
default: 'error'
},
mode: {
type: String,
default: 'base'
},
title: {
type: String,
default: ''
},
content: {
type: String,
default: ''
},
beforeClose: {
type: Boolean,
default: false
},
cancelText: {
type: String,
default: ''
},
confirmText: {
type: String,
default: ''
},
maxlength: {
type: Number,
default: -1,
},
focus:{
type: Boolean,
default: true,
}
},
data() {
return {
dialogType: 'error',
val: ""
}
},
computed: {
okText() {
return this.confirmText || t("uni-popup.ok")
},
closeText() {
return this.cancelText || t("uni-popup.cancel")
},
placeholderText() {
return this.placeholder || t("uni-popup.placeholder")
},
titleText() {
return this.title || t("uni-popup.title")
}
},
watch: {
type(val) {
this.dialogType = val
},
mode(val) {
if (val === 'input') {
this.dialogType = 'info'
}
},
value(val) {
if (this.maxlength != -1 && this.mode === 'input') {
this.val = val.slice(0, this.maxlength);
} else {
this.val = val
}
}
},
created() {
// 对话框遮罩不可点击
this.popup.disableMask()
// this.popup.closeMask()
if (this.mode === 'input') {
this.dialogType = 'info'
this.val = this.value
} else {
this.dialogType = this.type
}
},
methods: {
/**
* 点击确认按钮
*/
onOk() {
if (this.mode === 'input') {
this.$emit('confirm', this.val)
} else {
this.$emit('confirm')
}
this.$emit("input",this.val);
if (this.beforeClose) return
this.popup.close()
},
/**
* 点击取消按钮
*/
closeDialog() {
this.$emit('close')
if (this.beforeClose) return
this.popup.close()
},
close() {
this.popup.close()
}
}
}
</script>
<style lang="scss">
.uni-popup-dialog {
width: 300px;
border-radius: 11px;
background-color: #fff;
}
.uni-dialog-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 25px;
}
.uni-dialog-title-text {
font-size: 16px;
font-weight: 500;
}
.uni-dialog-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
padding: 20px;
}
.uni-dialog-content-text {
font-size: 14px;
color: #6C6C6C;
}
.uni-dialog-button-group {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
border-top-color: #f5f5f5;
border-top-style: solid;
border-top-width: 1px;
}
.uni-dialog-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
height: 45px;
}
.uni-border-left {
border-left-color: #f0f0f0;
border-left-style: solid;
border-left-width: 1px;
}
.uni-dialog-button-text {
font-size: 16px;
color: #333;
}
.uni-button-color {
color: #007aff;
}
.uni-dialog-input {
flex: 1;
font-size: 14px;
border: 1px #eee solid;
height: 40px;
padding: 0 10px;
border-radius: 5px;
color: #555;
}
.uni-popup__success {
color: #4cd964;
}
.uni-popup__warn {
color: #f0ad4e;
}
.uni-popup__error {
color: #dd524d;
}
.uni-popup__info {
color: #909399;
}
</style>
<template>
<view class="uni-popup-message">
<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
<slot>
<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
</slot>
</view>
</view>
</template>
<script>
import popup from '../uni-popup/popup.js'
/**
* PopUp 弹出层-消息提示
* @description 弹出层-消息提示
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
* @value info 消息
* @value error 错误
* @property {String} message 消息提示文字
* @property {String} duration 显示时间,设置为 0 则不会自动关闭
*/
export default {
name: 'uniPopupMessage',
mixins:[popup],
props: {
/**
* 主题 success/warning/info/error 默认 success
*/
type: {
type: String,
default: 'success'
},
/**
* 消息文字
*/
message: {
type: String,
default: ''
},
/**
* 显示时间,设置为 0 则不会自动关闭
*/
duration: {
type: Number,
default: 3000
},
maskShow:{
type:Boolean,
default:false
}
},
data() {
return {}
},
created() {
this.popup.maskShow = this.maskShow
this.popup.messageChild = this
},
methods: {
timerClose(){
if(this.duration === 0) return
clearTimeout(this.timer)
this.timer = setTimeout(()=>{
this.popup.close()
},this.duration)
}
}
}
</script>
<style lang="scss" >
.uni-popup-message {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
}
.uni-popup-message__box {
background-color: #e1f3d8;
padding: 10px 15px;
border-color: #eee;
border-style: solid;
border-width: 1px;
flex: 1;
}
@media screen and (min-width: 500px) {
.fixforpc-width {
margin-top: 20px;
border-radius: 4px;
flex: none;
min-width: 380px;
/* #ifndef APP-NVUE */
max-width: 50%;
/* #endif */
/* #ifdef APP-NVUE */
max-width: 500px;
/* #endif */
}
}
.uni-popup-message-text {
font-size: 14px;
padding: 0;
}
.uni-popup__success {
background-color: #e1f3d8;
}
.uni-popup__success-text {
color: #67C23A;
}
.uni-popup__warn {
background-color: #faecd8;
}
.uni-popup__warn-text {
color: #E6A23C;
}
.uni-popup__error {
background-color: #fde2e2;
}
.uni-popup__error-text {
color: #F56C6C;
}
.uni-popup__info {
background-color: #F2F6FC;
}
.uni-popup__info-text {
color: #909399;
}
</style>
<template>
<view class="uni-popup-share">
<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
<view class="uni-share-content">
<view class="uni-share-content-box">
<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
<text class="uni-share-text">{{item.text}}</text>
</view>
</view>
</view>
<view class="uni-share-button-box">
<button class="uni-share-button" @click="close">{{cancelText}}</button>
</view>
</view>
</template>
<script>
import popup from '../uni-popup/popup.js'
import {
initVueI18n
} from '@dcloudio/uni-i18n'
import messages from '../uni-popup/i18n/index.js'
const { t } = initVueI18n(messages)
export default {
name: 'UniPopupShare',
mixins:[popup],
emits:['select'],
props: {
title: {
type: String,
default: ''
},
beforeClose: {
type: Boolean,
default: false
}
},
data() {
return {
bottomData: [{
text: '微信',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
name: 'wx'
},
{
text: '支付宝',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
name: 'ali'
},
{
text: 'QQ',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
name: 'qq'
},
{
text: '新浪',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
name: 'sina'
},
// {
// text: '百度',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
// name: 'copy'
// },
// {
// text: '其他',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
// name: 'more'
// }
]
}
},
created() {},
computed: {
cancelText() {
return t("uni-popup.cancel")
},
shareTitleText() {
return this.title || t("uni-popup.shareTitle")
}
},
methods: {
/**
* 选择内容
*/
select(item, index) {
this.$emit('select', {
item,
index
})
this.close()
},
/**
* 关闭窗口
*/
close() {
if(this.beforeClose) return
this.popup.close()
}
}
}
</script>
<style lang="scss" >
.uni-popup-share {
background-color: #fff;
border-top-left-radius: 11px;
border-top-right-radius: 11px;
}
.uni-share-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
height: 40px;
}
.uni-share-title-text {
font-size: 14px;
color: #666;
}
.uni-share-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 10px;
}
.uni-share-content-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: wrap;
width: 360px;
}
.uni-share-content-item {
width: 90px;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
padding: 10px 0;
align-items: center;
}
.uni-share-content-item:active {
background-color: #f5f5f5;
}
.uni-share-image {
width: 30px;
height: 30px;
}
.uni-share-text {
margin-top: 10px;
font-size: 14px;
color: #3B4144;
}
.uni-share-button-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 10px 15px;
}
.uni-share-button {
flex: 1;
border-radius: 50px;
color: #666;
font-size: 16px;
}
.uni-share-button::after {
border-radius: 50px;
}
</style>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment