tools.js 25 KB

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