|
@@ -27,18 +27,18 @@
|
|
|
</view>
|
|
|
<view class="controls-filter" v-if="isControlsFilter">
|
|
|
<view class="search-form-date">
|
|
|
- <picker class="search-date-input" mode="date" :value="searchForm.startTime" @change="startDateChange">
|
|
|
+ <picker class="search-date-input" mode="date" :value="searchForm.startTimeValue" @change="startDateChange">
|
|
|
<view class="content">
|
|
|
- <view class="text">{{searchForm.startTime??'点此选择开始日期'}}</view>
|
|
|
- <text class="i-ri-close-circle-line icon" v-if="searchForm.startTime" @click.stop="startDateClear"/>
|
|
|
+ <view class="text">{{searchForm.startTimeValue??'点此选择开始日期'}}</view>
|
|
|
+ <text class="i-ri-close-circle-line icon" v-if="searchForm.startTimeValue" @click.stop="startDateClear"/>
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
<view class="search-form-date">
|
|
|
- <picker class="search-date-input" mode="date" :value="searchForm.endTime" @change="endDateChange">
|
|
|
+ <picker class="search-date-input" mode="date" :value="searchForm.endTimeValue" @change="endDateChange">
|
|
|
<view class="content">
|
|
|
- <view class="text">{{searchForm.endTime??'点此选择结束日期'}}</view>
|
|
|
- <text class="i-ri-close-circle-line icon" v-if="searchForm.endTime" @click.stop="endDateClear"/>
|
|
|
+ <view class="text">{{searchForm.endTimeValue??'点此选择结束日期'}}</view>
|
|
|
+ <text class="i-ri-close-circle-line icon" v-if="searchForm.endTimeValue" @click.stop="endDateClear"/>
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
@@ -146,8 +146,8 @@ const setPagingStyle = async () => {
|
|
|
const taskType = ref(1)
|
|
|
const taskTypeData = [
|
|
|
{key: 1, name: '我的审批'},
|
|
|
- {key: 2, name: '我发起的'},
|
|
|
- {key: 3, name: '已办结的'}
|
|
|
+ {key: 2, name: '已办结的'},
|
|
|
+ {key: 3, name: '我发起的'}
|
|
|
]
|
|
|
const taskTypeChange = ({key}) => {
|
|
|
taskType.value = key
|
|
@@ -170,37 +170,37 @@ const dateFilterClick = () => {
|
|
|
}
|
|
|
const dateFilterClear = () => {
|
|
|
isControlsFilter.value = false
|
|
|
- searchForm.value.startTime = null
|
|
|
- searchForm.value.endTime = null
|
|
|
+ searchForm.value.startTimeValue = null
|
|
|
+ searchForm.value.endTimeValue = null
|
|
|
setPagingStyle()
|
|
|
searchClick()
|
|
|
}
|
|
|
|
|
|
//开启日期选择完毕
|
|
|
const startDateChange = (e) => {
|
|
|
- const val = e.detail.value, endTime = searchForm.value.endTime
|
|
|
+ const val = e.detail.value, endTime = searchForm.value.endTimeValue
|
|
|
if (endTime && val && val > endTime) {
|
|
|
errorToast('开始日期不能大于结束日期', 2000)
|
|
|
return false
|
|
|
} else {
|
|
|
- searchForm.value.startTime = val
|
|
|
+ searchForm.value.startTimeValue = val
|
|
|
}
|
|
|
}
|
|
|
const startDateClear = () => {
|
|
|
- searchForm.value.startTime = null
|
|
|
+ searchForm.value.startTimeValue = null
|
|
|
}
|
|
|
//结束日期选择完毕
|
|
|
const endDateChange = (e) => {
|
|
|
- const val = e.detail.value, startTime = searchForm.value.startTime
|
|
|
+ const val = e.detail.value, startTime = searchForm.value.startTimeValue
|
|
|
if (startTime && val && val < startTime) {
|
|
|
errorToast('结束日期不能小于开始日期', 2000)
|
|
|
return false
|
|
|
} else {
|
|
|
- searchForm.value.endTime = val
|
|
|
+ searchForm.value.endTimeValue = val
|
|
|
}
|
|
|
}
|
|
|
const endDateClear = () => {
|
|
|
- searchForm.value.endTime = null
|
|
|
+ searchForm.value.endTimeValue = null
|
|
|
}
|
|
|
|
|
|
//条件搜索
|
|
@@ -216,42 +216,27 @@ const changeOrdType = (type) => {
|
|
|
|
|
|
//搜索表单
|
|
|
const searchForm = ref({
|
|
|
- startTime: null, endTime: null, ordType: 1
|
|
|
+ startTimeValue: null, endTimeValue: null, ordType: 1
|
|
|
})
|
|
|
|
|
|
//获取任务列表数据
|
|
|
const taskList = ref([])
|
|
|
const getTaskList = async (pageNo, pageSize) => {
|
|
|
- let task_type = taskType.value, res = {};
|
|
|
uni.showLoading({title: '获取数据中...', mask: true});
|
|
|
- if (task_type === 1) {
|
|
|
- const { data } = await mainApi.queryUserToDoTaskList({
|
|
|
- projectId: projectId.value,
|
|
|
- contractId: contractId.value,
|
|
|
- ...searchForm.value,
|
|
|
- current: pageNo,
|
|
|
- size: pageSize,
|
|
|
- })
|
|
|
- res = getObjValue(data)
|
|
|
- } else if (task_type === 2) {
|
|
|
- const { data } = await mainApi.queryUserStartFlow({
|
|
|
- projectId: projectId.value,
|
|
|
- contractId: contractId.value,
|
|
|
- ...searchForm.value,
|
|
|
- current: pageNo,
|
|
|
- size: pageSize,
|
|
|
- })
|
|
|
- res = getObjValue(data)
|
|
|
- } else if (task_type === 3) {
|
|
|
- const { data } = await mainApi.queryUserDoneTaskList({
|
|
|
- projectId: projectId.value,
|
|
|
- contractId: contractId.value,
|
|
|
- ...searchForm.value,
|
|
|
- current: pageNo,
|
|
|
- size: pageSize,
|
|
|
- })
|
|
|
- res = getObjValue(data)
|
|
|
- }
|
|
|
+ const { data } = await mainApi.queryTaskPageList({
|
|
|
+ ...searchForm.value,
|
|
|
+ projectIdValue: projectId.value,
|
|
|
+ currentContractId: contractId.value,
|
|
|
+ contractIdValue: contractId.value,
|
|
|
+ selectedType: taskType.value,
|
|
|
+ batchValue: '',
|
|
|
+ queryValue: '',
|
|
|
+ statusValue: '',
|
|
|
+ typeValue: '',
|
|
|
+ current: pageNo,
|
|
|
+ size: pageSize,
|
|
|
+ })
|
|
|
+ const res = getObjValue(data)
|
|
|
uni.hideLoading();
|
|
|
isNodes.value = true
|
|
|
pageRef.value?.complete(getArrValue(res?.records));
|