Browse Source

refactor: 审核记录查看

deliver
Min5203 4 years ago
parent
commit
121d43fe3b
  1. 1
      CHANGELOG.md
  2. 15
      common/styles/theme/default.scss
  3. 48
      pages/checkerList/checkerList.vue
  4. 11
      pages/submitlist/submitlist.vue
  5. 3
      plugins/p-deliver-checker/p-deliver-checker.vue
  6. 33
      plugins/p-deliver/p-deliver.vue

1
CHANGELOG.md

@ -75,6 +75,7 @@
### 🔨 代码重构
范围|描述|commitId
--|--|--
- | 查看提交历史记录页面数据同步更新 | [749cb10](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/749cb10)
- | 交付物插件代码审查 | [5f4d47b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5f4d47b)
- | 审查接口核对完成 | [43ae604](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/43ae604)
- | 审核插件的基本信息展示 | [4f2815f](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/4f2815f)

15
common/styles/theme/default.scss

@ -14,10 +14,10 @@
z-index: 100;
}
.box-modal-border {
border-top:1px solid #D1D5DB;
border-top: 1px solid #d1d5db;
}
.delete-modal-border {
border-right:1px solid #D1D5DB ;
border-right: 1px solid #d1d5db;
}
}
.warp {
@ -34,7 +34,7 @@
.linkBox {
::v-deep .input {
.u-input__input {
color: #60A5FA;
color: #60a5fa;
}
}
}
@ -43,7 +43,7 @@
height: 12.5rem;
overflow-y: scroll;
view {
border-bottom: 1px solid #E5E7EB;
border-bottom: 1px solid #e5e7eb;
}
}
.rect2 {
@ -56,4 +56,11 @@
height: 895rpx;
background-color: #fff;
}
.progressDot {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
line-height: 50rpx;
background-color: #fa8c16;
}
}

48
pages/checkerList/checkerList.vue

@ -1,20 +1,50 @@
<template>
<view> </view>
<theme class="pt-1 h-full">
<view class="h-full overflow-y-scroll bg-white mx-5 my-2 rounded-md p-3 text-gray-400">
<view v-for="item in checkerList" class="flex justify-between">
<view>
<view class="pb-2 text-gray-800">
{{ item.checkerName }}
</view>
<view class="pb-1">
{{ item.remark }}
</view>
<view class="pb-2" v-if="item.checkTime > 0">
{{ dayjs(+item.checkTime).format('MM-DD HH:mm') }}
</view>
</view>
<view>
<view>{{ item.status === 1 ? '已通过' : '已驳回' }}</view>
<view v-if="item.score > 0">
<u-circle-progress active-color="#FA8C16" :percent="item.score" width="90" border-width="7" class="mt-2">
<view class="u-progress-content">
<view class="progressDot text-white text-center">{{ item.score }}</view>
</view>
</u-circle-progress>
</view>
</view>
</view>
</view>
</theme>
</template>
<script setup>
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import dayjs from 'dayjs';
const checkerList = ref([]);
onLoad(options => {
// id
(async function getHistory() {
(async function getQueryCheckLog() {
try {
const param = { deliverId: options.deliverId };
const data = await uni.$u.api.getDeliverHistory(param);
name.value = data.deliverName;
listRef.value = data.deliverRecordList;
console.log(data);
const param = { deliverRecordId: options.deliverRecordId };
const data = await uni.$u.api.queryCheckLog(param);
checkerList.value = data;
console.log(checkerList.value);
} catch (error) {
console.log('error: ', error);
uni.$ui.showToast('获取交付物历史失败');
uni.$ui.showToast('获取检查交付物历史失败');
}
}());
});

11
pages/submitlist/submitlist.vue

@ -94,7 +94,6 @@ onLoad(options => {
const data = await uni.$u.api.getDeliverHistory(param);
name.value = data.deliverName;
listRef.value = data.deliverRecordList;
console.log(data);
} catch (error) {
console.log('error: ', error);
uni.$ui.showToast('获取交付物历史失败');
@ -103,12 +102,4 @@ onLoad(options => {
});
</script>
<style lang="scss">
.progressDot {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
line-height: 50rpx;
background-color: #fa8c16;
}
</style>
<style lang="scss"></style>

3
plugins/p-deliver-checker/p-deliver-checker.vue

@ -197,7 +197,8 @@ function confirmReject() {
//
function moreRecords() {
uni.navigateTo({ url: '/pages/checkerList/checkerList' });
const deliverRecordId = store.state.project.deliverRecordId
uni.navigateTo({ url: `/pages/checkerList/checkerList?deliverRecordId=${deliverRecordId}` });
}
</script>

33
plugins/p-deliver/p-deliver.vue

@ -22,9 +22,7 @@
<!-- 插件上传方式 -->
<view>
<view class="linkBox"
><u-input v-model="linkValue" type="text" :border="true" placeholder="请输入交付物地址/链接" class="input"></u-input
></view>
<view class="linkBox"><u-input v-model="linkValue" type="text" :border="true" placeholder="请输入交付物地址/链接" class="input"></u-input></view>
<view class="mt-3">
<u-button size="mini" :plain="true" type="primary" class="mr-3" @click="paste">粘贴</u-button>
<u-button size="mini" :plain="true" type="primary" class="mr-3" @click="uploadFile">文件</u-button>
@ -34,9 +32,7 @@
<!-- 编辑和删除的遮罩层 -->
<view class="mask flex items-center justify-center bg-grey" v-show="showMask" @click="showMask = false">
<view class="bg-yellow-500 text-white w-12 h-12 text-center leading-12 rounded-w-12 mx-8" @click.stop="showEditModal = true"
>修改</view
>
<view class="bg-yellow-500 text-white w-12 h-12 text-center leading-12 rounded-w-12 mx-8" @click.stop="showEditModal = true">修改</view>
<view class="bg-red-500 text-white w-12 h-12 text-center leading-12 rounded-w-12 mx-8" @click.stop="deleteDeliver">删除</view>
<!-- 删除的二次提示modal -->
<u-modal v-model="showDeleteModal" :content="content" :show-cancel-button="true" @confirm="confirmDelete"></u-modal>
@ -86,7 +82,7 @@ const submitState = computed(() => !linkValue.value);
//
const delivers = computed(() => store.state.role.members);
const checkedDelivers = computed(() => delivers.value.filter(item => item.checked));
getDeliverData()
getDeliverData();
// id
async function getDeliverData() {
try {
@ -95,12 +91,10 @@ async function getDeliverData() {
const param = { taskId: props.task.id };
const data = await uni.$u.api.getDeliverByTaskId(param);
deliver.value = data;
store.state.project.deliverRecordId = deliver.value.deliverRecordId
} catch (error) {
console.log('error: ', error);
}
};
}
//
function validateDeliverForm() {
@ -124,18 +118,19 @@ function submit() {
if (!validateDeliverForm()) return;
//
try {
const checkerList = []
const checkerList = [];
checkedDelivers.value.forEach(item => {
checkerList.push(item.memberId)
})
checkerList.push(item.memberId);
});
const param = {
projectId: store.state.project.project.id,
deliverId: deliver.value.deliverId,
fileList: [linkValue.value],
checkerList
checkerList,
};
uni.$u.api.submitDeliverInfo(param);
uBadgeShow.value = true;
store.state.project.deliverRecordId = deliver.value.deliverRecordId;
} catch (error) {
console.log('error: ', error);
uni.$ui.showToast('提交交付物信息失败');
@ -144,7 +139,7 @@ function submit() {
//
function openDeliverHistory() {
const deliverIds = deliver.value.deliverId
const deliverIds = deliver.value.deliverId;
// console.log(deliverId)
uni.navigateTo({ url: `/pages/submitList/submitList?deliverId=${deliverIds}` });
}
@ -200,11 +195,11 @@ async function confirmEditDeliverName() {
const param = {
projectId: store.state.project.project.id,
taskId: props.task.id,
deliverName:newInputRef.value
}
deliverName: newInputRef.value,
};
await uni.$u.api.editDeliverName(param);
// uni.$ui.showToast('');
getDeliverData()
getDeliverData();
//
showEditModal.value = false;
showMask.value = false;
@ -234,8 +229,6 @@ async function confirmDelete() {
console.error('error: ', error);
}
}
</script>
<style scoped lang="scss"></style>

Loading…
Cancel
Save