feat:任务详情开启关闭规则 #110

Merged
shenhailong merged 1 commits from fix/approvelDetail into test 1 year ago

@ -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)

@ -824,6 +824,13 @@ watch(
{ deep: true }, { deep: true },
) )
watch(
() => finalStore.listKey,
(newVal, oldVal) => {
refreshHandler()
},
)
function reset() { function reset() {
pagination.page = 1 pagination.page = 1
pagination.pageCount = 1 pagination.pageCount = 1

@ -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>

@ -11,6 +11,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 +42,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',
@ -366,7 +368,7 @@ 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) if (hasCurrentId)
emit('setAsideItemName', text) emit('setAsideItemName', text)

Loading…
Cancel
Save