Former-commit-id: 66e381a2e8ef70b664fe41696c031eaba932591f
master
wangbing 5 years ago
parent 961531a459
commit c8f60a7d8d

@ -221,6 +221,7 @@ public class ResManagerImpl implements ResManager {
tree.setResValue(next.getResValue()); tree.setResValue(next.getResValue());
tree.setValid(next.getValid()); tree.setValid(next.getValid());
tree.setRowVersion(next.getRowVersion()); tree.setRowVersion(next.getRowVersion());
tree.setLabel(next.getResName());
if (next.getResCode() != null && next.getResCode().split("_").length == level) { if (next.getResCode() != null && next.getResCode().split("_").length == level) {
allMap.put(tree.getResCode(), tree); allMap.put(tree.getResCode(), tree);
@ -234,7 +235,7 @@ public class ResManagerImpl implements ResManager {
if (Ptree != null) break; if (Ptree != null) break;
} }
if (Ptree != null) { if (Ptree != null) {
Ptree.getChildren().add(tree); Ptree.addChild(tree);
} else { } else {
data.add(tree); data.add(tree);
} }

@ -48,6 +48,18 @@ public class ResUpdateRequest extends BaseUpdateRequest {
@Length(min = 0, max = 255, message = "[resValue]资源内容长度不合法(0-255)") @Length(min = 0, max = 255, message = "[resValue]资源内容长度不合法(0-255)")
private String resValue; private String resValue;
/**
*
*/
@Length(min = 0, max = 50, message = "[supCode]上级代码长度不合法(0-50)")
private String supCode;
/**
*
*/
@Length(min = 0, max = 50, message = "[supName]上级名称长度不合法(0-50)")
private String supName;
/** /**
* *
*/ */
@ -94,6 +106,22 @@ public class ResUpdateRequest extends BaseUpdateRequest {
this.resValue = resValue; this.resValue = resValue;
} }
public String getSupCode() {
return this.supCode;
}
public void setSupCode(String supCode) {
this.supCode = supCode;
}
public String getSupName() {
return this.supName;
}
public void setSupName(String supName) {
this.supName = supName;
}
public Boolean getValid() { public Boolean getValid() {
return this.valid; return this.valid;
} }

@ -174,7 +174,6 @@
<el-tree <el-tree
style="margin-top: 10px" style="margin-top: 10px"
:data="treeData" :data="treeData"
show-checkbox
node-key="id" node-key="id"
ref="tree" ref="tree"
default-expand-all default-expand-all

@ -79,7 +79,7 @@
align="center" align="center"
prop="valid" prop="valid"
label="是否有效" label="是否有效"
width="60"> width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag size="mini" v-if="scope.row.valid">有效</el-tag> <el-tag size="mini" v-if="scope.row.valid">有效</el-tag>
<el-tag size="mini" type="danger" v-if="!scope.row.valid">无效</el-tag> <el-tag size="mini" type="danger" v-if="!scope.row.valid">无效</el-tag>
@ -87,24 +87,25 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="code" prop="resCode"
width="100"
label="资源代码"> label="资源代码">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="value" prop="resName"
label="资源内容" label="资源名称">
width="300">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="comment" prop="resType"
label="资源描述"> label="资源类型">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="resType" prop="resValue"
label="资源类型"> width="200"
label="资源内容">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
@ -168,14 +169,13 @@
<el-tree <el-tree
style="margin-top: 10px" style="margin-top: 10px"
:data="treeData" :data="treeData"
show-checkbox node-key="resCode"
node-key="id"
ref="tree" ref="tree"
default-expand-all default-expand-all
:filter-node-method="filterTree" :filter-node-method="filterTree"
:expand-on-click-node="false"> :expand-on-click-node="false">
<div class="tree" slot-scope="{ node, data }"> <div class="tree" slot-scope="{ node, data }">
<span>{{ data.comment }}<span style="color: #409EFF">[{{data.code}}]</span></span> <span>{{ data.resName }}<span style="color: #409EFF">[{{data.resCode}}]</span></span>
<span> <span>
<el-button <el-button
icon="el-icon-plus" icon="el-icon-plus"
@ -305,7 +305,7 @@
this.form.title = "资源新增"; this.form.title = "资源新增";
this.form.dialog = true; this.form.dialog = true;
this.form.id = ""; this.form.id = "";
this.form.resCode = pItem.code + "_"; this.form.resCode = pItem.resCode + "_";
this.form.resName = ""; this.form.resName = "";
this.form.resType = ""; this.form.resType = "";
this.form.resValue = ""; this.form.resValue = "";

Loading…
Cancel
Save

Powered by TurnKey Linux.