修改已知bug1

This commit is contained in:
qq787203167
2022-06-02 15:07:19 +08:00
parent de2ed1eb60
commit 16828639b4
9 changed files with 241 additions and 178 deletions
@@ -58,6 +58,7 @@
ref="table"
size="middle"
rowKey="id"
:scroll="{x: '100%'}"
:columns="columns"
:dataSource="tableData"
:pagination="false"
@@ -110,25 +111,29 @@
key: 'serialNumber',
scopedSlots: {customRender: 'serialNumber'},
align: "center",
width: 100,
ellipsis: true,
width: 180,
},
{
title: this.$t('title'),
align: "center",
scopedSlots: {customRender: 'serialtitle'},
width: 100,
width: 180,
ellipsis: true,
dataIndex: 'title',
},
{
title: this.$t('status'),
align: "center",
width: 100,
width: 180,
ellipsis: true,
dataIndex: 'state',
},
{
title: this.$t('collectionTime'),
align: "center",
width: 100,
width: 180,
ellipsis: true,
dataIndex: 'createTime',
},
{
@@ -136,6 +141,7 @@
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
fixed: 'right',
width: 170
}
],
@@ -61,6 +61,7 @@
ref="table"
size="middle"
rowKey="id"
:scroll="{x: '100%'}"
:columns="columns"
:dataSource="tableData"
:pagination="false"
@@ -118,14 +119,14 @@
dataIndex: 'serialNumber',
key: 'serialNumber',
align: 'center',
width: 100,
width: 180,
scopedSlots: { customRender: 'serialNumber' },
ellipsis: true
},
{
title: this.$t('title'),
align: 'center',
width: 100,
width: 180,
dataIndex: 'title',
scopedSlots: { customRender: 'serialtitle' },
ellipsis: true
@@ -133,20 +134,21 @@
{
title: this.$t('status'),
align: 'center',
width: 100,
width: 180,
dataIndex: 'state',
ellipsis: true
},
{
title: this.$t('subscriptionTime'),
align: 'center',
width: 100,
width: 180,
dataIndex: 'createTime',
ellipsis: true
},
{
title: this.$t('operation'),
dataIndex: 'action',
fixed: 'right',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 170
@@ -374,10 +376,12 @@
/* float: none !important;*/
/*}*/
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--single {
height: 38px;
}
@@ -12,7 +12,7 @@
class="table"
key="id"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -118,7 +118,7 @@
title: this.$t('serialNumber'),
dataIndex: 'index',
align: 'center',
width: 20,
width: 100,
customRender: function(t, r, index) {
return parseInt(index) + 1
}
@@ -128,21 +128,21 @@
dataIndex: 'name',
align: 'center',
ellipsis: true,
width: 180
width: 240
},
{
title: this.$t('ProcessType'),
dataIndex: 'categoryName',
align: 'center',
ellipsis: true,
width: 180
width: 240
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
ellipsis: true,
width: 180,
width: 240,
customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss')
}
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -57,42 +57,49 @@
dataIndex: 'prcType',
align: 'center',
ellipsis: true,
width: 180,
scopedSlots: { customRender: 'prcType' }
},
{
title: this.$t('Sponsor'),
dataIndex: 'creatUserName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('CurrentProcessor'),
dataIndex: 'taskAssignee',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('createTime'),
dataIndex: 'creatTime',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('ProcessingTime'),
dataIndex: 'handlingTime',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('ProcessStatus'),
dataIndex: 'isEnd',
align: 'center',
width: 180,
ellipsis: true,
scopedSlots: { customRender: 'isEnd' }
},
@@ -100,6 +107,7 @@
title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate',
align: 'center',
width: 180,
ellipsis: true
},
{
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -58,24 +58,28 @@
dataIndex: 'prcType',
align: 'center',
ellipsis: true,
width: 180,
scopedSlots: { customRender: 'prcType' }
},
{
title: this.$t('Sponsor'),
dataIndex: 'creatUserName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('CurrentProcessor'),
dataIndex: 'taskAssignee',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee',
align: 'center',
width: 180,
ellipsis: true
},
{
@@ -83,6 +87,7 @@
dataIndex: 'createTime',
align: 'center',
ellipsis: true,
width: 180,
customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss')
}
@@ -92,6 +97,7 @@
dataIndex: 'endTime',
align: 'center',
ellipsis: true,
width: 180,
customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss')
}
@@ -100,6 +106,7 @@
title: this.$t('ProcessStatus'),
dataIndex: 'isEnd',
align: 'center',
width: 180,
ellipsis: true,
scopedSlots: { customRender: 'isEnd' }
},
@@ -107,6 +114,7 @@
title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate',
align: 'center',
width: 180,
ellipsis: true
},
{
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -58,24 +58,28 @@
dataIndex: 'prcType',
align: 'center',
ellipsis: true,
width: 180,
scopedSlots: { customRender: 'prcType' }
},
{
title: this.$t('Sponsor'),
dataIndex: 'creatUserName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('CurrentProcessor'),
dataIndex: 'taskAssignee',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee',
align: 'center',
width: 180,
ellipsis: true
},
{
@@ -83,6 +87,7 @@
dataIndex: 'createTime',
align: 'center',
ellipsis: true,
width: 180,
customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss')
}
@@ -91,6 +96,7 @@
title: this.$t('CompletionTime'),
dataIndex: 'endTime',
align: 'center',
width: 180,
ellipsis: true,
customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss')
@@ -100,6 +106,7 @@
title: this.$t('ProcessStatus'),
dataIndex: 'isEnd',
align: 'center',
width: 180,
ellipsis: true,
scopedSlots: { customRender: 'isEnd' }
},
@@ -107,6 +114,7 @@
title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate',
align: 'center',
width: 180,
ellipsis: true,
},
{
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -55,24 +55,28 @@
title: this.$t('RelatedItems'),
dataIndex: 'projectName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('standard'),
dataIndex: 'prcNum',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('title'),
dataIndex: 'prcName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('ProcessType'),
dataIndex: 'prcType',
align: 'center',
width: 180,
ellipsis: true,
scopedSlots: { customRender: 'prcType' }
},
@@ -80,12 +84,14 @@
title: this.$t('Sponsor'),
dataIndex: 'creatUserName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
width: 180,
ellipsis: true,
customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss')
@@ -95,6 +101,7 @@
title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate',
align: 'center',
width: 180,
ellipsis: true
},
{
+28 -16
View File
@@ -7,24 +7,24 @@
<a-icon type="plus"/>
{{$t('add')}}
</div>
<!-- <a-button @click="handleAdd" type="primary" icon="plus">{{$t('add')}}</a-button>-->
<!-- <a-button-->
<!-- @click="batchDel"-->
<!-- v-if="selectedRowKeys.length > 0"-->
<!-- ghost-->
<!-- type="primary"-->
<!-- icon="delete">{{$t('BatchDelete')}}-->
<!-- </a-button>-->
<!-- <a-button @click="handleAdd" type="primary" icon="plus">{{$t('add')}}</a-button>-->
<!-- <a-button-->
<!-- @click="batchDel"-->
<!-- v-if="selectedRowKeys.length > 0"-->
<!-- ghost-->
<!-- type="primary"-->
<!-- icon="delete">{{$t('BatchDelete')}}-->
<!-- </a-button>-->
</div>
<!-- table区域-begin -->
<div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}}&nbsp;<a style="font-weight: 600">{{-->
<!-- selectedRowKeys.length }}</a>{{$t('term')}}-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
<!-- </div>-->
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}}&nbsp;<a style="font-weight: 600">{{-->
<!-- selectedRowKeys.length }}</a>{{$t('term')}}-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
<!-- </div>-->
<a-table
:columns="columns"
@@ -108,25 +108,33 @@
title: this.$t('MenuName'),
dataIndex: 'name',
align: 'center',
key: 'name'
key: 'name',
ellipsis: true,
width: 180
},
{
title: this.$t('MenuEnName'),
dataIndex: 'menuEn',
align: 'center',
key: 'menuEn'
key: 'menuEn',
ellipsis: true,
width: 180
},
{
title: 'icon',
dataIndex: 'icon',
align: 'center',
key: 'icon'
key: 'icon',
ellipsis: true,
width: 180
},
{
title: this.$t('assembly'),
dataIndex: 'component',
align: 'center',
key: 'component',
width: 240,
ellipsis: true,
scopedSlots: { customRender: 'component' }
},
{
@@ -134,12 +142,16 @@
dataIndex: 'url',
align: 'center',
key: 'url',
width: 240,
ellipsis: true,
scopedSlots: { customRender: 'url' }
},
{
title: this.$t('sort'),
dataIndex: 'sortNo',
align: 'center',
width: 80,
ellipsis: true,
key: 'sortNo'
},
{
+155 -145
View File
@@ -22,69 +22,71 @@
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px">
<!--<a-button @click="handleEdit" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<!-- <a-button @click="handleAddUserDepart" type="primary" icon="plus">{{$t('AddExistingUsers')}}</a-button>-->
<!-- <a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>-->
<!-- <a-button @click="handleAddUserDepart" type="primary" icon="plus">{{$t('AddExistingUsers')}}</a-button>-->
<!-- <a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel">-->
<!-- <a-icon type="delete"/>-->
<!-- {{$t('disassociate')}}-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> {{$t('batchOperation')}}-->
<!-- <a-icon type="down"/>-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel">-->
<!-- <a-icon type="delete"/>-->
<!-- {{$t('disassociate')}}-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> {{$t('batchOperation')}}-->
<!-- <a-icon type="down"/>-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
<div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{-->
<!-- selectedRowKeys.length }}</a> {{$t('term')}}-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
<!-- </div>-->
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<!-- rowKey="id" bordered-->
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{-->
<!-- selectedRowKeys.length }}</a> {{$t('term')}}-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
<!-- </div>-->
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<!-- rowKey="id" bordered-->
<a-table
ref="table"
size="middle"
:scroll="{x: '100%'}"
:columns="columns"
:pagination="false"
:dataSource="dataSource"
:loading="loading"
@change="handleTableChange">
<!-- <span slot="action" slot-scope="text, record">-->
<!-- <a @click="handleEdit(record)">{{$t('edit')}}</a>-->
<!-- <span slot="action" slot-scope="text, record">-->
<!-- <a @click="handleEdit(record)">{{$t('edit')}}</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">-->
<!-- {{$t('more')}} <a-icon type="down"/>-->
<!-- </a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>-->
<!-- </a-menu-item>-->
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">-->
<!-- {{$t('more')}} <a-icon type="down"/>-->
<!-- </a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">-->
<!-- <a>{{$t('disassociate')}}</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
<!-- </span>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">-->
<!-- <a>{{$t('disassociate')}}</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
<!-- </span>-->
</a-table>
</div>
<div class="page" style='display: flex; justify-content: flex-end;margin-top: 20px'>
<!-- show-size-changer-->
<!-- show-size-changer-->
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
:page-size.sync="pageSize"
@@ -103,14 +105,14 @@
</template>
<script>
import {JeroListMixin} from '@/mixins/JeroListMixin'
import {getAction, postAction, deleteAction} from '@/api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { getAction, postAction, deleteAction } from '@/api/manage'
import SelectUserModal from './SelectUserModal'
import UserModal from './UserModal'
import DeptRoleUserModal from './DeptRoleUserModal'
export default {
name: "DeptUserInfo",
name: 'DeptUserInfo',
mixins: [JeroListMixin],
components: {
DeptRoleUserModal,
@@ -124,20 +126,26 @@
currentDept: {},
// 表头
columns: [{
title: this.$t('userAccount'),
align: "center",
dataIndex: 'username'
},
title: this.$t('userAccount'),
align: 'center',
dataIndex: 'username',
width: 180,
ellipsis: true
},
{
title: this.$t('userName'),
align: "center",
dataIndex: 'realname'
align: 'center',
dataIndex: 'realname',
width: 180,
ellipsis: true
},
{
title: this.$t('department'),
align: "center",
dataIndex: 'orgCode'
},
align: 'center',
dataIndex: 'orgCode',
width: 180,
ellipsis: true
}
// {
// title: this.$t('Gender'),
// align: "center",
@@ -155,18 +163,18 @@
// align: "center",
// width: 150
// }
],
],
url: {
list: "/sys/user/departUserList",
edit: "/sys/user/editSysDepartWithUser",
delete: "/sys/user/deleteUserInDepart",
deleteBatch: "/sys/user/deleteUserInDepartBatch",
list: '/sys/user/departUserList',
edit: '/sys/user/editSysDepartWithUser',
delete: '/sys/user/deleteUserInDepart',
deleteBatch: '/sys/user/deleteUserInDepartBatch'
},
loading:false,
dataSource:[],
loading: false,
dataSource: [],
total: 0,
pageSize: 10,
pageNo: 1,
pageNo: 1
}
},
created() {
@@ -180,20 +188,21 @@
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadDataIndex(page,pageSize)
this.loadDataIndex(page, pageSize)
},
handleTableChange(page) {
this.loadDataIndex(page)
},
searchReset() {
this.queryParam = {}
this.loadDataIndex(1);
this.loadDataIndex(1)
},
searchQuery(){
this.loadDataIndex(1);
searchQuery() {
this.loadDataIndex(1)
},
loadData(){},
loadDataIndex(arg,pageSize) {
loadData() {
},
loadDataIndex(arg, pageSize) {
if (!this.url.list) {
this.$message.error(this.$t('setURLListAttribute'))
return
@@ -201,26 +210,26 @@
this.loading = true
//加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1;
this.ipagination.current = 1
}
//if (this.currentDeptId === '') return;
let params = this.getQueryParams();//查询条件
params.depId = this.currentDeptId;
let params = this.getQueryParams()//查询条件
params.depId = this.currentDeptId
params.pageNo = arg
if(pageSize !== undefined) {
if (pageSize !== undefined) {
params.pageSize = pageSize
}
getAction(this.url.list, params).then((res) => {
this.loading = false
if (res.success && res.result) {
this.dataSource = res.result.records || [];
this.total = res.result.total;
}else{
this.dataSource = res.result.records || []
this.total = res.result.total
} else {
this.dataSource = []
}
})
},
batchDel: function () {
batchDel: function() {
if (!this.url.deleteBatch) {
this.$message.error(this.$t('setURLDeletebatchAttribute'))
@@ -232,33 +241,33 @@
}
if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecored'));
return;
this.$message.warning(this.$t('selectARecored'))
return
} else {
var ids = "";
var ids = ''
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
ids += this.selectedRowKeys[a] + ','
}
var that = this;
console.log(this.currentDeptId);
var that = this
console.log(this.currentDeptId)
this.$confirm({
title: this.$t('ConfirmCancellation'),
content: this.$t('CancelAssociation'),
onOk: function () {
deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
onOk: function() {
deleteAction(that.url.deleteBatch, { depId: that.currentDeptId, userIds: ids }).then((res) => {
if (res.success) {
that.$message.success(this.$t('SuccessfullyDeleted'));
that.loadDataIndex();
that.onClearSelected();
that.$message.success(this.$t('SuccessfullyDeleted'))
that.loadDataIndex()
that.onClearSelected()
} else {
that.$message.warning(res.message);
that.$message.warning(res.message)
}
});
})
}
});
})
}
},
handleDelete: function (id) {
handleDelete: function(id) {
if (!this.url.delete) {
this.$message.error(this.$t('setURLDeleteAttribute'))
return
@@ -268,90 +277,90 @@
return
}
var that = this;
deleteAction(that.url.delete, {depId: this.currentDeptId, userId: id}).then((res) => {
var that = this
deleteAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => {
if (res.success) {
that.$message.success(this.$t('SuccessfullyDeleted'));
if (this.selectedRowKeys.length>0){
for(let i =0; i<this.selectedRowKeys.length;i++){
if (this.selectedRowKeys[i] == id){
this.selectedRowKeys.splice(i,1);
break;
}
}
that.$message.success(this.$t('SuccessfullyDeleted'))
if (this.selectedRowKeys.length > 0) {
for (let i = 0; i < this.selectedRowKeys.length; i++) {
if (this.selectedRowKeys[i] == id) {
this.selectedRowKeys.splice(i, 1)
break
}
}
}
that.loadDataIndex();
that.loadDataIndex()
} else {
that.$message.warning(res.message);
that.$message.warning(res.message)
}
});
})
},
open(record) {
this.currentDeptId = record.id;
this.currentDept = record;
this.loadDataIndex(1);
this.currentDeptId = record.id
this.currentDept = record
this.loadDataIndex(1)
},
clearList() {
this.currentDeptId = '';
this.dataSource = [];
this.currentDeptId = ''
this.dataSource = []
},
hasSelectDept() {
if (this.currentDeptId == '') {
this.$message.error(this.$t('selectDepartmentFirst'))
return false;
return false
}
return true;
return true
},
handleAddUserDepart() {
if (this.currentDeptId == '' ) {
this.$message.error(this.$t('selectDepartmentFirst'))
} else {
this.$refs.selectUserModal.visible = true;
}
},
handleEdit: function (record) {
this.$refs.modalForm.title = this.$t('edit');
this.$refs.modalForm.departDisabled = true;
this.$refs.modalForm.disableSubmit = false;
this.$refs.modalForm.edit(record);
},
handleAdd: function () {
if (this.currentDeptId == '') {
this.$message.error(this.$t('selectDepartmentFirst'))
} else {
this.$refs.modalForm.departDisabled = true;
this.$refs.selectUserModal.visible = true
}
},
handleEdit: function(record) {
this.$refs.modalForm.title = this.$t('edit')
this.$refs.modalForm.departDisabled = true
this.$refs.modalForm.disableSubmit = false
this.$refs.modalForm.edit(record)
},
handleAdd: function() {
if (this.currentDeptId == '') {
this.$message.error(this.$t('selectDepartmentFirst'))
} else {
this.$refs.modalForm.departDisabled = true
//初始化负责部门
this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId]; //传入一个部门id
this.$refs.modalForm.add();
this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId] //传入一个部门id
this.$refs.modalForm.add()
//update-begin---author:liusq Date:20210223 forhttps://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
this.$refs.modalForm.resultDepartOptions=[{key:this.currentDept.key,title:this.currentDept.title}]
this.$refs.modalForm.resultDepartOptions = [{ key: this.currentDept.key, title: this.currentDept.title }]
//update-end---author:liusq Date:20210223 forhttps://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
this.$refs.modalForm.title = this.$t('add');
this.$refs.modalForm.title = this.$t('add')
}
},
selectOK(data) {
let params = {};
params.depId = this.currentDeptId;
params.userIdList = [];
let params = {}
params.depId = this.currentDeptId
params.userIdList = []
for (var a = 0; a < data.length; a++) {
params.userIdList.push(data[a]);
params.userIdList.push(data[a])
}
console.log(params);
console.log(params)
postAction(this.url.edit, params).then((res) => {
if (res.success) {
this.$message.success(res.message);
this.loadDataIndex();
this.$message.success(res.message)
this.loadDataIndex()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message)
}
})
},
handleDeptRole(record){
if(this.currentDeptId != ''){
this.$refs.deptRoleUser.add(record,this.currentDeptId);
this.$refs.deptRoleUser.title = this.$t('DepartmentRole');
}else{
this.$message.warning(this.$t('selectDepartmentFirst'));
handleDeptRole(record) {
if (this.currentDeptId != '') {
this.$refs.deptRoleUser.add(record, this.currentDeptId)
this.$refs.deptRoleUser.title = this.$t('DepartmentRole')
} else {
this.$message.warning(this.$t('selectDepartmentFirst'))
}
}
}
@@ -373,7 +382,8 @@
margin-top: -16px;
margin-bottom: 16px;
}
/deep/.ant-table-pagination{
/deep/ .ant-table-pagination {
display: none;
}
</style>