尝试解决树型字典
This commit is contained in:
parent
e834c617ef
commit
42dc36da06
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$('#dictable').datagrid({
|
$('#dictable').treegrid({
|
||||||
rownumbers: true,
|
rownumbers: true,
|
||||||
singleSelect: true,
|
singleSelect: true,
|
||||||
striped: true,
|
striped: true,
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
onClick: function (node) {
|
onClick: function (node) {
|
||||||
//是叶子节点则打开或跳转到tab页。
|
//是叶子节点则打开或跳转到tab页。
|
||||||
if ($('#dicclasstree').tree('isLeaf', node.target)) {
|
if ($('#dicclasstree').tree('isLeaf', node.target)) {
|
||||||
$("#dictable").datagrid({
|
$("#dictable").treegrid({
|
||||||
url: 'getdickey?dicclass=' + node.id + '&a=datagrid',
|
url: 'getdickey?dicclass=' + node.id + '&a=datagrid',
|
||||||
});
|
});
|
||||||
$("#dictable").attr('name', node.id);
|
$("#dictable").attr('name', node.id);
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
|
|
||||||
//ajax接收的才是js对象
|
//ajax接收的才是js对象
|
||||||
function deldict() {
|
function deldict() {
|
||||||
var row = $('#dictable').datagrid('getSelected');
|
var row = $('#dictable').treegrid('getSelected');
|
||||||
if (row) {
|
if (row) {
|
||||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||||
if (r) {
|
if (r) {
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
beforeSend: function () { },
|
beforeSend: function () { },
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.code == 1) {
|
if (data.code == 1) {
|
||||||
$("#dictable").datagrid('reload');
|
$("#dictable").treegrid('reload');
|
||||||
} else {
|
} else {
|
||||||
$.messager.alert('提示', '您无权删除!');
|
$.messager.alert('提示', '您无权删除!');
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function editdict() {
|
function editdict() {
|
||||||
var row = $('#dictable').datagrid('getSelected');
|
var row = $('#dictable').treegrid('getSelected');
|
||||||
if (row) {
|
if (row) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
|
|
BIN
需求/惠东需求.xlsx
BIN
需求/惠东需求.xlsx
Binary file not shown.
Loading…
Reference in New Issue