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