tools.js 25 KB

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