|
|
|
@ -116,8 +116,8 @@
|
|
|
|
|
data: {
|
|
|
|
|
simpleData: {
|
|
|
|
|
enable: true,
|
|
|
|
|
idKey: "org_id",
|
|
|
|
|
pIdKey: "parent_id",
|
|
|
|
|
idKey: "id",
|
|
|
|
|
pIdKey: "pid",
|
|
|
|
|
rootPId: 0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -130,14 +130,10 @@
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
url: '/dsBase/organization/getOrgTreeByBureauId?bureau_id=0E0B7FED-AB9B-417E-8BA5-521DACAC5E78',
|
|
|
|
|
url: '/dsBase/yx/getDatasetTree',
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.code == 0) {
|
|
|
|
|
for (var i = 0; i < data.data.length; i++) {
|
|
|
|
|
data.data[i].name = data.data[i].org_name;
|
|
|
|
|
}
|
|
|
|
|
var zNodes = data.data;
|
|
|
|
|
success: function (res) {
|
|
|
|
|
var zNodes = res.data;
|
|
|
|
|
var jquery = window.$.fn.zTree;
|
|
|
|
|
jquery.init($("#mytree"), setting1, zNodes);
|
|
|
|
|
var treeObj = jquery.getZTreeObj("mytree");
|
|
|
|
@ -154,12 +150,11 @@
|
|
|
|
|
treeObj.selectNode(parentNode);
|
|
|
|
|
treeObj.expandAll(true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#treeDiv").height($(window).height() - 80);
|
|
|
|
|
|
|
|
|
|
// 点击区划树
|
|
|
|
@ -174,39 +169,48 @@
|
|
|
|
|
|
|
|
|
|
// org_id获取列表
|
|
|
|
|
function getTeaList(id) {
|
|
|
|
|
// 教师列表渲染
|
|
|
|
|
table.render({
|
|
|
|
|
elem: '#idTest'
|
|
|
|
|
, url: '/dsBase/teacher/getTeacherListByOrgId'
|
|
|
|
|
, where: {
|
|
|
|
|
org_id: id,
|
|
|
|
|
person_name: $("#searchTxt").val()
|
|
|
|
|
}
|
|
|
|
|
, cols: [[
|
|
|
|
|
{ type: 'checkbox', fixed: 'left', align: 'center' }
|
|
|
|
|
, { field: '', title: '序号', align: 'center', type: 'numbers', width: 80, fixed: true }
|
|
|
|
|
, { field: 'person_name', title: '职工姓名', align: 'center' }
|
|
|
|
|
, { field: 'xb', title: '性别', align: 'center' }
|
|
|
|
|
, { field: 'login_name', title: '登录名', align: 'center' }
|
|
|
|
|
, { field: 'original_pwd', title: '初始密码', align: 'center' }
|
|
|
|
|
, { fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center', width: 400, fixed: 'right' }
|
|
|
|
|
]]
|
|
|
|
|
, page: true
|
|
|
|
|
, done: function () {
|
|
|
|
|
$("[data-field='xb']").children().each(function () {
|
|
|
|
|
if ($(this).text() == '1') {
|
|
|
|
|
$(this).text("男")
|
|
|
|
|
} else if ($(this).text() == '2') {
|
|
|
|
|
$(this).text("女")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
$(".aaa").hover(function () {
|
|
|
|
|
$(this).css('color', '#C9C9C9')
|
|
|
|
|
}, function () {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
id = "1072161286269308900";
|
|
|
|
|
|
|
|
|
|
var _data = [];
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
url: '/dsBase/yx/getDataSetContent?datasetId=' + id + '&page=1&limit=1',
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
_data = res.data;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var _cols = [];
|
|
|
|
|
let keys = Object.keys(_data[0]);
|
|
|
|
|
|
|
|
|
|
keys.forEach((item, index) => {
|
|
|
|
|
var _obj = { field: item, title: item, edit: 'text', align: 'center', expandedMode: 'tips' }
|
|
|
|
|
_cols.push(_obj);
|
|
|
|
|
});
|
|
|
|
|
_cols.push({ title: '操作', align: 'center', toolbar: '#table-bar' });
|
|
|
|
|
|
|
|
|
|
table.render({
|
|
|
|
|
elem: '#ID-table-demo-data',
|
|
|
|
|
id: 'ID-table-demo-data',
|
|
|
|
|
url: '/dsBase/dataease/getDataSetContent?id=' + id,
|
|
|
|
|
height: 'full-85',
|
|
|
|
|
page: {
|
|
|
|
|
limit: 20
|
|
|
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
|
|
|
, prev: "上一页"
|
|
|
|
|
, next: "下一页"
|
|
|
|
|
},
|
|
|
|
|
request: {
|
|
|
|
|
pageName: 'pageNumber' //页码的参数名称,默认:page
|
|
|
|
|
, limitName: 'pageSize' //每页数据量的参数名,默认:limit
|
|
|
|
|
},
|
|
|
|
|
cols: [_cols]
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|