|
|
|
@ -2,7 +2,7 @@ |
|
|
|
<el-card shadow="never" class="aui-card--fill"> |
|
|
|
<div class="mod-sys__metasysdept}"> |
|
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
|
|
|
<div v-if="backBtnVisible"> |
|
|
|
<div v-if="dataForm.pid != 0"> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" @click="backToDeptList">返回</el-button> |
|
|
|
</el-form-item> |
|
|
|
@ -23,12 +23,12 @@ |
|
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
|
<el-table-column prop="name" label="名称" header-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" :formatter = "isOnclick"> |
|
|
|
<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="isOnclickFlag">查看</el-button> |
|
|
|
<el-button type="text" size="small" @click="manageHandle(scope.row.id)">管理</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> |
|
|
|
@ -66,15 +66,14 @@ export default { |
|
|
|
pid: '', |
|
|
|
name: '' |
|
|
|
}, |
|
|
|
backBtnVisible: true, |
|
|
|
isOnclickFlag: false, |
|
|
|
pidList: [0] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.dataForm.pid = this.$route.query.pid |
|
|
|
if (this.$route.query.pid === undefined || this.pidList.length === 0) { |
|
|
|
this.backBtnVisible = false |
|
|
|
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() |
|
|
|
@ -86,27 +85,35 @@ export default { |
|
|
|
AddOrUpdate |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
manageHandle (deptId) { |
|
|
|
manageHandle (deptId, pid) { |
|
|
|
this.$parent.selectComponent = 'Deptofficer' |
|
|
|
this.$router.push({ path: '/organize-organizedeptroute', query: { deptId: deptId } }) |
|
|
|
this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList), deptId: deptId } }) |
|
|
|
}, |
|
|
|
lookHandle (id, pid) { |
|
|
|
this.pidList.push(pid) |
|
|
|
this.pidList.push(id) |
|
|
|
this.$parent.selectComponent = 'Metasysdept' |
|
|
|
this.$router.push({ path: '/organize-organizedeptroute', query: { pid: id, pidList: this.pidList } }) |
|
|
|
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.pidList.splice(this.pidList.length - 1, 1) |
|
|
|
var m = this.pidList.splice(this.pidList.length - 1, 1) |
|
|
|
m.pop() |
|
|
|
this.$emit('refreshDataList') |
|
|
|
this.$parent.selectComponent = 'Metasysdept' |
|
|
|
if (this.$route.query.backId !== undefined) { |
|
|
|
this.$router.push({ path: '/organize-organizedeptroute', query: { pid: this.$route.query.pidList } }) |
|
|
|
} |
|
|
|
}, |
|
|
|
isOnclick (row, column) { |
|
|
|
if (row.typeKey === 'grid_party') { |
|
|
|
this.isOnclickFlag = true |
|
|
|
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() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|