This commit is contained in:
ly19960718 2021-07-29 12:22:17 +08:00
parent 6794457654
commit c92130ea21
3 changed files with 106 additions and 62 deletions

View File

@ -44,4 +44,11 @@ public class ConfigTableRouteController extends DefaultBaseController {
return new ModelAndView("configtable/list-field");
}
@GetMapping("input-field")
public ModelAndView inputField() {
return new ModelAndView("configtable/input-field");
}
}

View File

@ -128,6 +128,7 @@
</select>
</script>
</div>
<iframe src="" id="attribute" style="width: 100%;margin-top: -29px" frameborder="0" ></iframe>
</div>
</div>
</form>
@ -259,6 +260,31 @@
<script type="text/javascript" src="assets/js/vendor/sortable/moduleSet.js"></script>
<script type="text/javascript" src="assets/js/vendor/sortable/Sortable.min.js"></script>
<script>
/* var configArray = [{id:'',type:'', baseConfig:{name:'姓名',code:'name'},customConfig:{}}];*/
var configMap = new Map();
initMap();
//初始化配置
function initMap(){
configMap.set("2", {baseConfig:{name:'姓名',code:'name'},customConfig:{}})
}
//根据id获取配置
function getMapById(id){
return configMap.get(id);
}
//设置扩展属性
function setMapCustomData(id,key,value){
configMap.get(id).customConfig[key] = value;
}
//设置基础属性
function setBaseData(id,key,value){
configMap.get(id).baseConfig[key] = value;
}
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
@ -275,6 +301,10 @@
var configTableId = top.restAjax.params(window.location.href).configTableId;
var fieldList = [];
var height = $win.height() - 60
//iframe height
document.getElementById("attribute").height = height;
// 通过ID获取某个字段对象
function getField(fieldId) {
for(var i = 0 ; i < fieldList.length ; i++ ) {
@ -516,7 +546,14 @@
console.log(evt);
console.log(evt.item);
console.log(evt.nextSibling);
}
},
onChoose: function (evt) {
console.log("点击")
console.log(evt.item.id)
evt.oldIndex; // element index within parent
var path = top.restAjax.path('route/configtable/input-field?id={id}', [213])
$('#attribute').attr('src',path)
},
});
form.render(null, 'dataForm');
}, function(code, data) {