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

This commit is contained in:
zhangdaiscott
2022-02-24 15:13:05 +08:00
parent 8c143f35f8
commit f8c7ddd223
304 changed files with 40313 additions and 230872 deletions

View File

@ -1,3 +1,6 @@
NODE_ENV=production
VUE_APP_PLATFORM_NAME=JeecgBoot 企业级低代码平台
VUE_APP_SSO=false
# 开启单点登录
VUE_APP_SSO=false
# 开启微应用模式
VUE_APP_QIANKUN=false

View File

@ -1,4 +1,7 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
# 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VUE_APP_SUB_jeecg-app-1 = '//localhost:8092'

View File

@ -1,7 +1,7 @@
Ant Design Jeecg Vue
====
当前最新版本: 3.0.0发布日期2021-11-01
当前最新版本: 3.1.0发布日期20220301
Overview
----

View File

@ -1,6 +1,6 @@
{
"name": "vue-antd-jeecg",
"version": "3.0.0",
"version": "3.1.0",
"private": true,
"scripts": {
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
@ -44,7 +44,8 @@
"xe-utils": "2.4.8",
"vxe-table": "2.9.13",
"vxe-table-plugin-antd": "1.8.10",
"cron-parser": "^2.10.0"
"cron-parser": "^2.10.0",
"qiankun": "^2.5.1"
},
"devDependencies": {
"@babel/polyfill": "^7.2.5",

View File

@ -240,9 +240,7 @@
/* 滚动条优化 end */
</style>
<!-- 全局配置 -->
<script>
window._CONFIG = {};
</script>
<script src="<%= BASE_URL %>static/config.js"></script>
</head>
<body>

View File

@ -0,0 +1,11 @@
/**
* 存放配置常量(当值不为空时会覆盖env配置)
*/
window._CONFIG = {
//接口父路径
VUE_APP_API_BASE_URL: '',
//单点登录地址
VUE_APP_CAS_BASE_URL: '',
//文件预览路径
VUE_APP_ONLINE_BASE_URL: ''
}

View File

@ -0,0 +1,33 @@
@active-color: #11da75;
ul {
max-height: 700px;
overflow-y: auto;
padding-left: .5rem;
img {
width:64px;
height:64px;
padding: .2rem;
margin: .3rem;
cursor: pointer;
&.active, &:hover {
border: 1px solid @active-color;
border-radius: 2px;
color: #fff;
transition: all .3s;
}
}
li {
list-style: none;
float: left;
text-align: center;
cursor: pointer;
color: #555;
transition: color .3s ease-in-out,background-color .3s ease-in-out;
position: relative;
margin: 3px 0;
border-radius: 4px;
background-color: #fff;
overflow: hidden;
padding: 10px 0 0;
}
}

View File

@ -123,7 +123,17 @@
if(this.async){
if(!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key!=this.value){
console.log("这才请求后台")
getAction(`/sys/dict/loadDictItem/${this.dict}`,{key:this.value}).then(res=>{
//update-begin-author:taoyan date:20220112 for: 方法initSelectValue 根据下拉框实际值查询下拉框的显示的文本 因后台接口只处理3个参数所以将过滤条件去掉
// TODO 隐患 查询效率问题 还是应该在后台作筛选
let itemDictStr = this.dict
let arr = itemDictStr.split(',')
if(arr && arr.length==4){
// 删除最后一个元素
arr.pop();
itemDictStr = arr.join(',')
}
//update-end-author:taoyan date:20220112 for: 方法initSelectValue 根据下拉框实际值查询下拉框的显示的文本 因后台接口只处理3个参数所以将过滤条件去掉
getAction(`/sys/dict/loadDictItem/${itemDictStr}`,{key:this.value}).then(res=>{
if(res.success){
let obj = {
key:this.value,

View File

@ -29,6 +29,13 @@
width: 4em;
}
.week {
.list-check-item {
width: 5em;
text-align: left;
}
}
.tip-info {
color: #999
}

View File

@ -1,5 +1,5 @@
<template>
<div class="config-list">
<div class="config-list week">
<a-radio-group v-model="type">
<div class="item">
<a-radio value="TYPE_NOT_SET" class="choice" :disabled="disableChoice">不设置</a-radio>
@ -36,8 +36,8 @@
<a-radio value="TYPE_SPECIFY" class="choice" :disabled="disableChoice">指定</a-radio>
<div class="list">
<a-checkbox-group v-model="valueList">
<template v-for="i in specifyRange">
<a-checkbox class="list-check-item" :key="`key-${i}`" :value="i" :disabled="type!==TYPE_SPECIFY || disabled">{{i}}</a-checkbox>
<template v-for="(v,k) in WEEK_MAP">
<a-checkbox class="list-check-item" :key="`key-${v}`" :value="v" :disabled="type!==TYPE_SPECIFY || disabled">{{k}}</a-checkbox>
</template>
</a-checkbox-group>
</div>

View File

@ -666,6 +666,7 @@
<div v-else-if="col.type === formTypes.slot" :key="i">
<a-tooltip v-bind="buildTooltipProps(row, col, id)">
<!-- updatesunjianlei date2022-1-17 forbuildProps新增参数 -->
<slot
:name="(col.slot || col.slotName) || col.key"
:index="rowIndex"
@ -679,6 +680,7 @@
:target="getVM()"
:handleChange="(v)=>handleChangeSlotCommon(v,id,row,col)"
:isNotPass="notPassedIds.includes(col.key+row.id)"
:buildProps="()=>buildProps(row,col)"
/>
</a-tooltip>
</div>
@ -1849,7 +1851,9 @@
}
}
if (edited) {
this.elemValueChange(column.type, {[newValueKey]: newValue}, column, newValue)
// update-begin-author:sunjianlei date:20211222 for: 修复 setValues 触发的 valueChange 事件没有id的问题
this.elemValueChange(column.type, {id: rowKey}, column, newValue)
// update-end-author:sunjianlei date:20211222 for: 修复 setValues 触发的 valueChange 事件没有id的问题
}
}
}
@ -2012,7 +2016,7 @@
{ title: '网址', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/ },
{ title: '电子邮件', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/ },
{ title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/ },
{ title: '邮政编码', value: 'p', pattern: /^[1-9]\d{5}$/ },
{ title: '邮政编码', value: 'p', pattern: /^[0-9]{6}$/ },
{ title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/ },
{ title: '数字', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/ },
{ title: '整数', value: 'z', pattern: /^-?\d+$/ },

View File

@ -143,6 +143,10 @@
}
},
handleEmpty() {
// 禁用时,不允许清空内容
if (this.disabled) {
return
}
this.showText = ''
let destFieldsArr = this.destFields.split(',')
if (destFieldsArr.length === 0) {

View File

@ -103,6 +103,8 @@
<a-col :md="8" :xs="24" style="margin-bottom: 12px;">
<!-- 下拉搜索 -->
<j-search-select-tag v-if="item.type==='sel_search'" v-model="item.val" :dict="getDictInfo(item)" placeholder="请选择"/>
<!-- 下拉框 -->
<j-search-select-tag v-else-if="item.type==='list' && item.dictTable" v-model="item.val" :dict="getDictInfo(item)" placeholder="请选择"/>
<!-- 下拉多选 -->
<template v-else-if="item.type==='list_multi'">
<j-multi-select-tag v-if="item.options" v-model="item.val" :options="item.options" placeholder="请选择"/>
@ -136,14 +138,14 @@
v-else-if="item.type === 'select-user' || item.type === 'sel_user'"
v-model="item.val"
:buttons="false"
:multiple="false"
:multiple="allowMultiple(item)"
placeholder="请选择用户"
:returnKeys="['id', item.customReturnField || 'username']"
/>
<j-select-depart
v-else-if="item.type === 'select-depart' || item.type === 'sel_depart'"
v-model="item.val"
:multi="false"
:multi="allowMultiple(item)"
placeholder="请选择部门"
:customReturnField="item.customReturnField || 'id'"
/>
@ -331,7 +333,12 @@
let child = { ...item2 }
child.label = child.label || child.text
child.label = data.label + '-' + child.label
child.value = data.value + ',' + child.value
// update--begin--author:sunjianlei-----date:20220121------for【JTC-1167】【表单设计器】高级查询一对一字段查询不好使
// 是否仅包含字段名,不需要拼接子表表名
if (!data.onlyFieldName) {
child.value = data.value + ',' + child.value
}
// update--end--author:sunjianlei-----date:20220121------for【JTC-1167】【表单设计器】高级查询一对一字段查询不好使
child.val = ''
return child
})

View File

@ -1402,7 +1402,7 @@ const fooPatterns = [
{title: '网址', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/},
{title: '电子邮件', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/},
{title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/},
{title: '邮政编码', value: 'p', pattern: /^[1-9]\d{5}$/},
{title: '邮政编码', value: 'p', pattern: /^[0-9]{6}$/},
{title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/},
{title: '数字', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/},
{title: '整数', value: 'z', pattern: /^-?\d+$/},
@ -1442,4 +1442,4 @@ function uniqueValidator(event) {
}
}
return Promise.resolve()
}
}

View File

@ -10,6 +10,7 @@
<a-popconfirm
v-if="showRemove"
:title="`确定要删除这 ${selectedRowIds.length} 项吗?`"
:disabled="disabled"
@confirm="trigger('remove')"
>
<a-button icon="minus" :disabled="disabled">删除</a-button>

View File

@ -22,7 +22,7 @@
@initComp="initComp"/>
<span style="display: inline-block;height:100%;padding-left:14px" v-if="departIds" >
<span @click="openSelect" style="display: inline-block;vertical-align: middle">{{ departNames }}</span>
<a-icon style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
<a-icon v-if="!componentDisabled" style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
</span>
</div>
</template>
@ -98,6 +98,10 @@
},
methods: {
openSelect(){
// disabled 不弹窗
if (this.componentDisabled) {
return
}
this.$refs.innerDepartSelectModal.show()
},
handleEmpty(){

View File

@ -21,7 +21,7 @@
@initComp="initComp"/>
<span style="display: inline-block;height:100%;padding-left:14px" v-if="userIds" >
<span @click="openSelect" style="display: inline-block;vertical-align: middle">{{ userNames }}</span>
<a-icon style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
<a-icon v-if="!componentDisabled" style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
</span>
</div>
@ -119,6 +119,10 @@
},
methods: {
openSelect() {
// disabled 不弹窗
if (this.componentDisabled) {
return
}
this.$refs.selectModal.showModal()
},
selectOK(rows, idstr) {

View File

@ -87,6 +87,10 @@
this.$emit('change',this.inputContent)
},
pop(){
// disabled 不弹窗
if (this.disabled) {
return
}
this.visible=true
this.$nextTick(() => {
this.$refs.textarea.focus()

View File

@ -58,7 +58,7 @@
:dataSource="table.dataSource"
:pagination="table.pagination"
:loading="table.loading"
:rowSelection="{fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}"
:rowSelection="{type:rowSelectionType,fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}"
@change="handleChangeInTable"
style="min-height: 300px"
:scroll="tableScroll"
@ -171,7 +171,11 @@
computed:{
showSearchFlag(){
return this.queryInfo && this.queryInfo.length>0
}
},
// 行选择框类型,根据是否多选来控制显示为单选框还是多选框
rowSelectionType() {
return this.multi ? 'checkbox' : 'radio'
},
},
methods:{
loadColumnsInfo(){
@ -201,6 +205,12 @@
}
this.table.columns = [...currColumns]
this.initQueryInfo()
} else {
this.$error({
title: '出错了',
content: (<p>Popup初始化失败请检查你的配置或稍后重试<br/>错误信息如下:{res.message}</p>),
onOk: () => this.close(),
})
}
})
},
@ -421,6 +431,11 @@
this.table.selectionRows.splice(rowKey_index,1);
}
}
// 判断是否允许多选,如果不允许多选,就只存储最后一个选中的行
if (!this.multi && this.table.selectedRowKeys.length > 1) {
this.table.selectionRows = [this.table.selectionRows.pop()]
this.table.selectedRowKeys = [this.table.selectedRowKeys.pop()]
}
}
}
}

View File

@ -11,11 +11,13 @@
switchFullscreen
cancelText="关闭">
<a-spin tip="Loading..." :spinning="false">
<a-input-search style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" @search="onSearch" />
<a-input-search v-model="searchValue" style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" />
<a-empty v-if="filterTreeData.length===0"></a-empty>
<a-tree
v-else
checkable
:class="treeScreenClass"
:treeData="treeData"
:treeData="filterTreeData"
:checkStrictly="checkStrictly"
@check="onCheck"
@select="onSelect"
@ -24,14 +26,6 @@
:expandedKeys="expandedKeys"
:checkedKeys="checkedKeys">
<template slot="title" slot-scope="{title}">
<span v-if="title.indexOf(searchValue) > -1">
{{title.substr(0, title.indexOf(searchValue))}}
<span style="color: #f50">{{searchValue}}</span>
{{title.substr(title.indexOf(searchValue) + searchValue.length)}}
</span>
<span v-else>{{title}}</span>
</template>
</a-tree>
</a-spin>
<!--底部父子关联操作和确认取消按钮-->
@ -93,6 +87,18 @@
'fullscreen': this.fullscreen,
}
},
filterTreeData(){
if(!this.searchValue){
return this.treeData
}
let filter = []
this.dataList.forEach((item) => {
if (item.title.includes(this.searchValue)) {
filter.push(Object.assign({}, item, {children: null, isLeaf: true}))
}
})
return filter
},
},
methods:{
show(){
@ -228,22 +234,6 @@
}
}
return parentKey
},
onSearch(value){
const expandedKeys = this.dataList.map((item) => {
if (item.title.indexOf(value) > -1) {
return this.getParentKey(item.key,this.treeData)
}
return null
}).filter((item, i, self) => item && self.indexOf(item) === i)
Object.assign(this, {
expandedKeys,
searchValue: value,
autoExpandParent: true,
})
},
// 根据 checkedKeys 获取 rows
getCheckedRows(checkedKeys) {

View File

@ -28,14 +28,23 @@
</a-col>
<a-col :md="18" :sm="24">
<a-card :bordered="false">
用户账号:
<a-input-search
:style="{width:'150px',marginBottom:'15px'}"
placeholder="请输入账号"
v-model="queryParam.username"
@search="onSearch"
></a-input-search>
<a-button @click="searchReset(1)" style="margin-left: 20px" icon="redo">重置</a-button>
<a-form-model>
<a-form-model-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row type="flex" :gutter="8">
<a-col :span="18">
<a-input-search
:style="{width:'100%'}"
placeholder="请输入账号"
v-model="queryParam.username"
@search="onSearch"
></a-input-search>
</a-col>
<a-col :span="6">
<a-button @click="searchReset(1)" icon="redo">重置</a-button>
</a-col>
</a-row>
</a-form-model-item>
</a-form-model>
<!--用户列表-->
<a-table
ref="table"
@ -133,6 +142,14 @@
form: this.$form.createForm(this),
loading: false,
expandedKeys: [],
labelCol: {
xs: { span: 24 },
sm: { span: 4 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 10 },
},
}
},
computed: {

View File

@ -28,6 +28,9 @@
</template>
<!-- update-end-author:taoyan date:20201221 for:此处删掉transition标签 不知道为什么加上后 页面路由切换的时候即1及菜单切到2及菜单的时候 两个菜单页面会同时出现300-500秒左右 -->
</div>
<!-- update-begin-author:zyf date:20211129 for:qiankun 挂载子应用盒子 -->
<div id="content" class="app-view-box"></div>
<!-- update-end-author:zyf date:20211129 for: qiankun 挂载子应用盒子-->
</global-layout>
</template>
@ -38,6 +41,7 @@
import { triggerWindowResizeEvent } from '@/utils/util'
import Vue from 'vue'
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
import registerApps from "@/qiankun";
const indexKey = '/dashboard/analysis'
@ -92,6 +96,14 @@
this.activePage = currentRoute.fullPath
},
mounted() {
if (process.env.VUE_APP_QIANKUN == 'true') {
//update-begin-author:zyf date:20211129 for:qiankun 注册子应用
if (!window.qiankunStarted) {
window.qiankunStarted = true;
registerApps();
}
//update-end-author:zyf date:20211129 for:qiankun 注册子应用
}
},
watch: {
'$route': function(newRoute) {

View File

@ -149,7 +149,8 @@
<!-- update_begin author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->
<style lang="less">
.ant-menu.ant-menu-root {
// 选中首页的时候不显示背景颜色,只应用于左侧菜单
.sider .ant-menu.ant-menu-root {
& > .ant-menu-item:first-child {
background-color: transparent;

View File

@ -220,7 +220,9 @@
overflow-y: auto;
}
.ant-table-body {
min-width: 800px;
// update-begin---author:sunjianlei Date:20220104 for 【JTC-480】移动端不支持左右拖动需要注释掉此段代码 ------------
//min-width: 800px;
// update-end---author:sunjianlei Date:20220104 for 【JTC-480】移动端不支持左右拖动需要注释掉此段代码 ------------
}
}
.sidemenu {

View File

@ -23,6 +23,7 @@
</template>
<script>
import {getUserList} from '@/api/api'
export default {
name: "SysAnnouncementModal",
components: {
@ -59,6 +60,15 @@
},
methods: {
detail (record) {
//update-begin---author:wangshuai ---date:20220107 for将其它页面传递过来的用户名改成用户真实姓名
if(record.sender){
getUserList({"username":record.sender}).then((res) =>{
if(res.success && res.result.records.length>0){
record.sender = res.result.records[0].realname
}
})
}
//update-end---author:wangshuai ---date:20220107 for将其它页面传递过来的用户名改成用户真实姓名
this.visible = true;
this.record = record;
},

View File

@ -183,10 +183,10 @@
content: '真的要注销登录吗 ?',
onOk() {
return that.Logout({}).then(() => {
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
that.$router.push({ path: '/user/login' });
// update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好
//that.$router.push({ path: '/user/login' });
window.location.reload()
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
// update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好
}).catch(err => {
that.$message.error({
title: '错误',
@ -225,17 +225,13 @@
// update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
searchMethods(value) {
let route = this.searchMenuOptions.filter(item => item.id === value)[0]
//update-begin-author:taoyan date:20210528 for: 【菜单问题】配置一个iframe地址的菜单内部打开在搜索菜单上打开却新开了一个窗口
if (route.meta.internalOrExternal === true) {
window.open(route.meta.url, '_blank')
} else {
if(route.component.includes('layouts/IframePageView')){
this.$router.push(route)
}else{
this.$router.push({ path: route.path })
}
//update-begin-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单无法将Token信息传递过去
if(route.component.includes('layouts/IframePageView')){
this.$router.push(route)
}else{
this.$router.push({ path: route.path })
}
//update-end-author:taoyan date:20210528 for: 【菜单问题】配置一个iframe地址的菜单内部打开在搜索菜单上打开却新开了一个窗口
//update-end-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单无法将Token信息传递过去
this.searchMenuVisible = false
},
// update_end author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题

View File

@ -1,10 +1,10 @@
/** init domain config */
import Vue from 'vue'
//设置全局API_BASE_URL
Vue.prototype.API_BASE_URL = process.env.VUE_APP_API_BASE_URL
Vue.prototype.API_BASE_URL = window._CONFIG.VUE_APP_API_BASE_URL?window._CONFIG.VUE_APP_API_BASE_URL:process.env.VUE_APP_API_BASE_URL
window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL
//单点登录地址
window._CONFIG['casPrefixUrl'] = process.env.VUE_APP_CAS_BASE_URL
window._CONFIG['onlinePreviewDomainURL'] = process.env.VUE_APP_ONLINE_BASE_URL
window._CONFIG['casPrefixUrl'] = window._CONFIG.VUE_APP_CAS_BASE_URL?window._CONFIG.VUE_APP_CAS_BASE_URL:process.env.VUE_APP_CAS_BASE_URL
window._CONFIG['onlinePreviewDomainURL'] = window._CONFIG.VUE_APP_ONLINE_BASE_URL?window._CONFIG.VUE_APP_ONLINE_BASE_URL:process.env.VUE_APP_ONLINE_BASE_URL
window._CONFIG['staticDomainURL'] = Vue.prototype.API_BASE_URL + '/sys/common/static'
window._CONFIG['pdfDomainURL'] = Vue.prototype.API_BASE_URL+ '/sys/common/pdf/pdfPreviewIframe'

View File

@ -356,7 +356,7 @@ export const constantRouterMap = [
{
// OAuth2 登录路由
path: 'login',
name: 'login',
name: 'oauth2-app-login',
component: () => import(/* webpackChunkName: "oauth2-app.login" */ '@/views/user/oauth2/OAuth2Login')
},
]

View File

@ -0,0 +1,22 @@
/**
*微应用apps
* @name: 微应用名称 - 具有唯一性
* @entry: 微应用入口.必选 - 通过该地址加载微应用,
* @container: 微应用挂载节点 - 微应用加载完成后将挂载在该节点上
* @activeRule: 微应用触发的路由规则 - 触发路由规则后将加载该微应用
*/
//子应用列表
const _apps = [];
for (const key in process.env) {
if (key.includes('VUE_APP_SUB_')) {
const name = key.split('VUE_APP_SUB_')[1];
const obj = {
name,
entry: process.env[key],
container: '#content',
activeRule: name,
};
_apps.push(obj)
}
}
export const apps = _apps;

View File

@ -0,0 +1,68 @@
/**
* qiankun配置
*/
import {registerMicroApps, setDefaultMountApp, start, runAfterFirstMounted, addGlobalUncaughtErrorHandler} from 'qiankun';
import {apps} from './apps';
import {getProps, initGlState} from './state';
/**
* 重构apps
*/
function filterApps() {
apps.forEach((item) => {
//主应用需要传递给微应用的数据。
item.props = getProps();
//微应用触发的路由规则
item.activeRule = genActiveRule('/' + item.activeRule);
});
return apps;
}
/**
* 路由监听
* @param {*} routerPrefix 前缀
*/
function genActiveRule(routerPrefix) {
return location => location.pathname.startsWith(routerPrefix);
}
/**
* 微应用注册
*/
function registerApps() {
const _apps = filterApps();
registerMicroApps(_apps,
{
beforeLoad: [
loadApp => {
console.log('before load', loadApp);
}
],
beforeMount: [
mountApp => {
console.log('before mount', mountApp);
}
],
afterMount: [
mountApp => {
console.log('before mount', mountApp);
}
],
afterUnmount: [
unloadApp => {
console.log('after unload', unloadApp);
}
]
});
// 设置默认子应用,与 genActiveRule中的参数保持一致
// setDefaultMountApp();
// 第一个微应用 mount 后需要调用的方法,比如开启一些监控或者埋点脚本。
runAfterFirstMounted(() => console.log('开启监控'));
// 添加全局的未捕获异常处理器。
addGlobalUncaughtErrorHandler(event => console.log(event));
// 定义全局状态
initGlState();
//启动qiankun
start({});
}
export default registerApps;

View File

@ -0,0 +1,41 @@
/**
*公共数据
*/
import {initGlobalState} from 'qiankun';
import store from '@/store';
import router from '@/router';
import Vue from 'vue';
import {ACCESS_TOKEN} from "@/store/mutation-types"
//定义传入子应用的数据
export function getProps() {
return {
data: {
publicPath: process.env.BASE_URL,
token: Vue.ls.get(ACCESS_TOKEN),
store,
router
}
}
}
/**
* 定义全局状态,并返回通信方法,在主应用使用,微应用通过 props 获取通信方法。
* @param state 主应用穿的公共数据
*/
export function initGlState(info = {userName: 'admin'}) {
// 初始化state
const actions = initGlobalState(info);
// 设置新的值
actions.setGlobalState(info);
// 注册 观察者 函数 - 响应 globalState 变化,在 globalState 发生改变时触发该 观察者 函数。
actions.onGlobalStateChange((newState, prev) => {
// state: 变更后的状态; prev 变更前的状态
console.info("newState", newState)
for (const key in newState) {
console.info("onGlobalStateChange", key)
}
});
// 将action对象绑到Vue原型上为了项目中其他地方使用方便
Vue.prototype.$actions = actions;
}

View File

@ -3,9 +3,9 @@ import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
import permission from './modules/permission'
import enhance from './modules/enhance'
import online from './modules/online'
import permission from './modules/permission'
import getters from './getters'
Vue.use(Vuex)

View File

@ -19,4 +19,12 @@ export function demoFieldDefVal_getAddress(arg) {
arg = '朝阳区'
}
return `北京市 ${arg}`
}
/** 自定义JS函数示例 */
export function sayHi(name) {
if (!name) {
name = '张三'
}
return `您好我叫 ${name}`
}

View File

@ -83,19 +83,19 @@ export function formatDate(value, fmt) {
// 生成首页路由
export function generateIndexRouter(data) {
let indexRouter = [{
path: '/',
name: 'dashboard',
//component: () => import('@/components/layouts/BasicLayout'),
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
meta: { title: '首页' },
redirect: '/dashboard/analysis',
children: [
...generateChildRouters(data)
]
},{
"path": "*", "redirect": "/404", "hidden": true
}]
let indexRouter = [{
path: '/',
name: 'dashboard',
//component: () => import('@/components/layouts/BasicLayout'),
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
meta: { title: '首页' },
redirect: '/dashboard/analysis',
children: [
...generateChildRouters(data)
]
},{
"path": "*", "redirect": "/404", "hidden": true
}]
return indexRouter;
}
@ -106,9 +106,9 @@ function generateChildRouters (data) {
for (let item of data) {
let component = "";
if(item.component.indexOf("layouts")>=0){
component = "components/"+item.component;
component = "components/"+item.component;
}else{
component = "views/"+item.component;
component = "views/"+item.component;
}
// eslint-disable-next-line
@ -206,7 +206,7 @@ export function randomNumber() {
}
if (arguments.length === 1) {
let [length] = arguments
// 生成指定长度的随机数字,首位一定不是 0
// 生成指定长度的随机数字,首位一定不是 0
let nums = [...Array(length).keys()].map((i) => (i > 0 ? random(0, 9) : random(1, 9)))
return parseInt(nums.join(''))
} else if (arguments.length >= 2) {

View File

@ -254,7 +254,7 @@
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="树字典" prop="treeDict">
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="A01" />
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="B01" />
</a-form-model-item>
</a-col>
<a-col :span="12">选中的值(v-model){{ formData.treeDict }}</a-col>
@ -410,14 +410,11 @@
<!-- 省市县级联 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="省市县级联" prop="areaLinkage2">
<j-area-linkage v-model="formData.areaLinkage2" type="select"/>
</a-form-model-item>
</a-col>
<a-col :span="12">输入的值(v-model){{ formData.areaLinkage2 }}</a-col>
<a-form-model-item label="省市县级联" prop="areaLinkage2">
<j-area-linkage v-model="formData.areaLinkage2" type="select" style="float: left"/>
<span style="margin-left: 25px">输入的值(v-model){{ formData.areaLinkage2 }}</span>
</a-form-model-item>
</a-row>
<!-- 功能示例:关闭当前页面 -->
<a-row :gutter="24">
<a-col :span="12">

View File

@ -0,0 +1,231 @@
<template>
<a-card :bordered="false">
<a-row>
<a-col>
<a-switch v-bind="pageSwitchProps" v-model="pageSwitch"/>
</a-col>
<a-col>
<a-table
v-bind="tableProps"
@change="handleTableChange"
style="margin-top: 20px"
>
</a-table>
</a-col>
</a-row>
</a-card>
</template>
<script>
export default {
name: 'TableTotal',
data() {
return {
columns: [
{
title: '#',
width: '180px',
align: 'center',
dataIndex: 'rowIndex',
customRender: function (text, r, index) {
return (text !== '总计') ? (parseInt(index) + 1) : text
}
},
{
title: '姓名',
dataIndex: 'name',
width: 180,
},
{
title: '贡献点',
dataIndex: 'point',
width: 180,
},
{
title: '等级',
dataIndex: 'level',
width: 180,
},
{
title: '更新时间',
dataIndex: 'updateTime',
width: 180,
},
],
/* 分页参数 */
ipagination:{
current: 1,
pageSize: 10,
},
dataSource: [
{ id:"1",name: '张三', point: 23, level: 3, updateTime: '2019-8-14' },
{ name: '小王', point: 6, level: 1, updateTime: '2019-8-13' },
{ name: '李四', point: 53, level: 8, updateTime: '2019-8-12' },
{ name: '小红', point: 44, level: 5, updateTime: '2019-8-11' },
{ name: '王五', point: 97, level: 10, updateTime: '2019-8-10' },
{ name: '小明', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '小张', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '小六', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '小五', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '小赵', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '李华', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '小康', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '小鹿', point: 33, level: 2, updateTime: '2019-8-10' },
],
newArr:[],
newDataSource:[],
footerDataSource: [],
pageSwitch:true
}
},
computed:{
// 数据表格的固定属性
tableProps(){
let tableProps = {
size: 'middle',
rowKey:'rowIndex',
columns: this.columns,
scroll: {x: true},
}
let renderFooter = this.footerDataSource.length === 0 ? null : () => this.renderTableFooter(tableProps)
return {
...tableProps,
ref: 'table',
class: 'chart-data-list',
pagination:this.pageSwitch?this.ipagination:false,
columns: this.columns,
dataSource: this.dataSource,
footer: renderFooter,
}
},
pageSwitchProps() {
return {
checkedChildren: '分页',
unCheckedChildren: '分页',
style: {
position: 'absolute',
right: '0px',
top: '-10px'
}
}
},
},
mounted() {
// this.tableAddTotalRow(this.columns, this.dataSource)
/*新增分页合计方法*/
this.newDataSource=this.dataSource
this.dataHandling(1,this.ipagination.pageSize)
},
watch:{
//update-begin---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
'pageSwitch':function(val){
if(!val){
this.dataHandling('-1',0)
}else{
this.dataHandling(1,this.ipagination.pageSize)
}
},
'ipagination.current':function(val) {
this.dataHandling(val,this.ipagination.pageSize)
},
//当合计行变化时,绑定滚动条
'footerDataSource': {
async handler(dataSource) {
// 当底部合计行有值,并且显示出来时,再同步滚动条
if (dataSource && dataSource.length > 0) {
await this.$nextTick()
// 同步表与footer滚动
let dom = this.$refs.table.$el.querySelectorAll('.ant-table-body')[0]
let footerDom = this.$refs.footerTable.$el.querySelectorAll('.ant-table-body')[0]
dom.addEventListener(
'scroll',
() => {
footerDom.scrollLeft = dom.scrollLeft
},
true,
)
}
},
//update-end---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
}
},
methods: {
/** 表格增加合计行 */
tableAddTotalRow(columns, dataSource) {
let numKey = 'rowIndex'
let totalRow = { [numKey]: '合计' }
columns.forEach(column => {
let { key, dataIndex } = column
if (![key, dataIndex].includes(numKey)) {
let total = 0
dataSource.forEach(data => {
total += /^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN
console.log(data[dataIndex], ':', (/^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN))
})
if (Number.isNaN(total)) {
total = '-'
}
totalRow[dataIndex] = total
}
})
dataSource.push(totalRow)
},
handleTableChange(pagination, filters, sorter) {
this.ipagination = pagination;
},
//update-begin---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
/*如果分页走这个方法*/
dataHandling(pageNo,pageSize) {
//根据当前页数和每页显示条数分割数组
let arrs = [];
//如果pageNo不是-1不分页,那么需要对数据进行分页计算
if(pageNo!=-1){
arrs = this.newDataSource.slice((pageNo-1)*pageSize,pageNo*pageSize)
}else{
arrs = this.newDataSource
}
let newDataSource=[];
let newArr= { };
newArr.rowIndex="总计"
let level=0;
let point=0;
//每一项的数值相加
for (let j=0;j<arrs.length;j++){
level+=arrs[j].level;
point+=arrs[j].point;
}
newArr.level=level;
newArr.point=point;
newDataSource.push(newArr);
//给foot底部数组赋值
this.footerDataSource = newDataSource;
},
// 渲染表格底部合计行
renderTableFooter(tableProps) {
let h = this.$createElement
return h('a-table', {
ref: 'footerTable',
props: {
...tableProps,
pagination: false,
dataSource: this.footerDataSource,
showHeader: false,
},
})
//update-end---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
}
}
}
</script>
<style scoped lang="less">
/deep/ .chart-data-list .ant-table-footer .ant-table-body{
overflow: hidden !important;
}
/deep/ .ant-table-footer{
padding:0;
}
</style>

View File

@ -37,7 +37,9 @@
visible: false,
bodyStyle:{
padding: "0",
height:(window.innerHeight-150)+"px"
//update-begin---author:wangshuai ---date:20220104 for[JTC-411]火狐 分屏 图片大时,与按钮重叠,样式不好------------
height:(window.innerHeight-140)+"px"
//update-begin---author:wangshuai ---date:20220104 for[JTC-411]火狐 分屏 图片大时,与按钮重叠,样式不好------------
},
modalWidth:800,
}

View File

@ -1,6 +1,7 @@
<template>
<a-card title="磁盘监控">
<a-row>
<a-skeleton v-if="loading" active/>
<a-row v-else>
<template v-if="diskInfo && diskInfo.length>0">
<a-col :span="8" v-for="(item,index) in diskInfo" :key=" 'diskInfo'+index ">
<dash-chart-demo :title="item.name" :datasource="item.restPPT"></dash-chart-demo>
@ -23,6 +24,7 @@
},
data() {
return {
loading: true,
description: '磁盘监控',
//数据集
diskInfo:[],
@ -32,6 +34,7 @@
}
},
created() {
this.loading = true
getAction(this.url.queryDiskInfo).then((res)=>{
if(res.success){
for(var i=0;i<res.result.length;i++){
@ -39,7 +42,7 @@
}
this.diskInfo = res.result;
}
})
}).finally(() => this.loading = false)
}
}
</script>

View File

@ -1,7 +1,7 @@
<template>
<a-skeleton active :loading="loading" :paragraph="{rows: 17}">
<a-card>
<!-- Radis 信息实时监控 -->
<!-- Redis 信息实时监控 -->
<a-row :gutter="8">
<a-col :sm="24" :xl="12">
<area-chart-ty v-bind="memory"/>
@ -41,7 +41,7 @@
millisec: 3000,
// Key 实时数量
key: {
title: 'Radis Key 实时数量',
title: 'Redis Key 实时数量',
dataSource: [],
y: '数量',
height: 340,
@ -53,7 +53,7 @@
},
// 内存实时占用情况
memory: {
title: 'Radis 内存实时占用情况KB',
title: 'Redis 内存实时占用情况KB',
dataSource: [],
y: '内存KB',
min: 0,

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>

View File

@ -2,18 +2,14 @@
<div>
<a-form-model ref="form" :model="model" :rules="validatorRules" class="password-retrieval-form" @keyup.enter.native="nextStep">
<a-form-model-item label="手机" required prop="phone" :labelCol="{span: 5}" :wrapperCol="{span: 19}">
<a-row :gutter="16">
<a-col class="gutter-row" :span="20">
<a-input v-model="model.phone" type="text" autocomplete="false" placeholder="请输入手机号">
<a-icon slot="prefix" type="phone" :style="{ color: 'rgba(0,0,0,.25)'}"/>
</a-input>
</a-col>
</a-row>
<a-input v-model="model.phone" type="text" autocomplete="false" placeholder="请输入手机号">
<a-icon slot="prefix" type="phone" :style="{ color: 'rgba(0,0,0,.25)'}"/>
</a-input>
</a-form-model-item>
<a-form-model-item v-if="show" required prop="captcha" label="验证码" :labelCol="{span: 5}" :wrapperCol="{span: 19}">
<a-row :gutter="16">
<a-col class="gutter-row" :span="12">
<a-input v-model="model.captcha" type="text" placeholder="手机短信验证码">
<a-input @change="captchaChange" v-model="model.captcha" type="text" placeholder="手机短信验证码">
<a-icon slot="prefix" type="code" :style="{ color: 'rgba(0,0,0,.25)'}"/>
</a-input>
</a-col>
@ -158,6 +154,10 @@
}else{
callback()
}
},
//手机号改变事件
captchaChange(val){
this.$refs['form'].validateField("captcha")
}
}

View File

@ -14,6 +14,8 @@ module.exports = {
*/
// 如果你不需要生产环境的 source map可以将其设置为 false 以加速生产环境构建。
productionSourceMap: false,
//qiankuan打包时放开
//outputDir: "../dist/main",
// 多入口配置
// pages: {
// index: {
@ -23,7 +25,7 @@ module.exports = {
// }
// },
//打包app时放开该配置
//publicPath:'./',
//publicPath:'/',
configureWebpack: config => {
//生产环境取消 console.log
if (process.env.NODE_ENV === 'production') {
@ -85,6 +87,15 @@ module.exports = {
devServer: {
port: 3000,
// hot: true,
// disableHostCheck: true,
// overlay: {
// warnings: false,
// errors: true,
// },
// headers: {
// 'Access-Control-Allow-Origin': '*',
// },
proxy: {
/* '/api': {
target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统

View File

@ -814,6 +814,13 @@
dependencies:
regenerator-runtime "^0.13.4"
"@babel/runtime@^7.10.5", "@babel/runtime@^7.7.2":
version "7.17.2"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941"
integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==
dependencies:
regenerator-runtime "^0.13.4"
"@babel/template@^7.10.4":
version "7.10.4"
resolved "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
@ -923,7 +930,7 @@
error-stack-parser "^2.0.0"
string-width "^2.0.0"
"@tinymce/tinymce-vue@^2.1.0":
"@tinymce/tinymce-vue@2.1.0":
version "2.1.0"
resolved "https://registry.npmjs.org/@tinymce/tinymce-vue/-/tinymce-vue-2.1.0.tgz#cac3e935b217a277424f2258f3235824aa3c17c0"
integrity sha512-lDIpeLbkaobS/f00wWaOhGJdiZLdtL0dEDYB4JvqgVeAAoaDFG2PvXXP/kN49xpHpUe8vOdt7xFaN48nrPmsbQ==
@ -6267,6 +6274,13 @@ import-from@^2.1.0:
dependencies:
resolve-from "^3.0.0"
import-html-entry@^1.9.0:
version "1.11.1"
resolved "https://registry.npmjs.org/import-html-entry/-/import-html-entry-1.11.1.tgz#3d8c5977926bdd122ab8e658965c102068b4af8d"
integrity sha512-O7mCUTwKdYU49/LH6nq1adWPnUlZQpKeGWIEcDq07KTcqP/v0jBLEIVc0oE0Mtlw3CEe0eeKGMyhl6LwfXCV7A==
dependencies:
"@babel/runtime" "^7.7.2"
import-local@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc"
@ -7671,15 +7685,15 @@ mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.0, mkdirp@~0.5.1:
minimist "^1.2.5"
moment-timezone@^0.5.31:
version "0.5.33"
resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.33.tgz#b252fd6bb57f341c9b59a5ab61a8e51a73bbd22c"
integrity sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==
version "0.5.34"
resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.34.tgz#a75938f7476b88f155d3504a9343f7519d9a405c"
integrity sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==
dependencies:
moment ">= 2.9.0"
"moment@>= 2.9.0":
version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
moment@^2.21.0:
@ -9298,6 +9312,17 @@ q@^1.1.2:
resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
qiankun@^2.5.1:
version "2.6.3"
resolved "https://registry.npmjs.org/qiankun/-/qiankun-2.6.3.tgz#00c55a3d6655b2a78b6e0578d70c694cdb662073"
integrity sha512-h1NIokwjdt508HNPcWBdzoYFDJvhbpUUlFSa5dDkpJYVCl55iqqHgdyi1YayinmLmr/9s/zD+WQv+A2mbzkMQw==
dependencies:
"@babel/runtime" "^7.10.5"
import-html-entry "^1.9.0"
lodash "^4.17.11"
single-spa "^5.9.2"
tslib "^1.10.0"
qs@6.7.0:
version "6.7.0"
resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
@ -10127,6 +10152,11 @@ simple-swizzle@^0.2.2:
dependencies:
is-arrayish "^0.3.1"
single-spa@^5.9.2:
version "5.9.3"
resolved "https://registry.npmjs.org/single-spa/-/single-spa-5.9.3.tgz#2d151cbb3b273629a5b27b30a3b8ca847dcba4c5"
integrity sha512-qMGraRzIBsodV6569Fob4cQ4/yQNrcZ5Achh3SAQDljmqUtjAZ7BAA7GAyO/l5eizb7GtTmVq9Di7ORyKw82CQ==
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
@ -10870,7 +10900,7 @@ tinycolor2@^1.4.1:
resolved "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8"
integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=
tinymce@^5.3.2:
tinymce@5.4.1:
version "5.4.1"
resolved "https://registry.npmjs.org/tinymce/-/tinymce-5.4.1.tgz#4c101e78cbd22c148d6013f7c66eb0cb480723db"
integrity sha512-eUjwDVCTSHSnFfpzX5TjTHXsGj5gvPQwzo3RFDF374gfK5voHqcRGojvQnu4NtNW1BAb012/KW1tkXBbUrEveg==