This commit is contained in:
weipengfei 2023-08-05 19:07:46 +08:00
parent 80da66b4cb
commit 96cf8fbe79
8 changed files with 63 additions and 24 deletions

8
api/task.js Normal file
View File

@ -0,0 +1,8 @@
import oahttp from "@/utils/oahttp.js";
/**
* 任务列表
*/
export const taskLists = (data) => oahttp.get('/task/lists', data)

View File

@ -1,9 +1,9 @@
<template>
<view class="c_task_item">
<view class="c_task_item" @click="clickTask">
<view class="top">
<view class="left">
<view>任务名称:</view>
<view class="text">宣传配送</view>
<view class="text">{{datas.title}}</view>
</view>
<view class="right">
<image class="icon" src="../../static/icons/ok_c.png"></image>
@ -18,12 +18,12 @@
<view>任务进度:</view>
<view class="text">30%</view>
</view>
<view class="right">30.00<text class="price"></text></view>
<view class="right">{{datas.money||'0.00'}}<text class="price"></text></view>
</view>
<view class="item">
<view class="left">
<view>完成时间:</view>
<view class="text">2023.08.05</view>
<view class="text">{{datas.end_time}}</view>
</view>
<view class="right">
<view>进入任务<uni-icons type="right" color="#3175f9"></uni-icons></view>
@ -37,10 +37,30 @@
<script>
export default {
name: "task",
props: {
datas: {
type: Object,
default: {}
}
},
data() {
return {
};
},
methods:{
naviTo(url) {
url ?
uni.navigateTo({
url: url,
}) : Toast('暂未开放')
},
clickTask(){
console.log('点击');
if(this.$props.datas.type==1){
this.naviTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr))
}else this.naviTo('');
}
}
}
</script>

View File

@ -6,12 +6,6 @@
<view style="height: var(--status-bar-height);"></view>
<view style="height: 100rpx"></view>
<!-- #endif -->
<!-- <view v-if="!$store.state.app.token" class="my_head">
<view class="department flex_a_c">
<view class="section">产品技术部</view>
<view class="" @click="login">去登陆</view>
</view>
</view> -->
<view class="personage">
<view class="my_msg flex_a_c_j_sb">
<view class="flex_a_c">

View File

@ -2,8 +2,8 @@
<view class="all_box">
<view class="task_list">
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
<view v-for="item in 10" :key="item" @click="naviTo('/subpkg/dispatching/dispatching')">
<task-item></task-item>
<view v-for="item in list" :key="item.id">
<task-item :datas="item"></task-item>
</view>
<!-- <u-empty icon="/static/img/empty/data.png" text="没有任务"></u-empty> -->
</view>
@ -16,6 +16,7 @@
import { getTaskListApi } from '@/api/oa'
import { Toast } from '@/libs/uniApi.js'
import taskItem from "@/components/task/taskItem.vue"
import { taskLists } from "@/api/task.js"
export default {
components:{
taskItem
@ -35,18 +36,15 @@
}
},
onLoad() {
this.loadList()
},
onShow() {
},
methods: {
naviTo(url) {
url ?
uni.navigateTo({
url: url,
}) : Toast('暂未开放')
},
async loadList(){
let res = await taskLists();
this.list = res.data;
}
},
onPullDownRefresh() {
this.close()

View File

@ -36,13 +36,22 @@
<script>
import { Toast } from '../../libs/uniApi'
import { informationList } from "@/api/information.js"
export default {
data() {
return {
ids: [],
list: []
}
},
onLoad(options) {
try{
this.ids = JSON.parse(options.id);
this.loadList();
}catch(e){
this.ids = [];
}
},
onLoad() {},
onShow() {},
methods: {
navTo(url) {
@ -62,6 +71,11 @@ export default {
},
toast(str){
Toast(str)
},
async loadList(){
let res = await informationList({
'arr[]': [...this.ids]
});
}
},
onPullDownRefresh() {

View File

@ -236,7 +236,10 @@
// return console.log(flag1);
this.$refs.archives.validate().then(async (e) => {
if (e == true && flag4 == true && flag2 == true && flag3 == true) {
uni.showLoading()
uni.showLoading({
title: '登记中',
mask: true
})
// let districtForm = {
// area_id: this.$refs.districtSelectorRef.formData.area,
// street_id: this.$refs.districtSelectorRef.formData.street,

View File

@ -66,6 +66,7 @@
export default {
data() {
return {
transition: true,
billList: [],
nowDate:{
y: '',

View File

@ -140,7 +140,8 @@
let refsDatas = await this.loadRefsDatas();
if (!this.updateFlag) return;
uni.showLoading({
title: '正在更新...'
title: '正在更新...',
mask: true
});
let res = await informationOpportunityUpdate({
id: this.formData.id,