[update] 修改内部工作组,企标级别映射,友情链接管理bug

This commit is contained in:
lideqin
2023-09-18 15:53:17 +08:00
parent e9c563383f
commit bae308459b
8 changed files with 170 additions and 142 deletions
+50 -17
View File
@@ -10,8 +10,8 @@
<div class="modal-search-wrapper table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :sm="6">
<a-form-item :label="$t('organization')">
<a-col :span="6">
<a-form-item :label="$t('organization')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam.departId"
@@ -24,8 +24,8 @@
/>
</a-form-item>
</a-col>
<a-col :sm="6">
<a-form-item :label="$t('role')">
<a-col :span="6">
<a-form-item :label="$t('role')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag
:placeholder="$t('pleaseSelect') + $t('role')"
v-model="queryParam.roleId"
@@ -33,20 +33,20 @@
</j-search-select-tag>
</a-form-item>
</a-col>
<a-col :sm="6">
<a-form-item :label="$t('user.account')">
<a-col :span="6">
<a-form-item :label="$t('user.account')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')"
v-model="queryParam.account"></a-input>
</a-form-item>
</a-col>
<a-col :sm="6">
<a-form-item :label="$t('userSelect.name')">
<a-col :span="6">
<a-form-item :label="$t('userSelect.name')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')"
v-model="queryParam.realname"></a-input>
</a-form-item>
</a-col>
<a-col :sm="6">
<a-form-item :label="$t('user.workNo')">
<a-col :span="6">
<a-form-item :label="$t('user.workNo')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')"
v-model="queryParam.workNo"></a-input>
</a-form-item>
@@ -79,9 +79,9 @@
</div>
<p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p>
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
<div v-for="item in dataSourceRight" :key="item.id" class="name-div">
<div v-for="(item, index) in dataSourceRight" :key="item.id" class="name-div">
{{ item.realname + '(' + item.workNo + ')' }}
<a-icon type="close" @click="handleDelete(item)" />
<a-icon type="close" @click="handleDelete(item, index)" />
</div>
</div>
<a-empty v-else/>
@@ -126,6 +126,12 @@ export default {
categoryTreeList: [], // 组织机构树
rolesList: [], // 角色下拉框
queryParam: {},
labelCol: {
span: 1
},
wrapperCol: {
span: 22
},
columns: [
{
title: this.$t('user.account'),
@@ -190,6 +196,7 @@ export default {
if (value) {
this.selectedRowKeys = value.split(',')
this.getUserListByIds(value)
this.loadData()
}
},
// 获取组织机构树
@@ -258,20 +265,27 @@ export default {
}
} else {
// 说明是删除了数据
for (const rowIndex in this.dataSourceRight) {
if (!selectedRows.find(item => item === this.dataSourceRight[rowIndex].id)) {
// 右侧数据在左侧选中不存在则从右侧删掉
this.dataSourceRight.splice(rowIndex, 1)
if (selectedRowKeys && selectedRowKeys.length > 0) {
// 没有选中数据,说明这一页没有选中数据了
for (let i = 0; i < this.dataSourceRight.length; i++) {
if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].id)) {
// 表格选中中没有找到这一条数据,说明已经被删了
this.dataSourceRight.splice(i, 1)
i--
}
}
} else {
this.dataSourceRight = []
}
}
console.log(this.dataSourceRight)
} else {
this.dataSourceRight = selectedRows
}
},
// 左侧表格改变
leftTableChange (pagination) {
this.ipaginationLeft = pagination
this.ipagination = pagination
this.loadData()
},
// 根据ids获取用户列表
@@ -306,6 +320,18 @@ export default {
this.visible = false
this.dataSourceRight = []
this.selectedRowKeys = []
this.queryParam = {}
this.ipagination = {
current: 1,
pageSize: 5,
pageSizeOptions: ['5', '10', '20', '30', '100', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
}
}
}
}
@@ -337,17 +363,24 @@ export default {
}
.name-content {
display: flex;
flex-wrap: wrap;
.name-div {
width: auto;
padding: 5px 16px;
margin-right: 12px;
margin-top: 8px;
background: rgba(213, 44, 38, 0.08);
border-radius: 4px 4px 4px 4px;
opacity: 1;
color: #D52C26;
white-space: nowrap;
/deep/ .anticon {
margin-left: 4px;
}
}
}
/deep/ .ant-form-item-label{
min-width: 70px !important;
}
</style>