新增任务下发
This commit is contained in:
parent
6fd167e72b
commit
7b55a4ca99
12
api/task.js
12
api/task.js
@ -112,4 +112,14 @@ export const commit_town_master_task_type_7API = (data) => oahttp.post('/task/co
|
||||
* 应用软件推广
|
||||
*/
|
||||
export const commit_town_master_task_type_8API = (data) => oahttp.post('/task/commit_town_master_task_type_8',
|
||||
data)
|
||||
data)
|
||||
|
||||
/* 新供销首页任务列表*/
|
||||
/**
|
||||
* 应用软件推广
|
||||
*/
|
||||
export const taskListApi = (data) => oahttp.get('/task/taskList',
|
||||
data)
|
||||
|
||||
|
||||
// api / task / taskList
|
@ -2,8 +2,8 @@ let httpApiThree;
|
||||
let httpApi; // 总域名
|
||||
let httpApiTwo; // 物流系统域名
|
||||
|
||||
const env = 'dev'; // 开发
|
||||
// const env = 'prod'; // 生产
|
||||
// const env = 'dev'; // 开发
|
||||
const env = 'prod'; // 生产
|
||||
// const env = 'prew'; // 预上线
|
||||
// const env = 'local'; // 本地
|
||||
|
||||
@ -19,9 +19,9 @@ switch (env) {
|
||||
httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线
|
||||
break;
|
||||
case 'local':
|
||||
httpApi = 'http://192.168.1.22:8083' //预上线
|
||||
httpApiThree = 'http://192.168.1.22:8083' //预上线
|
||||
httpApiTwo = 'http://192.168.1.22:8083' //预上线
|
||||
httpApi = 'http://192.168.1.24:8083' //预上线
|
||||
httpApiThree = 'http://192.168.1.24:8083' //预上线
|
||||
httpApiTwo = 'http://192.168.1.24:8083' //预上线
|
||||
break;
|
||||
default:
|
||||
httpApi = 'https://ceshi-new-wokr.lihaink.cn/' //测试
|
||||
|
@ -12,6 +12,15 @@
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/oaHome/homeTaskDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务详情",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarBackgroundColor": "#0122C7",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/oaLogin/oaLogin",
|
||||
"style": {
|
||||
|
102
pages/oaHome/homeTaskDetail.vue
Normal file
102
pages/oaHome/homeTaskDetail.vue
Normal file
@ -0,0 +1,102 @@
|
||||
<template>
|
||||
|
||||
<view class="box">
|
||||
<view class="head">
|
||||
<u--image :showLoading="true" width="60rpx" height="60rpx"
|
||||
:src="'../../static/newWork/index/XQ.png'"></u--image>
|
||||
<view class="title">
|
||||
{{taskDetail.title }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
{{taskDetail.content }}
|
||||
|
||||
|
||||
<view class="time">
|
||||
完成时间: {{taskDetail.end_time}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
taskListApi
|
||||
} from "@/api/task.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
taskDetail: {},
|
||||
loading: true
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
taskListApi().then(res => {
|
||||
this.taskDetail = res.data.filter((item) => item.id == option.id)[0]
|
||||
this.loading = false
|
||||
console.log(this.taskDetail)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #F9FBFF;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
|
||||
.head {
|
||||
// width: ;
|
||||
display: flex;
|
||||
|
||||
.title {
|
||||
width: 640rpx;
|
||||
border: 1px solid #4C80F6;
|
||||
border-radius: 20rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
padding-left: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 690rpx;
|
||||
background-color: white;
|
||||
border-radius: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
|
||||
padding: 30rpx 30rpx 50rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
min-height: 35vh;
|
||||
position: relative;
|
||||
font-size: 26rpx;
|
||||
color: #1A1A1A;
|
||||
|
||||
}
|
||||
|
||||
.time {
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
right: 20rpx;
|
||||
color: #7A7A7A;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -5,7 +5,6 @@
|
||||
<view class="" style="float: right;margin-top: 20rpx;">
|
||||
<Myindex url='/pages/index/index' />
|
||||
</view>
|
||||
|
||||
<view class="head-content ">
|
||||
<view class="identity">
|
||||
工作证:{{ myOaInfo.nickname }}
|
||||
@ -45,6 +44,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 工程 -->
|
||||
<!-- <view class="">
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode" value="https://uqrcode.cn/doc" :options="{ margin: 10 }">
|
||||
</uqrcode>
|
||||
@ -98,24 +98,69 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-overlay :show="showCode" @click="showCode=false">
|
||||
<view class="transition">
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode" value="https://uqrcode.cn/doc" :options="{ margin: 10 }">
|
||||
</uqrcode>
|
||||
<view class="" style="margin-top: 50rpx;">
|
||||
<u-button text="保存二维码" @click="saveCode" style="margin-bottom: 20rpx;"></u-button>
|
||||
<u-button text="复制邀请码" @click="copyCode"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</u-overlay>
|
||||
<!--追加功能 -->
|
||||
<view class="">
|
||||
<view class="" v-if='taskList.length==0'>
|
||||
<u-empty icon="/static/newWork/index/empty.png" iconSize='200' width='300' height="300" marginTop='50'
|
||||
textColor='#BFD7FF' text="等待任务下发"></u-empty>
|
||||
|
||||
</view>
|
||||
<view class="task" v-else>
|
||||
<view class="tit">
|
||||
我的任务
|
||||
</view>
|
||||
|
||||
<view class="task-li" v-for="item,index in taskList" :key='index'>
|
||||
<view class="task-li-top">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image :showLoading="true" width="30rpx" height="29rpx"
|
||||
:src="'../../static/newWork/index/RW.png'"></u--image>
|
||||
<view class="" style="margin-left: 10rpx;font-size: 28rpx;">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-btn" @click="navgo(`/pages/oaHome/homeTaskDetail?id=${item.id}`)">
|
||||
查看详情
|
||||
</view>
|
||||
</view>
|
||||
<view class="task-content">
|
||||
任务描述: {{item.content}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="showCode" @click="showCode=false" :opacity="0.1">
|
||||
<view class="code" id='code'>
|
||||
<view class="code-img">
|
||||
<view class="" style="margin: 0 auto;width: 440rpx;">
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode"
|
||||
:value="`https://shop.lihaink.cn/download/index.html?code=${myOaInfo.invite_code}`"
|
||||
:size=440 sizeUnit='rpx'>
|
||||
</uqrcode>
|
||||
</view>
|
||||
|
||||
<view class="code-text" @click='copyCode'>
|
||||
<view class="" style="color: #4D4D4D;font-size: 28rpx;">
|
||||
{{myOaInfo.invite_code}}
|
||||
</view>
|
||||
<view style="display: flex;font-size: 28rpx;align-items: center;">
|
||||
<u--image :showLoading="true" width="23.75rpx" height="25.75rpx"
|
||||
:src="'../../static/newWork/index/FZ.png'"
|
||||
style="transform: translateY(3rpx);"></u--image>
|
||||
<view class="" style="margin-left: 10rpx;">
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="code-foot">
|
||||
<view class="code-foot-btn" style="background-color: #F5F5F5;color: #616161;">
|
||||
取消
|
||||
</view>
|
||||
<view class="code-foot-btn" @click="saveCode">
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
|
||||
|
||||
|
||||
<!-- 旧版供销 -->
|
||||
@ -194,43 +239,38 @@
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Myindex from '@/components/return/index.vue';
|
||||
import {
|
||||
getList
|
||||
} from "@/api/logistics.js";
|
||||
// import {
|
||||
// getList
|
||||
// } from "@/api/logistics.js";
|
||||
import {
|
||||
Toast
|
||||
} from "@/libs/uniApi.js";
|
||||
import {
|
||||
oaHomeData
|
||||
} from "@/static/server/server.js";
|
||||
// import {
|
||||
// noticeList
|
||||
// } from "@/api/notice.js";
|
||||
// import {
|
||||
// getAreaManagerApi
|
||||
// } from "@/api/bussness.js"
|
||||
import {
|
||||
noticeList
|
||||
} from "@/api/notice.js";
|
||||
import {
|
||||
getAreaManagerApi
|
||||
} from "@/api/bussness.js"
|
||||
|
||||
taskListApi
|
||||
} from "@/api/task.js"
|
||||
import {
|
||||
getTradeTaskInfo
|
||||
} from "@/api/newTask.js"
|
||||
// import tabbar from '../components/tabbar'
|
||||
import {
|
||||
getIndexListAPI,
|
||||
getTaskListAPI,
|
||||
getMyTaskListAPI,
|
||||
getApproveListAPI,
|
||||
// getIndexListAPI,
|
||||
// getTaskListAPI,
|
||||
// getMyTaskListAPI,
|
||||
// getApproveListAPI,
|
||||
getUserIndexAPI,
|
||||
} from "@/api/oaApi.js";
|
||||
import {
|
||||
@ -265,7 +305,7 @@
|
||||
notArr: [],
|
||||
orderList: [],
|
||||
oaHomeData: [],
|
||||
taskInfo: {},
|
||||
taskList: [],
|
||||
src: "https://cdn.uviewui.com/uview/album/1.jpg",
|
||||
assessData: [{
|
||||
num: "0",
|
||||
@ -340,40 +380,19 @@
|
||||
await this.$onLaunched;
|
||||
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO") || '{}')?.is_captain
|
||||
this.options.data = bj;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.initTask()
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
async onShow() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
await this.$onLaunched;
|
||||
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
||||
userInfo().then(({
|
||||
data
|
||||
}) => {
|
||||
|
||||
|
||||
|
||||
this.$store.commit('setUserInfo', data);
|
||||
this.initUserInfo(data);
|
||||
this.$store.dispatch('initConfig');
|
||||
// console.log('更新信息', data);
|
||||
});
|
||||
this.initUserInfo();
|
||||
|
||||
|
||||
// console.log(this.oaHomeData, this.oaHomeData.length==0);
|
||||
if (this.oaHomeData.length == 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('initConfig');
|
||||
@ -447,14 +466,44 @@
|
||||
});
|
||||
},
|
||||
saveCode() {
|
||||
this.$refs.uqrcode.save({
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '保存成功'
|
||||
// this.$refs.uqrcode.save({
|
||||
// success: () => {
|
||||
// uni.showToast({
|
||||
// icon: 'success',
|
||||
// title: '保存成功'
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
var pages = getCurrentPages();
|
||||
var page = pages[pages.length - 1];
|
||||
console.log("当前页" + pages.length - 1);
|
||||
var bitmap = null;
|
||||
var currentWebview = page.$getAppWebview();
|
||||
bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// 将webview内容绘制到Bitmap对象中
|
||||
currentWebview.draw(bitmap, function() {
|
||||
console.log('截屏绘制图片成功');
|
||||
bitmap.save("_doc/a.jpg", {}, function(i) {
|
||||
console.log('保存图片成功:' + JSON.stringify(i));
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: i.target,
|
||||
success: function() {
|
||||
bitmap.clear(); //销毁Bitmap图片
|
||||
uni.showToast({
|
||||
title: '保存图片成功',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}, function(e) {
|
||||
console.log('保存图片失败:' + JSON.stringify(e));
|
||||
});
|
||||
}, function(e) {
|
||||
console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
});
|
||||
//currentWebview.append(amway_bit);
|
||||
|
||||
},
|
||||
|
||||
leftClick(e) {
|
||||
@ -464,25 +513,24 @@
|
||||
console.log('关闭应用' + JSON.stringify(ret));
|
||||
});
|
||||
},
|
||||
async initTask() {
|
||||
let res = await taskListApi()
|
||||
this.taskList = res.data
|
||||
console.log(this.taskList)
|
||||
|
||||
|
||||
},
|
||||
|
||||
initUserInfo(data = null) {
|
||||
if (data) return this.myOaInfo = data;
|
||||
|
||||
this.$store.state.app.userInfo ?
|
||||
(this.myOaInfo = this.$store.state.app.userInfo) :
|
||||
(this.myOaInfo.avatar = "");
|
||||
|
||||
|
||||
console.log(this.myOaInfo, 24545)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
navTo(url) {
|
||||
if (url) {
|
||||
uni.showLoading({
|
||||
@ -537,7 +585,7 @@
|
||||
},
|
||||
},
|
||||
async onPullDownRefresh() {
|
||||
|
||||
this.initTask()
|
||||
|
||||
await this.$store.dispatch('initConfig');
|
||||
|
||||
@ -636,6 +684,130 @@
|
||||
|
||||
}
|
||||
|
||||
.tit {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.tit::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 6rpx;
|
||||
/* 左边框的宽度 */
|
||||
height: 25rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #2B63E3;
|
||||
}
|
||||
|
||||
.task {
|
||||
width: 690rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
.task-li {
|
||||
background-color: white;
|
||||
padding: 30rpx;
|
||||
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.task-li-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.detail-btn {
|
||||
color: #2B63E3;
|
||||
font-size: 24rpx;
|
||||
width: 144rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
border: 1px solid #2B63E3;
|
||||
border-radius: 22rpx 22rpx 22rpx 22rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.task-content {
|
||||
width: 630rpx;
|
||||
margin: 0 auto;
|
||||
background-color: #F7F7F7;
|
||||
// padding: 20rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding: 0 20rpx;
|
||||
margin-top: 20rpx;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 634rpx;
|
||||
height: 795rpx;
|
||||
background-image: url('/static/newWork/index/EWMBG.png');
|
||||
background-size: 100% 100%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
.code-img {
|
||||
position: absolute;
|
||||
top: 140rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
|
||||
.code-text {
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
color: #3972F4;
|
||||
width: 440rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.code-foot {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 520rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.code-foot-btn {
|
||||
width: 200rpx;
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
text-align: center;
|
||||
border-radius: 39rpx 39rpx 39rpx 39rpx;
|
||||
background-color: #3972F4;
|
||||
color: white;
|
||||
font-size: 28rpx;
|
||||
|
||||
}
|
||||
|
||||
// width: 500rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// .oa_home {
|
||||
// padding-bottom: 100rpx;
|
||||
// }
|
||||
|
BIN
static/newWork/index/EWMBG.png
Normal file
BIN
static/newWork/index/EWMBG.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
BIN
static/newWork/index/FZ.png
Normal file
BIN
static/newWork/index/FZ.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
static/newWork/index/RW.png
Normal file
BIN
static/newWork/index/RW.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
static/newWork/index/XQ.png
Normal file
BIN
static/newWork/index/XQ.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 7.0 KiB |
Loading…
x
Reference in New Issue
Block a user