Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhangkaihuai
2024-06-11 21:19:00 +08:00
50 changed files with 1055 additions and 555 deletions

View File

@@ -138,3 +138,10 @@ export const getProjectConclusionProcess = () => {
method: "get"
});
};
//获取前置流程
export const getPreProcess= () => {
return request({
url: '/workflow/details/pre/process',
method: "get"
});
};

View File

@@ -549,3 +549,30 @@ html, body, #app, .el-container, .el-aside, .el-main {
right: 15px;
z-index: 5;
}
.approval-record {
//padding-bottom: 30px;
position: relative;
.approval-title {
display: flex;
align-items: center;
justify-content: space-between;
.diagram {
display: flex;
align-items: center;
.base-title {
margin-right: 10px;
}
//.el-switch {
// margin-left: 15px;
//}
}
}
.process {
position: relative;
}
}

View File

@@ -5,11 +5,11 @@
<el-form-item :label="label" prop="attachment">
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
{{ singleFile?.originalFileName }}
{{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
</el-button>
<el-button type="danger" link @click="deleteSingleFile(singleFile,1)">删除</el-button>
<el-button type="danger" link @click="deleteSingleFile(singleFile?singleFile:formData.singleFile,1)">删除</el-button>
</template>
<template v-else-if="!preview||JSON.stringify(singleFile) == '{}'||singleFile==null">
<template v-else-if="!preview||JSON.stringify(singleFile) == '{}'||singleFile==null||formData.singleFile==null">
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1"
:disabled="isSingleFile" @delete="deleteAttachment"/>
</template>
@@ -35,7 +35,7 @@
<script setup lang="jsx">
import FileUpload from '@/components/FileUpload.vue'
import {deleteFile, downloadFile} from "@/api/project-demand";
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
import {ElMessageBox, ElNotification} from "element-plus";
const props = defineProps({
showFileList: {
@@ -59,12 +59,11 @@ const props = defineProps({
default: []
},
formData: {
type: Array,
default: []
type: Object,
default: {}
}
})
const emit = defineEmits(["getAttachment", "getOtherFile"])
const formData = ref({})
const tableConfig = reactive({
columns: [
{
@@ -115,11 +114,12 @@ const tableConfig = reactive({
))
}
{
row.newFile||props.preview||!props.preview ? <popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
perm={['mosr:requirement:del']}
onDelete={() => handleDelete(row)}/>
: ''
}
row.newFile || props.preview || !props.preview ?
<popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
perm={['mosr:requirement:del']}
onDelete={() => handleDelete(row)}/>
: ''
}
</div>
)
}
@@ -130,16 +130,24 @@ const rules = reactive({
attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}],
})
const applyForm = ref()
const singleFile = ref()
const singleFile = ref(props.formData.singleFile)
const isSingleFile = ref(false)
const allFileList = ref([])
watch(() => props.showTable, (newVal) => {
props.showTable = newVal
}, {deep: true})
watch(() => props.otherFileList, (newVal) => {
console.log('newotherFileList', newVal)
watch(() => props.formData.fileList, (newVal) => {
console.log('newVal-fileList', newVal)
if (props.preview) {
if (props.formData.fileList===null||props.formData.fileList.length===0) {
newVal?.forEach(item => {
allFileList.value.push(item)
})
}
}, {deep: true})
watch(() => props.otherFileList, (newVal) => {
console.log('newotherFileList', newVal,props.formData)
if (props.preview) {
if (props.formData.fileList === null || props.formData.fileList.length === 0) {
allFileList.value = newVal
} else {
newVal?.forEach(item => {
@@ -150,14 +158,6 @@ watch(() => props.otherFileList, (newVal) => {
allFileList.value = newVal
}
}, {deep: true})
watch(() => props.formData.fileList, (newVal) => {
console.log('newVal-fileList', newVal)
if (props.preview) {
newVal?.forEach(item => {
allFileList.value.push(item)
})
}
}, {deep: true})
watch(() => props.formData.singleFile, (newVal) => {
console.log('singleFile', newVal)
singleFile.value = newVal
@@ -193,7 +193,7 @@ const deleteAttachment = (val) => {
type: 'success'
})
isSingleFile.value = false
singleFile.value=null
singleFile.value = null
}
});
}
@@ -210,7 +210,7 @@ const deleteSingleFile = (row, type) => {
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
isSingleFile.value=false
isSingleFile.value = false
if (type === 1) {
singleFile.value = null
} else {
@@ -249,7 +249,7 @@ defineExpose({
</script>
<style scoped>
:deep(.el-table--fit ){
height: 300px!important;
:deep(.el-table--fit ) {
height: 300px !important;
}
</style>

View File

@@ -18,11 +18,20 @@
</el-form-item>
</div>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
<div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList"
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram" :operation-list="data.operationList"
:state="data.state"/>
<process-diagram-viewer v-if="processViewer" :id-name="idName?idName:type"/>
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
</div>
</div>
</div>
@@ -34,14 +43,15 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
import {ElLoading} from 'element-plus';
import {downloadFile} from "@/api/project-demand";
const changeDiagram = ref(false)
const props = defineProps({
formData: {
type: Object,
default: {}
},
data: {
type: Array,
default: []
type: Object,
default: {}
},
processViewer: {
type: Boolean,
@@ -83,7 +93,16 @@ const schema = computed(() => {
prop: 'preProcess',
colProps: {
span: 24
}
},
component: () => (
<div>
{
props.formData.preProcess?
<span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}} href={props.formData.preProcessBaseUrl + props.formData.preProcess.requestId}>{props.formData.preProcess.requestName}</a> </span> :
<span>{'--'}</span>
}
</div>
)
},
{
label: '项目立项附件',
@@ -115,7 +134,16 @@ const schema = computed(() => {
prop: 'preProcess',
colProps: {
span: 24
}
},
component: () => (
<div>
{
props.formData.preProcess?
<span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}} href={props.formData.preProcessBaseUrl + props.formData.preProcess.requestId}>{props.formData.preProcess.requestName}</a> </span> :
<span>{'--'}</span>
}
</div>
)
},
{
label: '项目验收附件',

View File

@@ -2,7 +2,7 @@
<div v-loading="loading">
<el-form :model="formData" label-width="auto">
<el-row>
<el-col :span="12">
<el-col :span="12" v-if="type==='singleDetail'">
<el-form-item label="征集名称">
<span>{{ formData.requirementName }}</span>
</el-form-item>
@@ -17,7 +17,7 @@
<span>{{ formData.companyIds }}</span>
</el-form-item>
</el-col>
<el-col :span="type==='singleDetail'?12:24">
<el-col :span="12">
<el-form-item label="截止时间">
<span>{{ formData.deadline }}</span>
</el-form-item>
@@ -57,11 +57,21 @@
</el-col>
</el-row>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
<div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList"
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
:operation-list="data.operationList"
:state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="collectionProcess"/>
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="collectionProcess"/>
</div>
</div>
</el-form>
@@ -108,7 +118,7 @@ const props = defineProps({
default: ''
}
})
const changeDiagram = ref(false)
const _value = computed({
get() {
return props.value;
@@ -142,12 +152,4 @@ watch(() => props.processViewer, (newVal) => {
:deep(.el-empty__description) {
margin-top: 0;
}
.approval-record {
padding-bottom: 30px;
.process {
position: relative;
}
}
</style>

View File

@@ -1,33 +1,93 @@
<template>
<div class="apply-block">
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
<el-row>
<el-col :span="12">
<el-form-item label="前置流程">
<el-input v-model="formData.requirementName" clearable></el-input>
<el-form-item label="前置流程" :required="true" prop="requestName">
<a :href="localFormData.preProcess?.baseUrl" target="_blank"
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ localFormData.preProcess?.requestName }}</a>
<el-button color="#DED0B2" @click="handleShowPreTable">
{{ localFormData.preProcess?.requestName ? '更改' : '请选择' }}
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<AttachmentUpload ref="attachment" :label="title+'附件'" :showTable="showTable" :otherFileList="otherFileList"
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
:otherFileList="otherFileList"
@getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
:preview="route.query.state==3"/>
<div v-if="route.query.state==3">
<baseTitle title="审批记录"></baseTitle>
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="mode == 'resubmit'"/>
<div v-if="mode === 'resubmit'&&!changeDiagram">
<div class="approval-record">
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
</div>
<div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="data.operationList"
:state="data.state"/>
<operation-render :operation-list="data.operationList" :state="data.state"/>
</div>
</div>
<baseTitle title="流程"></baseTitle>
<div class="approval-record">
<process-diagram-viewer mode="view" idName="projectApply" v-if="processDiagramViewer"/>
<div v-if="changeDiagram">
<div class="approval-record">
<div class="approval-title">
<baseTitle title="流程图"></baseTitle>
<div class="diagram">
<!-- <div class="base-title">流程图</div>-->
<!-- <el-switch-->
<!-- v-model="changeDiagram"-->
<!-- style="&#45;&#45;el-switch-on-color: #13ce66; &#45;&#45;el-switch-off-color:#BEA266"-->
<!-- />-->
</div>
</div>
</div>
<div class="process">
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer"/>
</div>
</div>
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="route.query.state==0" @click="handleSubmit(applyForm)">提交</el-button>
<el-button color="#DED0B2" v-else-if="route.query.state==3" @click="handleSubmit(applyForm)">重新提交</el-button>
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
<el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button>
</div>
<el-dialog title="前置流程" v-model="showPreTable" width="80%">
<el-form :model="preProcessForm" inline>
<el-form-item label="请求名称">
<el-input v-model="preProcessForm.requestName" placeholder="请输入请求名称" clearable>
</el-input>
</el-form-item>
<el-form-item>
<el-button color="#DED0B2" @click="searchPreProcess">搜索</el-button>
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="preProcessList" stripe v-loading="loading">
<el-table-column prop="requestId" label="请求id"></el-table-column>
<el-table-column prop="requestName" label="请求名称"></el-table-column>
<el-table-column prop="lastOperatorName" label="最后操作人名称"></el-table-column>
<el-table-column prop="lastOperateTime" label="最后操作时间"></el-table-column>
<el-table-column prop="currentNodeName" label="当前节点"></el-table-column>
<el-table-column prop="creatorName" label="创建人"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<div style="display: flex;align-items: center">
<el-button type="primary" @click="chooseProProcess(scope.row)" link>选择</el-button>
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff;margin-left: 10px">查看详情</a>
</div>
</template>
</el-table-column>
</el-table>
<paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"
:total="total" @changeSize="handleSizeChange" @goPage="handleCurrentChange"/>
</el-dialog>
</div>
</template>
@@ -35,46 +95,147 @@
import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {ElNotification} from "element-plus";
import {getApplyProcess, projectApply, resubmitApply, getApplyDetail} from "@/api/project-manage";
import {
getApplyProcess,
getPreProcess,
getProjectCheckProcess,
getProjectConclusionProcess,
projectApply,
projectCheck,
projectConclusion,
resubmitApply,
resubmitCheck,
resubmitConclusion
} from "@/api/project-manage";
import {useProcessStore} from '@/stores/processStore.js';
import {useTagsView} from '@/stores/tagsview.js'
import Paging from "@/components/pagination/index.vue";
const router = useRouter()
const route = useRoute()
const changeDiagram = ref(true)
const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({
title: {
type: String,
default: '项目立项'
default: 'apply'
},
showTable: {
type: Boolean,
default: false
},
mode: {
type: String,
default: "view"
},
data: {
type: Array,
default: []
type: Object,
default: {}
},
formData: {
type: Object,
default: {}
},
step: {
type: String,
default: "20"
}
})
const preProcessList = ref([])
//暂存数据
const currentList = ref([])
const total = ref(0)
const preProcessForm = reactive({
requestName: ''
})
const pageInfo = reactive({
pageNum: 1,
pageSize: 10,
})
const rules = reactive({
// requirementName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
requestName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
})
const tagsViewStore = useTagsView()
const processStore = useProcessStore()
const otherFileList = ref([])
const formData = ref({})
const localFormData = ref({
preProcess: {
requestId: null,
requestName: '',
baseUrl: ''
}
})
const attachment = ref()
const showPreTable = ref(false)
const showTable = ref(true)
const loading = ref(false)
const processDiagramViewer = ref(false)
const name = ref(router.currentRoute.value.name)
const applyForm = ref()
const deploymentId = ref()
const projectId = ref(route.query.projectId)
const searchPreProcess = () => {
getPreProcessList()
}
const handleReset = () => {
preProcessForm.requestName = ''
getPreProcessList()
}
const handleShowPreTable = () => {
showPreTable.value = true
getPreProcessList()
}
const getPreProcessList = () => {
loading.value = true
getPreProcess().then(res => {
loading.value = false
let searchArray = []
let regexPattern = ("%" + preProcessForm.requestName + "%").replace(/%/g, '.*').replace(/_/g, '.');
let regex = new RegExp('^' + regexPattern + '$');
res.data.filter((item) => {
if (regex.test(item.requestName)) {
searchArray.push(item)
}
})
total.value = searchArray.length
currentList.value = searchArray
preProcessList.value = currentList.value.slice(0, 10)
})
}
const chooseProProcess = (item) => {
localFormData.value.preProcess = {
requestId: item.requestId,
requestName: item.requestName,
baseUrl: item.baseUrl
}
showPreTable.value = false
}
//切换每页显示条数
const handleSizeChange = (val) => {
pageInfo.pageSize = val;
preProcessList.value = currentList.value.slice((pageInfo.pageNum - 1) * val, pageInfo.pageNum * val)
};
//点击页码进行分页功能
const handleCurrentChange = (val) => {
pageInfo.pageNum = val;
preProcessList.value = currentList.value.slice((val - 1) * pageInfo.pageSize, val * pageInfo.pageSize)
};
const getTitleName = (type) => {
switch (type) {
case 'apply':
return '项目立项'
case 'check':
return '项目验收'
case 'filing':
return '项目归档'
}
}
const handleBack = () => {
history.back()
}
const compositeParam = (item) => {
// let tag = ''
// if (name.value === 'Initiation/apply' || route.query.state==3) {
// tag = props.title
// }
return {
fileId: item.id,
size: item.size,
@@ -82,12 +243,12 @@ const compositeParam = (item) => {
fileType: item.fileType,
url: item.url,
newFile: false,
tag: props.title
tag: getTitleName(props.title)
}
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
formData.value.singleFile = compositeParam(val)
localFormData.value.singleFile = compositeParam(val)
}
const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val)
@@ -104,145 +265,135 @@ const getFileParam = (item) => {
tag: item.tag
}
}
const handleSubmit = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
let files = []
if (route.query.state === '3') {
attachment.value.allFileList.forEach(item => {
files.push(getFileParam(item))
})
} else {
otherFileList.value.forEach(item => {
files.push(getFileParam(item))
})
}
// if (formData.value.singleFile !== undefined) {
// formData.value.singleFile = getFileParam(formData.value.singleFile)
// }
if (attachment.value.singleFile == null) {
attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传附件',
type: 'error'
})
return;
} else {
attachment.value.clearValidate()
}
let params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: files,
singleFile: formData.value.singleFile,
projectId: route.query.projectId,
}
console.log('params', params)
let res
if (route.query.state === '3') {
const handleSubmit = async () => {
if (localFormData.value.preProcess === undefined) {
ElNotification({
title: '提示',
message: '请选择前置流程',
type: 'error'
})
}
let files = []
if (props.mode === 'resubmit') {
attachment.value.allFileList.forEach(item => {
files.push(getFileParam(item))
})
} else {
otherFileList.value.forEach(item => {
files.push(getFileParam(item))
})
}
// if (localFormData.value.singleFile !== undefined) {
// localFormData.value.singleFile = getFileParam(localFormData.value.singleFile)
// }
console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile)
// if (localFormData.value.singleFile) {
//
// } else {
if (attachment.value.singleFile == null) {
attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传附件',
type: 'error'
})
return;
} else {
attachment.value.clearValidate()
}
// }
let params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: files,
singleFile: attachment.value.singleFile,
projectId: projectId.value,
preProcess: JSON.stringify(localFormData.value.preProcess)
}
console.log('params', params)
let res
if (props.step === '20') {
if (props.mode === 'resubmit') {
res = await resubmitApply(params)
} else {
res = await projectApply(params)
}
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
} else if (props.step === '40') {
if (props.mode === 'resubmit') {
res = await resubmitCheck(params)
} else {
res = await projectCheck(params)
}
} else if (props.step === '50') {
if (props.mode === 'resubmit') {
res = await resubmitConclusion(params)
} else {
res = await projectConclusion(params)
}
}
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
if (props.step === '20') {
await router.push({
name: 'Initiation'
})
} else if (props.step === '40') {
await router.push({
name: 'Implementation'
})
} else if (props.step === '50') {
await router.push({
name: 'Filing'
})
}
})
}
}
// const handleResubmit = async () => {
// let files = []
// if (route.query.state == 3) {
// attachment.value.allFileList.forEach(item => {
// files.push(getFileParam(item))
// })
// }
// if (attachment.value.singleFile == null) {
// attachment.value.validate()
// ElNotification({
// title: '提示',
// message: '请上传附件',
// type: 'error'
// })
// return;
// } else {
// attachment.value.clearValidate()
// }
// let params = {
// deploymentId: deploymentId.value,
// requirementId: route.query.id,
// fileList: files,
// singleFile: attachment.value.singleFile,
// projectId: route.query.projectId,
// }
// console.log('params', params, attachment.value.singleFile)
// let res = await resubmitApply(params)
// ElNotification({
// title: '提示',
// message: res.msg,
// type: res.code === 1000 ? 'success' : 'error'
// })
// if (res.code === 1000) {
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
// await router.push({
// name: 'Initiation'
// })
// }
// }
const init = () => {
if (!route.query.projectId) return;
const init = async () => {
let id = projectId.value
if (!id) return;
processDiagramViewer.value = false
getApplyProcess(route.query.projectId).then(res => {
if (res.code === 1000) {
let data = res.data
deploymentId.value = data.deploymentId
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => {
processDiagramViewer.value = true
})
} else {
ElNotification({
title: '提示',
message: res.msg,
type: 'error'
})
}
})
}
const getDetailInfo = async () => {
if (!route.query.projectId) return;
getApplyDetail(route.query.projectId).then(res => {
let res
if (props.step === '20') {
res = await getApplyProcess(id)
} else if (props.step === '40') {
res = await getProjectCheckProcess(id)
} else if (props.step === '50') {
res = await getProjectConclusionProcess(id)
}
if (res.code === 1000) {
let data = res.data
deploymentId.value = data.deploymentId
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => {
processDiagramViewer.value = true
})
} else {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
type: 'error'
})
if (res.code === 1000) {
formData.value = res.data.formData
loading.value = false
}
})
}
onMounted(async () => {
await init()
if (route.query.state == 3) {
loading.value = true
await getDetailInfo()
}
}
watchEffect(() => {
return Object.keys(props.formData).length && (localFormData.value = props.formData)
})
onMounted(async () => {
// changeDiagram.value = props.mode === 'submit';
await init()
})
</script>

View File

@@ -64,11 +64,21 @@
</el-col>
</el-row>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
<div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList"
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
:operation-list="data.operationList"
:state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="fundProcess"/>
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="fundProcess"/>
</div>
</div>
</el-form>
@@ -83,6 +93,7 @@ import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import {downloadFile} from "@/api/project-demand";
const changeDiagram = ref(false)
const emit = defineEmits(['getInfo', "update:formData"])
const form = ref()

View File

@@ -151,11 +151,20 @@
</el-col>
</el-row>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
<div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList"
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram" :operation-list="data.operationList"
:state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
</div>
</div>
</el-form>
@@ -202,6 +211,7 @@ const props = defineProps({
default: ''
}
})
const changeDiagram = ref(false)
const localFormData = ref({})
const router = useRouter()
const fundOption = ref([])

View File

@@ -107,19 +107,12 @@ const schema = computed(() => {
}
},
{
label: '征集类型',
prop: 'collectType',
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
},
{
label: '截止时间',
prop: 'deadline',
colProps: {
span: 12
}
},
}
]
})
@@ -275,6 +268,16 @@ const getBaseInfo = async () => {
const loading = ElLoading.service({fullscreen: true})
try {
const {code, data} = await getBaseInfoApi(route.query.projectId)
// console.log('data.procedure',data.procedure,route.query.step)
if(route.query.step==='40'){
if(data.procedure.indexOf('40')==-1){
data.procedure.push('40')
}
}else if(route.query.step==='50'){
if(data.procedure.indexOf('50')==-1){
data.procedure.push('50')
}
}
localStepSuccess.value = formatProcedure(data.procedure)
baseForm.value.setValues(data)
emits('setDetail', formatActive(localActive.value))

View File

@@ -45,11 +45,11 @@ const searchConfig = reactive([
cacheKey: 'project_cost',
}
}, {
label: '研发阶段',
label: '项目阶段',
prop: 'researchStage',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发阶段查询',
placeholder: '请选择项目阶段查询',
clearable: true,
filterable: true,
checkStrictly: true,
@@ -102,6 +102,7 @@ const tableConfig = reactive({
prop: 'projectCost',
label: '项目费用',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.projectCost !== null) {
return (<Tag dictType={'project_cost'} value={row.projectCost}/>)
@@ -112,8 +113,9 @@ const tableConfig = reactive({
},
{
prop: 'researchStage',
label: '研发阶段',
label: '项目阶段',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) {
return (<Tag dictType={'research_stage'} value={row.researchStage}/>)
@@ -122,11 +124,6 @@ const tableConfig = reactive({
}
}
},
{
prop: 'digest',
label: '摘要',
align: 'center'
},
{
prop: 'afterTax',
label: '税后余额(元)',
@@ -139,6 +136,7 @@ const tableConfig = reactive({
prop: 'source',
label: '来源',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.source&&row.source !== null&&row.source!==undefined) {
return (<Tag dictType={'ledger_source'} value={row.source}/>)

View File

@@ -37,11 +37,20 @@
</el-form-item>
</div>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
<div class="process">
<operation-render v-if="shareProcessViewer" :operation-list="shareData.operationList"
<operation-render v-if="shareProcessViewer&& shareData.operationList && shareData.operationList.length > 0&&!changeDiagram" :operation-list="shareData.operationList"
:state="shareData.state"/>
<process-diagram-viewer v-if="shareProcessViewer" id-name="shareProcess"/>
<process-diagram-viewer v-if="shareProcessViewer&&changeDiagram" id-name="shareProcess"/>
</div>
</div>
<opinion v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId" v-model:value="auditOpinion"></opinion>
@@ -55,6 +64,7 @@ import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js';
import {getAllocationDetail} from "@/api/expense-manage";
const changeDiagram = ref(false)
const processStore = useProcessStore()
const route = useRoute()
const shareData = ref({})

View File

@@ -91,6 +91,7 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
@@ -104,12 +105,12 @@ const tableConfig = reactive({
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
}
if (buttons.has("report")) {
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
}
if (buttons.has("report")) {
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
}
// if (buttons.has("report")) {
// btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
// }
// if (buttons.has("report")) {
// btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
// }
return (
<div style={{width: '100%'}}>
{

View File

@@ -2,35 +2,44 @@
<div v-loading="loading" class="add-block">
<baseTitle title="需求征集信息录入"></baseTitle>
<el-form :model="formData" inline class="query-form" ref="demandForm" :rules="rules">
<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="date"
placeholder="截止时间"
value-format="YYYY-MM-DD"
/>
</el-config-provider>
</el-form-item>
<el-row>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="名称" prop="requirementName">
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<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-col>
<el-col :span="6">
<el-form-item label="截止时间" prop="deadline">
<el-config-provider>
<el-date-picker
v-model="formData.deadline"
type="date"
placeholder="截止时间"
value-format="YYYY-MM-DD"
/>
</el-config-provider>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="所属公司" prop="companyIds" class="tree-select">
<!-- <el-button @click="showCompany">请选择</el-button>-->
<el-tree-select v-model="formData.companyIds" :data="companyOption"
filterable clearable :check-strictly="true" multiple/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否专项资金" prop="isSpecialFund">
<el-radio-group v-model="formData.isSpecialFund" size="mini">
<el-radio :label="true"></el-radio>
@@ -380,6 +389,12 @@ onMounted(async () => {
:deep(.el-empty__description) {
margin-top: 0;
}
.tree-select{
:deep(.el-form-item__content .el-select__wrapper ) {
width: 750px;
}
}
:deep(.el-table--fit ) {
height: 300px !important;

View File

@@ -52,6 +52,13 @@ const searchConfig = reactive([
])
const tableIns = ref()
const userInfo = ref(authStore.userinfo)
const auths = {
edit: ['mosr:requirement:resubmit'],
detail: ['mosr:requirement:info'],
add: ['mosr:requirement:add'],
del: ['mosr:requirement:del'],
report: ['mosr:collect:reported'],
}
const tableConfig = reactive({
columns: [
{
@@ -102,18 +109,19 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
btn.push({label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
}
if (buttons.has("report")) {
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
btn.push({label: '需求上报', prem: auths.report, func: () => handleReport(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>
@@ -132,7 +140,7 @@ const tableConfig = reactive({
{
buttons.has("delete") ?
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'}
perm={['mosr:requirement:del']}
perm={auths.del}
onDelete={() => handleDelete(row)}/> : ''
}
</div>
@@ -142,8 +150,8 @@ const tableConfig = reactive({
],
api: '/workflow/mosr/requirement',
btns: [
{name: '新增', key: 'add', color: '#DED0B2'},
{name: '导出', key: 'export', type: ''},
{name: '新增', key: 'add', color: '#DED0B2',auth: auths.add},
// {name: '导出', key: 'export', type: ''},
],
params: {}
})

View File

@@ -244,6 +244,7 @@
<!-- <el-button type="info" @click="staging">存为草稿</el-button>-->
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
<el-button @click="handleBack">返回</el-button>
</div>
</div>
</template>
@@ -307,6 +308,9 @@ const rules = reactive({
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
})
const handleBack = () => {
history.back()
}
const disabledDate = (time) => {
return time.getTime() < new Date(formData.value.startTime).getTime();
}

View File

@@ -28,7 +28,7 @@ import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
import {useProcessStore} from '@/stores/processStore.js';
import {getMapProjectStateInfo} from '@/components/steps/api';
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
import {ElNotification} from "element-plus";
import {ElLoading, ElNotification} from "element-plus";
const route = useRoute()
const summaryData = ref({})
@@ -40,36 +40,46 @@ const active = ref(route.query.state)
const auditOpinion = ref('')
const showActive = ref()
const getInfo = async (state) => {
fileListShow.value = 'READ'
const projectId = route.query.projectId
summaryProcessViewer.value = false
loading.value = true
const {code, data, msg} = await getMapProjectStateInfo(projectId, state)
if (code === 1000) {
summaryData.value = data;
loading.value = false
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => {
summaryProcessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
const loading = ElLoading.service({fullscreen: true})
try {
fileListShow.value = 'READ'
const projectId = route.query.projectId
summaryProcessViewer.value = false
loading.value = true
const {code, data, msg} = await getMapProjectStateInfo(projectId, state)
if (code === 1000) {
summaryData.value = data;
loading.value = false
if(data.runningList===null) {
loading.close()
return;
}
})
} else {
ElNotification({
title: '提示',
message: msg,
type: 'error'
})
if (msg === '查询结果为空') {
summaryData.value = []
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => {
summaryProcessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
})
loading.close()
} else {
ElNotification({
title: '提示',
message: msg,
type: 'error'
})
if (msg === '查询结果为空') {
summaryData.value = []
}
loading.close()
}
loading.value = false
} catch {
loading.close()
}
}

View File

@@ -71,6 +71,11 @@ const searchConfig = reactive([
// colProps: {}
// },
])
const auths = {
edit: ['mosr:collect:resubmit'],
detail: ['mosr:collect:info'],
report: ['mosr:collect:reported'],
}
const tableConfig = reactive({
columns: [
{
@@ -156,19 +161,17 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
btn.push({label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', prem: auths.edit, 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%'}}>
{
@@ -197,9 +200,9 @@ const tableConfig = reactive({
api: '/workflow/mosr/requirement/collect',
params: {},
btns: [
{name: '新增上报', key: 'add', color: '#DED0B2', auth: ''},
{name: '年度计划导出', key: '_export', auth: ''},
{name: '经费预算生成', key: 'preMonty', auth: ''},
{name: '新增上报', key: 'add', color: '#DED0B2', auth:auths.report},
// {name: '年度计划导出', key: '_export', auth: ''},
// {name: '经费预算生成', key: 'preMonty', auth: ''},
]
})
const headBtnClick = (key) => {

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane v-for="item in paneList" :label="item.label" :name="item.name">
<search-files-by-tag @search="search" @upload="upload" :type="item.name==='40'?'40':''"
@@ -10,6 +12,8 @@
<script setup lang="jsx">
import {searchFileList} from "@/api/project-manage/attachment.js";
import {ElNotification} from "element-plus";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute()
const router = useRouter()
@@ -20,6 +24,25 @@ const uploadState = ref(true)
const fileList = ref([])
const projectId = ref(route.query.id)
const requirementId = ref(route.query.requirementId)
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const paneList=ref([
{
label:'需求征集',
@@ -42,7 +65,15 @@ const paneList=ref([
name:'50'
}
])
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const handleClick = (tab) => {
activeName.value=tab.props.name
loading.value=true
@@ -90,7 +121,11 @@ const upload = () => {
})
}
}
watchEffect(() => {
if (requirementId.value === '-1') {
paneList.value = paneList.value.slice(1)
}
})
onMounted(() => {
if (activeName.value === '50') {
search({})

View File

@@ -12,6 +12,7 @@
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="name==='Filing/conclusion'" @click="handleSubmit">提交</el-button>
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button>
</div>
</div>
</template>
@@ -92,6 +93,9 @@ const handleDownload = (row) => {
a.click()
})
}
const handleBack = () => {
history.back()
}
const compositeParam = (item) => {
let tag = ''
if (name.value === 'Filing/conclusion' || name.value === 'Filing/edit') {

View File

@@ -227,21 +227,22 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("attachments")) {
btn.push({label: '附件', prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
}
if (buttons.has("entry")) {
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="上传附件"></baseTitle>
<el-card style="width: 100%;margin: 15px 0">
<file-upload @getFile="getFile" />
@@ -18,6 +20,8 @@
import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js'
import {uploadFileList} from "@/api/project-manage/attachment";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const tagsViewStore = useTagsView()
const route = useRoute()
@@ -26,6 +30,25 @@ const fileList = ref([])
const formData = ref({
tagName:''
})
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const tableConfig = reactive({
columns: [
{
@@ -48,7 +71,8 @@ const tableConfig = reactive({
{
prop: 'size',
label: '文件大小',
align: 'center'
align: 'center',
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
prop: 'oper',
@@ -69,6 +93,15 @@ const name = ref(router.currentRoute.value.name)
const rules = reactive({
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
})
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const compositeParam = (item) => {
let tag=''
switch (route.query.name) {
@@ -119,7 +152,7 @@ const handleSubmit = async () => {
})
let params = {
fileList: files,
targetState:'',
targetState:route.query.name,
projectId: route.query.id,
}
let res = await uploadFileList(params)

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
<template #empty>
@@ -9,9 +11,31 @@
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {toThousands} from '@/utils/changePrice.js'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const router = useRouter()
const route = useRoute()
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const searchConfig = reactive([
{
label: '项目名称',
@@ -45,11 +69,11 @@ const searchConfig = reactive([
cacheKey: 'project_cost',
}
}, {
label: '研发阶段',
label: '项目阶段',
prop: 'researchStage',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发阶段查询',
placeholder: '请选择项目阶段查询',
clearable: true,
filterable: true,
checkStrictly: true,
@@ -107,7 +131,7 @@ const tableConfig = reactive({
},
{
prop: 'researchStage',
label: '研发阶段',
label: '项目阶段',
align: 'center',
currentRender: ({row, index}) => {
if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) {
@@ -125,7 +149,10 @@ const tableConfig = reactive({
{
prop: 'afterTax',
label: '税后余额(元)',
align: 'center'
align: 'center',
currentRender:({row})=>{
return <span>{toThousands(row.afterTax)}</span>
}
}
],
api: '/workflow/mosr/expense/ledger',
@@ -137,6 +164,15 @@ const tableConfig = reactive({
]
})
const tableIns=ref()
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const headBtnClick = (key) => {
switch (key) {
case 'add':

View File

@@ -50,13 +50,6 @@ const schema = computed(() => {
span: 12
}
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
@@ -64,14 +57,6 @@ const schema = computed(() => {
span: 12
}
},
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
]
})
const baseForm = ref()

View File

@@ -21,6 +21,7 @@
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="name==='Implementation/check'" @click="handleSubmit(applyForm)">提交</el-button>
<el-button color="#DED0B2" v-else @click="handleResubmit(applyForm)">重新提交</el-button>
<el-button @click="handleBack">返回</el-button>
</div>
</div>
</template>
@@ -46,6 +47,9 @@ const otherFileList = ref([])
const processInstanceData = ref()
const processDiagramViewer = ref(true)
const processStore = useProcessStore()
const handleBack = () => {
history.back()
}
const compositeParam = (item) => {
let tag = ''
if (name.value === 'Implementation/check' || name.value === 'Implementation/edit') {

View File

@@ -1,12 +1,10 @@
<template>
<el-button type="primary" link >
<el-button color="#DED0B2" >
{{ modelValue || '请选择抄送人员' }}
</el-button>
</template>
<script setup>
import { ref, watch, watchEffect } from 'vue';
const props = defineProps({
modelValue: {
type: String,
@@ -22,4 +20,4 @@ const localText = ref('')
<style lang="scss" scoped>
</style>
</style>

View File

@@ -2,30 +2,49 @@
<steps :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
:reportType="route.query.id==='-1'?'direct':''">
<template #content>
<collection-detail
:formData="commonForm.formData"
:data="commonForm"
:processViewer="commonProvessViewer"
v-show="showActive == '00'"
:loading="loading"
v-model:value="auditOpinion"
<collection-detail :formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
v-show="showActive == '00'"
:fileListShow="fileListShow"
v-model:value="auditOpinion"
/>
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
<summary-detail v-show="showActive == '10'"
:formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply" :formData="commonForm.formData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
<ApprovalDetail type="approval"
v-if="showActive == '20'&&!editShow"
:formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<project-apply v-if="showApply&&showActive == '20'" :data="commonForm"/>
<ApprovalDetail type="execute"
v-if="showActive == '40'&&!editShow"
:formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<ApprovalDetail type="archivist"
v-show="showActive == '50'&&!editShow"
:formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<project-apply :title="applyTitle"
v-if="editShow"
:mode="mode"
:step="showActive"
:data="detailData"
:formData="detailData.formData"/>
</template>
</steps>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"
<opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
v-model:value="auditOpinion"/>
</template>
@@ -39,28 +58,47 @@ import {ElLoading, ElNotification} from "element-plus";
import Opinion from "@/components/DetailComponent/Opinion.vue";
const route = useRoute()
const showApply = ref(false)
const editShow = ref(false)
const applyTitle = ref('apply')
const loading = ref(false)
const processStore = useProcessStore()
const fileListShow = ref('READ')
const mode = ref('')
const currentStep = ref()
const auditOpinion = ref('')
// const step = ref(route.query.step)
route.query.step == '10' && (currentStep.value = 1)
route.query.step == '20' && (currentStep.value = 2)
route.query.step == '40' && (currentStep.value = 3)
route.query.step == '50' && (currentStep.value = 4)
const showActive = ref()
const commonForm = ref({})
const detailData = ref({})
const commonProvessViewer = ref(true)
const getAllInfo = async (state) => {
const loading = ElLoading.service({fullscreen: true})
try {
fileListShow.value = 'READ'
commonProvessViewer.value = false
loading.value = true
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
if (code === 1000) {
loading.value = false
data.formData.preProcess = data.formData.preProcess ? JSON.parse(data.formData.preProcess) : undefined
detailData.value = data
mode.value = data.formData.mode
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(() => {
commonProvessViewer.value = true
if (data.formPermMap && data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
})
changeModel(state, mode.value)
loading.close()
} else {
ElNotification({
title: '提示',
@@ -68,49 +106,36 @@ const getAllInfo = async (state) => {
type: 'error'
})
if (msg === '查询结果为空') {
commonForm.value = []
detailData.value = []
detailData.value.formData = {}
}
loading.close()
}
if (data === undefined) return;
commonForm.value = data
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => {
commonProvessViewer.value = true
if (data.formPermMap && data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
})
loading.close()
} catch {
loading.close()
}
}
const changeModel = (active) => {
if (route.query.state === '0' && active === '20') {
showApply.value = true
} else if (route.query.state === '3' && active === '20') {
showApply.value = true
getAllInfo(active)
} else {
showApply.value = false
getAllInfo(active)
}
const changeModel = (active, mode) => {
editShow.value = false
nextTick(() => {
editShow.value = mode === 'submit' || mode === 'resubmit';
if (route.query.step === '20' && active === '20') {
applyTitle.value = 'apply'
} else if (route.query.step === '40' && active === '40') {
applyTitle.value = 'check'
} else if (route.query.step === '50' && active === '50') {
applyTitle.value = 'filing'
}
})
}
const setDetail = (active) => {
showActive.value = active
changeModel(active)
getAllInfo(active)
}
const stepChange = (data) => {
showActive.value = data.active
changeModel(data.active)
getAllInfo(data.active)
}
</script>

View File

@@ -183,7 +183,7 @@ const tableConfig = reactive({
},
{
prop: 'researchStage',
label: '研发阶段',
label: '项目阶段',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
@@ -245,27 +245,28 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
btn.push({label: '详情', prem: ['mosr:implementation:info'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("check")) {
btn.push({label: '验收', prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
btn.push({label: '验收', prem: ['mosr:implementation:check'], func: () => handleCheck(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', prem: ['mosr:implementation:resubmit'], func: () => handleEdit(row), type: 'primary'})
}
if (buttons.has("standing")) {
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
btn.push({label: '台账', prem: ['project:management:implementation:account'], func: () => handleStandingBook(row), type: 'primary'})
}
if (buttons.has("attachments")) {
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
btn.push({label: '附件', prem: ['project:management:implementation:attachment'], func: () => handleAttachment(row), type: 'primary'})
}
if (buttons.has("viewAllocation")) {
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
btn.push({label: '查看分摊', prem: ['project:management:implementation:share'], func: () => handleShare(row), type: 'primary'})
}
if (buttons.has("phaseChange")) {
btn.push({label: '阶段变更', prem: ['mosr:phase:change'], func: () => handlePhaseChange(row), type: 'primary'})
@@ -298,7 +299,7 @@ const tableConfig = reactive({
api: '/workflow/mosr/project/implementation',
params: {},
btns: [
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
// {name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
]
})

View File

@@ -1,9 +1,12 @@
<template>
<div class="apply-block">
<div>
抄送人员:
<Ttsup :modelValue="chooseUserInfo()" @click="chooseUser"/>
</div>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<el-form :model="formData" label-width="auto">
<el-form-item label="抄送人员">
<Ttsup :modelValue="chooseUserInfo()" @click="chooseUser"/>
</el-form-item>
</el-form>
<user-picker :multiple="true" ref="userPicker" title="请选择抄送人员" v-model:value="userList" @ok="selected"/>
<AttachmentUpload ref="attachment" label="阶段变更附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment"
@@ -28,6 +31,8 @@ import {getPhaseProcess, submitPhaseChange, getPhaseForm, resubmitPhaseForm} fro
import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js';
import {useTagsView} from '@/stores/tagsview.js'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const tagsViewStore = useTagsView()
const router = useRouter()
@@ -45,6 +50,34 @@ const processInstanceData = ref()
const processDiagramViewer = ref(true)
const userList = ref([])
const processStore = useProcessStore()
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.projectId)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const compositeParam = (item) => {
let tag = ''
if (name.value === 'Phase/change') {
@@ -62,7 +95,7 @@ const compositeParam = (item) => {
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
file.value = compositeParam(val)
formData.value.singleFile = compositeParam(val)
}
const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val)
@@ -85,11 +118,11 @@ const chooseUser = () => {
userPicker.value.showUserPicker()
}
const chooseUserInfo = () => {
if (userList.value.length > 0){
if (userList.value.length > 0) {
return userList.value.map(item => {
return item.name
}).join(',')
}else {
}).join('')
} else {
return "请选择抄送人员"
}
}
@@ -107,32 +140,27 @@ const selected = (select) => {
}
const handleSubmit = async () => {
let files = []
let singleFile = {}
let fileArray
if (file.value.fileId !== undefined) {
singleFile = {
fileId: file.value.fileId
}
}
fileArray = otherFileList.value
fileArray.forEach(item => {
otherFileList.value?.forEach(item => {
files.push(getFileParam(item))
})
let userIds = []
if (userList.value.length > 0){
userIds = userList.value.map(item => {
if (userList.value.length > 0) {
userIds = userList.value?.map(item => {
return item.id
})
}
if (formData.value.singleFile !== undefined) {
formData.value.singleFile = getFileParam(formData.value.singleFile)
}
let params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: files,
singleFile: singleFile,
singleFile: formData.value.singleFile,
projectId: route.query.projectId,
userIds: userIds
}
if (JSON.stringify(singleFile) === "{}") {
if (!attachment.value.isSingleFile) {
attachment.value.validate()
ElNotification({
title: '提示',
@@ -157,41 +185,19 @@ const handleSubmit = async () => {
}
}
const handleResubmit = (instance) => {
let singleFile = {}
let otherFiles = []
let fileArray
if (attachment.value.singleFile !== null && name.value === 'Phase/edit') {
singleFile = {
fileId: attachment.value.singleFile.fileId
}
fileArray = attachment.value.allFileList
} else {
if (file.value.fileId !== undefined) {
singleFile = {
fileId: file.value.fileId
}
}
fileArray = otherFileList.value
if (name.value === 'Phase/edit') {
attachment.value.allFileList?.forEach(item => {
otherFiles.push(getFileParam(item))
})
}
fileArray.forEach(item => {
otherFiles.push(getFileParam(item))
})
let userIds = []
if (userList.value.length > 0){
userIds = userList.value.map(item => {
if (userList.value.length > 0) {
userIds = userList.value?.map(item => {
return item.id
})
}
//todo requirementId
let params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: otherFiles,
singleFile: singleFile,
projectId: route.query.projectId,
userIds: userIds
}
if (JSON.stringify(singleFile) === "{}") {
if (attachment.value.singleFile == null) {
attachment.value.validate()
ElNotification({
title: '提示',
@@ -202,6 +208,14 @@ const handleResubmit = (instance) => {
} else {
attachment.value.clearValidate()
}
let params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: otherFiles,
singleFile: attachment.value.singleFile,
projectId: route.query.projectId,
userIds: userIds
}
console.log('重新提交params', params)
resubmitPhaseForm(params).then(res => {
ElNotification({

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="阶段变更详情"></baseTitle>
<div style="color: #606266;font-size: 14px">抄送人{{copyName}}</div>
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
@@ -10,6 +12,8 @@
import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js';
import {getPhaseDetail} from "@/api/project-manage";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute()
const summaryData = ref({})
@@ -19,6 +23,34 @@ const loading = ref(false)
const auditOpinion = ref('')
const copyName = ref('')
const fileListShow = ref('READ')
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.projectId)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const getInfo = async () => {
fileListShow.value = 'READ'
const projectId = route.query.projectId

View File

@@ -13,6 +13,7 @@
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
import {getResearchUser} from "@/api/expense-manage";
const route = useRoute()
const schema = computed(() => {
@@ -24,28 +25,13 @@ const schema = computed(() => {
span: 12
}
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
},
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
}
]
})
const baseForm = ref()
@@ -94,14 +80,17 @@ const tableConfig = reactive({
width:'80'
},
{
prop: 'name',
prop: 'time',
label: '时间',
align: 'center'
},
{
prop: 'researchPersonnel',
label: '研发人员',
align: 'center'
align: 'center',
currentRender:({row})=>{
return <span>{getResearchName(row.researchPersonnel)}</span>
}
},
{
prop: 'wagesPayable',
@@ -117,24 +106,29 @@ const tableConfig = reactive({
prop: 'reserveFund',
label: '公积金',
align: 'center'
},{
},
{
prop: 'socialSecurity',
label: '社保',
align: 'center'
},{
},
{
prop: 'annuity',
label: '年金',
align: 'center'
},{
},
{
prop: 'workday',
label: '工作日(天)',
align: 'center'
},{
},
{
prop: 'researchDuration',
label: '研发工时(天)',
align: 'center'
},{
prop: 'survey',
},
{
prop: 'subtotal',
label: '小计',
align: 'center'
}
@@ -144,6 +138,21 @@ const tableConfig = reactive({
projectId: route.query.id
}
})
const researchOptions = ref([])
const getResearchOptions = async () => {
const res = await getResearchUser()
researchOptions.value = res.data
}
const getResearchName=(id)=>{
if(!id)return;
let label=''
researchOptions.value.forEach(item=>{
if(item.value==id){
label=item.label
}
})
return label
}
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
@@ -152,6 +161,7 @@ const getBaseInfo = async () => {
}
}
getResearchOptions()
getBaseInfo()
</script>

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="标签名称"></baseTitle>
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
<el-form-item label="标签名称" prop="tagName">
@@ -34,12 +36,33 @@ import {getTags} from "@/api/project-manage";
import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js'
import {uploadFileList} from "@/api/project-manage/attachment";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const tagsViewStore = useTagsView()
const route = useRoute()
const router = useRouter()
const fileList = ref([])
const showInput = ref(false)
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const tagsOption = ref([])
const formData = ref({
tagName: ''
@@ -88,6 +111,15 @@ const name = ref(router.currentRoute.value.name)
const rules = reactive({
tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}],
})
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const changeInput = () => {
showInput.value = !showInput.value;
formData.value.tagName = '';

View File

@@ -31,10 +31,10 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="researchStage" label="研发阶段">
<el-table-column prop="researchStage" label="项目阶段">
<template #default="scope">
<el-form-item prop="researchStage" :rules="scope.row.researchStage?'1':rules.researchStage">
<el-select v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable filterable>
<el-select v-model="scope.row.researchStage" placeholder="请选择项目阶段" clearable filterable>
<el-option
v-for="item in cacheStore.getDict('fee_stage')"
:key="item.value"
@@ -102,35 +102,20 @@ const schema = computed(() => {
span: 12
}
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
},
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
}
]
})
const baseForm = ref()
const rules = reactive({
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
researchStage: [{required: true, message: '请输入研发阶段', trigger: 'blur'}],
researchStage: [{required: true, message: '请输入项目阶段', trigger: 'blur'}],
digest: [{required: true, message: '请输入摘要', trigger: 'blur'}],
afterTax: [{required: true, message: '请输入税后余额', trigger: 'blur'}]
})

View File

@@ -21,6 +21,7 @@
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="name==='Initiation/apply'" @click="handleSubmit(applyForm)">提交</el-button>
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button>
</div>
</div>
</template>
@@ -87,6 +88,9 @@ const loading = ref(false)
const processInstanceData = ref()
const processDiagramViewer = ref(true)
const name = ref(router.currentRoute.value.name)
const handleBack = () => {
history.back()
}
const handleDownload = (row) => {
downloadFile(row.fileId).then(res => {
const blob = new Blob([res])

View File

@@ -226,21 +226,22 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
btn.push({label: '详情', prem: ['mosr:approval:info'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', prem: ['mosr:approval: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'})
btn.push({label: '立项',prem: ['mosr:approval:apply'], func: () => handleApply(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>

View File

@@ -269,13 +269,13 @@ const handleSelect = async (selection, row) => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}
const handleMoreDelete=(regularId,regularNameList)=>{

View File

@@ -339,13 +339,13 @@ const handleSelect = async (selection) => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}
const handleMoreDelete = (dsId, sourceNameList) => {

View File

@@ -52,7 +52,6 @@ const router = useRouter()
const route = useRoute()
const processStore = useProcessStore()
const loading = ref(false)
const showTinymce = ref(true)
const showTable = ref(true)
const processInstanceData = ref()
const fundForm = ref()
@@ -249,10 +248,8 @@ const getDetailInfo = async () => {
})
if (res.code === 1000) {
formData.value = res.data
showTinymce.value = false
showTable.value = false
nextTick(() => {
showTinymce.value = true
showTable.value = true
})
}

View File

@@ -115,6 +115,7 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
@@ -155,7 +156,7 @@ const tableConfig = reactive({
params: {},
btns: [
{name: '新增', key: 'add', color: '#DED0B2', auth: ''},
{name: '导出', key: '_export', color: '#DED0B2', auth: ''},
// {name: '导出', key: '_export', color: '#DED0B2', auth: ''},
]
})
const tableIns = ref()

View File

@@ -28,8 +28,8 @@
:icon="Delete" plain
:disabled="disabled">删除
</el-button>
<el-button type="warning" v-perm="['admin:config:export']" @click="handleExport" :icon="Download" plain>导出
</el-button>
<!-- <el-button type="warning" v-perm="['admin:config:export']" @click="handleExport" :icon="Download" plain>导出-->
<!-- </el-button>-->
</div>
<div class="table">
<el-table
@@ -271,13 +271,13 @@ const handleSelect = async (selection) => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}
const handleMoreDelete = (configId, configName) => {

View File

@@ -4,9 +4,9 @@
<fvForm :schema="schame" @getInstance="getInstance" :rules="rules"></fvForm>
<div class="assign-menu-title" >
<baseTitle title="分配菜单"></baseTitle>
<fvSelect
<fvSelect
:options="localData.tempRoleOpt"
v-model="localData.tempRoleSelect"
v-model="localData.tempRoleSelect"
style="width: 200px;"
placeholder="请选择模版角色"
@change="roleTempChange"
@@ -15,14 +15,14 @@
<fvCheckbox :options="localData.checkOptions" v-model="localData.checkList" @change="checkBoxChange" />
<el-input v-model="localData.filterText" placeholder="请输入关键词" style="width: 400px;" />
<div class="menu-assign">
<el-tree
<el-tree
ref="menuTree"
:data="localData.menuData"
:filter-node-method="filterMenu"
:props="localData.menuTreeProps"
:check-strictly="!localData.checkStrictly"
show-checkbox
node-key="menuId"
node-key="value"
@check-change="checkChange"
/>
</div>
@@ -38,7 +38,7 @@ import { useTagsView } from '@/stores/tagsview.js'
import { useAuthStore } from '@/stores/userstore.js'
import fvRadio from '@/fvcomponents/fvRadio/index.vue'
import { ElLoading, ElNotification } from 'element-plus';
import { getMenuList } from '@/api/system/menuman.js'
import { getMenuOpt } from '@/api/system/menuman.js'
import { getRoleDetail, operate, getTemRoleOption } from "@/api/role/role";
const tagsViewStore = useTagsView()
@@ -55,8 +55,8 @@ const localData = reactive({
filterText: '',
menuData: [],
menuTreeProps: {
value: "menuId",
label: 'menuName',
value: "value",
label: 'label',
children: 'children'
},
checkStrictly: true,
@@ -143,7 +143,7 @@ const init = async () => {
form.value.setValues({state: '1', template: false})
const res = await getTemRoleOption()
localData.tempRoleOpt = res.data
const { data } = await getMenuList()
const { data } = await getMenuOpt(0)
localData.menuData = data
}
@@ -171,7 +171,7 @@ const roleTempChange = async (val) => {
} catch (error) {
loading.value = false
}
}
const filterMenu = (value, data) => {
@@ -261,4 +261,4 @@ onMounted( async ()=>{
max-height: 500px;
overflow: auto;
}
</style>
</style>

View File

@@ -9,6 +9,7 @@ import Tag from '@/components/Tag.vue'
import { ElMessageBox, ElNotification } from 'element-plus';
import { deleteRole } from "@/api/role/role";
import { useAuthStore } from '@/stores/userstore.js'
import {getSubCompOpt} from "@/api/user/user";
const authStore = useAuthStore()
const router = useRouter()
@@ -43,7 +44,19 @@ const shortcuts = [
},
]
const searchConfig = reactive([
const searchConfig = ref([
{
label: '子公司名称',
prop: 'subCompanyId',
component: 'el-tree-select',
props: {
placeholder: '请输入',
clearable: true,
data: [],
filterable: true,
checkStrictly: true
},
},
{
label: '角色名称',
prop: 'roleName',
@@ -108,6 +121,11 @@ const tableConfig = reactive({
label: '角色权限',
align: 'center'
},
{
prop: 'companyName',
label: '公司名称',
align: 'center'
},
{
prop: 'template',
label: '是否为模版角色',
@@ -144,7 +162,7 @@ const tableConfig = reactive({
// }
// )
if(authStore.roles.includes('superAdmin')) {
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
} else if(!row.template) {
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
}
@@ -152,9 +170,9 @@ const tableConfig = reactive({
<div>
{
btn.map(item=>(
<el-button
type={item.type}
v-perm={item.auth}
<el-button
type={item.type}
v-perm={item.auth}
onClick={()=>item.func()}
link
>
@@ -183,20 +201,6 @@ const search = (val) => {
tableIns.value.refresh()
}
const formatDataScope = (dataScope) => {
let text = '--'
switch(dataScope) {
case '1': text = '所有数据权限'
break
case '2': text = '自定义数据权限'
break
case '3': text = '本部门数据权限'
break
case '4': text = '本部门及以下数据权限'
break
}
return text
}
const handleAdd = () => {
router.push({
@@ -229,7 +233,7 @@ const handleDel = (row) => {
// })
// return
// }
ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', {
type: 'warning',
confirmButtonText: '确定',
@@ -252,8 +256,18 @@ const headBtnClick = (key) => {
}
}
const init = async () => {
if(!authStore.roles.includes('superAdmin')) {
searchConfig.value = searchConfig.value.slice(1)
}
searchConfig.value = searchConfig.value
const res = await getSubCompOpt()
searchConfig.value.find(item=>item.prop == 'subCompanyId').props.data = res.data
}
init()
</script>
<style lang="scss" scoped>
</style>
</style>

View File

@@ -15,7 +15,7 @@ const router = useRouter()
const searchConfig = ref([
{
label: '子公司ID',
label: '子公司名称',
prop: 'subCompanyId',
component: 'el-tree-select',
props: {
@@ -33,7 +33,7 @@ const searchConfig = ref([
}
},
{
label: '部门ID',
label: '部门名称',
prop: 'departmentId',
component: 'el-tree-select',
props: {

View File

@@ -25,7 +25,7 @@
<div class="table">
<div class="table-header-btn">
<el-button type="primary" :icon="Plus" @click="handleAdd" plain>新增</el-button>
<el-button type="warning" @click="handleExport" :icon="Download" plain>导出</el-button>
<!-- <el-button type="warning" @click="handleExport" :icon="Download" plain>导出</el-button>-->
</div>
<el-table :data="list" ref="" :lazy="true" v-loading="loading" v-tabh>
<el-table-column prop="ipAddr" label="IP地址"></el-table-column>

View File

@@ -129,13 +129,13 @@ const getList = async () => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}

View File

@@ -151,13 +151,13 @@ const getList = async () => {
}
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}

View File

@@ -131,13 +131,13 @@ const getList = async () => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}

View File

@@ -34,8 +34,8 @@
<el-button type="danger" v-perm="['code:listener:del']" @click="handleMoreDelete(listenId,listenNameList)" :icon="Delete" plain
:disabled="disabled">删除
</el-button>
<el-button type="warning" v-perm="['code:listener:export']" @click="handleExport" :icon="Download" plain>导出
</el-button>
<!-- <el-button type="warning" v-perm="['code:listener:export']" @click="handleExport" :icon="Download" plain>导出-->
<!-- </el-button>-->
</div>
<div class="table">
<el-table
@@ -308,13 +308,13 @@ const handleSelect = async (selection) => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}
const handleMoreDelete=(listenId,listenNameList)=>{

View File

@@ -77,7 +77,7 @@ const timer = ref(null)
const validComponents = ref(['processSetting', 'processDesign'])
// const activeSelect = ref('formDesign')
// const activeSelect = ref('processSetting')
const activeSelect = ref('processDesign')
const activeSelect = ref('processSetting')
const validVisible = ref(false)
const validStep = ref(0)
const validResult = ref({})
@@ -88,7 +88,7 @@ const validOptions = ref([
// {title: '扩展设置', description: '', icon: '', status: ''}
])
onActivated(()=>{
activeSelect.value = 'processDesign'
activeSelect.value = 'processSetting'
init()
})

View File

@@ -18,8 +18,8 @@
<el-button type="primary" @click="getList" :icon="Search">搜索</el-button>
<el-button type="primary" @click="handleAdd" :icon="Plus">新增</el-button>
<el-button type="primary" @click="handleReset" :icon="Refresh" plain>重置</el-button>
<el-button type="primary" @click="handleExport" :icon="Download" plain>导出
</el-button>
<!-- <el-button type="primary" @click="handleExport" :icon="Download" plain>导出-->
<!-- </el-button>-->
</el-form-item>
</el-form>
<div class="table">
@@ -255,13 +255,13 @@ const handleSelect = async (selection, row) => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}

View File

@@ -115,13 +115,13 @@ const getList = async () => {
//切换每页显示条数
const handleSizeChange = async (val) => {
pageInfo.value.pageSize = val
pageInfo.pageSize = val
await getList()
}
//点击页码进行分页功能
const handleCurrentChange = async (val) => {
pageInfo.value.pageNum = val
pageInfo.pageNum = val
await getList()
}