Browse Source

人员管理树列表

master
wanggongfeng 6 years ago
parent
commit
c7db35652f
  1. 7
      src/views/modules/organize/deptofficer.vue
  2. 53
      src/views/modules/organize/metasysdept.vue
  3. 2
      src/views/modules/organize/sysdeptmanagement.vue

7
src/views/modules/organize/deptofficer.vue

@ -99,13 +99,10 @@ export default {
dataForm: {
id: ''
},
deptofficerAddVisible: false,
pidList: []
deptofficerAddVisible: false
}
},
mounted () {
this.pidList = JSON.parse(this.$route.query.pidList)
console.log(this.$route.query.deptId)
this.dataForm.deptId = this.$route.query.deptId
this.getDataList()
},
@ -124,7 +121,7 @@ export default {
backToDeptList () {
this.$emit('refreshDataList')
this.$parent.selectComponent = 'Metasysdept'
this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList) } })
this.$router.push({ path: '/organize-organizedeptroute' })
},
deptofficerAddHandle (deptId) {
this.deptofficerAddVisible = true

53
src/views/modules/organize/metasysdept.vue

@ -26,27 +26,17 @@
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="name" label="名称" header-align="center" align="center"></el-table-column>
<table-tree-column prop="name" label="名称" header-align="center"></table-tree-column>
<el-table-column prop="parentName" label="上级部门" header-align="center" align="center"></el-table-column>
<el-table-column prop="sort" label="排序" header-align="center" align="center" width="80"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('sys:metasysdept:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('sys:metasysdept:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
<el-button type="text" size="small" @click="lookHandle(scope.row.id,scope.row.pid)" :disabled="scope.row.typeKey == 'grid_party'">查看</el-button>
<el-button type="text" size="small" @click="manageHandle(scope.row.id,scope.row.pid)">管理</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
@ -62,8 +52,7 @@ export default {
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/cloudAnalysis/metasysdept/page',
getDataListIsPage: true,
getDataListURL: '/cloudAnalysis/metasysdept/list',
deleteURL: '/cloudAnalysis/metasysdept',
deleteIsBatch: true
},
@ -76,16 +65,8 @@ export default {
}
},
mounted () {
if (this.$route.query.pidList !== null && this.$route.query.pidList !== undefined) {
this.pidList = JSON.parse(this.$route.query.pidList)
this.dataForm.pid = this.pidList[this.pidList.length - 1]
} else {
this.dataForm.pid = 0
}
this.getDataList()
},
created: function () {
},
components: {
TableTreeColumn,
AddOrUpdate
@ -93,35 +74,7 @@ export default {
methods: {
manageHandle (deptId, pid) {
this.$parent.selectComponent = 'Deptofficer'
this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList), deptId: deptId } })
},
lookHandle (id, pid) {
this.page = 1
this.pidList.push(id)
this.$parent.selectComponent = 'Metasysdept'
this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList) } })
if (this.$route.query.pidList !== null && this.$route.query.pidList !== undefined) {
this.pidList = JSON.parse(this.$route.query.pidList)
this.dataForm.pid = this.pidList[this.pidList.length - 1]
} else {
this.dataForm.pid = 0
}
this.getDataList()
},
backToDeptList () {
this.page = 1
var m = this.pidList.splice(this.pidList.length - 1, 1)
m.pop()
this.$emit('refreshDataList')
this.$parent.selectComponent = 'Metasysdept'
this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList) } })
if (this.$route.query.pidList !== null && this.$route.query.pidList !== undefined) {
this.pidList = JSON.parse(this.$route.query.pidList)
this.dataForm.pid = this.pidList[this.pidList.length - 1]
} else {
this.dataForm.pid = 0
}
this.getDataList()
this.$router.push({ path: '/organize-organizedeptroute', query: { deptId: deptId } })
}
}
}

2
src/views/modules/organize/sysdeptmanagement.vue

@ -48,7 +48,7 @@ export default {
TableTreeColumn,
AddOrUpdate
},
methods : {
methods: {
active_text (value, row) {
this.$http.put(`/cloudAnalysis/metaSysdeptManager`, row).then(({ data: res }) => {
if (res.code !== 0) {

Loading…
Cancel
Save