IntroductionCustomService.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042
  1. <template>
  2. <div>
  3. <!-- 定制服务 -->
  4. <div style="margin:15px 30px 0 30px ;height: 50px;line-height: 50px;border-bottom: 1px solid #eaeaea;">
  5. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  6. style="height: 20px;vertical-align: middle;">
  7. <span style="color: #3a6295;font-weight: 700;margin-left: 5px;">{{$t('common.CustomService')}}</span>
  8. </div>
  9. <div style="margin: 0 50px; margin-top: 20px;" class="continents">
  10. <div style="width: 100%;text-align: center;color: #32A0F5;font-size: 22px;line-height: 70px;">
  11. {{$t('common.GEIDCOProvides')}}{{$t('common.CustomService')}}
  12. </div>
  13. <ul>
  14. <li v-for="(item,index) in initData" :key="index">
  15. <div style="position: relative;margin: 0 22px;" class="border">
  16. <div style="width: 100%;text-align: center;padding-top: 30px;">
  17. <div>
  18. <img :src="getIconUrl(item.img)" alt="">
  19. </div>
  20. <div style="margin-top: 10px;font-weight: 700;color: #666;width: 100%;display: inline-block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  21. {{$t(item.lable)}}
  22. </div>
  23. </div>
  24. </div>
  25. <div style="margin-top: 10px;">
  26. <div style="font-size: 14px;margin-top: 5px;line-height: 30px;" v-html="$t(item.value).replace(/[;;]/g,'$&\n')">
  27. <!-- {{$t(item.value).replace(/[;;]/g,"$&\n")}}-->
  28. </div>
  29. </div>
  30. </li>
  31. </ul>
  32. <div style="width: 100%;position: relative;height: 100px;">
  33. <el-button type="primary" style="position: absolute; left:50%;top:0;transform: translate(-50%, 50%);"
  34. @click="createOptions('1')">
  35. {{$t('common.ApplicationServices')}}
  36. </el-button>
  37. </div>
  38. </div>
  39. <div style="width: 100%;height: 15px;background: #f5f5f7;"></div>
  40. <!-- 定制服务单位 -->
  41. <div style="background:rgba(250,251,252,1);width:100%;">
  42. <div style="margin:0px 30px 0 30px ;height: 50px;line-height: 50px;border-bottom: 1px solid #eaeaea;">
  43. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  44. style="height: 20px;vertical-align: middle;">
  45. <span style="color: #3a6295;font-weight: 700;margin-left: 5px;">{{$t('common.CustomizedServicesUnit')}}</span>
  46. <span style="color: #3a6295;font-weight: 700;float: right;" class="cursor" @click="nextBatch">{{$t('common.NextBatch')}}</span>
  47. </div>
  48. <div style="margin: 0 20px; margin-top: 20px;" class="continents2">
  49. <ul>
  50. <li v-for="(item,index) in collaboratorList" :key="index"
  51. @click="toViewDetail('IntroductionCustomizationDetails',item)" style="margin-right: 5px;" class="LiActive cursor">
  52. <div style="position: relative;margin: 0 22px;" class="border">
  53. <div style="width: 100%;text-align: center;padding-top: 30px;">
  54. <div style="border: 1px solid rgba(221,221,221, .5);height: 86px;">
  55. <img :src="'/api/file/pub/' + photoMap[item.unitId]" alt=""
  56. style="width: 100%;height: 100%;">
  57. </div>
  58. <div style="color: rgba(51,51,51,1);font-weight: 700;height:3em;display:flex;align-items:center;justify-content:center">
  59. <p style="line-height:1.5em;margin:0px">{{$i18n.locale === 'zh'?item.unitZhName:item.unitEnName}}</p>
  60. </div>
  61. <div v-if="$i18n.locale === 'zh'" class="introdcutiontxt">
  62. <p style="text-indent: 2em; -webkit-box-orient: vertical;
  63. position:relative;
  64. line-height:1.4em;
  65. overflow: hidden;
  66. height:5.6em;cursor: pointer; margin:0px" class="plate">
  67. {{item.unitIntroduction?item.unitIntroduction.replace(/<[^>]+>|&[^>]+;/g, ""):""}}</p>
  68. </div>
  69. <div v-if="$i18n.locale === 'en'" class="introdcutiontxt">
  70. <p>{{unitIntroductionMap[item.unitId]?unitIntroductionMap[item.unitId].replace(/<[^>]+>|&[^>]+;/g, ""):""}}</p>
  71. </div>
  72. </div>
  73. </div>
  74. <!-- <div style="margin-top: 10px;">
  75. </div> -->
  76. </li>
  77. </ul>
  78. </div>
  79. </div>
  80. <div style="width: 100%;height: 15px;background: #f5f5f7;"></div>
  81. <!-- 资助洽商 -->
  82. <div style="background:#fff;width:100%;">
  83. <div style="margin:0px 30px 0 30px ;height: 50px;line-height: 50px;border-bottom: 1px solid #eaeaea;">
  84. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  85. style="height: 20px;vertical-align: middle;">
  86. <span style="color: #3a6295;font-weight: 700;margin-left: 5px;">{{$t('common.Donation')}}</span>
  87. </div>
  88. <div style="margin: 0 20px; margin-top: 20px;height: 250px;">
  89. <img src="@/assets/img/introductionCooperation/financialsSuppot.gif" alt=""
  90. style="width: 264px;height: 196px;vertical-align: top;float: left;">
  91. <span style="font-size:14px; color:rgba(51,51,51,1); line-height:28px;float: left;width: 800px;margin: 20px 40px 0 40px;">
  92. {{$t('common.IntroductionToFundingNegotiations')}}
  93. </span>
  94. <div style="width: 800px;margin: 20px;float: left;">
  95. <div style="margin: auto;width: 126px;">
  96. <el-button type="primary" @click='createOptions("2")'>
  97. {{$t('common.Donation')}}
  98. </el-button>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <!-- 定制服务申请 -->
  104. <el-dialog
  105. class="dialogVisible"
  106. :title="$t('common.CustomizedService')"
  107. :visible.sync="dialogVisible"
  108. width="35%">
  109. <div style="width: 100%;">
  110. <el-form ref="coopCustomService" :model="coopCustomService" :rules="rules" :label-width="$i18n.locale=='zh'?'100px':'160px'"
  111. style="margin: auto;width: 80%;">
  112. <el-form-item :label="$t(labels.applyUserName)" prop="applyUserName">
  113. <el-input v-model="coopCustomService.applyUserName"
  114. :placeholder="$t('common.PleaseEnter')+$t('common.fullName')"></el-input>
  115. </el-form-item>
  116. <el-form-item :label="$t(labels.unitZhName)" prop="unitId" class="Unitname">
  117. <el-select v-model="coopCustomService.unitId" :placeholder="$t('common.enteUnitName')"
  118. filterable style="width: 100%;" ref="applySelect1"
  119. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  120. allow-create
  121. popper-class="mySelect"
  122. default-first-option>
  123. <el-option
  124. class="dialogVisibleOptions"
  125. v-for="item in baseUnitViews"
  126. :key="item.unitName"
  127. :label="item.unitName"
  128. :value="item.baseEntityId">
  129. </el-option>
  130. </el-select>
  131. </el-form-item>
  132. <el-form-item :label="$t(labels.ApplicationType)" prop="childTypeDict">
  133. <el-select v-model="coopCustomService.childTypeDict" :placeholder="$t('common.ServiceType')"
  134. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  135. filterable
  136. style="width: 100%;" ref="applySelect2">
  137. <el-option
  138. v-for="item in typeDialog1"
  139. :key="item.value"
  140. :label="$t(item.label)"
  141. :value="item.value">
  142. </el-option>
  143. </el-select>
  144. </el-form-item>
  145. <el-form-item :label="$t(labels.linkNumber)" prop="linkNumber" :label-width="$i18n.locale === 'zh'?'':'160px'">
  146. <el-input v-model="coopCustomService.linkNumber"
  147. :placeholder="$t('common.Contactinformation')"></el-input>
  148. </el-form-item>
  149. <el-form-item :label="$t(labels.linkEmail)" prop="linkEmail" >
  150. <el-input v-model="coopCustomService.linkEmail" :placeholder="$t('common.ContactinformationEmail')"></el-input>
  151. </el-form-item>
  152. <el-form-item :label="$t(labels.ApplicationContent)" prop="applyContent" >
  153. <el-input v-model="coopCustomService.applyContent" type="textarea" maxlength="500"
  154. show-word-limit :placeholder="$t('common.Details')">
  155. </el-input>
  156. </el-form-item>
  157. <el-form-item :label="$t(labels.AttachmentUpload)">
  158. <el-upload
  159. class="upload-demo"
  160. action="./api/file/upload/attachment?module=CoopCustomServiceForm"
  161. :on-change="handleChange"
  162. :on-success="docSuccess"
  163. :headers="myHeaders"
  164. :before-upload="beforeUpload"
  165. :file-list="fileList">
  166. <el-button size="small" type="primary"> {{$t('common.SelectUploadCUnit')}}</el-button>
  167. <div slot="tip" class="el-upload__tip">{{$t('common.OnlyUpload')}}</div>
  168. </el-upload>
  169. </el-form-item>
  170. </el-form>
  171. </div>
  172. <span slot="footer" class="dialog-footer">
  173. <el-button @click="dialogVisible = false" type="info">{{$t('common.Cancel')}}</el-button>
  174. <el-button v-if="!disable" type="primary"
  175. @click="customServiceAppForm('form1')">{{$t('common.Submit')}}</el-button>
  176. </span>
  177. </el-dialog>
  178. <!-- 资助洽商弹框 -->
  179. <el-dialog
  180. class="dialogVisible"
  181. :title="$t('common.Donation')"
  182. :visible.sync="dialogVisible2"
  183. width="35%">
  184. <div style="width: 100%;">
  185. <el-form ref="coopCustomService" :model="coopCustomService" :rules="rules2" :label-width="$i18n.locale=='zh'?'100px':'150px'"
  186. style="width: 80%;margin: auto;">
  187. <el-form-item :label="$t(labels.applyUserName)" prop="applyUserName">
  188. <el-input v-model="coopCustomService.applyUserName"
  189. :placeholder="$t('common.PleaseEnter')+$t('common.fullName')"></el-input>
  190. </el-form-item>
  191. <el-form-item :label="$t(labels.unitZhName)" prop="unitId" class="Unitname">
  192. <el-select v-model="coopCustomService.unitId" :placeholder="$t('common.enteUnitName')"
  193. filterable style="width: 100%;" ref="supportSelect1"
  194. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  195. allow-create
  196. popper-class="mySelect"
  197. default-first-option>
  198. <el-option
  199. class="dialogVisibleOptions"
  200. v-for="item in baseUnitViews"
  201. :key="item.unitName"
  202. :label="item.unitName"
  203. :value="item.baseEntityId">
  204. </el-option>
  205. </el-select>
  206. </el-form-item>
  207. <el-form-item :label="$t(labels.linkNumber)" prop="linkNumber">
  208. <el-input v-model="coopCustomService.linkNumber"
  209. :placeholder="$t('common.Contactinformation')"></el-input>
  210. </el-form-item>
  211. <el-form-item :label="$t(labels.linkEmail)" prop="linkEmail">
  212. <el-input v-model="coopCustomService.linkEmail" :placeholder="$t('common.Email')"></el-input>
  213. </el-form-item>
  214. <el-form-item :label="$t(labels.supportWay)" prop="supportWayDict" style="" >
  215. <el-select v-model="coopCustomService.supportWayDict"
  216. :placeholder="$t('common.SelectFundingMethods')"
  217. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  218. filterable
  219. style="width: 100%;" ref="supportSelect2">
  220. <el-option
  221. v-for="item in typeDialog2"
  222. :key="item.value"
  223. :label="$t(item.label)"
  224. :value="item.value">
  225. </el-option>
  226. </el-select>
  227. </el-form-item>
  228. <el-form-item :label="$t(labels.supportContent)" prop="applyContent">
  229. <el-input v-model="coopCustomService.applyContent" type="textarea" maxlength="500"
  230. show-word-limit :placeholder="$t(labels.FundingDetails)">
  231. </el-input>
  232. </el-form-item>
  233. <el-form-item :label="$t(labels.AttachmentUpload)">
  234. <el-upload
  235. class="upload-demo"
  236. action="./api/file/upload/attachment?module=CoopCustomServiceForm"
  237. :on-change="handleChange"
  238. :on-success="docSuccess"
  239. :headers="myHeaders"
  240. :before-upload="beforeUpload"
  241. :file-list="fileList">
  242. <el-button size="small" type="primary">{{$t('common.SelectUploadCUnit')}}</el-button>
  243. <div slot="tip" class="el-upload__tip">{{$t('common.OnlyUpload')}}</div>
  244. </el-upload>
  245. </el-form-item>
  246. </el-form>
  247. </div>
  248. <span slot="footer" class="dialog-footer">
  249. <el-button @click="dialogVisible2 = false">{{$t('common.Cancel')}}</el-button>
  250. <el-button v-if="!disable" type="primary"
  251. @click="customServiceAppForm('form2')">{{$t('common.Submit')}}</el-button>
  252. </span>
  253. </el-dialog>
  254. <!-- 登录验证 -->
  255. <el-dialog
  256. :title="$i18n.locale=='zh'?'提示':'Reminder'"
  257. :visible.sync="toViewLogin"
  258. :width="$i18n.locale=='zh'?'500px':'750px'"
  259. :height="$i18n.locale=='zh'?'300px':'386px'"
  260. :before-close="toViewLoginChange"
  261. >
  262. <div style="width: 100%;height: 100%;">
  263. <img src="@/assets/img/loginTips.png" alt="" style="width: 180px;height: 180px;margin-left: 20px;">
  264. <div style="float: right;margin-right: 20px;"
  265. :style="$i18n.locale=='zh'?'width: 49%;margin-top: 10px;':'width: 453px;margin-top: -25px;'">
  266. <div style="font-size: 20px;font-weight: normal;color: #333333;
  267. font-family: HiraginoSansGB-W3, HiraginoSansGB;
  268. line-height: 40px;">
  269. {{$t('common.ReminderFirst')}}
  270. </div>
  271. <div style="font-size: 16px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  272. font-weight: normal;color: #666666;line-height: 30px;">
  273. {{$t('common.ReminderSecond')}} <span style="color: #0091FF;font-size: 18px;">{{num}}</span>
  274. {{$t('common.ReminderThird')}}
  275. </div>
  276. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  277. font-weight: normal;color: #666666;line-height: 30px;">
  278. {{$t('common.ReminderForth')}}
  279. </div>
  280. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  281. height:33px;line-height:60px;font-weight: normal;color: #0091FF;">
  282. <span style="margin-left: 40px;" class="cursor" @click="toView('login')">
  283. {{$t('common.ReminderFifth')}}
  284. </span>
  285. <span style="margin-left: 10px;" class="cursor" @click="toView('Register')">
  286. {{$t('common.ReminderSixth')}}
  287. </span>
  288. </div>
  289. </div>
  290. </div>
  291. </el-dialog>
  292. </div>
  293. </template>
  294. <script>
  295. import {getToken} from '@/utils/auth';
  296. import {getDicts} from '@/api/dict'
  297. import {getUserInfoById} from '@/api/user';
  298. import Base from "@/views/base/Base"
  299. import {
  300. getCoopCustomServices,
  301. get,
  302. saveOrUpdate,
  303. del,
  304. getByUnitId,
  305. downloadCoopCustom,
  306. getBaseUnitViews,
  307. getFiles
  308. } from '@/api/cooperation/coopCustomService'
  309. import {getViewByIds} from "@/api/baseUnitView";
  310. export default {
  311. name: 'IntroductionCustomService',
  312. extends: Base,
  313. data() {
  314. return {
  315. serviceTypeDicts: [],
  316. childTypeDicts: [],
  317. supportWayDicts: [],
  318. page: {
  319. pageNo: 1,
  320. pageSize: 8,
  321. },
  322. typeDialog0: [],
  323. typeDialog1: [],
  324. typeDialog2: [],
  325. baseUnitViews: [],
  326. toViewLogin: false,
  327. num: 0,
  328. timer: '',
  329. // 两个form的label
  330. labels: {
  331. applyUserName: 'common.applyUserName',
  332. unitZhName: 'common.unitName',
  333. ApplicationType: 'common.ApplicationType',
  334. linkNumber: 'common.linkNumber',
  335. linkEmail: 'common.linkEmail',
  336. ApplicationContent: 'common.ApplicationContent',
  337. AttachmentUpload: 'common.AttachmentUpload',
  338. supportWay: 'common.supportWay',
  339. supportContent: 'common.supportContent',
  340. },
  341. photoMap:{},
  342. unitIntroductionMap: {},
  343. baseEnterpriseMap: {},
  344. coopCustomService: {
  345. id: null,
  346. manual:true,
  347. unitId: '',
  348. unitZhName: '',
  349. unitEnName: '',
  350. serviceType: '',
  351. serviceTypeDict: '',
  352. childType: '',
  353. childTypeDict: '',
  354. supportWay: '',
  355. supportWayDict: '',
  356. applyUserName: '',
  357. linkNumber: '',
  358. linkEmail: '',
  359. userType: '1',
  360. unitIntroduction: '',
  361. applyContent: '',
  362. applyDate: '',
  363. subName: '',
  364. subAccount: '',
  365. subCompany: '',
  366. subMail: '',
  367. subPhone: '',
  368. language: this.$i18n.locale,
  369. status: '',
  370. statusDict: '',
  371. createBy: '',
  372. createDate: '',
  373. updateBy: '',
  374. updateDate: '',
  375. },
  376. attachmentIds: [],
  377. baseEntityIds: '',
  378. dataSource: 'gate',
  379. myHeaders: {Authorization: ('Bearer ' + getToken())},
  380. dialogVisible: false,
  381. dialogVisible2: false,
  382. disable: false,
  383. enterpriseDetails: '',
  384. initData: [{
  385. lable: 'common.ExclusiveProjects',
  386. img: 'exclusive.png',
  387. value: 'common.IntroductionToExclusiveProjects'
  388. }, {
  389. lable: 'common.ThematicResearch',
  390. img: 'research_.png',
  391. value: 'common.IntroductionToExclusiveResearch'
  392. }, {
  393. lable: 'common.TailoredService',
  394. img: 'personalized.png',
  395. value: 'common.IntroductionToPersonalizedService'
  396. }, {
  397. lable: 'common.CustomizedInformation',
  398. img: 'customized.png',
  399. value: 'common.CustomizedInformationIntroduction'
  400. }, {
  401. lable: 'common.JointConference',
  402. img: 'organization.png',
  403. value: 'common.IntroductionToTheJointMeeting'
  404. }],
  405. collaboratorList: [],
  406. fileList: []
  407. }
  408. },
  409. created() {
  410. //url承接
  411. if(this.$route.query.dialogVisible) {
  412. this.dialogVisible = this.$route.query.dialogVisible;
  413. }
  414. if(this.$route.query.dialogVisible2) {
  415. this.dialogVisible2 = this.$route.query.dialogVisible2;
  416. }
  417. },
  418. filter:{
  419. // filterUnitId(val){
  420. // if(val){
  421. // return val
  422. // }else {
  423. // if(this.$i18n.locale=='zh'){
  424. // return this.coopCustomService.unitZhName;
  425. // }else {
  426. // return this.coopCustomService.unitEnName;
  427. // }
  428. //
  429. // }
  430. //
  431. // }
  432. },
  433. watch: {
  434. '$i18n.locale'() {
  435. this.init();
  436. this.setLang();
  437. this.getProjectViews();
  438. this.customServiceAppForm();
  439. },
  440. "toViewLogin"() {
  441. if (this.toViewLogin === true) {
  442. this.loginTipsChange()
  443. }
  444. },
  445. 'dialogVisible'() {
  446. if (this.$route.query.data && this.dialogVisible === false) {
  447. this.$router.push({name: 'myConcerns', params: {index: this.$route.query.index}})
  448. }
  449. },
  450. 'dialogVisible2'() {
  451. if (this.$route.query.data && this.dialogVisible2 === false) {
  452. this.$router.push({name: 'myConcerns', params: {index: this.$route.query.index}})
  453. }
  454. }
  455. },
  456. mounted() {
  457. if (this.$route.query && this.$route.query.data) {
  458. this.coopCustomService = this.$route.query.data;
  459. this.coopCustomService.applyContent = this.coopCustomService.applyContent.replace(/<[^>]+>|&[^>]+;/g, "");
  460. let param = {
  461. attachmentBusinessId: this.coopCustomService.id,
  462. attachmentBusinessType: 'COOP_CUSTOM_SERVICE'
  463. };
  464. getFiles(param).then(result => {
  465. const data = result.data
  466. if (data) {
  467. this.fileList = data.attachmentInfos
  468. this.fileList.forEach(item => {
  469. item.name = item.attachmentName;
  470. item.url = item.attachmentSavePath;
  471. })
  472. }
  473. })
  474. if (this.coopCustomService.serviceTypeDict === '1') {
  475. this.dialogVisible = true
  476. } else {
  477. this.dialogVisible2 = true
  478. }
  479. }
  480. ;
  481. if (this.$route.query.disable) {
  482. this.disable = this.$route.query.disable
  483. }
  484. this.init();
  485. this.setLang();
  486. this.getProjectViews();
  487. },
  488. methods: {
  489. beforeUpload(file) {
  490. var FileExt = file.name.replace(/.+\./, "");
  491. if (['zip', 'pdf', 'doc', 'docx', 'excel', 'xls', 'xlsx'].indexOf(FileExt.toLowerCase()) === -1) {
  492. this.$message({
  493. type: 'warning',
  494. message: '请上传zip,pdf,word,excel的附件!'
  495. });
  496. this.fileList.splice(this.fileList.indexOf(file), 1)
  497. return false;
  498. }
  499. this.isLt2k = file.size / 1024 / 1024 < 2 ? '1' : '0';
  500. if (this.isLt2k === '0') {
  501. this.$message({
  502. message: '上传文件大小不能超过2M!',
  503. type: 'error'
  504. });
  505. this.fileList.splice(this.fileList.indexOf(file), 1)
  506. return false;
  507. }
  508. },
  509. getProjectViews() {
  510. let currentlang = this.$i18n.locale == 'zh' ? 'ZH' : 'EN'
  511. getBaseUnitViews(currentlang).then(res => {
  512. if (res.data) {
  513. this.baseUnitViews = res.data.baseUnitViewList
  514. this.baseEnterpriseMap = res.data.baseUnitViewMap
  515. let baseUnitView = {
  516. baseEntityId : '',
  517. unitName : '',
  518. }
  519. if(this.coopCustomService.unitZhName != '' && this.coopCustomService.unitId==''){
  520. baseUnitView.baseEntityId = '';
  521. baseUnitView.unitName = this.coopCustomService.unitZhName;
  522. this.baseUnitViews.unshift(baseUnitView);
  523. }
  524. let baseUnitView1 = {
  525. baseEntityId : '',
  526. unitName : '',
  527. }
  528. if(this.coopCustomService.unitEnName != '' && this.coopCustomService.unitId==''){
  529. baseUnitView1.baseEntityId = '';
  530. baseUnitView1.unitName = this.coopCustomService.unitEnName;
  531. this.baseUnitViews.unshift(baseUnitView1);
  532. }
  533. }
  534. })
  535. },
  536. init() {
  537. this.page.pageNo = 1
  538. if (this.$i18n.locale === 'zh') {
  539. getDicts('SERVICE_TYPE_DICT,SERVICE_CHILD_TYPE_DICT,STATUS_DICT,SUPPORT_WAY_DICT').then(result => {
  540. var data = result.data
  541. if (data) {
  542. this.serviceTypeDicts = result.data['0'] || []
  543. this.typeDialog1 = result.data['1'] || []
  544. this.statusDicts = result.data['序号'] || []
  545. this.typeDialog2 = result.data['3'] || []
  546. }
  547. })
  548. } else {
  549. getDicts('SERVICE_TYPE_DICT_EN,SERVICE_CHILD_TYPE_DICT_EN,STATUS_DICT,SUPPORT_WAY_DICT_EN').then(result => {
  550. var data = result.data
  551. if (data) {
  552. this.serviceTypeDicts = result.data['0'] || []
  553. this.typeDialog1 = result.data['1'] || []
  554. this.statusDicts = result.data['序号'] || []
  555. this.typeDialog2 = result.data['3'] || []
  556. }
  557. })
  558. }
  559. },
  560. setLang() {
  561. let param = {
  562. serviceTypeDict: '1',
  563. pageSize: 8,
  564. pageNo: this.page.pageNo,
  565. statusDict: '3'
  566. }
  567. const that = this;
  568. getCoopCustomServices(param).then((res) => {
  569. const data = res.data;
  570. if (data) {
  571. that.collaboratorList = [];
  572. that.collaboratorList = data.coopCustomServices;
  573. that.photoMap = data.photoMap
  574. that.collaboratorList.forEach(item =>{
  575. if(that.photoMap[item.unitId]===''){
  576. that.photoMap[item.unitId] = 'def/enterpriseDefault.png';
  577. }
  578. });
  579. that.unitIntroductionMap = data.unitIntroductionMap
  580. that.page = data.page
  581. // let ids = []
  582. // if (this.collaboratorList.length > 0) {
  583. // this.collaboratorList.forEach(item => {
  584. // ids.push(item.unitId)
  585. // })
  586. // that.baseEntityIds = ids.join(',')
  587. // let currentlang = that.$i18n.locale == 'zh' ? 'ZH' : 'EN'
  588. // // const that = this
  589. // // getViewByIds(that.baseEntityIds, currentlang).then((res) => {
  590. // // var datas = res.data
  591. // // if (datas) {
  592. // // that.typeDialog0 = res.data;
  593. // // that.typeDialog0.forEach(item => {
  594. // // item.photo = item.photo !== undefined ? item.photo : 'def/enterpriseDefault.png';
  595. // // item.unitIntrodution = item.unitIntrodution !== undefined ? item.unitIntrodution.replace(/<[^>]+>|&[^>]+;/g, "") : ''
  596. // // that.photoMap.set(item.baseEntityId, item.photo);
  597. // // if (that.$i18n.locale === 'en') {
  598. // // that.unitIntroductionMap.set(item.baseEntityId, item.unitIntrodution);
  599. // // }
  600. // // })
  601. // // }
  602. // // })
  603. // }
  604. }
  605. }).catch((error) => {
  606. })
  607. },
  608. loginTipsChange() {
  609. const that = this;
  610. this.num = 5;
  611. // clearInterval(timer_interval);
  612. this.timer = setInterval(function () {
  613. if (that.num > 0) {
  614. that.num--;
  615. } else {
  616. if (that.toViewLogin == true) {
  617. clearInterval(that.timer);
  618. that.toView('login');
  619. } else {
  620. clearInterval(that.timer);
  621. }
  622. }
  623. }, 1000)
  624. },
  625. toViewLoginChange(done) {
  626. this.toViewLogin = false;
  627. this.num = 5;
  628. clearInterval(this.timer);
  629. },
  630. goToView(index) {
  631. this.toView('IntroductionEquipmentAlliance', index)
  632. },
  633. getIconUrl(url) {
  634. return require("@/assets/img/introductionCooperation/exclusive/" + url);
  635. },
  636. toView(router, json) {
  637. clearInterval(this.timer);
  638. this.$router.push({
  639. name: router,
  640. query: {
  641. id: json
  642. },
  643. });
  644. },
  645. toViewDetail(router, json) {
  646. this.$store.commit('modify', router);
  647. window.localStorage.setItem('router', router);
  648. const {href} = this.$router.resolve({
  649. name: router,
  650. query: {
  651. key: json.id,
  652. }
  653. });
  654. window.open(href, '_blank');
  655. },
  656. screenBack(data) {
  657. },
  658. handleChange(file, fileList) {
  659. this.fileList = fileList.slice(-3);
  660. },
  661. docSuccess(res, file) {
  662. if (res.data) {
  663. this.attachmentIds.push(res.data.attachmentId)
  664. }
  665. },
  666. createOptions(formIndex) {
  667. if (!this.$Cookies.get('token')) {
  668. this.toViewLogin = true;
  669. } else {
  670. formIndex == '1' ? this.dialogVisible = true : this.dialogVisible2 = true
  671. this.setLang()
  672. }
  673. },
  674. customServiceAppForm(num) {
  675. let user = JSON.parse(window.localStorage.getItem('user'));
  676. if (num == 'form1') {
  677. // 定制服务
  678. this.$refs["coopCustomService"].validate((valid1) => {
  679. if (valid1) {
  680. if(this.baseEnterpriseMap[this.coopCustomService.unitId]){
  681. let item = this.baseEnterpriseMap[this.coopCustomService.unitId];
  682. if (this.$i18n.locale === 'zh') {
  683. this.coopCustomService.unitZhName = item.unitName
  684. this.coopCustomService.serviceType = '定制服务';
  685. } else {
  686. this.coopCustomService.unitEnName = item.unitName
  687. this.coopCustomService.serviceType = 'CustomService';
  688. }
  689. }else{
  690. if (this.$i18n.locale === 'zh') {
  691. this.coopCustomService.unitZhName = this.coopCustomService.unitId;
  692. this.coopCustomService.serviceType = '定制服务';
  693. } else {
  694. this.coopCustomService.unitEnName = this.coopCustomService.unitId;
  695. this.coopCustomService.serviceType = 'CustomService';
  696. }
  697. this.coopCustomService.unitId = "";
  698. }
  699. this.coopCustomService.serviceTypeDict = '1';
  700. this.coopCustomService.statusDict = '1'
  701. this.coopCustomService.updateBy = user.userId;
  702. this.coopCustomService.createBy = user.userId
  703. this.coopCustomService.subName = user.realName;
  704. this.coopCustomService.subAccount = user.umsUser.userUid;
  705. this.coopCustomService.subPhone = user.umsUser.userPreferredMobile;
  706. this.coopCustomService.subCompany = user.umsUser.unitEntityId;
  707. this.typeDialog1.forEach(item => {
  708. if (item.value === this.coopCustomService.childTypeDict) {
  709. this.coopCustomService.childType = item.label
  710. }
  711. });
  712. this.submitHandler((token) => {
  713. saveOrUpdate(JSON.stringify(this.coopCustomService), JSON.stringify(this.attachmentIds), null, this.dataSource, token).then(res => {
  714. this.$message({
  715. message: this.$i18n.locale.toUpperCase()=="ZH"?'保存成功':'submit success',
  716. type: 'success'
  717. });
  718. this.dialogVisible = false
  719. this.resetToken();
  720. this.coopCustomService = {};
  721. this.fileList = []
  722. }).catch((error) => {
  723. this.$notify.error({
  724. title: this.$t('common.Error'),
  725. message: error.msg
  726. });
  727. })
  728. })
  729. } else {
  730. this.$notify.error({
  731. title: this.$t('common.Error'),
  732. message: this.$t('common.PleaseSinformation')
  733. });
  734. return false;
  735. }
  736. });
  737. } else {
  738. this.$refs["coopCustomService"].validate((valid1) => {
  739. if (valid1) {
  740. if(this.baseEnterpriseMap[this.coopCustomService.unitId]){
  741. let item = this.baseEnterpriseMap[this.coopCustomService.unitId];
  742. if (this.$i18n.locale === 'zh') {
  743. this.coopCustomService.unitZhName = item.unitName
  744. this.coopCustomService.serviceType = '资助洽商';
  745. } else {
  746. this.coopCustomService.unitEnName = item.unitName;
  747. this.coopCustomService.serviceType = 'FundingNegotiation';
  748. }
  749. }else{
  750. if (this.$i18n.locale === 'zh') {
  751. this.coopCustomService.unitZhName = this.coopCustomService.unitId;
  752. this.coopCustomService.serviceType = '资助洽商';
  753. } else {
  754. this.coopCustomService.unitEnName = this.coopCustomService.unitId;
  755. this.coopCustomService.serviceType = 'FundingNegotiation';
  756. }
  757. this.coopCustomService.unitId = "";
  758. }
  759. this.coopCustomService.serviceTypeDict = '2';
  760. this.coopCustomService.statusDict = '1'
  761. this.coopCustomService.updateBy = user.userId;
  762. this.coopCustomService.createBy = user.userId;
  763. this.coopCustomService.subName = user.realName;
  764. this.coopCustomService.subAccount = user.umsUser.userUid;
  765. this.coopCustomService.subPhone = user.umsUser.userPreferredMobile;
  766. this.coopCustomService.subCompany = user.umsUser.unitEntityId;
  767. this.typeDialog2.forEach(item => {
  768. if (item.value === this.coopCustomService.supportWayDict) {
  769. this.coopCustomService.supportWay = item.label
  770. }
  771. });
  772. this.submitHandler((token) => {
  773. saveOrUpdate(JSON.stringify(this.coopCustomService), JSON.stringify(this.attachmentIds), null, this.dataSource, token).then(res => {
  774. this.$message({
  775. message: this.$i18n.locale.toUpperCase()=="ZH"?'保存成功':'submit success',
  776. type: 'success'
  777. });
  778. this.dialogVisible2 = false;
  779. this.resetToken();
  780. this.coopCustomService = {};
  781. this.fileList = []
  782. }).catch((error) => {
  783. this.$notify.error({
  784. title: 'common.Error',
  785. message: error.msg
  786. });
  787. })
  788. })
  789. } else {
  790. this.$notify.error({
  791. title: this.$t('common.Error'),
  792. message: this.$t('common.PleaseneInformation')
  793. });
  794. return false;
  795. }
  796. });
  797. }
  798. },
  799. nextBatch() {
  800. if (this.page.pageNo * 8 > (this.page.totalCount - 0)) {
  801. this.page.pageNo = 1
  802. this.setLang()
  803. return
  804. } else {
  805. this.page.pageNo++
  806. this.setLang()
  807. }
  808. }
  809. },
  810. computed: {
  811. content() {
  812. return function (str) {
  813. return str.replace(/<[^>]+>/g, "")
  814. }
  815. },
  816. // 定制服务验证
  817. rules(){
  818. return{
  819. unitId: [
  820. {required: true, message:this.$t('common.PleaseEnter')+this.$t('common.NameoftheEntity'), trigger: 'change'},
  821. ],
  822. childTypeDict: [
  823. {required: true, message:this.$t('common.PleaseSelect')+this.$t('common.Applicationtype'), trigger: 'change'},
  824. ],
  825. applyUserName: [
  826. {required: true, message: this.$t('common.PleaseEnter')+this.$t('common.fullName'), trigger: 'blur'},
  827. {max: 40, message:this.$t('common.CharacterTooLong'), trigger: 'blur'}
  828. ],
  829. linkNumber: [
  830. {required: true, message:this.$t('common.PleaseFillOut')+this.$t('common.ContactWay'), trigger: 'blur'},
  831. {
  832. pattern: /^0{0,1}(13[0-9]|15[7-9]|153|151|156|18[1-9])[0-9]{8}$/,
  833. message: this.$i18n.locale=='zh'? '联系方式格式不正确,请重新输入': 'Contact number format is incorrect, please re-enter',
  834. trigger: 'blur'
  835. }
  836. ],
  837. linkEmail: [
  838. {required: true, message:this.$t('common.PleaseFillOut')+this.$t('common.Email'), trigger: 'blur'},
  839. {
  840. pattern: /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*@[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*\.[a-z]{2,}$/,
  841. message: this.$i18n.locale=='zh'? '邮箱格式不正确,请重新输入': 'Email format is incorrect, please re-enter',
  842. trigger: 'blur'
  843. }
  844. ],
  845. applyContent: [
  846. {required: true, message: this.$t('common.PleaseFillOut')+this.$t('common.ApplyContent'), trigger: 'blur'},
  847. ],
  848. }
  849. },
  850. // 资助申请验证
  851. rules2(){
  852. return {
  853. unitId: [
  854. {required: true, message:this.$t('common.PleaseEnter')+this.$t('common.NameoftheEntity'), trigger: 'change'},
  855. ],
  856. supportWayDict: [
  857. {required: true, message:this.$t('common.PleaseSelect')+this.$t('common.Applicationtype'), trigger: 'change'},
  858. ],
  859. applyUserName: [
  860. {required: true, message: this.$t('common.PleaseEnter')+this.$t('common.fullName'), trigger: 'blur'},
  861. {max: 40, message: this.$t('common.CharacterTooLong'), trigger: 'blur'}
  862. ],
  863. linkNumber: [
  864. {required: true, message:this.$t('common.PleaseFillOut')+this.$t('common.ContactWay'), trigger: 'blur'},
  865. {max: 40, message: this.$t('common.CharacterTooLong'), trigger: 'blur'}
  866. ],
  867. linkEmail: [
  868. {required: true, message:this.$t('common.PleaseFillOut')+this.$t('common.Email'), trigger: 'blur'},
  869. {
  870. pattern: /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*@[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*\.[a-z]{2,}$/,
  871. message:this.$t('common.Emailformatisnotcorrect'),
  872. trigger: 'blur'
  873. }
  874. ],
  875. applyContent: [
  876. {required: true, message:this.$t('common.PleaseFillOut')+this.$t('common.FinanceContent'), trigger: 'blur'},
  877. ],
  878. }
  879. }
  880. },
  881. }
  882. </script>
  883. <!-- Add "scoped" attribute to limit CSS to this component only -->
  884. <style scoped>
  885. .box {
  886. margin-top: 10px;
  887. background: #fff;
  888. /* height: 500px; */
  889. padding: 20px 0;
  890. font-family: HiraginoSansGB-W3, HiraginoSansGB;
  891. }
  892. .crumbs {
  893. margin-left: 20px;
  894. }
  895. body {
  896. margin: 0;
  897. }
  898. .continents ul,
  899. .continents2 ul {
  900. display: flex;
  901. flex-wrap: wrap;
  902. text-align: center;
  903. }
  904. .continents ul {
  905. text-align: left;
  906. }
  907. .continents ul li {
  908. width: 199px;
  909. padding: 0 10px;
  910. background: #fff;
  911. color: #999;
  912. /* height: 384px; */
  913. border-right: 1px solid #EAEAEA;
  914. }
  915. .continents2 ul li {
  916. width: 210px;
  917. padding: 18px 30px;
  918. background: #fff;
  919. margin-bottom: 20px;
  920. color: #999;
  921. /* height: 384px; */
  922. /* border-right: 1px solid #EAEAEA; */
  923. border: 3px solid transparent;
  924. box-shadow: 5px 5px 5px #fafafa;
  925. }
  926. .dialogVisibleOptions {
  927. max-width: 380px;
  928. display: block;
  929. overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
  930. }
  931. .continents ul li:nth-of-type(5) {
  932. border-right: none;
  933. }
  934. .LiActive:hover {
  935. border: 3px solid #ececec;
  936. }
  937. .continents2 ul li:nth-of-type(5) {
  938. border-right: none;
  939. }
  940. /* .continents ul li:nth-of-type(1) .border{
  941. border-bottom: 2px solid #07a9fc;
  942. }
  943. .continents ul li:nth-of-type(2) .border{
  944. border-bottom: 2px solid #f7b500;
  945. }
  946. .continents ul li:nth-of-type(3) .border{
  947. border-bottom: 2px solid #6dd400;
  948. }
  949. .continents ul li:nth-of-type(4) .border{
  950. border-bottom: 2px solid #43d7b5;
  951. } */
  952. .continents ul li .button {
  953. position: absolute;
  954. left: 50%;
  955. bottom: 0;
  956. transform: translate(-50%, 0);
  957. width: 100px;
  958. height: 30px;
  959. text-align: center;
  960. line-height: 30px;
  961. border: 1px solid #bcbcbc;
  962. font-size: 14px;
  963. border-radius: 5px;
  964. box-shadow: 5px 5px 5px #f1f1f1;
  965. }
  966. .dialogVisible >>> .el-dialog__header {
  967. border-bottom: 1px solid #bcbcbc;
  968. margin-left: 20px;
  969. margin-right: 20px;
  970. padding: 20px 0 20px;
  971. }
  972. .dialogVisible >>> .el-dialog__headerbtn {
  973. display: none;
  974. }
  975. .dialogVisible >>> .el-dialog__footer {
  976. text-align: center;
  977. }
  978. /* .el-form-item__label{
  979. width: 150px;
  980. } */
  981. .introdcutiontxt {
  982. font-size: 14px;
  983. line-height: 20px;
  984. width: 12em;
  985. height: 8em;
  986. -webkit-box-orient: vertical;
  987. position:relative;
  988. line-height:1.4em;
  989. overflow: hidden;
  990. height:4.2em;
  991. margin-top: 10px;
  992. }
  993. .el-form-item {
  994. margin-bottom: 26px;
  995. }
  996. </style>