【更新】表格头按钮移入插槽slot中,界面更协调
This commit is contained in:
parent
bc13879099
commit
723acad044
@ -24,9 +24,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysApp:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysApp:add')" icon="plus" @click="$refs.addForm.add()">新增应用</a-button>
|
||||
</div>
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -36,6 +33,9 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysApp:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysApp:add')">新增应用</a-button>
|
||||
</template>
|
||||
<span slot="active" slot-scope="text">
|
||||
{{ activeFilter(text) }}
|
||||
</span>
|
||||
|
@ -35,9 +35,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysConfig:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysConfig:add')" icon="plus" @click="$refs.addForm.add()">新增配置</a-button>
|
||||
</div>
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -47,6 +44,9 @@
|
||||
:rowKey="(record) => record.code"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysConfig:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysConfig:add')">新增配置</a-button>
|
||||
</template>
|
||||
<span slot="name" slot-scope="text">
|
||||
<ellipsis :length="20" tooltip>{{ text }}</ellipsis>
|
||||
</span>
|
||||
|
@ -29,9 +29,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysDictData:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysDictData:add')" icon="plus" @click="$refs.addForm.add(typeId)">新增数据</a-button>
|
||||
</div>
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -41,6 +38,9 @@
|
||||
:rowKey="(record) => record.code"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysDictData:add')" >
|
||||
<a-button @click="$refs.addForm.add(typeId)" icon="plus" type="primary" v-if="hasPerm('sysDictData:add')">新增数据</a-button>
|
||||
</template>
|
||||
<span slot="status" slot-scope="text">
|
||||
{{ statusFilter(text) }}
|
||||
</span>
|
||||
@ -57,21 +57,18 @@
|
||||
</a-card>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { sysDictDataPage, sysDictDataDelete } from '@/api/modular/system/dictDataManage'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
import addForm from './addForm'
|
||||
import editForm from './editForm'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable,
|
||||
addForm,
|
||||
editForm
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
// 高级搜索 展开/关闭
|
||||
@ -117,7 +114,6 @@
|
||||
statusDict: []
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.sysDictTypeDropDown()
|
||||
if (this.hasPerm('sysDictData:edit') || this.hasPerm('sysDictData:delete')) {
|
||||
@ -129,7 +125,6 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 打开此页面首先加载此方法
|
||||
index (record) {
|
||||
@ -142,7 +137,6 @@
|
||||
// 首次进入界面,因表格加载顺序,会抛异常,我们不予理会
|
||||
}
|
||||
},
|
||||
|
||||
statusFilter (status) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.statusDict.filter(item => item.code == status)
|
||||
@ -150,7 +144,6 @@
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取字典数据
|
||||
*/
|
||||
@ -159,7 +152,6 @@
|
||||
this.statusDict = res.data
|
||||
})
|
||||
},
|
||||
|
||||
handleCancel () {
|
||||
this.queryParam = {}
|
||||
this.visible = false
|
||||
@ -189,7 +181,6 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.table-operator {
|
||||
margin-bottom: 18px;
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<div class="table-page-search-wrapper" v-if="hasPerm('sysDictType:page')">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
@ -23,11 +22,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator" v-if="hasPerm('sysDictType:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysDictType:add')" icon="plus" @click="$refs.addForm.add()">新增类型</a-button>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -37,10 +31,12 @@
|
||||
:rowKey="(record) => record.code"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysDictType:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysDictType:add')">新增类型</a-button>
|
||||
</template>
|
||||
<span slot="status" slot-scope="text">
|
||||
{{ statusFilter(text) }}
|
||||
</span>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="$refs.dataIndex.index(record)">字典</a>
|
||||
<a-divider type="vertical" v-if="hasPerm('sysDictType:edit') || hasPerm('sysDictType:delete')"/>
|
||||
@ -49,11 +45,9 @@
|
||||
更多 <a-icon type="down" />
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
|
||||
<a-menu-item v-if="hasPerm('sysDictType:edit')">
|
||||
<a @click="$refs.editForm.edit(record)">编辑</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item v-if="hasPerm('sysDictType:delete')">
|
||||
<a-popconfirm placement="topRight" title="确认删除?" @confirm="() => sysDictTypeDelete(record)">
|
||||
<a>删除</a>
|
||||
@ -62,23 +56,18 @@
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
|
||||
</s-table>
|
||||
|
||||
<add-form ref="addForm" @ok="handleOk" />
|
||||
<edit-form ref="editForm" @ok="handleOk" />
|
||||
<data-index ref="dataIndex" @ok="handleOk" />
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { sysDictTypePage, sysDictTypeDelete, sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
import addForm from './addForm'
|
||||
import editForm from './editForm'
|
||||
import dataIndex from './dictdata/index'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable,
|
||||
@ -86,10 +75,8 @@
|
||||
editForm,
|
||||
dataIndex
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
// 高级搜索 展开/关闭
|
||||
advanced: false,
|
||||
// 查询参数
|
||||
@ -138,9 +125,7 @@
|
||||
created () {
|
||||
this.sysDictTypeDropDown()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
statusFilter (status) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.statusDict.filter(item => item.code == status)
|
||||
@ -148,7 +133,6 @@
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取字典数据
|
||||
*/
|
||||
@ -157,7 +141,6 @@
|
||||
this.statusDict = res.data
|
||||
})
|
||||
},
|
||||
|
||||
sysDictTypeDelete (record) {
|
||||
sysDictTypeDelete(record).then((res) => {
|
||||
if (res.success) {
|
||||
@ -170,7 +153,6 @@
|
||||
this.$message.error('删除错误:' + err.message)
|
||||
})
|
||||
},
|
||||
|
||||
toggleAdvanced () {
|
||||
this.advanced = !this.advanced
|
||||
},
|
||||
@ -182,10 +164,8 @@
|
||||
this.selectedRows = selectedRows
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.table-operator {
|
||||
margin-bottom: 18px;
|
||||
@ -193,5 +173,4 @@
|
||||
button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-tabs default-active-key="1" >
|
||||
<a-tab-pane key="1" tab="发送邮件" @change="tabsCallback" v-if="hasPerm('email:sendEmail')">
|
||||
@ -48,23 +47,18 @@
|
||||
</a-form>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
</a-spin>
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { emailSendEmail, emailSendEmailHtml } from '@/api/modular/system/emailManage'
|
||||
import { AntdEditor } from '@/components'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { sysFileInfoUpload, sysFileInfoDownload } from '@/api/modular/system/fileManage'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AntdEditor
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
editorContentText: '',
|
||||
@ -78,9 +72,7 @@
|
||||
form2: this.$form.createForm(this)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
tabsCallback (key) {
|
||||
if (key === '1') {
|
||||
// eslint-disable-next-line no-labels
|
||||
@ -117,7 +109,6 @@
|
||||
this.editorContent = html
|
||||
this.editorContentText = ele.text()
|
||||
},
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
*/
|
||||
@ -177,7 +168,6 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.table-operator {
|
||||
margin-bottom: 18px;
|
||||
@ -185,5 +175,4 @@
|
||||
button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -36,7 +36,7 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysFileInfo:upload')">
|
||||
<!--<div class="table-operator" v-if="hasPerm('sysFileInfo:upload')">
|
||||
<a-upload
|
||||
v-if="hasPerm('sysFileInfo:upload')"
|
||||
name="file"
|
||||
@ -46,7 +46,7 @@
|
||||
>
|
||||
<a-button> <a-icon type="upload" />上传文件</a-button>
|
||||
</a-upload>
|
||||
</div>
|
||||
</div>-->
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -56,6 +56,17 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysFileInfo:upload')">
|
||||
<a-upload
|
||||
:customRequest="customRequest"
|
||||
:multiple="true"
|
||||
:showUploadList="false"
|
||||
name="file"
|
||||
v-if="hasPerm('sysFileInfo:upload')"
|
||||
>
|
||||
<a-button> <a-icon type="upload" />上传文件</a-button>
|
||||
</a-upload>
|
||||
</template>
|
||||
<span slot="fileOriginName" slot-scope="text">
|
||||
<ellipsis :length="10" tooltip>{{ text }}</ellipsis>
|
||||
</span>
|
||||
|
@ -49,11 +49,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysOpLog:delete')">
|
||||
<a-popconfirm placement="top" title="确认清空日志?" @confirm="() => sysOpLogDelete()">
|
||||
<a-button >清空日志</a-button>
|
||||
</a-popconfirm>
|
||||
</div>
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -63,6 +58,11 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysOpLog:delete')">
|
||||
<a-popconfirm @confirm="() => sysOpLogDelete()" placement="top" title="确认清空日志?">
|
||||
<a-button >清空日志</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<span slot="opType" slot-scope="text">
|
||||
{{ opTypeFilter(text) }}
|
||||
</span>
|
||||
|
@ -49,11 +49,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysVisLog:delete')">
|
||||
<a-popconfirm v-if="hasPerm('sysVisLog:delete')" placement="top" title="确认清空日志?" @confirm="() => sysVisLogDelete()">
|
||||
<a-button >清空日志</a-button>
|
||||
</a-popconfirm>
|
||||
</div>
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -63,6 +58,11 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysVisLog:sysVisLog')">
|
||||
<a-popconfirm @confirm="() => sysVisLogDelete()" placement="top" title="确认清空日志?" v-if="hasPerm('sysVisLog:delete')">
|
||||
<a-button >清空日志</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<span slot="name" slot-scope="text">
|
||||
<ellipsis :length="10" tooltip>{{ text }}</ellipsis>
|
||||
</span>
|
||||
|
@ -1,32 +1,26 @@
|
||||
<template>
|
||||
<div v-if="hasPerm('sysMachine:query')">
|
||||
|
||||
<!-- 系统信息 Java信息-->
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-card :loading="loading" title="系统信息" style="margin-bottom: 20px" :bordered="false">
|
||||
|
||||
<table class="sysInfo_table" >
|
||||
<tr >
|
||||
<td class="sysInfo_td">系统名称:</td>
|
||||
<td class="sysInfo_td">{{ this.sysOsInfo.osName }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">系统架构:</td>
|
||||
<td class="sysInfo_td">{{ this.sysOsInfo.osArch }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">系统版本:</td>
|
||||
<td class="sysInfo_td">{{ this.sysOsInfo.osVersion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">主机名称:</td>
|
||||
<td class="sysInfo_td">{{ this.sysOsInfo.osHostName }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td >主机IP地址:</td>
|
||||
<td >{{ this.sysOsInfo.osHostAddress }}</td>
|
||||
@ -34,31 +28,25 @@
|
||||
</table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-card :loading="loading" title="Java信息" style="margin-bottom: 20px">
|
||||
<table class="sysInfo_table" >
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">虚拟机名称:</td>
|
||||
<td class="sysInfo_td">{{ this.sysJavaInfo.jvmName }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">虚拟机版本:</td>
|
||||
<td class="sysInfo_td">{{ this.sysJavaInfo.jvmVersion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">虚拟机供应商:</td>
|
||||
<td class="sysInfo_td">{{ this.sysJavaInfo.jvmVendor }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">java名称:</td>
|
||||
<td class="sysInfo_td">{{ this.sysJavaInfo.javaName }}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td >java版本:</td>
|
||||
<td >{{ this.sysJavaInfo.javaVersion }}</td>
|
||||
@ -67,10 +55,8 @@
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-card :loading="loading" title="JVM内存信息" >
|
||||
<table class="sysInfo_table" >
|
||||
|
||||
<tr >
|
||||
<td class="sysInfo_td">最大内存:</td>
|
||||
<td class="sysInfo_td">{{ this.sysJvmMemInfo.jvmMaxMemory }}</td>
|
||||
@ -89,16 +75,12 @@
|
||||
<td >使用率:</td>
|
||||
<td >{{ this.sysJvmMemInfo.jvmMemoryUsedRate }}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</a-card>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sysMachineQuery } from '@/api/modular/system/machineManage'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@ -108,12 +90,10 @@
|
||||
sysJvmMemInfo: []
|
||||
}
|
||||
},
|
||||
|
||||
// 进页面加载
|
||||
created () {
|
||||
this.loadDataList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 加载数据方法
|
||||
loadDataList () {
|
||||
@ -128,7 +108,6 @@
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sysInfo_table{
|
||||
width: 100%; min-height: 45px; line-height: 45px; text-align: center;
|
||||
|
@ -22,9 +22,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysNotice:add')" >
|
||||
<a-button v-if="hasPerm('sysNotice:add')" type="primary" @click="$refs.addForm.add()" icon="plus" >新增公告</a-button>
|
||||
</div>
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -34,6 +31,9 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysNotice:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysNotice:add')" >新增公告</a-button>
|
||||
</template>
|
||||
<span slot="status" slot-scope="text">
|
||||
{{ statusFilter(text) }}
|
||||
</span>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<div class="table-page-search-wrapper" v-if="hasPerm('sysNotice:received')">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
@ -23,10 +22,8 @@
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -36,26 +33,20 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
|
||||
<span slot="status" slot-scope="text">
|
||||
{{ statusFilter(text) }}
|
||||
</span>
|
||||
|
||||
<span slot="type" slot-scope="text">
|
||||
{{ typeFilter(text) }}
|
||||
</span>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('sysNotice:received')" @click="$refs.detailForm.detail(record)">查看</a>
|
||||
</span>
|
||||
|
||||
</s-table>
|
||||
|
||||
<detail-form ref="detailForm" @ok="handleOk" />
|
||||
<div ref="editor"></div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
@ -63,13 +54,11 @@
|
||||
import { sysNoticeReceived } from '@/api/modular/system/noticeReceivedManage'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
import detailForm from './detailForm'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable,
|
||||
detailForm
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
// 高级搜索 展开/关闭
|
||||
@ -103,9 +92,8 @@
|
||||
selectedRows: [],
|
||||
statusDictTypeDropDown: [], // 0草稿 1发布 2撤回 3删除
|
||||
typeDictTypeDropDown: []// 0通知 1公告
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.sysDictTypeDropDown()// 先注释
|
||||
if (this.hasPerm('sysNotice:received')) {
|
||||
@ -117,7 +105,6 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 获取字典数据
|
||||
@ -130,7 +117,6 @@
|
||||
this.typeDictTypeDropDown = res.data
|
||||
})
|
||||
},
|
||||
|
||||
statusFilter (status) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.statusDictTypeDropDown.filter(item => item.code == status)
|
||||
@ -145,7 +131,6 @@
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
|
||||
handleOk () {
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
@ -154,7 +139,6 @@
|
||||
this.selectedRows = selectedRows
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -165,5 +149,4 @@
|
||||
button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,5 +1,4 @@
|
||||
<template>
|
||||
|
||||
<a-row :gutter="24" >
|
||||
<a-col :md="5" :sm="24" >
|
||||
<a-card :bordered="false" :loading="treeLoading">
|
||||
@ -18,7 +17,6 @@
|
||||
</div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="19" :sm="24">
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper" v-if="hasPerm('sysOrg:page')">
|
||||
@ -34,17 +32,10 @@
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator" v-if="hasPerm('sysOrg:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysOrg:add')" icon="plus" @click="$refs.addForm.add()">新增机构</a-button>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -54,40 +45,35 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysOrg:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysOrg:add')">新增机构</a-button>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('sysOrg:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
||||
<a-divider type="vertical" v-if="hasPerm('sysOrg:edit') & hasPerm('sysOrg:delete')"/>
|
||||
<a-popconfirm v-if="hasPerm('sysOrg:delete')" placement="topRight" title="确认删除?" @confirm="() => sysOrgDelete(record)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
|
||||
</span>
|
||||
|
||||
</s-table>
|
||||
|
||||
<add-form ref="addForm" @ok="handleOk" />
|
||||
<edit-form ref="editForm" @ok="handleOk" />
|
||||
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { Empty } from 'ant-design-vue'
|
||||
import { getOrgPage, sysOrgDelete, getOrgTree } from '@/api/modular/system/orgManage'
|
||||
import addForm from './addForm'
|
||||
import editForm from './editForm'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable,
|
||||
addForm,
|
||||
editForm
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
// 高级搜索 展开/关闭
|
||||
@ -132,7 +118,7 @@
|
||||
replaceFields: {
|
||||
key: 'id'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getOrgTree()
|
||||
@ -145,7 +131,6 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 获取到机构树,展开顶级下树节点,考虑到后期数据量变大,不建议全部展开
|
||||
@ -185,7 +170,6 @@
|
||||
this.$message.error('删除错误:' + err.message)
|
||||
})
|
||||
},
|
||||
|
||||
handleClick (e) {
|
||||
this.queryParam = {
|
||||
pid: e.toString()
|
||||
@ -204,10 +188,8 @@
|
||||
this.selectedRows = selectedRows
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.table-operator {
|
||||
margin-bottom: 18px;
|
||||
@ -215,5 +197,4 @@
|
||||
button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<div class="table-page-search-wrapper" v-if="hasPerm('sysPos:page')">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
@ -21,14 +20,8 @@
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator" v-if="hasPerm('sysPos:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysPos:add')" icon="plus" @click="$refs.addForm.add()">新增职位</a-button>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -38,6 +31,9 @@
|
||||
:rowKey="(record) => record.code"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysPos:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysPos:add')">新增职位</a-button>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('sysPos:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
||||
<a-divider type="vertical" v-if="hasPerm('sysPos:edit') & hasPerm('sysPos:delete')"/>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<div class="table-page-search-wrapper" v-if="hasPerm('sysRole:page')">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
@ -19,14 +18,8 @@
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator" v-if="hasPerm('sysRole:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysRole:add')" icon="plus" @click="$refs.addForm.add()">新增角色</a-button>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -36,6 +29,9 @@
|
||||
:rowKey="(record) => record.code"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysRole:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysRole:add')">新增角色</a-button>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('sysRole:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
||||
<a-divider type="vertical" v-if="hasPerm('sysRole:edit')"/>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<div class="table-page-search-wrapper" v-if="hasPerm('sysSms:page')">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
@ -38,7 +37,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -55,20 +53,16 @@
|
||||
{{ sourceFilter(text) }}
|
||||
</span>
|
||||
</s-table>
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { smsPage } from '@/api/modular/system/smsManage'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
// 高级搜索 展开/关闭
|
||||
@ -114,14 +108,12 @@
|
||||
selectedRows: [],
|
||||
statusDictTypeDropDown: [],
|
||||
sourceDictTypeDropDown: []
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.sysDictTypeDropDown()
|
||||
},
|
||||
methods: {
|
||||
|
||||
sourceFilter (source) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.sourceDictTypeDropDown.filter(item => item.code == source)
|
||||
@ -129,7 +121,6 @@
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
|
||||
statusFilter (status) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.statusDictTypeDropDown.filter(item => item.code == status)
|
||||
@ -137,7 +128,6 @@
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取字典数据
|
||||
*/
|
||||
@ -149,7 +139,6 @@
|
||||
this.sourceDictTypeDropDown = res.data
|
||||
})
|
||||
},
|
||||
|
||||
toggleAdvanced () {
|
||||
this.advanced = !this.advanced
|
||||
},
|
||||
@ -158,10 +147,8 @@
|
||||
this.selectedRows = selectedRows
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.table-operator {
|
||||
margin-bottom: 18px;
|
||||
@ -169,5 +156,4 @@
|
||||
button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -22,9 +22,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" v-if="hasPerm('sysTimers:add')" >
|
||||
<a-button type="primary" v-if="hasPerm('sysTimers:add')" icon="plus" @click="$refs.addForm.add()">新增定时器</a-button>
|
||||
</div>
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -34,6 +31,9 @@
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysTimers:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysTimers:add')">新增定时器</a-button>
|
||||
</template>
|
||||
<span slot="actionClass" slot-scope="text">
|
||||
<ellipsis :length="10" tooltip>{{ text }}</ellipsis>
|
||||
</span>
|
||||
|
@ -42,7 +42,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@ -58,7 +57,6 @@
|
||||
<span slot="sex" slot-scope="text">
|
||||
{{ sexFilter(text) }}
|
||||
</span>
|
||||
|
||||
<span slot="status" slot-scope="text,record" v-if="hasPerm('sysUser:changeStatus')">
|
||||
<a-popconfirm placement="top" :title="text===0? '确定停用该用户?':'确定启用该用户?'" @confirm="() => editUserStatus(text,record)">
|
||||
<a>{{ statusFilter(text) }}</a>
|
||||
@ -67,7 +65,6 @@
|
||||
<span slot="status" v-else>
|
||||
{{ statusFilter(text) }}
|
||||
</span>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('sysUser:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
||||
<a-divider type="vertical" v-if="hasPerm('sysUser:edit')" />
|
||||
@ -95,20 +92,15 @@
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
|
||||
</s-table>
|
||||
|
||||
<add-form ref="addForm" @ok="handleOk" />
|
||||
<edit-form ref="editForm" @ok="handleOk" />
|
||||
<user-role-form ref="userRoleForm" @ok="handleOk"/>
|
||||
<user-org-form ref="userOrgForm" @ok="handleOk"/>
|
||||
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { Empty } from 'ant-design-vue'
|
||||
@ -119,7 +111,6 @@
|
||||
import editForm from './editForm'
|
||||
import userRoleForm from './userRoleForm'
|
||||
import userOrgForm from './userOrgForm'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable,
|
||||
@ -127,12 +118,9 @@
|
||||
editForm,
|
||||
userRoleForm,
|
||||
userOrgForm
|
||||
// sysDictTypeDropDown,
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
// 高级搜索 展开/关闭
|
||||
advanced: false,
|
||||
// 查询参数
|
||||
@ -178,8 +166,7 @@
|
||||
replaceFields: {
|
||||
key: 'id'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
/**
|
||||
@ -208,9 +195,7 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
sexFilter (sex) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.sexDictTypeDropDown.filter(item => item.code == sex)
|
||||
@ -225,7 +210,6 @@
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取字典数据
|
||||
*/
|
||||
@ -237,7 +221,6 @@
|
||||
this.statusDictTypeDropDown = res.data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*/
|
||||
@ -260,7 +243,6 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@ -274,7 +256,6 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
* @param record
|
||||
@ -291,7 +272,6 @@
|
||||
this.$message.error('删除错误:' + err.message)
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击左侧机构树查询列表
|
||||
*/
|
||||
@ -312,10 +292,8 @@
|
||||
this.selectedRows = selectedRows
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.table-operator {
|
||||
margin-bottom: 18px;
|
||||
@ -323,5 +301,4 @@
|
||||
button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user