tools.js 27 KB

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