mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-21 02:57:54 +08:00
调整流程详情显示效果
添加DataGrid数据格式
This commit is contained in:
@@ -51,9 +51,7 @@ function MainGrid() {
|
||||
columns: [
|
||||
{
|
||||
name: 'Id',
|
||||
label: '数据ID',
|
||||
width: 100
|
||||
, hide: true
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
name: 'Name',
|
||||
@@ -65,34 +63,16 @@ function MainGrid() {
|
||||
label: '产品数量',
|
||||
width: 100
|
||||
},
|
||||
|
||||
{
|
||||
name: 'Price',
|
||||
label: '产品单价',
|
||||
name: 'StateName',
|
||||
label: '当前流程',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
label: '出库/入库',
|
||||
width: 100
|
||||
, align: 'center',
|
||||
items: [{ '0': '出库' }, { '1': '入库' }],
|
||||
},
|
||||
{
|
||||
name: 'User',
|
||||
label: '可见范围(测试资源使用)',
|
||||
width: 100,
|
||||
items: [{ '': '全部可见' }, { 'ADMIN': '管理员可见' },{'DEV':'开发可见'}],
|
||||
},
|
||||
{
|
||||
name: 'Time',
|
||||
label: '操作时间',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
name: 'OrgId',
|
||||
label: '组织ID',
|
||||
width: 100
|
||||
},
|
||||
name: 'State',
|
||||
hide:true
|
||||
}
|
||||
],
|
||||
dataUrl: url + selectedId,
|
||||
fullGrid: true,
|
||||
@@ -114,7 +94,6 @@ var list = new MainGrid();
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
var update = false;
|
||||
var show = function () {
|
||||
BJUI.dialog({ id: 'editDlg', title: '编辑对话框', target: '#editDlg' });
|
||||
$("#btnSave").on("click", function () {
|
||||
@@ -123,13 +102,11 @@ var editDlg = function () {
|
||||
}
|
||||
return {
|
||||
add: function () { //弹出添加
|
||||
update = false;
|
||||
show();
|
||||
$.CurrentDialog.find("form")[0].reset(); //reset方法只能通过dom调用
|
||||
$("#Id").val('00000000-0000-0000-0000-000000000000');
|
||||
},
|
||||
update: function (ret) { //弹出编辑框
|
||||
update = true;
|
||||
show();
|
||||
$('#Id').val(ret.Id);
|
||||
$('#Name').val(ret.Name);
|
||||
@@ -179,6 +156,21 @@ function edit() {
|
||||
editDlg.update(selected);
|
||||
}
|
||||
|
||||
//进度详情
|
||||
function detail() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) {
|
||||
return;
|
||||
}
|
||||
$(this).dialog({
|
||||
id: 'detailDlg',
|
||||
url: '/GoodsApplies/Detail?id=' + selected.Id,
|
||||
title: '进度详情',
|
||||
width: 800,
|
||||
height:600
|
||||
});
|
||||
}
|
||||
|
||||
function add() {
|
||||
editDlg.add();
|
||||
}
|
||||
|
40
OpenAuth.Mvc/BllScripts/processDetail.js
Normal file
40
OpenAuth.Mvc/BllScripts/processDetail.js
Normal file
@@ -0,0 +1,40 @@
|
||||
var schemecode = 'SimpleWF';
|
||||
var wfdesigner = undefined;
|
||||
console.log("detail");
|
||||
|
||||
function wfdesignerRedraw() {
|
||||
var data;
|
||||
|
||||
if (wfdesigner != undefined) {
|
||||
data = wfdesigner.data;
|
||||
wfdesigner.destroy();
|
||||
}
|
||||
console.log(QueryString.id); //取不到值??
|
||||
var processid = $("#processId").val();
|
||||
|
||||
wfdesigner = new WorkflowDesigner({
|
||||
name: 'simpledesigner',
|
||||
apiurl: '/Designer/API',
|
||||
renderTo: 'wfdesigner',
|
||||
imagefolder: '/images/',
|
||||
graphwidth: 800,
|
||||
graphheight: 600
|
||||
});
|
||||
|
||||
if (data == undefined) {
|
||||
var p = { schemecode: schemecode, processid: processid, readonly: true };
|
||||
if (wfdesigner.exists(p))
|
||||
wfdesigner.load(p);
|
||||
else
|
||||
wfdesigner.create();
|
||||
} else {
|
||||
wfdesigner.data = data;
|
||||
wfdesigner.render();
|
||||
}
|
||||
}
|
||||
|
||||
wfdesignerRedraw();
|
||||
|
||||
|
||||
|
||||
//@@ sourceURL=processDetail.js
|
36
OpenAuth.Mvc/BllScripts/queryString.js
Normal file
36
OpenAuth.Mvc/BllScripts/queryString.js
Normal file
@@ -0,0 +1,36 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : OpenAuth.Mvc
|
||||
// Author : yubaolee
|
||||
// Created : 09-04-2016
|
||||
//
|
||||
// Last Modified By : yubaolee
|
||||
// Last Modified On : 09-04-2016
|
||||
// ***********************************************************************
|
||||
// <copyright file="queryString.js" company="www.cnblogs.com/yubaolee">
|
||||
// 版权所有(C) 2015
|
||||
// </copyright>
|
||||
// <summary>解析URL中的参数</summary>
|
||||
// ***********************************************************************
|
||||
|
||||
var QueryString = function () {
|
||||
// This function is anonymous, is executed immediately and
|
||||
// the return value is assigned to QueryString!
|
||||
var query_string = {};
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
// If first entry with this name
|
||||
if (typeof query_string[pair[0]] === "undefined") {
|
||||
query_string[pair[0]] = pair[1];
|
||||
// If second entry with this name
|
||||
} else if (typeof query_string[pair[0]] === "string") {
|
||||
var arr = [query_string[pair[0]], pair[1]];
|
||||
query_string[pair[0]] = arr;
|
||||
// If third or later entry with this name
|
||||
} else {
|
||||
query_string[pair[0]].push(pair[1]);
|
||||
}
|
||||
}
|
||||
return query_string;
|
||||
}();
|
Reference in New Issue
Block a user