fix : 优化需求征集详情页面

This commit is contained in:
2024-06-04 16:41:28 +08:00
parent 6597506435
commit 1d66c44edb
16 changed files with 162 additions and 429 deletions

View File

@@ -55,19 +55,9 @@ const props = defineProps({
default: false
}
})
watch(() => props.loading, (newVal) => {
props.loading = newVal
}, {deep: true})
const form = ref()
const localData = reactive({
fileList: props.formData.fileList,
singleFile: props.formData.singleFile
})
const schema = computed(()=>{
let arr
if(props.type == 'approval') {
arr = [
{
@@ -86,7 +76,7 @@ const schema = computed(()=>{
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
props.formData.singleFile?.originalFileName?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
@@ -118,7 +108,7 @@ const schema = computed(()=>{
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
props.formData.singleFile?.originalFileName?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
@@ -143,7 +133,7 @@ const schema = computed(()=>{
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
props.formData.singleFile?.originalFileName?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
@@ -172,10 +162,13 @@ const handleDownload = (row) => {
loading.close()
})
}
watchEffect(()=>{
Object.keys(props.formData).length && (form.value.setValues(props.formData))
})
watch(() => props.loading, (newVal) => {
props.loading = newVal
}, {deep: true})
</script>
<style lang="scss" scoped>