Browse Source

新增联合技术审查模块

master
zhouhaibin 5 months ago
parent
commit
ec57b0db46
  1. 3
      src/views/ProcessApprovalSubPage/component/ApprovalPageModel.vue
  2. 10
      src/views/ProcessApprovalSubPage/component/ProjectinfoComponent.vue
  3. 156
      src/views/ProcessApprovalSubPage/uploadURTfileApproval.vue
  4. 3
      src/views/myWork/inComplete/inComplete.api.ts
  5. 8
      src/views/projectLib/projectInfo/projectInfo.data.ts
  6. 135
      src/views/projectLib/projectPlan/ProjectinfoComponent.vue
  7. 29
      src/views/projectLib/projectPlan/index.vue
  8. 6
      src/views/projectLib/projectPlan/projectPlan.api.ts
  9. 58
      src/views/projectLib/projectPlan/projectPlan.data.ts
  10. 107
      src/views/projectLib/projectPlan/uploadURTfile.vue

3
src/views/ProcessApprovalSubPage/component/ApprovalPageModel.vue

@ -6,7 +6,7 @@
<planFileApproval :record="record" @close="exit" v-if="planfileNames.includes(record.stage)"/>
<fieldChangeApproval :record="record" @close="exit" v-if="record.stage=='fieldChange'"/>
<contractApproval :record="record" @close="exit" v-if="record.stage=='createContract'"/>
<uploadURTfileApproval :record="record" @close="exit" v-if="record.stage=='createURT'"/>
</BasicModal>
</template>
<script lang="ts" name="ApprovalPageModel" setup>
@ -19,6 +19,7 @@ import uploadfileApproval from '../uploadfileApproval.vue'
import projectPlanApproval from '../projectPlanApproval.vue'
import fieldChangeApproval from '../fieldChangeApproval.vue'
import contractApproval from '../contractApproval.vue'
import uploadURTfileApproval from '../uploadURTfileApproval.vue'
const planfileNames = ["feasibilityReportPreparation","jointTechnicalReview","centralizedCheck","createPlaninfoFile"]
const [registerModal, { closeModal }] = useModalInner();
defineProps(["record"])

10
src/views/ProcessApprovalSubPage/component/ProjectinfoComponent.vue

@ -29,7 +29,8 @@ let proid = ref();
let dataTo = reactive({
title: "",
api:getProjectInfoAndChildPageList,
stage: 2
stage: 2,
columns: columns,
})
const [registerModal] = useModalInner(init);
@ -44,13 +45,16 @@ function init(data) {
if(data.stage){
dataTo.stage = data.stage
}
setProps({api:dataTo.api})
if(data.columns){
dataTo.columns = data.columns
}
setProps({api:dataTo.api,columns:dataTo.columns})
reload()
}
console.log("isShowByRoles", isShowByRoles('manage,sys:admin'))
const [registerTable,{reload,setProps}] = useTable({
title: '项目信息',
api: dataTo.api,
api: getProjectInfoAndChildPageList,
useSearchForm: true,
columns: columns,
rowKey: "id",

156
src/views/ProcessApprovalSubPage/uploadURTfileApproval.vue

@ -0,0 +1,156 @@
<template>
<div>
<el-divider content-position="left">联合技术审查文件详情</el-divider>
<UploadfileDetail :projectid="projectId" :stage="6" />
</div>
<div>
<el-divider content-position="left">联合技术审查审批文件详情</el-divider>
<UploadfileDetail :projectid="projectId" :stage="7" />
</div>
<ApprovalDetails :processInstanceId="processInstanceId" />
<!-- -->
<ApprovalFromPage
:showApprovalForm="showApprovalForm"
:buttons="resButton.buttons"
ref="ApprovalFromPageRef"
@submit="handleSubmit"
@exit="exit"
>
<div>
<div v-if="procesType == '0' && !resButton.isEdit">
<el-divider content-position="left">上传意见文件</el-divider>
<div style="display: flex; justify-content: center; align-items: center; height: 100px">
<el-upload
class="upload-demo"
ref="upload"
action
:http-request="httpRequestadvice"
:before-upload="beforeUpload"
:on-exceed="handleExceed"
:limit="10"
:on-remove="removeFile"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件大小且不超过500M</div>
</el-upload>
</div>
</div>
<el-divider content-position="left" v-if="resButton.isEdit">重新上传项目资料</el-divider>
<div
v-if="resButton.isEdit"
style="display: flex; justify-content: center; align-items: center; height: 100px"
>
<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">文件大小且不超过500M</div>
</el-upload>
</div>
</div>
</ApprovalFromPage>
</template>
<script lang="ts" name="uploadfileApproval" setup>
import { onMounted, ref, reactive } from 'vue';
import { approveURTFile, getActionParam } from '@/views/myWork/inComplete/inComplete.api';
import { ElMessage } from 'element-plus';
import ApprovalDetails from '@/views/ProcessApprovalSubPage/component/ApprovalDetails.vue';
import ApprovalFromPage from '@/views/ProcessApprovalSubPage/component/ApprovalFromPage.vue';
import UploadfileDetail from '@/views/ProcessApprovalSubPage/component/UploadfileDetail.vue';
let dataTo = defineProps(['record']);
console.log('routerouterouteroute', dataTo.record);
let projectId = dataTo.record.projectId as string;
let processInstanceId = dataTo.record.processInstanceId;
let taskid = dataTo.record.taskId as string;
let procesType = dataTo.record.procesType;
const emit = defineEmits(['close']);
let showApprovalForm = ref();
let ApprovalFromPageRef = ref();
let resButton = reactive({
showApprovalForm: false,
isEdit: false,
buttons: [],
});
let fileList = reactive<Array<any>>([]);
let fileAdviceList = reactive<Array<any>>([]);
onMounted(async () => {
resButton = await getActionParam({
processInstanceId: processInstanceId,
taskId: taskid,
procesType: dataTo.record.procesType,
});
showApprovalForm.value = resButton.showApprovalForm;
});
function removeFile(option) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].file.name == option.name) {
fileList.splice(i, 1);
}
}
for (let i = 0; i < fileAdviceList.length; i++) {
if (fileAdviceList[i].file.name == option.name) {
fileAdviceList.splice(i, 1);
}
}
}
function httpRequest(option) {
fileList.push(option);
}
function httpRequestadvice(option) {
fileAdviceList.push(option);
}
//
function beforeUpload(file) {
let fileSize = file.size;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error('最大上传500M');
return false;
}
return true;
}
//
function handleExceed() {
ElMessage.warning('最多只能上传五个文件');
}
async function handleSubmit() {
let approvalform = await ApprovalFromPageRef.value.getFieldsValueApprovalForm();
const params = new FormData();
params.append('flag', approvalform.flag);
params.append('projectid', projectId);
params.append('comment', approvalform.comment);
params.append('taskId', taskid);
if (fileList.length > 0) {
fileList.forEach((x) => {
params.append('file', x.file);
});
}
if (fileAdviceList.length > 0) {
fileAdviceList.forEach((x) => {
params.append('adviceFile', x.file);
});
}
console.log('param', params, 'approvalform', approvalform);
if (await ApprovalFromPageRef.value.validateApprovalForm()) {
let res = await approveURTFile(params);
console.log('提交成功!', res);
emit('close');
}
}
async function exit() {
emit('close');
}
</script>
<style></style>

3
src/views/myWork/inComplete/inComplete.api.ts

@ -12,6 +12,7 @@ export enum Api {
queryProcessInfo = '/workflow/getprocessInfo',
getProcessInstanceIdByProid = "/workflow/getProcessInstanceIdByProid",
getWorkcountNumber="/workflow/getWorkcountNumber",
approveURTFile="/huzhouUploadfileinfo/approveURTFile"
}
/**
@ -29,6 +30,8 @@ export const approveUploadFile = (params) => defHttp.post({ url: Api.approveUplo
export const modifyProjectInfo = (params) => defHttp.post({ url: Api.modifyProjectInfo, params })
export const approvePlanFile = (params) => defHttp.post({ url: Api.approvePlanFile, headers: { "Content-Type": "multipart/form-data" }, params })
export const approveURTFile = (params) => defHttp.post({ url: Api.approveURTFile, headers: { "Content-Type": "multipart/form-data" }, params })
export const openApprovePage = (record,router) => {
if (record.stage == 1) {
router.push({ // push方法

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

@ -3,11 +3,7 @@ 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();
const reformTasksDicts: Array<Object> = dictStore.selectDictArray("reformTasks")
const roomDicts: Array<Object> = dictStore.selectDictArray("superLeader")
import { getWorkPlaceTypeDict, getContactorDict, getUserDictByRoles } from '../initiatesProjects/initiatesProjects.api'
@ -890,6 +886,10 @@ export const resourcetableColumns: BasicColumn[] = [
title: '上传时间',
dataIndex: 'createDate',
},
{
title: '处理人',
dataIndex: 'createUser',
},
{
title: '文件状态',
dataIndex: 'status',

135
src/views/projectLib/projectPlan/ProjectinfoComponent.vue

@ -0,0 +1,135 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" width="1200px" :showOkBtn="false" :title="dataTo.title">
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" /> -->
<TableAction :actions="getTableAction(record)" />
</template>
</BasicTable>
</BasicModal>
<slot :projectid="proid"></slot>
<BasicModal @register="registeModal" title="文件详情" width="1200px" :showOkBtn="false" :showCancelBtn="false">
<div>
<el-divider content-position="left">联合技术审查文件详情</el-divider>
<UploadfileDetail :projectid="projectId" :stage="6" />
</div>
<div>
<el-divider content-position="left">联合技术审查审批文件详情</el-divider>
<UploadfileDetail :projectid="projectId" :stage="7" />
</div>
<ApprovalDetails :projectid="projectId" :stage="'createURT'" />
</BasicModal>
</template>
<script lang="ts" name="ProjectinfoComponent" setup>
//ts
import { ref,reactive } from 'vue';
import { ActionItem, BasicTable, TableAction, useTable } from '@/components/Table';
import { BasicModal, useModal ,useModalInner} from '@/components/Modal';
import { columns, searchFormSchema } from '../../projectLib/projectInfo/projectInfo.data';
import { getProjectInfoAndChildPageList, isShowByRoles } from '../../projectLib/projectInfo/projectInfo.api';
import UploadfileDetail from "@/views/ProcessApprovalSubPage/component/UploadfileDetail.vue"
import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue"
const [registeModal, { openModal: openregisteModal, closeModal: closeregisteModal }] = useModal();//
let emit = defineEmits(["openChildModal"])
let proid = ref();
let projectId = ref();
let dataTo = reactive({
title: "",
api:getProjectInfoAndChildPageList,
stage: 2,
columns: columns,
})
const [registerModal] = useModalInner(init);
function init(data) {
console.log("initdataTo", data,dataTo.api)
if(data.api){
dataTo.api = data.api
}
if(data.title){
dataTo.title = data.title
}
if(data.stage){
dataTo.stage = data.stage
}
if(data.columns){
dataTo.columns = data.columns
}
setProps({api:dataTo.api,columns:dataTo.columns})
reload()
}
console.log("isShowByRoles", isShowByRoles('manage,sys:admin'))
const [registerTable,{reload,setProps}] = useTable({
title: '项目信息',
api: getProjectInfoAndChildPageList,
useSearchForm: true,
columns: columns,
rowKey: "id",
showIndexColumn: false,
actionColumn: {
width: 140,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
beforeFetch(param) {
param.stage = dataTo.stage? dataTo.stage : 2
},
// rowSelection: { type: 'radio' },
//
formConfig: {
schemas: searchFormSchema,
}
});
function getTableAction(record): ActionItem[] {
return [
{
label: "上传文件",
ifShow:()=>{
if(record.utrIsfinish==0){
return true
}else{
return false
}
},
onClick: handlemodify.bind(null, record),
},
{
label: "详情",
ifShow:()=>{
if(record.utrIsfinish!=0){
return true
}else{
return false
}
},
onClick: handledetail.bind(null, record),
}
];
}
function handlemodify(record) {
proid.value = record.id
console.log("handlemodify", proid.value)
emit("openChildModal", record)
}
function handledetail(record) {
projectId.value = record.id
openregisteModal()
}
</script>
<style scoped></style>

29
src/views/projectLib/projectPlan/index.vue

@ -7,7 +7,9 @@
<TableAction :actions="getTableAction(record)" />
</template>
<template #tableTitle>
<el-button color="#626aef" :dark="true" @click="openModfiyInfoPage()">项目计划修改记录</el-button>
<el-button color="#626aef" :dark="true" round @click="openModfiyInfoPage()">项目计划修改记录</el-button>
<el-button color="#626aef" :dark="true" round @click="openUnitedTechnicalReview()" v-if='isShowByRoles("projectContact")'>联合技术审查</el-button>
</template>
</BasicTable>
@ -18,6 +20,11 @@
:showCancelBtn="false">
<addPlan :type="type" :projectid="projectId" @close="closeProjectPlanModal()" />
</BasicModal>
<ProjectinfoComponent @register="registerProjectinfo" @openChildModal="openModalProjectr">
<template #default="record">
<uploadURTfile @register="registerUnitedTechnicalReview" @close="closeModel" />
</template>
</ProjectinfoComponent>
</PageWrapper>
</template>
@ -34,10 +41,15 @@ import viewPlanDetail from "@/views/projectLib/projectPlan/viewPlanDetail.vue";
import { isShowByRoles } from '@/views/projectLib/projectInfo/projectInfo.api';
import { columns } from '@/views/projectLib/projectInfo/projectInfo.data';
import { searchFormSchema } from '@/views/projectLib/projectPlan/projectPlan.data';
import { projectPlanPageList } from '@/views/projectLib/projectPlan/projectPlan.api';
import { searchFormSchema ,unitedTechnicalRevieColumns} from '@/views/projectLib/projectPlan/projectPlan.data';
import { projectPlanPageList,getUnitedTechnicalReviewList } from '@/views/projectLib/projectPlan/projectPlan.api';
import { useUserStore } from '@/store/modules/user';
import { useRouter } from 'vue-router'; // useRouter
import ProjectinfoComponent from './ProjectinfoComponent.vue'
import uploadURTfile from "@/views/projectLib/projectPlan/uploadURTfile.vue"
const [registerProjectinfo, { openModal: openModalProjectinfo,closeModal: closeModalProjectinfo}] = useModal();//
const [registerUnitedTechnicalReview, { openModal:openUnitedTechnicalReviewmode,closeModal:closeUnitedTechnicalReviewmode}] = useModal();//
const router = useRouter();
let projectId = ref();
let type = ref();
@ -123,6 +135,17 @@ function openModfiyInfoPage() {
router.push({ path: '/projectLib/planinfoHistory/index' })
}
function openUnitedTechnicalReview() {
openModalProjectinfo(true,{title:"联合技术审查",api:getUnitedTechnicalReviewList,columns:unitedTechnicalRevieColumns})
}
function openModalProjectr(value) {
openUnitedTechnicalReviewmode(true,{projectid:value.id})
}
function closeModel() {
closeUnitedTechnicalReviewmode()
closeModalProjectinfo()
}
</script>
<style scoped>

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

@ -21,6 +21,8 @@ export enum Api {
getplaninfoByid="/huzhouPlan/qetplaninfoByid",
getPlanFileApprovalInfoByPlaninfoId="/huzhouPlaninfofile/getPlanFileApprovalInfoByPlaninfoId",
downloadPlanInfo="/huzhouPlan/downloadPlanInfo",
getUnitedTechnicalReviewList='/huzhouProject/getUnitedTechnicalReviewList',
uploadURTFile='/huzhouUploadfileinfo/uploadURTFile'
}
/**
*
@ -45,8 +47,8 @@ export const modifyPlaninfo = (params?) =>defHttp.post({ url: Api.modifyPlaninf
export const approvePlaninfo = (params?) =>defHttp.post({ url: Api.approvePlaninfo,headers:{ "Content-Type": "multipart/form-data" }, params })
export const planFilePageList = (params) => defHttp.get({ url: Api.planFilePageList, params })
export const getplaninfoByid = (params) => defHttp.get({ url: Api.getplaninfoByid, params })
export const getUnitedTechnicalReviewList=(params) => defHttp.get({ url:Api.getUnitedTechnicalReviewList , params })
export const uploadURTFile=(params) => defHttp.post({ url:Api.uploadURTFile,headers:{ "Content-Type": "multipart/form-data" }, params })

58
src/views/projectLib/projectPlan/projectPlan.data.ts

@ -145,3 +145,61 @@ export const searchFormSchema: FormSchema[] = [
// },
];
export const unitedTechnicalRevieColumns: BasicColumn[] = [
{
title: '项目编号',
width: 150,
dataIndex: 'id',
ifShow: false,
},
{
title: '项目名称',
dataIndex: 'projectName',
width: 300,
resizable: true,
align: 'left',
slots: { customRender: 'projectName' },
},
{
title: '行政区划',
dataIndex: 'adminDivision',
resizable: true
},
{
title: '责任单位',
dataIndex: 'dutyWorkplace',
resizable: true
},
{
title: '单位属性',
dataIndex: 'workplaceProperties',
resizable: true
},
{
title: '改革所属项目',
dataIndex: 'reformName',
format: 'dict|reformTasks',
resizable: true
},
{
title: '上级指导处室',
dataIndex: 'superLeader',
format: 'dict|superLeader',
resizable: true
},
{
title: '是否完成',
dataIndex: 'utrIsfinish',
customRender: ({ record }) => {
if (record.utrIsfinish == 1) {
return "审批中"
} else if (record.utrIsfinish == 2) {
return "已完成"
} else {
return "未完成"
}
},
},
];

107
src/views/projectLib/projectPlan/uploadURTfile.vue

@ -0,0 +1,107 @@
<template>
<!-- 自定义表单 -->
<BasicModal v-bind="$attrs" @register="registerModal" title="上传文件" width="1200px" :showOkBtn="false"
:showCancelBtn="false">
<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="10" :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-item>
<el-button type="primary" @click="submitImportForm">开始导入</el-button>
<el-button type="info" @click="dialogVisible">关闭窗口</el-button>
</el-form-item>
</el-form>
</BasicModal>
</template>
<script lang="ts" name="setProjectWorkReport" setup>
import { reactive, defineEmits, onMounted, ref } from 'vue';
import { ElMessage } from 'element-plus';
import { useModalInner, BasicModal } from '@/components/Modal';
import { uploadURTFile } from '@/views/projectLib/projectPlan/projectPlan.api';
import { queryProjectInfoById } from '@/views/projectLib/projectInfo/projectInfo.api';
const [registerModal, { closeModal }] = useModalInner(init);
let fileList = reactive<Array<any>>([]);
let projectid = ref("")
async function init(data) {
console.log('datadatadata', data);
projectid.value = data.projectid;
}
const emit = defineEmits(['close']);
//
onMounted(async () => {
});
function httpRequest(option) {
fileList.push(option);
console.log(fileList, 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, item) {
console.log('file,item', file, item);
let fileSize = file.size;
const FIVE_M = 500 * 1024 * 1024;
//5M
if (fileSize > FIVE_M) {
ElMessage.error('最大上传500M');
return false;
}
// let geShi = ['xlx', 'xlsx', 'docx', 'doc', 'pdf'] as Array<string>;
// if (geShi.indexOf(file.name.substring(file.name.indexOf('.') + 1)) == -1) {
// ElMessage.error('' + 'xlx,xlsx, docx, doc, pdf');
// console.log('' + 'xlsx', 'docx', 'doc', 'pdf');
// return false;
// }
// if (item.indexOf(file.name.substring(0, file.name.indexOf('.'))) == -1) {
// ElMessage.error(':' + item);
// return false;
// }
console.log('文件上传成功');
return true;
}
//
function handleExceed() {
ElMessage.warning('最多只能上传十个文件');
}
//Excel
async function submitImportForm() {
if (fileList.length == 0) {
ElMessage({
message: '未选择任何文件,无法上传!',
type: 'error',
});
return;
}
// // 使form
const params = new FormData();
// paramsData
fileList.forEach((x) => {
console.log('xxxxxxxxxx', x, x.file);
params.append('file', x.file);
});
params.append('projectid', projectid.value);
uploadURTFile(params).then(() => {
emit('close');
});
}
function dialogVisible() {
emit('close');
}
</script>
<style></style>
Loading…
Cancel
Save