fix : 修复页面bug
This commit is contained in:
@@ -37,20 +37,14 @@
|
||||
import {getAllocationSummaryDetails} from "@/api/expense-manage";
|
||||
import {shareExportExcel} from "@/api/expense-manage";
|
||||
|
||||
const tableData = ref([{
|
||||
id: '12987122',
|
||||
name: 'Tom',
|
||||
amount1: '234',
|
||||
amount2: '3.2',
|
||||
amount3: 10,
|
||||
},
|
||||
{
|
||||
id: '12987123',
|
||||
name: 'Tom',
|
||||
amount1: '165',
|
||||
amount2: '4.43',
|
||||
amount3: 12,
|
||||
}])
|
||||
const props = defineProps({
|
||||
allocationName :{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const tableData = ref()
|
||||
const loading = ref(false)
|
||||
const table = ref()
|
||||
const route = useRoute()
|
||||
@@ -91,11 +85,7 @@ const getSummaries = (param) => {
|
||||
const exportExcelHandler = () => {
|
||||
shareExportExcel(route.query.id).then(res => {
|
||||
console.log(res)
|
||||
let reg = /filename=([^&]+)/;
|
||||
let contentDisposition = decodeURI(res.headers['content-disposition'])
|
||||
let result = reg.exec(contentDisposition)
|
||||
let fileName = result[1]
|
||||
fileName = fileName.replace(/\"/g, '')
|
||||
let fileName = `科技创新项目费用分摊表-${props.allocationName}.zip`
|
||||
const blob = new Blob([res.data])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-row v-if="type==='execute'">
|
||||
<el-row v-if="type==='execute'">
|
||||
<el-col :span="24">
|
||||
<baseTitle :title="'附件信息'"></baseTitle>
|
||||
</el-col>
|
||||
@@ -16,11 +16,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||
<!-- <el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>-->
|
||||
<el-button @click="handleSearchImplementationFileList" color="#DED0B2">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162"
|
||||
:tableConfig="tableConfig"
|
||||
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
@@ -28,7 +28,7 @@
|
||||
</fvTable>
|
||||
</el-row>
|
||||
|
||||
<baseTitle :title="getTagName(type)+getTitleInfo(data.taskId)" ></baseTitle>
|
||||
<baseTitle v-if="type!='phase'" :title="getTagName(type)+getTitleInfo(data.taskId)"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<el-form :model="formData" label-width="auto" style="margin-top: -15px">
|
||||
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
|
||||
@@ -74,6 +74,7 @@ import {ElLoading, ElNotification} from 'element-plus';
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
|
||||
const attachmentParam = reactive({
|
||||
tag: ''
|
||||
})
|
||||
@@ -350,7 +351,7 @@ const getTagsOption = () => {
|
||||
getTags(route.query.projectId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
}else{
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -359,7 +360,7 @@ const getTagsOption = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSearch = () => {
|
||||
const handleSearchImplementationFileList = () => {
|
||||
let params = {
|
||||
targetId: route.query.projectId,
|
||||
targetState: "40"
|
||||
@@ -380,7 +381,7 @@ const handleSearch = () => {
|
||||
nextTick(() => {
|
||||
showAttachmentTable.value = true
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -390,11 +391,10 @@ const handleSearch = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const getTitleInfo=(taskId)=>{
|
||||
if(taskId){
|
||||
const getTitleInfo = (taskId) => {
|
||||
if (taskId) {
|
||||
return '审批'
|
||||
}else {
|
||||
|
||||
} else {
|
||||
return '信息'
|
||||
}
|
||||
}
|
||||
@@ -423,13 +423,20 @@ const handleDownload = (row) => {
|
||||
}
|
||||
watchEffect(() => {
|
||||
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
|
||||
if(props.formData.mode=='view'&&props.type&&props.type==='execute'){
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// if (props.formData.mode == 'view' && props.type == 'execute') {
|
||||
// handleSearchImplementationFileList()
|
||||
// getTagsOption()
|
||||
// }
|
||||
})
|
||||
|
||||
console.log("propsprops", props.formData, props.type , props)
|
||||
if (props.formData.mode == 'view' && props.type == 'execute') {
|
||||
handleSearchImplementationFileList()
|
||||
getTagsOption()
|
||||
}
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-row v-if="title==='check'">
|
||||
<el-row v-if="title==='check'">
|
||||
<el-col :span="24">
|
||||
<baseTitle :title="'附件信息'"></baseTitle>
|
||||
</el-col>
|
||||
@@ -20,12 +20,13 @@
|
||||
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162" :tableConfig="tableConfig"
|
||||
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162"
|
||||
:tableConfig="tableConfig"
|
||||
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-row>
|
||||
<baseTitle :title="getTitleName(title)+'信息'"></baseTitle>
|
||||
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
|
||||
@@ -45,11 +46,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="title==='apply'">
|
||||
<el-form-item label="项目成员" :required="true" prop=""
|
||||
<el-form-item label="项目成员" :required="true" prop=""
|
||||
label-width="125">
|
||||
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowProjectPersonTable">
|
||||
<!-- {{ localFormData.projectPersonIds ? '更改' : '请选择' }}-->
|
||||
{{ projectPersonUserList.length !== 0 ? '更改' :getProjectPerson(projectPersonUserList)?'更改': '请选择' }}
|
||||
{{ projectPersonUserList.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
|
||||
</el-button>
|
||||
<div v-for="item in getProjectPerson(projectPersonUserList)" :key="item.id" style="margin-right: 5px">
|
||||
{{ item.name }}
|
||||
@@ -59,21 +60,23 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
|
||||
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
|
||||
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
|
||||
{{ localFormData.preProcess&&localFormData.preProcess.length>0 ? '更改' :sessionParams.preProcess&&sessionParams.preProcess.length>0 ? '更改' : '请选择' }}
|
||||
{{
|
||||
localFormData.preProcess && localFormData.preProcess.length > 0 ? '更改' : sessionParams.preProcess && sessionParams.preProcess.length > 0 ? '更改' : '请选择'
|
||||
}}
|
||||
</el-button>
|
||||
<div v-for="item in getRequestName(localFormData.preProcess)" :key="item.requestId">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{item.requestName}}
|
||||
</a>
|
||||
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}
|
||||
</a>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- v-if="showAttachment"-->
|
||||
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
|
||||
<!-- v-if="showAttachment"-->
|
||||
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
|
||||
v-model:otherFileList="otherFileList" :tag="getTitleName(props.title)"
|
||||
@getAttachment="getAttachment" v-model:singleList="singleList" :showSingleTable="showSingleTable"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
||||
@@ -114,7 +117,7 @@
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="preProcessList" v-loading="loading"
|
||||
<el-table :data="preProcessList" v-loading="loading"
|
||||
@select="handleSelect" @select-all="handleSelect" row-key="requestId" ref="preProcessTable">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true"/>
|
||||
<el-table-column prop="requestId" label="请求id"></el-table-column>
|
||||
@@ -164,6 +167,7 @@ import Paging from "@/components/pagination/index.vue";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const changeDiagram = ref(false)
|
||||
@@ -290,63 +294,63 @@ const name = ref(router.currentRoute.value.name)
|
||||
const deploymentId = ref()
|
||||
const selectRows = ref([])
|
||||
const projectId = ref(route.query.projectId)
|
||||
const sessionParams=ref({})
|
||||
const sessionParams = ref({})
|
||||
|
||||
if(localStorage.getItem('preProcess')){
|
||||
let param=JSON.parse(localStorage.getItem('preProcess'))
|
||||
localFormData.value.preProcess=param
|
||||
sessionParams.value.preProcess=param
|
||||
if (localStorage.getItem('preProcess')) {
|
||||
let param = JSON.parse(localStorage.getItem('preProcess'))
|
||||
localFormData.value.preProcess = param
|
||||
sessionParams.value.preProcess = param
|
||||
localStorage.setItem('preProcess', JSON.stringify(param))
|
||||
}
|
||||
if(localStorage.getItem('singleFile')){
|
||||
let param=JSON.parse(localStorage.getItem('singleFile'))
|
||||
localFormData.value.singleFile=param
|
||||
singleList.value=[param]
|
||||
if (localStorage.getItem('singleFile')) {
|
||||
let param = JSON.parse(localStorage.getItem('singleFile'))
|
||||
localFormData.value.singleFile = param
|
||||
singleList.value = [param]
|
||||
localStorage.setItem('singleFile', JSON.stringify(param))
|
||||
showSingleTable.value=false
|
||||
nextTick(()=>{
|
||||
showSingleTable.value=true
|
||||
})
|
||||
showSingleTable.value = false
|
||||
nextTick(() => {
|
||||
showSingleTable.value = true
|
||||
})
|
||||
}
|
||||
if(localStorage.getItem('otherFileList')){
|
||||
let param=JSON.parse(localStorage.getItem('otherFileList'))
|
||||
localFormData.value.otherFileList=param
|
||||
otherFileList.value=param
|
||||
if (localStorage.getItem('otherFileList')) {
|
||||
let param = JSON.parse(localStorage.getItem('otherFileList'))
|
||||
localFormData.value.otherFileList = param
|
||||
otherFileList.value = param
|
||||
localStorage.setItem('otherFileList', JSON.stringify(param))
|
||||
showTable.value=false
|
||||
nextTick(()=>{
|
||||
showTable.value=true
|
||||
})
|
||||
showTable.value = false
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
|
||||
if(localStorage.getItem('projectChargePersonUserList')){
|
||||
let param=JSON.parse(localStorage.getItem('projectChargePersonUserList'))
|
||||
projectChargePersonUserList.value=param
|
||||
if (localStorage.getItem('projectChargePersonUserList')) {
|
||||
let param = JSON.parse(localStorage.getItem('projectChargePersonUserList'))
|
||||
projectChargePersonUserList.value = param
|
||||
localStorage.setItem('projectChargePersonUserList', JSON.stringify(param))
|
||||
}
|
||||
if(localStorage.getItem('projectPersonUserList')){
|
||||
let param=JSON.parse(localStorage.getItem('projectPersonUserList'))
|
||||
projectPersonUserList.value= param
|
||||
localProjectPerson.value=param
|
||||
if (localStorage.getItem('projectPersonUserList')) {
|
||||
let param = JSON.parse(localStorage.getItem('projectPersonUserList'))
|
||||
projectPersonUserList.value = param
|
||||
localProjectPerson.value = param
|
||||
localStorage.setItem('projectPersonUserList', JSON.stringify(param))
|
||||
}
|
||||
const getProjectPerson=(list)=>{
|
||||
if(!list||list&&list.length===0){
|
||||
if(localStorage.getItem('projectPersonUserList')){
|
||||
let param=JSON.parse(localStorage.getItem('projectPersonUserList'))
|
||||
projectPersonUserList.value=param
|
||||
const getProjectPerson = (list) => {
|
||||
if (!list || list && list.length === 0) {
|
||||
if (localStorage.getItem('projectPersonUserList')) {
|
||||
let param = JSON.parse(localStorage.getItem('projectPersonUserList'))
|
||||
projectPersonUserList.value = param
|
||||
return projectPersonUserList.value
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
return list
|
||||
}
|
||||
}
|
||||
const getRequestName=(list)=>{
|
||||
if(!list||(list&&list.length===0)){
|
||||
if(sessionParams.value.preProcess){
|
||||
const getRequestName = (list) => {
|
||||
if (!list || (list && list.length === 0)) {
|
||||
if (sessionParams.value.preProcess) {
|
||||
return sessionParams.value.preProcess
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
return list
|
||||
}
|
||||
}
|
||||
@@ -355,7 +359,7 @@ const getTagsOption = () => {
|
||||
getTags(route.query.projectId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
}else{
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -385,7 +389,7 @@ const handleSearch = () => {
|
||||
nextTick(() => {
|
||||
showAttachmentTable.value = true
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -398,9 +402,9 @@ const handleUpload = () => {
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
query: {
|
||||
id: route.query.requirementId,
|
||||
id: route.query.id,
|
||||
projectId: route.query.projectId,
|
||||
state: route.query.state,
|
||||
projectId:route.query.projectId,
|
||||
step: '40'
|
||||
}
|
||||
})
|
||||
@@ -568,9 +572,9 @@ const getFileParam = (item) => {
|
||||
const handleSubmit = async () => {
|
||||
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
||||
if (localFormData.value.preProcess == undefined) {
|
||||
if(JSON.parse(localStorage.getItem('preProcess'))?.length>0){
|
||||
if (JSON.parse(localStorage.getItem('preProcess'))?.length > 0) {
|
||||
|
||||
}else {
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择前置流程!',
|
||||
@@ -615,8 +619,8 @@ const handleSubmit = async () => {
|
||||
projectId: projectId.value,
|
||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||
}
|
||||
if(sessionParams.value.preProcess&&!localFormData.value.preProcess){
|
||||
params.preProcess=JSON.stringify(sessionParams.value.preProcess)
|
||||
if (sessionParams.value.preProcess && !localFormData.value.preProcess) {
|
||||
params.preProcess = JSON.stringify(sessionParams.value.preProcess)
|
||||
}
|
||||
// console.log(params.preProcess)
|
||||
let res
|
||||
@@ -680,7 +684,7 @@ const handleSubmit = async () => {
|
||||
}
|
||||
}
|
||||
const init = async () => {
|
||||
if(props.title&&props.title==='check'){
|
||||
if (props.title && props.title === 'check') {
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
}
|
||||
@@ -742,7 +746,7 @@ watchEffect(() => {
|
||||
// console.log('projectPersonUserList.value',projectPersonUserList.value)
|
||||
return flag
|
||||
})
|
||||
onActivated(()=>{
|
||||
onActivated(() => {
|
||||
init()
|
||||
})
|
||||
onMounted(async () => {
|
||||
|
||||
@@ -176,12 +176,12 @@
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="data.operationList"
|
||||
:step="'report'"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
|
||||
@@ -212,7 +212,9 @@ const props = defineProps({
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: {
|
||||
state: '1'
|
||||
}
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
@@ -251,7 +253,7 @@ const _value = computed({
|
||||
})
|
||||
const handleRejectPlan = async () => {
|
||||
// const values = form.value.getValues()
|
||||
console.log('route',route.query.projectId)
|
||||
// console.log('route',route.query.projectId)
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -265,7 +267,7 @@ const handleRejectPlan = async () => {
|
||||
projectId:parseInt(route.query.projectId),
|
||||
state:false
|
||||
}
|
||||
console.log('params', params)
|
||||
// console.log('params', params)
|
||||
const res = await approvePlan(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -283,7 +285,7 @@ const handleAgreePlan = async () => {
|
||||
projectId:parseInt(route.query.projectId),
|
||||
state:true
|
||||
}
|
||||
console.log('params', params)
|
||||
// console.log('params', params)
|
||||
const res = await approvePlan(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card style="width: 100%">
|
||||
<fvTable style="width: 100%;max-height: 162px" v-if="showTable" height="162" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 300px" v-if="showTable" height="300" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="99" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
@@ -154,6 +154,13 @@ watch(() => props.fileList, (val) => {
|
||||
if (props.type === '40') {
|
||||
getTagsOption()
|
||||
}
|
||||
|
||||
onActivated(()=>{
|
||||
if (props.type === '40') {
|
||||
getTagsOption()
|
||||
}
|
||||
handleSearch()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -285,7 +285,7 @@ const getBaseInfo = async () => {
|
||||
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')
|
||||
|
||||
Reference in New Issue
Block a user