This commit is contained in:
aoli.qu 2022-02-24 12:10:57 +08:00
parent fb6aecd22c
commit 205d81017e
10 changed files with 45 additions and 38 deletions

View File

@ -73,7 +73,7 @@ export default {
},
//
fileSize:{
type:Number,
type:[Number, String],
default:500
},
},

View File

@ -10,7 +10,7 @@
</a-col>
<a-col :md="8" :sm="24">
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, this.loadData()}">重置</a-button>
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, $refs.table.refresh(true)}">重置</a-button>
</a-col>
</a-row>
</a-form>
@ -42,7 +42,7 @@
</a-col>
<a-col :md="8" :sm="24">
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, this.loadData()}">重置</a-button>
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, $refs.table.refresh(true)}">重置</a-button>
</a-col>
</a-row>
</a-form>

View File

@ -3,7 +3,7 @@
<a-tabs default-active-key="1" @change="tabsCallback">
<a-tab-pane key="1" tab="单位部门信息">
<div class="table-operator">
<a-button @click="$refs.orgForm.add(1)" icon="plus" type="primary" v-if="hasPerm('sys:org:add')">新增机构</a-button>
<a-button @click="$refs.orgForm.add(1)" icon="plus" type="primary" v-if="hasPerm('sys:org:edit')">新增机构</a-button>
</div>
<s-table
@ -17,8 +17,8 @@
<span slot="action" slot-scope="text, record">
<a v-if="hasPerm('sys:org:edit')" @click="$refs.orgForm.edit(record)">编辑</a>
<a-divider type="vertical" v-if="hasPerm('sys:org:edit') & hasPerm('sys:org:delete')"/>
<a-popconfirm v-if="hasPerm('sys:org:delete')" placement="topRight" title="确认删除?" @confirm="() => sysOrgDelete(record)">
<a-divider type="vertical" v-if="hasPerm('sys:org:edit') & hasPerm('sys:org:del')"/>
<a-popconfirm v-if="hasPerm('sys:org:del')" placement="topRight" title="确认删除?" @confirm="() => sysOrgDelete(record)">
<a>删除</a>
</a-popconfirm>
</span>
@ -27,7 +27,7 @@
</a-tab-pane>
<a-tab-pane key="2" tab="项目工程信息" >
<div class="table-operator">
<a-button @click="$refs.orgForm.add(2)" icon="plus" type="primary" v-if="hasPerm('sys:org:add')">新增项目</a-button>
<a-button @click="$refs.orgForm.add(2)" icon="plus" type="primary" v-if="hasPerm('sys:org:edit')">新增项目</a-button>
</div>
<s-table
@ -41,8 +41,8 @@
<span slot="action" slot-scope="text, record">
<a v-if="hasPerm('sys:org:edit')" @click="$refs.orgForm.edit(record)">编辑</a>
<a-divider type="vertical" v-if="hasPerm('sys:org:edit') & hasPerm('sys:org:delete')"/>
<a-popconfirm v-if="hasPerm('sys:org:delete')" placement="topRight" title="确认删除?" @confirm="() => sysOrgDelete(record)">
<a-divider type="vertical" v-if="hasPerm('sys:org:edit') & hasPerm('sys:org:del')"/>
<a-popconfirm v-if="hasPerm('sys:org:del')" placement="topRight" title="确认删除?" @confirm="() => sysOrgDelete(record)">
<a>删除</a>
</a-popconfirm>
</span>
@ -143,6 +143,7 @@
})
},
handleOk () {
console.log("handleok---orgList")
if (this.orgType === 1) {
this.$refs.table1.refresh()
} else {

View File

@ -40,7 +40,7 @@
</a-col>
<a-col :md="8" :sm="24">
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, this.loadData()}">重置</a-button>
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, $refs.table.refresh(true)}">重置</a-button>
</a-col>
</a-row>
</a-form>
@ -48,7 +48,7 @@
</a-card>
<a-card :bordered="false">
<div class="table-operator">
<a-button @click="addPerson" icon="plus" type="primary" v-if="hasPerm('person:add')">新增人员</a-button>
<a-button @click="addPerson" icon="plus" type="primary" v-if="hasPerm('person:edit')">新增人员</a-button>
<template v-if="orgType === 1">
<a-button @click="transfer" type="primary" v-if="hasPerm('person:transfer')">转移部门</a-button>

View File

@ -11,7 +11,7 @@
</a-col>
<a-col :md="8" :sm="24">
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
<a-button @click="() => {queryParam = {}, this.loadData()}">重置</a-button>
<a-button @click="() => {queryParam = {}, $refs.table.refresh(true)}">重置</a-button>
</a-col>
</a-row>
</a-form>

View File

@ -77,9 +77,10 @@
this.visible = true
},
edit(obj) {
var _obj = obj
this.modalTitle = '修改角色'
this.visible = true
this.form = obj
this.form = _obj
},
onSubmit(e) {
this.$refs.ruleForm.validate(valid => {
@ -88,6 +89,8 @@
roleEdit(this.form).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功')
this.$emit('ok')
this.onCancel()
} else {
this.$message.error('编辑失败:' + res.msg)
@ -110,6 +113,7 @@
},
onCancel() {
this.$refs.ruleForm.resetFields()
this.form = {}
this.visible = false
}
}

View File

@ -11,14 +11,14 @@
</a-col>
<a-col :md="8" :sm="24">
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
<a-button @click="() => {queryParam = {}, this.loadData()}">重置</a-button>
<a-button @click="() => {queryParam = {}, $refs.table.refresh(true)}">重置</a-button>
</a-col>
</a-row>
</a-form>
</div>
<div class="table-operator">
<a-button type="primary" icon="plus" @click="$refs.roleForm.add()">新增角色</a-button>
<a-button type="primary" icon="plus" v-if="hasPerm('sys:role:add')" @click="$refs.roleForm.add()">新增角色</a-button>
</div>
<s-table
@ -28,17 +28,17 @@
:data="loadData"
>
<span slot="action" slot-scope="text, record">
<a @click="$refs.roleForm.edit(record)">编辑</a>
<a @click="$refs.roleForm.edit(record)" v-if="hasPerm('sys:role:edit')">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down" />
</a>
<a-menu slot="overlay">
<a-menu-item>
<a-menu-item v-if="hasPerm('sys:role:grantMenu')">
<a @click="$refs.roleMenuForm.roleMenu(record)">授权菜单</a>
</a-menu-item>
<a-menu-item>
<a-menu-item v-if="hasPerm('sys:role:del')">
<a-popconfirm placement="topRight" title="确认删除?" @confirm="() => handleDel(record)">
<a>删除</a>
</a-popconfirm>
@ -83,12 +83,6 @@ export default {
{
title: '排序',
dataIndex: 'sort'
},
{
title: '操作',
dataIndex: 'action',
width: '150px',
scopedSlots: { customRender: 'action' }
}
],
loadData: parameter => {
@ -99,7 +93,15 @@ export default {
}
},
created () {
//
//
if (this.hasPerm('sys:role:edit') || this.hasPerm('sys:role:grantMenu')) {
this.columns.push({
title: '操作',
width: '150px',
dataIndex: 'action',
scopedSlots: { customRender: 'action' }
})
}
},
methods: {
handleDel (record) {

View File

@ -91,9 +91,9 @@
_this.menuTreeData = res.data
_this.getLeastChilds(res.data)
//
_this.menuTreeData.forEach(item => {
_this.expandedKeys.push(item.id)
})
// _this.menuTreeData.forEach(item => {
// _this.expandedKeys.push(item.id)
// })
_this.expandedMenuKeys(_this.roleEntity)
}

View File

@ -51,13 +51,13 @@
</a-form-item>
</a-form>
</a-col>
<a-col :md="12" :sm="24">
<!-- <a-col :md="12" :sm="24">
<a-form :form="form">
<a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-date-picker placeholder="请选择生日" @change="onChange" style="width: 100%" v-decorator="['birthday']" />
</a-form-item>
</a-form>
</a-col>
</a-col> -->
</a-row>
<a-row :gutter="24">
<a-col :md="12" :sm="24">

View File

@ -5,13 +5,13 @@
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="24">
<a-form-item label="用户名称" >
<a-input v-model="queryParam.name" placeholder="请输入用户名称"/>
<a-form-item label="账号" >
<a-input v-model="queryParam.userName" placeholder="请输入账号"/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="账号" >
<a-input v-model="queryParam.userName" placeholder="请输入账号"/>
<a-form-item label="姓名" >
<a-input v-model="queryParam.name" placeholder="请输入姓名"/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
@ -21,7 +21,7 @@
</a-col>
<a-col :md="4" :sm="24">
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, $refs.table.refresh(true)}">重置</a-button>
</a-col>
</a-row>
</a-form>
@ -61,7 +61,7 @@
<a-menu-item v-if="hasPerm('sys:user:grantRole')">
<a @click="$refs.userRoleForm.userRole(record)">授权角色</a>
</a-menu-item>
<a-menu-item v-if="hasPerm('sys:user:delete')">
<a-menu-item v-if="hasPerm('sys:user:del')">
<a-popconfirm placement="topRight" title="确认删除?" @confirm="() => singleDelete(record)">
<a>删除</a>
</a-popconfirm>