fix : 修复页面细节
This commit is contained in:
@@ -110,19 +110,20 @@ watch(() => props.showTable, (newVal) => {
|
||||
props.showTable = newVal
|
||||
}, {deep: true})
|
||||
watch(() => props.otherFileList, (newVal) => {
|
||||
newVal.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
console.log('new',newVal)
|
||||
// newVal?.forEach(item => {
|
||||
allFileList.value=newVal
|
||||
// })
|
||||
}, {deep: true})
|
||||
watch(() => props.formData.fileList, (newVal) => {
|
||||
if (props.preview) {
|
||||
newVal.forEach(item => {
|
||||
newVal?.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}
|
||||
}, {deep: true})
|
||||
watch(() => props.formData.singleFile, (newVal) => {
|
||||
// singleFile.value = {}
|
||||
console.log('singleFile',newVal)
|
||||
singleFile.value = newVal
|
||||
}, {deep: true})
|
||||
const getAttachment = (val) => {
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分摊名称">
|
||||
<span>{{ formData.shareName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分摊月份">
|
||||
<span>{{ formData.apportionmentMonth }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="分摊名称">-->
|
||||
<!-- <span>{{ formData.shareName }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="分摊月份">-->
|
||||
<!-- <span>{{ formData.apportionmentMonth }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
|
||||
@@ -37,7 +37,8 @@ const schema = computed(() => {
|
||||
props: {
|
||||
placeholder: '请输入审核意见',
|
||||
type: 'textarea',
|
||||
maxlength: 140
|
||||
// maxlength: 140,
|
||||
rows:3
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -59,6 +60,12 @@ const back = () => {
|
||||
case 'Requirement/detail':
|
||||
router.push({name: 'Requirement'})
|
||||
break;
|
||||
case 'Fund/detail':
|
||||
router.push({name: 'Fund'})
|
||||
break;
|
||||
case 'Share/detail':
|
||||
router.push({name: 'Expense/share'})
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
|
||||
118
src/components/TagAndFileUpload.vue
Normal file
118
src/components/TagAndFileUpload.vue
Normal file
@@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<baseTitle title="标签名称"></baseTitle>
|
||||
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
|
||||
<el-form-item label="标签名称" prop="tagName">
|
||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 400px" v-if="showInput"/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 200px" v-else>
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="其他文件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFiles"/>
|
||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
const props = defineProps({
|
||||
tagsOption: {
|
||||
type: Array,
|
||||
default: []
|
||||
}, formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
}, showInput: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const tagForm = ref()
|
||||
const showTable = ref(true)
|
||||
const emits = defineEmits(['getFile'])
|
||||
const fileList = ref([])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '文件大小',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag: formData.value.tagName,
|
||||
}
|
||||
}
|
||||
const getFiles = (val) => {
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
// emit("getFile", fileObj)
|
||||
fileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
watch(() => fileList.value, (val) => {
|
||||
fileList.value = val
|
||||
})
|
||||
defineExpose({
|
||||
fileList
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -74,7 +74,7 @@ const props = defineProps({
|
||||
},
|
||||
height:{
|
||||
type: Number,
|
||||
default: 450
|
||||
default: 650
|
||||
}
|
||||
})
|
||||
const content = ref(props.value);
|
||||
|
||||
Reference in New Issue
Block a user