fix : 附件上传修复
This commit is contained in:
@@ -429,6 +429,7 @@ watchEffect(() => {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
@@ -394,10 +394,6 @@ const handleSearch = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
if(props.title&&props.title==='check'){
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
}
|
||||
const handleUpload = () => {
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
@@ -684,6 +680,10 @@ const handleSubmit = async () => {
|
||||
}
|
||||
}
|
||||
const init = async () => {
|
||||
if(props.title&&props.title==='check'){
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
}
|
||||
let id = projectId.value
|
||||
if (!id) return;
|
||||
processDiagramViewer.value = false
|
||||
@@ -742,6 +742,9 @@ watchEffect(() => {
|
||||
// console.log('projectPersonUserList.value',projectPersonUserList.value)
|
||||
return flag
|
||||
})
|
||||
onActivated(()=>{
|
||||
init()
|
||||
})
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<div class="steps-box">
|
||||
<el-steps :active="localActive" finish-status="success">
|
||||
<el-steps v-if="stepsShow" :active="localActive" finish-status="success">
|
||||
<el-step
|
||||
v-for="(item, index) in localSteps"
|
||||
:key="item.key"
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElLoading, ElNotification} from 'element-plus';
|
||||
import {computed, reactive, ref, watchEffect} from 'vue';
|
||||
import {computed, onMounted, reactive, ref, watchEffect} from 'vue';
|
||||
import {useRoute} from 'vue-router';
|
||||
import {getBaseInfoApi} from './api';
|
||||
|
||||
@@ -69,6 +69,8 @@ const localData = reactive({})
|
||||
|
||||
const localActive = ref(0) // 当前激活步骤
|
||||
|
||||
const stepsShow = ref(false)
|
||||
|
||||
const localSteps = ref([
|
||||
{
|
||||
title: '需求征集',
|
||||
@@ -280,9 +282,10 @@ const handleStep = (key, index) => {
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
stepsShow.value = false
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
// console.log('data.procedure',data.procedure,route.query.step)
|
||||
console.log('data.procedure', data.procedure, route.query.step)
|
||||
if (route.query.step === '40') {
|
||||
if (data.procedure.indexOf('40') == -1) {
|
||||
data.procedure.push('40')
|
||||
@@ -296,19 +299,34 @@ const getBaseInfo = async () => {
|
||||
baseForm.value.setValues(data)
|
||||
emits('setDetail', formatActive(localActive.value))
|
||||
loading.close()
|
||||
nextTick(() => {
|
||||
stepsShow.value = true
|
||||
})
|
||||
} catch {
|
||||
loading.close()
|
||||
nextTick(() => {
|
||||
stepsShow.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
|
||||
// onActivated(() => {
|
||||
// getBaseInfo()
|
||||
// })
|
||||
watchEffect(() => {
|
||||
localActive.value = props.active
|
||||
})
|
||||
watchEffect(() => {
|
||||
if (props.reportType === 'direct') {
|
||||
localSteps.value = localSteps.value.slice(1)
|
||||
let steps = []
|
||||
for (const step of localSteps.value) {
|
||||
if (step.key !== 'collect'){
|
||||
steps.push(step)
|
||||
}
|
||||
}
|
||||
localSteps.value = steps
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -333,9 +351,11 @@ watchEffect(() => {
|
||||
.is-end {
|
||||
color: #BEA266;
|
||||
}
|
||||
|
||||
:deep(.el-step__title.is-success) {
|
||||
color: #A8abb2;
|
||||
}
|
||||
|
||||
:deep(.el-step__head.is-success) {
|
||||
border-color: #A8abb2;
|
||||
}
|
||||
|
||||
@@ -189,6 +189,9 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
|
||||
onActivated(()=>{
|
||||
handleSearch()
|
||||
})
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
</script>
|
||||
|
||||
@@ -75,7 +75,6 @@ route.query.step == '50' && (currentStep.value = 4)
|
||||
const showActive = ref()
|
||||
const detailData = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
console.log('刷新详情')
|
||||
localStorage.removeItem('singleFile')
|
||||
localStorage.removeItem('otherFileList')
|
||||
localStorage.removeItem('preProcess')
|
||||
@@ -143,6 +142,8 @@ const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
getAllInfo(data.active)
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -352,10 +352,11 @@ const handleStandingBook = (row) => {
|
||||
})
|
||||
}
|
||||
const handleAttachment = (row) => {
|
||||
console.log('row',row)
|
||||
router.push({
|
||||
name: 'Implementation/attachment',
|
||||
query: {
|
||||
id: row.projectId
|
||||
id: row.projectId,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -247,11 +247,11 @@ const handleSubmit = async (instance) => {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (router.query.type !== '40') {
|
||||
if (router.query.type || router.query.type !== '40') {
|
||||
router.push({
|
||||
name: 'Implementation/attachment',
|
||||
query: {
|
||||
id: route.query.id
|
||||
projectId: route.query.projectId
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user