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

This commit is contained in:
zhangdaiscott
2022-02-24 15:13:05 +08:00
parent 84218c7fee
commit 9a3deba51b
304 changed files with 40313 additions and 230872 deletions

View File

@ -23,12 +23,13 @@
</a-alert>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
<!-- 树-->
<a-col :md="10" :sm="24">
<template>
<div>
<a-empty v-if="departTree.length===0" description="暂无部门" style="margin-top: 8px;"/>
<template v-else>
<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
<span style="user-select: none">
<a-tree
v-if="loading"
v-if="treeLoading"
checkable
multiple
@select="onSelect"
@ -49,7 +50,7 @@
</a-menu>
</a-dropdown>
</template>
</a-col>
</div>
</div>
</a-card>
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
@ -195,7 +196,7 @@
data() {
return {
iExpandedKeys: [],
loading: true,
treeLoading: true,
autoExpandParent: false,
currFlowId: '',
currFlowName: '',
@ -271,8 +272,10 @@
that.allIds = []
that.iExpandedKeys = []
that.loading = false
//update-begin---author:wangshuai ---date:20220105 for[JTC-364]sqlserver 部门导入导入失败,部门树数据丢失------------
//部门树v-if用到了loading,和上传loading冲突了换一个名称
that.treeLoading = false
//update-end---author:wangshuai ---date:20220105 for[JTC-364]sqlserver 部门导入导入失败,部门树数据丢失------------
queryDepartTreeSync().then((res) => {
if (res.success) {
this.allTreeKeys = [];
@ -288,7 +291,8 @@
}
}
that.$nextTick(()=>{
that.loading = true
//部门树v-if用到了loading,和上传loading冲突了换一个名称
that.treeLoading = true
})
}
})
@ -320,7 +324,8 @@
that.departTreeAll=that.departTree
},
refresh() {
this.loading = true
//部门树v-if用到了loading,和上传loading冲突了换一个名称
this.treeLoading = true
this.loadTree()
},
// 右键操作方法

View File

@ -59,10 +59,13 @@
:loading="loading"
@change="handleTableChange">
<div v-show="queryParam.logType==2" slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求方法:{{ record.method }}</span></div>
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>
</div>
<template v-if="queryParam.logType==='2'" #expandedRowRender="record">
<div style="margin: 0">
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求方法:{{ record.method }}</span></div>
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>
</div>
</template>
<!-- 字符串超长截取省略号显示-->
<span slot="logContent" slot-scope="text, record">
<j-ellipsis :value="text" :length="40"/>
@ -187,6 +190,10 @@
param['superQueryParams'] = encodeURI(this.superQueryParams)
param['superQueryMatchType'] = this.superQueryMatchType
}
//登录日志没有操作类型
if (this.tabKey === '1') {
param.operateType = ''
}
return filterObj(param);
},
@ -213,7 +220,7 @@
let that=this;
that.queryParam.logType=key;
that.loadData();
that.loadData(1);
},
onDateChange: function (value, dateString) {
console.log(dateString[0],dateString[1]);

View File

@ -47,6 +47,9 @@
:dataSource="dataSource"
:loading="loading"
:rowClassName="getRowClassname">
<template slot="ruleValueText" slot-scope="text,record">
<j-ellipsis :value="text" :length="15"></j-ellipsis>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">
<a-icon type="edit"/>编辑
@ -72,17 +75,21 @@
{
title: '规则名称',
dataIndex: 'ruleName',
key: 'ruleName'
key: 'ruleName',
width:150,
},
{
title: '规则字段',
dataIndex: 'ruleColumn',
key: 'ruleColumn'
key: 'ruleColumn',
width:150,
},
{
title: '规则值',
dataIndex: 'ruleValue',
key: 'ruleValue'
key: 'ruleValue',
width:150,
scopedSlots: {customRender: "ruleValueText"}
},
{
title: '操作',

View File

@ -64,6 +64,7 @@
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:scroll="{x:true}"
@change="handleTableChange">
<!-- 字符串超长截取省略号显示-->
@ -83,7 +84,7 @@
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item><a @click="executeImmediately(record)">立即执行</a></a-menu-item>
<a-menu-item><a @click="executeImmediately(record)">执行一次</a></a-menu-item>
<a-menu-item><a @click="handleEdit(record)">编辑</a></a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">

View File

@ -69,6 +69,7 @@
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down" />

View File

@ -63,6 +63,7 @@
<a @click="handleOpen(record)">用户</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
@ -537,6 +538,7 @@
}
</script>
<style scoped>
@import '~@assets/less/common.less';
/** Button按钮间距 */
.ant-btn {
margin-left: 8px

View File

@ -32,9 +32,9 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</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>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">

View File

@ -69,7 +69,12 @@
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<template slot="ruleClassText" slot-scope="text">
<j-ellipsis :value="text" :length="30"></j-ellipsis>
</template>
<template slot="ruleParamsText" slot-scope="text,record">
<j-ellipsis :value="text" :length="30"></j-ellipsis>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
@ -131,12 +136,14 @@
{
title: '规则实现类',
align: 'center',
dataIndex: 'ruleClass'
dataIndex: 'ruleClass',
scopedSlots: {customRender: "ruleClassText"}
},
{
title: '规则参数',
align: 'center',
dataIndex: 'ruleParams'
dataIndex: 'ruleParams',
scopedSlots: {customRender: "ruleParamsText"}
},
{
title: '操作',

View File

@ -68,12 +68,14 @@
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
import {getFileAccessHttpUrl} from '@/api/manage';
import {ACCESS_TOKEN} from '@/store/mutation-types'
export default {
name: "SysUserOnlineList",
mixins:[JeecgListMixin, mixinDevice],
components: {},
data () {
let currentToken = this.$ls.get(ACCESS_TOKEN)
return {
description: '在线用户管理页面',
queryParam: {
@ -84,7 +86,13 @@
{
title:'用户账号',
align:"center",
dataIndex: 'username'
dataIndex: 'username',
customRender: (text,record) => {
if(record.token === currentToken) {
return text + '(我)'
}
return text
},
},{
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,6 +156,10 @@
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -374,6 +378,10 @@
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
handleAgentSettings(username){
this.$refs.sysUserAgentModal.agentSettings(username);
this.$refs.sysUserAgentModal.title = "用户代理人设置";
},
passwordModalOk() {
//TODO 密码修改完成 不需要刷新页面可以把datasource中的数据更新一下
},

View File

@ -51,11 +51,18 @@
},
handleTreeSelect(selectedKeys, event) {
if (selectedKeys.length > 0 && this.selectedKeys[0] !== selectedKeys[0]) {
this.selectedKeys = [selectedKeys[0]]
let orgCode = event.node.dataRef.orgCode
this.emitInput(orgCode)
//update-begin---author:wangshuai ---date:20220107 for[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
if (selectedKeys.length > 0) {
if(this.selectedKeys[0] !== selectedKeys[0]){
this.selectedKeys = [selectedKeys[0]]
let orgCode = event.node.dataRef.orgCode
this.emitInput(orgCode)
}
}else{
this.selectedKeys = []
this.emitInput("")
}
//update-end---author:wangshuai ---date:20220107 for[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
},
emitInput(orgCode) {

View File

@ -94,7 +94,7 @@
title: '手机',
width: '15%',
align: 'center',
dataIndex: 'telephone'
dataIndex: 'phone'
},
// {
// title: '手机号',

View File

@ -1,70 +1,16 @@
<template>
<a-card :visible="visible">
<a-form-model ref="form" :model="model">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构名称">
<a-input style="border:0;" placeholder="" v-model="model.departName"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
<a-tree-select
disabled
style="width:100%;border: 0;border: none;outline:none;"
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
:treeData="treeData"
v-model="model.parentId"
placeholder="">
</a-tree-select>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构编码">
<a-input style="border:0;" placeholder="" v-model="model.orgCode"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构类型">
<a-radio-group :disabled="true" v-model="model.orgCategory" read-only>
<a-radio value="1">
公司
</a-radio>
<a-radio value="2">
部门
</a-radio>
<a-radio value="3">
岗位
</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序">
<a-input-number style="border:0;" v-model="model.departOrder"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="手机号">
<a-input style="border:0;" placeholder="" v-model="model.mobile"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="地址">
<a-input style="border:0;" placeholder="" v-model="model.address"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="备注">
<a-textarea style="border:0;" placeholder="" v-model="model.memo"/>
</a-form-model-item>
</a-form-model>
</a-card>
<div :visible="visible">
<a-descriptions size="small" bordered :column="1">
<a-descriptions-item label="机构名称">{{model.departName}}</a-descriptions-item>
<a-descriptions-item label="上级部门"><span>{{model.parentId}}</span></a-descriptions-item>
<a-descriptions-item label="机构编码"><span>{{model.orgCode}}</span></a-descriptions-item>
<a-descriptions-item label="机构类型"><span>{{model.orgCategory}}</span></a-descriptions-item>
<a-descriptions-item label="排序"><span>{{model.departOrder}}</span></a-descriptions-item>
<a-descriptions-item label="手机号"><span>{{model.mobile}}</span></a-descriptions-item>
<a-descriptions-item label="地址"><span>{{model.address}}</span></a-descriptions-item>
<a-descriptions-item label="备注"><span>{{model.memo}}</span></a-descriptions-item>
</a-descriptions>
</div>
</template>
<script>
import { queryIdTree } from '@/api/api'
@ -107,18 +53,70 @@
},
open(record) {
this.visible = true;
this.$nextTick(() => {
this.$refs.form.resetFields()
this.model = Object.assign({}, record)
})
},
//update-begin---author:wangshuai ---date:20220211 for[JTC-174]部门管理界面参考vue3的改改------------
this.model = Object.assign({}, record)
this.model.parentId = this.findTree(this.treeData,record.parentId);
this.model.orgCategory = this.orgCategoryText(record.orgCategory)
//update-end---author:wangshuai ---date:20220211 for[JTC-174]部门管理界面参考vue3的改改------------
},
clearForm() {
this.$refs.form.resetFields();
this.treeData = [];
},
/**
* 通过父id查找部门名称
* @param treeList 树数组
* @param id 父id
* @return id对应的部门名称
*/
findTree(treeList,id){
for (let i = 0; i < treeList.length; i++) {
let item = treeList[i];
//如果当前id和父id相同则返回部门名称
if (item.key == id) {
return item.title;
}
let children = item.children
//存在子部门进行递归查询
if(children){
let findResult = this.findTree(children, id);
//返回的数据不为空,结束递归,返回结果
if (findResult) {
return findResult
}
}
}
},
/**
* 将机构类型数值翻译成文本
* @param orgCategory 部门类别
* @return 部门类别对应的文本
*/
orgCategoryText(orgCategory) {
if(orgCategory == 1){
return "公司";
}else if(orgCategory == 2){
return "部门";
}else{
return "岗位";
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
<style scoped lang="less">
.ant-descriptions-view{
border: 1px solid #f0f0f0;
}
/deep/ .ant-descriptions-item-label{
width:180px
}
/deep/ .ant-descriptions-item-content span{
color:#000000d9;
}
/deep/ .ant-descriptions-bordered .ant-descriptions-row{
border-bottom: 1px solid #f0f0f0 !important;
}
/deep/ .ant-descriptions-bordered .ant-descriptions-item-label{
border-right: 1px solid #f0f0f0;
}
</style>

View File

@ -38,7 +38,7 @@
:wrapperCol="wrapperCol"
prop="ruleValue"
label="规则值">
<a-input placeholder="请输入规则值" v-model.trim="model.ruleValue"/>
<a-input placeholder="请输入规则值" v-model="model.ruleValue"/>
</a-form-model-item>
<a-form-model-item

View File

@ -73,7 +73,7 @@
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,onSelect:onSelect}"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange"
>
<!-- update-end author:kangxiaolin date:20190921 for:系统发送通知 用户多选失败 #513 -->
@ -219,22 +219,12 @@
return str;
},
//--update-begin----author:kangxiaolin---date:20190921------for:系统发送通知 用户多选失败 #513----
onSelectChange (selectedRowKeys) {
onSelectChange (selectedRowKeys,selectionRows) {
this.selectedRowKeys = selectedRowKeys;
//update-begin---author:wangshuai ---date:20211227 for全选不好用------------
this.selectionRows = selectionRows;
//update-end---author:wangshuai ---date:20211227 for全选不好用------------
},
onSelect(record, selected){
if(selected == true ){
this.selectionRows.push(record);
}else {
this.selectionRows.forEach(function(item,index,arr){
if(item.id == record.id) {
arr.splice(index, 1);
}
})
}
//--update-end----author:kangxiaolin---date:20190921------for:系统发送通知 用户多选失败 #513----
},
searchReset(){
let that = this;
Object.keys(that.queryParam).forEach(function(key){

View File

@ -11,131 +11,42 @@
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="titile"
label="标题">
<a-input placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="msgCategory"
label="消息类型">
<a-select
v-model="model.msgCategory"
placeholder="请选择消息类型"
:disabled="disableSubmit"
:getPopupContainer = "(target) => target.parentNode">
<a-select-option value="1">通知公告</a-select-option>
<a-select-option value="2">系统消息</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="startTime"
label="开始时间:">
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.startTime" placeholder="请选择开始时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss" ></j-date>
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="endTime"
label="结束时间"
class="endTime">
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.endTime" placeholder="请选择结束时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss"></j-date>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="优先级">
<a-select
v-model="model.priority"
placeholder="请选择优先级"
:disabled="disableSubmit"
:getPopupContainer = "(target) => target.parentNode">
<a-select-option value="L">低</a-select-option>
<a-select-option value="M">中</a-select-option>
<a-select-option value="H">高</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="msgType"
label="通告类型">
<a-select
v-model="model.msgType"
placeholder="请选择通告类型"
:disabled="disableSubmit"
@change="chooseMsgType"
:getPopupContainer = "(target) => target.parentNode">
<a-select-option value="USER">指定用户</a-select-option>
<a-select-option value="ALL">全体用户</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="msgAbstract"
label="摘要">
<a-textarea placeholder="请输入摘要" v-model="model.msgAbstract" />
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="指定用户"
v-if="userType">
<a-select
mode="multiple"
placeholder="请选择用户"
:labelInValue=true
v-model="selectedUser"
@dropdownVisibleChange="selectUserIds"
@change="handleChange"
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24">
<a-form-model-item
:labelCol="labelColX1"
:wrapperCol="wrapperColX1"
label="内容"
class="j-field-content">
<j-editor v-model="model.msgContent"></j-editor>
</a-form-model-item>
</a-col>
</a-row>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgCategory" label="消息类型">
<a-radio-group v-model="model.msgCategory" :disabled="disableSubmit">
<a-radio value="1">通知公告</a-radio>
<a-radio value="2">系统消息</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="titile" label="标题">
<a-input placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgAbstract" label="摘要">
<a-textarea placeholder="请输入摘要" v-model="model.msgAbstract" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime" label="截至日期" class="endTime">
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.endTime" placeholder="请选择结束时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgType" label="接收用户">
<a-radio-group v-model="model.msgType" :disabled="disableSubmit" @change="chooseMsgType">
<a-radio value="USER">指定用户</a-radio>
<a-radio value="ALL">全体用户</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="指定用户" v-if="userType">
<j-select-multi-user :returnKeys="returnKeys" placeholder="请选择指定用户" v-model="userIds" :trigger-change="true"></j-select-multi-user>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优先级" >
<a-radio-group v-model="model.priority" placeholder="请选择优先级" :disabled="disableSubmit">
<a-radio value="L">低</a-radio>
<a-radio value="M">中</a-radio>
<a-radio value="H">高</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item :labelCol="labelColX1" :wrapperCol="wrapperColX1" label="内容" class="j-field-content">
<j-editor v-model="model.msgContent" />
</a-form-model-item>
</a-form-model>
</a-spin>
<select-user-list-modal ref="UserListModal" @choseUser="choseUser"></select-user-list-modal>
</a-modal>
</template>
@ -159,7 +70,7 @@
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
sm: { span: 4 },
},
wrapperCol: {
xs: { span: 24 },
@ -167,11 +78,11 @@
},
labelColX1: {
xs: { span: 24 },
sm: { span: 3 },
sm: { span: 4 },
},
wrapperColX1: {
xs: { span: 24 },
sm: { span: 21 },
sm: { span: 18 },
},
confirmLoading: false,
validatorRules:{
@ -192,7 +103,8 @@
selectedUser:[],
disabled:false,
msgContent:"",
userList:[]
userList:[],
returnKeys:['id', 'id'] //用户选择返回字段
}
},
created () {
@ -208,26 +120,18 @@
this.getUser(record);
},
getUser(record){
//update-begin---author:wangshuai ---date:20211227 for[JTC-191]系统通告参考vue3的来改为单选按钮附默认值------------
record.msgCategory = record.msgCategory?record.msgCategory:"1"
record.msgType = record.msgType?record.msgType:"ALL"
record.priority = record.priority?record.priority:"H"
//update-begin---author:wangshuai ---date:20211227 for[JTC-191]系统通告参考vue3的来改为单选按钮附默认值------------
this.model = Object.assign({}, record);
// 指定用户
if(record&&record.msgType === "USER"){
this.userType = true;
this.userIds = record.userIds;
getAction(this.url.queryByIds,{userIds:this.userIds}).then((res)=>{
if(res.success){
//update--begin--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
var userList=[];
for(var i=0;i<res.result.length;i++){
var user={};
user.label =res.result[i].realname;
user.key=res.result[i].id;
userList.push(user);
}
this.selectedUser=userList;
//update--begin--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
this.$refs.UserListModal.edit(res.result,this.userIds);
}
});
//update-begin---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
this.userIds = record.userIds.substr(0,record.userIds.length-1);
//update-end---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
}
},
close () {
@ -257,7 +161,9 @@
method = 'put';
}
if(this.userType){
this.model.userIds = this.userIds;
//update-begin---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
this.model.userIds = this.userIds+",";
//update-end---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
@ -271,7 +177,7 @@
that.confirmLoading = false;
that.close();
})
}else{
return false;
}
@ -286,36 +192,17 @@
resetUser (){
this.userType = false;
this.userIds = [];
this.selectedUser = [];
this.disabled = false;
this.$refs.UserListModal.edit(null,null);
},
selectUserIds() {
this.$refs.UserListModal.add(this.selectedUser,this.userIds);
},
chooseMsgType(value) {
if("USER" == value) {
chooseMsgType(e) {
if("USER" == e.target.value) {
this.userType = true;
} else {
this.userType = false;
this.selectedUser = [];
this.userIds = [];
}
},
// 子modal回调
choseUser:function(userList){
this.selectedUser = [];
this.userIds = [];
for(var i=0;i<userList.length;i++){
//update--begin--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
var user={};
user.label =userList[i].realname;
user.key=userList[i].id;
this.selectedUser.push(user);
//update--end--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
this.userIds += userList[i].id+","
}
},
startTimeValidate(rule,value,callback){
let endTime = this.model.endTime
if(!value || !endTime){
@ -336,20 +223,6 @@
callback("结束时间需大于开始时间")
}
},
handleChange(userList) {
if (userList) {
this.userIds = [];
var users=[];
for (var i = 0; i < userList.length; i++) {
var user={};
user.id=userList[i].key;
user.realname=userList[i].label;
this.userIds += userList[i].key + ',';
users.push(user);
}
}
this.$refs.UserListModal.edit(users,this.userIds);
}
}
}
</script>

View File

@ -23,7 +23,7 @@
:wrapperCol="wrapperCol"
prop="roleCode"
label="部门角色编码">
<a-input placeholder="请输入部门角色编码" v-model="model.roleCode"/>
<a-input placeholder="请输入部门角色编码" v-model="model.roleCode" :read-only="roleCodeRead"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
@ -76,6 +76,7 @@
add: "/sys/sysDepartRole/add",
edit: "/sys/sysDepartRole/edit",
},
roleCodeRead:false //编码时候可以编写
}
},
created () {
@ -87,6 +88,9 @@
edit (record,departId) {
this.departId = departId;
this.model = Object.assign({}, record);
//update-begin---author:wangshuai ---date:20220104 for[JTC-367]我的部门->部门角色 角色编码应该不可修改------------
this.roleCodeRead = !!this.model.roleCode
//update-end---author:wangshuai ---date:20220104 for[JTC-367]我的部门->部门角色 角色编码应该不可修改------------
this.visible = true;
},
close () {

View File

@ -21,7 +21,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="代理人用户名">
<j-select-user-by-dep placeholder="请输入代理人用户名" v-decorator="['agentUserName', validatorRules.agentUserName]" :trigger-change="true"></j-select-user-by-dep>
<j-select-user-by-dep :multi="false" placeholder="请输入代理人用户名" v-decorator="['agentUserName', validatorRules.agentUserName]" :trigger-change="true"></j-select-user-by-dep>
</a-form-item>
<a-form-item
:labelCol="labelCol"

View File

@ -7,7 +7,7 @@
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
style="height: 100%;">
<template slot="title">
<div style="width: 100%;">
@ -30,7 +30,7 @@
<a-form-model-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password" >
<a-input type="password" placeholder="请输入登录密码" v-model="model.password" />
</a-form-model-item>
<a-form-model-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword" >
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-model="model.confirmpassword"/>
</a-form-model-item>
@ -44,6 +44,10 @@
<a-input placeholder="请输入工号" v-model="model.workNo" />
</a-form-model-item>
<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>
@ -99,7 +103,7 @@
:format="dateFormat"
:getCalendarContainer="node => node.parentNode"/>
</a-form-model-item>
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select v-model="model.sex" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
<a-select-option :value="1">男</a-select-option>
@ -111,10 +115,6 @@
<a-input placeholder="请输入邮箱" v-model="model.email" />
</a-form-model-item>
<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" prop="telephone">
<a-input placeholder="请输入座机" v-model="model.telephone" />
</a-form-model-item>
@ -507,7 +507,7 @@
.drawer-bootom-button {
position: absolute;
bottom: -8px;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
@ -516,4 +516,10 @@
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
/*【JTC-502】 添加用户两个滚动条*/
/deep/ .ant-drawer-body {
padding-bottom: 53px;
}
</style>