Merge pull request 'master' (#229) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/229
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>科研管理平台</title>
|
||||
<!-- <title>科研管理平台</title>-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import request from '@/utils/request.js'
|
||||
//项目立项
|
||||
export const getApplyProcess = () => {
|
||||
export const getApplyProcess = (projectId) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/initiation/process',
|
||||
method: "post"
|
||||
url: `/workflow/mosr/project/approval/initiation/process/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const projectApply = (data) => {
|
||||
@@ -49,11 +49,10 @@ export const projectCheck = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getProjectCheckProcess = (data) => {
|
||||
export const getProjectCheckProcess = (projectId) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/process',
|
||||
method: "post",
|
||||
data: data
|
||||
url: `/workflow/mosr/project/implementation/process/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -79,10 +78,9 @@ export const projectConclusion = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getProjectConclusionProcess = (data) => {
|
||||
export const getProjectConclusionProcess = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/process',
|
||||
method: "post",
|
||||
data: data
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -60,3 +60,12 @@ export function addProcessDefinition(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getTypeOption() {
|
||||
return request({
|
||||
url: "/workflow/process/definition/type/option",
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,3 +22,10 @@ export function getDepartmentTree() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getMosrDept(params) {
|
||||
return request({
|
||||
url: '/admin/mosr/user/choose',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-loading="loading">
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<!-- <AttachmentUpload></AttachmentUpload> -->
|
||||
<el-form :model="formData" label-width="auto">
|
||||
@@ -24,7 +24,7 @@
|
||||
<process-diagram-viewer v-if="processViewer" :id-name="type"/>
|
||||
</div>
|
||||
</div>
|
||||
<Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>
|
||||
<!-- <Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -60,9 +60,14 @@ const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
default: 'approval'
|
||||
}, loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
const form = ref()
|
||||
|
||||
const localData = reactive({
|
||||
@@ -119,7 +124,22 @@ const schema = computed(()=>{
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
component: ()=>(
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={()=>handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else {
|
||||
@@ -129,7 +149,22 @@ const schema = computed(()=>{
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
component: ()=>(
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={()=>handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<div class="oper">
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||
<el-button type="primary" @click="handleAgree">同意</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { ElLoading, ElNotification } from 'element-plus';
|
||||
import { agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {ElNotification} from 'element-plus';
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
type: String,
|
||||
@@ -22,10 +25,10 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const form = ref()
|
||||
const schema = computed(()=>{
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '审核意见',
|
||||
label: '',
|
||||
prop: 'auditOpinion',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
@@ -39,16 +42,29 @@ const schema = computed(()=>{
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
// {
|
||||
// "auditOpinion": "统一",
|
||||
// "formData": {"formData":""},
|
||||
// "taskId": "156e69b7-15eb-11ef-a152-f268fc747b04"
|
||||
// }
|
||||
const back = () => {
|
||||
switch (route.name) {
|
||||
case 'Initiation/detail':
|
||||
router.push({name: 'Initiation'})
|
||||
break;
|
||||
case 'Filing/detail':
|
||||
router.push({name: 'Filing'})
|
||||
break;
|
||||
case 'Implementation/detail':
|
||||
router.push({name: 'Implementation'})
|
||||
break;
|
||||
case 'Summary/detail':
|
||||
router.push({name: 'Summary'})
|
||||
break;
|
||||
case 'Requirement/detail':
|
||||
router.push({name: 'Requirement'})
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
const handleReject = async () => {
|
||||
const values = form.value.getValues()
|
||||
if(!values.auditOpinion) {
|
||||
if (!values.auditOpinion) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
@@ -56,12 +72,18 @@ const handleReject = async () => {
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log('values', values)
|
||||
const params = {
|
||||
// taskId: props.taskId,
|
||||
// formData: props.formData,
|
||||
// ...values
|
||||
taskId: props.taskId,
|
||||
...values
|
||||
}
|
||||
const res = await rejectTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
back()
|
||||
}
|
||||
|
||||
const handleAgree = async () => {
|
||||
@@ -72,9 +94,15 @@ const handleAgree = async () => {
|
||||
...values
|
||||
}
|
||||
const res = await agreeTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
back()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -161,10 +161,10 @@
|
||||
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oper-page-btn" v-if="data.state === '1' && data.taskId">
|
||||
<el-button @click="handleReject(summaryForm)">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
|
||||
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
|
||||
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
@@ -294,7 +294,6 @@ const handleDownload = (row) => {
|
||||
watch(
|
||||
() => props.formData,
|
||||
(val) => {
|
||||
console.log(val, 'ssss');
|
||||
}
|
||||
)
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button :type="btnType" size="mini" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain" :link="link">
|
||||
<el-button v-perm="perm" :type="btnType" size="mini" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain" :link="link">
|
||||
{{ btnText }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
watch(route, ()=> {
|
||||
watch(route, () => {
|
||||
getBreadcrumb()
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@ const breadcrumbList = ref([])
|
||||
const getBreadcrumb = () => {
|
||||
let matched = route.matched.filter(item => item.meta && item.meta.title)
|
||||
const first = matched[0]
|
||||
if(!isDashboard(first)) {
|
||||
if (!isDashboard(first)) {
|
||||
matched = [{path: '/home', meta: {title: '首页'}}].concat(matched)
|
||||
}
|
||||
breadcrumbList.value.length = 0;
|
||||
@@ -39,7 +39,7 @@ const getBreadcrumb = () => {
|
||||
|
||||
const isDashboard = (meta) => {
|
||||
const name = meta && meta.name
|
||||
if(!name) {
|
||||
if (!name) {
|
||||
return
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Home'.toLocaleLowerCase()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- 有子菜单 -->
|
||||
<template v-for="item in menuItem" :key="item.path">
|
||||
<el-sub-menu v-if="item?.children?.length>0 && !item.hidden" :index="item.path">
|
||||
<el-sub-menu v-if="checkMenuItem(item)" :index="item.path">
|
||||
<template #title>
|
||||
<svg-icon :name="item.icon"/>
|
||||
<span>{{ item.title }}</span>
|
||||
@@ -44,5 +44,19 @@ const handleGo = (path) => {
|
||||
}
|
||||
}
|
||||
|
||||
const checkMenuItem = (item) => {
|
||||
let children = item.children
|
||||
let childState = false;
|
||||
if (children){
|
||||
for (let child of children) {
|
||||
if (!child.hidden) {
|
||||
childState = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return item?.children?.length>0 && !item.hidden && childState
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="logo" ref="logo">
|
||||
<span v-if="!siderbarStore.isCollapse">科研管理平台</span>
|
||||
<!-- <span v-if="!siderbarStore.isCollapse">科研管理平台</span>-->
|
||||
<span v-if="!siderbarStore.isCollapse"></span>
|
||||
</div>
|
||||
<el-scrollbar :height="`calc(100vh - ${logoHeight}px)`" style="background-color: #ffffff">
|
||||
<el-menu
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
:rules="rules"
|
||||
label-width="70px"
|
||||
>
|
||||
<h2>科研管理平台</h2>
|
||||
<!-- <h2>科研管理平台</h2>-->
|
||||
<el-form-item prop="username" label="账号">
|
||||
<el-input v-model="loginForm.username" :prefix-icon="User"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import Tag from '@/components/Tag.vue'
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage} from "element-plus";
|
||||
import {deleteDemand} from "@/api/project-demand";
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -39,6 +41,7 @@ const searchConfig = reactive([
|
||||
}
|
||||
])
|
||||
const tableIns = ref()
|
||||
const userInfo = ref(authStore.userinfo)
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -55,6 +58,13 @@ const tableConfig = reactive({
|
||||
label: '征集类型',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'companyName',
|
||||
label: '所属公司',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (
|
||||
<div style={{width: '300px', textOverflow: 'ellipsis'}}>{row.companyName}</div>)
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '审批人',
|
||||
@@ -76,7 +86,7 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 200,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>)
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
@@ -84,9 +94,19 @@ const tableConfig = reactive({
|
||||
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'})
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("report")) {
|
||||
btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -94,7 +114,7 @@ const tableConfig = reactive({
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -103,8 +123,9 @@ const tableConfig = reactive({
|
||||
))
|
||||
}
|
||||
{
|
||||
row.state === '3' || row.state === '2' ?
|
||||
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} onDelete={() => handleDelete(row)}/> : ''
|
||||
buttons.has("delete") ?
|
||||
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/> : ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
@@ -119,13 +140,16 @@ const tableConfig = reactive({
|
||||
params: {}
|
||||
})
|
||||
|
||||
console.log('userInfo', userInfo.value.userName)
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const handleAdd = () => {
|
||||
//新增
|
||||
router.push({
|
||||
name: 'Collection/add',
|
||||
name: 'Requirement/add',
|
||||
query: {
|
||||
isAdd: 1
|
||||
}
|
||||
@@ -133,7 +157,7 @@ const handleAdd = () => {
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Collection/edit',
|
||||
name: 'Requirement/edit',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
@@ -151,12 +175,20 @@ const handleDelete = (row) => {
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Collection/detail',
|
||||
name: 'Requirement/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleReport = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/add',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
|
||||
@@ -46,18 +46,12 @@
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="affiliatedCompanyId">
|
||||
<el-select v-model="formData.affiliatedCompanyId" placeholder="请选择所属公司" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in companyOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">-->
|
||||
<!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"-->
|
||||
<!-- filterable clearable :check-strictly="true"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col> <el-col :span="12">-->
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
@@ -221,7 +215,8 @@
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Summary/edit'"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="name === 'Summary/edit'"/>
|
||||
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
@@ -246,12 +241,13 @@ import {useCacheStore} from '@/stores/cache.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const processStore = useProcessStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const attachment = ref()
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -267,7 +263,7 @@ const rules = reactive({
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||
affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
// affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
||||
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
||||
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
||||
@@ -290,7 +286,7 @@ const rules = reactive({
|
||||
})
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if ( name.value=== 'Summary/add'||name.value === 'Summary/edit') {
|
||||
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||
tag = '需求上报'
|
||||
}
|
||||
return {
|
||||
@@ -302,8 +298,8 @@ const compositeParam = (item, type) => {
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getEditOtherFile=(val)=>{
|
||||
console.log('getEditOtherFile',val)
|
||||
const getEditOtherFile = (val) => {
|
||||
console.log('getEditOtherFile', val)
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
@@ -363,19 +359,21 @@ const handleSubmit = async (instance) => {
|
||||
"resultForm": "3",
|
||||
"projectImpact": "3",
|
||||
"rdSubject": "3",
|
||||
"affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||
// "affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||
"serviceDescription": "3",
|
||||
"contentDescription": "3",
|
||||
"specialFundAmount": "3",
|
||||
deploymentId: deploymentId.value,
|
||||
"singleFile": singleFile,
|
||||
"files": otherFiles,
|
||||
"fileList": otherFiles,
|
||||
"requirementId":route.query.id
|
||||
}
|
||||
// ...formData.value,
|
||||
// let params = {
|
||||
// ...formData.value,
|
||||
// deploymentId: deploymentId.value,
|
||||
// fileList: files,
|
||||
// requirementId:102
|
||||
// fileList: otherFiles,
|
||||
// singleFile: singleFile,
|
||||
// requirementId: route.query.id
|
||||
// }
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
@@ -395,31 +393,31 @@ const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if(name.value === 'Summary/edit'){
|
||||
if (name.value === 'Summary/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
fileArray = attachment.value.allFileList
|
||||
} else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
fileArray = otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params={
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
console.log('重新提交params', params)
|
||||
resubmitReported(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -443,7 +441,7 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value=false
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -451,11 +449,11 @@ const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getProcessInfo().then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
@@ -474,7 +472,7 @@ const init = async () => {
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
loading.value=true
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -13,7 +13,7 @@ export const fileUp = (url, data) => {
|
||||
|
||||
export const requirementReported = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/collect/reported',
|
||||
url: '/workflow/mosr/requirement/reported',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
@@ -21,7 +21,7 @@ export const requirementReported = (data) => {
|
||||
export const getProcessInfo = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/collect/process',
|
||||
method: "post"
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getDetail = (projectId) => {
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
<template>
|
||||
<steps :active="active" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<steps :active="'1'" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :companyOption="companyOption" :loading="loading"/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer"></ApprovalDetail>
|
||||
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||
|
||||
</template>
|
||||
</steps>
|
||||
<opinion v-if="commonForm.taskId" :formData="formData" :taskId="formData.taskId"></opinion>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"></opinion>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -22,7 +26,6 @@ import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
const commonForm = ref({})
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
@@ -49,7 +52,6 @@ const getInfo = async (state) => {
|
||||
if(code===1000){
|
||||
summaryData.value = data;
|
||||
loading.value = false
|
||||
console.log('data-====================',data)
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
@@ -61,7 +63,22 @@ const getInfo = async (state) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// const back = () => {
|
||||
// switch (route.name) {
|
||||
// case 'Summary/detail':
|
||||
// setDetail('1')
|
||||
// break;
|
||||
// case 'Initiation/detail':
|
||||
// setDetail('2')
|
||||
// break;
|
||||
// case 'Implementation/detail':
|
||||
// setDetail('3')
|
||||
// break;
|
||||
// case 'Filing/detail':
|
||||
// setDetail('4')
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
getInfo(active)
|
||||
@@ -71,6 +88,7 @@ const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
getInfo(data.active)
|
||||
}
|
||||
// back()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -108,8 +108,8 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'demand_collection'} value={row.state}/>)
|
||||
if (row.state !== null&&row.state != 0) {
|
||||
return (<Tag dictType={'demand_summary'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
@@ -121,11 +121,19 @@ const tableConfig = reactive({
|
||||
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 === '0') {
|
||||
btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("report")) {
|
||||
btn.push({label: '上报',prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -133,7 +141,7 @@ const tableConfig = reactive({
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
@@ -229,6 +229,11 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const init = () => {
|
||||
getProjectConclusionProcess().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
<template>
|
||||
<steps :active="'0'" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<steps :active="'4'" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<collection-detail
|
||||
:formData="collectionData.formData"
|
||||
:data="collectionData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
@getInfo="getDemandCollectionInfo"
|
||||
v-show="showActive == '00'"
|
||||
<collection-detail
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="commonProvessViewer"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
|
||||
|
||||
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
</template>
|
||||
</steps>
|
||||
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -25,19 +30,23 @@ import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||
import { ElLoading } from "element-plus";
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import {ElLoading} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
const loading = ref(false)
|
||||
|
||||
const processStore = useProcessStore()
|
||||
const activeName = ref('first')
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if(tab.index.value === 0){
|
||||
if (tab.index.value === 0) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
@@ -50,13 +59,17 @@ const commonProvessViewer = ref(true)
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
state == '00' && ( await getCompanyOption() )
|
||||
state == '00' && (await getCompanyOption())
|
||||
commonProvessViewer.value = false
|
||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(state == '00') {
|
||||
collectionData.value = data;
|
||||
} else if(state == '10') {
|
||||
summaryData.value = data;
|
||||
loading.value = true
|
||||
const {data, code} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
// if(state == '00') {
|
||||
// collectionData.value = data;
|
||||
// } else if(state == '10') {
|
||||
// summaryData.value = data;
|
||||
// }
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}
|
||||
commonForm.value = data
|
||||
processStore.setDesign(data)
|
||||
@@ -73,7 +86,7 @@ const getAllInfo = async (state) => {
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const showActive = ref()
|
||||
@@ -90,19 +103,23 @@ const stepChange = (data) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail-block{
|
||||
.detail-block {
|
||||
padding-top: 15px;
|
||||
:deep(.el-tabs__nav-scroll){
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
.el-tabs__nav{
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
.el-tabs__item{
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
.is-active{
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
background-color: #DED0B2;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,11 @@ const tableConfig = reactive({
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '审批人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
@@ -127,6 +132,11 @@ const tableConfig = reactive({
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'taskNode',
|
||||
label: '当前节点',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
@@ -146,20 +156,27 @@ const tableConfig = reactive({
|
||||
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: () => handleConclusion(row), type: 'primary'})
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
// }
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件',prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("entry")) {
|
||||
btn.push({label: '结项',prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -185,7 +202,18 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Filing/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleAttachment = (row) => {
|
||||
router.push({
|
||||
name:'Filing/attachment',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -195,7 +195,12 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
getProjectCheckProcess().then(res => {
|
||||
getProjectCheckProcess(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
<template>
|
||||
<steps :active="'0'" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<steps :active="'3'" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<collection-detail
|
||||
:formData="collectionData.formData"
|
||||
:data="collectionData"
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
@getInfo="getDemandCollectionInfo"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="commonProvessViewer"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
|
||||
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
|
||||
</template>
|
||||
</steps>
|
||||
<opinion v-if="commonForm.taskId" :formData="formData" :taskId="formData.taskId"/>
|
||||
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -42,6 +44,7 @@ const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const collectionData = ref({})
|
||||
const summaryData = ref({})
|
||||
const loading = ref(false)
|
||||
const collectionProcessViewer = ref(true)
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
@@ -63,12 +66,16 @@ const getAllInfo = async (state) => {
|
||||
try {
|
||||
state == '00' && ( await getCompanyOption() )
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(state == '00') {
|
||||
collectionData.value = data;
|
||||
} else if(state == '10') {
|
||||
summaryData.value = data;
|
||||
}
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}
|
||||
commonForm.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
|
||||
@@ -106,6 +106,11 @@ const tableConfig = reactive({
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '审批人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
@@ -131,6 +136,11 @@ const tableConfig = reactive({
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'taskNode',
|
||||
label: '当前节点',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
@@ -150,23 +160,36 @@ const tableConfig = reactive({
|
||||
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'},
|
||||
{label: '编辑', func: () => handleEdit(row), type: 'primary'},
|
||||
{label: '台账', func: () => handleStandingBook(row), type: 'primary'},
|
||||
{label: '附件', func: () => handleAttachment(row), type: 'primary'},
|
||||
{label: '查看分摊', func: () => handleShare(row), type: 'primary'}
|
||||
)
|
||||
// }
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("check")) {
|
||||
btn.push({label: '验收',prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("standing")) {
|
||||
btn.push({label: '台账',prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件',prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("viewAllocation")) {
|
||||
btn.push({label: '查看分摊',prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("phaseChange")) {
|
||||
btn.push({label: '阶段变更',prem: ['mosr:requirement:info'], func: () => handleChange(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -196,7 +219,8 @@ const handleDetail = (row) => {
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -230,7 +254,7 @@ const handleAttachment = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/attachment',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
id: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -222,7 +222,12 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
getApplyProcess().then(res => {
|
||||
getApplyProcess(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
<template>
|
||||
<steps :active="'0'" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<steps :active="'2'" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<collection-detail
|
||||
:formData="collectionData.formData"
|
||||
:data="collectionData"
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
@getInfo="getDemandCollectionInfo"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="commonProvessViewer"/>
|
||||
<ApprovalDetail v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
|
||||
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/>
|
||||
<ApprovalDetail v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
|
||||
|
||||
</template>
|
||||
</steps>
|
||||
<opinion v-if="commonForm.taskId" :formData="formData" :taskId="formData.taskId"/>
|
||||
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -34,6 +38,8 @@ const activeName = ref('first')
|
||||
const collectionData = ref({})
|
||||
const summaryData = ref({})
|
||||
const collectionProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const active = ref(route.query.state)
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
@@ -100,12 +106,16 @@ const getAllInfo = async (state) => {
|
||||
try {
|
||||
state == '00' && ( await getCompanyOption() )
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(state == '00') {
|
||||
collectionData.value = data;
|
||||
} else if(state == '10') {
|
||||
summaryData.value = data;
|
||||
}
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}
|
||||
console.log(data, 'data--22');
|
||||
commonForm.value = data
|
||||
processStore.setDesign(data)
|
||||
|
||||
@@ -98,10 +98,15 @@ const tableConfig = reactive({
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'affiliatedCompanyId',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '审批人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
@@ -127,6 +132,11 @@ const tableConfig = reactive({
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'taskNode',
|
||||
label: '当前节点',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
@@ -146,11 +156,19 @@ const tableConfig = reactive({
|
||||
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 === '0') {
|
||||
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("apply")) {
|
||||
btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -158,7 +176,7 @@ const tableConfig = reactive({
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -186,7 +204,7 @@ const handleDetail = (row) => {
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: 2
|
||||
state: row.state
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ const schame = computed(()=>{
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '角色权限',
|
||||
label: '角色标识',
|
||||
prop: 'roleKey',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
|
||||
@@ -119,6 +119,7 @@ const loadInitFrom = () => {
|
||||
let design = {
|
||||
processDefinitionKey: 'pro' + getRandomId(),
|
||||
deploymentName: "未命名表单",
|
||||
processKey: '',
|
||||
// logo: {
|
||||
// icon: "el-icon-eleme",
|
||||
// background: "#1e90ff"
|
||||
@@ -190,7 +191,7 @@ const getRandomId = () => {
|
||||
d = Math.floor(d / 16)
|
||||
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
|
||||
})
|
||||
return 'node_' + id
|
||||
return id
|
||||
}
|
||||
|
||||
const getProcessInfo = async () => {
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
<template>
|
||||
<el-input v-model="processData.deploymentName" placeholder="请输入流程名称" />
|
||||
流程设置{{ processData.deploymentName }}
|
||||
<el-input v-model="processData.deploymentName" placeholder="请输入流程名称"/>
|
||||
<!-- <div v-if="!processData.processDefinitionKey">-->
|
||||
<el-select v-model="processData.processKey" placeholder="请选择流程环节">
|
||||
<el-option v-for="item in optionList" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else>-->
|
||||
<!-- {{processData.processName}}-->
|
||||
<!-- </div>-->
|
||||
|
||||
流程设置{{ processData.deploymentName }}
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {useProcessStore} from '@/stores/processStore.js'
|
||||
import {computed, defineExpose} from "vue";
|
||||
import {getTypeOption} from "@/api/workflow/process-definition";
|
||||
|
||||
const processStore = useProcessStore()
|
||||
|
||||
const optionList = ref([])
|
||||
|
||||
const processData = computed(() => {
|
||||
return processStore.getDesign()
|
||||
})
|
||||
@@ -18,9 +31,17 @@ const validate = () => {
|
||||
return []
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
getTypeOption().then(res => {
|
||||
console.log(res)
|
||||
optionList.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
validate
|
||||
})
|
||||
init()
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const init = () => {
|
||||
console.log('props.userInfo',props.userInfo)
|
||||
for (let user of props.userInfo) {
|
||||
initUser(user)
|
||||
}
|
||||
|
||||
@@ -5,19 +5,15 @@
|
||||
<div>
|
||||
<div class="picker">
|
||||
<div class="candidate" v-loading="loading">
|
||||
<div style="padding: 5px 8px;">
|
||||
<el-input v-model="filterText" style="width: 100%;" size="small"
|
||||
clearable placeholder="输入关键字进行过滤" prefix-icon="el-icon-search"/>
|
||||
<div style="margin-top: 5px">
|
||||
<el-radio-group v-model="radio" size="mini" @change="radioChange">
|
||||
<el-radio-button :label="0">角色</el-radio-button>
|
||||
<el-radio-button :label="1">部门</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<el-input v-model="filterText" @change="getList(1)"
|
||||
clearable placeholder="输入部门/昵称进行搜索">
|
||||
<template #append>
|
||||
<el-button @click="getList(1)">搜索</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
<!-- 人员选择 -->
|
||||
<el-empty :image-size="100" description="似乎没有数据" v-show="dataList.length === 0"/>
|
||||
<el-scrollbar style="height:317px">
|
||||
<el-scrollbar style="height:340px">
|
||||
<div class="tree">
|
||||
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
|
||||
:default-expanded-keys="expandedKeys" lazy accordion
|
||||
@@ -26,7 +22,9 @@
|
||||
<template #default="{ node, data }">
|
||||
<div class="tree-node">
|
||||
<div v-if="data.type === 0" style="display: flex;align-items: center;padding: 3px 0">
|
||||
<!-- <el-avatar :src="data.avatar"></el-avatar>-->
|
||||
<el-icon>
|
||||
<UserFilled/>
|
||||
</el-icon>
|
||||
{{ node.label }}
|
||||
</div>
|
||||
<div v-else-if="data.type ===1">
|
||||
@@ -55,8 +53,8 @@
|
||||
<div class="org-items" style="height: 350px;">
|
||||
<el-empty :image-size="100" description="请点击左侧列表选择数据" v-show="selectList.length === 0"/>
|
||||
<div v-for="(selectItem, selectIndex) in selectList" :key="selectIndex" class="org-item">
|
||||
<!-- <el-avatar :src="selectItem.avatar" style="margin-right: 5px;"></el-avatar>-->
|
||||
{{ selectItem.name}}
|
||||
<!-- <el-avatar :src="selectItem.avatar" style="margin-right: 5px;"></el-avatar>-->
|
||||
{{ selectItem.name }}
|
||||
<i class="el-icon-close" @click="noSelected(selectItem)"></i>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,9 +69,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getUserTree} from "@/api/workflow/process-user";
|
||||
import {computed, defineProps, defineExpose} from "vue";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import {getMosrDept} from "@/api/workflow/process-user";
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
@@ -105,16 +103,19 @@ const selectList = ref([]);
|
||||
const filterText = ref("");
|
||||
const dataList = ref([]);
|
||||
const tree = ref([]);
|
||||
const isSearch = ref(false);
|
||||
const expandedKeys = ref([]);
|
||||
const defaultProps = {
|
||||
value: "value",
|
||||
label: "name",
|
||||
children: "children",
|
||||
isLeaf:(data, node) => {
|
||||
if (node.level === 2) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
// isLeaf:(data, node) =>
|
||||
// {
|
||||
// console.log('data, node',data, node)
|
||||
// if (node.level === 2) {
|
||||
// return true
|
||||
// }
|
||||
// }
|
||||
|
||||
};
|
||||
const emit = defineEmits();
|
||||
@@ -128,30 +129,41 @@ const _value = computed({
|
||||
}
|
||||
});
|
||||
|
||||
watch(() => filterText, (newVal, oldVal) => {
|
||||
tree.value.filter(newVal);
|
||||
watch(() => filterText.value, (newVal) => {
|
||||
console.log('filterText.value', newVal)
|
||||
filterText.value = newVal
|
||||
});
|
||||
|
||||
const getList = (flag) => {
|
||||
let params = {}
|
||||
if (flag === 1) {
|
||||
isSearch.value = true;
|
||||
params = {
|
||||
chooseId: 0,
|
||||
chooseName: filterText.value
|
||||
}
|
||||
selectItem = {
|
||||
type: -1,
|
||||
value: "0"
|
||||
};
|
||||
} else {
|
||||
|
||||
const radioChange = (e) => {
|
||||
selectItem.type = -2;
|
||||
chooseId.value = 0;
|
||||
radio.value = e;
|
||||
expandedKeys.value = [];
|
||||
getList();
|
||||
};
|
||||
|
||||
const getList = () => {
|
||||
getUserTree(radio.value, chooseId.value).then(res => {
|
||||
params = {
|
||||
chooseId: radio.value,
|
||||
chooseName: filterText.value
|
||||
}
|
||||
}
|
||||
getMosrDept(params).then(res => {
|
||||
console.log('selectItem.type', selectItem.type)
|
||||
// if (res.data) {
|
||||
if (selectItem.type === -1 || selectItem.type === -2) {//角色/部门
|
||||
if (selectItem.type === -1) {
|
||||
dataList.value = res.data;
|
||||
} else if (selectItem.type === 1) {
|
||||
selectItem.children = res.data;
|
||||
if(chooseId.value!==0&&res.data.length===0){
|
||||
selectItem.children=[{
|
||||
type:1,
|
||||
name:'暂无数据'
|
||||
if (res.data.length === 0) {
|
||||
selectItem.children = [{
|
||||
type: 1,
|
||||
name: '暂无数据'
|
||||
}]
|
||||
}
|
||||
} else if (selectItem.type === 2) {
|
||||
@@ -187,16 +199,24 @@ const showUserPicker = () => {
|
||||
expandedKeys.value = [];
|
||||
getList();
|
||||
};
|
||||
const handleChange = (item, data, node) => {
|
||||
//渲染子节点用户或部门及用户数据
|
||||
const handleChange = (item, data) => {
|
||||
console.log('item', item, data)
|
||||
selectItem = item;
|
||||
if (data.expanded) {
|
||||
if(expandedKeys.value.indexOf(item.value)===-1){
|
||||
expandedKeys.value.push(item.value);
|
||||
if (item.type !== 0) {
|
||||
chooseId.value = item.id;
|
||||
getList();
|
||||
return;
|
||||
if (isSearch.value && item.type !== 0) {
|
||||
filterText.value = ""
|
||||
radio.value = item.id;
|
||||
getList();
|
||||
return;
|
||||
} else if (!isSearch.value) {
|
||||
//渲染子节点用户或部门及用户数据
|
||||
if (data.expanded) {
|
||||
if (expandedKeys.value.indexOf(item.value) === -1) {
|
||||
expandedKeys.value.push(item.value);
|
||||
if (item.type !== 0) {
|
||||
radio.value = item.id;
|
||||
getList();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,7 +291,6 @@ $containWidth: 264px;
|
||||
.el-tree-node {
|
||||
.el-tree-node__content {
|
||||
//height: 45px !important;
|
||||
|
||||
.tree-node {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
<el-button type="primary" size="mini"
|
||||
@click="handleEdit(scope.row.deploymentId)" link>编辑
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
@click="viewHistoricalVersion(scope.row)" link>历史
|
||||
</el-button>
|
||||
<popover-delete :name="scope.row.version" :type="'版本'"
|
||||
@delete="handleDelete(scope.row.deploymentId)"/>
|
||||
<!-- <el-button type="primary" size="mini"-->
|
||||
<!-- @click="viewHistoricalVersion(scope.row)" link>历史-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <popover-delete :name="scope.row.version" :type="'版本'"-->
|
||||
<!-- @delete="handleDelete(scope.row.deploymentId)"/>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -75,6 +75,13 @@ export default defineConfig({
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
},
|
||||
'/api/admin': {
|
||||
// target: 'http://frp.feashow.cn:31800/',
|
||||
target: 'http://clay.frp.feashow.cn/',
|
||||
// target: 'http://192.168.31.175:8000',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://mosr.feashow.cn',
|
||||
changeOrigin: true,
|
||||
|
||||
Reference in New Issue
Block a user