tools.js 30 KB

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