Compare commits
154 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b69abfc9b | ||
|
|
6af7bf9d2f | ||
|
|
604fad9009 | ||
|
|
9013d54add | ||
|
|
fd722b5c82 | ||
|
|
a8e56fe985 | ||
|
|
4953e96415 | ||
| 5b85abd219 | |||
| 7156e34fde | |||
| e903dd2994 | |||
| 549e307b3e | |||
| 390474ea24 | |||
| 43c9cb03d3 | |||
|
|
5eb7e34571 | ||
|
|
d12fb8a12b | ||
| 1991d7eada | |||
| 31a12e566a | |||
| 5c8679d5f9 | |||
| 7e70c9271f | |||
| 6748685712 | |||
| cd7f94e8f2 | |||
|
|
db8a96a664 | ||
|
|
17207b2c87 | ||
| d6de4d5854 | |||
| bcdafbc7cd | |||
|
|
e9e5a0c785 | ||
|
|
21f90e438c | ||
| e1b9f3f220 | |||
| 96d46e6480 | |||
| 6ab0c206c4 | |||
| a4255c3157 | |||
| 39b1690c0a | |||
| 9f4fe95e4d | |||
| 1635482e09 | |||
| 3270aeef06 | |||
|
|
6c80652416 | ||
|
|
c97091db4f | ||
| 1c57cb277b | |||
| e648faba69 | |||
| a663b84fab | |||
| f83ae8df51 | |||
| 1d772e1414 | |||
| 92e9468cb9 | |||
| 5c93eae4ce | |||
| 5d7b6bc59f | |||
| 1825b6c871 | |||
| dee7fdacf2 | |||
| dc7d90c349 | |||
| 9661cdbb2b | |||
|
|
3a4f9927c9 | ||
| 1f4389eb5e | |||
|
|
4a90f4bc1e | ||
|
|
8155a4d160 | ||
| 771a844552 | |||
| 08a609e2a8 | |||
| d16045a1b2 | |||
| 1fc0ae6ac0 | |||
| 08f20bb171 | |||
| 5421145583 | |||
| b7a0dc2545 | |||
| 3bd6df74cc | |||
|
|
190a1d6477 | ||
|
|
cb7f6e9919 | ||
| 5ea20654cc | |||
| 670c8a5653 | |||
| 206a024f4b | |||
| 89d5c86d8b | |||
| 397d5f0182 | |||
| 10bc019866 | |||
| 62620b1dc5 | |||
| ff68ce96af | |||
| 65d933c027 | |||
| 726c746a87 | |||
| c498a3de62 | |||
| d432e54bc8 | |||
| 5b68ee6846 | |||
| 96e7ca1a67 | |||
| 9368ea24ab | |||
| c96cbf8415 | |||
| bab0421b6d | |||
| fccce985b6 | |||
| c675b1ec48 | |||
| 02bda3c71f | |||
| b7ebd66729 | |||
| 76c759c088 | |||
| e4e7444aff | |||
| a8f5f84b20 | |||
| 716d18122f | |||
| 2f19bb7bdc | |||
| 8f8d954bb6 | |||
| 0732acf8c7 | |||
| 6540ac8991 | |||
| 6009885c09 | |||
| 83a8fac0fb | |||
| 0c070154e1 | |||
| 32a3ab3001 | |||
| d0fe340f9d | |||
| 92d2278dfd | |||
| f5c6680c66 | |||
| b5e5a3f12a | |||
| 7869ff4e6a | |||
| 95f4610714 | |||
| 9754b62038 | |||
| 573fff84e4 | |||
|
|
1f1ff3a466 | ||
| 79f2032fde | |||
|
|
f820c25892 | ||
|
|
a4cb59ff9a | ||
| a7b6b44a42 | |||
| 1f126592e1 | |||
| 0f914237bf | |||
| 9a0f5b0e12 | |||
| 9f7e3778ad | |||
| 01540a3144 | |||
| 5e4e8d6389 | |||
| 08579c8aad | |||
| 5ae971e0ac | |||
| 9ae0b7547c | |||
| b2369d1702 | |||
| 8b6c9a7d1e | |||
| 6097e74a9b | |||
| 11b794bf96 | |||
| 2a72de08a4 | |||
| 77fcdc240b | |||
| 6d8dbaa8c4 | |||
| d7b004ae80 | |||
| 1f9a3603d8 | |||
| b8b165c205 | |||
| de2f566bd0 | |||
| 38182da467 | |||
| de0e0be953 | |||
| ef1acd65b7 | |||
| 27dcca6617 | |||
| 2ad94511d0 | |||
| bfdf2cf4a2 | |||
| 4f4ef2cfde | |||
| 222ab1bec7 | |||
| bead5edc86 | |||
| 18caa0ee58 | |||
| 96d8f1e48a | |||
| 3bc24219ed | |||
| 07d5380818 | |||
| cd91dd3cad | |||
| edb235ff0d | |||
| 9ade24768e | |||
| e753c27455 | |||
| 1684e49662 | |||
| 42ea1dde8b | |||
|
|
bb2a0ce177 | ||
|
|
3b0637e1b3 | ||
|
|
e950d9e687 | ||
|
|
736798b540 | ||
|
|
190c77d71d | ||
|
|
6df354ec1b |
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>科研管理平台</title>
|
<!-- <title>科研管理平台</title>-->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -60,9 +60,25 @@ export const deleteFile = (fileId) => {
|
|||||||
method: "delete"
|
method: "delete"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const downloadFile = (fileId) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/process/file/download',
|
||||||
|
method: "get",
|
||||||
|
responseType:'blob',
|
||||||
|
params:{
|
||||||
|
fileId:fileId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
export const getCompanyOption = () => {
|
export const getCompanyOption = () => {
|
||||||
return request({
|
return request({
|
||||||
url: '/admin/mosr/sub/company/companyOption',
|
url: '/admin/mosr/sub/company/companyOption',
|
||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const deleteDemand = (id) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/requirement/${id}`,
|
||||||
|
method: "delete"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
86
src/api/project-manage/index.js
Normal file
86
src/api/project-manage/index.js
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
import request from '@/utils/request.js'
|
||||||
|
//项目立项
|
||||||
|
export const getApplyProcess = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/project/approval/initiation/process/${projectId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const projectApply = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/approval/initiation/apply',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getApplyDetail = (ProjectId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/project/approval/info/${ProjectId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const resubmitApply = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/approval/initiation/resubmit',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//项目实施
|
||||||
|
export const getCheckDetail = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/project/implementation/info/${projectId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const resubmitCheck = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/implementation/resubmit',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const projectCheck = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/implementation/initiation/check',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getProjectCheckProcess = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/project/implementation/process/${projectId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//项目归档
|
||||||
|
export const getConclusionDetail = (ProjectId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/project/filing/info/${ProjectId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const resubmitConclusion = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/resubmit',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const projectConclusion = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/project/entry',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getProjectConclusionProcess = () => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/process',
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -60,3 +60,12 @@ export function addProcessDefinition(param) {
|
|||||||
data: param
|
data: param
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getTypeOption() {
|
||||||
|
return request({
|
||||||
|
url: "/workflow/process/definition/type/option",
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,3 +22,10 @@ export function getDepartmentTree() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getMosrDept(params) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/mosr/user/choose',
|
||||||
|
method: 'get',
|
||||||
|
params:params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
.scale {
|
.scale {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
z-index: 666;
|
z-index: 666;
|
||||||
position: absolute;
|
position: static;
|
||||||
//top: -20px;
|
//top: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,4 +547,5 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 15px;
|
bottom: 15px;
|
||||||
right: 15px;
|
right: 15px;
|
||||||
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|||||||
192
src/components/AttachmentUpload.vue
Normal file
192
src/components/AttachmentUpload.vue
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
<template>
|
||||||
|
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="label" prop="attachment">
|
||||||
|
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
|
||||||
|
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 18px">
|
||||||
|
{{ singleFile?.originalFileName }}
|
||||||
|
</el-button>
|
||||||
|
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
||||||
|
<file-upload @getFile="getAttachment" :showFileList="showFileList" :maxSize="0" @delete="deleteAttachment"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="其他文件">
|
||||||
|
<el-card style="width: 100%">
|
||||||
|
<file-upload @getFile="getOtherFile"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="allFileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import FileUpload from '@/components/FileUpload.vue'
|
||||||
|
import {deleteFile, downloadFile} from "../api/project-demand";
|
||||||
|
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||||
|
|
||||||
|
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||||
|
const formData = ref({})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'oper',
|
||||||
|
// label: '操作',
|
||||||
|
// align: 'center',
|
||||||
|
// showOverflowTooltip: false,
|
||||||
|
// currentRender: ({row, index}) => {
|
||||||
|
// return (
|
||||||
|
// <div>
|
||||||
|
// <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
||||||
|
// </div>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const rules = reactive({
|
||||||
|
attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}],
|
||||||
|
})
|
||||||
|
const applyForm = ref()
|
||||||
|
const singleFile = ref()
|
||||||
|
const allFileList = ref([])
|
||||||
|
const props = defineProps({
|
||||||
|
showFileList: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}, label: {
|
||||||
|
type: String,
|
||||||
|
default: '项目附件'
|
||||||
|
}, showTable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}, preview: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}, otherFileList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}, formData: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(() => props.showTable, (newVal) => {
|
||||||
|
props.showTable = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
watch(() => props.otherFileList, (newVal) => {
|
||||||
|
newVal.forEach(item => {
|
||||||
|
allFileList.value.push(item)
|
||||||
|
})
|
||||||
|
}, {deep: true})
|
||||||
|
watch(() => props.formData.fileList, (newVal) => {
|
||||||
|
if (props.preview) {
|
||||||
|
newVal.forEach(item => {
|
||||||
|
allFileList.value.push(item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, {deep: true})
|
||||||
|
watch(() => props.formData.singleFile, (newVal) => {
|
||||||
|
// singleFile.value = {}
|
||||||
|
singleFile.value = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
emit('getAttachment', val)
|
||||||
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
emit('getOtherFile', val)
|
||||||
|
}
|
||||||
|
const deleteAttachment = (val) => {
|
||||||
|
deleteFile(val).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const deleteOtherFile = (row, type) => {
|
||||||
|
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteFile(row.fileId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
if (type === 1) {
|
||||||
|
singleFile.value = {}
|
||||||
|
} else {
|
||||||
|
props.otherFileList.splice(props.otherFileList.findIndex((item) => item.id === row.fileId), 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: "用户取消删除! ",
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
validate() {
|
||||||
|
return applyForm.value.validate()
|
||||||
|
},
|
||||||
|
clearValidate() {
|
||||||
|
return applyForm.value.clearValidate()
|
||||||
|
},
|
||||||
|
allFileList,
|
||||||
|
singleFile
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
193
src/components/DetailComponent/ApprovalDetail.vue
Normal file
193
src/components/DetailComponent/ApprovalDetail.vue
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading">
|
||||||
|
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||||
|
<!-- <AttachmentUpload></AttachmentUpload> -->
|
||||||
|
<el-form :model="formData" label-width="auto">
|
||||||
|
<el-form-item label="其他文件">
|
||||||
|
<el-table :data="formData.fileList" style="width: 100%">
|
||||||
|
<el-table-column label="序号" type="index" width="80"></el-table-column>
|
||||||
|
<el-table-column label="文件名称" prop="originalFileName"></el-table-column>
|
||||||
|
<el-table-column label="标签" prop="tag"></el-table-column>
|
||||||
|
<el-table-column label="文件大小" prop="size">
|
||||||
|
<template #default="{row}">
|
||||||
|
{{ parseInt(row.size / 1024) + 'KB' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
|
<div class="process">
|
||||||
|
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||||
|
:state="data.state"/>
|
||||||
|
<process-diagram-viewer v-if="processViewer" :id-name="type"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import { computed, markRaw, reactive, ref, watchEffect } from 'vue';
|
||||||
|
import AttachmentUpload from '../AttachmentUpload.vue';
|
||||||
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
import Opinion from './Opinion.vue';
|
||||||
|
import fvTable from '@/fvcomponents/fvTable/index.vue'
|
||||||
|
import { ElLoading } from 'element-plus';
|
||||||
|
import {deleteFile, downloadFile} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
processViewer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
companyOption: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
|
||||||
|
// approval 立项, execute 实施, 归档 archivist
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'approval'
|
||||||
|
}, loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(() => props.loading, (newVal) => {
|
||||||
|
props.loading = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
const form = ref()
|
||||||
|
|
||||||
|
const localData = reactive({
|
||||||
|
fileList: props.formData.fileList,
|
||||||
|
singleFile: props.formData.singleFile
|
||||||
|
})
|
||||||
|
|
||||||
|
const schema = computed(()=>{
|
||||||
|
let arr
|
||||||
|
|
||||||
|
if(props.type == 'approval') {
|
||||||
|
arr = [
|
||||||
|
{
|
||||||
|
label: '前置流程',
|
||||||
|
prop: 'preProcess',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目立项附件',
|
||||||
|
prop: 'singleFile',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
component: ()=>(
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
props.formData.singleFile?.originalFileName ?
|
||||||
|
<span
|
||||||
|
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||||
|
onClick={()=>handleDownload(props.formData.singleFile)}
|
||||||
|
>
|
||||||
|
{props.formData.singleFile?.originalFileName}
|
||||||
|
</span> :
|
||||||
|
<span>{'--'}</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
},
|
||||||
|
]
|
||||||
|
} else if(props.type == 'execute') {
|
||||||
|
arr = [
|
||||||
|
{
|
||||||
|
label: '前置流程',
|
||||||
|
prop: 'preProcess',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目验收附件',
|
||||||
|
prop: 'singleFile',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
component: ()=>(
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
props.formData.singleFile?.originalFileName ?
|
||||||
|
<span
|
||||||
|
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||||
|
onClick={()=>handleDownload(props.formData.singleFile)}
|
||||||
|
>
|
||||||
|
{props.formData.singleFile?.originalFileName}
|
||||||
|
</span> :
|
||||||
|
<span>{'--'}</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
},
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
arr = [
|
||||||
|
{
|
||||||
|
label: '项目归档附件',
|
||||||
|
prop: 'singleFile',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
component: ()=>(
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
props.formData.singleFile?.originalFileName ?
|
||||||
|
<span
|
||||||
|
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||||
|
onClick={()=>handleDownload(props.formData.singleFile)}
|
||||||
|
>
|
||||||
|
{props.formData.singleFile?.originalFileName}
|
||||||
|
</span> :
|
||||||
|
<span>{'--'}</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watchEffect(()=>{
|
||||||
|
Object.keys(props.formData).length && (form.value.setValues(props.formData))
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
178
src/components/DetailComponent/CollectionDetail.vue
Normal file
178
src/components/DetailComponent/CollectionDetail.vue
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading">
|
||||||
|
<el-form :model="formData" ref="form" label-width="auto">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称">
|
||||||
|
<span>{{ formData.requirementName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属公司">
|
||||||
|
<span>{{ formData.companyIds }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="征集类型">
|
||||||
|
<span>{{ formData.collectType }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="截止时间">
|
||||||
|
<span>{{ formData.deadline }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item>
|
||||||
|
<el-card style="width: 100%">
|
||||||
|
<div v-html="formData.collectExplain">
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<baseTitle title="附件列表"></baseTitle>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item>
|
||||||
|
<fvTable style="width: 100%;max-height: 200px" v-if="processViewer" :tableConfig="tableConfig"
|
||||||
|
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div v-if="formData.taskId">
|
||||||
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
|
<el-form-item prop="auditOpinion">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.auditOpinion"
|
||||||
|
:rows="3"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核意见"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
|
<div class="process">
|
||||||
|
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||||
|
:state="data.state"/>
|
||||||
|
<process-diagram-viewer v-if="processViewer" id-name="collectionProcess"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
|
import {matterTree} from '@/utils/matterTree.js';
|
||||||
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const emit = defineEmits(['getInfo',"update:formData"])
|
||||||
|
const form = ref()
|
||||||
|
const showTable = ref(false)
|
||||||
|
const companyNameArray = ref([])
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
formData: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
processViewer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
companyOption: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}, loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getDataSourceOptionItem = (val) => {
|
||||||
|
if (val instanceof Array) {
|
||||||
|
val.forEach(item => {
|
||||||
|
matterTree(companyNameArray.value, props.companyOption, item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let uniqueArr = Array.from(new Set(companyNameArray.value));
|
||||||
|
return uniqueArr.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => props.loading, (newVal) => {
|
||||||
|
props.loading = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
|
||||||
|
watch(() => props.companyOption, (newVal) => {
|
||||||
|
props.companyOption = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
watch(() => props.formData, (newVal) => {
|
||||||
|
if(newVal!=null){
|
||||||
|
props.formData.companyIds = getDataSourceOptionItem(newVal.companyIds)
|
||||||
|
}
|
||||||
|
}, {deep: true})
|
||||||
|
watch(() => props.processViewer, (newVal) => {
|
||||||
|
props.processViewer = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
108
src/components/DetailComponent/Opinion.vue
Normal file
108
src/components/DetailComponent/Opinion.vue
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
<template>
|
||||||
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
|
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from 'element-plus';
|
||||||
|
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const props = defineProps({
|
||||||
|
taskId: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const form = ref()
|
||||||
|
const schema = computed(() => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
prop: 'auditOpinion',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入审核意见',
|
||||||
|
type: 'textarea',
|
||||||
|
maxlength: 140
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const back = () => {
|
||||||
|
switch (route.name) {
|
||||||
|
case 'Initiation/detail':
|
||||||
|
router.push({name: 'Initiation'})
|
||||||
|
break;
|
||||||
|
case 'Filing/detail':
|
||||||
|
router.push({name: 'Filing'})
|
||||||
|
break;
|
||||||
|
case 'Implementation/detail':
|
||||||
|
router.push({name: 'Implementation'})
|
||||||
|
break;
|
||||||
|
case 'Summary/detail':
|
||||||
|
router.push({name: 'Summary'})
|
||||||
|
break;
|
||||||
|
case 'Requirement/detail':
|
||||||
|
router.push({name: 'Requirement'})
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 驳回
|
||||||
|
const handleReject = async () => {
|
||||||
|
const values = form.value.getValues()
|
||||||
|
if (!values.auditOpinion) {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请填写审核意见',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log('values', values)
|
||||||
|
const params = {
|
||||||
|
taskId: props.taskId,
|
||||||
|
...values
|
||||||
|
}
|
||||||
|
const res = await rejectTask(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
back()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAgree = async () => {
|
||||||
|
const values = form.value.getValues()
|
||||||
|
const params = {
|
||||||
|
taskId: props.taskId,
|
||||||
|
formData: props.formData,
|
||||||
|
...values
|
||||||
|
}
|
||||||
|
const res = await agreeTask(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
back()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
322
src/components/DetailComponent/SummaryDetail.vue
Normal file
322
src/components/DetailComponent/SummaryDetail.vue
Normal file
@@ -0,0 +1,322 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block" v-loading="loading">
|
||||||
|
<el-form :model="localFormData" ref="summaryForm" :rules="rules">
|
||||||
|
<el-row gutter="50">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称" prop="projectName">
|
||||||
|
<span>{{ localFormData.projectName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="专项资金" prop="specialFund">
|
||||||
|
<span>{{ localFormData.specialFund }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
|
<span>{{ localFormData.startTime }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="结束时间" prop="endTime">
|
||||||
|
<span>{{ formData.endTime }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属公司" prop="affiliatedCompanyId">
|
||||||
|
<span>{{ localFormData.affiliatedCompanyId }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目类型" prop="projectType">
|
||||||
|
<span>{{ localFormData.projectType }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="研发主体" prop="rdSubject">
|
||||||
|
<span>{{ localFormData.rdSubject }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出资类型" prop="investmentType">
|
||||||
|
<span>{{ localFormData.investmentType }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目影响" prop="projectImpact">
|
||||||
|
<span>{{ localFormData.projectImpact }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||||
|
<span>{{ localFormData.businessSegment }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="预期成果形式" prop="resultForm">
|
||||||
|
<span>{{ localFormData.resultForm }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||||
|
<span>{{ localFormData.technicalStandard }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||||
|
<span>{{ localFormData.industryUniversityResearch }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||||
|
<span>{{ localFormData.governmentDeclaration }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||||
|
<span>{{ localFormData.intellectualProperty }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||||
|
<span>{{ localFormData.inventionPatent }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="实用性新型专利(项)" prop="newPatent">
|
||||||
|
<span>{{ localFormData.newPatent }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||||
|
<span>{{ localFormData.softwareCopyright }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="著作权(项)" prop="copyright">
|
||||||
|
<span>{{ localFormData.copyright }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="其他(项)" prop="other">
|
||||||
|
<span>{{ localFormData.other }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="经济概算(万元)" prop="economicEstimate">
|
||||||
|
<span>{{ localFormData.economicEstimate }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="其中申请公司总部科技创新专项资金(万元)" prop="specialFundAmount">
|
||||||
|
<span>{{ localFormData.specialFundAmount }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||||
|
<span>{{ localFormData.serviceDescription }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||||
|
<span>{{ localFormData.contentDescription }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求上报申请书">
|
||||||
|
<el-button type="primary" link @click="handleDownload(localFormData.singleFile)">
|
||||||
|
{{ localFormData.singleFile?.originalFileName }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求上报附件">
|
||||||
|
<fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig"
|
||||||
|
:data="localFormData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div v-if="data.taskId">
|
||||||
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
|
<el-form-item prop="auditOpinion">
|
||||||
|
<el-input
|
||||||
|
v-model="localFormData.auditOpinion"
|
||||||
|
:rows="3"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核意见"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
|
<div class="process">
|
||||||
|
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||||
|
:state="data.state"/>
|
||||||
|
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
|
||||||
|
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
|
||||||
|
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
|
import {ElMessage, ElNotification} from "element-plus";
|
||||||
|
import {agreeTask, rejectTask} from "@/api/project-demand";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const props = defineProps({
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
processViewer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}, loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const localFormData = ref({})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const router = useRouter()
|
||||||
|
const summaryForm = ref()
|
||||||
|
const rules = reactive({
|
||||||
|
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const handleReject = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
let approve = {
|
||||||
|
taskId: props.data.taskId,
|
||||||
|
auditOpinion: localFormData.value.auditOpinion,
|
||||||
|
}
|
||||||
|
rejectTask(approve).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Summary'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleAgree = () => {
|
||||||
|
let approve = {
|
||||||
|
taskId: props.data.taskId,
|
||||||
|
auditOpinion: localFormData.value.auditOpinion,
|
||||||
|
formData: localFormData.value
|
||||||
|
}
|
||||||
|
agreeTask(approve).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Summary'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.formData,
|
||||||
|
(val) => {
|
||||||
|
}
|
||||||
|
)
|
||||||
|
watch(() => props.processViewer, (newVal) => {
|
||||||
|
props.processViewer = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
watch(() => props.loading, (newVal) => {
|
||||||
|
props.loading = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
:deep(.el-table--fit) {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-block {
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -6,17 +6,20 @@
|
|||||||
with-credentials
|
with-credentials
|
||||||
:multiple="maxSize > 0"
|
:multiple="maxSize > 0"
|
||||||
:data="uploadParams"
|
:data="uploadParams"
|
||||||
:show-file-list="false"
|
:show-file-list="showFileList"
|
||||||
:auto-upload="true"
|
:auto-upload="true"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:on-success="handleUploadSuccess"
|
:on-success="handleUploadSuccess"
|
||||||
|
:on-error="uploadError"
|
||||||
|
:before-remove="beforeRemove"
|
||||||
|
:on-remove="handleRemove"
|
||||||
>
|
>
|
||||||
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage,ElMessageBox} from "element-plus";
|
||||||
import {getToken} from '@/utils/auth'
|
import {getToken} from '@/utils/auth'
|
||||||
const baseURL = import.meta.env.VITE_BASE_URL
|
const baseURL = import.meta.env.VITE_BASE_URL
|
||||||
const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
||||||
@@ -37,10 +40,14 @@ const props = defineProps({
|
|||||||
maxSize: {
|
maxSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30
|
default: 30
|
||||||
|
},
|
||||||
|
showFileList: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(["input", "getFile"])
|
const emit = defineEmits(["input", "getFile","delete"])
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const _value = computed({
|
const _value = computed({
|
||||||
get() {
|
get() {
|
||||||
@@ -50,7 +57,17 @@ const _value = computed({
|
|||||||
emit("input", val);
|
emit("input", val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const beforeRemove = (file, fileList) => {
|
||||||
|
return ElMessageBox.confirm(`确认删除名称为${file.name}的文件吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => true)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRemove = (file, fileList) => {
|
||||||
|
emit("delete",file.response.data.id)
|
||||||
|
}
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = (file) => {
|
||||||
// const FileExt = file.name.replace(/.+\./, "");
|
// const FileExt = file.name.replace(/.+\./, "");
|
||||||
// if (['zip', 'rar', 'pdf', 'doc', 'docx', 'xlsx'].indexOf(FileExt.toLowerCase()) === -1) {
|
// if (['zip', 'rar', 'pdf', 'doc', 'docx', 'xlsx'].indexOf(FileExt.toLowerCase()) === -1) {
|
||||||
@@ -75,7 +92,11 @@ const handleUploadSuccess = (res, file) => {
|
|||||||
showTable.value = true
|
showTable.value = true
|
||||||
let data = res.data
|
let data = res.data
|
||||||
fileList.value.push(data)
|
fileList.value.push(data)
|
||||||
emit("getFile", fileList.value)
|
emit("getFile", res.data)
|
||||||
|
}
|
||||||
|
const uploadError=(err)=>{
|
||||||
|
loading.value = false
|
||||||
|
ElMessage.error("上传失败,请稍后再试!")
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -85,4 +106,7 @@ a {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #2a99ff;
|
color: #2a99ff;
|
||||||
}
|
}
|
||||||
|
:deep(.el-upload-list) {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
126
src/components/NameCircle.vue
Normal file
126
src/components/NameCircle.vue
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<slot name="pre"></slot>
|
||||||
|
<div class="user-audit">
|
||||||
|
<div class="circle-user">
|
||||||
|
<Tooltip :content="user.name" placement="bottom-start" width="45"/>
|
||||||
|
<div v-if="user.icon"
|
||||||
|
class="el-timeline-item__node" :style="{
|
||||||
|
backgroundColor: user.color
|
||||||
|
}">
|
||||||
|
<el-icon v-if="user.icon" size="15" :class="user.class">
|
||||||
|
<component :is="user.icon"/>
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="username" v-if="user.auditOpinion">
|
||||||
|
<div style="margin-bottom: 10px;color: #909399">{{user.operationTime}}</div>
|
||||||
|
<Tooltip :content="user.auditOpinion" placement="bottom-start" width="140" :lines="true"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {Loading, Close, CircleCheckFilled, MoreFilled} from '@element-plus/icons-vue'
|
||||||
|
import {defineProps} from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
row: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
hoverTip: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
user: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
mode: {
|
||||||
|
type: String,
|
||||||
|
default: 'design'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const init = () => {
|
||||||
|
// for (let user of props.userInfo) {
|
||||||
|
initUser(props.user)
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
const initUser = (user) => {
|
||||||
|
let state = user.state
|
||||||
|
//创建节点
|
||||||
|
if (state === 'CREATE') {
|
||||||
|
user["icon"] = CircleCheckFilled
|
||||||
|
user["color"] = "#0bbd87"
|
||||||
|
}
|
||||||
|
//审批通过
|
||||||
|
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
||||||
|
user["icon"] = CircleCheckFilled
|
||||||
|
user["color"] = "#0bbd87"
|
||||||
|
}
|
||||||
|
//审批处理中
|
||||||
|
if (state === 'RUNNING') {
|
||||||
|
user["icon"] = Loading
|
||||||
|
user["color"] = "#f78f5f"
|
||||||
|
user["class"] = 'is-loading'
|
||||||
|
}
|
||||||
|
//拒绝后评论
|
||||||
|
if (state === 'REFUSE') {
|
||||||
|
user["icon"] = Close
|
||||||
|
user["color"] = "#f56c6c"
|
||||||
|
}
|
||||||
|
if (state === 'PASS') {
|
||||||
|
user["icon"] = MoreFilled
|
||||||
|
user["color"] = "#c0c4cc"
|
||||||
|
}
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
init()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.user-audit {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.circle-user {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid #ACACAC;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.el-timeline-item__node {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.username {
|
||||||
|
//width: 90px;
|
||||||
|
margin-top: 10px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
|
.el-tooltip__trigger {
|
||||||
|
width: 90px;
|
||||||
|
text-align: center;
|
||||||
|
//padding-top: 2px;
|
||||||
|
//text-align: center;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :type="btnType" size="mini" v-perm="perm" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain">
|
<el-button v-perm="perm" :type="btnType" size="mini" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain" :link="link">
|
||||||
{{ btnText }}
|
{{ btnText }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -24,12 +24,16 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
btnType: {
|
btnType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'text'
|
default: 'danger'
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
link: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
btnIcon: {
|
btnIcon: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
@@ -61,6 +65,7 @@ const handleCancel = () => {
|
|||||||
visible.value = false
|
visible.value = false
|
||||||
}
|
}
|
||||||
const handleDelete = () => {
|
const handleDelete = () => {
|
||||||
|
console.log('确认')
|
||||||
emit("delete")
|
emit("delete")
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
49
src/components/Tooltip.vue
Normal file
49
src/components/Tooltip.vue
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<el-tooltip
|
||||||
|
effect="dark"
|
||||||
|
:content="props.content"
|
||||||
|
placement="bottom-start"
|
||||||
|
:disabled="isShow"
|
||||||
|
>
|
||||||
|
<div :class="lines?'content-lines':'content'" :style="{width: props.width+'px'}" @mouseover="isShowTooltip">
|
||||||
|
<span ref="contentRef">
|
||||||
|
<slot name="content">{{ props.content }}</slot>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
content: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}, width: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}, lines: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const contentRef = ref()
|
||||||
|
const isShow = ref(false)
|
||||||
|
const isShowTooltip = () => {
|
||||||
|
isShow.value = props.width > contentRef.value.offsetWidth;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.content {
|
||||||
|
width: 45px;
|
||||||
|
text-align: center;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.content-lines{
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
15
src/components/steps/api/index.js
Normal file
15
src/components/steps/api/index.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export const getBaseInfoApi = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/details/info/'+projectId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getMapProjectStateInfo = (projectId, state) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/details/${projectId}/${state}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
256
src/components/steps/index.vue
Normal file
256
src/components/steps/index.vue
Normal file
@@ -0,0 +1,256 @@
|
|||||||
|
<template>
|
||||||
|
<baseTitle title="基础信息"></baseTitle>
|
||||||
|
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||||
|
<baseTitle title="各流程信息"></baseTitle>
|
||||||
|
<div class="steps-box">
|
||||||
|
<el-steps :active="localActive" finish-status="success">
|
||||||
|
<el-step
|
||||||
|
v-for="(item, index) in localSteps"
|
||||||
|
:key="item.key"
|
||||||
|
:title="item.title"
|
||||||
|
:class="stepClass(index)"
|
||||||
|
@click="handleStep(item.key, index)"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-steps>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 步骤内容 -->
|
||||||
|
<div>
|
||||||
|
<slot name="content" :localActive="localActive"></slot>
|
||||||
|
<!-- <template v-for="(item, index) in stepList" :key="item.key">
|
||||||
|
<component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
|
||||||
|
</template> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import { ElLoading, ElNotification } from 'element-plus';
|
||||||
|
import { computed, reactive, ref, watchEffect } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
import { getBaseInfoApi } from './api';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 步骤对应内容list
|
||||||
|
stepList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
// 当前显示步骤
|
||||||
|
active: {
|
||||||
|
type: Number,
|
||||||
|
default: '0'
|
||||||
|
},
|
||||||
|
// 已完成的工作流步骤
|
||||||
|
stepSuccess: {
|
||||||
|
type: Array,
|
||||||
|
default: ['00']
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
const emits = defineEmits(['stepChange', 'setDetail'])
|
||||||
|
|
||||||
|
const localData = reactive({
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
const localActive = ref(0) // 当前激活步骤
|
||||||
|
|
||||||
|
const localSteps = ref([
|
||||||
|
{
|
||||||
|
title: '需求征集',
|
||||||
|
key: 'collect',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '需求上报',
|
||||||
|
key: 'report',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目立项',
|
||||||
|
key: 'approve',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目实施',
|
||||||
|
key: 'execute',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目归档',
|
||||||
|
key: 'archivist',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '项目结项',
|
||||||
|
// key: 'end',
|
||||||
|
// },
|
||||||
|
])
|
||||||
|
|
||||||
|
const baseForm = ref()
|
||||||
|
|
||||||
|
const schema = computed(()=>{
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '所属公司',
|
||||||
|
prop: 'affiliatedCompany',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
// component:
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '征集类型',
|
||||||
|
prop: 'collectType',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
// component:
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '截止时间',
|
||||||
|
prop: 'deadline',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
// component:
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '需求名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
// component:
|
||||||
|
},
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const localStepSuccess = ref([])
|
||||||
|
|
||||||
|
// 格式化详情步骤条
|
||||||
|
const formatProcedure = (data) => {
|
||||||
|
let arr = []
|
||||||
|
if(data instanceof Array) {
|
||||||
|
data.forEach(item=>{
|
||||||
|
switch (item) {
|
||||||
|
case '00': arr.push(0)
|
||||||
|
break
|
||||||
|
case '10': arr.push(1)
|
||||||
|
break
|
||||||
|
case '20': arr.push(2)
|
||||||
|
break
|
||||||
|
// case '30': arr.push(3)
|
||||||
|
// break
|
||||||
|
case '40': arr.push(3)
|
||||||
|
break
|
||||||
|
case '50': arr.push(4)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
// 反向格式化
|
||||||
|
const formatReProcedure = (data) => {
|
||||||
|
let arr = []
|
||||||
|
if(data instanceof Array) {
|
||||||
|
data.forEach(item=>{
|
||||||
|
switch (item) {
|
||||||
|
case 0: arr.push('00')
|
||||||
|
break
|
||||||
|
case 1: arr.push('10')
|
||||||
|
break
|
||||||
|
case 2: arr.push('20')
|
||||||
|
break
|
||||||
|
// case 3: arr.push('30')
|
||||||
|
// break
|
||||||
|
case 3: arr.push('40')
|
||||||
|
break
|
||||||
|
case 4: arr.push('50')
|
||||||
|
break
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatActive = (val) => {
|
||||||
|
let active = ''
|
||||||
|
val == 0 && (active = '00')
|
||||||
|
val == 1 && (active = '10')
|
||||||
|
val == 2 && (active = '20')
|
||||||
|
// val == 3 && (active = '30')
|
||||||
|
val == 3 && (active = '40')
|
||||||
|
val == 4 && (active = '50')
|
||||||
|
return active
|
||||||
|
}
|
||||||
|
|
||||||
|
const stepClass = (val) => {
|
||||||
|
if (localStepSuccess.value.includes(val)) {
|
||||||
|
return 'step-success'
|
||||||
|
}
|
||||||
|
return 'step-error'
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleStep = (key, index) => {
|
||||||
|
if (localStepSuccess.value.includes(index)) {
|
||||||
|
let active = ''
|
||||||
|
localActive.value = index
|
||||||
|
switch(index) {
|
||||||
|
case 0: active = '00'
|
||||||
|
break
|
||||||
|
case 1: active = '10'
|
||||||
|
break
|
||||||
|
case 2: active = '20'
|
||||||
|
break
|
||||||
|
// case 3: active = '30'
|
||||||
|
// break
|
||||||
|
case 3: active = '40'
|
||||||
|
break
|
||||||
|
case 4: active = '50'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
emits('stepChange', { key, active })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '不能查看未完成的工作流信息',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getBaseInfo = async () => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
try {
|
||||||
|
const { code, data } = await getBaseInfoApi(route.query.projectId)
|
||||||
|
localStepSuccess.value = formatProcedure(data.procedure)
|
||||||
|
baseForm.value.setValues(data)
|
||||||
|
console.log(formatActive(localActive.value), 'formatActive(localActive.value)');
|
||||||
|
emits('setDetail', formatActive(localActive.value))
|
||||||
|
loading.close()
|
||||||
|
} catch {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getBaseInfo()
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
console.log(props.active, 'props.active');
|
||||||
|
localActive.value = props.active
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.steps-box {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-success {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-error {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -8,7 +8,7 @@ export const hasPerm = (el, binding, vnode) => {
|
|||||||
if (value && value instanceof Array && value.length > 0) {
|
if (value && value instanceof Array && value.length > 0) {
|
||||||
const permissiosFlag = value
|
const permissiosFlag = value
|
||||||
const hasPermission = permisstions.some(permission => {
|
const hasPermission = permisstions.some(permission => {
|
||||||
return permissiosFlag[0] === allPermission || permissiosFlag[0] === permission
|
return permission === allPermission || permissiosFlag.includes(permission) || permissiosFlag.includes(allPermission)
|
||||||
})
|
})
|
||||||
if (!hasPermission) {
|
if (!hasPermission) {
|
||||||
el.parentNode && el.parentNode.removeChild(el)
|
el.parentNode && el.parentNode.removeChild(el)
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
<!-- 表格头部按钮 -->
|
<!-- 表格头部按钮 -->
|
||||||
<div class="fv-table-btn" v-if="tableConfig.btns">
|
<div class="fv-table-btn" v-if="tableConfig.btns">
|
||||||
<div class="table-head-btn">
|
<div class="table-head-btn">
|
||||||
<el-button
|
<el-button
|
||||||
v-for="btn in tableConfig.btns"
|
v-for="btn in tableConfig.btns"
|
||||||
:key="btn.key"
|
:key="btn.key"
|
||||||
:type="btn.type || ''"
|
:type="btn.type || ''"
|
||||||
|
:color="btn.color || ''"
|
||||||
v-perm="btn.auth || ['*:*:*']"
|
v-perm="btn.auth || ['*:*:*']"
|
||||||
@click="handleClickBtns(btn.key)"
|
@click="handleClickBtns(btn.key)"
|
||||||
>
|
>
|
||||||
@@ -20,9 +21,9 @@
|
|||||||
<el-icon size="18"><Setting /></el-icon>
|
<el-icon size="18"><Setting /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
:width="200"
|
:width="200"
|
||||||
ref="popoverRef"
|
ref="popoverRef"
|
||||||
:virtual-ref="buttonRef"
|
:virtual-ref="buttonRef"
|
||||||
virtual-triggering
|
virtual-triggering
|
||||||
@@ -33,10 +34,10 @@
|
|||||||
<div class="col-setting-list">
|
<div class="col-setting-list">
|
||||||
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
|
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
|
||||||
<el-space direction="vertical" alignment="flex-start" :size="0">
|
<el-space direction="vertical" alignment="flex-start" :size="0">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-for="item in tableConfig.columns"
|
v-for="item in tableConfig.columns"
|
||||||
:key="item.prop"
|
:key="item.prop"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.prop"
|
:value="item.prop"
|
||||||
/>
|
/>
|
||||||
</el-space>
|
</el-space>
|
||||||
@@ -290,4 +291,9 @@ onMounted(() => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
}
|
}
|
||||||
|
.fv-table {
|
||||||
|
:deep(.el-tooltip) {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import {useRoute, useRouter} from 'vue-router';
|
||||||
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
watch(route, ()=> {
|
watch(route, () => {
|
||||||
getBreadcrumb()
|
getBreadcrumb()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ const breadcrumbList = ref([])
|
|||||||
const getBreadcrumb = () => {
|
const getBreadcrumb = () => {
|
||||||
let matched = route.matched.filter(item => item.meta && item.meta.title)
|
let matched = route.matched.filter(item => item.meta && item.meta.title)
|
||||||
const first = matched[0]
|
const first = matched[0]
|
||||||
if(!isDashboard(first)) {
|
if (!isDashboard(first)) {
|
||||||
matched = [{path: '/home', meta: {title: '首页'}}].concat(matched)
|
matched = [{path: '/home', meta: {title: '首页'}}].concat(matched)
|
||||||
}
|
}
|
||||||
breadcrumbList.value.length = 0;
|
breadcrumbList.value.length = 0;
|
||||||
@@ -39,7 +39,7 @@ const getBreadcrumb = () => {
|
|||||||
|
|
||||||
const isDashboard = (meta) => {
|
const isDashboard = (meta) => {
|
||||||
const name = meta && meta.name
|
const name = meta && meta.name
|
||||||
if(!name) {
|
if (!name) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return name.trim().toLocaleLowerCase() === 'Home'.toLocaleLowerCase()
|
return name.trim().toLocaleLowerCase() === 'Home'.toLocaleLowerCase()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Hamburger></Hamburger>
|
<Hamburger></Hamburger>
|
||||||
<Breadcrumb></Breadcrumb>
|
<Breadcrumb></Breadcrumb>
|
||||||
<div class="right-bar">
|
<div class="right-bar">
|
||||||
<bell-socket/>
|
<!-- <bell-socket/>-->
|
||||||
<div class="user-box">
|
<div class="user-box">
|
||||||
<div>
|
<div>
|
||||||
<!-- <img :src="userInfo.avatar" alt="" @click.stop="handleVisitedP">-->
|
<!-- <img :src="userInfo.avatar" alt="" @click.stop="handleVisitedP">-->
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 有子菜单 -->
|
<!-- 有子菜单 -->
|
||||||
<template v-for="item in menuItem" :key="item.path">
|
<template v-for="item in menuItem" :key="item.path">
|
||||||
<el-sub-menu v-if="item?.children?.length>0 && !item.hidden" :index="item.path">
|
<el-sub-menu v-if="checkMenuItem(item)" :index="item.path">
|
||||||
<template #title>
|
<template #title>
|
||||||
<svg-icon :name="item.icon"/>
|
<svg-icon :name="item.icon"/>
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ item.title }}</span>
|
||||||
@@ -44,5 +44,19 @@ const handleGo = (path) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkMenuItem = (item) => {
|
||||||
|
let children = item.children
|
||||||
|
let childState = false;
|
||||||
|
if (children){
|
||||||
|
for (let child of children) {
|
||||||
|
if (!child.hidden) {
|
||||||
|
childState = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return item?.children?.length>0 && !item.hidden && childState
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="logo" ref="logo">
|
<div class="logo" ref="logo">
|
||||||
<span v-if="!siderbarStore.isCollapse">科研管理平台</span>
|
<!-- <span v-if="!siderbarStore.isCollapse">科研管理平台</span>-->
|
||||||
|
<span v-if="!siderbarStore.isCollapse"></span>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar :height="`calc(100vh - ${logoHeight}px)`" style="background-color: #ffffff">
|
<el-scrollbar :height="`calc(100vh - ${logoHeight}px)`" style="background-color: #ffffff">
|
||||||
<el-menu
|
<el-menu
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { defineAsyncComponent, ref } from "vue";
|
import { defineAsyncComponent, ref, toRaw } from "vue";
|
||||||
import { getRouters } from "@/api/system/menu";
|
import { getRouters } from "@/api/system/menu";
|
||||||
import Layout from '@/layout/index.vue'
|
import Layout from '@/layout/index.vue'
|
||||||
import ParentView from '@/components/ParentView.vue'
|
import ParentView from '@/components/ParentView.vue'
|
||||||
@@ -21,6 +21,8 @@ export const usePermisstionStroe = defineStore('permisstion', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
// 二级页面路由list
|
||||||
|
const slRouters = ref([])
|
||||||
|
|
||||||
const setIsLoadRoutes = (status) => {
|
const setIsLoadRoutes = (status) => {
|
||||||
return isLoadRoutes.value = status
|
return isLoadRoutes.value = status
|
||||||
@@ -30,7 +32,9 @@ export const usePermisstionStroe = defineStore('permisstion', () => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
const sRouter = JSON.parse(JSON.stringify(res.data))
|
const sRouter = JSON.parse(JSON.stringify(res.data))
|
||||||
const mData = JSON.parse(JSON.stringify(res.data))
|
const mData = JSON.parse(JSON.stringify(res.data))
|
||||||
asyncRouters.value = formatAsyncRouters(sRouter)
|
console.log(JSON.parse(JSON.stringify(sRouter)), 'sRouter');
|
||||||
|
const firstFormat = setRouterLevel(JSON.parse(JSON.stringify(sRouter)))
|
||||||
|
asyncRouters.value = formatAsyncRouters(JSON.parse(JSON.stringify(firstFormat)))
|
||||||
menuList.value = [...menuList.value, ...generateMenu(mData)]
|
menuList.value = [...menuList.value, ...generateMenu(mData)]
|
||||||
addAsyncRouters(asyncRouters.value)
|
addAsyncRouters(asyncRouters.value)
|
||||||
isLoadRoutes.value = false
|
isLoadRoutes.value = false
|
||||||
@@ -41,6 +45,23 @@ export const usePermisstionStroe = defineStore('permisstion', () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setRouterLevel = (routers) => {
|
||||||
|
return routers.filter(item=>{
|
||||||
|
if(item.component === 'Layout') {
|
||||||
|
if(item.children) {
|
||||||
|
item.children.forEach(v=>{
|
||||||
|
if(v.children) {
|
||||||
|
slRouters.value = [...toRaw(slRouters.value), ...v.children]
|
||||||
|
delete v.children
|
||||||
|
}
|
||||||
|
})
|
||||||
|
item.children = [...item.children, ...toRaw(slRouters.value)]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const formatAsyncRouters = (routers) => {
|
const formatAsyncRouters = (routers) => {
|
||||||
return routers.filter(route => {
|
return routers.filter(route => {
|
||||||
if (route.component) {
|
if (route.component) {
|
||||||
@@ -48,8 +69,7 @@ export const usePermisstionStroe = defineStore('permisstion', () => {
|
|||||||
route.component = Layout
|
route.component = Layout
|
||||||
} else if (route.component === 'ParentView') {
|
} else if (route.component === 'ParentView') {
|
||||||
route.component = ParentView
|
route.component = ParentView
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
route.component = loadView(route.component)
|
route.component = loadView(route.component)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/utils/matterTree.js
Normal file
13
src/utils/matterTree.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
export const matterTree = (array,data, id) => {
|
||||||
|
if (id) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
if (data[i].value == id) {
|
||||||
|
array.push(data[i].label);
|
||||||
|
}
|
||||||
|
if (data[i].children && data[i].children.length > 0) {
|
||||||
|
matterTree(data[i].children)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -114,7 +114,13 @@ const tableConfig = reactive({
|
|||||||
label: '类型',
|
label: '类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'todo_type'} value={row.targetState}/>)
|
currentRender: ({row, index}) => {
|
||||||
|
if(row.targetState!==null){
|
||||||
|
return (<Tag dictType={'todo_type'} value={row.targetState}/>)
|
||||||
|
}else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'submitTime',
|
prop: 'submitTime',
|
||||||
@@ -150,14 +156,13 @@ const handleView = (row) => {
|
|||||||
console.log('row', row)
|
console.log('row', row)
|
||||||
if(row.targetState=='00'&&row.targetId){
|
if(row.targetState=='00'&&row.targetId){
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demanddetail',
|
name: 'Collection/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.targetId
|
id: row.targetId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="70px"
|
label-width="70px"
|
||||||
>
|
>
|
||||||
<h2>科研管理平台</h2>
|
<!-- <h2>科研管理平台</h2>-->
|
||||||
<el-form-item prop="username" label="账号">
|
<el-form-item prop="username" label="账号">
|
||||||
<el-input v-model="loginForm.username" :prefix-icon="User"></el-input>
|
<el-input v-model="loginForm.username" :prefix-icon="User"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
348
src/views/project-demand/collection/add.vue
Normal file
348
src/views/project-demand/collection/add.vue
Normal file
@@ -0,0 +1,348 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading" class="add-block">
|
||||||
|
<baseTitle title="需求征集信息录入"></baseTitle>
|
||||||
|
<el-form :model="formData" inline class="query-form" ref="demandForm" :rules="rules">
|
||||||
|
<div class="left-info">
|
||||||
|
<el-form-item v-if="checkFormPrem('requirementName')" label="名称" prop="requirementName">
|
||||||
|
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="checkFormPrem('companyIds')" label="所属公司" prop="companyIds">
|
||||||
|
<el-tree-select v-model="formData.companyIds" :data="companyOption" style="width: 100%;"
|
||||||
|
filterable clearable :check-strictly="true" multiple/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="checkFormPrem('collectType')" label="征集类型" prop="collectType">
|
||||||
|
<el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="checkFormPrem('deadline')" label="截止时间" prop="deadline">
|
||||||
|
<el-config-provider>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.deadline"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="截止时间"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
/>
|
||||||
|
</el-config-provider>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
|
<Tinymce v-if="checkFormPrem('collectExplain') && showTinymce" image-url="/notice/file" file-url="/notice/file"
|
||||||
|
v-model:value="formData.collectExplain" height="300" />
|
||||||
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
|
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 200px" v-if="showTable"
|
||||||
|
:tableConfig="tableConfig" :data="formData.fileList"
|
||||||
|
:isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="流程"></baseTitle>
|
||||||
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
|
<!-- <div class="process" id="approvalRecord">-->
|
||||||
|
<!-- <process-tree ref="processTree" mode="view" id-name="approvalRecord"/>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(demandForm)">提交</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||||
|
<el-button @click="handleBack">返回</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {
|
||||||
|
getWorkflowInfo,
|
||||||
|
addRequirement,
|
||||||
|
getFormInfo,
|
||||||
|
resubmit,
|
||||||
|
deleteFile,
|
||||||
|
downloadFile
|
||||||
|
} from "@/api/project-demand/index.js";
|
||||||
|
import FileUpload from "@/components/FileUpload.vue";
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||||
|
import {useRoute, useRouter} from 'vue-router'
|
||||||
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const authStore = useAuthStore()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const demandForm = ref()
|
||||||
|
const dateValue = ref()
|
||||||
|
const formData = ref({
|
||||||
|
requirementName: '',
|
||||||
|
companyIds: '',
|
||||||
|
collectType: '',
|
||||||
|
deadline: '',
|
||||||
|
collectExplain: '',
|
||||||
|
fileList: []
|
||||||
|
})
|
||||||
|
const showTinymce = ref(true)
|
||||||
|
const processDiagramViewer = ref(false)
|
||||||
|
const typeOption = ref([
|
||||||
|
{
|
||||||
|
label: "需求征集",
|
||||||
|
value: '需求征集'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const companyOption = ref([])
|
||||||
|
const form = ref(null)
|
||||||
|
const fileList = ref([])
|
||||||
|
const loading = ref(false)
|
||||||
|
const showTable = ref(true)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const formPermMap = ref(new Map());
|
||||||
|
const rules = reactive({
|
||||||
|
requirementName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||||
|
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||||
|
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||||
|
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
<el-button type="primary" size="large" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const checkFormPrem = (formKey) => {
|
||||||
|
if (formPermMap.value.hasOwnProperty(formKey)) {
|
||||||
|
let formItem = formPermMap.value[formKey];
|
||||||
|
return formItem.perm === 'EDIT'
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
let tag = ''
|
||||||
|
if (!formData.value.collectType && router.currentRoute.value.name === 'Collection/add') {
|
||||||
|
tag = '需求征集'
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
processNodeTag: null,
|
||||||
|
tag: tag,
|
||||||
|
userId: authStore.userinfo.userId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
console.log('上传文件', val)
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
formData.value.fileList.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const init = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
getWorkflowInfo().then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
let data = res.data
|
||||||
|
processInstanceData.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
formPermMap.value = data.formPermMap
|
||||||
|
// const entriesArray = Object.entries(data.formPermMap);// 使用Map构造函数将键值对数组转换为Map对象
|
||||||
|
// formPermMap.value = new Map(entriesArray);
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const submitParam = (item) => {
|
||||||
|
let files = []
|
||||||
|
item.fileList.forEach(item => {
|
||||||
|
let obj = {
|
||||||
|
fileId: item.fileId,
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
collectExplain: item.collectExplain,
|
||||||
|
collectType: item.collectType,
|
||||||
|
companyIds: item.companyIds,
|
||||||
|
deadline: item.deadline,
|
||||||
|
requirementId: item.requirementId ? item.requirementId : 0,
|
||||||
|
requirementName: item.requirementName,
|
||||||
|
fileList: files,
|
||||||
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
let res = await addRequirement(submitParam(formData.value))
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Collection'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleResubmit = () => {
|
||||||
|
resubmit(submitParam(formData.value)).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Collection'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getDetailInfo = async () => {
|
||||||
|
getFormInfo(route.query.id).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
formData.value = res.data
|
||||||
|
showTinymce.value = false
|
||||||
|
showTable.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTinymce.value = true
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleBack = () => {
|
||||||
|
history.back()
|
||||||
|
}
|
||||||
|
const handleDelete = (row) => {
|
||||||
|
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteFile(row.fileId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
ElMessage.warning("用户取消删除! ");
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
loading.value = true
|
||||||
|
await init()
|
||||||
|
if (route.query.id) {
|
||||||
|
await getDetailInfo()
|
||||||
|
}
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-empty__description) {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-block {
|
||||||
|
//display: flex;
|
||||||
|
//justify-content: space-between;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
a {
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #2a99ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.approval-record {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
281
src/views/project-demand/collection/detail.vue
Normal file
281
src/views/project-demand/collection/detail.vue
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block" v-loading="loading">
|
||||||
|
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||||
|
<baseTitle title="需求征集详情"></baseTitle>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12" v-if="checkFormPrem('requirementName')">
|
||||||
|
<el-form-item label="名称">
|
||||||
|
<span>{{ formData.requirementName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="checkFormPrem('companyIds')">
|
||||||
|
<el-form-item label="所属公司">
|
||||||
|
<span>{{ formData.companyIds }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="checkFormPrem('collectType')">
|
||||||
|
<el-form-item label="征集类型">
|
||||||
|
<span>{{ formData.collectType }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="checkFormPrem('deadline')">
|
||||||
|
<el-form-item label="截止时间">
|
||||||
|
<span>{{ formData.deadline }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
|
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||||
|
<el-form-item>
|
||||||
|
<el-card style="width: 100%">
|
||||||
|
<div v-html="formData.collectExplain">
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<baseTitle title="附件列表"></baseTitle>
|
||||||
|
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||||
|
<el-form-item>
|
||||||
|
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div v-if="processInstanceData.taskId">
|
||||||
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
|
<el-form-item prop="auditOpinion">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.auditOpinion"
|
||||||
|
:rows="3"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核意见"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
|
<div class="process">
|
||||||
|
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
|
||||||
|
:state="processInstanceData.state"/>
|
||||||
|
<process-diagram-viewer v-if="processDiagramViewer"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||||
|
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {getInfo, agreeTask, rejectTask, downloadFile} from "@/api/project-demand/index.js";
|
||||||
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {matterTree} from '@/utils/matterTree.js';
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const form = ref();
|
||||||
|
const loading = ref(false)
|
||||||
|
const demandForm = ref()
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const companyOption = ref([])
|
||||||
|
const formPermMap = ref(new Map());
|
||||||
|
const processInstanceData = ref({})
|
||||||
|
const showTable = ref(false)
|
||||||
|
const processDiagramViewer = ref(false)
|
||||||
|
const processTree = ref()
|
||||||
|
const companyNameArray = ref([])
|
||||||
|
const formData = ref({})
|
||||||
|
const rules = reactive({
|
||||||
|
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const checkFormPrem = (formKey) => {
|
||||||
|
if (formPermMap.value.hasOwnProperty(formKey)) {
|
||||||
|
let formItem = formPermMap.value[formKey];
|
||||||
|
return formItem.perm === 'READ'
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const fromPrem = (formKey) => {
|
||||||
|
let formItem = formPermMap.value[formKey];
|
||||||
|
return formItem.perm
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSubmit = () => {
|
||||||
|
let approve = {
|
||||||
|
taskId: processInstanceData.value.taskId,
|
||||||
|
auditOpinion: formData.value.auditOpinion,
|
||||||
|
formData: formData.value
|
||||||
|
}
|
||||||
|
agreeTask(approve).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Collection'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleReject = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
let approve = {
|
||||||
|
taskId: processInstanceData.value.taskId,
|
||||||
|
auditOpinion: formData.value.auditOpinion,
|
||||||
|
}
|
||||||
|
rejectTask(approve).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Collection'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getCompanyOption = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDataSourceOptionItem = (val) => {
|
||||||
|
if (val !== undefined) {
|
||||||
|
val.forEach(item => {
|
||||||
|
matterTree(companyNameArray.value, companyOption.value, item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return companyNameArray.value.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const init = async () => {
|
||||||
|
if (!route.query.id) return;
|
||||||
|
await getCompanyOption()
|
||||||
|
getInfo(route.query.id).then(res => {
|
||||||
|
loading.value = false
|
||||||
|
let data = res.data
|
||||||
|
formData.value = data.formData;
|
||||||
|
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
|
||||||
|
processInstanceData.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onMounted(async () => {
|
||||||
|
loading.value = true
|
||||||
|
await init()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-empty__description) {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-block {
|
||||||
|
overflow: hidden;
|
||||||
|
padding-right: 10px;
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
width: 350px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
|
> span:first-child {
|
||||||
|
color: black;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.approval-record {
|
||||||
|
padding-bottom: 30px;
|
||||||
|
|
||||||
|
.process {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,12 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import Tag from '@/components/Tag.vue'
|
import Tag from '@/components/Tag.vue'
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import {deleteDemand} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const authStore = useAuthStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
@@ -33,6 +41,7 @@ const searchConfig = reactive([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
|
const userInfo = ref(authStore.userinfo)
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -49,6 +58,13 @@ const tableConfig = reactive({
|
|||||||
label: '征集类型',
|
label: '征集类型',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'companyName',
|
||||||
|
label: '所属公司',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (
|
||||||
|
<div style={{width: '300px', textOverflow: 'ellipsis'}}>{row.companyName}</div>)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'approveName',
|
prop: 'approveName',
|
||||||
label: '审批人',
|
label: '审批人',
|
||||||
@@ -70,7 +86,7 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200,
|
width: 200,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
@@ -78,12 +94,19 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
let btn = []
|
||||||
if (row.state === '3' || row.state === '2') {
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
if (buttons.has("details")) {
|
||||||
btn.push({label: '删除', func: () => handleDelete(row), type: 'danger'})
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
} else if (row.state === '4') {
|
}
|
||||||
btn.push({label: '上报', func: () => handleReport(row), type: 'primary'})
|
if (buttons.has("edit")) {
|
||||||
|
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
// if (buttons.has("delete")) {
|
||||||
|
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||||
|
// }
|
||||||
|
if (buttons.has("report")) {
|
||||||
|
btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
@@ -91,7 +114,7 @@ const tableConfig = reactive({
|
|||||||
btn.map(item => (
|
btn.map(item => (
|
||||||
<el-button
|
<el-button
|
||||||
type={item.type}
|
type={item.type}
|
||||||
// v-perm={item.auth}
|
v-perm={item.prem}
|
||||||
onClick={() => item.func()}
|
onClick={() => item.func()}
|
||||||
link
|
link
|
||||||
>
|
>
|
||||||
@@ -99,6 +122,11 @@ const tableConfig = reactive({
|
|||||||
</el-button>
|
</el-button>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
buttons.has("delete") ?
|
||||||
|
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} perm={['mosr:requirement:del']}
|
||||||
|
onDelete={() => handleDelete(row)}/> : ''
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -107,18 +135,21 @@ const tableConfig = reactive({
|
|||||||
api: '/workflow/mosr/requirement',
|
api: '/workflow/mosr/requirement',
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add', color: '#DED0B2'},
|
{name: '新增', key: 'add', color: '#DED0B2'},
|
||||||
{name: '导出', key: 'add', type: ''},
|
{name: '导出', key: 'export', type: ''},
|
||||||
],
|
],
|
||||||
params: {}
|
params: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('userInfo', userInfo.value.userName)
|
||||||
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {...val}
|
tableConfig.params = {...val}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
|
//新增
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandadd',
|
name: 'Requirement/edit',
|
||||||
query: {
|
query: {
|
||||||
isAdd: 1
|
isAdd: 1
|
||||||
}
|
}
|
||||||
@@ -126,35 +157,46 @@ const handleAdd = () => {
|
|||||||
}
|
}
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandedit',
|
name: 'Requirement/edit',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const handleDelete = (row) => {
|
||||||
|
deleteDemand(row.requirementId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tableIns.value.refresh()
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demanddetail',
|
name: 'Requirement/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const handleReport = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Summary/add',
|
||||||
|
query: {
|
||||||
|
id:row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const headBtnClick = (key) => {
|
const headBtnClick = (key) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'add':
|
case 'add':
|
||||||
handleAdd()
|
handleAdd()
|
||||||
break;
|
break;
|
||||||
case 'edit':
|
case 'export':
|
||||||
handleEdit()
|
handleExport()
|
||||||
break;
|
|
||||||
case 'detail':
|
|
||||||
handleDetail()
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
492
src/views/project-demand/summary/add.vue
Normal file
492
src/views/project-demand/summary/add.vue
Normal file
@@ -0,0 +1,492 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block" v-loading="loading">
|
||||||
|
<baseTitle title="需求上报"></baseTitle>
|
||||||
|
<el-form :model="formData" ref="summaryForm" :rules="rules">
|
||||||
|
<el-row gutter="50">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称" prop="projectName">
|
||||||
|
<el-input v-model="formData.projectName" placeholder="请输入名称" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="专项资金" prop="specialFund">
|
||||||
|
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
|
<el-config-provider>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.startTime"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="开始时间"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-config-provider>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="结束时间" prop="endTime">
|
||||||
|
<el-config-provider>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.endTime"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="结束时间"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-config-provider>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">-->
|
||||||
|
<!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"-->
|
||||||
|
<!-- filterable clearable :check-strictly="true"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col> <el-col :span="12">-->
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目类型" prop="projectType">
|
||||||
|
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="研发主体" prop="rdSubject">
|
||||||
|
<el-input v-model="formData.rdSubject" placeholder="请输入研发主体" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出资类型" prop="investmentType">
|
||||||
|
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目影响" prop="projectImpact">
|
||||||
|
<el-select v-model="formData.projectImpact" placeholder="请选择项目影响" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||||
|
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="预期成果形式" prop="resultForm">
|
||||||
|
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||||
|
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||||
|
<el-select v-model="formData.industryUniversityResearch" placeholder="请选择产学研联合" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||||
|
<el-select v-model="formData.governmentDeclaration" placeholder="请选择开展政府申报" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||||
|
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cacheStore.getDict('todo_type')"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||||
|
<el-input v-model="formData.inventionPatent" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="实用性新型专利(项)" prop="newPatent">
|
||||||
|
<el-input v-model="formData.newPatent" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||||
|
<el-input v-model="formData.softwareCopyright" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="著作权(项)" prop="copyright">
|
||||||
|
<el-input v-model="formData.copyright" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="其他(项)" prop="other">
|
||||||
|
<el-input v-model="formData.other" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="经济概算(万元)" prop="economicEstimate">
|
||||||
|
<el-input v-model="formData.economicEstimate" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="其中申请公司总部科技创新专项资金(万元)" prop="specialFundAmount">
|
||||||
|
<el-input v-model="formData.specialFundAmount" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||||
|
<el-input v-model="formData.serviceDescription" type="textarea" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||||
|
<el-input v-model="formData.contentDescription" type="textarea" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||||
|
@getAttachment="getAttachment"
|
||||||
|
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||||
|
:preview="name === 'Summary/edit'"/>
|
||||||
|
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="流程"></baseTitle>
|
||||||
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
|
<!-- <div class="process" id="approvalRecord">-->
|
||||||
|
<!-- <process-tree ref="processTree" mode="view" id-name="approvalRecord"/>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button type="primary" @click="staging">存为草稿</el-button>
|
||||||
|
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleResubmit">重新发布</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "./api";
|
||||||
|
import {ElMessage, ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {useCacheStore} from '@/stores/cache.js'
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
|
||||||
|
const cacheStore = useCacheStore()
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const attachment = ref()
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const loading = ref(false)
|
||||||
|
const processDiagramViewer = ref(false)
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const companyOption = ref([])
|
||||||
|
const summaryForm = ref()
|
||||||
|
const deploymentId = ref()
|
||||||
|
const showTable = ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const file = ref({})
|
||||||
|
const formData = ref({})
|
||||||
|
const rules = reactive({
|
||||||
|
projectName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||||
|
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||||
|
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||||
|
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||||
|
// affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||||
|
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
||||||
|
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
||||||
|
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
||||||
|
projectImpact: [{required: true, message: '请选择项目影响', trigger: 'blur'}],
|
||||||
|
businessSegment: [{required: true, message: '请选择所属业务板块', trigger: 'blur'}],
|
||||||
|
resultForm: [{required: true, message: '请选择预期成果形式', trigger: 'blur'}],
|
||||||
|
technicalStandard: [{required: true, message: '请选择预期技术标准制定', trigger: 'blur'}],
|
||||||
|
industryUniversityResearch: [{required: true, message: '请选择产学研联合', trigger: 'blur'}],
|
||||||
|
governmentDeclaration: [{required: true, message: '请选择开展政府申报', trigger: 'blur'}],
|
||||||
|
intellectualProperty: [{required: true, message: '请选择知识产权状况', trigger: 'blur'}],
|
||||||
|
inventionPatent: [{required: true, message: '请输入发明专利', trigger: 'blur'}],
|
||||||
|
newPatent: [{required: true, message: '请输入实用性新型专利', trigger: 'blur'}],
|
||||||
|
softwareCopyright: [{required: true, message: '请输入软件著作权', trigger: 'blur'}],
|
||||||
|
copyright: [{required: true, message: '请输入著作权', trigger: 'blur'}],
|
||||||
|
other: [{required: true, message: '请输入其他', trigger: 'blur'}],
|
||||||
|
economicEstimate: [{required: true, message: '请输入经济概算', trigger: 'blur'}],
|
||||||
|
specialFundAmount: [{required: true, message: '请输入专项资金', trigger: 'blur'}],
|
||||||
|
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
|
||||||
|
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
|
||||||
|
})
|
||||||
|
const compositeParam = (item, type) => {
|
||||||
|
let tag = ''
|
||||||
|
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||||
|
tag = '需求上报'
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getEditOtherFile = (val) => {
|
||||||
|
console.log('getEditOtherFile', val)
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
console.log('上传文件getAttachment', val)
|
||||||
|
file.value = compositeParam(val)
|
||||||
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
console.log('上传文件getOtherFile', val)
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
otherFileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async (instance) => {
|
||||||
|
// if (!instance) return
|
||||||
|
// instance.validate(async (valid, fields) => {
|
||||||
|
// if(JSON.stringify(file.value) == "{}"){
|
||||||
|
// attachment.value.validate()
|
||||||
|
// } else {
|
||||||
|
// attachment.value.clearValidate()
|
||||||
|
// }
|
||||||
|
// if (!valid) return
|
||||||
|
let singleFile = {}
|
||||||
|
if (file.value.fileId !== undefined) {
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let otherFiles = []
|
||||||
|
otherFileList.value.forEach(item => {
|
||||||
|
otherFiles.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
"specialFund": "2",
|
||||||
|
"projectName": "重新提交全流程测试2024520",
|
||||||
|
"startTime": "2024-05-24 00:00:00",
|
||||||
|
"endTime": "2024-05-29 00:00:00",
|
||||||
|
"projectType": "3",
|
||||||
|
"investmentType": "3",
|
||||||
|
"businessSegment": "2",
|
||||||
|
"technicalStandard": "2",
|
||||||
|
"governmentDeclaration": "2",
|
||||||
|
"inventionPatent": "3",
|
||||||
|
"newPatent": "3",
|
||||||
|
"economicEstimate": "3",
|
||||||
|
"other": "3",
|
||||||
|
"copyright": "3",
|
||||||
|
"softwareCopyright": "3",
|
||||||
|
"industryUniversityResearch": "2",
|
||||||
|
"intellectualProperty": "00",
|
||||||
|
"resultForm": "3",
|
||||||
|
"projectImpact": "3",
|
||||||
|
"rdSubject": "3",
|
||||||
|
// "affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||||
|
"serviceDescription": "3",
|
||||||
|
"contentDescription": "3",
|
||||||
|
"specialFundAmount": "3",
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
"singleFile": singleFile,
|
||||||
|
"fileList": otherFiles,
|
||||||
|
"requirementId":route.query.id
|
||||||
|
}
|
||||||
|
// let params = {
|
||||||
|
// ...formData.value,
|
||||||
|
// deploymentId: deploymentId.value,
|
||||||
|
// fileList: otherFiles,
|
||||||
|
// singleFile: singleFile,
|
||||||
|
// requirementId: route.query.id
|
||||||
|
// }
|
||||||
|
let res = await requirementReported(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Summary'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
const handleResubmit = () => {
|
||||||
|
let singleFile = {}
|
||||||
|
let otherFiles = []
|
||||||
|
let fileArray
|
||||||
|
if (name.value === 'Summary/edit') {
|
||||||
|
singleFile = {
|
||||||
|
fileId: attachment.value.singleFile.fileId
|
||||||
|
}
|
||||||
|
fileArray = attachment.value.allFileList
|
||||||
|
} else {
|
||||||
|
if (file.value.fileId !== undefined) {
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileArray = otherFileList.value
|
||||||
|
}
|
||||||
|
fileArray.forEach(item => {
|
||||||
|
otherFiles.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
//todo requirementId
|
||||||
|
let params = {
|
||||||
|
...formData.value,
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
fileList: otherFiles,
|
||||||
|
singleFile: singleFile,
|
||||||
|
requirementId: route.query.id
|
||||||
|
}
|
||||||
|
console.log('重新提交params', params)
|
||||||
|
resubmitReported(params).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Summary'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getDetailInfo = async () => {
|
||||||
|
getDetail(route.query.projectId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
formData.value = res.data.formData
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const init = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
getProcessInfo().then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
let data = res.data
|
||||||
|
deploymentId.value = data.deploymentId
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onMounted(async () => {
|
||||||
|
await init()
|
||||||
|
if (route.query.projectId) {
|
||||||
|
loading.value = true
|
||||||
|
await getDetailInfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const staging = async () => {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.detail-block {
|
||||||
|
overflow: hidden;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-table--fit) {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
40
src/views/project-demand/summary/api/index.js
Normal file
40
src/views/project-demand/summary/api/index.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export const fileUp = (url, data) => {
|
||||||
|
return request({
|
||||||
|
url,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const requirementReported = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/reported',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getProcessInfo = () => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/collect/process',
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getDetail = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/requirement/collect/info/${projectId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const resubmitReported = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/collect/resubmit',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
96
src/views/project-demand/summary/detail.vue
Normal file
96
src/views/project-demand/summary/detail.vue
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<template>
|
||||||
|
<steps :active="'1'" @setDetail="setDetail" @stepChange="stepChange">
|
||||||
|
<template #content>
|
||||||
|
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||||
|
:processViewer="summaryProcessViewer" :companyOption="companyOption" :loading="loading"/>
|
||||||
|
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||||
|
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||||
|
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="summaryData.formData" :data="summaryData"
|
||||||
|
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="summaryData.formData" :data="summaryData"
|
||||||
|
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</steps>
|
||||||
|
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"></opinion>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||||
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const companyOption = ref([])
|
||||||
|
const summaryData = ref({})
|
||||||
|
const summaryProcessViewer = ref(true)
|
||||||
|
const loading = ref(false)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const active = ref(route.query.state)
|
||||||
|
const showActive = ref()
|
||||||
|
const getCompanyOption = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
}
|
||||||
|
const getInfo = async (state) => {
|
||||||
|
const projectId = route.query.projectId
|
||||||
|
if(showActive == '00'){
|
||||||
|
await getCompanyOption()
|
||||||
|
}
|
||||||
|
summaryProcessViewer.value = false
|
||||||
|
loading.value = true
|
||||||
|
const {code, data,msg} = await getMapProjectStateInfo(projectId, state)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if(code===1000){
|
||||||
|
summaryData.value = data;
|
||||||
|
loading.value = false
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
summaryProcessViewer.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// const back = () => {
|
||||||
|
// switch (route.name) {
|
||||||
|
// case 'Summary/detail':
|
||||||
|
// setDetail('1')
|
||||||
|
// break;
|
||||||
|
// case 'Initiation/detail':
|
||||||
|
// setDetail('2')
|
||||||
|
// break;
|
||||||
|
// case 'Implementation/detail':
|
||||||
|
// setDetail('3')
|
||||||
|
// break;
|
||||||
|
// case 'Filing/detail':
|
||||||
|
// setDetail('4')
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
const setDetail = (active) => {
|
||||||
|
showActive.value = active
|
||||||
|
getInfo(active)
|
||||||
|
}
|
||||||
|
|
||||||
|
const stepChange = (data) => {
|
||||||
|
showActive.value = data.active
|
||||||
|
getInfo(data.active)
|
||||||
|
}
|
||||||
|
// back()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
207
src/views/project-demand/summary/index.vue
Normal file
207
src/views/project-demand/summary/index.vue
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {reactive, ref, shallowRef} from 'vue';
|
||||||
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {useRouter} from 'vue-router';
|
||||||
|
|
||||||
|
const localData = reactive({})
|
||||||
|
|
||||||
|
const tableIns = ref()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
|
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入'
|
||||||
|
},
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目类型',
|
||||||
|
prop: 'projectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '研发主体',
|
||||||
|
prop: 'productMainBody',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目影响',
|
||||||
|
prop: 'projectEffect',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '起止时间',
|
||||||
|
prop: 'startTime',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最小金额',
|
||||||
|
prop: 'minMoney',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最大金额',
|
||||||
|
prop: 'maxMoney',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
prop: 'selection'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'requirementName',
|
||||||
|
label: '名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'undertaker',
|
||||||
|
label: '承办单位',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectType',
|
||||||
|
label: '项目类型',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'rdSubject',
|
||||||
|
label: '研发主体',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectImpact',
|
||||||
|
label: '项目影响',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'startTime',
|
||||||
|
label: '起止时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'state',
|
||||||
|
label: '状态',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null&&row.state != 0) {
|
||||||
|
return (<Tag dictType={'demand_summary'} value={row.state}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = []
|
||||||
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
|
if (buttons.has("details")) {
|
||||||
|
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("edit")) {
|
||||||
|
btn.push({label: '编辑',prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
// if (buttons.has("delete")) {
|
||||||
|
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
||||||
|
// }
|
||||||
|
if (buttons.has("report")) {
|
||||||
|
btn.push({label: '上报',prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
v-perm={item.prem}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/workflow/mosr/requirement/collect',
|
||||||
|
params: {},
|
||||||
|
btns: [
|
||||||
|
{name: '年度计划导出', key: '_export', color: '#DED0B2', auth: ''},
|
||||||
|
{name: '经费预算生成', key: 'preMonty', color: '#DED0B2', auth: ''},
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
let obj = {...val}
|
||||||
|
if (obj.time) {
|
||||||
|
obj.startTime = obj.time[0]
|
||||||
|
obj.endTime = obj.time[1]
|
||||||
|
delete obj.dateValue
|
||||||
|
}
|
||||||
|
tableConfig.params = obj
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAdd = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Summary/add',
|
||||||
|
query: {
|
||||||
|
id:row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Summary/edit',
|
||||||
|
query: {
|
||||||
|
id:row.requirementId,
|
||||||
|
projectId:row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Summary/detail',
|
||||||
|
query: {
|
||||||
|
id:row.requirementId,
|
||||||
|
projectId: row.projectId,
|
||||||
|
state: row.state
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
83
src/views/project-management/filing/attachment.vue
Normal file
83
src/views/project-management/filing/attachment.vue
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<el-card style="width: 100%">
|
||||||
|
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '关键词',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '自定义标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '内置标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '上传时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable=ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const getOtherFile = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href=URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
265
src/views/project-management/filing/conclusion.vue
Normal file
265
src/views/project-management/filing/conclusion.vue
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
<template>
|
||||||
|
<div class="apply-block">
|
||||||
|
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||||
|
<baseTitle title="项目结项"></baseTitle>
|
||||||
|
<AttachmentUpload ref="attachment" label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||||
|
@getAttachment="getAttachment"
|
||||||
|
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Filing/edit'"/>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="流程"></baseTitle>
|
||||||
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {getProjectConclusionProcess, projectConclusion,getConclusionDetail, resubmitConclusion} from "@/api/project-manage";
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const formData = ref({})
|
||||||
|
const rules = reactive({
|
||||||
|
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const attachment = ref()
|
||||||
|
const name=ref(router.currentRoute.value.name)
|
||||||
|
const loading = ref(false)
|
||||||
|
const file = ref({})
|
||||||
|
const applyForm = ref()
|
||||||
|
const deploymentId = ref()
|
||||||
|
const showTable = ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const processDiagramViewer = ref(true)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'oper',
|
||||||
|
// label: '操作',
|
||||||
|
// align: 'center',
|
||||||
|
// currentRender: ({row, index}) => {
|
||||||
|
// return (
|
||||||
|
// <div>
|
||||||
|
// <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
// <el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||||
|
// </div>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
let tag = ''
|
||||||
|
if (name.value === 'Filing/conclusion'||name.value === 'Filing/edit') {
|
||||||
|
tag = '项目结项'
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
console.log('上传文件getAttachment', val)
|
||||||
|
file.value=compositeParam(val)
|
||||||
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
console.log('上传文件getOtherFile', val)
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
otherFileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
if(JSON.stringify(file.value) === "{}"){
|
||||||
|
attachment.value.validate()
|
||||||
|
} else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
if (!valid) return
|
||||||
|
let files = []
|
||||||
|
let singleFile={}
|
||||||
|
if(file.value.fileId!==undefined){
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
otherFileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
singleFile: singleFile,
|
||||||
|
projectId:route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
let res = await projectConclusion(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Filing'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleResubmit = () => {
|
||||||
|
let singleFile = {}
|
||||||
|
let otherFiles = []
|
||||||
|
let fileArray
|
||||||
|
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||||
|
attachment.value.validate()
|
||||||
|
} else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
if(attachment.value.singleFile!==null&&name.value === 'Filing/edit'){
|
||||||
|
singleFile = {
|
||||||
|
fileId: attachment.value.singleFile.fileId
|
||||||
|
}
|
||||||
|
fileArray=attachment.value.allFileList
|
||||||
|
}else {
|
||||||
|
if (file.value.fileId !== undefined) {
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileArray=otherFileList.value
|
||||||
|
}
|
||||||
|
fileArray.forEach(item => {
|
||||||
|
otherFiles.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
//todo requirementId
|
||||||
|
let params={
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: otherFiles,
|
||||||
|
singleFile: singleFile,
|
||||||
|
projectId:route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('重新提交params',params)
|
||||||
|
resubmitConclusion(params).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Filing'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getDetailInfo = async () => {
|
||||||
|
getConclusionDetail(route.query.projectId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
formData.value = res.data.formData
|
||||||
|
loading.value=false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const init = () => {
|
||||||
|
getProjectConclusionProcess().then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
processDiagramViewer.value = false
|
||||||
|
if (res.code === 1000) {
|
||||||
|
let data = res.data
|
||||||
|
deploymentId.value=data.deploymentId
|
||||||
|
processInstanceData.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onMounted(async () => {
|
||||||
|
await init()
|
||||||
|
if (name.value === 'Filing/edit') {
|
||||||
|
loading.value=true
|
||||||
|
await getDetailInfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
129
src/views/project-management/filing/detail.vue
Normal file
129
src/views/project-management/filing/detail.vue
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<steps :active="'4'" @setDetail="setDetail" @stepChange="stepChange">
|
||||||
|
<template #content>
|
||||||
|
<collection-detail
|
||||||
|
:formData="commonForm.formData"
|
||||||
|
:data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer"
|
||||||
|
:companyOption="companyOption"
|
||||||
|
v-show="showActive == '00'"
|
||||||
|
:loading="loading"
|
||||||
|
/>
|
||||||
|
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer" :loading="loading"/>
|
||||||
|
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
</template>
|
||||||
|
</steps>
|
||||||
|
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {getInfo} from "@/api/project-demand/index.js";
|
||||||
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
|
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||||
|
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||||
|
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||||
|
import {ElLoading} from "element-plus";
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const companyOption = ref([])
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const activeName = ref('first')
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
console.log(tab, event)
|
||||||
|
if (tab.index.value === 0) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const getCompanyOption = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const commonForm = ref({})
|
||||||
|
const commonProvessViewer = ref(true)
|
||||||
|
|
||||||
|
const getAllInfo = async (state) => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
try {
|
||||||
|
state == '00' && (await getCompanyOption())
|
||||||
|
commonProvessViewer.value = false
|
||||||
|
loading.value = true
|
||||||
|
const {data, code} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||||
|
// if(state == '00') {
|
||||||
|
// collectionData.value = data;
|
||||||
|
// } else if(state == '10') {
|
||||||
|
// summaryData.value = data;
|
||||||
|
// }
|
||||||
|
if(code===1000){
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
commonForm.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
// summaryProcessViewer.value = true
|
||||||
|
commonProvessViewer.value = true
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
} catch {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const showActive = ref()
|
||||||
|
|
||||||
|
const setDetail = (active) => {
|
||||||
|
showActive.value = active
|
||||||
|
getAllInfo(active)
|
||||||
|
}
|
||||||
|
|
||||||
|
const stepChange = (data) => {
|
||||||
|
showActive.value = data.active
|
||||||
|
getAllInfo(data.active)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail-block {
|
||||||
|
padding-top: 15px;
|
||||||
|
|
||||||
|
:deep(.el-tabs__nav-scroll) {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.el-tabs__nav {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.el-tabs__item {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-active {
|
||||||
|
color: black;
|
||||||
|
background-color: #DED0B2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
238
src/views/project-management/filing/index.vue
Normal file
238
src/views/project-management/filing/index.vue
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {reactive, shallowRef} from "vue";
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入名称查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目类型',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目类型',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目影响',
|
||||||
|
prop: 'projectEffect',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目影响',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '研发主体',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择研发主体',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '起始时间',
|
||||||
|
prop: 'time',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择起止时间',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最小金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最大金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'projectName',
|
||||||
|
label: '名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'affiliatedCompany',
|
||||||
|
label: '所属公司',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'approveName',
|
||||||
|
label: '审批人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectType',
|
||||||
|
label: '项目类型',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'rdSubject',
|
||||||
|
label: '研发主体',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectImpact',
|
||||||
|
label: '项目影响',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'economicEstimate',
|
||||||
|
label: '经济概况',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'startTime',
|
||||||
|
label: '起止时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'taskNode',
|
||||||
|
label: '当前节点',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'state',
|
||||||
|
label: '状态',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) =>{
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = []
|
||||||
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
|
if (buttons.has("details")) {
|
||||||
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("attachments")) {
|
||||||
|
btn.push({label: '附件',prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("entry")) {
|
||||||
|
btn.push({label: '结项',prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("edit")) {
|
||||||
|
btn.push({label: '编辑',prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
v-perm={item.prem}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/workflow/mosr/project/filing',
|
||||||
|
params: {},
|
||||||
|
})
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Filing/detail',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId,
|
||||||
|
state: row.state
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleAttachment = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Filing/attachment',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleConclusion = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Filing/conclusion',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Filing/edit',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
103
src/views/project-management/implementation/account.vue
Normal file
103
src/views/project-management/implementation/account.vue
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入名称查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目费用',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入项目费用查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '起始时间',
|
||||||
|
prop: 'datetime',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择起始时间',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
width:'80'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: '时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectType',
|
||||||
|
label: '项目费用',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'productMainBody',
|
||||||
|
label: '研发阶段',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectEffect',
|
||||||
|
label: '摘要',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '税后余额(元)',
|
||||||
|
align: 'center'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '',
|
||||||
|
params: {},
|
||||||
|
btns: [
|
||||||
|
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const router = useRouter()
|
||||||
|
const headBtnClick = (key) => {
|
||||||
|
switch (key) {
|
||||||
|
case 'add':
|
||||||
|
handleUploadFee()
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleUploadFee = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/uploadFee',
|
||||||
|
query: {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
89
src/views/project-management/implementation/attachment.vue
Normal file
89
src/views/project-management/implementation/attachment.vue
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<el-card style="width: 100%">
|
||||||
|
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {shallowRef} from "vue";
|
||||||
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '标签',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择标签',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable=ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const getOtherFile = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href=URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
232
src/views/project-management/implementation/check.vue
Normal file
232
src/views/project-management/implementation/check.vue
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
<template>
|
||||||
|
<div class="apply-block">
|
||||||
|
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||||
|
<baseTitle title="项目验收"></baseTitle>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="前置流程">
|
||||||
|
<el-input v-model="formData.requirementName" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<AttachmentUpload ref="attachment" label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||||
|
@getAttachment="getAttachment"
|
||||||
|
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Implementation/edit'"/>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="流程"></baseTitle>
|
||||||
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
|
</div>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleResubmit(applyForm)">重新提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
import {getProjectCheckProcess, projectCheck,getCheckDetail,resubmitCheck} from "@/api/project-manage";
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const attachment = ref()
|
||||||
|
const name=ref(router.currentRoute.value.name)
|
||||||
|
const loading = ref(false)
|
||||||
|
const formData = ref({})
|
||||||
|
const file = ref({})
|
||||||
|
const applyForm = ref()
|
||||||
|
const deploymentId = ref()
|
||||||
|
const showTable = ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const processDiagramViewer = ref(true)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
let tag=''
|
||||||
|
if(name.value==='Implementation/check'||name.value === 'Implementation/edit'){
|
||||||
|
tag='项目验收'
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
console.log('上传文件getAttachment', val)
|
||||||
|
file.value=compositeParam(val)
|
||||||
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
console.log('上传文件getOtherFile', val)
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
otherFileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
if(JSON.stringify(file.value) === "{}"){
|
||||||
|
attachment.value.validate()
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
if (!valid) return
|
||||||
|
let files = []
|
||||||
|
let singleFile={}
|
||||||
|
let fileArray
|
||||||
|
if(name.value === 'Implementation/edit'){
|
||||||
|
singleFile = {
|
||||||
|
fileId: attachment.value.singleFile.fileId
|
||||||
|
}
|
||||||
|
fileArray=attachment.value.allFileList
|
||||||
|
}else {
|
||||||
|
if (file.value.fileId !== undefined) {
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileArray=otherFileList.value
|
||||||
|
}
|
||||||
|
fileArray.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
singleFile: singleFile,
|
||||||
|
projectId:route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('params-提交',params)
|
||||||
|
let res = await projectCheck(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Implementation'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleResubmit = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
let singleFile = {}
|
||||||
|
let otherFiles = []
|
||||||
|
let fileArray
|
||||||
|
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||||
|
attachment.value.validate()
|
||||||
|
} else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
if (attachment.value.singleFile!==null&&name.value === 'Implementation/edit') {
|
||||||
|
singleFile = {
|
||||||
|
fileId: attachment.value.singleFile.fileId
|
||||||
|
}
|
||||||
|
fileArray = attachment.value.allFileList
|
||||||
|
} else {
|
||||||
|
if (file.value.fileId !== undefined) {
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileArray = otherFileList.value
|
||||||
|
}
|
||||||
|
fileArray.forEach(item => {
|
||||||
|
otherFiles.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
//todo requirementId
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: otherFiles,
|
||||||
|
singleFile: singleFile,
|
||||||
|
projectId: route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('重新提交params', params)
|
||||||
|
resubmitCheck(params).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getDetailInfo = async () => {
|
||||||
|
getCheckDetail(route.query.projectId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
formData.value = res.data.formData
|
||||||
|
loading.value=false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const init = () => {
|
||||||
|
getProjectCheckProcess(route.query.projectId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
processDiagramViewer.value = false
|
||||||
|
if (res.code === 1000) {
|
||||||
|
let data = res.data
|
||||||
|
deploymentId.value=data.deploymentId
|
||||||
|
processInstanceData.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onMounted(async () => {
|
||||||
|
await init()
|
||||||
|
if (name.value === 'Implementation/edit'){
|
||||||
|
loading.value=true
|
||||||
|
await getDetailInfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
130
src/views/project-management/implementation/detail.vue
Normal file
130
src/views/project-management/implementation/detail.vue
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<template>
|
||||||
|
<steps :active="'3'" @setDetail="setDetail" @stepChange="stepChange">
|
||||||
|
<template #content>
|
||||||
|
<collection-detail
|
||||||
|
:formData="commonForm.formData"
|
||||||
|
:data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer"
|
||||||
|
:companyOption="companyOption"
|
||||||
|
v-show="showActive == '00'"
|
||||||
|
:loading="loading"
|
||||||
|
/>
|
||||||
|
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/>
|
||||||
|
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</steps>
|
||||||
|
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {getInfo} from "@/api/project-demand/index.js";
|
||||||
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
|
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||||
|
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||||
|
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||||
|
import { ElLoading } from "element-plus";
|
||||||
|
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||||
|
|
||||||
|
// const activeName = ref('first')
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
console.log(tab, event)
|
||||||
|
if(tab.index.value === 0){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const activeName = ref('first')
|
||||||
|
const collectionData = ref({})
|
||||||
|
const summaryData = ref({})
|
||||||
|
const loading = ref(false)
|
||||||
|
const collectionProcessViewer = ref(true)
|
||||||
|
const summaryProcessViewer = ref(true)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const companyOption = ref([])
|
||||||
|
const rules = reactive({
|
||||||
|
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const getCompanyOption = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const commonForm = ref({})
|
||||||
|
const commonProvessViewer = ref(true)
|
||||||
|
|
||||||
|
const getAllInfo = async (state) => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
try {
|
||||||
|
state == '00' && ( await getCompanyOption() )
|
||||||
|
commonProvessViewer.value = false
|
||||||
|
loading.value = true
|
||||||
|
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||||
|
if(state == '00') {
|
||||||
|
collectionData.value = data;
|
||||||
|
} else if(state == '10') {
|
||||||
|
summaryData.value = data;
|
||||||
|
}
|
||||||
|
if(code===1000){
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
commonForm.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
// summaryProcessViewer.value = true
|
||||||
|
commonProvessViewer.value = true
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
} catch {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const showActive = ref()
|
||||||
|
|
||||||
|
const setDetail = (active) => {
|
||||||
|
showActive.value = active
|
||||||
|
getAllInfo(active)
|
||||||
|
}
|
||||||
|
|
||||||
|
const stepChange = (data) => {
|
||||||
|
showActive.value = data.active
|
||||||
|
getAllInfo(data.active)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail-block{
|
||||||
|
padding-top: 15px;
|
||||||
|
:deep(.el-tabs__nav-scroll){
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
.el-tabs__nav{
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
.el-tabs__item{
|
||||||
|
flex: 1;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.is-active{
|
||||||
|
color: black;
|
||||||
|
background-color: #DED0B2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
269
src/views/project-management/implementation/index.vue
Normal file
269
src/views/project-management/implementation/index.vue
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {reactive, shallowRef} from "vue";
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入名称查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目类型',
|
||||||
|
prop: 'projectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目类型',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目影响',
|
||||||
|
prop: 'projectImpact',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目影响',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '研发主体',
|
||||||
|
prop: 'rdSubject',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择研发主体',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '起止时间',
|
||||||
|
prop: 'startTime',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择起止时间',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最小金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最大金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
prop: 'selection'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectName',
|
||||||
|
label: '名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'affiliatedCompany',
|
||||||
|
label: '所属公司',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'approveName',
|
||||||
|
label: '审批人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectType',
|
||||||
|
label: '项目类型',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'rdSubject',
|
||||||
|
label: '研发主体',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectImpact',
|
||||||
|
label: '项目影响',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'economicEstimate',
|
||||||
|
label: '经济概况',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'startTime',
|
||||||
|
label: '起止时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'taskNode',
|
||||||
|
label: '当前节点',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'state',
|
||||||
|
label: '状态',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) =>{
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = []
|
||||||
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
|
if (buttons.has("details")) {
|
||||||
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("check")) {
|
||||||
|
btn.push({label: '验收',prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("edit")) {
|
||||||
|
btn.push({label: '编辑',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("standing")) {
|
||||||
|
btn.push({label: '台账',prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("attachments")) {
|
||||||
|
btn.push({label: '附件',prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("viewAllocation")) {
|
||||||
|
btn.push({label: '查看分摊',prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("phaseChange")) {
|
||||||
|
btn.push({label: '阶段变更',prem: ['mosr:requirement:info'], func: () => handleChange(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
v-perm={item.prem}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/workflow/mosr/project/implementation',
|
||||||
|
params: {},
|
||||||
|
btns: [
|
||||||
|
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/detail',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId,
|
||||||
|
state: row.state
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleCheck = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/check',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/edit',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleStandingBook = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/account',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleAttachment = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/attachment',
|
||||||
|
query: {
|
||||||
|
id: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleShare = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/share',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
113
src/views/project-management/implementation/share.vue
Normal file
113
src/views/project-management/implementation/share.vue
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {reactive} from "vue";
|
||||||
|
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入名称查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目费用',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入项目费用查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '起始时间',
|
||||||
|
prop: 'datetime',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择起始时间',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
width:'80'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: '时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectType',
|
||||||
|
label: '研发人员',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'productMainBody',
|
||||||
|
label: '应发工资',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectEffect',
|
||||||
|
label: '绩效',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '公积金',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '社保',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '年金',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '工作日(天)',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '研发工时(天)',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '小计',
|
||||||
|
align: 'center'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '',
|
||||||
|
params: {},
|
||||||
|
btns: [
|
||||||
|
{name: '上传分摊', key: '_export', color: '#DED0B2',auth: ''}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
84
src/views/project-management/implementation/uploadFee.vue
Normal file
84
src/views/project-management/implementation/uploadFee.vue
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<el-form :model="formData" ref="demandForm" label-width="auto">
|
||||||
|
<baseTitle title="上传费用"></baseTitle>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目名称">
|
||||||
|
<span>{{ formData.requirementName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目负责人">
|
||||||
|
<span>{{ formData.companyIds }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目开始时间">
|
||||||
|
<span>{{ formData.collectType }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目预计持续时间">
|
||||||
|
<span>{{ formData.deadline }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目开展方式">
|
||||||
|
<span>{{ formData.deadline }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="项目预算">
|
||||||
|
<span>{{ formData.deadline }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="tableData" style="width: 100%">
|
||||||
|
<el-table-column prop="date" label="时间" width="180" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.uqName" placeholder="请输入时间" clearable>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="name" label="项目费用" width="180" />
|
||||||
|
<el-table-column prop="address" label="研发阶段" />
|
||||||
|
<el-table-column prop="address" label="摘要" />
|
||||||
|
<el-table-column prop="address" label="税后余额(元)" />
|
||||||
|
<el-table-column prop="address" label="操作" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" size="mini" @click="handleDelete(scope.row)" link>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const formData = ref({})
|
||||||
|
const tableData = [
|
||||||
|
{
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
260
src/views/project-management/initiation/apply.vue
Normal file
260
src/views/project-management/initiation/apply.vue
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
<template>
|
||||||
|
<div class="apply-block">
|
||||||
|
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||||
|
<baseTitle title="项目立项申请"></baseTitle>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="前置流程">
|
||||||
|
<el-input v-model="formData.requirementName" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||||
|
@getAttachment="getAttachment"
|
||||||
|
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Initiation/edit'"/>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="流程"></baseTitle>
|
||||||
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
|
</div>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {ElMessage, ElNotification} from "element-plus";
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
import {getApplyProcess, projectApply,resubmitApply,getApplyDetail} from "@/api/project-manage";
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const formData = ref({})
|
||||||
|
const rules = reactive({
|
||||||
|
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const deploymentId = ref()
|
||||||
|
const attachment = ref()
|
||||||
|
const file = ref({})
|
||||||
|
const applyForm = ref()
|
||||||
|
const showTable = ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'oper',
|
||||||
|
// label: '操作',
|
||||||
|
// align: 'center',
|
||||||
|
// currentRender: ({row, index}) => {
|
||||||
|
// return (
|
||||||
|
// <div>
|
||||||
|
// <a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
|
||||||
|
// <el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||||
|
// </div>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const loading = ref(false)
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const processDiagramViewer = ref(true)
|
||||||
|
const name=ref(router.currentRoute.value.name)
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
let tag = ''
|
||||||
|
if (name.value === 'Initiation/apply'||name.value === 'Initiation/edit') {
|
||||||
|
tag = '项目立项申请'
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag:tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
console.log('上传文件getAttachment', val)
|
||||||
|
file.value=compositeParam(val)
|
||||||
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
console.log('上传文件getOtherFile', val)
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
otherFileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if(JSON.stringify(file.value) === "{}"){
|
||||||
|
attachment.value.validate()
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
if (!valid) return
|
||||||
|
let files = []
|
||||||
|
let singleFile={}
|
||||||
|
if(file.value.fileId!==undefined){
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
otherFileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
singleFile: singleFile,
|
||||||
|
projectId:route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('params',params)
|
||||||
|
let res = await projectApply(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Initiation'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleResubmit =async () => {
|
||||||
|
let files = []
|
||||||
|
let singleFile={}
|
||||||
|
let fileArray
|
||||||
|
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||||
|
attachment.value.validate()
|
||||||
|
} else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
if(attachment.value.singleFile!==null&&name.value === 'Initiation/edit'){
|
||||||
|
singleFile = {
|
||||||
|
fileId: attachment.value.singleFile.fileId
|
||||||
|
}
|
||||||
|
fileArray=attachment.value.allFileList
|
||||||
|
}else {
|
||||||
|
if (file.value.fileId !== undefined) {
|
||||||
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileArray=otherFileList.value
|
||||||
|
}
|
||||||
|
fileArray.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
singleFile: singleFile,
|
||||||
|
projectId:route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('params',params)
|
||||||
|
let res = await resubmitApply(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Initiation'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getDetailInfo = async () => {
|
||||||
|
getApplyDetail(route.query.projectId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
formData.value = res.data.formData
|
||||||
|
loading.value=false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const init = () => {
|
||||||
|
getApplyProcess(route.query.projectId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
processDiagramViewer.value = false
|
||||||
|
if (res.code === 1000) {
|
||||||
|
let data = res.data
|
||||||
|
deploymentId.value=data.deploymentId
|
||||||
|
processInstanceData.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
init()
|
||||||
|
onMounted(async () => {
|
||||||
|
await init()
|
||||||
|
if (name.value === 'Initiation/edit') {
|
||||||
|
loading.value=true
|
||||||
|
await getDetailInfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
183
src/views/project-management/initiation/detail.vue
Normal file
183
src/views/project-management/initiation/detail.vue
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
<template>
|
||||||
|
<steps :active="'2'" @setDetail="setDetail" @stepChange="stepChange">
|
||||||
|
<template #content>
|
||||||
|
<collection-detail
|
||||||
|
:formData="commonForm.formData"
|
||||||
|
:data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer"
|
||||||
|
:companyOption="companyOption"
|
||||||
|
v-show="showActive == '00'"
|
||||||
|
:loading="loading"
|
||||||
|
/>
|
||||||
|
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/>
|
||||||
|
<ApprovalDetail v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||||
|
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</steps>
|
||||||
|
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {getInfo} from "@/api/project-demand/index.js";
|
||||||
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||||
|
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||||
|
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||||
|
import { ElLoading } from "element-plus";
|
||||||
|
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const activeName = ref('first')
|
||||||
|
const collectionData = ref({})
|
||||||
|
const summaryData = ref({})
|
||||||
|
const collectionProcessViewer = ref(true)
|
||||||
|
const loading = ref(false)
|
||||||
|
const active = ref(route.query.state)
|
||||||
|
const summaryProcessViewer = ref(true)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const companyOption = ref([])
|
||||||
|
const rules = reactive({
|
||||||
|
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const getCompanyOption = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDemandCollectionInfo = async () => {
|
||||||
|
if (!route.query.id) return
|
||||||
|
await getCompanyOption()
|
||||||
|
collectionProcessViewer.value = false
|
||||||
|
getInfo(route.query.id).then(res => {
|
||||||
|
let data = res.data
|
||||||
|
collectionData.value = data;
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
collectionProcessViewer.value = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getDemandSummaryInfo = async () => {
|
||||||
|
if (!route.query.id) return
|
||||||
|
// await getCompanyOption()
|
||||||
|
summaryProcessViewer.value = false
|
||||||
|
getInfo(route.query.id).then(res => {
|
||||||
|
let data = res.data
|
||||||
|
summaryData.value = data;
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
summaryProcessViewer.value = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
console.log(tab, event)
|
||||||
|
if (tab.props.name === 'first') {
|
||||||
|
getDemandCollectionInfo()
|
||||||
|
} else if (tab.props.name === 'second') {
|
||||||
|
getDemandSummaryInfo()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// getDemandCollectionInfo()
|
||||||
|
|
||||||
|
const commonForm = ref({})
|
||||||
|
const commonProvessViewer = ref(true)
|
||||||
|
|
||||||
|
const getAllInfo = async (state) => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
try {
|
||||||
|
state == '00' && ( await getCompanyOption() )
|
||||||
|
commonProvessViewer.value = false
|
||||||
|
loading.value = true
|
||||||
|
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||||
|
if(state == '00') {
|
||||||
|
collectionData.value = data;
|
||||||
|
} else if(state == '10') {
|
||||||
|
summaryData.value = data;
|
||||||
|
}
|
||||||
|
if(code===1000){
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
console.log(data, 'data--22');
|
||||||
|
commonForm.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
// summaryProcessViewer.value = true
|
||||||
|
commonProvessViewer.value = true
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
} catch {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const showActive = ref()
|
||||||
|
|
||||||
|
const setDetail = (active) => {
|
||||||
|
showActive.value = active
|
||||||
|
getAllInfo(active)
|
||||||
|
}
|
||||||
|
|
||||||
|
const stepChange = (data) => {
|
||||||
|
showActive.value = data.active
|
||||||
|
getAllInfo(data.active)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail-block {
|
||||||
|
padding-top: 15px;
|
||||||
|
|
||||||
|
:deep(.el-tabs__nav-scroll) {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.el-tabs__nav {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.el-tabs__item {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-active {
|
||||||
|
color: black;
|
||||||
|
background-color: #DED0B2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.approval-record {
|
||||||
|
padding-bottom: 30px;
|
||||||
|
|
||||||
|
.process {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
230
src/views/project-management/initiation/index.vue
Normal file
230
src/views/project-management/initiation/index.vue
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {reactive, shallowRef} from "vue";
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入名称查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目类型',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目类型',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目影响',
|
||||||
|
prop: 'projectEffect',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目影响',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '研发主体',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择研发主体',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '起止时间',
|
||||||
|
prop: 'time',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择起止时间',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最小金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最大金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'projectName',
|
||||||
|
label: '名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'affiliatedCompany',
|
||||||
|
label: '所属公司',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'approveName',
|
||||||
|
label: '审批人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectType',
|
||||||
|
label: '项目类型',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'rdSubject',
|
||||||
|
label: '研发主体',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectImpact',
|
||||||
|
label: '项目影响',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'economicEstimate',
|
||||||
|
label: '经济概况',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'startTime',
|
||||||
|
label: '起止时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'taskNode',
|
||||||
|
label: '当前节点',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'state',
|
||||||
|
label: '状态',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) =>{
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = []
|
||||||
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
|
if (buttons.has("details")) {
|
||||||
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
if (buttons.has("edit")) {
|
||||||
|
btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
// if (buttons.has("delete")) {
|
||||||
|
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||||
|
// }
|
||||||
|
if (buttons.has("apply")) {
|
||||||
|
btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
v-perm={item.prem}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/workflow/mosr/project/approval',
|
||||||
|
params: {},
|
||||||
|
})
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Initiation/detail',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId,
|
||||||
|
state: row.state
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Initiation/edit',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleApply = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Initiation/apply',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -1,272 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-loading="loading" class="add-block">
|
|
||||||
<baseTitle title="需求征集信息录入"></baseTitle>
|
|
||||||
<el-form :model="formData" inline class="query-form" ref="demandForm" :rules="rules">
|
|
||||||
<div class="left-info">
|
|
||||||
<el-form-item label="名称" prop="requirementName">
|
|
||||||
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属公司" prop="companyIds">
|
|
||||||
<el-tree-select v-model="formData.companyIds" :data="companyOption" style="width: 100%;"
|
|
||||||
filterable clearable :check-strictly="true" multiple/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="征集类型" prop="collectType">
|
|
||||||
<el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in typeOption"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="截止时间" prop="deadline">
|
|
||||||
<el-config-provider>
|
|
||||||
<el-date-picker
|
|
||||||
v-model="formData.deadline"
|
|
||||||
type="datetime"
|
|
||||||
placeholder="截止时间"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
/>
|
|
||||||
</el-config-provider>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<baseTitle title="征集说明"></baseTitle>
|
|
||||||
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300"/>
|
|
||||||
<baseTitle title="申请文件"></baseTitle>
|
|
||||||
<file-upload @getFile="getFile"/>
|
|
||||||
<el-table :data="formData.fileList" style="width: 100%">
|
|
||||||
<el-table-column label="序号" type="index" align="center" width="80"/>
|
|
||||||
<el-table-column prop="originalFileName" label="文件名" align="center"/>
|
|
||||||
<el-table-column prop="tag" label="标签" align="center"/>
|
|
||||||
<el-table-column prop="size" label="文件大小" align="center">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ parseInt(scope.row.size / 1024) }}KB
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="操作">
|
|
||||||
<template #default="scope">
|
|
||||||
<a :href="scope.row.url">
|
|
||||||
下载
|
|
||||||
</a>
|
|
||||||
<el-button link type="primary" size="small" @click="beforeRemove(scope.row)">
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="approval-record">
|
|
||||||
<baseTitle title="流程"></baseTitle>
|
|
||||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
|
||||||
<!-- <div class="process" id="approvalRecord">-->
|
|
||||||
<!-- <process-tree ref="processTree" mode="view" id-name="approvalRecord"/>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
|
||||||
<div class="oper-page-btn">
|
|
||||||
<el-button color="#DED0B2" @click="handleSubmit(demandForm)">提交</el-button>
|
|
||||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
|
||||||
<el-button @click="handleBack">返回</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="jsx">
|
|
||||||
import {useAuthStore} from '@/stores/userstore.js'
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
|
||||||
import {getWorkflowInfo, addRequirement, getFormInfo, resubmit, deleteFile} from "@/api/project-demand/index.js";
|
|
||||||
import FileUpload from "@/components/FileUpload.vue";
|
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
|
||||||
import {useRoute, useRouter} from 'vue-router'
|
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
|
||||||
const authStore = useAuthStore()
|
|
||||||
const router = useRouter()
|
|
||||||
const route = useRoute()
|
|
||||||
const demandForm = ref()
|
|
||||||
const dateValue = ref()
|
|
||||||
const formData = ref({
|
|
||||||
requirementName: '',
|
|
||||||
companyIds: '',
|
|
||||||
collectType: '',
|
|
||||||
deadline: '',
|
|
||||||
collectExplain: ''
|
|
||||||
})
|
|
||||||
const processDiagramViewer = ref(false)
|
|
||||||
const typeOption = ref([
|
|
||||||
{
|
|
||||||
label: "需求征集",
|
|
||||||
value: '需求征集'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
const companyOption = ref([])
|
|
||||||
const form = ref(null)
|
|
||||||
const fileList = ref(null)
|
|
||||||
const loading = ref(false)
|
|
||||||
const processStore = useProcessStore()
|
|
||||||
const processInstanceData = ref()
|
|
||||||
const rules = reactive({
|
|
||||||
requirementName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
|
||||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
|
||||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
|
||||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
|
||||||
})
|
|
||||||
const compositeParam=(item)=>{
|
|
||||||
return {
|
|
||||||
fileId: item.id,
|
|
||||||
size: item.size,
|
|
||||||
originalFileName: item.originalFilename,
|
|
||||||
fileType: item.fileType,
|
|
||||||
url: item.url,
|
|
||||||
processNodeTag: null,
|
|
||||||
tag: formData.value.collectType,
|
|
||||||
userId: authStore.userinfo.userId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const getFile = (val) => {
|
|
||||||
console.log('上传文件',val)
|
|
||||||
let fileObj = {}
|
|
||||||
let newFileArray = []
|
|
||||||
if (route.query.isAdd === undefined) {
|
|
||||||
val.forEach(item => {
|
|
||||||
fileObj =compositeParam(item)
|
|
||||||
newFileArray.push(fileObj)
|
|
||||||
formData.value.fileList.push(fileObj)
|
|
||||||
})
|
|
||||||
fileList.value = formData.value.fileList
|
|
||||||
} else {
|
|
||||||
val.forEach(item => {
|
|
||||||
fileObj =compositeParam(item)
|
|
||||||
newFileArray.push(fileObj)
|
|
||||||
})
|
|
||||||
formData.value.fileList = newFileArray
|
|
||||||
fileList.value = newFileArray
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const init = async () => {
|
|
||||||
const res = await getSubCompOpt()
|
|
||||||
companyOption.value = res.data
|
|
||||||
getWorkflowInfo().then(res => {
|
|
||||||
let data = res.data
|
|
||||||
processInstanceData.value = data
|
|
||||||
processStore.setDesign(data)
|
|
||||||
processStore.runningList.value = data.runningList;
|
|
||||||
processStore.endList.value = data.endList;
|
|
||||||
processStore.noTakeList.value = data.noTakeList;
|
|
||||||
processStore.refuseList.value = data.refuseList;
|
|
||||||
processStore.passList.value = data.passList;
|
|
||||||
nextTick(() => {
|
|
||||||
processDiagramViewer.value = true
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSubmit = async (instance) => {
|
|
||||||
console.log('fileList.value',fileList.value)
|
|
||||||
if (!instance) return
|
|
||||||
instance.validate(async (valid) => {
|
|
||||||
if (!valid) return
|
|
||||||
let params = {
|
|
||||||
...formData.value,
|
|
||||||
requirementId: 0,
|
|
||||||
files: fileList.value,
|
|
||||||
deploymentId: processInstanceData.value.deploymentId
|
|
||||||
}
|
|
||||||
let res = await addRequirement(params)
|
|
||||||
if (res.code === 1000) {
|
|
||||||
ElMessage.success(res.msg)
|
|
||||||
await router.push({
|
|
||||||
path: '/projectdemand/demandcollection'
|
|
||||||
})
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const handleResubmit = () => {
|
|
||||||
resubmit({
|
|
||||||
...formData.value,
|
|
||||||
files: fileList.value,
|
|
||||||
deploymentId: processInstanceData.value.deploymentId
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 1000) {
|
|
||||||
ElMessage.success(res.msg)
|
|
||||||
formData.value = res.data.formData
|
|
||||||
router.push({
|
|
||||||
path: '/projectdemand/demandcollection'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const getDetailInfo = async () => {
|
|
||||||
getFormInfo(route.query.id).then(res => {
|
|
||||||
if (res.code === 1000) {
|
|
||||||
console.log(res)
|
|
||||||
ElMessage.success(res.msg)
|
|
||||||
formData.value = res.data
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleBack = () => {
|
|
||||||
history.back()
|
|
||||||
}
|
|
||||||
const beforeRemove = (row) => {
|
|
||||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
handleRemove(row)
|
|
||||||
}).catch(() => {
|
|
||||||
ElMessage.warning("用户取消删除! ");
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleRemove = (row) => {
|
|
||||||
deleteFile(row.fileId).then(res => {
|
|
||||||
if (res.code === 1000) {
|
|
||||||
ElMessage.success("删除成功");
|
|
||||||
fileList.value.splice(fileList.value.findIndex((item) => item.id === row.id), 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
onMounted(async () => {
|
|
||||||
loading.value = true
|
|
||||||
await init()
|
|
||||||
if (route.query.id) {
|
|
||||||
await getDetailInfo()
|
|
||||||
}
|
|
||||||
loading.value = false
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
.add-block {
|
|
||||||
//display: flex;
|
|
||||||
//justify-content: space-between;
|
|
||||||
overflow-x: hidden;
|
|
||||||
overflow-y: auto;
|
|
||||||
|
|
||||||
a {
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #2a99ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.approval-record {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,221 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-block">
|
|
||||||
<el-form :model="formData" label-width="auto">
|
|
||||||
<baseTitle title="需求征集详情"></baseTitle>
|
|
||||||
<div class="left-info">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="名称">
|
|
||||||
<span>{{ formData.requirementName }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="所属公司">
|
|
||||||
<span>{{ formData.companyIds }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="征集类型">
|
|
||||||
<span>{{ formData.collectType }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="截止时间">
|
|
||||||
<span>{{ formData.deadline }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<baseTitle title="征集说明"></baseTitle>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<el-card style="width: 100%">
|
|
||||||
<div v-html="formData.collectExplain">
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<baseTitle title="附件列表"></baseTitle>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<el-table :data="formData.fileList" style="width: 100%">
|
|
||||||
<el-table-column label="序号" type="index" align="center" width="80"/>
|
|
||||||
<el-table-column prop="originalFileName" label="文件名" align="center"/>
|
|
||||||
<el-table-column prop="tag" label="标签" align="center"/>
|
|
||||||
<el-table-column prop="size" label="文件大小" align="center">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ parseInt(scope.row.size / 1024) }}KB
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="操作">
|
|
||||||
<template #default="scope">
|
|
||||||
<a :href="scope.row.url">
|
|
||||||
下载
|
|
||||||
</a>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<div v-if="processInstanceData.taskId">
|
|
||||||
<baseTitle title="审核意见"></baseTitle>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input
|
|
||||||
v-model="auditOpinion"
|
|
||||||
:rows="3"
|
|
||||||
type="textarea"
|
|
||||||
placeholder="请输入审核意见"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<div class="approval-record">
|
|
||||||
<baseTitle title="审批记录"></baseTitle>
|
|
||||||
<div class="process">
|
|
||||||
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
|
|
||||||
:state="processInstanceData.state"/>
|
|
||||||
<process-diagram-viewer v-if="processDiagramViewer"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
|
||||||
<el-button @click="handleReject">驳回</el-button>
|
|
||||||
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="jsx">
|
|
||||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
|
||||||
import {getInfo, agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
|
||||||
import {ElMessage} from "element-plus";
|
|
||||||
import {useRouter} from "vue-router";
|
|
||||||
const router = useRouter()
|
|
||||||
const route = useRoute()
|
|
||||||
const form = ref();
|
|
||||||
const processStore = useProcessStore()
|
|
||||||
const companyOption = ref([])
|
|
||||||
const processInstanceData = ref({})
|
|
||||||
const processDiagramViewer = ref(false)
|
|
||||||
const processTree = ref()
|
|
||||||
const companyNameArray = ref([])
|
|
||||||
const formData = ref({})
|
|
||||||
const auditOpinion = ref('')
|
|
||||||
const handleSubmit = () => {
|
|
||||||
let approve = {
|
|
||||||
taskId: processInstanceData.value.taskId,
|
|
||||||
auditOpinion: auditOpinion.value,
|
|
||||||
formData: formData.value
|
|
||||||
}
|
|
||||||
agreeTask(approve).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const handleReject = () => {
|
|
||||||
let approve = {
|
|
||||||
taskId: processInstanceData.value.taskId,
|
|
||||||
auditOpinion: auditOpinion.value,
|
|
||||||
}
|
|
||||||
rejectTask(approve).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.code === 1000) {
|
|
||||||
ElMessage.success(res.msg)
|
|
||||||
router.push({
|
|
||||||
path: '/projectdemand/demandcollection'
|
|
||||||
})
|
|
||||||
}else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const getCompanyOption = async () => {
|
|
||||||
const res = await getSubCompOpt()
|
|
||||||
companyOption.value = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
const matterTree = (data, id) => {
|
|
||||||
if(id){
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
if (data[i].value == id) {
|
|
||||||
companyNameArray.value.push(data[i].label);
|
|
||||||
}
|
|
||||||
if (data[i].children && data[i].children.length > 0) {
|
|
||||||
matterTree(data[i].children)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return companyNameArray.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDataSourceOptionItem = (val) => {
|
|
||||||
if (val !== undefined) {
|
|
||||||
val.forEach(item => {
|
|
||||||
matterTree(companyOption.value,item)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return companyNameArray.value.join(',');
|
|
||||||
}
|
|
||||||
const init = async () => {
|
|
||||||
await getCompanyOption()
|
|
||||||
getInfo(route.query.id).then(res => {
|
|
||||||
let data = res.data
|
|
||||||
formData.value = data.formData;
|
|
||||||
data.formData.companyIds= getDataSourceOptionItem(data.formData.companyIds)
|
|
||||||
processInstanceData.value = data
|
|
||||||
processStore.setDesign(data)
|
|
||||||
processStore.runningList.value = data.runningList;
|
|
||||||
processStore.endList.value = data.endList;
|
|
||||||
processStore.noTakeList.value = data.noTakeList;
|
|
||||||
processStore.refuseList.value = data.refuseList;
|
|
||||||
processStore.passList.value = data.passList;
|
|
||||||
nextTick(() => {
|
|
||||||
processDiagramViewer.value = true
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
init()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
a {
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #2a99ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-block {
|
|
||||||
overflow: hidden;
|
|
||||||
padding-right: 10px;
|
|
||||||
|
|
||||||
.left-info {
|
|
||||||
.info {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
> div {
|
|
||||||
width: 350px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
margin-right: 10px;
|
|
||||||
|
|
||||||
> span:first-child {
|
|
||||||
color: black;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.approval-record {
|
|
||||||
padding-bottom: 30px;
|
|
||||||
.process {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
<template>
|
|
||||||
<fvForm :schema="schame" @getInstance="getInstance"></fvForm>
|
|
||||||
<div class="oper-page-btn">
|
|
||||||
<el-button type="primary" @click="staging">存为草稿</el-button>
|
|
||||||
<el-button type="primary" @click="handleSubmit">发布</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="jsx">
|
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
|
||||||
import { markRaw } from 'vue';
|
|
||||||
import FileUpload from './components/FileUpload.vue';
|
|
||||||
|
|
||||||
const localData = reactive({
|
|
||||||
form: null
|
|
||||||
})
|
|
||||||
|
|
||||||
const schame = computed(()=>{
|
|
||||||
let arr = [
|
|
||||||
{
|
|
||||||
label: '名称',
|
|
||||||
prop: 'name',
|
|
||||||
component: 'el-input',
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '开始时间',
|
|
||||||
prop: 'startTime',
|
|
||||||
component: 'el-date-picker',
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '所属公司',
|
|
||||||
prop: 'company',
|
|
||||||
component: 'el-input',
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '项目类型',
|
|
||||||
prop: 'projectType',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '结束时间',
|
|
||||||
prop: 'endTime',
|
|
||||||
component: 'el-date-picker',
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '出资类型',
|
|
||||||
prop: 'monenyType',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '项目影响',
|
|
||||||
prop: 'projectEffect',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '所属业务板块',
|
|
||||||
prop: 'ywbank',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '预期成果形式',
|
|
||||||
prop: 'yuqichengg',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '预期技术标准制定',
|
|
||||||
prop: 'yuqizhidingbiaozhu',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '产学研联合',
|
|
||||||
prop: 'chanxue',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '开展政府申报',
|
|
||||||
prop: 'zhengfushenbao',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '知识产权状况',
|
|
||||||
prop: 'zhishichanquan',
|
|
||||||
component: markRaw(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '现有业务描述',
|
|
||||||
prop: 'yewudes',
|
|
||||||
component: 'el-input',
|
|
||||||
props: {
|
|
||||||
type: 'textarea'
|
|
||||||
},
|
|
||||||
colProps: {
|
|
||||||
span: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '研发项目关键内容描述',
|
|
||||||
prop: 'contentnesss',
|
|
||||||
component: 'el-input',
|
|
||||||
props: {
|
|
||||||
type: 'textarea'
|
|
||||||
},
|
|
||||||
colProps: {
|
|
||||||
span: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
prop: 'fileList',
|
|
||||||
component: markRaw(FileUpload),
|
|
||||||
props: {
|
|
||||||
url: '',
|
|
||||||
tip: '上传txt文件'
|
|
||||||
},
|
|
||||||
colProps: {
|
|
||||||
span: 24
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
return arr
|
|
||||||
})
|
|
||||||
|
|
||||||
const getInstance = (e) => {
|
|
||||||
localData.form = e
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSubmit = async () => {}
|
|
||||||
|
|
||||||
const staging = async () => {}
|
|
||||||
</script>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export const fileUp = (url, data) => {
|
|
||||||
return request({
|
|
||||||
url,
|
|
||||||
method: 'post',
|
|
||||||
data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'multipart/form-data'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="jsx">
|
|
||||||
import { reactive, ref, shallowRef } from 'vue';
|
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
|
|
||||||
const localData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
const tableIns= ref()
|
|
||||||
const router = useRouter()
|
|
||||||
|
|
||||||
|
|
||||||
const searchConfig = reactive([
|
|
||||||
{
|
|
||||||
label: '名称',
|
|
||||||
prop: 'name',
|
|
||||||
props: {
|
|
||||||
placeholder: '请输入'
|
|
||||||
},
|
|
||||||
component: 'el-input',
|
|
||||||
colProps: {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '项目类型',
|
|
||||||
prop: 'projectType',
|
|
||||||
component: shallowRef(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '研发主体',
|
|
||||||
prop: 'productMainBody',
|
|
||||||
component: shallowRef(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '项目影响',
|
|
||||||
prop: 'projectEffect',
|
|
||||||
component: shallowRef(fvSelect),
|
|
||||||
props: {},
|
|
||||||
colProps: {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '起止时间',
|
|
||||||
prop: 'time',
|
|
||||||
component: 'el-date-picker',
|
|
||||||
props: {},
|
|
||||||
colProps: {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '最小金额',
|
|
||||||
prop: 'minMoney',
|
|
||||||
component: 'el-input',
|
|
||||||
colProps: {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '最大金额',
|
|
||||||
prop: 'maxMoney',
|
|
||||||
component: 'el-input',
|
|
||||||
colProps: {}
|
|
||||||
},
|
|
||||||
])
|
|
||||||
|
|
||||||
const tableConfig = reactive({
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
type: 'selection',
|
|
||||||
prop: 'selection'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '名称',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'company',
|
|
||||||
label: '所属公司',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'projectType',
|
|
||||||
label: '项目类型',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'productMainBody',
|
|
||||||
label: '研发主体',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'projectEffect',
|
|
||||||
label: '项目影响',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'survey',
|
|
||||||
label: '经营概况',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'time',
|
|
||||||
label: '起止时间',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'status',
|
|
||||||
label: '发布状态',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'oper',
|
|
||||||
label: '操作',
|
|
||||||
align: 'center',
|
|
||||||
currentRender: ({row, index}) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<el-button type={'primary'} link onClick={()=>{}} >详情</el-button>
|
|
||||||
<el-button type={'primary'} link onClick={()=>{}} >上报</el-button>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
api: '',
|
|
||||||
params: {},
|
|
||||||
btns: [
|
|
||||||
{name: '新增上报', key: 'add', type: 'primary', auth: ''},
|
|
||||||
{name: '年度计划导出', key: '_export', type: 'primary', auth: ''},
|
|
||||||
{name: '经费预算生成', key: 'preMonty', type: 'primary', auth: ''},
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
const search = (val) => {
|
|
||||||
let obj = {...val}
|
|
||||||
if(obj.time) {
|
|
||||||
obj.startTime = obj.time[0]
|
|
||||||
obj.endTime = obj.time[1]
|
|
||||||
delete obj.dateValue
|
|
||||||
}
|
|
||||||
tableConfig.params = obj
|
|
||||||
tableIns.value.refresh()
|
|
||||||
}
|
|
||||||
|
|
||||||
const headBtnClick = (key) => {
|
|
||||||
switch(key) {
|
|
||||||
case 'add': handleAdd()
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleAdd = () => {
|
|
||||||
router.push({
|
|
||||||
name: 'Demandsummaryadd',
|
|
||||||
query: {}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
17
src/views/steps/step/Step1.vue
Normal file
17
src/views/steps/step/Step1.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
步骤1
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
console.log('步骤一挂载');
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
17
src/views/steps/step/Step2.vue
Normal file
17
src/views/steps/step/Step2.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
步骤2
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
console.log('步骤一挂载');
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
17
src/views/steps/step/Step3.vue
Normal file
17
src/views/steps/step/Step3.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
步骤1
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
console.log('步骤一挂载');
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
17
src/views/steps/step/Step4.vue
Normal file
17
src/views/steps/step/Step4.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
步骤1
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
console.log('步骤一挂载');
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
17
src/views/steps/step/Step5.vue
Normal file
17
src/views/steps/step/Step5.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
步骤1
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
console.log('步骤1-5挂载');
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
39
src/views/steps/step/index.vue
Normal file
39
src/views/steps/step/index.vue
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<template>
|
||||||
|
<steps :stepList="stepList" :stepSuccess="[0,1]"></steps>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import { reactive, shallowRef } from 'vue';
|
||||||
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import Step1 from './Step1.vue'
|
||||||
|
import Step2 from './Step2.vue'
|
||||||
|
import Step3 from './Step3.vue'
|
||||||
|
import Step4 from './Step4.vue'
|
||||||
|
import Step5 from './Step5.vue'
|
||||||
|
const stepList = reactive([
|
||||||
|
{
|
||||||
|
key: 'collect',
|
||||||
|
component: markRaw(Step1)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'report',
|
||||||
|
component: markRaw(Step2)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'approve',
|
||||||
|
component: markRaw(Step3)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'execute',
|
||||||
|
component: markRaw(Step4)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'archivist',
|
||||||
|
component: markRaw(Step5)
|
||||||
|
},
|
||||||
|
])
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -90,7 +90,7 @@ const schame = computed(()=>{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '角色权限',
|
label: '角色标识',
|
||||||
prop: 'roleKey',
|
prop: 'roleKey',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ const tableConfig = reactive({
|
|||||||
prop: 'template',
|
prop: 'template',
|
||||||
label: '是否为模版角色',
|
label: '是否为模版角色',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'yes_no'} value={row.template ? '1' : '0'} />)
|
currentRender: ({row, index}) => (<Tag dictType={'yes_no'} value={row.template ? '1' : '0'} />)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -122,6 +123,7 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'state',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
|
showOverflowTooltip: false,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'normal_disable'} value={row.state} />)
|
currentRender: ({row, index}) => (<Tag dictType={'normal_disable'} value={row.state} />)
|
||||||
},
|
},
|
||||||
@@ -147,7 +149,7 @@ const tableConfig = reactive({
|
|||||||
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div>
|
||||||
{
|
{
|
||||||
btn.map(item=>(
|
btn.map(item=>(
|
||||||
<el-button
|
<el-button
|
||||||
|
|||||||
@@ -40,10 +40,10 @@
|
|||||||
<el-table-column prop="updateTime" label="更新时间" align="center"/>
|
<el-table-column prop="updateTime" label="更新时间" align="center"/>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" size="mini" v-perm="['rapid:regular:edit']"
|
<el-button type="primary" size="mini"
|
||||||
@click="handleApprove(scope.row)" link>发起流程
|
@click="handleApprove(scope.row)" link>发起流程
|
||||||
</el-button>
|
</el-button>
|
||||||
<popover-delete :name="scope.row.deploymentName" :type="'流程'" :perm="['rapid:regular:del']"
|
<popover-delete :name="scope.row.deploymentName" :type="'流程'"
|
||||||
@delete="handleDelete(scope.row.id)"/>
|
@delete="handleDelete(scope.row.id)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -10,53 +10,15 @@
|
|||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
|
<!-- <avatar-ellipsis :row="3" v-if="operation.userInfo.length > 0" :user-info="operation.userInfo"/>-->
|
||||||
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name">
|
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name">
|
||||||
<el-avatar size="large" :src="user.avatar"></el-avatar>
|
<name-circle :user="user"/>
|
||||||
<div v-if="!$slots.dot && operation.userInfo.length > 1"
|
|
||||||
class="el-timeline-item__node" :style="{
|
|
||||||
backgroundColor: user.color
|
|
||||||
}">
|
|
||||||
<el-icon v-if="user.icon" :class="user.class">
|
|
||||||
<component :is="user.icon"/>
|
|
||||||
</el-icon>
|
|
||||||
</div>
|
|
||||||
<el-tooltip effect="dark" :content="user.name" placement="bottom-start">
|
|
||||||
<span class="username">{{ user.name }}</span>
|
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
<template v-if="user.auditOpinion">
|
|
||||||
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
|
||||||
<div>
|
|
||||||
{{ user.auditOpinion }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 10px;">
|
<div style="margin-left: 10px;">
|
||||||
<div style="color: #c0bebe">{{ operation.operationName }}</div>
|
<div style="color: #c0bebe">{{ operation.operationName }}</div>
|
||||||
<div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
|
<div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <template v-if="operation.comment">-->
|
|
||||||
<!-- <div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">-->
|
|
||||||
<!-- <div>-->
|
|
||||||
<!-- {{ operation.comment.context }}-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div style="margin-top: 10px;"-->
|
|
||||||
<!-- v-if="operation.comment.attachments && operation.comment.attachments.length > 0">-->
|
|
||||||
<!-- <template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">-->
|
|
||||||
<!-- <el-image-->
|
|
||||||
<!-- style="width: 100px; height: 100px"-->
|
|
||||||
<!-- :src="item.url"-->
|
|
||||||
<!-- :preview-src-list="[item.url]">-->
|
|
||||||
<!-- </el-image>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <div v-for="(file) in getAttachmentList(operation.comment.attachments,false)">-->
|
|
||||||
<!-- <el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
<el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large">
|
<el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large">
|
||||||
@@ -70,7 +32,8 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {CircleCheckFilled, Close, Loading, MoreFilled} from "@element-plus/icons-vue";
|
import {CircleCheckFilled, Close, Loading, MoreFilled} from "@element-plus/icons-vue";
|
||||||
import {ref, defineProps} from 'vue'
|
import AvatarEllipsis from '../process/common/AvatarEllipsis.vue'
|
||||||
|
import NameCircle from "@/components/NameCircle.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
operationList: {
|
operationList: {
|
||||||
@@ -123,7 +86,7 @@ const init = () => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
// let operationListNew = []
|
// let operationListNew = []
|
||||||
for (let i = 0; i < props.operationList.length; i++) {
|
for (let i = 0; i < props.operationList?.length; i++) {
|
||||||
let operationNew = initOperationFun(props.operationList[i])
|
let operationNew = initOperationFun(props.operationList[i])
|
||||||
let userList = []
|
let userList = []
|
||||||
if (operationNew.userInfo) {
|
if (operationNew.userInfo) {
|
||||||
@@ -280,12 +243,13 @@ init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
.avatar_name {
|
.avatar_name {
|
||||||
width: 45px;
|
//width: 45px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-timeline-item__node {
|
.el-timeline-item__node {
|
||||||
@@ -294,12 +258,4 @@ init()
|
|||||||
right: 1px;
|
right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
|
||||||
width: 45px;
|
|
||||||
padding-top: 2px;
|
|
||||||
text-align: center;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 40px">
|
<div style="margin-top: 40px">
|
||||||
<div :style="'transform: scale('+ scale / 100 +');'">
|
<div :style="'transform: scale('+ scale / 100 +');'">
|
||||||
<div id="previewProcess">
|
<div :id="idName">
|
||||||
<process-tree :mode="mode" ref="processTreePreview" id-name="previewProcess"/>
|
<process-tree :mode="mode" ref="processTreePreview" :id-name="idName"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,6 +24,9 @@ const props = defineProps({
|
|||||||
mode: {
|
mode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'preview'
|
default: 'preview'
|
||||||
|
},idName:{
|
||||||
|
type:String,
|
||||||
|
default:'previewProcess'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ const loadInitFrom = () => {
|
|||||||
let design = {
|
let design = {
|
||||||
processDefinitionKey: 'pro' + getRandomId(),
|
processDefinitionKey: 'pro' + getRandomId(),
|
||||||
deploymentName: "未命名表单",
|
deploymentName: "未命名表单",
|
||||||
|
processKey: '',
|
||||||
// logo: {
|
// logo: {
|
||||||
// icon: "el-icon-eleme",
|
// icon: "el-icon-eleme",
|
||||||
// background: "#1e90ff"
|
// background: "#1e90ff"
|
||||||
@@ -190,7 +191,7 @@ const getRandomId = () => {
|
|||||||
d = Math.floor(d / 16)
|
d = Math.floor(d / 16)
|
||||||
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
|
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
|
||||||
})
|
})
|
||||||
return 'node_' + id
|
return id
|
||||||
}
|
}
|
||||||
|
|
||||||
const getProcessInfo = async () => {
|
const getProcessInfo = async () => {
|
||||||
|
|||||||
@@ -1,13 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-input v-model="processData.deploymentName" placeholder="请输入流程名称" />
|
<el-input v-model="processData.deploymentName" placeholder="请输入流程名称"/>
|
||||||
流程设置{{ processData.deploymentName }}
|
<!-- <div v-if="!processData.processDefinitionKey">-->
|
||||||
|
<el-select v-model="processData.processKey" placeholder="请选择流程环节">
|
||||||
|
<el-option v-for="item in optionList" :label="item.label" :value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div v-else>-->
|
||||||
|
<!-- {{processData.processName}}-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
流程设置{{ processData.deploymentName }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {useProcessStore} from '@/stores/processStore.js'
|
import {useProcessStore} from '@/stores/processStore.js'
|
||||||
import {computed, defineExpose} from "vue";
|
import {computed, defineExpose} from "vue";
|
||||||
|
import {getTypeOption} from "@/api/workflow/process-definition";
|
||||||
|
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
|
|
||||||
|
const optionList = ref([])
|
||||||
|
|
||||||
const processData = computed(() => {
|
const processData = computed(() => {
|
||||||
return processStore.getDesign()
|
return processStore.getDesign()
|
||||||
})
|
})
|
||||||
@@ -18,9 +31,17 @@ const validate = () => {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const init = () => {
|
||||||
|
getTypeOption().then(res => {
|
||||||
|
console.log(res)
|
||||||
|
optionList.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
validate
|
validate
|
||||||
})
|
})
|
||||||
|
init()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,8 @@
|
|||||||
<div style="display: flex;flex-wrap: wrap;">
|
<div style="display: flex;flex-wrap: wrap;">
|
||||||
<div v-for="(user,index) in userInfo" :key="index" class="avatar_name">
|
<div v-for="(user,index) in userInfo" :key="index" class="avatar_name">
|
||||||
<div class="circle-user">
|
<div class="circle-user">
|
||||||
<el-tooltip class="item" effect="dark" :content="user.name" placement="bottom-start">
|
<Tooltip :content="user.name" placement="bottom-start" width="45">
|
||||||
<span class="item_name">{{ user.name }}</span>
|
</Tooltip>
|
||||||
</el-tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="user.icon"
|
<div v-if="user.icon"
|
||||||
class="el-timeline-item__node" :style="{
|
class="el-timeline-item__node" :style="{
|
||||||
@@ -121,12 +120,4 @@ init()
|
|||||||
right: 1px;
|
right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item_name {
|
|
||||||
width: 45px;
|
|
||||||
text-align: center;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
padding-top: 3px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,19 +5,15 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="picker">
|
<div class="picker">
|
||||||
<div class="candidate" v-loading="loading">
|
<div class="candidate" v-loading="loading">
|
||||||
<div style="padding: 5px 8px;">
|
<el-input v-model="filterText" @change="getList(1)"
|
||||||
<el-input v-model="filterText" style="width: 100%;" size="small"
|
clearable placeholder="输入部门/昵称进行搜索">
|
||||||
clearable placeholder="输入关键字进行过滤" prefix-icon="el-icon-search"/>
|
<template #append>
|
||||||
<div style="margin-top: 5px">
|
<el-button @click="getList(1)">搜索</el-button>
|
||||||
<el-radio-group v-model="radio" size="mini" @change="radioChange">
|
</template>
|
||||||
<el-radio-button :label="0">角色</el-radio-button>
|
</el-input>
|
||||||
<el-radio-button :label="1">部门</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 人员选择 -->
|
<!-- 人员选择 -->
|
||||||
<el-empty :image-size="100" description="似乎没有数据" v-show="dataList.length === 0"/>
|
<el-empty :image-size="100" description="似乎没有数据" v-show="dataList.length === 0"/>
|
||||||
<el-scrollbar style="height:317px">
|
<el-scrollbar style="height:340px">
|
||||||
<div class="tree">
|
<div class="tree">
|
||||||
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
|
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
|
||||||
:default-expanded-keys="expandedKeys" lazy accordion
|
:default-expanded-keys="expandedKeys" lazy accordion
|
||||||
@@ -26,7 +22,9 @@
|
|||||||
<template #default="{ node, data }">
|
<template #default="{ node, data }">
|
||||||
<div class="tree-node">
|
<div class="tree-node">
|
||||||
<div v-if="data.type === 0" style="display: flex;align-items: center;padding: 3px 0">
|
<div v-if="data.type === 0" style="display: flex;align-items: center;padding: 3px 0">
|
||||||
<!-- <el-avatar :src="data.avatar"></el-avatar>-->
|
<el-icon>
|
||||||
|
<UserFilled/>
|
||||||
|
</el-icon>
|
||||||
{{ node.label }}
|
{{ node.label }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="data.type ===1">
|
<div v-else-if="data.type ===1">
|
||||||
@@ -55,8 +53,8 @@
|
|||||||
<div class="org-items" style="height: 350px;">
|
<div class="org-items" style="height: 350px;">
|
||||||
<el-empty :image-size="100" description="请点击左侧列表选择数据" v-show="selectList.length === 0"/>
|
<el-empty :image-size="100" description="请点击左侧列表选择数据" v-show="selectList.length === 0"/>
|
||||||
<div v-for="(selectItem, selectIndex) in selectList" :key="selectIndex" class="org-item">
|
<div v-for="(selectItem, selectIndex) in selectList" :key="selectIndex" class="org-item">
|
||||||
<!-- <el-avatar :src="selectItem.avatar" style="margin-right: 5px;"></el-avatar>-->
|
<!-- <el-avatar :src="selectItem.avatar" style="margin-right: 5px;"></el-avatar>-->
|
||||||
{{ selectItem.name}}
|
{{ selectItem.name }}
|
||||||
<i class="el-icon-close" @click="noSelected(selectItem)"></i>
|
<i class="el-icon-close" @click="noSelected(selectItem)"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -71,9 +69,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getUserTree} from "@/api/workflow/process-user";
|
|
||||||
import {computed, defineProps, defineExpose} from "vue";
|
import {computed, defineProps, defineExpose} from "vue";
|
||||||
import {ElMessageBox} from "element-plus";
|
import {ElMessageBox} from "element-plus";
|
||||||
|
import {getMosrDept} from "@/api/workflow/process-user";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
@@ -105,16 +103,19 @@ const selectList = ref([]);
|
|||||||
const filterText = ref("");
|
const filterText = ref("");
|
||||||
const dataList = ref([]);
|
const dataList = ref([]);
|
||||||
const tree = ref([]);
|
const tree = ref([]);
|
||||||
|
const isSearch = ref(false);
|
||||||
const expandedKeys = ref([]);
|
const expandedKeys = ref([]);
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
value: "value",
|
value: "value",
|
||||||
label: "name",
|
label: "name",
|
||||||
children: "children",
|
children: "children",
|
||||||
isLeaf:(data, node) => {
|
// isLeaf:(data, node) =>
|
||||||
if (node.level === 2) {
|
// {
|
||||||
return true
|
// console.log('data, node',data, node)
|
||||||
}
|
// if (node.level === 2) {
|
||||||
}
|
// return true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
};
|
};
|
||||||
const emit = defineEmits();
|
const emit = defineEmits();
|
||||||
@@ -128,30 +129,41 @@ const _value = computed({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(() => filterText, (newVal, oldVal) => {
|
watch(() => filterText.value, (newVal) => {
|
||||||
tree.value.filter(newVal);
|
console.log('filterText.value', newVal)
|
||||||
|
filterText.value = newVal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const getList = (flag) => {
|
||||||
|
let params = {}
|
||||||
|
if (flag === 1) {
|
||||||
|
isSearch.value = true;
|
||||||
|
params = {
|
||||||
|
chooseId: 0,
|
||||||
|
chooseName: filterText.value
|
||||||
|
}
|
||||||
|
selectItem = {
|
||||||
|
type: -1,
|
||||||
|
value: "0"
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
|
||||||
const radioChange = (e) => {
|
params = {
|
||||||
selectItem.type = -2;
|
chooseId: radio.value,
|
||||||
chooseId.value = 0;
|
chooseName: filterText.value
|
||||||
radio.value = e;
|
}
|
||||||
expandedKeys.value = [];
|
}
|
||||||
getList();
|
getMosrDept(params).then(res => {
|
||||||
};
|
console.log('selectItem.type', selectItem.type)
|
||||||
|
|
||||||
const getList = () => {
|
|
||||||
getUserTree(radio.value, chooseId.value).then(res => {
|
|
||||||
// if (res.data) {
|
// if (res.data) {
|
||||||
if (selectItem.type === -1 || selectItem.type === -2) {//角色/部门
|
if (selectItem.type === -1) {
|
||||||
dataList.value = res.data;
|
dataList.value = res.data;
|
||||||
} else if (selectItem.type === 1) {
|
} else if (selectItem.type === 1) {
|
||||||
selectItem.children = res.data;
|
selectItem.children = res.data;
|
||||||
if(chooseId.value!==0&&res.data.length===0){
|
if (res.data.length === 0) {
|
||||||
selectItem.children=[{
|
selectItem.children = [{
|
||||||
type:1,
|
type: 1,
|
||||||
name:'暂无数据'
|
name: '暂无数据'
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
} else if (selectItem.type === 2) {
|
} else if (selectItem.type === 2) {
|
||||||
@@ -187,16 +199,24 @@ const showUserPicker = () => {
|
|||||||
expandedKeys.value = [];
|
expandedKeys.value = [];
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
const handleChange = (item, data, node) => {
|
const handleChange = (item, data) => {
|
||||||
//渲染子节点用户或部门及用户数据
|
console.log('item', item, data)
|
||||||
selectItem = item;
|
selectItem = item;
|
||||||
if (data.expanded) {
|
if (isSearch.value && item.type !== 0) {
|
||||||
if(expandedKeys.value.indexOf(item.value)===-1){
|
filterText.value = ""
|
||||||
expandedKeys.value.push(item.value);
|
radio.value = item.id;
|
||||||
if (item.type !== 0) {
|
getList();
|
||||||
chooseId.value = item.id;
|
return;
|
||||||
getList();
|
} else if (!isSearch.value) {
|
||||||
return;
|
//渲染子节点用户或部门及用户数据
|
||||||
|
if (data.expanded) {
|
||||||
|
if (expandedKeys.value.indexOf(item.value) === -1) {
|
||||||
|
expandedKeys.value.push(item.value);
|
||||||
|
if (item.type !== 0) {
|
||||||
|
radio.value = item.id;
|
||||||
|
getList();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,7 +291,6 @@ $containWidth: 264px;
|
|||||||
.el-tree-node {
|
.el-tree-node {
|
||||||
.el-tree-node__content {
|
.el-tree-node__content {
|
||||||
//height: 45px !important;
|
//height: 45px !important;
|
||||||
|
|
||||||
.tree-node {
|
.tree-node {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,14 +50,14 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" size="mini" v-perm="['rapid:regular:edit']"
|
<el-button type="primary" size="mini"
|
||||||
@click="handleEdit(scope.row.deploymentId)" link>编辑
|
@click="handleEdit(scope.row.deploymentId)" link>编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" size="mini" v-perm="['rapid:regular:edit']"
|
<!-- <el-button type="primary" size="mini"-->
|
||||||
@click="viewHistoricalVersion(scope.row)" link>历史
|
<!-- @click="viewHistoricalVersion(scope.row)" link>历史-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<popover-delete :name="scope.row.version" :type="'版本'" :perm="['rapid:regular:del']"
|
<!-- <popover-delete :name="scope.row.version" :type="'版本'"-->
|
||||||
@delete="handleDelete(scope.row.deploymentId)"/>
|
<!-- @delete="handleDelete(scope.row.deploymentId)"/>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -69,8 +69,15 @@ export default defineConfig({
|
|||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api/workflow': {
|
'/api/workflow': {
|
||||||
target: 'http://frp.feashow.cn:31800/',
|
// target: 'http://frp.feashow.cn:31800/',
|
||||||
// target: 'http://clay.frp.feashow.cn/',
|
target: 'http://clay.frp.feashow.cn/',
|
||||||
|
// target: 'http://192.168.31.175:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
},
|
||||||
|
'/api/admin': {
|
||||||
|
// target: 'http://frp.feashow.cn:31800/',
|
||||||
|
target: 'http://clay.frp.feashow.cn/',
|
||||||
// target: 'http://192.168.31.175:8000',
|
// target: 'http://192.168.31.175:8000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '')
|
rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user