tools.js 27 KB

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