mirror of
https://gitee.com/maimengcloud/xm-ui-web.git
synced 2025-12-30 10:12:26 +00:00
合并3.5商业版的改造到开源版
This commit is contained in:
@@ -936,6 +936,39 @@ const RoutesXmCore: AppRouteRecordRaw[] = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: '/xm/cfg',
|
||||||
|
component: Layout,
|
||||||
|
name: 'xmCfg',
|
||||||
|
meta: {
|
||||||
|
title: '项目配置',
|
||||||
|
icon: 'ep:tools',
|
||||||
|
hidden: false,
|
||||||
|
},
|
||||||
|
// leaf: true,//只有一个节点
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'type',
|
||||||
|
component: () => import('@/views/xm/core/xmCfg/ProjectType.vue'),
|
||||||
|
name: 'projectCfgType',
|
||||||
|
meta: { icon: 'ep:tools',title: '项目类型', menu: true, hidden: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'setup',
|
||||||
|
props:{itemCode:'projectSetup'},
|
||||||
|
component: () => import('@/components/mdp-ui-ext/mdp-meta-option/Options.vue'),
|
||||||
|
name: 'projectCfgSetup',
|
||||||
|
meta: { icon: 'ep:tools',title: '立项细则', menu: true, hidden: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'accept',
|
||||||
|
props:{itemCode:'projectAccept'},
|
||||||
|
component: () => import('@/components/mdp-ui-ext/mdp-meta-option/Options.vue'),
|
||||||
|
name: 'projectCfgAccept',
|
||||||
|
meta: { icon: 'ep:tools',title: '结项细则', menu: true, hidden: false }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default RoutesXmCore
|
export default RoutesXmCore
|
||||||
|
|||||||
90
src/views/xm/core/xmCfg/ProjectType.vue
Normal file
90
src/views/xm/core/xmCfg/ProjectType.vue
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<mdp-lr-box :lspan="12">
|
||||||
|
<template #left>
|
||||||
|
|
||||||
|
<mdp-meta-option :item="{id:'projectType',itemCode:'projectType',itemName:'项目类型'}" simple @row-click="onRowClick">
|
||||||
|
<template #title>
|
||||||
|
<el-alert type="warning" :closable="false">项目类型</el-alert>
|
||||||
|
</template>
|
||||||
|
</mdp-meta-option>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="padding-left">
|
||||||
|
|
||||||
|
<ContentWrap v-if="metaOption?.id && !projectPhasePlansItem?.id">
|
||||||
|
<template #header>
|
||||||
|
<el-space wrap >
|
||||||
|
<div v-if="!projectPhasePlansItem?.id">字典【{{metaOption?.name}}】不存在,是否创建?<el-button type="primary" @click="createDict">创建</el-button></div>
|
||||||
|
</el-space>
|
||||||
|
</template>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<mdp-meta-option v-if="projectPhasePlansItem?.id" :item="projectPhasePlansItem" simple>
|
||||||
|
|
||||||
|
<template #title>
|
||||||
|
<el-alert type="warning" :closable="false">项目管理节点(自动创建项目计划一级目录)</el-alert>
|
||||||
|
</template>
|
||||||
|
</mdp-meta-option>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mdp-lr-box>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name:'ProjectTypeCfg',
|
||||||
|
computed: {
|
||||||
|
...mapState(useUserStore,['userInfo'])
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
load:{list:false},
|
||||||
|
metaOption:null,
|
||||||
|
projectPhasePlansItem:null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onRowClick(row){
|
||||||
|
this.metaOption=null
|
||||||
|
this.metaOption=row
|
||||||
|
var item={itemCode:'projectPhasePlans'+row.id,categoryId:'all'};
|
||||||
|
this.$mdp.listItem(item).then(res=>{
|
||||||
|
var tips = res.tips
|
||||||
|
if(tips.isOk && res.data.length>0){
|
||||||
|
this.projectPhasePlansItem=res.data[0]
|
||||||
|
}else{
|
||||||
|
this.projectPhasePlansItem=null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
createDict(){
|
||||||
|
var row=this.metaOption
|
||||||
|
var item={id:'projectPhasePlans'+row.id, itemCode:'projectPhasePlans'+row.id,categoryId:'all',name:row.name};
|
||||||
|
this.$mdp.addItem(item).then(res=>{
|
||||||
|
var tips = res.tips
|
||||||
|
if(tips.isOk){
|
||||||
|
this.$notify.success("创建字典成功")
|
||||||
|
this.projectPhasePlansItem=res.data
|
||||||
|
}else{
|
||||||
|
this.$notify.error(tips.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user