文档
测试

library

POST
/cnd_document/getAll.action

接口描述

请求后端调取程序库的列表信息

请求参数

参数名
类型
描述
必填
page
数字
页码
必填
rows
数字
每页记录数
必填
cnd_document.facno
数字
工厂分号
必填
cnd_document.to_url
数字
信息渠道
必填

响应参数

参数名
类型
描述
必填
dataType: "json"
JSON
返回信息
必填

说明 / 示例

$.ajax({ type: "POST", url: url, async:false, cache: false, dataType: "json",//预期服务器返回的数据类型 //contentType: "application/json; charset=utf-8", data : param, success: function (data) { //console.info(data); if (data.rows.length > 0) { layui.use('table', function () { var table = layui.table; var form = layui.form; console.info(data.rows); //展示已知数据 table.render({ elem: '#demo' , cols: [[ //标题栏 {type: 'checkbox',} , { field: 'id', title: '序号', width: 60, sort: true } , { field: 'file_name', title: '程序名称', width: 180, sort: true } , { field: 'class_time_end', title: '产品(工序)名称', width: 180, sort: true } , { field: 'uuid', title: '大小(KB)', width: 150, sort: true } , { field: 'creater', title: '创建人', width: 180, sort: true } , { field: 'create_time1', title: '创建时间', width: 180, sort: true } , { field: 'work_sta', title: '操作状态', width: 180, sort: true } , { field: '', title: '操作', width: 300, toolbar: '#barDemo' } ]] , data: data.rows , even: true , page: true //是否显示分页 //,limits: [5, 7, 10] , limit: 15 //每页默认显示的数量 }); table.on('tool(demo)', function(obj){ var data = obj.data; console.log(data); if(obj.event === 'del'){ layer.confirm('真的要删除吗?', function(index) { isdelect(data.id); }); } else if(obj.event === 'down'){ download(data.file_url, data.file_name+'程序下载'); }else if(obj.event === 'Issue'){ } }); }); } } });