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

View File

@@ -18,11 +18,20 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="approval-record"> <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"> <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"/> :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> </div>
</div> </div>
@@ -34,14 +43,15 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
import {ElLoading} from 'element-plus'; import {ElLoading} from 'element-plus';
import {downloadFile} from "@/api/project-demand"; import {downloadFile} from "@/api/project-demand";
const changeDiagram = ref(false)
const props = defineProps({ const props = defineProps({
formData: { formData: {
type: Object, type: Object,
default: {} default: {}
}, },
data: { data: {
type: Array, type: Object,
default: [] default: {}
}, },
processViewer: { processViewer: {
type: Boolean, type: Boolean,
@@ -83,7 +93,16 @@ const schema = computed(() => {
prop: 'preProcess', prop: 'preProcess',
colProps: { colProps: {
span: 24 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: '项目立项附件', label: '项目立项附件',
@@ -115,7 +134,16 @@ const schema = computed(() => {
prop: 'preProcess', prop: 'preProcess',
colProps: { colProps: {
span: 24 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: '项目验收附件', label: '项目验收附件',

View File

@@ -2,7 +2,7 @@
<div v-loading="loading"> <div v-loading="loading">
<el-form :model="formData" label-width="auto"> <el-form :model="formData" label-width="auto">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12" v-if="type==='singleDetail'">
<el-form-item label="征集名称"> <el-form-item label="征集名称">
<span>{{ formData.requirementName }}</span> <span>{{ formData.requirementName }}</span>
</el-form-item> </el-form-item>
@@ -17,7 +17,7 @@
<span>{{ formData.companyIds }}</span> <span>{{ formData.companyIds }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="type==='singleDetail'?12:24"> <el-col :span="12">
<el-form-item label="截止时间"> <el-form-item label="截止时间">
<span>{{ formData.deadline }}</span> <span>{{ formData.deadline }}</span>
</el-form-item> </el-form-item>
@@ -57,11 +57,21 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="approval-record"> <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"> <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"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="collectionProcess"/> <process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="collectionProcess"/>
</div> </div>
</div> </div>
</el-form> </el-form>
@@ -108,7 +118,7 @@ const props = defineProps({
default: '' default: ''
} }
}) })
const changeDiagram = ref(false)
const _value = computed({ const _value = computed({
get() { get() {
return props.value; return props.value;
@@ -142,12 +152,4 @@ watch(() => props.processViewer, (newVal) => {
:deep(.el-empty__description) { :deep(.el-empty__description) {
margin-top: 0; margin-top: 0;
} }
.approval-record {
padding-bottom: 30px;
.process {
position: relative;
}
}
</style> </style>

View File

@@ -1,33 +1,93 @@
<template> <template>
<div class="apply-block"> <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-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="前置流程"> <el-form-item label="前置流程" :required="true" prop="requestName">
<el-input v-model="formData.requirementName" clearable></el-input> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<AttachmentUpload ref="attachment" :label="title+'附件'" :showTable="showTable" :otherFileList="otherFileList" <AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
:otherFileList="otherFileList"
@getAttachment="getAttachment" @getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" @getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="route.query.state==3"/> :preview="mode == 'resubmit'"/>
<div v-if="route.query.state==3"> <div v-if="mode === 'resubmit'&&!changeDiagram">
<baseTitle title="审批记录"></baseTitle> <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"> <div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="data.operationList" <operation-render :operation-list="data.operationList" :state="data.state"/>
:state="data.state"/>
</div> </div>
</div> </div>
<baseTitle title="流程"></baseTitle> <div v-if="changeDiagram">
<div class="approval-record"> <div class="approval-record">
<process-diagram-viewer mode="view" idName="projectApply" v-if="processDiagramViewer"/> <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>
<div class="oper-page-btn"> <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-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
<el-button color="#DED0B2" v-else-if="route.query.state==3" @click="handleSubmit(applyForm)">重新提交</el-button> <el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button>
</div> </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> </div>
</template> </template>
@@ -35,46 +95,147 @@
import OperationRender from '@/views/workflow/common/OperationRender.vue' import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'; import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {ElNotification} from "element-plus"; 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 {useProcessStore} from '@/stores/processStore.js';
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import Paging from "@/components/pagination/index.vue";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const changeDiagram = ref(true)
const emit = defineEmits(["getAttachment", "getOtherFile"]) const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
default: '项目立项' default: 'apply'
}, },
showTable: { showTable: {
type: Boolean, type: Boolean,
default: false default: false
}, },
mode: {
type: String,
default: "view"
},
data: { data: {
type: Array, type: Object,
default: [] 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({ const rules = reactive({
// requirementName: [{required: true, message: '请选择前置流程', trigger: 'blur'}], requestName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
}) })
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const processStore = useProcessStore() const processStore = useProcessStore()
const otherFileList = ref([]) const otherFileList = ref([])
const formData = ref({}) const localFormData = ref({
preProcess: {
requestId: null,
requestName: '',
baseUrl: ''
}
})
const attachment = ref() const attachment = ref()
const showPreTable = ref(false)
const showTable = ref(true) const showTable = ref(true)
const loading = ref(false) const loading = ref(false)
const processDiagramViewer = ref(false) const processDiagramViewer = ref(false)
const name = ref(router.currentRoute.value.name) const name = ref(router.currentRoute.value.name)
const applyForm = ref()
const deploymentId = 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) => { const compositeParam = (item) => {
// let tag = ''
// if (name.value === 'Initiation/apply' || route.query.state==3) {
// tag = props.title
// }
return { return {
fileId: item.id, fileId: item.id,
size: item.size, size: item.size,
@@ -82,12 +243,12 @@ const compositeParam = (item) => {
fileType: item.fileType, fileType: item.fileType,
url: item.url, url: item.url,
newFile: false, newFile: false,
tag: props.title tag: getTitleName(props.title)
} }
} }
const getAttachment = (val) => { const getAttachment = (val) => {
console.log('上传文件getAttachment', val) console.log('上传文件getAttachment', val)
formData.value.singleFile = compositeParam(val) localFormData.value.singleFile = compositeParam(val)
} }
const getOtherFile = (val) => { const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val) console.log('上传文件getOtherFile', val)
@@ -104,145 +265,135 @@ const getFileParam = (item) => {
tag: item.tag tag: item.tag
} }
} }
const handleSubmit = (instance) => { const handleSubmit = async () => {
if (!instance) return if (localFormData.value.preProcess === undefined) {
instance.validate(async (valid) => { ElNotification({
if (!valid) return title: '提示',
let files = [] message: '请选择前置流程',
if (route.query.state === '3') { type: 'error'
attachment.value.allFileList.forEach(item => { })
files.push(getFileParam(item)) }
}) let files = []
} else { if (props.mode === 'resubmit') {
otherFileList.value.forEach(item => { attachment.value.allFileList.forEach(item => {
files.push(getFileParam(item)) files.push(getFileParam(item))
}) })
} } else {
// if (formData.value.singleFile !== undefined) { otherFileList.value.forEach(item => {
// formData.value.singleFile = getFileParam(formData.value.singleFile) files.push(getFileParam(item))
// } })
if (attachment.value.singleFile == null) { }
attachment.value.validate() // if (localFormData.value.singleFile !== undefined) {
ElNotification({ // localFormData.value.singleFile = getFileParam(localFormData.value.singleFile)
title: '提示', // }
message: '请上传附件', console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile)
type: 'error' // if (localFormData.value.singleFile) {
}) //
return; // } else {
} else { if (attachment.value.singleFile == null) {
attachment.value.clearValidate() attachment.value.validate()
} ElNotification({
let params = { title: '提示',
deploymentId: deploymentId.value, message: '请上传附件',
requirementId: route.query.id, type: 'error'
fileList: files, })
singleFile: formData.value.singleFile, return;
projectId: route.query.projectId, } else {
} attachment.value.clearValidate()
console.log('params', params) }
let res // }
if (route.query.state === '3') {
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) res = await resubmitApply(params)
} else { } else {
res = await projectApply(params) res = await projectApply(params)
} }
ElNotification({ } else if (props.step === '40') {
title: '提示', if (props.mode === 'resubmit') {
message: res.msg, res = await resubmitCheck(params)
type: res.code === 1000 ? 'success' : 'error' } else {
}) res = await projectCheck(params)
if (res.code === 1000) { }
tagsViewStore.delVisitedViews(router.currentRoute.value.path) } 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({ await router.push({
name: 'Initiation' 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 () => { const init = async () => {
// let files = [] let id = projectId.value
// if (route.query.state == 3) { if (!id) return;
// 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;
processDiagramViewer.value = false processDiagramViewer.value = false
getApplyProcess(route.query.projectId).then(res => { let res
if (res.code === 1000) { if (props.step === '20') {
let data = res.data res = await getApplyProcess(id)
deploymentId.value = data.deploymentId } else if (props.step === '40') {
processStore.setDesign(data) res = await getProjectCheckProcess(id)
processStore.runningList.value = data.runningList; } else if (props.step === '50') {
processStore.endList.value = data.endList; res = await getProjectConclusionProcess(id)
processStore.noTakeList.value = data.noTakeList; }
processStore.refuseList.value = data.refuseList; if (res.code === 1000) {
processStore.passList.value = data.passList; let data = res.data
nextTick(() => { deploymentId.value = data.deploymentId
processDiagramViewer.value = true processStore.setDesign(data)
}) processStore.runningList.value = data.runningList;
} else { processStore.endList.value = data.endList;
ElNotification({ processStore.noTakeList.value = data.noTakeList;
title: '提示', processStore.refuseList.value = data.refuseList;
message: res.msg, processStore.passList.value = data.passList;
type: 'error' nextTick(() => {
}) processDiagramViewer.value = true
} })
}) } else {
}
const getDetailInfo = async () => {
if (!route.query.projectId) return;
getApplyDetail(route.query.projectId).then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: res.msg, 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> </script>

View File

@@ -64,11 +64,21 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="approval-record"> <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"> <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"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="fundProcess"/> <process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="fundProcess"/>
</div> </div>
</div> </div>
</el-form> </el-form>
@@ -83,6 +93,7 @@ import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue' import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import {downloadFile} from "@/api/project-demand"; import {downloadFile} from "@/api/project-demand";
const changeDiagram = ref(false)
const emit = defineEmits(['getInfo', "update:formData"]) const emit = defineEmits(['getInfo', "update:formData"])
const form = ref() const form = ref()

View File

@@ -151,11 +151,20 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="approval-record"> <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"> <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"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/> <process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
</div> </div>
</div> </div>
</el-form> </el-form>
@@ -202,6 +211,7 @@ const props = defineProps({
default: '' default: ''
} }
}) })
const changeDiagram = ref(false)
const localFormData = ref({}) const localFormData = ref({})
const router = useRouter() const router = useRouter()
const fundOption = ref([]) const fundOption = ref([])

View File

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

View File

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

View File

@@ -37,11 +37,20 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="approval-record"> <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"> <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"/> :state="shareData.state"/>
<process-diagram-viewer v-if="shareProcessViewer" id-name="shareProcess"/> <process-diagram-viewer v-if="shareProcessViewer&&changeDiagram" id-name="shareProcess"/>
</div> </div>
</div> </div>
<opinion v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId" v-model:value="auditOpinion"></opinion> <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 {useProcessStore} from '@/stores/processStore.js';
import {getAllocationDetail} from "@/api/expense-manage"; import {getAllocationDetail} from "@/api/expense-manage";
const changeDiagram = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const route = useRoute() const route = useRoute()
const shareData = ref({}) const shareData = ref({})

View File

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

View File

@@ -2,35 +2,44 @@
<div v-loading="loading" class="add-block"> <div v-loading="loading" class="add-block">
<baseTitle title="需求征集信息录入"></baseTitle> <baseTitle title="需求征集信息录入"></baseTitle>
<el-form :model="formData" inline class="query-form" ref="demandForm" :rules="rules"> <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-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-form-item label="是否专项资金" prop="isSpecialFund">
<el-radio-group v-model="formData.isSpecialFund" size="mini"> <el-radio-group v-model="formData.isSpecialFund" size="mini">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@@ -380,6 +389,12 @@ onMounted(async () => {
:deep(.el-empty__description) { :deep(.el-empty__description) {
margin-top: 0; margin-top: 0;
} }
.tree-select{
:deep(.el-form-item__content .el-select__wrapper ) {
width: 750px;
}
}
:deep(.el-table--fit ) { :deep(.el-table--fit ) {
height: 300px !important; height: 300px !important;

View File

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

View File

@@ -244,6 +244,7 @@
<!-- <el-button type="info" @click="staging">存为草稿</el-button>--> <!-- <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-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
<el-button @click="handleBack">返回</el-button>
</div> </div>
</div> </div>
</template> </template>
@@ -307,6 +308,9 @@ const rules = reactive({
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}] contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
}) })
const handleBack = () => {
history.back()
}
const disabledDate = (time) => { const disabledDate = (time) => {
return time.getTime() < new Date(formData.value.startTime).getTime(); 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 {useProcessStore} from '@/stores/processStore.js';
import {getMapProjectStateInfo} from '@/components/steps/api'; import {getMapProjectStateInfo} from '@/components/steps/api';
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue"; import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
import {ElNotification} from "element-plus"; import {ElLoading, ElNotification} from "element-plus";
const route = useRoute() const route = useRoute()
const summaryData = ref({}) const summaryData = ref({})
@@ -40,36 +40,46 @@ const active = ref(route.query.state)
const auditOpinion = ref('') const auditOpinion = ref('')
const showActive = ref() const showActive = ref()
const getInfo = async (state) => { const getInfo = async (state) => {
fileListShow.value = 'READ' const loading = ElLoading.service({fullscreen: true})
const projectId = route.query.projectId try {
summaryProcessViewer.value = false fileListShow.value = 'READ'
loading.value = true const projectId = route.query.projectId
const {code, data, msg} = await getMapProjectStateInfo(projectId, state) summaryProcessViewer.value = false
if (code === 1000) { loading.value = true
summaryData.value = data; const {code, data, msg} = await getMapProjectStateInfo(projectId, state)
loading.value = false if (code === 1000) {
processStore.setDesign(data) summaryData.value = data;
processStore.runningList.value = data.runningList; loading.value = false
processStore.endList.value = data.endList; if(data.runningList===null) {
processStore.noTakeList.value = data.noTakeList; loading.close()
processStore.refuseList.value = data.refuseList; return;
processStore.passList.value = data.passList;
nextTick(() => {
summaryProcessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
} }
}) processStore.setDesign(data)
} else { processStore.runningList.value = data.runningList;
ElNotification({ processStore.endList.value = data.endList;
title: '提示', processStore.noTakeList.value = data.noTakeList;
message: msg, processStore.refuseList.value = data.refuseList;
type: 'error' processStore.passList.value = data.passList;
}) nextTick(() => {
if (msg === '查询结果为空') { summaryProcessViewer.value = true
summaryData.value = [] 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: {} // colProps: {}
// }, // },
]) ])
const auths = {
edit: ['mosr:collect:resubmit'],
detail: ['mosr:collect:info'],
report: ['mosr:collect:reported'],
}
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
@@ -156,19 +161,17 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { 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")) { 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 ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
{ {
@@ -197,9 +200,9 @@ const tableConfig = reactive({
api: '/workflow/mosr/requirement/collect', api: '/workflow/mosr/requirement/collect',
params: {}, params: {},
btns: [ btns: [
{name: '新增上报', key: 'add', color: '#DED0B2', auth: ''}, {name: '新增上报', key: 'add', color: '#DED0B2', auth:auths.report},
{name: '年度计划导出', key: '_export', auth: ''}, // {name: '年度计划导出', key: '_export', auth: ''},
{name: '经费预算生成', key: 'preMonty', auth: ''}, // {name: '经费预算生成', key: 'preMonty', auth: ''},
] ]
}) })
const headBtnClick = (key) => { const headBtnClick = (key) => {

View File

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

View File

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

View File

@@ -227,21 +227,22 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { 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")) { 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")) { 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")) { 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 ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,12 +1,10 @@
<template> <template>
<el-button type="primary" link > <el-button color="#DED0B2" >
{{ modelValue || '请选择抄送人员' }} {{ modelValue || '请选择抄送人员' }}
</el-button> </el-button>
</template> </template>
<script setup> <script setup>
import { ref, watch, watchEffect } from 'vue';
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: String, type: String,
@@ -22,4 +20,4 @@ const localText = ref('')
<style lang="scss" scoped> <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" <steps :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
:reportType="route.query.id==='-1'?'direct':''"> :reportType="route.query.id==='-1'?'direct':''">
<template #content> <template #content>
<collection-detail <collection-detail :formData="detailData.formData"
:formData="commonForm.formData" :data="detailData"
:data="commonForm" :processViewer="commonProvessViewer"
:processViewer="commonProvessViewer" v-show="showActive == '00'"
v-show="showActive == '00'" :fileListShow="fileListShow"
:loading="loading" v-model:value="auditOpinion"
v-model:value="auditOpinion"
/> />
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" <summary-detail v-show="showActive == '10'"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow" :formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply" :formData="commonForm.formData" <ApprovalDetail type="approval"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading" v-if="showActive == '20'&&!editShow"
:fileListShow="fileListShow" v-model:value="auditOpinion"/> :formData="detailData.formData"
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="detailData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" v-model:value="auditOpinion"/> :fileListShow="fileListShow"
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
v-model:value="auditOpinion"/> 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> </template>
</steps> </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"/> v-model:value="auditOpinion"/>
</template> </template>
@@ -39,28 +58,47 @@ import {ElLoading, ElNotification} from "element-plus";
import Opinion from "@/components/DetailComponent/Opinion.vue"; import Opinion from "@/components/DetailComponent/Opinion.vue";
const route = useRoute() const route = useRoute()
const showApply = ref(false) const editShow = ref(false)
const applyTitle = ref('apply')
const loading = ref(false) const loading = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const fileListShow = ref('READ') const fileListShow = ref('READ')
const mode = ref('')
const currentStep = ref() const currentStep = ref()
const auditOpinion = ref('') const auditOpinion = ref('')
// const step = ref(route.query.step)
route.query.step == '10' && (currentStep.value = 1) route.query.step == '10' && (currentStep.value = 1)
route.query.step == '20' && (currentStep.value = 2) route.query.step == '20' && (currentStep.value = 2)
route.query.step == '40' && (currentStep.value = 3) route.query.step == '40' && (currentStep.value = 3)
route.query.step == '50' && (currentStep.value = 4) route.query.step == '50' && (currentStep.value = 4)
const showActive = ref() const showActive = ref()
const commonForm = ref({}) const detailData = ref({})
const commonProvessViewer = ref(true) const commonProvessViewer = ref(true)
const getAllInfo = async (state) => { const getAllInfo = async (state) => {
const loading = ElLoading.service({fullscreen: true}) const loading = ElLoading.service({fullscreen: true})
try { try {
fileListShow.value = 'READ'
commonProvessViewer.value = false commonProvessViewer.value = false
loading.value = true
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state) const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
if (code === 1000) { 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 { } else {
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -68,49 +106,36 @@ const getAllInfo = async (state) => {
type: 'error' type: 'error'
}) })
if (msg === '查询结果为空') { if (msg === '查询结果为空') {
commonForm.value = [] detailData.value = []
detailData.value.formData = {}
} }
loading.close() 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 { } catch {
loading.close() loading.close()
} }
} }
const changeModel = (active) => { const changeModel = (active, mode) => {
if (route.query.state === '0' && active === '20') { editShow.value = false
showApply.value = true nextTick(() => {
} else if (route.query.state === '3' && active === '20') { editShow.value = mode === 'submit' || mode === 'resubmit';
showApply.value = true if (route.query.step === '20' && active === '20') {
getAllInfo(active) applyTitle.value = 'apply'
} else { } else if (route.query.step === '40' && active === '40') {
showApply.value = false applyTitle.value = 'check'
getAllInfo(active) } else if (route.query.step === '50' && active === '50') {
} applyTitle.value = 'filing'
}
})
} }
const setDetail = (active) => { const setDetail = (active) => {
showActive.value = active showActive.value = active
changeModel(active) getAllInfo(active)
} }
const stepChange = (data) => { const stepChange = (data) => {
showActive.value = data.active showActive.value = data.active
changeModel(data.active) getAllInfo(data.active)
} }
</script> </script>

View File

@@ -183,7 +183,7 @@ const tableConfig = reactive({
}, },
{ {
prop: 'researchStage', prop: 'researchStage',
label: '研发阶段', label: '项目阶段',
align: 'center', align: 'center',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
@@ -245,27 +245,28 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { 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")) { 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")) { 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")) { 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")) { 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")) { 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")) { if (buttons.has("phaseChange")) {
btn.push({label: '阶段变更', prem: ['mosr:phase:change'], func: () => handlePhaseChange(row), type: 'primary'}) btn.push({label: '阶段变更', prem: ['mosr:phase:change'], func: () => handlePhaseChange(row), type: 'primary'})
@@ -298,7 +299,7 @@ const tableConfig = reactive({
api: '/workflow/mosr/project/implementation', api: '/workflow/mosr/project/implementation',
params: {}, params: {},
btns: [ btns: [
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''} // {name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
] ]
}) })

View File

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

View File

@@ -1,4 +1,6 @@
<template> <template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="阶段变更详情"></baseTitle> <baseTitle title="阶段变更详情"></baseTitle>
<div style="color: #606266;font-size: 14px">抄送人{{copyName}}</div> <div style="color: #606266;font-size: 14px">抄送人{{copyName}}</div>
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase" <ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
@@ -10,6 +12,8 @@
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getPhaseDetail} from "@/api/project-manage"; import {getPhaseDetail} from "@/api/project-manage";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute() const route = useRoute()
const summaryData = ref({}) const summaryData = ref({})
@@ -19,6 +23,34 @@ const loading = ref(false)
const auditOpinion = ref('') const auditOpinion = ref('')
const copyName = ref('') const copyName = ref('')
const fileListShow = ref('READ') 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 () => { const getInfo = async () => {
fileListShow.value = 'READ' fileListShow.value = 'READ'
const projectId = route.query.projectId const projectId = route.query.projectId

View File

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

View File

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

View File

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

View File

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

View File

@@ -226,21 +226,22 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { 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")) { 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")) { // if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// } // }
if (buttons.has("apply")) { 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 ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -9,6 +9,7 @@ import Tag from '@/components/Tag.vue'
import { ElMessageBox, ElNotification } from 'element-plus'; import { ElMessageBox, ElNotification } from 'element-plus';
import { deleteRole } from "@/api/role/role"; import { deleteRole } from "@/api/role/role";
import { useAuthStore } from '@/stores/userstore.js' import { useAuthStore } from '@/stores/userstore.js'
import {getSubCompOpt} from "@/api/user/user";
const authStore = useAuthStore() const authStore = useAuthStore()
const router = useRouter() 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: '角色名称', label: '角色名称',
prop: 'roleName', prop: 'roleName',
@@ -108,6 +121,11 @@ const tableConfig = reactive({
label: '角色权限', label: '角色权限',
align: 'center' align: 'center'
}, },
{
prop: 'companyName',
label: '公司名称',
align: 'center'
},
{ {
prop: 'template', prop: 'template',
label: '是否为模版角色', label: '是否为模版角色',
@@ -144,7 +162,7 @@ const tableConfig = reactive({
// } // }
// ) // )
if(authStore.roles.includes('superAdmin')) { 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) { } else if(!row.template) {
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'}) btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
} }
@@ -152,9 +170,9 @@ const tableConfig = reactive({
<div> <div>
{ {
btn.map(item=>( btn.map(item=>(
<el-button <el-button
type={item.type} type={item.type}
v-perm={item.auth} v-perm={item.auth}
onClick={()=>item.func()} onClick={()=>item.func()}
link link
> >
@@ -183,20 +201,6 @@ const search = (val) => {
tableIns.value.refresh() 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 = () => { const handleAdd = () => {
router.push({ router.push({
@@ -229,7 +233,7 @@ const handleDel = (row) => {
// }) // })
// return // return
// } // }
ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', { ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', {
type: 'warning', type: 'warning',
confirmButtonText: '确定', 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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