必填
This commit is contained in:
@@ -104,4 +104,7 @@
|
|||||||
.ant-layout {
|
.ant-layout {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
.ant-table-tbody > tr.ant-table-row-selected td{
|
||||||
|
background:transparent!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -316,32 +316,33 @@
|
|||||||
this.ruleList.forEach((res, index) => {
|
this.ruleList.forEach((res, index) => {
|
||||||
const rule = []
|
const rule = []
|
||||||
if (res.field_must_input == 0) {
|
if (res.field_must_input == 0) {
|
||||||
if (res.field_show_type === 'text') {
|
if (res.field_show_type === '1') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'CHECKBOX' || res.field_show_type === 'list_multi' ||
|
} else if (res.field_show_type === '4' || res.field_show_type === '6' ||
|
||||||
res.field_show_type === 'date' || res.field_show_type === 'file') {
|
res.field_show_type === '5' || res.field_show_type === '7'
|
||||||
|
) {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'NUMBER') {
|
} else if (res.field_show_type === '2') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'TEXTAREA') {
|
} else if (res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'RADIO' || res.field_show_type === 'list') {
|
} else if (res.field_show_type === '3') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
@@ -353,7 +354,6 @@
|
|||||||
rules[res.db_field_name] = rule
|
rules[res.db_field_name] = rule
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(rules)
|
|
||||||
this.$set(this, 'rules', rules)
|
this.$set(this, 'rules', rules)
|
||||||
this.isFormInline = true
|
this.isFormInline = true
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
|
|||||||
@@ -393,7 +393,7 @@
|
|||||||
}
|
}
|
||||||
/** 赋值给当前对应的表单文件 */
|
/** 赋值给当前对应的表单文件 */
|
||||||
this.formInline[this.uploadName] = attIdList.join(',')
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = {...this.formInline }
|
||||||
},
|
},
|
||||||
handleInput(value) {
|
handleInput(value) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -407,32 +407,33 @@
|
|||||||
this.ruleList.forEach((res, index) => {
|
this.ruleList.forEach((res, index) => {
|
||||||
const rule = []
|
const rule = []
|
||||||
if (res.field_must_input == 0) {
|
if (res.field_must_input == 0) {
|
||||||
if (res.field_show_type === 'text') {
|
if (res.field_show_type === '1') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'CHECKBOX' || res.field_show_type === 'list_multi' ||
|
} else if (res.field_show_type === '4' || res.field_show_type === '6' ||
|
||||||
res.field_show_type === 'date' || res.field_show_type === 'file') {
|
res.field_show_type === '5' || res.field_show_type === '7'
|
||||||
|
) {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'NUMBER') {
|
} else if (res.field_show_type === '2') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'TEXTAREA') {
|
} else if (res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'RADIO' || res.field_show_type === 'list') {
|
} else if (res.field_show_type === '3') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
|
|||||||
@@ -1,181 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-row :gutter="10">
|
<a-card :bordered="false">
|
||||||
<a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
|
<!-- 查询区域 -->
|
||||||
<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-row :gutter="24">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-col :md="6" :sm="8">
|
||||||
<a-row :gutter="24">
|
<a-form-item :label="$t('roleName')">
|
||||||
<a-col :md="12" :sm="8">
|
<a-input placeholder="" v-model="queryParam.roleName"></a-input>
|
||||||
<a-form-item :label="$t('roleName')" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
</a-form-item>
|
||||||
<a-input placeholder="" v-model="queryParam.roleName"></a-input>
|
</a-col>
|
||||||
</a-form-item>
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
</a-col>
|
<a-col :md="6" :sm="24">
|
||||||
<!--
|
<a-button type="primary" @click="searchQuery" icon="search"
|
||||||
<a-col :md="11" :sm="12">
|
style="margin-left: 21px">{{$t('query')}}</a-button>
|
||||||
<a-form-item label="创建时间" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
<a-button type="primary" @click="searchReset" icon="reload"
|
||||||
<j-date v-model="queryParam.createTime_begin" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss" style="width:45%" placeholder="请选择开始时间" ></j-date>
|
style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||||
<span style="width: 10px;">~</span>
|
|
||||||
<j-date v-model="queryParam.createTime_end" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss" style="width:45%" placeholder="请选择结束时间"></j-date>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
-->
|
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
||||||
<a-col :md="12" :sm="24">
|
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">{{$t('query')}}</a-button>
|
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
</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('newRole')}}</a-button>
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus">{{$t('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">-->
|
||||||
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
|
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
|
||||||
</a-upload>
|
<!-- </a-upload>-->
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls($t('RoleManagement'))">{{$t('export')}}</a-button>
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls($t('RoleManagement'))">{{$t('export')}}</a-button>-->
|
||||||
</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 class="anticon anticon-info-circle ant-alert-icon">-->
|
||||||
</i> {{$t('selected')}} <a><b>{{ selectedRowKeys1.length }}</b></a>{{$t('term')}}
|
<!-- </i> {{$t('selected')}} <a><b>{{ selectedRowKeys1.length }}</b></a>{{$t('term')}}-->
|
||||||
<a style="margin-left: 24px" @click="onClearSelected1">{{$t('empty')}}</a>
|
<!-- <a style="margin-left: 24px" @click="onClearSelected1">{{$t('empty')}}</a>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<a-table
|
<a-table
|
||||||
style="height:500px"
|
ref="table"
|
||||||
ref="table"
|
:columns="columns"
|
||||||
size="middle"
|
:dataSource="dataSource"
|
||||||
bordered
|
:pagination="ipagination"
|
||||||
rowKey="id"
|
:loading="loading"
|
||||||
:columns="columns"
|
@change="handleTableChange">
|
||||||
:dataSource="dataSource"
|
</a-table>
|
||||||
:pagination="ipagination"
|
</div>
|
||||||
:loading="loading"
|
<!-- 右侧的角色权限配置 -->
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
|
<user-role-modal ref="modalUserRole"></user-role-modal>
|
||||||
@change="handleTableChange">
|
<role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
|
||||||
<span slot="action" slot-scope="text, record">
|
</a-card>
|
||||||
<a @click="handleOpen(record)">{{$t('user')}}</a>
|
|
||||||
<a-divider type="vertical"/>
|
|
||||||
|
|
||||||
<a-dropdown>
|
|
||||||
<a class="ant-dropdown-link">
|
|
||||||
{{$t('more')}} <a-icon type="down"/>
|
|
||||||
</a>
|
|
||||||
<a-menu slot="overlay">
|
|
||||||
<a-menu-item>
|
|
||||||
<a @click="handlePerssion(record.id)">{{$t('toGrantAuthorization')}}</a>
|
|
||||||
</a-menu-item>
|
|
||||||
<a-menu-item>
|
|
||||||
<a @click="handleEdit(record)">{{$t('edit')}}</a>
|
|
||||||
</a-menu-item>
|
|
||||||
<a-menu-item>
|
|
||||||
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete1(record.id)">
|
|
||||||
<a>{{$t('delete')}}</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</a-dropdown>
|
|
||||||
</span>
|
|
||||||
</a-table>
|
|
||||||
</div>
|
|
||||||
<!-- 右侧的角色权限配置 -->
|
|
||||||
<user-role-modal ref="modalUserRole"></user-role-modal>
|
|
||||||
<role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
|
|
||||||
<a-card :bordered="false">
|
|
||||||
<div style="text-align: right;">
|
|
||||||
<a-icon type="close-circle" @click="hideUserList" />
|
|
||||||
</div>
|
|
||||||
<!-- 查询区域 -->
|
|
||||||
<div class="table-page-search-wrapper">
|
|
||||||
<a-form layout="inline">
|
|
||||||
<a-row :gutter="24">
|
|
||||||
|
|
||||||
<a-col :md="12" :sm="12">
|
|
||||||
<a-form-item :label="$t('userAccount')">
|
|
||||||
<a-input placeholder="" v-model="queryParam2.username"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
||||||
<a-col :md="9" :sm="24">
|
|
||||||
<a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">{{$t('query')}}</a-button>
|
|
||||||
<a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
|
||||||
|
|
||||||
</a-col>
|
|
||||||
</span>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</div>
|
|
||||||
<!-- 操作按钮区域 -->
|
|
||||||
<div class="table-operator" :md="24" :sm="24">
|
|
||||||
<a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</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">{{$t('ExistingUsers')}}</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>
|
|
||||||
<!-- table区域-begin -->
|
|
||||||
<div>
|
|
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
||||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{
|
|
||||||
selectedRowKeys2.length }}</a>{{$t('term')}}
|
|
||||||
<a style="margin-left: 24px" @click="onClearSelected2">{{$t('empty')}}</a>
|
|
||||||
</div>
|
|
||||||
<a-table
|
|
||||||
style="height:500px"
|
|
||||||
ref="table2"
|
|
||||||
bordered
|
|
||||||
size="middle"
|
|
||||||
rowKey="id"
|
|
||||||
:columns="columns2"
|
|
||||||
:dataSource="dataSource2"
|
|
||||||
:pagination="ipagination2"
|
|
||||||
:loading="loading2"
|
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
|
|
||||||
@change="handleTableChange2">
|
|
||||||
<span slot="action" slot-scope="text, record">
|
|
||||||
<a @click="handleEdit2(record)">{{$t('edit')}}</a>
|
|
||||||
<a-divider type="vertical"/>
|
|
||||||
<a-dropdown>
|
|
||||||
<a class="ant-dropdown-link">
|
|
||||||
更多 <a-icon type="down"/>
|
|
||||||
</a>
|
|
||||||
<a-menu slot="overlay">
|
|
||||||
<a-menu-item>
|
|
||||||
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete2(record.id)">
|
|
||||||
<a>{{$t('delete')}}</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</a-dropdown>
|
|
||||||
</span>
|
|
||||||
</a-table>
|
|
||||||
</div>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
|
|
||||||
<user-modal ref="modalForm2" @ok="modalFormOk2"></user-modal>
|
|
||||||
<Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
@@ -211,18 +86,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizeOptions: ['10', '20', '30'],
|
pageSizeOptions: ['10', '20', '30'],
|
||||||
showTotal: (total, range) => {
|
showTotal: (total, range) => {
|
||||||
return range[0] + '-' + range[1] + ' '+this.$t('total') + total + this.$t('strip')
|
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
||||||
},
|
|
||||||
showQuickJumper: true,
|
|
||||||
showSizeChanger: true,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
ipagination2: {
|
|
||||||
current: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
pageSizeOptions: ['10', '20', '30'],
|
|
||||||
showTotal: (total, range) => {
|
|
||||||
return range[0] + '-' + range[1] + ' '+this.$t('total') + total + this.$t('strip')
|
|
||||||
},
|
},
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
@@ -232,10 +96,6 @@
|
|||||||
column: 'createTime',
|
column: 'createTime',
|
||||||
order: 'desc'
|
order: 'desc'
|
||||||
},
|
},
|
||||||
isorter2: {
|
|
||||||
column: 'createTime',
|
|
||||||
order: 'desc'
|
|
||||||
},
|
|
||||||
filters1: {},
|
filters1: {},
|
||||||
filters2: {},
|
filters2: {},
|
||||||
loading1: false,
|
loading1: false,
|
||||||
@@ -244,8 +104,8 @@
|
|||||||
selectedRowKeys2: [],
|
selectedRowKeys2: [],
|
||||||
selectionRows1: [],
|
selectionRows1: [],
|
||||||
selectionRows2: [],
|
selectionRows2: [],
|
||||||
test:{},
|
test: {},
|
||||||
rightcolval:0,
|
rightcolval: 0,
|
||||||
columns:
|
columns:
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -261,48 +121,19 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('createTime'),
|
title: this.$t('createTime'),
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
align:"center",
|
align: 'center',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return moment(text).format('YYYY-MM-DD')
|
return moment(text).format('YYYY-MM-DD')
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('operation'),
|
|
||||||
dataIndex: 'action',
|
|
||||||
align: 'center',
|
|
||||||
scopedSlots: { customRender: 'action' }
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// title: this.$t('operation'),
|
||||||
|
// dataIndex: 'action',
|
||||||
|
// align: 'center',
|
||||||
|
// scopedSlots: { customRender: 'action' }
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
columns2: [{
|
|
||||||
title: this.$t('userAccount'),
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'username',
|
|
||||||
width: 120
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('userName'),
|
|
||||||
align: 'center',
|
|
||||||
width: 100,
|
|
||||||
dataIndex: 'realname'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('status'),
|
|
||||||
align: 'center',
|
|
||||||
width: 80,
|
|
||||||
dataIndex: 'status_dictText'
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: this.$t('operation'),
|
|
||||||
dataIndex: 'action',
|
|
||||||
scopedSlots: { customRender: 'action' },
|
|
||||||
align: 'center',
|
|
||||||
width: 120
|
|
||||||
}],
|
|
||||||
|
|
||||||
// 高级查询参数
|
|
||||||
superQueryParams2: '',
|
|
||||||
// 高级查询拼接条件
|
// 高级查询拼接条件
|
||||||
superQueryMatchType2: 'and',
|
superQueryMatchType2: 'and',
|
||||||
url: {
|
url: {
|
||||||
@@ -329,27 +160,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSelectChange2(selectedRowKeys, selectionRows) {
|
|
||||||
this.selectedRowKeys2 = selectedRowKeys
|
|
||||||
this.selectionRows2 = selectionRows
|
|
||||||
},
|
|
||||||
onClearSelected2() {
|
onClearSelected2() {
|
||||||
this.selectedRowKeys2 = []
|
this.selectedRowKeys2 = []
|
||||||
this.selectionRows2 = []
|
this.selectionRows2 = []
|
||||||
},
|
},
|
||||||
onClearSelected1() {
|
|
||||||
this.selectedRowKeys1 = []
|
|
||||||
this.selectionRows1 = []
|
|
||||||
},
|
|
||||||
onSelectChange1(selectedRowKeys, selectionRows) {
|
|
||||||
this.rightcolval = 1
|
|
||||||
this.selectedRowKeys1 = selectedRowKeys
|
|
||||||
this.selectionRows1 = selectionRows
|
|
||||||
this.model1 = Object.assign({}, selectionRows[0])
|
|
||||||
console.log(this.model1)
|
|
||||||
this.currentRoleId = selectedRowKeys[0]
|
|
||||||
this.loadData2()
|
|
||||||
},
|
|
||||||
onClearSelected() {
|
onClearSelected() {
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -504,14 +318,7 @@
|
|||||||
this.onClearSelected2()
|
this.onClearSelected2()
|
||||||
this.loadData2()
|
this.loadData2()
|
||||||
},
|
},
|
||||||
/*handleEdit: function(record) {
|
|
||||||
if (this.currentRoleId == '') {
|
|
||||||
this.$message.error('请选择一个角色!')
|
|
||||||
} else {
|
|
||||||
this.$refs.modalForm.edit(record)
|
|
||||||
this.$refs.modalForm.title = '编辑'
|
|
||||||
}
|
|
||||||
},*/
|
|
||||||
searchQuery2() {
|
searchQuery2() {
|
||||||
this.loadData2(1)
|
this.loadData2(1)
|
||||||
},
|
},
|
||||||
@@ -529,13 +336,13 @@
|
|||||||
this.ipagination2 = pagination
|
this.ipagination2 = pagination
|
||||||
this.loadData2()
|
this.loadData2()
|
||||||
},
|
},
|
||||||
hideUserList(){
|
hideUserList() {
|
||||||
//this.rightcolval = 0
|
//this.rightcolval = 0
|
||||||
this.selectedRowKeys1 = []
|
this.selectedRowKeys1 = []
|
||||||
},
|
},
|
||||||
handlePerssion(roleId){
|
handlePerssion(roleId) {
|
||||||
this.$refs.modalUserRole.show(roleId);
|
this.$refs.modalUserRole.show(roleId)
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -64,46 +64,18 @@
|
|||||||
|
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" style="border-top: 5px">
|
<div class="table-operator" style="border-top: 5px">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus" >{{$t('addUser')}}</a-button>
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus" >{{$t('addUser')}}</a-button>-->
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls($t('userInformation'))">{{$t('export')}}</a-button>
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls($t('userInformation'))">{{$t('export')}}</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">-->
|
||||||
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
|
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
|
||||||
</a-upload>
|
<!-- </a-upload>-->
|
||||||
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>
|
<!-- <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>-->
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
||||||
<a-menu slot="overlay" @click="handleMenuClick">
|
|
||||||
<a-menu-item key="1">
|
|
||||||
<a-icon type="delete" @click="batchDel"/>
|
|
||||||
{{$t('delete')}}
|
|
||||||
</a-menu-item>
|
|
||||||
<a-menu-item key="2">
|
|
||||||
<a-icon type="lock" @click="batchFrozen('2')"/>
|
|
||||||
{{$('frozen')}}
|
|
||||||
</a-menu-item>
|
|
||||||
<a-menu-item key="3">
|
|
||||||
<a-icon type="unlock" @click="batchFrozen('1')"/>
|
|
||||||
{{$t('thaw')}}
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
<a-button style="margin-left: 8px">
|
|
||||||
{{$t('batchOperation')}}
|
|
||||||
<a-icon type="down"/>
|
|
||||||
</a-button>
|
|
||||||
</a-dropdown>
|
|
||||||
<j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
||||||
<i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}} <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>{{$t('term')}}
|
|
||||||
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
bordered
|
|
||||||
size="middle"
|
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
@@ -117,47 +89,6 @@
|
|||||||
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
|
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span slot="action" slot-scope="text, record">
|
|
||||||
<a @click="handleEdit(record)" >{{$t('edit')}}</a>
|
|
||||||
|
|
||||||
<a-divider type="vertical"/>
|
|
||||||
|
|
||||||
<a-dropdown>
|
|
||||||
<a class="ant-dropdown-link">
|
|
||||||
{{$t('more')}} <a-icon type="down"/>
|
|
||||||
</a>
|
|
||||||
<a-menu slot="overlay">
|
|
||||||
<a-menu-item>
|
|
||||||
<a href="javascript:;" @click="handleDetail(record)">{{$t('details')}}</a>
|
|
||||||
</a-menu-item>
|
|
||||||
|
|
||||||
<a-menu-item>
|
|
||||||
<a href="javascript:;" @click="handleChangePassword(record.username)">{{$t('password')}}</a>
|
|
||||||
</a-menu-item>
|
|
||||||
|
|
||||||
<a-menu-item>
|
|
||||||
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete(record.id)">
|
|
||||||
<a>{{$t('delete')}}</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</a-menu-item>
|
|
||||||
|
|
||||||
<a-menu-item v-if="record.status==1">
|
|
||||||
<a-popconfirm :title="$t('freezePassword')" @confirm="() => handleFrozen(record.id,2,record.username)">
|
|
||||||
<a>{{$t('frozen')}}</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</a-menu-item>
|
|
||||||
|
|
||||||
<a-menu-item v-if="record.status==2">
|
|
||||||
<a-popconfirm :title="$t('youThaw')" @confirm="() => handleFrozen(record.id,1,record.username)">
|
|
||||||
<a>{{$t('thaw')}}</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</a-dropdown>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-end -->
|
<!-- table区域-end -->
|
||||||
@@ -202,19 +133,12 @@
|
|||||||
title: this.$t('serialNumber'),
|
title: this.$t('serialNumber'),
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key:'rowIndex',
|
key:'rowIndex',
|
||||||
width:60,
|
width:20,
|
||||||
align:"center",
|
align:"center",
|
||||||
customRender:function (t,r,index) {
|
customRender:function (t,r,index) {
|
||||||
return parseInt(index)+1;
|
return parseInt(index)+1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// title: '头像',
|
|
||||||
// align: "center",
|
|
||||||
// width: 120,
|
|
||||||
// dataIndex: 'avatar',
|
|
||||||
// scopedSlots: {customRender: "avatarslot"}
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
title: this.$t('userAccount'),
|
title: this.$t('userAccount'),
|
||||||
align: "center",
|
align: "center",
|
||||||
@@ -265,13 +189,13 @@
|
|||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'status_dictText'
|
dataIndex: 'status_dictText'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: this.$t('operation'),
|
// title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
// dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'},
|
// scopedSlots: {customRender: 'action'},
|
||||||
align: "center",
|
// align: "center",
|
||||||
width: 170
|
// width: 170
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
superQueryFieldList: [
|
superQueryFieldList: [
|
||||||
{ type: 'input', value: 'username', text: this.$t('userAccount'), },
|
{ type: 'input', value: 'username', text: this.$t('userAccount'), },
|
||||||
|
|||||||
Reference in New Issue
Block a user