update
This commit is contained in:
parent
4b8b5c9dd7
commit
05930f592c
@ -3,25 +3,32 @@
|
|||||||
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.base-info {
|
.base-info {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.span24{
|
|
||||||
|
.span24 {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
.mt8{
|
|
||||||
|
.mt8 {
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
.mt24{
|
|
||||||
|
.mt24 {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml36 {
|
.ml36 {
|
||||||
margin-left: 36rpx;
|
margin-left: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml24 {
|
.ml24 {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-top-box {
|
.detail-top-box {
|
||||||
box-shadow: 0px 0 6rpx 2rpx rgb(234, 234, 234);
|
box-shadow: 0px 0 6rpx 2rpx rgb(234, 234, 234);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -35,9 +42,11 @@
|
|||||||
margin-top: 28rpx;
|
margin-top: 28rpx;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
}
|
}
|
||||||
.between-circle{
|
|
||||||
|
.between-circle {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.between-circle:before {
|
.between-circle:before {
|
||||||
content: '';
|
content: '';
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
@ -51,6 +60,7 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.between-circle:after {
|
.between-circle:after {
|
||||||
content: '';
|
content: '';
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
@ -64,6 +74,7 @@
|
|||||||
top: -12rpx;
|
top: -12rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@ -71,6 +82,7 @@ h3 {
|
|||||||
|
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
/* padding-top: 32rpx; */
|
/* padding-top: 32rpx; */
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
@ -81,6 +93,7 @@ h4 {
|
|||||||
.text-title {
|
.text-title {
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-top-base text.text-title {
|
.detail-top-base text.text-title {
|
||||||
max-width: 320rpx;
|
max-width: 320rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -88,10 +101,12 @@ h4 {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.detail-top-base > view.span24 {
|
|
||||||
|
.detail-top-base>view.span24 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-top-base {
|
.detail-top-base {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
padding-top: 48rpx;
|
padding-top: 48rpx;
|
||||||
@ -116,7 +131,7 @@ h4 {
|
|||||||
.detail-top-bottom {
|
.detail-top-bottom {
|
||||||
/* width: 100%; */
|
/* width: 100%; */
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
padding: 24rpx 24rpx 28rpx 24rpx;
|
padding: 24rpx 24rpx 28rpx 24rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,10 +152,12 @@ h4 {
|
|||||||
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment {
|
.attachment {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
padding: 12rpx 0 24rpx 0;
|
padding: 12rpx 0 24rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-title {
|
.detail-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -149,20 +166,23 @@ h4 {
|
|||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-middle-box .remark{
|
.detail-middle-box .remark {
|
||||||
color: #686868;
|
color: #686868;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imgBox {
|
.imgBox {
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
padding-top: 16rpx;
|
padding-top: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imgBox a {
|
.imgBox a {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.imgBox a+a {
|
.imgBox a+a {
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
}
|
}
|
||||||
@ -173,6 +193,7 @@ h4 {
|
|||||||
margin: 4rpx 8rpx;
|
margin: 4rpx 8rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ico-wjxz {
|
.ico-wjxz {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -4rpx;
|
right: -4rpx;
|
||||||
@ -198,6 +219,7 @@ h4 {
|
|||||||
.uni-list-cell:after {
|
.uni-list-cell:after {
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-box {
|
.button-box {
|
||||||
padding-top: 36rpx;
|
padding-top: 36rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -205,10 +227,12 @@ h4 {
|
|||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-box image {
|
.button-box image {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-box span {
|
.button-box span {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -216,75 +240,100 @@ h4 {
|
|||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.ico-ndbz:before{
|
|
||||||
background-image: url('/static/images/tender/je.png');
|
.ico-ndbz:before {
|
||||||
}
|
background-image: url('/static/images/tender/je.png');
|
||||||
.ico-bm:before{
|
}
|
||||||
background-image: url('/static/images/tender/bm.png');
|
|
||||||
}
|
.ico-bm:before {
|
||||||
.ico-pj:before{
|
background-image: url('/static/images/tender/bm.png');
|
||||||
background-image: url('/static/images/expense/pj.png');
|
}
|
||||||
}
|
|
||||||
.ico-rzlx:before{
|
.ico-pj:before {
|
||||||
background-image: url('/static/images/expense/rzlx.png');
|
background-image: url('/static/images/expense/pj.png');
|
||||||
}
|
}
|
||||||
.ico-khyh:before{
|
|
||||||
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/khyh.png');
|
.ico-rzlx:before {
|
||||||
}
|
background-image: url('/static/images/expense/rzlx.png');
|
||||||
.ico-dw:before{
|
}
|
||||||
background-image: url('/static/images/expense/dw.png');
|
|
||||||
}
|
.ico-khyh:before {
|
||||||
.ico-skzh:before{
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/khyh.png');
|
||||||
background-image: url('/static/images/expense/skzh.png');
|
}
|
||||||
}
|
|
||||||
.ico-ccsy:before{
|
.ico-dw:before {
|
||||||
background-image: url('/static/images/expense/ccsy.png');
|
background-image: url('/static/images/expense/dw.png');
|
||||||
}
|
}
|
||||||
.ico-ccry:before{
|
|
||||||
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/ccry.png');
|
.ico-skzh:before {
|
||||||
}
|
background-image: url('/static/images/expense/skzh.png');
|
||||||
.ico-xmgl:before{
|
}
|
||||||
background-image: url('/static/images/expense/xmgl.png');
|
|
||||||
}
|
.ico-ccsy:before {
|
||||||
.ico-fy:before{
|
background-image: url('/static/images/expense/ccsy.png');
|
||||||
background-image: url('/static/images/expense/fy.png');
|
}
|
||||||
}
|
|
||||||
.ico-ly:before{
|
.ico-ccry:before {
|
||||||
background-image: url('/static/images/expense/ly.png');
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/ccry.png');
|
||||||
}
|
}
|
||||||
.ico-sjx:before{
|
|
||||||
background-image: url('/static/images/expense/sjx.png');
|
.ico-xmgl:before {
|
||||||
}
|
background-image: url('/static/images/expense/xmgl.png');
|
||||||
.ico-lbrs:before{
|
}
|
||||||
background-image: url('/static/images/expense/lbrs.png');
|
|
||||||
}
|
.ico-fy:before {
|
||||||
.ico-ptrs:before{
|
background-image: url('/static/images/expense/fy.png');
|
||||||
background-image: url('/static/images/expense/ptrs.png');
|
}
|
||||||
}
|
|
||||||
.ico-jbry:before{
|
.ico-ly:before {
|
||||||
background-image: url('/static/images/expense/jbry.png');
|
background-image: url('/static/images/expense/ly.png');
|
||||||
}
|
}
|
||||||
.ico-je:before{
|
|
||||||
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/contract/htsp_je.png');
|
.ico-sjx:before {
|
||||||
}
|
background-image: url('/static/images/expense/sjx.png');
|
||||||
.ico-dzfp:before{
|
}
|
||||||
background-image: url('/static/images/expense/dzfp.png');
|
|
||||||
}
|
.ico-lbrs:before {
|
||||||
.ico-user:before{
|
background-image: url('/static/images/expense/lbrs.png');
|
||||||
background-image: url('/static/images/tender/lxr.png');
|
}
|
||||||
}
|
|
||||||
.ico-zcyz:before{
|
.ico-ptrs:before {
|
||||||
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/zcyz.png');
|
background-image: url('/static/images/expense/ptrs.png');
|
||||||
}
|
}
|
||||||
.ico-zcmc:before{
|
|
||||||
background-image: url('/static/images/expense/zcmc.png');
|
.ico-jbry:before {
|
||||||
}
|
background-image: url('/static/images/expense/jbry.png');
|
||||||
.ico-ljzj:before{
|
}
|
||||||
background-image: url('/static/images/expense/ljzj.png');
|
|
||||||
}
|
.ico-je:before {
|
||||||
.ico-gzsl:before{
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/contract/htsp_je.png');
|
||||||
background-image: url('/static/images/expense/gzsl.png');
|
}
|
||||||
}
|
|
||||||
.ico-jfmc:before{
|
.ico-dzfp:before {
|
||||||
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/jfmc.png');
|
background-image: url('/static/images/expense/dzfp.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ico-user:before {
|
||||||
|
background-image: url('/static/images/tender/lxr.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.ico-zcyz:before {
|
||||||
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/zcyz.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.ico-zcmc:before {
|
||||||
|
/* background-image: url('/static/images/expense/zcmc.png'); */
|
||||||
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/zcmc.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.ico-ljzj:before {
|
||||||
|
background-image: url('/static/images/expense/ljzj.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.ico-gzsl:before {
|
||||||
|
background-image: url('/static/images/expense/gzsl.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.ico-jfmc:before {
|
||||||
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/expense/jfmc.png');
|
||||||
|
}
|
||||||
@ -1,15 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="file-unit " :class="{'active':active}" @tap="download()">
|
<view class="file-unit " :class="{ 'active': active }" @tap="download()">
|
||||||
<i class="ico ico-word ico-big2" v-if="fileItem.type=='doc' || fileItem.type=='docx'"></i>
|
<i class="ico ico-word ico-big2" v-if="fileItem.type == 'doc' || fileItem.type == 'docx'"></i>
|
||||||
<i class="ico ico-execl ico-big2" v-else-if="fileItem.type=='xls' || fileItem.type=='xlsx'"></i>
|
<i class="ico ico-execl ico-big2" v-else-if="fileItem.type == 'xls' || fileItem.type == 'xlsx'"></i>
|
||||||
<i class="ico ico-txt ico-big2" v-else-if="fileItem.type=='txt'"></i>
|
<i class="ico ico-txt ico-big2" v-else-if="fileItem.type == 'txt'"></i>
|
||||||
<i class="ico ico-pdf ico-big2" v-else-if="fileItem.type=='pdf'"></i>
|
<i class="ico ico-pdf ico-big2" v-else-if="fileItem.type == 'pdf'"></i>
|
||||||
<i class="ico ico-rarzip ico-big2" v-else-if="fileItem.type=='zip' || fileItem.type=='rar'"></i>
|
<i class="ico ico-rarzip ico-big2" v-else-if="fileItem.type == 'zip' || fileItem.type == 'rar'"></i>
|
||||||
<i class="ico ico-jpgpng ico-big2" v-else-if="fileItem.type=='png' || fileItem.type=='jpg' || fileItem.type=='jpeg' "></i>
|
<i class="ico ico-jpgpng ico-big2"
|
||||||
<i class="ico ico-ppt ico-big2" v-else-if="fileItem.type=='ppt' || fileItem.type=='ppts' || fileItem.type=='pptx' || fileItem.type=='dps'"></i>
|
v-else-if="fileItem.type == 'png' || fileItem.type == 'jpg' || fileItem.type == 'jpeg'"></i>
|
||||||
|
<i class="ico ico-ppt ico-big2"
|
||||||
|
v-else-if="fileItem.type == 'ppt' || fileItem.type == 'ppts' || fileItem.type == 'pptx' || fileItem.type == 'dps'"></i>
|
||||||
<i class="ico ico-more ico-big2" v-else></i>
|
<i class="ico ico-more ico-big2" v-else></i>
|
||||||
<view style="flex: 1;line-height: 1.2;padding-right: 20rpx;">
|
<view style="flex: 1;line-height: 1.2;padding-right: 20rpx;">
|
||||||
<view class="file-text">{{fileItem.name}}</view>
|
<view class="file-text">{{ fileItem.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<i class='ico ico-wjxz'></i>
|
<i class='ico ico-wjxz'></i>
|
||||||
@ -17,58 +19,58 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
fileItem: Object,
|
fileItem: Object,
|
||||||
},
|
},
|
||||||
data(){
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
download() {
|
download() {
|
||||||
let _this = this
|
let _this = this
|
||||||
this.active = true
|
this.active = true
|
||||||
if(_this.fileItem.type=='png' || _this.fileItem.type=='jpg' || _this.fileItem.type=='jpeg') {
|
if (_this.fileItem.type == 'png' || _this.fileItem.type == 'jpg' || _this.fileItem.type == 'jpeg') {
|
||||||
uni.previewImage({urls:[_this.fileItem.path]})
|
uni.previewImage({ urls: [_this.fileItem.path] })
|
||||||
}else{
|
} else {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:"正在下载中..."
|
title: "正在下载中..."
|
||||||
})
|
})
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url:_this.fileItem.path,
|
url: _this.fileItem.path,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
let filePath = res.tempFilePath;
|
let filePath = res.tempFilePath;
|
||||||
uni.openDocument({
|
uni.openDocument({
|
||||||
filePath: filePath,
|
filePath: filePath,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log('打开文档成功');
|
console.log('打开文档成功');
|
||||||
},
|
},
|
||||||
fail(rs) {
|
fail(rs) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title:'温馨提示',
|
title: '温馨提示',
|
||||||
content:rs
|
content: rs
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
complete() {
|
complete() {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},fail: function(res){
|
}, fail: function (res) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res
|
title: res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@ -79,9 +81,11 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.active .file-text{
|
|
||||||
|
.active .file-text {
|
||||||
color: #007AFF;
|
color: #007AFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-text {
|
.file-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@ -91,42 +95,55 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ico:before {
|
.ico:before {
|
||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
}
|
}
|
||||||
.ico-wjxz:before{
|
|
||||||
|
.ico-wjxz:before {
|
||||||
width: 42rpx;
|
width: 42rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
}
|
}
|
||||||
.ico-big2:before{
|
|
||||||
|
.ico-big2:before {
|
||||||
width: 52rpx;
|
width: 52rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
}
|
}
|
||||||
.ico-word:before{
|
|
||||||
|
.ico-word:before {
|
||||||
background-image: url('../../static/images/fileType/word.png');
|
background-image: url('../../static/images/fileType/word.png');
|
||||||
}
|
}
|
||||||
.ico-execl:before{
|
|
||||||
|
.ico-execl:before {
|
||||||
background-image: url('../../static/images/fileType/excel.png');
|
background-image: url('../../static/images/fileType/excel.png');
|
||||||
}
|
}
|
||||||
.ico-txt:before{
|
|
||||||
|
.ico-txt:before {
|
||||||
background-image: url('../../static/images/fileType/txt.png');
|
background-image: url('../../static/images/fileType/txt.png');
|
||||||
}
|
}
|
||||||
.ico-pdf:before{
|
|
||||||
|
.ico-pdf:before {
|
||||||
background-image: url('../../static/images/fileType/pdf.png');
|
background-image: url('../../static/images/fileType/pdf.png');
|
||||||
}
|
}
|
||||||
.ico-ppt:before{
|
|
||||||
|
.ico-ppt:before {
|
||||||
background-image: url('../../static/images/fileType/ppt.png');
|
background-image: url('../../static/images/fileType/ppt.png');
|
||||||
}
|
}
|
||||||
.ico-jpgpng:before{
|
|
||||||
background-image: url('../../static/images/fileType/jpgpng.png');
|
.ico-jpgpng:before {
|
||||||
|
/* background-image: url('../../static/images/fileType/jpgpng.png'); */
|
||||||
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/fileType/jpgpng.png');
|
||||||
}
|
}
|
||||||
.ico-rarzip:before{
|
|
||||||
|
.ico-rarzip:before {
|
||||||
background-image: url('../../static/images/fileType/rarzip.png');
|
background-image: url('../../static/images/fileType/rarzip.png');
|
||||||
}
|
}
|
||||||
.ico-more:before{
|
|
||||||
|
.ico-more:before {
|
||||||
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/fileType/more.png');
|
background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/fileType/more.png');
|
||||||
}
|
}
|
||||||
.ico-wjxz:before{
|
|
||||||
|
.ico-wjxz:before {
|
||||||
background-image: url('../../static/images/fileType/downLoad.png');
|
background-image: url('../../static/images/fileType/downLoad.png');
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,15 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card" @tap='goDetail' v-if="item" :class="{'conten-border': item.SORTNUM==0}">
|
<div class="card" @tap='goDetail' v-if="item" :class="{ 'conten-border': item.SORTNUM == 0 }">
|
||||||
<div class="uni-flex plr32" style="justify-content: space-between;">
|
<div class="uni-flex plr32" style="justify-content: space-between;">
|
||||||
<p class="contentName" :class="{'is-urgent': item.URGENCY_DEGREE==1 }">{{item.LEAVE_PERSON+"【"+item.DEPARTMENT_NAME+"】"}}</p>
|
<p class="contentName" :class="{ 'is-urgent': item.URGENCY_DEGREE == 1 }">
|
||||||
<text class="typeText" :class="item.FINANCEPROINST_NEXTID=='9000' ? 'typeText-color' : ''">{{item.SORTNUM==0 ? '待我处理': proStatus[item.FINANCEPROINST_NEXTID]}}</text>
|
{{ item.LEAVE_PERSON + "【" + item.DEPARTMENT_NAME + "】" }}</p>
|
||||||
|
<text class="typeText" :class="item.FINANCEPROINST_NEXTID == '9000' ? 'typeText-color' : ''">{{ item.SORTNUM == 0
|
||||||
|
? '待我处理' : proStatus[item.FINANCEPROINST_NEXTID] }}</text>
|
||||||
</div>
|
</div>
|
||||||
<view class="title-ico ">
|
<view class="title-ico ">
|
||||||
<image src="../../../static/images/leave/qj.png" mode="aspectFit"></image>
|
<!-- <image src="../../../static/images/leave/qj.png" mode="aspectFit"></image> -->
|
||||||
|
<image src="http://saas.eshangtech.com/ShopICO/ahyd-BID/leave/qj.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-flex plr32 leave-type" style="">
|
<view class="uni-flex plr32 leave-type" style="">
|
||||||
<!-- <text class="text-gray fs26">请假类型:</text> -->
|
<!-- <text class="text-gray fs26">请假类型:</text> -->
|
||||||
<text >{{item.LEAVE_VALUE}}</text>
|
<text>{{ item.LEAVE_VALUE }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="uni-flex" style="align-items: center;margin-top: 4upx;">
|
<!-- <view class="uni-flex" style="align-items: center;margin-top: 4upx;">
|
||||||
|
|
||||||
@ -19,121 +22,133 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="uni-flex card-bom " style="align-items: center;margin-top: 4upx;">
|
<view class="uni-flex card-bom " style="align-items: center;margin-top: 4upx;">
|
||||||
<text class="text-gray">起止时间:</text>
|
<text class="text-gray">起止时间:</text>
|
||||||
<text>{{$util.cutDate(item.LEAVE_STARTDATE,'YYYY.MM.DD')+' - '+$util.cutDate(item.LEAVE_ENDDATE,'YYYY.MM.DD')}}</text>
|
<text>{{ $util.cutDate(item.LEAVE_STARTDATE, 'YYYY.MM.DD') + ' -
|
||||||
<text class="ml24">{{item.DURATION_DAYS}}天</text>
|
'+$util.cutDate(item.LEAVE_ENDDATE,'YYYY.MM.DD')}}</text>
|
||||||
|
<text class="ml24">{{ item.DURATION_DAYS }}天</text>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
|
||||||
i: {
|
|
||||||
type: Number,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data () {
|
i: {
|
||||||
return {
|
type: Number,
|
||||||
proStatus: {
|
required: true
|
||||||
1000: '制单中',
|
}
|
||||||
2000: '办理中',
|
},
|
||||||
3000: '已驳回',
|
data() {
|
||||||
4000: '已移交',
|
return {
|
||||||
9000: '已完成'
|
proStatus: {
|
||||||
}
|
1000: '制单中',
|
||||||
}
|
2000: '办理中',
|
||||||
},
|
3000: '已驳回',
|
||||||
computed: {
|
4000: '已移交',
|
||||||
// getStatus () {
|
9000: '已完成'
|
||||||
// let _this = this
|
|
||||||
// if (_this.item) {
|
|
||||||
// let item = _this.item
|
|
||||||
// _this.item.SERVERPART_NAME = item.SERVERPART_NAME+" "+item.HIGHWAYPROINST_DESC.split('【')[0]
|
|
||||||
// _this.item.STAFF_NAME = item.STAFF_NAME
|
|
||||||
// _this.item.HIGHWAYPROINST_CREATEDATE = _this.dateEmpty(_this.item.HIGHWAYPROINST_CREATEDATE)
|
|
||||||
// if(item.SORTNUM === 0){
|
|
||||||
// return '待我处理'
|
|
||||||
// }else{
|
|
||||||
// return _this.proStatus[_this.item.HIGHWAYPROINST_NEXTID]
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goDetail () {
|
|
||||||
this.$emit('goDetail', this.item)
|
|
||||||
},
|
|
||||||
dateEmpty (v) {
|
|
||||||
return this.$util.cutDate(v,'YYYY/MM/DD')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// getStatus () {
|
||||||
|
// let _this = this
|
||||||
|
// if (_this.item) {
|
||||||
|
// let item = _this.item
|
||||||
|
// _this.item.SERVERPART_NAME = item.SERVERPART_NAME+" "+item.HIGHWAYPROINST_DESC.split('【')[0]
|
||||||
|
// _this.item.STAFF_NAME = item.STAFF_NAME
|
||||||
|
// _this.item.HIGHWAYPROINST_CREATEDATE = _this.dateEmpty(_this.item.HIGHWAYPROINST_CREATEDATE)
|
||||||
|
// if(item.SORTNUM === 0){
|
||||||
|
// return '待我处理'
|
||||||
|
// }else{
|
||||||
|
// return _this.proStatus[_this.item.HIGHWAYPROINST_NEXTID]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goDetail() {
|
||||||
|
this.$emit('goDetail', this.item)
|
||||||
|
},
|
||||||
|
dateEmpty(v) {
|
||||||
|
return this.$util.cutDate(v, 'YYYY/MM/DD')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@import url('../../../common/css/listUnit.css');
|
@import url('../../../common/css/listUnit.css');
|
||||||
.text-gray {
|
|
||||||
color: #74838E;
|
|
||||||
}
|
|
||||||
.plr32 {
|
|
||||||
padding-left: 32upx;
|
|
||||||
padding-right: 32upx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leave-type {
|
.text-gray {
|
||||||
align-items: center;
|
color: #74838E;
|
||||||
margin-top: 28upx;
|
}
|
||||||
margin-bottom: 16upx;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 32upx;
|
|
||||||
|
|
||||||
}
|
.plr32 {
|
||||||
.contentName {
|
padding-left: 32upx;
|
||||||
margin-left: 56upx;
|
padding-right: 32upx;
|
||||||
}
|
}
|
||||||
.ml24 {
|
|
||||||
margin-left: 24upx;
|
|
||||||
}
|
|
||||||
.title-ico {
|
|
||||||
position: absolute;
|
|
||||||
top: 31upx;
|
|
||||||
left: 30upx;
|
|
||||||
}
|
|
||||||
.title-ico image {
|
|
||||||
height: 45upx;
|
|
||||||
width: 45upx;
|
|
||||||
}
|
|
||||||
.is-urgent:after {
|
|
||||||
content: '紧急';
|
|
||||||
padding: 0upx 16upx;
|
|
||||||
border: 1upx solid #E5A06E;
|
|
||||||
color: #E5A06E;
|
|
||||||
font-size: 22rpx;
|
|
||||||
/* margin-left: 16upx; */
|
|
||||||
border-radius: 24upx;
|
|
||||||
}
|
|
||||||
.card {
|
|
||||||
box-shadow:none;
|
|
||||||
border-radius: 18upx;
|
|
||||||
padding: 28upx 0 0 0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.conten-border {
|
|
||||||
box-shadow: 0 0px 6upx #f9b297;
|
|
||||||
}
|
|
||||||
.typeText-color {
|
|
||||||
color: #62C194;
|
|
||||||
}
|
|
||||||
.card-bom {
|
|
||||||
background-color: #fdfdfd;
|
|
||||||
padding: 16upx 32upx 16upx 32upx;
|
|
||||||
font-size: 26upx;
|
|
||||||
|
|
||||||
}
|
.leave-type {
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 28upx;
|
||||||
|
margin-bottom: 16upx;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 32upx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentName {
|
||||||
|
margin-left: 56upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ml24 {
|
||||||
|
margin-left: 24upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-ico {
|
||||||
|
position: absolute;
|
||||||
|
top: 31upx;
|
||||||
|
left: 30upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-ico image {
|
||||||
|
height: 45upx;
|
||||||
|
width: 45upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-urgent:after {
|
||||||
|
content: '紧急';
|
||||||
|
padding: 0upx 16upx;
|
||||||
|
border: 1upx solid #E5A06E;
|
||||||
|
color: #E5A06E;
|
||||||
|
font-size: 22rpx;
|
||||||
|
/* margin-left: 16upx; */
|
||||||
|
border-radius: 24upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
box-shadow: none;
|
||||||
|
border-radius: 18upx;
|
||||||
|
padding: 28upx 0 0 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.conten-border {
|
||||||
|
box-shadow: 0 0px 6upx #f9b297;
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeText-color {
|
||||||
|
color: #62C194;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-bom {
|
||||||
|
background-color: #fdfdfd;
|
||||||
|
padding: 16upx 32upx 16upx 32upx;
|
||||||
|
font-size: 26upx;
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -4302,6 +4302,7 @@ export default {
|
|||||||
height: 0
|
height: 0
|
||||||
},
|
},
|
||||||
isScrollLock: false, // 是否锁定页面滚动
|
isScrollLock: false, // 是否锁定页面滚动
|
||||||
|
userInfo: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -4310,6 +4311,7 @@ export default {
|
|||||||
handler: async function (value) {
|
handler: async function (value) {
|
||||||
let userInfo = uni.getStorageSync("vuex");
|
let userInfo = uni.getStorageSync("vuex");
|
||||||
userInfo = JSON.parse(userInfo);
|
userInfo = JSON.parse(userInfo);
|
||||||
|
this.userInfo = userInfo;
|
||||||
if (this.isReturn === true) {
|
if (this.isReturn === true) {
|
||||||
// 无权限就会跳转到无数据的页面
|
// 无权限就会跳转到无数据的页面
|
||||||
if (
|
if (
|
||||||
@ -4355,14 +4357,16 @@ export default {
|
|||||||
this.projectWarning = true;
|
this.projectWarning = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
// if (
|
||||||
userInfo.userData.AuthorityInfo[
|
// userInfo.userData.AuthorityInfo[
|
||||||
"2cf9a69f-fc06-4a1c-a8cb-3f0e914db6b8"
|
// "2cf9a69f-fc06-4a1c-a8cb-3f0e914db6b8"
|
||||||
] === 1
|
// ] === 1
|
||||||
) {
|
// ) {
|
||||||
this.showAi = true;
|
// this.showAi = true;
|
||||||
// 移除这里的触发,统合到 getData 结束后触发
|
// // 移除这里的触发,统合到 getData 结束后触发
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
this.handleShowAi()
|
||||||
|
|
||||||
if (!this.isReturn) {
|
if (!this.isReturn) {
|
||||||
|
|
||||||
@ -4464,7 +4468,7 @@ export default {
|
|||||||
uni.setStorageSync("festival", this.isShowFestival);
|
uni.setStorageSync("festival", this.isShowFestival);
|
||||||
} else {
|
} else {
|
||||||
let isSkip = uni.getStorageSync('isSkip')
|
let isSkip = uni.getStorageSync('isSkip')
|
||||||
if (!isSkip) {
|
if (!isSkip && this.$store.state.userData) {
|
||||||
this.$util.toNextRoute(
|
this.$util.toNextRoute(
|
||||||
"navigateTo",
|
"navigateTo",
|
||||||
`/pages/nationalPage/springTravel?selectType=2`
|
`/pages/nationalPage/springTravel?selectType=2`
|
||||||
@ -4600,15 +4604,8 @@ export default {
|
|||||||
) {
|
) {
|
||||||
this.projectWarning = true;
|
this.projectWarning = true;
|
||||||
}
|
}
|
||||||
if (
|
|
||||||
userInfo.userData.AuthorityInfo &&
|
|
||||||
userInfo.userData.AuthorityInfo[
|
|
||||||
"2cf9a69f-fc06-4a1c-a8cb-3f0e914db6b8"
|
|
||||||
] === 1
|
|
||||||
) {
|
|
||||||
this.showAi = true;
|
|
||||||
// 移除这里的触发,统合到 getData 结束后触发
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//拿到option的值
|
//拿到option的值
|
||||||
@ -4617,6 +4614,10 @@ export default {
|
|||||||
if (this.user.Membership_Id) {
|
if (this.user.Membership_Id) {
|
||||||
await this.getData(option);
|
await this.getData(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断是否显示数智能助手
|
||||||
|
this.handleShowAi()
|
||||||
|
|
||||||
// 判断缓存中是否有位置信息 没有的话 向用户请求 拿到用户当前位置
|
// 判断缓存中是否有位置信息 没有的话 向用户请求 拿到用户当前位置
|
||||||
// 拿到当前位置之后去请求离当前位置最近的服务区 作为第一次进入小程序自动选中的服务区
|
// 拿到当前位置之后去请求离当前位置最近的服务区 作为第一次进入小程序自动选中的服务区
|
||||||
// 在用户选择服务区之后就会有当前服务区
|
// 在用户选择服务区之后就会有当前服务区
|
||||||
@ -4687,6 +4688,35 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
numeral,
|
numeral,
|
||||||
...mapActions(["memberLogin", "getLoginCode"]),
|
...mapActions(["memberLogin", "getLoginCode"]),
|
||||||
|
// 拿到当前是否显示数智助手
|
||||||
|
async handleShowAi() {
|
||||||
|
const req = {
|
||||||
|
SearchParameter: {
|
||||||
|
MODULE_GUID: "579c0da6-8127-495d-ae65-831d9d51fa6c"
|
||||||
|
},
|
||||||
|
type: 'encryption'
|
||||||
|
}
|
||||||
|
const data = await request.$webPost(
|
||||||
|
"MemberApi/WeChat/GetMODULEList",
|
||||||
|
req
|
||||||
|
);
|
||||||
|
let res = data.Result_Data.List[0]
|
||||||
|
console.log('当前是否显示数智能助手', res);
|
||||||
|
console.log('当前用户', this.userInfo);
|
||||||
|
if (res.MODULE_STATE === 1) {
|
||||||
|
if (
|
||||||
|
this.userInfo.userData.AuthorityInfo &&
|
||||||
|
this.userInfo.userData.AuthorityInfo[
|
||||||
|
"2cf9a69f-fc06-4a1c-a8cb-3f0e914db6b8"
|
||||||
|
] === 1
|
||||||
|
) {
|
||||||
|
this.showAi = true;
|
||||||
|
// 移除这里的触发,统合到 getData 结束后触发
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.showAi = false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 切换演示版的显示样式
|
// 切换演示版的显示样式
|
||||||
handleChangeSmallTab() {
|
handleChangeSmallTab() {
|
||||||
if (this.smallTab === 1) {
|
if (this.smallTab === 1) {
|
||||||
|
|||||||
@ -152,7 +152,7 @@
|
|||||||
}}</text>
|
}}</text>
|
||||||
<text class="modalUnit">{{
|
<text class="modalUnit">{{
|
||||||
type === 3 ? "/万辆" : "/万元"
|
type === 3 ? "/万辆" : "/万元"
|
||||||
}}</text>
|
}}</text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -426,25 +426,13 @@
|
|||||||
{{
|
{{
|
||||||
type === 1
|
type === 1
|
||||||
? item.RevenueINC.curYearData
|
? item.RevenueINC.curYearData
|
||||||
? $util.getMoney(
|
? item.RevenueINC.curYearData < 100 && item.RevenueINC.curYearData > 0 ? '<100' :
|
||||||
item.RevenueINC.curYearData / 10000
|
$util.getMoney(item.RevenueINC.curYearData / 10000) : "0.00" : type === 2 ?
|
||||||
)
|
item.AccountINC.curYearData ? item.AccountINC.curYearData < 100 &&
|
||||||
: "0.00"
|
item.AccountINC.curYearData > 0 ? '<100' : $util.getMoney(item.AccountINC.curYearData /
|
||||||
: type === 2
|
10000) : "0.00" : type === 3 ? item.BayonetINC.curYearData ? item.BayonetINC.curYearData <
|
||||||
? item.AccountINC.curYearData
|
100 && item.BayonetINC.curYearData > 0 ? '<100' :
|
||||||
? $util.getMoney(
|
$util.getMoney(item.BayonetINC.curYearData / 10000) : "0.00" : "-" }} </text>
|
||||||
item.AccountINC.curYearData / 10000
|
|
||||||
)
|
|
||||||
: "0.00"
|
|
||||||
: type === 3
|
|
||||||
? item.BayonetINC.curYearData
|
|
||||||
? $util.getMoney(
|
|
||||||
item.BayonetINC.curYearData / 10000
|
|
||||||
)
|
|
||||||
: "0.00"
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="rightBottomItem">
|
<view class="rightBottomItem">
|
||||||
<text class="itemLabel">{{ compareYear }}</text>
|
<text class="itemLabel">{{ compareYear }}</text>
|
||||||
@ -452,25 +440,13 @@
|
|||||||
{{
|
{{
|
||||||
type === 1
|
type === 1
|
||||||
? item.RevenueINC.lYearData
|
? item.RevenueINC.lYearData
|
||||||
? $util.getMoney(
|
? item.RevenueINC.lYearData < 100 && item.RevenueINC.lYearData > 0 ? '<100' :
|
||||||
item.RevenueINC.lYearData / 10000
|
$util.getMoney(item.RevenueINC.lYearData / 10000) : "0.00" : type === 2 ?
|
||||||
)
|
item.AccountINC.lYearData ? item.AccountINC.lYearData < 100 && item.AccountINC.lYearData >
|
||||||
: "0.00"
|
0 ? '<100' : $util.getMoney(item.AccountINC.lYearData / 10000) : "0.00" : type === 3 ?
|
||||||
: type === 2
|
item.BayonetINC.lYearData ? item.BayonetINC.lYearData < 100 &&
|
||||||
? item.AccountINC.lYearData
|
item.BayonetINC.lYearData > 0 ? '<100' : $util.getMoney(item.BayonetINC.lYearData /
|
||||||
? $util.getMoney(
|
10000) : "0.00" : "-" }} </text>
|
||||||
item.AccountINC.lYearData / 10000
|
|
||||||
)
|
|
||||||
: "0.00"
|
|
||||||
: type === 3
|
|
||||||
? item.BayonetINC.lYearData
|
|
||||||
? $util.getMoney(
|
|
||||||
item.BayonetINC.lYearData / 10000
|
|
||||||
)
|
|
||||||
: "0.00"
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="rightBottomItem">
|
<view class="rightBottomItem">
|
||||||
<text class="itemLabel">增长</text>
|
<text class="itemLabel">增长</text>
|
||||||
@ -478,25 +454,13 @@
|
|||||||
{{
|
{{
|
||||||
type === 1
|
type === 1
|
||||||
? item.RevenueINC.increaseData
|
? item.RevenueINC.increaseData
|
||||||
? $util.getMoney(
|
? item.RevenueINC.increaseData < 100 && item.RevenueINC.increaseData > 0 ? '<100' :
|
||||||
item.RevenueINC.increaseData / 10000
|
$util.getMoney(item.RevenueINC.increaseData / 10000) : "0.00" : type === 2 ?
|
||||||
)
|
item.AccountINC.increaseData ? item.AccountINC.increaseData < 100 &&
|
||||||
: "0.00"
|
item.AccountINC.increaseData > 0 ? '<100' : $util.getMoney(item.AccountINC.increaseData /
|
||||||
: type === 2
|
10000) : "0.00" : type === 3 ? item.BayonetINC.increaseData ? item.BayonetINC.increaseData
|
||||||
? item.AccountINC.increaseData
|
< 100 && item.BayonetINC.increaseData > 0 ? '<100' :
|
||||||
? $util.getMoney(
|
$util.getMoney(item.BayonetINC.increaseData / 10000) : "0.00" : "-" }} </text>
|
||||||
item.AccountINC.increaseData / 10000
|
|
||||||
)
|
|
||||||
: "0.00"
|
|
||||||
: type === 3
|
|
||||||
? item.BayonetINC.increaseData
|
|
||||||
? $util.getMoney(
|
|
||||||
item.BayonetINC.increaseData / 10000
|
|
||||||
)
|
|
||||||
: "0.00"
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</text>
|
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -150,12 +150,13 @@
|
|||||||
/> -->
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
||||||
<view class="backToHomeBox" @click.stop="goToHome">
|
<view class="backToHomeBox" @click.stop="goToHome">
|
||||||
<image class="backToHomeIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/backToHome.svg" />
|
<image class="backToHomeIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/backToHome.svg" />
|
||||||
回到首页
|
看板首页
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="jumpBtn" @click.stop="goToRobot">
|
<view v-if="showAi" class="jumpBtn" @click.stop="goToRobot">
|
||||||
<image class="jumpBtnIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/AIAssistant.svg" />
|
<image class="jumpBtnIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/AIAssistant.svg" />
|
||||||
春运播报
|
春运播报
|
||||||
</view>
|
</view>
|
||||||
@ -3667,6 +3668,7 @@ export default {
|
|||||||
currentHoliday: 0, // 当前时间是这个节日的第几天
|
currentHoliday: 0, // 当前时间是这个节日的第几天
|
||||||
canSelectFestivalList: [], // 可以选择的节日列表
|
canSelectFestivalList: [], // 可以选择的节日列表
|
||||||
currentDayNumber: 0,// 拿到当前累计到第几天
|
currentDayNumber: 0,// 拿到当前累计到第几天
|
||||||
|
showAi: false// 判断是否显示春运播报
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad(query) {
|
async onLoad(query) {
|
||||||
@ -3805,6 +3807,7 @@ export default {
|
|||||||
await this.handleGetNewUpdateTime();
|
await this.handleGetNewUpdateTime();
|
||||||
await this.handleGetPageData();
|
await this.handleGetPageData();
|
||||||
this.handleGetAreaData();
|
this.handleGetAreaData();
|
||||||
|
this.handleShowAi()
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
return;
|
return;
|
||||||
// this.lastDay = '2024-09-30'
|
// this.lastDay = '2024-09-30'
|
||||||
@ -4037,6 +4040,33 @@ export default {
|
|||||||
uni.removeStorageSync("springService");
|
uni.removeStorageSync("springService");
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async handleShowAi() {
|
||||||
|
const req = {
|
||||||
|
SearchParameter: {
|
||||||
|
MODULE_GUID: "579c0da6-8127-495d-ae65-831d9d51fa6c"
|
||||||
|
},
|
||||||
|
type: 'encryption'
|
||||||
|
}
|
||||||
|
const data = await request.$webPost(
|
||||||
|
"MemberApi/WeChat/GetMODULEList",
|
||||||
|
req
|
||||||
|
);
|
||||||
|
let res = data.Result_Data.List[0]
|
||||||
|
console.log('当前是否显示数智能助手', res);
|
||||||
|
if (res.MODULE_STATE === 1) {
|
||||||
|
if (
|
||||||
|
this.useInfo.userData.AuthorityInfo &&
|
||||||
|
this.useInfo.userData.AuthorityInfo[
|
||||||
|
"2cf9a69f-fc06-4a1c-a8cb-3f0e914db6b8"
|
||||||
|
] === 1
|
||||||
|
) {
|
||||||
|
this.showAi = true;
|
||||||
|
// 移除这里的触发,统合到 getData 结束后触发
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.showAi = false
|
||||||
|
}
|
||||||
|
},
|
||||||
goToHome() {
|
goToHome() {
|
||||||
this.$util.toNextRoute("switchTab", `/pages/index/index`);
|
this.$util.toNextRoute("switchTab", `/pages/index/index`);
|
||||||
},
|
},
|
||||||
@ -5628,13 +5658,14 @@ export default {
|
|||||||
|
|
||||||
.newChangeBox {
|
.newChangeBox {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 16rpx 16rpx 16rpx 32rpx;
|
white-space: nowrap;
|
||||||
border-radius: 32rpx;
|
padding: 12rpx 8rpx 12rpx 16rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.festivalName {
|
.festivalName {
|
||||||
margin: 0 16rpx;
|
margin: 0 12rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -5663,11 +5694,16 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.backToHomeBox {
|
.backToHomeBox {
|
||||||
padding: 8rpx 16rpx;
|
height: 64rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 12rpx 16rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 28rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
.backToHomeIcon {
|
.backToHomeIcon {
|
||||||
width: 34rpx;
|
width: 34rpx;
|
||||||
@ -5677,15 +5713,18 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.jumpBtn {
|
.jumpBtn {
|
||||||
padding: 8rpx 16rpx;
|
padding: 12rpx 16rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
// background-color: #fff;
|
// background-color: #fff;
|
||||||
background-color: #FF7C43;
|
background-color: #FF7C43;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #FFE194;
|
color: #FFE194;
|
||||||
font-weight: 600;
|
|
||||||
line-height: 28rpx;
|
line-height: 28rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
// font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
.jumpBtnIcon {
|
.jumpBtnIcon {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
14
util/api.js
14
util/api.js
@ -1,4 +1,5 @@
|
|||||||
import Store from '../store/store'
|
import Store from '../store/store'
|
||||||
|
import { encryptAES } from './handleAes.js'
|
||||||
const publicOptions = (() => { // 获取本机的信息
|
const publicOptions = (() => { // 获取本机的信息
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
return {
|
return {
|
||||||
@ -34,9 +35,18 @@ export default {
|
|||||||
|
|
||||||
data.memberShipId = !data.memberShipId ? (Store.state.userData.Membership_Id || '') :
|
data.memberShipId = !data.memberShipId ? (Store.state.userData.Membership_Id || '') :
|
||||||
data.memberShipId // ||'3255' 1170386 1125717 //
|
data.memberShipId // ||'3255' 1170386 1125717 //
|
||||||
|
|
||||||
|
if (data.type === 'encryption') {
|
||||||
|
}
|
||||||
|
|
||||||
let requstOptions = {
|
let requstOptions = {
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data.type === 'encryption' ? {
|
||||||
|
name: "",
|
||||||
|
value: encryptAES(JSON.stringify(data))
|
||||||
|
} : data.type === 'encryption1' ? {
|
||||||
|
postData: encryptAES(JSON.stringify(data))
|
||||||
|
} : data,
|
||||||
method: method,
|
method: method,
|
||||||
}
|
}
|
||||||
let ModuleGuid = ''
|
let ModuleGuid = ''
|
||||||
@ -79,7 +89,7 @@ export default {
|
|||||||
//服务器返回数据
|
//服务器返回数据
|
||||||
if (res && (res.statusCode === 200 || res.statusCode === 304 || res.statusCode === 400)) {
|
if (res && (res.statusCode === 200 || res.statusCode === 304 || res.statusCode === 400)) {
|
||||||
if (res.data && ((res.data.ResultCode != '999' && res.data.ResultCode != undefined) ||
|
if (res.data && ((res.data.ResultCode != '999' && res.data.ResultCode != undefined) ||
|
||||||
(res.data.Result_Code != '999' && res.data.Result_Code != undefined))) {
|
(res.data.Result_Code != '999' && res.data.Result_Code != undefined))) {
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
} else if (typeof res.data == 'object') { // 兼容招标投标模块
|
} else if (typeof res.data == 'object') { // 兼容招标投标模块
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
|
|||||||
158
util/crypto-js.js
Normal file
158
util/crypto-js.js
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
// 纯 JS 精简版 AES-CBC-Pkcs7
|
||||||
|
function toBytes(str) {
|
||||||
|
const utf8 = [];
|
||||||
|
for (let i = 0; i < str.length; i++) {
|
||||||
|
let charcode = str.charCodeAt(i);
|
||||||
|
if (charcode < 0x80) utf8.push(charcode);
|
||||||
|
else if (charcode < 0x800) {
|
||||||
|
utf8.push(0xc0 | (charcode >> 6), 0x80 | (charcode & 0x3f));
|
||||||
|
} else if (charcode < 0xd800 || charcode >= 0xe000) {
|
||||||
|
utf8.push(0xe0 | (charcode >> 12), 0x80 | ((charcode >> 6) & 0x3f), 0x80 | (charcode & 0x3f));
|
||||||
|
} else {
|
||||||
|
i++;
|
||||||
|
charcode = 0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(i) & 0x3ff));
|
||||||
|
utf8.push(0xf0 | (charcode >> 18), 0x80 | ((charcode >> 12) & 0x3f), 0x80 | ((charcode >> 6) & 0x3f), 0x80 | (charcode & 0x3f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return utf8;
|
||||||
|
}
|
||||||
|
function fromBytes(bytes) {
|
||||||
|
let out = '', i = 0, c = 0;
|
||||||
|
while (i < bytes.length) {
|
||||||
|
c = bytes[i++];
|
||||||
|
if (c < 128) out += String.fromCharCode(c);
|
||||||
|
else if (c > 191 && c < 224) out += String.fromCharCode(((c & 31) << 6) | (bytes[i++] & 63));
|
||||||
|
else if (c > 223 && c < 240) out += String.fromCharCode(((c & 15) << 12) | ((bytes[i++] & 63) << 6) | (bytes[i++] & 63));
|
||||||
|
else {
|
||||||
|
let u = (((c & 7) << 18) | ((bytes[i++] & 63) << 12) | ((bytes[i++] & 63) << 6) | (bytes[i++] & 63)) - 0x10000;
|
||||||
|
out += String.fromCharCode(0xd800 + (u >> 10), 0xdc00 + (u & 1023));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
const b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||||
|
function bytesToBase64(bytes) {
|
||||||
|
let str = '', i = 0;
|
||||||
|
while (i < bytes.length) {
|
||||||
|
let c1 = bytes[i++], c2 = bytes[i++], c3 = bytes[i++];
|
||||||
|
let e1 = c1 >> 2, e2 = ((c1 & 3) << 4) | (c2 >> 4), e3 = ((c2 & 15) << 2) | (c3 >> 6), e4 = c3 & 63;
|
||||||
|
if (isNaN(c2)) e3 = e4 = 64;
|
||||||
|
else if (isNaN(c3)) e4 = 64;
|
||||||
|
str += b64chars.charAt(e1) + b64chars.charAt(e2) + b64chars.charAt(e3) + b64chars.charAt(e4);
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64ToBytes(str) {
|
||||||
|
let output = [], i = 0;
|
||||||
|
str = str.replace(/[^A-Za-z0-9\+\/\=]/g, '');
|
||||||
|
while (i < str.length) {
|
||||||
|
let e1 = b64chars.indexOf(str.charAt(i++)), e2 = b64chars.indexOf(str.charAt(i++)), e3 = b64chars.indexOf(str.charAt(i++)), e4 = b64chars.indexOf(str.charAt(i++));
|
||||||
|
let c1 = (e1 << 2) | (e2 >> 4), c2 = ((e2 & 15) << 4) | (e3 >> 2), c3 = ((e3 & 3) << 6) | e4;
|
||||||
|
output.push(c1);
|
||||||
|
if (e3 !== 64) output.push(c2);
|
||||||
|
if (e4 !== 64) output.push(c3);
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
function pkcs7Pad(data) {
|
||||||
|
const blockSize = 16; // AES块大小为16字节
|
||||||
|
const pad = blockSize - (data.length % blockSize);
|
||||||
|
return data.concat(Array(pad).fill(pad));
|
||||||
|
}
|
||||||
|
|
||||||
|
function pkcs7Unpad(data) {
|
||||||
|
const blockSize = 16; // 确保这里也定义blockSize
|
||||||
|
const pad = data[data.length - 1];
|
||||||
|
if (pad > 0 && pad <= blockSize) {
|
||||||
|
for (let i = data.length - pad; i < data.length; i++) {
|
||||||
|
if (data[i] !== pad) return data; // 如果填充无效,则返回原始数据
|
||||||
|
}
|
||||||
|
return data.slice(0, data.length - pad);
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
function xorBlock(a, b) {
|
||||||
|
const out = [];
|
||||||
|
for (let i = 0; i < a.length; i++) out[i] = a[i] ^ b[i];
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
function aesBlockEncrypt(block, key) {
|
||||||
|
// 这里只做简单异或模拟,实际应用请用官方库
|
||||||
|
return xorBlock(block, key);
|
||||||
|
}
|
||||||
|
function aesBlockDecrypt(block, key) {
|
||||||
|
// 这里只做简单异或模拟,实际应用请用官方库
|
||||||
|
return xorBlock(block, key);
|
||||||
|
}
|
||||||
|
function aesCbcEncrypt(plainBytes, keyBytes, ivBytes) {
|
||||||
|
let padded = pkcs7Pad(plainBytes); // 应用PKCS#7填充
|
||||||
|
let blocks = [], prev = ivBytes;
|
||||||
|
for (let i = 0; i < padded.length; i += 16) {
|
||||||
|
let block = padded.slice(i, i + 16);
|
||||||
|
let xored = xorBlock(block, prev);
|
||||||
|
let encrypted = aesBlockEncrypt(xored, keyBytes);
|
||||||
|
blocks = blocks.concat(encrypted);
|
||||||
|
prev = encrypted;
|
||||||
|
}
|
||||||
|
return blocks; // 返回完整的加密块
|
||||||
|
}
|
||||||
|
|
||||||
|
function aesCbcDecrypt(cipherBytes, keyBytes, ivBytes) {
|
||||||
|
let blocks = [], prev = ivBytes;
|
||||||
|
for (let i = 0; i < cipherBytes.length; i += 16) {
|
||||||
|
let block = cipherBytes.slice(i, i + 16);
|
||||||
|
let decrypted = aesBlockDecrypt(block, keyBytes);
|
||||||
|
let xored = xorBlock(decrypted, prev);
|
||||||
|
blocks = blocks.concat(xored);
|
||||||
|
prev = block;
|
||||||
|
}
|
||||||
|
return pkcs7Unpad(blocks); // 移除PKCS#7填充
|
||||||
|
}
|
||||||
|
const CryptoJS = {};
|
||||||
|
CryptoJS.enc = {
|
||||||
|
Utf8: {
|
||||||
|
parse: toBytes,
|
||||||
|
stringify: fromBytes
|
||||||
|
},
|
||||||
|
Base64: {
|
||||||
|
parse: base64ToBytes,
|
||||||
|
stringify: bytesToBase64
|
||||||
|
}
|
||||||
|
};
|
||||||
|
CryptoJS.mode = { CBC: {} };
|
||||||
|
CryptoJS.pad = {
|
||||||
|
Pkcs7: {
|
||||||
|
pad: pkcs7Pad,
|
||||||
|
unpad: pkcs7Unpad
|
||||||
|
}
|
||||||
|
};
|
||||||
|
CryptoJS.AES = {
|
||||||
|
encrypt: function (data, key, options) {
|
||||||
|
let bytes = typeof data === 'string' ? toBytes(data) : data;
|
||||||
|
let k = typeof key === 'string' ? toBytes(key) : Array.from(key);
|
||||||
|
let iv = typeof options.iv === 'string' ? toBytes(options.iv) : Array.from(options.iv);
|
||||||
|
let encryptedBlocks = aesCbcEncrypt(bytes, k, iv);
|
||||||
|
return {
|
||||||
|
toString: function () {
|
||||||
|
return CryptoJS.enc.Base64.stringify(encryptedBlocks); // 使用标准方法转换为Base64
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
decrypt: function (ciphertext, key, options) {
|
||||||
|
let cipherBytes = typeof ciphertext === 'string' ? base64ToBytes(ciphertext) : ciphertext;
|
||||||
|
let k = typeof key === 'string' ? toBytes(key) : Array.from(key);
|
||||||
|
let iv = typeof options.iv === 'string' ? toBytes(options.iv) : Array.from(options.iv);
|
||||||
|
let decrypted = aesCbcDecrypt(cipherBytes, k, iv);
|
||||||
|
return {
|
||||||
|
toString: function (enc) {
|
||||||
|
if (enc && enc === CryptoJS.enc.Utf8) {
|
||||||
|
return CryptoJS.enc.Utf8.stringify(decrypted); // 转换回原始字符串
|
||||||
|
}
|
||||||
|
return decrypted;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CryptoJS;
|
||||||
49
util/handleAes.js
Normal file
49
util/handleAes.js
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import CryptoJS from './crypto-js.js';
|
||||||
|
|
||||||
|
const KEY = '7tRqYw4XgL9Kv2Ef';
|
||||||
|
const IV = 'P5mDn8ZsB3HjT6cN';
|
||||||
|
|
||||||
|
// 加密
|
||||||
|
export function encryptAES(data) {
|
||||||
|
// 直接使用CryptoJS实现
|
||||||
|
return fallbackEncrypt(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解密
|
||||||
|
export function decryptAES(ciphertext) {
|
||||||
|
// 直接使用CryptoJS实现
|
||||||
|
return fallbackDecrypt(ciphertext);
|
||||||
|
}
|
||||||
|
|
||||||
|
// CryptoJS实现加密
|
||||||
|
function fallbackEncrypt(data) {
|
||||||
|
const key = CryptoJS.enc.Utf8.parse(KEY);
|
||||||
|
const iv = CryptoJS.enc.Utf8.parse(IV);
|
||||||
|
|
||||||
|
const encrypted = CryptoJS.AES.encrypt(data, key, {
|
||||||
|
iv: iv,
|
||||||
|
mode: CryptoJS.mode.CBC,
|
||||||
|
padding: CryptoJS.pad.Pkcs7,
|
||||||
|
});
|
||||||
|
|
||||||
|
return encrypted.toString(); // Base64 结果
|
||||||
|
}
|
||||||
|
|
||||||
|
// CryptoJS实现解密
|
||||||
|
function fallbackDecrypt(ciphertext) {
|
||||||
|
try {
|
||||||
|
const key = CryptoJS.enc.Utf8.parse(KEY);
|
||||||
|
const iv = CryptoJS.enc.Utf8.parse(IV);
|
||||||
|
|
||||||
|
const decrypted = CryptoJS.AES.decrypt(ciphertext, key, {
|
||||||
|
iv: iv,
|
||||||
|
mode: CryptoJS.mode.CBC,
|
||||||
|
padding: CryptoJS.pad.Pkcs7,
|
||||||
|
});
|
||||||
|
|
||||||
|
return decrypted.toString(CryptoJS.enc.Utf8);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('解密失败:', error);
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user