修改已知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" ref="table"
size="middle" size="middle"
rowKey="id" rowKey="id"
:scroll="{x: '100%'}"
:columns="columns" :columns="columns"
:dataSource="tableData" :dataSource="tableData"
:pagination="false" :pagination="false"
@@ -110,25 +111,29 @@
key: 'serialNumber', key: 'serialNumber',
scopedSlots: {customRender: 'serialNumber'}, scopedSlots: {customRender: 'serialNumber'},
align: "center", align: "center",
width: 100, ellipsis: true,
width: 180,
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
align: "center", align: "center",
scopedSlots: {customRender: 'serialtitle'}, scopedSlots: {customRender: 'serialtitle'},
width: 100, width: 180,
ellipsis: true,
dataIndex: 'title', dataIndex: 'title',
}, },
{ {
title: this.$t('status'), title: this.$t('status'),
align: "center", align: "center",
width: 100, width: 180,
ellipsis: true,
dataIndex: 'state', dataIndex: 'state',
}, },
{ {
title: this.$t('collectionTime'), title: this.$t('collectionTime'),
align: "center", align: "center",
width: 100, width: 180,
ellipsis: true,
dataIndex: 'createTime', dataIndex: 'createTime',
}, },
{ {
@@ -136,6 +141,7 @@
dataIndex: 'action', dataIndex: 'action',
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
align: "center", align: "center",
fixed: 'right',
width: 170 width: 170
} }
], ],
@@ -61,6 +61,7 @@
ref="table" ref="table"
size="middle" size="middle"
rowKey="id" rowKey="id"
:scroll="{x: '100%'}"
:columns="columns" :columns="columns"
:dataSource="tableData" :dataSource="tableData"
:pagination="false" :pagination="false"
@@ -118,14 +119,14 @@
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
key: 'serialNumber', key: 'serialNumber',
align: 'center', align: 'center',
width: 100, width: 180,
scopedSlots: { customRender: 'serialNumber' }, scopedSlots: { customRender: 'serialNumber' },
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
align: 'center', align: 'center',
width: 100, width: 180,
dataIndex: 'title', dataIndex: 'title',
scopedSlots: { customRender: 'serialtitle' }, scopedSlots: { customRender: 'serialtitle' },
ellipsis: true ellipsis: true
@@ -133,20 +134,21 @@
{ {
title: this.$t('status'), title: this.$t('status'),
align: 'center', align: 'center',
width: 100, width: 180,
dataIndex: 'state', dataIndex: 'state',
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('subscriptionTime'), title: this.$t('subscriptionTime'),
align: 'center', align: 'center',
width: 100, width: 180,
dataIndex: 'createTime', dataIndex: 'createTime',
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
dataIndex: 'action', dataIndex: 'action',
fixed: 'right',
scopedSlots: { customRender: 'action' }, scopedSlots: { customRender: 'action' },
align: 'center', align: 'center',
width: 170 width: 170
@@ -374,10 +376,12 @@
/* float: none !important;*/ /* float: none !important;*/
/*}*/ /*}*/
} }
.box-input .ant-select-selection__rendered { .box-input .ant-select-selection__rendered {
line-height: 38px; line-height: 38px;
height: 38px; height: 38px;
} }
.box-input .ant-select-selection--single { .box-input .ant-select-selection--single {
height: 38px; height: 38px;
} }
@@ -12,7 +12,7 @@
class="table" class="table"
key="id" key="id"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -118,7 +118,7 @@
title: this.$t('serialNumber'), title: this.$t('serialNumber'),
dataIndex: 'index', dataIndex: 'index',
align: 'center', align: 'center',
width: 20, width: 100,
customRender: function(t, r, index) { customRender: function(t, r, index) {
return parseInt(index) + 1 return parseInt(index) + 1
} }
@@ -128,21 +128,21 @@
dataIndex: 'name', dataIndex: 'name',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180 width: 240
}, },
{ {
title: this.$t('ProcessType'), title: this.$t('ProcessType'),
dataIndex: 'categoryName', dataIndex: 'categoryName',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180 width: 240
}, },
{ {
title: this.$t('createTime'), title: this.$t('createTime'),
dataIndex: 'createTime', dataIndex: 'createTime',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180, width: 240,
customRender: function(t, r, index) { customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss') return moment(t).format('YYYY-MM-DD HH:mm:ss')
} }
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -57,42 +57,49 @@
dataIndex: 'prcType', dataIndex: 'prcType',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180,
scopedSlots: { customRender: 'prcType' } scopedSlots: { customRender: 'prcType' }
}, },
{ {
title: this.$t('Sponsor'), title: this.$t('Sponsor'),
dataIndex: 'creatUserName', dataIndex: 'creatUserName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('CurrentProcessor'), title: this.$t('CurrentProcessor'),
dataIndex: 'taskAssignee', dataIndex: 'taskAssignee',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('LastProcessor'), title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee', dataIndex: 'taskBackAssignee',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('createTime'), title: this.$t('createTime'),
dataIndex: 'creatTime', dataIndex: 'creatTime',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('ProcessingTime'), title: this.$t('ProcessingTime'),
dataIndex: 'handlingTime', dataIndex: 'handlingTime',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('ProcessStatus'), title: this.$t('ProcessStatus'),
dataIndex: 'isEnd', dataIndex: 'isEnd',
align: 'center', align: 'center',
width: 180,
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'isEnd' } scopedSlots: { customRender: 'isEnd' }
}, },
@@ -100,6 +107,7 @@
title: this.$t('cutoffTime'), title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate', dataIndex: 'taskAffirmDueDate',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -58,24 +58,28 @@
dataIndex: 'prcType', dataIndex: 'prcType',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180,
scopedSlots: { customRender: 'prcType' } scopedSlots: { customRender: 'prcType' }
}, },
{ {
title: this.$t('Sponsor'), title: this.$t('Sponsor'),
dataIndex: 'creatUserName', dataIndex: 'creatUserName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('CurrentProcessor'), title: this.$t('CurrentProcessor'),
dataIndex: 'taskAssignee', dataIndex: 'taskAssignee',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('LastProcessor'), title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee', dataIndex: 'taskBackAssignee',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
@@ -83,6 +87,7 @@
dataIndex: 'createTime', dataIndex: 'createTime',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180,
customRender: function(t, r, index) { customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss') return moment(t).format('YYYY-MM-DD HH:mm:ss')
} }
@@ -92,6 +97,7 @@
dataIndex: 'endTime', dataIndex: 'endTime',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180,
customRender: function(t, r, index) { customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss') return moment(t).format('YYYY-MM-DD HH:mm:ss')
} }
@@ -100,6 +106,7 @@
title: this.$t('ProcessStatus'), title: this.$t('ProcessStatus'),
dataIndex: 'isEnd', dataIndex: 'isEnd',
align: 'center', align: 'center',
width: 180,
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'isEnd' } scopedSlots: { customRender: 'isEnd' }
}, },
@@ -107,6 +114,7 @@
title: this.$t('cutoffTime'), title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate', dataIndex: 'taskAffirmDueDate',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -58,24 +58,28 @@
dataIndex: 'prcType', dataIndex: 'prcType',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180,
scopedSlots: { customRender: 'prcType' } scopedSlots: { customRender: 'prcType' }
}, },
{ {
title: this.$t('Sponsor'), title: this.$t('Sponsor'),
dataIndex: 'creatUserName', dataIndex: 'creatUserName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('CurrentProcessor'), title: this.$t('CurrentProcessor'),
dataIndex: 'taskAssignee', dataIndex: 'taskAssignee',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('LastProcessor'), title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee', dataIndex: 'taskBackAssignee',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
@@ -83,6 +87,7 @@
dataIndex: 'createTime', dataIndex: 'createTime',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 180,
customRender: function(t, r, index) { customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss') return moment(t).format('YYYY-MM-DD HH:mm:ss')
} }
@@ -91,6 +96,7 @@
title: this.$t('CompletionTime'), title: this.$t('CompletionTime'),
dataIndex: 'endTime', dataIndex: 'endTime',
align: 'center', align: 'center',
width: 180,
ellipsis: true, ellipsis: true,
customRender: function(t, r, index) { customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss') return moment(t).format('YYYY-MM-DD HH:mm:ss')
@@ -100,6 +106,7 @@
title: this.$t('ProcessStatus'), title: this.$t('ProcessStatus'),
dataIndex: 'isEnd', dataIndex: 'isEnd',
align: 'center', align: 'center',
width: 180,
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'isEnd' } scopedSlots: { customRender: 'isEnd' }
}, },
@@ -107,6 +114,7 @@
title: this.$t('cutoffTime'), title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate', dataIndex: 'taskAffirmDueDate',
align: 'center', align: 'center',
width: 180,
ellipsis: true, ellipsis: true,
}, },
{ {
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -55,24 +55,28 @@
title: this.$t('RelatedItems'), title: this.$t('RelatedItems'),
dataIndex: 'projectName', dataIndex: 'projectName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('standard'), title: this.$t('standard'),
dataIndex: 'prcNum', dataIndex: 'prcNum',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
dataIndex: 'prcName', dataIndex: 'prcName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('ProcessType'), title: this.$t('ProcessType'),
dataIndex: 'prcType', dataIndex: 'prcType',
align: 'center', align: 'center',
width: 180,
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'prcType' } scopedSlots: { customRender: 'prcType' }
}, },
@@ -80,12 +84,14 @@
title: this.$t('Sponsor'), title: this.$t('Sponsor'),
dataIndex: 'creatUserName', dataIndex: 'creatUserName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('createTime'), title: this.$t('createTime'),
dataIndex: 'createTime', dataIndex: 'createTime',
align: 'center', align: 'center',
width: 180,
ellipsis: true, ellipsis: true,
customRender: function(t, r, index) { customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss') return moment(t).format('YYYY-MM-DD HH:mm:ss')
@@ -95,6 +101,7 @@
title: this.$t('cutoffTime'), title: this.$t('cutoffTime'),
dataIndex: 'taskAffirmDueDate', dataIndex: 'taskAffirmDueDate',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
+15 -3
View File
@@ -108,25 +108,33 @@
title: this.$t('MenuName'), title: this.$t('MenuName'),
dataIndex: 'name', dataIndex: 'name',
align: 'center', align: 'center',
key: 'name' key: 'name',
ellipsis: true,
width: 180
}, },
{ {
title: this.$t('MenuEnName'), title: this.$t('MenuEnName'),
dataIndex: 'menuEn', dataIndex: 'menuEn',
align: 'center', align: 'center',
key: 'menuEn' key: 'menuEn',
ellipsis: true,
width: 180
}, },
{ {
title: 'icon', title: 'icon',
dataIndex: 'icon', dataIndex: 'icon',
align: 'center', align: 'center',
key: 'icon' key: 'icon',
ellipsis: true,
width: 180
}, },
{ {
title: this.$t('assembly'), title: this.$t('assembly'),
dataIndex: 'component', dataIndex: 'component',
align: 'center', align: 'center',
key: 'component', key: 'component',
width: 240,
ellipsis: true,
scopedSlots: { customRender: 'component' } scopedSlots: { customRender: 'component' }
}, },
{ {
@@ -134,12 +142,16 @@
dataIndex: 'url', dataIndex: 'url',
align: 'center', align: 'center',
key: 'url', key: 'url',
width: 240,
ellipsis: true,
scopedSlots: { customRender: 'url' } scopedSlots: { customRender: 'url' }
}, },
{ {
title: this.$t('sort'), title: this.$t('sort'),
dataIndex: 'sortNo', dataIndex: 'sortNo',
align: 'center', align: 'center',
width: 80,
ellipsis: true,
key: 'sortNo' key: 'sortNo'
}, },
{ {
@@ -50,7 +50,9 @@
<a-table <a-table
ref="table" ref="table"
size="middle" size="middle"
:scroll="{x: '100%'}"
:columns="columns" :columns="columns"
:pagination="false"
:dataSource="dataSource" :dataSource="dataSource"
:loading="loading" :loading="loading"
@change="handleTableChange"> @change="handleTableChange">
@@ -110,7 +112,7 @@
import DeptRoleUserModal from './DeptRoleUserModal' import DeptRoleUserModal from './DeptRoleUserModal'
export default { export default {
name: "DeptUserInfo", name: 'DeptUserInfo',
mixins: [JeroListMixin], mixins: [JeroListMixin],
components: { components: {
DeptRoleUserModal, DeptRoleUserModal,
@@ -125,19 +127,25 @@
// 表头 // 表头
columns: [{ columns: [{
title: this.$t('userAccount'), title: this.$t('userAccount'),
align: "center", align: 'center',
dataIndex: 'username' dataIndex: 'username',
width: 180,
ellipsis: true
}, },
{ {
title: this.$t('userName'), title: this.$t('userName'),
align: "center", align: 'center',
dataIndex: 'realname' dataIndex: 'realname',
width: 180,
ellipsis: true
}, },
{ {
title: this.$t('department'), title: this.$t('department'),
align: "center", align: 'center',
dataIndex: 'orgCode' dataIndex: 'orgCode',
}, width: 180,
ellipsis: true
}
// { // {
// title: this.$t('Gender'), // title: this.$t('Gender'),
// align: "center", // align: "center",
@@ -157,16 +165,16 @@
// } // }
], ],
url: { url: {
list: "/sys/user/departUserList", list: '/sys/user/departUserList',
edit: "/sys/user/editSysDepartWithUser", edit: '/sys/user/editSysDepartWithUser',
delete: "/sys/user/deleteUserInDepart", delete: '/sys/user/deleteUserInDepart',
deleteBatch: "/sys/user/deleteUserInDepartBatch", deleteBatch: '/sys/user/deleteUserInDepartBatch'
}, },
loading: false, loading: false,
dataSource: [], dataSource: [],
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1
} }
}, },
created() { created() {
@@ -187,12 +195,13 @@
}, },
searchReset() { searchReset() {
this.queryParam = {} this.queryParam = {}
this.loadDataIndex(1); this.loadDataIndex(1)
}, },
searchQuery() { searchQuery() {
this.loadDataIndex(1); this.loadDataIndex(1)
},
loadData() {
}, },
loadData(){},
loadDataIndex(arg, pageSize) { loadDataIndex(arg, pageSize) {
if (!this.url.list) { if (!this.url.list) {
this.$message.error(this.$t('setURLListAttribute')) this.$message.error(this.$t('setURLListAttribute'))
@@ -201,11 +210,11 @@
this.loading = true this.loading = true
//加载数据 若传入参数1则加载第一页的内容 //加载数据 若传入参数1则加载第一页的内容
if (arg === 1) { if (arg === 1) {
this.ipagination.current = 1; this.ipagination.current = 1
} }
//if (this.currentDeptId === '') return; //if (this.currentDeptId === '') return;
let params = this.getQueryParams();//查询条件 let params = this.getQueryParams()//查询条件
params.depId = this.currentDeptId; params.depId = this.currentDeptId
params.pageNo = arg params.pageNo = arg
if (pageSize !== undefined) { if (pageSize !== undefined) {
params.pageSize = pageSize params.pageSize = pageSize
@@ -213,8 +222,8 @@
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
this.loading = false this.loading = false
if (res.success && res.result) { if (res.success && res.result) {
this.dataSource = res.result.records || []; this.dataSource = res.result.records || []
this.total = res.result.total; this.total = res.result.total
} else { } else {
this.dataSource = [] this.dataSource = []
} }
@@ -232,30 +241,30 @@
} }
if (this.selectedRowKeys.length <= 0) { if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecored')); this.$message.warning(this.$t('selectARecored'))
return; return
} else { } else {
var ids = ""; var ids = ''
for (var a = 0; a < this.selectedRowKeys.length; a++) { for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ","; ids += this.selectedRowKeys[a] + ','
} }
var that = this; var that = this
console.log(this.currentDeptId); console.log(this.currentDeptId)
this.$confirm({ this.$confirm({
title: this.$t('ConfirmCancellation'), title: this.$t('ConfirmCancellation'),
content: this.$t('CancelAssociation'), content: this.$t('CancelAssociation'),
onOk: function() { onOk: function() {
deleteAction(that.url.deleteBatch, { depId: that.currentDeptId, userIds: ids }).then((res) => { deleteAction(that.url.deleteBatch, { depId: that.currentDeptId, userIds: ids }).then((res) => {
if (res.success) { if (res.success) {
that.$message.success(this.$t('SuccessfullyDeleted')); that.$message.success(this.$t('SuccessfullyDeleted'))
that.loadDataIndex(); that.loadDataIndex()
that.onClearSelected(); that.onClearSelected()
} else { } else {
that.$message.warning(res.message); that.$message.warning(res.message)
} }
}); })
} }
}); })
} }
}, },
handleDelete: function(id) { handleDelete: function(id) {
@@ -268,90 +277,90 @@
return return
} }
var that = this; var that = this
deleteAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => { deleteAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => {
if (res.success) { if (res.success) {
that.$message.success(this.$t('SuccessfullyDeleted')); that.$message.success(this.$t('SuccessfullyDeleted'))
if (this.selectedRowKeys.length > 0) { if (this.selectedRowKeys.length > 0) {
for (let i = 0; i < this.selectedRowKeys.length; i++) { for (let i = 0; i < this.selectedRowKeys.length; i++) {
if (this.selectedRowKeys[i] == id) { if (this.selectedRowKeys[i] == id) {
this.selectedRowKeys.splice(i,1); this.selectedRowKeys.splice(i, 1)
break; break
} }
} }
} }
that.loadDataIndex(); that.loadDataIndex()
} else { } else {
that.$message.warning(res.message); that.$message.warning(res.message)
} }
}); })
}, },
open(record) { open(record) {
this.currentDeptId = record.id; this.currentDeptId = record.id
this.currentDept = record; this.currentDept = record
this.loadDataIndex(1); this.loadDataIndex(1)
}, },
clearList() { clearList() {
this.currentDeptId = ''; this.currentDeptId = ''
this.dataSource = []; this.dataSource = []
}, },
hasSelectDept() { hasSelectDept() {
if (this.currentDeptId == '') { if (this.currentDeptId == '') {
this.$message.error(this.$t('selectDepartmentFirst')) this.$message.error(this.$t('selectDepartmentFirst'))
return false; return false
} }
return true; return true
}, },
handleAddUserDepart() { handleAddUserDepart() {
if (this.currentDeptId == '') { if (this.currentDeptId == '') {
this.$message.error(this.$t('selectDepartmentFirst')) this.$message.error(this.$t('selectDepartmentFirst'))
} else { } else {
this.$refs.selectUserModal.visible = true; this.$refs.selectUserModal.visible = true
} }
}, },
handleEdit: function(record) { handleEdit: function(record) {
this.$refs.modalForm.title = this.$t('edit'); this.$refs.modalForm.title = this.$t('edit')
this.$refs.modalForm.departDisabled = true; this.$refs.modalForm.departDisabled = true
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false
this.$refs.modalForm.edit(record); this.$refs.modalForm.edit(record)
}, },
handleAdd: function() { handleAdd: function() {
if (this.currentDeptId == '') { if (this.currentDeptId == '') {
this.$message.error(this.$t('selectDepartmentFirst')) this.$message.error(this.$t('selectDepartmentFirst'))
} else { } else {
this.$refs.modalForm.departDisabled = true; this.$refs.modalForm.departDisabled = true
//初始化负责部门 //初始化负责部门
this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId]; //传入一个部门id this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId] //传入一个部门id
this.$refs.modalForm.add(); this.$refs.modalForm.add()
//update-begin---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------ //update-begin---author:liusq Date:20210223 for:https://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 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------ //update-end---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
this.$refs.modalForm.title = this.$t('add'); this.$refs.modalForm.title = this.$t('add')
} }
}, },
selectOK(data) { selectOK(data) {
let params = {}; let params = {}
params.depId = this.currentDeptId; params.depId = this.currentDeptId
params.userIdList = []; params.userIdList = []
for (var a = 0; a < data.length; a++) { 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) => { postAction(this.url.edit, params).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(res.message); this.$message.success(res.message)
this.loadDataIndex(); this.loadDataIndex()
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message)
} }
}) })
}, },
handleDeptRole(record) { handleDeptRole(record) {
if (this.currentDeptId != '') { if (this.currentDeptId != '') {
this.$refs.deptRoleUser.add(record,this.currentDeptId); this.$refs.deptRoleUser.add(record, this.currentDeptId)
this.$refs.deptRoleUser.title = this.$t('DepartmentRole'); this.$refs.deptRoleUser.title = this.$t('DepartmentRole')
} else { } else {
this.$message.warning(this.$t('selectDepartmentFirst')); this.$message.warning(this.$t('selectDepartmentFirst'))
} }
} }
} }
@@ -373,6 +382,7 @@
margin-top: -16px; margin-top: -16px;
margin-bottom: 16px; margin-bottom: 16px;
} }
/deep/ .ant-table-pagination { /deep/ .ant-table-pagination {
display: none; display: none;
} }