userCenterActivityRegistration.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. <template>
  2. <div class="container-box">
  3. <div class="filter-box">
  4. <el-radio-group v-model="auditStatusDict" id="radioGroup">
  5. <el-radio-button label="">{{$i18n.locale=='en'? 'All': '全部'}}</el-radio-button>
  6. <el-radio-button label="2">{{$i18n.locale=='en'? 'Under Approval':'审批中'}}</el-radio-button>
  7. <el-radio-button label="4">{{$i18n.locale=='en'? 'Registration Successful': '审批通过'}}</el-radio-button>
  8. <el-radio-button label="3">{{$i18n.locale=='en'? 'Registration Failed': '审批不通过'}}</el-radio-button>
  9. </el-radio-group>
  10. <div>
  11. <el-input :placeholder="$i18n.locale=='zh'?'请输入关键词搜索':'Please enter a keyword search'"
  12. v-model="searchInput" maxlength="200" show-word-limit class="input-with-select" @change="search">
  13. <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
  14. </el-input>
  15. </div>
  16. </div>
  17. <el-table
  18. v-loading="loading"
  19. element-loading-text=""
  20. element-loading-spinner="el-icon-loading"
  21. element-loading-background="rgba(255, 255, 255, 0.6)"
  22. :data="tableData"
  23. tooltip-effect="dark"
  24. :border="true"
  25. size="small"
  26. :lazy="true"
  27. height="570"
  28. :empty-text="$i18n.locale=='en'? 'Sorry no data!':'暂无数据'">
  29. <!--活动名称-->
  30. <el-table-column :label="$i18n.locale=='en'? 'Events':'活动名称'" width="400" header-align="center">
  31. <template slot-scope="scope">{{ scope.row.guestRoomInfoId }}</template>
  32. </el-table-column>
  33. <!--活动时间-->
  34. <el-table-column :label="$i18n.locale=='en'? 'Date':'活动时间'" width="90" header-align="center">
  35. <template slot-scope="scope">{{ scope.row.isAcceptMeeting }}</template>
  36. </el-table-column>
  37. <!--姓名-->
  38. <el-table-column prop="name" label="姓名" width="120" v-if="$i18n.locale=='zh'" header-align="center"></el-table-column>
  39. <el-table-column prop="nameEn" label="Name" width="120" v-else header-align="center"></el-table-column>
  40. <!--审批状态-->
  41. <el-table-column :label="$i18n.locale=='en'? 'Status':'状态'" width="84"
  42. header-align="center">
  43. <template slot-scope="scope">{{ approvalStatus[scope.row.auditStatusDict]}}</template>
  44. </el-table-column>
  45. <!--审批意见-->
  46. <el-table-column :label="$i18n.locale=='en'? 'Opinions':'审批意见'" width="170"
  47. header-align="center">
  48. <template slot-scope="scope">
  49. <span v-show="scope.row.auditStatusDict=='1' || scope.row.auditStatusDict=='2'"
  50. style="display: block; text-align: center">/</span>
  51. <div v-show="scope.row.auditStatusDict!='1' && scope.row.auditStatusDict!='2'">
  52. <el-tooltip v-for="(com,c) in scope.row.comments" :key="c" class="item" effect="dark"
  53. :content="com" placement="top">
  54. <i class="icon el-icon-tickets"></i>
  55. </el-tooltip>
  56. <!-- <span v-for="(com,c) in scope.row.comments" :key="c" style="display: block">{{ com }}</span> -->
  57. </div>
  58. </template>
  59. </el-table-column>
  60. <!--操作-->
  61. <el-table-column :label="$i18n.locale=='en'? 'Operation': '操作'" width="90" header-align="center">
  62. <template slot-scope="scope">
  63. <!-- <el-tooltip v-if="scope.row.auditStatusDict=='3'||scope.row.auditStatusDict=='2'" class="item" effect="dark" :content="$i18n.locale=='en'? 'ReApply': '重新报名'" placement="top">-->
  64. <el-tooltip v-if="scope.row.auditStatusDict=='2'||scope.row.auditStatusDict=='5'" class="item" effect="dark" :content="$i18n.locale=='en'? 'ReApply': '重新报名'" placement="top">
  65. <i class="icon el-icon-refresh-right" @click="openApply(scope.row)"></i>
  66. </el-tooltip>
  67. <!--<el-tooltip v-if="scope.row.auditStatusDict=='3'||scope.row.auditStatusDict=='2'" class="item" effect="dark" :content="$i18n.locale=='en'? 'Check': '查看'" placement="top">
  68. <i class="icon el-icon-refresh-right" @click="openApply(scope.row)"></i>
  69. </el-tooltip>-->
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. <div style="width: 100%;text-align: center;">
  74. <el-pagination
  75. style="margin-top: 20px"
  76. layout="prev, pager, next"
  77. @current-change="currentChange"
  78. :total="totalNum">
  79. </el-pagination>
  80. </div>
  81. <el-dialog
  82. :title="$t('common.ActivityRegistration')"
  83. :visible.sync="dialog"
  84. width="50%">
  85. <el-form :rules="rules" ref="formLabelAlign" :model="formLabelAlign" class="demo-ruleForm"
  86. v-show="$i18n.locale=='zh'"
  87. label-width="200px" style="width: 700px;margin: auto;margin-top: -20px;">
  88. <el-form-item :label="$t('common.ActivityName')"
  89. style="font-weight: 600; color:rgb(153, 153, 153) !important;">
  90. <span style="line-height: 50px;">{{dialogData.guestRoomInfoId}}</span>
  91. </el-form-item>
  92. <el-form-item label="姓名" class="el-label">
  93. <el-input class="el-input" v-model="formLabelAlign.name" disabled
  94. :placeholder="$t('common.NameTips')"></el-input>
  95. </el-form-item>
  96. <el-form-item :label="$t('common.NameoftheEntity')" class="el-label" prop="unitName">
  97. <el-select popper-class="mySelect" style="width: 400px" v-model="formLabelAlign.unitName" filterable
  98. :placeholder="$t('common.NameEntityTips')"
  99. @blur="selectBlur">
  100. <el-option
  101. v-for="item in projectList"
  102. :key="item.baseEntityId"
  103. :label="item.unitName"
  104. :value="item.baseEntityId">
  105. </el-option>
  106. </el-select>
  107. </el-form-item>
  108. <el-form-item :label="$t('common.Position')" class="el-label" prop="post">
  109. <el-input class="el-input" v-model="formLabelAlign.post"
  110. :placeholder="$t('common.PositionTips')"></el-input>
  111. </el-form-item>
  112. <el-form-item style="position: relative;" :label="$t('common.ContactPhoneNumber')" prop="contactNumber"
  113. class="dcp_input">
  114. <GlobalRoaming ref='GlobalRoaming' :size="{width:'398px'}"
  115. v-model="formLabelAlign.contactNumber"
  116. :mobile="formLabelAlign.contactNumber"
  117. :code="select"
  118. @getAreaCode="getPassAreaCode"></GlobalRoaming>
  119. </el-form-item>
  120. <el-form-item :label="$t('common.Email')" class="el-label" prop="mailbox">
  121. <el-input class="el-input" v-model="formLabelAlign.mailbox"
  122. :placeholder="$t('common.EmailTips')"></el-input>
  123. </el-form-item>
  124. </el-form>
  125. <el-form :rules="rules" ref="formLabelAlign" :model="formLabelAlign" class="demo-ruleForm"
  126. v-show="$i18n.locale=='en'"
  127. label-width="200px" style="width: 700px;margin: auto;margin-top: -20px;">
  128. <el-form-item :label="$t('common.ActivityName')"
  129. style="font-weight: 600; color:rgb(153, 153, 153) !important;">
  130. <span style="line-height: 50px;">{{dialogData.guestRoomInfoId}}</span>
  131. </el-form-item>
  132. <el-form-item label="Country" class="el-label" prop="unitCountry" v-if="$i18n.locale!=='zh'">
  133. <el-select class="el-select" filterable v-model="formLabelAlign.unitCountry"
  134. :placeholder="$t('common.CountryTips')"
  135. style="width: 400px;">
  136. <el-option :label="item.label" :value="item.value"
  137. v-for="(item,index) in countrydate"></el-option>
  138. </el-select>
  139. </el-form-item>
  140. <el-form-item label="Region" class="el-label" prop="Region" v-if="$i18n.locale=='en'">
  141. <!--<el-input class="el-input" v-model="formLabelAlign.Region"
  142. :placeholder="$t('common.RegionTips')"></el-input>-->
  143. <el-select class="el-select" filterable v-model="formLabelAlign.Region" :placeholder="$t('common.RegionTips')"
  144. style="width: 400px;">
  145. <el-option :label="item.label" :value="item.label"
  146. v-for="(item,index) in Regiondate"></el-option>
  147. </el-select>
  148. </el-form-item>
  149. <el-form-item label="Title" class="el-label" prop="Title" v-if="$i18n.locale=='en'">
  150. <!-- <el-input class="el-input" v-model="formLabelAlign.Title"></el-input> -->
  151. <el-select class="el-select" filterable v-model="formLabelAlign.Title"
  152. :placeholder="$t('common.TitleTips')"
  153. style="width: 400px;">
  154. <el-option :label="item.label" :value="item.value"
  155. v-for="(item,index) in titleList"></el-option>
  156. </el-select>
  157. </el-form-item>
  158. <el-form-item label="First(given) Name(s)" class="el-label" prop="FirstName" v-if="$i18n.locale=='en'">
  159. <el-input class="el-input" v-model="formLabelAlign.FirstName"
  160. :placeholder="$t('common.FirstNameTips')"></el-input>
  161. </el-form-item>
  162. <el-form-item label="Last Name" class="el-label" prop="LastName" v-if="$i18n.locale=='en'">
  163. <el-input class="el-input" v-model="formLabelAlign.LastName"
  164. :placeholder="$t('common.LastNameTips')"></el-input>
  165. </el-form-item>
  166. <el-form-item :label="$t('common.NameoftheEntity')" class="el-label" prop="unitName">
  167. <el-select popper-class="mySelect" style="width: 400px" v-model="formLabelAlign.unitName" filterable
  168. :placeholder="$t('common.NameEntityTips')"
  169. @blur="selectBlur">
  170. <el-option
  171. v-for="item in projectList"
  172. :key="item.baseEntityId"
  173. :label="item.unitName"
  174. :value="item.baseEntityId">
  175. </el-option>
  176. </el-select>
  177. </el-form-item>
  178. <el-form-item :label="$t('common.Position')" class="el-label" prop="post">
  179. <el-input class="el-input" v-model="formLabelAlign.post"
  180. :placeholder="$t('common.PositionTips')"></el-input>
  181. </el-form-item>
  182. <el-form-item style="position: relative;" :label="$t('common.ContactPhoneNumber')" prop="contactNumber"
  183. class="dcp_input">
  184. <GlobalRoaming ref='GlobalRoaming' :size="{width:'398px'}"
  185. v-model="formLabelAlign.contactNumber"
  186. :mobile="formLabelAlign.contactNumber"
  187. :code="select"
  188. @getAreaCode="getPassAreaCode"></GlobalRoaming>
  189. </el-form-item>
  190. <el-form-item :label="$t('common.Email')" class="el-label" prop="mailbox">
  191. <el-input class="el-input" v-model="formLabelAlign.mailbox"
  192. :placeholder="$t('common.EmailTips')"></el-input>
  193. </el-form-item>
  194. </el-form>
  195. <span slot="footer" class="dialog-footer">
  196. <el-button @click="dialog = false">{{$t('common.Cancel')}}</el-button>
  197. <el-button type="primary" @click="save()">{{$t('common.Confirm')}}</el-button>
  198. </span>
  199. </el-dialog>
  200. </div>
  201. </template>
  202. <script>
  203. import Base from "@/views/base/Base";
  204. import {getDicts} from "@/api/dict";
  205. import {formatDate} from "@/utils/formatUtils";
  206. import {getActivityApplyByIdForWeb, getMeetingApproveHistory} from '@/api/meeting/meetingApply'
  207. import {get} from '@/api/meeting/meetingApply'
  208. import {getList} from '@/api/country'
  209. import {saveActivityOrUpdate, getApproverId} from "@/api/meeting/meetingApply";
  210. import GlobalRoaming from "@/components/GlobalRoaming";
  211. import {countryNationalSpace} from '@/api/cooperation/baseCooperationUnit'
  212. export default {
  213. name: "userCenterActivityRegistration",
  214. extends: Base,
  215. components: { GlobalRoaming },
  216. data() {
  217. return {
  218. Regiondate:[],
  219. language:'',
  220. userId: JSON.parse(localStorage.getItem('user')).userId,
  221. // 字典
  222. statusArray: [],
  223. statusEnArray: [],
  224. // 检索
  225. auditStatusDict:'',
  226. searchInput:'',
  227. // 分页
  228. cureentPage: 1,
  229. totalNum: 0,
  230. // 表格
  231. tableData:[],
  232. loading:true,
  233. // 重新报名
  234. processKey: "MEETING_APPROVE",
  235. approverId: '',
  236. dialog:false,
  237. dialogData:{}, // 存储当前活动报名审批信息
  238. meetingApply:{}, // 存储当前活动报名信息
  239. formLabelAlign: { // 表单
  240. id:null,
  241. name: '',
  242. unitName: '',
  243. ifName: null,
  244. post: '',
  245. contactNumber: '',
  246. mailbox: '',
  247. FirstName: '',
  248. LastName: '',
  249. unitCountry: '',
  250. Title: '',
  251. Region: '',
  252. auditStatusDict: '',
  253. language: '',
  254. selectCode: '',
  255. invitationCode: '',//邀请码
  256. meetingId: '',//会议id
  257. // reApply: 'true'//重新报名标识
  258. },
  259. titleList: [
  260. {
  261. value: 'Mr.',
  262. lable: 'Mr.'
  263. }, {
  264. value: 'Ms.',
  265. lable: 'Ms.'
  266. }, {
  267. value: 'Dr.',
  268. lable: 'Dr.'
  269. }, {
  270. value: 'Prof.',
  271. lable: 'Prof.'
  272. }
  273. ],
  274. select:'', //区号
  275. projectList: [], // 单位 list
  276. countrydate:[]
  277. }
  278. },
  279. mounted() {
  280. const that = this;
  281. this.getBaseList();// 获取企业报名信息
  282. this.$nextTick(function () {
  283. getDicts('APPROVAL_STATUS').then(res => {
  284. that.statusArray = res.data[0];
  285. that.statusEnArray = [{"label": "UnderApproval", "value": "2"},
  286. {"label": "Registration Failed", "value": "3"},
  287. {"label": "Registration Successful", "value": "4"}];
  288. })
  289. that.getApplyHistory();
  290. })
  291. },
  292. watch:{
  293. "$i18n.locale"() {
  294. this.auditStatusDict = '';
  295. this.searchInput = '';
  296. this.cureentPage = 1;
  297. this.totalNum = 0;
  298. this.getBaseList();// 获取企业报名信息
  299. this.getApplyHistory()
  300. },
  301. 'auditStatusDict'(val,oldVal){
  302. this.getApplyHistory()
  303. },
  304. 'dialog'(val,oldval){
  305. if(val == false){
  306. this.dialogData = {}
  307. this.meetingApply = {}
  308. this.formLabelAlign = {
  309. id:null,
  310. name: '',
  311. unitName: '',
  312. ifName: null,
  313. post: '',
  314. contactNumber: '',
  315. mailbox: '',
  316. FirstName: '',
  317. LastName: '',
  318. unitCountry: '',
  319. Title: '',
  320. Region: '',
  321. auditStatusDict: '',
  322. language: '',
  323. selectCode: '',
  324. invitationCode: '',//邀请码
  325. meetingId: '',//会议id
  326. }
  327. }
  328. }
  329. },
  330. computed: {
  331. approvalStatus: function () {
  332. if (this.$i18n.locale == "en") {
  333. return this.statusEnArray.array2Obj('value', 'label');
  334. } else {
  335. return this.statusArray.array2Obj('value', 'label');
  336. }
  337. },
  338. rules() {
  339. return {
  340. Country: [
  341. {required: true, message: 'Please enter Country', trigger: 'change'}
  342. ],
  343. unitName: [
  344. {
  345. required: true,
  346. message: this.$i18n.locale == 'zh' ? '请输入单位名称' : 'Please enter the unit name',
  347. trigger: 'change'
  348. },
  349. ],
  350. unitNameEn: [
  351. {required: true, message: 'Please enter the unit name', trigger: 'blur'},
  352. ],
  353. Region: [
  354. {required: true, message: 'Please select an area', trigger: 'blur'},
  355. ],
  356. Title: [
  357. {required: true, message: 'Please choose a title', trigger: 'blur'},
  358. ],
  359. unitCountry: [
  360. {required: true, message: 'Please enter the name of the country', trigger: 'change'}
  361. ],
  362. FirstName: [
  363. {required: true, message: 'Please enter First(given) Name(s)', trigger: 'blur'},
  364. ],
  365. LastName: [
  366. {required: true, message: 'Please enter Last Name', trigger: 'blur'},
  367. ],
  368. post: [
  369. {
  370. required: true,
  371. message: this.$i18n.locale == 'zh' ? '请输入职务' : 'Please enter job title',
  372. trigger: 'blur'
  373. }
  374. ],
  375. postEn: [
  376. {required: true, message: 'Please enter job title', trigger: 'blur'}
  377. ],
  378. contactNumber: [
  379. {
  380. required: true,
  381. message: this.$i18n.locale == 'zh' ? '请输入联系电话' : 'Please enter cellphone number',
  382. trigger: 'blur'
  383. },
  384. {
  385. pattern: /^0{0,1}(13[0-9]|15[7-9]|153|151|156|18[1-9])[0-9]{8}$/,
  386. message: this.$i18n.locale == 'zh' ? '联系电话格式不正确,请重新输入' : 'Contact number format is incorrect, please re-enter',
  387. trigger: 'blur'
  388. }
  389. ],
  390. mailbox: [
  391. {
  392. required: true,
  393. message: this.$i18n.locale == 'zh' ? '请输入邮箱' : 'Please enter email address',
  394. trigger: 'blur'
  395. },
  396. {
  397. pattern: /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*@[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*\.[a-z]{2,}$/,
  398. message: this.$i18n.locale == 'zh' ? '邮箱格式不正确,请重新输入' : 'Email format is incorrect, please re-enter',
  399. trigger: 'blur'
  400. }
  401. ],
  402. }
  403. }
  404. },
  405. methods: {
  406. // 获取数据
  407. getApplyHistory() {
  408. const that = this;
  409. let params = {
  410. pageNo: this.cureentPage,
  411. pageSize: 10,
  412. auditStatusDict: this.auditStatusDict,
  413. createBy: this.userId,
  414. language: this.$i18n.locale.toUpperCase(),
  415. };
  416. getActivityApplyByIdForWeb(params).then(res => {
  417. let that = this;
  418. if (res.data) {
  419. if (res.data.page) {
  420. this.totalNum = Number(res.data.page.totalCount);
  421. }
  422. if (res.data.page.list) {
  423. that.tableData = res.data.page.list;
  424. /*that.tableData.forEach((i)=>{
  425. i.createDate = i.createDate ? formatDate(i.createDate, "YYYY-MM-DD") : "";
  426. })*/
  427. that.tableData.forEach(item => {
  428. that.$set(item, 'comments', [])
  429. // item.comments = []
  430. item.isAcceptMeeting = item.isAcceptMeeting - 0
  431. item.isAcceptMeeting = item.isAcceptMeeting ? formatDate(item.isAcceptMeeting, "YYYY-MM-DD") : "";
  432. getMeetingApproveHistory(item.id).then(res => {
  433. if (res.data) {
  434. if (res.data.tasks) {
  435. res.data.tasks.forEach(com => {
  436. if (com.comment) {
  437. item.comments.push(com.comment)
  438. }
  439. })
  440. }
  441. }
  442. }).then(function () {
  443. console.log('that.tableData', that.tableData)
  444. }).catch(() => {
  445. this.loading = false
  446. })
  447. })
  448. } else {
  449. that.tableData = []
  450. }
  451. } else {
  452. that.tableData = []
  453. }
  454. this.loading = false
  455. })
  456. },
  457. // 输入关键字检索
  458. search(){
  459. this.getApplyHistory()
  460. },
  461. // 分页
  462. currentChange(p) {
  463. this.cureentPage = p;
  464. this.getApplyHistory();
  465. },
  466. // 重新报名
  467. async openApply(ele){
  468. const that = this;
  469. that.dialog = true;
  470. that.dialogData = ele;
  471. let id = ele.id;
  472. await this.getApply(id)
  473. },
  474. async getApply(id){
  475. get(id).then(result => {
  476. let data = result.data;
  477. if(data) {
  478. this.meetingApply = data.meetingApply || this.meetingApply;
  479. this.formLabelAlign.id = this.meetingApply.id;
  480. this.formLabelAlign.name = this.meetingApply.name;
  481. this.formLabelAlign.ifName = 'false';
  482. if(this.$i18n.locale=='zh') {
  483. this.formLabelAlign.unitName = this.meetingApply.unitName;
  484. }else {
  485. this.formLabelAlign.unitName = this.meetingApply.unitNameEn;
  486. }
  487. console.log(this.projectList);
  488. this.projectList.forEach(i=>{
  489. if(this.$i18n.locale=='zh') {
  490. if (this.meetingApply.unitName == i.unitName) {
  491. this.formLabelAlign.unitName = i.baseEntityId;
  492. this.formLabelAlign.ifName = 'true'
  493. }
  494. }else {
  495. if (this.meetingApply.unitNameEn == i.unitName) {
  496. this.formLabelAlign.unitName = i.baseEntityId;
  497. this.formLabelAlign.ifName = 'true'
  498. }
  499. }
  500. });
  501. // this.formLabelAlign.reApply = 'true';
  502. this.formLabelAlign.post = this.meetingApply.positionName;
  503. this.formLabelAlign.contactNumber = this.meetingApply.tel;
  504. this.formLabelAlign.mailbox = this.meetingApply.email;
  505. this.formLabelAlign.unitCountry = this.meetingApply.unitCountryDict;
  506. this.formLabelAlign.Region = this.meetingApply.unitCountryDictEn;
  507. this.formLabelAlign.Title = this.meetingApply.dietaryTaboos;
  508. this.formLabelAlign.FirstName = this.meetingApply.givenName;
  509. this.formLabelAlign.LastName = this.meetingApply.surname;
  510. this.formLabelAlign.meetingId = this.meetingApply.meetingId;
  511. this.select = this.formLabelAlign.selectCode = this.meetingApply.mobileAreaCodeDictEn;
  512. }
  513. }).catch(error => {
  514. });
  515. },
  516. save: function () {
  517. //流程改造6
  518. this.formLabelAlign.auditStatusDict = '2';
  519. this.$refs['formLabelAlign'].validate((valid) => {
  520. if (valid) {
  521. this.upData();
  522. } else {
  523. return false;
  524. }
  525. });
  526. },
  527. async upData() {
  528. const that = this;
  529. that.formLabelAlign.invitationCode = that.meetingApply.invitationCode;
  530. this.submitHandler((token) => {
  531. getApproverId(this.meetingApply.invitationCode).then((result)=>{
  532. result = result.data;
  533. var str = "";
  534. for(var i = 0; i<result.length; i++){
  535. str += result[i].userId + ",";
  536. }
  537. if (str.length > 0) {
  538. str = str.substr(0, str.length - 1);
  539. }
  540. this.approverId = str;
  541. // 会员模块后期加的 可传空字符串
  542. let activityIds = this.dialogData.travelPointId;
  543. saveActivityOrUpdate(
  544. JSON.stringify(this.formLabelAlign),
  545. this.approverId,
  546. this.taskComment,
  547. token,
  548. activityIds
  549. ).then((res) => {
  550. let type = 'success';
  551. if (res.msg == 'error') {
  552. res.msg = this.$i18n.locale == 'zh' ? '您已报名成功,请勿重复报名。' : 'ou have signed up successfully, please do not repeat.';
  553. type = 'warning';
  554. } else {
  555. res.msg = this.$i18n.locale == 'zh' ? '报名成功' : 'Successful registration';
  556. }
  557. this.$message({
  558. message: res.msg,
  559. type: type
  560. });
  561. this.resetToken();
  562. this.centerDialogVisible = false;
  563. this.dialog = false;
  564. }).catch((error) => {
  565. this.resetToken();
  566. });
  567. });
  568. });
  569. },
  570. // 号码
  571. getPassAreaCode(code) {
  572. this.select = code;
  573. this.formLabelAlign.selectCode = code;
  574. },
  575. // 单位 list
  576. getBaseList() {
  577. const that = this;
  578. getList({language: this.$i18n.locale.toUpperCase()}).then(res => {
  579. if (JSON.stringify(res.data) !== '{}') {
  580. that.projectList = res.data.baseUnitViews || [];
  581. }
  582. })
  583. getDicts('unit_country_dict_en,CONTINENT_CODE_DICT_EN').then(result => {
  584. this.countrydate = result.data[0];
  585. this.Regiondate = result.data[1];
  586. });
  587. },
  588. selectBlur(e) {
  589. this.formLabelAlign.unitName = "";
  590. if (e.target.value) {
  591. // 不在表单的时候不需要判断,也不需要isname字段
  592. // 输入内容不在下拉框中时,formLabelAlign.unitName=e.target.value,数据传输为unitName,有内容时,添加字段unitID
  593. this.formLabelAlign.unitName = e.target.value;
  594. this.formLabelAlign.ifName = 'false'
  595. } else {
  596. this.formLabelAlign.ifName = 'true'
  597. }
  598. },
  599. }
  600. }
  601. </script>
  602. <style scoped>
  603. .container-box {
  604. padding: 20px;
  605. }
  606. .filter-box {
  607. display: flex;
  608. justify-content: space-between;
  609. padding: 20px 0;
  610. }
  611. /deep/ #radioGroup .el-radio-button__inner{
  612. border: none;
  613. }
  614. /deep/ #radioGroup .el-radio-button.is-active .el-radio-button__inner{
  615. background-color: white;
  616. color: #ff3b00;
  617. box-shadow: 0 0 0 0 #409EFF;
  618. }
  619. .dcp_input /deep/ .el-input__inner {
  620. width: 150px;
  621. }
  622. .dcp_input /deep/ .el-select {
  623. width: 150px;
  624. }
  625. </style>