fix : 优化需求征集详情页面
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user