fix 基础模块bug修改,JTable注册为全局组件
This commit is contained in:
@@ -84,7 +84,8 @@ module.exports = {
|
|||||||
isShelf: 'Shelf Or Not',
|
isShelf: 'Shelf Or Not',
|
||||||
sort: 'Sort',
|
sort: 'Sort',
|
||||||
shelfWarn: 'the link is empty please fill in the link first',
|
shelfWarn: 'the link is empty please fill in the link first',
|
||||||
maxLinksReached: '当前上架链接已达上限!'
|
maxLinksReached: 'The current link listing limit has been reached!',
|
||||||
|
logo: 'LOGO'
|
||||||
},
|
},
|
||||||
// 联络人管理
|
// 联络人管理
|
||||||
contact: {
|
contact: {
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ module.exports = {
|
|||||||
isShelf: '是否上架',
|
isShelf: '是否上架',
|
||||||
sort: '排序',
|
sort: '排序',
|
||||||
shelfWarn: '链接为空,请先填写链接',
|
shelfWarn: '链接为空,请先填写链接',
|
||||||
maxLinksReached: '当前上架链接已达上限!'
|
maxLinksReached: '当前上架链接已达上限!',
|
||||||
|
logo: 'LOGO'
|
||||||
},
|
},
|
||||||
// 联络人管理
|
// 联络人管理
|
||||||
contact: {
|
contact: {
|
||||||
|
|||||||
+2
-1
@@ -50,7 +50,7 @@ import JeroComponents from '@/components/jero/index'
|
|||||||
|
|
||||||
import JDictComponenets from '@comp/dict/index.js'
|
import JDictComponenets from '@comp/dict/index.js'
|
||||||
|
|
||||||
console.log('ant-design-vue version:', version)
|
import JTable from '@comp/jero/JTable.vue'
|
||||||
// Vue.prototype.rules = rules
|
// Vue.prototype.rules = rules
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.use(Storage, config.storageOptions)
|
Vue.use(Storage, config.storageOptions)
|
||||||
@@ -62,6 +62,7 @@ Vue.use(VueI18n)
|
|||||||
Vue.use(Viewer)
|
Vue.use(Viewer)
|
||||||
Vue.use(JeroComponents)
|
Vue.use(JeroComponents)
|
||||||
Vue.use(JDictComponenets)
|
Vue.use(JDictComponenets)
|
||||||
|
Vue.component('JTable', JTable)
|
||||||
Viewer.setDefaults({
|
Viewer.setDefaults({
|
||||||
// 需要配置的属性 注意属性并没有引号
|
// 需要配置的属性 注意属性并没有引号
|
||||||
title: false,
|
title: false,
|
||||||
|
|||||||
@@ -20,15 +20,12 @@
|
|||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :md="8" :sm="12">
|
<a-col :md="8" :sm="12">
|
||||||
<a-form-item :label="$t('name')">
|
<a-form-item :label="$t('name')">
|
||||||
<j-input style="width: 120px;" :placeholder="$t('pleaseEnter') + $t('name')" v-model="queryParam.itemText"></j-input>
|
<j-input :placeholder="$t('pleaseEnter') + $t('name')" v-model="queryParam.itemText"></j-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="9" :sm="24">
|
<a-col :md="8" :sm="12">
|
||||||
<a-form-item :label="$t('status')" style="width: 170px" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('status')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select
|
<a-select style="width: 100%" :placeholder="$t('pleaseSelect')" v-model="queryParam.status">
|
||||||
:placeholder="$t('pleaseSelect')"
|
|
||||||
v-model="queryParam.status"
|
|
||||||
>
|
|
||||||
<a-select-option value="1">{{ $t('normal') }}</a-select-option>
|
<a-select-option value="1">{{ $t('normal') }}</a-select-option>
|
||||||
<a-select-option value="0">{{ $t('disable') }}</a-select-option>
|
<a-select-option value="0">{{ $t('disable') }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -53,7 +50,6 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
can-drag
|
can-drag
|
||||||
:class="{'tree-table': attributeType === TagsAttributeTypeEnums.TREE.value}"
|
:class="{'tree-table': attributeType === TagsAttributeTypeEnums.TREE.value}"
|
||||||
:bordered="true"
|
|
||||||
size="middle"
|
size="middle"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
@@ -99,26 +95,26 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('name'),
|
title: this.$t('name'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
width: 120,
|
||||||
dataIndex: 'itemText'
|
dataIndex: 'itemText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('englishName'),
|
title: this.$t('englishName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
width: 120,
|
||||||
dataIndex: 'enName'
|
dataIndex: 'enName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('dict.dataValue'),
|
title: this.$t('dict.dataValue'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 100,
|
||||||
dataIndex: 'itemValue'
|
dataIndex: 'itemValue'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 100,
|
||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
|
|
||||||
<!-- 左侧面板 -->
|
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
@@ -41,7 +39,7 @@
|
|||||||
{{ $t('dict.refreshCache') }}
|
{{ $t('dict.refreshCache') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
<a-button type="primary" icon="hdd" ghost @click="openDeleteList">{{ $t('recycleBin') }}</a-button>
|
<!--<a-button type="primary" icon="hdd" ghost @click="openDeleteList">{{ $t('recycleBin') }}</a-button>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<j-table
|
<j-table
|
||||||
@@ -50,7 +48,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:scroll="{x: '100%', y: yScrollHeight}"
|
:scroll="{x: 900, y: yScrollHeight}"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
:operation-list="operationList"
|
:operation-list="operationList"
|
||||||
@change="handleTableChange"
|
@change="handleTableChange"
|
||||||
@@ -93,7 +91,7 @@ export default {
|
|||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '#',
|
title: '序号',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 60,
|
width: 60,
|
||||||
@@ -104,28 +102,28 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('dict.dictionaryName'),
|
title: this.$t('dict.dictionaryName'),
|
||||||
align: 'left',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'dictName',
|
dataIndex: 'dictName',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('dict.dictionaryEnglishName'),
|
title: this.$t('dict.dictionaryEnglishName'),
|
||||||
align: 'left',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'dictEnglishName',
|
dataIndex: 'dictEnglishName',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('dict.dictionaryNumber'),
|
title: this.$t('dict.dictionaryNumber'),
|
||||||
align: 'left',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'dictCode',
|
dataIndex: 'dictCode',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('description'),
|
title: this.$t('description'),
|
||||||
align: 'left',
|
align: 'center',
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
width: 200,
|
width: 200,
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
@@ -133,8 +131,8 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
// dataIndex: 'action',
|
// dataIndex: 'action',
|
||||||
align: 'left',
|
align: 'center',
|
||||||
width: 170,
|
width: 100,
|
||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -8,8 +8,11 @@
|
|||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="this.selectedRowKeys1.length === 0 ? 6: 12" :sm="12">
|
<a-col :md="this.selectedRowKeys1.length === 0 ? 6: 12" :sm="12">
|
||||||
<a-form-item :label="$t('roleManage.roleName')" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
<a-form-item :label="$t('roleManage.roleName')"
|
||||||
<j-input :placeholder="$t('pleaseEnter') + $t('roleManage.roleName')" v-model="queryParam.roleName"></j-input>
|
:labelCol="{span: 5}"
|
||||||
|
:wrapperCol="{span: 18, offset: 1}">
|
||||||
|
<j-input :placeholder="$t('pleaseEnter') + $t('roleManage.roleName')"
|
||||||
|
v-model="queryParam.roleName"></j-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--
|
<!--
|
||||||
@@ -22,14 +25,18 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
-->
|
-->
|
||||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">{{ $t('query') }}</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">{{ $t('query')
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" ghost style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
}}
|
||||||
|
</a-button>
|
||||||
|
<a-button type="primary" @click="searchReset" icon="reload" ghost style="margin-left: 8px">
|
||||||
|
{{ $t('reset') }}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" style="margin: 5px 0 10px 2px">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">{{ $t('roleManage.newRole') }}</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">{{ $t('roleManage.newRole') }}</a-button>
|
||||||
<!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
|
<!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
|
||||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
||||||
@@ -39,21 +46,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<a-table
|
<j-table
|
||||||
:components="drag(columns,'columns')"
|
|
||||||
ref="table"
|
ref="table"
|
||||||
style="max-height: 500px"
|
style="max-height: 500px"
|
||||||
size="middle"
|
size="middle"
|
||||||
bordered
|
:can-drag="true"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:scroll="{x: '100%', y: yScrollHeight}"
|
:scroll="{x: 500, y: yScrollHeight}"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="{text, record}">
|
||||||
<a @click="handleOpen(record)">{{ $t('roleManage.userBtn') }}</a>
|
<a @click="handleOpen(record)">{{ $t('roleManage.userBtn') }}</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
|
|
||||||
@@ -76,7 +82,7 @@
|
|||||||
</a-menu>
|
</a-menu>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 右侧的角色权限配置 -->
|
<!-- 右侧的角色权限配置 -->
|
||||||
<user-role-modal ref="modalUserRole"></user-role-modal>
|
<user-role-modal ref="modalUserRole"></user-role-modal>
|
||||||
@@ -85,53 +91,41 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval === 1">
|
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval === 1">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<div style="text-align: right;margin-bottom: 6px">
|
<div class="user-top-box">
|
||||||
<a-icon type="close-circle" @click="hideUserList" />
|
<!-- 查询区域 -->
|
||||||
</div>
|
<div class="table-page-search-wrapper">
|
||||||
<!-- 查询区域 -->
|
<a-form layout="inline">
|
||||||
<div class="table-page-search-wrapper">
|
<a-row :gutter="24">
|
||||||
<a-form layout="inline">
|
<a-col :md="12" :sm="12">
|
||||||
<a-row :gutter="24">
|
<a-form-item :label="$t('user.userAccount')">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter') + $t('user.userAccount')"
|
||||||
<a-col :md="12" :sm="12">
|
v-model="queryParam2.username"></a-input>
|
||||||
<a-form-item :label="$t('user.userAccount')">
|
</a-form-item>
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('user.userAccount')" v-model="queryParam2.username"></a-input>
|
</a-col>
|
||||||
</a-form-item>
|
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
</a-col>
|
<a-button type="primary" @click="searchQuery2" icon="search">{{ $t('query') }}</a-button>
|
||||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<a-button type="primary" @click="searchReset2" icon="reload" ghost style="margin-left: 8px">
|
||||||
<a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">{{ $t('query') }}</a-button>
|
{{ $t('reset') }}
|
||||||
<a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<a-icon type="close-circle" class="close-icon" @click="hideUserList" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<!--<a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">{{ $t('roleManage.newUser') }}</a-button>-->
|
<!--<a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">{{ $t('roleManage.newUser') }}</a-button>-->
|
||||||
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
|
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
|
||||||
<a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">{{
|
<a-button @click="handleAddUserRole" type="primary" icon="plus">{{ $t('roleManage.existingUsers') }}
|
||||||
$t('roleManage.existingUsers')
|
|
||||||
}}
|
|
||||||
</a-button>
|
</a-button>
|
||||||
|
<a-button @click="batchDel2" type="danger" icon="delete">{{ $t('delete') }}</a-button>
|
||||||
<a-dropdown v-if="selectedRowKeys2.length > 0">
|
|
||||||
<a-menu slot="overlay">
|
|
||||||
<a-menu-item key="1" @click="batchDel2">
|
|
||||||
<a-icon type="delete" />
|
|
||||||
{{ $t('delete') }}
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
<a-button style="margin-left: 8px"> {{ $t('batchOperation') }}
|
|
||||||
<a-icon type="down" />
|
|
||||||
</a-button>
|
|
||||||
</a-dropdown>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<a-table
|
<j-table
|
||||||
:components="drag(columns2,'columns2')"
|
|
||||||
ref="table2"
|
ref="table2"
|
||||||
bordered
|
:can-drag="true"
|
||||||
style="max-height: 500px"
|
style="max-height: 500px"
|
||||||
size="middle"
|
size="middle"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
@@ -139,15 +133,13 @@
|
|||||||
:dataSource="dataSource2"
|
:dataSource="dataSource2"
|
||||||
:pagination="ipagination2"
|
:pagination="ipagination2"
|
||||||
:loading="loading2"
|
:loading="loading2"
|
||||||
:scroll="{x: '100%', y: yScrollHeight}"
|
:scroll="{x: 500, y: yScrollHeight}"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
|
||||||
@change="handleTableChange2">
|
@change="handleTableChange2">
|
||||||
<template slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="{text, record}">
|
||||||
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete2(record.id)">
|
<a @click="handleDelete2(record.id)">{{ $t('delete') }}</a>
|
||||||
<a>{{ $t('delete') }}</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
<role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
|
<role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
|
||||||
@@ -232,12 +224,14 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('roleManage.roleCode'),
|
title: this.$t('roleManage.roleCode'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'roleCode'
|
dataIndex: 'roleCode',
|
||||||
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('roleManage.roleName'),
|
title: this.$t('roleManage.roleName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'roleName'
|
dataIndex: 'roleName',
|
||||||
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('createTime'),
|
title: this.$t('createTime'),
|
||||||
@@ -246,21 +240,24 @@ export default {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return moment(text).format('YYYY-MM-DD')
|
return moment(text).format('YYYY-MM-DD')
|
||||||
}
|
},
|
||||||
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' },
|
||||||
|
width: 80
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
columns2: [{
|
columns2: [
|
||||||
title: this.$t('user.userAccount'),
|
{
|
||||||
align: 'center',
|
title: this.$t('user.userAccount'),
|
||||||
dataIndex: 'username',
|
align: 'center',
|
||||||
width: 120
|
dataIndex: 'username',
|
||||||
},
|
width: 120
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('user.userName'),
|
title: this.$t('user.userName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -279,9 +276,9 @@ export default {
|
|||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120
|
width: 80
|
||||||
}],
|
}
|
||||||
|
],
|
||||||
// 高级查询参数
|
// 高级查询参数
|
||||||
superQueryParams2: '',
|
superQueryParams2: '',
|
||||||
// 高级查询拼接条件
|
// 高级查询拼接条件
|
||||||
@@ -332,6 +329,8 @@ export default {
|
|||||||
this.loadData2()
|
this.loadData2()
|
||||||
},
|
},
|
||||||
onClearSelected () {
|
onClearSelected () {
|
||||||
|
this.selectedRowKeys2 = []
|
||||||
|
this.selectionRows2 = []
|
||||||
},
|
},
|
||||||
|
|
||||||
getQueryParams2 () {
|
getQueryParams2 () {
|
||||||
@@ -366,7 +365,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.modalForm2.roleDisabled = true
|
this.$refs.modalForm2.roleDisabled = true
|
||||||
this.$refs.modalForm2.title = this.$t('newlyAdded')
|
this.$refs.modalForm2.title = this.$t('newlyAdded')
|
||||||
this.$refs.modalForm2.edit({ activitiSync: '1', userIdentity: 1, selectedroles: this.currentRoleId })
|
this.$refs.modalForm2.edit({
|
||||||
|
activitiSync: '1',
|
||||||
|
userIdentity: 1,
|
||||||
|
selectedroles: this.currentRoleId
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modalFormOk2 () {
|
modalFormOk2 () {
|
||||||
@@ -405,9 +408,16 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const that = this
|
const that = this
|
||||||
postAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => {
|
postAction(that.url.delete2, {
|
||||||
|
roleId: this.currentRoleId,
|
||||||
|
userId: id
|
||||||
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
|
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||||
|
if (that.ipagination2.current > 1 && ((that.ipagination2.current - 1) * that.ipagination2.pageSize) + 1 === that.ipagination2.total) {
|
||||||
|
that.ipagination2.current -= 1
|
||||||
|
}
|
||||||
that.loadData2()
|
that.loadData2()
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message)
|
that.$message.warning(res.message)
|
||||||
@@ -431,10 +441,22 @@ export default {
|
|||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('confirmDeletion'),
|
title: this.$t('confirmDeletion'),
|
||||||
content: this.$t('deleteAData'),
|
content: this.$t('deleteAData'),
|
||||||
onOk: function () {
|
onOk: () => {
|
||||||
postAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => {
|
postAction(that.url.deleteBatch2, {
|
||||||
|
roleId: that.currentRoleId,
|
||||||
|
userIds: ids
|
||||||
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
|
// 总数量-count
|
||||||
|
const count = this.selectedRowKeys2.length
|
||||||
|
const total = this.ipagination2.total - count
|
||||||
|
// 获取删除后的分页数
|
||||||
|
const currentIndex = Math.ceil(total / this.ipagination2.pageSize)
|
||||||
|
// 删除后的分页数<所在当前页
|
||||||
|
if (currentIndex < this.ipagination2.current) {
|
||||||
|
this.ipagination2.current = currentIndex
|
||||||
|
}
|
||||||
that.loadData2()
|
that.loadData2()
|
||||||
that.onClearSelected()
|
that.onClearSelected()
|
||||||
} else {
|
} else {
|
||||||
@@ -524,4 +546,27 @@ export default {
|
|||||||
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||||
min-width: 60px;
|
min-width: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-top-box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.table-page-search-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
|
||||||
|
.ant-row {
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-page-search-submitButtons {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
margin-left: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -29,11 +29,11 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<template v-if="toggleSearchStatus">
|
<template v-if="toggleSearchStatus">
|
||||||
<a-col :md="6" :sm="12">
|
<!--<a-col :md="6" :sm="12">-->
|
||||||
<a-form-item :label="$t('phoneNumber')">
|
<!-- <a-form-item :label="$t('phoneNumber')">-->
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('phoneNumber')" v-model="queryParam.phone"></a-input>
|
<!-- <a-input :placeholder="$t('pleaseEnter') + $t('phoneNumber')" v-model="queryParam.phone"></a-input>-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!--</a-col>-->
|
||||||
<a-col :md="6" :sm="12">
|
<a-col :md="6" :sm="12">
|
||||||
<a-form-item :label="$t('status')">
|
<a-form-item :label="$t('status')">
|
||||||
<a-select v-model="queryParam.status" :placeholder="$t('pleaseSelect') + $t('status')">
|
<a-select v-model="queryParam.status" :placeholder="$t('pleaseSelect') + $t('status')">
|
||||||
@@ -88,28 +88,28 @@
|
|||||||
<div class="table-operator" style="border-top: 5px">
|
<div class="table-operator" style="border-top: 5px">
|
||||||
<a-button v-if="isDev" @click="handleAdd" type="primary" icon="plus">{{ $t('user.addUser') }}</a-button>
|
<a-button v-if="isDev" @click="handleAdd" type="primary" icon="plus">{{ $t('user.addUser') }}</a-button>
|
||||||
<a-button type="primary" ghost icon="upload" @click="handleExportXls($t('user.userInformation'), '.xls')">{{ $t('export') }}</a-button>
|
<a-button type="primary" ghost icon="upload" @click="handleExportXls($t('user.userInformation'), '.xls')">{{ $t('export') }}</a-button>
|
||||||
<a-button v-if="isDev" type="primary" ghost icon="hdd" @click="recycleBinVisible=true">{{ $t('recycleBin') }}</a-button>
|
<!--<a-button v-if="isDev" type="primary" ghost icon="hdd" @click="recycleBinVisible=true">{{ $t('recycleBin') }}</a-button>-->
|
||||||
<a-button v-if="isDev" type="primary" ghost icon="hdd" @click="roleAssignment">{{ $t('user.roleAllocation') }}</a-button>
|
<!--<a-button v-if="isDev" type="primary" ghost icon="hdd" @click="roleAssignment">{{ $t('user.roleAllocation') }}</a-button>-->
|
||||||
<a-dropdown v-if="isDev && selectedRowKeys.length > 0">
|
<!--<a-dropdown v-if="isDev && selectedRowKeys.length > 0">-->
|
||||||
<a-menu slot="overlay" @click="handleMenuClick">
|
<!-- <a-menu slot="overlay" @click="handleMenuClick">-->
|
||||||
<a-menu-item key="1">
|
<!-- <a-menu-item key="1">-->
|
||||||
<a-icon type="delete" @click="batchDel" />
|
<!-- <a-icon type="delete" @click="batchDel" />-->
|
||||||
{{ $t('delete') }}
|
<!-- {{ $t('delete') }}-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="2">
|
<!-- <a-menu-item key="2">-->
|
||||||
<a-icon type="lock" @click="batchFrozen('2')" />
|
<!-- <a-icon type="lock" @click="batchFrozen('2')" />-->
|
||||||
{{ $t('user.frozen') }}
|
<!-- {{ $t('user.frozen') }}-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="3">
|
<!-- <a-menu-item key="3">-->
|
||||||
<a-icon type="unlock" @click="batchFrozen('1')" />
|
<!-- <a-icon type="unlock" @click="batchFrozen('1')" />-->
|
||||||
{{ $t('user.thaw') }}
|
<!-- {{ $t('user.thaw') }}-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
</a-menu>
|
<!-- </a-menu>-->
|
||||||
<a-button style="margin-left: 8px">
|
<!-- <a-button style="margin-left: 8px">-->
|
||||||
{{ $t('batchOperation') }}
|
<!-- {{ $t('batchOperation') }}-->
|
||||||
<a-icon type="down" />
|
<!-- <a-icon type="down" />-->
|
||||||
</a-button>
|
<!-- </a-button>-->
|
||||||
</a-dropdown>
|
<!--</a-dropdown>-->
|
||||||
<!--<j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>-->
|
<!--<j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:action="{text, record}" v-if="isDev">
|
<template v-slot:action="{text, record}" v-if="isDev">
|
||||||
<a @click="handleEdit(record)">{{ $t('edit') }}</a>
|
<a @click="handleEdit(record)" v-has="'user:edit'">{{ $t('edit') }}</a>
|
||||||
|
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
|
|
||||||
@@ -158,13 +158,13 @@
|
|||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|
||||||
<a-menu-item v-if="(record.status + '')==='1'">
|
<a-menu-item v-if="(record.status + '')==='1'" v-has="'user:edit'">
|
||||||
<a-popconfirm :title="$t('user.freezePassword')" @confirm="() => handleFrozen(record.id,2,record.username)">
|
<a-popconfirm :title="$t('user.freezePassword')" @confirm="() => handleFrozen(record.id,2,record.username)">
|
||||||
<a>{{ $t('user.frozen') }}</a>
|
<a>{{ $t('user.frozen') }}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|
||||||
<a-menu-item v-if="(record.status + '')==='2'">
|
<a-menu-item v-if="(record.status + '')==='2'" v-has="'user:edit'">
|
||||||
<a-popconfirm :title="$t('user.youThaw')" @confirm="() => handleFrozen(record.id,1,record.username)">
|
<a-popconfirm :title="$t('user.youThaw')" @confirm="() => handleFrozen(record.id,1,record.username)">
|
||||||
<a>{{ $t('user.thaw') }}</a>
|
<a>{{ $t('user.thaw') }}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
|||||||
@@ -24,8 +24,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" v-has="'sys:friendshipLink:search'">{{ $t('query') }}</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search" v-has="'sys:friendshipLink:search'">
|
||||||
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
{{ $t('query') }}
|
||||||
|
</a-button>
|
||||||
|
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -58,8 +62,10 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:isShelf="{text, record}">
|
<template v-slot:logoUrl="{text}">
|
||||||
<a-switch v-model="record.grounding" @change="switchChange(record)" />
|
<div class="table-image" v-viewer="{movable: false}">
|
||||||
|
<img :src="getImgView(text)">
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:action="{text, record}">
|
<template v-slot:action="{text, record}">
|
||||||
@@ -83,7 +89,11 @@ import FriendshipLinkModal from './modules/FriendshipLinkModal'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'FriendshipLinkList',
|
name: 'FriendshipLinkList',
|
||||||
components: { FriendshipLinkModal, JTable, JDictSelectTag },
|
components: {
|
||||||
|
FriendshipLinkModal,
|
||||||
|
JTable,
|
||||||
|
JDictSelectTag
|
||||||
|
},
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -113,11 +123,11 @@ export default {
|
|||||||
scopedSlots: { customRender: 'link' }
|
scopedSlots: { customRender: 'link' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.friendshipLink.isShelf'),
|
title: this.$t('system.friendshipLink.logo'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'isShelf',
|
dataIndex: 'logoUrl',
|
||||||
scopedSlots: { customRender: 'isShelf' }
|
scopedSlots: { customRender: 'logoUrl' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.friendshipLink.sort'),
|
title: this.$t('system.friendshipLink.sort'),
|
||||||
@@ -165,6 +175,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 是否上架状态改变
|
// 是否上架状态改变
|
||||||
switchChange (record) {
|
switchChange (record) {
|
||||||
|
console.log(record)
|
||||||
if (!record.link) {
|
if (!record.link) {
|
||||||
this.$message.warning(this.$t('system.friendshipLink.shelfWarn'))
|
this.$message.warning(this.$t('system.friendshipLink.shelfWarn'))
|
||||||
return
|
return
|
||||||
@@ -192,7 +203,15 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-image {
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -26,6 +26,16 @@
|
|||||||
:placeholder="$t('pleaseEnter')+$t('system.friendshipLink.link')"
|
:placeholder="$t('pleaseEnter')+$t('system.friendshipLink.link')"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item :required="true"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
:label="$t('system.friendshipLink.logo')">
|
||||||
|
<j-image-upload class="avatar-uploader"
|
||||||
|
:text="$t('upload')"
|
||||||
|
v-decorator.trim="['logoUrl', validatorRules.logoUrl]"
|
||||||
|
:number=1
|
||||||
|
accept='.png,.PNG,.jpg,.JPG'></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('system.friendshipLink.sort')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('system.friendshipLink.sort')">
|
||||||
<a-input
|
<a-input
|
||||||
v-decorator.trim="[ 'sort', validatorRules.sort]"
|
v-decorator.trim="[ 'sort', validatorRules.sort]"
|
||||||
@@ -34,13 +44,6 @@
|
|||||||
:placeholder="$t('pleaseEnter')+$t('system.friendshipLink.sort')"
|
:placeholder="$t('pleaseEnter')+$t('system.friendshipLink.sort')"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :required="true" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('system.friendshipLink.isShelf')">
|
|
||||||
<a-switch
|
|
||||||
v-decorator="[ 'grounding', { valuePropName: 'checked', rules: validatorRules.grounding }]"
|
|
||||||
:placeholder="$t('pleaseSelect')+$t('system.friendshipLink.isShelf')"
|
|
||||||
>
|
|
||||||
</a-switch>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
|
||||||
@@ -70,25 +73,37 @@ export default {
|
|||||||
validatorRules: {
|
validatorRules: {
|
||||||
name: {
|
name: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.friendshipLink.linkName') }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('pleaseEnter') + this.$t('system.friendshipLink.linkName')
|
||||||
|
}
|
||||||
],
|
],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.friendshipLink.link') }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('pleaseEnter') + this.$t('system.friendshipLink.link')
|
||||||
|
}
|
||||||
],
|
],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
sort: {
|
sort: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.friendshipLink.sort') }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('pleaseEnter') + this.$t('system.friendshipLink.sort')
|
||||||
|
}
|
||||||
],
|
],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
grounding: {
|
logoUrl: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.friendshipLink.grounding') }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('pleaseSelect') + this.$t('system.friendshipLink.logo')
|
||||||
|
}
|
||||||
],
|
],
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<j-modal
|
<j-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:width="800"
|
:width="600"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@@ -14,13 +14,21 @@
|
|||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form-model ref="form" v-bind="layout" :model="model" :rules="validatorRules">
|
<a-form-model ref="form" v-bind="layout" :model="model" :rules="validatorRules">
|
||||||
<a-form-model-item :label="$t('roleManage.roleCode')" required prop="roleCode">
|
<a-form-model-item :label="$t('roleManage.roleCode')" required prop="roleCode">
|
||||||
<a-input v-model="model.roleCode" :disabled="roleDisabled" :placeholder="$t('pleaseEnter') + $t('roleManage.roleCode')" />
|
<a-input :maxLength="64"
|
||||||
|
v-model="model.roleCode"
|
||||||
|
:disabled="roleDisabled"
|
||||||
|
:placeholder="$t('pleaseEnter') + $t('roleManage.roleCode')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item :label="$t('roleManage.roleName')" required prop="roleName">
|
<a-form-model-item :label="$t('roleManage.roleName')" required prop="roleName">
|
||||||
<a-input v-model="model.roleName" :placeholder="$t('pleaseEnter') + $t('roleManage.roleName')" />
|
<a-input :maxLength="30"
|
||||||
|
v-model="model.roleName"
|
||||||
|
:placeholder="$t('pleaseEnter') + $t('roleManage.roleName')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item :label="$t('roleManage.roleDescribe')" prop="description">
|
<a-form-model-item :label="$t('roleManage.roleDescribe')" prop="description">
|
||||||
<a-textarea :rows="5" v-model="model.description" :placeholder="$t('pleaseEnter') + $t('roleManage.roleDescribe')" />
|
<a-textarea :rows="5"
|
||||||
|
:maxLenght="126"
|
||||||
|
v-model="model.description"
|
||||||
|
:placeholder="$t('pleaseEnter') + $t('roleManage.roleDescribe')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
@@ -40,22 +48,43 @@ export default {
|
|||||||
roleDisabled: false,
|
roleDisabled: false,
|
||||||
model: {},
|
model: {},
|
||||||
layout: {
|
layout: {
|
||||||
labelCol: { span: 3 },
|
labelCol: { span: 4 },
|
||||||
wrapperCol: { span: 14 }
|
wrapperCol: { span: 20 }
|
||||||
},
|
},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
roleName: [
|
roleName: [
|
||||||
{ required: true, validator: this.validateRoleName },
|
{
|
||||||
{ min: 2, max: 30, message: this.$t('roleManage.lengthIsTwoToThirty'), trigger: 'blur' }
|
required: true,
|
||||||
|
validator: this.validateRoleName
|
||||||
|
},
|
||||||
|
{
|
||||||
|
min: 2,
|
||||||
|
max: 30,
|
||||||
|
message: this.$t('roleManage.lengthIsTwoToThirty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
roleCode: [
|
roleCode: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('roleManage.roleCode') + '!' },
|
{
|
||||||
{ min: 0, max: 64, message: this.$t('roleManage.notExceed') + ' 64 ' + this.$t('roleManage.charLength'), trigger: 'blur' },
|
required: true,
|
||||||
|
message: this.$t('pleaseEnter') + this.$t('roleManage.roleCode') + '!'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
min: 0,
|
||||||
|
max: 64,
|
||||||
|
message: this.$t('roleManage.notExceed') + ' 64 ' + this.$t('roleManage.charLength'),
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
{ validator: this.validateRoleCode }
|
{ validator: this.validateRoleCode }
|
||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{ min: 0, max: 126, message: this.$t('roleManage.notExceed') + ' 126 ' + this.$t('roleManage.charLength'), trigger: 'blur' }
|
{
|
||||||
|
min: 0,
|
||||||
|
max: 126,
|
||||||
|
message: this.$t('roleManage.notExceed') + ' 126 ' + this.$t('roleManage.charLength'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<a-table
|
<j-table
|
||||||
size="small"
|
size="small"
|
||||||
bordered
|
bordered
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
:rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
|
|
||||||
</a-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-end -->
|
<!-- table区域-end -->
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ export default {
|
|||||||
// 表头
|
// 表头
|
||||||
columns1: [
|
columns1: [
|
||||||
{
|
{
|
||||||
title: '#',
|
title: '序号',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 50,
|
width: 50,
|
||||||
@@ -182,6 +182,7 @@ export default {
|
|||||||
console.log('data:' + this.dataSource2)
|
console.log('data:' + this.dataSource2)
|
||||||
this.$emit('selectFinished', this.dataSource2)
|
this.$emit('selectFinished', this.dataSource2)
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
this.onClearSelected()
|
||||||
},
|
},
|
||||||
add () {
|
add () {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
|||||||
@@ -7,154 +7,158 @@
|
|||||||
:closable="true"
|
:closable="true"
|
||||||
@close="handleCancel"
|
@close="handleCancel"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
class="custom-drawer-style">
|
||||||
|
|
||||||
<template slot="title">
|
<div class="custom-drawer-style-scroll">
|
||||||
<div style="width: 100%;">
|
<a-spin :spinning="confirmLoading">
|
||||||
<span>{{ title }}</span>
|
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
||||||
<span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right">
|
|
||||||
<a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0"></a-button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
<a-form-model-item :label="$t('user.userAccount')"
|
||||||
|
:labelCol="labelCol"
|
||||||
<a-spin :spinning="confirmLoading">
|
:wrapperCol="wrapperCol"
|
||||||
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
prop="username">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter') + $t('user.userAccount')"
|
||||||
<a-form-model-item :label="$t('user.userAccount')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
|
:maxLength="50"
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('user.userAccount')"
|
v-model="model.username"
|
||||||
:maxLength="50"
|
:readOnly="!!model.id"
|
||||||
v-model="model.username"
|
:disabled="disableSubmit" />
|
||||||
:readOnly="!!model.id"
|
|
||||||
:disabled="disableSubmit" />
|
|
||||||
</a-form-model-item>
|
|
||||||
|
|
||||||
<template v-if="!model.id">
|
|
||||||
<a-form-model-item :label="$t('user.loginPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password">
|
|
||||||
<a-input-password type="password"
|
|
||||||
:placeholder="$t('pleaseEnter') + $t('user.loginPassword')"
|
|
||||||
:maxLength="20"
|
|
||||||
v-model="model.password" />
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
|
||||||
<a-form-model-item :label="$t('user.confirmPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword">
|
<template v-if="!model.id">
|
||||||
<a-input-password type="password"
|
<a-form-model-item :label="$t('user.loginPassword')"
|
||||||
@blur="handleConfirmBlur"
|
:labelCol="labelCol"
|
||||||
:maxLength="20"
|
:wrapperCol="wrapperCol"
|
||||||
:placeholder="$t('user.reenterLoginPassword')"
|
prop="password">
|
||||||
v-model="model.confirmpassword" />
|
<a-input-password type="password"
|
||||||
|
:placeholder="$t('pleaseEnter') + $t('user.loginPassword')"
|
||||||
|
:maxLength="20"
|
||||||
|
v-model="model.password" />
|
||||||
|
</a-form-model-item>
|
||||||
|
|
||||||
|
<a-form-model-item :label="$t('user.confirmPassword')"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
prop="confirmpassword">
|
||||||
|
<a-input-password type="password"
|
||||||
|
@blur="handleConfirmBlur"
|
||||||
|
:maxLength="20"
|
||||||
|
:placeholder="$t('user.reenterLoginPassword')"
|
||||||
|
v-model="model.confirmpassword" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<a-form-model-item :label="$t('user.userName')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="realname">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter') + $t('user.userName')"
|
||||||
|
v-model="model.realname"
|
||||||
|
:maxLength="50"
|
||||||
|
:disabled="disableSubmit" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</template>
|
|
||||||
|
|
||||||
<a-form-model-item :label="$t('user.userName')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="realname">
|
<a-form-model-item :label="$t('user.post')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="post">
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('user.userName')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('user.post')"
|
||||||
v-model="model.realname"
|
v-model="model.post"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:disabled="disableSubmit" />
|
:disabled="disableSubmit" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
|
||||||
<a-form-model-item :label="$t('user.post')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="post">
|
<a-form-model-item :label="$t('user.roleAssignment')"
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('user.post')"
|
:labelCol="labelCol"
|
||||||
v-model="model.post"
|
:wrapperCol="wrapperCol"
|
||||||
:maxLength="50"
|
v-show="!roleDisabled">
|
||||||
:disabled="disableSubmit" />
|
<j-multi-select-tag
|
||||||
</a-form-model-item>
|
:disabled="disableSubmit"
|
||||||
|
v-model="model.selectedroles"
|
||||||
|
:options="rolesOptions"
|
||||||
|
:placeholder="$t('pleaseSelect') + $t('role')">
|
||||||
|
</j-multi-select-tag>
|
||||||
|
</a-form-model-item>
|
||||||
|
|
||||||
<a-form-model-item :label="$t('user.roleAssignment')" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled">
|
<!--部门分配-->
|
||||||
<j-multi-select-tag
|
<a-form-model-item :label="$t('user.departmentAllocation')"
|
||||||
:disabled="disableSubmit"
|
:labelCol="labelCol"
|
||||||
v-model="model.selectedroles"
|
:wrapperCol="wrapperCol"
|
||||||
:options="rolesOptions"
|
v-show="!departDisabled">
|
||||||
:placeholder="$t('pleaseSelect') + $t('role')">
|
<j-select-depart
|
||||||
</j-multi-select-tag>
|
:disabled="disableSubmit"
|
||||||
</a-form-model-item>
|
v-model="model.selecteddeparts"
|
||||||
|
:multi="true"
|
||||||
|
@back="backDepartInfo"
|
||||||
|
:backDepart="true"
|
||||||
|
:treeOpera="true">>
|
||||||
|
</j-select-depart>
|
||||||
|
</a-form-model-item>
|
||||||
|
|
||||||
<!--部门分配-->
|
<!--租户分配
|
||||||
<a-form-model-item :label="$t('user.departmentAllocation')" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
|
<a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
|
||||||
<j-select-depart
|
<j-multi-select-tag
|
||||||
:disabled="disableSubmit"
|
:disabled="disableSubmit"
|
||||||
v-model="model.selecteddeparts"
|
v-model="model.relTenantIds"
|
||||||
:multi="true"
|
:options="tenantsOptions"
|
||||||
@back="backDepartInfo"
|
placeholder="请选择租户">
|
||||||
:backDepart="true"
|
</j-multi-select-tag>
|
||||||
:treeOpera="true">>
|
</a-form-model-item>
|
||||||
</j-select-depart>
|
-->
|
||||||
</a-form-model-item>
|
|
||||||
|
|
||||||
<!--租户分配
|
<a-form-model-item :label="$t('user.identity')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
|
<a-radio-group v-model="model.userIdentity" @change="identityChange" :disabled="disableSubmit">
|
||||||
<j-multi-select-tag
|
<a-radio :value="1">{{ $t('user.ordinaryUsers') }}</a-radio>
|
||||||
:disabled="disableSubmit"
|
<a-radio :value="2">{{ $t('user.superior') }}</a-radio>
|
||||||
v-model="model.relTenantIds"
|
</a-radio-group>
|
||||||
:options="tenantsOptions"
|
</a-form-model-item>
|
||||||
placeholder="请选择租户">
|
<a-form-model-item :label="$t('user.responsibleDepartment')"
|
||||||
</j-multi-select-tag>
|
:labelCol="labelCol"
|
||||||
</a-form-model-item>
|
:wrapperCol="wrapperCol"
|
||||||
-->
|
v-if="departIdShow===true">
|
||||||
|
<j-multi-select-tag
|
||||||
|
:disabled="disableSubmit"
|
||||||
|
v-model="model.departIds"
|
||||||
|
:options="nextDepartOptions"
|
||||||
|
:placeholder="$t('pleaseSelect') + $t('user.responsibleDepartment')">
|
||||||
|
</j-multi-select-tag>
|
||||||
|
</a-form-model-item>
|
||||||
|
<!-- update--end--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
||||||
|
<!--手写章,用于企标制修订流程最后一个节点在线编辑的手写章信息维护-->
|
||||||
|
<a-form-model-item :label="$t('user.handStamp')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-image-upload class="avatar-uploader"
|
||||||
|
:text="$t('upload')"
|
||||||
|
v-model="model.avatar"
|
||||||
|
:disabled="disableSubmit"
|
||||||
|
:number=1
|
||||||
|
accept='.png,.PNG,.jpg,.JPG'></j-image-upload>
|
||||||
|
</a-form-model-item>
|
||||||
|
|
||||||
<a-form-model-item :label="$t('user.identity')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-model-item :label="$t('user.gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-radio-group v-model="model.userIdentity" @change="identityChange" :disabled="disableSubmit">
|
<a-select v-model="model.sex"
|
||||||
<a-radio :value="1">{{ $t('user.ordinaryUsers') }}</a-radio>
|
:placeholder="$t('pleaseSelect') + $t('user.gender')"
|
||||||
<a-radio :value="2">{{ $t('user.superior') }}</a-radio>
|
:getPopupContainer="(target) => target.parentNode"
|
||||||
</a-radio-group>
|
:disabled="disableSubmit">
|
||||||
</a-form-model-item>
|
<a-select-option :value="1">{{ $t('user.male') }}</a-select-option>
|
||||||
<a-form-model-item :label="$t('user.responsibleDepartment')"
|
<a-select-option :value="2">{{ $t('user.female') }}</a-select-option>
|
||||||
:labelCol="labelCol"
|
</a-select>
|
||||||
:wrapperCol="wrapperCol"
|
</a-form-model-item>
|
||||||
v-if="departIdShow===true">
|
|
||||||
<j-multi-select-tag
|
|
||||||
:disabled="disableSubmit"
|
|
||||||
v-model="model.departIds"
|
|
||||||
:options="nextDepartOptions"
|
|
||||||
:placeholder="$t('pleaseSelect') + $t('user.responsibleDepartment')">
|
|
||||||
</j-multi-select-tag>
|
|
||||||
</a-form-model-item>
|
|
||||||
<!-- update--end--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
|
||||||
<!--手写章,用于企标制修订流程最后一个节点在线编辑的手写章信息维护-->
|
|
||||||
<a-form-model-item :label="$t('user.handStamp')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
||||||
<j-image-upload class="avatar-uploader"
|
|
||||||
:text="$t('upload')"
|
|
||||||
v-model="model.avatar"
|
|
||||||
:disabled="disableSubmit"
|
|
||||||
:number=1
|
|
||||||
accept='.png,.PNG,.jpg,.JPG'></j-image-upload>
|
|
||||||
</a-form-model-item>
|
|
||||||
|
|
||||||
<a-form-model-item :label="$t('user.gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-model-item :label="$t('user.mailbox')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
|
||||||
<a-select v-model="model.sex"
|
<a-input :placeholder="$t('pleaseEnter') + $t('user.mailbox')"
|
||||||
:placeholder="$t('pleaseSelect') + $t('user.gender')"
|
v-model="model.email"
|
||||||
:getPopupContainer="(target) => target.parentNode"
|
:maxLength="50"
|
||||||
:disabled="disableSubmit">
|
:disabled="disableSubmit || !!model.id" />
|
||||||
<a-select-option :value="1">{{ $t('user.male') }}</a-select-option>
|
</a-form-model-item>
|
||||||
<a-select-option :value="2">{{ $t('user.female') }}</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-model-item>
|
|
||||||
|
|
||||||
<a-form-model-item :label="$t('user.mailbox')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
|
<a-form-model-item :label="$t('phoneNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('user.mailbox')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('phoneNumber')"
|
||||||
v-model="model.email"
|
:disabled="isDisabledAuth('user:form:phone') || disableSubmit || !!model.id"
|
||||||
:maxLength="50"
|
v-model="model.phone" />
|
||||||
:disabled="disableSubmit" />
|
</a-form-model-item>
|
||||||
</a-form-model-item>
|
|
||||||
|
|
||||||
<a-form-model-item :label="$t('phoneNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
|
<!-- <a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('phoneNumber')"
|
<!-- <j-dict-select-tag v-model="model.activitiSync" placeholder="请选择是否同步工作流引擎" :type="'radio'" dictCode="activiti_sync"/>-->
|
||||||
:disabled="isDisabledAuth('user:form:phone') || disableSubmit"
|
<!-- </a-form-model-item>-->
|
||||||
v-model="model.phone" />
|
|
||||||
</a-form-model-item>
|
|
||||||
|
|
||||||
<!-- <a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
</a-form-model>
|
||||||
<!-- <j-dict-select-tag v-model="model.activitiSync" placeholder="请选择是否同步工作流引擎" :type="'radio'" dictCode="activiti_sync"/>-->
|
</a-spin>
|
||||||
<!-- </a-form-model-item>-->
|
</div>
|
||||||
|
<div class="custom-drawer-style-bottom-btn" v-show="!disableSubmit">
|
||||||
</a-form-model>
|
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
|
||||||
</a-spin>
|
|
||||||
|
|
||||||
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
|
||||||
<a-popconfirm :title="$t('areYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')" :cancelText="$t('cancel')">
|
|
||||||
<a-button style="margin-right: .8rem">{{ $t('cancel') }}</a-button>
|
|
||||||
</a-popconfirm>
|
|
||||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -191,17 +195,37 @@ export default {
|
|||||||
disableSubmit: false,
|
disableSubmit: false,
|
||||||
dateFormat: 'YYYY-MM-DD',
|
dateFormat: 'YYYY-MM-DD',
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
username: [{ required: true, message: this.$t('pleaseEnter') + this.$t('user.userAccount') },
|
username: [
|
||||||
{ validator: this.validateUsername }],
|
{
|
||||||
password: [{
|
required: true,
|
||||||
required: true,
|
message: this.$t('pleaseEnter') + this.$t('user.userAccount')
|
||||||
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
},
|
||||||
message: this.$t('user.passwordConsists')
|
{ validator: this.validateUsername }
|
||||||
},
|
],
|
||||||
{ validator: this.validateToNextPassword, trigger: 'change' }],
|
password: [
|
||||||
confirmpassword: [{ required: true, message: this.$t('user.reenterLoginPassword') },
|
{
|
||||||
{ validator: this.compareToFirstPassword }],
|
required: true,
|
||||||
realname: [{ required: true, message: this.$t('pleaseEnter') + this.$t('user.userName') }],
|
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
||||||
|
message: this.$t('user.passwordConsists')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: this.validateToNextPassword,
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
confirmpassword: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('user.reenterLoginPassword')
|
||||||
|
},
|
||||||
|
{ validator: this.compareToFirstPassword }
|
||||||
|
],
|
||||||
|
realname: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('pleaseEnter') + this.$t('user.userName')
|
||||||
|
}
|
||||||
|
],
|
||||||
phone: [{ validator: this.validatePhone }],
|
phone: [{ validator: this.validatePhone }],
|
||||||
email: [{ validator: this.validateEmail }],
|
email: [{ validator: this.validateEmail }],
|
||||||
roles: {}
|
roles: {}
|
||||||
@@ -248,6 +272,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
add () {
|
add () {
|
||||||
this.refresh()
|
this.refresh()
|
||||||
|
this.validatorRules.phone = [{ validator: this.validatePhone }]
|
||||||
|
this.validatorRules.email = [{ validator: this.validateEmail }]
|
||||||
this.edit({ userIdentity: 1 })
|
this.edit({ userIdentity: 1 })
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
@@ -256,7 +282,10 @@ export default {
|
|||||||
that.visible = true
|
that.visible = true
|
||||||
// 根据屏幕宽度自适应抽屉宽度
|
// 根据屏幕宽度自适应抽屉宽度
|
||||||
this.resetScreenSize()
|
this.resetScreenSize()
|
||||||
that.model = Object.assign({}, { selectedroles: '', selecteddeparts: '' }, record)
|
that.model = Object.assign({}, {
|
||||||
|
selectedroles: '',
|
||||||
|
selecteddeparts: ''
|
||||||
|
}, record)
|
||||||
// 身份为上级显示负责部门,否则不显示
|
// 身份为上级显示负责部门,否则不显示
|
||||||
this.departIdShow = this.model.userIdentity === 2
|
this.departIdShow = this.model.userIdentity === 2
|
||||||
if (Object.prototype.hasOwnProperty.call(record, 'id')) {
|
if (Object.prototype.hasOwnProperty.call(record, 'id')) {
|
||||||
@@ -291,7 +320,10 @@ export default {
|
|||||||
getAction(this.url.queryTenantList).then(res => {
|
getAction(this.url.queryTenantList).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.tenantsOptions = res.result.map((item) => {
|
this.tenantsOptions = res.result.map((item) => {
|
||||||
return { label: item.name, value: item.id + '' }
|
return {
|
||||||
|
label: item.name,
|
||||||
|
value: item.id + ''
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -301,7 +333,10 @@ export default {
|
|||||||
queryall().then((res) => {
|
queryall().then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.rolesOptions = res.result.map((item) => {
|
this.rolesOptions = res.result.map((item) => {
|
||||||
return { label: item.roleName, value: item.id }
|
return {
|
||||||
|
label: item.roleName,
|
||||||
|
value: item.id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -335,7 +370,10 @@ export default {
|
|||||||
backDepartInfo (info) {
|
backDepartInfo (info) {
|
||||||
this.model.departIds = this.model.selecteddeparts
|
this.model.departIds = this.model.selecteddeparts
|
||||||
this.nextDepartOptions = info.map((item) => {
|
this.nextDepartOptions = info.map((item) => {
|
||||||
return { label: item.text, value: item.value + '' }
|
return {
|
||||||
|
label: item.text,
|
||||||
|
value: item.value + ''
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
refresh () {
|
refresh () {
|
||||||
@@ -357,7 +395,10 @@ export default {
|
|||||||
// 先拉取秘钥
|
// 先拉取秘钥
|
||||||
getRSAPublicKey().then(res => {
|
getRSAPublicKey().then(res => {
|
||||||
this.rsaPublicKey = res.result
|
this.rsaPublicKey = res.result
|
||||||
|
if (this.model.id) {
|
||||||
|
delete this.validatorRules.phone
|
||||||
|
delete this.validatorRules.email
|
||||||
|
}
|
||||||
// 触发表单验证
|
// 触发表单验证
|
||||||
this.$refs.form.validate(valid => {
|
this.$refs.form.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
align: 'left',
|
align: 'center',
|
||||||
width: 170
|
width: 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
treeColumn: [
|
treeColumn: [
|
||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
title: this.$t('system.tag.name'),
|
title: this.$t('system.tag.name'),
|
||||||
dataIndex: 'itemText',
|
dataIndex: 'itemText',
|
||||||
key: 'itemText',
|
key: 'itemText',
|
||||||
align: 'left',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
// 必须增加 为了过滤掉组件本身的插槽
|
// 必须增加 为了过滤掉组件本身的插槽
|
||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
title: this.$t('system.tag.name'),
|
title: this.$t('system.tag.name'),
|
||||||
dataIndex: 'itemText',
|
dataIndex: 'itemText',
|
||||||
key: 'itemText',
|
key: 'itemText',
|
||||||
align: 'left',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
v-model="queryParam.dbFieldTxt"></j-input>
|
v-model="queryParam.dbFieldTxt"></j-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<div style="float: right;overflow: hidden;margin-right: 12px" class="table-page-search-submitButtons">
|
||||||
<a-button icon="search" class="box-button" v-has="'tag:page'" style="margin-left: 8px" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
|
<a-button icon="search" class="box-button" v-has="'tag:page'" style="margin-left: 8px" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
|
||||||
<a-button icon="reload" class="box-button" @click="searchReset">{{ $t('reset') }}</a-button>
|
<a-button icon="reload" class="box-button" @click="searchReset">{{ $t('reset') }}</a-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -153,6 +153,8 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="less">
|
||||||
|
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||||
|
min-width: 65px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -20,8 +20,13 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<div style="float: right;overflow: hidden;margin-right: 12px" class="table-page-search-submitButtons">
|
||||||
<a-button icon="search" class="box-button" v-has="'tag:page'" style="margin-left: 8px" type="primary" @click="searchQuery">
|
<a-button icon="search"
|
||||||
|
class="box-button"
|
||||||
|
v-has="'tag:page'"
|
||||||
|
style="margin-left: 8px"
|
||||||
|
type="primary"
|
||||||
|
@click="searchQuery">
|
||||||
{{ $t('query') }}
|
{{ $t('query') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button icon="reload" class="box-button" @click="searchReset">{{ $t('reset') }}</a-button>
|
<a-button icon="reload" class="box-button" @click="searchReset">{{ $t('reset') }}</a-button>
|
||||||
@@ -33,9 +38,13 @@
|
|||||||
<!--新增-->
|
<!--新增-->
|
||||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'tag:add'">{{ $t('newlyAdded') }}</a-button>
|
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'tag:add'">{{ $t('newlyAdded') }}</a-button>
|
||||||
<!--展示区域管理-->
|
<!--展示区域管理-->
|
||||||
<a-button icon="unordered-list" type="primary" ghost @click="handleShow" v-has="'tag:area:list'">{{ $t('system.tag.exhibitionAreaManagement') }}</a-button>
|
<a-button icon="unordered-list" type="primary" ghost @click="handleShow" v-has="'tag:area:list'">
|
||||||
|
{{ $t('system.tag.exhibitionAreaManagement') }}
|
||||||
|
</a-button>
|
||||||
<!--批量删除-->
|
<!--批量删除-->
|
||||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'tag:logicDeleteBatch'">{{ $t('batchDelete') }}</a-button>
|
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'tag:logicDeleteBatch'">{{ $t('batchDelete')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -202,6 +211,8 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="less">
|
||||||
|
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||||
|
min-width: 65px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -191,6 +191,8 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="less">
|
||||||
|
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||||
|
min-width: 65px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user