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"
: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">文件大小且不超过5M</div>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</div>
</div>
@ -92,7 +92,7 @@ function httpRequest(option) {
//
function beforeUpload(file) {
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);
let whiteList = ["xls", "xlsx"];
@ -103,7 +103,7 @@ function beforeUpload(file) {
}
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
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"
: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">文件大小且不超过5M</div>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</div>
<ApprovalDetails :processInstanceId="processInstanceId" />
@ -60,10 +60,10 @@ function httpRequest(option) {
//
async function beforeUpload(file) {
let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
return false
}
return true

4
src/views/ProcessApprovalSubPage/initiatesProjectsApproval.vue

@ -2,6 +2,8 @@
<!-- 自定义表单 -->
<div>
<ProjectDetails :isEdit="resButton.isEdit" :projectid="projectid" ref="ProjectDetailsRef" />
<el-divider content-position="left">资金承若函</el-divider>
<UploadfileDetail :projectid="projectid" :stage="5" />
</div>
<ApprovalDetails :processInstanceId="processInstanceId" />
<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 ProjectDetails from "../ProcessApprovalSubPage/component/ProjectDetails.vue"
import ApprovalFromPage from "../ProcessApprovalSubPage/component/ApprovalFromPage.vue"
import UploadfileDetail from "@/views/ProcessApprovalSubPage/component/UploadfileDetail.vue"
let dataTo = defineProps(["record"])
let emit = defineEmits(["close"])
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"
:on-remove="removeFile">
<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-form-item>
</el-form>
@ -30,7 +30,7 @@
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequestadvice"
:before-upload="beforeAdviceUpload" :on-exceed="handleExceed" :limit="5" :on-remove="removeFile">
<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>
</div>
</div>
@ -152,10 +152,10 @@ function httpRequestadvice(option) {
async function beforeUpload(file, item) {
console.log("file,item", file, item)
let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
return false
}
let geShi = ["xlx", "xlsx", "docx", "doc", "pdf"] as Array<string>
@ -179,10 +179,10 @@ function handleExceed() {
function beforeAdviceUpload(file) {
console.log("file,item", file)
let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
return false
}
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"
: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">文件大小且不超过5M</div>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</div>
</div>
@ -85,7 +85,7 @@ function httpRequest(option) {
//
function beforeUpload(file) {
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);
let whiteList = ["xls", "xlsx"];
@ -96,7 +96,7 @@ function beforeUpload(file) {
}
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
return false
}

8
src/views/ProcessApprovalSubPage/uploadfileApproval.vue

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

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

@ -4,7 +4,7 @@
<BasicTable @register="registerTable">
<template #tableTitle>
<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>
</BasicTable>
<!-- <addressProjectinfoComponent @register="register"/> -->

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

@ -4,10 +4,10 @@
<!--引用表格-->
<BasicTable @register="registerTable">
<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-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 :span="12">
<!-- <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 { 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{ElMessage,UploadInstance} from 'element-plus'
import { downloadFile } from "@/api/common/api"
@ -85,7 +85,7 @@ async function init(data) {
}
}
const [registerTable, { getDataSource, setProps, reload, setColumns }] = useTable({
api: getPerformancescore,
api: getProjectassessmentIncludeSys,
columns: templateContentColumns,
useSearchForm: false,
pagination: false,

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

@ -110,11 +110,11 @@ function openModalProjectr(value) {
console.log("proidproid", value)
let type="1"
if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("医院")!=-1){
type="2"
type="2"//
}else if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("卫生健康")!=-1){
type="1"
type="1"//
}else{
return;
type="3"//
}
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",
getProjectassessmentByprojectId="/huzhouProjectassessment/getProjectassessmentByprojectId",
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 getProjectassessmentByprojectId = (params?) => defHttp.get({ url: Api.getProjectassessmentByprojectId, 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 });

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"
:on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx">
<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-form-item>
<el-form-item>
@ -54,10 +54,10 @@ function httpRequest(option) {
//
function beforeUpload(file) {
let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
return false
}
//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 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>
</div>
<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>
</template>
<script lang="ts" name="initiatesProjects" setup>
import { onMounted } from 'vue'
import { onMounted, reactive } from 'vue'
import { useForm, BasicForm } from '@/components/Form';
import { formSchemas } from '../projectInfo/projectInfo.data';
import { submitProjectInfo } from './initiatesProjects.api'
import { Modal } from 'ant-design-vue';
import { queryProjectInfoById } from '@/views/projectLib/projectInfo/projectInfo.api'
import { ElMessage } from 'element-plus'
let fileList = reactive<Array<any>>([]);
let dataTo = defineProps(["projectid"])
let emit = defineEmits(["close"])
onMounted(async () => {
@ -52,23 +65,44 @@ async function customResetFunc() {
}
async function handleSubmit() {
if (await validate()) {
Modal.confirm({
title: '提示窗口',
content: '是否提交入库申请表?',
okText: '确认',
cancelText: '取消',
onOk: async () => {
let datas = await getFieldsValue()
console.log("datas", datas)
submitProjectInfo(datas).then(() => {
let datasnull = clearObjectValues(datas)
setFieldsValue(datasnull)
emit("close")
})
// Modal.confirm({
// title: '',
// content: '',
// okText: '',
// cancelText: '',
// onOk: async () => {
// let datas = await getFieldsValue()
// console.log("datas", datas)
// submitProjectInfo(datas).then(() => {
// let datasnull = clearObjectValues(datas)
// setFieldsValue(datasnull)
// 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 {
console.log("未完成")
@ -81,7 +115,42 @@ function clearObjectValues(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>
<style scoped>
.inintatesProject {

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

@ -92,7 +92,7 @@ function handleDetail(record) {
isfinish.value = record.record.isfinish
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"
: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">文件大小且不超过10M</div>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</el-form-item>
@ -363,10 +363,10 @@ function removeFile(option) {
//
function beforeUpload(file) {
let fileSize = file.size
const FIVE_M = 10 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传10M")
ElMessage.error("最大上传500M")
return false
}

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

@ -2,6 +2,8 @@
<el-tabs v-model="activeName" class="demo-tabs">
<el-tab-pane label="项目入库详情" name="1">
<ProjectDetails :isEdit="false" :projectid="projectid" />
<el-divider content-position="left">资金承若函</el-divider>
<UploadfileDetail :projectid="projectid" :stage="5" />
</el-tab-pane>
<el-tab-pane label="项目资料详情" name="2" v-if="showUploadfileDetail">
<el-divider content-position="left">项目资料详情</el-divider>
@ -23,7 +25,7 @@
</template>
</BasicTable>
</div> -->
<ApprovalDetails :projectid="projectid" :stage="showUploadfileDetail ? 'supervisionFile' : 'creatProjectinfo'" v-if="isSubProject==undefined"/>
<ApprovalDetails :projectid="projectid" :stage="'creatProjectinfo'" v-if="showApprovalDetails==true"/>
</template>
<script lang="ts" name="Detailpage" setup>
@ -36,7 +38,7 @@ import ProjectDetails from "../../ProcessApprovalSubPage/component/ProjectDetail
import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue"
import UploadfileDetail from '../../ProcessApprovalSubPage/component/UploadfileDetail.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>>()
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"
:on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx">
<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-form-item>
<el-form-item>
@ -53,10 +53,10 @@ function httpRequest(option) {
//
function beforeUpload(file) {
let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
return false
}
//xlsx

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

@ -22,7 +22,7 @@
<template #tableTitle>
<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 type="primary" @click="handleBatchdownload"> 导出项目</el-button>
</template>
@ -41,7 +41,7 @@
</BasicModal>
<BasicModal @register="registeProjectrModal" title="项目信息详情" width="1200px" :showOkBtn="false">
<Detailpage :projectid="proid" :stage="ProjectStage" :IsModify="IsModify"
:showUploadfileDetail="showUploadfileDetail" :isSubProject="isSubProject" />
:showUploadfileDetail="showUploadfileDetail" :showApprovalDetails="showApprovalDetails" />
</BasicModal>
<BasicModal @register="registerModalUploadFiles" title="申报项目资料" width="1200px" :showOkBtn="false"
:showCancelBtn="false">
@ -91,7 +91,7 @@ let proid = ref();
let ProjectStage = ref()
let IsModify = ref()
let showUploadfileDetail = ref()
let isSubProject = ref()
let showApprovalDetails = ref()
let fatherid = ref()
const [registeProjectrModal, { openModal: openModalProjectr }] = useModal();//
const [registerModalUploadFiles, { openModal: openUploadFiles, closeModal: closeUploadFiles }] = useModal();//
@ -152,7 +152,7 @@ function getDropDownAction(record): ActionItem[] {
{
label: '上传项目资料',
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)
},
@ -169,7 +169,15 @@ async function handleDetailpage(record) {
} else {
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()
}

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"
: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">文件大小且不超过5M</div>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</el-form-item>
</div>
@ -70,10 +70,10 @@ function removeFile(option) {
//
function beforeUpload(file) {
let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
message.error("最大上传5M")
message.error("最大上传500M")
return false
}
//xlsx

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

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

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

@ -11,7 +11,7 @@
:before-upload="(file) => { return beforeUpload(file, item) }" :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">只能上传{{ item }}且不超过5M</div>
<div slot="tip" class="el-upload__tip">只能上传{{ item }}且不超过500M</div>
</el-upload>
</el-form-item>
<el-form-item>
@ -53,10 +53,10 @@ function removeFile(option) {
function beforeUpload(file, item) {
console.log("file,item", file, item)
let fileSize = file.size
const FIVE_M = 5 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传5M")
ElMessage.error("最大上传500M")
return false
}
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>
<PlanFileDetail :planinfoid="planinfoid" :stage="2" />
<div v-if="dataTo.isfinish == 1">
<ApprovalDetails :projectid="planinfoid" :stage="getstageName()" />
<ApprovalDetails :projectid="planinfoid" :stage="processName" />
</div>
</div>
</BasicModal>
</template>
<script lang="ts" name="Detailpage" setup>
import { defineProps, onMounted } from 'vue'
import { ref,defineProps, onMounted } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal';
import {getProcessName} from "./projectPlan.api"
import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue"
import PlanFileDetail from "@/views/ProcessApprovalSubPage/component/PlanFileDetail.vue";
const [registerModal, { closeModal }] = useModalInner();
let names = ["可行性研究报告审批", "初验阶段", "终验阶段"];
const [registerModal, { closeModal }] = useModalInner(init);
let dataTo = defineProps(["planinfoid", "taskName", "isfinish"])
console.log("wwwwwwwwwwww", dataTo)
let processName = ref("")
onMounted(async () => {
// processName.value =await getProcessName(dataTo.planinfoid)
})
function getstageName() {
if (dataTo.taskName == "可研报告编制") {
return "feasibilityReportPreparation"
}
if (dataTo.taskName == "联合技术审查") {
return "jointTechnicalReview"
}
if (dataTo.taskName == "集中核验") {
return "centralizedCheck"
}
return "createPlaninfoFile"
async function init(data) {
processName.value =await getProcessName({pid:data.planinfoid})
}
</script>
<style></style>

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

@ -16,6 +16,8 @@ export enum Api {
modifyPlaninfo="/huzhouPlan/modifyPlaninfo",
approvePlaninfo='/huzhouPlan/approvePlaninfo',
planFilePageList="/huzhouPlaninfofile/planFilePageList",
getProcessName="/huzhouPlaninfofile/getProcessName",
getplaninfoByid="/huzhouPlan/qetplaninfoByid",
getPlanFileApprovalInfoByPlaninfoId="/huzhouPlaninfofile/getPlanFileApprovalInfoByPlaninfoId",
downloadPlanInfo="/huzhouPlan/downloadPlanInfo",
@ -24,6 +26,8 @@ export enum Api {
*
*/
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 queryPlanModuleone = (params) => defHttp.get({ url: Api.queryPlanModuleone, 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
taskName.value = record.taskName
isfinish.value = record.isfinish
openFileInfo()
openFileInfo(true,{planinfoid:record.id,taskName:record.taskName,isfinish:record.isfinish})
}
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"
: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">文件大小且不超过10M</div>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</el-form-item>
@ -94,10 +94,10 @@ function removeFile(option) {
//
function beforeUpload(file) {
let fileSize = file.size
const FIVE_M = 10 * 1024 * 1024;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error("最大上传10M")
ElMessage.error("最大上传500M")
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 }">
<div v-if="record[item.dataIndex]">
<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>
</template>
<!-- <template #phaseNumber0="{ record }">
@ -85,29 +85,11 @@ import { projectPlanPageList } from '@/views/projectLib/projectPlan/projectPlan.
import { useUserStore } from '@/store/modules/user';
import { color } from 'echarts';
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 projectStage = ref();
const [registerTable, { reload, getDataSource, setColumns }] = useTable({
const [registerTable, { setColumns }] = useTable({
api: getplanSummary,
columns: planSummaryColumn,
rowKey:"projectName",
@ -157,52 +139,14 @@ const [registerTable, { reload, getDataSource, setColumns }] = useTable({
}
});
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 handleViewPlanDetail(projectId: string, color: string) {
console.log("handleViewPlanDetail", projectId, color);
}
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>

Loading…
Cancel
Save