gerenZiliao.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. <template>
  2. <view class="jz-content-box">
  3. <view class="upload-img-box">
  4. <jiazhengUpload @getFileUrl="getFileUrl" changjingType="shenfenzheng"></jiazhengUpload>
  5. </view>
  6. <view class="form-label-input">
  7. <view class="phone-form-label"><text class="form-label-require">*</text>手机号</view>
  8. <uni-easyinput type="number" v-model="formData.userName" placeholder="请输入手机号" maxlength="11" />
  9. </view>
  10. <view class="form-label-input">
  11. <view class="phone-form-label"><text class="form-label-require">*</text>姓名</view>
  12. <uni-easyinput v-model="formData.realName" placeholder="请输入姓名" />
  13. </view>
  14. <view class="form-label-input">
  15. <view class="phone-form-label">
  16. <text class="form-label-require">*</text>
  17. <text v-if="formData.idtype ==1">身份证号</text>
  18. <text v-if="formData.idtype ==2">护照号</text>
  19. <icon @click="idCardChange" class="change-icon">切换</icon>
  20. </view>
  21. <uni-easyinput @blur="idCardBlur" v-model="formData.idcard" placeholder="请输入身份证号或护照号" maxlength="18" />
  22. </view>
  23. <view class="form-label-select">
  24. <view class="phone-form-label"><text class="form-label-require">*</text>生日</view>
  25. <uni-datetime-picker type="line" v-model="formData.birthday">
  26. <view class="form-radio-select">
  27. <view>{{formData.birthday}}</view>
  28. <icon></icon>
  29. </view>
  30. </uni-datetime-picker>
  31. </view>
  32. <view class="form-label-select">
  33. <view class="phone-form-label"><text class="form-label-require">*</text>籍贯</view>
  34. <picker mode="multiSelector" :range="multiArray" :range-key="'label'" :value="multiIndex"
  35. @columnchange="bindMultiPickerColumnChange" @change="onPickerConfirm" class="select-picker-box">
  36. <view class="form-radio-select">
  37. <view>{{ formData.jiguanShengName}} {{formData.jiguanShiName}}</view>
  38. <icon></icon>
  39. </view>
  40. </picker>
  41. </view>
  42. <view class="form-label-input">
  43. <view class="phone-form-label"><text class="form-label-require">*</text>身份证地址</view>
  44. <uni-easyinput v-model="formData.hujiDizhi" placeholder="请输入身份证地址" />
  45. </view>
  46. <view class="form-label-select">
  47. <view class="phone-form-label"><text class="form-label-require">*</text>民族</view>
  48. <picker :range="minzuList" mode='selector' :value="formData.minzuIndex" range-key="name"
  49. @change="minzuChange" @cancel="minzuCancel" class="select-picker-box">
  50. <view class="form-radio-select">
  51. <view>{{ formData.minzu.name }}</view>
  52. <icon></icon>
  53. </view>
  54. </picker>
  55. </view>
  56. <view class="form-label-radio">
  57. <view class="phone-form-label"><text class="form-label-require">*</text>性别</view>
  58. <view class="form-radio-group">
  59. <view class="form-radio-item" :class="{genderActive: formData.gender==1}" @click="genderSelect(1)">
  60. 男</view>
  61. <view class="form-radio-item" :class="{genderActive: formData.gender==2}" @click="genderSelect(2)">
  62. 女</view>
  63. </view>
  64. </view>
  65. <view class="form-label-radio form-top-margin flex-start-row">
  66. <view class="phone-form-label"><text class="form-label-require">*</text>学历</view>
  67. <dataChecked :list="xueliList" :selectedIds='formData.xueli.id' mode="single" :showAdd="false"
  68. @change="selectChangeXueliList" />
  69. </view>
  70. <view class="form-label-radio flex-start-row">
  71. <view class="phone-form-label"><text class="form-label-require"></text>婚姻 </view>
  72. <dataChecked :list="hunyinList" mode="single" :selectedIds='formData.hunyin.id' :showAdd="false"
  73. @change="selectChangeHunyinList" />
  74. </view>
  75. <view class="form-label-input">
  76. <view class="phone-form-label"><text class="form-label-require"></text>通讯地址</view>
  77. <view @click="openMap" class="input-text-row">
  78. <view>{{formData.juzhuDizhi}}</view>
  79. <icon></icon>
  80. </view>
  81. <!-- <picker :range="shuxiangList" mode='selector' :value="formData.shuxiangIndex" range-key="name"
  82. @change="shuxiangChange" @cancel="shuxiangCancel" class="select-picker-box">
  83. <view class="form-radio-select">
  84. <view>{{ formData.juzhuDizhi }}</view>
  85. <icon></icon>
  86. </view>
  87. </picker> -->
  88. </view>
  89. <view class="form-label-select">
  90. <view class="phone-form-label"><text class="form-label-require"></text>星座</view>
  91. <picker :range="xingzuoList" mode='selector' :value="formData.xingzuoIndex" range-key="name"
  92. @change="xingzuoChange" @cancel="xingzuoCancel" class="select-picker-box">
  93. <view class="form-radio-select">
  94. <view>{{ formData.xingzuo.name }}</view>
  95. <icon></icon>
  96. </view>
  97. </picker>
  98. </view>
  99. <view class="form-label-select">
  100. <view class="phone-form-label"><text class="form-label-require"></text>属相</view>
  101. <picker :range="shuxiangList" mode='selector' :value="formData.shuxiangIndex" range-key="name"
  102. @change="shuxiangChange" @cancel="shuxiangCancel" class="select-picker-box">
  103. <view class="form-radio-select">
  104. <view>{{ formData.shuxiang.name }}</view>
  105. <icon></icon>
  106. </view>
  107. </picker>
  108. </view>
  109. <view class="form-label-switch">
  110. <view class="phone-form-label"> <text class="form-label-require"></text>星座属相展示到简历 </view>
  111. <view>展示
  112. <switch @change="switchXingzuoChange" :checked="formData.xingzuoFlag" color="#3fd2a1"
  113. style="transform:scale(0.7)" />
  114. </view>
  115. </view>
  116. <view class="agree-section-box form-top-margin">
  117. <checkbox-group @change="handleAgree">
  118. <label class="checkbox">
  119. <checkbox :checked="formData.agree" color="#3fd2a1" style="transform:scale(0.65)" />
  120. <text>已征得本人同意,将其个人资料信息录入平台</text>
  121. </label>
  122. </checkbox-group>
  123. <button type="default" v-if="status =='add'" @click="goNext" class="phone-green-btn">下一步</button>
  124. <button type="default" v-if="status =='edit'" @click="editSave" class="phone-green-btn">保存</button>
  125. </view>
  126. <uni-popup ref="popupMap" background-color="#fff" :is-mask-click="false" :mask-click="false">
  127. <customMap style="100vh" @xuanzeAdress="xuanzeAdress" @close="mapClose"></customMap>
  128. </uni-popup>
  129. </view>
  130. </template>
  131. <script>
  132. import dataChecked from './common/dataChecked.vue';
  133. import jiazhengUpload from "./common/jiazhengUpload.vue"
  134. import customMap from "@/components/customMap/customMap.vue"
  135. import {
  136. getJiazhengXueli,
  137. getJiazhengHunyin,
  138. getJiazhengMinzu,
  139. getJiazhengShuxiang,
  140. getJiazhengXingzuo,
  141. getJiazhengJiguan,
  142. jiazhengIdcard,
  143. jiazhengCheck
  144. } from "@/api/jiazheng.js";
  145. export default {
  146. components: {
  147. dataChecked,
  148. jiazhengUpload,
  149. customMap
  150. },
  151. props: {
  152. status: {
  153. type: String,
  154. }
  155. },
  156. data() {
  157. return {
  158. formData: {
  159. userName: '',
  160. realName: '',
  161. idcard: '',
  162. icon: '',
  163. birthday: '',
  164. hujiDizhi: '',
  165. idtype: '1',
  166. gender: '',
  167. juzhuDizhi: '',
  168. shenfenzhengUrl: '',
  169. minzu: {},
  170. shuxiang: {
  171. },
  172. xingzuo: {
  173. },
  174. hunyin: {
  175. name: '',
  176. },
  177. xueli: {
  178. },
  179. jiguanObj: {},
  180. jiguanShengId: '',
  181. jiguanShiId: '',
  182. jiguanShiName: '',
  183. jiguanShengName: '',
  184. agree: false,
  185. xingzuoIndex: 0,
  186. minzuIndex: 0,
  187. shuxiangIndex: 0,
  188. xingzuoFlag: false
  189. },
  190. selectedIds: [],
  191. ceshidata: '',
  192. xueliList: [],
  193. hunyinList: [],
  194. shuxiangList: [],
  195. xingzuoList: [],
  196. minzuList: [],
  197. // areaTree: [],
  198. multiArray: [
  199. [],
  200. []
  201. ], // 初始化两列数据
  202. multiIndex: [0, 0], // 初始化选中索引
  203. allData: [], // 存储后端返回的完整数据
  204. }
  205. },
  206. created() {
  207. uni.showLoading({
  208. title: '加载中'
  209. });
  210. this.initRequests()
  211. },
  212. methods: {
  213. xuanzeAdress(data) {
  214. console.log('data', data);
  215. this.formData.juzhuDizhi = data
  216. this.mapClose()
  217. },
  218. openMap() {
  219. this.$refs.popupMap.open('bottom')
  220. },
  221. mapClose() {
  222. this.$refs.popupMap.close()
  223. },
  224. idCardBlur() {
  225. let req = {
  226. idcard: this.formData.idcard,
  227. };
  228. jiazhengCheck(req).then(res => {
  229. if (res.code == 0) {
  230. console.log(res);
  231. if (res.data.userId != 0) {
  232. this.$nextTick(() => {
  233. this.formData.userName = res.data.userName
  234. this.formData.realName = res.data.realName
  235. this.formData.idcard = res.data.idcard
  236. this.formData.idtype = res.data.idtype
  237. this.formData.jiguanObj.jiguanShengId = res.data.jiguanShengId
  238. this.formData.jiguanShengName = res.data.jiguanShengName
  239. this.formData.jiguanObj.jiguanShiId = res.data.jiguanShiId
  240. this.formData.jiguanShiName = res.data.jiguanShiName
  241. this.formData.juzhuDizhi = res.data.juzhuDizhi
  242. this.formData.birthday = res.data.birthday
  243. this.formData.minzu = this.dataForId(this.minzuList, res.data.minzu) || ''
  244. this.formData.gender = res.data.gender
  245. this.formData.xueli = this.dataForId(this.xueliList, res.data.xueli) || ''
  246. this.formData.hunyin = this.dataForId(this.hunyinList, res.data.hunyin) || ''
  247. this.formData.hujiDizhi = res.data.hujiDizhi
  248. this.formData.juzhuDizhi = res.data.juzhuDizhi
  249. this.formData.xingzuo = this.dataForId(this.xingzuoList, res.data.xingzuo) ||''
  250. this.formData.shuxiang = this.dataForId(this.shuxiangList, res.data.xingzuo) ||''
  251. this.formData.xingzuoFlag = res.data.xingzuoFlag
  252. this.$emit('idCardBlur', res.data);
  253. });
  254. } else {
  255. }
  256. } else {
  257. this.$message.error('');
  258. return false;
  259. }
  260. });
  261. },
  262. async initRequests() {
  263. try {
  264. await Promise.all([
  265. this.getXueli(),
  266. this.getHunyin(),
  267. this.getMinzu(),
  268. this.getXingzuo(),
  269. this.getShuxiang(),
  270. this.getJiguan(),
  271. ]);
  272. uni.hideLoading();
  273. if (this.status == 'edit') {
  274. this.$emit('finishDom', 'gerenZiliao');
  275. }
  276. } catch (e) {
  277. uni.hideLoading();
  278. uni.showToast({
  279. title: `请求失败!`,
  280. icon: 'none',
  281. duration: 2000
  282. })
  283. }
  284. },
  285. editinfo(data) {
  286. this.$nextTick(() => {
  287. this.formData.userName = data.userName
  288. this.formData.realName = data.realName
  289. this.formData.idcard = data.idcard
  290. this.formData.idtype = data.idtype
  291. this.formData.jiguanObj.jiguanShengId = data.jiguanShengId
  292. this.formData.jiguanShengName = data.jiguanShengName
  293. this.formData.jiguanObj.jiguanShiId = data.jiguanShiId
  294. this.formData.jiguanShiName = data.jiguanShiName
  295. this.formData.juzhuDizhi = data.juzhuDizhi
  296. this.formData.birthday = data.birthday
  297. this.formData.minzu = this.dataForId(this.minzuList, data.minzu) || ''
  298. this.formData.gender = data.gender
  299. this.formData.xueli = this.dataForId(this.xueliList, data.xueli) || ''
  300. this.formData.hunyin = this.dataForId(this.hunyinList, data.hunyin) || ''
  301. this.formData.hujiDizhi = data.hujiDizhi
  302. this.formData.juzhuDizhi = data.juzhuDizhi
  303. this.formData.xingzuo = this.dataForId(this.xingzuoList, data.xingzuo) || ''
  304. this.formData.shuxiang = this.dataForId(this.shuxiangList, data.xingzuo) || ''
  305. this.formData.xingzuoFlag = data.xingzuoFlag
  306. })
  307. },
  308. dataForId(list, id) {
  309. return list.find(item => item.id == id);
  310. },
  311. idCardChange(data) {
  312. this.formData.idtype = this.formData.idtype == 1 ? 2 : 1;
  313. },
  314. getJiguan() {
  315. getJiazhengJiguan({}).then(res => {
  316. // this.areaTree = res.data
  317. // this.pickerData = this.formatData(res.data);
  318. this.allData = res.data;
  319. const provinces = this.allData.map(province => ({
  320. label: province.lable,
  321. value: province.id,
  322. children: province.children,
  323. }));
  324. const cities = this.allData[0].children.map(city => ({
  325. label: city.lable,
  326. value: city.id,
  327. }));
  328. // 回显已选中的城市(假设已选中的城市 id 是 1301)
  329. //this.setSelectedCity(1301);
  330. this.multiArray = [provinces, cities];
  331. //console.log('this.pickerData', this.pickerData);
  332. }).catch(error => {
  333. console.error('获取技能类型失败:', error);
  334. });
  335. },
  336. bindMultiPickerColumnChange(e) {
  337. const {
  338. column,
  339. value
  340. } = e.detail;
  341. // 更新 multiIndex
  342. this.multiIndex[column] = value;
  343. // 如果是第一列(省份)发生变化,更新第二列(城市)
  344. if (column === 0) {
  345. const selectedProvince = this.multiArray[0][value];
  346. const cities = selectedProvince.children.map(city => ({
  347. label: city.lable,
  348. value: city.id,
  349. }));
  350. // 更新 multiArray 和 multiIndex
  351. this.multiArray[1] = cities;
  352. this.multiIndex[1] = 0; // 重置城市列为第一个选项
  353. }
  354. // 强制更新视图
  355. //this.$forceUpdate();
  356. },
  357. // 确认选择时获取完整数据
  358. onPickerConfirm() {
  359. const [provinceIndex, cityIndex] = this.multiIndex;
  360. const selectedProvince = this.multiArray[0][provinceIndex];
  361. const selectedCity = this.multiArray[1][cityIndex];
  362. console.log("选中的省份完整数据:", selectedProvince);
  363. console.log("选中的城市完整数据:", selectedCity);
  364. this.formData.jiguanShengId = selectedProvince ? selectedProvince.value : ''
  365. this.formData.jiguanShiId = selectedCity ? selectedCity.value : ''
  366. this.formData.jiguanShiName = selectedCity ? selectedCity.label : ''
  367. this.formData.jiguanShengName = selectedProvince ? selectedProvince.label : ''
  368. this.formData.jiguanObj.jiguanShengId = selectedProvince ? selectedProvince.value : ''
  369. this.formData.jiguanObj.jiguanShiId = selectedCity ? selectedCity.value : ''
  370. },
  371. setSelectedCity(cityId) {
  372. for (let i = 0; i < this.allData.length; i++) {
  373. const province = this.allData[i];
  374. for (let j = 0; j < province.children.length; j++) {
  375. const city = province.children[j];
  376. if (city.id === cityId) {
  377. // 设置选中的省份和城市索引
  378. this.multiIndex = [i, j];
  379. // 更新 multiArray 的第二列(城市)
  380. const cities = province.children.map(city => ({
  381. label: city.lable,
  382. value: city.id,
  383. }));
  384. this.multiArray[1] = cities;
  385. // 强制更新视图
  386. this.$forceUpdate();
  387. return;
  388. }
  389. }
  390. }
  391. },
  392. checkAllFields() {
  393. const requiredFields = [{
  394. key: 'userName',
  395. name: '手机号'
  396. },
  397. {
  398. key: 'realName',
  399. name: '姓名'
  400. },
  401. {
  402. key: 'idcard',
  403. name: '身份证号'
  404. },
  405. {
  406. key: 'birthday',
  407. name: '生日'
  408. },
  409. // {
  410. // key: 'hometown',
  411. // name: '家乡',
  412. // type: 'array'
  413. // },
  414. // {
  415. // key: 'hujiDizhi',
  416. // name: '身份证地址'
  417. // },
  418. {
  419. key: 'gender',
  420. name: '性别'
  421. },
  422. // {
  423. // key: 'juzhuDizhi',
  424. // name: '通讯地址'
  425. // },
  426. {
  427. key: 'minzu',
  428. name: '民族',
  429. type: 'object'
  430. },
  431. {
  432. key: 'jiguanObj',
  433. name: '籍贯',
  434. type: 'object'
  435. },
  436. {
  437. key: 'xueli',
  438. name: '学历',
  439. type: 'object'
  440. },
  441. // {
  442. // key: 'shuxiang',
  443. // name: '属相',
  444. // type: 'object'
  445. // },
  446. // {
  447. // key: 'xingzuo',
  448. // name: '星座',
  449. // type: 'object'
  450. // },
  451. ]
  452. for (const field of requiredFields) {
  453. const value = this.formData[field.key]
  454. // 根据不同类型进行存在验证
  455. if (field.type === 'array' && !value?.length) {
  456. this.showAlert(field.name)
  457. return false
  458. }
  459. if (field.type === 'object' && !Object.keys(value).length) {
  460. this.showAlert(field.name)
  461. return false
  462. }
  463. if (field.type === 'boolean' && value !== true) {
  464. this.showAlert(field.name)
  465. return false
  466. }
  467. if (!field.type && !value?.toString().trim()) {
  468. this.showAlert(field.name)
  469. return false
  470. }
  471. }
  472. return true
  473. },
  474. showAlert(fieldName) {
  475. uni.showToast({
  476. title: `${fieldName}不能为空`,
  477. icon: 'none',
  478. duration: 2000
  479. })
  480. },
  481. getXueli() {
  482. getJiazhengXueli({}).then(res => {
  483. this.xueliList = res.data
  484. // console.log('xueliList', this.xueliList);
  485. }).catch(error => {
  486. console.error('获取技能类型失败:', error);
  487. });
  488. },
  489. getXingzuo() {
  490. getJiazhengXingzuo({}).then(res => {
  491. this.xingzuoList = res.data
  492. // console.log('xingzuoList', this.xingzuoList);
  493. }).catch(error => {
  494. console.error('获取技能类型失败:', error);
  495. });
  496. },
  497. getShuxiang() {
  498. getJiazhengShuxiang({}).then(res => {
  499. this.shuxiangList = res.data
  500. // console.log('shuxiangList', this.shuxiangList);
  501. }).catch(error => {
  502. console.error('获取技能类型失败:', error);
  503. });
  504. },
  505. getHunyin() {
  506. getJiazhengHunyin({}).then(res => {
  507. this.hunyinList = res.data
  508. // console.log('hunyinList', this.hunyinList);
  509. }).catch(error => {
  510. console.error('获取技能类型失败:', error);
  511. });
  512. },
  513. getMinzu() {
  514. getJiazhengMinzu({}).then(res => {
  515. this.minzuList = res.data
  516. // console.log('minzuList', this.minzuList);
  517. }).catch(error => {
  518. console.error('获取技能类型失败:', error);
  519. });
  520. },
  521. getFileUrl(data) {
  522. this.formData.shenfenzhengUrl = data
  523. console.log('data', data);
  524. jiazhengIdcard({
  525. url: this.formData.shenfenzhengUrl
  526. }).then(res => {
  527. console.log('res', res);
  528. if (res.code == 0) {
  529. this.formData.realName = res.data.name
  530. this.formData.gender = res.data.genderId
  531. this.formData.minzu.name = res.data.ethnicity
  532. this.formData.minzu.id = res.data.minzuId
  533. this.formData.birthday = res.data.birthDate
  534. this.formData.hujiDizhi = res.data.address
  535. this.formData.idcard = res.data.idNumber
  536. this.formData.shuxiang.id = res.data.shuxiangId
  537. this.formData.shuxiang.name = res.data.shuxiangName
  538. this.formData.xingzuo.id = res.data.xingzuoId
  539. this.formData.xingzuo.name = res.data.xingzuoName
  540. this.formData.jiguanShengId = res.data.jiguanShengId
  541. this.formData.jiguanShiId = res.data.jiguanShiId
  542. this.formData.jiguanShengName = res.data.jiguanShengName
  543. this.formData.jiguanShiName = res.data.jiguanShiName
  544. this.formData.jiguanObj.jiguanShengId = res.data.jiguanShengId
  545. this.formData.jiguanObj.jiguanShiId = res.data.jiguanShiId
  546. }
  547. })
  548. },
  549. minzuChange(e) {
  550. const index = e.detail.value
  551. this.formData.minzu = this.minzuList[index]
  552. //console.log('this.formData.minzu', this.formData.minzu);
  553. },
  554. minzuCancel() {
  555. this.formData.minzuIndex = 0
  556. },
  557. xingzuoChange(e) {
  558. const index = e.detail.value
  559. this.formData.xingzuo = this.xingzuoList[index]
  560. // console.log('this.formData.xingzuo', this.formData.xingzuo);
  561. },
  562. xingzuoCancel() {
  563. this.formData.xingzuoIndex = 0
  564. },
  565. shuxiangChange(e) {
  566. const index = e.detail.value
  567. this.formData.shuxiang = this.shuxiangList[index]
  568. //console.log('this.formData.shuxiang', this.formData.shuxiang);
  569. },
  570. shuxiangCancel() {
  571. this.formData.shuxiangIndex = 0
  572. },
  573. selectChangeXueliList(data) {
  574. this.formData.xueli = data[0]
  575. },
  576. genderSelect(data) {
  577. this.formData.gender = data
  578. },
  579. selectChangeHunyinList(data) {
  580. console.log('data', data[0]);
  581. this.formData.hunyin = data[0]
  582. },
  583. switchXingzuoChange(e) {
  584. this.formData.xingzuoFlag = e.detail.value
  585. },
  586. goNext() {
  587. console.log('formData', this.formData);
  588. if (!this.checkAllFields()) {
  589. return false
  590. }
  591. if (!this.formData.agree) {
  592. uni.showToast({
  593. title: "请勾选本人同意!",
  594. icon: 'none',
  595. duration: 2000
  596. })
  597. return false
  598. }
  599. this.$emit('goNext', this.formData, 0);
  600. },
  601. editSave() {
  602. console.log('formData', this.formData);
  603. if (!this.checkAllFields()) {
  604. return false
  605. }
  606. if (!this.formData.agree) {
  607. uni.showToast({
  608. title: "请勾选本人同意!",
  609. icon: 'none',
  610. duration: 2000
  611. })
  612. return false
  613. }
  614. this.$emit('editSave', this.formData);
  615. },
  616. handleAgree(e) {
  617. this.formData.agree = e.detail.value.length > 0
  618. },
  619. }
  620. }
  621. </script>