update 用户管理-添加手写章
This commit is contained in:
@@ -20,6 +20,8 @@ const checkOnlyUser = (params) => getAction('/sys/user/checkOnlyUser', params)
|
||||
const changePassword = (params) => postAction('/sys/user/changePassword', params)
|
||||
// 单点登录获取用户信息
|
||||
const getSSOUserInfo = (params) => postAction('/iam/loginByOauth2', params)
|
||||
// 上传手写章
|
||||
const uploadHandStamp = (params) => postAction('/sys/user/uploadHandStamp', params)
|
||||
|
||||
// 权限管理
|
||||
const addPermission = (params) => postAction('/sys/permission/add', params)
|
||||
@@ -221,6 +223,7 @@ export {
|
||||
|
||||
getEnterpriseLevelMapList,
|
||||
getSSOUserInfo,
|
||||
uploadHandStamp,
|
||||
|
||||
addAsmsInterface,
|
||||
editAsmsInterface,
|
||||
|
||||
@@ -259,7 +259,8 @@ module.exports = {
|
||||
enterMailboxCorrect: '请输入正确格式的邮箱',
|
||||
userExists: '用户名已存在',
|
||||
workNoExists: '工号已存在',
|
||||
handStamp: '手写章'
|
||||
handStamp: '手写章',
|
||||
uploadHandStamp:'上传手写章'
|
||||
},
|
||||
// 高级查询
|
||||
superQuery: {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
|
||||
</a>
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{ $t('query') }}</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
||||
@@ -85,28 +85,28 @@
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<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="download" @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="roleAssignment">{{ $t('user.roleAllocation') }}</a-button>
|
||||
<a-dropdown v-if="isDev && selectedRowKeys.length > 0">
|
||||
<a-menu slot="overlay" @click="handleMenuClick">
|
||||
<a-menu-item key="1">
|
||||
<a-icon type="delete" @click="batchDel"/>
|
||||
<a-icon type="delete" @click="batchDel" />
|
||||
{{ $t('delete') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2">
|
||||
<a-icon type="lock" @click="batchFrozen('2')"/>
|
||||
<a-icon type="lock" @click="batchFrozen('2')" />
|
||||
{{ $t('user.frozen') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3">
|
||||
<a-icon type="unlock" @click="batchFrozen('1')"/>
|
||||
<a-icon type="unlock" @click="batchFrozen('1')" />
|
||||
{{ $t('user.thaw') }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px">
|
||||
{{ $t('batchOperation') }}
|
||||
<a-icon type="down"/>
|
||||
<a-icon type="down" />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!--<j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>-->
|
||||
@@ -129,12 +129,12 @@
|
||||
|
||||
<template v-slot:avatarslot="{text, record}">
|
||||
<div class="anty-img-wrap">
|
||||
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
|
||||
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:action="{text, record}" v-if="isDev">
|
||||
<a @click="handleEdit(record)" >{{ $t('edit') }}</a>
|
||||
<a @click="handleEdit(record)">{{ $t('edit') }}</a>
|
||||
|
||||
<a-divider type="vertical" />
|
||||
|
||||
@@ -173,6 +173,8 @@
|
||||
</template>
|
||||
<template v-slot:action="{text, record}" v-else>
|
||||
<a href="javascript:" @click="handleDetail(record)">{{ $t('details') }}</a>
|
||||
<a-divider type="vertical" v-has="'user:uploadHandStamp'" />
|
||||
<a @click="handleUploadHandStamp(record)" v-has="'user:uploadHandStamp'">{{ $t('user.uploadHandStamp') }}</a>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
@@ -183,12 +185,16 @@
|
||||
<password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
|
||||
|
||||
<!-- 用户回收站 -->
|
||||
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
|
||||
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk" />
|
||||
<!-- 角色配置 -->
|
||||
<!-- <j-modal title="角色配置" :width='650'>-->
|
||||
<role-assignment ref="roleAssignmentModal" :selectedRowKeysArray='selectedRowKeys' @ok="modalFormOk" @rolevisible='rolevisibleMethods'></role-assignment>
|
||||
<!-- </j-modal>-->
|
||||
<!-- <j-modal title="角色配置" :width='650'>-->
|
||||
<role-assignment ref="roleAssignmentModal"
|
||||
:selectedRowKeysArray='selectedRowKeys'
|
||||
@ok="modalFormOk"
|
||||
@rolevisible='rolevisibleMethods'></role-assignment>
|
||||
<!-- </j-modal>-->
|
||||
|
||||
<upload-hand-stamp-modal ref="uploadHandStampModal" @ok="modalFormOk" />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -204,6 +210,7 @@ import JInput from '@/components/jero/JInput'
|
||||
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
|
||||
import UploadHandStampModal from './modules/UploadHandStampModal'
|
||||
|
||||
export default {
|
||||
name: 'UserList',
|
||||
@@ -215,12 +222,13 @@ export default {
|
||||
JInput,
|
||||
UserRecycleBinModal,
|
||||
JTable,
|
||||
JSearchSelectTag
|
||||
JSearchSelectTag,
|
||||
UploadHandStampModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
// 是否开发环境(线上需隐藏按钮)
|
||||
isDev: process.env.VUE_APP_TAG_FLAG === '0',
|
||||
isDev: process.env.VUE_APP_TAG_FLAG !== '0',
|
||||
description: this.$t('user.freezePasManagementPage'),
|
||||
queryParam: {},
|
||||
recycleBinVisible: false,
|
||||
@@ -446,6 +454,13 @@ export default {
|
||||
rolevisibleMethods () {
|
||||
this.onClearSelected()
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
/**
|
||||
* 上传手写章
|
||||
* @param record
|
||||
*/
|
||||
handleUploadHandStamp (record) {
|
||||
this.$refs.uploadHandStampModal.edit(record)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,6 +468,7 @@ export default {
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="$t('user.uploadHandStamp')"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!--手写章-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('user.handStamp')">
|
||||
<j-image-upload class="avatar-uploader"
|
||||
:text="$t('upload')"
|
||||
v-decorator="['avatar', validatorRules.avatar]"
|
||||
:number=1
|
||||
accept='.png,.PNG,.jpg,.JPG'></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uploadHandStamp } from '../../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'UploadHandStampModal',
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('operation'),
|
||||
width: 400,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
model: {},
|
||||
form: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 手写章
|
||||
avatar: {
|
||||
rules: [{ required: true, message: this.$t('uploadFile.pleaseUpload') + this.$t('user.handStamp') }],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
edit (record) {
|
||||
this.visible = true
|
||||
this.model = Object.assign({}, record)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(this.model)
|
||||
})
|
||||
},
|
||||
handleOk () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
const formData = Object.assign({ id: this.model.id }, values)
|
||||
this.confirmLoading = true
|
||||
uploadHandStamp(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.close()
|
||||
that.$emit('ok')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.model = {}
|
||||
this.form.resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user