Browse Source

党组织管理页面开发

origin/feature/monitoring
zhangyongzhangyong 4 years ago
parent
commit
b3f01d71a2
  1. 12
      src/views/modules/sys/partyorg-add-or-update.vue
  2. 50
      src/views/modules/sys/partyorg.vue

12
src/views/modules/sys/partyorg-add-or-update.vue

@ -110,6 +110,7 @@ export default {
},
methods: {
init () {
this.dataForm.allDeptIdArr = []
this.visible = true
this.getOrgTypeOptions()
this.getOptions()
@ -142,8 +143,15 @@ export default {
}).catch(() => { })
},
allDeptIdsChangeHandle (value, selectedData) {
this.dataForm.deptName = this.$refs['org'].getCheckedNodes()[0].label
this.dataForm.deptId = this.$refs['org'].getCheckedNodes()[0].value
let len = 'value' + value
// len.length == 5
if (5 < len.length) {
this.dataForm.deptName = this.$refs['org'].getCheckedNodes()[0].label
this.dataForm.deptId = this.$refs['org'].getCheckedNodes()[0].value
} else {
this.dataForm.deptId = ''
this.dataForm.deptName = ''
}
},
//
position (position) {

50
src/views/modules/sys/partyorg.vue

@ -2,8 +2,19 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__partyorg}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
<el-form-item label="所属机构">
<el-cascader v-model="dataForm.deptId"
:options="options"
ref="org"
@change="deptIdChangeHandle"
:props="{ checkStrictly: true }"
clearable>
</el-cascader>
</el-form-item>
<el-form-item label="党组织名称">
<el-input v-model="dataForm.partyOrgName"
placeholder="请输入"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
@ -12,11 +23,11 @@
<el-button v-if="$hasPermission('sys:partyorg:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:partyorg:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
<el-button type="info" v-if="$hasPermission('sys:partyorg:export')"
@click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="allDeptNames" label="所属组织" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyOrgName" label="党组织名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="typeName" label="党组织类型" header-align="center" align="center"></el-table-column>
@ -53,13 +64,38 @@ export default {
getDataListURL: '/sys/partyorg/page',
getDataListIsPage: true,
deleteURL: '/sys/partyorg',
deleteIsBatch: true
deleteIsBatch: true,
exportURL: '/sys/partyorg/export',
},
dataForm: {
id: ''
}
id: '',
deptId: ''
},
options: []
}
},
methods: {
deptIdChangeHandle (value, selectedData) {
let len = 'value' + value
// len.length == 5
if (5 < len.length) {
this.dataForm.deptId = this.$refs['org'].getCheckedNodes()[0].value
} else {
this.dataForm.deptId = ''
}
},
},
created () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => { })
},
components: {
AddOrUpdate
}

Loading…
Cancel
Save