Commit 267120a7 authored by co_dengxiongwen's avatar co_dengxiongwen

资源点、站点、用户页面调整

parent 69e3a8be
......@@ -13,10 +13,10 @@
<title>城市轨道交通安防系统</title>
<script>
//禁用所有控制台输出
var console={};
console.log=function(){};
console.warn=function(){};
console.error=function(){};
// var console={};
// console.log=function(){};
// console.warn=function(){};
// console.error=function(){};
</script>
<script src="./config.js"></script>
<style>
......
......@@ -106,7 +106,7 @@ new Vue({
// this.$store.commit('d2admin/menu/headerSet', menuHeader)
// // 初始化菜单搜索功能
// this.$store.commit('d2admin/search/init', menuHeader)
const pattern = /[_`~^*|{}<>¥……*|&‘”“/#()【】《》\\[\]$%+=]/ //这些字段不允许输入
const pattern = /[_`~^*|{}<>¥……*|&‘”“/#【】《》\\[\]$%+=]/ //这些字段不允许输入
const testMark = function (s) {
return pattern.test(s)
}
......@@ -122,7 +122,7 @@ new Vue({
}
return rs
}
const timeReplaceMark = function (obj) {
if (testMark(obj.value)) {
obj.value = replaceMark(obj.value, true)
......@@ -143,15 +143,15 @@ new Vue({
if (ev.target.type === 'text' || ev.target.type === 'textarea') {
timeReplaceMark(ev.target)
}
},true)
}, true)
},
beforeDestroy(){
beforeDestroy() {
window.removeEventListener('input', function (ev) {
// console.log(ev);
if (ev.target.type === 'text' || ev.target.type === 'textarea') {
timeReplaceMark(ev.target)
}
},true)
}, true)
},
mounted () {
// 展示系统信息
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template lang="pug">
el-dialog( :close-on-click-modal='false' :visible.sync='visible' :append-to-body='true' :before-close="handleClose")
div.title-bold(slot='title') {{dataForm.id ? '修改' :'新增'}}
el-form(:model='dataForm' :rules='dataRule' ref='dataForm' label-width='100px' v-loading='dataLoading')
el-row(:span='24')
el-col(:span='24')
el-form-item(label='数据源url:', prop='url')
el-input(v-model='dataForm.url', placeholder='请填写数据源url(包含地址端口以及参数)' clearable)
el-col(:span='12')
el-form-item(label='用户名:', prop='username')
el-input(v-model='dataForm.username', placeholder='请填写数据源用户名' clearable)
el-col(:span='12' )
el-form-item(label='密码:', prop='password')
el-input(, v-model='dataForm.password', placeholder='请填写密码' clearable)
el-col(:span='12' )
el-form-item(label='站点id:', prop='stationId')
el-input(, v-model='dataForm.stationId', placeholder='请填写站点id' clearable)
el-col(:span='12' )
el-form-item(label='数据源ip:', prop='ip')
el-input(v-model='dataForm.ip', placeholder='请填写数据源服务器ip' clearable)
el-col(:span='12')
el-form-item(label='数据源端口:', prop='port')
el-input(v-model='dataForm.port', placeholder='请填写数据源端口' clearable)
el-col(:span='12')
el-form-item(label='说明信息:', prop='detail')
el-input(v-model='dataForm.detail' placeholder='请填写说明信息' clearable)
div(slot='footer' align='center')
el-button(type='primary' size='medium' @click='handleClose') 取消
el-button(type='primary' size='medium' @click='dataFormSubmit()' v-prevent-re-click) 保存
</template>
<script>
export default {
data() {
return {
visible: false,
dataLoading: false,
dataForm: {},
dataRule: {
url: [
{ required: true, message: '数据源url不能为空', trigger: ['change', 'blur'] },
{ min: 1, max: 200, message: '长度在 1 到 200 个字符', trigger: ['change', 'blur'] }
],
username: [
{ required: true, message: '数据源用户名不能为空', trigger: ['change', 'blur'] },
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: ['change', 'blur'] }
],
password: [
{ required: true, message: '密码不能为空', trigger: ['change', 'blur'] },
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: ['change', 'blur'] }
],
stationId: [
{ required: true, message: '站点id不能为空', trigger: ['change', 'blur'] },
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: ['change', 'blur'] }
],
ip: [
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: ['change', 'blur'] }
],
port: [
{ min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: ['change', 'blur'] }
],
detail: [
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: ['change', 'blur'] }
]
}
}
},
mounted() {
},
methods: {
init(row) {
this.visible = true
this.dataForm = { ...row }
},
//关闭前
handleClose() {
this.$refs.dataForm.resetFields()
this.visible = false
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.dataLoading = true
this.$http({
url: this.$http.adornUrl(
`/sysDatasource/${!this.dataForm.id ? 'save' : 'update'}`
),
method: 'post',
data: this.dataForm
}).then(data => {
console.log(data)
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
this.dataLoading = false
this.handleClose()
this.$emit('refreshdatalist')
}
}).catch(data => {
this.$message.error(data.msg)
})
}
})
}
}
}
</script>
<style>
.el-table__header {
width: 100% !important;
}
.el-table__body {
width: 100% !important;
}
</style>
<template lang='pug'>
el-container(style="padding:0px;height:77.6vh;")
el-header(style='height:42px;line-height:42px;border: 1px solid rgba(195, 195, 195, 1);background: #f4f4f4;')
span.title-bold.title-left-color() 目标数据源管理
el-main.box_main
el-card()
div.tableCard()
el-form(:inline="true" :model="dataForm" size="mini" )
el-form-item( label="数据源url:" )
el-input( v-model="dataForm.url" placeholder="数据源url" clearable)
el-form-item( label="用户名:" )
el-input.input_width( v-model="dataForm.username" placeholder="数据源用户名" clearable)
el-form-item(label="数据源ip:")
el-input.input_width( v-model="dataForm.ip" placeholder="数据源ip" clearable)
el-form-item( label="说明信息:")
el-input.input_width( v-model="dataForm.detail" placeholder="说明信息" clearable)
el-button(@click="getDataList" icon="el-icon-search" type="primary" size="mini") 查询
el-button(@click="reSet()" type="primary" size="mini" icon="el-icon-refresh-right") 重置
el-button( v-if="isAuth('sys:user:save')" style="float:right;" size="mini" icon="el-icon-plus" type="primary" @click="addOrUpdateHandle()") 新增
el-table(:data="dataList" @sort-change='sortChange' style="width:100%;" v-loading="dataListLoading" :stripe="true" :header-cell-style="{background:'#EEF8FF',color:'#333333'}")
el-table-column( type='index', header-align='center', align='center', label='序号')
template(scope="scope")
span {{scope.$index+(pageIndex - 1) * pageSize + 1}}
el-table-column( prop="url" header-align="center" align="center" label="数据源url" sortable='custom' width='300')
//template(slot-scope='scope')
el-table-column( prop="username" header-align="center" align="center" label="用户名" sortable='custom')
el-table-column( prop="password" header-align="center" align="center" label="密码" sortable='custom')
el-table-column( prop="stationId" columnKey="station_id" header-align="center" align="center" label="站点id" sortable='custom')
el-table-column( prop="ip" header-align="center" align="center" label="数据源服务器ip" sortable='custom' width='200')
el-table-column( prop="port" header-align="center" align="center" label="数据源端口" sortable='custom')
el-table-column( prop="detail" header-align="center" align="center" label="说明信息" sortable='custom' width='200')
//template(slot-scope='scope')
font(:title="scope.row.url") {{scope.row.detail | ellipsis}}
el-table-column( prop header-align="center" align="center" label="操作" width='200')
template( slot-scope="scope")
//el-button(type="success" plain size="mini" @click="queryHandle(scope.row)") 详情
el-button(type="text" size="mini" v-if="isAuth('sys:datasource:update')" @click="addOrUpdateHandle(scope.row)") 修改
el-button(type="text" size="mini" v-if="isAuth('sys:datasource:delete')" @click="deleteHandle(scope.row.id)") 删除
el-footer.box_footer
el-pagination(@size-change="sizeChangeHandle" background @current-change="currentChangeHandle" :current-page="pageIndex" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage" layout="total, sizes, prev, pager, next, jumper")
//- 弹窗, 新增 / 修改
add-or-update(v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshdatalist="getDataList")
</template>
<script>
import AddOrUpdate from './datasource-add-or-update'
export default {
name: 'sys-datasource',
filters: {
ellipsis(value) {
if (!value) return ''
if (value.length > 55) {
return value.slice(0, 55) + '...'
}
return value
}
},
data() {
return {
dataForm: {},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
resetPasswordVisible: false,
addOrUpdateVisible: false,
queryDetailVisible: false,
configRoleVisible: false,
allJob: []
}
},
components: {
AddOrUpdate
// queryDetail,
// configRole,
// resetPassword
},
watch: {
totalPage() { //注意这个函数的名字必须和你监听data中的属性的名字一样,这样才能当你data中的属性发生变化时,触发这个函数
let pages = Math.ceil(this.totalPage / this.pageSize)//新数据总页数
//总页数小于当前页数则重新加载列表数据
if (pages < this.pageIndex) {
this.pageIndex = pages || 1
this.getDataList()//获取表格数据的方法
}
}
},
created() {
// this.getList()
this.getDataList()
// this.getAllJob()
},
methods: {
//重置
reSet() {
this.pageIndex = 1
this.dataForm = {}
this.getDataList()
},
//排序
sortChange(column) {
if (column.order === 'descending') {
this.order = 'desc'
} else {
this.order = 'asc'
}
if (column.column.columnKey) {
this.sort = column.column.columnKey
} else {
this.sort = column.prop
}
this.getDataList()
},
// 获取数据列表
getDataList() {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sysDatasource/list'),
method: 'post',
data: {
...this.dataForm,
page: this.pageIndex,
size: this.pageSize,
sort: this.sort,
order: this.order
}
}).then(data => {
// console.log('data', data)
if (data && data.code === 0) {
this.dataList = data.page.records
this.totalPage = data.page.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
// 新增 / 修改
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
// 删除
deleteHandle(id) {
this.$confirm(`确认删除用户?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sysDatasource/delete'),
method: 'post',
data: [id]
}).then(data => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
}
}
}
</script>
<style lang='scss'>
</style>
<template >
<el-container>
<el-aside width="300px">
<el-card :body-style="{ padding: '0px' }">
<div slot="header">
<span>组织机构树</span>
</div>
<!-- card body -->
<el-tree
:data="data"
:props="defaultProps"
:default-expand-all="true"
@node-click="handleNodeClick"
></el-tree>
</el-card>
</el-aside>
<el-main height style="padding:0px;height:700px;">
<!-- Main content -->
<el-card :body-style="{ padding: '0px' }">
<div slot="header">
<span>部门配置</span>
<el-button
type="primary"
icon="el-icon-search"
style="float:right;"
:disabled="!ruleForm.parentId"
@click="addOrUpdateHandle()"
>新增</el-button>
</div>
<!-- card body -->
<el-table :data="dataList" :stripe="true" v-loading="dataListLoading" style="width: 100%;" :header-cell-style="{background:'#D5D9E0',color:'#fff'}">
<el-table-column
prop="parentName"
header-align="center"
align="center"
label="上级部门名称"
v-if="false"
></el-table-column>
<el-table-column prop="name" header-align="center" align="center" label="部门名称"></el-table-column>
<el-table-column prop="code" header-align="center" align="center" label="部门编码"></el-table-column>
<el-table-column prop="remark" header-align="center" align="center" label="部门描述"></el-table-column>
<el-table-column prop header-align="center" align="center" label="操作">
<template slot-scope="scope">
<button v-if="isAuth('sys:org:update')" @click="addOrUpdateHandle(scope.row)">修改</button>
<button v-if="isAuth('sys:org:delete')" @click="deleteHandle(scope.row)">删除</button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</el-card>
<el-dialog
:title="!ruleForm.id ? '新增机构': '修改机构'"
width="40%"
:append-to-body="true"
:visible.sync="visible"
:modal-append-to-body="false"
@close="closeForm()"
>
<el-form
:model="ruleForm"
:inline="false"
:rules="rules"
ref="ruleForm"
label-width="100px"
@submit.native.prevent
>
<el-card shadow="never">
<div>
<el-form-item label="上级部门名称:" prop="parentName">
<el-input v-model="ruleForm.parentName" placeholder="请输入内容" clearable disabled></el-input>
</el-form-item>
<el-form-item label="本级部门编码:" prop="code">
<el-input v-model="ruleForm.code" placeholder="请输入本级部门编码" clearable></el-input>
</el-form-item>
<el-form-item label="本级部门名称:" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入本级部门名称" clearable></el-input>
</el-form-item>
<el-form-item label="部 门 描 述:" prop="remark">
<el-input
v-model="ruleForm.remark"
type="textarea"
:rows="5"
resize="none"
placeholder="请输入部门描述"
></el-input>
</el-form-item>
<div slot="footer" style=" text-align: center;">
<el-button @click="addsave">保存</el-button>
<el-button @click="closeForm">取 消</el-button>
</div>
</div>
</el-card>
</el-form>
</el-dialog>
</el-main>
</el-container>
</template>
<script>
export default {
data() {
return {
word: '', //查询
dataList: [], //列表
dataListLoading: false,
pageIndex: 1,
pageSize: 10,
totalPage: 0,
addOrUpdateVisible: false,
ruleForm: {},
visible: false,
orgInfo: {},
orgId: '',
rules: {}, //添加规则
data: [],
defaultProps: {
children: 'children',
label: 'name',
id: 'id'
}
}
},
created() {
this.getList()
this.orgInfo = this.data[0]
},
methods: {
getList() {
this.$http({
url: this.$http.adornUrl('/sysOrg/orgAllList'),
method: 'GET'
}).then(data => {
if (data) {
this.data = data.list
}
})
},
handleNodeClick(data) {
this.ruleForm.parentId = data.id
this.ruleForm.parentName = data.name
this.orgId = data.id
this.orgInfo = data
this.getDataList()
},
changeCur(currentRow) {
this.orgInfo = currentRow
},
getDataList() {
this.$http({
url: this.$http.adornUrl('/sysOrg/orgList'),
method: 'post',
params: {
page: this.pageIndex,
limit: this.pageSize,
id: this.orgId
}
}).then(data => {
if (data) {
this.dataList = data.page.records
this.totalPage = data.page.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
}, // 删除
deleteHandle(row) {
this.orgInfo = row
this.orgInfo.deleted = 1
this.$confirm(`确认删除该部门?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
})
.then(() => {
this.$http({
url: this.$http.adornUrl('/sysOrg/update'),
method: 'post',
data: this.orgInfo
}).then(res => {
if (res && res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
this.getList()
}
})
} else {
this.$message.error(res.msg)
}
})
})
.catch(err => {
this.$message.error(err)
})
},
//添加或修改事件
addOrUpdateHandle(row, flagType) {
this.visible = true
if (row) {
this.ruleForm = row
} else {
this.ruleForm = {}
this.ruleForm.parentId = this.orgInfo.id
this.ruleForm.parentName = this.orgInfo.name
}
},
// 提交
addsave() {
this.$refs['ruleForm'].validate(valid => {
if (valid) {
this.$http({
url: this.$http.adornUrl(
`/sysOrg/${!this.ruleForm.id ? 'save' : 'update'}`
),
method: 'post',
data: this.ruleForm
}).then(data => {
console.log(data)
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.getDataList()
this.getList()
this.$nextTick()
}
})
} else {
this.$message.error(data)
}
})
}
})
},
closeForm() {
this.visible = false
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
// this.getDataList()
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
}
}
}
</script>
<style lang='scss' scoped>
.infopage {
background-color: #b9c9e3;
margin: 24px;
padding: 24px;
height: 750px;
.pageLeft {
height: 600px;
border-right: 1px solid #909399;
.form {
border-bottom: 1px solid #909399;
width: 100%;
}
}
}
</style>
<template lang="pug">
el-container
el-aside(width="300px" style="height:700px;")
el-card.treeCard(:body-style="{ padding: '0px',height:'75vh'}")
div(slot="header")
span.title-bold() 组织机构树
el-tree.elTree(:data="data" :props="defaultProps" :default-expand-all="true" @node-click="handleNodeClick")
el-main(style="padding:0px;height:700px;")
el-card.tableCard()
span(slot="header")
span.title-bold.title-left-color() 部门配置
el-button(type="primary" icon="el-icon-plus" size='mini' style="float:right;transform:translateY(6px);margin-right:20px;" :disabled="!ruleForm.parentId" @click="addOrUpdateHandle()") 新增
el-table(:data="dataList" :stripe="true" v-loading="dataListLoading" style="width: 100%;" :header-cell-style="{background:'#EEF8FF',color:'#333333'}" highlight-current-row)
el-table-column(prop="name" header-align="center" align="center" label="部门名称")
el-table-column(prop="code" header-align="center" align="center" label="部门编码")
el-table-column(prop="remark" header-align="center" align="center" label="部门描述")
el-table-column(prop header-align="center" align="center" label="操作" width='200px')
template(slot-scope="scope")
el-button(type="primary" plain size="mini" v-if="isAuth('sys:org:update')" @click="addOrUpdateHandle(scope.row)") 修改
el-button(type="danger" plain size="mini" v-if="isAuth('sys:org:delete')" @click="deleteHandle(scope.row)") 删除
el-pagination(background @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage" layout="total, sizes, prev, pager, next, jumper")
el-dialog(width="50%" :append-to-body="true" :visible.sync="visible" :modal-append-to-body="false" @close="closeForm()")
div(slot='title' )
span.title-bold() {{!ruleForm.id ? '新增机构': '修改机构'}}
el-form(:model="ruleForm" :inline="false" :rules="rules" ref="ruleForm" label-width="110px" @submit.native.prevent)
el-card(shadow="never")
el-row(:span='24')
el-col(:span='23')
el-form-item(label="上级部门名称:" prop="parentName")
el-input(v-model="ruleForm.parentName" placeholder="请输入内容" clearable disabled)
el-col(:span='11')
el-form-item(label="本级部门编码:" prop="code")
el-input(v-model="ruleForm.code" placeholder="请输入本级部门编码" clearable)
el-col(:span='11' :offset='1')
el-form-item(label="本级部门名称:" prop="name")
el-input(v-model="ruleForm.name" placeholder="请输入本级部门名称" clearable)
el-col(:span='23')
el-form-item(label="部 门 描 述:" prop="remark")
el-input(v-model="ruleForm.remark" type="textarea" :rows="5" resize="none" placeholder="请输入部门描述")
div( slot="footer" style=" text-align: center;" )
el-button(type='danger' plain size='medium' @click="closeForm") 取 消
el-button(type='primary' size='medium' @click="addsave") 保存
</template>
<script>
export default {
data () {
return {
word: '', //查询
dataList: [], //列表
dataListLoading: false,
pageIndex: 1,
pageSize: 10,
totalPage: 0,
addOrUpdateVisible: false,
ruleForm: {},
visible: false,
orgInfo: {},
orgId: '',
rules: {//添加规则
code: [{ required: true, message: '本级部门编码不能为空', trigger: 'blur' }],
name: [{ required: true, message: '本级部门名称不能为空', trigger: 'blur' }]
},
data: [],
defaultProps: {
children: 'children',
label: 'name',
id: 'id'
}
}
},
watch: {
totalPage() { //注意这个函数的名字必须和你监听data中的属性的名字一样,这样才能当你data中的属性发生变化时,触发这个函数
let pages = Math.ceil(this.totalPage / this.pageSize)//新数据总页数
//总页数小于当前页数则重新加载列表数据
if (pages < this.pageIndex) {
this.pageIndex = pages || 1
this.getDataList()//获取表格数据的方法
}
}
},
created () {
this.getList()
this.orgInfo = this.data[0]
},
methods: {
getList () {
this.$http({
url: this.$http.adornUrl('/sysOrg/orgAllList'),
method: 'GET'
}).then(data => {
if (data && data.code === 0) {
this.data = data.list
}
})
},
handleNodeClick (data) {
this.ruleForm.parentId = data.id
this.ruleForm.parentName = data.name
this.orgId = data.id
this.orgInfo = data
this.getDataList()
},
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sysOrg/orgList'),
method: 'post',
params: {
page: this.pageIndex,
limit: this.pageSize,
id: this.orgId
}
}).then(data => {
if (data && data.code === 0) {
this.dataList = data.page.records
this.totalPage = data.page.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
}, // 删除
deleteHandle (row) {
row.deleted = 1
this.$confirm(`确认删除该部门?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
})
.then(() => {
this.$http({
url: this.$http.adornUrl('/sysOrg/deleteById'),
method: 'post',
data: row
}).then(res => {
if (res && res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
this.getList()
}
})
} else {
this.$message.error(res.msg)
}
})
})
.catch(err => {
this.$message.error(err)
})
},
//添加或修改事件
addOrUpdateHandle (row, flagType) {
this.visible = true
console.log('orgInfo2:', this.orgInfo)
console.log('ruleForm2:', this.ruleForm)
if (row) {
this.ruleForm = row
} else {
this.ruleForm = {}
this.ruleForm.parentId = this.orgInfo.id
this.ruleForm.parentName = this.orgInfo.name
}
},
// 提交
addsave () {
this.$refs['ruleForm'].validate(valid => {
if (valid) {
this.$http({
url: this.$http.adornUrl(
`/sysOrg/${!this.ruleForm.id ? 'save' : 'update'}`
),
method: 'post',
data: this.ruleForm
}).then(data => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.getDataList()
this.getList()
this.$nextTick()
}
})
} else {
this.$message.error(data)
}
})
}
})
},
closeForm () {
this.visible = false
},
// 每页数
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
}
}
}
</script>
<style>
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment