fix : 修复页面细节
This commit is contained in:
@@ -29,13 +29,35 @@
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||
<el-radio-group v-model="formData.isSpecialFund" size="mini">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<Tinymce v-if="showTinymce" image-url="/notice/file" file-url="/notice/file"
|
||||
v-model:value="formData.collectExplain" height="300" />
|
||||
v-model:value="formData.collectExplain" />
|
||||
<baseTitle title="申请文件"></baseTitle>
|
||||
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable"
|
||||
<fvTable style="width: 100%;max-height: 650px;" v-if="showTable"
|
||||
:tableConfig="tableConfig" :data="formData.fileList"
|
||||
:isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
@@ -74,6 +96,7 @@ import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const authStore = useAuthStore()
|
||||
@@ -87,7 +110,8 @@ const formData = ref({
|
||||
collectType: '',
|
||||
deadline: '',
|
||||
collectExplain: '',
|
||||
fileList: []
|
||||
fileList: [],
|
||||
isSpecialFund:false
|
||||
})
|
||||
const showTinymce = ref(true)
|
||||
const routerName = ref(router.currentRoute.value.name)
|
||||
@@ -99,6 +123,7 @@ const typeOption = ref([
|
||||
}
|
||||
])
|
||||
const companyOption = ref([])
|
||||
const specialFundOption = ref([])
|
||||
const form = ref(null)
|
||||
const fileList = ref([])
|
||||
const loading = ref(false)
|
||||
@@ -111,6 +136,7 @@ const rules = reactive({
|
||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
const tableConfig = reactive({
|
||||
@@ -178,8 +204,10 @@ const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
|
||||
tag = '需求征集'
|
||||
}else if(routerName.value === 'Requirement/edit'){
|
||||
}else if(!formData.value.collectType &&routerName.value === 'Requirement/edit'){
|
||||
tag = '需求征集'
|
||||
}if (formData.value.collectType) {
|
||||
tag = formData.value.collectType
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -205,6 +233,8 @@ const getFile = (val) => {
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
const resFund = await getFundOption()
|
||||
specialFundOption.value = resFund.data
|
||||
getWorkflowInfo().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -247,7 +277,9 @@ const submitParam = (item) => {
|
||||
requirementId: item.requirementId ? item.requirementId : 0,
|
||||
requirementName: item.requirementName,
|
||||
fileList: files,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
isSpecialFund:item.isSpecialFund,
|
||||
specialFund:item.specialFund
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
@@ -334,7 +366,9 @@ onMounted(async () => {
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
:deep(.el-table--fit ){
|
||||
height: 400px;
|
||||
}
|
||||
.add-block {
|
||||
//display: flex;
|
||||
//justify-content: space-between;
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||
<el-form-item>
|
||||
@@ -43,6 +48,16 @@
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div class="approval-record">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
|
||||
:state="processInstanceData.state"/>
|
||||
<process-diagram-viewer v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="processInstanceData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
@@ -57,14 +72,6 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
|
||||
:state="processInstanceData.state"/>
|
||||
<process-diagram-viewer v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
||||
@@ -82,6 +89,7 @@ import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {ElMessage} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {matterTree} from '@/utils/matterTree.js';
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
@@ -91,6 +99,7 @@ const loading = ref(false)
|
||||
const demandForm = ref()
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const specialFundOption = ref([])
|
||||
const formPermMap = ref(new Map());
|
||||
const processInstanceData = ref({})
|
||||
const showTable = ref(false)
|
||||
@@ -197,6 +206,10 @@ const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const getFundOptions = async () => {
|
||||
const res = await getFundOption()
|
||||
specialFundOption.value = res.data
|
||||
}
|
||||
|
||||
const getDataSourceOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
@@ -219,11 +232,19 @@ const handleDownload = (row) => {
|
||||
const init = async () => {
|
||||
if (!route.query.id) return;
|
||||
await getCompanyOption()
|
||||
await getFundOptions()
|
||||
getInfo(route.query.id).then(res => {
|
||||
loading.value = false
|
||||
let data = res.data
|
||||
formData.value = data.formData;
|
||||
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
|
||||
if(data.formData.specialFund){
|
||||
specialFundOption.value.forEach(item => {
|
||||
if(data.formData.specialFund==item.value){
|
||||
data.formData.specialFund = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
|
||||
@@ -115,9 +115,9 @@ const tableConfig = reactive({
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("report")) {
|
||||
btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("report")) {
|
||||
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -134,7 +134,8 @@ const tableConfig = reactive({
|
||||
}
|
||||
{
|
||||
buttons.has("delete") ?
|
||||
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} perm={['mosr:requirement:del']}
|
||||
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/> : ''
|
||||
}
|
||||
</div>
|
||||
@@ -154,23 +155,17 @@ const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const handleAdd = () => {
|
||||
try{
|
||||
router.push({
|
||||
name:'Requirement/add',
|
||||
query:{}
|
||||
})
|
||||
}catch (err){
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '该用户无新增权限',
|
||||
// type: 'warning'
|
||||
// })
|
||||
}
|
||||
const handleAdd = (row) => {
|
||||
router.push({
|
||||
name: 'Requirement/add',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name:'Requirement/edit',
|
||||
name: 'Requirement/edit',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
@@ -188,7 +183,7 @@ const handleDelete = (row) => {
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Requirement/detail',
|
||||
name: 'Requirement/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
@@ -196,9 +191,9 @@ const handleDetail = (row) => {
|
||||
}
|
||||
const handleReport = (row) => {
|
||||
router.push({
|
||||
name:'Summary/add',
|
||||
name: 'Summary/add',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user