|
|
|
@ -24,18 +24,19 @@ import { isEmpty } from "@/utils";
|
|
|
|
|
import { formatToDateHMS } from "@/utils/dateUtil";
|
|
|
|
|
import { hideDownload } from "@/utils/image";
|
|
|
|
|
|
|
|
|
|
const batch = ref(false);
|
|
|
|
|
const selectItems = ref<any[]>([]);
|
|
|
|
|
const message = useMessage();
|
|
|
|
|
const dialog = useDialog();
|
|
|
|
|
const notPassModalRef = ref(null);
|
|
|
|
|
const batchModalRef = ref(null);
|
|
|
|
|
const totalCount = ref(0);
|
|
|
|
|
const taskId: any = ref(""); // 任务id
|
|
|
|
|
const packageId: any = ref(""); // 包id
|
|
|
|
|
const CustomSettingModalRef = ref(null);
|
|
|
|
|
const taskTableData = ref<any[]>([]);
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const emit = defineEmits(['setAsideItemName'])
|
|
|
|
|
const batch = ref(false)
|
|
|
|
|
const selectItems = ref<any[]>([])
|
|
|
|
|
const message = useMessage()
|
|
|
|
|
const dialog = useDialog()
|
|
|
|
|
const notPassModalRef = ref(null)
|
|
|
|
|
const batchModalRef = ref(null)
|
|
|
|
|
const totalCount = ref(0)
|
|
|
|
|
const taskId: any = ref('') // 任务id
|
|
|
|
|
const packageId: any = ref('') // 包id
|
|
|
|
|
const CustomSettingModalRef = ref(null)
|
|
|
|
|
const taskTableData = ref<any[]>([])
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
|
|
const sortBy: any = {
|
|
|
|
|
orderType: "desc",
|
|
|
|
@ -47,11 +48,8 @@ function setBatch(value: boolean) {
|
|
|
|
|
|
|
|
|
|
batch.value = value;
|
|
|
|
|
|
|
|
|
|
if (value === false) {
|
|
|
|
|
selectItems.value.forEach((item) => (item.checked = false));
|
|
|
|
|
selectItems.value.length = 0;
|
|
|
|
|
selectItems.value.length = 0;
|
|
|
|
|
}
|
|
|
|
|
if (value === false)
|
|
|
|
|
selectItems.value = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onCheckChange(checked: any, item: any) {
|
|
|
|
@ -95,6 +93,12 @@ function handleKeydown(event) {
|
|
|
|
|
// 在这里执行右箭头的逻辑
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从store里面获取任务id
|
|
|
|
|
function currentTaskId() {
|
|
|
|
|
const index = taskStore.getCurrentIndex
|
|
|
|
|
return taskStore.getApprovalList[index]?.id || ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// states:1未提交,2待审批,3通过,4不通过
|
|
|
|
|
function validate(items: any[]) {
|
|
|
|
|
if (items.length === 0) return "至少选中一个任务";
|
|
|
|
@ -167,38 +171,22 @@ function approvalHandler(items?: any) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function rejectHandler(items?: any) {
|
|
|
|
|
// let cloneItem: any
|
|
|
|
|
// if (batch.value) {
|
|
|
|
|
// processItems = selectItems.value
|
|
|
|
|
// }
|
|
|
|
|
// else if (overTask.value) {
|
|
|
|
|
// cloneItem = clone(overTask.value)
|
|
|
|
|
// processItems = [cloneItem]
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if (items !== undefined && !(items instanceof PointerEvent))
|
|
|
|
|
// processItems = items
|
|
|
|
|
|
|
|
|
|
// const msg = validate(processItems)
|
|
|
|
|
|
|
|
|
|
// if (msg !== null) {
|
|
|
|
|
// message.error(msg)
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
const modal = unref(notPassModalRef)! as any
|
|
|
|
|
modal.showModal(selectItems.value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const modal = unref(notPassModalRef)! as any;
|
|
|
|
|
modal.showModal(selectItems.value);
|
|
|
|
|
function singleRejectHandler() {
|
|
|
|
|
const modal = unref(notPassModalRef)! as any
|
|
|
|
|
modal.showModal([taskDetailInfo.value])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function doAudit(param: any) {
|
|
|
|
|
audit(param).then((res) => {
|
|
|
|
|
const { code } = res;
|
|
|
|
|
setBatch(false);
|
|
|
|
|
if (code === "OK") {
|
|
|
|
|
message.success("审核成功");
|
|
|
|
|
reloadList();
|
|
|
|
|
} else {
|
|
|
|
|
message.error(res.message);
|
|
|
|
|
const { code } = res
|
|
|
|
|
if (code === 'OK') {
|
|
|
|
|
message.success('审核成功')
|
|
|
|
|
setBatch(false)
|
|
|
|
|
reloadList(param, '通过')
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -276,12 +264,6 @@ async function getImgList() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从store里面获取任务id
|
|
|
|
|
const currentTaskId = computed(() => {
|
|
|
|
|
const index = taskStore.getCurrentIndex;
|
|
|
|
|
return taskStore.getApprovalList[index]?.id || "";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function overTaskHandle() {
|
|
|
|
|
const item = taskDetailInfo.value;
|
|
|
|
|
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
|
|
|
|
@ -321,11 +303,13 @@ function previewHandler(event: MouseEvent) {
|
|
|
|
|
watch(
|
|
|
|
|
() => [taskStore.activeId],
|
|
|
|
|
() => {
|
|
|
|
|
packageId.value = taskStore.getPackageid;
|
|
|
|
|
taskId.value = taskStore.getActiveId;
|
|
|
|
|
getDetail();
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
if (!isEmpty(taskStore.getActiveId)) {
|
|
|
|
|
packageId.value = taskStore.getPackageid
|
|
|
|
|
taskId.value = taskStore.getActiveId
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 获取数据
|
|
|
|
|
async function getDetail() {
|
|
|
|
@ -335,8 +319,15 @@ async function getDetail() {
|
|
|
|
|
getImgList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function reloadList() {
|
|
|
|
|
getDetail();
|
|
|
|
|
function reloadList(param, text) {
|
|
|
|
|
// 修改左侧状态
|
|
|
|
|
const id = currentTaskId()
|
|
|
|
|
const hasCurrentId = param.flowTaskInfoList.find(item => item.formId === id)
|
|
|
|
|
|
|
|
|
|
if (hasCurrentId)
|
|
|
|
|
emit('setAsideItemName', text)
|
|
|
|
|
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@ -429,7 +420,7 @@ function reloadList() {
|
|
|
|
|
width="168"
|
|
|
|
|
height="48"
|
|
|
|
|
name="r7"
|
|
|
|
|
@click.stop="rejectHandler"
|
|
|
|
|
@click.stop="singleRejectHandler"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="check">
|
|
|
|
@ -462,6 +453,9 @@ function reloadList() {
|
|
|
|
|
<SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 1" size="128" name="zhen" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="big-mark" />
|
|
|
|
|
<div class="preview" @click="previewHandler">
|
|
|
|
|
<SvgIcon size="16" name="zoom-out" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info img-info">
|
|
|
|
|
<n-grid x-gap="12" y-gap="10" :cols="12">
|
|
|
|
|
<n-gi span="4" class="gi1">
|
|
|
|
@ -491,20 +485,13 @@ function reloadList() {
|
|
|
|
|
</n-grid>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="time">
|
|
|
|
|
<div v-if="taskDetailInfo?.ocrPicture?.photoDateTimestamp" class="time-item">
|
|
|
|
|
<div class="time-item">
|
|
|
|
|
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
|
|
|
|
|
<span>{{
|
|
|
|
|
formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp) || 0)
|
|
|
|
|
}}</span>
|
|
|
|
|
<span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp)) : '-' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-if="taskDetailInfo?.ocrPicture?.submitDateTimestamp"
|
|
|
|
|
class="time-item time-item2"
|
|
|
|
|
>
|
|
|
|
|
<div class="time-item time-item2">
|
|
|
|
|
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
|
|
|
|
|
<span>{{
|
|
|
|
|
formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp) || 0)
|
|
|
|
|
}}</span>
|
|
|
|
|
<span>{{ taskDetailInfo?.ocrPicture?.submitDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp)) : '-' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none">
|
|
|
|
@ -562,17 +549,13 @@ function reloadList() {
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
<div class="time">
|
|
|
|
|
<div v-if="item.photoDateTimestamp" class="time-item">
|
|
|
|
|
<div class="time-item">
|
|
|
|
|
<SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" />
|
|
|
|
|
<span>{{
|
|
|
|
|
formatToDateHMS(Number(item.photoDateTimestamp) || 0)
|
|
|
|
|
}}</span>
|
|
|
|
|
<span>{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp)) : '-' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="item.submitDateTimestamp" class="time-item time-item2">
|
|
|
|
|
<div class="time-item time-item2">
|
|
|
|
|
<SvgIcon class="svg-time" color="#FFF" size="8" name="submit-time" />
|
|
|
|
|
<span>{{
|
|
|
|
|
formatToDateHMS(Number(item.submitDateTimestamp) || 0)
|
|
|
|
|
}}</span>
|
|
|
|
|
<span>{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
@ -604,12 +587,11 @@ function reloadList() {
|
|
|
|
|
<History :data="taskDetailInfo" />
|
|
|
|
|
</n-tab-pane>
|
|
|
|
|
</n-tabs>
|
|
|
|
|
<NotPassed ref="notPassModalRef" @success="reloadList" />
|
|
|
|
|
<BatchModal ref="batchModalRef" @reject="rejectHandler" @approval="approvalHandler" />
|
|
|
|
|
<CustomSettingModal
|
|
|
|
|
ref="CustomSettingModalRef"
|
|
|
|
|
:review-type="3"
|
|
|
|
|
@on-ok="getTableData"
|
|
|
|
|
<NotPassed ref="notPassModalRef" @success="(param) => reloadList(param, '不通过')" />
|
|
|
|
|
<BatchModal
|
|
|
|
|
ref="batchModalRef"
|
|
|
|
|
@reject="rejectHandler"
|
|
|
|
|
@approval="approvalHandler"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -777,7 +759,23 @@ function reloadList() {
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
.big-mark {
|
|
|
|
|
.preview {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 10px;
|
|
|
|
|
top: 10px;
|
|
|
|
|
z-index: 3;
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
background: rgba(255, 255, 255, 0.20);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
backdrop-filter: blur(10px);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.big-mark{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 151px;
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|