tools.js 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120
  1. import { message,Timeline,Select } from 'antd';
  2. import React from 'react';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import {
  6. patentTypeList,
  7. patentStateList,
  8. patentFieldList,
  9. technicalSourceList,
  10. catagoryList,
  11. intellectualGetList,
  12. conversionFormList,
  13. annualReportStateList,
  14. cognizanceStateList,
  15. technologyStateList,
  16. copyrightStateList,
  17. auditStatusList,
  18. scaleList,
  19. companyType,
  20. industryList,
  21. contractTypeList,
  22. contractStateList,
  23. demandTypeList,
  24. achievementCategoryList,
  25. techAuditStatusList,
  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. } from './dataDic.js';
  69. import { provinceList} from './NewDicProvinceList.js';
  70. module.exports = {
  71. splitUrl: function (string, i, url) {
  72. let theList = [];
  73. let theArr = [];
  74. if (string && string.length) {
  75. theArr = string.split(i);
  76. theArr.map(function (item, i) {
  77. theList.push({
  78. uid: -i-1,
  79. url: url + item,
  80. response: {
  81. data: item
  82. }
  83. });
  84. });
  85. }
  86. return theList;
  87. },
  88. getBase64: function (img, callback) {
  89. const reader = new FileReader();
  90. reader.addEventListener('load', () => callback(reader.result));
  91. reader.readAsDataURL(img);
  92. },
  93. beforeUpload: function (file) {
  94. const isLt2M = file.size / 1024 / 1024 < 2;
  95. if (!isLt2M) {
  96. message.error('图片小大必须小于2MB!');
  97. }
  98. return isLt2M;
  99. },
  100. beforeUploadFile: function (file) {
  101. // debugger
  102. // const isJPG = file.type === 'image/jpeg/document';
  103. // if (!isJPG) {
  104. // message.error('You can only upload JPG file!');
  105. // }
  106. // const isLt2M = file.size / 1024 / 1024 < 2;
  107. // if (!isLt2M) {
  108. // message.error('Image must smaller than 2MB!');
  109. // }
  110. // return isJPG && isLt2M;
  111. },
  112. getTime: function (e, t) {
  113. if (e && !t) {
  114. var d = new Date(e);
  115. d = d.getFullYear() + "-" +
  116. ((d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)) + "-" +
  117. (d.getDate() < 10 ? '0' + d.getDate() : d.getDate()) + " ";
  118. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  119. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  120. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  121. return d;
  122. } else if (e && t) {
  123. var d1 = new Date(e);
  124. var d2 = new Date(e);
  125. d2 = d2.setMonth(d1.getMonth() + t);
  126. d2 = new Date(d2)
  127. d2 = d2.getFullYear() + "-" +
  128. ((d2.getMonth() + 1) < 10 ? '0' + (d2.getMonth() + 1) : (d2.getMonth() + 1)) + "-" +
  129. (d2.getDate() < 10 ? '0' + d2.getDate() : d2.getDate()) + " ";
  130. return d2;
  131. } else {
  132. return '';
  133. }
  134. },
  135. getPatentType: function (e) {
  136. if (e) {
  137. let theType = '';
  138. patentTypeList.map(function (item) {
  139. if (item.value == e) {
  140. theType = item.key;
  141. };
  142. });
  143. return theType;
  144. }
  145. },
  146. getPatentState: function (e) {
  147. if (e) {
  148. let theState = '';
  149. patentStateList.map(function (item) {
  150. if (item.value == e) {
  151. theState = item.key;
  152. };
  153. });
  154. return theState;
  155. }
  156. },
  157. getPatentField: function (e) {
  158. if (e) {
  159. let theState = '';
  160. patentFieldList.map(function (item) {
  161. if (item.value == e) {
  162. theState = item.key;
  163. };
  164. });
  165. return theState;
  166. }
  167. },
  168. getTechnicalSource: function (e) {
  169. if (e) {
  170. let theSource = '';
  171. technicalSourceList.map(function (item) {
  172. if (item.value == e) {
  173. theSource = item.key;
  174. };
  175. });
  176. return theSource;
  177. }
  178. },
  179. getCatagory: function (e) {
  180. if (e) {
  181. let theType = '';
  182. catagoryList.map(function (item) {
  183. if (item.value == e) {
  184. theType = item.key;
  185. };
  186. });
  187. return theType;
  188. }
  189. },
  190. getIntellectualObtainWay: function (e) {
  191. if (e) {
  192. let theType = '';
  193. intellectualGetList.map(function (item) {
  194. if (item.value == e) {
  195. theType = item.key;
  196. };
  197. });
  198. return theType;
  199. }
  200. },
  201. getConversionForm: function (e) {
  202. if (e) {
  203. let theType = '';
  204. conversionFormList.map(function (item) {
  205. if (item.value == e) {
  206. theType = item.key;
  207. };
  208. });
  209. return theType;
  210. }
  211. },
  212. getAnnualReportState: function (e) {
  213. if (e) {
  214. let theType = '';
  215. annualReportStateList.map(function (item) {
  216. if (item.value == e) {
  217. theType = item.key;
  218. };
  219. });
  220. return theType;
  221. }
  222. },
  223. getCognizanceState: function (e) {
  224. if (e) {
  225. let theType = '';
  226. cognizanceStateList.map(function (item) {
  227. if (item.value == e) {
  228. theType = item.key;
  229. };
  230. });
  231. return theType;
  232. }
  233. },
  234. getTechnologyState: function (e) {
  235. if (e) {
  236. let theType = '';
  237. technologyStateList.map(function (item) {
  238. if (item.value == e) {
  239. theType = item.key;
  240. };
  241. });
  242. return theType;
  243. }
  244. },
  245. //显示用户认证状态
  246. getAuditState: function (e) {
  247. if (e) {
  248. let theType = '';
  249. auditStatusList.map(function (item) {
  250. if (item.value == e) {
  251. theType = item.key;
  252. };
  253. });
  254. return theType;
  255. }
  256. },
  257. getCopyrightState: function (e) {
  258. if (e) {
  259. let theType = '';
  260. copyrightStateList.map(function (item) {
  261. if (item.value == e) {
  262. theType = item.key;
  263. };
  264. });
  265. return theType;
  266. }
  267. },
  268. downloadFile: function (path, fileName) {
  269. window.open(globalConfig.context + '/open/downloadFile?path=' + path + '&fileName=' + fileName)
  270. },
  271. techDownloadFile: function (url, id) {
  272. window.open(globalConfig.context + url + '?id=' + id)
  273. },
  274. copyrightDownloadFile: function (id, sign, url) {
  275. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign)
  276. },
  277. newDownloadFile: function (id, sign, url,type) {
  278. if (!type ) {
  279. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign);
  280. };
  281. if ( type ) {
  282. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign + '&type=' + type);
  283. };
  284. },
  285. companySearch(input, option) {
  286. return option.props.children.indexOf(input) >= 0
  287. },
  288. getVacations(ccccc){
  289. let now = new Date();
  290. let theYear = now.getFullYear();
  291. $.ajax({
  292. type: "get",
  293. dataType: "json",
  294. crossDomain: false,
  295. url: globalConfig.context + '/open/html/json/vacations' + theYear,
  296. success: (data)=>{
  297. if (data) {
  298. ccccc(data);
  299. };
  300. }
  301. });
  302. },
  303. getInUrgentTime(date, inUrgent,vocations) {
  304. if ( vocations && vocations.length ){
  305. let now = new Date(date),addNum = 0;
  306. for (var i = 1; i <= inUrgent;) {
  307. now.setDate(now.getDate() + 1);
  308. let thebool = true;
  309. vocations.map((item)=>{
  310. if ( item == getKey(now)) {
  311. thebool= false;
  312. }
  313. });
  314. if ( thebool ) {
  315. i++
  316. };
  317. };
  318. return now;
  319. };
  320. function getKey(date) {
  321. var year = date.getFullYear(),
  322. month = date.getMonth() + 1,
  323. day = date.getDate();
  324. year = "" + year;
  325. month = (month > 9 ? "" : "0") + month;
  326. day = (day > 9 ? "" : "0") + day;
  327. return year + month + day;
  328. }
  329. },
  330. //各种通过接口获取下拉列表
  331. setPatentStateOption(permission) {
  332. let theArr = [];
  333. patentStateList.map(function (item) {
  334. for (let i = 0; i < permission.length; i++) {
  335. if (item.value == permission[i]) {
  336. theArr.push(item);
  337. };
  338. };
  339. });
  340. return theArr;
  341. },
  342. setUserContactsList(){
  343. let theOption = [];
  344. $.ajax({
  345. method: "get",
  346. dataType: "json",
  347. crossDomain: false,
  348. url: globalConfig.context + '/api/user/getContacts',
  349. success: function (data) {
  350. if (!data.data) {
  351. if ( data.error && data.error.length ) {
  352. message.warning(data.error[0].message);
  353. };
  354. return;
  355. };
  356. for (let item in data.data) {
  357. let theData = data.data[item];
  358. theOption.push(
  359. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  360. );
  361. };
  362. }
  363. });
  364. return theOption;
  365. },
  366. setAdminContactsList(uid){
  367. let theOption = [];
  368. $.ajax({
  369. method: "get",
  370. dataType: "json",
  371. crossDomain: false,
  372. url: globalConfig.context + '/api/admin/getContacts',
  373. data:{ "uid": uid },
  374. success: function (data) {
  375. if (!data.data) {
  376. if ( data.error && data.error.length ) {
  377. message.warning(data.error[0].message);
  378. };
  379. return;
  380. };
  381. for (let item in data.data) {
  382. let theData = data.data[item];
  383. theOption.push(
  384. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  385. );
  386. };
  387. }
  388. });
  389. return theOption;
  390. },
  391. //高企培育资料完成情况(比重)
  392. getProportion(uid,callback){
  393. $.ajax({
  394. method: "get",
  395. dataType: "json",
  396. crossDomain: false,
  397. url: globalConfig.context + '/api/admin/proportion',
  398. data:{ "uid": uid },
  399. success: function (data) {
  400. if (!data.data) {
  401. if ( data.error && data.error.length ) {
  402. message.warning(data.error[0].message);
  403. };
  404. data.data = {}
  405. callback(data.data);
  406. };
  407. callback(data.data);
  408. }
  409. });
  410. },
  411. //保存高企培育资料完成情况
  412. saveProportion(id,uid,sign,status){
  413. $.ajax({
  414. method: "post",
  415. dataType: "json",
  416. crossDomain: false,
  417. url: globalConfig.context + '/api/admin/confirmProportion',
  418. data:{
  419. "id": id,
  420. "uid":uid,
  421. "sign":sign,
  422. "status":status
  423. },
  424. success: function (data) {
  425. if (!data.data) {
  426. if ( data.error && data.error.length ) {
  427. message.warning(data.error[0].message);
  428. };
  429. return;
  430. };
  431. }
  432. });
  433. },
  434. //获取window.location.search传的值
  435. getSearchUrl(e){
  436. let searchURL = e;
  437. let theObj = {};
  438. searchURL = searchURL.substring(1, searchURL.length);
  439. theObj[searchURL.split("&")[0].split("=")[0]] = searchURL.split("&")[0].split("=")[1];
  440. if ( searchURL.split("&")[1] ) {
  441. theObj[searchURL.split("&")[1].split("=")[0]] = searchURL.split("&")[1].split("=")[1];
  442. if ( searchURL.split("&")[2] ) {
  443. theObj[searchURL.split("&")[2].split("=")[0]] = searchURL.split("&")[2].split("=")[1];
  444. };
  445. };
  446. return theObj;
  447. },
  448. //预览接口
  449. getPreview(id,url,sign,callback){
  450. $.ajax({
  451. method: "get",
  452. dataType: "json",
  453. crossDomain: false,
  454. url: globalConfig.context + "/api/admin/preview/" + url,
  455. data:{
  456. "id": id,
  457. "sign": sign
  458. },
  459. success: function (data) {
  460. if (!data.data) {
  461. if ( data.error && data.error.length ) {
  462. message.warning(data.error[0].message);
  463. };
  464. };
  465. callback('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data.data));
  466. }
  467. });
  468. },
  469. //获取企业规模
  470. getScaleState(e) {
  471. if (e) {
  472. let theType = '';
  473. scaleList.map(function (item) {
  474. if (item.value == e) {
  475. theType = item.key;
  476. };
  477. });
  478. return theType;
  479. }
  480. },
  481. //获取企业类型
  482. getCompanyType(type1, type2) {
  483. let companyTypeList = [];
  484. for (let i = 0; i < companyType.length; i++) {
  485. companyTypeList.push({
  486. value: companyType[i].value,
  487. label: companyType[i].label
  488. });
  489. if (companyType[i].children) {
  490. for (let j = 0; j < companyType[i].children.length; j++) {
  491. companyTypeList.push({
  492. value: companyType[i].children[j].value,
  493. label: companyType[i].children[j].label
  494. });
  495. };
  496. }
  497. };
  498. companyTypeList.sort(function (a, b) {
  499. return a.value - b.value
  500. });
  501. let typeKey = "";
  502. companyTypeList.map(function (item) {
  503. if (type1 == item.value) {
  504. typeKey = item.label;
  505. };
  506. if (type2 == item.value) {
  507. typeKey = typeKey + "/" + item.label;
  508. };
  509. });
  510. return typeKey;
  511. },
  512. //获取企业行业
  513. getIndustryType(e) {
  514. if (e) {
  515. let theType = '';
  516. industryList.map(function (item) {
  517. if (item.value == e) {
  518. theType = item.key;
  519. };
  520. });
  521. return theType;
  522. }
  523. },
  524. //获取合同状态
  525. getContractType: function (e) {
  526. if (e) {
  527. let theType = '';
  528. contractTypeList.map(function (item) {
  529. if (item.value == e) {
  530. theType = item.key;
  531. };
  532. });
  533. return theType;
  534. }
  535. },
  536. //获取合同类型
  537. getContractState: function (e) {
  538. if (e) {
  539. let theType = '';
  540. contractStateList.map(function (item) {
  541. if (item.value == e) {
  542. theType = item.key;
  543. };
  544. });
  545. return theType;
  546. }
  547. },
  548. //获取需求类型
  549. getDemandType: function (e) {
  550. if (e) {
  551. let theType = '';
  552. demandTypeList.map(function (item) {
  553. if (item.value == e) {
  554. theType = item.key;
  555. };
  556. });
  557. return theType;
  558. }
  559. },
  560. //获取成果类型
  561. getAchievementCategory: function (e) {
  562. if (e) {
  563. let theType = '';
  564. achievementCategoryList.map(function (item) {
  565. if (item.value == e) {
  566. theType = item.key;
  567. };
  568. });
  569. return theType;
  570. }
  571. },
  572. //获取需求和成果审核状态
  573. getTechAuditStatus: function (e) {
  574. if (e) {
  575. let theType = '';
  576. techAuditStatusList.map(function (item) {
  577. if (item.value == e) {
  578. theType = item.key;
  579. };
  580. });
  581. return theType;
  582. }
  583. },
  584. //获取需求和成果审核状态
  585. getMaturity: function (e) {
  586. if (e) {
  587. let theType = '';
  588. maturityList.map(function (item) {
  589. if (item.value == e) {
  590. theType = item.key;
  591. };
  592. });
  593. return theType;
  594. }
  595. },
  596. //获取需求和成果审核状态
  597. getTransferMode: function (e) {
  598. if (e) {
  599. let theType = '';
  600. transferModeList.map(function (item) {
  601. if (item.value == e) {
  602. theType = item.key;
  603. };
  604. });
  605. return theType;
  606. }
  607. },
  608. //获取创新度状态
  609. getInnovation: function (e) {
  610. if (e) {
  611. let theType = '';
  612. innovationList.map(function (item) {
  613. if (item.value == e) {
  614. theType = item.key;
  615. };
  616. });
  617. return theType;
  618. }
  619. },
  620. //获取创新度状态
  621. getOrderStatus: function (e) {
  622. if (e) {
  623. let theType = '';
  624. orderStatusList.map(function (item) {
  625. if (item.value == e) {
  626. theType = item.key;
  627. };
  628. });
  629. return theType;
  630. }
  631. },
  632. //科技管理
  633. //活动圈后台管理
  634. getActivityType: function (e) {
  635. if (e) {
  636. let theType = '';
  637. activityType.map(function (item) {
  638. if (item.value == e) {
  639. theType = item.key;
  640. };
  641. });
  642. return theType;
  643. }
  644. },
  645. getActivityForm: function (e) {
  646. if (e) {
  647. let theType = '';
  648. activityForm.map(function (item) {
  649. if (item.value == e) {
  650. theType = item.key;
  651. };
  652. });
  653. return theType;
  654. }
  655. },
  656. //是否展示在首页
  657. gethot: function (e) {
  658. if (e) {
  659. let theType = '';
  660. hot.map(function (item) {
  661. if (item.value == e) {
  662. theType = item.key;
  663. };
  664. });
  665. return theType;
  666. }
  667. },
  668. //是否精品
  669. getboutique: function (e) {
  670. if (e) {
  671. let theType = '';
  672. boutique.map(function (item) {
  673. if (item.value == e) {
  674. theType = item.key;
  675. };
  676. });
  677. return theType;
  678. }
  679. },
  680. //客户类型
  681. getcustomerTyp: function (e) {
  682. if (e) {
  683. let theType = '';
  684. customerTyp.map(function (item) {
  685. if (item.value == e) {
  686. theType = item.key;
  687. };
  688. });
  689. return theType;
  690. }
  691. },
  692. //省份
  693. getcityArr: function (e) {
  694. if (e) {
  695. let theType = '';
  696. cityArr.map(function (item) {
  697. if (item.value == e) {
  698. theType = item.key;
  699. }
  700. });
  701. return theType;
  702. }
  703. },
  704. //客户状态
  705. getcustomerStatue: function (e) {
  706. if (e) {
  707. let theType = '';
  708. customerStatus.map(function (item) {
  709. if (item.value == e) {
  710. theType = item.key;
  711. };
  712. });
  713. return theType;
  714. }
  715. },
  716. //账户状态
  717. getStatuslist: function (e) {
  718. if (e) {
  719. let theType = '';
  720. statuslist.map(function (item) {
  721. if (item.value == e) {
  722. theType = item.key;
  723. };
  724. });
  725. return theType;
  726. }
  727. },
  728. //意向服务
  729. getCompanyIntention: function (e) {
  730. if (e) {
  731. let theType = '';
  732. intentionalService.map(function (item) {
  733. if (item.value == e) {
  734. theType = item.key;
  735. };
  736. });
  737. return theType;
  738. }
  739. },
  740. //客户标签
  741. getTag: function (e) {
  742. if (e) {
  743. let theType = '';
  744. tag.map(function (item) {
  745. if (item.value == e) {
  746. theType = item.key;
  747. };
  748. });
  749. return theType;
  750. }
  751. },
  752. //最新跟进
  753. getfllowSituation: function (e) {
  754. if (e) {
  755. let theType = '';
  756. newFollow.map(function (item) {
  757. if (item.value == e) {
  758. theType = item.key;
  759. };
  760. });
  761. return theType;
  762. }
  763. },
  764. //性别
  765. getsex: function (e) {
  766. if (e) {
  767. let theType = '';
  768. sex.map(function (item) {
  769. if (item.value == e) {
  770. theType = item.key;
  771. };
  772. });
  773. return theType;
  774. }
  775. },
  776. //联系方式
  777. getcontact: function (e) {
  778. if (e) {
  779. let theType = '';
  780. contact.map(function (item) {
  781. if (item.value == e) {
  782. theType = item.key;
  783. };
  784. });
  785. return theType;
  786. }
  787. },
  788. //是否文字与数字转换
  789. getWhether: function (e) {
  790. if (e) {
  791. let theType = '';
  792. Whether.map(function (item) {
  793. if (item.value == e) {
  794. theType = item.key;
  795. };
  796. });
  797. return theType;
  798. }
  799. },
  800. //是否实名认证
  801. getCertification: function (e) {
  802. if (e) {
  803. let theType = '';
  804. Certification.map(function (item) {
  805. if (item.value == e) {
  806. theType = item.key;
  807. };
  808. });
  809. return theType;
  810. }
  811. },
  812. //会员状态
  813. getCurrentMember: function (e) {
  814. if (e) {
  815. let theType = '';
  816. currentMember.map(function (item) {
  817. if (item.value == e) {
  818. theType = item.key;
  819. };
  820. });
  821. return theType;
  822. }
  823. },
  824. //会员等级
  825. getLvl: function (e) {
  826. if (e) {
  827. let theType = '';
  828. lvl.map(function (item) {
  829. if (item.value == e) {
  830. theType = item.key;
  831. };
  832. });
  833. return theType;
  834. }
  835. },
  836. //省份转换
  837. getprovince:function(e){
  838. let nub=parseInt(e);
  839. let theType = '';
  840. if (nub<=34) {
  841. provinceList.map(function (item) {
  842. if (item.id == nub) {
  843. theType = item.name;
  844. };
  845. });
  846. }
  847. if(nub>34&&nub<380){
  848. provinceList.map(function (item) {
  849. item.cityList.map(function (city) {
  850. if (city.id == nub) {
  851. theType = city.name;
  852. };
  853. });
  854. });
  855. }
  856. if(nub>=380){
  857. provinceList.map(function (item) {
  858. item.cityList.map(function (city) {
  859. city.areaList.map(function (areas) {
  860. if (areas.id == nub) {
  861. theType = areas.name;
  862. };
  863. });
  864. });
  865. })
  866. }
  867. return theType;
  868. },
  869. //我的业务跟进状态
  870. getStatusFollow:function(e){
  871. let theType = '';
  872. if(e){
  873. theType ='跟进中' ;
  874. }else{
  875. theType ='停止跟进';
  876. }
  877. return theType;
  878. },
  879. //我的业务跟进状态
  880. getContactType:function(e){
  881. if (e) {
  882. let theType = '';
  883. contactType.map(function (item) {
  884. if (item.value == e) {
  885. theType = item.key;
  886. };
  887. });
  888. return theType;
  889. }
  890. },
  891. //社会属性
  892. getSocialAttribute:function(e){
  893. if (e) {
  894. let theType = '';
  895. socialAttribute.map(function (item) {
  896. if (item.value == e) {
  897. theType = item.key;
  898. };
  899. });
  900. return theType;
  901. }
  902. },
  903. //行业
  904. getIndustry:function(e){
  905. if (e) {
  906. let theType = '';
  907. industry.map(function (item) {
  908. if (item.value == e) {
  909. theType = item.key;
  910. };
  911. });
  912. return theType;
  913. }
  914. },
  915. //岗位
  916. getStation:function(e){
  917. if (e) {
  918. let theType = '';
  919. station.map(function (item) {
  920. if (item.value == e) {
  921. theType = item.key;
  922. };
  923. });
  924. return theType;
  925. }
  926. },
  927. //职务
  928. getPost:function(e){
  929. if (e) {
  930. let theType = '';
  931. post.map(function (item) {
  932. if (item.value == e) {
  933. theType = item.key;
  934. };
  935. });
  936. return theType;
  937. }
  938. },
  939. //组织类型
  940. getPattern:function(e){
  941. if (e) {
  942. let theType = '';
  943. patternOrganization.map(function (item) {
  944. if (item.value == e) {
  945. theType = item.key;
  946. };
  947. });
  948. return theType;
  949. }
  950. },
  951. //组织状态
  952. getCondition:function(e){
  953. if (e) {
  954. let theType = '';
  955. conditionOrganization.map(function (item) {
  956. if (item.value == e) {
  957. theType = item.key;
  958. };
  959. });
  960. return theType;
  961. }
  962. },
  963. //品类状态
  964. getCategoryState:function(e){
  965. if (e) {
  966. let theType = '';
  967. categoryState.map(function (item) {
  968. if (item.value == e) {
  969. theType = item.key;
  970. };
  971. });
  972. return theType;
  973. }
  974. },
  975. //实名认证
  976. getAuditStatus:function(index){
  977. let e=index?index.toString():'';
  978. if (e) {
  979. let theType = '';
  980. auditStatusL.map(function (item) {
  981. if (item.value == e) {
  982. theType = item.key;
  983. };
  984. });
  985. return theType;
  986. }
  987. },
  988. //品类状态
  989. getGameState:function(index){
  990. let e=index?index.toString():'';
  991. if (e) {
  992. let theType = '';
  993. gameState.map(function (item) {
  994. if (item.value == e) {
  995. theType = item.key;
  996. };
  997. });
  998. return theType;
  999. }
  1000. },
  1001. //消息类型
  1002. getMessageType:function(index){
  1003. let e=index?index.toString():'';
  1004. if (e) {
  1005. let theType = '';
  1006. messageType.map(function (item) {
  1007. if (item.value == e) {
  1008. theType = item.key;
  1009. };
  1010. });
  1011. return theType;
  1012. }
  1013. },
  1014. //发送目标
  1015. getDesignated:function(index){
  1016. let e=index?index.toString():'';
  1017. if (e) {
  1018. let theType = '';
  1019. designated.map(function (item) {
  1020. if (item.value == e) {
  1021. theType = item.key;
  1022. };
  1023. });
  1024. return theType;
  1025. }
  1026. },
  1027. getFeatured:function(index){
  1028. let e=index?index.toString():'';
  1029. if (e) {
  1030. let theType = '';
  1031. featured.map(function (item) {
  1032. if (item.value == e) {
  1033. theType = item.key;
  1034. };
  1035. });
  1036. return theType;
  1037. }
  1038. },
  1039. getActives:function(e){
  1040. if (e) {
  1041. let theType = '';
  1042. actives.map(function (item) {
  1043. if (item.value == e) {
  1044. theType = item.key;
  1045. };
  1046. });
  1047. return theType;
  1048. }
  1049. },
  1050. //意向进度
  1051. getIntentProgress:function(e){
  1052. if (e) {
  1053. let theType = '';
  1054. intentProgress.map(function (item) {
  1055. if (item.value == e) {
  1056. theType = item.key;
  1057. };
  1058. });
  1059. return theType;
  1060. }
  1061. },
  1062. //交易进度
  1063. getTransactionProgress:function(e){
  1064. if (e) {
  1065. let theType = '';
  1066. transactionProgress.map(function (item) {
  1067. if (item.value == e) {
  1068. theType = item.key;
  1069. };
  1070. });
  1071. return theType;
  1072. }
  1073. },
  1074. //合同进度
  1075. getContractProgress:function(e){
  1076. if (e) {
  1077. let theType = '';
  1078. contractProgress.map(function (item) {
  1079. if (item.value == e) {
  1080. theType = item.key;
  1081. };
  1082. });
  1083. return theType;
  1084. }
  1085. },
  1086. //项目进度
  1087. getProjectProgress:function(e){
  1088. if (e) {
  1089. let theType = '';
  1090. projectProgress.map(function (item) {
  1091. if (item.value == e) {
  1092. theType = item.key;
  1093. };
  1094. });
  1095. return theType;
  1096. }
  1097. },
  1098. }