123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <div id="activitiDefineDIV" class="plg-tab-container">
- <div id="activitiDefine" class="grid-container-full"></div>
- </div>
- <script type="text/javascript">
- var $ = layui.jquery,
- upload = layui.upload;
- var opts = {
- skin: "terrace",
- columns: [
- {
- id: "processDefineId",
- name: "processDefineId",
- type: 'txt',
- hidden: true
- },
- {
- id: "processDefineName",
- name: "流程实例定义名称",
- type: 'ro',
- width: 150
- },
- {
- id: "processDefineKey",
- name: "key值",
- type: 'ro',
- width: 200
- },
- {
- id: "description",
- name: "描述",
- type: 'ro',
- width: 150
- },
- {
- id: "resourceName",
- name: "xml文件名",
- type: 'ro',
- width: 150
- },
- {
- id: "diagramResourceName",
- name: "png文件名",
- type: 'ro',
- width: '*'
- }
- // {
- // id: "",
- // name: "操作",
- // type: 'ro',
- // width: 160,
- // render: function(v, d) {
- // return '<a href="javascript:void(0);" style="color: dodgerblue;" onclick="delactivitiDeployment(\'' + d["id"] + '\')">删除</a>';
- // }
- // }
- ],
- imagePath: "/prologui/assets/PlgGrid",
- url: "/api/service-activiti/activiti/processDefine", //数据接口
- type: "get", //数据提交方式,默认为get
- params: {
- pageNum: 1,
- pageSize: 10,
- defineName: null
- }, //查询提交参数,分页参数默认为pageNum,pageSize
- multiselect: false, //是否支持多选
- page: true, //是否启用分页
- toolbar:[
- {type: "input", name: 'defineName', label: '流程定义名称:',placeholder: '请输入流程定义名称'},{type: "newcolumn"}
- ,{type:"button", name:"searchBtn", value:"查询", offsetLeft:10},{type: "newcolumn"}
- ],
- totalCount: "totalCount" //总记录数字段,默认totalCount
-
- };
- var activitiDefine = new PlgGrid(opts);
- activitiDefine.renderTo("activitiDefine");
- activitiDefine.loadData();
-
- activitiDefine.attachToolBarEvent("onButtonClick", function(name){
- if(name == "searchBtn"){
- search();
- }
- });
- function search(){
- // var defineName = $("#defineName").val();
- // var am = activitiDefine.getParams();
- // am.defineName = defineName;
- // activitiDefine.loadData();
- var defineName = $("input[name='defineName']").val();
- var am = activitiDefine.getParams();
- am.defineName = defineName;
- activitiDefine.reload();
- }
- function delactivitiDeployment(deploymentId) {
- layer.confirm('确定删除?', {
- btn: ['确定', '取消'],
- }, function(index, layero) {
- //按钮【按钮一】的回调
- $.ajax({
- type: 'GET',
- url: "/api/service-activiti/activiti/deldeploy",
- data: {
- deploymentId : deploymentId
- },
- async: false,
- success: function(data) {
- activitiDefine.reload();
- alert(data.message);
- }
- });
- layer.close(index)
- });
- };
- </script>
|