Merge remote-tracking branch 'origin/master'

This commit is contained in:
clay
2024-06-02 22:36:09 +08:00
9 changed files with 217 additions and 143 deletions

View File

@@ -1,17 +1,10 @@
<template> <template>
<div v-loading="loading"> <div v-loading="loading">
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<!-- <AttachmentUpload></AttachmentUpload> --> <el-form :model="formData" label-width="auto" >
<el-form :model="formData" label-width="auto" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'"> <file-component title="需求上报附件" tag="需求上报"
<el-form-item label="其他文件"> v-model:value="formData.fileList" :processViewer="processViewer"
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/> :file-list-show="fileListShow"/>
<fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig"
:data="localFormData.fileList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template>
</fvTable>
</el-form-item>
</el-form> </el-form>
<div class="approval-record"> <div class="approval-record">
<baseTitle title="审批记录"></baseTitle> <baseTitle title="审批记录"></baseTitle>
@@ -21,19 +14,15 @@
<process-diagram-viewer v-if="processViewer" :id-name="type"/> <process-diagram-viewer v-if="processViewer" :id-name="type"/>
</div> </div>
</div> </div>
<!-- <Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>-->
</div> </div>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import { computed, markRaw, reactive, ref, watchEffect } from 'vue'; import { computed, markRaw, reactive, ref, watchEffect } from 'vue';
import AttachmentUpload from '../AttachmentUpload.vue';
import OperationRender from '@/views/workflow/common/OperationRender.vue' import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'; import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import Opinion from './Opinion.vue';
import fvTable from '@/fvcomponents/fvTable/index.vue'
import { ElLoading } from 'element-plus'; import { ElLoading } from 'element-plus';
import {deleteFile, downloadFile} from "@/api/project-demand"; import {downloadFile} from "@/api/project-demand";
const props = defineProps({ const props = defineProps({
formData: { formData: {
@@ -52,12 +41,16 @@ const props = defineProps({
type: Array, type: Array,
default: [] default: []
}, },
fileListShow: {
type: String,
default: 'READ'
},
// approval 立项, execute 实施, 归档 archivist // approval 立项, execute 实施, 归档 archivist
type: { type: {
type: String, type: String,
default: 'approval' default: 'approval'
}, loading: { },
loading: {
type: Boolean, type: Boolean,
default: false default: false
} }

View File

@@ -1,8 +1,8 @@
<template> <template>
<el-form-item label="需求上报附件" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'"> <el-form-item label="需求上报附件" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>{{fileList}} <file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
<fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig" <fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig"
:data="fileList" :isSettingCol="false" :pagination="false"> :data="_value" :isSettingCol="false" :pagination="false">
<template #empty> <template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/> <el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template> </template>
@@ -29,14 +29,17 @@ const props = defineProps({
type: String, type: String,
default: 'READ' default: 'READ'
}, },
fileList: { value: {
type: Array, type: Array,
default: [] default: []
}, },
processViewer: {
type: Boolean,
default: false
},
}) })
const processViewer = ref(false)
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
@@ -93,13 +96,21 @@ const tableConfig = reactive({
] ]
}) })
const _value = computed({
get() {
return props.value;
},
set(val) {
emit("update:value", val);
}
})
const getOtherFile = (val) => { const getOtherFile = (val) => {
processViewer.value = false props.processViewer = false
let fileObj = compositeParam(val) let fileObj = compositeParam(val)
props.fileList.push(fileObj) _value.value.push(fileObj)
nextTick(() => { nextTick(() => {
processViewer.value = true props.processViewer = true
}) })
} }
@@ -126,7 +137,7 @@ const handleDelete = (row) => {
deleteFile(row.fileId).then(res => { deleteFile(row.fileId).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
props.fileList.splice(props.fileList.findIndex((item) => item.id === row.fileId), 1); _value.splice(_value.findIndex((item) => item.id === row.fileId), 1);
} }
}); });
}).catch(() => { }).catch(() => {
@@ -134,15 +145,9 @@ const handleDelete = (row) => {
}) })
} }
const init = () => { watch(() => props.processViewer, (newVal) => {
nextTick(() => { props.processViewer = newVal
processViewer.value = true }, {deep: true})
})
}
init()
</script> </script>
<style scoped> <style scoped>

View File

@@ -133,7 +133,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<file-component title="需求上报附件" tag="需求上报" <file-component title="需求上报附件" tag="需求上报"
:file-list="localFormData.fileList" v-model:value="localFormData.fileList" :processViewer="processViewer"
:file-list-show="fileListShow"/> :file-list-show="fileListShow"/>
</el-col> </el-col>
</el-row> </el-row>

View File

@@ -5,11 +5,11 @@
<div class="steps-box"> <div class="steps-box">
<el-steps :active="localActive" finish-status="success"> <el-steps :active="localActive" finish-status="success">
<el-step <el-step
v-for="(item, index) in localSteps" v-for="(item, index) in localSteps"
:key="item.key" :key="item.key"
:title="item.title" :title="item.title"
:class="stepClass(index)" :class="stepClass(index)"
@click="handleStep(item.key, index)" @click="handleStep(item.key, index)"
/> />
</el-steps> </el-steps>
@@ -25,10 +25,10 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import { ElLoading, ElNotification } from 'element-plus'; import {ElLoading, ElNotification} from 'element-plus';
import { computed, reactive, ref, watchEffect } from 'vue'; import {computed, reactive, ref, watchEffect} from 'vue';
import { useRoute } from 'vue-router'; import {useRoute} from 'vue-router';
import { getBaseInfoApi } from './api'; import {getBaseInfoApi} from './api';
const props = defineProps({ const props = defineProps({
// 步骤对应内容list // 步骤对应内容list
@@ -39,7 +39,7 @@ const props = defineProps({
// 当前显示步骤 // 当前显示步骤
active: { active: {
type: Number, type: Number,
default:0 default: 0
}, },
// 已完成的工作流步骤 // 已完成的工作流步骤
stepSuccess: { stepSuccess: {
@@ -47,7 +47,7 @@ const props = defineProps({
default: ['00'] default: ['00']
}, },
//直接上报/需求征集 //直接上报/需求征集
reportType:{ reportType: {
type: String, type: String,
default: '' default: ''
} }
@@ -57,9 +57,7 @@ const route = useRoute()
const emits = defineEmits(['stepChange', 'setDetail']) const emits = defineEmits(['stepChange', 'setDetail'])
const localData = reactive({ const localData = reactive({})
})
const localActive = ref(0) // 当前激活步骤 const localActive = ref(0) // 当前激活步骤
@@ -92,7 +90,7 @@ const localSteps = ref([
const baseForm = ref() const baseForm = ref()
const schema = computed(()=>{ const schema = computed(() => {
return [ return [
{ {
label: '所属公司', label: '所属公司',
@@ -134,22 +132,43 @@ const localStepSuccess = ref([])
// 格式化详情步骤条 // 格式化详情步骤条
const formatProcedure = (data) => { const formatProcedure = (data) => {
let arr = [] let arr = []
if(data instanceof Array) { if (data instanceof Array) {
data.forEach(item=>{ data.forEach(item => {
switch (item) { if (props.reportType === 'direct') {
case '00': arr.push(0) switch (item) {
break case '10':
case '10': arr.push(1) arr.push(0)
break break
case '20': arr.push(2) case '20':
break arr.push(1)
// case '30': arr.push(3) break
// break case '40':
case '40': arr.push(3) arr.push(2)
break break
case '50': arr.push(4) case '50':
break arr.push(3)
break
}
} else {
switch (item) {
case '00':
arr.push(0)
break
case '10':
arr.push(1)
break
case '20':
arr.push(2)
break
case '40':
arr.push(3)
break
case '50':
arr.push(4)
break
}
} }
}) })
} }
return arr return arr
@@ -158,20 +177,25 @@ const formatProcedure = (data) => {
// 反向格式化 // 反向格式化
const formatReProcedure = (data) => { const formatReProcedure = (data) => {
let arr = [] let arr = []
if(data instanceof Array) { if (data instanceof Array) {
data.forEach(item=>{ data.forEach(item => {
switch (item) { switch (item) {
case 0: arr.push('00') case 0:
arr.push('00')
break break
case 1: arr.push('10') case 1:
arr.push('10')
break break
case 2: arr.push('20') case 2:
arr.push('20')
break break
// case 3: arr.push('30') // case 3: arr.push('30')
// break // break
case 3: arr.push('40') case 3:
arr.push('40')
break break
case 4: arr.push('50') case 4:
arr.push('50')
break break
} }
}) })
@@ -179,17 +203,24 @@ const formatReProcedure = (data) => {
} }
const formatActive = (val) => { const formatActive = (val) => {
let newVal
if (props.reportType === 'direct') {
newVal = val + 1
} else {
newVal = val
}
let active = '' let active = ''
val == 0 && (active = '00') newVal == 0 && (active = '00')
val == 1 && (active = '10') newVal == 1 && (active = '10')
val == 2 && (active = '20') newVal == 2 && (active = '20')
// val == 3 && (active = '30') // val == 3 && (active = '30')
val == 3 && (active = '40') newVal == 3 && (active = '40')
val == 4 && (active = '50') newVal == 4 && (active = '50')
return active return active
} }
const stepClass = (val) => { const stepClass = (val) => {
console.log('localStepSuccess.value',localStepSuccess.value,val)
if (localStepSuccess.value.includes(val)) { if (localStepSuccess.value.includes(val)) {
return 'step-success' return 'step-success'
} }
@@ -197,24 +228,45 @@ const stepClass = (val) => {
} }
const handleStep = (key, index) => { const handleStep = (key, index) => {
console.log('key, index',key, index)
if (localStepSuccess.value.includes(index)) { if (localStepSuccess.value.includes(index)) {
let active = '' let active = ''
localActive.value = index localActive.value = index
switch(index) { if (props.reportType === 'direct') {
case 0: active = '00' switch (index) {
break case 0:
case 1: active = '10' active = '10'
break break
case 2: active = '20' case 1:
break active = '20'
// case 3: active = '30' break
// break case 2:
case 3: active = '40' active = '40'
break break
case 4: active = '50' case 3:
break active = '50'
break
}
} else {
switch (index) {
case 0:
active = '00'
break
case 1:
active = '10'
break
case 2:
active = '20'
break
case 3:
active = '40'
break
case 4:
active = '50'
break
}
} }
emits('stepChange', { key, active }) emits('stepChange', {key, active})
return return
} }
ElNotification({ ElNotification({
@@ -227,10 +279,9 @@ const handleStep = (key, index) => {
const getBaseInfo = async () => { const getBaseInfo = async () => {
const loading = ElLoading.service({fullscreen: true}) const loading = ElLoading.service({fullscreen: true})
try { try {
const { code, data } = await getBaseInfoApi(route.query.projectId) const {code, data} = await getBaseInfoApi(route.query.projectId)
localStepSuccess.value = formatProcedure(data.procedure) localStepSuccess.value = formatProcedure(data.procedure)
baseForm.value.setValues(data) baseForm.value.setValues(data)
console.log(formatActive(localActive.value), 'formatActive(localActive.value)');
emits('setDetail', formatActive(localActive.value)) emits('setDetail', formatActive(localActive.value))
loading.close() loading.close()
} catch { } catch {
@@ -244,8 +295,8 @@ watchEffect(() => {
localActive.value = props.active localActive.value = props.active
}) })
watchEffect(() => { watchEffect(() => {
if(props.reportType==='direct'){ if (props.reportType === 'direct') {
localSteps.value=localSteps.value.slice(1) localSteps.value = localSteps.value.slice(1)
} }
}) })
</script> </script>

View File

@@ -1,16 +1,16 @@
<template> <template>
<steps :active="1" @setDetail="setDetail" @stepChange="stepChange" :reportType="route.query.id=='-1'?'direct':''"> <steps :active="route.query.id==='-1'?0:1" @setDetail="setDetail" @stepChange="stepChange" :reportType="route.query.id==='-1'?'direct':''">
<template #content> <template #content>
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData" <collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading"/> :processViewer="summaryProcessViewer" :loading="loading"/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" <summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/> :processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail> <ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="summaryData.formData" :data="summaryData" <ApprovalDetail type="execute" v-show="showActive == '40'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail> :processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="summaryData.formData" :data="summaryData" <ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail> :processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/>
</template> </template>
</steps> </steps>
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"></opinion> <opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"></opinion>
@@ -48,6 +48,7 @@ const getInfo = async (state) => {
processStore.passList.value = data.passList; processStore.passList.value = data.passList;
nextTick(() => { nextTick(() => {
summaryProcessViewer.value = true summaryProcessViewer.value = true
console.log('data.formPermMap["fileList"]',data.formPermMap["fileList"])
if (data.formPermMap["fileList"]) { if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm fileListShow.value = data.formPermMap["fileList"].perm
} }

View File

@@ -246,7 +246,7 @@ const handleDetail = (row) => {
router.push({ router.push({
name: 'Summary/detail', name: 'Summary/detail',
query: { query: {
id: row.requirementId===null?'-1':row.requirementId, id: row.requirementId==null?'-1':row.requirementId,
projectId: row.projectId, projectId: row.projectId,
state: row.state state: row.state
} }

View File

@@ -9,13 +9,13 @@
:loading="loading" :loading="loading"
/> />
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" <summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"/> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" <ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" <ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm" <ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
</template> </template>
</steps> </steps>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/> <opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
@@ -36,6 +36,7 @@ const loading = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const activeName = ref('first') const activeName = ref('first')
const commonForm = ref({}) const commonForm = ref({})
const fileListShow = ref('READ')
const commonProvessViewer = ref(true) const commonProvessViewer = ref(true)
const getAllInfo = async (state) => { const getAllInfo = async (state) => {
@@ -43,17 +44,17 @@ const getAllInfo = async (state) => {
try { try {
commonProvessViewer.value = false commonProvessViewer.value = false
loading.value = true loading.value = true
const {data, code,msg} = await getMapProjectStateInfo(route.query.projectId, state) const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
if(code===1000){ if (code === 1000) {
loading.value = false loading.value = false
}else { } else {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: msg,
type: 'error' type: 'error'
}) })
} }
if(data===undefined)return; if (data === undefined) return;
commonForm.value = data commonForm.value = data
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;
@@ -63,6 +64,9 @@ const getAllInfo = async (state) => {
processStore.passList.value = data.passList; processStore.passList.value = data.passList;
nextTick(() => { nextTick(() => {
commonProvessViewer.value = true commonProvessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
}) })
loading.close() loading.close()
} catch { } catch {

View File

@@ -1,18 +1,24 @@
<template> <template>
<steps :active="cuurentStep" @setDetail="setDetail" @stepChange="stepChange"> <steps :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
:reportType="route.query.id==='-1'?'direct':''">
<template #content> <template #content>
<collection-detail <collection-detail
:formData="commonForm.formData" :formData="commonForm.formData"
:data="commonForm" :data="commonForm"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
v-show="showActive == '00'" v-show="showActive == '00'"
:loading="loading" :loading="loading"
/> />
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/> <summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> <ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
:fileListShow="fileListShow"/>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
:fileListShow="fileListShow"/>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm" <ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
</template> </template>
</steps> </steps>
@@ -24,7 +30,7 @@ import {useProcessStore} from '@/stores/processStore.js';
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue"; import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue"; import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue"; import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
import { getMapProjectStateInfo } from '@/components/steps/api'; import {getMapProjectStateInfo} from '@/components/steps/api';
import {ElLoading, ElNotification} from "element-plus"; import {ElLoading, ElNotification} from "element-plus";
import Opinion from "@/components/DetailComponent/Opinion.vue"; import Opinion from "@/components/DetailComponent/Opinion.vue";
@@ -32,11 +38,12 @@ const route = useRoute()
const activeName = ref('first') const activeName = ref('first')
const loading = ref(false) const loading = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const cuurentStep = ref() const fileListShow = ref('READ')
route.query.step == '10' && (cuurentStep.value = 1) const currentStep = ref()
route.query.step == '20' && (cuurentStep.value = 2) route.query.step == '10' && (currentStep.value = 1)
route.query.step == '40' && (cuurentStep.value = 3) route.query.step == '20' && (currentStep.value = 2)
route.query.step == '50' && (cuurentStep.value = 4) route.query.step == '40' && (currentStep.value = 3)
route.query.step == '50' && (currentStep.value = 4)
const showActive = ref() const showActive = ref()
const commonForm = ref({}) const commonForm = ref({})
const commonProvessViewer = ref(true) const commonProvessViewer = ref(true)
@@ -46,18 +53,18 @@ const getAllInfo = async (state) => {
try { try {
commonProvessViewer.value = false commonProvessViewer.value = false
loading.value = true loading.value = true
const { data, code ,msg} = await getMapProjectStateInfo(route.query.projectId, state) const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
if(code===1000){ if (code === 1000) {
loading.value = false loading.value = false
}else { } else {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: msg,
type: 'error' type: 'error'
}) })
loading.close() loading.close()
} }
if(data===undefined)return; if (data === undefined) return;
commonForm.value = data commonForm.value = data
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;
@@ -67,6 +74,9 @@ const getAllInfo = async (state) => {
processStore.passList.value = data.passList; processStore.passList.value = data.passList;
nextTick(() => { nextTick(() => {
commonProvessViewer.value = true commonProvessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
}) })
loading.close() loading.close()
} catch { } catch {
@@ -87,19 +97,23 @@ const stepChange = (data) => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.detail-block{ .detail-block {
padding-top: 15px; padding-top: 15px;
:deep(.el-tabs__nav-scroll){
:deep(.el-tabs__nav-scroll) {
width: 100%; width: 100%;
display: flex; display: flex;
.el-tabs__nav{
.el-tabs__nav {
display: flex; display: flex;
flex: 1; flex: 1;
.el-tabs__item{
.el-tabs__item {
flex: 1; flex: 1;
font-size: 16px; font-size: 16px;
} }
.is-active{
.is-active {
color: black; color: black;
background-color: #DED0B2; background-color: #DED0B2;
} }

View File

@@ -8,12 +8,14 @@
v-show="showActive == '00'" v-show="showActive == '00'"
:loading="loading" :loading="loading"
/> />
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/> <summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
<ApprovalDetail v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" <ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm" <ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail> :processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"/>
</template> </template>
</steps> </steps>
@@ -31,6 +33,7 @@ import Opinion from "@/components/DetailComponent/Opinion.vue";
const route = useRoute() const route = useRoute()
const activeName = ref('first') const activeName = ref('first')
const fileListShow = ref('READ')
const loading = ref(false) const loading = ref(false)
const active = ref(route.query.state) const active = ref(route.query.state)
const processStore = useProcessStore() const processStore = useProcessStore()
@@ -63,6 +66,9 @@ const getAllInfo = async (state) => {
processStore.passList.value = data.passList; processStore.passList.value = data.passList;
nextTick(() => { nextTick(() => {
commonProvessViewer.value = true commonProvessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
}) })
loading.close() loading.close()
} catch { } catch {