新增:数据资源表查看详情页适配表单配置

master
Guo XIn 1 year ago
parent c3aefcaafd
commit f3c8ee615f
  1. 2
      shandan-bianmu/src/main/resources/view/business/metadata/metadataEdit.html
  2. 10
      shandan-system/src/main/java/com/keyware/shandan/bianmu/controller/MetadataCommonController.java
  3. 72
      shandan-system/src/main/resources/view/business/metadata/details.html

@ -40,7 +40,7 @@
<input type="hidden" name="metadataComment" th:if="${field.fieldName == 'metadataName'}"> <input type="hidden" name="metadataComment" th:if="${field.fieldName == 'metadataName'}">
<!-- 文本框输入框类型 --> <!-- 文本框输入框类型 -->
<input class="layui-input" type="text" autocomplete="off" <input class="layui-input" type="text" autocomplete="off"
th:if="${field.fieldType == 'input'}" th:if="${field.fieldType == 'input' || field.fieldType == 'date'}"
th:name="${field.fieldName}" th:name="${field.fieldName}"
th:disabled="${field.isDisabled}" th:disabled="${field.isDisabled}"
th:placeholder="${field.showTitle}" th:placeholder="${field.showTitle}"

@ -1,6 +1,7 @@
package com.keyware.shandan.bianmu.controller; package com.keyware.shandan.bianmu.controller;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.keyware.shandan.bianmu.entity.DirectoryResource; import com.keyware.shandan.bianmu.entity.DirectoryResource;
import com.keyware.shandan.bianmu.entity.DirectoryVo; import com.keyware.shandan.bianmu.entity.DirectoryVo;
@ -12,6 +13,8 @@ import com.keyware.shandan.common.util.StringUtils;
import com.keyware.shandan.datasource.entity.DBTableColumnVo; import com.keyware.shandan.datasource.entity.DBTableColumnVo;
import com.keyware.shandan.datasource.entity.DataSourceVo; import com.keyware.shandan.datasource.entity.DataSourceVo;
import com.keyware.shandan.datasource.service.DataSourceService; import com.keyware.shandan.datasource.service.DataSourceService;
import com.keyware.shandan.system.entity.SysFormConfig;
import com.keyware.shandan.system.service.SysFormConfigService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
@ -50,6 +53,9 @@ public class MetadataCommonController {
@Autowired @Autowired
private DataLabelsService labelsService; private DataLabelsService labelsService;
@Autowired
private SysFormConfigService formConfigService;
/** /**
* 数据资源详细信息页面 * 数据资源详细信息页面
* *
@ -74,6 +80,10 @@ public class MetadataCommonController {
mav.addObject("exampleList", exampleData.getRecords()); mav.addObject("exampleList", exampleData.getRecords());
mav.addObject("LabelConfigSet", labelsService.formConfigList()); mav.addObject("LabelConfigSet", labelsService.formConfigList());
QueryWrapper<SysFormConfig> query = new QueryWrapper<>();
query.eq("FORM_TYPE", 1);
mav.addObject("metadataFormConfig", formConfigService.list(query));
return mav; return mav;
} }

@ -47,56 +47,40 @@
<div class="layui-tab-item layui-show"> <div class="layui-tab-item layui-show">
<div class="layui-form" lay-filter="details-form"> <div class="layui-form" lay-filter="details-form">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">数据名称</label> <label class="layui-form-label">数据表注释</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" readonly class="layui-input" name="metadataName" <input class="layui-input" type="text" readonly th:value="${detailsData.metadataComment}">
th:value="${detailsData.metadataName}">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item" th:each="field,iterStat : ${metadataFormConfig}" th:if="${field.isShow}">
<label class="layui-form-label">中文注释</label> <label class="layui-form-label" th:text="${field.showTitle}">字段名称</label>
<div class="layui-input-block">
<input type="text" readonly class="layui-input" name="metadataComment"
th:value="${detailsData.metadataComment}">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据密级</label>
<div class="layui-input-block">
<div dict-component="select" readonly dict-type="secret_level"
dict-name="secretLevel" th:data="${detailsData.secretLevel}"
id="dict-secret-level"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">主题任务</label>
<div class="layui-input-block">
<input type="text" readonly class="layui-input" name="themeTask"
th:value="${detailsData.themeTask}">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据类型</label>
<div class="layui-input-block">
<div dict-component="select" readonly dict-type="data_type" dict-name="dataType"
th:data="${detailsData.dataType}" id="dict-data-type"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据来源</label>
<div class="layui-input-block"> <div class="layui-input-block">
<div dict-component="select" readonly dict-type="data_source" <input type="hidden" name="metadataComment" th:if="${field.fieldName == 'metadataName'}">
dict-name="dataFrom" th:data="${detailsData.dataFrom}" <!-- 文本输入框-文本类型 -->
id="dict-data-form"></div> <input class="layui-input" type="text" readonly
</div> th:if="${field.fieldType == 'input'}"
</div> th:name="${field.fieldName}"
<div class="layui-form-item"> th:value="${detailsData[field.fieldName]}">
<label class="layui-form-label">任务时间</label> <!-- 文本输入框-日期类型 -->
<div class="layui-input-block"> <input class="layui-input" type="text" readonly
<input type="text" readonly class="layui-input" name="collectionTime" th:if="${field.fieldType == 'date'}"
th:value="${#dates.format(detailsData.collectionTime, 'yyyy-MM-dd HH:mm:ss')}"> th:name="${field.fieldName}"
th:value="${#dates.format(detailsData[field.fieldName], 'yyyy-MM-dd HH:mm:ss')}">
<!-- 文本输入框-文本域类型 -->
<textarea class="layui-textarea" readonly
th:if="${field.fieldType == 'textarea'}"
th:name="${field.fieldName}"
th:text="${detailsData[field.fieldName]}"></textarea>
<!-- 数据字典类型 -->
<div dict-component="select" readonly="readonly"
th:if="${field.fieldType == 'dict'}"
th:dict-type="${field.dictType}"
th:dict-name="${field.fieldName}"
th:data="${detailsData[field.fieldName]}"
th:id="${'dict-'+field.fieldName}"></div>
</div> </div>
</div> </div>
<div class="layui-form-item" th:each="labelSet, iterState:${LabelConfigSet}"> <div class="layui-form-item" th:each="labelSet, iterState:${LabelConfigSet}">
<label class="layui-form-label" th:text="${labelSet.fieldTitle}">标签类型</label> <label class="layui-form-label" th:text="${labelSet.fieldTitle}">标签类型</label>
<div class="layui-input-block label-set-component read-only" <div class="layui-input-block label-set-component read-only"