tools.js 25 KB

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