Merge pull request 'master' (#322) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/322
This commit is contained in:
@@ -551,7 +551,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.approval-record {
|
.approval-record {
|
||||||
padding-bottom: 30px;
|
//padding-bottom: 30px;
|
||||||
position: relative;
|
position: relative;
|
||||||
.approval-title {
|
.approval-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -19,23 +19,38 @@
|
|||||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
||||||
:preview="mode == 'resubmit'"/>
|
:preview="mode == 'resubmit'"/>
|
||||||
<div v-if="mode === 'resubmit'&&!changeDiagram">
|
<div v-if="mode === 'resubmit'&&!changeDiagram">
|
||||||
<div class="approval-title">
|
<div class="approval-record">
|
||||||
<baseTitle title="审批记录"></baseTitle>
|
<div class="approval-title">
|
||||||
<div class="diagram">
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
<div class="base-title">流程图</div>
|
<div class="diagram">
|
||||||
<el-switch
|
<div class="base-title">流程图</div>
|
||||||
v-model="changeDiagram"
|
<el-switch
|
||||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
v-model="changeDiagram"
|
||||||
/>
|
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="process">
|
<div class="process">
|
||||||
<operation-render :operation-list="data.operationList" :state="data.state"/>
|
<operation-render :operation-list="data.operationList" :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="title" v-if="processDiagramViewer&&changeDiagram"/>
|
<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">
|
||||||
|
<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="mode === 'submit'" @click="handleSubmit">提交</el-button>
|
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
|
||||||
@@ -63,8 +78,10 @@
|
|||||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button @click="chooseProProcess(scope.row)">选择</el-button>
|
<div style="display: flex;align-items: center">
|
||||||
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff">查看详情</a>
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -96,7 +113,7 @@ import Paging from "@/components/pagination/index.vue";
|
|||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const changeDiagram = ref(false)
|
const changeDiagram = ref(true)
|
||||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
@@ -273,17 +290,17 @@ const handleSubmit = async () => {
|
|||||||
// if (localFormData.value.singleFile) {
|
// if (localFormData.value.singleFile) {
|
||||||
//
|
//
|
||||||
// } else {
|
// } else {
|
||||||
if (attachment.value.singleFile == null) {
|
if (attachment.value.singleFile == null) {
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请上传附件',
|
message: '请上传附件',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
@@ -375,6 +392,7 @@ watchEffect(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
changeDiagram.value = props.mode === 'submit';
|
||||||
await init()
|
await init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ 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)
|
// console.log('data.procedure',data.procedure,route.query.step)
|
||||||
if(route.query.step==='40'){
|
if(route.query.step==='40'){
|
||||||
if(data.procedure.indexOf('40')==-1){
|
if(data.procedure.indexOf('40')==-1){
|
||||||
data.procedure.push('40')
|
data.procedure.push('40')
|
||||||
|
|||||||
@@ -105,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%'}}>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ const tableConfig = reactive({
|
|||||||
api: '/workflow/mosr/requirement',
|
api: '/workflow/mosr/requirement',
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add', color: '#DED0B2',auth: auths.add},
|
{name: '新增', key: 'add', color: '#DED0B2',auth: auths.add},
|
||||||
{name: '导出', key: 'export', type: ''},
|
// {name: '导出', key: 'export', type: ''},
|
||||||
],
|
],
|
||||||
params: {}
|
params: {}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -201,8 +201,8 @@ const tableConfig = reactive({
|
|||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增上报', key: 'add', color: '#DED0B2', auth:auths.report},
|
{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) => {
|
||||||
|
|||||||
@@ -299,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: ''}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,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()
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user