tools.js 27 KB

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