|
|
@ -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 |
|
|
|
} |
|
|
|