更新
This commit is contained in:
parent
17b1ae834f
commit
2d8bc14de2
@ -106,10 +106,16 @@
|
|||||||
getgogo(index) {
|
getgogo(index) {
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
this.aindex = index
|
this.aindex = index
|
||||||
uni.reLaunch({
|
let chooseIdx = uni.getStorageSync("chooseIdx")
|
||||||
url: '/pages/staff/staff'
|
if (chooseIdx == 3) {
|
||||||
});
|
uni.reLaunch({
|
||||||
|
url: '/pages/businessManager/businessManager'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/staff/staff'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (index == 3) {
|
if (index == 3) {
|
||||||
this.aindex = index
|
this.aindex = index
|
||||||
|
|||||||
@ -532,6 +532,13 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/businessManager/businessManager",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@ -11,97 +11,106 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
import {setToken} from '@/utils/auth.js'
|
import {
|
||||||
import { getToken } from '@/utils/auth'
|
setToken
|
||||||
export default{
|
} from '@/utils/auth.js'
|
||||||
data(){
|
import {
|
||||||
return{
|
getToken
|
||||||
|
} from '@/utils/auth'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
phoneNumber: "",
|
phoneNumber: "",
|
||||||
shopinfo:0,
|
shopinfo: 0,
|
||||||
yd:false,
|
yd: false,
|
||||||
isButtonDisabled: false,
|
isButtonDisabled: false,
|
||||||
countdownTime: 60,
|
countdownTime: 60,
|
||||||
qh:[
|
qh: [{
|
||||||
{text:'密码登录'},
|
text: '密码登录'
|
||||||
{text:'验证码登录'},
|
},
|
||||||
|
{
|
||||||
|
text: '验证码登录'
|
||||||
|
},
|
||||||
// {text:'忘记密码'}
|
// {text:'忘记密码'}
|
||||||
],
|
],
|
||||||
tel:'',
|
tel: '',
|
||||||
yzm:'',
|
yzm: '',
|
||||||
wrod:'',
|
wrod: '',
|
||||||
activeid:0
|
activeid: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
if(getToken()){
|
if (getToken()) {
|
||||||
let info = uni.getStorageSync('userinfo')
|
let info = uni.getStorageSync('userinfo')
|
||||||
let chooseIdx = uni.getStorageSync("chooseIdx")
|
let chooseIdx = uni.getStorageSync("chooseIdx")
|
||||||
if(chooseIdx==null){
|
if (chooseIdx == null) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/Login/login'
|
url: '/pages/Login/login'
|
||||||
})
|
})
|
||||||
}
|
} else if (chooseIdx == 0) {
|
||||||
else if(chooseIdx == 0){
|
uni.navigateTo({
|
||||||
uni.navigateTo({
|
url: '/pages/index/newindex'
|
||||||
url:'/pages/index/newindex'
|
})
|
||||||
})
|
} else if (chooseIdx == 2) {
|
||||||
}else if(chooseIdx == 2){
|
uni.navigateTo({
|
||||||
uni.navigateTo({
|
url: '/pages/staff/staff'
|
||||||
url:'/pages/staff/staff'
|
})
|
||||||
})
|
} else if (chooseIdx == 3) {
|
||||||
}
|
uni.navigateTo({
|
||||||
else if(chooseIdx == 1){
|
url: '/pages/businessManager/businessManager'
|
||||||
uni.navigateTo({
|
})
|
||||||
url:'/pages/authority/authority'
|
} else if (chooseIdx == 1) {
|
||||||
})
|
uni.navigateTo({
|
||||||
}
|
url: '/pages/authority/authority'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/Login/login'
|
url: '/pages/Login/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
buttonText() {
|
buttonText() {
|
||||||
if (this.isButtonDisabled) {
|
if (this.isButtonDisabled) {
|
||||||
return `${this.countdownTime}s 后重新发送`;
|
return `${this.countdownTime}s 后重新发送`;
|
||||||
} else {
|
} else {
|
||||||
return "获取验证码";
|
return "获取验证码";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
//登录请求
|
//登录请求
|
||||||
getlogin(){
|
getlogin() {
|
||||||
if(this.yd == false){
|
if (this.yd == false) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'请仔细阅读用户协议与隐私政策!',
|
title: '请仔细阅读用户协议与隐私政策!',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(this.tel == ''){
|
if (this.tel == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'输入框不能为空!',
|
title: '输入框不能为空!',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.activeid == 0){
|
if (this.activeid == 0) {
|
||||||
const data ={
|
const data = {
|
||||||
username:this.tel,
|
username: this.tel,
|
||||||
password:this.wrod,
|
password: this.wrod,
|
||||||
type:0
|
type: 0
|
||||||
}
|
}
|
||||||
request({
|
request({
|
||||||
url: '/loginApp',
|
url: '/loginApp',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
setToken(res.token)
|
setToken(res.token)
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title:'登录成功',
|
// title:'登录成功',
|
||||||
@ -113,18 +122,18 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.activeid == 1){
|
if (this.activeid == 1) {
|
||||||
const data ={
|
const data = {
|
||||||
phone:this.tel,
|
phone: this.tel,
|
||||||
code:this.yzm,
|
code: this.yzm,
|
||||||
type:1
|
type: 1
|
||||||
}
|
}
|
||||||
request({
|
request({
|
||||||
url: '/loginApp',
|
url: '/loginApp',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
setToken(res.token)
|
setToken(res.token)
|
||||||
|
|
||||||
this.userinfo()
|
this.userinfo()
|
||||||
@ -135,8 +144,8 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
userinfo(){
|
userinfo() {
|
||||||
if(this.shopinfo == 0){
|
if (this.shopinfo == 0) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中'
|
title: '加载中'
|
||||||
});
|
});
|
||||||
@ -144,25 +153,25 @@
|
|||||||
url: '/getJcPartnerInfo',
|
url: '/getJcPartnerInfo',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
if(res.code == 500){
|
if (res.code == 500) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:"信息有误"
|
title: "信息有误"
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let userJson = {}
|
let userJson = {}
|
||||||
userJson.userId = res.user.userId
|
userJson.userId = res.user.userId
|
||||||
uni.setStorageSync('userinfo',res.user)
|
uni.setStorageSync('userinfo', res.user)
|
||||||
this.goselect()
|
this.goselect()
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
this.goselect()
|
this.goselect()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.shopinfo == 1){
|
if (this.shopinfo == 1) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中'
|
title: '加载中'
|
||||||
});
|
});
|
||||||
@ -170,15 +179,15 @@
|
|||||||
url: '/getJcWorkerInfo',
|
url: '/getJcWorkerInfo',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
let userJson = {}
|
let userJson = {}
|
||||||
userJson.userId = res.user.userId
|
userJson.userId = res.user.userId
|
||||||
uni.setStorageSync('userinfo',res.user)
|
uni.setStorageSync('userinfo', res.user)
|
||||||
uni.setStorageSync('partnerId',res.partnerInfo.partnerId)
|
uni.setStorageSync('partnerId', res.partnerInfo.partnerId)
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/staff/staff'
|
url: '/pages/staff/staff'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -187,30 +196,30 @@
|
|||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
getxz(index){
|
getxz(index) {
|
||||||
this.activeid = index
|
this.activeid = index
|
||||||
|
|
||||||
},
|
},
|
||||||
getxz1(){
|
getxz1() {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/Login/modify'
|
url: '/pages/Login/modify'
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
goregister(){
|
goregister() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/login/register'
|
url: '/pages/login/register'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goforgot(){
|
goforgot() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/login/forgot'
|
url: '/pages/login/forgot'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goselect(){
|
goselect() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 验证码方法
|
// 验证码方法
|
||||||
@ -224,80 +233,82 @@
|
|||||||
this.tel = '';
|
this.tel = '';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.isButtonDisabled) {
|
if (this.isButtonDisabled) {
|
||||||
return; // 如果按钮已禁用,则直接返回
|
return; // 如果按钮已禁用,则直接返回
|
||||||
}
|
}
|
||||||
const data = {
|
const data = {
|
||||||
phone:this.tel,
|
phone: this.tel,
|
||||||
}
|
}
|
||||||
request({
|
request({
|
||||||
url: '/loginSmsCode',
|
url: '/loginSmsCode',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: data
|
params: data
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'验证码已发送 请注意查收',
|
title: '验证码已发送 请注意查收',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
|
||||||
}else{
|
|
||||||
uni.showToast({
|
|
||||||
title:'网络不佳请稍后再试',
|
|
||||||
icon:'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '网络不佳请稍后再试',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
this.disableButton(); // 禁用按钮
|
this.disableButton(); // 禁用按钮
|
||||||
this.startCountdown(); // 启动倒计时
|
this.startCountdown(); // 启动倒计时
|
||||||
|
|
||||||
},
|
},
|
||||||
disableButton() {
|
disableButton() {
|
||||||
this.isButtonDisabled = true;
|
this.isButtonDisabled = true;
|
||||||
},
|
},
|
||||||
enableButton() {
|
enableButton() {
|
||||||
this.isButtonDisabled = false;
|
this.isButtonDisabled = false;
|
||||||
},
|
},
|
||||||
startCountdown() {
|
startCountdown() {
|
||||||
let countdown = setInterval(() => {
|
let countdown = setInterval(() => {
|
||||||
this.countdownTime--;
|
this.countdownTime--;
|
||||||
if (this.countdownTime === 0) {
|
if (this.countdownTime === 0) {
|
||||||
clearInterval(countdown);
|
clearInterval(countdown);
|
||||||
this.enableButton(); // 启用按钮
|
this.enableButton(); // 启用按钮
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.jsq{
|
.jsq {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #0078FF;
|
color: #0078FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
background: none !important;
|
background: none !important;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
|
||||||
button:focus {
|
|
||||||
color: #0078FF;
|
|
||||||
outline: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.content{
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: linear-gradient(180deg, rgba(13,46,141,0.2) 0%, rgba(255,255,255,0) 100%);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.top{
|
button:focus {
|
||||||
|
color: #0078FF;
|
||||||
|
outline: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: linear-gradient(180deg, rgba(13, 46, 141, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.top {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0px 27px;
|
padding: 0px 27px;
|
||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
@ -308,7 +319,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh);
|
height: calc(100vh);
|
||||||
}
|
}
|
||||||
.touxiang{
|
|
||||||
|
.touxiang {
|
||||||
width: 88px;
|
width: 88px;
|
||||||
height: 88px;
|
height: 88px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -316,17 +328,20 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
image{
|
|
||||||
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.twotap{
|
|
||||||
|
.twotap {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
view{
|
|
||||||
|
view {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: Microsoft YaHei;
|
font-family: Microsoft YaHei;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -334,20 +349,23 @@
|
|||||||
margin-right: 38.5px;
|
margin-right: 38.5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.blck{
|
|
||||||
|
.blck {
|
||||||
color: #333333 !important;
|
color: #333333 !important;
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
}
|
}
|
||||||
.inputs{
|
|
||||||
|
.inputs {
|
||||||
height: 54px;
|
height: 54px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 16px 0px;
|
padding: 16px 0px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 2px solid #E8E8E8 ;
|
border-bottom: 2px solid #E8E8E8;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.wjworb{
|
|
||||||
|
.wjworb {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -357,7 +375,8 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
.dl{
|
|
||||||
|
.dl {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
background: linear-gradient(-46deg, #0853C4 0%, #4282D8 80%);
|
background: linear-gradient(-46deg, #0853C4 0%, #4282D8 80%);
|
||||||
@ -370,7 +389,8 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 22px;
|
margin-top: 22px;
|
||||||
}
|
}
|
||||||
.hging{
|
|
||||||
|
.hging {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -378,26 +398,30 @@
|
|||||||
color: #636363;
|
color: #636363;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.wx{
|
|
||||||
|
.wx {
|
||||||
width: 38px;
|
width: 38px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
image{
|
|
||||||
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hui{
|
|
||||||
|
.hui {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
.dbottom{
|
|
||||||
|
.dbottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -410,23 +434,26 @@
|
|||||||
bottom: 25px;
|
bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lan{
|
.lan {
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
}
|
}
|
||||||
.box-box{
|
|
||||||
|
.box-box {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.bb-top{
|
|
||||||
|
.bb-top {
|
||||||
height: 65px;
|
height: 65px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.bb-bai{
|
|
||||||
|
.bb-bai {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -437,8 +464,9 @@
|
|||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
}
|
}
|
||||||
.bb-hui{
|
|
||||||
height: 100%;
|
.bb-hui {
|
||||||
|
height: 100%;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -448,13 +476,15 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
.bb-baibox{
|
|
||||||
|
.bb-baibox {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
.anniulanan{
|
|
||||||
|
.anniulanan {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
@ -465,20 +495,23 @@
|
|||||||
background-color: #0D2E8D;
|
background-color: #0D2E8D;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.dalan{
|
|
||||||
|
.dalan {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
.axquan{
|
|
||||||
|
.axquan {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 1px solid #AAAAAA;
|
border: 1px solid #AAAAAA;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
.axquanl{
|
|
||||||
|
.axquanl {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@ -486,5 +519,4 @@
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
background-color: #0D2E8D;
|
background-color: #0D2E8D;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
@ -34,6 +34,9 @@
|
|||||||
<view class="bb-bai" :class="{'shendu' : shopinfo == 2}" @click="shopinfo = 2">
|
<view class="bb-bai" :class="{'shendu' : shopinfo == 2}" @click="shopinfo = 2">
|
||||||
<text>员工登录</text>
|
<text>员工登录</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="bb-bai" :class="{'shendu' : shopinfo == 3}" @click="shopinfo = 3">
|
||||||
|
<text>业务登录</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bb-baibox">
|
<view class="bb-baibox">
|
||||||
@ -231,7 +234,7 @@
|
|||||||
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.setStorageSync('staffinfo', res.data.user)
|
uni.setStorageSync('staffinfo', res.data)
|
||||||
uni.setStorageSync('partnerId', res.data.partnerId)
|
uni.setStorageSync('partnerId', res.data.partnerId)
|
||||||
uni.setStorageSync('roleSelect', 'worker')
|
uni.setStorageSync('roleSelect', 'worker')
|
||||||
uni.setStorageSync('userId', res.data.user.id)
|
uni.setStorageSync('userId', res.data.user.id)
|
||||||
@ -243,6 +246,29 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
if (this.shopinfo == 3) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
request({
|
||||||
|
url: '/rescue/getJcWorkerInfo',
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.setStorageSync('staffinfo', res.data)
|
||||||
|
uni.setStorageSync('partnerId', res.data.partnerId)
|
||||||
|
uni.setStorageSync('roleSelect', 'businessManager')
|
||||||
|
uni.setStorageSync('userId', res.data.user.id)
|
||||||
|
uni.hideLoading();
|
||||||
|
this.$startSocketConnect(res.data.user.id)
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/businessManager/businessManager'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.shopinfo == 1) {
|
if (this.shopinfo == 1) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|||||||
1526
pages/businessManager/businessManager.vue
Normal file
1526
pages/businessManager/businessManager.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -255,6 +255,7 @@
|
|||||||
xinlist: [],
|
xinlist: [],
|
||||||
zhilist: [],
|
zhilist: [],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
userInfo: {},
|
||||||
recordTime: Number(new Date()),
|
recordTime: Number(new Date()),
|
||||||
baseUrl: this.$baseImageUrl,
|
baseUrl: this.$baseImageUrl,
|
||||||
goodsId: '',
|
goodsId: '',
|
||||||
@ -266,6 +267,10 @@
|
|||||||
{
|
{
|
||||||
name: '上门取车',
|
name: '上门取车',
|
||||||
label: 1
|
label: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '业务接车',
|
||||||
|
label: 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
radiovalue1: 0,
|
radiovalue1: 0,
|
||||||
@ -299,6 +304,46 @@
|
|||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
await this.getinitialize()
|
await this.getinitialize()
|
||||||
|
this.userInfo = uni.getStorageSync('staffinfo')
|
||||||
|
if (!this.userInfo || !this.userInfo.userInfo) {
|
||||||
|
request({
|
||||||
|
url: '/rescue/getJcWorkerInfo',
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.setStorageSync('staffinfo', res.data)
|
||||||
|
uni.setStorageSync('userId', res.data.user.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('当前用户信息', this.userInfo);
|
||||||
|
if (this.userInfo.userInfo) {
|
||||||
|
this.otherPhone = this.userInfo.userInfo.mobile
|
||||||
|
this.otherName = this.userInfo.userInfo.nickname
|
||||||
|
}
|
||||||
|
if (options.type) {
|
||||||
|
if (options.type === 'business') {
|
||||||
|
// 业务经理接车
|
||||||
|
//1.设置默认接车为业务接车
|
||||||
|
this.radiovalue1 = 2
|
||||||
|
|
||||||
|
//2.找出对应的客户来源和业务
|
||||||
|
console.log('客户来源', this.columns);
|
||||||
|
console.log('当前userId', uni.getStorageSync('userId'));
|
||||||
|
const result = this.findUserWithParent(this.columns, uni.getStorageSync('userId'))
|
||||||
|
console.log('查询出来的shuju ', result)
|
||||||
|
if (result) {
|
||||||
|
this.customerSource = result.child.name
|
||||||
|
this.customerSourceId = result.child.id
|
||||||
|
this.businessChannel = result.parent.name
|
||||||
|
this.businessChannelId = result.parent.id
|
||||||
|
this.cssj = this.customerSourceId
|
||||||
|
}
|
||||||
|
console.log(this.customerSource, this.businessChannel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@ -322,13 +367,30 @@
|
|||||||
this.customerSourceId = e.detail.value[1].value
|
this.customerSourceId = e.detail.value[1].value
|
||||||
this.businessChannel = e.detail.value[0].text
|
this.businessChannel = e.detail.value[0].text
|
||||||
this.businessChannelId = e.detail.value[0].value
|
this.businessChannelId = e.detail.value[0].value
|
||||||
console.log('客户来源', this.customerSource);
|
|
||||||
console.log('bangding', this.cssj);
|
|
||||||
},
|
},
|
||||||
onnodeclick(e) {
|
onnodeclick(e) {
|
||||||
console.log('选择的内容', e);
|
console.log('选择的内容', e);
|
||||||
console.log('bangding', this.cssj);
|
console.log('bangding', this.cssj);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* @param {Object} data
|
||||||
|
* @param {Object} userId
|
||||||
|
*/
|
||||||
|
findUserWithParent(data, userId) {
|
||||||
|
for (const parent of data) {
|
||||||
|
if (Array.isArray(parent.children)) {
|
||||||
|
for (const child of parent.children) {
|
||||||
|
if (child.userIds && child.userIds.includes(userId)) {
|
||||||
|
return {
|
||||||
|
parent,
|
||||||
|
child
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null; // 未找到
|
||||||
|
},
|
||||||
async getCustomerSource(searchValue) {
|
async getCustomerSource(searchValue) {
|
||||||
console.log('搜索内容', searchValue);
|
console.log('搜索内容', searchValue);
|
||||||
let res = await request({
|
let res = await request({
|
||||||
|
|||||||
@ -81,7 +81,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="on-input" v-if="item.nodeNames">
|
<view class="on-input" v-if="item.nodeNames">
|
||||||
<uni-icons type="more" color="#999999" size="16"></uni-icons>
|
<uni-icons type="more" color="#999999" size="16"></uni-icons>
|
||||||
<text class="single-line" style="color: red;" v-if="tapValue == '4'">需复检项目:</text>
|
<text class="single-line" style="color: red;" v-if="tapValue == '4'">需复检|重检项目:</text>
|
||||||
<text class="single-line" style="color: red;width: 150rpx;" v-else>异常项目:</text>
|
<text class="single-line" style="color: red;width: 150rpx;" v-else>异常项目:</text>
|
||||||
<text class="multi-line" :style="true ? 'color:red' : ''">{{ item.nodeNames }}</text>
|
<text class="multi-line" :style="true ? 'color:red' : ''">{{ item.nodeNames }}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -148,17 +148,16 @@
|
|||||||
text: "进行中",
|
text: "进行中",
|
||||||
value: "0"
|
value: "0"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
text: "已完成",
|
text: "已完成",
|
||||||
value: "1",
|
value: "1",
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// text: "待重检",
|
||||||
|
// value: "2"
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
text: "待重检",
|
text: "待审核",
|
||||||
value: "2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "待复检",
|
|
||||||
value: "4"
|
value: "4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -293,8 +292,7 @@
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
ids: ids.join(','),
|
ids: ids.join(','),
|
||||||
status: 3,
|
type: this.tapValue == '4' ? '0' : ''
|
||||||
type: this.tapValue == '7' ? '0' : ''
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (this.tapValue == '5') {
|
} else if (this.tapValue == '5') {
|
||||||
|
|||||||
@ -259,8 +259,14 @@
|
|||||||
console.log('当前选择的汇报对象', this.reportTosStr)
|
console.log('当前选择的汇报对象', this.reportTosStr)
|
||||||
if (res.data.filePath) {
|
if (res.data.filePath) {
|
||||||
this.fileList1 = res.data.filePath.split(',').map(item => {
|
this.fileList1 = res.data.filePath.split(',').map(item => {
|
||||||
return {
|
if (!item.includes('http')) {
|
||||||
url: this.baseImageUrl + "/" + item
|
return {
|
||||||
|
url: this.baseImageUrl + "/" + item
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
url: item
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,6 +131,18 @@
|
|||||||
<uni-icons type="right" color="#999999" size="16"></uni-icons>
|
<uni-icons type="right" color="#999999" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="on-input" @click="checkoutRole()">
|
||||||
|
<view class="dix">
|
||||||
|
<view class="d-icon">
|
||||||
|
<image src="../../static/detection/tc.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view class="aa">{{chooseIdx == 3 ? '切换员工端' : '切换业务经理端'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<uni-icons type="right" color="#999999" size="16"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-popup ref="alertDialog" type="dialog">
|
<uni-popup ref="alertDialog" type="dialog">
|
||||||
@ -157,13 +169,15 @@
|
|||||||
msg: '3',
|
msg: '3',
|
||||||
user: {},
|
user: {},
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
|
chooseIdx: undefined,
|
||||||
partnerId: '',
|
partnerId: '',
|
||||||
myindex: {},
|
myindex: {},
|
||||||
lookAppointment: false
|
lookAppointment: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.baseUrl = this.$baseImageUrl + '/'
|
this.baseUrl = this.$baseImageUrl + '/',
|
||||||
|
this.chooseIdx = uni.getStorageSync("chooseIdx")
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.user = uni.getStorageSync('staffinfo')
|
this.user = uni.getStorageSync('staffinfo')
|
||||||
@ -207,6 +221,20 @@
|
|||||||
url: `/pages/editUserInfo/editUserInfo`
|
url: `/pages/editUserInfo/editUserInfo`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
checkoutRole() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
if (this.chooseIdx == 3) {
|
||||||
|
uni.setStorageSync("chooseIdx", 2)
|
||||||
|
} else {
|
||||||
|
uni.setStorageSync("chooseIdx", 3)
|
||||||
|
}
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.hideLoading();
|
||||||
|
}, 1000);
|
||||||
|
this.chooseIdx = uni.getStorageSync("chooseIdx")
|
||||||
|
},
|
||||||
dialogClose() {
|
dialogClose() {
|
||||||
this.$refs.alertDialog.close()
|
this.$refs.alertDialog.close()
|
||||||
console.log('点击关闭')
|
console.log('点击关闭')
|
||||||
|
|||||||
@ -69,11 +69,11 @@
|
|||||||
<view class="title_">资料统计</view>
|
<view class="title_">资料统计</view>
|
||||||
<view class="box_">
|
<view class="box_">
|
||||||
<view class="d_b" style="display: flex; flex-wrap: wrap;">
|
<view class="d_b" style="display: flex; flex-wrap: wrap;">
|
||||||
<view class="three_">
|
<view class="three_" @click="goxiangqing2(6,'add')">
|
||||||
<view class="text_">新增</view>
|
<view class="text_">新增</view>
|
||||||
<view class=""> {{fileRes.addCount || 0}}</view>
|
<view class=""> {{fileRes.addCount || 0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="three_">
|
<view class="three_" @click="goxiangqing2(6,'update')">
|
||||||
<view class="text_">修改</view>
|
<view class="text_">修改</view>
|
||||||
<view class=""> {{fileRes.updateCount || 0}}</view>
|
<view class=""> {{fileRes.updateCount || 0}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -467,6 +467,12 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//
|
||||||
|
goxiangqing2(id, type) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/statistics/statislist?id=' + id + '&type=' + type
|
||||||
|
})
|
||||||
|
},
|
||||||
goOrderList() {
|
goOrderList() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/ordermanage'
|
url: '/pages/index/ordermanage'
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
<image src="http://www.nuoyunr.com/lananRsc/detection/qs.png" mode=""></image>
|
<image src="http://www.nuoyunr.com/lananRsc/detection/qs.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="waigg">
|
<view class="waigg">
|
||||||
<view class="top-boxx" v-for="(item,index) in datas" :key="index" @click ="goProjectList(item)">
|
<view class="top-boxx" v-for="(item,index) in datas" :key="index" @click="goProjectList(item)">
|
||||||
<view class="t-top">
|
<view class="t-top">
|
||||||
|
|
||||||
<view class="t-title" style="display: flex; align-items: center; ">{{ item.name || '' }}:
|
<view class="t-title" style="display: flex; align-items: center; ">{{ item.name || '' }}:
|
||||||
@ -103,15 +103,35 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view v-if="id == 6">
|
||||||
|
<view class="jsy" v-if="datas.length == 0">
|
||||||
|
<image src="http://www.nuoyunr.com/lananRsc/detection/qs.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="top-boxx2" v-for="(item,index) in datas" :key="index"
|
||||||
|
style="display: flex;padding: 15rpx;justify-content: space-between;">
|
||||||
|
<view class="" style="">
|
||||||
|
<view class="" style=" ">
|
||||||
|
资料名称:{{ item.fileName || '' }}
|
||||||
|
</view>
|
||||||
|
<view style="margin-top: 20rpx;">{{ type=='add' ? '新增时间' : '修改时间' }}
|
||||||
|
{{formatDate(item.createTime)}}
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin-top: 20rpx;">类型: {{ item.type == 2 ?'文件' :'文件夹' }}</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.type=='2'" style="color: #3D89FC;" @click="viewFile(item.filePath)">查看文件</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
|
import * as utils from '../../utils/utils';
|
||||||
import headersVue from "@/components/header/headers.vue";
|
import headersVue from "@/components/header/headers.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -126,6 +146,7 @@
|
|||||||
range: ['2023-9-28', '2023-10-7'],
|
range: ['2023-9-28', '2023-10-7'],
|
||||||
titles: '',
|
titles: '',
|
||||||
businessId: '',
|
businessId: '',
|
||||||
|
type: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -170,11 +191,20 @@
|
|||||||
this.getCustomerSourceCount()
|
this.getCustomerSourceCount()
|
||||||
this.titles = '客户来源统计'
|
this.titles = '客户来源统计'
|
||||||
}
|
}
|
||||||
|
if (this.id == 6) {
|
||||||
|
this.getMonth()
|
||||||
|
this.getFileBytype()
|
||||||
|
this.type = option.type
|
||||||
|
this.titles = '资料统计'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
formatDate(time) {
|
||||||
|
return utils.formatDateTimeToMinute(time);
|
||||||
|
},
|
||||||
gettime() {
|
gettime() {
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
@ -197,6 +227,28 @@
|
|||||||
this.range[1] = currentTime
|
this.range[1] = currentTime
|
||||||
|
|
||||||
},
|
},
|
||||||
|
getMonth() {
|
||||||
|
// 获取当前时间
|
||||||
|
const now = new Date();
|
||||||
|
|
||||||
|
// 获取年份和月份
|
||||||
|
const year = now.getFullYear();
|
||||||
|
let month = now.getMonth() + 1; // 月份从 0 开始
|
||||||
|
|
||||||
|
// 补零处理
|
||||||
|
const formatNumber = (num) => (num < 10 ? '0' + num : num);
|
||||||
|
|
||||||
|
// 本月第一天
|
||||||
|
const firstDay = `${year}-${formatNumber(month)}-01`;
|
||||||
|
|
||||||
|
// 获取本月最后一天
|
||||||
|
const lastDate = new Date(year, month, 0).getDate();
|
||||||
|
const lastDay = `${year}-${formatNumber(month)}-${formatNumber(lastDate)}`;
|
||||||
|
|
||||||
|
// 设置范围
|
||||||
|
this.range[0] = firstDay;
|
||||||
|
this.range[1] = lastDay;
|
||||||
|
},
|
||||||
async getone() {
|
async getone() {
|
||||||
let data = {
|
let data = {
|
||||||
startTime: this.range[0],
|
startTime: this.range[0],
|
||||||
@ -223,11 +275,11 @@
|
|||||||
this.datas = res.data
|
this.datas = res.data
|
||||||
|
|
||||||
},
|
},
|
||||||
goProjectList(data){
|
goProjectList(data) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/index/staffProjectList/staffProjectList?customerSource=" + data.name
|
url: "/pages/index/staffProjectList/staffProjectList?customerSource=" + data.name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getthree() {
|
async getthree() {
|
||||||
let data = {
|
let data = {
|
||||||
startTime: this.range[0],
|
startTime: this.range[0],
|
||||||
@ -241,6 +293,40 @@
|
|||||||
this.datas = res.data
|
this.datas = res.data
|
||||||
|
|
||||||
},
|
},
|
||||||
|
viewFile(filePath) {
|
||||||
|
let url = ''
|
||||||
|
//判断地址是否包含http如果包含就不拼接前缀
|
||||||
|
if (filePath.indexOf('http') === -1) {
|
||||||
|
url = this.$baseImageUrl + '/' + filePath
|
||||||
|
} else {
|
||||||
|
url = filePath
|
||||||
|
}
|
||||||
|
uni.downloadFile({
|
||||||
|
url: url,
|
||||||
|
success: (res) => { // 使用箭头函数
|
||||||
|
var filePath = res.tempFilePath;
|
||||||
|
this.isLoading = false;
|
||||||
|
|
||||||
|
uni.openDocument({
|
||||||
|
filePath: filePath,
|
||||||
|
showMenu: true,
|
||||||
|
success: (res) => {
|
||||||
|
console.log("文件打开成功");
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error("文件打开失败", err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '文件打开失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error("文件下载失败", err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
async getfour() {
|
async getfour() {
|
||||||
let data = {
|
let data = {
|
||||||
startTime: this.range[0],
|
startTime: this.range[0],
|
||||||
@ -267,6 +353,23 @@
|
|||||||
})
|
})
|
||||||
this.datas = res.data
|
this.datas = res.data
|
||||||
},
|
},
|
||||||
|
async getFileBytype() {
|
||||||
|
let data = {
|
||||||
|
startTime: this.range[0],
|
||||||
|
endTime: this.range[1],
|
||||||
|
servicePackageId: 'jiance'
|
||||||
|
}
|
||||||
|
let res = await request({
|
||||||
|
url: '/partnerOwn/partner/getFileByType',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
if (this.type == 'add') {
|
||||||
|
this.datas = res.data.insertFile
|
||||||
|
} else {
|
||||||
|
this.datas = res.data.updateFile
|
||||||
|
}
|
||||||
|
},
|
||||||
maskClick(e) {
|
maskClick(e) {
|
||||||
console.log('执行了吗');
|
console.log('执行了吗');
|
||||||
if (this.id == 1) {
|
if (this.id == 1) {
|
||||||
@ -356,6 +459,16 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-boxx2 {
|
||||||
|
border-radius: 5px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
// padding: 18px;
|
||||||
|
background-color: white;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cont-box {
|
.cont-box {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user