gerenZiliao.vue 20 KB

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