修改tag报错
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.jero.controller;
|
||||
package com.jero.modules.tag.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -6,8 +6,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.jero.modules.com.jero.service.IOnlCgformAreaService;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.service.IOnlCgformAreaService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
+3
-27
@@ -1,4 +1,4 @@
|
||||
package com.jero.modules.com.jero.entity;
|
||||
package com.jero.modules.tag.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@@ -74,33 +74,9 @@ public class OnlCgformArea implements Serializable {
|
||||
|
||||
/**所属模块*/
|
||||
@Excel(name = "所属模块", width = 15)
|
||||
private transient java.lang.String isModelString;
|
||||
@ApiModelProperty(value = "所属模块")
|
||||
private java.lang.String isModel;
|
||||
|
||||
private byte[] isModel;
|
||||
|
||||
public byte[] getIsModel(){
|
||||
if(isModelString==null){
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return isModelString.getBytes("UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getIsModelString(){
|
||||
if(isModel==null || isModel.length==0){
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
return new String(isModel,"UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**排序号*/
|
||||
@Excel(name = "排序号", width = 15)
|
||||
@javax.validation.constraints.Pattern(regexp = "^-?[1-9]\\d+$",message = "请输入正确的整数")
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package com.jero.mapper;
|
||||
package com.jero.modules.tag.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.com.jero.mapper.OnlCgformAreaMapper">
|
||||
<resultMap id="OnlCgformAreaResultMap" type="com.jero.modules.com.jero.entity.OnlCgformArea">
|
||||
<mapper namespace="com.jero.modules.tag.mapper.OnlCgformAreaMapper">
|
||||
<resultMap id="OnlCgformAreaResultMap" type="com.jero.modules.tag.entity.OnlCgformArea">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.jero.service;
|
||||
package com.jero.modules.tag.service;
|
||||
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package com.jero.service.impl;
|
||||
package com.jero.modules.tag.service.impl;
|
||||
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.jero.modules.com.jero.mapper.OnlCgformAreaMapper;
|
||||
import com.jero.modules.com.jero.service.IOnlCgformAreaService;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.mapper.OnlCgformAreaMapper;
|
||||
import com.jero.modules.tag.service.IOnlCgformAreaService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
+7
-7
@@ -134,7 +134,7 @@
|
||||
{
|
||||
title:'所属模块',
|
||||
align:"center",
|
||||
dataIndex: 'isModelString'
|
||||
dataIndex: 'isModel'
|
||||
},
|
||||
{
|
||||
title:'排序号',
|
||||
@@ -152,11 +152,11 @@
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/com.jero/onlCgformArea/page",
|
||||
delete: "/com.jero/onlCgformArea/delete",
|
||||
deleteBatch: "/com.jero/onlCgformArea/deleteBatch",
|
||||
exportXlsUrl: "/com.jero/onlCgformArea/exportXls",
|
||||
importExcelUrl: "com.jero/onlCgformArea/importExcel",
|
||||
list: "/tag/onlCgformArea/page",
|
||||
delete: "/tag/onlCgformArea/delete",
|
||||
deleteBatch: "/tag/onlCgformArea/deleteBatch",
|
||||
exportXlsUrl: "/tag/onlCgformArea/exportXls",
|
||||
importExcelUrl: "tag/onlCgformArea/importExcel",
|
||||
|
||||
},
|
||||
dictOptions:{},
|
||||
@@ -178,7 +178,7 @@
|
||||
let fieldList=[];
|
||||
fieldList.push({type:'string',value:'showArea',text:'展示区域',dictCode:''})
|
||||
fieldList.push({type:'string',value:'enName',text:'英文名称',dictCode:''})
|
||||
fieldList.push({type:'Blob',value:'isModel',text:'所属模块',dictCode:''})
|
||||
fieldList.push({type:'string',value:'isModel',text:'所属模块',dictCode:''})
|
||||
fieldList.push({type:'int',value:'sort',text:'排序号',dictCode:''})
|
||||
this.superFieldList = fieldList
|
||||
}
|
||||
+6
-6
@@ -15,7 +15,7 @@
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="所属模块" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input v-decorator="['isModelString']" placeholder="请输入所属模块" disabled></a-input>
|
||||
<a-input v-decorator="['isModel', validatorRules.isModel]" placeholder="请输入所属模块" :maxLength="120" disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
@@ -100,9 +100,9 @@
|
||||
},
|
||||
},
|
||||
url: {
|
||||
add: "/com.jero/onlCgformArea/add",
|
||||
edit: "/com.jero/onlCgformArea/edit",
|
||||
queryById: "/com.jero/onlCgformArea/queryById"
|
||||
add: "/tag/onlCgformArea/add",
|
||||
edit: "/tag/onlCgformArea/edit",
|
||||
queryById: "/tag/onlCgformArea/queryById"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -138,7 +138,7 @@
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model,'showArea','enName','isModelString','sort'))
|
||||
this.form.setFieldsValue(pick(this.model,'showArea','enName','isModel','sort'))
|
||||
})
|
||||
},
|
||||
//渲染流程表单数据
|
||||
@@ -184,7 +184,7 @@
|
||||
})
|
||||
},
|
||||
popupCallback(row){
|
||||
this.form.setFieldsValue(pick(row,'showArea','enName','isModelString','sort'))
|
||||
this.form.setFieldsValue(pick(row,'showArea','enName','isModel','sort'))
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -32,11 +32,6 @@
|
||||
<artifactId>jero-boot-modules</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot-tag-system</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#code_generate_project_path
|
||||
project_path=F:\\idea-workspace\\laws-weilai\\jero-boot
|
||||
|
||||
project_path=E:\\project\\jero-boot
|
||||
#bussi_package[User defined]
|
||||
bussi_package=com.jero.modules
|
||||
|
||||
@@ -27,4 +26,4 @@ db_filed_convert=true
|
||||
page_search_filed_num=1
|
||||
#page_filter_fields
|
||||
page_filter_fields=create_time,create_by,update_time,update_by
|
||||
exclude_table=act_,ext_act_,design_,qrtz_
|
||||
exclude_table=act_,ext_act_,design_,onl_,sys_,qrtz_
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>jero-boot</artifactId>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<version>2.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jero-boot-tag-system</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-system-local-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot-starter-redis</artifactId>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>5.3.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot</artifactId>
|
||||
<version>2.4.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus</artifactId>
|
||||
<version>3.4.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,110 +0,0 @@
|
||||
package com.jero.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
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 com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 区域管理表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("onl_cgform_area")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="onl_cgform_area对象", description="区域管理表")
|
||||
public class OnlCgformArea implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**展示区域*/
|
||||
@Excel(name = "展示区域", width = 15)
|
||||
@ApiModelProperty(value = "展示区域")
|
||||
private String showArea;
|
||||
|
||||
/**英文名称*/
|
||||
@Excel(name = "英文名称", width = 15)
|
||||
@javax.validation.constraints.Pattern(regexp = "^[a-zA-Z]{1}$",message = "请输入正确的字母")
|
||||
@ApiModelProperty(value = "英文名称")
|
||||
private String enName;
|
||||
|
||||
/**所属模块*/
|
||||
@Excel(name = "所属模块", width = 15)
|
||||
private transient String isModelString;
|
||||
|
||||
private byte[] isModel;
|
||||
|
||||
public byte[] getIsModel(){
|
||||
if(isModelString==null){
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return isModelString.getBytes("UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getIsModelString(){
|
||||
if(isModel==null || isModel.length==0){
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
return new String(isModel,"UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**排序号*/
|
||||
@Excel(name = "排序号", width = 15)
|
||||
@javax.validation.constraints.Pattern(regexp = "^-?[1-9]\\d+$",message = "请输入正确的整数")
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
-191
@@ -1,191 +0,0 @@
|
||||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<j-form-container :disabled="formDisabled">
|
||||
<a-form :form="form" slot="detail">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="展示区域" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input v-decorator="['showArea', validatorRules.showArea]" placeholder="请输入展示区域" :maxLength="120" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input v-decorator="['enName', validatorRules.enName]" placeholder="请输入英文名称" :maxLength="120" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="所属模块" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input v-decorator="['isModelString']" placeholder="请输入所属模块" disabled></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="排序号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input-number v-decorator="['sort', validatorRules.sort]" placeholder="请输入排序号" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
|
||||
<a-button @click="submitForm">提 交</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</j-form-container>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { httpAction, getAction } from '@/api/manage'
|
||||
import pick from 'lodash.pick'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'OnlCgformAreaForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//流程表单data
|
||||
formData: {
|
||||
type: Object,
|
||||
default: ()=>{},
|
||||
required: false
|
||||
},
|
||||
//表单模式:true流程表单 false普通表单
|
||||
formBpm: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
showArea: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入展示区域!'},
|
||||
]
|
||||
},
|
||||
enName: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入英文名称!'},
|
||||
{ pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
|
||||
]
|
||||
},
|
||||
isModel: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入所属模块!'},
|
||||
]
|
||||
},
|
||||
sort: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入排序号!'},
|
||||
{ pattern: /^-?\d+$/, message: '请输入整数!'},
|
||||
]
|
||||
},
|
||||
},
|
||||
url: {
|
||||
add: "/com.jero/onlCgformArea/add",
|
||||
edit: "/com.jero/onlCgformArea/edit",
|
||||
queryById: "/com.jero/onlCgformArea/queryById"
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formDisabled(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
return this.disabled
|
||||
},
|
||||
showFlowSubmitButton(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
//如果是流程中表单,则需要加载流程表单data
|
||||
this.showFlowData();
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit({});
|
||||
},
|
||||
edit (record) {
|
||||
this.form.resetFields();
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model,'showArea','enName','isModelString','sort'))
|
||||
})
|
||||
},
|
||||
//渲染流程表单数据
|
||||
showFlowData(){
|
||||
if(this.formBpm === true){
|
||||
let params = {id:this.formData.dataId};
|
||||
getAction(this.url.queryById,params).then((res)=>{
|
||||
if(res.success){
|
||||
this.edit (res.result);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
submitForm () {
|
||||
const that = this;
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
if(!this.model.id){
|
||||
httpurl+=this.url.add;
|
||||
method = 'post';
|
||||
}else{
|
||||
httpurl+=this.url.edit;
|
||||
method = 'put';
|
||||
}
|
||||
let formData = Object.assign(this.model, values);
|
||||
console.log("表单提交数据",formData)
|
||||
httpAction(httpurl,formData,method).then((res)=>{
|
||||
if(res.success){
|
||||
that.$message.success(res.message);
|
||||
that.$emit('ok');
|
||||
}else{
|
||||
that.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
popupCallback(row){
|
||||
this.form.setFieldsValue(pick(row,'showArea','enName','isModelString','sort'))
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -54,7 +54,6 @@
|
||||
<!-- 单体应用启动类 -->
|
||||
<module>jero-boot-single-startup</module>
|
||||
<module>jero-boot-modules</module>
|
||||
<module>jero-boot-tag-system</module>
|
||||
</modules>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -109,60 +108,6 @@
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.22</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>autopoi</artifactId>
|
||||
<version>1.2.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-core</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-extension</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot-base-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
-170
@@ -1,170 +0,0 @@
|
||||
package com.jero.modules.com.jero.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.jero.modules.com.jero.service.IOnlCgformAreaService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 区域管理表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="区域管理表")
|
||||
@RestController
|
||||
@RequestMapping("/com.jero/onlCgformArea")
|
||||
@Slf4j
|
||||
public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlCgformAreaService> {
|
||||
@Autowired
|
||||
private IOnlCgformAreaService onlCgformAreaService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param onlCgformArea
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "区域管理表-分页列表查询")
|
||||
@ApiOperation(value="区域管理表-分页列表查询", notes="区域管理表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OnlCgformArea onlCgformArea,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OnlCgformArea> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformArea, req.getParameterMap());
|
||||
Page<OnlCgformArea> page = new Page<OnlCgformArea>(pageNo, pageSize);
|
||||
IPage<OnlCgformArea> pageList = onlCgformAreaService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "区域管理表-列表查询")
|
||||
@ApiOperation(value="区域管理表-列表查询", notes="区域管理表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformArea>> queryList() {
|
||||
List<OnlCgformArea> list = onlCgformAreaService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param onlCgformArea
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "区域管理表-添加")
|
||||
@ApiOperation(value="区域管理表-添加", notes="区域管理表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformArea onlCgformArea) {
|
||||
onlCgformAreaService.add(onlCgformArea);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param onlCgformArea
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "区域管理表-编辑")
|
||||
@ApiOperation(value="区域管理表-编辑", notes="区域管理表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformArea onlCgformArea) {
|
||||
onlCgformAreaService.editById(onlCgformArea);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "区域管理表-通过id删除")
|
||||
@ApiOperation(value="区域管理表-通过id删除", notes="区域管理表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
onlCgformAreaService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "区域管理表-批量删除")
|
||||
@ApiOperation(value="区域管理表-批量删除", notes="区域管理表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.onlCgformAreaService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "区域管理表-通过id查询")
|
||||
@ApiOperation(value="区域管理表-通过id查询", notes="区域管理表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
OnlCgformArea onlCgformArea = onlCgformAreaService.queryById(id);
|
||||
if(onlCgformArea==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformArea);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param onlCgformArea
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, OnlCgformArea onlCgformArea) {
|
||||
return super.exportXls(request, onlCgformArea, OnlCgformArea.class, "区域管理表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, OnlCgformArea.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.jero.modules.com.jero.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 区域管理表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface OnlCgformAreaMapper extends BaseMapper<OnlCgformArea> {
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.com.jero.mapper.OnlCgformAreaMapper">
|
||||
<resultMap id="OnlCgformAreaResultMap" type="com.jero.modules.com.jero.entity.OnlCgformArea">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="show_area" property="showArea" />
|
||||
<result column="en_name" property="enName" />
|
||||
<result column="is_model" property="isModel" />
|
||||
<result column="sort" property="sort" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.jero.modules.com.jero.service;
|
||||
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 区域管理表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IOnlCgformAreaService extends IService<OnlCgformArea> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param onlCgformArea
|
||||
* @return
|
||||
*/
|
||||
void add(OnlCgformArea onlCgformArea);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param onlCgformArea
|
||||
* @return
|
||||
*/
|
||||
void editById(OnlCgformArea onlCgformArea);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
OnlCgformArea queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformArea> queryList();
|
||||
}
|
||||
-89
@@ -1,89 +0,0 @@
|
||||
package com.jero.modules.com.jero.service.impl;
|
||||
|
||||
import com.jero.modules.com.jero.entity.OnlCgformArea;
|
||||
import com.jero.modules.com.jero.mapper.OnlCgformAreaMapper;
|
||||
import com.jero.modules.com.jero.service.IOnlCgformAreaService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 区域管理表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, OnlCgformArea> implements IOnlCgformAreaService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param onlCgformArea
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OnlCgformArea onlCgformArea) {
|
||||
Date now = new Date();
|
||||
onlCgformArea.setCreateTime(now);
|
||||
onlCgformArea.setUpdateTime(now);
|
||||
save(onlCgformArea);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param onlCgformArea
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OnlCgformArea onlCgformArea) {
|
||||
Date now = new Date();
|
||||
onlCgformArea.setUpdateTime(now);
|
||||
saveOrUpdate(onlCgformArea);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OnlCgformArea queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OnlCgformArea> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 查询区域-END -->
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<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>
|
||||
<!-- 高级查询区域 -->
|
||||
<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>
|
||||
<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>项
|
||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:scroll="{x:true}"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template slot="htmlSlot" slot-scope="text">
|
||||
<div v-html="text"></div>
|
||||
</template>
|
||||
<template slot="imgSlot" slot-scope="text">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||
<img v-else :src="getImgView(text)" 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>
|
||||
<a-button
|
||||
v-else
|
||||
:ghost="true"
|
||||
type="primary"
|
||||
icon="download"
|
||||
size="small"
|
||||
@click="downloadFile(text)">
|
||||
下载
|
||||
</a-button>
|
||||
</template>
|
||||
|
||||
<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-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a @click="handleDetail(record)">详情</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<onl-cgform-area-modal ref="modalForm" @ok="modalFormOk"></onl-cgform-area-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import OnlCgformAreaModal from './modules/OnlCgformAreaModal'
|
||||
|
||||
export default {
|
||||
name: 'OnlCgformAreaList',
|
||||
mixins:[JeroListMixin, mixinDevice],
|
||||
components: {
|
||||
OnlCgformAreaModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: '区域管理表管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:60,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'展示区域',
|
||||
align:"center",
|
||||
dataIndex: 'showArea'
|
||||
},
|
||||
{
|
||||
title:'英文名称',
|
||||
align:"center",
|
||||
dataIndex: 'enName'
|
||||
},
|
||||
{
|
||||
title:'所属模块',
|
||||
align:"center",
|
||||
dataIndex: 'isModelString'
|
||||
},
|
||||
{
|
||||
title:'排序号',
|
||||
align:"center",
|
||||
sorter: true,
|
||||
dataIndex: 'sort'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/com.jero/onlCgformArea/page",
|
||||
delete: "/com.jero/onlCgformArea/delete",
|
||||
deleteBatch: "/com.jero/onlCgformArea/deleteBatch",
|
||||
exportXlsUrl: "/com.jero/onlCgformArea/exportXls",
|
||||
importExcelUrl: "com.jero/onlCgformArea/importExcel",
|
||||
|
||||
},
|
||||
dictOptions:{},
|
||||
superFieldList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSuperFieldList();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initDictConfig(){
|
||||
},
|
||||
getSuperFieldList(){
|
||||
let fieldList=[];
|
||||
fieldList.push({type:'string',value:'showArea',text:'展示区域',dictCode:''})
|
||||
fieldList.push({type:'string',value:'enName',text:'英文名称',dictCode:''})
|
||||
fieldList.push({type:'Blob',value:'isModel',text:'所属模块',dictCode:''})
|
||||
fieldList.push({type:'int',value:'sort',text:'排序号',dictCode:''})
|
||||
this.superFieldList = fieldList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@@ -1,60 +0,0 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<onl-cgform-area-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></onl-cgform-area-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import OnlCgformAreaForm from './OnlCgformAreaForm'
|
||||
export default {
|
||||
name: 'OnlCgformAreaModal',
|
||||
components: {
|
||||
OnlCgformAreaForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
:visible="visible">
|
||||
<onl-cgform-area-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></onl-cgform-area-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import OnlCgformAreaForm from './OnlCgformAreaForm'
|
||||
|
||||
export default {
|
||||
name: 'OnlCgformAreaModal',
|
||||
components: {
|
||||
OnlCgformAreaForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user