用户管理前后端代码提交
This commit is contained in:
parent
049a463615
commit
4642b1a6ae
|
|
@ -1,12 +1,12 @@
|
|||
let form, layer, dtree, table, tableIns;
|
||||
let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
|
||||
let orgData,selectOrgId="";
|
||||
let orgData, selectOrgId = "";
|
||||
|
||||
layui.config({
|
||||
base: "../../js/layui-v2.6.8/dtree/", //此处路径请自行处理, 可以使用绝对路径
|
||||
}).extend({
|
||||
dtree: 'dtree'
|
||||
}).use(['form', 'layer', 'table','dtree', 'laydate'], function () {
|
||||
}).use(['form', 'layer', 'table', 'dtree', 'laydate'], function () {
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
|
|
@ -20,10 +20,11 @@ layui.config({
|
|||
'processId': obj.value,
|
||||
'status': obj.elem.checked ? 1 : 0
|
||||
}
|
||||
params={
|
||||
encryptedData:encryptCBC(JSON.stringify(params))
|
||||
params = {
|
||||
encryptedData: encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {}, function (result) {
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
console.log(result)
|
||||
reloadData();
|
||||
if (result.status === 200) {
|
||||
|
|
@ -89,24 +90,26 @@ function initTable(dataList, limit, page) {
|
|||
cols: [
|
||||
[
|
||||
//表头
|
||||
{title: "序号", width: 80, unresize: true, align: "center",
|
||||
{
|
||||
title: "序号", width: 80, unresize: true, align: "center",
|
||||
templet: function (d) {
|
||||
return (page - 1) * limit + d.LAY_INDEX;
|
||||
}
|
||||
},
|
||||
{field: "professionName", title: "专业", unresize: true, align: "center"},
|
||||
{field: "processName", title: "工序", unresize: true, align: "center"},
|
||||
{field: "status", title: "状态", align: "center",templet: '#is-state'},
|
||||
{field: "createTime", title: "创建时间", align: "center",templet: 'center'},
|
||||
{title: "操作", unresize: true, width: 300, align: "center",
|
||||
{field: "status", title: "状态", align: "center", templet: '#is-state'},
|
||||
{field: "createTime", title: "创建时间", align: "center", templet: 'center'},
|
||||
{
|
||||
title: "操作", unresize: true, width: 300, align: "center",
|
||||
templet: function (d) {
|
||||
|
||||
let html = '';
|
||||
// let updaetpwd="<a class=\"layui-icon layui-icon-password\" style='cursor:pointer;' title='修改密码' onclick=\"resetPwd('" + d.id + "')\"></a>";
|
||||
let del="<a class=\"layui-icon layui-icon-delete\" style='cursor:pointer;' title='删除' onclick=\"delData('" + d.processId + "')\"></a>"
|
||||
let edit="<a class=\"layui-icon layui-icon-edit\" style='cursor:pointer;' title='修改' onclick=\"addProcesses('" + d.processId + "')\"></a>";
|
||||
html=edit+del;
|
||||
if(d.delFlag==1){
|
||||
let del = "<a class=\"layui-icon layui-icon-delete\" style='cursor:pointer;' title='删除' onclick=\"delData('" + d.processId + "')\"></a>"
|
||||
let edit = "<a class=\"layui-icon layui-icon-edit\" style='cursor:pointer;' title='修改' onclick=\"addProcesses('" + d.processId + "')\"></a>";
|
||||
html = edit + del;
|
||||
if (d.delFlag == 1) {
|
||||
return '';
|
||||
}
|
||||
return html;
|
||||
|
|
@ -127,21 +130,15 @@ function initTable(dataList, limit, page) {
|
|||
// 获取参数
|
||||
function getReqParams(page, limit, type) {
|
||||
let obj = {};
|
||||
if (!type) {
|
||||
obj = {
|
||||
page: page + "",
|
||||
limit: limit + "",
|
||||
keyWord: $('#keyWord').val(),
|
||||
|
||||
};
|
||||
} else {
|
||||
obj = {
|
||||
page: '1',
|
||||
limit: '10',
|
||||
keyWord: '',
|
||||
};
|
||||
if (type === 2) {
|
||||
$('#keyWord').val('')
|
||||
layui.form.render();
|
||||
}
|
||||
console.log(obj)
|
||||
obj = {
|
||||
page: page + "",
|
||||
limit: limit + "",
|
||||
keyWord: $('#keyWord').val(),
|
||||
};
|
||||
obj={
|
||||
encryptedData:encryptCBC(JSON.stringify(obj))
|
||||
}
|
||||
|
|
@ -151,7 +148,7 @@ function getReqParams(page, limit, type) {
|
|||
// 查询/重置
|
||||
function query(type) {
|
||||
pageNum = 1;
|
||||
pages(1, limitSize);
|
||||
pages(1, limitSize, type);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -173,6 +170,7 @@ function reloadData() {
|
|||
}
|
||||
openIframe2("addMajorTemp", title, "child/addMajorForm.html", '800px', '200px', param);
|
||||
}*/
|
||||
|
||||
//新增/修改工序
|
||||
function addProcesses(processId) {
|
||||
let title = '新增工序'
|
||||
|
|
@ -182,7 +180,7 @@ function addProcesses(processId) {
|
|||
let param = {
|
||||
'processId': processId
|
||||
}
|
||||
console.log(param+"param")
|
||||
console.log(param + "param")
|
||||
openIframe2("addProcessesTemp", title, "child/addProcessesForm.html", '800px', '300px', param);
|
||||
}
|
||||
|
||||
|
|
@ -196,8 +194,8 @@ function delData(processId) {
|
|||
let params = {
|
||||
'processId': processId
|
||||
}
|
||||
params={
|
||||
encryptedData:encryptCBC(JSON.stringify(params))
|
||||
params = {
|
||||
encryptedData: encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
ajaxRequest(url, "DELETE", params, true, function () {
|
||||
}, function (result) {
|
||||
|
|
|
|||
|
|
@ -144,22 +144,17 @@ function initTable(dataList, limit, page) {
|
|||
// 获取参数
|
||||
function getReqParams(page, limit, type) {
|
||||
let obj = {};
|
||||
if (!type) {
|
||||
obj = {
|
||||
page: page + "",
|
||||
limit: limit + "",
|
||||
keyWord: $('#keyWord').val(),
|
||||
};
|
||||
} else {
|
||||
obj = {
|
||||
page: '1',
|
||||
limit: '10',
|
||||
keyWord: '',
|
||||
};
|
||||
if (type === 2) {
|
||||
$('#keyWord').val('')
|
||||
layui.form.render();
|
||||
}
|
||||
console.log(obj)
|
||||
obj = {
|
||||
encryptedData: encryptCBC(JSON.stringify(obj))
|
||||
page: page + "",
|
||||
limit: limit + "",
|
||||
keyWord: $('#keyWord').val(),
|
||||
};
|
||||
obj={
|
||||
encryptedData:encryptCBC(JSON.stringify(obj))
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
@ -182,7 +177,7 @@ function query(type) {
|
|||
});
|
||||
}*/
|
||||
pageNum = 1;
|
||||
pages(1, limitSize);
|
||||
pages(1, limitSize,type);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<div class="layui-inline btns">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="reset()">重置
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(2)">重置
|
||||
</button>
|
||||
<!-- <button type="button" class="layui-btn layui-btn-primary layui-btn-sm btn-2"
|
||||
onclick="addMajor(null)">
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
<div class="layui-inline btns">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="reset()">重置
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(2)">重置
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm btn-2"
|
||||
onclick="addDataTemp(null)">
|
||||
|
|
|
|||
Loading…
Reference in New Issue