Merge pull request 'fix : 修复权限按钮细节' (#227) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/227
This commit is contained in:
2024-05-23 15:43:22 +00:00
17 changed files with 276 additions and 118 deletions

View File

@@ -1,9 +1,9 @@
import request from '@/utils/request.js'
//项目立项
export const getApplyProcess = () => {
export const getApplyProcess = (projectId) => {
return request({
url: '/workflow/mosr/project/approval/initiation/process',
method: "post"
url: `/workflow/mosr/project/approval/initiation/process/${projectId}`,
method: "get"
});
};
export const projectApply = (data) => {
@@ -49,11 +49,10 @@ export const projectCheck = (data) => {
data: data
});
};
export const getProjectCheckProcess = (data) => {
export const getProjectCheckProcess = (projectId) => {
return request({
url: '/workflow/mosr/project/implementation/process',
method: "post",
data: data
url: `/workflow/mosr/project/implementation/process/${projectId}`,
method: "get"
});
};
@@ -79,10 +78,9 @@ export const projectConclusion = (data) => {
data: data
});
};
export const getProjectConclusionProcess = (data) => {
export const getProjectConclusionProcess = () => {
return request({
url: '/workflow/mosr/project/filing/process',
method: "post",
data: data
method: "get"
});
};

View File

@@ -1,5 +1,5 @@
<template>
<div>
<div v-loading="loading">
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<!-- <AttachmentUpload></AttachmentUpload> -->
<el-form :model="formData" label-width="auto">
@@ -24,7 +24,7 @@
<process-diagram-viewer v-if="processViewer" :id-name="type"/>
</div>
</div>
<Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>
<!-- <Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>-->
</div>
</template>
@@ -60,9 +60,14 @@ const props = defineProps({
type: {
type: String,
default: 'approval'
}, loading: {
type: Boolean,
default: false
}
})
watch(() => props.loading, (newVal) => {
props.loading = newVal
}, {deep: true})
const form = ref()
const localData = reactive({
@@ -119,7 +124,22 @@ const schema = computed(()=>{
prop: 'singleFile',
colProps: {
span: 24
}
},
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
>
{props.formData.singleFile?.originalFileName}
</span> :
<span>{'--'}</span>
}
</div>
)
},
]
} else {
@@ -129,7 +149,22 @@ const schema = computed(()=>{
prop: 'singleFile',
colProps: {
span: 24
}
},
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
>
{props.formData.singleFile?.originalFileName}
</span> :
<span>{'--'}</span>
}
</div>
)
},
]
}

View File

@@ -1,15 +1,18 @@
<template>
<baseTitle title="审核意见"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<div class="oper">
<div class="oper-page-btn">
<el-button type="danger" @click="handleReject">驳回</el-button>
<el-button type="primary" @click="handleAgree">同意</el-button>
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
</div>
</template>
<script setup lang="jsx">
import { ElLoading, ElNotification } from 'element-plus';
import { agreeTask, rejectTask} from "@/api/project-demand/index.js";
import {ElNotification} from 'element-plus';
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
const route = useRoute()
const router = useRouter()
const props = defineProps({
taskId: {
type: String,
@@ -22,10 +25,10 @@ const props = defineProps({
})
const form = ref()
const schema = computed(()=>{
const schema = computed(() => {
return [
{
label: '审核意见',
label: '',
prop: 'auditOpinion',
component: 'el-input',
colProps: {
@@ -39,16 +42,29 @@ const schema = computed(()=>{
}
]
})
// {
// "auditOpinion": "统一",
// "formData": {"formData":""},
// "taskId": "156e69b7-15eb-11ef-a152-f268fc747b04"
// }
const back = () => {
switch (route.name) {
case 'Initiation/detail':
router.push({name: 'Initiation'})
break;
case 'Filing/detail':
router.push({name: 'Filing'})
break;
case 'Implementation/detail':
router.push({name: 'Implementation'})
break;
case 'Summary/detail':
router.push({name: 'Summary'})
break;
case 'Requirement/detail':
router.push({name: 'Requirement'})
break;
}
}
// 驳回
const handleReject = async () => {
const values = form.value.getValues()
if(!values.auditOpinion) {
if (!values.auditOpinion) {
ElNotification({
title: '提示',
message: '请填写审核意见',
@@ -56,12 +72,18 @@ const handleReject = async () => {
})
return
}
console.log('values', values)
const params = {
// taskId: props.taskId,
// formData: props.formData,
// ...values
taskId: props.taskId,
...values
}
const res = await rejectTask(params)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
back()
}
const handleAgree = async () => {
@@ -72,9 +94,15 @@ const handleAgree = async () => {
...values
}
const res = await agreeTask(params)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
back()
}
</script>
<style lang="scss" scoped>
</style>
</style>

View File

@@ -161,10 +161,10 @@
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
</div>
</div>
<div class="oper-page-btn" v-if="data.state === '1' && data.taskId">
<el-button @click="handleReject(summaryForm)">驳回</el-button>
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
</div>
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
<!-- </div>-->
</el-form>
</div>
</template>
@@ -294,7 +294,6 @@ const handleDownload = (row) => {
watch(
() => props.formData,
(val) => {
console.log(val, 'ssss');
}
)
watch(() => props.processViewer, (newVal) => {

View File

@@ -449,11 +449,11 @@ const init = async () => {
const res = await getSubCompOpt()
companyOption.value = res.data
getProcessInfo().then(res => {
// ElNotification({
// title: '提示',
// message: res.msg,
// type: res.code === 1000 ? 'success' : 'error'
// })
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
let data = res.data
deploymentId.value = data.deploymentId

View File

@@ -21,7 +21,7 @@ export const requirementReported = (data) => {
export const getProcessInfo = () => {
return request({
url: '/workflow/mosr/requirement/collect/process',
method: "post"
method: "get"
});
};
export const getDetail = (projectId) => {

View File

@@ -5,11 +5,11 @@
:processViewer="summaryProcessViewer" :companyOption="companyOption" :loading="loading"/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading"/>
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer"></ApprovalDetail>
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
</template>
</steps>
<opinion v-if="commonForm.taskId" :formData="formData" :taskId="formData.taskId"></opinion>
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"></opinion>
</template>
<script setup lang="jsx">
@@ -22,7 +22,6 @@ import {ElNotification} from "element-plus";
const route = useRoute()
const companyOption = ref([])
const commonForm = ref({})
const summaryData = ref({})
const summaryProcessViewer = ref(true)
const loading = ref(false)
@@ -49,7 +48,6 @@ const getInfo = async (state) => {
if(code===1000){
summaryData.value = data;
loading.value = false
console.log('data-====================',data)
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;

View File

@@ -229,6 +229,11 @@ const getDetailInfo = async () => {
}
const init = () => {
getProjectConclusionProcess().then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
processDiagramViewer.value = false
if (res.code === 1000) {
let data = res.data

View File

@@ -1,21 +1,26 @@
<template>
<steps :active="'0'" @setDetail="setDetail" @stepChange="stepChange">
<template #content>
<collection-detail
:formData="collectionData.formData"
:data="collectionData"
:processViewer="commonProvessViewer"
:companyOption="companyOption"
@getInfo="getDemandCollectionInfo"
v-show="showActive == '00'"
<collection-detail
:formData="commonForm.formData"
:data="commonForm"
:processViewer="commonProvessViewer"
:companyOption="companyOption"
v-show="showActive == '00'"
:loading="loading"
/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="commonProvessViewer"/>
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"/>
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
</template>
</steps>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
</template>
<script setup lang="jsx">
@@ -25,19 +30,23 @@ import {useProcessStore} from '@/stores/processStore.js';
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
import { getMapProjectStateInfo } from '@/components/steps/api';
import { ElLoading } from "element-plus";
import {getMapProjectStateInfo} from '@/components/steps/api';
import {ElLoading} from "element-plus";
const route = useRoute()
const companyOption = ref([])
const loading = ref(false)
const processStore = useProcessStore()
const activeName = ref('first')
const handleClick = (tab, event) => {
console.log(tab, event)
if(tab.index.value === 0){
if (tab.index.value === 0) {
}
}
const getCompanyOption = async () => {
const res = await getSubCompOpt()
companyOption.value = res.data
@@ -50,13 +59,17 @@ const commonProvessViewer = ref(true)
const getAllInfo = async (state) => {
const loading = ElLoading.service({fullscreen: true})
try {
state == '00' && ( await getCompanyOption() )
state == '00' && (await getCompanyOption())
commonProvessViewer.value = false
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
if(state == '00') {
collectionData.value = data;
} else if(state == '10') {
summaryData.value = data;
loading.value = true
const {data, code} = await getMapProjectStateInfo(route.query.projectId, state)
// if(state == '00') {
// collectionData.value = data;
// } else if(state == '10') {
// summaryData.value = data;
// }
if(code===1000){
loading.value = false
}
commonForm.value = data
processStore.setDesign(data)
@@ -73,7 +86,7 @@ const getAllInfo = async (state) => {
} catch {
loading.close()
}
}
const showActive = ref()
@@ -90,19 +103,23 @@ const stepChange = (data) => {
</script>
<style scoped lang="scss">
.detail-block{
.detail-block {
padding-top: 15px;
:deep(.el-tabs__nav-scroll){
:deep(.el-tabs__nav-scroll) {
width: 100%;
display: flex;
.el-tabs__nav{
.el-tabs__nav {
display: flex;
flex: 1;
.el-tabs__item{
.el-tabs__item {
flex: 1;
font-size: 16px;
}
.is-active{
.is-active {
color: black;
background-color: #DED0B2;
}

View File

@@ -102,6 +102,11 @@ const tableConfig = reactive({
label: '所属公司',
align: 'center'
},
{
prop: 'approveName',
label: '审批人',
align: 'center'
},
{
prop: 'projectType',
label: '项目类型',
@@ -127,6 +132,11 @@ const tableConfig = reactive({
label: '起止时间',
align: 'center'
},
{
prop: 'taskNode',
label: '当前节点',
align: 'center'
},
{
prop: 'state',
label: '状态',
@@ -146,20 +156,27 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
// if (row.state === '3') {
btn.push({label: '附件', func: () => handleAttachment(row), type: 'primary'})
// } else if (row.state === '4') {
btn.push({label: '结项', func: () => handleConclusion(row), type: 'primary'})
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
// }
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("attachments")) {
btn.push({label: '附件',prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
}
if (buttons.has("entry")) {
btn.push({label: '结项',prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑',prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>
{
btn.map(item => (
<el-button
type={item.type}
// v-perm={item.auth}
v-perm={item.prem}
onClick={() => item.func()}
link
>
@@ -185,7 +202,8 @@ const handleDetail = (row) => {
router.push({
name:'Filing/detail',
query: {
id: row.requirementId
id: row.requirementId,
projectId: row.projectId
}
})
}

View File

@@ -195,7 +195,12 @@ const getDetailInfo = async () => {
})
}
const init = () => {
getProjectCheckProcess().then(res => {
getProjectCheckProcess(route.query.projectId).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
processDiagramViewer.value = false
if (res.code === 1000) {
let data = res.data

View File

@@ -2,20 +2,20 @@
<steps :active="'0'" @setDetail="setDetail" @stepChange="stepChange">
<template #content>
<collection-detail
:formData="collectionData.formData"
:data="collectionData"
:formData="commonForm.formData"
:data="commonForm"
:processViewer="commonProvessViewer"
:companyOption="companyOption"
@getInfo="getDemandCollectionInfo"
v-show="showActive == '00'"
:loading="loading"
/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="commonProvessViewer"/>
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/>
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
</template>
</steps>
<opinion v-if="commonForm.taskId" :formData="formData" :taskId="formData.taskId"/>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
</template>
<script setup lang="jsx">
@@ -42,6 +42,7 @@ const route = useRoute()
const activeName = ref('first')
const collectionData = ref({})
const summaryData = ref({})
const loading = ref(false)
const collectionProcessViewer = ref(true)
const summaryProcessViewer = ref(true)
const processStore = useProcessStore()
@@ -63,12 +64,16 @@ const getAllInfo = async (state) => {
try {
state == '00' && ( await getCompanyOption() )
commonProvessViewer.value = false
loading.value = true
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
if(state == '00') {
collectionData.value = data;
} else if(state == '10') {
summaryData.value = data;
}
if(code===1000){
loading.value = false
}
commonForm.value = data
processStore.setDesign(data)
processStore.runningList.value = data.runningList;

View File

@@ -106,6 +106,11 @@ const tableConfig = reactive({
label: '所属公司',
align: 'center'
},
{
prop: 'approveName',
label: '审批人',
align: 'center'
},
{
prop: 'projectType',
label: '项目类型',
@@ -131,6 +136,11 @@ const tableConfig = reactive({
label: '起止时间',
align: 'center'
},
{
prop: 'taskNode',
label: '当前节点',
align: 'center'
},
{
prop: 'state',
label: '状态',
@@ -150,23 +160,36 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
// if (row.state === '3') {
btn.push(
{label: '验收', func: () => handleCheck(row), type: 'primary'},
{label: '编辑', func: () => handleEdit(row), type: 'primary'},
{label: '台账', func: () => handleStandingBook(row), type: 'primary'},
{label: '附件', func: () => handleAttachment(row), type: 'primary'},
{label: '查看分摊', func: () => handleShare(row), type: 'primary'}
)
// }
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("check")) {
btn.push({label: '验收',prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
}
if (buttons.has("standing")) {
btn.push({label: '台账',prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
}
if (buttons.has("attachments")) {
btn.push({label: '附件',prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
}
if (buttons.has("viewAllocation")) {
btn.push({label: '查看分摊',prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
}
if (buttons.has("phaseChange")) {
btn.push({label: '阶段变更',prem: ['mosr:requirement:info'], func: () => handleChange(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>
{
btn.map(item => (
<el-button
type={item.type}
// v-perm={item.auth}
v-perm={item.prem}
onClick={() => item.func()}
link
>

View File

@@ -222,7 +222,12 @@ const getDetailInfo = async () => {
})
}
const init = () => {
getApplyProcess().then(res => {
getApplyProcess(route.query.projectId).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
processDiagramViewer.value = false
if (res.code === 1000) {
let data = res.data

View File

@@ -2,19 +2,19 @@
<steps :active="'0'" @setDetail="setDetail" @stepChange="stepChange">
<template #content>
<collection-detail
:formData="collectionData.formData"
:data="collectionData"
:formData="commonForm.formData"
:data="commonForm"
:processViewer="commonProvessViewer"
:companyOption="companyOption"
@getInfo="getDemandCollectionInfo"
v-show="showActive == '00'"
:loading="loading"
/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="commonProvessViewer"/>
<ApprovalDetail v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer"></ApprovalDetail>
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"/>
<ApprovalDetail v-show="showActive == '20'" :formData="commonForm.formData" :data="commonForm" :processViewer="commonProvessViewer" :loading="loading"></ApprovalDetail>
</template>
</steps>
<opinion v-if="commonForm.taskId" :formData="formData" :taskId="formData.taskId"/>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"/>
</template>
<script setup lang="jsx">
@@ -34,6 +34,7 @@ const activeName = ref('first')
const collectionData = ref({})
const summaryData = ref({})
const collectionProcessViewer = ref(true)
const loading = ref(false)
const summaryProcessViewer = ref(true)
const processStore = useProcessStore()
const companyOption = ref([])
@@ -100,12 +101,16 @@ const getAllInfo = async (state) => {
try {
state == '00' && ( await getCompanyOption() )
commonProvessViewer.value = false
loading.value = true
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
if(state == '00') {
collectionData.value = data;
} else if(state == '10') {
summaryData.value = data;
}
if(code===1000){
loading.value = false
}
console.log(data, 'data--22');
commonForm.value = data
processStore.setDesign(data)

View File

@@ -98,10 +98,15 @@ const tableConfig = reactive({
align: 'center'
},
{
prop: 'affiliatedCompanyId',
prop: 'affiliatedCompany',
label: '所属公司',
align: 'center'
},
{
prop: 'approveName',
label: '审批人',
align: 'center'
},
{
prop: 'projectType',
label: '项目类型',
@@ -127,6 +132,11 @@ const tableConfig = reactive({
label: '起止时间',
align: 'center'
},
{
prop: 'taskNode',
label: '当前节点',
align: 'center'
},
{
prop: 'state',
label: '状态',
@@ -146,11 +156,19 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
if (row.state === '3') {
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
} else if (row.state === '0') {
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
}
// if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// }
if (buttons.has("apply")) {
btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>
@@ -158,7 +176,7 @@ const tableConfig = reactive({
btn.map(item => (
<el-button
type={item.type}
// v-perm={item.auth}
v-perm={item.prem}
onClick={() => item.func()}
link
>

View File

@@ -46,7 +46,6 @@ const props = defineProps({
})
const init = () => {
console.log('props.userInfo',props.userInfo)
for (let user of props.userInfo) {
initUser(user)
}