Merge pull request 'master' (#173) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/173
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
314
src/views/project-demand/collection/add.vue
Normal file
314
src/views/project-demand/collection/add.vue
Normal file
@@ -0,0 +1,314 @@
|
|||||||
|
<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 @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: ''
|
||||||
|
})
|
||||||
|
const showTinymce = ref(false)
|
||||||
|
const processDiagramViewer = ref(false)
|
||||||
|
const typeOption = ref([
|
||||||
|
{
|
||||||
|
label: "需求征集",
|
||||||
|
value: '需求征集'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const companyOption = ref([])
|
||||||
|
const form = ref(null)
|
||||||
|
const fileList = ref(null)
|
||||||
|
const loading = ref(false)
|
||||||
|
const showTable = ref(false)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const rules = reactive({
|
||||||
|
requirementName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||||
|
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||||
|
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||||
|
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
|
||||||
|
const 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)=>{
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
processNodeTag: null,
|
||||||
|
tag: formData.value.collectType,
|
||||||
|
userId: authStore.userinfo.userId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
console.log('上传文件',val)
|
||||||
|
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 init = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
getWorkflowInfo().then(res => {
|
||||||
|
let data = res.data
|
||||||
|
processInstanceData.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSubmit = async (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
let params = {
|
||||||
|
...formData.value,
|
||||||
|
requirementId: 0,
|
||||||
|
files: fileList.value,
|
||||||
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
|
}
|
||||||
|
let res = await addRequirement(params)
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
path: '/projectdemand/demandcollection'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleResubmit = () => {
|
||||||
|
resubmit({
|
||||||
|
...formData.value,
|
||||||
|
files: fileList.value,
|
||||||
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
path: '/projectdemand/demandcollection'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getDetailInfo = async () => {
|
||||||
|
getFormInfo(route.query.id).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
console.log(res)
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
formData.value = res.data
|
||||||
|
showTinymce.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTinymce.value = true
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleBack = () => {
|
||||||
|
history.back()
|
||||||
|
}
|
||||||
|
const beforeRemove = (row) => {
|
||||||
|
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
handleRemove(row)
|
||||||
|
}).catch(() => {
|
||||||
|
ElMessage.warning("用户取消删除! ");
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRemove = (row) => {
|
||||||
|
deleteFile(row.fileId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fileList.value.splice(fileList.value.findIndex((item) => item.id === row.id), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(async () => {
|
||||||
|
loading.value = true
|
||||||
|
await init()
|
||||||
|
if (route.query.id) {
|
||||||
|
await getDetailInfo()
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
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>
|
||||||
264
src/views/project-demand/collection/detail.vue
Normal file
264
src/views/project-demand/collection/detail.vue
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block">
|
||||||
|
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||||
|
<baseTitle title="需求征集详情"></baseTitle>
|
||||||
|
<div class="left-info">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称">
|
||||||
|
<span>{{ formData.requirementName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属公司">
|
||||||
|
<span>{{ formData.companyIds }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="征集类型">
|
||||||
|
<span>{{ formData.collectType }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="截止时间">
|
||||||
|
<span>{{ formData.deadline }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item>
|
||||||
|
<el-card style="width: 100%">
|
||||||
|
<div v-html="formData.collectExplain">
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<baseTitle title="附件列表"></baseTitle>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item>
|
||||||
|
<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>
|
||||||
|
<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({
|
||||||
|
path: '/projectdemand/demandcollection'
|
||||||
|
})
|
||||||
|
} 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({
|
||||||
|
path: '/projectdemand/demandcollection'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getCompanyOption = async () => {
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
|
const matterTree = (data, id) => {
|
||||||
|
if (id) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
if (data[i].value == id) {
|
||||||
|
companyNameArray.value.push(data[i].label);
|
||||||
|
}
|
||||||
|
if (data[i].children && data[i].children.length > 0) {
|
||||||
|
matterTree(data[i].children)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return companyNameArray.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDataSourceOptionItem = (val) => {
|
||||||
|
if (val !== undefined) {
|
||||||
|
val.forEach(item => {
|
||||||
|
matterTree(companyOption.value, item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return companyNameArray.value.join(',');
|
||||||
|
}
|
||||||
|
const init = async () => {
|
||||||
|
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;
|
||||||
|
|
||||||
|
.left-info {
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
width: 350px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
|
> span:first-child {
|
||||||
|
color: black;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.approval-record {
|
||||||
|
padding-bottom: 30px;
|
||||||
|
|
||||||
|
.process {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
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>
|
||||||
15
src/views/project-management/implementation/index.vue
Normal file
15
src/views/project-management/implementation/index.vue
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
项目实施
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "index"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
12
src/views/project-management/initiation/apply.vue
Normal file
12
src/views/project-management/initiation/apply.vue
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
项目立项申请
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
12
src/views/project-management/initiation/detail.vue
Normal file
12
src/views/project-management/initiation/detail.vue
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
项目立项详情
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
12
src/views/project-management/initiation/edit.vue
Normal file
12
src/views/project-management/initiation/edit.vue
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
项目立项编辑
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</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: '/workflow/mosr/requirement',
|
||||||
|
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>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<file-upload @getFile="getFile"/>
|
<file-upload @getFile="getFile"/>
|
||||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig" :data="formData.fileList" :isSettingCol="false" :pagination="false">
|
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig" :data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="90" description="暂无待办" style="padding: 0"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
</template>
|
</template>
|
||||||
</fvTable>
|
</fvTable>
|
||||||
<div class="approval-record">
|
<div class="approval-record">
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="90" description="暂无待办" style="padding: 0"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
</template>
|
</template>
|
||||||
</fvTable>
|
</fvTable>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -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>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user