ExhibitionServiceDetailInfo.vue 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  1. <template>
  2. <div class="autoBox box" style="min-height: 900px;position: relative;">
  3. <div class="crumbs">
  4. <el-breadcrumb separator="/">
  5. <el-breadcrumb-item :to="{ path: 'home' }">{{ $t('common.Home') }}</el-breadcrumb-item>
  6. <el-breadcrumb-item :to="{ path: 'exhibitionService2' }">{{ $t('common.ExhibitionService') }}
  7. </el-breadcrumb-item>
  8. <el-breadcrumb-item>{{ $t('common.ExhibitionServiceDetail') }}</el-breadcrumb-item>
  9. </el-breadcrumb>
  10. </div>
  11. <div class="ui-body" v-if="$i18n.locale == 'zh'">
  12. <div class="ui-left">
  13. <h3>{{ listDetail.name }}</h3>
  14. <div class="ui-infos">
  15. <ul class="ui-uls">
  16. <li class="ui-ul-li">
  17. <div class="ui-li-left">
  18. <div class="ui-info-left">举办时间:</div>
  19. <div class="ui-info-right">{{ listDetail.validityStartDate | time("YYYY-MM-DD")
  20. }} -- {{ listDetail.validityEndDate | time("YYYY-MM-DD") }}</div>
  21. </div>
  22. <div class="ui-li-right">
  23. <div class="ui-info-left">举办地区:</div>
  24. <div class="ui-info-rights">{{ listDetail.region }}</div>
  25. </div>
  26. </li>
  27. <li class="ui-ul-li">
  28. <div class="ui-li-left">
  29. <div class="ui-info-left">举办地点:</div>
  30. <div class="ui-info-right">{{ listDetail.place }}</div>
  31. </div>
  32. <div class="ui-li-right">
  33. <div class="ui-info-left">展商数量:</div>
  34. <div class="ui-info-right">{{ listDetail.showbusinessNumber }}</div>
  35. </div>
  36. </li>
  37. <li class="ui-ul-info">
  38. <div class="ui-info-left">主办单位:</div>
  39. <div class="ui-info-right">{{ listDetail.company }}</div>
  40. </li>
  41. <li class="ui-ul-info">
  42. <div class="ui-info-left">承办单位:</div>
  43. <div class="ui-info-right">{{ listDetail.undertakeCompany }}</div>
  44. </li>
  45. <li class="ui-ul-info">
  46. <div class="ui-info-left">会展面积:</div>
  47. <div class="ui-info-right">{{ listDetail.area }}万平</div>
  48. </li>
  49. </ul>
  50. </div>
  51. <div class="user-btn">
  52. <el-button type="primary" @click="toJoin(listDetail.extendTwo)">参展报名</el-button>
  53. <el-button v-if="yunShang" plain @click="toTop(listDetail.exhibitionHallUrl)">云上展厅</el-button>
  54. </div>
  55. <div class="user-info" v-html="listDetail.introduceHtml"></div>
  56. <div class="to-user-detail" @click="aboutInfo"><span style="cursor:hand">相关会议</span></div>
  57. <el-dialog title="参展报名" :visible.sync="dialogFormVisible" :close-on-click-modal="false"
  58. style="width:100%;" :append-to-body="true" :destroy-on-close="destroyOnClose">
  59. <el-form :model="dynamicValidateForm" ref="dynamicValidateForm">
  60. <el-form-item label="展位性质" :label-width="formLabelWidth" prop="radio">
  61. <el-radio-group v-model="dynamicValidateForm.radio" size="medium">
  62. <el-radio label="参展商"></el-radio>
  63. <el-radio label="参展观众"></el-radio>
  64. </el-radio-group>
  65. </el-form-item>
  66. <el-form-item label="企业名称" :label-width="formLabelWidth" prop="unitName" :rules="[
  67. { required: true, message: '请输入企业名称', trigger: 'blur' }
  68. ]">
  69. <el-input v-model="dynamicValidateForm.unitName" placeholder="请输入企业名称"></el-input>
  70. </el-form-item>
  71. <el-form-item label="联系人" :label-width="formLabelWidth" prop="contact" :rules="[
  72. { required: true, message: '请输入联系人', trigger: 'blur' }
  73. ]">
  74. <el-input v-model="dynamicValidateForm.contact" placeholder="请输入联系人"></el-input>
  75. </el-form-item>
  76. <el-form-item label="电话" :label-width="formLabelWidth" prop="mobile" :rules="[
  77. { required: true, message: '请输入电话', trigger: 'blur' }
  78. ]">
  79. <el-input v-model="dynamicValidateForm.mobile" placeholder="请输入电话"></el-input>
  80. </el-form-item>
  81. <el-form-item label="邮箱" :label-width="formLabelWidth" prop="email" :rules="[
  82. { required: true, message: '请输入邮箱', trigger: 'blur' }
  83. ]">
  84. <el-input v-model="dynamicValidateForm.email" placeholder="请输入邮箱"></el-input>
  85. </el-form-item>
  86. <el-form-item label="备注" :label-width="formLabelWidth" prop="advisoryDetails" :rules="[
  87. { required: true, message: '请填写备注', trigger: 'blur' }
  88. ]">
  89. <el-input v-model="dynamicValidateForm.advisoryDetails" placeholder="请输入"></el-input>
  90. </el-form-item>
  91. <el-form-item label="上传附件" :label-width="formLabelWidth">
  92. <el-upload class="upload-demo" ref="upload"
  93. action="/api/file/upload/attachment?module=resourceshare&attachmentBusinessType=exhibition_apply"
  94. :limit="limit" :headers="myHeaders" :on-remove="handleRemove" :on-exceed="onExceed"
  95. :before-upload="beforeUpload" :on-success="handleAvatarSuccessAnnex"
  96. :file-list="fileList" :auto-upload="autoUpload">
  97. <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
  98. </el-upload>
  99. </el-form-item>
  100. </el-form>
  101. <div slot="footer" class="dialog-footer">
  102. <el-button @click="cancel">取 消</el-button>
  103. <el-button type="primary" @click="toReady()">确 定</el-button>
  104. </div>
  105. </el-dialog>
  106. </div>
  107. <div class="ui-right">
  108. <div style="margin-top: 20px;margin-left: 10px;">
  109. <div class="relevanInformation">
  110. <div class="informationTitle informationTitleAfter">
  111. <!-- <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  112. style="height: 20px;vertical-align: middle;"> -->
  113. {{ $t('common.LookBackAt') }}
  114. </div>
  115. <ul class="user-out" style="overflow:auto">
  116. <li v-for="(item, index) in historyInfo" :key="index" @click="toDetail(item)"
  117. class="list-infos">· {{ item.name }}</li>
  118. </ul>
  119. </div>
  120. </div>
  121. <div style="margin-top: 20px;margin-left: 10px;">
  122. <div class="relevanInformation">
  123. <div class="informationTitle informationTitleAfter">
  124. <!-- <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  125. style="height: 20px;vertical-align: middle;"> -->
  126. {{ $t('common.ContactInformations') }}
  127. </div>
  128. <div>
  129. <ul class="user-out">
  130. <li class="user-list-info">
  131. <div class="user-list-pic">
  132. <img src="@/assets/img/exhibition/who.png" alt="" class="user-list-pic-info">
  133. <i>联系人:</i>
  134. </div>
  135. <div class="user-info-d">{{ listDetail.contactMen }}</div>
  136. </li>
  137. <li class="user-list-info">
  138. <div class="user-list-pic">
  139. <img src="@/assets/img/exhibition/24gl-phoneBubble.png" alt=""
  140. class="user-list-pic-info">
  141. <i>电话:</i>
  142. </div>
  143. <div class="user-info-d">{{ listDetail.contactPhone }}</div>
  144. </li>
  145. <li class="user-list-info">
  146. <div class="user-list-pic">
  147. <img src="@/assets/img/exhibition/email.png" alt="" class="user-list-pic-info">
  148. <i>邮箱:</i>
  149. </div>
  150. <div class="user-info-d">{{ listDetail.email }}</div>
  151. </li>
  152. <li class="user-list-info">
  153. <div class="user-list-pic">
  154. <img src="@/assets/img/exhibition/QQ.png" alt="" class="user-list-pic-info">
  155. <i>QQ:</i>
  156. </div>
  157. <div class="user-info-d">{{ listDetail.qq }}</div>
  158. </li>
  159. </ul>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <div class="ui-body" v-if="$i18n.locale == 'en'">
  166. <div class="ui-left">
  167. <h3>{{ listDetail.name }}</h3>
  168. <div class="ui-infos">
  169. <ul class="ui-uls">
  170. <li class="ui-ul-li">
  171. <div class="ui-li-left">
  172. <div class="ui-info-left">Holding time:</div>
  173. <div class="ui-info-right">{{ listDetail.validityStartDate | time("YYYY-MM-DD")
  174. }} -- {{ listDetail.validityEndDate | time("YYYY-MM-DD") }}</div>
  175. </div>
  176. <div class="ui-li-right">
  177. <div class="ui-info-left">Hold area:</div>
  178. <div class="ui-info-rights">{{ listDetail.region }}</div>
  179. </div>
  180. </li>
  181. <li class="ui-ul-li">
  182. <div class="ui-li-left">
  183. <div class="ui-info-left">Host place:</div>
  184. <div class="ui-info-right">{{ listDetail.place }}</div>
  185. </div>
  186. <div class="ui-li-right">
  187. <div class="ui-info-left">Exhibitors number:</div>
  188. <div class="ui-info-right">{{ listDetail.showbusinessNumber }}</div>
  189. </div>
  190. </li>
  191. <li class="ui-ul-info">
  192. <div class="ui-info-left">Host unit:</div>
  193. <div class="ui-info-right">{{ listDetail.company }}</div>
  194. </li>
  195. <li class="ui-ul-info">
  196. <div class="ui-info-left">Responsible unit:</div>
  197. <div class="ui-info-right">{{ listDetail.undertakeCompany }}</div>
  198. </li>
  199. <li class="ui-ul-info">
  200. <div class="ui-info-left">Exhibition area:</div>
  201. <div class="ui-info-right">{{ listDetail.area }}Myriametre</div>
  202. </li>
  203. </ul>
  204. </div>
  205. <div class="user-btn">
  206. <el-button type="primary" @click="toJoin(listDetail.extendTwo)">Apply</el-button>
  207. <el-button v-if="yunShang" plain @click="toTop(listDetail.exhibitionHallUrl)">Exhibition</el-button>
  208. </div>
  209. <div class="user-info" v-html="listDetail.introduceHtml"></div>
  210. <div class="to-user-detail" @click="aboutInfo"><span style="cursor:hand">Related Conference
  211. Registration</span> </div>
  212. <el-dialog title="The exhibition registration" :visible.sync="dialogFormVisible"
  213. :close-on-click-modal="false" style="width:100%;" :append-to-body="true"
  214. :destroy-on-close="destroyOnClose">
  215. <el-form :model="dynamicValidateForm" ref="dynamicValidateForm">
  216. <el-form-item label="Nature of the booth" :label-width="formLabelWidth" prop="radio">
  217. <el-radio-group v-model="dynamicValidateForm.radio" size="medium">
  218. <el-radio label="Exhibitor"></el-radio>
  219. <el-radio label="The exhibition audience"></el-radio>
  220. </el-radio-group>
  221. </el-form-item>
  222. <el-form-item label="The name of firm" :label-width="formLabelWidth" prop="unitName" :rules="[
  223. { required: true, message: 'Please enter the business name', trigger: 'blur' }
  224. ]">
  225. <el-input v-model="dynamicValidateForm.unitName"
  226. placeholder="Please enter the business name"></el-input>
  227. </el-form-item>
  228. <el-form-item label="Contacts" :label-width="formLabelWidth" prop="contact" :rules="[
  229. { required: true, message: 'Please enter the contact person', trigger: 'blur' }
  230. ]">
  231. <el-input v-model="dynamicValidateForm.contact"
  232. placeholder="Please enter the contact person"></el-input>
  233. </el-form-item>
  234. <el-form-item label="Telephone" :label-width="formLabelWidth" prop="mobile" :rules="[
  235. { required: true, message: 'Please enter the telephone number', trigger: 'blur' }
  236. ]">
  237. <el-input v-model="dynamicValidateForm.mobile"
  238. placeholder="Please enter the telephone number"></el-input>
  239. </el-form-item>
  240. <el-form-item label="E-mail" :label-width="formLabelWidth" prop="email" :rules="[
  241. { required: true, message: 'Please enter email address', trigger: 'blur' }
  242. ]">
  243. <el-input v-model="dynamicValidateForm.email" placeholder="Please enter email address">
  244. </el-input>
  245. </el-form-item>
  246. <el-form-item label="Remark" :label-width="formLabelWidth" prop="advisoryDetails" :rules="[
  247. { required: true, message: 'Please fill in the remarks', trigger: 'blur' }
  248. ]">
  249. <el-input v-model="dynamicValidateForm.advisoryDetails" placeholder="Please fill in the remarks">
  250. </el-input>
  251. </el-form-item>
  252. <el-form-item label="Upload attachment" :label-width="formLabelWidth">
  253. <el-upload class="upload-demo" ref="upload"
  254. action="/api/file/upload/attachment?module=resourceshare&attachmentBusinessType=exhibition_apply"
  255. :limit="limit" :headers="myHeaders" :on-remove="handleRemove" :on-exceed="onExceed"
  256. :before-upload="beforeUpload" :on-success="handleAvatarSuccessAnnex"
  257. :file-list="fileList" :auto-upload="autoUpload">
  258. <el-button slot="trigger" size="small" type="primary">Select the file</el-button>
  259. </el-upload>
  260. </el-form-item>
  261. </el-form>
  262. <div slot="footer" class="dialog-footer">
  263. <el-button @click="cancel">Take away</el-button>
  264. <el-button type="primary" @click="toReady()">Determine</el-button>
  265. </div>
  266. </el-dialog>
  267. </div>
  268. <div class="ui-right">
  269. <div style="margin-top: 20px;margin-left: 10px;">
  270. <div class="relevanInformation">
  271. <div class="informationTitle informationTitleAfter">
  272. <!-- <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  273. style="height: 20px;vertical-align: middle;"> -->
  274. {{ $t('common.LookBackAt') }}
  275. </div>
  276. <ul class="user-out" v-infinite-scroll="load" style="overflow:auto">
  277. <li v-for="(item, index) in historyInfo" :key="index" @click="toDetail(item)"
  278. class="list-infos">· {{ item.name }}</li>
  279. </ul>
  280. </div>
  281. </div>
  282. <div style="margin-top: 20px;margin-left: 10px;">
  283. <div class="relevanInformation">
  284. <div class="informationTitle informationTitleAfter">
  285. <!-- <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  286. style="height: 20px;vertical-align: middle;"> -->
  287. {{ $t('common.ContactInformations') }}
  288. </div>
  289. <div>
  290. <ul class="user-out">
  291. <li class="user-list-info">
  292. <div class="user-list-pic">
  293. <img src="@/assets/img/exhibition/who.png" alt="" class="user-list-pic-info">
  294. <i>Contacts:</i>
  295. </div>
  296. <div class="user-info-d">{{ listDetail.contactMen }}</div>
  297. </li>
  298. <li class="user-list-info">
  299. <div class="user-list-pic">
  300. <img src="@/assets/img/exhibition/24gl-phoneBubble.png" alt=""
  301. class="user-list-pic-info">
  302. <i>Telephone:</i>
  303. </div>
  304. <div class="user-info-d">{{ listDetail.contactPhone }}</div>
  305. </li>
  306. <li class="user-list-info">
  307. <div class="user-list-pic">
  308. <img src="@/assets/img/exhibition/email.png" alt="" class="user-list-pic-info">
  309. <i>E-mail:</i>
  310. </div>
  311. <div class="user-info-d">{{ listDetail.email }}</div>
  312. </li>
  313. <li class="user-list-info">
  314. <div class="user-list-pic">
  315. <img src="@/assets/img/exhibition/QQ.png" alt="" class="user-list-pic-info">
  316. <i>QQ:</i>
  317. </div>
  318. <div class="user-info-d">{{ listDetail.qq }}</div>
  319. </li>
  320. </ul>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. </template>
  328. <script>
  329. import { ConventionRegistration } from "@/api/exhibition"
  330. import { getToken } from "@/utils/auth";
  331. import { getTokens } from '@/api/token'
  332. import { ExhibitionListsDetail } from '@/api/exhibition'
  333. import moment from "moment";
  334. export default {
  335. name: "exhibitionServiceDetailInfo",
  336. data() {
  337. return {
  338. dialogFormVisible: false,
  339. dynamicValidateForm: {
  340. unitName: '',
  341. contact: '',
  342. mobile: '',
  343. email: '',
  344. radio: '',
  345. advisoryDetails: '',
  346. },
  347. formLabelWidth: '150px',
  348. fileList: [],
  349. typeNum: null,
  350. limit: 1,
  351. fileInfo: {},
  352. autoUpload: true,
  353. myHeaders: { Authorization: "Bearer " + getToken() },
  354. detailId: null,
  355. three1: null,
  356. listDetail: {},
  357. historyInfo: [],
  358. yunShang: true,
  359. logNum: null,
  360. flag: false,
  361. destroyOnClose: true,
  362. // flagShe: false,
  363. }
  364. },
  365. watch: {
  366. '$i18n.locale'() {
  367. this.initData();
  368. },
  369. },
  370. beforeDestroy() {
  371. // window.onbeforeunload = function (e) {
  372. // var storage = window.sessionStorage;
  373. // storage.clear()
  374. // }
  375. // sessionStorage.removeItem('hzfw-params');
  376. // sessionStorage.removeItem('hzfw-query')
  377. },
  378. mounted() {
  379. // 缓存不存在
  380. if (sessionStorage.getItem('hzfw-params') == null) {
  381. // 原始进入方式
  382. let params1 = this.$route.params
  383. this.detailId = params1.id
  384. this.three1 = params1.three1
  385. sessionStorage.setItem('hzfw-params', JSON.stringify(params1))
  386. } else if (sessionStorage.getItem('hzfw-params') != null) {
  387. // 缓存存在 详情跳转的地方
  388. // 点击详情进来会保存在这里
  389. let params2 = JSON.parse(sessionStorage.getItem('hzfw-params'))
  390. if (this.$route.params.id && (params2.id != this.$route.params.id)) {
  391. params2 = this.$route.params
  392. sessionStorage.setItem('hzfw-params', JSON.stringify(params2))
  393. }
  394. this.detailId = params2.id
  395. this.three1 = params2.three1
  396. }
  397. // 缓存不存在
  398. let query3 = this.$route.query
  399. let num = query3.num
  400. if (num == 1) {
  401. // 点击往期回顾
  402. let query1 = this.$route.query
  403. this.detailId = query1.id
  404. this.three1 = query1.three1
  405. sessionStorage.setItem('hzfw-query', JSON.stringify(query1))
  406. } else {
  407. if (sessionStorage.getItem('hzfw-query') != null) {
  408. let params2 = JSON.parse(sessionStorage.getItem('hzfw-query'))
  409. this.detailId = params2.id
  410. this.three1 = params2.three1
  411. }
  412. }
  413. this.initData()
  414. },
  415. filters: {
  416. twoDecimal(value) {
  417. return parseFloat(String(value)).toFixed(2)
  418. },
  419. time(data, type) {
  420. return moment(data).format(type)
  421. }
  422. },
  423. methods: {
  424. toJoin(time) {
  425. console.log(time);
  426. let user = window.sessionStorage.getItem("user");
  427. if (!this.$Cookies.get('token')) {
  428. if (this.$i18n.locale.toUpperCase() == "ZH") {
  429. this.$message.error("未登录用户无法报名");
  430. } else {
  431. this.$message.error('Users who are not logged in cannot sign up')
  432. }
  433. this.logNum = 1
  434. let logNums = sessionStorage.setItem('num', this.logNum)
  435. // this.$confirm('检测到您未登录,是否登录')
  436. // .then(_ => {
  437. // this.toView('login');
  438. // })
  439. // .catch(_ => {});
  440. // this.toViewLogin = true;
  441. } else {
  442. if (time != '已结束') {
  443. if (this.$Cookies.get('token')) {
  444. this.dialogFormVisible = true
  445. } else {
  446. if (this.$i18n.locale.toUpperCase() == "ZH") {
  447. this.$message('请登录')
  448. } else {
  449. this.$message('Please log in')
  450. }
  451. }
  452. } else {
  453. if (this.$i18n.locale.toUpperCase() == "ZH") {
  454. this.$message('活动已结束')
  455. } else {
  456. this.$message('The event is over')
  457. }
  458. }
  459. }
  460. },
  461. initData() {
  462. let id = this.detailId
  463. let three1 = this.three1
  464. let param = {
  465. id: three1,
  466. language: this.$i18n.locale.toUpperCase(),
  467. }
  468. // console.log(three1, 'three1');
  469. ExhibitionListsDetail(param).then((res) => {
  470. console.log(res);
  471. this.listDetail = res.data.exhibitionManagementLists[0]
  472. this.historyInfo = res.data.historyDate
  473. this.detailId = this.listDetail.id
  474. // if (res.data.historyDate) {
  475. // this.flagShe = false
  476. // }
  477. // this.listNum=res.data.historyDate.length
  478. if (this.listDetail.exhibitionHallUrl) {
  479. this.yunShang = true
  480. } else {
  481. this.yunShang = false
  482. }
  483. })
  484. },
  485. toDetail(item) {
  486. // console.log(id);
  487. let picId = item.id
  488. let three1 = item.extendThree
  489. console.log(picId);
  490. this.$router.push({
  491. name: 'exhibitionServiceDetail', params: {
  492. id: picId,
  493. three1: three1
  494. }
  495. });
  496. // const { href } = this.$router.resolve({
  497. // name: 'exhibitionServiceDetails',
  498. // query: {
  499. // id: picId,
  500. // three1: three1,
  501. // num: 1
  502. // }
  503. // });
  504. // sessionStorage.removeItem('hzfw-query')
  505. // window.open(href, '_blank')
  506. },
  507. toTop(url) {
  508. window.open(url);
  509. },
  510. aboutInfo() {
  511. this.$router.push('conferenceServices')
  512. },
  513. cancel() {
  514. console.log();
  515. this.dialogFormVisible = false
  516. },
  517. toReady() {
  518. this.$refs.upload.clearFiles()
  519. console.log(this.fileInfo);
  520. this.$refs.dynamicValidateForm.validate((valid) => {
  521. if (valid) {
  522. // alert('submit!');
  523. if (this.dynamicValidateForm.radio == "参展商") {
  524. this.typeNum = 0
  525. } else {
  526. this.typeNum = 1
  527. }
  528. if (this.fileInfo.data) {
  529. let exhibitionApply = {
  530. unitName: this.dynamicValidateForm.unitName,
  531. contact: this.dynamicValidateForm.contact,
  532. mobile: this.dynamicValidateForm.mobile,
  533. email: this.dynamicValidateForm.email,
  534. type: this.typeNum,
  535. fileId: this.fileInfo.data.attachmentId,
  536. fileUrl: this.fileInfo.data.path,
  537. advisoryDetails:this.dynamicValidateForm.advisoryDetails,
  538. exhibitionId: this.detailId,
  539. extend1: this.listDetail.extendThree,
  540. extend2: this.$i18n.locale.toUpperCase()
  541. }
  542. console.log(exhibitionApply, '传给后台的参数');
  543. getTokens().then((res) => {
  544. ConventionRegistration(JSON.stringify(exhibitionApply), res.data).then((res) => {
  545. if (this.$i18n.locale.toUpperCase() == "ZH") {
  546. this.$message.success('报名成功')
  547. } else {
  548. this.$message.success('Registration success')
  549. }
  550. }).catch((error) => {
  551. if (this.$i18n.locale.toUpperCase() == "ZH") {
  552. this.$message.error('报名失败')
  553. } else {
  554. this.$message.success('Registration failed')
  555. }
  556. })
  557. })
  558. this.dialogFormVisible = false
  559. this.$refs.dynamicValidateForm.resetFields()
  560. } else {
  561. let exhibitionApply = {
  562. unitName: this.dynamicValidateForm.unitName,
  563. contact: this.dynamicValidateForm.contact,
  564. mobile: this.dynamicValidateForm.mobile,
  565. email: this.dynamicValidateForm.email,
  566. advisoryDetails:this.dynamicValidateForm.advisoryDetails,
  567. type: this.typeNum,
  568. exhibitionId: this.detailId,
  569. extend1: this.listDetail.extendThree,
  570. extend2: this.$i18n.locale.toUpperCase()
  571. }
  572. console.log(exhibitionApply, '传给后台的参数');
  573. getTokens().then((res) => {
  574. ConventionRegistration(JSON.stringify(exhibitionApply), res.data).then((res) => {
  575. if (this.$i18n.locale.toUpperCase() == "ZH") {
  576. this.$message.success('报名成功')
  577. } else {
  578. this.$message.success('Registration success')
  579. }
  580. }).catch((error) => {
  581. if (this.$i18n.locale.toUpperCase() == "ZH") {
  582. this.$message.error('报名失败')
  583. } else {
  584. this.$message.success('Registration failed')
  585. }
  586. })
  587. })
  588. this.dialogFormVisible = false
  589. this.$refs.dynamicValidateForm.resetFields()
  590. }
  591. } else {
  592. console.log('error submit!!');
  593. return false;
  594. }
  595. });
  596. },
  597. handleRemove(file, fileList) {
  598. this.files.forEach((i) => {
  599. if (i == file.uid) {
  600. var index = this.files.indexOf(i);
  601. this.files.splice(index, 1);
  602. }
  603. });
  604. },
  605. onExceed(files, fileList) {
  606. console.log(files, fileList);
  607. if (this.$i18n.locale.toUpperCase() == "ZH") {
  608. this.$message.error('最多上传一个附件')
  609. } else {
  610. this.$message.error('A maximum of one attachment can be uploaded')
  611. }
  612. },
  613. handleAvatarSuccessAnnex(res, file) {
  614. console.log(res);
  615. this.fileInfo = res
  616. console.log(this.fileInfo);
  617. // this.files.push(res.data.attachmentId);
  618. },
  619. beforeUpload(file) {
  620. var FileExt = file.name.replace(/.+\./, "");
  621. if (
  622. ["zip", "pdf", "doc", "docx", "excel", "xls", "xlsx"].indexOf(
  623. FileExt.toLowerCase()
  624. ) === -1
  625. ) {
  626. if (this.$i18n.locale.toUpperCase() == "ZH") {
  627. this.$message({
  628. type: "warning",
  629. message: "请上传zip,pdf,word,excel的附件!",
  630. });
  631. } else {
  632. this.$message({
  633. type: "warning",
  634. message:
  635. "Please upload the attachment of zip, PDF, word and excel!",
  636. });
  637. }
  638. this.fileList.splice(this.fileList.indexOf(file), 1);
  639. return false;
  640. }
  641. this.isLt2k = file.size / 1024 / 1024 < 2 ? "1" : "0";
  642. if (this.isLt2k === "0") {
  643. if (this.$i18n.locale.toUpperCase() == "ZH") {
  644. this.$message({
  645. message: "上传文件大小不能超过2M!",
  646. type: "error",
  647. });
  648. } else {
  649. this.$message({
  650. message: "Upload file size cannot exceed 2m!",
  651. type: "error",
  652. });
  653. }
  654. this.fileList.splice(this.fileList.indexOf(file), 1);
  655. return false;
  656. }
  657. },
  658. }
  659. }
  660. </script>
  661. <style lang="less" scoped>
  662. .box {
  663. margin-top: 10px;
  664. background: #fff;
  665. /* height: 500px; */
  666. padding: 20px 0;
  667. .crumbs {
  668. margin-left: 20px;
  669. }
  670. }
  671. .user-info {
  672. margin-top: 20px;
  673. }
  674. .ui-body {
  675. padding: 30px 12px;
  676. display: flex;
  677. justify-content: space-between;
  678. .ui-left {
  679. width: 63%;
  680. position: relative;
  681. h3 {
  682. display: inline-block;
  683. width: 90%;
  684. margin-left: 5%;
  685. text-align: center;
  686. overflow: hidden;
  687. white-space: nowrap;
  688. text-overflow: ellipsis;
  689. }
  690. .ui-infos {
  691. width: 100%;
  692. height: 240px;
  693. background-image: url('~@/assets/img/exhibition/Group 98.png');
  694. border: 1px solid #d8d6d6;
  695. background-size: 100% 100%;
  696. .ui-uls {
  697. width: 100%;
  698. height: 200px;
  699. padding: 20px 20px;
  700. .ui-ul-li {
  701. display: flex;
  702. height: 40px;
  703. width: 100%;
  704. .ui-li-left {
  705. width: 50%;
  706. height: 40px;
  707. display: flex;
  708. }
  709. .ui-li-right {
  710. width: 50%;
  711. height: 40px;
  712. display: flex;
  713. }
  714. .ui-info-left {
  715. width: 40%;
  716. height: 40px;
  717. line-height: 40px;
  718. font-size: 15px;
  719. color: rgb(0, 0, 0);
  720. text-align: center;
  721. }
  722. .ui-info-right {
  723. font-size: 15px;
  724. height: 40px;
  725. width: 60%;
  726. line-height: 40px;
  727. color: rgb(52, 194, 250);
  728. overflow: hidden;
  729. white-space: nowrap;
  730. text-overflow: ellipsis;
  731. }
  732. .ui-info-rights {
  733. font-size: 15px;
  734. height: 40px;
  735. width: 50%;
  736. line-height: 40px;
  737. color: rgb(52, 194, 250);
  738. overflow: hidden;
  739. white-space: nowrap;
  740. text-overflow: ellipsis;
  741. }
  742. }
  743. .ui-ul-info {
  744. width: 100%;
  745. height: 40px;
  746. display: flex;
  747. .ui-info-left {
  748. width: 20%;
  749. height: 40px;
  750. font-size: 15px;
  751. line-height: 40px;
  752. color: rgb(0, 0, 0);
  753. text-align: center;
  754. }
  755. .ui-info-right {
  756. height: 40px;
  757. width: 30%;
  758. line-height: 40px;
  759. color: rgb(52, 194, 250);
  760. overflow: hidden;
  761. white-space: nowrap;
  762. text-overflow: ellipsis;
  763. }
  764. }
  765. }
  766. }
  767. .user-btn {
  768. position: absolute;
  769. top: 220px;
  770. left: 510px;
  771. }
  772. .to-user-detail {
  773. margin-top: 50px;
  774. span {
  775. height: 30px;
  776. line-height: 30px;
  777. color: rgb(21, 138, 247);
  778. border-bottom: 1px solid rgb(21, 138, 247);
  779. cursor: pointer;
  780. }
  781. }
  782. }
  783. .ui-right {
  784. width: 33%;
  785. .relevanInformation {
  786. padding: 0;
  787. overflow: hidden;
  788. .informationTitle {
  789. border-bottom: 1px solid #2C558A;
  790. padding: 0 0 10px 0;
  791. font-weight: 600;
  792. font-size: 20px;
  793. opacity: 0.9;
  794. }
  795. .informationTitleAfter {
  796. position: relative;
  797. }
  798. }
  799. .user-out {
  800. margin-top: 10px;
  801. height: 235px;
  802. overflow: hidden;
  803. width: 100%;
  804. .list-infos {
  805. height: 45px;
  806. line-height: 45px;
  807. padding: 0 20px;
  808. margin-bottom: 5px;
  809. border-bottom: 1px solid rgb(219, 216, 216);
  810. cursor: pointer;
  811. overflow: hidden;
  812. white-space: nowrap;
  813. text-overflow: ellipsis;
  814. }
  815. }
  816. }
  817. }
  818. // li::before {
  819. // content: "";
  820. // display: inline-block;
  821. // width: 5px;
  822. // height: 5px;
  823. // line-height: 5px;
  824. // background-color: skyblue;
  825. // border-radius: 50%;
  826. // margin-right: 5px;
  827. // }
  828. .user-list-info {
  829. display: flex;
  830. height: 40px;
  831. line-height: 40px;
  832. margin-bottom: 5px;
  833. padding: 0 5px;
  834. .user-list-pic {
  835. width: 120px;
  836. i {
  837. font-style: normal;
  838. display: inline-block;
  839. transform: translateY(-14px);
  840. }
  841. .user-list-pic-info {
  842. width: 20px;
  843. height: 20px;
  844. padding: 10px 5px;
  845. }
  846. }
  847. .user-info-d {
  848. width: 240px;
  849. height: 40px;
  850. line-height: 40px;
  851. // background-color: red;
  852. overflow: hidden;
  853. white-space: nowrap;
  854. text-overflow: ellipsis;
  855. }
  856. }
  857. </style>