2022-10-13-赵玉瑞-1.3.3-修改部件样板

zhc4dev
赵玉瑞 2 years ago
parent 040b5e3328
commit da92e5bd73
  1. 64
      ant-design-vue-jeecg/src/views/sample/ZyComponentSampleList.vue
  2. 63
      ant-design-vue-jeecg/src/views/sample/modules/ZyComponentSampleForm.vue
  3. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/sample/entity/ZyComponentSample.java

@ -4,6 +4,26 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="编号">
<a-input placeholder="请输入编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="款式">
<a-input placeholder="请输入款式名称" v-model="queryParam.styleName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>-->
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -13,9 +33,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-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>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
@ -71,7 +91,14 @@
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
@ -83,7 +110,7 @@
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</a-dropdown>-->
</span>
</a-table>
@ -128,35 +155,45 @@
dataIndex: 'nums'
},
{
title:'部件名称',
title:'款式名称',
align:"center",
dataIndex: 'componentName'
dataIndex: 'styleName'
},
{
title:'部件名称',
align:"center",
dataIndex: 'componentName_dictText'
},
/*{
title:'描述',
align:"center",
dataIndex: 'descr'
},
{
},*/
/*{
title:'图片',
align:"center",
dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'}
},
},*/
{
title:'模块',
title:'模块样板',
align:"center",
dataIndex: 'moduleId_dictText'
},
{
/*{
title:'用户',
align:"center",
dataIndex: 'userId'
},
{
},*/
/*{
title:'用户类型',
align:"center",
dataIndex: 'userType'
},*/
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
@ -199,6 +236,7 @@
fieldList.push({type:'string',value:'moduleId',text:'模块',dictCode:'zy_module_sample,module_name,id'})
fieldList.push({type:'string',value:'userId',text:'用户',dictCode:''})
fieldList.push({type:'string',value:'userType',text:'用户类型',dictCode:''})
fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''})
this.superFieldList = fieldList
}
}

@ -3,41 +3,61 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<!--关联服装款式表 zy_cloths_style 关联列名称 传值id-->
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleName">
<j-dict-select-tag v-model="model.styleName" placeholder="请输入款式"
dict-code="zy_cloths_style,style_names,style_names"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentName">
<a-input v-model="model.componentName" placeholder="请输入部件名称" ></a-input>
<a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">
<j-dict-select-tag type="list" v-model="model.moduleId" dictCode="zy_module_sample,module_name,id" placeholder="请选择模块" />
</a-form-model-item>
</a-col>
<!--zy_cloths_component 关联制衣部件-->
<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 label="部件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentName">
<j-dict-select-tag v-model="model.componentName" placeholder="请输入部件名称"
dict-code="zy_cloths_component,parts_name,id"></j-dict-select-tag>
<!-- <j-dict-select-tag v-model="model.componentName" placeholder="请输入部件名称"
dict-code="zy_component_sample,component_name,component_name"></j-dict-select-tag>-->
</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 label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">
<j-dict-select-tag type="list" v-model="model.moduleId" dictCode="zy_module_sample,module_name,id" placeholder="请选择模块" />
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr">
<a-textarea v-model="model.descr" placeholder="请输入描述" ></a-textarea>
</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>
<j-dict-select-tag v-model="model.userId" placeholder="请输入用户"
dict-code="sys_user,username,username"></j-dict-select-tag>
</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 :span="24">
<a-form-model-item label="用户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userType">
<a-input v-model="model.userType" placeholder="请输入用户类型" ></a-input>
</a-form-model-item>
</a-col>
</a-col>-->
</a-row>
</a-form-model>
</j-form-container>
@ -75,6 +95,25 @@
},
confirmLoading: false,
validatorRules: {
styleName: [
{required: true, message: '款式不能为空'},
],
moduleId: [
{required: true, message: '不能为空'},
],
componentName: [
{required: true, message: '不能为空'},
],
nums: [
{ required:true, message: '编号不能为空'},
{ pattern: /^[0-9A-Za-z]{0,10}$/, message: '编号太长'},
],
descr: [
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!?]{0,200}$/, message: '文本长度过长'},
],
userId:[
{required: true, message: '不能为空'},
]
},
url: {
add: "/sample/zyComponentSample/add",

@ -39,9 +39,14 @@ public class ZyComponentSample implements Serializable {
@Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号")
private String nums;
/**款式名称*/
@Excel(name = "款式名称", width = 15)
@ApiModelProperty(value = "款式名称")
private String styleName;
/**部件名称*/
@Excel(name = "部件名称", width = 15)
@ApiModelProperty(value = "部件名称")
@Dict(dictTable = "zy_cloths_component", dicText = "parts_name", dicCode = "id")
private String componentName;
/**描述*/
@Excel(name = "描述", width = 15)
@ -65,8 +70,8 @@ public class ZyComponentSample implements Serializable {
@ApiModelProperty(value = "用户类型")
private String userType;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private Date createTime;
}

Loading…
Cancel
Save