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> <template>
<view class="c_task_item"> <view class="c_task_item" @click="clickTask">
<view class="top"> <view class="top">
<view class="left"> <view class="left">
<view>任务名称:</view> <view>任务名称:</view>
<view class="text">宣传配送</view> <view class="text">{{datas.title}}</view>
</view> </view>
<view class="right"> <view class="right">
<image class="icon" src="../../static/icons/ok_c.png"></image> <image class="icon" src="../../static/icons/ok_c.png"></image>
@ -18,12 +18,12 @@
<view>任务进度:</view> <view>任务进度:</view>
<view class="text">30%</view> <view class="text">30%</view>
</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>
<view class="item"> <view class="item">
<view class="left"> <view class="left">
<view>完成时间:</view> <view>完成时间:</view>
<view class="text">2023.08.05</view> <view class="text">{{datas.end_time}}</view>
</view> </view>
<view class="right"> <view class="right">
<view>进入任务<uni-icons type="right" color="#3175f9"></uni-icons></view> <view>进入任务<uni-icons type="right" color="#3175f9"></uni-icons></view>
@ -37,10 +37,30 @@
<script> <script>
export default { export default {
name: "task", name: "task",
props: {
datas: {
type: Object,
default: {}
}
},
data() { data() {
return { 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> </script>

View File

@ -6,12 +6,6 @@
<view style="height: var(--status-bar-height);"></view> <view style="height: var(--status-bar-height);"></view>
<view style="height: 100rpx"></view> <view style="height: 100rpx"></view>
<!-- #endif --> <!-- #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="personage">
<view class="my_msg flex_a_c_j_sb"> <view class="my_msg flex_a_c_j_sb">
<view class="flex_a_c"> <view class="flex_a_c">

View File

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

View File

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

View File

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

View File

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

View File

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