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:
2024-06-11 12:56:47 +00:00
16 changed files with 151 additions and 107 deletions

View File

@@ -551,7 +551,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
}
.approval-record {
padding-bottom: 30px;
//padding-bottom: 30px;
position: relative;
.approval-title {
display: flex;

View File

@@ -19,23 +19,38 @@
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="mode == 'resubmit'"/>
<div v-if="mode === 'resubmit'&&!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 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">
<operation-render :operation-list="data.operationList" :state="data.state"/>
</div>
</div>
<baseTitle title="流程"></baseTitle>
<div class="approval-record">
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer&&changeDiagram"/>
<div v-if="changeDiagram">
<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">
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer"/>
</div>
</div>
<div class="oper-page-btn">
<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 label="操作" align="center">
<template #default="scope">
<el-button @click="chooseProProcess(scope.row)">选择</el-button>
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff">查看详情</a>
<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>
@@ -96,7 +113,7 @@ import Paging from "@/components/pagination/index.vue";
const router = useRouter()
const route = useRoute()
const changeDiagram = ref(false)
const changeDiagram = ref(true)
const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({
title: {
@@ -273,17 +290,17 @@ const handleSubmit = async () => {
// if (localFormData.value.singleFile) {
//
// } else {
if (attachment.value.singleFile == null) {
attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传附件',
type: 'error'
})
return;
} else {
attachment.value.clearValidate()
}
if (attachment.value.singleFile == null) {
attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传附件',
type: 'error'
})
return;
} else {
attachment.value.clearValidate()
}
// }
let params = {
@@ -375,6 +392,7 @@ watchEffect(() => {
})
onMounted(async () => {
changeDiagram.value = props.mode === 'submit';
await init()
})
</script>

View File

@@ -268,7 +268,7 @@ const getBaseInfo = async () => {
const loading = ElLoading.service({fullscreen: true})
try {
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(data.procedure.indexOf('40')==-1){
data.procedure.push('40')

View File

@@ -105,12 +105,12 @@ const tableConfig = reactive({
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(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'})
}
// 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%'}}>
{

View File

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

View File

@@ -151,7 +151,7 @@ const tableConfig = reactive({
api: '/workflow/mosr/requirement',
btns: [
{name: '新增', key: 'add', color: '#DED0B2',auth: auths.add},
{name: '导出', key: 'export', type: ''},
// {name: '导出', key: 'export', type: ''},
],
params: {}
})

View File

@@ -201,8 +201,8 @@ const tableConfig = reactive({
params: {},
btns: [
{name: '新增上报', key: 'add', color: '#DED0B2', auth:auths.report},
{name: '年度计划导出', key: '_export', auth: ''},
{name: '经费预算生成', key: 'preMonty', auth: ''},
// {name: '年度计划导出', key: '_export', auth: ''},
// {name: '经费预算生成', key: 'preMonty', auth: ''},
]
})
const headBtnClick = (key) => {

View File

@@ -299,7 +299,7 @@ const tableConfig = reactive({
api: '/workflow/mosr/project/implementation',
params: {},
btns: [
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
// {name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
]
})

View File

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

View File

@@ -156,7 +156,7 @@ const tableConfig = reactive({
params: {},
btns: [
{name: '新增', key: 'add', color: '#DED0B2', auth: ''},
{name: '导出', key: '_export', color: '#DED0B2', auth: ''},
// {name: '导出', key: '_export', color: '#DED0B2', auth: ''},
]
})
const tableIns = ref()

View File

@@ -28,8 +28,8 @@
:icon="Delete" plain
:disabled="disabled">删除
</el-button>
<el-button type="warning" v-perm="['admin:config:export']" @click="handleExport" :icon="Download" plain>导出
</el-button>
<!-- <el-button type="warning" v-perm="['admin:config:export']" @click="handleExport" :icon="Download" plain>导出-->
<!-- </el-button>-->
</div>
<div class="table">
<el-table

View File

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

View File

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

View File

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

View File

@@ -25,7 +25,7 @@
<div class="table">
<div class="table-header-btn">
<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>
<el-table :data="list" ref="" :lazy="true" v-loading="loading" v-tabh>
<el-table-column prop="ipAddr" label="IP地址"></el-table-column>

View File

@@ -34,8 +34,8 @@
<el-button type="danger" v-perm="['code:listener:del']" @click="handleMoreDelete(listenId,listenNameList)" :icon="Delete" plain
:disabled="disabled">删除
</el-button>
<el-button type="warning" v-perm="['code:listener:export']" @click="handleExport" :icon="Download" plain>导出
</el-button>
<!-- <el-button type="warning" v-perm="['code:listener:export']" @click="handleExport" :icon="Download" plain>导出-->
<!-- </el-button>-->
</div>
<div class="table">
<el-table