diff --git a/config/config.UAT.ts b/config/config.UAT.ts index 22b07c1..c31047c 100644 --- a/config/config.UAT.ts +++ b/config/config.UAT.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV:'UAT', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8280/provider_uat', + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8280/provider_uat', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/config/config.dev.ts b/config/config.dev.ts index 971d818..2a4cf79 100644 --- a/config/config.dev.ts +++ b/config/config.dev.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV: 'DEV', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider_dev', + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider_dev', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/config/config.prod.ts b/config/config.prod.ts index 99e7610..c00bb2e 100644 --- a/config/config.prod.ts +++ b/config/config.prod.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV:'PROD', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'https://60.10.26.178/provider', + // REACT_APP_XUNJIA_REDIRECT: 'https://60.10.26.178/provider', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/config/config.sim.ts b/config/config.sim.ts index bce3024..fa9e473 100644 --- a/config/config.sim.ts +++ b/config/config.sim.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV: 'sim', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider', + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/config/router.config.ts b/config/router.config.ts index b4159e9..f1e96f5 100644 --- a/config/router.config.ts +++ b/config/router.config.ts @@ -3,11 +3,14 @@ import transfer from './router_transfer'; import home from './HomePage/router_home'; import juryRoom from './JuryRoom/router_menuJury.config'; import approvalForm from './router_approval_form'; +import partyMemberTopic from './router_partyMemberTopic'; export default [ //========================================================================登陆 ...transfer,//跳转、登陆 //审批单 ...approvalForm, + //党建攻坚 + ...partyMemberTopic, { path: '/userformal', // component: '../layouts/UserLayout', @@ -29,10 +32,15 @@ export default [ ], }, //日历组件暂时用 - { - path: '/Calendar', - component: './MainPage/ProjectManager/components/CalendarForm', - }, + // { + // path: '/Calendar', + // component: './MainPage/ProjectManager/components/CalendarForm', + // }, + //富文本组件 + // { + // path: '/editor', + // component: './MainPage/ProjectManager/components/WangEditor', + // }, //401错误页 { exact: true, @@ -71,6 +79,14 @@ export default [ }, ], }, + {//内拍-参与竞拍列表 + path: '/AuctionParticipateList', + component: './Auction/AuctionParticipateList', + }, + {//内拍-参与竞拍详情 + path: '/AuctionParticipateDetail', + component: './Auction/AuctionParticipateDetail', + }, {//公共服务平台 path: '/PublicPlatform', component: './Bid/BiddingAnnouncement/components/PublicPlatform', @@ -232,7 +248,7 @@ export default [ path: '/Supervision', component: './Project/ProjectManage/Supervision' }, - {//审查人员 项目管理页 + {//审查人员 项目管理页 name: 'Examination', path: '/Examination', component: './Project/ProjectManage/Examination' diff --git a/config/router_partyMemberTopic.ts b/config/router_partyMemberTopic.ts new file mode 100644 index 0000000..45847b2 --- /dev/null +++ b/config/router_partyMemberTopic.ts @@ -0,0 +1,53 @@ +export default [ + { + name: '党建攻坚', + path: '/partyMemberTopic', + routes: [ + {//首页 + name: 'home', + path: '/partyMemberTopic/home', + component: './PartyMemberTopic/Home', + }, + { //物资采购与管理专业线 党支部 省分 + name: 'partyBranch', + path: '/partyMemberTopic/partyBranch', + component: './PartyMemberTopic/PartyBranch', + }, + { //物资采购与管理专业线 党支部数据 + name: 'partyBranches', + path: '/partyMemberTopic/partyBranches', + component: './PartyMemberTopic/PartyBranches', + }, + { //物资采购与管理专业线 党支部人员信息 + name: 'personInfor', + path: '/partyMemberTopic/personInfor', + component: './PartyMemberTopic/PersonInfor', + }, + { // 攻坚克难项目 更多 + name: 'overDifficult', + path: '/partyMemberTopic/overDifficult', + component: './PartyMemberTopic/OverDifficult', + }, + { // 活动风采 更多 + name: 'activityStyle', + path: '/partyMemberTopic/activityStyle', + component: './PartyMemberTopic/ActivityStyle', + }, + { // 攻坚克难详情 + name: 'hardDetail', + path: '/partyMemberTopic/hardDetail', + component: './PartyMemberTopic/HardDetail', + }, + { // 活动风采和banner详情 + name: 'newsDetail', + path: '/partyMemberTopic/newsDetail', + component: './PartyMemberTopic/NewsDetail', + }, + {//管理端首页 + name: 'manage', + path: '/partyMemberTopic/manage', + component: './PartyMemberTopic/Management/Manage', + }, + ] + }, +]; \ No newline at end of file diff --git a/config/router_transfer.ts b/config/router_transfer.ts index cb935d6..0a255ad 100644 --- a/config/router_transfer.ts +++ b/config/router_transfer.ts @@ -50,10 +50,6 @@ export default [ path: '/redirect', component: './LoadingPage', }, - { - path: '/toAuth', - component: './LoadingPage/ToAuth', - }, //跨工程跳转中间页开始 { path: '/xunjia', @@ -64,6 +60,16 @@ export default [ path: '/chooseRole', component: './LoadingPage/MiddleLoading/chooseRole', }, + //寻找商机跳转 + { + path: '/ToFindBusiness', + component: './LoadingPage/MiddleLoading/ToFindBusiness', + }, + //项目跟进跳转 + { + path: '/ToHomePage', + component: './LoadingPage/MiddleLoading/ToHomePage', + }, //跨工程跳转中间页结束 { name: 'index_1', diff --git a/public/Weboffice4Path.html b/public/Weboffice4Path.html index aa62682..22f6797 100644 --- a/public/Weboffice4Path.html +++ b/public/Weboffice4Path.html @@ -4,9 +4,9 @@ 招标采购中心 | 文档控件编辑器 - - - + + +
- +
diff --git a/public/bidOpening/bidOpening.html b/public/bidOpening/bidOpening.html index 04acc0c..2266398 100644 --- a/public/bidOpening/bidOpening.html +++ b/public/bidOpening/bidOpening.html @@ -1,11 +1,13 @@ - + + 开标大厅-招标采购中心 +
@@ -23,18 +25,18 @@

当前时间:

- / - / - - : - : - + / + / + + : + : +

- + @@ -46,7 +48,7 @@ - + @@ -54,7 +56,7 @@ - +
序号
@@ -79,7 +81,7 @@ var roleCode = role.roleCode; var tpId = obj.id; var proMethod = obj.bidMethodDict; - if(proMethod==="procurement_mode_1"||proMethod==="procurement_mode_2"){ + if (proMethod === "procurement_mode_1" || proMethod === "procurement_mode_2") { $("#bdname").text("标段名称"); $("#bdnumber").text("标段编号"); } else { @@ -88,71 +90,71 @@ } $.ajax({ - url:"/api/biz-service-ebtp-opening/v1/bizbidopenroom/openRoomList/"+tpId, - data:{ - pageNo:"1", - pageSize:"1000", - roomType:roomType + url: "/api/biz-service-ebtp-opening/v1/bizbidopenroom/openRoomList/" + tpId, + data: { + pageNo: "1", + pageSize: "1000", + roomType: roomType }, - headers:{ - "Authorization":token + headers: { + "Authorization": token }, - type:"GET", - success:function(re){ - + type: "GET", + success: function (re) { + var list = re.data.records; var tr = ""; - for(var i = 0 ; i < list.length ; i++){ - tr=tr+""; - tr=tr+""+(i+1)+""; - tr=tr+""+(list[i].sectionName)+""; - tr=tr+""+(list[i].sectionNo)+""; - tr=tr+""+(list[i].opingTime)+""; - tr=tr+""+(getRoomStateValue(list[i].roomState))+""; - tr=tr+""; - if(list[i].roomState!="9"){ - tr=tr+""; + for (var i = 0; i < list.length; i++) { + tr = tr + ""; + tr = tr + "" + (i + 1) + ""; + tr = tr + "" + (list[i].sectionName) + ""; + tr = tr + "" + (list[i].sectionNo) + ""; + tr = tr + "" + (list[i].opingTime) + ""; + tr = tr + "" + (getRoomStateValue(list[i].roomState)) + ""; + tr = tr + ""; + if (list[i].roomState != "9") { + tr = tr + ""; } - if(roleCode=="ebtp-agency-project-manager"||roleCode=="ebtp-purchase"){ + if (roleCode == "ebtp-agency-project-manager" || roleCode == "ebtp-purchase") { var openTime = list[i].opingTime; - tr=tr+""; - + tr = tr + ""; + } - tr=tr+""; + tr = tr + ""; } $("#dataDev").html(""); $("#dataDev").append(""); $("#dataTr").append("") - .append("") - .append("") - .append("") - .append("") - .append(""); + .append("") + .append("") + .append("") + .append("") + .append(""); $("#dataDev").append(tr); } }); - - function getRoomStateValue(state){ + + function getRoomStateValue(state) { // 0未开标 1、开标 2、唱标 3、唱标结束 4、取消开标' var value = ""; - if(state=="0"){ - value ="未开标"; + if (state == "0") { + value = "未开标"; } - if(state=="1"){ - value ="已开标"; + if (state == "1") { + value = "已开标"; } - if(state=="2"){ - value ="唱标"; + if (state == "2") { + value = "唱标"; } - if(state=="3"){ - value ="唱标结束"; - } - if(state=="4"){ - value ="取消开标"; - } - if(state=="9"){ - value ="异常处理"; + if (state == "3") { + value = "唱标结束"; + } + if (state == "4") { + value = "取消开标"; + } + if (state == "9") { + value = "异常处理"; } return value; }; @@ -163,14 +165,14 @@ var m = 0; var s = 0; var timestamp = 0; - function getTime(){ + function getTime() { $.ajax({ - url:"/api/biz-service-ebtp-extend/v1/timeService/getServiceSystemTime", - headers:{ - "Authorization":token + url: "/api/biz-service-ebtp-extend/v1/timeService/getServiceSystemTime", + headers: { + "Authorization": token }, - type:"GET", - success:function(re){ + type: "GET", + success: function (re) { n = re.data.year; y = re.data.month; t = re.data.date; @@ -179,65 +181,65 @@ s = re.data.second; timestamp = re.data.timestamp; } - }); + }); } getTime(); setInterval(getTime, 30000); function time() { - s = s+1; - if(s==60){ + s = s + 1; + if (s == 60) { s = 1; - m=m+1; + m = m + 1; } - if(m==60){ + if (m == 60) { m = 1; - h=h+1; + h = h + 1; } - if(h==24){ + if (h == 24) { h = 0; - t = t+1; + t = t + 1; } - $('#dateTime span').eq(0).html(n); - $('#dateTime span').eq(1).html(y<10?"0"+y:y); - $('#dateTime span').eq(2).html(t<10?"0"+t:t); - $('#dateTime span').eq(3).html(h<10?"0"+h:h); - $('#dateTime span').eq(4).html(m<10?"0"+m:m); - $('#dateTime span').eq(5).html(s<10?"0"+s:s); - for (var i = 0; i < $('#dateTime').length; i++) { - if ($('div').eq(i).text().length == 1) { - $('div').eq(i).html(function(index, html) { - return 0 + html; - }); - } - } - } - time(); - setInterval(time, 1000); - - function onClickToOpenRoom(aa,bb,cc,roomType,roomState){ - if(roomState==0){ - window.open("countDown.html?aa="+aa+"&bb="+bb+"&cc="+cc+"&roomType="+roomType); - }else if(roomState>0){ - window.open("/room/index?aa="+aa+"&bb="+bb+"&roomType="+roomType); + $('#dateTime span').eq(0).html(n); + $('#dateTime span').eq(1).html(y < 10 ? "0" + y : y); + $('#dateTime span').eq(2).html(t < 10 ? "0" + t : t); + $('#dateTime span').eq(3).html(h < 10 ? "0" + h : h); + $('#dateTime span').eq(4).html(m < 10 ? "0" + m : m); + $('#dateTime span').eq(5).html(s < 10 ? "0" + s : s); + for (var i = 0; i < $('#dateTime').length; i++) { + if ($('div').eq(i).text().length == 1) { + $('div').eq(i).html(function (index, html) { + return 0 + html; + }); + } } - - //window.open("http://10.242.31.158:18022/room/index?aa=1369571546133168128&bb=1&roomType=1"); } - function onClickDown(id,bsId){ - window.open("/api/biz-service-ebtp-opening/v1/bizbidopenroom/exportTenderRecords/"+bsId+"?roomType="+roomType); - } + time(); + setInterval(time, 1000); - function getQueryVariable(variable) - { + function onClickToOpenRoom(aa, bb, cc, roomType, roomState) { + if (roomState == 0) { + window.open("countDown.html?aa=" + aa + "&bb=" + bb + "&cc=" + cc + "&roomType=" + roomType); + } else if (roomState > 0) { + window.open("/room/index?aa=" + aa + "&bb=" + bb + "&roomType=" + roomType); + } + + //window.open("http://10.242.31.158:18022/room/index?aa=1369571546133168128&bb=1&roomType=1"); + } + function onClickDown(id, bsId) { + window.open("/api/biz-service-ebtp-opening/v1/bizbidopenroom/exportTenderRecords/" + bsId + "?roomType=" + roomType); + } + + function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); - for (var i=0;i + \ No newline at end of file diff --git a/public/bidOpening/countDown.html b/public/bidOpening/countDown.html index 6bcd337..dc8ca3c 100644 --- a/public/bidOpening/countDown.html +++ b/public/bidOpening/countDown.html @@ -1,11 +1,13 @@ - + + 开标倒计时-招标采购中心 +
@@ -18,12 +20,12 @@
- 00/ - 00/ - 00 - 00: - 00: - 00 + 00/ + 00/ + 00 + 00: + 00: + 00
@@ -91,7 +93,7 @@ var roleCode = role.roleCode; $("#deptName").html(obj.deptName); - var service_opentime="";//开标时间 + var service_opentime = "";//开标时间 var openState = 0;//未开 var projectId = ""; var sectionId = ""; @@ -102,14 +104,14 @@ var oping_h = 0; var oping_m = 0; var oping_s = 0; - function getOpening(){ + function getOpening() { $.ajax({ - url:"/api/biz-service-ebtp-opening/v1/bizbidopenroom/getOpenRoomById/"+openRoomId, - headers:{ - "Authorization":token + url: "/api/biz-service-ebtp-opening/v1/bizbidopenroom/getOpenRoomById/" + openRoomId, + headers: { + "Authorization": token }, - type:"GET", - success:function(re){ + type: "GET", + success: function (re) { var data = re.data; $("#projectName").html(data.projectName); $("#projectNumber").html(data.ebpProjectNumber); @@ -118,7 +120,7 @@ openState = data.roomState; projectId = data.projectId; sectionId = data.sectionId; - if(data.opingTime!=null&&data.opingTime!=""){ + if (data.opingTime != null && data.opingTime != "") { service_opentime = data.opingTime; $("#openTime").html(data.opingTime); var openTime = data.opingTime.split(" "); @@ -135,9 +137,9 @@ getTimer = setInterval(getTime, 30000);//开标时间修正 getDescOpenRoomTime(); getDescOpenRoomTimer = setInterval(getDescOpenRoomTime, 30000);//剩余时间修正 - + systemTimer = setInterval(systemTime, 1000);//系统时间计算 - }else{ + } else { $("#openTime").html("开标日期异常") } } @@ -151,17 +153,17 @@ var h = 0; var m = 0; var s = 0; - + //获取开标时间 - function getTime(){ + function getTime() { $.ajax({ - url:"/api/biz-service-ebtp-extend/v1/timeService/getServiceSystemTime", - headers:{ - "Authorization":token + url: "/api/biz-service-ebtp-extend/v1/timeService/getServiceSystemTime", + headers: { + "Authorization": token }, - async:true, - type:"GET", - success:function(re){ + async: true, + type: "GET", + success: function (re) { n = re.data.year; y = re.data.month; t = re.data.date; @@ -169,200 +171,200 @@ m = re.data.minute; s = re.data.second; } - }); + }); } - - + + var dd = 0; var hh = 0; var mm = 0; var ss = 0; - + //获取剩余时间差 - function getDescOpenRoomTime(){ + function getDescOpenRoomTime() { $.ajax({ - url:"/api/biz-service-ebtp-extend/v1/timeService/getDescOpenRoomTime", - data:{ - openTime:service_opentime + url: "/api/biz-service-ebtp-extend/v1/timeService/getDescOpenRoomTime", + data: { + openTime: service_opentime }, - headers:{ - "Authorization":token + headers: { + "Authorization": token }, - async:true, - type:"GET", - success:function(re){ + async: true, + type: "GET", + success: function (re) { dd = re.data.date; hh = re.data.hour; mm = re.data.minute; ss = re.data.second; } - }); + }); } var timeover = false; //系统时间定时更新 function systemTime() { - s = s+1; - if(s==60){ + s = s + 1; + if (s == 60) { s = 1; - m=m+1; + m = m + 1; } - if(m==60){ + if (m == 60) { m = 1; - h=h+1; + h = h + 1; } - if(h==24){ + if (h == 24) { h = 0; - t = t+1; + t = t + 1; } - $('#dateTime span').eq(0).html(n); - $('#dateTime span').eq(1).html(y<10?"0"+y:y); - $('#dateTime span').eq(2).html(t<10?"0"+t:t); - $('#dateTime span').eq(3).html(h<10?"0"+h:h); - $('#dateTime span').eq(4).html(m<10?"0"+m:m); - $('#dateTime span').eq(5).html(s<10?"0"+s:s); - for (var i = 0; i < $('#dateTime').length; i++) { - if ($('div').eq(i).text().length == 1) { - $('div').eq(i).html(function(index, html) { - return 0 + html; - }); - } - } - if(!timeover){ - openJsystemTime(); + $('#dateTime span').eq(0).html(n); + $('#dateTime span').eq(1).html(y < 10 ? "0" + y : y); + $('#dateTime span').eq(2).html(t < 10 ? "0" + t : t); + $('#dateTime span').eq(3).html(h < 10 ? "0" + h : h); + $('#dateTime span').eq(4).html(m < 10 ? "0" + m : m); + $('#dateTime span').eq(5).html(s < 10 ? "0" + s : s); + for (var i = 0; i < $('#dateTime').length; i++) { + if ($('div').eq(i).text().length == 1) { + $('div').eq(i).html(function (index, html) { + return 0 + html; + }); + } } - } + if (!timeover) { + openJsystemTime(); + } + } //剩余时间定时 - function openJsystemTime(){ + function openJsystemTime() { - ss = ss-1; - if(ss<0){ - if(mm>0&&hh>0&&dd>0){ - mm = mm-1; + ss = ss - 1; + if (ss < 0) { + if (mm > 0 && hh > 0 && dd > 0) { + mm = mm - 1; ss = 59; - }else{ + } else { ss = 0; } - + } - if(mm<0){ - if(hh>0&&dd>0){ - hh = hh-1; + if (mm < 0) { + if (hh > 0 && dd > 0) { + hh = hh - 1; mm = 59; - }else{ + } else { mm = 0 } } - if(hh<0){ - if(dd>0){ - dd = dd-1; + if (hh < 0) { + if (dd > 0) { + dd = dd - 1; hh = 23; - }else{ + } else { dd = 0; } } - if(dd<0){ + if (dd < 0) { dd = 0; } - if(roleCode=="ebtp-agency-project-manager"||roleCode=="ebtp-purchase") { + if (roleCode == "ebtp-agency-project-manager" || roleCode == "ebtp-purchase") { $("#openButton").text('开 标'); } else { $("#openButton").text('进入开标大厅'); - if(openState==0){ + if (openState == 0) { $("#openButton").hide(); } else { $("#openButton").show(); } } - - if(ss<=0&&mm<=0&&hh<=0&&dd<=0){ + + if (ss <= 0 && mm <= 0 && hh <= 0 && dd <= 0) { dd = 0; hh = 0; mm = 0; ss = 0; //可以开标 - $("#openButton").removeClass("countBtn01").attr("class","countBtn countBtn02"); - $("#openButton").bind("click",function(){ - if(openState==0){ - if(roleCode=="ebtp-agency-project-manager"||roleCode=="ebtp-purchase"){ + $("#openButton").removeClass("countBtn01").attr("class", "countBtn countBtn02"); + $("#openButton").bind("click", function () { + if (openState == 0) { + if (roleCode == "ebtp-agency-project-manager" || roleCode == "ebtp-purchase") { opening();//未开标先开标 - }else{ + } else { supplierOpening();//供应商进入开标室 } - - }else{//否则直接进入 + + } else {//否则直接进入 onClickToOpenRoom(); } - + }) //可以开标后 结束除系统时间更新外所有定时 clearInterval(getTimer); clearInterval(getDescOpenRoomTimer); - timeover=true; + timeover = true; } - - $("#dd").html(dd<10?"00"+dd:dd<100?"0"+dd:dd); - $("#hh").html(hh<10?"0"+hh:hh); - $("#mm").html(mm<10?"0"+mm:mm); - $("#ss").html(ss<10?"0"+ss:ss); - } - - function opening(){ - var puData = {"projectId":projectId,"sectionId":sectionId,"id":openRoomId,"roomState":"1"}; + $("#dd").html(dd < 10 ? "00" + dd : dd < 100 ? "0" + dd : dd); + $("#hh").html(hh < 10 ? "0" + hh : hh); + $("#mm").html(mm < 10 ? "0" + mm : mm); + $("#ss").html(ss < 10 ? "0" + ss : ss); + } + + + function opening() { + var puData = { "projectId": projectId, "sectionId": sectionId, "id": openRoomId, "roomState": "1" }; $.ajax({ - url:"/api/biz-service-ebtp-opening/v1/bizbidopenroom/updateOpenRoom", - data:JSON.stringify(puData), - contentType : 'application/json', - dataType:"json", - headers:{ - "Authorization":token, - "token":token + url: "/api/biz-service-ebtp-opening/v1/bizbidopenroom/updateOpenRoom", + data: JSON.stringify(puData), + contentType: 'application/json', + dataType: "json", + headers: { + "Authorization": token, + "token": token }, - type:"POST", - success:function(re){ + type: "POST", + success: function (re) { //开标成功进入开标室 - if(re.success){ + if (re.success) { onClickToOpenRoom(); - }else{ + } else { alert(re.message); } }, - error:function(re){ + error: function (re) { alert(re.message); } - }); + }); } - function supplierOpening(){ + function supplierOpening() { //重新获取开标室信息 getOpening(); - if(openState==0){ + if (openState == 0) { alert("请等待业务经理开标"); - }else{ + } else { onClickToOpenRoom(); } } - - function onClickToOpenRoom(){ - window.location.href="/room/index?aa="+aa+"&bb="+bb+"&roomType="+roomType; - } - function getQueryVariable(variable) - { + function onClickToOpenRoom() { + window.location.href = "/room/index?aa=" + aa + "&bb=" + bb + "&roomType=" + roomType; + } + + function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); - for (var i=0;i + \ No newline at end of file diff --git a/public/ntkoStyle.css b/public/ntkoStyle.css deleted file mode 100644 index 7b6c2e4..0000000 --- a/public/ntkoStyle.css +++ /dev/null @@ -1,175 +0,0 @@ -body{ - text-align:center; - font-family:"微软雅黑"; - letter-spacing:0.05em; - color:#575757; - font-size:16px; - margin:0px; -} -a{ - text-decoration:none; - cursor:pointer; - color:#299ceb; -} -a:hover{ - text-decoration:underline; - color:#c60000; -} -hr{ - border:0px; - border-bottom:1px #b0b0b0 solid; - margin:50px 0px 30px 0px; -} -p{ - text-align:left; - line-height:1.6; - text-indent:2em; -} - -.divTop{ - width:100%; - height:70px; - text-align:center; - background-color:#000000; - top:0; -} -.divTopInner{ - width:1200px; - text-align:left; - color:#ffffff; - line-height:70px; - margin:auto; -} -.divTopInnerCaption{ - width:1150px; - font-size:20px; - float:left; -} -.divTopInnerNtko{ - width:50px; - font-size:14px; - text-align:center; - float:left; - cursor:pointer; -} -.divTopInnerNtko:hover{ - background-color:#c60000; -} -.divTopInner a{ - color:#ffffff; - text-decoration:none; -} - -.divTitle{ - width:100%; - height:80px; - line-height:80px; - border-bottom:1px #bababa solid; - margin-bottom:10px; -} -.divTitle_body{ - width:1200px; - text-align:left; - margin:auto; -} -.divTitle_caption{ - width:100%; - float:left; - color:#c60000; - font-size:36px; - font-weight:bold; - -} -.divTitle_caption_small{ - width:100%; - float:left; - color:#c60000; - font-size:24px; - font-weight:bold; - height:50px; - line-height:50px; -} -.divTitle_Information{ - width:100%; - float:left; - color:#999999; - font-size:14px; - height:auto; - line-height:24px; - margin:20px 0px 30px 0px; -} -.divTitle_Information_Left{ - width:40px; - height:40px; - line-height:40px; - background-color:#ffde00; - float:left; - text-align:center; - font-size:20px; - font-weight:bolder; - color:#ffffff; - margin:auto 20px auto auto; -} -.divTitle_Information_Right{ - width:1140px; - height:40px; - line-height:40px; - float:left; - font-size:16px; -} -.divTitle_introduction{ - width:100%; - float:left; - color:#999999; - font-size:14px; - height:auto; - line-height:24px; -} - -.divBody{ - width:1200px; - margin:10px auto; - text-align:left; -} -.divBody_Title{ - width:100%; - height:40px; - font-size:16px; - margin:40px 0px 0px 0px; -} -.divBody_Title_Flag{ - width:5px; - height:40px; - font-size:16px; - float:left; - background-color:#a10000; - margin:0px 20px 10px 0px; -} -.divBody_Table_Caption{ - width:1175px; - height:40px; - line-height:40px; - font-size:24px; - font-weight:bolder; - color:#999999; - float:left; -} -table{ - border-collapse:collapse; - width:100%; -} -td{ - border:1px #e0e0e0 solid; - height:60px; - text-align:center; - color:#999999; - font-size:14px; - padding:20px; -} -.divBody_Table_RowTitle{ - font-size:18px; - font-weight:bolder; - color:#ffffff; - background-color:#e0e0e0; -} - \ No newline at end of file diff --git a/public/ntkobackground.min.js b/public/ntkobackground.min.js deleted file mode 100644 index d655395..0000000 --- a/public/ntkobackground.min.js +++ /dev/null @@ -1,667 +0,0 @@ -/** - * version: 2.3.2 - * - * 2020.07.10版本 跟随 招商银行股份有限公司20200730 产品发送 - * 2021.04.29版本 增加兼容Edge浏览器的判断逻辑 zhoujianlong - */ -"use strict"; -var varNtkoGUID = Math.random().toString(36); -var ntkoWinOpen; -var ntkoJsonIe; -var timer; -var ntkoSendDataToChildStrUrl; -var ntkoSendDataToChildSData; -var ntkowin; -var userAgent = navigator.userAgent, - rMsie = /(msie\s|trident.*rv:)([\w.]+)/, - rFirefox = /(firefox)\/([\w.]+)/, - rOpera = /(opera).+versi1on\/([\w.]+)/, - rChrome = /(chrome)\/([\w.]+)/, - rEdge = /(edg)\/([\w.]+)/, - rSafari = /version\/([\w.]+).*(safari)/; - var browser; - var version; - var ntkoextensionmainifest; - var ua = userAgent.toLowerCase(); - function uaMatch(ua) { - var match = rMsie.exec(ua); - if (match != null) { - return { browser : "IE", version : match[2] || "0" }; - } - var match = rFirefox.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rOpera.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rChrome.exec(ua); - if (match != null) { - var matchedge= rEdge.exec(ua); - if(matchedge!=null){ - return { browser : matchedge[1] || "", version : matchedge[2] || "0" }; - }else{ - return { browser : match[1] || "", version : match[2] || "0" }; - } - } - var match = rSafari.exec(ua); - if (match != null) { - return { browser : match[2] || "", version : match[1] || "0" }; - } - if (match != null) { - return { browser : "", version : "0" }; - } - } - var browserMatch = uaMatch(userAgent.toLowerCase()); - if (browserMatch.browser) { - browser = browserMatch.browser; - version = browserMatch.version; - } - var mimeTypes = navigator.mimeTypes; - var bChromeExtensionInstalled = false; - - if( "chrome" === browserMatch.browser && version>="45") - { - - var img; - img = new Image(); - img.src = "chrome-extension://lppkeogbkjlmmbjenbogdndlgmpiddda/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onerror = function() { - bChromeExtensionInstalled = false; - }; - } - if("edg"===browserMatch.browser){ - - var img; - img = new Image(); - img.src = "chrome-extension://nldmejlecnngjgcfpinfkdhkfakjeail/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - } - -var ntkoBrowser = { -ntkoSendDataToChild:function( strURL, data) -{ - if ( typeof data === 'undefined' ){ - return; - } - var strURL=ntkoBrowser.NtkoStrURL(strURL); - var jsonValue = '{"SendDataToChild":1,"GUID":"'; - jsonValue += varNtkoGUID; - jsonValue += '","URLMD5":"'; - jsonValue += b64_md5(strURL); - jsonValue += '","ChildValue":"'; - jsonValue += data; - jsonValue += '"}'; - var ntkobr=ntkoBrowser.NtkoBrower(); - if(ntkobr){ - window.postMessage({ type: "FROM_NTKO_PAGE", text: jsonValue }, "*"); - }else{ - ntkoWinOpen.ntkoGetParentData(data); - } -}, -ExtensionInstalled:function() -{ - var ntkobr=ntkoBrowser.NtkoBrower(); - if(!ntkobr){ - if(browser=="IE"){ - return true; - }else{ - var mimetype=navigator.mimeTypes["application/ntko-plug"]; - if(mimetype){ - var plugin=mimetype.enabledPlugin; - if(plugin){ - return true; - }else{ - return false; - } - }else{ - return false; - } - } - } - else - { - if( "firefox" === browserMatch.browser ) - { - var bInstalled = false; - if( "undefined" === typeof FirefoxInstalled ) - return ( bInstalled ); - else - return( window.FirefoxInstalled()); - } - else if( "chrome" === browserMatch.browser ) - { - if(localStorage["ntkoweb"]==="ntkoExtensionInstalled"){ - bChromeExtensionInstalled=true; - localStorage.clear(); - } - return (bChromeExtensionInstalled); - }else if("edg" === browserMatch.browser){ - if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ - return true; - }else{ - return( bChromeExtensionInstalled ); - } - } - } -}, - -ntkoClose:function( strURL ) -{ - var strURL=ntkoBrowser.NtkoStrURL(strURL); - var jsonValue = '{"Close":1,"GUID":"'; - jsonValue += varNtkoGUID; - jsonValue += '","URLMD5":"'; - jsonValue += b64_md5(strURL); - jsonValue += '"}'; - var ntkobr=ntkoBrowser.NtkoBrower(); - if(ntkobr){ - window.postMessage({ type: "FROM_NTKO_PAGE", text: jsonValue }, "*"); - }else{ - ntkoWinOpen.close(); - } -}, -openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserProductKey, ntkoBrowserNoExpireKey, ntkoBrowserOptions,varUrlData,ntkowidth,ntkoheight ) -{ - - if(varUrlData!=null&&varUrlData!=""){ - ntkoSendDataToChildSData=varUrlData; - } - var ntkowinscr= ntkoBrowser.NtkoWidthAndHeightWinScr(ntkowidth,ntkoheight); - if(!ntkowinscr){ - alert("设置窗口大小格式不正确"); - return; - } - var strURL=ntkoBrowser.NtkoStrURL(strURL); - var jsonValue = '{"OpenWindow":1,"URL":"'; - jsonValue += strURL; - jsonValue += '","GUID":"'; - jsonValue += varNtkoGUID; - jsonValue += '","URLMD5":"'; - jsonValue +=b64_md5(strURL); - jsonValue += '","ntkobrowserMatch":"'; - jsonValue +=browserMatch.browser; - jsonValue += '","IsShowOnExtendMonitor":"'; - jsonValue += IsShowOnExtendMonitor; - jsonValue += '"'; - if( ( typeof ProductCaption != 'undefined' ) && ( ( null != ProductCaption ) && ( "" != ProductCaption ) ) ) - { - jsonValue += ',"ProductCaption":"'; - jsonValue += ProductCaption; - jsonValue += '"'; - } - - if( ( typeof ntkoBrowserProductKey != 'undefined' ) && ( ( null != ntkoBrowserProductKey ) && ( "" != ntkoBrowserProductKey ) ) ) - { - jsonValue += ',"ProductKey":"'; - jsonValue += ntkoBrowserProductKey; - jsonValue += '"'; - } - - if( ( typeof ntkoBrowserNoExpireKey != 'undefined' ) && ( ( null != ntkoBrowserNoExpireKey ) &&( "" != ntkoBrowserNoExpireKey ) ) ) - { - jsonValue += ',"NoExpireKey":"'; - jsonValue += ntkoBrowserNoExpireKey; - jsonValue += '"'; - } - - if( typeof ntkoBrowserOptions != 'undefined' && ( ( null != ntkoBrowserOptions ) && ( "" != ntkoBrowserOptions ) ) ) - { - jsonValue += ',"Options":"'; - jsonValue += ntkoBrowserOptions; - jsonValue += '"'; - } - var LocalStorge = window.localStorage; - if( typeof LocalStorge != 'undefined' && ( 0 != LocalStorge.length ) ) - { - var varLocalDataList = []; - for( var i = 0; i < LocalStorge.length; i++ ) - { - var varLocalData = {}; - varLocalData["StorageKey"] = LocalStorge.key(i); - varLocalData["StorageValue"] = LocalStorge.getItem(LocalStorge.key(i)); - varLocalDataList[i] = varLocalData; - } - jsonValue += ',"LocalStorge":'; - jsonValue += JSON.stringify(varLocalDataList);; - jsonValue += ''; - } - - var SessionStorge = window.sessionStorage; - if( typeof SessionStorge != 'undefined' && ( 0 != SessionStorge.length ) ) - { - var varSessionDataList = []; - for( var i = 0; i < SessionStorge.length; i++ ) - { - var varSessionData = {}; - varSessionData["StorageKey"] = SessionStorge.key(i); - varSessionData["StorageValue"] = SessionStorge.getItem(SessionStorge.key(i)); - varSessionDataList[i] = varSessionData; - } - - jsonValue += ',"SessionStorge":'; - jsonValue += JSON.stringify(varSessionDataList); - jsonValue += ''; - } - if( typeof ntkowidth != 'undefined' && ( ( null != ntkowidth ) && ( "" != ntkowidth ) ) ) - { - jsonValue += ',"NtkoWidth":'; - jsonValue += ntkowidth; - jsonValue += ''; - } - - if( typeof ntkoheight != 'undefined' && ( ( null != ntkoheight ) && ( "" != ntkoheight ) ) ) - { - jsonValue += ',"NtkoHeight":'; - jsonValue += ntkoheight; - jsonValue += ''; - } - - - jsonValue += '}'; - var ntkobr=ntkoBrowser.NtkoBrower(); - if(ntkobr){ - window.postMessage({type: "FROM_NTKO_PAGE", text: jsonValue}, "*"); - }else{ - ntkowin=b64_md5(strURL); - if(ntkowidth==null||ntkowidth=="" ||ntkowidth=="undefined"){ - ntkowidth=window.screen.width; - } - if(ntkoheight==null||ntkoheight==""||ntkoheight=="undefined"){ - ntkoheight=window.screen.height; - } - ntkoWinOpen=window.open(strURL+'&varNtkoGUID='+varNtkoGUID,ntkowin,"height="+ntkoheight+", width="+ntkowidth+", top=0,left=0,titlebar=no,toolbar =no, menubar=no, scrollbars=no, resizable=yes, location=no, status=no"); - ntkoWinOpen.resizeTo(ntkowidth,ntkoheight); - ntkoWinOpen.focus(); - } - }, - NtkoWShell:function(){ - - }, - NtkoiTop:function(){ - return (window.screen.height-30-300)/2; - }, - NtkoiLeft:function(){ - return (window.screen.width-10-400)/2; - }, - NtkoBrower:function(){ - if(browser=="IE"){ - return false; - } - if(browser=="firefox"){ - if(userAgent.indexOf("Windows NT 5.1") > -1){ - return false; - } - if(version>="50"){ - return true; - }else{ - return false; - } - } - if(browser=="chrome"){ - if(userAgent.indexOf("Windows NT 5.1") > -1){ - return false; - } - if(version>="45"){ - return true; - }else{ - return false; - } - } - if(browser=="edg"){ - return true; - } - }, -NtkoStrURL:function(strURL){ - var testurl =window.location.search; - var docUrl=document.location.toString(); - var wpathname= window.document.location.pathname; - var pos=docUrl.indexOf(wpathname); - var relUrl= docUrl.substring(0,pos); - if( ( null === strURL ) || ( "" === strURL ) ) - { - alert("打开路径的url为null"); - return; - } - var strLowser = strURL.toLowerCase(); - if( '/' != strURL.charAt(0) ) - { - if( ( "http://" === strLowser.substr(0,7) ) || ( "https://" === strLowser.substr(0,8) ) ) - {} - else - { - if(strURL.indexOf("../")==-1) - { - var pathName = window.location.href; - var varLength = pathName.lastIndexOf("/"); - strURL = pathName.substr( 0, varLength + 1 ) + strURL; - } - else - { - var strURLlen=strURL.length; - strURL=strURL.substring(2,strURLlen); - strURL = relUrl +strURL; - } - if(strURL.indexOf(testurl)==-1) - { - if(strURL.indexOf("?")==-1) - { - strURL=strURL+testurl - } - else - { - var docof= strURL.indexOf("?"); - var docend=strURL.length; - var docs=strURL.substring(0,docof); - var docsurl=strURL.substring(docof+1,docend); - strURL=docs+testurl+"&"+docsurl; - } - } - } - } - else - { - var strURLlen=strURL.length; - strURL=strURL.substring(0,strURLlen); - strURL = relUrl+ strURL; - } - return strURL; - }, -NtkoWidthAndHeightWinScr:function(ntkowidth,ntkoheight){ - - var regNtko=/^\s*$/; - if(typeof(ntkowidth)=="undefined"&&typeof(ntkoheight)=="undefined"){ - return true; - }else{ - if(regNtko.test(ntkowidth)||typeof(ntkowidth)!="number"){ - return false; - }else{ - if(regNtko.test(ntkoheight)||typeof(ntkoheight)!="number"){ - return false; - }else{ - return true; - } - } - } - }, - thisNTKOGUID:varNtkoGUID, -}; - -if(browser!="IE") -{ - window.addEventListener("message", function(event) - { - if ( event.source != window ) - return; - if (event.data.type && (event.data.type == "FROM_NTKO_CONTEXT_PAGE")) - { - var vJsonData = JSON.parse( event.data.text ); - var jsonData = vJsonData["ntkoData"]; - if( typeof jsonData !== "undefined" ) - { - if( varNtkoGUID === jsonData["ntkoGUID"] ) - { - if( "ntkoClose" === jsonData["functionName"] ) - { - // 调用关闭事件 - try - { - eval('ntkoCloseEvent()'); - } - catch(e) - {} - } - else if( "ntkoReturnValueToParentPage" === jsonData["functionName"] ) - { - // 调用返回值事件,解析值 - var varFunctionName = jsonData["parentExecutionFunction"]; // 要执行的函数名 - if( typeof varFunctionName != 'undefined' && ( ( null != varFunctionName ) && ( "" != varFunctionName ) ) ) - { - var varFunctionAgrvs = jsonData["FunctionArgs"]; // 传递过来的参数值 - if( typeof varFunctionAgrvs != 'undefined' && ( ( null != varFunctionAgrvs ) && ( "" != varFunctionAgrvs ) ) ) - { - // 调用eval执行函数 - eval( varFunctionName + "( varFunctionAgrvs[0], varFunctionAgrvs[1], varFunctionAgrvs[2], varFunctionAgrvs[3]," + - "varFunctionAgrvs[4],varFunctionAgrvs[5],varFunctionAgrvs[6],varFunctionAgrvs[7],varFunctionAgrvs[8]);" ); - } - } - } - } - } - } - if(event.data.type && (event.data.type == "FROM_NTKO_MANIFEST")){ - var ntkojsontext = JSON.parse( event.data.text ); - ntkoextensionmainifest=ntkojsontext['ntkoversion']; - } - }, false); -} -function ieattachEventntko(data,varFunctionAgrvs) -{ - if( typeof data !== "undefined" ) - { - if( typeof varFunctionAgrvs != 'undefined' && ( ( null != varFunctionAgrvs ) && ( "" != varFunctionAgrvs ) ) ) - { - eval( data + "( varFunctionAgrvs[0], varFunctionAgrvs[1], varFunctionAgrvs[2], varFunctionAgrvs[3]," + - "varFunctionAgrvs[4],varFunctionAgrvs[5],varFunctionAgrvs[6],varFunctionAgrvs[7],varFunctionAgrvs[8]);" ); - } - } -} -function ntkoSendDataToChildtext(ntkoDataSendUrl) -{ - if(ntkoSendDataToChildSData!=null&&ntkoSendDataToChildSData!="") - { - ntkoBrowser.ntkoSendDataToChild(ntkoDataSendUrl,ntkoSendDataToChildSData); - } -} -/*___md5___*/ - -var hexcase = 0; -var b64pad = ""; -var chrsz = 8; -function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} -function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} -function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} -function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } -function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } -function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } -function md5_vm_test() -{ - return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; -} -function core_md5(x, len) -{ - x[len >> 5] |= 0x80 << ((len) % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - for(var i = 0; i < x.length; i += 16) - { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); - d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); - c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); - b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); - a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); - d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); - c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); - b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); - a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); - d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); - c = md5_ff(c, d, a, b, x[i+10], 17, -42063); - b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); - a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); - d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); - c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); - b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); - a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); - d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); - c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); - b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); - a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); - d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); - c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); - b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); - a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); - d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); - c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); - b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); - a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); - d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); - c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); - b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); - a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); - d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); - c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); - b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); - a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); - d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); - c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); - b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); - a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); - d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); - c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); - b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); - a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); - d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); - c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); - b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); - a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); - d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); - c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); - b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); - a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); - d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); - c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); - b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); - a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); - d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); - c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); - b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); - a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); - d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); - c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); - b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); - a = safe_add(a, olda); - b = safe_add(b, oldb); - c = safe_add(c, oldc); - d = safe_add(d, oldd); - } - return Array(a, b, c, d); -} -function md5_cmn(q, a, b, x, s, t) -{ - return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); -} -function md5_ff(a, b, c, d, x, s, t) -{ - return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); -} -function md5_gg(a, b, c, d, x, s, t) -{ - return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); -} -function md5_hh(a, b, c, d, x, s, t) -{ - return md5_cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5_ii(a, b, c, d, x, s, t) -{ - return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); -} - -function core_hmac_md5(key, data) -{ - var bkey = str2binl(key); - if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); - var ipad = Array(16), opad = Array(16); - for(var i = 0; i < 16; i++) - { - ipad[i] = bkey[i] ^ 0x36363636; - opad[i] = bkey[i] ^ 0x5C5C5C5C; - } - var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); - return core_md5(opad.concat(hash), 512 + 128); -} -function safe_add(x, y) -{ - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} -function bit_rol(num, cnt) -{ - return (num << cnt) | (num >>> (32 - cnt)); -} -function str2binl(str) -{ - var bin = Array(); - var mask = (1 << chrsz) - 1; - for(var i = 0; i < str.length * chrsz; i += chrsz) - bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); - return bin; -} -function binl2str(bin) -{ - var str = ""; - var mask = (1 << chrsz) - 1; - for(var i = 0; i < bin.length * 32; i += chrsz) - str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); - return str; -} -function binl2hex(binarray) -{ - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i++) - { - str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + - hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); - } - return str; -} -function binl2b64(binarray) -{ - - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i += 3) - { - var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) - | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) - | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); - for(var j = 0; j < 4; j++) - { - if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; - else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); - } - } - return str; -} - -/*接收 子页面数据*/ -function NTKO_DOC_PostMessage(param){ - window.postMessage({type: 'FROM_RETURN_DOC',text: param}, "*") -} -function NTKO_PDF_PostMessage(param){ - window.postMessage({type: 'FROM_RETURN_PDF',text: param}, "*") -} -function NTKO_HTML_PostMessage(param){ - window.postMessage({type: 'FROM_RETURN_HTML',text: param}, "*") -} -function ntkoCloseEvent(){ - window.postMessage({type: 'FROM_NTKO_CLOSE',text: varNtkoGUID}, "*") -} diff --git a/public/ntkocreatnew.docx b/public/ntkocreatnew.docx new file mode 100644 index 0000000..e69de29 diff --git a/public/ntkoofficecontrol.min.js b/public/ntkoofficecontrol.min.js deleted file mode 100644 index 099c722..0000000 --- a/public/ntkoofficecontrol.min.js +++ /dev/null @@ -1,207 +0,0 @@ -/*------------------------------------------------------*/ -/* 修改控件的配置信息 */ -/* version:2.5.1 */ -/* 2020.09.07版本 跟随 联通数字科技有限公司20210105 产品发送 */ -/* */ -/*------------------------------------------------------*/ -//64位控件的calssid -var classidx64="A64E3073-2016-4baf-A89D-FFE1FAA10EF1"; -//32位控件的classid -var classid="A64E3073-2016-4baf-A89D-FFE1FAA10ED1"; -//32位控件包的路径 -var codebase="officecontrol/ofctnewclsid.cab#version=6,0,1,0"; -//64位控件包的路径 -var codebase64="officecontrol/ofctnewclsidx64.cab#version=6,0,1,0"; -//设置高度 -var height="800px"; -//设置宽度 -var width="100%"; -//买断授权密钥如果不是买断可以不用写 -var MakerCaption="联通数字科技有限公司"; -//买断授权密钥如果不是买断可以不用写 -var MakerKey="C1AB790358ECC36C0F26DB985E43769912D15699"; -//密钥 -var ProductCaption="联通数字科技有限公司"; -//密钥 -var ProductKey="46839E48E0B10E99B17E82F35A3E5371F2C07BC0"; -//解除时间密钥 -var NoExpireKey=""; -/* -谷歌浏览器事件接管但此接管事件只支持低版本的谷歌(45以下版本不包含45)和火狐(52以下版本不包含52) -*/ -function ntkosavetourl(type,code,html) -{ - //alert("SaveToURL成功回调"); -} - - -function ntkopublishashtml(type,code,html){ - //alert("Onpublishashtmltourl成功回调"); -} -function ntkopublishaspdf(type,code,html){ -//alert("Onpublishaspdftourl成功回调"); -} -function ntkosaveasotherurl(type,code,html){ -//alert("SaveAsOtherformattourl成功回调"); -} - -function ntkoondocumentopened(type,code){ - //alert("Ondocumentopened成功回调"); - if(cmd==5){ - if(datavalue==1){ - ntko.ShowTipMessage("注意","已经接收到父页面传过来的值,请注意文档中内容的变化"); - ntkoDataToChild(datatext); - } - } -} - - - - -/*------------------------------------------------------*/ -/* 以下内容 请勿修改,否则可能出错 */ -/*------------------------------------------------------*/ - -var userAgent = navigator.userAgent, - rMsie = /(msie\s|trident.*rv:)([\w.]+)/, - rFirefox = /(firefox)\/([\w.]+)/, - rOpera = /(opera).+version\/([\w.]+)/, - rChrome = /(chrome)\/([\w.]+)/, - rSafari = /version\/([\w.]+).*(safari)/; -var browser; -var version; -var ua = userAgent.toLowerCase(); -function uaMatch(ua) { - var match = rMsie.exec(ua); - if (match != null) { - return { browser : "IE", version : match[2] || "0" }; - } - var match = rFirefox.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rOpera.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rChrome.exec(ua); - if (match != null) { - return { browser : match[1] || "", version : match[2] || "0" }; - } - var match = rSafari.exec(ua); - if (match != null) { - return { browser : match[2] || "", version : match[1] || "0" }; - } - if (match != null) { - return { browser : "", version : "0" }; - } -} -var browserMatch = uaMatch(userAgent.toLowerCase()); -if (browserMatch.browser) { - browser = browserMatch.browser; - version = browserMatch.version; -} - - -if (browser=="IE"){ - if(window.navigator.platform=="Win32"){ - - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - // document.write(' '); - document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); - document.write(''); - } - if(window.navigator.platform=="Win64"){ - - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - document.write(' '); - // document.write(' '); - document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); - document.write(''); - } -} -else if (browser=="firefox"){ - document.write(''); - document.write('尚未安装NTKO Web FireFox跨浏览器插件 '); - document.write(' '); -}else if(browser=="chrome"){ - document.write('尚未安装NTKO Web Chrome跨浏览器插件 '); - document.write(''); -}else if (Sys.opera){ - alert("sorry,ntko web印章暂时不支持opera!"); -}else if (Sys.safari){ - alert("sorry,ntko web印章暂时不支持safari!"); -} -// window.onunload =function(){ -// var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); -// if(ntkojb){ -// window.opener.ntkoCloseEvent(); -// } -// } - -//ie,谷歌,火狐传值 -var ntkoBrowser={ - ntkoSetReturnValueToParentPage:function(data1,text1){ - var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); - if(ntkojb){ - window.opener.ieattachEventntko(data1,text1); - }else{ - window.external.SetReturnValueToParentPage(data1,text1); - } - }, - NtkoJudgingBrowsers:function(){ - try{ - var ntkobtop=window.opener.top.browser; - return true; - }catch(err){ - return false; - } - }, -} -//触发父页面传值的功能 -var NtkoUrlTest = window.location.href; -if(NtkoUrlTest!=null&&NtkoUrlTest!=""){ - var ntkoarry=new Array(); - ntkoarry.push(NtkoUrlTest); - ntkoBrowser.ntkoSetReturnValueToParentPage("ntkoSendDataToChildtext",ntkoarry); -} diff --git a/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe b/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe index 1feb127..30608a3 100644 Binary files a/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe and b/public/officecontrol/NTKO控件安装程序-联通数字科技有限公司.exe differ diff --git a/public/jquery.js b/public/officecontrol/jquery.js similarity index 100% rename from public/jquery.js rename to public/officecontrol/jquery.js diff --git a/public/ntko.js b/public/officecontrol/ntko.20220624.js similarity index 91% rename from public/ntko.js rename to public/officecontrol/ntko.20220624.js index d1a84ce..11d3d2c 100644 --- a/public/ntko.js +++ b/public/officecontrol/ntko.20220624.js @@ -11,10 +11,11 @@ function init(readonly, DocfileCode) { contentType: "application/json;charset=UTF-8", data: JSON.stringify([DocfileCode]), success: function (result) { + if (window.navigator.platform == "Win32") { + ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.1.0", "officecontrol/ntkooledocall.cab", 51, true); + } if (window.navigator.platform == "Win64") { - ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.2.0", "officecontrol/ntkooledocallx64.cab", 51, true); - } else { - ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.2.0", "officecontrol/ntkooledocall.cab", 51, true);//版增加对于PDF文件的支持 + ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.1.0", "officecontrol/ntkooledocallx64.cab", 51, true);//PDF支持 } if (result.success) { if (result.data.length > 0) { @@ -27,7 +28,7 @@ function init(readonly, DocfileCode) { } }) } else { - ntko.CreateNew("Word.Document"); + ntko.OpenFromURL("ntkocreatnew.docx"); } } else { alert(JSON.stringify(result)); diff --git a/public/officecontrol/ntko.js b/public/officecontrol/ntko.js deleted file mode 100644 index 7218f17..0000000 --- a/public/officecontrol/ntko.js +++ /dev/null @@ -1,23 +0,0 @@ -var ntko;//控件对象 - -//初始化去打开文档 -function init(cmd){ - ntko = document.getElementById("TANGER_OCX"); - if(window.navigator.platform=="Win64"){ - //alert("平台版文档控件,请使用32位浏览器如IE"); - //TANGER_OCX_OBJ.AddDocTypePlugin(".tif","tif.NtkoDocument","4.0.1.0","officecontrol/ntkooledocallx64.cab",51,true); - ntko.AddDocTypePlugin(".pdf","PDF.NtkoDocument","4.0.2.0","officecontrol/ntkooledocallx64.cab",51,true); - - }else{ - ntko.AddDocTypePlugin(".pdf","PDF.NtkoDocument","4.0.2.0","officecontrol/ntkooledocall.cab",51,true);//版增加对于PDF文件的支持 - //TANGER_OCX_OBJ.AddDocTypePlugin(".tif","tif.NtkoDocument","4.0.1.0","officecontrol/ntkooledocallx64.cab",51,true); - } - if (cmd == 1) - { - ntko.OpenFromURL("ntkocreatnew.docx"); - } - else - { - ntko.OpenFromURL("aboutus.docx"); - } -} \ No newline at end of file diff --git a/public/ntko4Path.js b/public/officecontrol/ntko4Path.20220624.js similarity index 100% rename from public/ntko4Path.js rename to public/officecontrol/ntko4Path.20220624.js diff --git a/public/officecontrol/ntkobackground.min.js b/public/officecontrol/ntkobackground.min.20220624.js similarity index 84% rename from public/officecontrol/ntkobackground.min.js rename to public/officecontrol/ntkobackground.min.20220624.js index c874533..9a2d153 100644 --- a/public/officecontrol/ntkobackground.min.js +++ b/public/officecontrol/ntkobackground.min.20220624.js @@ -1,7 +1,7 @@ /** - * version: 2.5.1 + * version: 3.6.2 * - * 2020.09.07版本 跟随 联通系统集成有限公司20201229 产品发送 + * 2022.04.01版本 跟随 联通数字科技有限公司20220523 产品发送 */ "use strict"; var varNtkoGUID = Math.random().toString(36); @@ -11,6 +11,8 @@ var timer; var ntkoSendDataToChildStrUrl; var ntkoSendDataToChildSData; var ntkowin; +var ntkoextensionmainifest; +var strURL1; var userAgent = navigator.userAgent, rMsie = /(msie\s|trident.*rv:)([\w.]+)/, rFirefox = /(firefox)\/([\w.]+)/, @@ -56,38 +58,38 @@ var userAgent = navigator.userAgent, browser = browserMatch.browser; version = browserMatch.version; } - var mimeTypes = navigator.mimeTypes; + var mimeTypes = navigator.mimeTypes; var bChromeExtensionInstalled = false; + version=parseInt(version); + if( "chrome" === browserMatch.browser && version>=45) + { + var img; + img = new Image(); + img.src = "chrome-extension://lppkeogbkjlmmbjenbogdndlgmpiddda/icons/ntko.png"; + img.onload = function() { + bChromeExtensionInstalled = true; + } + img.onerror = function() { + bChromeExtensionInstalled = false; + } + } + if("edg"===browserMatch.browser){ + + var img; + img = new Image(); + img.src = "chrome-extension://miogdolpaknhgnfoghcmnooafkiafkcc/icons/ntko.png"; + img.onload = function() { + bChromeExtensionInstalled = true; + } + img.onerror = function() { + bChromeExtensionInstalled = false; + } + } - if( "chrome" === browserMatch.browser && version>="45") - { - - var img; - img = new Image(); - img.src = "chrome-extension://lppkeogbkjlmmbjenbogdndlgmpiddda/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onerror = function() { - bChromeExtensionInstalled = false; - }; - } - if("edg"===browserMatch.browser){ - - var img; - img = new Image(); - img.src = "chrome-extension://miogdolpaknhgnfoghcmnooafkiafkcc/icons/ntko.png"; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - img.onload = function() { - bChromeExtensionInstalled = true; - }; - } - var ntkoBrowser = { ntkoSendDataToChild:function( strURL, data) { + console.log(strURL); if ( typeof data === 'undefined' ){ return; } @@ -103,8 +105,8 @@ ntkoSendDataToChild:function( strURL, data) if(ntkobr){ window.postMessage({ type: "FROM_NTKO_PAGE", text: jsonValue }, "*"); }else{ - ntkoWinOpen.ntkoGetParentData(data); - } + ntkoWinOpen.ntkoGetParentData(data); + } }, ExtensionInstalled:function() { @@ -130,27 +132,34 @@ ExtensionInstalled:function() { if( "firefox" === browserMatch.browser ) { + if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ + + return true; + }else{ var bInstalled = false; if( "undefined" === typeof FirefoxInstalled ) return ( bInstalled ); else return( window.FirefoxInstalled()); + } } else if( "chrome" === browserMatch.browser ) - { - if(localStorage["ntkoweb"]==="ntkoExtensionInstalled"){ - bChromeExtensionInstalled=true; - localStorage.clear(); - } + { + + if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ + + return true; + }else{ return (bChromeExtensionInstalled); - } else if("edg" === browserMatch.browser){ - if(localStorage["ntkoweb"]==="ntkoExtensionInstalled"){ - bChromeExtensionInstalled=true; - localStorage.clear(); - } - return( bChromeExtensionInstalled ); - } - } + } + } else if("edg" === browserMatch.browser){ + if(( typeof ntkoextensionmainifest != 'undefined' ) && ( ( null != ntkoextensionmainifest ) && ( "" != ntkoextensionmainifest ))){ + return true; + }else{ + return( bChromeExtensionInstalled ); + } + } + } }, ntkoClose:function( strURL ) @@ -168,18 +177,16 @@ ntkoClose:function( strURL ) ntkoWinOpen.close(); } }, -openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserProductKey, ntkoBrowserNoExpireKey, ntkoBrowserOptions,varUrlData,ntkowidth,ntkoheight ) -{ - - if(varUrlData!=null&&varUrlData!=""){ - ntkoSendDataToChildSData=varUrlData; - } +openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserProductKey, ntkoBrowserNoExpireKey, ntkoBrowserOptions,varUrlData,ntkowidth,ntkoheight,cookiesDomainPath ) +{ var ntkowinscr= ntkoBrowser.NtkoWidthAndHeightWinScr(ntkowidth,ntkoheight); if(!ntkowinscr){ alert("设置窗口大小格式不正确"); return; - } + } + var strURL=ntkoBrowser.NtkoStrURL(strURL); + strURL1=strURL; var ntkoSessionURL=""; var jsonValue = '{"OpenWindow":1,"URL":"'; jsonValue += strURL; @@ -187,6 +194,8 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro jsonValue += varNtkoGUID; jsonValue += '","URLMD5":"'; jsonValue +=b64_md5(strURL); + jsonValue += '","ntkobrowserMatch":"'; + jsonValue +=browserMatch.browser; jsonValue += '","IsShowOnExtendMonitor":"'; jsonValue += IsShowOnExtendMonitor; jsonValue += '"'; @@ -225,7 +234,6 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro } - var LocalStorge = window.localStorage; if( typeof LocalStorge != 'undefined' && ( 0 != LocalStorge.length ) ) { @@ -241,7 +249,12 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro jsonValue += JSON.stringify(varLocalDataList);; jsonValue += ''; } + if(varUrlData!=null&&varUrlData!=""){ + ntkoSendDataToChildSData=varUrlData; + LocalStorge['ntkoSendDataToChildSData']=varUrlData; + } + var SessionStorge = window.sessionStorage; if( typeof SessionStorge != 'undefined' && ( 0 != SessionStorge.length ) ) { @@ -271,12 +284,16 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro jsonValue += ntkoheight; jsonValue += ''; } - - + if( typeof cookiesDomainPath != 'undefined' && ( ( null != cookiesDomainPath ) && ( "" != cookiesDomainPath ) ) ) + { + jsonValue += ',"CookiesDomainPath":'; + jsonValue += cookiesDomainPath; + jsonValue += ''; + } jsonValue += '}'; var ntkobr=ntkoBrowser.NtkoBrower(); if(ntkobr){ - window.postMessage({type: "FROM_NTKO_PAGE", text: jsonValue}, "*"); + window.postMessage({type: "FROM_NTKO_PAGE", text: jsonValue}, "*"); }else{ ntkowin=b64_md5(strURL); if(ntkowidth==null||ntkowidth=="" ||ntkowidth=="undefined"){ @@ -307,7 +324,7 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro if(userAgent.indexOf("Windows NT 5.1") > -1){ return false; } - if(version>="50"){ + if(version>=50){ return true; }else{ return false; @@ -317,7 +334,7 @@ openWindow:function( strURL,IsShowOnExtendMonitor,ProductCaption, ntkoBrowserPro if(userAgent.indexOf("Windows NT 5.1") > -1){ return false; } - if(version>="45"){ + if(version>=45){ return true; }else{ return false; @@ -398,13 +415,23 @@ NtkoWidthAndHeightWinScr:function(ntkowidth,ntkoheight){ } } } - }, + }, + thisNTKOGUID:varNtkoGUID,/**20220609 zhoujianlong 新版插件更新*/ +NtkoExtensionVersion:function(){ + if(browser=="firefox"){ + var ntkojsontext = JSON.parse(window.NtkoFireFoxVersion()); + var ntkofireforversion=ntkojsontext['ntkoversion']; + return ntkofireforversion; + }else{ + return ntkoextensionmainifest; + } +} }; if(browser!="IE") { window.addEventListener("message", function(event) - { + { if ( event.source != window ) return; if (event.data.type && (event.data.type == "FROM_NTKO_CONTEXT_PAGE")) @@ -439,10 +466,18 @@ if(browser!="IE") "varFunctionAgrvs[4],varFunctionAgrvs[5],varFunctionAgrvs[6],varFunctionAgrvs[7],varFunctionAgrvs[8]);" ); } } + }else if("NtkoError" === jsonData["functionName"]){ + //启动扩展报错信息 + alert(jsonData["NtkoReason"]) + } } } - } + } + if(event.data.type && (event.data.type == "FROM_NTKO_MANIFEST")){ + var ntkojsontext = JSON.parse( event.data.text ); + ntkoextensionmainifest=ntkojsontext['ntkoversion']; + } }, false); } function ieattachEventntko(data,varFunctionAgrvs) @@ -456,13 +491,7 @@ function ieattachEventntko(data,varFunctionAgrvs) } } } -function ntkoSendDataToChildtext(ntkoDataSendUrl) -{ - if(ntkoSendDataToChildSData!=null&&ntkoSendDataToChildSData!="") - { - ntkoBrowser.ntkoSendDataToChild(ntkoDataSendUrl,ntkoSendDataToChildSData); - } -} + /*___md5___*/ var hexcase = 0; @@ -652,3 +681,17 @@ function binl2b64(binarray) } return str; } +/*接收 子页面数据*/ +/**20220609 zhoujianlong 新版插件更新*/ +function NTKO_DOC_PostMessage(param){ + window.postMessage({type: 'FROM_RETURN_DOC',text: param}, "*") +} +function NTKO_PDF_PostMessage(param){ + window.postMessage({type: 'FROM_RETURN_PDF',text: param}, "*") +} +function NTKO_HTML_PostMessage(param){ + window.postMessage({type: 'FROM_RETURN_HTML',text: param}, "*") +} +function ntkoCloseEvent(){ + window.postMessage({type: 'FROM_NTKO_CLOSE',text: varNtkoGUID}, "*") +} \ No newline at end of file diff --git a/public/officecontrol/ntkoofficecontrol.min.js b/public/officecontrol/ntkoofficecontrol.min.20220624.js similarity index 85% rename from public/officecontrol/ntkoofficecontrol.min.js rename to public/officecontrol/ntkoofficecontrol.min.20220624.js index 54251cb..7ec4ffd 100644 --- a/public/officecontrol/ntkoofficecontrol.min.js +++ b/public/officecontrol/ntkoofficecontrol.min.20220624.js @@ -1,29 +1,28 @@ /*------------------------------------------------------*/ /* 修改控件的配置信息 */ -/* version:2.5.1 */ -/* 2020.09.07版本 跟随 联通系统集成有限公司20201229 产品发送 */ -/* */ +/* version:3.6.2 */ +/* 2022.04.01版本 跟随 联通数字科技有限公司20220523 产品发送 */ /*------------------------------------------------------*/ //64位控件的calssid var classidx64="A64E3073-2016-4baf-A89D-FFE1FAA10EF1"; //32位控件的classid var classid="A64E3073-2016-4baf-A89D-FFE1FAA10ED1"; //32位控件包的路径 -var codebase="officecontrol/ofctnewclsid.cab#version=6,0,1,0"; +var codebase="officecontrol/ofctnewclsid.cab#version=6.0.2.0"; //64位控件包的路径 -var codebase64="officecontrol/ofctnewclsidx64.cab#version=6,0,1,0"; +var codebase64="officecontrol/ofctnewclsidx64.cab#version=6.0.2.0"; //设置高度 var height="800px"; //设置宽度 var width="100%"; //买断授权密钥如果不是买断可以不用写 -var MakerCaption="联通系统集成有限公司"; +var MakerCaption="联通数字科技有限公司"; //买断授权密钥如果不是买断可以不用写 -var MakerKey="D130003CD231496EBD17D6DAC22DEFC6BD8F4E17"; +var MakerKey="C1AB790358ECC36C0F26DB985E43769912D15699"; //密钥 -var ProductCaption="联通系统集成有限公司某某测试用户"; +var ProductCaption="联通数字科技有限公司"; //密钥 -var ProductKey="F6C911699ECD29CC0D2E47822CF1775B3A80C13F"; +var ProductKey="46839E48E0B10E99B17E82F35A3E5371F2C07BC0"; //解除时间密钥 var NoExpireKey=""; @@ -49,10 +48,9 @@ function ntkosaveasotherurl(type,code,html){ function ntkoondocumentopened(type,code){ //alert("Ondocumentopened成功回调"); if(cmd==5){ - if(datavalue==1){ ntko.ShowTipMessage("注意","已经接收到父页面传过来的值,请注意文档中内容的变化"); - ntkoDataToChild(datatext); - } + var datext=localStorage.getItem('ntkoSendDataToChildSData') + ntkoDataToChild(datext); } } @@ -118,7 +116,7 @@ if (browser=="IE"){ document.write(' '); document.write(' '); document.write(' '); - document.write(' '); + // document.write(' ');/**20220609 zhoujianlong 新版插件更新*/ document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } @@ -135,7 +133,7 @@ if (browser=="IE"){ document.write(' '); document.write(' '); document.write(' '); - document.write(' '); + // document.write(' ');/**20220609 zhoujianlong 新版插件更新*/ document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } @@ -165,7 +163,7 @@ else if (browser=="firefox"){ document.write('_ProductCaption="'+ProductCaption+'" '); document.write('_NoExpireKey="'+NoExpireKey+'" '); document.write('_ProductKey="'+ProductKey+'" '); - document.write('codebase="'+codebase+'" width="'+width+'" height="'+height+'" type="application/ntko-plug" '); + document.write('codebase="'+codebase+'" width="'+width+'" height="'+height+'" type="application/ntko-plug" >'); document.write('尚未安装NTKO Web Chrome跨浏览器插件 '); document.write(''); }else if (Sys.opera){ @@ -173,12 +171,12 @@ else if (browser=="firefox"){ }else if (Sys.safari){ alert("sorry,ntko web印章暂时不支持safari!"); } -window.onunload =function(){ - var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); - if(ntkojb){ - window.opener.ntkoCloseEvent(); - } -} +// window.onunload =function(){/**20220609 zhoujianlong 新版插件更新*/ +// var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); +// if(ntkojb){ +// window.opener.ntkoCloseEvent(); +// } +// } //ie,谷歌,火狐传值 var ntkoBrowser={ @@ -186,6 +184,7 @@ var ntkoBrowser={ var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); if(ntkojb){ window.opener.ieattachEventntko(data1,text1); + }else{ window.external.SetReturnValueToParentPage(data1,text1); } @@ -197,12 +196,5 @@ var ntkoBrowser={ }catch(err){ return false; } - }, -} -//触发父页面传值的功能 -var NtkoUrlTest = window.location.href; -if(NtkoUrlTest!=null&&NtkoUrlTest!=""){ - var ntkoarry=new Array(); - ntkoarry.push(NtkoUrlTest); - ntkoBrowser.ntkoSetReturnValueToParentPage("ntkoSendDataToChildtext",ntkoarry); + } } \ No newline at end of file diff --git a/public/officecontrol/ntkooledocall.cab b/public/officecontrol/ntkooledocall.cab index 7ca6558..961603e 100644 Binary files a/public/officecontrol/ntkooledocall.cab and b/public/officecontrol/ntkooledocall.cab differ diff --git a/public/officecontrol/ntkooledocallx64.cab b/public/officecontrol/ntkooledocallx64.cab index 7838213..ab24d57 100644 Binary files a/public/officecontrol/ntkooledocallx64.cab and b/public/officecontrol/ntkooledocallx64.cab differ diff --git a/public/officecontrol/ofctnewclsid.cab b/public/officecontrol/ofctnewclsid.cab index fc9da50..271a1d1 100644 Binary files a/public/officecontrol/ofctnewclsid.cab and b/public/officecontrol/ofctnewclsid.cab differ diff --git a/public/officecontrol/ofctnewclsidx64.cab b/public/officecontrol/ofctnewclsidx64.cab index 5d27c65..c7e92cd 100644 Binary files a/public/officecontrol/ofctnewclsidx64.cab and b/public/officecontrol/ofctnewclsidx64.cab differ diff --git a/public/webofficeComponent.html b/public/webofficeComponent.html index 5352053..1a1d680 100644 --- a/public/webofficeComponent.html +++ b/public/webofficeComponent.html @@ -4,9 +4,9 @@ 招标采购中心 | 文档控件编辑器 - - - + + +
- +
diff --git a/public/webofficeIeComponent.html b/public/webofficeIeComponent.html index 3c7d241..05b5a8e 100644 --- a/public/webofficeIeComponent.html +++ b/public/webofficeIeComponent.html @@ -4,9 +4,9 @@ 招标采购中心 | 文档控件编辑器 - - - + + +
- +
diff --git a/src/assets/topic/bannerListPic.jpg b/src/assets/topic/bannerListPic.jpg new file mode 100644 index 0000000..38ec029 Binary files /dev/null and b/src/assets/topic/bannerListPic.jpg differ diff --git a/src/assets/topic/bannerListPic_member.jpg b/src/assets/topic/bannerListPic_member.jpg new file mode 100644 index 0000000..ed4f777 Binary files /dev/null and b/src/assets/topic/bannerListPic_member.jpg differ diff --git a/src/assets/topic/bannerPic.jpg b/src/assets/topic/bannerPic.jpg new file mode 100644 index 0000000..a2f0931 Binary files /dev/null and b/src/assets/topic/bannerPic.jpg differ diff --git a/src/assets/topic/bannerProjectPic.jpg b/src/assets/topic/bannerProjectPic.jpg new file mode 100644 index 0000000..8b0328d Binary files /dev/null and b/src/assets/topic/bannerProjectPic.jpg differ diff --git a/src/assets/topic/branch.png b/src/assets/topic/branch.png new file mode 100644 index 0000000..9f288e5 Binary files /dev/null and b/src/assets/topic/branch.png differ diff --git a/src/assets/topic/card-bg.png b/src/assets/topic/card-bg.png new file mode 100644 index 0000000..b1d51e6 Binary files /dev/null and b/src/assets/topic/card-bg.png differ diff --git a/src/assets/topic/emblem.png b/src/assets/topic/emblem.png new file mode 100644 index 0000000..eaae6d3 Binary files /dev/null and b/src/assets/topic/emblem.png differ diff --git a/src/assets/topic/listNewsPic01.jpg b/src/assets/topic/listNewsPic01.jpg new file mode 100644 index 0000000..94fe905 Binary files /dev/null and b/src/assets/topic/listNewsPic01.jpg differ diff --git a/src/assets/topic/newsDetailBg.jpg b/src/assets/topic/newsDetailBg.jpg new file mode 100644 index 0000000..497d977 Binary files /dev/null and b/src/assets/topic/newsDetailBg.jpg differ diff --git a/src/assets/topic/person-bg.jpg b/src/assets/topic/person-bg.jpg new file mode 100644 index 0000000..3d7431f Binary files /dev/null and b/src/assets/topic/person-bg.jpg differ diff --git a/src/assets/topic/person.png b/src/assets/topic/person.png new file mode 100644 index 0000000..778f805 Binary files /dev/null and b/src/assets/topic/person.png differ diff --git a/src/assets/topic/static-bg.png b/src/assets/topic/static-bg.png new file mode 100644 index 0000000..f1aef99 Binary files /dev/null and b/src/assets/topic/static-bg.png differ diff --git a/src/assets/topic/timeIcon.png b/src/assets/topic/timeIcon.png new file mode 100644 index 0000000..150635c Binary files /dev/null and b/src/assets/topic/timeIcon.png differ diff --git a/src/assets/topic/topic_activity_default.jpg b/src/assets/topic/topic_activity_default.jpg new file mode 100644 index 0000000..389c1f1 Binary files /dev/null and b/src/assets/topic/topic_activity_default.jpg differ diff --git a/src/assets/topic/topic_activity_gradient.jpg b/src/assets/topic/topic_activity_gradient.jpg new file mode 100644 index 0000000..f01c55b Binary files /dev/null and b/src/assets/topic/topic_activity_gradient.jpg differ diff --git a/src/assets/topic/topic_activity_logo.png b/src/assets/topic/topic_activity_logo.png new file mode 100644 index 0000000..4a82fbf Binary files /dev/null and b/src/assets/topic/topic_activity_logo.png differ diff --git a/src/assets/topic/topic_assure.png b/src/assets/topic/topic_assure.png new file mode 100644 index 0000000..57822b2 Binary files /dev/null and b/src/assets/topic/topic_assure.png differ diff --git a/src/assets/topic/topic_banner_default.jpg b/src/assets/topic/topic_banner_default.jpg new file mode 100644 index 0000000..e17a0ba Binary files /dev/null and b/src/assets/topic/topic_banner_default.jpg differ diff --git a/src/assets/topic/topic_bottom_button.png b/src/assets/topic/topic_bottom_button.png new file mode 100644 index 0000000..455995e Binary files /dev/null and b/src/assets/topic/topic_bottom_button.png differ diff --git a/src/assets/topic/topic_bottom_card_picture.png b/src/assets/topic/topic_bottom_card_picture.png new file mode 100644 index 0000000..1def271 Binary files /dev/null and b/src/assets/topic/topic_bottom_card_picture.png differ diff --git a/src/assets/topic/topic_commodity.png b/src/assets/topic/topic_commodity.png new file mode 100644 index 0000000..8b671ed Binary files /dev/null and b/src/assets/topic/topic_commodity.png differ diff --git a/src/assets/topic/topic_difficult.png b/src/assets/topic/topic_difficult.png new file mode 100644 index 0000000..692197b Binary files /dev/null and b/src/assets/topic/topic_difficult.png differ diff --git a/src/assets/topic/topic_firstline.png b/src/assets/topic/topic_firstline.png new file mode 100644 index 0000000..f6e0735 Binary files /dev/null and b/src/assets/topic/topic_firstline.png differ diff --git a/src/assets/topic/topic_fist.png b/src/assets/topic/topic_fist.png new file mode 100644 index 0000000..54b1307 Binary files /dev/null and b/src/assets/topic/topic_fist.png differ diff --git a/src/assets/topic/topic_graceful_textbg.png b/src/assets/topic/topic_graceful_textbg.png new file mode 100644 index 0000000..207df99 Binary files /dev/null and b/src/assets/topic/topic_graceful_textbg.png differ diff --git a/src/assets/topic/topic_header.jpg b/src/assets/topic/topic_header.jpg new file mode 100644 index 0000000..f4036cd Binary files /dev/null and b/src/assets/topic/topic_header.jpg differ diff --git a/src/assets/topic/topic_header_img.png b/src/assets/topic/topic_header_img.png new file mode 100644 index 0000000..5e83f9e Binary files /dev/null and b/src/assets/topic/topic_header_img.png differ diff --git a/src/assets/topic/topic_interview.png b/src/assets/topic/topic_interview.png new file mode 100644 index 0000000..6f26b59 Binary files /dev/null and b/src/assets/topic/topic_interview.png differ diff --git a/src/assets/topic/topic_other.png b/src/assets/topic/topic_other.png new file mode 100644 index 0000000..35359e0 Binary files /dev/null and b/src/assets/topic/topic_other.png differ diff --git a/src/assets/topic/topic_partybranch.png b/src/assets/topic/topic_partybranch.png new file mode 100644 index 0000000..6845b36 Binary files /dev/null and b/src/assets/topic/topic_partybranch.png differ diff --git a/src/assets/topic/topic_partymember.png b/src/assets/topic/topic_partymember.png new file mode 100644 index 0000000..6ce187c Binary files /dev/null and b/src/assets/topic/topic_partymember.png differ diff --git a/src/assets/topic/topic_project_picture.jpg b/src/assets/topic/topic_project_picture.jpg new file mode 100644 index 0000000..ffa2249 Binary files /dev/null and b/src/assets/topic/topic_project_picture.jpg differ diff --git a/src/assets/topic/topic_protocol.png b/src/assets/topic/topic_protocol.png new file mode 100644 index 0000000..ca08fcd Binary files /dev/null and b/src/assets/topic/topic_protocol.png differ diff --git a/src/assets/topic/topic_red_flag.png b/src/assets/topic/topic_red_flag.png new file mode 100644 index 0000000..36aa4a4 Binary files /dev/null and b/src/assets/topic/topic_red_flag.png differ diff --git a/src/assets/topic/topic_right_manager.jpg b/src/assets/topic/topic_right_manager.jpg new file mode 100644 index 0000000..7fce1c7 Binary files /dev/null and b/src/assets/topic/topic_right_manager.jpg differ diff --git a/src/assets/topic/topic_right_material.png b/src/assets/topic/topic_right_material.png new file mode 100644 index 0000000..307132a Binary files /dev/null and b/src/assets/topic/topic_right_material.png differ diff --git a/src/assets/topic/topic_totalamount.png b/src/assets/topic/topic_totalamount.png new file mode 100644 index 0000000..cfccc0e Binary files /dev/null and b/src/assets/topic/topic_totalamount.png differ diff --git a/src/assets/topic/topic_totalnumber.png b/src/assets/topic/topic_totalnumber.png new file mode 100644 index 0000000..93bc7b1 Binary files /dev/null and b/src/assets/topic/topic_totalnumber.png differ diff --git a/src/components/BiddingRoom/index.less b/src/components/BiddingRoom/index.less index c3ea6a4..8fc9318 100644 --- a/src/components/BiddingRoom/index.less +++ b/src/components/BiddingRoom/index.less @@ -31,7 +31,7 @@ text-align: center; line-height: 50px; font-size: 15px; - border:1px solid#f0f0f0; + border:1px solid #f0f0f0; //border-radius: 3px; margin-left: -1px; &:hover{ diff --git a/src/components/richText/wang/index.tsx b/src/components/richText/wang/index.tsx index 73dd343..4b4b928 100644 --- a/src/components/richText/wang/index.tsx +++ b/src/components/richText/wang/index.tsx @@ -1,7 +1,10 @@ -import React, { useEffect, useImperativeHandle, useState } from 'react'; +import React, { useEffect, useImperativeHandle, useRef, useState } from 'react'; import AlertMenu from './fullScreen' import E from 'wangeditor'; -import { Button } from 'antd'; +import { Button, message, Spin } from 'antd'; +import { pictureDisplayPath, uploadAttachmentPath } from '@/utils/DownloadUtils'; +import { isEmpty, isNotEmpty } from '@/utils/CommonUtils'; +import { createNewFileBid } from '@/services/download_'; interface WangType { braftRef: any;//挂载 @@ -9,7 +12,9 @@ interface WangType { echo?: any;//回显内容 value?: any; height?: number; - onChange?: (value: any) => void + onChange?: (value: any) => void; + useImage?: boolean;//使用图片上传 + imageId?: string;//图片objectId } let editor: any = null; @@ -21,6 +26,10 @@ const BraftText: React.FC = (props) => { //======================================================================================state const [content, setContent] = useState(''); const [fullScreen, fullScreenSet] = useState(false); + //遮罩 + const [loading, setLoading] = useState(false); + //imageId + const objectId = useRef(null); const { braftRef, echo, @@ -28,12 +37,14 @@ const BraftText: React.FC = (props) => { value, height, onChange, + useImage, + imageId, } = props; const tools = [//工具栏 'head',//标题 'fontSize', //字号 - 'lineHeight', //行高 + // 'lineHeight', //行高 'foreColor', //颜色 'bold', //加粗 'italic', //斜体 @@ -41,27 +52,30 @@ const BraftText: React.FC = (props) => { 'strikeThrough', //文字删除线 'indent', //缩进 'justify', //文字对齐方式 + 'list', //列表 'undo', //撤销 - 'redo', //重做 + 'redo', //恢复 'fullscreen', //全屏 - 'emoticon',//表情 - 'image',//图片 - 'video',//视频 - 'table',//表格 - 'todo',//待办 + // 'image',//图片 + // 'emoticon',//表情 + // 'video',//视频 + // 'table',//表格 + // 'todo',//待办 ]; //=======================================================================================func useEffect(() => { if (willCreate) { // 注:class写法需要在componentDidMount 创建编辑器 - editor = new E("#div1") + editor = new E("#div1"); + //添加图片上传 + useImage && tools.splice(-3, 0, 'image'); //工具栏 editor.config.menus = tools; //提示 - editor.config.placeholder = '为了能顺利发布,建议您内容去掉下划线等格式,尽量以纯文本形式发布。' + editor.config.placeholder = '为了能顺利发布,建议您内容去掉下划线等格式,尽量以纯文本形式发布。'; // 配置 onchange 回调函数 editor.config.onchange = editorOnChange; // 注册菜单 @@ -73,6 +87,104 @@ const BraftText: React.FC = (props) => { // 设置编辑区域高度为 500px height && (editor.config.height = height); + //关闭网络上传图片 + editor.config.showLinkImg = false; + // 关闭粘贴内容中的样式 + editor.config.pasteFilterStyle = false; + // 忽略粘贴内容中的图片 + editor.config.pasteIgnoreImg = true; + // 上传图片到服务器,对应的是controller层的@RequestMapping("/upload") + editor.config.uploadImgServer = uploadAttachmentPath;//接口名称 + //自定义name,接收的时候图片文件的那么用这个,对应的是参数中的MultipartFile upimg名称,这个名称即上传到浏览器的参数名称 + editor.config.uploadFileName = "multipartFiles";//这个需要和后台商量上传图片的名称 + //设置请求体额外参数 + if (useImage) { + if (isEmpty(imageId)) { + createNewFileBid().then(res => {//获取雪花id + editor.config.uploadImgParams = { + appCode: 'ebtp-cloud-frontend', + objectId: res?.id, + }; + objectId.current = res?.id; + }) + } else { + editor.config.uploadImgParams = { + appCode: 'ebtp-cloud-frontend', + objectId: imageId, + }; + objectId.current = imageId; + } + } + // 将 timeout 时间改为 60s + editor.config.uploadImgTimeout = 60000; + // 将图片大小限制为 600k + editor.config.uploadImgMaxSize = 600 * 1024; + // 限制一次最多上传 1 张图片 + editor.config.uploadImgMaxLength = 1; + //上传图片的错误提示默认使用alert弹出,也可以自定义用户体验更好的提示方式 + editor.config.customAlert = function (info: string) { + const repinfo = info.replace(/0.5859375M/g, '600K'); + // info 是需要提示的内容 + message.error(repinfo); + }; + // 上传图片的结果反馈 + editor.config.uploadImgHooks = { + before: function (xhr: any, editor: any, files: any) { + // 图片上传之前触发 + // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,files 是选择的图片文件 + // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传 + // return { + // prevent: true, + // msg: '放弃上传' + // } + // console.log("before:",xhr) + if (isEmpty(objectId.current)) { + return { + prevent: true, + msg: '上传失败,原因:上传参数错误' + } + } + setLoading(true); + return { + prevent: false, + } + }, + success: function (xhr: any, editor: any, result: any) { + // 图片上传并返回结果,图片插入成功之后触发 + // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果 + // console.log("success:",result) + }, + fail: function (xhr: any, editor: any, result: any) { + // 图片上传并返回结果,但图片插入错误时触发 + // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果 + }, + error: function (xhr: any, editor: any) { + // 图片上传出错时触发 + // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象 + }, + // 上传图片超时 + timeout: function (xhr: any) { + message.error('服务器超时!'); + setLoading(false); + }, + // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置 + // (但是,服务器端返回的必须是一个 JSON 格式字符串!!!否则会报错) + customInsert: function (insertImg: (arg0: any) => void, result: any, editor: any) { + // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!) + // insertImg 是插入图片的函数,参数editor 是编辑器对象,result 是服务器端返回的结果 + // 举例:假如上传图片成功后,服务器端返回的是 {url:'....'} 这种格式,即可这样插入图片: + if (result?.success) { + const url = pictureDisplayPath + '?filePath=' + result.data[0].sysStorageVO.filePath; + insertImg(url); + } else { + message.error('图片上传失败!'); + } + setLoading(false); + // var url = result.result.remote_path; + // insertImg(url); + // result 必须是一个 JSON 格式字符串!!!否则报错 + } + }; /**一定要创建 */ editor.create(); @@ -82,15 +194,18 @@ const BraftText: React.FC = (props) => { willCreate = false; } - // 重新设置编辑器内容 - echo && editor.txt.html(echo); - value && editor.txt.html(value); - return () => { // 组件销毁时销毁编辑器 注:class写法需要在componentWillUnmount中调用 editor.destroy() + setLoading(false); + setContent(''); } - }, [value, echo]); + }, []); + + useEffect(() => { + // 重新设置编辑器内容 + echo && editor.txt.html(echo); + }, [echo]) /** *提供给父级的内容 **/ @@ -99,6 +214,7 @@ const BraftText: React.FC = (props) => { getHtml, getHtml1, makeDis, + getImageId, })); // 获取html方法1 @@ -131,12 +247,17 @@ const BraftText: React.FC = (props) => { const triggerChange = (newHtml: any) => { onChange?.(newHtml); }; + + //获取富文本图片objectId + function getImageId() { + return objectId.current; + } return ( -
- {/* - */} -
-
+ +
+
+
+
) } export default BraftText \ No newline at end of file diff --git a/src/images/auction/participateLogo.jpg b/src/images/auction/participateLogo.jpg new file mode 100644 index 0000000..90fdff6 Binary files /dev/null and b/src/images/auction/participateLogo.jpg differ diff --git a/src/locales/zh-CN/menu.ts b/src/locales/zh-CN/menu.ts index fecbc1d..fa0f907 100644 --- a/src/locales/zh-CN/menu.ts +++ b/src/locales/zh-CN/menu.ts @@ -58,28 +58,28 @@ export default { 'menu.bidOpening': '开标', 'menu.bidOpening.openList': '开标列表', - 'menu.list.ProjectDocumentation':'项目管理', - 'menu.list.ProjectInformationManagement':'项目信息管理', - 'menu.list.ProjectComplaint':'异议投诉', + 'menu.list.ProjectDocumentation': '项目管理', + 'menu.list.ProjectInformationManagement': '项目信息管理', + 'menu.list.ProjectComplaint': '异议投诉', // 'menu.list.packageDivided':'标段划分', - 'menu.biddingInvitation':'投标邀请', - 'menu.biddingInvitation.biddingAnnouncement':'招标公告', - 'menu.biddingInvitation.responseFormat':'应答格式', - 'menu.list.packageInformation':'标包信息', - 'menu.profile.biddingAnnouncement':'招标公告', - 'menu.list.LookingForBusinessOpportunities':'寻找商机', - 'menu.list.IParticipate':'我要参与', - 'menu.list.DownloadPurchasingDocuments':'下载招标文件', - 'menu.list.SupplierQuestionsOrObjections':'供应商质疑或异议列表', - 'menu.supplierClarificationList':'供应商澄清列表', - 'menu.clarificationOfTheBid':'标中质询澄清列表', - 'menu.challengeListInTheIndex':'标中质询列表', - 'menu.clarifyTheList':'澄清列表', - 'menu.invitationLetter':'邀请函', - 'menu.mentionDoubtReply':'项目经理提疑回复列表', - 'menu.reviewResults.manager':'评审结果-项目经理', - 'menu.reviewResults.groupLeader':'评审结果-组长', - 'menu.reviewResults.jury':'评审结果-评委', + 'menu.biddingInvitation': '投标邀请', + 'menu.biddingInvitation.biddingAnnouncement': '招标公告', + 'menu.biddingInvitation.responseFormat': '应答格式', + 'menu.list.packageInformation': '标包信息', + 'menu.profile.biddingAnnouncement': '招标公告', + 'menu.list.LookingForBusinessOpportunities': '寻找商机', + 'menu.list.IParticipate': '我要参与', + 'menu.list.DownloadPurchasingDocuments': '下载招标文件', + 'menu.list.SupplierQuestionsOrObjections': '供应商质疑或异议列表', + 'menu.supplierClarificationList': '供应商澄清列表', + 'menu.clarificationOfTheBid': '标中质询澄清列表', + 'menu.challengeListInTheIndex': '标中质询列表', + 'menu.clarifyTheList': '澄清列表', + 'menu.invitationLetter': '邀请函', + 'menu.mentionDoubtReply': '项目经理提疑回复列表', + 'menu.reviewResults.manager': '评审结果-项目经理', + 'menu.reviewResults.groupLeader': '评审结果-组长', + 'menu.reviewResults.jury': '评审结果-评委', 'menu.Tender': '发标', 'menu.Tender.UploadResponse': '上传应答文件', @@ -161,15 +161,15 @@ export default { 'menu.Auction.AuctionLookingForInnerShot': '寻找内拍项目', 'menu.Auction.AuctionMyLookingForInnerShot': '我参与的内拍项目', 'menu.Auction.AuctionManagerProject': '我发起的内拍项目', - "menu.Auction.AuctionAnnouncementData":'公告信息', - "menu.Auction.AuctionInfoupdateManage":'公告信息2', + "menu.Auction.AuctionAnnouncementData": '公告信息', + "menu.Auction.AuctionInfoupdateManage": '公告信息2', //项目委托 'menu.entrust': '项目委托管理', 'menu.entrust.manager': '委托管理(管理员)', 'menu.entrust.operator': '委托管理(操作员)', - 'menu.entrust.mandatoryAdministration':'项目经理的委托管理', + 'menu.entrust.mandatoryAdministration': '项目经理的委托管理', //招标项目 'menu.bidManage': '招标项目管理', 'menu.bidManage.projectManage': '项目管理', @@ -182,13 +182,13 @@ export default { 'menu.Calibration.ViewNotice': '查看通知书', 'menu.BiddingDocumentsDecrypt': '投标文件查看',/*BiddingDocumentsDecrypt_pg*/ 'menu.BiddingDocumentsDecrypt.BiddingDocumentsDecrypt_pg': '投标文件查看页面', - 'menu.BidAssessmentResults':'评审结果', - 'menu.BidAssessmentResults.BidAssessmentResults_pg':'评审结果页面', - 'menu.BidPublicityResult':'结果公示', - 'menu.BidPublicityResult.BidPublicityResult_pg':'结果公示页面', - 'menu.NtkoPage':'weboffice', - 'menu.NtkoPage.NtkoPage_pg':'ntko', - 'menu.finance.RevenueRecognition':'收入确认审核(项目经理)', + 'menu.BidAssessmentResults': '评审结果', + 'menu.BidAssessmentResults.BidAssessmentResults_pg': '评审结果页面', + 'menu.BidPublicityResult': '结果公示', + 'menu.BidPublicityResult.BidPublicityResult_pg': '结果公示页面', + 'menu.NtkoPage': 'weboffice', + 'menu.NtkoPage.NtkoPage_pg': 'ntko', + 'menu.finance.RevenueRecognition': '收入确认审核(项目经理)', //发票管理 'menu.Invoice': '发票管理', 'menu.Invoice.InvoiceManager': '发票列表', diff --git a/src/pages/401.tsx b/src/pages/401.tsx index 88abc40..dd7dbb4 100644 --- a/src/pages/401.tsx +++ b/src/pages/401.tsx @@ -1,19 +1,54 @@ -import { getURLInformation } from '@/utils/CommonUtils'; -import { Result } from 'antd'; -import React from 'react'; +import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils'; +import { getSessionRoleData } from '@/utils/session'; +import { Result, Typography } from 'antd'; +import React, { useEffect, useState } from 'react'; +import { history } from 'umi'; const message = { 401: '您的用户信息有误,请联系管理员', + 402: '您的用户角色信息缺失,请联系管理员', 90401: '您的登录已超时,请重新登录', 404: '系统错误,请联系管理员', }; const RequestTimeoutPage: React.FC<{}> = () => { const code: any = getURLInformation('code') == null ? '404' : getURLInformation('code'); - + const { Text } = Typography; + const [time, setTime] = useState(10); + const roleData = getSessionRoleData(); + + useEffect(() => { + let timeInteval: any + if (code == 402 && isNotEmpty(roleData)) { + timeInteval = setInterval(() => { // 倒计时 + setTime(n => { + if (n == 1) { + clearInterval(timeInteval) + redirect(); + } + return n - 1; + }) + }, 1000); + } else { + clearInterval(timeInteval); + } + return () => { + clearInterval(timeInteval); + } + }, []); + + const redirect = () => { + if (isNotEmpty(roleData)) { + history.replace({ + pathname: '/Dashboard', + }) + } + } + return ( {time}秒后进入默认角色} /> ); }; diff --git a/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx b/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx index 4a8a364..e99b579 100644 --- a/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx +++ b/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx @@ -131,23 +131,26 @@ const AuctionLookingForInnerShot: React.FC<{}> = () => { //参与竞拍 const handleOk = () => { - const fromData = { - "auctionId": auctionId, - "biddersLxdh": form.getFieldValue("biddersLxdh"), - "biddersFj": form.getFieldValue("biddersFj"), - "biddersBs": 0 - } - insertBidders(fromData).then(res => { - if (res != null && res.message == "success") { - message.success("参与竞拍成功!"); - checkRelationRef.current?.reload(); - setIsModalVisible(false); - } else { - message.error("参与竞拍失败!"); - checkRelationRef.current?.reload(); - setIsModalVisible(false); + form.validateFields().then(values => { + const fromData = { + "auctionId": auctionId, + "biddersCpr": form.getFieldValue("biddersCpr"), + "biddersLxdh": form.getFieldValue("biddersLxdh"), + "biddersFj": form.getFieldValue("biddersFj"), + "biddersBs": 0 } - }); + insertBidders(fromData).then(res => { + if (res != null && res.message == "success") { + message.success("参与竞拍成功!"); + checkRelationRef.current?.reload(); + setIsModalVisible(false); + } else { + message.error("参与竞拍失败!"); + checkRelationRef.current?.reload(); + setIsModalVisible(false); + } + }); + }) }; const handleCancel = () => { @@ -222,7 +225,8 @@ const AuctionLookingForInnerShot: React.FC<{}> = () => { diff --git a/src/pages/Auction/AuctionParticipateDetail/components/AuctionViewAuctions.tsx b/src/pages/Auction/AuctionParticipateDetail/components/AuctionViewAuctions.tsx new file mode 100644 index 0000000..b46855b --- /dev/null +++ b/src/pages/Auction/AuctionParticipateDetail/components/AuctionViewAuctions.tsx @@ -0,0 +1,669 @@ +/* + * @Author: liqiang + * @Date: 2021-02-23 13:49:53 + * @LastEditTime: 2021-03-25 16:46:14 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: \ebtp-cloud-frontend\src\pages\Auction\AuctionViewAuctions\components\A.tsx + */ +import { getURLInformation, isEmpty } from '@/utils/CommonUtils'; +import { Button, Col, Divider, Form, Input, message, Modal, Row, Spin, Tabs } from 'antd'; +import React, { useEffect, useRef, useState } from 'react'; +import ProTable from '@ant-design/pro-table'; +import ExtendUpload from '@/utils/ExtendUpload'; +import '../../AuctionViewAuctions/auctionParts.less'; +import { getProId, getSessionUserData } from '@/utils/session'; +import { pictureDisplayPath } from '@/utils/DownloadUtils'; +import { algebraicAddition, digitalConversionAmount } from '@/utils/NumberUtils'; +import { getFilelist } from '@/services/download_'; +import { getAuctionViewAuctions, getRedisBidData, putOrderBidPrice, updatetOnlookers } from '../../AuctionViewAuctions/service'; +import AuctionImage from '../../AuctionViewAuctions/components/AuctionImage'; +import CountDownUtils from '../../AuctionViewAuctions/components/CountDownUtils'; +import { insertBidders } from '../../AuctionLookingForInnerShot/service'; +const { TabPane } = Tabs; + +const layout = { + labelCol: { span: 7 }, + wrapperCol: { span: 13 }, +}; + +//定时器间隔时间 +const timingInterval = 5000; +//金额校验正则 保留两位小数 +const amountMoney = /^\d{1,15}([.]\d{1,2})?$/; +const AuctionViewAuctions: React.FC = () => { + //项目id + const tpId = isEmpty(getProId()) ? getURLInformation('id') : getProId(); + //状态 0围观 1 参拍 + const [viewStatus, setViewStatus] = useState(''); + //出价数据 + const [cjDataSource, setCjDataSource] = useState([]); + //起拍价 + const [startingPrice, setStartingPrice] = useState(); + //公告数据 + const [noticeData, setNoticeData] = useState(); + //物资数据 + const [auctionMaterialsList, setAuctionMaterialsList] = useState([]); + //标的物所在地:右侧信息 + const [locationOfTheSubjectMatter, setLocationOfTheSubjectMatter] = useState(); + const [subjectMatterIntroductionForm] = Form.useForm(); + //标的物清单附件bid + const [subjectMatterIntroductionBid, setSubjectMatterIntroductionBid] = useState(''); + //项目名称 + const [projectName, setProjectName] = useState(''); + //参拍信息 + const [participateData, setParticipateData] = useState(); + //当前价 + const [currentPrice, setCurrentPrice] = useState(0); + //延时次数 + const [delay, setDelay] = useState(); + //是否结束 + const [overFlag, setOverFlag] = useState(false); + //是否开始 + const [startFlag, setStartFlag] = useState(false); + //竞拍数据 + const [auctionData, setAuctionData] = useState(); + //倒计时剩余时间 + const [countDownTime, setCountDownTime] = useState(null); + //结束时间 + const [endTime, setEndTime] = useState(''); + //开始时间 + const [startTime, setStartTime] = useState(''); + const ref = useRef(); + + const overFlagRef = useRef(); + //图片 + const [auctionImage, setAuctionImage] = useState([]); + //显示图片 + const [auctionImageFlag, setAuctionImageFlag] = useState(false); + //控制模态框是否显示 + const [isModalVisible, setIsModalVisible] = useState(false); + //loading + const [loading, setLoading] = useState(false); + //form + const [form] = Form.useForm(); + //当前用户信息 + const userData = getSessionUserData(); + + const cjColumns = [ + { + title: '序号', + valueType: 'index' + }, + { + title: '参拍人', + dataIndex: 'supplierId', + }, + { + title: '出价(元)', + dataIndex: 'price', + }, + { + title: '出价时间', + dataIndex: 'bidTime', + }, + ]; + + const wzColumns = [ + { + title: '所属OU组织', + dataIndex: 'organization', + }, + { + title: '物资名称', + dataIndex: 'materialName', + }, + { + title: '物料编码', + dataIndex: 'materialCode', + }, + { + title: '物资厂家', + dataIndex: 'manufacturer', + }, + { + title: '规格型号', + dataIndex: 'specification', + key: 'specification', + }, + { + title: '库龄', + dataIndex: 'reservoirAge', + }, + { + title: '数量', + dataIndex: 'amount', + }, + { + title: '计量单位', + dataIndex: 'materialUnit', + }, + { + title: '单价', + dataIndex: 'unitPrice', + }, + { + title: '统一目录名称', + dataIndex: 'directoryName', + }, + { + title: '统一目录编码', + dataIndex: 'directoryCode', + }, + ]; + + useEffect(() => { + + init(); + + setTimeout(() => { + //项目已结束 + if (overFlagRef.current) { + return; + } + ref.current = setInterval(() => { + getRedisBidData(tpId).then(res => { + res = res !== null ? res : {}; + if (res.code === 200) { + let data = res.data; + timedRefreshData(data); + if (Number(data.jssj) <= 0) { + setOverFlag(true); + clearInterval(ref.current); + } + } else { + // clearInterval(ref.current); + } + }) + + }, timingInterval); + + }, timingInterval); + + }, []); + + + const reloadData = () => { + getRedisBidData(tpId).then(res => { + if (res.code === 200) { + let data = res.data; + timedRefreshData(data); + if (Number(data.jssj) <= 0) { + setOverFlag(true); + } + } + }) + } + + const timedRefreshData = (data: any) => { + let participateData = [data.cpr, data.cjcs, data.wgr]; + getParticipateData(participateData); + setCjDataSource(data.cjjl); + setCurrentPrice(data.zgjg); + setDelay(data.yscs); + setCountDownTime(data.jssj); + setStartFlag(data.bidOpeningStatus != "0"); + } + /** + * 倒计时结束 + */ + const countDownOver = () => { + setOverFlag(true); + } + + const getParticipateData = (arr: any[]) => { + setParticipateData( + <> + {arr[0]}人参拍 + {arr[1]}次出价 + {arr[2]}人围观 + + ) + } + + /** + * 初始化 + */ + const [range, rangeSet] = useState(0)//加价幅度 + const init = () => { + getAuctionViewAuctions(tpId).then(res => { + if (res.code === 200) { + let data = res.data; + //判断项目是否结束 + if (data.yczt) { + setOverFlag(data.yczt); + overFlagRef.current = data.yczt; + } + //项目是否开始 + setStartFlag(data.bidOpeningStatus != "0"); + findFile(data.gg.auctionBdwxcdfzp) + setProjectName(data.xm.auction.projectName); + setCurrentPrice(data.inner02_04); + let participateData = [data.inner02_03.cprsl, data.inner02_03.xmcjcs, data.inner02_03.wgrsl]; + getParticipateData(participateData); + setDelay(data.inner02_02.yscs); + setCjDataSource(data.tab03_01); + //状态 0围观 1 参拍 + setViewStatus(data.cprdm !== null ? '1' : '0'); + setStartingPrice( + <> + 起拍价:¥{digitalConversionAmount(String(data.gg.auctionJpjg), 2)} + 加价幅度:¥{digitalConversionAmount(String(data.gg.auctionJjfd), 2)} + 延时周期:{data.gg.auctionYszq}分钟/次 + + ); + rangeSet(Number(data.gg.auctionJjfd));//幅度 + // offerAPriceSet(Number(data.inner02_04));//出价 + //公告数据 + setNoticeData( +
+ +
+
+
+ 竞拍公告附件: + + +
+ ) + setAuctionMaterialsList(data.xm.auctionMaterialsList); + subjectMatterIntroductionForm.setFieldsValue(data.gg); + setSubjectMatterIntroductionBid(data.gg.auctionBdwqdfj); + setLocationOfTheSubjectMatter( + <> +
  • 标的物所在地:{data.gg.auctionBdwwz}
  • +
  • 挂拍方:{data.gg.auctionGpf}
  • +
  • 联系人:{data.gg.auctionLxr}
  • +
  • 联系电话:{data.gg.auctionLxdh}
  • + + ) + setEndTime(data.gg.auctionJpjssj); + setStartTime(data.gg.auctionJpkssj); + setCountDownTime(data.jpjssjTime); + setAuctionData(data); + //围观+1 + if (data.cprdm == null && data.bidOpeningStatus != "0") {//开始后未报名的才算围观 + updatetOnlookers(tpId).then(res => { + + }); + } + } + }) + } + + const findFile = (id: string) => { + getFilelist([id]).then(res => { + let arr = [] + if (res?.success && res?.data.length > 0) { + for (const item of res?.data) { + arr.push(pictureDisplayPath + '?filePath=' + item.filePath); + } + } + setAuctionImage(arr); + setAuctionImageFlag(true); + }) + } + + /** + * 出价 + */ + const [offerAPrice, offerAPriceSet] = useState(''); + const onSearch = () => { + let value: any = Number(offerAPrice); + if (isEmpty(value)) { + message.info('请出价!'); + return; + } + + if (!amountMoney.test(value)) { + message.info('请输入正确的格式(小数点前15位,小数点后2位)!'); + return; + } + if (Number(value) <= Number(currentPrice)) { + message.info('请输入高于当前价的金额!'); + return; + } + // let differ = (Number(value) - Number(currentPrice)) % range + // let differ = (value * 1000 - currentPrice * 1000) % (range * 1000) + // if (differ !== 0) { + // message.info('请增加加价幅度整数倍的金额!'); + // return; + // } + //出价 + confirmBidOrNot(tpId, value); + } + + + /** + * 确认出价 + * @param tpId + * @param value + */ + const confirmBidOrNot = (tpId: any, value: any) => { + const orderBidPrice = (tpId: any, value: any) => { + //出价 + putOrderBidPrice(tpId, value).then(res => { + if (res.code === 200) { + let data = res.data; + if (data) { + message.success('出价成功!'); + } + reloadData(); + } + }) + } + Modal.confirm({ + content: "请确认出价", + okText: '确认', + cancelText: '取消', + keyboard: false, + centered: true, + onCancel: () => { }, + onOk: () => orderBidPrice(tpId, value) + }); + } + /** + * 我要参拍 + */ + const toParticipate = () => { + if (isParticipant()) {//有权限 + setIsModalVisible(true); + form.setFieldsValue({ + "organizationName": userData.organizationName, + "biddersCpr": userData.fullName, + }); + } else { + message.info("您好,您不具有参拍人权限,无法参与竞拍出价,您可联系省分接口人配置参拍权限。"); + } + } + //参与竞拍 + const handleOk = () => { + form.validateFields().then(values => { + const fromData = { + "auctionId": tpId, + "biddersCpr": form.getFieldValue("biddersCpr"), + "biddersLxdh": form.getFieldValue("biddersLxdh"), + "biddersFj": form.getFieldValue("biddersFj"), + "biddersBs": 0 + } + setLoading(true); + insertBidders(fromData).then(res => { + if (res != null && res.message == "success") { + message.success("参与竞拍成功!"); + init(); + setIsModalVisible(false); + } + }).finally(() => { + setLoading(false); + }); + }) + }; + + const handleCancel = () => { + setIsModalVisible(false); + }; + //判断当前登录人是否有参拍人角色 + const isParticipant = () => { + if (userData.authorityList?.length > 0) { + for (const ite of userData.authorityList) { + if (ite.roleCode == "ebtp-auction-participant") {//参拍人角色 + return true; + } + } + return false; + } + return false; + } + + return ( + +
    + { + auctionImageFlag && + } +
    + {/* */} +
    +

    {projectName}

    + {/* */} +
    + + { + overFlag ? ( + <> + 竞拍结束 + +  结束时间:{endTime}(延时{delay}次) + + + ) : startFlag ? ( + <> + 正在进行 + +  距离结束仅剩: + countDownOver()} />(延时{delay}次) + + + + ) : ( + <> + 未开始 + +  开始时间:{startTime} + + + ) + } +

    + {participateData} +

    +
    +
    + {overFlag ? '最终价:' : '当前价:'}¥{digitalConversionAmount(String(currentPrice), 2)} +
    + { + !overFlag && ( + viewStatus === '1' ? ( + startFlag ? (
    + <> + 请出价: + offerAPriceSet(e.target.value)} + /> + + + + +
    ) : ( +
    + 您已报名参拍,竞拍未开始! +
    + ) + ) : ( +
    + +
    + ) + ) + } +
    + {startingPrice} + { + viewStatus === '1' && isParticipant() && startFlag && 竞拍代码:{auctionData?.cprdm} + } +
    +
    +
    +
      + {locationOfTheSubjectMatter} +
    +
    +
    + + + + + + + 竞拍公告 + {noticeData} + + + 标的物介绍 +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/* + + */} + + +
    + + 出价记录 + + +
    + +
    + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + + +
    + ) +} +export default AuctionViewAuctions; \ No newline at end of file diff --git a/src/pages/Auction/AuctionParticipateDetail/index.tsx b/src/pages/Auction/AuctionParticipateDetail/index.tsx new file mode 100644 index 0000000..33df42c --- /dev/null +++ b/src/pages/Auction/AuctionParticipateDetail/index.tsx @@ -0,0 +1,12 @@ +import React from 'react'; +import AuctionViewAuctions from './components/AuctionViewAuctions'; + +const Index: React.FC = () => { + return ( + <> + + + ) +} + +export default Index; \ No newline at end of file diff --git a/src/pages/Auction/AuctionParticipateList/index.less b/src/pages/Auction/AuctionParticipateList/index.less new file mode 100644 index 0000000..34e0760 --- /dev/null +++ b/src/pages/Auction/AuctionParticipateList/index.less @@ -0,0 +1,109 @@ +.header { + display: flex; + height: 56px; + color: white; + font-size: 20px; + background-color: #b30000; + + .headerAlign { + align-self: center; + margin-left: 20px; + font-weight: 400; + } + + .rightBtns { + position: absolute; + right: 0; + + li { + float: left; + padding: 0 14px; + color: #fff; + font-weight: 400 !important; + font-size: 14px; + line-height: 56px; + list-style: none; + + span { + padding-right: 6px; + font-size: 16px; + } + + a { + color: #fff; + } + } + } +} + +.auction-start-time { + margin-top: 4px; + padding: 2px 0px; + color: #b30000; + background: #f2f2f2; + font-size: 90%; + font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; + text-align: center; + border-radius: 3px; +} + +.auction-final-time { + margin-top: 4px; + padding: 2px 0px; + color: #b30000; + font-size: 90%; + font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; + text-align: center; + border: 1px solid #b30000; + border-radius: 3px; +} + +.site-input-group-wrapper .site-input-split { + background-color: #fff; +} + +.site-input-group-wrapper .site-input-right { + border-left-width: 0; +} + +.site-input-group-wrapper .site-input-right { + border-left-width: 0; +} + +.site-input-group-wrapper .site-input-right:hover, +.site-input-group-wrapper .site-input-right:focus { + border-left-width: 1px; +} + +.site-input-group-wrapper .ant-input-rtl.site-input-right { + border-right-width: 0; +} + +.site-input-group-wrapper .ant-input-rtl.site-input-right:hover, +.site-input-group-wrapper .ant-input-rtl.site-input-right:focus { + border-right-width: 1px; +} + +.auction-wks-tag { + position: absolute; + top: 4px; + left: 4px; + margin: 0px; + font-size: 90%; + padding: 3px 12px; + background: #aaaaaa; + color: #fff; + border: none; +} + +.auction-jpz-tag { + position: absolute; + top: 4px; + left: 4px; + margin: 0px; + font-size: 90%; + padding: 3px 12px; + background: #b30000; + color: #fff; + border: none; +} \ No newline at end of file diff --git a/src/pages/Auction/AuctionParticipateList/index.tsx b/src/pages/Auction/AuctionParticipateList/index.tsx new file mode 100644 index 0000000..1be36da --- /dev/null +++ b/src/pages/Auction/AuctionParticipateList/index.tsx @@ -0,0 +1,346 @@ +import React, { useEffect, useRef, useState } from 'react'; +import { Avatar, Button, Card, DatePicker, Descriptions, Input, List, Radio, Space, Spin, Tag, Typography } from 'antd'; +import './index.less'; +import styles from './index.less'; +import logo from '@/images/opening/logo.svg'; +import { UserSwitchOutlined, CarryOutOutlined, EnvironmentOutlined, SearchOutlined } from '@ant-design/icons'; +import moment from 'moment'; +import { getSessionUserData } from '@/utils/session'; +import { getProvince } from '../AuctionAnnouncementData/service'; +import { getList, getSfbm } from './service'; +import { saveDateTimeFormatter } from '@/utils/DateUtils'; +import { isNotEmpty } from '@/utils/CommonUtils'; +import { pictureDisplayPath } from '@/utils/DownloadUtils'; +import { getFilelist } from '@/services/download_'; +import participateLogo from '@/images/auction/participateLogo.jpg' + +export default () => { + //获取用户数据 + let userData = getSessionUserData(); + //省数据 + const [sfbms, setSfbms] = useState([]); + //商品列表数据 + const [productList, setProductList] = useState([]); + //loading + const [loading, setLoading] = useState(false); + //所属省份 + const sfbm = useRef('all'); + //拍卖状态 + const zt = useRef('all'); + //当前/起拍价-最低价 + const zdjg = useRef(''); + //当前/起拍价-最高价 + const zgjg = useRef(''); + //拍卖时间-开始日期 + const kssj = useRef(''); + //拍卖时间-结束日期 + const jssj = useRef(''); + //项目名称 + const name = useRef(''); + //省字典 + const provinces = useRef([]); + //最低价ref + const zdjgRef = useRef(); + //最高价ref + const zgjgRef = useRef(); + //页码 + const pageNo = useRef(1); + const { Text } = Typography; + //查询 + const getParticipateList = async () => { + const params = { + pageNo: pageNo.current, + pageSize: 12, + } + sfbm.current != 'all' ? params['sfbm'] = [sfbm.current] : null; + zt.current != 'all' ? params['zt'] = zt.current : null; + isNotEmpty(zdjg.current) ? params['zdjg'] = zdjg.current : null; + isNotEmpty(zgjg.current) ? params['zgjg'] = zgjg.current : null; + isNotEmpty(kssj.current) ? params['kssj'] = kssj.current : null; + isNotEmpty(jssj.current) ? params['jssj'] = jssj.current : null; + isNotEmpty(name.current) ? params['projectName'] = name.current : null; + setLoading(true); + await getList(params).then(async res => { + if (res?.code == 200) { + for (const ite of res?.data.records) { + await getFilelist([ite.dfzp]).then(response => {//获取主图 + if (response?.success && response?.data?.length > 0) { + const returnUrl = window.location.origin + pictureDisplayPath + '?filePath=' + response?.data[0].filePath; + ite["dfzpUrl"] = returnUrl; + } + }) + } + setProductList(res?.data.records); + } + }).finally(() => { + setLoading(false); + }) + } + //获取省份字典及数据 + const getProvinces = async () => { + await getProvince().then(res => { + if (res?.code == 200) { + provinces.current = res?.data; + } + }) + //获取省份数据 + await getSfbm().then(res => { + if (res?.code == 200) { + setSfbms(res?.data); + } + }) + } + //省份名称转换 + const getProvinceName = (id: string) => { + if (provinces.current.length > 0) { + for (const item of provinces.current) { + if (item.id == id) { + return item.name; + } + } + } + return null; + } + const sfbmChange = (e: any) => { + sfbm.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + const bidOpeningStatusChange = (e: any) => { + zt.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + const zdjgBlur = (e: any) => { + e.persist(); + if (zdjg.current !== e.target.value) { + zdjg.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + } + const zgjgBlur = (e: any) => { + e.persist(); + if (zgjg.current !== e.target.value) { + zgjg.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + } + const sjChange = (times: any) => { + if (times?.length > 0) { + kssj.current = saveDateTimeFormatter(times[0].startOf('day')); + jssj.current = saveDateTimeFormatter(times[1].endOf('day')); + pageNo.current = 1; + getParticipateList(); + } else { + kssj.current = ''; + jssj.current = ''; + pageNo.current = 1; + getParticipateList(); + } + } + const pageChange = (page: number) => { + pageNo.current = page; + getParticipateList(); + } + const nameChange = (e: any) => { + e.persist(); + name.current = e.target.value; + if (e.currentTarget?.value == "") { + pageNo.current = 1; + getParticipateList(); + } + } + //点击商品进入详情 + const cardClick = (id: string) => { + let projectData = { + id: id + }; + sessionStorage.setItem('projectData', JSON.stringify(projectData)); + window.open("/AuctionParticipateDetail"); + } + //项目名称模糊查询 + const onSearch = () => { + if (isNotEmpty(name.current)) { + pageNo.current = 1; + getParticipateList(); + } + }; + + useEffect(() => { + getProvinces(); + getParticipateList(); + }, []); + + return ( +
    +
    +
    + 中国联通智慧供应链平台 | 招标采购中心 +
    +
      +
    • {moment().format("YYYY-MM-DD")}
    • + {userData?.organizationName == null ? null : (
    • {userData.organizationName}
    • )} +
    • + + + {userData.fullName} + +
    • +
    +
    +
    + +
    +
    +
    + + 物资处置 · 内拍 +
    +
    + {/* } + /> */} +
    + } allowClear bordered={false} onChange={nameChange} onPressEnter={() => onSearch()} /> + +
    +
    +
    + + + + + 不限 + {sfbms.map(item => {getProvinceName(item)})} + + + + + + + 不限 + 未开始 + 竞拍中 + + + + +
    + + zdjgBlur(event)} + onPressEnter={() => zdjgRef.current.blur()} + /> + + zgjgBlur(event)} + onPressEnter={() => zgjgRef.current.blur()} + /> + +
    +
    + + + +
    + pageChange(page), + pageSize: 12, + }} + renderItem={item => ( + + + } + onClick={() => cardClick(item.id)} + > +
    + {item.bidOpeningStatus == "0" ? `竞拍开始时间:${item.jpkssj}` : `竞拍结束时间:${item.jpjssj}`} +
    +
    +
    + {item.projectName} +
    +
    +
    + + {getProvinceName(item.sfbm)} + +
    +
    + {item.bidOpeningStatus == "0" ? `起拍价:${item.qpjg}元` : `当前价:${item.dqjg}元`} + {item.offerNumber}次出价 +
    +
    +
    + {item.bidOpeningStatus == "0" ? '未开始' : '竞拍中'} +
    +
    + )} + /> +
    +
    +
    +
    + ) +}; diff --git a/src/pages/Auction/AuctionParticipateList/service.ts b/src/pages/Auction/AuctionParticipateList/service.ts new file mode 100644 index 0000000..0076f23 --- /dev/null +++ b/src/pages/Auction/AuctionParticipateList/service.ts @@ -0,0 +1,20 @@ +import request from '@/utils/request'; + +/** + * 获取省份数据 + * @returns + */ +export async function getSfbm() { + return request('/api/biz-service-ebtp-auction/v1/innerShot/getProvince'); +} +/** + * 查询商品列表 + * @param data + * @returns + */ +export async function getList(data: any) { + return request('/api/biz-service-ebtp-auction/v1/innerShot/libraryTube/getPageList', { + method: 'POST', + data: data, + }); +} \ No newline at end of file diff --git a/src/pages/Auction/AuctionViewAuctions/auctionParts.less b/src/pages/Auction/AuctionViewAuctions/auctionParts.less index 88b39e4..5882608 100644 --- a/src/pages/Auction/AuctionViewAuctions/auctionParts.less +++ b/src/pages/Auction/AuctionViewAuctions/auctionParts.less @@ -43,11 +43,13 @@ ul.small-img-ul li.img.active{ border-color:#b30000; } .priceBlock{ height: 56px; line-height: 56px;} .priceBlock span{ font-size: 24px; font-weight: bold;} .saleBlock{ height: 56px;} -.saleBlock span{ font-size: 24px; font-weight: bold; color: #b30000;} -.saleBlock input[type="text"]{ padding: 2px; width: 200px; height: 28px; border: 1px solid #ddd; border-radius: 2px;} -.saleBlock button{ width: 64px; height: 32px; line-height: 32px; text-align: center; background: #b30000; color: #fff; border-radius: 3px; cursor: pointer;} +.saleBlock span{ font-size: 24px; font-weight: bold; color: #b30000; position: relative; top: 2px;} +.saleBlock input[type="text"]{ padding: 2px; width: 200px; height: auto; border: 1px solid #ddd; border-radius: 2px;} +.saleBlock button{ width: 64px; height: auto; line-height: 32px; text-align: center; background: #b30000; color: #fff; border-radius: 3px; cursor: pointer;margin: 0px;padding: 0px;border: none;} .otherInform{} .otherInform span{ display:inline-block; float: left; width: 49%; line-height: 2;} .contentParts .rightInform{ position: absolute; top: 10px; right: 15px; width: 280px;} .contentParts .rightInform ul{} .contentParts .rightInform ul li{ margin: 2px 0 8px; line-height: 1.8; color: #999;} +.auction-not-started{ height: 48px;} +.auction-not-started span{ font-size: 20px; font-weight: bold; color: #b30000;} diff --git a/src/pages/Auction/AuctionViewAuctions/components/AuctionViewAuctions.tsx b/src/pages/Auction/AuctionViewAuctions/components/AuctionViewAuctions.tsx index 0cdb182..68ff3e2 100644 --- a/src/pages/Auction/AuctionViewAuctions/components/AuctionViewAuctions.tsx +++ b/src/pages/Auction/AuctionViewAuctions/components/AuctionViewAuctions.tsx @@ -303,11 +303,11 @@ const AuctionViewAuctions: React.FC = () => { return; } // let differ = (Number(value) - Number(currentPrice)) % range - let differ = (value * 1000 - currentPrice * 1000) % (range * 1000) - if (differ !== 0) { - message.info('请增加加价幅度整数倍的金额!'); - return; - } + // let differ = (value * 1000 - currentPrice * 1000) % (range * 1000) + // if (differ !== 0) { + // message.info('请增加加价幅度整数倍的金额!'); + // return; + // } //出价 confirmBidOrNot(tpId, value); } diff --git a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx index a998615..1e176ff 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx @@ -760,7 +760,7 @@ const BiddingAnnouncement: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} {/* 发布媒体 */} diff --git a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx index a9c4eb6..b57bddc 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx @@ -713,7 +713,7 @@ const BiddingAnnouncement: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} }> diff --git a/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx b/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx index 2d80e39..785150a 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx @@ -813,7 +813,7 @@ const BiddingInvitation: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} diff --git a/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx b/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx index 653564d..2b665b3 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx @@ -113,7 +113,7 @@ const Media: React.FC = (props) => { - {defId != "recruit_multi" && 如选择发布到【中国招标投标公共服务平台】,在发布前需填写【公共服务平台】信息} + {/* {defId != "recruit_multi" && 如选择发布到【中国招标投标公共服务平台】,在发布前需填写【公共服务平台】信息} */} ) } diff --git a/src/pages/Bid/ReviewConfig/Config/components/detailedMain.tsx b/src/pages/Bid/ReviewConfig/Config/components/detailedMain.tsx index 373ef14..76fac40 100644 --- a/src/pages/Bid/ReviewConfig/Config/components/detailedMain.tsx +++ b/src/pages/Bid/ReviewConfig/Config/components/detailedMain.tsx @@ -221,7 +221,7 @@ const DetailedMain: React.FC = (props) => { render: (_, record) => { if (record.scoreMethod == 2) { return ( - { record.lowScore = event.target.value; }} placeholder='最低分' diff --git a/src/pages/Calibration/BidAssessmentResults/index.tsx b/src/pages/Calibration/BidAssessmentResults/index.tsx index f9d3d22..fd73d42 100644 --- a/src/pages/Calibration/BidAssessmentResults/index.tsx +++ b/src/pages/Calibration/BidAssessmentResults/index.tsx @@ -376,6 +376,7 @@ const BidAssessmentResults: React.FC<{}> = (props) => { {returnInput('id', '供应商id', record.id, false, false, true)} {returnInput('resultId', '结果id', record.resultId, false, false, true)} {returnInput('companyId', '公司id', record.companyId, false, false, true)} + {returnInput('companyName', '公司名称', record.companyName, false, false, true)} ) } else { diff --git a/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx b/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx index 4929ab5..0927e04 100644 --- a/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx +++ b/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx @@ -274,7 +274,7 @@ const BidPublicityResults: React.FC = (props) => { } creatNotice(type, fromData).then(res => { - if(res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改公示增加风控 + if (res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改公示增加风控 const data = res?.data?.result == undefined ? [] : res?.data?.result setRiskData(data) setRiskVisible(true) @@ -452,7 +452,7 @@ const BidPublicityResults: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} {/* 发布媒体 */} @@ -475,7 +475,7 @@ const BidPublicityResults: React.FC = (props) => { {/* */} {/**风控组件 */} - {riskVisible && { setRiskVisible(false) diff --git a/src/pages/Evaluation/BidControl/BidControlManager/components/BidDocSmartCheckFormModal.tsx b/src/pages/Evaluation/BidControl/BidControlManager/components/BidDocSmartCheckFormModal.tsx new file mode 100644 index 0000000..b872537 --- /dev/null +++ b/src/pages/Evaluation/BidControl/BidControlManager/components/BidDocSmartCheckFormModal.tsx @@ -0,0 +1,121 @@ +import React, { useEffect, useState } from 'react'; +import { Collapse, Table } from 'antd'; +import { getBidDocSmartCheckList } from '../service'; +import { getRoomId, getSessionRoleData } from '@/utils/session'; + +interface BidDocSmartCheckFormModalProps { + modalVisible: boolean; + values: any; + onCancel: any; +} + +const BidDocSmartCheckFormModal: React.FC = (props) => { + + const [bidDocSmartCheckList, setBidDocSmartCheckList] = useState([]); + + //查看详情窗口record + const [juryTableShow, setJuryTableShow] = useState(true); + + //是否显示法人及投标人名称对比结果;false-不显示结果,true-显示结果 + const [checkLegalAndNameResult, setCheckLegalAndNameResult] = useState(true); + + var roleId = getSessionRoleData().roleCode; + + + useEffect(() => { + setJuryTableShow(false); + getWarningList(); + if (roleId === "ebtp-expert") { + setJuryTableShow(false); + } + }, []) + + function callback(key: any) { + //getSessionUserData.roleIds; + } + function visibleValue(key: any) { + if (key) { + return ; + } else { + return ×; + } + } + function visibleLegalAndNameValue(key: any) { + //false-不显示结果,true-显示结果 + if (checkLegalAndNameResult) { + if (key) { + return ; + } else { + return ×; + } + } else { + return ; + } + } + + const BidDocSmartCheckColumns = [ + { title: '序号', dataIndex: 'num', width: 60, render: (text: any, record: any, index: any) => `${index + 1}` }, + { title: '供应商名称', dataIndex: 'companyName', }, + { + title: '供应商投标文件密封性检查', dataIndex: 'docTightnessCheck', render: (_: any, record: any) => { + return visibleValue(record.docTightnessCheck); + } + }, + { title: '供应商投标文件的完整性', dataIndex: 'docIntegrityCheck', render: (_: any, record: any) => { + return visibleValue(record.docIntegrityCheck); + }}, + { title: 'Mac、IP地址校验', dataIndex: 'macIPCheck', render: (_: any, record: any) => { + return visibleValue(record.macIPCheck); + }}, + { title: '投标保证金缴纳', dataIndex: 'ensureStatus', render: (_: any, record: any) => { + return visibleValue(record.ensureStatus); + }}, + { title: '不同投标人间法定代表人、法定代表授权委托人对比', dataIndex: 'supplierLegalCheck', render: (_: any, record: any) => { + return visibleLegalAndNameValue(record.supplierLegalCheck); + }}, + { title: '投标人名称与系统操作投标人名称', dataIndex: 'supplierNameCheck', render: (_: any, record: any) => { + return visibleLegalAndNameValue(record.supplierNameCheck); + }}, + ]; + + + const ret = { "code": 200, "success": true, "message": "success", "data": []} + const getWarningList = async () => { + let roomId = getRoomId();//sessionStorage.getItem('roomId');//sessionStorage.getItem('roomId') + + //投标文件智能审查 + await getBidDocSmartCheckList(roomId).then((res) => { + if (res.success == true) { + setCheckLegalAndNameResult(res?.data?.isCheckLegalAndName); + if(res?.data?.isCheckOpen){ + setJuryTableShow(true); + setBidDocSmartCheckList(res.data?.checkResults) + } + } else { + setBidDocSmartCheckList(ret.data); + } + }) + } + + return ( + <> + {juryTableShow ? + + + {注:"√"为审查项智能审查通过,"×"为审查项智能审查存在风险} + { +
    + + } +
    +
    + : null} + + ); +}; + +export default BidDocSmartCheckFormModal; diff --git a/src/pages/Evaluation/BidControl/BidControlManager/index.tsx b/src/pages/Evaluation/BidControl/BidControlManager/index.tsx index 106c43a..6bf906d 100644 --- a/src/pages/Evaluation/BidControl/BidControlManager/index.tsx +++ b/src/pages/Evaluation/BidControl/BidControlManager/index.tsx @@ -8,6 +8,7 @@ import ViewBlacklistFormModal from './components/ViewBlacklistFormModal'; import ViewReviewResultFormModal from './components/ViewReviewResultFormModal'; import ViewJuryScoringRemindFormModal from './components/ViewJuryScoringRemindFormModal'; import ViewJuryScoringAnalysisFormModal from './components/ViewJuryScoringAnalysisFormModal'; +import BidDocSmartCheckFormModal from './components/BidDocSmartCheckFormModal'; function callback(key) { //getSessionUserData.roleIds; @@ -90,6 +91,11 @@ const Sing: React.FC<{}> = () => { const [ViewJuryScoringAnalysisFormVisible, setViewJuryScoringAnalysisFormVisible] = useState(false); //查看详情窗口record const [ViewJuryScoringAnalysisValues, setViewJuryScoringAnalysisValues] = useState({}); + + //投标文件智能审查 + const [BidDocSmartCheckFormVisible, setBidDocSmartCheckFormVisible] = useState(false); + //查看详情窗口record + const [BidDocSmartCheckValues, setBidDocSmartCheckValues] = useState({}); const getWarningList = async() => { @@ -175,6 +181,19 @@ const Sing: React.FC<{}> = () => { ) : null } + { + BidDocSmartCheckFormModal ? ( + { + setBidDocSmartCheckFormVisible(!BidDocSmartCheckFormVisible); + setBidDocSmartCheckValues({}); + }} + > + + ) : null + } ) } diff --git a/src/pages/Evaluation/BidControl/BidControlManager/service.ts b/src/pages/Evaluation/BidControl/BidControlManager/service.ts index 8d30686..46a8578 100644 --- a/src/pages/Evaluation/BidControl/BidControlManager/service.ts +++ b/src/pages/Evaluation/BidControl/BidControlManager/service.ts @@ -63,6 +63,13 @@ export async function getBlackList(projectId: any, assessRoomId: any) { //黑名 }); } + +export async function getBidDocSmartCheckList(assessRoomId: any) { //投标文件智能审查 + return request('/api/biz-service-ebtp-resps/v1/tfilewarning/getBidDocSmartCheck?assessRoomId='+`${assessRoomId}`, { + method: 'get' + }); +} + export async function getDeviatedWarnList(assessRoomId: any) { // 偏离度提醒 return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomId/' + `${assessRoomId}`, { method: 'get' diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx index 7c58585..d39986a 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx @@ -1,9 +1,9 @@ import React, { useEffect, useState } from 'react'; -import { Button, Table, Tabs, Space, Progress, Radio, Input, Checkbox, Select, Modal, Pagination, Spin, Form, message, Upload } from 'antd'; -import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getEval, getFile, calculationPriceScore, saveOffer, getPage, getProjectById } from './service'; +import { Button, Table, Tabs, Space, Progress, Radio, Input, Checkbox, Select, Modal, Pagination, Spin, Form, message, Upload, Tooltip } from 'antd'; +import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getEval, getFile, calculationPriceScore, saveOffer, getPage, getProjectById, getOfferUrl } from './service'; import '@/assets/ld_style.less' import FirstTrialTableDetailed from '../BidDetailedManager/module/FirstTrialTableDetailed'; -import { getSessionUserData, getRoomId, getUserToken, getProMethod, getProId, getSectionQuot } from '@/utils/session'; +import { getSessionUserData, getRoomId, getUserToken, getProMethod, getProId, getSectionQuot, getSessionRoleData } from '@/utils/session'; import FileDown from '@/utils/Download'; import { getURLInformation } from '@/utils/CommonUtils'; import { btnAuthority } from '@/utils/authority'; @@ -68,6 +68,8 @@ const Index: React.FC<{}> = () => { const modalHeight = (innerHeight * 96) / 100; //获取标段的标价类型 1-百分比 0-元 const sectionQuot = getSectionQuot(); + //当前登录人角色 + const roleCode = getSessionRoleData()?.roleCode; let showNameT: any = { tbr: '', pb: '', tb: '' }//投标人供应商 if (proMethod === 'procurement_mode_1' || proMethod === 'procurement_mode_2') {//招标 showNameT = { tbr: '投标人', pb: '评标', tb: '投标' }; @@ -216,7 +218,7 @@ const Index: React.FC<{}> = () => { title: showNameT.tbr + '报价(元)', dataIndex: 'evaluatingContent', sorter: { - compare: (a, b) => a.evaluatingContent - b.evaluatingContent, + compare: (a: any, b: any) => a.evaluatingContent - b.evaluatingContent, multiple: 2, }, }, @@ -439,22 +441,22 @@ const Index: React.FC<{}> = () => { bidEvalDetailDTOList = [] }) } else { - let date = { -          bidEvalId: bidEvalId, -          reviewTurnId: reviewTurnId, -          category: typeCategory, -          assessRoomId: assessRoomId, -          reviewType: '2' -        } -        getProgress({ ...date }).then((res) => { -          if (res.code == 200) { -            if(res.data == 100){ -              submitApi() -            } else { -              message.error("您有未完成的打分项,请完成后再提交!") -            } -          } -        }) + let date = { + bidEvalId: bidEvalId, + reviewTurnId: reviewTurnId, + category: typeCategory, + assessRoomId: assessRoomId, + reviewType: '2' + } + getProgress({ ...date }).then((res) => { + if (res.code == 200) { + if (res.data == 100) { + submitApi() + } else { + message.error("您有未完成的打分项,请完成后再提交!") + } + } + }) } } } @@ -919,13 +921,15 @@ const Index: React.FC<{}> = () => { if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) { return (
    - inputChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId, record.highScore)} - /> + 评分区间:{record.lowScore}分~{record.highScore}分} placement="topLeft"> + inputChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId, record.highScore, record.lowScore)} + /> +
    @@ -934,7 +938,10 @@ const Index: React.FC<{}> = () => { } else { return (
    - inputChange(e, record, item.supplierRegisterId, record.highScore)} style={{ width: 160 }} />
    + 评分区间:{record.lowScore}分~{record.highScore}分} placement="topLeft"> + inputChange(e, record, item.supplierRegisterId, record.highScore, record.lowScore)} style={{ width: 160 }} /> + +
    @@ -1021,8 +1028,15 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const resData = response?.data - window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const data = response?.data + // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const page = `quote-ztbIndex&inqueryNo=${data?.ebpProjectNumber}&offNo=${record?.offerOrderNo}`; + const userId = roleCode == "ebtp-supplier" ? record.bidUserId : REACT_APP_XUNJIA_UID; + getOfferUrl({ userId, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }) } @@ -1237,7 +1251,7 @@ const Index: React.FC<{}> = () => { setDataSource([...totalQualified]) } - const inputChange = (e: any, val: any, id: any, sorce: any) => { // 输入框操作 + const inputChange = (e: any, val: any, id: any, sorce: any, lowScore: any) => { // 输入框操作 let inpVal = e.target.value let inputNum = /^(\-|\+?)\d{0,4}(\.\d{0,5})?$/ if (inputNum.test(inpVal)) { @@ -1245,6 +1259,10 @@ const Index: React.FC<{}> = () => { message.error('输入分值不可大于最高分值!') inpVal = sorce } + if (Number(inpVal) < lowScore) { + message.error('输入分值不可小于最低分值!') + inpVal = lowScore + } } else { message.error('请输入正确的分值!') inpVal = inpVal.substring(0, inpVal.length - 1) diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts b/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts index 843ebe5..62fc3ee 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts @@ -99,7 +99,7 @@ export async function getEval(params: any) { // 获取页面接口数据 } export async function getFile(id: any) { // 查找是否有应答文件 - return request('/api/biz-service-ebtp-rsms/v1/review/config/detail/doc/list?detailId='+id, { + return request('/api/biz-service-ebtp-rsms/v1/review/config/detail/doc/list?detailId=' + id, { method: 'get', }); } @@ -136,8 +136,8 @@ export async function saveOffer(data: any) { // 自动报价保存 * 查询已报名的供应商 * @param params */ - export async function getPage(params?: any) { - return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`,{ +export async function getPage(params?: any) { + return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`, { method: 'GET', }); } @@ -146,6 +146,17 @@ export async function saveOffer(data: any) { // 自动报价保存 * 根据id查询项目信息 * @param id */ - export function getProjectById(id: any) { - return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); - } +export function getProjectById(id: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); +} + +/** +* 加密后的查看报价详情跳转地址 +* @param params +*/ +export function getOfferUrl(params: any) { + return request('/api/biz-service-ebtp-extend/v1/singlePoint/getSsoUrlByPage', { + method: 'GET', + params: params, + }); +} \ No newline at end of file diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx index 5fc10f4..6abb6c1 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; -import { Button, Table, Tabs, Space, Progress, Radio, Input, Checkbox, Select, Modal, Menu, Pagination, Spin, Form, message, Collapse, Upload } from 'antd'; -import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getMemberInfo, getEval, getUnlock, getCheckData, isStatus, getFile, calculationPriceScore, saveOffer, getPage, getProjectById } from './service'; +import { Button, Table, Tabs, Space, Progress, Radio, Input, Checkbox, Select, Modal, Menu, Pagination, Spin, Form, message, Collapse, Upload, Tooltip } from 'antd'; +import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getMemberInfo, getEval, getUnlock, getCheckData, isStatus, getFile, calculationPriceScore, saveOffer, getPage, getProjectById, getOfferUrl } from './service'; import '@/assets/ld_style.less' import FirstTrialTableDetailed from '../BidDetailedManager/module/FirstTrialTableDetailed'; import { getExperts } from '../BidDetailedManager/service'; @@ -8,7 +8,7 @@ import ConsistencyCheck from './components/ConsistencyCheck'; import BidDetailSummary from './components/BidDetailSummary'; import BidDetailSpeed from './components/BidDetailSpeed'; import { handleSubmit } from './utils'; -import { getProId, getProMethod, getRoomId, getSectionQuot, getSessionUserData, getUserToken } from '@/utils/session'; +import { getProId, getProMethod, getRoomId, getSectionQuot, getSessionRoleData, getSessionUserData, getUserToken } from '@/utils/session'; import FileDown from '@/utils/Download'; import { getURLInformation, isEmpty } from '@/utils/CommonUtils'; import { btnAuthority } from '@/utils/authority'; @@ -90,6 +90,8 @@ const Index: React.FC<{}> = () => { const sectionQuot = getSectionQuot(); const [isEndProgress, setIsEndProgress] = useState(false); // 是否可编辑 const [submitLoading, setSubmitLoading] = useState(false); // 提交汇总loading + //当前登录人角色 + const roleCode = getSessionRoleData()?.roleCode; let showNameT: any = { tbr: '', pb: '', tb: '' }//投标人供应商 if (proMethod === 'procurement_mode_1' || proMethod === 'procurement_mode_2') {//招标 showNameT = { tbr: '投标人', pb: '评标', tb: '投标' }; @@ -466,22 +468,22 @@ const Index: React.FC<{}> = () => { bidEvalDetailDTOList = [] }) } else { - let date = { -          bidEvalId: bidEvalId, -          reviewTurnId: reviewTurnId, -          category: typeCategory, -          assessRoomId: assessRoomId, -          reviewType: '2' -        } -        getProgress({ ...date }).then((res) => { -          if (res.code == 200) { -            if(res.data == 100){ -              submitApi() -            } else { -              message.error("您有未完成的打分项,请完成后再提交!") -            } -          } -        }) + let date = { + bidEvalId: bidEvalId, + reviewTurnId: reviewTurnId, + category: typeCategory, + assessRoomId: assessRoomId, + reviewType: '2' + } + getProgress({ ...date }).then((res) => { + if (res.code == 200) { + if (res.data == 100) { + submitApi() + } else { + message.error("您有未完成的打分项,请完成后再提交!") + } + } + }) } } } @@ -952,13 +954,15 @@ const Index: React.FC<{}> = () => { if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) { return (
    - inputChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId, record.highScore)} - // onFocus={e => inputFocus(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)} - /> + 评分区间:{record.lowScore}分~{record.highScore}分} placement="topLeft"> + inputChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId, record.highScore, record.lowScore)} + // onFocus={e => inputFocus(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)} + /> +
    @@ -967,7 +971,10 @@ const Index: React.FC<{}> = () => { } else { return (
    - inputChange(e, record, item.supplierRegisterId, record.highScore)} style={{ width: 160 }} />
    + 评分区间:{record.lowScore}分~{record.highScore}分} placement="topLeft"> + inputChange(e, record, item.supplierRegisterId, record.highScore, record.lowScore)} style={{ width: 160 }} /> + +
    @@ -1052,8 +1059,15 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const resData = response?.data - window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const data = response?.data + // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const page = `quote-ztbIndex&inqueryNo=${data?.ebpProjectNumber}&offNo=${record?.offerOrderNo}`; + const userId = roleCode == "ebtp-supplier" ? record.bidUserId : REACT_APP_XUNJIA_UID; + getOfferUrl({ userId, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }) } @@ -1268,7 +1282,7 @@ const Index: React.FC<{}> = () => { setDataSource([...totalQualified]) } - const inputChange = (e: any, val: any, id: any, sorce: any) => { // 输入框操作 + const inputChange = (e: any, val: any, id: any, sorce: any, lowScore: any) => { // 输入框操作 let inpVal = e.target.value let inputNum = /^(\-|\+?)\d{0,4}(\.\d{0,5})?$/ if (inputNum.test(inpVal)) { @@ -1276,6 +1290,10 @@ const Index: React.FC<{}> = () => { message.error('输入分值不可大于最高分值!') inpVal = sorce } + if (Number(inpVal) < lowScore) { + message.error('输入分值不可小于最低分值!') + inpVal = lowScore + } } else { message.error('请输入正确的分值!') inpVal = inpVal.substring(0, inpVal.length - 1) diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts index a3dcdad..cedf51d 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts @@ -215,8 +215,8 @@ export async function saveOffer(data: any) { // 自动报价保存 * 查询已报名的供应商 * @param params */ - export async function getPage(params?: any) { - return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`,{ +export async function getPage(params?: any) { + return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`, { method: 'GET', }); } @@ -225,6 +225,17 @@ export async function saveOffer(data: any) { // 自动报价保存 * 根据id查询项目信息 * @param id */ - export function getProjectById(id: any) { - return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); - } \ No newline at end of file +export function getProjectById(id: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); +} + +/** +* 加密后的查看报价详情跳转地址 +* @param params +*/ +export function getOfferUrl(params: any) { + return request('/api/biz-service-ebtp-extend/v1/singlePoint/getSsoUrlByPage', { + method: 'GET', + params: params, + }); +} \ No newline at end of file diff --git a/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocuments.tsx b/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocuments.tsx index 24115de..19d4b93 100644 --- a/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocuments.tsx +++ b/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocuments.tsx @@ -123,6 +123,9 @@ const viewOfTenderDocuments: React.FC<{}> = () => { setSpinning(true); getFileNode({ tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid }).then(res => { if (res?.code == 200) { + for (const ite of res.data.tfileContentList) { + ite["nodeName"] = info.node.title; + } setZipListTable(res.data.tfileContentList); } setSpinning(false); @@ -246,7 +249,7 @@ const viewOfTenderDocuments: React.FC<{}> = () => { /* message.error('程序出错,亲您稍后在世');*/ }; const downloadZip = (render: any) => { - let fileName = render.fileName; + let fileName = render.tendererName + '-' + render.nodeName; window.location.href = "/api/core-service-ebtp-updownload/v1/hulk/download?p=" + render.content + "&n=" + fileName; } diff --git a/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocumentsSecond.tsx b/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocumentsSecond.tsx index 84f266c..55cbf71 100644 --- a/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocumentsSecond.tsx +++ b/src/pages/Evaluation/BiddingDocumentsDecrypt/components/viewOfTenderDocumentsSecond.tsx @@ -147,6 +147,9 @@ const viewOfTenderDocumentsSecond: React.FC<{}> = () => { setSpinning(true); getFileNode({ tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid }).then(res => { if (res.code == 200) { + for (const ite of res.data.tfileContentList) { + ite["nodeName"] = info.node.title; + } setZipListTable(res.data.tfileContentList); } setSpinning(false); @@ -270,7 +273,7 @@ const viewOfTenderDocumentsSecond: React.FC<{}> = () => { /* message.error('程序出错,亲您稍后在世');*/ }; const downloadZip = (render: any) => { - let fileName = render.fileName; + let fileName = render.tendererName + '-' + render.nodeName; window.location.href = "/api/core-service-ebtp-updownload/v1/hulk/download?p=" + render.content + "&n=" + fileName; } diff --git a/src/pages/Finance/Cost/components/Complete.tsx b/src/pages/Finance/Cost/components/Complete.tsx index f3aaf3e..cc489ed 100644 --- a/src/pages/Finance/Cost/components/Complete.tsx +++ b/src/pages/Finance/Cost/components/Complete.tsx @@ -18,9 +18,9 @@ const Complete: React.FC<{}> = () => { const columnsComplete: ProColumns[] = [ //已完成表格 - { title: '项目名称', dataIndex: 'projectName', width: 200 }, + { title: '项目名称', dataIndex: 'projectName', width: '35%' }, { - title: '费用类型', width: 100, render: (_, record) => { + title: '费用类型', width: '5%', render: (_, record) => { let val = '-'; if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用 if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') { @@ -40,14 +40,14 @@ const Complete: React.FC<{}> = () => { return val; } }, - { title: '费用内容描述', dataIndex: 'commodityDescribe' }, - { title: '下单时间', dataIndex: 'createDate', width: 100, valueType: 'dateTime' }, - { title: '支付时间', dataIndex: 'paymentTime', width: 100, valueType: 'dateTime' }, - { title: '金额(元)', dataIndex: 'amount', width: 80 }, + { title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%' }, + { title: '下单时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime' }, + { title: '支付时间', dataIndex: 'paymentTime', width: '10%', valueType: 'dateTime' }, + { title: '金额(元)', dataIndex: 'amount', width: '4%' }, { title: '操作', dataIndex: 'option', - width: 150, + width: '3%', valueType: 'option', render: (_, record) => { if (record.bidInvoice == null) { @@ -99,6 +99,8 @@ const Complete: React.FC<{}> = () => { getCheckboxProps: (record) => ({ disabled: record.bidInvoice == null ? false : true }), + columnWidth: '1px', + fixed: true, }} pagination={{ defaultPageSize: 10 }} //默认显示条数 // bordered diff --git a/src/pages/Finance/Cost/index.tsx b/src/pages/Finance/Cost/index.tsx index be63b23..13d549f 100644 --- a/src/pages/Finance/Cost/index.tsx +++ b/src/pages/Finance/Cost/index.tsx @@ -30,11 +30,16 @@ const finance: React.FC<{}> = () => { setActiveKey(key); } const columns: ProColumns[] = [//未支付 - { title: '序号', valueType: 'index', width: 60, hideInTable: true }, - { title: '项目名称', dataIndex: 'projectName', }, - { title: '订单号', dataIndex: 'orderNumber', width: 100, }, + { title: '序号', valueType: 'index', width: 0, hideInTable: true }, + { title: '项目名称', dataIndex: 'projectName', width: '25%', }, { - title: '费用类型', width: 100, render: (_, record) => { + title: '订单号', dataIndex: 'orderNumber', width: '9.3%', + render: (record) => { + return {record} + } + }, + { + title: '费用类型', width: '5%', render: (_, record) => { let val = '-'; if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用 if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') { @@ -54,11 +59,11 @@ const finance: React.FC<{}> = () => { return val; } }, - { title: '费用内容描述', dataIndex: 'commodityDescribe', }, - { title: '下单时间', dataIndex: 'createDate', width: 100, valueType: 'dateTime', }, - { title: '金额(元)', dataIndex: 'amount', width: 100, }, + { title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%', }, + { title: '下单时间', dataIndex: 'createDate', width: '6%', valueType: 'dateTime', }, + { title: '金额(元)', dataIndex: 'amount', width: '4%', }, { - title: '状态', dataIndex: 'state', width: 80, + title: '状态', dataIndex: 'state', width: '3%', valueEnum: { "0": { text: '未支付', }, "1": { text: '支付中', }, @@ -69,7 +74,7 @@ const finance: React.FC<{}> = () => { }, }, { - title: '操作', dataIndex: 'option', width: 150, + title: '操作', dataIndex: 'option', width: '5%', valueType: 'option', render: (_, record) => { return ( diff --git a/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx b/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx index d3b58ef..4141320 100644 --- a/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx +++ b/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx @@ -22,13 +22,13 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '项目名称', dataIndex: 'projectName', key: 'projectName', - width: '15%', + width: '25%', }, { title: '订单编号', dataIndex: 'orderNumber', key: 'orderNumber', - width:140, + width: '9.3%', render: (record) => { return {record} } @@ -37,7 +37,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '费用类别', dataIndex: 'expensesType', key: 'expensesType', - width: '10%', + width: '6.1%', valueType: 'select', valueEnum: { '1': '标书费', @@ -68,35 +68,35 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '缴费单位', dataIndex: 'payerName', key: 'payerName', - width: '12%', + width: '15%', search: false, }, { - title: '订单金额(元)', + title: '订单金额(元)', dataIndex: 'cartAmount', key: 'cartAmount', - width: '10%', + width: '6%', search: false, }, { - title: '实际支付金额(元)', + title: '实际支付金额(元)', dataIndex: 'amount', key: 'amount', - width: '10%', + width: '5%', search: false, }, { title: '付款人', dataIndex: 'payerUserName', key: 'payerUserName', - width: '8%', + width: '3.6%', search: false, }, { title: '付款时间', dataIndex: 'paymentTime', key: 'paymentTime', - width: '10%', + width: '9.5%', valueType: 'dateTime', search: false, }, @@ -104,7 +104,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '支付方式', dataIndex: 'paymentMethod', key: 'paymentMethod', - width: '8%', + width: '5%', valueType: 'select', valueEnum: { '0': '线上支付', @@ -115,7 +115,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '支付状态', dataIndex: 'state', key: 'state', - width: '10%', + width: '5%', valueType: 'select', valueEnum: { '2': '支付成功', @@ -139,7 +139,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { { title: '操作', valueType: 'option', - width: '5%', + width: '3.5%', render: (text, record, _, action) => ( toView(record)} className="operation"> 查看 diff --git a/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx b/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx index 03cc6b3..0071a46 100644 --- a/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx +++ b/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx @@ -26,13 +26,13 @@ const WaitConfirmed: React.FC<{}> = () => { title: '项目名称', dataIndex: 'projectName', key: 'projectName', - width: '20%', + width: '25%', }, { title: '订单编号', dataIndex: 'orderNumber', key: 'orderNumber', - width: 140, + width: '9.3%', render: (record) => { return {record} } @@ -41,7 +41,7 @@ const WaitConfirmed: React.FC<{}> = () => { title: '费用类别', dataIndex: 'expensesType', key: 'expensesType', - width: '10%', + width: '6.1%', valueType: 'select', valueEnum: { '1': '标书费', @@ -72,28 +72,28 @@ const WaitConfirmed: React.FC<{}> = () => { title: '缴费单位', dataIndex: 'payerName', key: 'payerName', - width: '12%', + width: '15%', search: false, }, { - title: '订单金额(元)', + title: '订单金额(元)', dataIndex: 'cartAmount', key: 'cartAmount', - width: '12%', + width: '6.9%', search: false, }, { title: '下单人', dataIndex: 'payerUserName', key: 'payerUserName', - width: '8%', + width: '3.6%', search: false, }, { title: '付款时间', dataIndex: 'paymentTime', key: 'paymentTime', - width: '10%', + width: '9.5%', valueType: 'dateTime', search: false, }, @@ -101,7 +101,7 @@ const WaitConfirmed: React.FC<{}> = () => { title: '支付方式', dataIndex: 'paymentMethod', key: 'paymentMethod', - width: '8%', + width: '5%', valueType: 'select', valueEnum: { '0': '线上支付', @@ -112,7 +112,7 @@ const WaitConfirmed: React.FC<{}> = () => { title: '支付状态', dataIndex: 'state', key: 'state', - width: '10%', + width: '5%', valueType: 'select', valueEnum: { '0': '待支付', @@ -137,7 +137,7 @@ const WaitConfirmed: React.FC<{}> = () => { { title: '操作', valueType: 'option', - width: '15%', + width: '10%', render: (text, record, _, action) => { return ( <> diff --git a/src/pages/Invoice/Manager/index.tsx b/src/pages/Invoice/Manager/index.tsx index c7a77c8..1120448 100644 --- a/src/pages/Invoice/Manager/index.tsx +++ b/src/pages/Invoice/Manager/index.tsx @@ -46,12 +46,12 @@ const Invoice: React.FC = (props) => { title: '项目名称', dataIndex: 'projectName', valueType: 'text', - width: '12%', + width: '25%', }, { title: '费用名称', dataIndex: 'commodityName', - width: '8%', + width: '6.1%', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 render: (_, record) => { @@ -78,14 +78,14 @@ const Invoice: React.FC = (props) => { title: '支付单位', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '10%', + width: '15%', dataIndex: 'payerName', }, { title: '支付方式', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '5%', dataIndex: 'paymentMethod', valueEnum: { "0": { text: '线上', status: '' }, @@ -103,7 +103,7 @@ const Invoice: React.FC = (props) => { title: '付款状态', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '5%', dataIndex: 'payState', valueEnum: { "0": { text: '未支付', status: '' }, @@ -119,14 +119,14 @@ const Invoice: React.FC = (props) => { title: '金额', valueType: 'money', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '4%', dataIndex: 'amount', }, { title: '发票状态', valueType: 'select', dataIndex: 'invoiceState', - width: '8%', + width: '4.8%', valueEnum: { "0": { text: '未开', status: '' }, "1": { text: '已开', status: '' }, @@ -136,7 +136,7 @@ const Invoice: React.FC = (props) => { title: '需要邮寄', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '4.8%', dataIndex: 'mail', valueEnum: { "0": { text: '不需要', status: '' }, @@ -147,7 +147,7 @@ const Invoice: React.FC = (props) => { title: '邮寄状态', valueType: 'text', dataIndex: 'mailState', - width: '8%', + width: '4.8%', valueEnum: { "0": { text: '未邮寄', status: '' }, "1": { text: '已邮寄', status: '' }, @@ -158,7 +158,7 @@ const Invoice: React.FC = (props) => { dataIndex: 'type', hideInSearch: true,//列表中显示,查询条件中不显示 valueType: 'text', - width: '8%', + width: '5%', valueEnum: { "0": { text: '增值税普通发票' }, "1": { text: '增值税专用发票' }, diff --git a/src/pages/Invoice/Supplier/index.tsx b/src/pages/Invoice/Supplier/index.tsx index 0a90ccf..28b4d11 100644 --- a/src/pages/Invoice/Supplier/index.tsx +++ b/src/pages/Invoice/Supplier/index.tsx @@ -37,7 +37,7 @@ const InvoiceSupplier: React.FC<{}> = () => { title: '序号', dataIndex: 'key', key: 'key', - width: 60, + width: 50, search: false, }, { @@ -55,6 +55,7 @@ const InvoiceSupplier: React.FC<{}> = () => { dataIndex: 'type', key: 'type', valueType: 'select', + width: 115, valueEnum: { '0': '增值税普通发票', '1': '增值税专用发票', @@ -65,6 +66,7 @@ const InvoiceSupplier: React.FC<{}> = () => { title: '发票状态', dataIndex: 'state', valueType: 'select', + width: 75, valueEnum: { '0': '未开', '1': '已开', @@ -72,13 +74,14 @@ const InvoiceSupplier: React.FC<{}> = () => { }, { title: '是否需要邮寄', + width: 100, render:(_: any,record: any) => record.isMail == -1 ? '无需邮寄' : '需要邮寄', search: false, }, { title: '操作', dataIndex: 'option', - width: 80, + width: 70, valueType: 'option', search: false, render: (_, record) => diff --git a/src/pages/LoadingPage/BasDicData.ts b/src/pages/LoadingPage/BasDicData.ts deleted file mode 100644 index 3269d8c..0000000 --- a/src/pages/LoadingPage/BasDicData.ts +++ /dev/null @@ -1,6 +0,0 @@ -import request from '@/utils/request'; - -// 获取字典信息 -export async function getDictionaries(){ - return request('/api/biz-service-ebtp-project/v1/dictProject/refreshDictCache'); -} \ No newline at end of file diff --git a/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx b/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx new file mode 100644 index 0000000..08f185f --- /dev/null +++ b/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx @@ -0,0 +1,50 @@ +import React, { useEffect } from 'react'; +import { message, Spin } from 'antd'; +import { getURLInformation, isEmpty } from '@/utils/CommonUtils'; +import { history } from 'umi'; +const Loading: React.FC<{}> = () => { + /** + * 寻找商机中转页 + */ + + useEffect(() => { + //获取必要参数 + //项目编号 + const number = getURLInformation('number') === null ? '' : getURLInformation('number'); + //菜单类型 + const type = getURLInformation('type') === null ? '' : getURLInformation('type'); + if (isEmpty(type)) { + message.error('缺少必要参数,请重试'); + } else { + let params = {} + isEmpty(number) ? null : params['number'] = number + if (type == 'procurement_mode_1' || type == 'procurement_mode_2') {//招标类 + history.push({ pathname: '/Bid/FindBusiness', query: { ...params } }); + } else if (type == 'procurement_mode_5' || type == 'procurement_mode_6') {//谈判类 + history.push({ pathname: '/Negotiation/FindBusiness', query: { ...params } }); + } else if (type == 'procurement_mode_4') {//招募类 + history.push({ pathname: '/Recruit/FindBusiness', query: { ...params } }); + } else if (type == 'procurement_mode_3') {//比选类 + history.push({ pathname: '/Comparison/FindBusiness', query: { ...params } }); + } else { + message.error('参数错误,请联系管理员'); + } + } + }, []); + + return ( +
    +
    + +
    +
    + ); +}; +export default Loading; diff --git a/src/pages/LoadingPage/MiddleLoading/ToHomePage.tsx b/src/pages/LoadingPage/MiddleLoading/ToHomePage.tsx new file mode 100644 index 0000000..208e832 --- /dev/null +++ b/src/pages/LoadingPage/MiddleLoading/ToHomePage.tsx @@ -0,0 +1,59 @@ +import React, { useEffect } from 'react'; +import { message, Spin } from 'antd'; +import { getURLInformation, isEmpty } from '@/utils/CommonUtils'; +import { followUpAProjectManager, followUpAProjectSupplier, getSessionRoleData } from '@/utils/session'; +import { history } from 'umi'; +import { getProjectById } from '../service'; +const Loading: React.FC<{}> = () => { + /** + * 项目跟进中转页 + */ + + //获取角色 + const role = getSessionRoleData()?.roleCode; + + useEffect(() => { + //获取必要参数 + const projectId = getURLInformation('id') === null ? '' : getURLInformation('id'); + if (isEmpty(projectId)) { + message.error('缺少必要参数,请重试'); + } else { + //获取项目数据 + getProjectById(projectId).then((res) => { + if (res?.code == 200 && res?.success == true) { + const data = res?.data; + if (role == "ebtp-purchase" || role == "ebtp-agency-project-manager") {//采购经理或代理 + //调用存储session方法 + followUpAProjectManager(data); + setTimeout(() => { + history.push('./ProjectLayout/Manager/HomePageSectionList'); + }, 1000); + } else if (role == "ebtp-supplier") {//供应商 + followUpAProjectSupplier(data); + setTimeout(() => { + history.push('./ProjectLayout/Supplier/HomePageSectionList'); + }, 1000); + } else { + message.error("用户角色信息获取错误,请联系管理员") + } + } + }); + } + }, []); + + return ( +
    +
    + +
    +
    + ); +}; +export default Loading; diff --git a/src/pages/LoadingPage/ToAuth/index.tsx b/src/pages/LoadingPage/ToAuth/index.tsx deleted file mode 100644 index 8f2aff8..0000000 --- a/src/pages/LoadingPage/ToAuth/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React, { useEffect } from 'react'; -import { Button, message, Spin } from 'antd'; -import request from '@/utils/request'; -import { JumpToOutside } from '@/utils/CommonUtils'; -const Loading: React.FC<{}> = () => { - - useEffect(() => { - // request('/auth/oauth/authorize', { - // method: 'get', - // params: { - // response_type: 'code', - // client_id: 'KgPEkttG', - // redirect_uri: 'http://10.242.31.158:18022/redirect?page=xunjia&pid=123&vid=456&qid=789', - // mall3_token: sessionStorage.getItem('Authorization'), - // }, - // }).then(res => { - - // }) - - }, []); - return ( -
    -
    - - -
    -
    - ); -} -export default Loading; \ No newline at end of file diff --git a/src/pages/LoadingPage/index.tsx b/src/pages/LoadingPage/index.tsx index 32b668c..ee8da3e 100644 --- a/src/pages/LoadingPage/index.tsx +++ b/src/pages/LoadingPage/index.tsx @@ -1,11 +1,10 @@ import React, { useEffect } from 'react'; import { message, Spin } from 'antd'; import { history } from 'umi'; -import { cloudReloadToken, cooperReloadToken, fgetUserMsg, getTokenByCode } from './service'; -import { getDictionaries } from './BasDicData'; -import { getTotalURLInformation, getURLInformation } from '@/utils/CommonUtils'; +import { cloudReloadToken, cooperReloadToken, fgetUserMsg, getDictionaries, getTokenByCode } from './service'; +import { getTotalURLInformation, getURLInformation, isNotEmpty } from '@/utils/CommonUtils'; import { refreshTokenApi } from '@/services/login'; -import { getUserRefreshToken, getUserScope } from '@/utils/session'; +import { getUserRefreshToken, getUserScope, setUserData } from '@/utils/session'; const Loading: React.FC<{}> = () => { //存字典 async function setDict() { @@ -17,7 +16,7 @@ const Loading: React.FC<{}> = () => { }) } //用户信息错误处理方法 - async function refreshUserData(userType: string,token: string, url: string,extra: any) { + async function refreshUserData(userType: string, token: string, url: string, extra: any) { const headers = { Authorization: token, clientId: REACT_APP_CLIENT_KEY, @@ -32,84 +31,89 @@ const Loading: React.FC<{}> = () => { const header = { clientId: REACT_APP_CLIENT_KEY, } - if(userType == '0') {//联通用户 - await cloudReloadToken('',headers) + if (userType == '0') {//联通用户 + await cloudReloadToken('', headers) await getUserData(token, url, extra, 1) - } else if(userType == '1') {//合作方 - await cooperReloadToken('',headers) + } else if (userType == '1') {//合作方 + await cooperReloadToken('', headers) await getUserData(token, url, extra, 1) - } else if(userType == '2') {//专家 - await refreshTokenApi(params,header).then(async res => { - if(res?.success == true) { + } else if (userType == '2') {//专家 + await refreshTokenApi(params, header).then(async res => { + if (res?.success == true) { sessionStorage.setItem('Authorization', res?.data?.value); await getUserData(token, url, extra, 1) } }) } } + //错误页 + const error = (code: string) => { + history.replace({ + pathname: '/401', + query: { + code: code + } + }) + } + //跳转 + const redirect = async (userData: any, url: string, extra: any) => { + const roleCode = getURLInformation('roleCode'); + if (isNotEmpty(roleCode)) { + const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleCode == roleCode); + if (authIndex != -1) { + setUserData(userData, userData.authorityList[authIndex].roleCode, userData.authorityList[authIndex])//角色信息存储 + } else { + setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]); + error('402'); + return; + } + } else { + setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]); + } + await setDict();//存字典 + setTimeout(() => { + history.push({ + pathname: `/${url}`, + query: { + ...extra + } + }) + }, 2000) + } //获取用户信息 - async function getUserData(token: string, url: string,extra: any,status: number) { + async function getUserData(token: string, url: string, extra: any, status: number) { await fgetUserMsg(token).then(async res => { if (res) { - if(res?.userType == null) { - history.replace({ - pathname: '/401', - query: { - code: '401' - } - }) + if (res?.userType == null) { + error('401'); } else { - if(res?.authorityList == null || res?.authorityList?.length == 0) { - if(url == 'ExamineAndApprove/Announcement' || url == 'ExamineAndApprove/ChangeTheAnnouncement' || url == 'ExamineAndApprove/Publicity' || url == 'ExamineAndApprove/InvitationLetter' || url == 'ExamineAndApprove/ExternalReference' || url == 'ExamineAndApprove/FailureAnnouncement') { + if (res?.authorityList == null || res?.authorityList?.length == 0) { + if (url == 'ExamineAndApprove/Announcement' || + url == 'ExamineAndApprove/ChangeTheAnnouncement' || + url == 'ExamineAndApprove/Publicity' || + url == 'ExamineAndApprove/InvitationLetter' || + url == 'ExamineAndApprove/ExternalReference' || + url == 'ExamineAndApprove/FailureAnnouncement') { let newAuthority: any[] = [] newAuthority.push({ - authorities: [null,"system:user:test","system:user:test","system:user:test","system:user:test",null,null], + authorities: [null, "system:user:test", "system:user:test", "system:user:test", "system:user:test", null, null], roleCode: "ebtp-unicom-default", roleId: "20004", roleName: "联通普通用户", roleScope: "EBTP" }) - res.authorityList = [...newAuthority] - setDict();//存字典 - res.roleIds = res.authorityList[0].roleCode; - sessionStorage.setItem('userData', JSON.stringify(res)); - sessionStorage.setItem('roleAuthority', JSON.stringify([res.roleIds])); - sessionStorage.setItem('roleData', JSON.stringify(res.authorityList[0])); - setTimeout(() => { - history.push({ - pathname: `/${url}`, - query: { - ...extra - } - }) - }, 2000) + res.authorityList = [...newAuthority]; + await redirect(res, url, extra); } else { - if(status == 0) { - await refreshUserData(res?.userType,token,url,extra) + if (status == 0) { + await refreshUserData(res?.userType, token, url, extra); } else { - history.replace({ - pathname: '/401', - query: { - code: '401' - } - }) + error('401'); } } } else { - setDict();//存字典 - res.roleIds = res.authorityList[0].roleCode; - sessionStorage.setItem('userData', JSON.stringify(res)); - sessionStorage.setItem('roleAuthority', JSON.stringify([res.roleIds])); - sessionStorage.setItem('roleData', JSON.stringify(res.authorityList[0])); - setTimeout(() => { - history.push({ - pathname: `/${url}`, - query: { - ...extra - } - }) - }, 2000) + await redirect(res, url, extra); } } } else { @@ -120,7 +124,7 @@ const Loading: React.FC<{}> = () => { //通过code取token async function getToken(code: string, data: any) { let e = '' - if(data != null && data != undefined && data != '') { + if (data != null && data != undefined && data != '') { e = '?' + data } //获取当前浏览器主机部分(含端口号) @@ -128,17 +132,13 @@ const Loading: React.FC<{}> = () => { //获取协议部分 http: https: const protocol = window.location.protocol const grant_type = 'authorization_code'; - // const client_id = 'KgPEkttG'; - // const client_secret = 'ae5bdb183c502355d2055b3de73300aa73cbfdf3'; - // const redirect_uri = `http://10.242.31.158:18022/redirect${e}`; const client_id = REACT_APP_CLIENT_KEY; const client_secret = REACT_APP_CLIENT_SECRET; - // const redirect_uri = `${process.env.client_redirect}${e}`; const redirect_uri = `${protocol}//${host}/redirect${e}`; let token = ''; await getTokenByCode({ grant_type, client_id, client_secret, redirect_uri, code }).then(res => { if (res?.success == true) { - sessionStorage.setItem('Authorization',res?.data?.value) + sessionStorage.setItem('Authorization', res?.data?.value) token = 'Bearer ' + res?.data?.value; } else { message.error("认证请求失败,请联系管理员") @@ -149,18 +149,17 @@ const Loading: React.FC<{}> = () => { //主方法 async function mainFc() { const code = getURLInformation('code'); - const urlData: any = getTotalURLInformation()||{}; - // const urlData: any = {}; + const urlData: any = getTotalURLInformation() || {}; //形成url额外参数 let str: string = '' let obj: any = {} for (let key in urlData) { - if(key != 'code') { + if (key != 'code') { str = str + '&' + key + '=' + urlData[key] - if(key != 'page') { + if (key != 'page' && key != 'roleCode') { obj[key] = urlData[key] } - } + } } str = str.substring(1) //初始化token diff --git a/src/pages/LoadingPage/service.ts b/src/pages/LoadingPage/service.ts index b2b9a37..84a3e2a 100644 --- a/src/pages/LoadingPage/service.ts +++ b/src/pages/LoadingPage/service.ts @@ -5,10 +5,10 @@ import request from '@/utils/request'; * @param params * @returns */ -export async function fgetUserMsg(params: any) { +export async function fgetUserMsg(params: any) { return request('/api/biz-service-ebtp-extend/v1/userinfo/get', { method: 'GET', - headers: {'Authorization': params}, + headers: { 'Authorization': params }, data: params, }); } @@ -17,7 +17,7 @@ export async function fgetUserMsg(params: any) { * @param params * @returns */ -export async function getTokenByCode(params: any) { +export async function getTokenByCode(params: any) { return request('/api/auth/oauth/token', { method: 'POST', params: params, @@ -28,7 +28,7 @@ export async function getTokenByCode(params: any) { * 根据询价单id查询项目数据 * @param id */ - export function getProjectByInquiryId(inquiryId?:any){ +export function getProjectByInquiryId(inquiryId?: any) { return request('/api/biz-service-ebtp-project/v1/projectRecord/getByInquiryId/' + inquiryId); } @@ -36,7 +36,7 @@ export async function getTokenByCode(params: any) { * 刷新上下文接口(云门户) * @param id */ - export function cloudReloadToken(params: any,header: any) { +export function cloudReloadToken(params: any, header: any) { return request('/api/auth/reloadToken', { method: 'POST', headers: header @@ -46,11 +46,25 @@ export async function getTokenByCode(params: any) { * 刷新上下文接口(合作方) * @param id */ - export function cooperReloadToken(params: any,header: any) { +export function cooperReloadToken(params: any, header: any) { return request('/api/auth/reloadPartnerToken', { method: 'POST', headers: header }); } +/** + * 获取字典信息 + * @returns + */ +export async function getDictionaries() { + return request('/api/biz-service-ebtp-project/v1/dictProject/refreshDictCache'); +} +/** + * 根据projectId获取项目信息 + * @param id + */ +export async function getProjectById(id?: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); +} diff --git a/src/pages/Opening/ProjectManager/Room/index.tsx b/src/pages/Opening/ProjectManager/Room/index.tsx index e994358..925dd00 100644 --- a/src/pages/Opening/ProjectManager/Room/index.tsx +++ b/src/pages/Opening/ProjectManager/Room/index.tsx @@ -350,7 +350,7 @@ const Room: React.FC<{}> = () => { return ( <> { - rangeT && record.quoteId != null ? <> + rangeT && record.quoteId != null && record.isSignTime ? <> : null } @@ -375,6 +375,7 @@ const Room: React.FC<{}> = () => { }); //拼data let haveCompleteT = false; + const isLocalSign_: boolean = res.data.suppliers.findIndex((item: any) => item.bidUserId == userId ? item.signTime != null : false) != -1; res.data.suppliers != undefined ? res.data.suppliers.map((item1: any, index: any) => { let oneGys = {}; signTimeT[item1.bidUserId] = item1.signTime == null ? true : false;//控制显示 确认报价按钮 @@ -389,6 +390,7 @@ const Room: React.FC<{}> = () => { oneGys["newPriceRemark"] = item1.newPriceRemark;//数据表id,补录报价用 oneGys["quoteDecryptStatus"] = item1.quoteDecryptStatus; oneGys["quoteId"] = item1.quoteId; + oneGys["isSignTime"] = juese == "ebtp-supplier" ? item1.bidUserId == userId ? true : isLocalSign_ : true; if (item1.companyId == tenderId) { category.map((item2: any, index: any) => { oneGys[item2] = item1.dataMap[item2]; diff --git a/src/pages/PartyMemberTopic/ActivityStyle/index.tsx b/src/pages/PartyMemberTopic/ActivityStyle/index.tsx new file mode 100644 index 0000000..87cc0d5 --- /dev/null +++ b/src/pages/PartyMemberTopic/ActivityStyle/index.tsx @@ -0,0 +1,105 @@ +import React, { useEffect, useState } from 'react'; +import '../Style/ld_style.less'; +import { Input, List, Spin } from 'antd'; +import topic_activity_default from '@/assets/topic/topic_activity_default.jpg' +import time_icon from '@/assets/topic/timeIcon.png' +import { getGracefulList } from './service'; +import { getImageUrl } from '../utils'; +import { history } from 'umi'; + +const { Search } = Input; + +const PersonInfor: React.FC<{}> = () => { + //graceful data + const [gracefulList, setGracefulList] = useState([]); + //loading + const [loading, setLoading] = useState(false); + //page + const [page, setPage] = useState(1); + + //get graceful + const getGracefulData = (value: string) => { + setLoading(true); + getGracefulList({ param: value }).then(async res => { + if (res?.code == 200) { + setGracefulList(res?.data); + setPage(1); + } + }).finally(() => { + setLoading(false); + }) + } + //onclick + const clickTitle = (data: any) => { + sessionStorage.setItem("detailData", JSON.stringify(data)); + history.push("/partyMemberTopic/newsDetail"); + } + //to home + const toHome = () => { + history.push("/partyMemberTopic/home"); + } + //to previous page + const toPreviousPage = () => { + setPage((page) => page - 1); + } + //to next page + const toNextPage = () => { + setPage((page) => page + 1); + } + + useEffect(() => { + getGracefulData(''); + }, []) + return ( +
    +
    +
    + toHome()}>返回首页 + {page > 1 && toPreviousPage()}>上一页} + {gracefulList.length != 0 && page < Math.ceil(gracefulList.length / 10) && toNextPage()}>下一页} +
    +
    + +
    + 活动风采 +
    + +
    +
    +
    + { + setPage(page); + }, + current: page, + showTotal: (total) => `共 ${total} 条`, + pageSize: 10, + }} + dataSource={gracefulList} + renderItem={item => ( + +
    + +

    clickTitle(item)}>{item.title}

    +

    {item.secordTitle}

    + {item.createTime} +
    +
    + )} + /> +
    +
    +
    + ) +} + +export default PersonInfor; \ No newline at end of file diff --git a/src/pages/PartyMemberTopic/ActivityStyle/service.ts b/src/pages/PartyMemberTopic/ActivityStyle/service.ts new file mode 100644 index 0000000..3d9373a --- /dev/null +++ b/src/pages/PartyMemberTopic/ActivityStyle/service.ts @@ -0,0 +1,9 @@ +import request from '@/utils/request'; + +//活动风采列表 +export async function getGracefulList(data: any) { + return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventStyle/list', { + method: 'POST', + data: { ...data } + }); +} \ No newline at end of file diff --git a/src/pages/PartyMemberTopic/HardDetail/index.tsx b/src/pages/PartyMemberTopic/HardDetail/index.tsx new file mode 100644 index 0000000..11e0276 --- /dev/null +++ b/src/pages/PartyMemberTopic/HardDetail/index.tsx @@ -0,0 +1,34 @@ +import React from 'react'; +import '../Style/detailStyle.less'; +import bannerProjectPic from '@/assets/topic/bannerProjectPic.jpg' +import { history } from 'umi' +import { getDetailData } from '../utils'; + +const HardDetail: React.FC<{}> = () => { + //session detailData + const item = getDetailData(); + //to home + const toHome = () => { + history.push("/partyMemberTopic/home"); + } + return ( +
    +
    +
    + +
    +
    + toHome()}>返回首页 +
    +
    +

    {item?.title}

    +
    +
    +
    +
    +
    +
    + ) +} + +export default HardDetail; \ No newline at end of file diff --git a/src/pages/PartyMemberTopic/HardDetail/service.ts b/src/pages/PartyMemberTopic/HardDetail/service.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/PartyMemberTopic/Home/index.less b/src/pages/PartyMemberTopic/Home/index.less new file mode 100644 index 0000000..1ffaefb --- /dev/null +++ b/src/pages/PartyMemberTopic/Home/index.less @@ -0,0 +1,645 @@ +@import '~antd/es/style/themes/default.less'; + +.topic-global { + width: 100%; + display: flex; + justify-content: center; + background-color: #fff; + + .topic-background { + width: 1460px; + background-color: #e9e9e9; + + .top-picture { + height: 132px; + width: 100%; + } + + .top-global { + display: flex; + justify-content: space-between; + + .left-global { + width: 1139px; + padding: 0; + margin: 0; + + .left-carousel { + + .carousel-content { + height: 584px; + width: 1139px; + background-repeat: no-repeat; + background-size: 100%; + display: flex; + align-items: flex-end; + cursor: pointer; + + .carousel-textbg { + display: flex; + justify-content: center; + width: 100%; + padding: 50px 0; + background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0)), no-repeat center; + + .carousel-text { + color: #fff; + width: 812px; + + .carousel-text-content { + font-weight: bold; + font-size: 32px; + line-height: 40px; + } + + .carousel-text-click { + font-size: 14px; + margin-left: 10px; + } + } + } + } + + .carousel-content:hover { + -webkit-filter: brightness(105%); + filter: brightness(105%); + } + } + + .left-carousel .slick-dots-bottom { + bottom: 0; + } + + .left-activity { + height: 103px; + width: 1139px; + background-image: url("~@/assets/topic/topic_activity_gradient.jpg"); + display: flex; + justify-content: left; + + .left-activity-marquee { + height: 103px; + width: 940px; + padding-left: 25px; + + .left-activity-scroll { + height: 103px; + display: flex; + justify-content: space-around; + align-items: center; + + .left-activity-scroll-content { + font-size: 17px; + color: #fff; + margin-right: 20px; + + .left-activity-scroll-end { + margin-top: 2px; + } + } + + .left-activity-scroll-content .left-activity-scroll-name { + font-weight: bold; + } + } + } + } + + .left-card { + margin: 20px 0px 20px 12px; + + .left-card-top { + display: flex; + justify-content: space-between; + align-items: center; + + .left-card-title { + font-weight: bold; + font-family: '黑体'; + font-size: 28px; + } + + + .left-card-fist { + vertical-align: text-bottom; + position: relative; + top: 3px; + margin-right: 6px; + } + + .left-card-flag { + vertical-align: text-bottom; + position: relative; + top: 3px; + margin-left: 10px; + } + + .left-card-other { + font-family: '黑体'; + font-size: 18px; + color: #a2a2a2; + cursor: pointer; + } + + .left-card-other:hover { + color: #a81c0c; + text-decoration: underline; + } + + .left-card-otherimg { + vertical-align: text-bottom; + margin-left: 5px; + } + } + + .left-card-divider { + color: #c9c9c9; + margin: 8px 0px 30px; + } + + .left-graceful { + background: #fff; + padding: 16px 24px 50px; + + .left-graceful-bg { + height: 198px; + width: 338px; + background-size: 100%; + background-repeat: no-repeat; + display: flex; + justify-content: center; + align-items: flex-end; + padding-bottom: 10px; + cursor: pointer; + + .left-graceful-textbg { + height: 36px; + width: 304px; + background-image: url("~@/assets/topic/topic_graceful_textbg.png"); + display: flex; + justify-content: center; + align-items: center; + + .left-graceful-text { + color: #fff; + font-size: 16.64px; + font-weight: bold; + } + } + } + + .left-graceful-bg:hover { + -webkit-filter: brightness(108%); + filter: brightness(108%); + } + } + + .left-project { + margin-top: 20px; + background: #fff; + padding: 16px 24px 40px; + + .left-project-content { + display: flex; + justify-content: left; + + .left-project-content-list { + margin-left: 40px; + + .left-project-content-item { + font-size: 21px; + font-family: '黑体'; + line-height: 36px; + + .left-project-content-item-title { + color: #535353 + } + + .left-project-content-item-title:hover { + color: #a81c0c; + text-decoration: underline; + } + + .left-project-content-item-time { + color: #a2a2a2; + margin-left: 8px; + } + } + } + + } + + .left-project-content .ant-list-sm .ant-list-item { + padding: 0px 16px; + } + } + } + + + } + + .right-global { + background: #fff; + width: 100%; + margin: 0px 12px 20px; + display: flex; + flex-direction: column; + align-items: center; + padding: 14px; + + .right-material { + width: 100%; + cursor: pointer; + } + + .right-material:hover { + -webkit-filter: brightness(108%); + filter: brightness(108%); + } + + .right-display { + width: 100%; + padding: 18px 16px; + + .right-display-title { + font-size: 14px; + color: #474747; + letter-spacing: 1px; + text-align: center; + } + + .right-display-content { + display: flex; + justify-content: start; + margin-top: 30px; + + .right-display-content-img { + height: 56px; + width: 56px; + } + + .right-display-content-right { + margin-left: 10px; + + .right-display-content-title { + color: #9e9e9e; + font-size: 12px; + letter-spacing: 1px; + + // .right-display-content-percentage { + // margin-left: 8px; + + // .right-display-content-percentage-increase { + // color: #28e099; + // } + + // .right-display-content-percentage-reduce { + // color: #eb5527; + // } + // } + } + + .right-display-content-content { + margin-top: 4px; + + .right-display-content-number { + font-size: 32.15px; + font-family: 'Consolas'; + line-height: 32.15px; + } + + .number-blue { + color: #21b8ce; + } + + .number-orange { + color: #eb5527; + } + + .number-purple { + color: #c06ad9; + } + + .right-display-content-unit { + font-size: 12px; + margin-left: 5px; + } + } + + } + } + + .right-display-content-pointer { + cursor: pointer; + } + + } + + .right-divider { + margin: 12px 0px 0px; + color: #c9c9c9; + } + + .right-manager { + margin-top: 12px; + } + + // .right-graph { + // padding-top: 26px; + + // .right-graph-title { + // font-size: 17px; + // text-align: center; + // } + + // .right-graph-subtitle { + // color: #9e9e9e; + // font-size: 12px; + // text-align: center; + // margin-top: 4px; + // } + + // .right-graph-content { + // height: 250px; + // width: 250px; + // } + // } + } + + + } + + .bottom-global { + margin: 0px 12px 84px; + background: #fff; + padding: 16px 24px 28px; + + .bottom-select { + margin-bottom: 24px; + + .bottom-select-label { + margin-right: 6px; + font-size: 14px; + font-weight: bold; + } + + .ant-tag-checkable-checked { + background-color: #da3232; + } + } + + .bottom-select .bottom-select-tag { + font-size: 14px; + padding: 0 9px; + line-height: 27px; + margin-right: 6px; + } + + .left-card-top { + display: flex; + justify-content: space-between; + align-items: center; + + .left-card-title { + font-weight: bold; + font-family: '黑体'; + font-size: 28px; + } + + .left-card-flag { + vertical-align: text-bottom; + position: relative; + top: 3px; + margin-left: 10px; + } + + .left-card-other { + font-family: '黑体'; + font-size: 18px; + color: #a2a2a2; + cursor: pointer; + } + + .left-card-other:hover { + color: #a81c0c; + text-decoration: underline; + } + + .left-card-otherimg { + vertical-align: text-bottom; + margin-left: 5px; + } + } + + .left-card-divider { + color: #c9c9c9; + margin: 8px 0px 24px; + } + + .bottom-content { + margin-bottom: 18px; + + .bottom-card { + background-image: url("~@/assets/topic/topic_bottom_card_picture.png"); + height: 157px; + width: 331px; + padding: 12px 16px; + margin-top: 18px; + + .bottom-card-flex { + display: flex; + justify-content: space-between; + align-items: center; + + .bottom-card-title { + font-size: 20px; + font-weight: bold; + } + } + + .bottom-card-flex img { + height: 30px; + cursor: pointer; + } + + .bottom-card-flex img:hover { + -webkit-filter: brightness(108%); + filter: brightness(108%); + } + + .bottom-card-remark { + height: 22px; + } + + .bottom-card-remark .bottom-card-remark-text { + color: #df3b37; + font-size: 16px; + width: 299px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .bottom-card-content { + font-size: 15px; + color: #6f6f6f; + margin-top: 8px; + line-height: 24px; + } + } + } + + .bottom-title { + font-weight: bold; + font-size: 24px; + font-family: '黑体'; + color: #b8b8b8; + } + + .bottom-other { + display: flex; + justify-content: center; + + .bottom-other-text { + font-family: '黑体'; + font-size: 18px; + color: #a2a2a2; + cursor: pointer; + } + + .bottom-other-text:hover { + color: #a81c0c; + text-decoration: underline; + } + + .bottom-other-icon { + transform: rotate(90deg); + vertical-align: text-bottom; + margin-left: 5px; + } + + .bottom-close-icon { + transform: rotate(-90deg); + vertical-align: text-bottom; + margin-left: 5px; + } + } + } + } + + +} + +.topic-home-modal .ant-modal-content { + border-radius: 8px; +} + +.topic-home-modal .ant-modal-content .ant-modal-header { + border-top-left-radius: 8px; + border-top-right-radius: 8px; + background: #da3232; + padding: 0; + height: 45px; + + .bottom-modal-header { + display: flex; + justify-content: left; + align-items: center; + padding: 0 20px; + + .bottom-modal-headertext { + font-size: 21px; + font-family: '黑体'; + color: #fff; + width: 100%; + margin-left: 8px; + } + } +} + +.topic-home-modal .ant-modal-content .ant-modal-body { + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + background: #eeeeee; + padding: 16px; +} + +.topic-home-modal .ant-modal-content .ant-modal-body .bottom-modal-body { + // display: flex; + // flex-direction: column; + // align-items: center; + + // .radio-group { + // width: 300px; + // margin-bottom: 12px; + + // .radio-content { + // font-size: 17.16px; + // font-family: '黑体'; + // color: #939393; + // margin-left: 16px; + // } + // } + + // .bottom-modal-textarea { + // resize: none; + // border-radius: 8px; + // } + + // .bottom-modal-submit { + // display: flex; + // justify-content: space-between; + // align-items: center; + // margin-top: 8px; + // width: 100%; + + // .submit-text { + // color: #939393; + // } + + // .submit-cancelbutton { + // border-radius: 8px; + // border-color: #d44026; + // color: #d44026; + // } + + // .submit-button { + // border-radius: 8px; + // background: #d44026; + // margin-left: 8px; + // border-color: #d44026; + // } + // } + .ant-form-item { + margin-bottom: 16px; + } + + .ant-form-item textarea { + resize: none; + } + + .ant-form-item-label>label { + font-size: 17px; + font-family: '黑体'; + color: #939393; + } + + .radio-content { + font-size: 17px; + font-family: '黑体'; + color: #939393; + } + + .ant-input { + color: #333333; + } + + .bottom-modal-submit { + text-align: center; + + .submit-button { + background: #da3232; + border-color: #da3232; + } + } +} \ No newline at end of file diff --git a/src/pages/PartyMemberTopic/Home/index.tsx b/src/pages/PartyMemberTopic/Home/index.tsx new file mode 100644 index 0000000..a2ecac4 --- /dev/null +++ b/src/pages/PartyMemberTopic/Home/index.tsx @@ -0,0 +1,645 @@ +import React, { useEffect, useRef, useState } from 'react'; +import './index.less'; +import { Button, Carousel, Col, Divider, Form, Input, List, message, Modal, Radio, Row, Space, Spin, Tag, Tooltip } from 'antd'; +import * as echarts from 'echarts'; +import Marquee from 'react-fast-marquee'; +import topic_header from '@/assets/topic/topic_header.jpg' +import topic_activity_logo from '@/assets/topic/topic_activity_logo.png' +import topic_red_flag from '@/assets/topic/topic_red_flag.png' +import topic_fist from '@/assets/topic/topic_fist.png' +import topic_other from '@/assets/topic/topic_other.png' +import topic_project_picture from '@/assets/topic/topic_project_picture.jpg' +import topic_bottom_button from '@/assets/topic/topic_bottom_button.png' +import topic_right_material from '@/assets/topic/topic_right_material.png' +import topic_right_manager from '@/assets/topic/topic_right_manager.jpg' +import topic_partymember from '@/assets/topic/topic_partymember.png' +import topic_partybranch from '@/assets/topic/topic_partybranch.png' +import topic_totalamount from '@/assets/topic/topic_totalamount.png' +import topic_totalnumber from '@/assets/topic/topic_totalnumber.png' +import topic_commodity from '@/assets/topic/topic_commodity.png' +import topic_protocol from '@/assets/topic/topic_protocol.png' +import topic_header_img from '@/assets/topic/topic_header_img.png' +import topic_banner_default from '@/assets/topic/topic_banner_default.jpg' +import topic_activity_default from '@/assets/topic/topic_activity_default.jpg' +import topic_firstline from '@/assets/topic/topic_firstline.png' +import topic_interview from '@/assets/topic/topic_interview.png' +import topic_assure from '@/assets/topic/topic_assure.png' +import topic_difficult from '@/assets/topic/topic_difficult.png' +import { getHomeActivity, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, submitAdvice } from './service'; +import { chunk, formatTime, getImageUrl, managerAuthority } from '../utils'; +import ExtendUpload from '@/utils/ExtendUpload'; +import { getSessionUserData } from '@/utils/session'; + +const tagsData = ['集团总部', '北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '山东', '河南', '上海', '江苏', '浙江', '安徽', '福建', '江西', '湖北', '湖南', '广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆', '数字科技', '联通在线', '智网科技', '支付公司', '财务公司', '融资租赁', '时科(北京)信息', '中讯院']; + +const formItemLayout = { + labelCol: { span: 5 }, + wrapperCol: { span: 17 }, +}; + +//卡片头 +const LeftCardTop = (props: any) => { + return ( + <> +
    +
    + {props.code == "2" && } + {props.title} + {props.code != "2" && } +
    + {props.url &&
    window.open(props.url)}> + 更多 + +
    } +
    + + + ) +} +//右侧专业线标题 +const RightDisplayTitle = (props: any) => { + return ( +
    + {props.title} +
    + ) +} +//右侧专业线内容 +const RightDisplayContent = (props: any) => { + const displayContentClick = () => { + if (props.index == 0 || props.index == 1) {//党员数量 //党支部数量 + window.open("/partyMemberTopic/partyBranch"); + } + } + return ( + props.data?.length > 0 ? ( +
    displayContentClick()}> + +
    +
    + {props.data[props.index].dataName} + {/* {props.data[props.index].dataCompare != null && + 同比 + {props.data[props.index].dataCompare[0] == '+' ? ( + {props.data[props.index].dataCompare} ↑ + ) : ( + {props.data[props.index].dataCompare} ↓ + )} + } */} +
    +
    + {props.data[props.index].dataValue} + {props.data[props.index].dataType} +
    +
    +
    + ) : null + ) +} +//右侧图表内容 +const RightGraphContent = (props: any) => { + const random = Math.random().toString(); + useEffect(() => { + type EChartsOption = echarts.EChartsOption; + const chartDom = document.getElementById(random)!; + const myChart = echarts.init(chartDom); + const option: EChartsOption = { + tooltip: { + trigger: 'item' + }, + series: [ + { + name: props.name, + type: 'pie', + radius: '90%', + color: ['#EE6666', '#FAC858', '#73C0DE', '#91CC75', '#5470C6', '#FC8452', '#9A60B4', '#3BA272'], + data: props.data, + label: { + formatter: props.type != null ? `{b}\n\n{c}${props.type} {d}%` : '{b}', + fontSize: '90%', + color: '#fff', + position: 'inner', + }, + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + } + } + ] + }; + myChart.setOption(option); + }, []) + return ( +
    + ) +} +//活动联系人卡片内容 +const BottomCardContent = (props: any) => { + + return ( + +
    +
    +
    + {props.data.contactName} +
    + props.onClick()} /> +
    +
    + + {props.data.remark} + +
    +
    +
    邮箱:{props.data.contactEmail}
    +
    电话:{props.data.contactMobiphone}
    +
    部门:{props.data.contactDepartment}
    +
    +
    + + ) +} +//活动联系人-我要提意见Modal +const CommentModal = (props: any) => { + const { TextArea } = Input; + const [form] = Form.useForm(); + const [modalLoading, setModalLoading] = useState(false); + const onCancel = () => { + props.closeModal(); + } + + const onSubmit = () => { + form.submit(); + } + + const onFinish = async (values: any) => { + setModalLoading(true); + const params = { + ...values, + } + await submitAdvice(params).then(res => { + if (res?.code == 200) { + message.success("提交成功"); + onCancel(); + } + }).finally(() => { + setModalLoading(false); + }) + }; + useEffect(() => { + form.setFieldsValue({ + ...props.data, + name: props.userData?.fullName, + company: props.userData?.organizationName, + }) + }, [props.data?.id]) + + return ( + + +
    + 我要提意见 +
    +
    + } + visible={props.visible} + onCancel={onCancel} + destroyOnClose + closable={false} + footer={null} + centered + maskStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.3)' }} + width={800} + > + +
    +
    + + + + 网络运营 + IT + 市场 + 综合行政 + 其他 + + + +