97165467 by weimo934

删选流程

1 parent e860518a
......@@ -352,6 +352,16 @@ function listByRoleIdSucceFunc(data, object, navigator, divId, nav, text) {
'image/index/menus/normmodelmanage/icon_sjygl_select.svg',
'image/index/menus/normmodelmanage/icon_yxjk_select.svg',
]
}else if(navigator==='批后管理'){
var activeIconUrlList = [
'image/index/menus/normmodelmanage/icon_zbgl_select.svg',
'image/index/menus/normmodelmanage/icon_zbtxgl_select.svg',
'image/index/menus/normmodelmanage/icon_zbzgl_select.svg',
'image/index/menus/normmodelmanage/icon_mxgl_select.svg',
'image/index/menus/normmodelmanage/icon_sfgl_select.svg',
'image/index/menus/normmodelmanage/icon_sjygl_select.svg',
'image/index/menus/normmodelmanage/icon_yxjk_select.svg',
]
}
for (var i = 0;i<data.length;i++){
for(var j = 0;j<activeIconUrlList.length;j++){
......@@ -1968,6 +1978,7 @@ function initFirstMenu() {
dataType: "json",
async: false,
success: function (data) {
debugger
var menus = data.lists;
menuNavList = menus;
var resourceSortList = data.resourceSort;
......
......@@ -14,7 +14,7 @@ var createMethod = null; // 流程的创建方式(接件还是续办)
var version = null; // 版本1.0
var orign = null; // 来源页面
$(function() {
$(function () {
projectId = getQueryString("projectId");
createMethod = getQueryString("createmethod");
version = getQueryString("FLOWVERSION");
......@@ -44,21 +44,21 @@ var vm = new Vue({
ajaxPromise({
url: ITEMTYPELISTURL,
data: {flowId: flowObj.id}
}).then((result)=> {
}).then((result) => {
if (Array.isArray(result) && result.length > 0) {
layer.open({
type: 1,
btn:['确定','取消'],
title:'请选择事项类型',
btn: ['确定', '取消'],
title: '请选择事项类型',
content: $("#itemTypeDiv"),
success: function () {
vm.itemTypeArray = result;
vm.radio = result[0].id;
},
yes:function(){
yes: function () {
vm.openHandleJumpUrl(flowObj.id, vm.radio);
},
btn2:function(index){
btn2: function (index) {
layer.close(index);
}
});
......@@ -66,8 +66,8 @@ var vm = new Vue({
} else {
vm.openHandleJumpUrl(flowObj.id);
}
}).catch((error)=> {
layer.msg("获取事项类型出错!",{icon: 2});
}).catch((error) => {
layer.msg("获取事项类型出错!", {icon: 2});
});
},
/**
......@@ -101,10 +101,10 @@ var vm = new Vue({
}
ajaxPromise({
data: JSON.stringify({"flowId": flowId,"userId": userId}),
data: JSON.stringify({"flowId": flowId, "userId": userId}),
contentType: "application/json",
url: SAVEFLOWUSERCOUNTURL
}).catch((error)=> {
}).catch((error) => {
console.error(error);
});
},
......@@ -141,7 +141,7 @@ var vm = new Vue({
itemObject = {};
// 获取所有符合显示的事项
dataflows.forEach( function (item) {
dataflows.forEach(function (item) {
var createmethod = item.createmethod;
var flowtypeName = datatypes[item.flowtype];
if (flowtypeName && flowtypeName !== "会议类") { // 过滤会议类和其他类
......@@ -222,37 +222,52 @@ var vm = new Vue({
data: JSON.stringify({"userId": userId}),
contentType: "application/json",
url: SEARCHFLOWUSERCOUNTURL
}).then(function(result) {
}).then(function (result) {
if (result.status === "ok") {
flowUserCount = result.data.rows;
return ajaxPromise({ url: LISTSTARTURL });
return ajaxPromise({url: LISTSTARTURL});
} else {
console.error(result.message);
}
}).catch(function(error) {
}).catch(function (error) {
console.error(error);
}).then(function (result) {
localStorage.orign = orign;
var result = result;
// 规划审查流程筛选
if (orign === 'ghsc') {
result[0] = result[0].filter(item => {
return item.name === '数据申请' || item.name === '规划成果审查';
let keys = [];
keys = Object.keys(result[1]);
for (let item=0;item<keys.length;item++){
if (result[1][keys[item]] === "规划审查") {
result[0] = result[0].filter(it => {
return it.flowtype === keys[item];
});
} else if (orign === 'ywxt-xmsp') {
result[0] = result[0].filter(item => {
return item.name === '工程建设许可阶段并联审批'
|| item.name === '立项用地规划许可阶段并联审批'
|| item.name === '施工许可阶段并联审批'
|| item.name === '竣工验收阶段并联审批'
|| item.name === '项目储备策划生成'
|| item.name === '成果审查子流程测试'
|| item.name === '出让类项目储备策划生成'
||item.name==='项目策划生成(政府投资工程建设项目类)'
||item.name==='项目策划生成(企业投资项目用地储备类)'
;
}
}
} else if (orign === 'ajcc') {
let keys = [];
keys = Object.keys(result[1]);
for (let item=0;item<keys.length;item++){
if (result[1][keys[item]] === "案件查处") {
result[0] = result[0].filter(it => {
console.log(keys[item])
return it.flowtype === keys[item];
});
}
}
}else if (orign==='phgl'){
let keys = [];
keys = Object.keys(result[1]);
for (let item=0;item<keys.length;item++){
if (result[1][keys[item]] === "批后监管") {
result[0] = result[0].filter(it => {
console.log(keys[item])
return it.flowtype === keys[item];
});
}
}
}
var itemObject = vm.setData(result);
vm.itemObject = itemObject;
vm.oldItemObject = itemObject;
......@@ -268,17 +283,18 @@ var vm = new Vue({
* @param highilght 亮显值
* @param text
*/
function highilghtField (highilght, text) {
function highilghtField(highilght, text) {
if (highilght && text) {
var reg = new RegExp(highilght.replace(/[.\\[\]{}()|^$?*+]/g, "\\$&"), "g");
text = text.toString().replace(reg, '<span style="color: red">' + highilght + '</span>');
};
}
;
return text;
};
function ajaxPromise(options) {
return new Promise(function (resolve, reject) {
if ( typeof options !== "object" ) {
if (typeof options !== "object") {
return reject("参数错误!");
}
let _type = options.type || "POST";
......@@ -289,8 +305,8 @@ function ajaxPromise(options) {
data: options.data,
dataType: options.dataType,
contentType: options.contentType,
headers: {"token":$.cookie('ftoken') },
success: function(result){
headers: {"token": $.cookie('ftoken')},
success: function (result) {
resolve(result);
},
error: function (error) {
......@@ -305,7 +321,7 @@ function ajaxPromise(options) {
*
* @returns uuid
*/
function uuid(){
function uuid() {
var s = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
......@@ -322,6 +338,7 @@ function uuid(){
ajaxPromise({
url: ITEMSALLURL,
data: {name: KVTREEKEY}
}).then((result)=> {
}).then((result) => {
debugger
defaultUsedClass = result;
});
......