20220803-成衣样板中的下拉列表前后端修改

zhc4dev
赵玉瑞 2 years ago
parent b406e9eb69
commit 1960d1e18a
  1. 184
      ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
  2. 33
      ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
  3. 108
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  4. 55
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java

@ -19,10 +19,10 @@
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<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">
<!--<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a>-->
</span>
</a-col>
</a-row>
@ -34,23 +34,31 @@
<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-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="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<j-super-query :fieldList="superFieldList" 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"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
@ -74,8 +82,9 @@
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<span v-else style="font-size: 12px;font-style: italic;">
<img :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<a-divider type="vertical" />
<img :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
<a-divider type="vertical"/>
<a-button
:ghost="true"
type="primary"
@ -99,15 +108,29 @@
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<span slot="action" slot-scope="text,record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<!-- <a @click="fuzhi(record)">复制</a>-->
<!-- <a-divider type="vertical" />-->
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
<!-- <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
<a-menu slot="overlay">
<a-menu-item>
<!-- <a @click="handleDetail(record)">详情</a>-->
&lt;!&ndash;<a @click="handleDetail(record)">详情</a>&ndash;&gt;
<a @click="openDetail(record.id)">详情</a>
</a-menu-item>
@ -118,7 +141,7 @@
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</span>-->
</a-table>
</div>
@ -129,19 +152,20 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyClothSampleModal from './modules/ZyClothSampleModal'
import ZyClothSampleDetail from './modules/ZyClothSampleDetail'
export default {
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyClothSampleModal from './modules/ZyClothSampleModal'
import ZyClothSampleDetail from './modules/ZyClothSampleDetail'
export default {
name: 'ZyClothSampleList',
mixins:[JeecgListMixin, mixinDevice],
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyClothSampleModal,
ZyClothSampleDetail
},
data () {
data() {
return {
description: '成衣样板管理页面',
//
@ -149,56 +173,78 @@
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title:'编号',
align:"center",
title: '编号',
align: "center",
dataIndex: 'nums'
},
{
title:'款式',
align:"center",
dataIndex: 'clothName'
title: '款式',
align: "center",
dataIndex: 'styleId'
},
{
title:'描述',
align:"center",
dataIndex: 'descr'
title: '型号',
align: "center",
dataIndex: 'stylemodelId'
},
/*{
title: '模块样板',
align: "center",
dataIndex: 'modelSample'
},*/
{
title:'图片',
align:"center",
dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'}
title: '模块样板',
align: "center",
dataIndex: 'modelSample_dictText'
},
{
title:'用户',
align:"center",
title: '用户',
align: "center",
dataIndex: 'userId'
},
{
title:'用户类型',
align:"center",
dataIndex: 'type'
},
{
title:'时间',
align:"center",
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
/*{
title: '成衣名称',
align: "center",
dataIndex: 'clothName'
},*/
/*{
title: '描述',
align: "center",
dataIndex: 'descr'
},*/
/*{
title: '图片',
align: "center",
dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'}
},*/
/*{
title: '用户类型',
align: "center",
dataIndex: 'type'
},*/
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
@ -209,45 +255,45 @@
importExcelUrl: "zyclothsample/zyClothSample/importExcel",
},
dictOptions:{},
superFieldList:[],
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
initDictConfig() {
},
lookFile (fileUrl) {
let file=window._CONFIG['domianURL']+"/sys/common/static/"+fileUrl
lookFile(fileUrl) {
let file = window._CONFIG['domianURL'] + "/sys/common/static/" + fileUrl
let Base64 = require('js-base64').Base64;
let url =window._CONFIG['onlinePreviewDomainURL']+ '/onlinePreview?url=' + encodeURIComponent(Base64.encode(file))
let url = window._CONFIG['onlinePreviewDomainURL'] + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(file))
window.open(url);
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'nums',text:'编号',dictCode:''})
fieldList.push({type:'string',value:'clothName',text:'成衣名称',dictCode:''})
fieldList.push({type:'string',value:'descr',text:'描述',dictCode:''})
fieldList.push({type:'string',value:'url',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户',dictCode:''})
fieldList.push({type:'string',value:'type',text:'用户类型',dictCode:''})
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode: ''})
fieldList.push({type: 'string', value: 'styleId', text: '款式', dictCode: ''})
fieldList.push({type: 'string', value: 'stylemodelId', text: '型号', dictCode: ''})
fieldList.push({type: 'string', value: 'modelSample', text: '模块样板', dictCode: ''})
fieldList.push({type: 'string', value: 'userId', text: '用户', dictCode: ''})
fieldList.push({type: 'string', value: 'createTime', text: '创建时间', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id){
openDetail(id) {
this.$refs.ZyClothSampleDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -8,31 +8,50 @@
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<!-- <a-col :span="24">
<a-form-model-item label="成衣名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothName">
<a-input v-model="model.clothName" placeholder="请输入成衣名称" ></a-input>
</a-form-model-item>
</a-col>
</a-col>-->
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<a-input v-model="model.styleId" placeholder="请输入款式" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr">
<a-input v-model="model.descr" placeholder="请输入描述" ></a-input>
</a-form-model-item>
</a-col>
</a-col>-->
<a-col :span="24">
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId">
<a-input v-model="model.stylemodelId" placeholder="请输入型号" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">
<j-image-upload isMultiple v-model="model.url" ></j-image-upload>
</a-form-model-item>
</a-col>
</a-col>-->
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户" ></a-input>
<a-form-model-item label="模块样板" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modelSample">
<!-- <j-image-upload isMultiple v-model="model.url" ></j-image-upload>-->
<!-- <a-input v-model="model.modelSample" placeholder="请输入模块样板" ></a-input>-->
<j-dict-select-tag v-model="model.modelSample" placeholder="请选择模块样板"
dictCode="zy_module_sample,module_name,id"/>
<!-- <j-search-select-tag v-model="model.modelSample" dict="zy_module_sample" dictText="module_name", dictCode="id" />-->
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户名" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-model-item label="用户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入用户类型" ></a-input>
</a-form-model-item>
</a-col>
</a-col>-->
</a-row>
</a-form-model>
</j-form-container>

@ -6,17 +6,20 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装类型">
<j-dict-select-tag placeholder="请输入服装类型" dictCode="zy_cloths_type,type_name,id" v-model="queryParam.typeId" ></j-dict-select-tag>
<j-dict-select-tag placeholder="请输入服装类型" dictCode="zy_cloths_type,type_name,id"
v-model="queryParam.typeId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" ></j-dict-select-tag>
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="制衣模块">
<j-dict-select-tag placeholder="请输入制衣模块" dictCode="zy_cloths_modular ,modular_name,id" v-model="queryParam.modularId" ></j-dict-select-tag>
<j-dict-select-tag placeholder="请输入制衣模块" dictCode="zy_cloths_modular ,modular_name,id"
v-model="queryParam.modularId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -34,23 +37,29 @@
<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-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="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <j-super-query :fieldList="superFieldList" 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"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
@ -73,7 +82,8 @@
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@ -90,9 +100,9 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
@ -107,19 +117,19 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyStyleModuleModal from './modules/ZyStyleModuleModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyStyleModuleModal from './modules/ZyStyleModuleModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
export default {
name: 'ZyStyleModuleList',
mixins:[JeecgListMixin, mixinDevice],
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyStyleModuleModal
},
data () {
data() {
return {
description: '款式模块表管理页面',
//
@ -127,45 +137,45 @@
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title:'服装类型',
align:"center",
title: '服装类型',
align: "center",
dataIndex: 'typeName'
},
{
title:'款式编号',
align:"center",
title: '款式编号',
align: "center",
dataIndex: 'styleNums'
},
{
title:'款式名称',
align:"center",
title: '款式名称',
align: "center",
dataIndex: 'styleNames'
},
{
title:'模块编号',
align:"center",
title: '模块编号',
align: "center",
dataIndex: 'modularNums'
},
{
title:'模块名称',
align:"center",
title: '模块名称',
align: "center",
dataIndex: 'modularName'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
@ -176,31 +186,31 @@
importExcelUrl: "zystylemodule/zyStyleModule/importExcel",
},
dictOptions:{},
superFieldList:[],
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
initDictConfig() {
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'typeId',text:'类型id',dictCode:"zy_cloths_type,id,type_name"})
fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:"zy_cloths_style,id,style_names"})
fieldList.push({type:'string',value:'modularId',text:'模块id',dictCode:"zy_cloths_modular ,id,modular_name"})
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'typeId', text: '类型id', dictCode: "zy_cloths_type,id,type_name"})
fieldList.push({type: 'string', value: 'styleId', text: '款式id', dictCode: "zy_cloths_style,id,style_names"})
fieldList.push({type: 'string', value: 'modularId', text: '模块id', dictCode: "zy_cloths_modular ,id,modular_name"})
this.superFieldList = fieldList
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -1,21 +1,20 @@
package org.jeecg.modules.zyclothsample.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 成衣样板
@ -39,6 +38,36 @@ public class ZyClothSample implements Serializable {
@Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号")
private String nums;
/**款式*/
@Excel(name = "款式", width = 15)
@ApiModelProperty(value = "款式")
private String styleId;
/**型号*/
@Excel(name = "型号", width = 15)
@ApiModelProperty(value = "型号")
private String stylemodelId;
/**管理模块样板*/
/*@Dict(dicCode = "id",dictTable = "sys_user",dicText = "realname")
private String managerId;*/
//dicCode为关联表的组件
//dictTable为关联表
//dicText 为需要显示的内容
@Excel(name = "模块样板", width = 15)
@ApiModelProperty(value = "模块样板")
@Dict(dicCode = "id",dictTable = "zy_module_sample",dicText = "module_name")
private String modelSample;
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
private String userId;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**成衣名称*/
@Excel(name = "成衣名称", width = 15)
@ApiModelProperty(value = "成衣名称")
@ -51,17 +80,9 @@ public class ZyClothSample implements Serializable {
@Excel(name = "图片", width = 15)
@ApiModelProperty(value = "图片")
private String url;
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
private String userId;
/**用户类型*/
@Excel(name = "用户类型", width = 15)
@ApiModelProperty(value = "用户类型")
private String type;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建日期")
private Date createTime;
}

Loading…
Cancel
Save