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 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 { export interface RowData {
id: string id: string
@ -125,12 +125,11 @@ export const asideMap: Recordable<AsideEntity> = {
defaultValue: true, defaultValue: true,
isDefaultFilter: false, isDefaultFilter: false,
key: 'izshowall', key: 'izshowall',
component: PictureDownloadVue, component: IzShowAll,
inFilterList: false, inFilterList: false,
}, },
} }
// 审批添加筛选配置 (左侧) // 审批添加筛选配置 (左侧)
export const asideTaskMap: Recordable<AsideEntity> = { export const asideTaskMap: Recordable<AsideEntity> = {
izstatus: { izstatus: {
@ -194,7 +193,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomlevel', key: 'izcustomlevel',
component: IzCustomlevel component: IzCustomlevel,
}, },
izprojecttype: { izprojecttype: {
label: '项目类别', label: '项目类别',
@ -223,5 +222,5 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izfirm', key: 'izfirm',
component: IzfirmVue, component: IzfirmVue,
} },
} }

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

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

@ -5,6 +5,7 @@ import { getFilter } from '@/api/home/filter'
export interface ConfigState { export interface ConfigState {
customConfig: string[] | null customConfig: string[] | null
asideValue: any asideValue: any
listKey: number
} }
export const useFinalStore = defineStore({ export const useFinalStore = defineStore({
@ -12,6 +13,7 @@ export const useFinalStore = defineStore({
state: (): ConfigState => ({ state: (): ConfigState => ({
customConfig: null, customConfig: null,
asideValue: null, asideValue: null,
listKey: 0,
}), }),
getters: { getters: {
getCustomConfig(): string[] | null { getCustomConfig(): string[] | null {
@ -25,6 +27,9 @@ export const useFinalStore = defineStore({
setAsideValue(value) { setAsideValue(value) {
this.asideValue = value this.asideValue = value
}, },
setListKey() {
this.listKey = new Date().getTime()
},
// 获取终审个性化配置 // 获取终审个性化配置
async fetchCustomConfig() { async fetchCustomConfig() {
const res = await getFilter(1) 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 Content from './content/Content.vue'
import ListContent from './content/ListContent.vue' import ListContent from './content/ListContent.vue'
const showList = ref(false); defineOptions({
const contentRef:any = ref(null); name: 'FinalMain',
const inputChange = (keyword)=>{ })
const showList = ref(false)
const contentRef: any = ref(null)
function inputChange(keyword) {
contentRef.value.filterTableData(keyword) contentRef.value.filterTableData(keyword)
} }
</script> </script>
<template> <template>
<div class="main"> <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:本地演示即可 上传注释注释 --> <!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-show="showList" @changeShow="showList=false" /> <ListContent v-show="showList" @change-show="showList = false" />
</div> </div>
</template> </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 SimilarityVue from './Similarity.vue'
import TimeVue from './Time.vue' import TimeVue from './Time.vue'
import IzApprovalStatus from './IzApprovalStatus.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> <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 { chunk, clone } from "lodash-es";
import { useDialog, useMessage } from "naive-ui"; import { useDialog, useMessage } from "naive-ui";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
@ -11,6 +19,7 @@ import History from "./History.vue";
import NotPassed from "@/components/Approval/NotPassed.vue"; import NotPassed from "@/components/Approval/NotPassed.vue";
import { getAllfieldList, getfieldList } from "@/api/home/filter"; import { getAllfieldList, getfieldList } from "@/api/home/filter";
import { TASK_STATUS_OBJ } from "@/enums/index"; import { TASK_STATUS_OBJ } from "@/enums/index";
import { useFinal } from "@/store/modules/final";
import { import {
audit, audit,
@ -41,6 +50,7 @@ const CustomSettingModalRef = ref(null);
const taskTableData = ref<any[]>([]); const taskTableData = ref<any[]>([]);
const route = useRoute(); const route = useRoute();
const isDetail = ref(false); // const isDetail = ref(false); //
const finalStore = useFinal();
const sortBy: any = { const sortBy: any = {
orderType: "desc", orderType: "desc",
orderName: "similarityScore", orderName: "similarityScore",
@ -150,7 +160,8 @@ function approvalHandler(items?: any) {
processItems = [cloneItem]; processItems = [cloneItem];
} }
if (items !== undefined && !(items instanceof PointerEvent)) processItems = items; if (items !== undefined && !(items instanceof PointerEvent))
processItems = items;
const msg = validate(processItems); const msg = validate(processItems);
@ -356,8 +367,10 @@ function notPassSuccess(param) {
function reloadList(param, text) { function reloadList(param, text) {
// //
const id = currentTaskId(); 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); if (hasCurrentId) emit("setAsideItemName", text);
getDetail(); getDetail();
@ -378,8 +391,18 @@ function switchBatch() {
<div class="left"> <div class="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span> <span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
<template v-if="!isDetail"> <template v-if="!isDetail">
<SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" /> <SvgIcon
<SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" /> size="22"
class="forward"
name="arrow-left"
@click="backHandler"
/>
<SvgIcon
size="22"
class="back"
name="arrow-right"
@click="forwardHandler"
/>
</template> </template>
</div> </div>
<div v-if="!isDetail" class="right"> <div v-if="!isDetail" class="right">
@ -511,10 +534,18 @@ function switchBatch() {
/> />
</div> </div>
<div class="mark"> <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>
<div class="mark"> <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>
<div class="big-mark" /> <div class="big-mark" />
<div class="preview" @click="previewHandler"> <div class="preview" @click="previewHandler">
@ -524,7 +555,11 @@ function switchBatch() {
<n-grid x-gap="12" y-gap="10" :cols="12"> <n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1"> <n-gi span="4" class="gi1">
<span> <span>
<img class="icon-status" src="@/assets/images/task/status.png" alt="" /> <img
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
/>
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
@ -543,25 +578,41 @@ function switchBatch() {
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <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> <span class="label">相似匹配</span>
</n-gi> </n-gi>
</n-grid> </n-grid>
</div> </div>
<div class="time"> <div class="time">
<div class="time-item"> <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>{{ <span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp taskDetailInfo?.ocrPicture?.photoDateTimestamp
? formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp)) ? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.photoDateTimestamp)
)
: "-" : "-"
}}</span> }}</span>
</div> </div>
<div class="time-item time-item2"> <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>{{ <span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp)) ? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.submitDateTimestamp)
)
: "-" : "-"
}}</span> }}</span>
</div> </div>
@ -587,11 +638,23 @@ function switchBatch() {
/> />
</div> </div>
<div class="list"> <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 <div
draggable="true" draggable="true"
class="img-wrapper" class="img-wrapper"
:style="{ 'background-image': `url(${item.serverThumbnailUrl})` }" :style="{
'background-image': `url(${item.serverThumbnailUrl})`,
}"
@dragend=" @dragend="
(event) => { (event) => {
handleDragEnd(event, item); handleDragEnd(event, item);
@ -622,7 +685,12 @@ function switchBatch() {
/> />
<div class="time"> <div class="time">
<div class="time-item"> <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>{{ <span>{{
item.photoDateTimestamp item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp)) ? formatToDateHMS(Number(item.photoDateTimestamp))
@ -630,7 +698,12 @@ function switchBatch() {
}}</span> }}</span>
</div> </div>
<div class="time-item time-item2"> <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>{{ <span>{{
item.submitDateTimestamp item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp)) ? formatToDateHMS(Number(item.submitDateTimestamp))
@ -668,7 +741,11 @@ function switchBatch() {
</n-tab-pane> </n-tab-pane>
</n-tabs> </n-tabs>
<NotPassed ref="notPassModalRef" @success="notPassSuccess" /> <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" /> <CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
</div> </div>
</template> </template>
@ -938,7 +1015,10 @@ function switchBatch() {
z-index: 3; z-index: 3;
left: 16px; left: 16px;
bottom: 16px; bottom: 16px;
padding-left: 10px;
width: 195px;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item { .time-item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1054,6 +1134,10 @@ function switchBatch() {
z-index: 3; z-index: 3;
left: 3px; left: 3px;
bottom: 3px; bottom: 3px;
width: 98%;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item { .time-item {
display: flex; display: flex;
align-items: center; align-items: center;

Loading…
Cancel
Save