Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f1ff3a466 | ||
|
|
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 |
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
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"
|
||||||
>
|
>
|
||||||
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -37,6 +38,10 @@ const props = defineProps({
|
|||||||
maxSize: {
|
maxSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30
|
default: 30
|
||||||
|
},
|
||||||
|
showFileList: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -75,7 +80,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>
|
||||||
|
|||||||
@@ -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 :type="btnType" size="mini" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain">
|
||||||
{{ btnText }}
|
{{ btnText }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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">-->
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
301
src/views/project-demand/collection/add.vue
Normal file
301
src/views/project-demand/collection/add.vue
Normal file
@@ -0,0 +1,301 @@
|
|||||||
|
<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"
|
||||||
|
v-if="showTinymce"/>
|
||||||
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
|
<file-upload ref="uploadFile" @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} 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: '',
|
||||||
|
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 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>
|
||||||
|
<a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
|
||||||
|
<el-button type="primary" size="large" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
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 => {
|
||||||
|
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 submitParam=()=>{
|
||||||
|
return {
|
||||||
|
collectExplain: formData.value.collectExplain,
|
||||||
|
collectType: formData.value.collectType,
|
||||||
|
companyIds: formData.value.companyIds,
|
||||||
|
deadline: formData.value.deadline,
|
||||||
|
requirementId: formData.value.requirementId?formData.value.requirementId:0,
|
||||||
|
requirementName: formData.value.requirementName,
|
||||||
|
files: formData.value.fileList,
|
||||||
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
let res = await addRequirement(submitParam())
|
||||||
|
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()).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>
|
||||||
261
src/views/project-demand/collection/detail.vue
Normal file
261
src/views/project-demand/collection/detail.vue
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block">
|
||||||
|
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||||
|
<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>
|
||||||
|
<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="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} from "@/api/project-demand/index.js";
|
||||||
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const form = ref();
|
||||||
|
const demandForm = ref()
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const companyOption = ref([])
|
||||||
|
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 (<a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
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 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 () => {
|
||||||
|
if (!route.query.id) return;
|
||||||
|
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
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
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>
|
||||||
157
src/views/project-demand/collection/index.vue
Normal file
157
src/views/project-demand/collection/index.vue
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
<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">
|
||||||
|
import Tag from '@/components/Tag.vue'
|
||||||
|
import fvSelect from '@/fvcomponents/fvSelect/index.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,
|
||||||
|
cacheKey: 'todo_type'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
prop: 'selection'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'requirementName',
|
||||||
|
label: '需求名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'collectType',
|
||||||
|
label: '征集类型',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'approveName',
|
||||||
|
label: '审批人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'deadline',
|
||||||
|
label: '截止时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'taskNode',
|
||||||
|
label: '当前节点',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'state',
|
||||||
|
label: '状态',
|
||||||
|
align: 'center',
|
||||||
|
width: 200,
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||||
|
if (row.state === '3' || row.state === '2') {
|
||||||
|
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||||
|
btn.push({label: '删除', func: () => handleDelete(row), type: 'danger'})
|
||||||
|
} else if (row.state === '4') {
|
||||||
|
btn.push({label: '上报', func: () => handleReport(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
// v-perm={item.auth}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/workflow/mosr/requirement',
|
||||||
|
btns: [
|
||||||
|
{name: '新增', key: 'add', color: '#DED0B2'},
|
||||||
|
{name: '导出', key: 'export', type: ''},
|
||||||
|
],
|
||||||
|
params: {}
|
||||||
|
})
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
const handleAdd = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'Collection/add',
|
||||||
|
query: {
|
||||||
|
isAdd: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Collection/edit',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Collection/detail',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const headBtnClick = (key) => {
|
||||||
|
switch (key) {
|
||||||
|
case 'add':
|
||||||
|
handleAdd()
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
handleExport()
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
182
src/views/project-demand/summary/add.vue
Normal file
182
src/views/project-demand/summary/add.vue
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
<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>
|
||||||
12
src/views/project-demand/summary/api/index.js
Normal file
12
src/views/project-demand/summary/api/index.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export const fileUp = (url, data) => {
|
||||||
|
return request({
|
||||||
|
url,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
75
src/views/project-demand/summary/components/FileUpload.vue
Normal file
75
src/views/project-demand/summary/components/FileUpload.vue
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<el-upload
|
||||||
|
ref="uploadRef"
|
||||||
|
class="upload-demo"
|
||||||
|
v-bind="$attrs"
|
||||||
|
drag
|
||||||
|
:action="url"
|
||||||
|
multiple
|
||||||
|
:on-change="change"
|
||||||
|
:on-progress="progress"
|
||||||
|
:on-remove="remove"
|
||||||
|
:before-remove="beforeRemove"
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
:http-request="uploadRequest"
|
||||||
|
style="width: 50%;"
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||||
|
<div class="el-upload__text">
|
||||||
|
拖拽上传/<em>点击上传</em>
|
||||||
|
</div>
|
||||||
|
<template #tip>
|
||||||
|
<div class="el-upload__tip">
|
||||||
|
{{ tip }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import { reactive, ref } from 'vue';
|
||||||
|
import { fileUp } from '../api';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
tip: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const fileList = ref([])
|
||||||
|
const uploadRef = ref()
|
||||||
|
|
||||||
|
const localData = reactive({
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
const change = (file, files) => {
|
||||||
|
console.log(file, 'file');
|
||||||
|
}
|
||||||
|
|
||||||
|
const progress = (UploadProgressEvent, UploadFile, UploadFiles) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const remove = (file, files) => {}
|
||||||
|
|
||||||
|
const beforeRemove = (file, files) => {}
|
||||||
|
|
||||||
|
const uploadRequest = (UploadRequestOptions) => {
|
||||||
|
console.log(UploadRequestOptions, 'UploadRequestOptions');
|
||||||
|
// UploadRequestOptions.data = {}
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', UploadRequestOptions.file)
|
||||||
|
// formData.append('params', UploadRequestOptions.data)
|
||||||
|
fileUp(url, formData)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
168
src/views/project-demand/summary/index.vue
Normal file
168
src/views/project-demand/summary/index.vue
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
<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: 'Summary/add',
|
||||||
|
query: {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
15
src/views/project-management/filing/index.vue
Normal file
15
src/views/project-management/filing/index.vue
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
项目归档
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "index"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
90
src/views/project-management/implementation/account.vue
Normal file
90
src/views/project-management/implementation/account.vue
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||||
|
<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: '_export', color: '#DED0B2',auth: ''}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
79
src/views/project-management/implementation/attachment.vue
Normal file
79
src/views/project-management/implementation/attachment.vue
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<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";
|
||||||
|
|
||||||
|
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>
|
||||||
|
<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 showTable=ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const getOtherFile = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
138
src/views/project-management/implementation/check.vue
Normal file
138
src/views/project-management/implementation/check.vue
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<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-col :span="24">
|
||||||
|
<el-form-item label="项目验收附件" prop="attachment">
|
||||||
|
<file-upload @getFile="getAttachment" :showFileList="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="其他文件">
|
||||||
|
<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>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import FileUpload from "@/components/FileUpload.vue";
|
||||||
|
|
||||||
|
const formData = ref({})
|
||||||
|
const rules = reactive({
|
||||||
|
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const fileList = ref(null)
|
||||||
|
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 compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
processNodeTag: null,
|
||||||
|
tag: formData.value.collectType
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
console.log('上传文件', val)
|
||||||
|
showTable.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
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 getOtherFile = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleSubmit = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
49
src/views/project-management/implementation/detail.vue
Normal file
49
src/views/project-management/implementation/detail.vue
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block">
|
||||||
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
type="card"
|
||||||
|
class="demo-tabs"
|
||||||
|
@tab-click="handleClick"
|
||||||
|
>
|
||||||
|
<el-tab-pane label="需求征集" name="first">
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
|
||||||
|
<el-tab-pane label="项目立项" name="third" ></el-tab-pane>
|
||||||
|
<el-tab-pane label="项目实施" name="third" :disabled="true"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const activeName = ref('first')
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
console.log(tab, event)
|
||||||
|
if(tab.index.value === 0){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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>
|
||||||
195
src/views/project-management/implementation/index.vue
Normal file
195
src/views/project-management/implementation/index.vue
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
<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: [
|
||||||
|
{
|
||||||
|
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',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||||
|
if (row.state === '3') {
|
||||||
|
btn.push({label: '验收', func: () => handleCheck(row), type: 'primary'})
|
||||||
|
} else if (row.state === '4') {
|
||||||
|
btn.push({label: '台账', func: () => handleStandingBook(row), type: 'primary'})
|
||||||
|
btn.push({label: '附件', func: () => handleAttachment(row), type: 'primary'})
|
||||||
|
btn.push({label: '分摊', func: () => handleShare(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
// v-perm={item.auth}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '',
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
93
src/views/project-management/implementation/share.vue
Normal file
93
src/views/project-management/implementation/share.vue
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<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'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '',
|
||||||
|
params: {},
|
||||||
|
btns: [
|
||||||
|
{name: '生成分摊报表', key: '_export', color: '#DED0B2',auth: ''}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
138
src/views/project-management/initiation/apply.vue
Normal file
138
src/views/project-management/initiation/apply.vue
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<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-col :span="24">
|
||||||
|
<el-form-item label="项目立项附件" prop="attachment">
|
||||||
|
<file-upload @getFile="getAttachment" :showFileList="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="其他文件">
|
||||||
|
<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>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import FileUpload from "@/components/FileUpload.vue";
|
||||||
|
|
||||||
|
const formData = ref({})
|
||||||
|
const rules = reactive({
|
||||||
|
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const fileList = ref(null)
|
||||||
|
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 compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
processNodeTag: null,
|
||||||
|
tag: formData.value.collectType
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
console.log('上传文件', val)
|
||||||
|
showTable.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
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 getOtherFile = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleSubmit = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
48
src/views/project-management/initiation/detail.vue
Normal file
48
src/views/project-management/initiation/detail.vue
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block">
|
||||||
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
type="card"
|
||||||
|
class="demo-tabs"
|
||||||
|
@tab-click="handleClick"
|
||||||
|
>
|
||||||
|
<el-tab-pane label="需求征集" name="first">
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
|
||||||
|
<el-tab-pane label="项目立项" name="third" :disabled="true"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const activeName = ref('first')
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
console.log(tab, event)
|
||||||
|
if(tab.index.value === 0){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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>
|
||||||
202
src/views/project-management/initiation/index.vue
Normal file
202
src/views/project-management/initiation/index.vue
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
<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: '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',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||||
|
if (row.state === '3') {
|
||||||
|
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||||
|
} else if (row.state === '4') {
|
||||||
|
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
// v-perm={item.auth}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '',
|
||||||
|
params: {},
|
||||||
|
})
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Initiation/detail',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Initiation/edit',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleApply = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Initiation/apply',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -33,29 +33,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<baseTitle title="征集说明"></baseTitle>
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300"/>
|
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300" v-if="showTinymce"/>
|
||||||
<baseTitle title="申请文件"></baseTitle>
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
<file-upload @getFile="getFile"/>
|
<file-upload @getFile="getFile"/>
|
||||||
<el-table :data="formData.fileList" style="width: 100%">
|
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig" :data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
<el-table-column label="序号" type="index" align="center" width="80"/>
|
<template #empty>
|
||||||
<el-table-column prop="originalFileName" label="文件名" align="center"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
<el-table-column prop="tag" label="标签" align="center"/>
|
</template>
|
||||||
<el-table-column prop="size" label="文件大小" align="center">
|
</fvTable>
|
||||||
<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">
|
<div class="approval-record">
|
||||||
<baseTitle title="流程"></baseTitle>
|
<baseTitle title="流程"></baseTitle>
|
||||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
@@ -95,6 +80,7 @@ const formData = ref({
|
|||||||
deadline: '',
|
deadline: '',
|
||||||
collectExplain: ''
|
collectExplain: ''
|
||||||
})
|
})
|
||||||
|
const showTinymce = ref(false)
|
||||||
const processDiagramViewer = ref(false)
|
const processDiagramViewer = ref(false)
|
||||||
const typeOption = ref([
|
const typeOption = ref([
|
||||||
{
|
{
|
||||||
@@ -106,6 +92,7 @@ const companyOption = ref([])
|
|||||||
const form = ref(null)
|
const form = ref(null)
|
||||||
const fileList = ref(null)
|
const fileList = ref(null)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
const showTable = ref(false)
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const processInstanceData = ref()
|
const processInstanceData = ref()
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
@@ -114,6 +101,48 @@ const rules = reactive({
|
|||||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||||
deadline: [{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>
|
||||||
|
<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 compositeParam=(item)=>{
|
const compositeParam=(item)=>{
|
||||||
return {
|
return {
|
||||||
fileId: item.id,
|
fileId: item.id,
|
||||||
@@ -128,6 +157,10 @@ const compositeParam=(item)=>{
|
|||||||
}
|
}
|
||||||
const getFile = (val) => {
|
const getFile = (val) => {
|
||||||
console.log('上传文件',val)
|
console.log('上传文件',val)
|
||||||
|
showTable.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
let fileObj = {}
|
let fileObj = {}
|
||||||
let newFileArray = []
|
let newFileArray = []
|
||||||
if (route.query.isAdd === undefined) {
|
if (route.query.isAdd === undefined) {
|
||||||
@@ -145,6 +178,7 @@ const getFile = (val) => {
|
|||||||
formData.value.fileList = newFileArray
|
formData.value.fileList = newFileArray
|
||||||
fileList.value = newFileArray
|
fileList.value = newFileArray
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
@@ -166,7 +200,6 @@ const init = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
console.log('fileList.value',fileList.value)
|
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
@@ -179,10 +212,10 @@ const handleSubmit = async (instance) => {
|
|||||||
let res = await addRequirement(params)
|
let res = await addRequirement(params)
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
await router.push({
|
|
||||||
path: '/projectdemand/demandcollection'
|
|
||||||
})
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Collection'
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg)
|
ElMessage.error(res.msg)
|
||||||
}
|
}
|
||||||
@@ -196,9 +229,9 @@ const handleResubmit = () => {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
formData.value = res.data.formData
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandcollection'
|
name: 'Collection'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg)
|
ElMessage.error(res.msg)
|
||||||
@@ -211,6 +244,10 @@ const getDetailInfo = async () => {
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
|
showTinymce.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTinymce.value = true
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg)
|
ElMessage.error(res.msg)
|
||||||
}
|
}
|
||||||
@@ -246,13 +283,18 @@ onMounted(async () => {
|
|||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
await getDetailInfo()
|
await getDetailInfo()
|
||||||
}
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-empty__description){
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
.add-block {
|
.add-block {
|
||||||
//display: flex;
|
//display: flex;
|
||||||
//justify-content: space-between;
|
//justify-content: space-between;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail-block">
|
<div class="detail-block">
|
||||||
<el-form :model="formData" label-width="auto">
|
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||||
<baseTitle title="需求征集详情"></baseTitle>
|
<baseTitle title="需求征集详情"></baseTitle>
|
||||||
<div class="left-info">
|
<div class="left-info">
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -36,31 +36,20 @@
|
|||||||
<baseTitle title="附件列表"></baseTitle>
|
<baseTitle title="附件列表"></baseTitle>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-table :data="formData.fileList" style="width: 100%">
|
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
<el-table-column label="序号" type="index" align="center" width="80"/>
|
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
<el-table-column prop="originalFileName" label="文件名" align="center"/>
|
<template #empty>
|
||||||
<el-table-column prop="tag" label="标签" align="center"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
<el-table-column prop="size" label="文件大小" align="center">
|
</template>
|
||||||
<template #default="scope">
|
</fvTable>
|
||||||
{{ 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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div v-if="processInstanceData.taskId">
|
<div v-if="processInstanceData.taskId">
|
||||||
<baseTitle title="审核意见"></baseTitle>
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
<el-form-item>
|
<el-form-item prop="auditOpinion">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="auditOpinion"
|
v-model="formData.auditOpinion"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
placeholder="请输入审核意见"
|
placeholder="请输入审核意见"
|
||||||
@@ -80,7 +69,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||||
<el-button @click="handleReject">驳回</el-button>
|
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
||||||
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -94,51 +83,105 @@ import {getInfo, agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
|||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const form = ref();
|
const form = ref();
|
||||||
|
const demandForm = ref()
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const companyOption = ref([])
|
const companyOption = ref([])
|
||||||
const processInstanceData = ref({})
|
const processInstanceData = ref({})
|
||||||
|
const showTable = ref(false)
|
||||||
const processDiagramViewer = ref(false)
|
const processDiagramViewer = ref(false)
|
||||||
const processTree = ref()
|
const processTree = ref()
|
||||||
const companyNameArray = ref([])
|
const companyNameArray = ref([])
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const auditOpinion = 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 (<a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
let approve = {
|
let approve = {
|
||||||
taskId: processInstanceData.value.taskId,
|
taskId: processInstanceData.value.taskId,
|
||||||
auditOpinion: auditOpinion.value,
|
auditOpinion: formData.value.auditOpinion,
|
||||||
formData: formData.value
|
formData: formData.value
|
||||||
}
|
}
|
||||||
agreeTask(approve).then(res => {
|
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) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandcollection'
|
name: 'Collection'
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
ElMessage.error(res.msg)
|
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 getCompanyOption = async () => {
|
||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
companyOption.value = res.data
|
companyOption.value = res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
const matterTree = (data, id) => {
|
const matterTree = (data, id) => {
|
||||||
if(id){
|
if (id) {
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
if (data[i].value == id) {
|
if (data[i].value == id) {
|
||||||
companyNameArray.value.push(data[i].label);
|
companyNameArray.value.push(data[i].label);
|
||||||
@@ -154,17 +197,18 @@ const matterTree = (data, id) => {
|
|||||||
const getDataSourceOptionItem = (val) => {
|
const getDataSourceOptionItem = (val) => {
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
matterTree(companyOption.value,item)
|
matterTree(companyOption.value, item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return companyNameArray.value.join(',');
|
return companyNameArray.value.join(',');
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
|
if (!route.query.id) return;
|
||||||
await getCompanyOption()
|
await getCompanyOption()
|
||||||
getInfo(route.query.id).then(res => {
|
getInfo(route.query.id).then(res => {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
formData.value = data.formData;
|
formData.value = data.formData;
|
||||||
data.formData.companyIds= getDataSourceOptionItem(data.formData.companyIds)
|
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
|
||||||
processInstanceData.value = data
|
processInstanceData.value = data
|
||||||
processStore.setDesign(data)
|
processStore.setDesign(data)
|
||||||
processStore.runningList.value = data.runningList;
|
processStore.runningList.value = data.runningList;
|
||||||
@@ -174,6 +218,7 @@ const init = async () => {
|
|||||||
processStore.passList.value = data.passList;
|
processStore.passList.value = data.passList;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
|
showTable.value = true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -181,12 +226,9 @@ init()
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
a {
|
:deep(.el-empty__description){
|
||||||
cursor: pointer;
|
margin-top: 0;
|
||||||
font-size: 14px;
|
|
||||||
color: #2a99ff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-block {
|
.detail-block {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
@@ -212,6 +254,7 @@ a {
|
|||||||
|
|
||||||
.approval-record {
|
.approval-record {
|
||||||
padding-bottom: 30px;
|
padding-bottom: 30px;
|
||||||
|
|
||||||
.process {
|
.process {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<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">
|
||||||
@@ -107,7 +111,7 @@ 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: {}
|
||||||
})
|
})
|
||||||
@@ -118,7 +122,7 @@ const search = (val) => {
|
|||||||
}
|
}
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandadd',
|
path: '/project/demand/collection/add',
|
||||||
query: {
|
query: {
|
||||||
isAdd: 1
|
isAdd: 1
|
||||||
}
|
}
|
||||||
@@ -126,7 +130,7 @@ const handleAdd = () => {
|
|||||||
}
|
}
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandedit',
|
path: '/project/demand/collection/edit',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
@@ -134,7 +138,7 @@ const handleEdit = (row) => {
|
|||||||
}
|
}
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demanddetail',
|
path: '/project/demand/collection/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
@@ -145,16 +149,9 @@ const headBtnClick = (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>
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -11,24 +11,24 @@
|
|||||||
<el-card>
|
<el-card>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<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>
|
<!-- <el-avatar size="large" :src="user.avatar"></el-avatar>-->
|
||||||
<div v-if="!$slots.dot && operation.userInfo.length > 1"
|
<!-- <div v-if="!$slots.dot && operation.userInfo.length > 1"-->
|
||||||
class="el-timeline-item__node" :style="{
|
<!-- class="el-timeline-item__node" :style="{-->
|
||||||
backgroundColor: user.color
|
<!-- backgroundColor: user.color-->
|
||||||
}">
|
<!-- }">-->
|
||||||
<el-icon v-if="user.icon" :class="user.class">
|
<!-- <el-icon v-if="user.icon" :class="user.class">-->
|
||||||
<component :is="user.icon"/>
|
<!-- <component :is="user.icon"/>-->
|
||||||
</el-icon>
|
<!-- </el-icon>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<el-tooltip effect="dark" :content="user.name" placement="bottom-start">
|
<!-- <el-tooltip effect="dark" :content="user.name" placement="bottom-start">-->
|
||||||
<span class="username">{{ user.name }}</span>
|
<!-- <span class="username">{{ user.name }}</span>-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
|
<avatar-ellipsis :row="3" v-if="operation.userInfo.length > 0" :user-info="operation.userInfo"/>
|
||||||
<template v-if="user.auditOpinion">
|
<template v-if="user.auditOpinion">
|
||||||
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
<div class="username">
|
||||||
<div>
|
<el-tooltip effect="dark" :content="user.auditOpinion" placement="bottom-start">
|
||||||
{{ user.auditOpinion }}
|
<div>{{ user.auditOpinion }}</div>
|
||||||
</div>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -37,26 +37,26 @@
|
|||||||
<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">-->
|
<!-- <template v-if="operation.comment">-->
|
||||||
<!-- <div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">-->
|
<!-- <div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">-->
|
||||||
<!-- <div>-->
|
<!-- <div>-->
|
||||||
<!-- {{ operation.comment.context }}-->
|
<!-- {{ operation.comment.context }}-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- <div style="margin-top: 10px;"-->
|
<!-- <div style="margin-top: 10px;"-->
|
||||||
<!-- v-if="operation.comment.attachments && operation.comment.attachments.length > 0">-->
|
<!-- v-if="operation.comment.attachments && operation.comment.attachments.length > 0">-->
|
||||||
<!-- <template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">-->
|
<!-- <template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">-->
|
||||||
<!-- <el-image-->
|
<!-- <el-image-->
|
||||||
<!-- style="width: 100px; height: 100px"-->
|
<!-- style="width: 100px; height: 100px"-->
|
||||||
<!-- :src="item.url"-->
|
<!-- :src="item.url"-->
|
||||||
<!-- :preview-src-list="[item.url]">-->
|
<!-- :preview-src-list="[item.url]">-->
|
||||||
<!-- </el-image>-->
|
<!-- </el-image>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- <div v-for="(file) in getAttachmentList(operation.comment.attachments,false)">-->
|
<!-- <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>-->
|
<!-- <el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </template>-->
|
<!-- </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 +70,7 @@
|
|||||||
|
|
||||||
<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'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
operationList: {
|
operationList: {
|
||||||
@@ -280,12 +280,28 @@ 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;
|
||||||
|
|
||||||
|
.username {
|
||||||
|
width: 100px;
|
||||||
|
margin-top: 10px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
.el-tooltip__trigger {
|
||||||
|
width: 90px;
|
||||||
|
//padding-top: 2px;
|
||||||
|
//text-align: center;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-timeline-item__node {
|
.el-timeline-item__node {
|
||||||
@@ -294,12 +310,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>
|
||||||
|
|||||||
@@ -50,13 +50,13 @@
|
|||||||
</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>
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ 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',
|
// 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