Merge branch 'test' into feat/ui_change

# Conflicts:
#	src/views/task/content/Content.vue
pull/117/head
刘释隆 1 year ago
commit e8ede46d05

13909
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
import type { AsideEntity } from './aside'
import { IzApprovalStatus, IzProjectVue, IzStatus, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue, IzCustomname, IzCustomtype, IzVisitcity, IzCustomlevel, IzProjecttype, IzProductVue, IzvisitproVue, IzfirmVue } from '@/views/home/aside/comp/items'
import { IzApprovalStatus, IzCustomlevel, IzCustomname, IzCustomtype, IzProductVue, IzProjectVue, IzProjecttype, IzShowAll, IzStatus, IzVisitcity, IzfirmVue, IztaskrromVue, IzvisitproVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue } from '@/views/home/aside/comp/items'
export interface RowData {
id: string
@ -125,12 +125,11 @@ export const asideMap: Recordable<AsideEntity> = {
defaultValue: true,
isDefaultFilter: false,
key: 'izshowall',
component: PictureDownloadVue,
component: IzShowAll,
inFilterList: false,
},
}
// 审批添加筛选配置 (左侧)
export const asideTaskMap: Recordable<AsideEntity> = {
izstatus: {
@ -194,7 +193,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
defaultValue: null,
isDefaultFilter: true,
key: 'izcustomlevel',
component: IzCustomlevel
component: IzCustomlevel,
},
izprojecttype: {
label: '项目类别',
@ -223,5 +222,5 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true,
key: 'izfirm',
component: IzfirmVue,
}
}
},
}

@ -623,7 +623,7 @@ async function refreshHandler(filtersearchId?: any) {
.img {
border-radius: 7px;
display: block;
height: calc(100%);
height: 100%;
}
.wrapper {

@ -28,9 +28,10 @@ const routes: Array<RouteRecordRaw> = [
children: [
{
path: 'final',
name: 'final-main',
name: 'FinalMain',
meta: {
title: '任务终审',
keepAlive: true,
},
component: () => import('@/views/final/index.vue'),
},

@ -5,6 +5,7 @@ import { getFilter } from '@/api/home/filter'
export interface ConfigState {
customConfig: string[] | null
asideValue: any
listKey: number
}
export const useFinalStore = defineStore({
@ -12,6 +13,7 @@ export const useFinalStore = defineStore({
state: (): ConfigState => ({
customConfig: null,
asideValue: null,
listKey: 0,
}),
getters: {
getCustomConfig(): string[] | null {
@ -25,6 +27,9 @@ export const useFinalStore = defineStore({
setAsideValue(value) {
this.asideValue = value
},
setListKey() {
this.listKey = new Date().getTime()
},
// 获取终审个性化配置
async fetchCustomConfig() {
const res = await getFilter(1)

File diff suppressed because it is too large Load Diff

@ -4,25 +4,26 @@ import Aside from './aside/Aside.vue'
import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue'
const showList = ref(false);
const contentRef:any = ref(null);
const inputChange = (keyword)=>{
defineOptions({
name: 'FinalMain',
})
const showList = ref(false)
const contentRef: any = ref(null)
function inputChange(keyword) {
contentRef.value.filterTableData(keyword)
}
</script>
<template>
<div class="main">
<!-- 侧边 -->
<Aside @inputChange="inputChange" />
<Aside @input-change="inputChange" />
<!-- 内容 -->
<Content @changeShow="showList=true" ref="contentRef" v-show="!showList" />
<Content v-show="!showList" ref="contentRef" @change-show="showList = true" />
<!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-show="showList" @changeShow="showList=false" />
<ListContent v-show="showList" @change-show="showList = false" />
</div>
</template>

@ -0,0 +1,46 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { useConfig } from '@/store/modules/asideConfig'
const props = defineProps({
value: {
type: Boolean,
default: true,
},
label: {
type: String,
default: '',
},
})
const emit = defineEmits<{
(e: 'update:value', value: boolean): void
}>()
const configStore = useConfig()
const download = ref(props.value)
function onChange(value: boolean) {
emit('update:value', value)
}
</script>
<template>
<div class="download">
<span class="download-title">{{ label }}</span>
<n-switch v-model:value="download" @update:value="onChange" />
</div>
</template>
<style lang="less" scoped>
.download {
display: flex;
padding: 10px;
justify-content: space-between;
&-title {
font-weight: bold;
}
}
</style>

@ -20,6 +20,6 @@ import ReportUserVue from './ReportUser.vue'
import SimilarityVue from './Similarity.vue'
import TimeVue from './Time.vue'
import IzApprovalStatus from './IzApprovalStatus.vue'
import IzShowAll from './IzShowAll.vue'
export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus }
export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus, IzShowAll }

@ -1,5 +1,13 @@
<script lang="ts" setup>
import { computed, onMounted, onUnmounted, reactive, ref, unref, watch } from "vue";
import {
computed,
onMounted,
onUnmounted,
reactive,
ref,
unref,
watch,
} from "vue";
import { chunk, clone } from "lodash-es";
import { useDialog, useMessage } from "naive-ui";
import { useRoute, useRouter } from "vue-router";
@ -11,6 +19,7 @@ import History from "./History.vue";
import NotPassed from "@/components/Approval/NotPassed.vue";
import { getAllfieldList, getfieldList } from "@/api/home/filter";
import { TASK_STATUS_OBJ } from "@/enums/index";
import { useFinal } from "@/store/modules/final";
import {
audit,
@ -41,6 +50,7 @@ const CustomSettingModalRef = ref(null);
const taskTableData = ref<any[]>([]);
const route = useRoute();
const isDetail = ref(false); //
const finalStore = useFinal();
const sortBy: any = {
orderType: "desc",
orderName: "similarityScore",
@ -150,7 +160,8 @@ function approvalHandler(items?: any) {
processItems = [cloneItem];
}
if (items !== undefined && !(items instanceof PointerEvent)) processItems = items;
if (items !== undefined && !(items instanceof PointerEvent))
processItems = items;
const msg = validate(processItems);
@ -356,8 +367,10 @@ function notPassSuccess(param) {
function reloadList(param, text) {
//
const id = currentTaskId();
const hasCurrentId = param.flowTaskInfoList.find((item) => item.formId === id);
const hasCurrentId = param.flowTaskInfoList.find(
(item) => item.formId === id
);
finalStore.setListKey();
if (hasCurrentId) emit("setAsideItemName", text);
getDetail();
@ -378,8 +391,18 @@ function switchBatch() {
<div class="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
<template v-if="!isDetail">
<SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
<SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
<SvgIcon
size="22"
class="forward"
name="arrow-left"
@click="backHandler"
/>
<SvgIcon
size="22"
class="back"
name="arrow-right"
@click="forwardHandler"
/>
</template>
</div>
<div v-if="!isDetail" class="right">
@ -511,10 +534,18 @@ function switchBatch() {
/>
</div>
<div class="mark">
<SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 0" size="128" name="jia" />
<SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
</div>
<div class="mark">
<SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 1" size="128" name="zhen" />
<SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 1"
size="128"
name="zhen"
/>
</div>
<div class="big-mark" />
<div class="preview" @click="previewHandler">
@ -524,7 +555,11 @@ function switchBatch() {
<n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1">
<span>
<img class="icon-status" src="@/assets/images/task/status.png" alt="" />
<img
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
/>
</span>
</n-gi>
<n-gi span="8" class="gi2">
@ -543,25 +578,41 @@ function switchBatch() {
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span class="value num">{{ totalCount }}<span class="unit"></span> </span>
<span class="value num"
>{{ totalCount }}<span class="unit"></span>
</span>
<span class="label">相似匹配</span>
</n-gi>
</n-grid>
</div>
<div class="time">
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="camera-time"
/>
<span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp
? formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp))
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.photoDateTimestamp)
)
: "-"
}}</span>
</div>
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="submit-time"
/>
<span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp))
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.submitDateTimestamp)
)
: "-"
}}</span>
</div>
@ -587,11 +638,23 @@ function switchBatch() {
/>
</div>
<div class="list">
<div v-for="item in taskDetailPictureList" :key="item.id" class="item">
<div
v-for="item in taskDetailPictureList"
:key="item.id"
class="item"
draggable="true"
@dragend="
(event) => {
handleDragEnd(event, item);
}
"
>
<div
draggable="true"
class="img-wrapper"
:style="{ 'background-image': `url(${item.serverThumbnailUrl})` }"
:style="{
'background-image': `url(${item.serverThumbnailUrl})`,
}"
@dragend="
(event) => {
handleDragEnd(event, item);
@ -622,7 +685,12 @@ function switchBatch() {
/>
<div class="time">
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" />
<SvgIcon
class="svg-time"
color="#FFF"
size="8"
name="camera-time"
/>
<span>{{
item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp))
@ -630,7 +698,12 @@ function switchBatch() {
}}</span>
</div>
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="8" name="submit-time" />
<SvgIcon
class="svg-time"
color="#FFF"
size="8"
name="submit-time"
/>
<span>{{
item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp))
@ -668,7 +741,11 @@ function switchBatch() {
</n-tab-pane>
</n-tabs>
<NotPassed ref="notPassModalRef" @success="notPassSuccess" />
<BatchModal ref="batchModalRef" @reject="rejectHandler" @approval="approvalHandler" />
<BatchModal
ref="batchModalRef"
@reject="rejectHandler"
@approval="approvalHandler"
/>
<CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
</div>
</template>
@ -938,7 +1015,10 @@ function switchBatch() {
z-index: 3;
left: 16px;
bottom: 16px;
padding-left: 10px;
width: 195px;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item {
display: flex;
align-items: center;
@ -1054,6 +1134,10 @@ function switchBatch() {
z-index: 3;
left: 3px;
bottom: 3px;
width: 98%;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item {
display: flex;
align-items: center;

Loading…
Cancel
Save