tools.js 29 KB

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