From 9d5c393ebef58c202a25b6eac23ce6f63a27be98 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Thu, 18 Jul 2024 22:06:23 +0800
Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=A1=B5=E9=9D=A2b?=
=?UTF-8?q?ug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AllocationSummaryDetail.vue | 28 +--
.../DetailComponent/ApprovalDetail.vue | 39 +++--
.../DetailComponent/ProjectApply.vue | 132 +++++++-------
.../DetailComponent/SummaryDetail.vue | 12 +-
src/components/SearchFilesByTag.vue | 11 +-
src/components/steps/index.vue | 2 +-
src/fvcomponents/fvTable/index.vue | 4 +-
src/utils/request.js | 6 +-
src/views/expense-management/share/detail.vue | 2 +-
.../AllocationSummaryDetailMoblie.vue | 42 ++---
.../share/moblieDetail/index.vue | 13 +-
.../moblieDetail/CollectionDetailMoblie.vue | 11 +-
.../project-management/filing/attachment.vue | 11 +-
.../project-management/filing/upload.vue | 8 +-
.../implementation/account.vue | 6 +-
.../implementation/attachment.vue | 3 +-
.../implementation/detail.vue | 12 +-
.../implementation/index.vue | 1 -
.../implementation/upload.vue | 14 +-
.../mobledetail/ApprovalDetailMoblie.vue | 162 +++++++++++++++++-
.../mobledetail/CollectionDetailMoblie.vue | 11 +-
.../mobledetail/ShareDetailMobile.vue | 105 ++++++------
.../mobledetail/SpecialFundDetailMobile.vue | 2 +-
.../mobledetail/StepsMoblie.vue | 36 ++--
.../mobledetail/SummaryDetailMoblie.vue | 71 +++++++-
.../project-management/mobledetail/index.vue | 46 ++---
.../phaseDetailMoblie/index.vue | 26 ++-
src/views/workflow/common/OperationRender.vue | 32 +++-
28 files changed, 562 insertions(+), 286 deletions(-)
diff --git a/src/components/DetailComponent/AllocationSummaryDetail.vue b/src/components/DetailComponent/AllocationSummaryDetail.vue
index a088ddc..19c8820 100644
--- a/src/components/DetailComponent/AllocationSummaryDetail.vue
+++ b/src/components/DetailComponent/AllocationSummaryDetail.vue
@@ -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)
diff --git a/src/components/DetailComponent/ApprovalDetail.vue b/src/components/DetailComponent/ApprovalDetail.vue
index 026d404..880366a 100644
--- a/src/components/DetailComponent/ApprovalDetail.vue
+++ b/src/components/DetailComponent/ApprovalDetail.vue
@@ -1,6 +1,6 @@
-
+
@@ -16,11 +16,11 @@
- 搜索
-
+ 搜索
-
@@ -28,7 +28,7 @@
-
+
form = e">
{
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})
diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue
index deed745..8241058 100644
--- a/src/components/DetailComponent/ProjectApply.vue
+++ b/src/components/DetailComponent/ProjectApply.vue
@@ -1,6 +1,6 @@
-
+
@@ -20,12 +20,13 @@
上传附件
-
-
-
-
-
+
+
+
+
+
@@ -45,11 +46,11 @@
-
- {{ projectPersonUserList.length !== 0 ? '更改' :getProjectPerson(projectPersonUserList)?'更改': '请选择' }}
+ {{ projectPersonUserList.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
{{ item.name }}
@@ -59,21 +60,23 @@
-
+
- {{ localFormData.preProcess&&localFormData.preProcess.length>0 ? '更改' :sessionParams.preProcess&&sessionParams.preProcess.length>0 ? '更改' : '请选择' }}
+ {{
+ localFormData.preProcess && localFormData.preProcess.length > 0 ? '更改' : sessionParams.preProcess && sessionParams.preProcess.length > 0 ? '更改' : '请选择'
+ }}
-
-
+ 重置
-
@@ -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 () => {
diff --git a/src/components/DetailComponent/SummaryDetail.vue b/src/components/DetailComponent/SummaryDetail.vue
index 605a350..0436aa5 100644
--- a/src/components/DetailComponent/SummaryDetail.vue
+++ b/src/components/DetailComponent/SummaryDetail.vue
@@ -176,12 +176,12 @@
-
驳回年度计划
通过年度计划
@@ -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: '提示',
diff --git a/src/components/SearchFilesByTag.vue b/src/components/SearchFilesByTag.vue
index 02cb3b7..3a76224 100644
--- a/src/components/SearchFilesByTag.vue
+++ b/src/components/SearchFilesByTag.vue
@@ -21,10 +21,10 @@
-
-
+
@@ -154,6 +154,13 @@ watch(() => props.fileList, (val) => {
if (props.type === '40') {
getTagsOption()
}
+
+onActivated(()=>{
+ if (props.type === '40') {
+ getTagsOption()
+ }
+ handleSearch()
+})
diff --git a/src/views/project-management/mobledetail/SummaryDetailMoblie.vue b/src/views/project-management/mobledetail/SummaryDetailMoblie.vue
index 4992e20..cc3240b 100644
--- a/src/views/project-management/mobledetail/SummaryDetailMoblie.vue
+++ b/src/views/project-management/mobledetail/SummaryDetailMoblie.vue
@@ -39,11 +39,11 @@
{{ filterDict(cacheStore.getDict('invest_type'), localFormData.investmentType) }}
-
-
- {{ filterDict(cacheStore.getDict('project_impact'), localFormData.projectImpact) }}
-
-
+
+
+
+
+
{{ filterDict(cacheStore.getDict('business_segment'), localFormData.businessSegment) }}
@@ -172,11 +172,16 @@
+
+ 驳回年度计划
+ 通过年度计划
+
@@ -190,6 +195,8 @@ import {getFundOption} from "@/api/special-fund";
import {useCacheStore} from '@/stores/cache.js'
import {getSubCompOpt} from "@/api/user/user";
import FileComponent from "@/components/DetailComponent/FileComponent.vue";
+import {ElNotification} from "element-plus";
+import {approvePlan} from "@/api/project-demand/summary";
const emit = defineEmits(['update:value'])
const tagsViewStore = useTagsView()
@@ -201,7 +208,9 @@ const props = defineProps({
},
data: {
type: Object,
- default: {}
+ default: {
+ state: '1'
+ }
},
processViewer: {
type: Boolean,
@@ -237,12 +246,58 @@ const _value = computed({
emit("update:value", val);
}
})
+const handleRejectPlan = async () => {
+ // const values = form.value.getValues()
+ // console.log('route',route.query.projectId)
+ if (!_value.value) {
+ ElNotification({
+ title: '提示',
+ message: '请填写审核意见',
+ type: 'warning'
+ })
+ return
+ }
+ const params = {
+ auditOpinion:_value.value,
+ projectId:parseInt(route.query.projectId),
+ state:false
+ }
+ console.log('params', params)
+ const res = await approvePlan(params)
+ ElNotification({
+ title: '提示',
+ message: res.msg,
+ type: res.code === 1000 ? 'success' : 'error'
+ })
+ tagsViewStore.delVisitedViews(router.currentRoute.value.path)
+ router.push({
+ name: 'Summary'
+ })
+}
+const handleAgreePlan = async () => {
+ const params = {
+ auditOpinion:_value.value,
+ projectId:parseInt(route.query.projectId),
+ state:true
+ }
+ console.log('params', params)
+ const res = await approvePlan(params)
+ ElNotification({
+ title: '提示',
+ message: res.msg,
+ type: res.code === 1000 ? 'success' : 'error'
+ })
+ tagsViewStore.delVisitedViews(router.currentRoute.value.path)
+ router.push({
+ name: 'Summary'
+ })
+}
const filterDict = (data, value) => {
if (data === undefined || value === undefined) return;
let label = ''
let result = []
- if (JSON.parse(value) instanceof Array) {
- JSON.parse(value).forEach(item1 => {
+ if (value instanceof Array) {
+ value.forEach(item1 => {
data.find(item => {
if (item.value == item1) {
result.push(item.label)
diff --git a/src/views/project-management/mobledetail/index.vue b/src/views/project-management/mobledetail/index.vue
index 9b3744e..0b8af2a 100644
--- a/src/views/project-management/mobledetail/index.vue
+++ b/src/views/project-management/mobledetail/index.vue
@@ -1,52 +1,53 @@
-
+
-
-
+
+
+
+
+
+
+ v-model:value="auditOpinion"/>
@@ -60,7 +61,7 @@ import SummaryDetail from './SummaryDetailMoblie.vue';
import StepsMoblie from './StepsMoblie.vue';
import {getMapProjectStateInfo} from "./api";
import OpinionMoblie from "./OpinionMoblie.vue";
-import ProjectApplyMoblie from "./ProjectApplyMoblie.vue";
+// import ProjectApplyMoblie from "./ProjectApplyMoblie.vue";
const route = useRoute()
@@ -82,6 +83,9 @@ const commonProvessViewer = ref(true)
const getAllInfo = async (state) => {
const loading = ElLoading.service({fullscreen: true})
+ detailData.value = {
+ state: "0"
+ }
try {
fileListShow.value = 'READ'
commonProvessViewer.value = false
@@ -121,9 +125,9 @@ const getAllInfo = async (state) => {
}
}
const changeModel = (active, mode) => {
- editShow.value = false
+ // editShow.value = false
nextTick(() => {
- editShow.value = mode === 'submit' || mode === 'resubmit';
+ // editShow.value = mode === 'submit' || mode === 'resubmit';
if (route.query.step === '20' && active === '20') {
applyTitle.value = 'apply'
} else if (route.query.step === '40' && active === '40') {
diff --git a/src/views/project-management/phaseDetailMoblie/index.vue b/src/views/project-management/phaseDetailMoblie/index.vue
index d34fd44..2689a49 100644
--- a/src/views/project-management/phaseDetailMoblie/index.vue
+++ b/src/views/project-management/phaseDetailMoblie/index.vue
@@ -3,10 +3,11 @@
baseForm = e">
- 抄送人{{copyName}}
+ 抄送人{{copyName?copyName:'--'}}
-
+
@@ -17,6 +18,7 @@ import {getPhaseDetail} from "@/api/project-manage";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
import ApprovalDetailMoblie from './ApprovalDetailMoblie.vue'
+import OpinionMoblie from "../mobledetail/OpinionMoblie.vue";
const route = useRoute()
const summaryData = ref({})
@@ -28,6 +30,20 @@ const copyName = ref('')
const fileListShow = ref('READ')
const schema = computed(() => {
return [
+ {
+ label: '项目名称',
+ prop: 'projectName',
+ colProps: {
+ span: 24
+ }
+ },
+ {
+ label: '征集公司',
+ prop: 'affiliatedCompany',
+ colProps: {
+ span: 24
+ }
+ },
{
label: '征集名称',
prop: 'requirementName',
@@ -36,12 +52,12 @@ const schema = computed(() => {
}
},
{
- label: '项目名称',
- prop: 'projectName',
+ label: '征集描述',
+ prop: 'collectExplain',
colProps: {
span: 24
}
- }
+ },
]
})
const baseForm = ref()
diff --git a/src/views/workflow/common/OperationRender.vue b/src/views/workflow/common/OperationRender.vue
index da49c30..0059c29 100644
--- a/src/views/workflow/common/OperationRender.vue
+++ b/src/views/workflow/common/OperationRender.vue
@@ -28,7 +28,7 @@
-
+
@@ -56,7 +56,6 @@