tools.js 27 KB

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