修改已知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
}, },
{ {
+28 -16
View File
@@ -7,24 +7,24 @@
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('add')}} {{$t('add')}}
</div> </div>
<!-- <a-button @click="handleAdd" type="primary" icon="plus">{{$t('add')}}</a-button>--> <!-- <a-button @click="handleAdd" type="primary" icon="plus">{{$t('add')}}</a-button>-->
<!-- <a-button--> <!-- <a-button-->
<!-- @click="batchDel"--> <!-- @click="batchDel"-->
<!-- v-if="selectedRowKeys.length > 0"--> <!-- v-if="selectedRowKeys.length > 0"-->
<!-- ghost--> <!-- ghost-->
<!-- type="primary"--> <!-- type="primary"-->
<!-- icon="delete">{{$t('BatchDelete')}}--> <!-- icon="delete">{{$t('BatchDelete')}}-->
<!-- </a-button>--> <!-- </a-button>-->
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <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">{{--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}}&nbsp;<a style="font-weight: 600">{{-->
<!-- selectedRowKeys.length }}</a>{{$t('term')}}--> <!-- selectedRowKeys.length }}</a>{{$t('term')}}-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>--> <!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
<!-- </div>--> <!-- </div>-->
<a-table <a-table
:columns="columns" :columns="columns"
@@ -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'
}, },
{ {
+155 -145
View File
@@ -22,69 +22,71 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px"> <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="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="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="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">--> <!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel">--> <!-- <a-menu-item key="1" @click="batchDel">-->
<!-- <a-icon type="delete"/>--> <!-- <a-icon type="delete"/>-->
<!-- {{$t('disassociate')}}--> <!-- {{$t('disassociate')}}-->
<!-- </a-menu-item>--> <!-- </a-menu-item>-->
<!-- </a-menu>--> <!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> {{$t('batchOperation')}}--> <!-- <a-button style="margin-left: 8px"> {{$t('batchOperation')}}-->
<!-- <a-icon type="down"/>--> <!-- <a-icon type="down"/>-->
<!-- </a-button>--> <!-- </a-button>-->
<!-- </a-dropdown>--> <!-- </a-dropdown>-->
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <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">{{--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{-->
<!-- selectedRowKeys.length }}</a> {{$t('term')}}--> <!-- selectedRowKeys.length }}</a> {{$t('term')}}-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>--> <!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
<!-- </div>--> <!-- </div>-->
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"--> <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<!-- rowKey="id" bordered--> <!-- rowKey="id" bordered-->
<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">
<!-- <span slot="action" slot-scope="text, record">--> <!-- <span slot="action" slot-scope="text, record">-->
<!-- <a @click="handleEdit(record)">{{$t('edit')}}</a>--> <!-- <a @click="handleEdit(record)">{{$t('edit')}}</a>-->
<!-- <a-divider type="vertical"/>--> <!-- <a-divider type="vertical"/>-->
<!-- <a-dropdown>--> <!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">--> <!-- <a class="ant-dropdown-link">-->
<!-- {{$t('more')}} <a-icon type="down"/>--> <!-- {{$t('more')}} <a-icon type="down"/>-->
<!-- </a>--> <!-- </a>-->
<!-- <a-menu slot="overlay">--> <!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>--> <!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>--> <!-- <a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>-->
<!-- </a-menu-item>--> <!-- </a-menu-item>-->
<!-- <a-menu-item>--> <!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>--> <!-- <a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>-->
<!-- </a-menu-item>--> <!-- </a-menu-item>-->
<!-- <a-menu-item>--> <!-- <a-menu-item>-->
<!-- <a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">--> <!-- <a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">-->
<!-- <a>{{$t('disassociate')}}</a>--> <!-- <a>{{$t('disassociate')}}</a>-->
<!-- </a-popconfirm>--> <!-- </a-popconfirm>-->
<!-- </a-menu-item>--> <!-- </a-menu-item>-->
<!-- </a-menu>--> <!-- </a-menu>-->
<!-- </a-dropdown>--> <!-- </a-dropdown>-->
<!-- </span>--> <!-- </span>-->
</a-table> </a-table>
</div> </div>
<div class="page" style='display: flex; justify-content: flex-end;margin-top: 20px'> <div class="page" style='display: flex; justify-content: flex-end;margin-top: 20px'>
<!-- show-size-changer--> <!-- show-size-changer-->
<a-pagination <a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')" :show-total="total => $t('total')+` ${total} `+$t('strip')"
:page-size.sync="pageSize" :page-size.sync="pageSize"
@@ -103,14 +105,14 @@
</template> </template>
<script> <script>
import {JeroListMixin} from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import {getAction, postAction, deleteAction} from '@/api/manage' import { getAction, postAction, deleteAction } from '@/api/manage'
import SelectUserModal from './SelectUserModal' import SelectUserModal from './SelectUserModal'
import UserModal from './UserModal' import UserModal from './UserModal'
import DeptRoleUserModal from './DeptRoleUserModal' import DeptRoleUserModal from './DeptRoleUserModal'
export default { export default {
name: "DeptUserInfo", name: 'DeptUserInfo',
mixins: [JeroListMixin], mixins: [JeroListMixin],
components: { components: {
DeptRoleUserModal, DeptRoleUserModal,
@@ -124,20 +126,26 @@
currentDept: {}, currentDept: {},
// 表头 // 表头
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",
@@ -155,18 +163,18 @@
// align: "center", // align: "center",
// width: 150 // width: 150
// } // }
], ],
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() {
@@ -180,20 +188,21 @@
SizeChange(page, pageSize) { SizeChange(page, pageSize) {
this.pageNo = 1 this.pageNo = 1
this.pageSize = pageSize this.pageSize = pageSize
this.loadDataIndex(page,pageSize) this.loadDataIndex(page, pageSize)
}, },
handleTableChange(page) { handleTableChange(page) {
this.loadDataIndex(page) this.loadDataIndex(page)
}, },
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'))
return return
@@ -201,26 +210,26 @@
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
} }
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 = []
} }
}) })
}, },
batchDel: function () { batchDel: function() {
if (!this.url.deleteBatch) { if (!this.url.deleteBatch) {
this.$message.error(this.$t('setURLDeletebatchAttribute')) this.$message.error(this.$t('setURLDeletebatchAttribute'))
@@ -232,33 +241,33 @@
} }
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) {
if (!this.url.delete) { if (!this.url.delete) {
this.$message.error(this.$t('setURLDeleteAttribute')) this.$message.error(this.$t('setURLDeleteAttribute'))
return return
@@ -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 == '' ) {
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 == '') { if (this.currentDeptId == '') {
this.$message.error(this.$t('selectDepartmentFirst')) this.$message.error(this.$t('selectDepartmentFirst'))
} else { } 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.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,7 +382,8 @@
margin-top: -16px; margin-top: -16px;
margin-bottom: 16px; margin-bottom: 16px;
} }
/deep/.ant-table-pagination{
/deep/ .ant-table-pagination {
display: none; display: none;
} }
</style> </style>