【更新】冲突项解决
This commit is contained in:
parent
68cec8e416
commit
4445a34776
@ -14,11 +14,9 @@
|
|||||||
<a-input v-model="queryParam.code" allow-clear placeholder="请输入唯一编码" />
|
<a-input v-model="queryParam.code" allow-clear placeholder="请输入唯一编码" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="!advanced && 8 || 24" :sm="24">
|
<a-col :md="8" :sm="24">
|
||||||
<span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
|
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
<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 = {}">重置</a-button>
|
||||||
</span>
|
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
@ -29,38 +27,42 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="loadData"
|
:data="loadData"
|
||||||
:alert="true"
|
:alert="options.alert"
|
||||||
:rowKey="(record) => record.code"
|
:rowKey="(record) => record.id"
|
||||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:rowSelection="options.rowSelection"
|
||||||
>
|
>
|
||||||
<template slot="operator" v-if="hasPerm('sysPos:add')">
|
<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>
|
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysPos:add')">新增职位</a-button>
|
||||||
|
<a-button type="danger" :disabled="selectedRowKeys.length < 1" v-if="hasPerm('sysPos:delete')" @click="batchDelete"><a-icon type="delete"/>批量删除</a-button>
|
||||||
|
<x-down
|
||||||
|
v-if="hasPerm('sysPos:export')"
|
||||||
|
ref="batchExport"
|
||||||
|
@batchExport="batchExport"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a v-if="hasPerm('sysPos:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
<a v-if="hasPerm('sysPos:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
||||||
<a-divider type="vertical" v-if="hasPerm('sysPos:edit') & hasPerm('sysPos:delete')"/>
|
<a-divider type="vertical" v-if="hasPerm('sysPos:edit') & hasPerm('sysPos:delete')"/>
|
||||||
<a-popconfirm v-if="hasPerm('sysPos:delete')" placement="topRight" title="确认删除?" @confirm="() => sysPosDelete(record)">
|
<a-popconfirm v-if="hasPerm('sysPos:delete')" placement="topRight" title="确认删除?" @confirm="() => singleDelete(record)">
|
||||||
<a>删除</a>
|
<a>删除</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</s-table>
|
</s-table>
|
||||||
|
|
||||||
<add-form ref="addForm" @ok="handleOk" />
|
<add-form ref="addForm" @ok="handleOk" />
|
||||||
<edit-form ref="editForm" @ok="handleOk" />
|
<edit-form ref="editForm" @ok="handleOk" />
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { STable, XCard } from '@/components'
|
import { STable, XCard, XDown } from '@/components'
|
||||||
import { sysPosPage, sysPosDelete } from '@/api/modular/system/posManage'
|
import { sysPosPage, sysPosDelete, sysPosExport } from '@/api/modular/system/posManage'
|
||||||
import addForm from './addForm'
|
import addForm from './addForm'
|
||||||
import editForm from './editForm'
|
import editForm from './editForm'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
XDown,
|
||||||
XCard,
|
XCard,
|
||||||
STable,
|
STable,
|
||||||
addForm,
|
addForm,
|
||||||
@ -69,9 +71,6 @@
|
|||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
// 高级搜索 展开/关闭
|
|
||||||
advanced: false,
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
// 表头
|
// 表头
|
||||||
@ -100,7 +99,14 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectedRows: []
|
selectedRows: [],
|
||||||
|
options: {
|
||||||
|
alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
||||||
|
rowSelection: {
|
||||||
|
selectedRowKeys: this.selectedRowKeys,
|
||||||
|
onChange: this.onSelectChange
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -116,11 +122,30 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
sysPosDelete (record) {
|
/**
|
||||||
sysPosDelete(record).then((res) => {
|
* 单个删除
|
||||||
|
*/
|
||||||
|
singleDelete (record) {
|
||||||
|
const param = [{ 'id': record.id }]
|
||||||
|
this.sysPosDelete(param)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
batchDelete () {
|
||||||
|
const paramIds = this.selectedRowKeys.map((d) => {
|
||||||
|
return { 'id': d }
|
||||||
|
})
|
||||||
|
this.sysPosDelete(paramIds)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
sysPosDelete (param) {
|
||||||
|
sysPosDelete(param).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.$refs.table.refresh()
|
this.$refs.table.clearRefreshSelected()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('删除失败:' + res.message)
|
this.$message.error('删除失败:' + res.message)
|
||||||
}
|
}
|
||||||
@ -128,9 +153,16 @@
|
|||||||
this.$message.error('删除错误:' + err.message)
|
this.$message.error('删除错误:' + err.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
toggleAdvanced () {
|
* 批量导出
|
||||||
this.advanced = !this.advanced
|
*/
|
||||||
|
batchExport () {
|
||||||
|
const paramIds = this.selectedRowKeys.map((d) => {
|
||||||
|
return { 'id': d }
|
||||||
|
})
|
||||||
|
sysPosExport(paramIds).then((res) => {
|
||||||
|
this.$refs.batchExport.downloadfile(res)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
this.$refs.table.refresh()
|
this.$refs.table.refresh()
|
||||||
@ -141,15 +173,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.table-operator {
|
.table-operator {
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
button {
|
button {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -37,6 +37,7 @@ import vip.xiaonuo.sys.modular.log.mapper.SysOpLogMapper;
|
|||||||
import vip.xiaonuo.sys.modular.log.param.SysOpLogParam;
|
import vip.xiaonuo.sys.modular.log.param.SysOpLogParam;
|
||||||
import vip.xiaonuo.sys.modular.log.service.SysOpLogService;
|
import vip.xiaonuo.sys.modular.log.service.SysOpLogService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统操作日志service接口实现类
|
* 系统操作日志service接口实现类
|
||||||
|
@ -36,6 +36,7 @@ import vip.xiaonuo.sys.modular.log.mapper.SysVisLogMapper;
|
|||||||
import vip.xiaonuo.sys.modular.log.param.SysVisLogParam;
|
import vip.xiaonuo.sys.modular.log.param.SysVisLogParam;
|
||||||
import vip.xiaonuo.sys.modular.log.service.SysVisLogService;
|
import vip.xiaonuo.sys.modular.log.service.SysVisLogService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统访问日志service接口实现类
|
* 系统访问日志service接口实现类
|
||||||
|
@ -56,7 +56,6 @@ import vip.xiaonuo.sys.modular.role.service.SysRoleDataScopeService;
|
|||||||
import vip.xiaonuo.sys.modular.user.service.SysUserDataScopeService;
|
import vip.xiaonuo.sys.modular.user.service.SysUserDataScopeService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -527,4 +526,10 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|||||||
resultSet.addAll(childIdListById);
|
resultSet.addAll(childIdListById);
|
||||||
return CollectionUtil.newArrayList(resultSet);
|
return CollectionUtil.newArrayList(resultSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void export(SysOrgParam sysOrgParam) {
|
||||||
|
List<SysOrg> list = this.list(sysOrgParam);
|
||||||
|
PoiUtil.exportExcelWithStream("SysOrg.xls", SysOrg.class, list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user