Merge remote-tracking branch 'origin/master'
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ package com.jero.common.constant.enums;
|
||||
* @date 2022/1/21 15:22
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum YesOrNo {
|
||||
public enum YesOrNoEnum {
|
||||
NO("否","0"),
|
||||
YES("是","1");
|
||||
|
||||
@@ -13,7 +13,7 @@ public enum YesOrNo {
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private YesOrNo(String name,String value) {
|
||||
private YesOrNoEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
+40
-46
@@ -1,26 +1,32 @@
|
||||
package com.jero.modules.document.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
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.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
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.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
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 com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
@@ -59,6 +65,19 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "分页查询")
|
||||
@ApiOperation(value="分页查询", notes="分页查询")
|
||||
@GetMapping(value = "/queryPageInfo")
|
||||
public Result<?> queryPageInfo(@RequestParam(name="parameter",required=false) Map<String,Object> parameter) {
|
||||
bussDocumentLibraryEOService.getInfoPage(parameter);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
@@ -72,33 +91,6 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param bussDocumentLibraryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-添加")
|
||||
@ApiOperation(value="文档库信息表-添加", notes="文档库信息表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||
bussDocumentLibraryEOService.add(bussDocumentLibraryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param bussDocumentLibraryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-编辑")
|
||||
@ApiOperation(value="文档库信息表-编辑", notes="文档库信息表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||
bussDocumentLibraryEOService.editById(bussDocumentLibraryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
@@ -170,8 +162,8 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询条件
|
||||
*
|
||||
* 列表查询条件 标识传 1-->用于查询文档库字段属性
|
||||
* @param flag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@@ -181,9 +173,10 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryCondition(flag);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表头
|
||||
*
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-列表表头")
|
||||
@@ -193,9 +186,10 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.getHeader(flag);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增表单
|
||||
*
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-新增表单")
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.modules.document.enums;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/1/21 15:22
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum FieldTypeEnum {
|
||||
TEXT("输入框","text"),
|
||||
LIST("下拉单选","list"),
|
||||
LIST_MULTI("下拉多选","list_multi"),
|
||||
DATE("日期","date");
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private FieldTypeEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+7
-4
@@ -1,10 +1,10 @@
|
||||
package com.jero.modules.document.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 文档库信息表
|
||||
@@ -17,5 +17,8 @@ public interface BussDocumentLibraryEOMapper extends BaseMapper<BussDocumentLibr
|
||||
int insertInfo(@Param("insertField") String insertField,
|
||||
@Param("insertValue") String insertValue);
|
||||
|
||||
IPage getInfoPage(@Param("page") Page page,
|
||||
@Param("condition") String condition);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -40,4 +40,9 @@
|
||||
values (${insertValue})
|
||||
</insert>
|
||||
|
||||
<select id="getInfoPage" resultType="com.baomidou.mybatisplus.core.metadata.IPage">
|
||||
select * from buss_document_library
|
||||
${condition}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
+5
-16
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.document.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
@@ -13,22 +14,6 @@ import java.util.Map;
|
||||
*/
|
||||
public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibraryEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param bussDocumentLibraryEO
|
||||
* @return
|
||||
*/
|
||||
void add(BussDocumentLibraryEO bussDocumentLibraryEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param bussDocumentLibraryEO
|
||||
* @return
|
||||
*/
|
||||
void editById(BussDocumentLibraryEO bussDocumentLibraryEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
@@ -99,4 +84,8 @@ public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibr
|
||||
* @param map
|
||||
*/
|
||||
void updateInfo(Map<String,Object> map);
|
||||
|
||||
void getInfoPage(Map<String,Object> parameter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+142
-31
@@ -1,18 +1,22 @@
|
||||
package com.jero.modules.document.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.constant.enums.YesOrNo;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.service.impl.OnlCgformAreaServiceImpl;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -43,33 +47,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
private BussDocumentLibraryEOMapper bussDocumentLibraryEOMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param bussDocumentLibraryEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||
Date now = new Date();
|
||||
bussDocumentLibraryEO.setCreateTime(now);
|
||||
bussDocumentLibraryEO.setUpdateTime(now);
|
||||
save(bussDocumentLibraryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param bussDocumentLibraryEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||
Date now = new Date();
|
||||
bussDocumentLibraryEO.setUpdateTime(now);
|
||||
saveOrUpdate(bussDocumentLibraryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
@@ -122,7 +99,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if(fieldList.size() != 0){
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e-> YesOrNo.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
fieldList = fieldList.stream().filter(e-> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
@@ -146,7 +123,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if(fieldList.size() != 0){
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e-> YesOrNo.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
fieldList = fieldList.stream().filter(e-> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
@@ -174,7 +151,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
if(fieldList.size() != 0){
|
||||
//过滤出表单字段(is_show_form-->表单是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e-> YesOrNo.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
||||
fieldList = fieldList.stream().filter(e-> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String,Object>> result = new ArrayList<>();
|
||||
for (OnlCgformArea onlCgformAreaTemp : areaList) {
|
||||
@@ -372,4 +349,138 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
+"str_to_date('" + sdf.format(new Date()) + "','%Y-%m-%d %H:%i:%s')"+ ",'"+sysUser.getOrgCode()+ "'";
|
||||
return mustValue;
|
||||
}
|
||||
|
||||
public void getInfoPage(Map<String,Object> parameter){
|
||||
//过滤查询条件字段类型使用
|
||||
List<Map<String, Object>> mapList = queryCondition("1");
|
||||
|
||||
//测试数据(查询条件, 暂时使用mapTemp, 提交代码的时候使用parameter)
|
||||
Map<String,Object> mapTemp = new HashMap<>();
|
||||
// mapTemp.put("orderByField","issue_time");//测试数据
|
||||
// mapTemp.put("orderBy","1");//测试数据
|
||||
|
||||
for (Map<String, Object> map : mapList) {
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = (String) entry.getValue();
|
||||
int a= 0;
|
||||
if("db_field_name".equals(key)){
|
||||
mapTemp.put(value,"aaa");//测试数据
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//查询条件
|
||||
StringBuilder conditionSb = new StringBuilder("where 1 = 1");
|
||||
|
||||
for (Map.Entry<String, Object> entry : mapTemp.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = (String) entry.getValue();
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
for (Map<String, Object> map : mapList) {
|
||||
String fieldName = (String)map.get("db_field_name");//字段
|
||||
if(key.equals(fieldName)){
|
||||
//字段类型(判断是输入框还是下拉,等等)
|
||||
String fieldType = (String) map.get("field_show_type");//字段类型
|
||||
|
||||
if(FieldTypeEnum.TEXT.getValue().equals(fieldType)){
|
||||
//输入框
|
||||
conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%')");
|
||||
|
||||
}else if(FieldTypeEnum.LIST.getValue().equals(fieldType)
|
||||
|| FieldTypeEnum.LIST_MULTI.getValue().equals(fieldType)){
|
||||
StringBuilder valueSb = new StringBuilder();
|
||||
for (String valueTemp : value.split(",")) {
|
||||
valueSb.append("'" + valueTemp + "',");
|
||||
}
|
||||
String substring = valueSb.substring(0, valueSb.length() - 1);
|
||||
//下拉单选或下拉多选
|
||||
conditionSb.append(" and " + key + " in("+substring+")");
|
||||
|
||||
}else if(FieldTypeEnum.DATE.getValue().equals(fieldType)){
|
||||
value = "2022-01-24";
|
||||
//日期(区分单日期还时间范围)
|
||||
if(value.contains(",")){
|
||||
conditionSb.append(" and " +"date_format("+ key + ",'%Y-%m-%d') >= '" + value.split(",")[0] + "'"
|
||||
+ " and " +"date_format("+ key + ",'%Y-%m-%d') <= '" + value.split(",")[1] + "'");
|
||||
}else{
|
||||
conditionSb.append(" and " +"date_format("+ key + ",'%Y-%m-%d') = '" + value + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//处理列表表头排序
|
||||
if(StringUtils.isNotBlank((String) mapTemp.get("orderByField"))){
|
||||
conditionSb.append(" order by " + (String) mapTemp.get("orderByField"));
|
||||
if("1".equals((String) mapTemp.get("orderBy"))){
|
||||
conditionSb.append(" asc");//正序
|
||||
}else if("2".equals((String) mapTemp.get("orderBy"))){
|
||||
conditionSb.append(" desc");//倒序
|
||||
}
|
||||
}else{
|
||||
conditionSb.append(" order by create_time desc");
|
||||
}
|
||||
int pageNo = 1;
|
||||
int pageSize = 10;
|
||||
// int pageNo = Integer.parseInt(mapTemp.get("pageNo").toString());
|
||||
// int pageSize = Integer.parseInt(mapTemp.get("pageSize").toString());
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
|
||||
IPage infoPage = bussDocumentLibraryEOMapper.getInfoPage(page, conditionSb.toString());
|
||||
int a = 0;
|
||||
|
||||
// for (Map<String, Object> map : mapList) {
|
||||
//
|
||||
//
|
||||
// String key = (String) map.get("db_field_name");//字段名
|
||||
//// String value = (String) map.get("value");//字段值
|
||||
// String value = "qqqqqq,wwww";//字段值
|
||||
// String fieldType = (String) map.get("field_show_type");//字段类型
|
||||
//
|
||||
// if(StringUtils.isNotBlank(value)){
|
||||
// if(FieldTypeEnum.TEXT.getValue().equals(fieldType)){
|
||||
// //输入框
|
||||
// conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%')");
|
||||
//// conditionSb.append(" and " + key +"='"+value+"' ");
|
||||
//
|
||||
//
|
||||
// }else if(FieldTypeEnum.LIST.getValue().equals(fieldType)
|
||||
// || FieldTypeEnum.LIST_MULTI.getValue().equals(fieldType)){
|
||||
// StringBuilder valueSb = new StringBuilder();
|
||||
// for (String valueTemp : value.split(",")) {
|
||||
// valueSb.append("'" + valueTemp + "',");
|
||||
// }
|
||||
// String substring = valueSb.substring(0, valueSb.length() - 1);
|
||||
// //下拉单选或下拉多选
|
||||
// conditionSb.append(" and " + key + " in("+substring+")");
|
||||
//
|
||||
//
|
||||
// }else if(FieldTypeEnum.DATE.getValue().equals(fieldType)){
|
||||
// value = "2022-01-24,2022-01-24";
|
||||
// //日期
|
||||
// if(value.contains(",")){
|
||||
// conditionSb.append(" and " +"date_format("+ key + ",'%Y-%m-%d') >= '" + value.split(",")[0] + "'"
|
||||
// + " and " +"date_format("+ key + ",'%Y-%m-%d') >= '" + value.split(",")[1] + "'");
|
||||
// }else{
|
||||
// conditionSb.append(" and " +"date_format("+ key + ",'%Y-%m-%d') >= '" + value + "'");
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// bussDocumentLibraryEOMapper.getInfoPage();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model :model="formInline" v-if="isFormInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24" v-if="isDisplayType">
|
||||
<div v-for="(val,index) in headerText" :key="index">
|
||||
<div class="header-text">
|
||||
{{val.text}}
|
||||
</div>
|
||||
<div v-for="item in val.content" style="overflow: hidden">
|
||||
|
||||
<div v-for="(val,index) in headerText" :key="index">
|
||||
<div class="header-text">
|
||||
{{val.text}}
|
||||
</div>
|
||||
<a-row :gutter="24" v-if="isDisplayType">
|
||||
<div v-for="item in val.content">
|
||||
<a-col :span="12" v-if="item.type === 'INPUT'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -35,7 +36,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.type === 'DATE'">
|
||||
<a-col :span="12" v-else-if="item.type === 'SINGLETIME'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
@@ -49,6 +50,19 @@
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.type === 'SMULTITIME'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||
<a-range-picker class="box-input" v-model="formInline[item.attrModel]" @change="onChange"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.type === 'NUMBER'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -150,9 +164,10 @@
|
||||
</div>
|
||||
</a-col>
|
||||
</div>
|
||||
</div>
|
||||
</a-row>
|
||||
</div>
|
||||
|
||||
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="!isDisplayType">
|
||||
<div v-for="(item,index) in dataList" :key="index">
|
||||
<a-col :span="12" v-if="item.type === 'INPUT'">
|
||||
@@ -183,7 +198,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.type === 'DATE'">
|
||||
<a-col :span="12" v-else-if="item.type === 'SINGLETIME'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
@@ -197,6 +212,19 @@
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.type === 'SMULTITIME'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||
<a-range-picker v-model="formInline[item.attrModel]" @change="onChange"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.type === 'NUMBER'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -437,6 +465,24 @@
|
||||
placeholder: '请手动输入或者选择标准',
|
||||
attrModel: 'standard',
|
||||
text: '关联信息'
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
type: 'SINGLETIME',
|
||||
name: '单日期选择',
|
||||
enName: 'standard',
|
||||
placeholder: '请单日期选择',
|
||||
attrModel: 'time',
|
||||
text: '基本信息'
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
type: 'SMULTITIME',
|
||||
name: '多日期选择',
|
||||
enName: 'standardtime',
|
||||
placeholder: '请多日期选择',
|
||||
attrModel: 'timeAll',
|
||||
text: '基本信息'
|
||||
}
|
||||
],
|
||||
validatorRules: {},
|
||||
@@ -470,13 +516,6 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
this.headerText.forEach(res=>{
|
||||
console.log(res)
|
||||
res.content.forEach(val=>{
|
||||
console.log(val)
|
||||
})
|
||||
})
|
||||
console.log(this.headerText)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -490,6 +529,9 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange(date, dateString) {
|
||||
console.log(date, dateString)
|
||||
},
|
||||
clickButtonToUpload(current) {
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = current
|
||||
@@ -543,6 +585,15 @@
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
@@ -597,7 +648,8 @@
|
||||
height: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.formAdd{
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
@@ -2,12 +2,37 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8" v-for="(item,index) in searchList" :key="index" style="line-height: 48px">
|
||||
<div class="box-title-text">
|
||||
<div class="box-title-text" v-if="item.field_show_type == 'text'">
|
||||
<div class="title-text">
|
||||
<span>{{item.enName}}</span><br>
|
||||
<span>{{item.name}}</span>
|
||||
<span>{{item.db_field_en_name}}</span><br>
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="item.placeholder" v-model="queryParam[item.attrModel]"></a-input>
|
||||
<a-input class="box-input" :placeholder="item.placeholder" v-model="queryParam[item.db_field_name]"></a-input>
|
||||
</div>
|
||||
<div class="box-title-text" v-else-if="item.field_show_type == 'list_multi'">
|
||||
<div class="title-text">
|
||||
<span>{{item.db_field_en_name}}</span><br>
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<j-multi-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
|
||||
:placeholder="$t('selectStatus')" :type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</div>
|
||||
<div class="box-title-text" v-else-if="item.field_show_type == 'date'">
|
||||
<div class="title-text">
|
||||
<span>{{item.db_field_en_name}}</span><br>
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-date-picker class="box-input" v-model="queryParam[item.db_field_name]"/>
|
||||
</div>
|
||||
<div class="box-title-text" v-else-if="item.field_show_type == 'list'">
|
||||
<div class="title-text">
|
||||
<span>{{item.db_field_en_name}}</span><br>
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
|
||||
:placeholder="$t('selectStatus')" :type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
@@ -34,6 +59,10 @@
|
||||
url: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
flag: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -42,7 +71,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getHeader()
|
||||
this.getSeach()
|
||||
},
|
||||
methods: {
|
||||
searchQuery() {
|
||||
@@ -52,11 +81,13 @@
|
||||
this.queryParam = {}
|
||||
eventBUs.$emit('searchQuery', this.queryParam)
|
||||
},
|
||||
getHeader() {
|
||||
let params = {}
|
||||
getAction(this.url.searchHeader, params).then((res) => {
|
||||
getSeach() {
|
||||
let params = {
|
||||
flag: this.flag
|
||||
}
|
||||
getAction(this.url.seachList, params).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
this.searchList = res.result
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -69,9 +100,12 @@
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 90px;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
@@ -80,7 +114,7 @@
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="page" v-if="jsonBody.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => `共 ${total} 条`"
|
||||
show-quick-jumper
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
<script>
|
||||
import eventBUs from '../../common/event'
|
||||
import { getAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
@@ -56,62 +57,19 @@
|
||||
default: []
|
||||
},
|
||||
//是否显示操作;默认显示
|
||||
isOperation:{
|
||||
isOperation: {
|
||||
type: Boolean,
|
||||
default:true,
|
||||
default: true
|
||||
},
|
||||
flag: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageSize: 20,
|
||||
jsonHead: [
|
||||
{
|
||||
'name': '序号',
|
||||
'enName': 'Swrial number'
|
||||
},
|
||||
{
|
||||
'name': '编号',
|
||||
'enName': 'Swrial number'
|
||||
},
|
||||
{
|
||||
'name': '标题',
|
||||
'enName': 'Title'
|
||||
},
|
||||
{
|
||||
'name': '发布日期',
|
||||
'enName': 'Release data'
|
||||
},
|
||||
{
|
||||
'name': '标准实施日期',
|
||||
'enName': 'Standard data'
|
||||
},
|
||||
{
|
||||
'name': '状态',
|
||||
'enName': 'State'
|
||||
}
|
||||
],
|
||||
jsonBody: [
|
||||
{
|
||||
// 'col1': '河流1',
|
||||
id: 1,
|
||||
'col2': '河流26dsfdsfdsfdsfsfdsfsfsfsfsdfsfsfdsfsfdsfdsfdsfdsfdsf1232132132132131321321321312312321321321312dsf',
|
||||
'col3': '大羊沟6dsfdsfdsfdsfsfdsfsfsfsfsdfsfsfdsfsfdsfdsfdsfdsfdsf1232132132132131321321321312312321321321312dsf',
|
||||
'col4': '待审批6dsfdsfdsfdsfsfdsfsfsfsfsdfsfsfdsfsfdsfdsfdsfdsfdsf1232132132132131321321321312312321321321312dsf',
|
||||
'col5': '待审批6dsfdsfdsfdsfsfdsfsfsfsfsdfsfsfdsfsfdsfdsfdsfdsfdsf1232132132132131321321321312312321321321312dsf',
|
||||
'col6': '待审批6dsfdsfdsfdsfsfdsfsfsfsfsdfsfsfdsfsfdsfdsfdsfdsfdsf1232132132132131321321321312312321321321312dsf',
|
||||
'col7': 0.6
|
||||
},
|
||||
{
|
||||
// 'col1': '河流1',
|
||||
id: 2,
|
||||
'col2': '河流2',
|
||||
'col3': '大羊沟',
|
||||
'col4': '待审批',
|
||||
'col5': 0.6,
|
||||
'col6': '0.6dsfdsfdsfdsfsfdsfsfsfsfsdfsfsfdsfsfdsfdsfdsfdsfdsf1232132132132131321321321312312321321321312dsf',
|
||||
'col7': 0.6
|
||||
}
|
||||
],
|
||||
jsonBody: [],
|
||||
checkboxList: [],
|
||||
tableAll: false,
|
||||
indeterminate: false
|
||||
@@ -125,17 +83,25 @@
|
||||
console.log(target)
|
||||
})
|
||||
this.getData()
|
||||
this.getTableList()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
var jsonHead = this.jsonHead
|
||||
for (var i = 0; i < jsonHead.length; i++) {
|
||||
$('#table_thead_tr').append('<th class="box-th">' + jsonHead[i].enName + '</br>' + jsonHead[i].name + '</th>')
|
||||
}
|
||||
if (this.isOperation){
|
||||
let th = '<th class="box-th box-th-po">' + 'Operation ' + '</br>' + '操作' + '</th>'
|
||||
$('#table_thead_tr').append(th)
|
||||
let params = {
|
||||
flag: this.flag
|
||||
}
|
||||
getAction(this.url.tableHeader, params).then((res) => {
|
||||
if (res.success) {
|
||||
var jsonHead = res.result
|
||||
for (var i = 0; i < jsonHead.length; i++) {
|
||||
$('#table_thead_tr').append('<th class="box-th">' + jsonHead[i].db_field_en_name + '</br>' + jsonHead[i].db_field_txt + '</th>')
|
||||
}
|
||||
if (this.isOperation) {
|
||||
let th = '<th class="box-th box-th-po">' + 'Operation ' + '</br>' + '操作' + '</th>'
|
||||
$('#table_thead_tr').append(th)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
checkboxChange(checkedList) {
|
||||
this.indeterminate = !!checkedList.length && checkedList.length < this.jsonBody.length
|
||||
@@ -150,6 +116,16 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
getTableList() {
|
||||
let params = {
|
||||
|
||||
}
|
||||
getAction(this.url.tableList, params).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange() {
|
||||
|
||||
},
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<search :url="url" :searchList="searchList"/>
|
||||
<search :flag="'1'" :url="url" :searchList="searchList"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleCompare()" type="primary" icon="plus">{{$t('DataComparison')}}</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<tableData
|
||||
:flag="'1'"
|
||||
:OperationList="OperationList"
|
||||
@editTable="editTable"
|
||||
@deleteTable="deleteTable"
|
||||
@@ -59,8 +60,9 @@
|
||||
selectedRowKeys: [],
|
||||
loading: false,
|
||||
url:{
|
||||
searchHeader:'document/bussDocumentLibraryEO/getHeader',
|
||||
queryCondition:'document/bussDocumentLibraryEO/queryCondition',
|
||||
tableHeader:'document/bussDocumentLibraryEO/getHeader',
|
||||
seachList:'document/bussDocumentLibraryEO/queryCondition',
|
||||
tableList:'/document/bussDocumentLibraryEO/queryPageInfo',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
<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="所属模块(1文档库,0文档拆分" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['isModel', validatorRules.isModel]" :trigger-change="true" dictCode="onl_cgform_area,所属模块,is_model" placeholder="请选择所属模块(1文档库,0文档拆分" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="字段备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input v-decorator="['dbFieldTxt', validatorRules.dbFieldTxt]" 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="['dbFieldName']" placeholder="请输入字段英文名称描述" :maxLength="120" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="表单控件类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['fieldShowType', validatorRules.fieldShowType]" :trigger-change="true" dictCode="onl_cgform_field,属性类型,field_show_type" placeholder="请选择表单控件类型" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="字典名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['dictName', validatorRules.dictName]" :trigger-change="true" dictCode="sys_dict,选项内容,dict_name" placeholder="请选择字典名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="数据库字段长度" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input-number v-decorator="['dbLength', validatorRules.dbLength]" placeholder="请输入数据库字段长度" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input-number v-decorator="['orderNum', validatorRules.orderNum]" placeholder="请输入排序" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="字段是否必填" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['fieldMustInput', validatorRules.fieldMustInput]" :trigger-change="true" dictCode="onl_cgform_field,是否必填,field_must_input" placeholder="请选择字段是否必填" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="表单是否显示0否 1是" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['isShowForm', validatorRules.isShowForm]" :trigger-change="true" dictCode="onl_cgform_field,文档库列表展示,is_show_form" placeholder="请选择表单是否显示0否 1是" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="展示区域" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['showArea', validatorRules.showArea]" :trigger-change="true" dictCode="onl_cgform_field,展示区域,show_area" placeholder="请选择展示区域" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否查询条件0否 1是" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['isQuery', validatorRules.isQuery]" :trigger-change="true" dictCode="onl_cgform_field,是否搜索,is_query" placeholder="请选择是否查询条件0否 1是" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="法规清单是否展示0否 1是" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['isShowLawsList', validatorRules.isShowLawsList]" :trigger-change="true" dictCode="onl_cgform_field,法规清单展示,is_show_laws_list" placeholder="请选择法规清单是否展示0否 1是" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="搜索中心是否展示0否 1是" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag type="list" v-decorator="['isShowSearch', validatorRules.isShowSearch]" :trigger-change="true" dictCode="onl_cgform_field,搜索中心展示,is_show_search" placeholder="请选择搜索中心是否展示0否 1是" />
|
||||
</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: 'OnlCgformTagForm',
|
||||
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: {
|
||||
isModel: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入所属模块(1文档库,0文档拆分!'},
|
||||
]
|
||||
},
|
||||
dbFieldTxt: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入字段备注!'},
|
||||
]
|
||||
},
|
||||
fieldShowType: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入表单控件类型!'},
|
||||
]
|
||||
},
|
||||
dictName: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入字典名称!'},
|
||||
]
|
||||
},
|
||||
dbLength: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入数据库字段长度!'},
|
||||
]
|
||||
},
|
||||
orderNum: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入排序!'},
|
||||
]
|
||||
},
|
||||
fieldMustInput: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入字段是否必填!'},
|
||||
]
|
||||
},
|
||||
isShowForm: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入表单是否显示0否 1是!'},
|
||||
]
|
||||
},
|
||||
showArea: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入展示区域!'},
|
||||
]
|
||||
},
|
||||
isQuery: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入是否查询条件0否 1是!'},
|
||||
]
|
||||
},
|
||||
isShowLawsList: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入法规清单是否展示0否 1是!'},
|
||||
]
|
||||
},
|
||||
isShowSearch: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入搜索中心是否展示0否 1是!'},
|
||||
]
|
||||
},
|
||||
},
|
||||
url: {
|
||||
add: "/tag/onlCgformTag/add",
|
||||
edit: "/tag/onlCgformTag/edit",
|
||||
queryById: "/tag/onlCgformTag/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,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowForm','showArea','isQuery','isShowLawsList','isShowSearch'))
|
||||
})
|
||||
},
|
||||
//渲染流程表单数据
|
||||
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,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowForm','showArea','isQuery','isShowLawsList','isShowSearch'))
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<onl-cgform-tag-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></onl-cgform-tag-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import OnlCgformTagForm from './OnlCgformTagForm'
|
||||
export default {
|
||||
name: 'OnlCgformTagModal',
|
||||
components: {
|
||||
OnlCgformTagForm
|
||||
},
|
||||
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>
|
||||
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<div class="diolag-area">
|
||||
<a-button type="primary" @click="showModal">新增</a-button>
|
||||
<a-modal class="area-module" v-model="newVisible" title="新增" ok-text="保存" cancel-text="取消" @ok="hideModal" @cancel="cancelModel">
|
||||
<a-form-model
|
||||
class="tag-module"
|
||||
ref="ruleForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item label="所属模块" prop="isModel">
|
||||
<a-select v-model="form.isModel" placeholder="请选择所属模块">
|
||||
<a-select-option value="1">
|
||||
文档库
|
||||
</a-select-option>
|
||||
<a-select-option value="2">
|
||||
文档条款
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="showArea" label="展示区域" prop="showArea">
|
||||
<a-input
|
||||
v-model="form.showArea"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.showArea.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="enName" label="英文名称" prop="enName">
|
||||
<a-input
|
||||
v-model="form.enName"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.enName.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="sort" label="排序号" prop="sort">
|
||||
<a-input
|
||||
v-model="form.sort"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.sort.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<a-table
|
||||
class="table-area"
|
||||
ref="table"
|
||||
bordered
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="areaTable"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<a slot="name" slot-scope="text">{{ text }}</a>
|
||||
<span slot="customTitle">属性名称</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a>编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a class="table-del">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction,postAction,getAction } from '@/api/manage'
|
||||
export default {
|
||||
name: 'diolagArea',
|
||||
components:{
|
||||
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
selectedRowKeys: [],
|
||||
loading: false,
|
||||
ipagination:true,
|
||||
columns: [
|
||||
{
|
||||
title: '展示区域',
|
||||
dataIndex: 'showArea',
|
||||
key: 'showArea',
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '英文名称',
|
||||
align: "center",
|
||||
width: 100,
|
||||
dataIndex: 'englishName',
|
||||
},
|
||||
{
|
||||
title: '所属模块',
|
||||
align: "center",
|
||||
width: 100,
|
||||
dataIndex: 'type',
|
||||
},
|
||||
{
|
||||
title: '排序号',
|
||||
align: "center",
|
||||
width: 80,
|
||||
dataIndex: 'numberSort'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 170
|
||||
}
|
||||
],
|
||||
newVisible:false,
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 14 },
|
||||
form: {
|
||||
isModel:'',
|
||||
showArea:'',
|
||||
enName:'',
|
||||
sort:''
|
||||
},
|
||||
rules: {
|
||||
isModel:[{ required: true, message: '请选择所属模块', trigger: 'change' }],
|
||||
area:[
|
||||
{ required: true, message: '请选择展示区域', trigger: 'blur' },
|
||||
{ min: 1, max: 100, message: 'Length should be 1 to 100', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
props:{
|
||||
areaTable:Array
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
onSelectChange(selectedRowKeys) {
|
||||
console.log('selectedRowKeys changed: ', selectedRowKeys);
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
},
|
||||
handleTableChange(){
|
||||
|
||||
},
|
||||
showModal() {
|
||||
this.newVisible = true;
|
||||
},
|
||||
hideModal() {
|
||||
this.newVisible = false;
|
||||
console.log('form',this.form)
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
postAction(`/tag/onlCgformArea/add`,this.form).then(res=>{
|
||||
console.log('res',res)
|
||||
}
|
||||
)
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
cancelModel(){
|
||||
this.newVisible=false
|
||||
this.$refs.ruleForm.resetFields();
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.diolag-area{
|
||||
.table-area{
|
||||
margin: 20px 0;
|
||||
}
|
||||
.table-del{
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="less">
|
||||
.area-module{
|
||||
.ant-modal-wrap{
|
||||
.ant-modal{
|
||||
.ant-modal-content{
|
||||
.ant-modal-footer{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div class="content-manage">
|
||||
<a-form-model
|
||||
class="tag-module"
|
||||
ref="ruleForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item label="所属模块" prop="isModel">
|
||||
<a-select v-model="form.isModel" placeholder="请选择所属模块">
|
||||
<a-select-option value="1">
|
||||
文档库
|
||||
</a-select-option>
|
||||
<a-select-option value="2">
|
||||
文档条款
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="showArea" label="展示区域" prop="showArea">
|
||||
<a-input
|
||||
v-model="form.showArea"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.showArea.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="enName" label="英文名称" prop="enName">
|
||||
<a-input
|
||||
v-model="form.enName"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.enName.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="sort" label="排序号" prop="sort">
|
||||
<a-input
|
||||
v-model="form.sort"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.sort.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'contentManage'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div>
|
||||
<onl-cgform-tag-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></onl-cgform-tag-form>
|
||||
|
||||
<div class="drawer-footer">
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">保存</a-button>
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import OnlCgformTagForm from './OnlCgformTagForm'
|
||||
|
||||
export default {
|
||||
name: 'newDrawer',
|
||||
components: {
|
||||
OnlCgformTagForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
props:{
|
||||
drawerVisible:Boolean,
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.drawerVisible
|
||||
},
|
||||
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>
|
||||
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div class="tags">
|
||||
<div class="tag-tab">
|
||||
<a-tabs type="card" @change="callback">
|
||||
<a-tab-pane key="1" tab="标签项管理">
|
||||
<tag-item></tag-item>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="标签内容管理">
|
||||
<tag-content></tag-content>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tagItem from './tabs/tagItem'
|
||||
import tagContent from './tabs/tagContent'
|
||||
export default {
|
||||
name: 'tags',
|
||||
components:{
|
||||
tagItem,
|
||||
tagContent
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
callback(key) {
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<div class="tab-table">
|
||||
<a-table
|
||||
ref="table"
|
||||
bordered
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="tableData"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<a slot="name" slot-scope="text">{{ text }}</a>
|
||||
<span slot="customTitle">属性名称</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a>编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a class="table-del">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'tabTable',
|
||||
data(){
|
||||
return{
|
||||
selectedRowKeys: [],
|
||||
loading: false,
|
||||
ipagination:true,
|
||||
|
||||
}
|
||||
},
|
||||
props:{
|
||||
tableData:Array,
|
||||
columns:Array
|
||||
},
|
||||
mounted() {
|
||||
// console.log('colum',this.tableData,this.columns)
|
||||
},
|
||||
methods:{
|
||||
onSelectChange(selectedRowKeys) {
|
||||
// console.log('selectedRowKeys changed: ', selectedRowKeys);
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
},
|
||||
handleTableChange(){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tab-table{
|
||||
.table-del{
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<div class="tag-content">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="'标签项名称'">
|
||||
<j-input :placeholder="'请输入标签名称'" v-model="queryParam.tagName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
</div>
|
||||
<a-modal class="show-content" v-model="contentVisible" title="新增" ok-text="保存" cancel-text="取消" @ok="hideModal" @cancel="cancelModel">
|
||||
<a-form-model
|
||||
class="tag-content"
|
||||
ref="ruleForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item ref="tagName" label="标签名称" prop="tagName">
|
||||
<a-input
|
||||
v-model="form.tagName"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.tagName.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="标签类型" prop="tagType">
|
||||
<a-select v-model="form.tagType" placeholder="请选择标签类型">
|
||||
<a-select-option value="1">
|
||||
文本框
|
||||
</a-select-option>
|
||||
<a-select-option value="2">
|
||||
下拉单选
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item ref="describe" label="描述" prop="describe">
|
||||
<a-input
|
||||
v-model="form.describe"
|
||||
@blur="
|
||||
() => {
|
||||
$refs.describe.onFieldBlur();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<tab-table :tableData="tableData" :columns="columns"></tab-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabTable from './tabTable'
|
||||
export default {
|
||||
name: 'tagContent',
|
||||
components:{
|
||||
tabTable
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
queryParam:{
|
||||
tagName:'',
|
||||
},
|
||||
contentVisible:false,
|
||||
tableData:[
|
||||
{
|
||||
key: '1',
|
||||
tagName: '适用地区',
|
||||
tagType:'下拉单选',
|
||||
describe:'单选',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
tagName: '类别',
|
||||
tagType:'下拉单选',
|
||||
describe:'单选',
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: '标签名称',
|
||||
dataIndex: 'tagName',
|
||||
key: 'tagName',
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '标签类型',
|
||||
align: "center",
|
||||
width: 100,
|
||||
dataIndex: 'tagType',
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
align: "center",
|
||||
width: 100,
|
||||
dataIndex: 'describe',
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 170
|
||||
}
|
||||
],
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 14 },
|
||||
form:{
|
||||
tagName:'',
|
||||
tagType:'',
|
||||
describe:''
|
||||
},
|
||||
rules:{
|
||||
tagName:[{ required: true, message: '请输入标签名称', trigger: 'change' },
|
||||
{ min: 1, max: 100, message: 'Length should be 1 to 100', trigger: 'blur' }],
|
||||
tagType:[
|
||||
{ required: true, message: '请选择标签类型', trigger: 'blur' },
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
searchQuery(){
|
||||
|
||||
},
|
||||
searchReset(){
|
||||
|
||||
},
|
||||
handleAdd(){
|
||||
this.contentVisible=true
|
||||
},
|
||||
hideModal(){
|
||||
this.contentVisible=false
|
||||
},
|
||||
cancelModel(){
|
||||
this.contentVisible=false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,237 @@
|
||||
<template>
|
||||
<div class="tag-item">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="'标签项名称'">
|
||||
<j-input :placeholder="'请输入标签名称'" v-model="queryParam.tagName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="'显示区域'">
|
||||
<a-select v-model="queryParam.area" :placeholder="$t('pleaseSelect')">
|
||||
<a-select-option :value="item.value" v-for="item in areas">{{item.label}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" @click="handleShow">展示区域管理</a-button>
|
||||
</div>
|
||||
<a-drawer class="show-drawer" title="新增标签项" placement="right" width="1000px" @close="close" :visible="drawerVisible">
|
||||
<new-drawer v-if="drawerVisible"></new-drawer>
|
||||
</a-drawer>
|
||||
<a-modal class="show-area" v-model="areaVisible" title="展示区域管理" :footer="null" @cancel="hideModal">
|
||||
<area-manage v-if="areaVisible" @diaHide="diaHide" :areaTable="areaTable"></area-manage>
|
||||
</a-modal>
|
||||
<div class="tag-doc-tab">
|
||||
<a-tabs default-active-key="1" @change="callbackTab">
|
||||
<a-tab-pane key="1" tab="文档库">
|
||||
<tabTable :tableData="tableData" :columns="taglabColumns"></tabTable>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="文档拆分" force-render>
|
||||
<tabTable :tableData="tableData" :columns="tagSplit"></tabTable>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JInput from '@/components/jero/JInput'
|
||||
import tabTable from './tabTable'
|
||||
import areaManage from '../dialog/areaManage'
|
||||
import newDrawer from '../dialog/newDrawer'
|
||||
export default {
|
||||
name: 'tagItem',
|
||||
components:{
|
||||
JInput,
|
||||
tabTable,
|
||||
areaManage,
|
||||
newDrawer
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
queryParam:{
|
||||
area:'', //显示区域
|
||||
tagName:'', //标签项名称
|
||||
page:1,
|
||||
pageSize:10,
|
||||
},
|
||||
areas:[
|
||||
{
|
||||
value: 1,
|
||||
label:'文档库'
|
||||
},
|
||||
{
|
||||
value:2,
|
||||
label:'文档条款'
|
||||
}
|
||||
],
|
||||
tableData:[],
|
||||
taglab:[
|
||||
{
|
||||
key: '1',
|
||||
name: '编号',
|
||||
englishName:'number',
|
||||
type:'文本框',
|
||||
length:100,
|
||||
numberSort:1,
|
||||
showArea:'文档库'
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: '标题',
|
||||
englishName:'title',
|
||||
type:'下拉单选',
|
||||
length:100,
|
||||
numberSort:2,
|
||||
showArea:'文档拆分'
|
||||
},
|
||||
],
|
||||
taglabColumns: [
|
||||
{
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
slots: { title: 'customTitle' },
|
||||
scopedSlots: { customRender: 'name' },
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '英文名称',
|
||||
align: "center",
|
||||
width: 100,
|
||||
dataIndex: 'englishName',
|
||||
},
|
||||
{
|
||||
title: '属性类型',
|
||||
align: "center",
|
||||
width: 100,
|
||||
dataIndex: 'type',
|
||||
},
|
||||
{
|
||||
title: '字段长度',
|
||||
align: "center",
|
||||
width: 80,
|
||||
dataIndex: 'length'
|
||||
},
|
||||
{
|
||||
title: '展示顺序',
|
||||
align: "center",
|
||||
width: 80,
|
||||
dataIndex: 'numberSort'
|
||||
},
|
||||
{
|
||||
title: '展示区域',
|
||||
align: "center",
|
||||
width: 80,
|
||||
dataIndex: 'showArea'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 170
|
||||
}
|
||||
],
|
||||
taglabSplit:[
|
||||
{
|
||||
key: '1',
|
||||
name: '编号',
|
||||
englishName:'number',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: '标题',
|
||||
englishName:'title',
|
||||
},
|
||||
],
|
||||
tagSplit:[
|
||||
{
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
slots: { title: 'customTitle' },
|
||||
scopedSlots: { customRender: 'name' },
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '英文名称',
|
||||
align: "center",
|
||||
width: 100,
|
||||
dataIndex: 'englishName',
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 170
|
||||
}
|
||||
],
|
||||
areaVisible:false,
|
||||
areaTable:[],
|
||||
drawerVisible:false
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
searchQuery(){
|
||||
|
||||
},
|
||||
searchReset(){
|
||||
|
||||
},
|
||||
handleAdd(){
|
||||
this.drawerVisible=true
|
||||
},
|
||||
handleShow(){
|
||||
this.areaVisible=true
|
||||
},
|
||||
callbackTab(value){
|
||||
console.log('values',value)
|
||||
if(value==1){
|
||||
this.tableData=this.taglab
|
||||
this.tableData=this.taglabSplit
|
||||
}
|
||||
},
|
||||
diaHide(vis){
|
||||
this.areaVisible=vis
|
||||
console.log('vis',vis)
|
||||
},
|
||||
hideModal(){
|
||||
this.visible = false;
|
||||
},
|
||||
close(){
|
||||
this.drawerVisible=false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
.show-area{
|
||||
.ant-modal-wrap{
|
||||
.ant-modal{
|
||||
width: 800px!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user