97165467 by weimo934

删选流程

1 parent e860518a
...@@ -352,6 +352,16 @@ function listByRoleIdSucceFunc(data, object, navigator, divId, nav, text) { ...@@ -352,6 +352,16 @@ function listByRoleIdSucceFunc(data, object, navigator, divId, nav, text) {
352 'image/index/menus/normmodelmanage/icon_sjygl_select.svg', 352 'image/index/menus/normmodelmanage/icon_sjygl_select.svg',
353 'image/index/menus/normmodelmanage/icon_yxjk_select.svg', 353 'image/index/menus/normmodelmanage/icon_yxjk_select.svg',
354 ] 354 ]
355 }else if(navigator==='批后管理'){
356 var activeIconUrlList = [
357 'image/index/menus/normmodelmanage/icon_zbgl_select.svg',
358 'image/index/menus/normmodelmanage/icon_zbtxgl_select.svg',
359 'image/index/menus/normmodelmanage/icon_zbzgl_select.svg',
360 'image/index/menus/normmodelmanage/icon_mxgl_select.svg',
361 'image/index/menus/normmodelmanage/icon_sfgl_select.svg',
362 'image/index/menus/normmodelmanage/icon_sjygl_select.svg',
363 'image/index/menus/normmodelmanage/icon_yxjk_select.svg',
364 ]
355 } 365 }
356 for (var i = 0;i<data.length;i++){ 366 for (var i = 0;i<data.length;i++){
357 for(var j = 0;j<activeIconUrlList.length;j++){ 367 for(var j = 0;j<activeIconUrlList.length;j++){
...@@ -1968,6 +1978,7 @@ function initFirstMenu() { ...@@ -1968,6 +1978,7 @@ function initFirstMenu() {
1968 dataType: "json", 1978 dataType: "json",
1969 async: false, 1979 async: false,
1970 success: function (data) { 1980 success: function (data) {
1981 debugger
1971 var menus = data.lists; 1982 var menus = data.lists;
1972 menuNavList = menus; 1983 menuNavList = menus;
1973 var resourceSortList = data.resourceSort; 1984 var resourceSortList = data.resourceSort;
......
...@@ -14,7 +14,7 @@ var createMethod = null; // 流程的创建方式(接件还是续办) ...@@ -14,7 +14,7 @@ var createMethod = null; // 流程的创建方式(接件还是续办)
14 var version = null; // 版本1.0 14 var version = null; // 版本1.0
15 var orign = null; // 来源页面 15 var orign = null; // 来源页面
16 16
17 $(function() { 17 $(function () {
18 projectId = getQueryString("projectId"); 18 projectId = getQueryString("projectId");
19 createMethod = getQueryString("createmethod"); 19 createMethod = getQueryString("createmethod");
20 version = getQueryString("FLOWVERSION"); 20 version = getQueryString("FLOWVERSION");
...@@ -44,21 +44,21 @@ var vm = new Vue({ ...@@ -44,21 +44,21 @@ var vm = new Vue({
44 ajaxPromise({ 44 ajaxPromise({
45 url: ITEMTYPELISTURL, 45 url: ITEMTYPELISTURL,
46 data: {flowId: flowObj.id} 46 data: {flowId: flowObj.id}
47 }).then((result)=> { 47 }).then((result) => {
48 if (Array.isArray(result) && result.length > 0) { 48 if (Array.isArray(result) && result.length > 0) {
49 layer.open({ 49 layer.open({
50 type: 1, 50 type: 1,
51 btn:['确定','取消'], 51 btn: ['确定', '取消'],
52 title:'请选择事项类型', 52 title: '请选择事项类型',
53 content: $("#itemTypeDiv"), 53 content: $("#itemTypeDiv"),
54 success: function () { 54 success: function () {
55 vm.itemTypeArray = result; 55 vm.itemTypeArray = result;
56 vm.radio = result[0].id; 56 vm.radio = result[0].id;
57 }, 57 },
58 yes:function(){ 58 yes: function () {
59 vm.openHandleJumpUrl(flowObj.id, vm.radio); 59 vm.openHandleJumpUrl(flowObj.id, vm.radio);
60 }, 60 },
61 btn2:function(index){ 61 btn2: function (index) {
62 layer.close(index); 62 layer.close(index);
63 } 63 }
64 }); 64 });
...@@ -66,8 +66,8 @@ var vm = new Vue({ ...@@ -66,8 +66,8 @@ var vm = new Vue({
66 } else { 66 } else {
67 vm.openHandleJumpUrl(flowObj.id); 67 vm.openHandleJumpUrl(flowObj.id);
68 } 68 }
69 }).catch((error)=> { 69 }).catch((error) => {
70 layer.msg("获取事项类型出错!",{icon: 2}); 70 layer.msg("获取事项类型出错!", {icon: 2});
71 }); 71 });
72 }, 72 },
73 /** 73 /**
...@@ -101,10 +101,10 @@ var vm = new Vue({ ...@@ -101,10 +101,10 @@ var vm = new Vue({
101 } 101 }
102 102
103 ajaxPromise({ 103 ajaxPromise({
104 data: JSON.stringify({"flowId": flowId,"userId": userId}), 104 data: JSON.stringify({"flowId": flowId, "userId": userId}),
105 contentType: "application/json", 105 contentType: "application/json",
106 url: SAVEFLOWUSERCOUNTURL 106 url: SAVEFLOWUSERCOUNTURL
107 }).catch((error)=> { 107 }).catch((error) => {
108 console.error(error); 108 console.error(error);
109 }); 109 });
110 }, 110 },
...@@ -141,7 +141,7 @@ var vm = new Vue({ ...@@ -141,7 +141,7 @@ var vm = new Vue({
141 itemObject = {}; 141 itemObject = {};
142 142
143 // 获取所有符合显示的事项 143 // 获取所有符合显示的事项
144 dataflows.forEach( function (item) { 144 dataflows.forEach(function (item) {
145 var createmethod = item.createmethod; 145 var createmethod = item.createmethod;
146 var flowtypeName = datatypes[item.flowtype]; 146 var flowtypeName = datatypes[item.flowtype];
147 if (flowtypeName && flowtypeName !== "会议类") { // 过滤会议类和其他类 147 if (flowtypeName && flowtypeName !== "会议类") { // 过滤会议类和其他类
...@@ -222,37 +222,52 @@ var vm = new Vue({ ...@@ -222,37 +222,52 @@ var vm = new Vue({
222 data: JSON.stringify({"userId": userId}), 222 data: JSON.stringify({"userId": userId}),
223 contentType: "application/json", 223 contentType: "application/json",
224 url: SEARCHFLOWUSERCOUNTURL 224 url: SEARCHFLOWUSERCOUNTURL
225 }).then(function(result) { 225 }).then(function (result) {
226 if (result.status === "ok") { 226 if (result.status === "ok") {
227 flowUserCount = result.data.rows; 227 flowUserCount = result.data.rows;
228 return ajaxPromise({ url: LISTSTARTURL }); 228 return ajaxPromise({url: LISTSTARTURL});
229 } else { 229 } else {
230 console.error(result.message); 230 console.error(result.message);
231 } 231 }
232 }).catch(function(error) { 232 }).catch(function (error) {
233 console.error(error); 233 console.error(error);
234 }).then(function (result) { 234 }).then(function (result) {
235 localStorage.orign = orign; 235 localStorage.orign = orign;
236 var result = result;
236 // 规划审查流程筛选 237 // 规划审查流程筛选
237 if (orign === 'ghsc') { 238 if (orign === 'ghsc') {
238 result[0] = result[0].filter(item => { 239 let keys = [];
239 return item.name === '数据申请' || item.name === '规划成果审查'; 240 keys = Object.keys(result[1]);
241 for (let item=0;item<keys.length;item++){
242 if (result[1][keys[item]] === "规划审查") {
243 result[0] = result[0].filter(it => {
244 return it.flowtype === keys[item];
240 }); 245 });
241 } else if (orign === 'ywxt-xmsp') { 246 }
242 result[0] = result[0].filter(item => { 247 }
243 return item.name === '工程建设许可阶段并联审批' 248 } else if (orign === 'ajcc') {
244 || item.name === '立项用地规划许可阶段并联审批' 249 let keys = [];
245 || item.name === '施工许可阶段并联审批' 250 keys = Object.keys(result[1]);
246 || item.name === '竣工验收阶段并联审批' 251 for (let item=0;item<keys.length;item++){
247 || item.name === '项目储备策划生成' 252 if (result[1][keys[item]] === "案件查处") {
248 || item.name === '成果审查子流程测试' 253 result[0] = result[0].filter(it => {
249 || item.name === '出让类项目储备策划生成' 254 console.log(keys[item])
250 ||item.name==='项目策划生成(政府投资工程建设项目类)' 255 return it.flowtype === keys[item];
251 ||item.name==='项目策划生成(企业投资项目用地储备类)'
252
253 ;
254 }); 256 });
255 } 257 }
258 }
259 }else if (orign==='phgl'){
260 let keys = [];
261 keys = Object.keys(result[1]);
262 for (let item=0;item<keys.length;item++){
263 if (result[1][keys[item]] === "批后监管") {
264 result[0] = result[0].filter(it => {
265 console.log(keys[item])
266 return it.flowtype === keys[item];
267 });
268 }
269 }
270 }
256 var itemObject = vm.setData(result); 271 var itemObject = vm.setData(result);
257 vm.itemObject = itemObject; 272 vm.itemObject = itemObject;
258 vm.oldItemObject = itemObject; 273 vm.oldItemObject = itemObject;
...@@ -268,17 +283,18 @@ var vm = new Vue({ ...@@ -268,17 +283,18 @@ var vm = new Vue({
268 * @param highilght 亮显值 283 * @param highilght 亮显值
269 * @param text 284 * @param text
270 */ 285 */
271 function highilghtField (highilght, text) { 286 function highilghtField(highilght, text) {
272 if (highilght && text) { 287 if (highilght && text) {
273 var reg = new RegExp(highilght.replace(/[.\\[\]{}()|^$?*+]/g, "\\$&"), "g"); 288 var reg = new RegExp(highilght.replace(/[.\\[\]{}()|^$?*+]/g, "\\$&"), "g");
274 text = text.toString().replace(reg, '<span style="color: red">' + highilght + '</span>'); 289 text = text.toString().replace(reg, '<span style="color: red">' + highilght + '</span>');
275 }; 290 }
291 ;
276 return text; 292 return text;
277 }; 293 };
278 294
279 function ajaxPromise(options) { 295 function ajaxPromise(options) {
280 return new Promise(function (resolve, reject) { 296 return new Promise(function (resolve, reject) {
281 if ( typeof options !== "object" ) { 297 if (typeof options !== "object") {
282 return reject("参数错误!"); 298 return reject("参数错误!");
283 } 299 }
284 let _type = options.type || "POST"; 300 let _type = options.type || "POST";
...@@ -289,8 +305,8 @@ function ajaxPromise(options) { ...@@ -289,8 +305,8 @@ function ajaxPromise(options) {
289 data: options.data, 305 data: options.data,
290 dataType: options.dataType, 306 dataType: options.dataType,
291 contentType: options.contentType, 307 contentType: options.contentType,
292 headers: {"token":$.cookie('ftoken') }, 308 headers: {"token": $.cookie('ftoken')},
293 success: function(result){ 309 success: function (result) {
294 resolve(result); 310 resolve(result);
295 }, 311 },
296 error: function (error) { 312 error: function (error) {
...@@ -305,7 +321,7 @@ function ajaxPromise(options) { ...@@ -305,7 +321,7 @@ function ajaxPromise(options) {
305 * 321 *
306 * @returns uuid 322 * @returns uuid
307 */ 323 */
308 function uuid(){ 324 function uuid() {
309 var s = []; 325 var s = [];
310 var hexDigits = "0123456789abcdef"; 326 var hexDigits = "0123456789abcdef";
311 for (var i = 0; i < 36; i++) { 327 for (var i = 0; i < 36; i++) {
...@@ -322,6 +338,7 @@ function uuid(){ ...@@ -322,6 +338,7 @@ function uuid(){
322 ajaxPromise({ 338 ajaxPromise({
323 url: ITEMSALLURL, 339 url: ITEMSALLURL,
324 data: {name: KVTREEKEY} 340 data: {name: KVTREEKEY}
325 }).then((result)=> { 341 }).then((result) => {
342 debugger
326 defaultUsedClass = result; 343 defaultUsedClass = result;
327 }); 344 });
......