Browse Source

更新优化

master
zhouhaibin 7 months ago
parent
commit
faa156fdfa
  1. 6
      src/views/ProcessApprovalSubPage/contractApproval.vue
  2. 6
      src/views/ProcessApprovalSubPage/fieldChangeApproval.vue
  3. 4
      src/views/ProcessApprovalSubPage/initiatesProjectsApproval.vue
  4. 12
      src/views/ProcessApprovalSubPage/planFileApproval.vue
  5. 6
      src/views/ProcessApprovalSubPage/projectPlanApproval.vue
  6. 8
      src/views/ProcessApprovalSubPage/uploadfileApproval.vue
  7. 6
      src/views/Regulation/RegulationLab/addAndModify.vue
  8. 2
      src/views/addressBook/address/index.vue
  9. 8
      src/views/performanceIndicator/projectAssessment/addProjectAssessment.vue
  10. 6
      src/views/performanceIndicator/projectAssessment/index.vue
  11. 3
      src/views/performanceIndicator/projectAssessment/projectAssessment.api.ts
  12. 6
      src/views/performanceIndicator/templateContent/modify.vue
  13. 2
      src/views/projectLib/initiatesProjects/initiatesProjects.api.ts
  14. 103
      src/views/projectLib/initiatesProjects/initiatesProjects.vue
  15. 2
      src/views/projectLib/projectArchive/SubmitProjectArchive.vue
  16. 6
      src/views/projectLib/projectContract/projectContract.vue
  17. 6
      src/views/projectLib/projectInfo/Detailpage.vue
  18. 6
      src/views/projectLib/projectInfo/batchImportProjects.vue
  19. 18
      src/views/projectLib/projectInfo/index.vue
  20. 6
      src/views/projectLib/projectInfo/modifyfieldInfo.vue
  21. 164
      src/views/projectLib/projectInfo/projectInfo.data.ts
  22. 6
      src/views/projectLib/projectInfo/uploadFile.vue
  23. 6
      src/views/projectLib/projectPlan/addPlan.vue
  24. 6
      src/views/projectLib/projectPlan/addPlanFile.vue
  25. 26
      src/views/projectLib/projectPlan/planinfoFileDetail.vue
  26. 4
      src/views/projectLib/projectPlan/projectPlan.api.ts
  27. 2
      src/views/projectLib/projectPlan/viewPlanDetail.vue
  28. 6
      src/views/projectLib/workReport/addModifyWorkreport.vue
  29. 66
      src/views/projectSummary/planSummary/index.vue

6
src/views/ProcessApprovalSubPage/contractApproval.vue

@ -13,7 +13,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -92,7 +92,7 @@ function httpRequest(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1); const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
let whiteList = ["xls", "xlsx"]; let whiteList = ["xls", "xlsx"];
@ -103,7 +103,7 @@ function beforeUpload(file) {
} }
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }

6
src/views/ProcessApprovalSubPage/fieldChangeApproval.vue

@ -6,7 +6,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</div> </div>
<ApprovalDetails :processInstanceId="processInstanceId" /> <ApprovalDetails :processInstanceId="processInstanceId" />
@ -60,10 +60,10 @@ function httpRequest(option) {
// //
async function beforeUpload(file) { async function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
return true return true

4
src/views/ProcessApprovalSubPage/initiatesProjectsApproval.vue

@ -2,6 +2,8 @@
<!-- 自定义表单 --> <!-- 自定义表单 -->
<div> <div>
<ProjectDetails :isEdit="resButton.isEdit" :projectid="projectid" ref="ProjectDetailsRef" /> <ProjectDetails :isEdit="resButton.isEdit" :projectid="projectid" ref="ProjectDetailsRef" />
<el-divider content-position="left">资金承若函</el-divider>
<UploadfileDetail :projectid="projectid" :stage="5" />
</div> </div>
<ApprovalDetails :processInstanceId="processInstanceId" /> <ApprovalDetails :processInstanceId="processInstanceId" />
<ApprovalFromPage :showApprovalForm="showApprovalForm" :buttons="resButton.buttons" ref="ApprovalFromPageRef" <ApprovalFromPage :showApprovalForm="showApprovalForm" :buttons="resButton.buttons" ref="ApprovalFromPageRef"
@ -13,6 +15,8 @@ import { submitTask, getActionParam } from '../myWork/inComplete/inComplete.api'
import ApprovalDetails from "../ProcessApprovalSubPage/component/ApprovalDetails.vue"; import ApprovalDetails from "../ProcessApprovalSubPage/component/ApprovalDetails.vue";
import ProjectDetails from "../ProcessApprovalSubPage/component/ProjectDetails.vue" import ProjectDetails from "../ProcessApprovalSubPage/component/ProjectDetails.vue"
import ApprovalFromPage from "../ProcessApprovalSubPage/component/ApprovalFromPage.vue" import ApprovalFromPage from "../ProcessApprovalSubPage/component/ApprovalFromPage.vue"
import UploadfileDetail from "@/views/ProcessApprovalSubPage/component/UploadfileDetail.vue"
let dataTo = defineProps(["record"]) let dataTo = defineProps(["record"])
let emit = defineEmits(["close"]) let emit = defineEmits(["close"])
let processInstanceId = dataTo.record.processInstanceId let processInstanceId = dataTo.record.processInstanceId

12
src/views/ProcessApprovalSubPage/planFileApproval.vue

@ -19,7 +19,7 @@
:before-upload="(file) => { return beforeUpload(file, item) }" :on-exceed="handleExceed" :limit="1" :before-upload="(file) => { return beforeUpload(file, item) }" :on-exceed="handleExceed" :limit="1"
:on-remove="removeFile"> :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传{{ item }}且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传{{ item }}且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -30,7 +30,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequestadvice" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequestadvice"
:before-upload="beforeAdviceUpload" :on-exceed="handleExceed" :limit="5" :on-remove="removeFile"> :before-upload="beforeAdviceUpload" :on-exceed="handleExceed" :limit="5" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -152,10 +152,10 @@ function httpRequestadvice(option) {
async function beforeUpload(file, item) { async function beforeUpload(file, item) {
console.log("file,item", file, item) console.log("file,item", file, item)
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
let geShi = ["xlx", "xlsx", "docx", "doc", "pdf"] as Array<string> let geShi = ["xlx", "xlsx", "docx", "doc", "pdf"] as Array<string>
@ -179,10 +179,10 @@ function handleExceed() {
function beforeAdviceUpload(file) { function beforeAdviceUpload(file) {
console.log("file,item", file) console.log("file,item", file)
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
let geShi = ["xlx", "xlsx", "docx", "doc", "pdf"] as Array<string> let geShi = ["xlx", "xlsx", "docx", "doc", "pdf"] as Array<string>

6
src/views/ProcessApprovalSubPage/projectPlanApproval.vue

@ -11,7 +11,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -85,7 +85,7 @@ function httpRequest(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1); const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
let whiteList = ["xls", "xlsx"]; let whiteList = ["xls", "xlsx"];
@ -96,7 +96,7 @@ function beforeUpload(file) {
} }
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }

8
src/views/ProcessApprovalSubPage/uploadfileApproval.vue

@ -22,7 +22,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequestadvice" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequestadvice"
:before-upload="beforeUpload" :on-exceed="handleExceed" :limit="5" :on-remove="removeFile"> :before-upload="beforeUpload" :on-exceed="handleExceed" :limit="5" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -31,7 +31,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="5" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="5" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -91,10 +91,10 @@ function httpRequestadvice(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }

6
src/views/Regulation/RegulationLab/addAndModify.vue

@ -11,7 +11,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过10M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -84,10 +84,10 @@ function removeFile(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 10 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传10M") ElMessage.error("最大上传500M")
return false return false
} }

2
src/views/addressBook/address/index.vue

@ -4,7 +4,7 @@
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handlemodify" v-if="isShowByRoles('projectContact')"> 变更通讯录</el-button> <el-button type="primary" @click="handlemodify" v-if="isShowByRoles('projectContact')"> 变更通讯录</el-button>
<el-button type="primary" @click="handleadd" v-if="isShowByRoles('manageOrg,supervisor')"> 新增人员信息</el-button> <el-button type="primary" @click="handleadd" v-if="isShowByRoles('projectContact')"> 新增人员信息</el-button>
</template> </template>
</BasicTable> </BasicTable>
<!-- <addressProjectinfoComponent @register="register"/> --> <!-- <addressProjectinfoComponent @register="register"/> -->

8
src/views/performanceIndicator/projectAssessment/addProjectAssessment.vue

@ -4,10 +4,10 @@
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #selfScores="{ record }"> <template #selfScores="{ record }">
<div v-if="isShowByRoles('projectContact') && record.scores != null"> <div v-if="isShowByRoles('projectContact') && record.scores != null && record.sysscores== null">
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12">
<a-input-number v-model="record.selfScores" style="width: 100%; " min="0" :max=record.scores /> <el-input v-model="record.selfScores" style="width: 100%; " type="number" min="0" :max=record.scores />
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<!-- <el-button type="primary" size="small" @click="(record) => { record.selfScores = 0 }" <!-- <el-button type="primary" size="small" @click="(record) => { record.selfScores = 0 }"
@ -57,7 +57,7 @@ import { isShowByRoles } from '@/views/projectLib/projectInfo/projectInfo.api';
import { addProjectassessment, modifyProjectassessment, getProjectassessmentByprojectId,uploadProjectassessmentFile } from '@/views/performanceIndicator/projectAssessment/projectAssessment.api'; import { addProjectassessment, modifyProjectassessment, getProjectassessmentByprojectId,uploadProjectassessmentFile } from '@/views/performanceIndicator/projectAssessment/projectAssessment.api';
import { templateContentColumns } from '@/views/performanceIndicator/templateContent/templateContent.data'; import { templateContentColumns } from '@/views/performanceIndicator/templateContent/templateContent.data';
import { getPerformancescore } from '@/views/performanceIndicator/templateContent/templateContent.api' import { getProjectassessmentIncludeSys } from './projectAssessment.api'
import { cloneDeep } from 'lodash-es'; import { cloneDeep } from 'lodash-es';
import{ElMessage,UploadInstance} from 'element-plus' import{ElMessage,UploadInstance} from 'element-plus'
import { downloadFile } from "@/api/common/api" import { downloadFile } from "@/api/common/api"
@ -85,7 +85,7 @@ async function init(data) {
} }
} }
const [registerTable, { getDataSource, setProps, reload, setColumns }] = useTable({ const [registerTable, { getDataSource, setProps, reload, setColumns }] = useTable({
api: getPerformancescore, api: getProjectassessmentIncludeSys,
columns: templateContentColumns, columns: templateContentColumns,
useSearchForm: false, useSearchForm: false,
pagination: false, pagination: false,

6
src/views/performanceIndicator/projectAssessment/index.vue

@ -110,11 +110,11 @@ function openModalProjectr(value) {
console.log("proidproid", value) console.log("proidproid", value)
let type="1" let type="1"
if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("医院")!=-1){ if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("医院")!=-1){
type="2" type="2"//
}else if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("卫生健康")!=-1){ }else if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("卫生健康")!=-1){
type="1" type="1"//
}else{ }else{
return; type="3"//
} }
openModalProjectAssessment(true, { projectid: value.id,type: type,ismodify:false }) openModalProjectAssessment(true, { projectid: value.id,type: type,ismodify:false })
} }

3
src/views/performanceIndicator/projectAssessment/projectAssessment.api.ts

@ -9,7 +9,7 @@ export enum Api {
deleteProjectassessment="/huzhouProjectassessment/deleteProjectassessment", deleteProjectassessment="/huzhouProjectassessment/deleteProjectassessment",
getProjectassessmentByprojectId="/huzhouProjectassessment/getProjectassessmentByprojectId", getProjectassessmentByprojectId="/huzhouProjectassessment/getProjectassessmentByprojectId",
uploadProjectassessmentFile="/huzhouProjectassessment/uploadProjectassessmentFile", uploadProjectassessmentFile="/huzhouProjectassessment/uploadProjectassessmentFile",
getProjectassessmentIncludeSys="/huzhouProjectassessment/getProjectassessmentIncludeSys",
} }
/** /**
@ -20,6 +20,7 @@ export const modifyProjectassessment = (params?) => defHttp.post({ url: Api.modi
export const deleteProjectassessment = (params?) => defHttp.post({ url: Api.deleteProjectassessment, params }); export const deleteProjectassessment = (params?) => defHttp.post({ url: Api.deleteProjectassessment, params });
export const getProjectassessmentByprojectId = (params?) => defHttp.get({ url: Api.getProjectassessmentByprojectId, params }); export const getProjectassessmentByprojectId = (params?) => defHttp.get({ url: Api.getProjectassessmentByprojectId, params });
export const getProjectassessmentPageList = (params?) => defHttp.get({ url: Api.getProjectassessmentPageList, params }); export const getProjectassessmentPageList = (params?) => defHttp.get({ url: Api.getProjectassessmentPageList, params });
export const getProjectassessmentIncludeSys = (params?) => defHttp.get({ url: Api.getProjectassessmentIncludeSys, params });
export const getProjectassessmentProjectPageList = (params?) => defHttp.get({ url: Api.getProjectassessmentProjectPageList, params }); export const getProjectassessmentProjectPageList = (params?) => defHttp.get({ url: Api.getProjectassessmentProjectPageList, params });

6
src/views/performanceIndicator/templateContent/modify.vue

@ -12,7 +12,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx"> :on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传excel文件且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传excel文件且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -54,10 +54,10 @@ function httpRequest(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
//xlsx //xlsx

2
src/views/projectLib/initiatesProjects/initiatesProjects.api.ts

@ -12,8 +12,8 @@ export enum Api {
/** /**
* *
*/ */
export const submitProjectInfo = (params) => defHttp.post({ url: Api.submitProjectInfo, params })
export const getUserDictByRoles = (params?) => defHttp.get({ url: Api.getUserDictByRoles, params }); export const getUserDictByRoles = (params?) => defHttp.get({ url: Api.getUserDictByRoles, params });
export const submitProjectInfo = (params?) =>defHttp.post({ url: Api.submitProjectInfo,headers:{ "Content-Type": "multipart/form-data" }, params })
/** /**
* *

103
src/views/projectLib/initiatesProjects/initiatesProjects.vue

@ -5,16 +5,29 @@
<h1 style="font-weight: bold; font-size: 20px; color: black;">项目入库申请表</h1> <h1 style="font-weight: bold; font-size: 20px; color: black;">项目入库申请表</h1>
</div> </div>
<BasicForm @register="registerForm" @submit="handleSubmit" /> <BasicForm @register="registerForm" @submit="handleSubmit" />
<el-divider content-position="left">上传资金承诺函</el-divider>
<el-form ref="importFormRef">
<el-form-item label="上传文件:">
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest"
:before-upload="beforeUpload" :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</el-form-item>
</el-form>
</div> </div>
</template> </template>
<script lang="ts" name="initiatesProjects" setup> <script lang="ts" name="initiatesProjects" setup>
import { onMounted } from 'vue' import { onMounted, reactive } from 'vue'
import { useForm, BasicForm } from '@/components/Form'; import { useForm, BasicForm } from '@/components/Form';
import { formSchemas } from '../projectInfo/projectInfo.data'; import { formSchemas } from '../projectInfo/projectInfo.data';
import { submitProjectInfo } from './initiatesProjects.api' import { submitProjectInfo } from './initiatesProjects.api'
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { queryProjectInfoById } from '@/views/projectLib/projectInfo/projectInfo.api' import { queryProjectInfoById } from '@/views/projectLib/projectInfo/projectInfo.api'
import { ElMessage } from 'element-plus'
let fileList = reactive<Array<any>>([]);
let dataTo = defineProps(["projectid"]) let dataTo = defineProps(["projectid"])
let emit = defineEmits(["close"]) let emit = defineEmits(["close"])
onMounted(async () => { onMounted(async () => {
@ -52,23 +65,44 @@ async function customResetFunc() {
} }
async function handleSubmit() { async function handleSubmit() {
if (await validate()) { if (await validate()) {
Modal.confirm({ // Modal.confirm({
title: '提示窗口', // title: '',
content: '是否提交入库申请表?', // content: '',
okText: '确认', // okText: '',
cancelText: '取消', // cancelText: '',
onOk: async () => { // onOk: async () => {
let datas = await getFieldsValue() // let datas = await getFieldsValue()
console.log("datas", datas) // console.log("datas", datas)
submitProjectInfo(datas).then(() => { // submitProjectInfo(datas).then(() => {
let datasnull = clearObjectValues(datas) // let datasnull = clearObjectValues(datas)
setFieldsValue(datasnull) // setFieldsValue(datasnull)
emit("close") // emit("close")
}) // })
}, // },
// });
// console.log("")
const params = new FormData()
if(fileList.length==0){
ElMessage.error("请上传资金承诺函")
return
}
// paramsData
fileList.forEach((x) => {
console.log("xxxxxxxxxx", x, x.file)
params.append('file', x.file)
}); });
console.log("我提交了") let datas = await getFieldsValue()
Object.keys(datas).forEach(key => {
params.append(key, datas[key])
})
console.log("datas", datas)
submitProjectInfo(params).then(() => {
let datasnull = clearObjectValues(datas)
setFieldsValue(datasnull)
emit("close")
})
} else { } else {
console.log("未完成") console.log("未完成")
@ -81,7 +115,42 @@ function clearObjectValues(obj) {
} }
} }
return obj; return obj;
} }
// fileList,
function httpRequest(option) {
fileList.push(option)
}
function removeFile(option) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].file.name == option.name) {
fileList.splice(i, 1)
}
}
console.log(fileList, option)
}
//
function beforeUpload(file) {
let fileSize = file.size
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传500M")
return false
}
//xlsx
// let fileName = file.name
// let reg = /^.+(\.xlsx)$/
// if(!reg.test(fileName)){
// ElMessage.error("xlsx!")
// return false
// }
return true
}
//
function handleExceed() {
ElMessage.warning("最多只能上传一个文件")
}
</script> </script>
<style scoped> <style scoped>
.inintatesProject { .inintatesProject {

2
src/views/projectLib/projectArchive/SubmitProjectArchive.vue

@ -92,7 +92,7 @@ function handleDetail(record) {
isfinish.value = record.record.isfinish isfinish.value = record.record.isfinish
console.log("rrrrrrrr", record, record.id, record.taskName, planinfoid.value, taskName.value) console.log("rrrrrrrr", record, record.id, record.taskName, planinfoid.value, taskName.value)
openFileInfo() openFileInfo(true,{planinfoid:record.id,taskName:record.taskName,isfinish:record.isfinish})
} }

6
src/views/projectLib/projectContract/projectContract.vue

@ -24,7 +24,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过10M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -363,10 +363,10 @@ function removeFile(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 10 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传10M") ElMessage.error("最大上传500M")
return false return false
} }

6
src/views/projectLib/projectInfo/Detailpage.vue

@ -2,6 +2,8 @@
<el-tabs v-model="activeName" class="demo-tabs"> <el-tabs v-model="activeName" class="demo-tabs">
<el-tab-pane label="项目入库详情" name="1"> <el-tab-pane label="项目入库详情" name="1">
<ProjectDetails :isEdit="false" :projectid="projectid" /> <ProjectDetails :isEdit="false" :projectid="projectid" />
<el-divider content-position="left">资金承若函</el-divider>
<UploadfileDetail :projectid="projectid" :stage="5" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="项目资料详情" name="2" v-if="showUploadfileDetail"> <el-tab-pane label="项目资料详情" name="2" v-if="showUploadfileDetail">
<el-divider content-position="left">项目资料详情</el-divider> <el-divider content-position="left">项目资料详情</el-divider>
@ -23,7 +25,7 @@
</template> </template>
</BasicTable> </BasicTable>
</div> --> </div> -->
<ApprovalDetails :projectid="projectid" :stage="showUploadfileDetail ? 'supervisionFile' : 'creatProjectinfo'" v-if="isSubProject==undefined"/> <ApprovalDetails :projectid="projectid" :stage="'creatProjectinfo'" v-if="showApprovalDetails==true"/>
</template> </template>
<script lang="ts" name="Detailpage" setup> <script lang="ts" name="Detailpage" setup>
@ -36,7 +38,7 @@ import ProjectDetails from "../../ProcessApprovalSubPage/component/ProjectDetail
import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue" import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue"
import UploadfileDetail from '../../ProcessApprovalSubPage/component/UploadfileDetail.vue' import UploadfileDetail from '../../ProcessApprovalSubPage/component/UploadfileDetail.vue'
import fieldChangeDetail from '../../ProcessApprovalSubPage/component/fieldChangeDetail.vue' import fieldChangeDetail from '../../ProcessApprovalSubPage/component/fieldChangeDetail.vue'
let dataTo = defineProps(["projectid", "stage", "IsModify","showUploadfileDetail","isSubProject"]) let dataTo = defineProps(["projectid", "stage", "IsModify","showUploadfileDetail","showApprovalDetails"])
let fieldChangeDetailList = ref<Array<Object>>() let fieldChangeDetailList = ref<Array<Object>>()
console.log("dataTodataTodataTo", dataTo) console.log("dataTodataTodataTo", dataTo)

6
src/views/projectLib/projectInfo/batchImportProjects.vue

@ -10,7 +10,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx"> :on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传excel文件且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传excel文件且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -53,10 +53,10 @@ function httpRequest(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
//xlsx //xlsx

18
src/views/projectLib/projectInfo/index.vue

@ -22,7 +22,7 @@
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handleCreate" v-if="isShowByRoles('projectContact')"> 新增入库项目</el-button> <el-button type="primary" @click="handleCreate" v-if="isShowByRoles('projectContact')"> 新增入库项目</el-button>
<el-button type="primary" @click="handleBatchImport" v-if="isShowByRoles('manageOrg,supervisor')"> <el-button type="primary" @click="handleBatchImport" v-if="isShowByRoles('manageOrg')">
批量导入入库项目</el-button> 批量导入入库项目</el-button>
<el-button type="primary" @click="handleBatchdownload"> 导出项目</el-button> <el-button type="primary" @click="handleBatchdownload"> 导出项目</el-button>
</template> </template>
@ -41,7 +41,7 @@
</BasicModal> </BasicModal>
<BasicModal @register="registeProjectrModal" title="项目信息详情" width="1200px" :showOkBtn="false"> <BasicModal @register="registeProjectrModal" title="项目信息详情" width="1200px" :showOkBtn="false">
<Detailpage :projectid="proid" :stage="ProjectStage" :IsModify="IsModify" <Detailpage :projectid="proid" :stage="ProjectStage" :IsModify="IsModify"
:showUploadfileDetail="showUploadfileDetail" :isSubProject="isSubProject" /> :showUploadfileDetail="showUploadfileDetail" :showApprovalDetails="showApprovalDetails" />
</BasicModal> </BasicModal>
<BasicModal @register="registerModalUploadFiles" title="申报项目资料" width="1200px" :showOkBtn="false" <BasicModal @register="registerModalUploadFiles" title="申报项目资料" width="1200px" :showOkBtn="false"
:showCancelBtn="false"> :showCancelBtn="false">
@ -91,7 +91,7 @@ let proid = ref();
let ProjectStage = ref() let ProjectStage = ref()
let IsModify = ref() let IsModify = ref()
let showUploadfileDetail = ref() let showUploadfileDetail = ref()
let isSubProject = ref() let showApprovalDetails = ref()
let fatherid = ref() let fatherid = ref()
const [registeProjectrModal, { openModal: openModalProjectr }] = useModal();// const [registeProjectrModal, { openModal: openModalProjectr }] = useModal();//
const [registerModalUploadFiles, { openModal: openUploadFiles, closeModal: closeUploadFiles }] = useModal();// const [registerModalUploadFiles, { openModal: openUploadFiles, closeModal: closeUploadFiles }] = useModal();//
@ -152,7 +152,7 @@ function getDropDownAction(record): ActionItem[] {
{ {
label: '上传项目资料', label: '上传项目资料',
ifShow: () => { ifShow: () => {
return record.stage >= 2 && isShowByRoles("controler,consult") && record.projectId == null return record.stage >= 2 && isShowByRoles("projectContact") && record.projectId == null
}, },
onClick: handleuploadFile.bind(null, record) onClick: handleuploadFile.bind(null, record)
}, },
@ -169,7 +169,15 @@ async function handleDetailpage(record) {
} else { } else {
showUploadfileDetail.value = false showUploadfileDetail.value = false
} }
isSubProject.value = record.projectId if(record.stage == 0){
showApprovalDetails.value=false
}
if (record.stage == 1) {
showApprovalDetails.value = true
}
if(record.projectId != undefined||record.projectId!=null){
showApprovalDetails.value = false
}
openModalProjectr() openModalProjectr()
} }

6
src/views/projectLib/projectInfo/modifyfieldInfo.vue

@ -9,7 +9,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</div> </div>
@ -70,10 +70,10 @@ function removeFile(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
message.error("最大上传5M") message.error("最大上传500M")
return false return false
} }
//xlsx //xlsx

164
src/views/projectLib/projectInfo/projectInfo.data.ts

@ -1,6 +1,8 @@
import { FormSchema } from '@/components/Form'; import { FormSchema } from '@/components/Form';
import { BasicColumn } from '@/components/Table'; import { BasicColumn } from '@/components/Table';
import { useDictStore } from '@/store/modules/dict'; import { useDictStore } from '@/store/modules/dict';
import { useUserStore } from '@/store/modules/user';
const userStore = useUserStore();
import { ref } from 'vue' import { ref } from 'vue'
const dictStore = useDictStore(); const dictStore = useDictStore();
@ -23,42 +25,42 @@ export const columns: BasicColumn[] = [
dataIndex: 'projectName', dataIndex: 'projectName',
width: 300, width: 300,
resizable: true, resizable: true,
align:'left', align: 'left',
slots: { customRender: 'projectName' }, slots: { customRender: 'projectName' },
}, },
{ {
title: '行政区划', title: '行政区划',
dataIndex: 'adminDivision', dataIndex: 'adminDivision',
resizable: true resizable: true
}, },
{ {
title: '责任单位', title: '责任单位',
dataIndex: 'dutyWorkplace', dataIndex: 'dutyWorkplace',
resizable: true resizable: true
}, },
{ {
title: '单位属性', title: '单位属性',
dataIndex: 'workplaceProperties', dataIndex: 'workplaceProperties',
resizable: true resizable: true
}, },
{ {
title: '改革所属项目', title: '改革所属项目',
dataIndex: 'reformName', dataIndex: 'reformName',
format: 'dict|reformTasks', format: 'dict|reformTasks',
resizable: true resizable: true
}, },
{ {
title: '上级指导处室', title: '上级指导处室',
dataIndex: 'superLeader', dataIndex: 'superLeader',
format: 'dict|superLeader', format: 'dict|superLeader',
resizable: true resizable: true
}, },
{ {
title: '项目状态', title: '项目状态',
dataIndex: 'stage', dataIndex: 'stage',
format: 'dict|projectStage', format: 'dict|projectStage',
filters: 'dict|projectStage', filters: 'dict|projectStage',
resizable: true resizable: true
}, },
]; ];
@ -427,7 +429,7 @@ export const formSchemas: FormSchema[] = [
}, },
{ {
field: 'superLeader', field: 'superLeader',
label: '上级指导室', label: '任务牵头处室',
required: true, required: true,
component: 'DictSelect', component: 'DictSelect',
componentProps: { componentProps: {
@ -458,7 +460,8 @@ export const formSchemas: FormSchema[] = [
}, },
}; };
}, },
defaultValue: userStore.getUserInfo.id,
dynamicDisabled: true,
//一列占比总共24,比如一行显示2列 //一列占比总共24,比如一行显示2列
colProps: { span: 12 }, colProps: { span: 12 },
required: true, required: true,
@ -470,23 +473,28 @@ export const formSchemas: FormSchema[] = [
field: 'phone', field: 'phone',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input', component: 'Input',
defaultValue: userStore.getUserInfo.phoneNumber,
//一列占比总共24,比如一行显示2列 //一列占比总共24,比如一行显示2列
colProps: { span: 12 }, colProps: { span: 12 },
dynamicDisabled: true, dynamicDisabled: true,
}, },
{ {
//标题名称 //标题名称
label: '管理单位', label: '信息化工作专班',
//字段 //字段
field: 'manageOrg', field: 'manageOrg',
// component: 'Select',
// componentProps: {
// options: [
// { label: '信息化工作专班', value: '信息化工作专班' }]
// },
//一列占比总共24,比如一行显示2列
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'ApiSelect', component: 'ApiSelect',
componentProps: ({ formModel, formActionType }) => { componentProps: ({ formModel, formActionType }) => {
return { return {
// //
api: () => getWorkPlaceTypeDict({ roleCode: "manageOrg" }), api: () => getWorkPlaceTypeDict({ roleCode: "manageOrg" }),
params: {},
onChange: async (value) => { onChange: async (value) => {
// console.log(e) // console.log(e)
let manageContactorDict = await getContactorDict({ workPlace: value, roleCode: "manageOrg" }) let manageContactorDict = await getContactorDict({ workPlace: value, roleCode: "manageOrg" })
@ -514,6 +522,10 @@ export const formSchemas: FormSchema[] = [
}, },
}; };
}, },
defaultValue: '信息化工作专班',
required: true,
// dynamicDisabled:true,
//一列占比总共24,比如一行显示2列 //一列占比总共24,比如一行显示2列
colProps: { span: 12 }, colProps: { span: 12 },
}, },
@ -525,72 +537,88 @@ export const formSchemas: FormSchema[] = [
field: 'manageContactor', field: 'manageContactor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Select', component: 'Select',
// componentProps: {
// options: [
// {
// value: '1782674355449606145',
// label: '俞慧慧',
// }
// ],
// },
componentProps: (({ formModel }) => { componentProps: (({ formModel }) => {
return { return {
options: [], options: [
{
value: '1782674355449606145',
label: '俞慧慧',
}
],
} }
}), }),
defaultValue: '1782674355449606145',
required: true,
//一列占比总共24,比如一行显示2列 //一列占比总共24,比如一行显示2列
colProps: { span: 12 }, colProps: { span: 12 },
}, },
{ // {
//标题名称 // //标题名称
label: '监管单位', // label: '监管单位',
//字段 // //字段
field: 'supervisor', // field: 'supervisor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType // //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'ApiSelect', // component: 'ApiSelect',
componentProps: ({ formModel, formActionType }) => { // componentProps: ({ formModel, formActionType }) => {
return { // return {
// // //
api: () => getWorkPlaceTypeDict({ roleCode: "supervisor" }), // api: () => getWorkPlaceTypeDict({ roleCode: "supervisor" }),
showSearch: true, // showSearch: true,
filterOption: (input: string, option: any) => { return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, // filterOption: (input: string, option: any) => { return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 },
onChange: async (value) => { // onChange: async (value) => {
let supervisorContactorDict = await getContactorDict({ workPlace: value, roleCode: "supervisor" }) // let supervisorContactorDict = await getContactorDict({ workPlace: value, roleCode: "supervisor" })
// formModel.manageContactor = undefined; // reset city value // // formModel.manageContactor = undefined; // reset city value
const { updateSchema, setFieldsValue } = formActionType; // const { updateSchema, setFieldsValue } = formActionType;
updateSchema({ // updateSchema({
field: 'supervisorContactor', // field: 'supervisorContactor',
componentProps: { // componentProps: {
options: supervisorContactorDict, // options: supervisorContactorDict,
}, // },
}); // });
let ischange = true; // let ischange = true;
if (supervisorContactorDict?.length > 0) { // if (supervisorContactorDict?.length > 0) {
supervisorContactorDict.forEach(element => { // supervisorContactorDict.forEach(element => {
if (formModel.supervisorContactor == null || element.value == formModel.supervisorContactor) { // if (formModel.supervisorContactor == null || element.value == formModel.supervisorContactor) {
ischange = false // ischange = false
return; // return;
} // }
}); // });
} // }
if (ischange) { // if (ischange) {
setFieldsValue({ supervisorContactor: "" }) // setFieldsValue({ supervisorContactor: "" })
} // }
}, // },
}; // };
}, // },
//一列占比总共24,比如一行显示2列 // //一列占比总共24,比如一行显示2列
colProps: { span: 12 }, // colProps: { span: 12 },
}, // },
{ // {
//标题名称 // //标题名称
label: '监管单位负责人', // label: '监管单位负责人',
//字段 // //字段
field: 'supervisorContactor', // field: 'supervisorContactor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType // //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Select', // component: 'Select',
componentProps: { // componentProps: {
options: [], // options: [],
}, // },
//一列占比总共24,比如一行显示2列 // //一列占比总共24,比如一行显示2列
colProps: { span: 12 }, // colProps: { span: 12 },
}, // },
{ {
//标题名称 //标题名称

6
src/views/projectLib/projectInfo/uploadFile.vue

@ -8,7 +8,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="5" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="5" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过5M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -50,10 +50,10 @@ function removeFile(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
//xlsx //xlsx

6
src/views/projectLib/projectPlan/addPlan.vue

@ -10,7 +10,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx"> :on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传excel文件且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传excel文件且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -57,10 +57,10 @@ function httpRequest(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
//xlsx //xlsx

6
src/views/projectLib/projectPlan/addPlanFile.vue

@ -11,7 +11,7 @@
:before-upload="(file) => { return beforeUpload(file, item) }" :on-exceed="handleExceed" :limit="1" :before-upload="(file) => { return beforeUpload(file, item) }" :on-exceed="handleExceed" :limit="1"
:on-remove="removeFile"> :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传{{ item }}且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传{{ item }}且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -53,10 +53,10 @@ function removeFile(option) {
function beforeUpload(file, item) { function beforeUpload(file, item) {
console.log("file,item", file, item) console.log("file,item", file, item)
let fileSize = file.size let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M") ElMessage.error("最大上传500M")
return false return false
} }
let geShi = ["xlx","xlsx", "docx", "doc", "pdf"] as Array<string> let geShi = ["xlx","xlsx", "docx", "doc", "pdf"] as Array<string>

26
src/views/projectLib/projectPlan/planinfoFileDetail.vue

@ -7,39 +7,29 @@
<el-divider content-position="left">项目计划审批文件列表</el-divider> <el-divider content-position="left">项目计划审批文件列表</el-divider>
<PlanFileDetail :planinfoid="planinfoid" :stage="2" /> <PlanFileDetail :planinfoid="planinfoid" :stage="2" />
<div v-if="dataTo.isfinish == 1"> <div v-if="dataTo.isfinish == 1">
<ApprovalDetails :projectid="planinfoid" :stage="getstageName()" /> <ApprovalDetails :projectid="planinfoid" :stage="processName" />
</div> </div>
</div> </div>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" name="Detailpage" setup> <script lang="ts" name="Detailpage" setup>
import { defineProps, onMounted } from 'vue' import { ref,defineProps, onMounted } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import {getProcessName} from "./projectPlan.api"
import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue" import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue"
import PlanFileDetail from "@/views/ProcessApprovalSubPage/component/PlanFileDetail.vue"; import PlanFileDetail from "@/views/ProcessApprovalSubPage/component/PlanFileDetail.vue";
const [registerModal, { closeModal }] = useModalInner(); const [registerModal, { closeModal }] = useModalInner(init);
let names = ["可行性研究报告审批", "初验阶段", "终验阶段"];
let dataTo = defineProps(["planinfoid", "taskName", "isfinish"]) let dataTo = defineProps(["planinfoid", "taskName", "isfinish"])
console.log("wwwwwwwwwwww", dataTo) console.log("wwwwwwwwwwww", dataTo)
let processName = ref("")
onMounted(async () => { onMounted(async () => {
// processName.value =await getProcessName(dataTo.planinfoid)
}) })
function getstageName() { async function init(data) {
if (dataTo.taskName == "可研报告编制") { processName.value =await getProcessName({pid:data.planinfoid})
return "feasibilityReportPreparation"
}
if (dataTo.taskName == "联合技术审查") {
return "jointTechnicalReview"
}
if (dataTo.taskName == "集中核验") {
return "centralizedCheck"
}
return "createPlaninfoFile"
} }
</script> </script>
<style></style> <style></style>

4
src/views/projectLib/projectPlan/projectPlan.api.ts

@ -16,6 +16,8 @@ export enum Api {
modifyPlaninfo="/huzhouPlan/modifyPlaninfo", modifyPlaninfo="/huzhouPlan/modifyPlaninfo",
approvePlaninfo='/huzhouPlan/approvePlaninfo', approvePlaninfo='/huzhouPlan/approvePlaninfo',
planFilePageList="/huzhouPlaninfofile/planFilePageList", planFilePageList="/huzhouPlaninfofile/planFilePageList",
getProcessName="/huzhouPlaninfofile/getProcessName",
getplaninfoByid="/huzhouPlan/qetplaninfoByid", getplaninfoByid="/huzhouPlan/qetplaninfoByid",
getPlanFileApprovalInfoByPlaninfoId="/huzhouPlaninfofile/getPlanFileApprovalInfoByPlaninfoId", getPlanFileApprovalInfoByPlaninfoId="/huzhouPlaninfofile/getPlanFileApprovalInfoByPlaninfoId",
downloadPlanInfo="/huzhouPlan/downloadPlanInfo", downloadPlanInfo="/huzhouPlan/downloadPlanInfo",
@ -24,6 +26,8 @@ export enum Api {
* *
*/ */
export const projectPlanPageList = (params) => defHttp.get({ url: Api.projectPlanPageList, params }) export const projectPlanPageList = (params) => defHttp.get({ url: Api.projectPlanPageList, params })
export const getProcessName = (params) => defHttp.get({ url: Api.getProcessName, params })
export const queryPlanModuleDetailPage = (params) => defHttp.get({ url: Api.queryPlanModuleDetailPage, params }) export const queryPlanModuleDetailPage = (params) => defHttp.get({ url: Api.queryPlanModuleDetailPage, params })
export const queryPlanModuleone = (params) => defHttp.get({ url: Api.queryPlanModuleone, params }) export const queryPlanModuleone = (params) => defHttp.get({ url: Api.queryPlanModuleone, params })
export const getPlanFileApprovalInfoByPlaninfoId = (params) => defHttp.get({ url: Api.getPlanFileApprovalInfoByPlaninfoId, params }) export const getPlanFileApprovalInfoByPlaninfoId = (params) => defHttp.get({ url: Api.getPlanFileApprovalInfoByPlaninfoId, params })

2
src/views/projectLib/projectPlan/viewPlanDetail.vue

@ -192,7 +192,7 @@ function handleDetail(record) {
planinfoid.value = record.id planinfoid.value = record.id
taskName.value = record.taskName taskName.value = record.taskName
isfinish.value = record.isfinish isfinish.value = record.isfinish
openFileInfo() openFileInfo(true,{planinfoid:record.id,taskName:record.taskName,isfinish:record.isfinish})
} }
function handleuploadfile(record) { function handleuploadfile(record) {

6
src/views/projectLib/workReport/addModifyWorkreport.vue

@ -11,7 +11,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" <el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload"
:on-exceed="handleExceed" :limit="1" :on-remove="removeFile"> :on-exceed="handleExceed" :limit="1" :on-remove="removeFile">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过10M</div> <div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -94,10 +94,10 @@ function removeFile(option) {
// //
function beforeUpload(file) { function beforeUpload(file) {
let fileSize = file.size let fileSize = file.size
const FIVE_M = 10 * 1024 * 1024; const FIVE_M = 500 * 1024 * 1024;
//5M //5M
if (fileSize > FIVE_M) { if (fileSize > FIVE_M) {
ElMessage.error("最大上传10M") ElMessage.error("最大上传500M")
return false return false
} }

66
src/views/projectSummary/planSummary/index.vue

@ -6,7 +6,7 @@
<template v-for="(item, index) in planSummary" v-slot:[item.dataIndex]="{ record }"> <template v-for="(item, index) in planSummary" v-slot:[item.dataIndex]="{ record }">
<div v-if="record[item.dataIndex]"> <div v-if="record[item.dataIndex]">
<span>{{ record[item.dataIndex].taskName }}</span> <span>{{ record[item.dataIndex].taskName }}</span>
<Progress type="circle" :percent="record[item.dataIndex].percent" :size="20" :strokeColor="record[item.dataIndex].color"></Progress> <Progress type="circle" :percent="record[item.dataIndex].percent" :size="20" :strokeColor="record[item.dataIndex].color" @click="handleViewPlanDetail(record[item.dataIndex].id, record[item.dataIndex].color)"></Progress>
</div> </div>
</template> </template>
<!-- <template #phaseNumber0="{ record }"> <!-- <template #phaseNumber0="{ record }">
@ -85,29 +85,11 @@ import { projectPlanPageList } from '@/views/projectLib/projectPlan/projectPlan.
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import { color } from 'echarts'; import { color } from 'echarts';
onMounted(async () => { onMounted(async () => {
// planSummary.value = await getDataSource()
// planSummary.value.forEach(item => {
// Object.entries(item).forEach(([key, value]) => {
// if (key.includes("phaseNumber")) {
// let keyExists = planSummaryColumn.some(item => item.key == key);
// if (!keyExists) {
// planSummaryColumn.push({
// title: key.replace("phaseNumber", ""),
// dataIndex: key,
// })
// }
// }
// console.log(`Key: ${key}, Value: ${value}`);
// });
// })
// setProps({ columns: planSummaryColumn })
}) })
const userStore = useUserStore();
let projectId = ref();
let planSummary = ref<Array<any>>([]); let planSummary = ref<Array<any>>([]);
let projectStage = ref();
const [registerTable, { reload, getDataSource, setColumns }] = useTable({ const [registerTable, { setColumns }] = useTable({
api: getplanSummary, api: getplanSummary,
columns: planSummaryColumn, columns: planSummaryColumn,
rowKey:"projectName", rowKey:"projectName",
@ -157,52 +139,14 @@ const [registerTable, { reload, getDataSource, setColumns }] = useTable({
} }
}); });
function handleViewPlanDetail(projectId: string, color: string) {
console.log("handleViewPlanDetail", projectId, color);
function getTableAction(record): ActionItem[] {
return [
{
label: '详情',
ifShow: () => {
return record.stage >= 4
},
onClick: handleDetailpage.bind(null, record),
},
{
label: '设计项目计划',
ifShow: () => {
return record.stage == 2 && isShowByRoles("projectContact")
},
onClick: handlePlan.bind(null, record)
},
{
label: '修改项目计划',
ifShow: () => {
return record.stage == 5 && isShowByRoles("projectContact")
},
onClick: handlePlan.bind(null, record)
},
];
} }
function handleDetailpage(record) {
projectId.value = record.id
projectStage.value = record.stage
openViewPlanDetail()
}
function handlePlan(record) {
type.value = record.stage == 5 ? "2" : "1"
projectId.value = record.id
openProjectPlan()
}
function closeProjectPlanModal() {
closeProjectPlan()
reload()
}
</script> </script>

Loading…
Cancel
Save