|
@@ -39,23 +39,12 @@
|
|
|
:checkbox-config="{}">
|
|
|
<vxe-column type="seq" width="40"></vxe-column>
|
|
|
<vxe-column type="checkbox" width="40" ></vxe-column>
|
|
|
- <vxe-column field="name" title="序列名称" :edit-render="{}"></vxe-column>
|
|
|
- <vxe-column field="officeList" title="适用范围" :edit-render="{}">
|
|
|
- <template scope="scope" >
|
|
|
- <el-tag v-for="(item, index) in scope.row.officeList">{{item.name}}</el-tag>
|
|
|
- </template>
|
|
|
- </vxe-column>
|
|
|
- <vxe-column field="useFlag" title="状态" :edit-render="{}">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="success" v-if="scope.row.useFlag === '1' ">已启用</el-tag>
|
|
|
- <el-tag type="danger" v-if="scope.row.useFlag === '2' ">禁用</el-tag>
|
|
|
- </template>
|
|
|
- </vxe-column>
|
|
|
+ <vxe-column field="name" title="职层名称" :edit-render="{}"></vxe-column>
|
|
|
<vxe-column title="操作" width="200px" fixed="right" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
- <el-button v-if="hasPermission('rank:rank_sequence:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
|
|
|
- <el-button v-if="hasPermission('rank:rank_sequence:del')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
+ <el-button v-if="hasPermission('rank:rank_level:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
|
|
|
+ <el-button v-if="hasPermission('rank:rank_level:del')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
@@ -71,13 +60,13 @@
|
|
|
</vxe-pager>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <RankSequenceForm ref="rankSequenceForm" @refreshDataList="refreshList"></RankSequenceForm>
|
|
|
+ <RankLevelForm ref="rankLevelForm" @refreshDataList="refreshList"></RankLevelForm>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import RankSequenceService from '@/api/rank/RankSequenceService'
|
|
|
- import RankSequenceForm from './RankSequenceForm'
|
|
|
+ import RankLevelService from '@/api/rank/RankLevelService'
|
|
|
+ import RankLevelForm from './RankLevelForm'
|
|
|
export default {
|
|
|
props: {
|
|
|
index: {
|
|
@@ -103,9 +92,9 @@
|
|
|
loading: false
|
|
|
}
|
|
|
},
|
|
|
- rankSequenceService: null,
|
|
|
+ rankLevelService: null,
|
|
|
created () {
|
|
|
- this.rankSequenceService = new RankSequenceService()
|
|
|
+ this.rankLevelService = new RankLevelService()
|
|
|
},
|
|
|
watch: {
|
|
|
index (index) {
|
|
@@ -115,7 +104,7 @@
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- RankSequenceForm
|
|
|
+ RankLevelForm
|
|
|
},
|
|
|
mounted () {
|
|
|
this.refreshList()
|
|
@@ -127,23 +116,23 @@
|
|
|
},
|
|
|
// 新增
|
|
|
add () {
|
|
|
- this.$refs.rankSequenceForm.init('add', '')
|
|
|
+ this.$refs.rankLevelForm.init('add', '')
|
|
|
},
|
|
|
// 修改
|
|
|
edit (id) {
|
|
|
- id = id || this.$refs.rankSequenceTable.getCheckboxRecords().map(item => {
|
|
|
+ id = id || this.$refs.rankLevelTable.getCheckboxRecords().map(item => {
|
|
|
return item.id
|
|
|
})[0]
|
|
|
- this.$refs.rankSequenceForm.init('edit', id)
|
|
|
+ this.$refs.rankLevelForm.init('edit', id)
|
|
|
},
|
|
|
// 查看
|
|
|
view (id) {
|
|
|
- this.$refs.rankSequenceForm.init('view', id)
|
|
|
+ this.$refs.rankLevelForm.init('view', id)
|
|
|
},
|
|
|
// 获取数据列表
|
|
|
refreshList () {
|
|
|
this.loading = true
|
|
|
- this.rankSequenceService.list({
|
|
|
+ this.rankLevelService.list({
|
|
|
'current': this.tablePage.currentPage,
|
|
|
'size': this.tablePage.pageSize,
|
|
|
'orders': this.tablePage.orders,
|
|
@@ -170,7 +159,7 @@
|
|
|
},
|
|
|
// 删除
|
|
|
del (id) {
|
|
|
- let ids = id || this.$refs.rankSequenceTable.getCheckboxRecords().map(item => {
|
|
|
+ let ids = id || this.$refs.rankLevelTable.getCheckboxRecords().map(item => {
|
|
|
return item.id
|
|
|
}).join(',')
|
|
|
this.$confirm(`确定删除所选项吗?`, '提示', {
|
|
@@ -194,7 +183,7 @@
|
|
|
this.$refs.sortTableDialog.init(this.dataList)
|
|
|
},
|
|
|
dataSort (dataListSort) {
|
|
|
- this.rankSequenceService.updateSort(dataListSort).then(() => {
|
|
|
+ this.rankLevelService.updateSort(dataListSort).then(() => {
|
|
|
this.refreshList()
|
|
|
})
|
|
|
}
|