fix : 修复页面细节

This commit is contained in:
2024-05-31 20:56:58 +08:00
parent 5a1e1848cb
commit 5ae8e4be78
32 changed files with 550 additions and 167 deletions

View File

@@ -1,5 +1,14 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<el-form :model="attachment" inline class="query-form">
<el-form-item label="关键词" prop="tag">
<el-input v-model="attachment.tag" placeholder="请输入" clearable filterable style="width: 200px"/>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item>
</el-form>
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>-->
<el-card style="width: 100%">
<file-upload @getFile="getOtherFile" :showFileList="true"/>
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
@@ -14,6 +23,11 @@
<script setup lang="jsx">
import {downloadFile} from "@/api/project-demand";
const route = useRoute()
const router = useRouter()
const attachment = reactive({
tag: ''
})
const searchConfig = reactive([
{
label: '关键词',
@@ -64,9 +78,15 @@ const tableConfig = reactive({
})
const showTable=ref(true)
const otherFileList = ref([])
const getOtherFile = () => {
const handleUpload = () => {
router.push({
name: 'Filing/upload',
query: {
id: route.query.id
}
})
}
const handleDownload = (row) => {
downloadFile(row.fileId).then(res => {
const blob = new Blob([res])

View File

@@ -130,6 +130,7 @@ const getFileParam = (item) => {
const handleSubmit = async () => {
if (JSON.stringify(file.value) === "{}") {
attachment.value.validate()
return;
} else {
attachment.value.clearValidate()
}
@@ -170,6 +171,7 @@ const handleResubmit = () => {
let fileArray
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
attachment.value.validate()
return;
} else {
attachment.value.clearValidate()
}

View File

@@ -167,7 +167,7 @@ const tableConfig = reactive({
},
{
prop: 'economicEstimate',
label: '经济概',
label: '经济概',
align: 'center'
},
{

View File

@@ -135,7 +135,7 @@ const handleDownload = (row) => {
a.click()
})
}
// getTagsOption()
getTagsOption()
handleSearch()
</script>

View File

@@ -85,6 +85,7 @@ const handleSubmit = (instance) => {
if (!valid) return
if(JSON.stringify(file.value) === "{}"){
attachment.value.validate()
return;
}else {
attachment.value.clearValidate()
}
@@ -139,6 +140,7 @@ const handleResubmit = (instance) => {
let fileArray
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
attachment.value.validate()
return;
} else {
attachment.value.clearValidate()
}

View File

@@ -172,7 +172,7 @@ const tableConfig = reactive({
},
{
prop: 'economicEstimate',
label: '经济概',
label: '经济概',
align: 'center'
},
{

View File

@@ -29,7 +29,7 @@
</template>
<script setup lang="jsx">
import {uploadAttachment} from "@/api/project-manage";
import {uploadAttachment,getTags} from "@/api/project-manage";
import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js'
@@ -156,7 +156,7 @@ const handleSubmit = async (instance) => {
}
})
}
// getTagsOption()
getTagsOption()
</script>
<style scoped>

View File

@@ -128,6 +128,12 @@ const handleSubmit = (instance) => {
instance.validate(async (valid) => {
if (JSON.stringify(file.value) === "{}") {
attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传申请书附件',
type: 'error'
})
return;
} else {
attachment.value.clearValidate()
}
@@ -170,6 +176,7 @@ const handleResubmit = async () => {
let fileArray
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
attachment.value.validate()
return;
} else {
attachment.value.clearValidate()
}

View File

@@ -166,7 +166,7 @@ const tableConfig = reactive({
},
{
prop: 'economicEstimate',
label: '经济概',
label: '经济概',
align: 'center'
},
{
@@ -212,9 +212,9 @@ const tableConfig = reactive({
// if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// }
if (buttons.has("apply")) {
// if (buttons.has("apply")) {
btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
}
// }
return (
<div style={{width: '100%'}}>
{

View File

@@ -0,0 +1,11 @@
<template>
<tag-and-file-upload :showInput="true"/>
</template>
<script setup lang="jsx">
</script>
<style scoped>
</style>