更新功能,修复bug
This commit is contained in:
parent
027384067d
commit
5b9c171cbc
@ -1,7 +1,7 @@
|
||||
import oahttp from "@/utils/oahttp.js";
|
||||
|
||||
/**
|
||||
* 获取代办事项 已处理事项
|
||||
* 登录
|
||||
*/
|
||||
export const loginAccount = (data) => oahttp.post('/login/account', data, { noAuth: true })
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
<view class="task_box">
|
||||
<u-search shape="round" placeholder="搜索片区经理" :showAction="false"></u-search>
|
||||
<!-- 筛选按钮 -->
|
||||
<view>
|
||||
<!-- <view>
|
||||
<u-popup :show="show" @close="show=false" @open="show=true" mode="top"
|
||||
overlayStyle="position: fixed;top:100rpx">
|
||||
<!-- <view class="search_box">
|
||||
<view class="search_box">
|
||||
<view class="">
|
||||
<view class="first_order" v-for="item in orderData" :key="item.id" :class="item.id==typeid?'choose':''">
|
||||
<text>{{item.first_order}}</text>
|
||||
@ -22,22 +22,24 @@
|
||||
{{item.info}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</u-popup>
|
||||
<view @click="show = true" class="screening" :class="show?'choose_style':''">筛选</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" v-for="item in areaManagerList" :key="item.id">
|
||||
<view class="left">
|
||||
<view class="top">
|
||||
<!-- <image class="avatar" :src="item.avatar||'../../static/img/public/man.png'"></image> -->
|
||||
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'" width="112.28rpx" height="112.28rpx" shape="circle">
|
||||
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'"
|
||||
width="112.28rpx" height="112.28rpx" shape="circle">
|
||||
</u--image>
|
||||
<view class="text">
|
||||
<view class="name">{{item.name}}</view>
|
||||
<view class="mobile">
|
||||
<uni-icons type="phone" color="#999999FF"></uni-icons>联系人-<text @click="copyPhone(item.account)">{{item.account}}</text>
|
||||
<uni-icons type="phone" color="#999999FF"></uni-icons>联系人-<text
|
||||
@click="copyPhone(item.account)">{{item.account}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -57,18 +59,21 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& areaManagerList.length==0" text="没有片区经理"
|
||||
icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
import {companyAreaManager} from "@/api/company.js"
|
||||
import { companyAreaManager } from "@/api/company.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
loadConfig:{
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
loadingText: '努力加载中',
|
||||
@ -76,7 +81,7 @@
|
||||
nomoreText: '我也是有底线的~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
areaManagerList:[]
|
||||
areaManagerList: []
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
@ -93,29 +98,29 @@
|
||||
this.loadAreaManager();
|
||||
},
|
||||
methods: {
|
||||
async loadAreaManager(){
|
||||
try{
|
||||
if(this.loadConfig.status=="nomore")return;
|
||||
this.loadConfig.status="loading"
|
||||
async loadAreaManager() {
|
||||
try {
|
||||
if (this.loadConfig.status == "nomore") return;
|
||||
this.loadConfig.status = "loading"
|
||||
let res = await companyAreaManager({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit
|
||||
})
|
||||
this.loadConfig.status="loadmore"
|
||||
if(res.data.data.length<this.loadConfig.limit){
|
||||
this.loadConfig.status="nomore"
|
||||
}else {
|
||||
this.loadConfig.status = "loadmore"
|
||||
if (res.data.data.length < this.loadConfig.limit) {
|
||||
this.loadConfig.status = "nomore"
|
||||
} else {
|
||||
this.loadConfig.page++;
|
||||
}
|
||||
this.areaManagerList = [...this.areaManagerList, ...res.data?.data]
|
||||
}catch(e){
|
||||
this.loadConfig.status="nomore"
|
||||
} catch (e) {
|
||||
this.loadConfig.status = "nomore"
|
||||
}
|
||||
},
|
||||
//拨打电话
|
||||
callUp(phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone+"",
|
||||
phoneNumber: phone + "",
|
||||
success: (e) => {
|
||||
console.log(e);
|
||||
},
|
||||
@ -125,9 +130,9 @@
|
||||
});
|
||||
},
|
||||
//复制号码
|
||||
copyPhone(str=""){
|
||||
copyPhone(str = "") {
|
||||
uni.setClipboardData({
|
||||
data:str+"",
|
||||
data: str + "",
|
||||
success: (e) => {
|
||||
Toast('号码已复制')
|
||||
},
|
||||
@ -264,7 +269,8 @@
|
||||
border-radius: 50%;
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
.u_avatar{
|
||||
|
||||
.u_avatar {
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
|
||||
|
BIN
static/img/empty/list.png
Normal file
BIN
static/img/empty/list.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -1,12 +1,17 @@
|
||||
import Cache from '@/utils/cache';
|
||||
const state = {
|
||||
eyeType: Cache.get('eyeType') || true,
|
||||
request: Cache.get('request') || true,
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
SET_EYE_TYPE(state){
|
||||
state.eyeType=!state.eyeType;
|
||||
Cache.set('eyeType', state.eyeType);
|
||||
},
|
||||
SET_REQUEST(state, data=true){
|
||||
state.request = data;
|
||||
Cache.set('request', state.request);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有档案" icon="/static/img/empty/list.png"></u-empty>
|
||||
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
@ -158,6 +158,7 @@
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin-right: 18rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.body{
|
||||
|
@ -23,7 +23,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& companyList.length==0" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& companyList.length==0" text="没有更多公司" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
|
@ -36,7 +36,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="暂无合同" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
</template>
|
||||
|
@ -8,14 +8,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="center_card">
|
||||
<u-steps direction="column" dot>
|
||||
<!-- <u-steps direction="column" dot activeColor="#07c160" inactiveColor="#07c160">
|
||||
<u-steps-item title="开始地点: 某某村">
|
||||
</u-steps-item>
|
||||
<u-steps-item title="中转地点: 某某村">
|
||||
</u-steps-item>
|
||||
<u-steps-item title="结束地点: 某某村">
|
||||
</u-steps-item>
|
||||
</u-steps>
|
||||
</u-steps> -->
|
||||
<view class="line"></view>
|
||||
<view class="box">
|
||||
<view class="item">开始地点:<text>某某某某某村</text></view>
|
||||
<view class="item">中转地点:<text>很快就解决</text></view>
|
||||
<view class="item">结束地点:<text>哈哈哈哈哈村</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="center_card">
|
||||
<view class="item">
|
||||
@ -108,6 +114,7 @@
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
position: relative;
|
||||
.item{
|
||||
margin-bottom: 28rpx;
|
||||
line-height: 48rpx;
|
||||
@ -118,5 +125,29 @@
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.box{
|
||||
.item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 42rpx;
|
||||
&:before{
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background-color: #07C160;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.line{
|
||||
width: 1rpx;
|
||||
height: 160rpx;
|
||||
background-color: #07C160;
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
left: 41.8rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -97,6 +97,7 @@ export default {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin-right: 18rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.body{
|
||||
|
@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<view class="task_list">
|
||||
<uni-section class="title" titleFontSize="32rpx" :title="'任务清单 '+ nowYMD" type="line"></uni-section>
|
||||
<view v-for="item in 5" :key="item">
|
||||
<view v-for="item in 5" :key="item" @click="naviTo('/subpkg/fileTask/fileTask')">
|
||||
<taskItem></taskItem>
|
||||
</view>
|
||||
<!-- <u-empty icon="/static/img/empty/data.png" text="没有任务"></u-empty> -->
|
||||
@ -77,7 +77,13 @@
|
||||
this.nowDate.y = e.detail.value.split('-')[0];
|
||||
let m = e.detail.value.split('-')[1];
|
||||
this.nowDate.m = m < 10 ? +m : m;
|
||||
}
|
||||
},
|
||||
naviTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
|
@ -26,7 +26,7 @@
|
||||
</u-form-item>
|
||||
</view> -->
|
||||
|
||||
<u-empty v-if="showDemandList.length==0" text="暂无数据,点击下方按钮添加" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-empty v-if="showDemandList.length==0" text="暂无更新内容,点击下方按钮添加" icon="/static/img/empty/list.png"></u-empty>
|
||||
<block v-for="(item, index) in showDemandList" :key="'demand'+index">
|
||||
<block>
|
||||
<breeding v-if="item.id==32" ref="demandRef32"></breeding>
|
||||
@ -136,7 +136,7 @@
|
||||
},
|
||||
// 更新档案
|
||||
addArchives: throttle(async function() {
|
||||
if(this.showDemandList.length==0)return Toast('请先选择需求!');
|
||||
if(this.showDemandList.length==0)return Toast('请先添加需求!');
|
||||
let refsDatas = await this.loadRefsDatas();
|
||||
if (!this.updateFlag) return;
|
||||
uni.showLoading({
|
||||
|
@ -20,12 +20,16 @@ function baseRequestTwo(url, method, data, {
|
||||
noVerify = false
|
||||
}) {
|
||||
let Url = HTTP_REQUEST_URL_THREE,
|
||||
header = HEADER;
|
||||
|
||||
header = HEADER;
|
||||
if (!noAuth) {
|
||||
//登录过期自动登录
|
||||
// 已经未登录了,禁止请求
|
||||
if (!store.state.config.request) return Promise.reject({
|
||||
msg: '未登录'
|
||||
});
|
||||
//登录过期自动登录
|
||||
if (!store.state.app.token) {
|
||||
toLogin();
|
||||
store.commit("SET_REQUEST", false);
|
||||
return Promise.reject({
|
||||
msg: '未登录'
|
||||
});
|
||||
@ -51,22 +55,25 @@ function baseRequestTwo(url, method, data, {
|
||||
if (noVerify)
|
||||
// reslove(res.data, res);
|
||||
reslove(res.data);
|
||||
else if (res.data.code == -1){
|
||||
else if (res.data.code == -1) {
|
||||
store.commit("LOGOUT");
|
||||
store.commit("SET_REQUEST", false);
|
||||
reject(res.data);
|
||||
}
|
||||
else if (res.data.code == 0){
|
||||
uni.hideLoading();
|
||||
} else if (res.data.code == 0) {
|
||||
// uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.data.msg || '请检查网络',
|
||||
icon: 'none'
|
||||
})
|
||||
reject(res.data);
|
||||
}
|
||||
else if (res.data.code == 1)
|
||||
} else if (res.data.code == 1){
|
||||
store.commit("SET_REQUEST");
|
||||
reslove(res.data);
|
||||
else if (res.data.code == 200)
|
||||
}
|
||||
else if (res.data.code == 200){
|
||||
store.commit("SET_REQUEST");
|
||||
reslove(res.data.data);
|
||||
}
|
||||
else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) {
|
||||
toLogin();
|
||||
reject(res.data);
|
||||
@ -86,6 +93,10 @@ function baseRequestTwo(url, method, data, {
|
||||
},
|
||||
fail: (message) => {
|
||||
// uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '网络错误',
|
||||
icon: 'none'
|
||||
})
|
||||
reject('请求失败');
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user