zhaopianZiliao.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view class="jz-content-box">
  3. <view class="upload-img-box">
  4. <jiazhengUpload @getFileUrl="getTouxiang" :img='icon' bottomText="上传头像和生活照"></jiazhengUpload>
  5. </view>
  6. <view class="form-label-switch">
  7. <view class="phone-form-label"><text class="form-label-require"></text>身份证照片</view>
  8. <!-- <switch @change="switchSfzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  9. </view>
  10. <view class="ziliao-upload-box">
  11. <view class="upload-item-box">
  12. <jiazhengUpload @getFileUrl="getSfzTouxiang" :img='idcardUrl1' bottomText="上传身份证头像面"></jiazhengUpload>
  13. </view>
  14. <view class="upload-item-box">
  15. <jiazhengUpload @getFileUrl="getSfzGuohui" :img='idcardUrl2' bottomText="上传身份证国徽面"></jiazhengUpload>
  16. </view>
  17. </view>
  18. <view class="form-label-switch form-top-margin">
  19. <view class="phone-form-label"><text class="form-label-require"></text>体检报告</view>
  20. <!-- <switch @change="switchGzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  21. </view>
  22. <view class="zhaopianZiliao-shenfenzhengImg">
  23. <view class="ziliao-upload-box">
  24. <view v-for="(item, index) in tijianbaogaoList" :key="index" v-if="tijianbaogaoList.length>0" class="ziliao-image-box">
  25. <img class="ziliao-image" :src="item" alt="">
  26. <view @click="deleteTijianbaogao(item,index)" class="ziliao-image-close"></view>
  27. </view>
  28. <jiazhengUpload changjingType="more" @getFileUrl="getTijianbaogao"></jiazhengUpload>
  29. </view>
  30. </view>
  31. <view class="form-label-switch form-top-margin">
  32. <view class="phone-form-label"><text class="form-label-require"></text>工作生活照</view>
  33. <!-- <switch @change="switchGzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  34. </view>
  35. <view class="zhaopianZiliao-shenfenzhengImg">
  36. <view class="ziliao-upload-box">
  37. <view v-for="(item, index) in shenghuizhaoList" :key="index" v-if="shenghuizhaoList.length>0" class="ziliao-image-box">
  38. <img class="ziliao-image" :src="item" alt="">
  39. <view @click="deleteShenghuoZhao(item,index)" class="ziliao-image-close"></view>
  40. </view>
  41. <jiazhengUpload changjingType="more" @getFileUrl="getGzShenghuozhao"></jiazhengUpload>
  42. </view>
  43. </view>
  44. <view class="form-label-switch form-top-margin">
  45. <view class="phone-form-label"><text class="form-label-require"></text>资格类照片</view>
  46. <!-- <switch @change="switchZgChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  47. </view>
  48. <view class="zhaopianZiliao-shenfenzhengImg">
  49. <view class="ziliao-upload-box">
  50. <view v-for="(item, index) in zigezhaoList" :key="index" v-if="zigezhaoList.length>0" class="ziliao-image-box">
  51. <img class="ziliao-image" :src="item" alt="">
  52. <view @click="deleteZigeZhao(item,index)" class="ziliao-image-close"></view>
  53. </view>
  54. <jiazhengUpload changjingType="more" @getFileUrl="getZigezhao"></jiazhengUpload>
  55. </view>
  56. </view>
  57. <view class="form-label-select">
  58. <view class="phone-form-label"><text class="form-label-require"></text>最近体检日期</view>
  59. <uni-datetime-picker class="form-radio-picker" type="date" @change="changeTijian">
  60. <view class="form-radio-select">
  61. <view>{{tijianDate}}</view>
  62. <icon></icon>
  63. </view>
  64. </uni-datetime-picker>
  65. </view>
  66. <view class="form-label-select">
  67. <view class="phone-form-label"><text class="form-label-require"></text>健康证日期</view>
  68. <uni-datetime-picker class="form-radio-picker" type="date" @change="changeJiankang">
  69. <view class="form-radio-select">
  70. <view>{{jiankangDate}}</view>
  71. <icon></icon>
  72. </view>
  73. </uni-datetime-picker>
  74. </view>
  75. <!-- <view class="zpzl-tip-box form-top-margin">
  76. <view>体检报告文件</view>
  77. <view class="red-tip">(*如未经同意,体检报告均不展示在简历中;在系统中预约的体检,如有电子报告,会自动关联到简历中) </view>
  78. <view>
  79. <checkbox-group>
  80. <checkbox :checked="tijianbaogaoFlag" @click="changeTijianbaogao" color="#3fd2a1"
  81. style="transform:scale(0.65)" />
  82. 已经同意,上传个人体检报告
  83. </checkbox-group>
  84. </view>
  85. <view class="scbg-tip">
  86. 还没有上传的体验报告<br>
  87. 可点击下方上传体检报告
  88. </view>
  89. <button type="default" class="phone-green-btn scbg-btn">+从手机上传体检报告(pdf)</button>
  90. </view> -->
  91. <view class="page-btn-box">
  92. <button type="default" v-if="status =='add'" @click="goNext" class="phone-green-btn">下一步</button>
  93. <button type="default" v-if="status =='edit'" @click="editSave" class="phone-green-btn">保存</button>
  94. </view>
  95. </view>
  96. </template>
  97. <script>
  98. import {
  99. getAliyunPolicy
  100. } from "@/api/jiazheng.js"
  101. import jiazhengUpload from "./common/jiazhengUpload.vue"
  102. export default {
  103. data() {
  104. return {
  105. shenghuizhaoList: [],
  106. tijianbaogaoList: [],
  107. zigezhaoList: [],
  108. icon: '',
  109. idcardUrl1: '',
  110. idcardUrl2: '',
  111. shenghuoUrls: '',
  112. tijianDate: '',
  113. tijianUrls: '',
  114. jiankangDate: '',
  115. tijianbaogaoFlag: false,
  116. zhengshuUrls: '',
  117. }
  118. },
  119. props: {
  120. status: {
  121. type: String,
  122. }
  123. },
  124. components: {
  125. jiazhengUpload
  126. },
  127. methods: {
  128. editinfo(data) {
  129. console.log('data', data);
  130. this.$nextTick(() => {
  131. this.icon = data.icon
  132. this.idcardUrl1 = data.idcardUrl1
  133. this.idcardUrl2 = data.idcardUrl2
  134. this.shenghuizhaoList = data.shenghuoUrls == '' ? '' : data.shenghuoUrls.split(",")
  135. this.zigezhaoList = data.zhengshuUrls == '' ? '' : data.zhengshuUrls.split(",")
  136. this.tijianbaogaoList = data.tijianUrls == '' ? '' : data.tijianUrls.split(",")
  137. this.tijianDate = data.tijianDate
  138. this.jiankangDate = data.jiankangDate
  139. })
  140. },
  141. getTouxiang(data) {
  142. this.icon = data
  143. console.log('getTouxiang', data);
  144. },
  145. getSfzTouxiang(data) {
  146. this.idcardUrl1 = data
  147. console.log('getSfzTouxiang', data);
  148. },
  149. getSfzGuohui(data) {
  150. this.idcardUrl2 = data
  151. console.log('getSfzGuohui', data);
  152. },
  153. getGzShenghuozhao(data) {
  154. console.log('getGzShenghuozhao', data);
  155. this.shenghuizhaoList.push(data);
  156. },
  157. getTijianbaogao(data) {
  158. console.log('getTijianbaogao', data);
  159. this.tijianbaogaoList.push(data);
  160. },
  161. getZigezhao(data) {
  162. console.log('getZigezhao', data);
  163. this.zigezhaoList.push(data);
  164. },
  165. deleteZigeZhao(data, index) {
  166. this.zigezhaoList.splice(index, 1);
  167. },
  168. deleteTijianbaogao(data, index) {
  169. this.tijianbaogaoList.splice(index, 1);
  170. },
  171. deleteShenghuoZhao(data, index) {
  172. this.shenghuizhaoList.splice(index, 1);
  173. },
  174. changeTijian(data) {
  175. console.log('data', data);
  176. this.tijianDate = data
  177. },
  178. changeJiankang(data) {
  179. console.log('data', data);
  180. this.jiankangDate = data
  181. },
  182. changeTijianbaogao(data) {
  183. this.tijianbaogaoFlag = !this.tijianbaogaoFlag
  184. },
  185. switchSfzChange(data) {
  186. console.log('data', data);
  187. },
  188. switchGzChange(data) {
  189. console.log('data', data);
  190. },
  191. switchZgChange(data) {
  192. console.log('data', data);
  193. },
  194. goNext() {
  195. this.formData = {
  196. icon: this.icon,
  197. idcardUrl1: this.idcardUrl1,
  198. idcardUrl2: this.idcardUrl2,
  199. tijianbaogaoFlag: this.tijianbaogaoFlag,
  200. shenghuoUrls: this.shenghuizhaoList?this.shenghuizhaoList.join(','):'',
  201. zhengshuUrls: this.zigezhaoList?this.zigezhaoList.join(','):'',
  202. tijianUrls: this.tijianbaogaoList?this.tijianbaogaoList.join(','):'',
  203. tijianDate: this.tijianDate,
  204. jiankangDate: this.jiankangDate,
  205. }
  206. console.log('this.formData', this.formData);
  207. this.$emit('goNext', this.formData, 2);
  208. },
  209. editSave() {
  210. this.formData = {
  211. icon: this.icon,
  212. idcardUrl1: this.idcardUrl1,
  213. idcardUrl2: this.idcardUrl2,
  214. tijianbaogaoFlag: this.tijianbaogaoFlag,
  215. shenghuoUrls: this.shenghuizhaoList.length > 0 ? this.shenghuizhaoList.join(',') : '',
  216. zhengshuUrls: this.zigezhaoList.length > 0 ? this.zigezhaoList.join(',') : '',
  217. tijianDate: this.tijianDate,
  218. jiankangDate: this.jiankangDate,
  219. tijianUrls: this.tijianbaogaoList?this.tijianbaogaoList.join(','):'',
  220. }
  221. console.log('this.formData', this.formData);
  222. this.$emit('editSave', this.formData);
  223. },
  224. },
  225. created() {
  226. // setTimeout(()=>{
  227. // this.$refs.datePicker.show()
  228. // },1000)
  229. },
  230. };
  231. </script>