JeecgBoot 3.3.0 版本发布,基于代码生成器的企业级低代码平台

This commit is contained in:
zhangdaiscott
2022-07-20 18:09:53 +08:00
parent 55201e82eb
commit 0cbdc092d1
275 changed files with 7013 additions and 40279 deletions

View File

@ -538,6 +538,7 @@
superQuery: {
fieldList: [
{ type: 'input', value: 'name', text: '姓名', },
{ type: 'switch', value: 'switch', text: '开关', },
{ type: 'select', value: 'sex', text: '性别', dictCode: 'sex' },
{ type: 'number', value: 'age', text: '年龄', },
{

View File

@ -24,7 +24,7 @@
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="模板类型">
<a-input placeholder="输入模板类型" v-model="queryParam.templateType"></a-input>
<j-dict-select-tag placeholder="选择模板类型" v-model="queryParam.templateType" dictCode="msgType"></j-dict-select-tag>
</a-form-item>
</a-col>
</template>
@ -51,7 +51,7 @@
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
@ -61,7 +61,7 @@
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</a-dropdown>-->
</div>
<!-- table区域-begin -->
@ -91,14 +91,21 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleMyEdit(record)">编辑</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="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a @click="handleUse(record)">应用</a>
</a-menu-item>
<a-menu-item>
<a @click="handleNotUse(record)">停用</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
@ -125,14 +132,19 @@
import SysMessageTestModal from './modules/SysMessageTestModal'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import JEllipsis from "@/components/jeecg/JEllipsis";
import {httpAction} from '@/api/manage'
import { deleteAction } from '@/api/manage'
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
export default {
name: "SysMessageTemplateList",
mixins: [JeecgListMixin],
components: {
JEllipsis,
SysMessageTemplateModal,
SysMessageTestModal
SysMessageTestModal,
JDictSelectTag
},
data() {
return {
@ -171,16 +183,22 @@
dataIndex: 'templateType',
customRender: function (text) {
if(text=='1') {
return "短信";
return "文本";
}
if(text=='2') {
return "邮件";
return "富文本";
}
if(text=='3') {
return "微信";
}
if(text=='4') {
return "系统";
}
},
{
title: '是否应用',
align: "center",
dataIndex: 'useStatus',
customRender: function (text) {
if(text=='1') {
return "";
}else{
return '否'
}
}
},
@ -209,8 +227,60 @@
handleTest(record){
this.$refs.testModal.open(record);
this.$refs.testModal.title = "发送测试";
}
},
//update-begin-author:taoyan date:2022-7-8 for: 修改应用状态
updateUseStatus(record, useStatus){
let formData = {
id: record.id, useStatus: useStatus
}
httpAction("/sys/message/sysMessageTemplate/edit", formData, 'put').then((res) => {
if (res.success) {
this.$message.success(res.message);
} else {
this.$message.warning(res.message);
}
}).finally(() => {
this.loadData()
})
},
handleUse(record){
this.updateUseStatus(record, '1')
},
handleNotUse(record){
this.updateUseStatus(record, '0')
},
handleMyEdit(record){
if(record.useStatus == '1'){
this.$message.warning('此模板已被应用,禁止编辑!');
}else{
this.handleEdit(record);
}
},
//update-end-author:taoyan date:2022-7-8 for: 修改应用状态
handleDelete: function (record) {
if(!this.url.delete){
this.$message.error("请设置url.delete属性!")
return
}
if(record.useStatus=='1'){
this.$message.error("该模板已被应用禁止删除!")
return
}
let id = record.id;
var that = this;
deleteAction(that.url.delete, {id: id}).then((res) => {
if (res.success) {
//重新计算分页问题
that.reCalculatePage(1)
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
}
}
</script>

View File

@ -50,6 +50,17 @@
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24" >
<a-col :span="24" pull="2">
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="是否应用"
style="margin-left: -15px">
<j-switch v-decorator="['useStatus', validatorRules.useStatus]" :options="['1', '0']"></j-switch>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :span="24" pull="4">
<a-form-item
@ -85,11 +96,13 @@
import pick from 'lodash.pick'
import { duplicateCheck } from '@/api/api'
import JEditor from '@/components/jeecg/JEditor'
import JSwitch from '@/components/jeecg/JSwitch'
export default {
name: "SysMessageTemplateModal",
components:{
JEditor
JEditor,
JSwitch
},
data() {
return {
@ -111,6 +124,7 @@
templateCode: {rules: [{required: true, message: '请输入模板CODE!' },{validator: this.validateTemplateCode}]},
templateName: {rules: [{required: true, message: '请输入模板标题!'}]},
templateContent: {rules: []},
useStatus:{rules: []},
templateType: {rules: [{required: true, message: '请输入模板类型!'}]},
},
url: {
@ -140,9 +154,9 @@
this.visible = true;
this.$nextTick(() => {
if(this.useEditor){
this.form.setFieldsValue(pick(this.model, 'templateCode', 'templateName', 'templateTestJson', 'templateType'))
this.form.setFieldsValue(pick(this.model, 'useStatus', 'templateCode', 'templateName', 'templateTestJson', 'templateType'))
}else{
this.form.setFieldsValue(pick(this.model, 'templateCode', 'templateContent', 'templateName', 'templateTestJson', 'templateType'))
this.form.setFieldsValue(pick(this.model, 'useStatus', 'templateCode', 'templateContent', 'templateName', 'templateTestJson', 'templateType'))
}
});
},

View File

@ -34,14 +34,15 @@
label="消息类型">
<j-dict-select-tag
v-model="msgType"
type="radio"
placeholder="请选择消息类型"
dictCode="msgType"/>
dictCode="messageType"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="消息接收方">
<a-input placeholder="输入消息接收方" v-model="receiver"/>
<j-select-user-by-dep placeholder="选择消息接收方" v-model="receiver"></j-select-user-by-dep>
</a-form-item>
</a-form>
</a-spin>
@ -50,9 +51,13 @@
<script>
import {httpAction} from '@/api/manage'
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
export default {
name: "SysMessageTestModal",
components:{
JSelectUserByDep
},
data() {
return {
title: "操作",
@ -74,7 +79,7 @@
templateName: "",
templateContent: "",
receiver: "",
msgType: "",
msgType: "system",
testData: "",
sendParams: {}
}
@ -89,7 +94,7 @@
},
close() {
this.receiver = "";
this.msgType = "";
this.msgType = "system";
this.sendParams = {};
this.visible = false;
},

View File

@ -110,10 +110,13 @@
</a-radio-group>
</template>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门负责人">
<j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
<a-input-number v-model="model.departOrder" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号" prop="mobile">
<a-input placeholder="请输入手机号" v-model="model.mobile" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="地址">
@ -149,6 +152,7 @@
import {httpAction, deleteAction} from '@/api/manage'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import DepartAuthModal from './modules/DepartAuthModal'
import Vue from 'vue'
// 表头
const columns = [
{
@ -236,7 +240,7 @@
departName: [{required: true, message: '请输入机构/部门名称!'}],
orgCode: [{required: true, message: '请输入机构编码!'}],
orgCategory:[{required: true, message: '请输入机构类型!'}],
mobile:[{validator: this.validateMobile}]
mobile: Vue.prototype.rules.mobile2
},
url: {
delete: '/sys/sysDepart/delete',
@ -246,6 +250,7 @@
importExcelUrl: "sys/sysDepart/importExcel",
},
orgCategoryDisabled:false,
oldDirectorUserIds:""
}
},
computed: {
@ -394,7 +399,13 @@
this.model.parentId = record.parentId
this.setValuesToForm(record)
this.$refs.departAuth.show(record.id);
this.oldDirectorUserIds = record.directorUserIds
//update-beign-author:taoyan date:20220316 for: VUEN-329【bug】为什么不是失去焦点的时候触发手机号校验
this.$nextTick(()=>{
this.$refs.form.validateField('mobile')
})
//update-end-author:taoyan date:20220316 for: VUEN-329【bug】为什么不是失去焦点的时候触发手机号校验
},
// 触发onSelect事件时,为部门树右侧的form表单赋值
setValuesToForm(record) {
@ -431,6 +442,10 @@
return
}
//update-begin---author:wangshuai ---date:20200308 for[JTC-119]在部门管理菜单下设置部门负责人
this.currSelected.oldDirectorUserIds = this.oldDirectorUserIds
//update-end---author:wangshuai ---date:20200308 for[JTC-119]在部门管理菜单下设置部门负责人
httpAction(this.url.edit, this.currSelected, 'put').then((res) => {
if (res.success) {
this.$message.success('保存成功!')

View File

@ -105,6 +105,9 @@
</a-radio-group>
</template>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门负责人">
<j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序" prop="departOrder">
<a-input-number v-model="model.departOrder"/>
</a-form-model-item>
@ -146,6 +149,7 @@
import DepartAuthModal from './modules/DepartAuthModal'
import { cloneObject } from '@/utils/util'
import JThirdAppButton from '@comp/jeecgbiz/thirdApp/JThirdAppButton'
import Vue from 'vue'
// 表头
const columns = [
{
@ -239,7 +243,7 @@
departName: [{required: true, message: '请输入机构/部门名称!'}],
orgCode: [{required: true, message: '请输入机构编码!'}],
orgCategory: [{required: true, message: '请输入机构类型!'}],
mobile: [{validator: this.validateMobile}]
mobile: Vue.prototype.rules.mobile2
},
url: {
delete: '/sys/sysDepart/delete',
@ -249,6 +253,7 @@
importExcelUrl: "sys/sysDepart/importExcel",
},
orgCategoryDisabled:false,
oldDirectorUserIds:"" //旧的负责人id
}
},
computed: {
@ -435,7 +440,15 @@
this.model.parentId = record.parentId
this.setValuesToForm(record)
this.$refs.departAuth.show(record.id);
//update-begin---author:wangshuai ---date:20220316 for[JTC-119]在部门管理菜单下设置部门负责人
this.oldDirectorUserIds = record.directorUserIds
//update-end---author:wangshuai ---date:20220316 for[JTC-119]在部门管理菜单下设置部门负责人
//update-beign-author:taoyan date:20220316 for: VUEN-329【bug】为什么不是失去焦点的时候触发手机号校验
this.$nextTick(()=>{
this.$refs.form.validateField('mobile')
})
//update-end-author:taoyan date:20220316 for: VUEN-329【bug】为什么不是失去焦点的时候触发手机号校验
},
// 触发onSelect事件时,为部门树右侧的form表单赋值
setValuesToForm(record) {
@ -478,6 +491,9 @@
let formData = Object.assign(this.currSelected, this.model)
console.log('Received values of form: ', formData)
//update-begin---author:wangshuai ---date:20220316 for[JTC-119]在部门管理菜单下设置部门负责人
formData.oldDirectorUserIds = this.oldDirectorUserIds
//update-end---author:wangshuai ---date:20220316 for[JTC-119]在部门管理菜单下设置部门负责人
httpAction(this.url.edit, formData, 'put').then((res) => {
if (res.success) {
this.$message.success('保存成功!')
@ -598,16 +614,6 @@
}
},
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
// 验证手机号
validateMobile(rule,value,callback){
if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)){
callback();
}else{
callback("您的手机号码格式不正确!");
}
},
onSyncFinally({isToLocal}) {
// 同步到本地时刷新下数据
if (isToLocal) {

View File

@ -63,7 +63,6 @@
<a @click="handleOpen(record)">用户</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
@ -125,7 +124,7 @@
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
删除
取消关联
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
@ -161,8 +160,8 @@
</a>
<a-menu slot="overlay">
<a-menu-item>
<a-popconfirm title="确定删除?" @confirm="() => handleDelete2(record.id)">
<a>删除</a>
<a-popconfirm title="确定取消关联?" @confirm="() => handleDelete2(record.id)">
<a>取消关联</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
@ -453,7 +452,7 @@
var that = this
console.log(this.currentDeptId)
this.$confirm({
title: '确认删除',
title: '确认取消关联',
content: '是否删除选中数据?',
onOk: function() {
deleteAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => {

View File

@ -115,7 +115,7 @@
align:"center",
dataIndex: 'id'
},
{
/*{
title:'开始时间',
align:"center",
dataIndex: 'beginDate'
@ -124,7 +124,7 @@
title:'结束时间',
align:"center",
dataIndex: 'endDate'
},
},*/
{
title:'状态',
align:"center",

View File

@ -66,7 +66,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="border-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
@ -156,10 +156,6 @@
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -378,10 +374,6 @@
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
handleAgentSettings(username){
this.$refs.sysUserAgentModal.agentSettings(username);
this.$refs.sysUserAgentModal.title = "用户代理人设置";
},
passwordModalOk() {
//TODO 密码修改完成 不需要刷新页面可以把datasource中的数据更新一下
},

View File

@ -53,6 +53,9 @@
</a-radio-group>
</template>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门负责人">
<j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"

View File

@ -281,6 +281,10 @@
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.departDisabled = true;
this.$refs.modalForm.disableSubmit = false;
//update-begin---author:wangshuai ---date:20220315 for[issues/3472]给新建用户赋予角色的逻辑漏洞------------
//部门中角色信息隐藏掉
this.$refs.modalForm.roleDisabled = true
//update-end---author:wangshuai ---date:20220315 for[issues/3472]给新建用户赋予角色的逻辑漏洞------------
this.$refs.modalForm.edit(record);
},
handleAdd: function () {
@ -288,6 +292,10 @@
this.$message.error("请选择一个部门!")
} else {
this.$refs.modalForm.departDisabled = true;
//update-begin---author:wangshuai ---date:20220315 for[issues/3472]给新建用户赋予角色的逻辑漏洞------------
//部门中角色信息隐藏掉
this.$refs.modalForm.roleDisabled = true
//update-end---author:wangshuai ---date:20220315 for[issues/3472]给新建用户赋予角色的逻辑漏洞------------
//初始化负责部门
this.$refs.modalForm.nextDepartOptions=[{value:this.currentDept.key,label:this.currentDept.title}]
this.$refs.modalForm.title = "新增";

View File

@ -164,7 +164,7 @@
param.id = this.model.id
}
if(value){
let reg=new RegExp("[`_~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]")
let reg=new RegExp("[`~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]")
if(reg.test(value)){
callback("数据值不能包含特殊字符!")
}else{

View File

@ -99,7 +99,7 @@
edit: "/sys/annountCement/edit",
},
userType:false,
userIds:[],
userIds:"",
selectedUser:[],
disabled:false,
msgContent:"",
@ -191,16 +191,19 @@
},
resetUser (){
this.userType = false;
this.userIds = [];
//update-begin---author:wangshuai ---date:20220318 for[issues/I4X63V]vue有些页面报错但是在线演示的却没有-----
this.userIds ="";
//update-end---author:wangshuai ---date:20220318 for[issues/I4X63V]vue有些页面报错但是在线演示的却没有-----
this.disabled = false;
this.$refs.UserListModal.edit(null,null);
},
chooseMsgType(e) {
if("USER" == e.target.value) {
this.userType = true;
} else {
this.userType = false;
this.userIds = [];
//update-begin---author:wangshuai ---date:20220318 for[issues/I4X63V]vue有些页面报错但是在线演示的却没有-----
this.userIds = "";
//update-end---author:wangshuai ---date:20220318 for[issues/I4X63V]vue有些页面报错但是在线演示的却没有-----
}
},
startTimeValidate(rule,value,callback){

View File

@ -79,7 +79,7 @@
<script>
import pick from 'lodash.pick'
import { httpAction, postAction } from '@/api/manage'
import { httpAction, postAction,getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
@ -129,6 +129,7 @@
url: {
add: '/sys/dataSource/add',
edit: '/sys/dataSource/edit',
queryById: '/sys/dataSource/queryById',
},
dbDriverMap: {
// MySQL 数据库
@ -202,9 +203,17 @@
add() {
this.edit({})
},
edit(record) {
async edit(record) {
this.form.resetFields()
this.model = Object.assign({}, record)
//update-begin-author:liusq---date:20220705--for: 编辑时,查询获取解密后的密码 ---
if(record.id){
let res = await getAction(this.url.queryById, {id:record.id});
if (res.success) {
this.model = Object.assign({}, {...res.result})
}
}
//update-end-author:liusq---date:20220705--for: 编辑时,查询获取解密后的密码 ---
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'code', 'name', 'remark', 'dbType', 'dbDriver', 'dbUrl', 'dbName', 'dbUsername', 'dbPassword'))

View File

@ -55,6 +55,11 @@
ruleClass: [{ required: true, message: '规则实现类不能为空' }],
ruleParams: [{
validator: (rule, value, callback) => {
//update-begin---author:wangshuai ---date:20220509 for[VUEN-907]规则参数不是必填,如果为空不检验即可------------
if (!value) {
callback()
}
//update-end---author:wangshuai ---date:20220509 for[VUEN-907]规则参数不是必填,如果为空不检验即可--------------
try {
let json = JSON.parse(value)

View File

@ -15,7 +15,7 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<!-- <a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择开始时间" v-model="model.beginDate" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"/>
</a-form-model-item>
@ -24,7 +24,8 @@
<a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择结束时间" v-model="model.endDate" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"/>
</a-form-model-item>
</a-col>
</a-col>-->
<a-col :span="24">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group name="tenantStatus" v-model="model.status">

View File

@ -1,13 +1,13 @@
<template>
<a-drawer
:title="title"
:maskClosable="true"
:width="drawerWidth"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;">
:title="title"
:maskClosable="true"
:width="drawerWidth"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;">
<template slot="title">
<div style="width: 100%;">
@ -47,17 +47,17 @@
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input placeholder="请输入手机号码" v-model="model.phone" />
</a-form-model-item>
<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post"/>
</a-form-model-item>
<a-form-model-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.selectedroles"
:options="rolesOptions"
placeholder="请选择角色">
:disabled="disableSubmit"
v-model="model.selectedroles"
:options="rolesOptions"
placeholder="请选择角色">
</j-multi-select-tag>
</a-form-model-item>
@ -69,10 +69,10 @@
<!--租户分配-->
<a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.relTenantIds"
:options="tenantsOptions"
placeholder="请选择租户">
:disabled="disableSubmit"
v-model="model.relTenantIds"
:options="tenantsOptions"
placeholder="请选择租户">
</j-multi-select-tag>
</a-form-model-item>
@ -82,12 +82,12 @@
<a-radio :value="2">上级</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true">
<a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="departIdShow==true">
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.departIds"
:options="nextDepartOptions"
placeholder="请选择负责部门">
:disabled="disableSubmit"
v-model="model.departIds"
:options="nextDepartOptions"
placeholder="请选择负责部门">
</j-multi-select-tag>
</a-form-model-item>
@ -97,11 +97,11 @@
<a-form-model-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-date-picker
style="width: 100%"
placeholder="请选择生日"
v-model="model.birthday"
:format="dateFormat"
:getCalendarContainer="node => node.parentNode"/>
style="width: 100%"
placeholder="请选择生日"
v-model="model.birthday"
:format="dateFormat"
:getCalendarContainer="node => node.parentNode"/>
</a-form-model-item>
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
@ -162,17 +162,17 @@
dateFormat:"YYYY-MM-DD",
validatorRules:{
username:[{required: true, message: '请输入用户账号!'},
{validator: this.validateUsername,}],
{validator: this.validateUsername,}],
password: [{required: true,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message: '密码由8位数字大小写字母和特殊符号组成!'},
{validator: this.validateToNextPassword,trigger: 'change'}],
{validator: this.validateToNextPassword,trigger: 'change'}],
confirmpassword: [{required: true, message: '请重新输入登录密码!',},
{ validator: this.compareToFirstPassword,}],
{ validator: this.compareToFirstPassword,}],
realname:[{ required: true, message: '请输入用户名称!' }],
phone: [{required: true, message: '请输入手机号!'}, {validator: this.validatePhone}],
email: [{validator: this.validateEmail}],
roles:{},
workNo:[ { required: true, message: '请输入工号' },
{ validator: this.validateWorkNo }],
{ validator: this.validateWorkNo }],
telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },]
},
departIdShow:false,
@ -441,11 +441,11 @@
};
duplicateCheck(params).then((res) => {
if (res.success) {
callback()
} else {
callback("用户名已存在!")
}
})
callback()
} else {
callback("用户名已存在!")
}
})
},
validateWorkNo(rule, value, callback){
var params = {
@ -476,9 +476,9 @@
},
identityChange(e){
if(e.target.value===1){
this.departIdShow=false;
this.departIdShow=false;
}else{
this.departIdShow=true;
this.departIdShow=true;
}
}
}

View File

@ -43,8 +43,8 @@
currdatetime: '',
loginType: 0,
model:{
username: '',
password: '',
username: 'admin',
password: '123456',
inputCode: ''
},
validatorRules:{
@ -136,6 +136,11 @@
this.Login(loginParams).then((res) => {
this.$emit('success', res.result)
}).catch((err) => {
//update-begin-author: taoyan date:20220425 for: 登录页面,当输入验证码错误时,验证码图片要刷新一下,而不是保持旧的验证码图片不变 #41
if(err && err.code===412){
this.handleChangeCheckCode();
}
//update-end-author: taoyan date:20220425 for: 登录页面,当输入验证码错误时,验证码图片要刷新一下,而不是保持旧的验证码图片不变 #41
this.$emit('fail', err)
});
}else{