Jeecg-Boot 2.2.0 版本发布 | 重磅升级

This commit is contained in:
zhangdaiscott
2020-05-03 12:43:53 +08:00
parent 046831e700
commit 9e046a07d4
335 changed files with 12894 additions and 27387 deletions

View File

@ -17,7 +17,7 @@
<div style="float: left;width:104px;height:104px;margin-right: 10px;margin: 0 8px 8px 0;">
<div
style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;">
<img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[0].key">
<img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[0].key">
</div>
</div>
</div>
@ -65,37 +65,33 @@
},
data() {
return {
description: '电子档补扫页面',
description: '图片预览页面',
spinning:false,
//数据集
dataSource: [{
key:0,
fileDetails:[
{
imgUrl:"https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2735633715,2749454924&fm=27&gp=0.jpg"
imgUrl:"https://static.jeecg.com/upload/test/3a4490d5d1cd495b826e528537a47cc1.jpg"
},
{
imgUrl:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3967239004,1951414302&fm=27&gp=0.jpg"
},
{
imgUrl:"https://ss0.bdstatic.com/6Ox1bjeh1BF3odCf/it/u=3660968530,985748925&fm=191&app=48&size=h300&n=0&g=4n&f=JPEG?sec=1853310920&t=5e64af964be378c6c2a3b0acc65dfe24"
imgUrl:"https://static.jeecg.com/upload/test/8f22cd945be44388bacbf0b88cf86cfa.png"
}
]
},{
key:1,
fileDetails:[
{
imgUrl:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=889120611,3801177793&fm=27&gp=0.jpg"
imgUrl:"https://static.jeecg.com/upload/test/u27356337152749454924fm27gp0_1588149731821.jpg"
},
{
imgUrl:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2445468140,2491956848&fm=27&gp=0.jpg"
imgUrl:"https://static.jeecg.com/upload/test/1_1588149743473.jpg"
}
]
},
}
],
url: {
},
url: {
}
}
},
created() {

View File

@ -42,11 +42,11 @@
spinning: false,
//数据集
dataSource: [
{id:'000',sort: 0,filePath: 'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2735633715,2749454924&fm=27&gp=0.jpg'},
{id:'111',sort: 1,filePath: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3967239004,1951414302&fm=27&gp=0.jpg'},
{id:'222',sort: 2,filePath: 'https://ss0.bdstatic.com/6Ox1bjeh1BF3odCf/it/u=3660968530,985748925&fm=191&app=48&size=h300&n=0&g=4n&f=JPEG?sec=1853310920&t=5e64af964be378c6c2a3b0acc65dfe24'},
{id:'333',sort: 3,filePath: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=889120611,3801177793&fm=27&gp=0.jpg'},
{id:'444',sort: 4,filePath: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2445468140,2491956848&fm=27&gp=0.jpg'}
{id:'000',sort: 0,filePath: 'https://static.jeecg.com/upload/test/1_1588149743473.jpg'},
{id:'111',sort: 1,filePath: 'https://static.jeecg.com/upload/test/u27356337152749454924fm27gp0_1588149731821.jpg'},
{id:'222',sort: 2,filePath: 'https://static.jeecg.com/upload/test/u24454681402491956848fm27gp0_1588149712663.jpg'},
{id:'333',sort: 3,filePath: 'https://static.jeecg.com/upload/test/8f22cd945be44388bacbf0b88cf86cfa.png'},
{id:'444',sort: 4,filePath: 'https://static.jeecg.com/upload/test/u8891206113801177793fm27gp0_1588149704459.jpg'}
],
oldDateSource:[],
newDateSource:[],

View File

@ -50,11 +50,11 @@
children: [{
title: '1页',
key: '0-0-0',
imgUrl:'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2735633715,2749454924&fm=27&gp=0.jpg'
imgUrl:'https://static.jeecg.com/upload/test/1_1588149743473.jpg'
}, {
title: '2页',
key: '0-0-1',
imgUrl:'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3967239004,1951414302&fm=27&gp=0.jpg'
imgUrl:'https://static.jeecg.com/upload/test/u27356337152749454924fm27gp0_1588149731821.jpg'
}]
},{
title: '第二页',
@ -62,11 +62,11 @@
children: [{
title: '1页',
key: '0-1-0',
imgUrl:'https://ss0.bdstatic.com/6Ox1bjeh1BF3odCf/it/u=3660968530,985748925&fm=191&app=48&size=h300&n=0&g=4n&f=JPEG?sec=1853310920&t=5e64af964be378c6c2a3b0acc65dfe24'
imgUrl:'https://static.jeecg.com/upload/test/u24454681402491956848fm27gp0_1588149712663.jpg'
}, {
title: '2页',
key: '0-1-1',
imgUrl:'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=889120611,3801177793&fm=27&gp=0.jpg'
imgUrl:'https://static.jeecg.com/upload/test/u8891206113801177793fm27gp0_1588149704459.jpg'
}]
},{
title: '第三页',
@ -74,7 +74,7 @@
children: [{
title: '1页',
key: '0-2-0',
imgUrl:'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2445468140,2491956848&fm=27&gp=0.jpg'
imgUrl:'https://static.jeecg.com/upload/test/1374962_1587621329085.jpg'
}]
}],
selectedKeys:[],

View File

@ -26,7 +26,7 @@
<a-tabs defaultActiveKey="1">
<a-tab-pane tab="response" key="1">
<textarea style="width:100%;font-size: 16px;font-weight:500" :rows="10" v-html="resultJson" readonly>
<textarea style="width:100%;font-size: 16px;font-weight:500" :rows="10" v-html="resultJson" readOnly>
</textarea>
</a-tab-pane>
</a-tabs>

View File

@ -6,12 +6,12 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户名">
<j-input placeholder="请输入名称模糊查询" v-model="queryParam.name"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="年龄">
<!-- <a-input placeholder="请输入名称查询" v-model="queryParam.age"></a-input>-->
<a-input placeholder="最小年龄" type="ge" v-model="queryParam.age_begin" style="width:calc(50% - 15px);"></a-input>
@ -20,7 +20,7 @@
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="生日">
<a-range-picker v-model="queryParam.birthdayRange"
format="YYYY-MM-DD"
@ -28,56 +28,42 @@
@change="onBirthdayChange" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="性别">
<j-dict-select-tag v-model="queryParam.sex" placeholder="请选择性别" dictCode="sex"/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="选择用户">
<j-dict-select-tag v-model="queryParam.id" placeholder="请选择用户" dictCode="demo,name,id"/>
</a-form-item>
</a-col>
</template>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col>
</span>
<a-col :md="6" :sm="24">
<!-- <template v-if="superQueryFlag">
<a-tooltip title="已有高级查询条件生效!">
<button :disabled="false" class="ant-btn ant-btn-primary" @click="superQuery">
<a-icon type="appstore" theme="twoTone" spin="true"></a-icon>
<span>高级查询</span>
</button>
</a-tooltip>
</template>
<a-button v-else type="primary" @click="superQuery" icon="filter">高级查询</a-button>
-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="fieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="plus" @click="jump">创建单据</a-button>
<a-button type="primary" icon="plus" @click="onetomany">一对多</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('demo')">导出</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>
<!-- 高级查询区域 -->
<j-super-query :fieldList="fieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
@ -112,7 +98,7 @@
</a-row>
</a-checkbox-group>
</template>
<a><a-icon type="setting" />自定义列</a>
<a><a-icon type="setting" />设置</a>
</a-popover>
</span>
</div>
@ -178,25 +164,27 @@
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue';
import JInput from '@/components/jeecg/JInput.vue';
import JeecgDemoTabsModal from './modules/JeecgDemoTabsModal'
import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil'
import {initDictOptions, filterDictText,filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import Vue from 'vue'
import { filterObj } from '@/utils/util';
//高级查询modal需要参数
const superQueryFieldList=[{
type:"date",
value:"birthday",
text:"生日"
},{
type:"string",
value:"name",
text:"用户名"
},{
type:"int",
value:"age",
text:"年龄"
}]
const superQueryFieldList=[
{
type: "string",
value: "name",
text: "用户名"
}, {
type: "int",
value: "age",
text: "年龄"
}, {
type: "date",
value: "birthday",
text: "生日"
}
]
export default {
name: "JeecgDemoList",
mixins:[JeecgListMixin],
@ -208,7 +196,7 @@
},
data() {
return {
description: '用户管理页面',
description: '单表示例列表',
//字典数组缓存
sexDictOptions: [],
importExcelUrl:`${window._CONFIG['domianURL']}/test/jeecgDemo/importExcel`,
@ -249,7 +237,7 @@
dataIndex: 'sex',
customRender: (text) => {
//字典值替换通用方法
return filterDictText(this.sexDictOptions, text);
return filterDictTextByCache('sex', text);
}
},
{
@ -293,12 +281,11 @@
},
methods: {
getQueryParams(){
console.log(this.queryParam.birthdayRange)
//高级查询器
let sqp = {}
if(this.superQueryParams){
sqp['superQueryParams']=encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
@ -380,38 +367,5 @@
}
</script>
<style scoped>
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.ant-table-tbody .ant-table-row td {
padding-top: 15px;
padding-bottom: 15px;
}
.anty-row-operator button {
margin: 0 5px
}
.ant-btn-danger {
background-color: #ffffff
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
/** Button按钮间距 */
.ant-btn {
margin-left: 3px
}
@import '~@assets/less/common.less';
</style>

View File

@ -28,7 +28,7 @@
</div>
</template>
<template v-else>
(暂无材料,点击右侧"选择文件""扫描上传"上传文件)
(暂无材料,点击"选择文件""扫描上传"上传文件)
</template>
</a-col>
</a-row>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false" style="height:100%">
<a-card :bordered="false" style="height:100%;padding-bottom:200px; ">
<div class="table-page-search-wrapper">
<a-form layout="inline" :form="form">
@ -10,7 +10,7 @@
<a-col :span="12">
<a-form-item label="性别">
<j-dict-select-tag v-model="formData.sex" title="性别" dictCode="sex" placeholder="请选择性别"/>
<!-- <j-dict-select-tag title="性别" dictCode="sex" disabled/>-->
<!-- <j-dict-select-tag title="性别" dictCode="sex" disabled/>-->
</a-form-item>
</a-col>
<a-col :span="12">选中值:{{ formData.sex}}</a-col>
@ -36,6 +36,47 @@
<a-col :span="12">选中值:{{ formData.user2}}</a-col>
</a-row>
<!-- 字典搜索 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="字典搜索(同步)">
<j-search-select-tag placeholder="请做出你的选择" v-model="formData.searchValue" :dictOptions="searchOptions">
</j-search-select-tag>
</a-form-item>
</a-col>
<a-col :span="12">选中值:{{ formData.searchValue}}</a-col>
</a-row>
<!-- 字典搜索 异步加载 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="字典搜索(异步)">
<j-search-select-tag
placeholder="请做出你的选择"
v-model="formData.asyncSelectValue"
dict="sys_depart,depart_name,id"
:async="true">
</j-search-select-tag>
</a-form-item>
</a-col>
<a-col :span="12">选中值:{{ formData.asyncSelectValue}}</a-col>
</a-row>
<!-- JMultiSelectTag -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="字典下拉(多选)">
<j-multi-select-tag
v-model="formData.selMuti"
dictCode="sex"
placeholder="请选择">
</j-multi-select-tag>
</a-form-item>
</a-col>
<a-col :span="12">多选组合(v-model){{ formData.selMuti }}</a-col>
</a-row>
<!-- 部门选择控件 -->
<a-row :gutter="24">
<a-col :span="12">
@ -79,12 +120,22 @@
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="选择角色">
<j-select-role v-model="formData.selectRole"/>
<j-select-role v-model="formData.selectRole" @change="changeMe"/>
</a-form-item>
</a-col>
<a-col :span="12">选中值:{{ formData.selectRole}}</a-col>
</a-row>
<!-- 职务选择 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="选择职务">
<j-select-position v-model="formData.selectPosition" />
</a-form-item>
</a-col>
<a-col :span="12">选中值:{{ formData.selectPosition}}</a-col>
</a-row>
<!-- JCheckbox -->
<a-row :gutter="24">
<a-col :span="12">
@ -142,16 +193,6 @@
<a-col :span="12">过长剪切:{{ jellipsis.value }}</a-col>
</a-row>
<!-- JGraphicCode -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="验证码">
<j-graphic-code @success="generateCode"/>
</a-form-item>
</a-col>
<a-col :span="12">验证码:{{ jgraphicCode.value }}</a-col>
</a-row>
<!-- JSlider -->
<a-row :gutter="24">
<a-col :span="12">
@ -200,16 +241,10 @@
</a-col>
</a-row>
<!-- JSuperQuery 高级查询 -->
<!-- JTreeSelect 树组件 -->
<!-- JTreeTable 树列表 -->
<!-- JUpload.上传组件 -->
<!-- JImportModal 导入组件 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="树字典">
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="A01" />
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="B01" />
</a-form-item>
</a-col>
<a-col :span="12">选中的值(v-model){{ formData.treeDict }}</a-col>
@ -227,7 +262,7 @@
/>
</a-form-item>
</a-col>
<a-col :spapn="12">选中的值(v-model){{ formData.treeSelect }}</a-col>
<a-col :span="12">选中的值(v-model){{ formData.treeSelect }}</a-col>
</a-row>
<a-row :gutter="24">
@ -243,7 +278,17 @@
/>
</a-form-item>
</a-col>
<a-col :spapn="12">选中的值(v-model){{ formData.treeSelectMultiple }}</a-col>
<a-col :span="12">选中的值(v-model){{ formData.treeSelectMultiple }}</a-col>
</a-row>
<!-- 分类字典树 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="分类字典树">
<j-category-select v-model="formData.selectCategory" pcode="A01"/>
</a-form-item>
</a-col>
<a-col :span="12">选中的值(v-model){{ formData.selectCategory }}</a-col>
</a-row>
<!-- VueCron -->
@ -267,19 +312,38 @@
<a-col :span="12">
<a-form-item label="高级查询自定义按钮">
<j-super-query :fieldList="superQuery.fieldList">
<!-- 直接在内部写一个按钮即可,点击事件自动添加 -->
<a-button type="primary" ghost icon="clock-circle">高级查询</a-button>
<!--
v-slot:button 可以更高自由的定制按钮
参数介绍:
isActive: 是否是激活状态(已有高级查询条件生效)
isMobile: 当前是否是移动端,可针对移动端展示不同的样式
open: 打开弹窗,一个方法,可绑定点击事件
reset: 重置所有查询条件,一个方法,可绑定点击事件
-->
<template v-slot:button="{isActive,isMobile,open,reset}">
<!-- 定义的是普通状态下的按钮 -->
<a-button v-if="!isActive" type="primary" ghost icon="clock-circle" @click="open()">高级查询</a-button>
<!-- 定义的当有高级查询条件生效状态下的按钮 -->
<a-button-group v-else>
<a-button type="primary" ghost @click="open()">
<a-icon type="plus-circle" spin/>
<span>高级查询</span>
</a-button>
<a-button v-if="isMobile" type="primary" ghost icon="delete" @click="reset()"/>
</a-button-group>
</template>
</j-super-query>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="图片上传">
<j-image-upload v-model="imgList"></j-image-upload>
</a-form-item>
</a-col>
<a-col :spapn="12">选中的值(v-model){{ imgList }}</a-col>
<a-col :span="12">选中的值(v-model){{ imgList }}</a-col>
</a-row>
<a-row :gutter="24" style="margin-top: 65px;margin-bottom:50px;">
<a-col :span="12">
@ -287,12 +351,80 @@
<j-upload v-model="fileList"></j-upload>
</a-form-item>
</a-col>
<a-col :spapn="12">
<a-col :span="12">
选中的值(v-model)
<j-ellipsis :value="fileList" :length="30" v-if="fileList.length>0"/>
</a-col>
</a-row>
<!-- 特殊查询组件 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="特殊查询组件">
<a-row>
<a-col :span="16">
<j-input v-model="formData.jInput" :type="jInput.type"/>
</a-col>
<a-col :span="3" style="text-align: right;" >查询类型:</a-col>
<a-col :span="5">
<a-select v-model="jInput.type" :options="jInput.options"></a-select>
</a-col>
</a-row>
</a-form-item>
</a-col>
<a-col :span="12">输入的值(v-model){{ formData.jInput }}</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="15">
<a-form-item label="MarkdownEditor" style="min-height: 300px">
<j-markdown-editor v-model="content"></j-markdown-editor>
</a-form-item>
</a-col>
<a-col :span="9">
输入的值(v-model){{ content }}
</a-col>
</a-row>
<!-- 省市县级联 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="省市县级联">
<j-area-linkage v-model="formData.areaLinkage1" type="cascader"/>
</a-form-item>
</a-col>
<a-col :span="12">输入的值(v-model){{ formData.areaLinkage1 }}</a-col>
</a-row>
<!-- 省市县级联 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="省市县级联">
<j-area-linkage v-model="formData.areaLinkage2" type="select"/>
</a-form-item>
</a-col>
<a-col :span="12">输入的值(v-model){{ formData.areaLinkage2 }}</a-col>
</a-row>
<!-- 功能示例:关闭当前页面 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="功能示例关闭当前页面">
<a-button type="primary" @click="handleCloseCurrentPage">点击关闭当前页面</a-button>
</a-form-item>
</a-col>
</a-row>
<!-- JPopup示例 -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="JPopup示例">
<j-popup v-model="formData.jPopup" code="demo" field="name" orgFields="name" destFields="name"/>
</a-form-item>
</a-col>
<a-col :span="12">选择的值(v-model){{ formData.jPopup }}</a-col>
</a-row>
</a-form>
</div>
@ -311,7 +443,6 @@
import JDate from '@/components/jeecg/JDate'
import JEditor from '@/components/jeecg/JEditor'
import JEllipsis from '@/components/jeecg/JEllipsis'
import JGraphicCode from '@/components/jeecg/JGraphicCode'
import JSlider from '@/components/jeecg/JSlider'
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
import JTreeDict from "../../components/jeecg/JTreeDict.vue";
@ -320,10 +451,23 @@
import JSuperQuery from '@/components/jeecg/JSuperQuery'
import JUpload from '@/components/jeecg/JUpload'
import JImageUpload from '@/components/jeecg/JImageUpload'
import JSelectPosition from '@comp/jeecgbiz/JSelectPosition'
import JCategorySelect from '@comp/jeecg/JCategorySelect'
import JMultiSelectTag from '@comp/dict/JMultiSelectTag'
import JInput from '@comp/jeecg/JInput'
import JAreaLinkage from '@comp/jeecg/JAreaLinkage'
import JMarkdownEditor from '@/components/jeecg/JMarkdownEditor/index'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
export default {
name: 'SelectDemo',
inject:['closeCurrent'],
components: {
JMarkdownEditor,
JAreaLinkage,
JInput,
JCategorySelect,
JSelectPosition,
JImageUpload,
JUpload,
JTreeDict,
@ -334,14 +478,19 @@
JSelectRole,
JCheckbox,
JCodeEditor,
JDate, JEditor, JEllipsis, JGraphicCode, JSlider, JSelectMultiple,
JCron, JTreeSelect, JSuperQuery
JDate, JEditor, JEllipsis, JSlider, JSelectMultiple,
JCron, JTreeSelect, JSuperQuery, JMultiSelectTag,
JSearchSelectTag
},
data() {
return {
selectList: [],
selectedDepUsers: '',
formData: {},
formData: {
areaLinkage1: '110105',
areaLinkage2: '140221',
sex: 1
},
form: this.$form.createForm(this),
departId: '4f1765520d6346f9bd9c79e2479e5b12,57197590443c44f083d42ae24ef26a2c',
userIds: 'admin',
@ -370,9 +519,6 @@ sayHi('hello, world!')`
jellipsis: {
value: '这是一串很长很长的文字段落。这是一串很长很长的文字段落。这是一串很长很长的文字段落。这是一串很长很长的文字段落。'
},
jgraphicCode: {
value: ''
},
jslider: {
value: false
},
@ -396,11 +542,41 @@ sayHi('hello, world!')`
fieldList: [
{ type: 'input', value: 'name', text: '姓名', },
{ type: 'select', value: 'sex', text: '性别', dictCode: 'sex' },
{ type: 'number', value: 'age', text: '年龄', }
{ type: 'number', value: 'age', text: '年龄', },
{
type: 'select', value: 'hobby', text: '爱好',
options: [
{ label: '音乐', value: '1' },
{ label: '游戏', value: '2' },
{ label: '电影', value: '3' },
{ label: '读书', value: '4' },
]
},
]
},
fileList:[],
imgList:[],
jInput: {
type: 'like',
options: [
{ value: 'like', label: '模糊like' },
{ value: 'ne', label: '不等于ne' },
{ value: 'ge', label: '大于等于ge' },
{ value: 'le', label: '小于等于le)' },
],
},
content: '',
searchOptions:[{
text:"选项一",
value:"1"
},{
text:"选项二",
value:"2"
},{
text:"选项三",
value:"3"
}],
}
},
computed: {
@ -419,6 +595,9 @@ sayHi('hello, world!')`
getDepartIdValue() {
return this.form.getFieldValue('departId')
},
changeMe() {
console.log('you so ... , change Me')
},
selectOK: function(data) {
this.selectList = data
},
@ -437,9 +616,6 @@ sayHi('hello, world!')`
onSearchDepUserCallBack(selectedDepUsers) {
this.selectedDepUsers = selectedDepUsers
},
generateCode(value) {
this.jgraphicCode.value = value.toLowerCase()
},
handleJSliderSuccess(value) {
this.jslider.value = value
},
@ -447,7 +623,14 @@ sayHi('hello, world!')`
this.$nextTick(() => {
this.form.cronExpression = data;
})
}
},
handleCloseCurrentPage() {
// 注意:以下代码必须存在
// inject:['closeCurrent'],
this.closeCurrent()
},
}
}
</script>

View File

@ -33,6 +33,7 @@
<script>
import { getAction } from '@/api/manage'
export default {
props: ['sex','name'],
data () {
return {
formLayout: 'horizontal',
@ -63,11 +64,25 @@
},
},
created (){
console.log('============= online href common props ============= ');
console.log('props sex: ',this.sex);
console.log('props name: ',this.name);
getAction('/api/area').then((res) => {
console.log("------------")
console.log(res)
this.areaOptions = res;
})
}
},
watch: {
$route: {
immediate: true,
handler() {
console.log('============= online href $route props ============= ');
let sex = this.$route.query.sex
console.log('$route sex: ', sex);
}
}
},
}
</script>

View File

@ -25,7 +25,7 @@
@selectRowChange="handleSelectRowChange">
<template v-slot:action="props">
<a @click="handleDelete(props)">{{ props.text }}</a>
<a @click="handleDelete(props)">删除</a>
</template>
</j-editable-table>
@ -154,6 +154,8 @@
type: FormTypes.inputNumber,
defaultValue: 32,
placeholder: '${title}',
// 是否是统计列,只有 inputNumber 才能设置统计列
statistics: true,
validateRules: [{ required: true, message: '请输入${title}' }]
},
{
@ -166,6 +168,15 @@
placeholder: '请选择${title}',
validateRules: [{ required: true, message: '请选择${title}' }]
},
{
title: '数字',
key: 'money',
width: '320px',
type: FormTypes.inputNumber,
defaultValue: '100.32',
placeholder: '请选择${title}',
validateRules: [{ required: true, message: '请选择${title}' }]
},
{
title: '可以为空',
key: 'isNull',
@ -175,6 +186,16 @@
customValue: ['Y', 'N'], // true ,false
defaultChecked: false
},
{
type: FormTypes.popup,
key: 'popup',
title: 'JPopup',
width: '180px',
popupCode: 'demo',
field: 'name',
orgFields: 'name',
destFields: 'name'
},
{
title: '操作',
key: 'action',
@ -182,7 +203,6 @@
width: '100px',
type: FormTypes.slot,
slotName: 'action',
defaultValue: '删除'
}
],

View File

@ -624,7 +624,7 @@
}
},
callback (key) {
console.log(key)
//console.log(key)
}
}
}

View File

@ -160,7 +160,6 @@
add: "/test/order/addCustomer",
edit: "/test/order/editCustomer",
fileUpload: window._CONFIG['domianURL'] + "/sys/common/upload",
imgerver: window._CONFIG['staticDomainURL'],
getOrderCustomerList: "/test/order/listOrderCustomerByMainId",
},
validatorRules: {
@ -246,7 +245,11 @@
let formData = Object.assign(this.model, values);
console.log(formData);
formData.orderId = this.orderId;
formData.idcardPic = this.fileList;
if(this.fileList != '') {
formData.idcardPic = this.fileList;
}else{
formData.idcardPic = '';
}
httpAction(httpurl, formData, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
@ -278,36 +281,6 @@
callback("您的身份证号码格式不正确!");
}
},
handleChange(info) {
this.fileList = info.fileList;
if (info.file.status === 'uploading') {
return
}
if (info.file.status === 'done') {
var response = info.file.response;
if (!response.success) {
this.$message.warning(response.message);
}
}
},
handlePicCancel() {
this.previewVisible = false
this.previewImage=''
},
handlePicView(url){
this.previewImage = this.url.imgerver + "/" + url
this.previewVisible = true
},
handlePreview(file) {
this.previewImage = file.url || file.thumbUrl
this.previewVisible = true
},
getIdCardView(url) {
// let pics = this.model.idcardPic.split(",");
//let pics_len = pics.length;
// 显示上传的最后一个图片
return this.url.imgerver + "/" + url
}
}
}
</script>