tools.js 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994
  1. import { message,Select } from 'antd';
  2. import React from 'react';
  3. import $ from 'jquery/src/ajax';
  4. import {
  5. patentTypeList,
  6. patentStateList,
  7. patentFieldList,
  8. technicalSourceList,
  9. catagoryList,
  10. intellectualGetList,
  11. conversionFormList,
  12. annualReportStateList,
  13. cognizanceStateList,
  14. technologyStateList,
  15. copyrightStateList,
  16. auditStatusList,
  17. scaleList,
  18. companyType,
  19. industryList,
  20. contractTypeList,
  21. contractStateList,
  22. demandTypeList,
  23. achievementCategoryList,
  24. techAuditStatusList,
  25. auditStatusLists,
  26. maturityList,
  27. transferModeList,
  28. innovationList,
  29. orderStatusList,
  30. activityForm,
  31. activityType,
  32. boutique,
  33. hot,
  34. statuslist,
  35. customerTyp,
  36. cityArr,
  37. customerStatus,
  38. intentionalService,
  39. newFollow,
  40. sex,
  41. tag,
  42. contactType,
  43. contact,
  44. intentionalServiceOn,
  45. newFollowOn,
  46. customerStatusOn,
  47. Whether,
  48. Certification,
  49. currentMember,
  50. lvl,
  51. industry,
  52. socialAttribute,
  53. station,
  54. post,
  55. patternOrganization,
  56. conditionOrganization,
  57. categoryState,
  58. auditStatusL,
  59. gameState,
  60. messageType,
  61. designated,
  62. featured,
  63. actives,
  64. intentProgress,
  65. transactionProgress,
  66. contractProgress,
  67. projectProgress,
  68. orderType, orderStage, orderState,paymentState, orderChannel, approvedState, lock,paymentMethod,transactionChannel,projectState,transactionProject,
  69. client,
  70. stick,
  71. taskStatus,
  72. publishStatus,
  73. changeState,
  74. distributeState,
  75. customerSource,
  76. releaseStateList,
  77. releasePosition,
  78. achievementPosition,
  79. achievementType,
  80. transaction,
  81. newsPosition,
  82. policyPosition,
  83. newType,
  84. adviserType,
  85. authState,
  86. typeModule,
  87. lowType,
  88. msgType,
  89. ziYuanType,
  90. couponAuthState,
  91. couponAuthStates,
  92. couponCome,
  93. secretType,
  94. buyAuditType,
  95. categoryType,
  96. categoryPatent,
  97. maturityType,
  98. indateType,
  99. } from './dataDic.js';
  100. import { provinceList} from './NewDicProvinceList.js';
  101. // 东北(黑龙江省、吉林省、辽宁省);
  102. // 华东(上海市、江苏省、浙江省、安徽省、福建省、江西省、山东省、台湾省);
  103. // 华北(北京市、天津市、山西省、河北省、内蒙古自治区);
  104. // 华中(河南省、湖北省、湖南省);
  105. // 华南(广东省、广西壮族自治区、海南省、香港特别行政区、澳门特别行政区);
  106. // 西南(四川省、贵州省、云南省、重庆市、西藏自治区);
  107. // 西北(陕西省、甘肃省、青海省、宁夏回族自治区、新疆维吾尔自治区)
  108. module.exports = {
  109. placeList: [
  110. {
  111. place: "东北",
  112. children: ["黑龙江", "吉林", "辽宁"],
  113. value: "1"
  114. },
  115. {
  116. place: "华东",
  117. children: ["上海", "江苏", "浙江", "安徽", "福建", "江西", "山东", "台湾"],
  118. value: "2"
  119. },
  120. {
  121. place: "华北",
  122. children: ["北京", "天津", "山西", "河北", "内蒙古"],
  123. value: "3"
  124. },
  125. {
  126. place: "华中",
  127. children: ["河南", "湖北", "湖南"],
  128. value: "4"
  129. },
  130. {
  131. place: "华南",
  132. children: ["广东", "广西", "海南", "香港", "澳门"],
  133. value: "5"
  134. },
  135. {
  136. place: "西南",
  137. children: ["四川", "贵州", "云南", "重庆", "西藏"],
  138. value: "6"
  139. },
  140. {
  141. place: "西北",
  142. children: ["陕西", "甘肃", "青海", "宁夏", "新疆"],
  143. value: "7"
  144. }
  145. ],
  146. provinceStatus: [
  147. {
  148. value: "7",
  149. key: "安徽"
  150. },
  151. {
  152. value: "15",
  153. key: "北京"
  154. },
  155. {
  156. value: "27",
  157. key: "重庆"
  158. },
  159. {
  160. value: "8",
  161. key: "福建"
  162. },
  163. {
  164. value: "30",
  165. key: "甘肃"
  166. },
  167. {
  168. value: "24",
  169. key: "广东"
  170. },
  171. {
  172. value: "20",
  173. key: "广西"
  174. },
  175. {
  176. value: "25",
  177. key: "贵州"
  178. },
  179. {
  180. value: "21",
  181. key: "海南"
  182. },
  183. {
  184. value: "13",
  185. key: "河北"
  186. },
  187. {
  188. value: "1",
  189. key: "黑龙江"
  190. },
  191. {
  192. value: "19",
  193. key: "河南"
  194. },
  195. {
  196. value: "22",
  197. key: "香港"
  198. },
  199. {
  200. value: "17",
  201. key: "湖北"
  202. },
  203. {
  204. value: "18",
  205. key: "湖南"
  206. },
  207. {
  208. value: "5",
  209. key: "江苏"
  210. },
  211. {
  212. value: "9",
  213. key: "江西"
  214. },
  215. {
  216. value: "3",
  217. key: "辽宁"
  218. },
  219. {
  220. value: "2",
  221. key: "吉林"
  222. },
  223. {
  224. value: "23",
  225. key: "澳门"
  226. },
  227. {
  228. value: "14",
  229. key: "内蒙古"
  230. },
  231. {
  232. value: "32",
  233. key: "宁夏"
  234. },
  235. {
  236. value: "31",
  237. key: "青海"
  238. },
  239. {
  240. value: "10",
  241. key: "山东"
  242. },
  243. {
  244. value: "4",
  245. key: "上海"
  246. },
  247. {
  248. value: "12",
  249. key: "山西"
  250. },
  251. {
  252. value: "34",
  253. key: "陕西"
  254. },
  255. {
  256. value: "29",
  257. key: "四川"
  258. },
  259. {
  260. value: "11",
  261. key: "台湾"
  262. },
  263. {
  264. value: "16",
  265. key: "天津"
  266. },
  267. {
  268. value: "33",
  269. key: "新疆"
  270. },
  271. {
  272. value: "28",
  273. key: "西藏"
  274. },
  275. {
  276. value: "26",
  277. key: "云南"
  278. },
  279. {
  280. value: "6",
  281. key: "浙江"
  282. },
  283. ],
  284. province: [
  285. "黑龙江",
  286. "吉林",
  287. "辽宁",
  288. "上海",
  289. "江苏",
  290. "浙江",
  291. "安徽",
  292. "福建",
  293. "江西",
  294. "山东",
  295. "台湾",
  296. "北京",
  297. "天津",
  298. "山西",
  299. "河北",
  300. "内蒙古",
  301. "河南",
  302. "湖北",
  303. "湖南",
  304. "广东",
  305. "广西",
  306. "海南",
  307. "香港",
  308. "澳门",
  309. "四川",
  310. "贵州",
  311. "云南",
  312. "重庆",
  313. "西藏",
  314. "陕西",
  315. "甘肃",
  316. "青海",
  317. "宁夏",
  318. "新疆"
  319. ],
  320. splitUrl: function(string, i, url) {
  321. let theList = [];
  322. let theArr = [];
  323. if (string && string.length) {
  324. theArr = string.split(i);
  325. theArr.map(function(item, i) {
  326. theList.push({
  327. uid: -i - 1,
  328. url: url + item,
  329. response: {
  330. data: item
  331. }
  332. });
  333. });
  334. }
  335. return theList;
  336. },
  337. getBase64: function(img, callback) {
  338. const reader = new FileReader();
  339. reader.addEventListener("load", () => callback(reader.result));
  340. reader.readAsDataURL(img);
  341. },
  342. beforeUpload: function(file) {
  343. const isLt2M = file.size / 1024 / 1024 < 2;
  344. if (!isLt2M) {
  345. message.error("图片小大必须小于2MB!");
  346. }
  347. return isLt2M;
  348. },
  349. beforeUploadFile: function(file) {
  350. // debugger
  351. // const isJPG = file.type === 'image/jpeg/document';
  352. // if (!isJPG) {
  353. // message.error('You can only upload JPG file!');
  354. // }
  355. // const isLt2M = file.size / 1024 / 1024 < 2;
  356. // if (!isLt2M) {
  357. // message.error('Image must smaller than 2MB!');
  358. // }
  359. // return isJPG && isLt2M;
  360. },
  361. getTime: function(e, t) {
  362. if (e && !t) {
  363. var d = new Date(e);
  364. d =
  365. d.getFullYear() +
  366. "-" +
  367. (d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1) +
  368. "-" +
  369. (d.getDate() < 10 ? "0" + d.getDate() : d.getDate()) +
  370. " ";
  371. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  372. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  373. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  374. return d;
  375. } else if (e && t) {
  376. var d1 = new Date(e);
  377. var d2 = new Date(e);
  378. d2 = d2.setMonth(d1.getMonth() + t);
  379. d2 = new Date(d2);
  380. d2 =
  381. d2.getFullYear() +
  382. "-" +
  383. (d2.getMonth() + 1 < 10
  384. ? "0" + (d2.getMonth() + 1)
  385. : d2.getMonth() + 1) +
  386. "-" +
  387. (d2.getDate() < 10 ? "0" + d2.getDate() : d2.getDate()) +
  388. " ";
  389. return d2;
  390. } else {
  391. return "";
  392. }
  393. },
  394. getPatentType: function(e) {
  395. if (e) {
  396. let theType = "";
  397. patentTypeList.map(function(item) {
  398. if (item.value == e) {
  399. theType = item.key;
  400. }
  401. });
  402. return theType;
  403. }
  404. },
  405. getPatentState: function(e) {
  406. if (e) {
  407. let theState = "";
  408. patentStateList.map(function(item) {
  409. if (item.value == e) {
  410. theState = item.key;
  411. }
  412. });
  413. return theState;
  414. }
  415. },
  416. getPatentField: function(e) {
  417. if (e) {
  418. let theState = "";
  419. patentFieldList.map(function(item) {
  420. if (item.value == e) {
  421. theState = item.key;
  422. }
  423. });
  424. return theState;
  425. }
  426. },
  427. getTechnicalSource: function(e) {
  428. if (e) {
  429. let theSource = "";
  430. technicalSourceList.map(function(item) {
  431. if (item.value == e) {
  432. theSource = item.key;
  433. }
  434. });
  435. return theSource;
  436. }
  437. },
  438. getCatagory: function(e) {
  439. if (e) {
  440. let theType = "";
  441. catagoryList.map(function(item) {
  442. if (item.value == e) {
  443. theType = item.key;
  444. }
  445. });
  446. return theType;
  447. }
  448. },
  449. getIntellectualObtainWay: function(e) {
  450. if (e) {
  451. let theType = "";
  452. intellectualGetList.map(function(item) {
  453. if (item.value == e) {
  454. theType = item.key;
  455. }
  456. });
  457. return theType;
  458. }
  459. },
  460. getConversionForm: function(e) {
  461. if (e) {
  462. let theType = "";
  463. conversionFormList.map(function(item) {
  464. if (item.value == e) {
  465. theType = item.key;
  466. }
  467. });
  468. return theType;
  469. }
  470. },
  471. getAnnualReportState: function(e) {
  472. if (e) {
  473. let theType = "";
  474. annualReportStateList.map(function(item) {
  475. if (item.value == e) {
  476. theType = item.key;
  477. }
  478. });
  479. return theType;
  480. }
  481. },
  482. getCognizanceState: function(e) {
  483. if (e) {
  484. let theType = "";
  485. cognizanceStateList.map(function(item) {
  486. if (item.value == e) {
  487. theType = item.key;
  488. }
  489. });
  490. return theType;
  491. }
  492. },
  493. getTechnologyState: function(e) {
  494. if (e) {
  495. let theType = "";
  496. technologyStateList.map(function(item) {
  497. if (item.value == e) {
  498. theType = item.key;
  499. }
  500. });
  501. return theType;
  502. }
  503. },
  504. //显示用户认证状态
  505. getAuditState: function(e) {
  506. if (e) {
  507. let theType = "";
  508. auditStatusList.map(function(item) {
  509. if (item.value == e) {
  510. theType = item.key;
  511. }
  512. });
  513. return theType;
  514. }
  515. },
  516. getCopyrightState: function(e) {
  517. if (e) {
  518. let theType = "";
  519. copyrightStateList.map(function(item) {
  520. if (item.value == e) {
  521. theType = item.key;
  522. }
  523. });
  524. return theType;
  525. }
  526. },
  527. downloadFile: function(path, fileName) {
  528. window.open(
  529. globalConfig.context +
  530. "/open/downloadFile?path=" +
  531. path +
  532. "&fileName=" +
  533. fileName
  534. );
  535. },
  536. techDownloadFile: function(url, id) {
  537. window.open(globalConfig.context + url + "?id=" + id);
  538. },
  539. copyrightDownloadFile: function(id, sign, url) {
  540. window.open(globalConfig.context + url + "?id=" + id + "&sign=" + sign);
  541. },
  542. newDownloadFile: function(id, sign, url, type) {
  543. if (!type) {
  544. window.open(globalConfig.context + url + "?id=" + id + "&sign=" + sign);
  545. }
  546. if (type) {
  547. window.open(
  548. globalConfig.context +
  549. url +
  550. "?id=" +
  551. id +
  552. "&sign=" +
  553. sign +
  554. "&type=" +
  555. type
  556. );
  557. }
  558. },
  559. companySearch(input, option) {
  560. return option.props.children.indexOf(input) >= 0;
  561. },
  562. getVacations(ccccc) {
  563. let now = new Date();
  564. let theYear = now.getFullYear();
  565. $.ajax({
  566. type: "get",
  567. dataType: "json",
  568. crossDomain: false,
  569. url: globalConfig.context + "/open/html/json/vacations" + theYear,
  570. success: data => {
  571. if (data) {
  572. ccccc(data);
  573. }
  574. }
  575. });
  576. },
  577. getInUrgentTime(date, inUrgent, vocations) {
  578. if (vocations && vocations.length) {
  579. let now = new Date(date),
  580. addNum = 0;
  581. for (var i = 1; i <= inUrgent; ) {
  582. now.setDate(now.getDate() + 1);
  583. let thebool = true;
  584. vocations.map(item => {
  585. if (item == getKey(now)) {
  586. thebool = false;
  587. }
  588. });
  589. if (thebool) {
  590. i++;
  591. }
  592. }
  593. return now;
  594. }
  595. function getKey(date) {
  596. var year = date.getFullYear(),
  597. month = date.getMonth() + 1,
  598. day = date.getDate();
  599. year = "" + year;
  600. month = (month > 9 ? "" : "0") + month;
  601. day = (day > 9 ? "" : "0") + day;
  602. return year + month + day;
  603. }
  604. },
  605. //各种通过接口获取下拉列表
  606. setPatentStateOption(permission) {
  607. let theArr = [];
  608. patentStateList.map(function(item) {
  609. for (let i = 0; i < permission.length; i++) {
  610. if (item.value == permission[i]) {
  611. theArr.push(item);
  612. }
  613. }
  614. });
  615. return theArr;
  616. },
  617. setUserContactsList() {
  618. let theOption = [];
  619. $.ajax({
  620. method: "get",
  621. dataType: "json",
  622. crossDomain: false,
  623. url: globalConfig.context + "/api/user/getContacts",
  624. success: function(data) {
  625. if (!data.data) {
  626. if (data.error && data.error.length) {
  627. message.warning(data.error[0].message);
  628. }
  629. return;
  630. }
  631. for (let item in data.data) {
  632. let theData = data.data[item];
  633. theOption.push(
  634. <Select.Option value={item} key={theData}>
  635. {theData}
  636. </Select.Option>
  637. );
  638. }
  639. }
  640. });
  641. return theOption;
  642. },
  643. setAdminContactsList(uid) {
  644. let theOption = [];
  645. $.ajax({
  646. method: "get",
  647. dataType: "json",
  648. crossDomain: false,
  649. url: globalConfig.context + "/api/admin/getContacts",
  650. data: { uid: uid },
  651. success: function(data) {
  652. if (!data.data) {
  653. if (data.error && data.error.length) {
  654. message.warning(data.error[0].message);
  655. }
  656. return;
  657. }
  658. for (let item in data.data) {
  659. let theData = data.data[item];
  660. theOption.push(
  661. <Select.Option value={item} key={theData}>
  662. {theData}
  663. </Select.Option>
  664. );
  665. }
  666. }
  667. });
  668. return theOption;
  669. },
  670. //高企培育资料完成情况(比重)
  671. getProportion(uid, callback) {
  672. $.ajax({
  673. method: "get",
  674. dataType: "json",
  675. crossDomain: false,
  676. url: globalConfig.context + "/api/admin/proportion",
  677. data: { uid: uid },
  678. success: function(data) {
  679. if (!data.data) {
  680. if (data.error && data.error.length) {
  681. message.warning(data.error[0].message);
  682. }
  683. data.data = {};
  684. callback(data.data);
  685. }
  686. callback(data.data);
  687. }
  688. });
  689. },
  690. //保存高企培育资料完成情况
  691. saveProportion(id, uid, sign, status) {
  692. $.ajax({
  693. method: "post",
  694. dataType: "json",
  695. crossDomain: false,
  696. url: globalConfig.context + "/api/admin/confirmProportion",
  697. data: {
  698. id: id,
  699. uid: uid,
  700. sign: sign,
  701. status: status
  702. },
  703. success: function(data) {
  704. if (!data.data) {
  705. if (data.error && data.error.length) {
  706. message.warning(data.error[0].message);
  707. }
  708. return;
  709. }
  710. }
  711. });
  712. },
  713. //获取window.location.search传的值
  714. getSearchUrl(e) {
  715. let searchURL = e;
  716. let theObj = {};
  717. searchURL = searchURL.substring(1, searchURL.length);
  718. theObj[searchURL.split("&")[0].split("=")[0]] = searchURL
  719. .split("&")[0]
  720. .split("=")[1];
  721. if (searchURL.split("&")[1]) {
  722. theObj[searchURL.split("&")[1].split("=")[0]] = searchURL
  723. .split("&")[1]
  724. .split("=")[1];
  725. if (searchURL.split("&")[2]) {
  726. theObj[searchURL.split("&")[2].split("=")[0]] = searchURL
  727. .split("&")[2]
  728. .split("=")[1];
  729. }
  730. }
  731. return theObj;
  732. },
  733. //预览接口
  734. getPreview(id, url, sign, callback) {
  735. $.ajax({
  736. method: "get",
  737. dataType: "json",
  738. crossDomain: false,
  739. url: globalConfig.context + "/api/admin/preview/" + url,
  740. data: {
  741. id: id,
  742. sign: sign
  743. },
  744. success: function(data) {
  745. if (!data.data) {
  746. if (data.error && data.error.length) {
  747. message.warning(data.error[0].message);
  748. }
  749. }
  750. callback(
  751. "https://view.officeapps.live.com/op/view.aspx?src=" +
  752. encodeURIComponent(
  753. location.origin +
  754. globalConfig.context +
  755. "/open/preview?" +
  756. data.data
  757. )
  758. );
  759. }
  760. });
  761. },
  762. //获取企业规模
  763. getScaleState(e) {
  764. if (e) {
  765. let theType = "";
  766. scaleList.map(function(item) {
  767. if (item.value == e) {
  768. theType = item.key;
  769. }
  770. });
  771. return theType;
  772. }
  773. },
  774. //获取企业类型
  775. getCompanyType(type1, type2) {
  776. let companyTypeList = [];
  777. for (let i = 0; i < companyType.length; i++) {
  778. companyTypeList.push({
  779. value: companyType[i].value,
  780. label: companyType[i].label
  781. });
  782. if (companyType[i].children) {
  783. for (let j = 0; j < companyType[i].children.length; j++) {
  784. companyTypeList.push({
  785. value: companyType[i].children[j].value,
  786. label: companyType[i].children[j].label
  787. });
  788. }
  789. }
  790. }
  791. companyTypeList.sort(function(a, b) {
  792. return a.value - b.value;
  793. });
  794. let typeKey = "";
  795. companyTypeList.map(function(item) {
  796. if (type1 == item.value) {
  797. typeKey = item.label;
  798. }
  799. if (type2 == item.value) {
  800. typeKey = typeKey + "/" + item.label;
  801. }
  802. });
  803. return typeKey;
  804. },
  805. //获取企业行业
  806. getIndustryType(e) {
  807. if (e) {
  808. let theType = "";
  809. industryList.map(function(item) {
  810. if (item.value == e) {
  811. theType = item.key;
  812. }
  813. });
  814. return theType;
  815. }
  816. },
  817. //获取合同状态
  818. getContractType: function(e) {
  819. if (e) {
  820. let theType = "";
  821. contractTypeList.map(function(item) {
  822. if (item.value == e) {
  823. theType = item.key;
  824. }
  825. });
  826. return theType;
  827. }
  828. },
  829. //获取合同类型
  830. getContractState: function(e) {
  831. if (e) {
  832. let theType = "";
  833. contractStateList.map(function(item) {
  834. if (item.value == e) {
  835. theType = item.key;
  836. }
  837. });
  838. return theType;
  839. }
  840. },
  841. //获取需求类型
  842. getDemandType: function(e) {
  843. if (e || e == 0) {
  844. let str = e.toString();
  845. let theType = "";
  846. demandTypeList.map(function(item) {
  847. if (item.value == str) {
  848. theType = item.key;
  849. }
  850. });
  851. return theType;
  852. }
  853. },
  854. //获取成果类型
  855. getAchievementCategory: function(e) {
  856. if (e || e == "0") {
  857. let theType = "";
  858. achievementCategoryList.map(function(item) {
  859. if (item.value == e) {
  860. theType = item.key;
  861. }
  862. });
  863. return theType;
  864. }
  865. },
  866. //获取需求和成果审核状态
  867. getTechAuditStatus: function(e) {
  868. if (e) {
  869. let theType = "";
  870. techAuditStatusList.map(function(item) {
  871. if (item.value == e) {
  872. theType = item.key;
  873. }
  874. });
  875. return theType;
  876. }
  877. },
  878. //获取政策审核状态
  879. getauditStatus: function(e) {
  880. if (e || e >= 0) {
  881. let tt = e.toString();
  882. let theType = "";
  883. auditStatusLists.map(function(item) {
  884. if (item.value == tt) {
  885. theType = item.key;
  886. }
  887. });
  888. return theType;
  889. }
  890. },
  891. //获取需求和成果审核状态
  892. getMaturity: function(e) {
  893. if (e) {
  894. let theType = "";
  895. maturityList.map(function(item) {
  896. if (item.value == e) {
  897. theType = item.key;
  898. }
  899. });
  900. return theType;
  901. }
  902. },
  903. //获取需求和成果审核状态
  904. getTransferMode: function(e) {
  905. if (e) {
  906. let theType = "";
  907. transferModeList.map(function(item) {
  908. if (item.value == e) {
  909. theType = item.key;
  910. }
  911. });
  912. return theType;
  913. }
  914. },
  915. //获取创新度状态
  916. getInnovation: function(e) {
  917. if (e || e == "0") {
  918. let theType = "";
  919. innovationList.map(function(item) {
  920. if (item.value == e) {
  921. theType = item.key;
  922. }
  923. });
  924. return theType;
  925. }
  926. },
  927. //获取创新度状态
  928. getOrderStatus: function(e) {
  929. if (e) {
  930. let theType = "";
  931. orderStatusList.map(function(item) {
  932. if (item.value == e) {
  933. theType = item.key;
  934. }
  935. });
  936. return theType;
  937. }
  938. },
  939. //科技管理
  940. //活动圈后台管理
  941. getActivityType: function(e) {
  942. if (e) {
  943. let theType = "";
  944. activityType.map(function(item) {
  945. if (item.value == e) {
  946. theType = item.key;
  947. }
  948. });
  949. return theType;
  950. }
  951. },
  952. getActivityForm: function(e) {
  953. if (e) {
  954. let theType = "";
  955. activityForm.map(function(item) {
  956. if (item.value == e) {
  957. theType = item.key;
  958. }
  959. });
  960. return theType;
  961. }
  962. },
  963. //是否展示在首页
  964. gethot: function(e) {
  965. if (e) {
  966. let theType = "";
  967. hot.map(function(item) {
  968. if (item.value == e) {
  969. theType = item.key;
  970. }
  971. });
  972. return theType;
  973. }
  974. },
  975. //是否精品
  976. getboutique: function(e) {
  977. if (e) {
  978. let theType = "";
  979. boutique.map(function(item) {
  980. if (item.value == e) {
  981. theType = item.key;
  982. }
  983. });
  984. return theType;
  985. }
  986. },
  987. //客户类型
  988. getcustomerTyp: function(e) {
  989. if (e) {
  990. let theType = "";
  991. customerTyp.map(function(item) {
  992. if (item.value == e) {
  993. theType = item.key;
  994. }
  995. });
  996. return theType;
  997. }
  998. },
  999. //省份
  1000. getcityArr: function(e) {
  1001. if (e) {
  1002. let theType = "";
  1003. cityArr.map(function(item) {
  1004. if (item.value == e) {
  1005. theType = item.key;
  1006. }
  1007. });
  1008. return theType;
  1009. }
  1010. },
  1011. //客户状态
  1012. getcustomerStatue: function(e) {
  1013. if (e || e == 0) {
  1014. let theType = "";
  1015. customerStatus.map(function(item) {
  1016. if (item.value == e) {
  1017. theType = item.key;
  1018. }
  1019. });
  1020. return theType;
  1021. }
  1022. },
  1023. //账户状态
  1024. getStatuslist: function(e) {
  1025. if (e) {
  1026. let theType = "";
  1027. statuslist.map(function(item) {
  1028. if (item.value == e) {
  1029. theType = item.key;
  1030. }
  1031. });
  1032. return theType;
  1033. }
  1034. },
  1035. //意向服务
  1036. getCompanyIntention: function(e) {
  1037. if (e) {
  1038. let theType = "";
  1039. intentionalService.map(function(item) {
  1040. if (item.value == e) {
  1041. theType = item.key;
  1042. }
  1043. });
  1044. return theType;
  1045. }
  1046. },
  1047. //客户标签
  1048. getTag: function(e) {
  1049. if (e) {
  1050. let theType = "";
  1051. tag.map(function(item) {
  1052. if (item.value == e) {
  1053. theType = item.key;
  1054. }
  1055. });
  1056. return theType;
  1057. }
  1058. },
  1059. //最新跟进
  1060. getfllowSituation: function(e) {
  1061. if (e || e == 0) {
  1062. let theType = "";
  1063. newFollow.map(function(item) {
  1064. if (item.value == e) {
  1065. theType = item.key;
  1066. }
  1067. });
  1068. return theType;
  1069. }
  1070. },
  1071. //性别
  1072. getsex: function(e) {
  1073. if (e) {
  1074. let theType = "";
  1075. sex.map(function(item) {
  1076. if (item.value == e) {
  1077. theType = item.key;
  1078. }
  1079. });
  1080. return theType;
  1081. }
  1082. },
  1083. //联系方式
  1084. getcontact: function(e) {
  1085. if (e) {
  1086. let theType = "";
  1087. contact.map(function(item) {
  1088. if (item.value == e) {
  1089. theType = item.key;
  1090. }
  1091. });
  1092. return theType;
  1093. }
  1094. },
  1095. //是否文字与数字转换
  1096. getWhether: function(e) {
  1097. if (e) {
  1098. let theType = "";
  1099. Whether.map(function(item) {
  1100. if (item.value == e) {
  1101. theType = item.key;
  1102. }
  1103. });
  1104. return theType;
  1105. }
  1106. },
  1107. //是否实名认证
  1108. getCertification: function(e) {
  1109. if (e) {
  1110. let theType = "";
  1111. Certification.map(function(item) {
  1112. if (item.value == e) {
  1113. theType = item.key;
  1114. }
  1115. });
  1116. return theType;
  1117. }
  1118. },
  1119. //会员状态
  1120. getCurrentMember: function(e) {
  1121. if (e) {
  1122. let theType = "";
  1123. currentMember.map(function(item) {
  1124. if (item.value == e) {
  1125. theType = item.key;
  1126. }
  1127. });
  1128. return theType;
  1129. }
  1130. },
  1131. //会员等级
  1132. getLvl: function(e) {
  1133. if (e) {
  1134. let theType = "";
  1135. lvl.map(function(item) {
  1136. if (item.value == e) {
  1137. theType = item.key;
  1138. }
  1139. });
  1140. return theType;
  1141. }
  1142. },
  1143. //省份转换
  1144. getprovince: function(e) {
  1145. let nub = parseInt(e);
  1146. let theType = "";
  1147. if (nub <= 34) {
  1148. provinceList.map(function(item) {
  1149. if (item.id == nub) {
  1150. theType = item.name;
  1151. }
  1152. });
  1153. }
  1154. if (nub > 34 && nub < 380) {
  1155. provinceList.map(function(item) {
  1156. item.cityList.map(function(city) {
  1157. if (city.id == nub) {
  1158. theType = city.name;
  1159. }
  1160. });
  1161. });
  1162. }
  1163. if (nub >= 380) {
  1164. provinceList.map(function(item) {
  1165. item.cityList.map(function(city) {
  1166. city.areaList.map(function(areas) {
  1167. if (areas.id == nub) {
  1168. theType = areas.name;
  1169. }
  1170. });
  1171. });
  1172. });
  1173. }
  1174. return theType;
  1175. },
  1176. //我的业务跟进状态
  1177. getStatusFollow: function(e) {
  1178. let theType = "";
  1179. if (e) {
  1180. theType = "跟进中";
  1181. } else {
  1182. theType = "停止跟进";
  1183. }
  1184. return theType;
  1185. },
  1186. //我的业务跟进状态
  1187. getContactType: function(e) {
  1188. if (e) {
  1189. let theType = "";
  1190. contactType.map(function(item) {
  1191. if (item.value == e) {
  1192. theType = item.key;
  1193. }
  1194. });
  1195. return theType;
  1196. }
  1197. },
  1198. //社会属性
  1199. getSocialAttribute: function(e) {
  1200. if (e) {
  1201. let theType = "";
  1202. socialAttribute.map(function(item) {
  1203. if (item.value == e) {
  1204. theType = item.key;
  1205. }
  1206. });
  1207. return theType;
  1208. }
  1209. },
  1210. //行业
  1211. getIndustry: function(e) {
  1212. if (e) {
  1213. let theType = "";
  1214. industry.map(function(item) {
  1215. if (item.value == e) {
  1216. theType = item.key;
  1217. }
  1218. });
  1219. return theType;
  1220. }
  1221. },
  1222. //岗位
  1223. getStation: function(e) {
  1224. if (e) {
  1225. let theType = "";
  1226. station.map(function(item) {
  1227. if (item.value == e) {
  1228. theType = item.key;
  1229. }
  1230. });
  1231. return theType;
  1232. }
  1233. },
  1234. //职务
  1235. getPost: function(e) {
  1236. if (e) {
  1237. let theType = "";
  1238. post.map(function(item) {
  1239. if (item.value == e) {
  1240. theType = item.key;
  1241. }
  1242. });
  1243. return theType;
  1244. }
  1245. },
  1246. //组织类型
  1247. getPattern: function(e) {
  1248. if (e) {
  1249. let theType = "";
  1250. patternOrganization.map(function(item) {
  1251. if (item.value == e) {
  1252. theType = item.key;
  1253. }
  1254. });
  1255. return theType;
  1256. }
  1257. },
  1258. //组织状态
  1259. getCondition: function(e) {
  1260. if (e) {
  1261. let theType = "";
  1262. conditionOrganization.map(function(item) {
  1263. if (item.value == e) {
  1264. theType = item.key;
  1265. }
  1266. });
  1267. return theType;
  1268. }
  1269. },
  1270. //品类状态
  1271. getCategoryState: function(e) {
  1272. if (e) {
  1273. let theType = "";
  1274. categoryState.map(function(item) {
  1275. if (item.value == e) {
  1276. theType = item.key;
  1277. }
  1278. });
  1279. return theType;
  1280. }
  1281. },
  1282. //实名认证
  1283. getAuditStatus: function(index) {
  1284. let e = index ? index.toString() : "";
  1285. if (e) {
  1286. let theType = "";
  1287. auditStatusL.map(function(item) {
  1288. if (item.value == e) {
  1289. theType = item.key;
  1290. }
  1291. });
  1292. return theType;
  1293. }
  1294. },
  1295. //品类状态
  1296. getGameState: function(index) {
  1297. if (index || index == 0) {
  1298. let theType = "";
  1299. gameState.map(function(item) {
  1300. if (item.value == index) {
  1301. theType = item.key;
  1302. }
  1303. });
  1304. return theType;
  1305. }
  1306. },
  1307. //消息类型
  1308. getMessageType: function(index) {
  1309. if (index || index == 0) {
  1310. let theType = "";
  1311. gameState.map(function(item) {
  1312. if (item.value == index) {
  1313. theType = item.key;
  1314. }
  1315. });
  1316. return theType;
  1317. }
  1318. },
  1319. //发送目标
  1320. getDesignated: function(index) {
  1321. let e = index ? index.toString() : "";
  1322. if (e) {
  1323. let theType = "";
  1324. designated.map(function(item) {
  1325. if (item.value == e) {
  1326. theType = item.key;
  1327. }
  1328. });
  1329. return theType;
  1330. }
  1331. },
  1332. //客户端
  1333. getClient: function(index) {
  1334. let e = index ? index.toString() : "";
  1335. if (e) {
  1336. let theType = "";
  1337. client.map(function(item) {
  1338. if (item.value == e) {
  1339. theType = item.key;
  1340. }
  1341. });
  1342. return theType;
  1343. }
  1344. },
  1345. //是否置顶
  1346. getStick: function(index) {
  1347. let e = index ? index.toString() : "";
  1348. if (e) {
  1349. let theType = "";
  1350. stick.map(function(item) {
  1351. if (item.value == e) {
  1352. theType = item.key;
  1353. }
  1354. });
  1355. return theType;
  1356. }
  1357. },
  1358. getFeatured: function(index) {
  1359. let e = index ? index.toString() : "";
  1360. if (e) {
  1361. let theType = "";
  1362. featured.map(function(item) {
  1363. if (item.value == e) {
  1364. theType = item.key;
  1365. }
  1366. });
  1367. return theType;
  1368. }
  1369. },
  1370. getActives: function(e) {
  1371. if (e) {
  1372. let theType = "";
  1373. actives.map(function(item) {
  1374. if (item.value == e) {
  1375. theType = item.key;
  1376. }
  1377. });
  1378. return theType;
  1379. }
  1380. },
  1381. //意向进度
  1382. getIntentProgress: function(e) {
  1383. if (e) {
  1384. let theType = "";
  1385. intentProgress.map(function(item) {
  1386. if (item.value == e) {
  1387. theType = item.key;
  1388. }
  1389. });
  1390. return theType;
  1391. }
  1392. },
  1393. //交易进度
  1394. getTransactionProgress: function(e) {
  1395. if (e) {
  1396. let theType = "";
  1397. transactionProgress.map(function(item) {
  1398. if (item.value == e) {
  1399. theType = item.key;
  1400. }
  1401. });
  1402. return theType;
  1403. }
  1404. },
  1405. //合同进度
  1406. getContractProgress: function(e) {
  1407. if (e) {
  1408. let theType = "";
  1409. contractProgress.map(function(item) {
  1410. if (item.value == e) {
  1411. theType = item.key;
  1412. }
  1413. });
  1414. return theType;
  1415. }
  1416. },
  1417. //项目进度
  1418. getProjectProgress: function(e) {
  1419. if (e) {
  1420. let theType = "";
  1421. projectProgress.map(function(item) {
  1422. if (item.value == e) {
  1423. theType = item.key;
  1424. }
  1425. });
  1426. return theType;
  1427. }
  1428. },
  1429. //订单类型
  1430. getOrderType: function(e) {
  1431. if (e || e == 0) {
  1432. let str = e.toString();
  1433. let theType = "";
  1434. orderType.map(function(item) {
  1435. if (item.value == str) {
  1436. theType = item.key;
  1437. }
  1438. });
  1439. return theType;
  1440. }
  1441. },
  1442. //订单阶段
  1443. getOrderStage: function(e) {
  1444. if (e || e == 0) {
  1445. let str = e.toString();
  1446. let theType = "";
  1447. orderStage.map(function(item) {
  1448. if (item.value == str) {
  1449. theType = item.key;
  1450. }
  1451. });
  1452. return theType;
  1453. }
  1454. },
  1455. //订单状态o
  1456. getOrderState: function(e) {
  1457. if (e || e == 0) {
  1458. let str = e.toString();
  1459. let theType = "";
  1460. orderState.map(function(item) {
  1461. if (item.value == str) {
  1462. theType = item.key;
  1463. }
  1464. });
  1465. return theType;
  1466. }
  1467. },
  1468. //付款状态
  1469. getPaymentState: function(e) {
  1470. if (e || e == 0) {
  1471. let str = e.toString();
  1472. let theType = "";
  1473. paymentState.map(function(item) {
  1474. if (item.value == str) {
  1475. theType = item.key;
  1476. }
  1477. });
  1478. return theType;
  1479. }
  1480. },
  1481. //订单渠道
  1482. getOrderChannel: function(e) {
  1483. if (e || e == 0) {
  1484. let str = e.toString();
  1485. let theType = "";
  1486. orderChannel.map(function(item) {
  1487. if (item.value == str) {
  1488. theType = item.key;
  1489. }
  1490. });
  1491. return theType;
  1492. }
  1493. },
  1494. //特批状态
  1495. getApprovedState: function(e) {
  1496. if (e || e == 0) {
  1497. let str = e.toString();
  1498. let theType = "";
  1499. approvedState.map(function(item) {
  1500. if (item.value == str) {
  1501. theType = item.key;
  1502. }
  1503. });
  1504. return theType;
  1505. }
  1506. },
  1507. //锁定或废除
  1508. getLock: function(e) {
  1509. if (e || e == 0) {
  1510. let str = e.toString();
  1511. let theType = "";
  1512. lock.map(function(item) {
  1513. if (item.value == str) {
  1514. theType = item.key;
  1515. }
  1516. });
  1517. return theType;
  1518. }
  1519. },
  1520. //支付方式
  1521. getPaymentMethod: function(e) {
  1522. if (e || e == 0) {
  1523. let str = e.toString();
  1524. let theType = "";
  1525. paymentMethod.map(function(item) {
  1526. if (item.value == str) {
  1527. theType = item.key;
  1528. }
  1529. });
  1530. return theType;
  1531. }
  1532. },
  1533. //交易渠道 transactionProject
  1534. getTransactionChannel: function(e) {
  1535. if (e || e == 0) {
  1536. let str = e.toString();
  1537. let theType = "";
  1538. transactionChannel.map(function(item) {
  1539. if (item.value == str) {
  1540. theType = item.key;
  1541. }
  1542. });
  1543. return theType;
  1544. }
  1545. },
  1546. //交易科目
  1547. getTransactionProject: function(e) {
  1548. if (e || e == 0) {
  1549. let str = e.toString();
  1550. let theType = "";
  1551. transactionProject.map(function(item) {
  1552. if (item.value == str) {
  1553. theType = item.key;
  1554. }
  1555. });
  1556. return theType;
  1557. }
  1558. },
  1559. //项目状态
  1560. getProjectState: function(e) {
  1561. if (e || e == 0) {
  1562. let str = e.toString();
  1563. let theType = "";
  1564. projectState.map(function(item) {
  1565. if (item.value == str) {
  1566. theType = item.key;
  1567. }
  1568. });
  1569. return theType;
  1570. }
  1571. },
  1572. //任务状态
  1573. getTaskStatus: function(e) {
  1574. if (e || e == 0) {
  1575. let str = e.toString();
  1576. let theType = "";
  1577. taskStatus.map(function(item) {
  1578. if (item.value == str) {
  1579. theType = item.key;
  1580. }
  1581. });
  1582. return theType;
  1583. }
  1584. },
  1585. //公示状态
  1586. getPublishStatus: function(e) {
  1587. if (e || e == 0) {
  1588. let str = e.toString();
  1589. let theType = "";
  1590. publishStatus.map(function(item) {
  1591. if (item.value == str) {
  1592. theType = item.key;
  1593. }
  1594. });
  1595. return theType;
  1596. }
  1597. },
  1598. //变更状态
  1599. getChangeState: function(e) {
  1600. if (e || e == 0) {
  1601. let str = e.toString();
  1602. let theType = "";
  1603. changeState.map(function(item) {
  1604. if (item.value == str) {
  1605. theType = item.key;
  1606. }
  1607. });
  1608. return theType;
  1609. }
  1610. },
  1611. //分派情况
  1612. getDistributeState: function(e) {
  1613. if (e || e == 0) {
  1614. let str = e.toString();
  1615. let theType = "";
  1616. distributeState.map(function(item) {
  1617. if (item.value == str) {
  1618. theType = item.key;
  1619. }
  1620. });
  1621. return theType;
  1622. }
  1623. },
  1624. //客户来源
  1625. getCustomerSource: function(e) {
  1626. if (e || e == 0) {
  1627. let str = e.toString();
  1628. let theType = "";
  1629. customerSource.map(function(item) {
  1630. if (item.value == str) {
  1631. theType = item.key;
  1632. }
  1633. });
  1634. return theType;
  1635. }
  1636. },
  1637. /* g个人中心开发 */
  1638. //发布状态
  1639. getReleaseStateList: function(e) {
  1640. if (e || e == 0) {
  1641. let str = e.toString();
  1642. let theType = "";
  1643. releaseStateList.map(function(item) {
  1644. if (item.value == str) {
  1645. theType = item.key;
  1646. }
  1647. });
  1648. return theType;
  1649. }
  1650. },
  1651. //需求发布位置;
  1652. getReleasePositionList: function(e = []) {
  1653. if (e) {
  1654. let theType = [];
  1655. e.map(item => {
  1656. releasePosition.map(function(atem) {
  1657. if (atem.value == item) {
  1658. theType.push(atem.key);
  1659. }
  1660. });
  1661. });
  1662. return theType.join(" - ");
  1663. }
  1664. },
  1665. //政策发布位置
  1666. getPolicyPosition: function(e = []) {
  1667. if (e) {
  1668. let theType = [];
  1669. e.map(item => {
  1670. policyPosition.map(function(atem) {
  1671. if (atem.value == item) {
  1672. theType.push(atem.key);
  1673. }
  1674. });
  1675. });
  1676. return theType.join(" - ");
  1677. }
  1678. },
  1679. //成果发布位置;
  1680. getAchievementPosition: function(e = []) {
  1681. if (e) {
  1682. let theType = [];
  1683. e.map(item => {
  1684. achievementPosition.map(function(atem) {
  1685. if (atem.value == item) {
  1686. theType.push(atem.key);
  1687. }
  1688. });
  1689. });
  1690. return theType.join(" - ");
  1691. }
  1692. },
  1693. //新闻发布位置
  1694. getNewPosition: function(e = []) {
  1695. if (e) {
  1696. let theType = [];
  1697. e.map(item => {
  1698. newsPosition.map(function(atem) {
  1699. if (atem.value == item) {
  1700. theType.push(atem.key);
  1701. }
  1702. });
  1703. });
  1704. return theType.join(" - ");
  1705. }
  1706. },
  1707. //成果类型;
  1708. getAchievementType: function(e) {
  1709. if (e || e == 0) {
  1710. let str = e.toString();
  1711. let theType = "";
  1712. achievementType.map(function(item) {
  1713. if (item.value == str) {
  1714. theType = item.key;
  1715. }
  1716. });
  1717. return theType;
  1718. }
  1719. },
  1720. //成果交易形式;
  1721. getTransaction: function(e) {
  1722. if (e || e == 0) {
  1723. let str = e.toString();
  1724. let theType = "";
  1725. transaction.map(function(item) {
  1726. if (item.value == str) {
  1727. theType = item.key;
  1728. }
  1729. });
  1730. return theType;
  1731. }
  1732. },
  1733. //新闻类型
  1734. getNewType: function(e) {
  1735. if (e || e == 0) {
  1736. let str = e.toString();
  1737. let theType = "";
  1738. newType.map(function(item) {
  1739. if (item.value == str) {
  1740. theType = item.key;
  1741. }
  1742. });
  1743. return theType;
  1744. }
  1745. },
  1746. //顾问类型
  1747. getAdviserType: function(e) {
  1748. if (e || e == 0) {
  1749. let str = e.toString();
  1750. let theType = "";
  1751. adviserType.map(function(item) {
  1752. if (item.value == str) {
  1753. theType = item.key;
  1754. }
  1755. });
  1756. return theType;
  1757. }
  1758. },
  1759. //认证状态
  1760. getAuthState: function(e) {
  1761. if (e || e == 0) {
  1762. let str = e.toString();
  1763. let theType = "";
  1764. authState.map(function(item) {
  1765. if (item.value == str) {
  1766. theType = item.key;
  1767. }
  1768. });
  1769. return theType;
  1770. }
  1771. },
  1772. //认证状态
  1773. getTypeModule: function(e) {
  1774. if (e || e == 0) {
  1775. let str = e.toString();
  1776. let theType = "";
  1777. typeModule.map(function(item) {
  1778. if (item.value == str) {
  1779. theType = item.key;
  1780. }
  1781. });
  1782. return theType;
  1783. }
  1784. },
  1785. //律师类型
  1786. getLowType: function(e) {
  1787. if (e || e == 0) {
  1788. let str = e.toString();
  1789. let theType = "";
  1790. lowType.map(function(item) {
  1791. if (item.value == str) {
  1792. theType = item.key;
  1793. }
  1794. });
  1795. return theType;
  1796. }
  1797. },
  1798. //消息推送搜索类型转换ziYuanType
  1799. getMsgType: function(e) {
  1800. if (e) {
  1801. let str = e.toString();
  1802. let theType = "";
  1803. msgType.map(function(item) {
  1804. if (item.value == str) {
  1805. theType = item.key;
  1806. }
  1807. });
  1808. return theType;
  1809. }
  1810. },
  1811. //消息推送搜索类型转换数字couponAuthState
  1812. getZiYuanType: function(e) {
  1813. if (e) {
  1814. let str = e.toString();
  1815. let theType = "";
  1816. ziYuanType.map(function(item) {
  1817. if (item.key == str) {
  1818. theType = item.value;
  1819. }
  1820. });
  1821. return theType;
  1822. }
  1823. },
  1824. //抵用券状态
  1825. getCouponAuthState: function(e) {
  1826. if (e) {
  1827. let str = e.toString();
  1828. let theType = "";
  1829. couponAuthState.map(function(item) {
  1830. if (item.key == str) {
  1831. theType = item.value;
  1832. }
  1833. });
  1834. return theType;
  1835. }
  1836. },
  1837. //抵用券来源
  1838. // getCouponCome:function(e){
  1839. // if (e) {
  1840. // let str=e.toString();
  1841. // let theType = '';
  1842. // couponCome.map(function (item) {
  1843. // if (item.key == str) {
  1844. // theType = item.value;
  1845. // };
  1846. // });
  1847. // return theType;
  1848. // }
  1849. // }
  1850. //抵用券来源
  1851. getCouponCome: function(e) {
  1852. if (e || e == "0") {
  1853. let theType = "";
  1854. couponCome.map(function(item) {
  1855. if (item.value == e) {
  1856. theType = item.key;
  1857. }
  1858. });
  1859. return theType;
  1860. }
  1861. },
  1862. //抵用券状态
  1863. getCouponAuthState: function(e) {
  1864. if (e || e == "0") {
  1865. let theType = "";
  1866. couponAuthState.map(function(item) {
  1867. if (item.value == e) {
  1868. theType = item.key;
  1869. }
  1870. });
  1871. return theType;
  1872. }
  1873. },
  1874. //抵用券状态
  1875. getCouponAuthStates: function(e) {
  1876. if (e || e == "0") {
  1877. let theType = "";
  1878. couponAuthStates.map(function(item) {
  1879. if (item.value == e) {
  1880. theType = item.key;
  1881. }
  1882. });
  1883. return theType;
  1884. }
  1885. },
  1886. //采购信息密级
  1887. getSecretType: function(e) {
  1888. if (e || e == "0") {
  1889. let theType = "";
  1890. secretType.map(function(item) {
  1891. if (item.value == e) {
  1892. theType = item.key;
  1893. }
  1894. });
  1895. return theType;
  1896. }
  1897. },
  1898. //采购信息审核状态
  1899. getBuyAuditType: function(e) {
  1900. if (e || e == "0") {
  1901. let theType = "";
  1902. buyAuditType.map(function(item) {
  1903. if (item.value == e) {
  1904. theType = item.key;
  1905. }
  1906. });
  1907. return theType;
  1908. }
  1909. },
  1910. //军转民分类列表
  1911. getCategoryType: function(e) {
  1912. if (e || e == "0") {
  1913. let theType = "";
  1914. categoryType.map(function(item) {
  1915. if (item.value == e) {
  1916. theType = item.key;
  1917. }
  1918. });
  1919. return theType;
  1920. }
  1921. },
  1922. //军转民分类列表
  1923. getCategoryType: function(e) {
  1924. if (e || e == "0") {
  1925. let theType = "";
  1926. categoryType.map(function(item) {
  1927. if (item.value == e) {
  1928. theType = item.key;
  1929. }
  1930. });
  1931. return theType;
  1932. }
  1933. },
  1934. //军转民类型列表
  1935. getCategoryPatent: function(e) {
  1936. if (e || e == "0") {
  1937. let theType = "";
  1938. categoryPatent.map(function(item) {
  1939. if (item.value == e) {
  1940. theType = item.key;
  1941. }
  1942. });
  1943. return theType;
  1944. }
  1945. },
  1946. //军转民类型列表
  1947. getMaturityType: function(e) {
  1948. if (e || e == "0") {
  1949. let theType = "";
  1950. maturityType.map(function(item) {
  1951. if (item.value == e) {
  1952. theType = item.key;
  1953. }
  1954. });
  1955. return theType;
  1956. }
  1957. },
  1958. //军转民类型列表
  1959. getIndateType: function(e) {
  1960. if (e || e == "0") {
  1961. let theType = "";
  1962. indateType.map(function(item) {
  1963. if (item.value == e) {
  1964. theType = item.key;
  1965. }
  1966. });
  1967. return theType;
  1968. }
  1969. },
  1970. getPicPath: function(path, e) {
  1971. return path + e;
  1972. }
  1973. };