input.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <view style="padding: 30rpx;">
  3. <view class="topBox">
  4. <view >
  5. <u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
  6. <text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text></view>
  7. <view style="color: #007AFF;">稍后再填</view>
  8. </view>
  9. <view class="bodyBox" style="margin-top: 30rpx;padding:0 20rpx;">
  10. <u-form :model="form" ref="uForm">
  11. <u-form-item label="姓名" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
  12. <u-form-item label="性别" :required="true" prop="sex">
  13. <picker @change="bindPickerChangeSex" :value="form.sex" :range="array_sex">
  14. <view class="picker">{{ array_sex[form.sex] }}</view>
  15. </picker>
  16. </u-form-item>
  17. <u-form-item label="身份证号" :required="true" prop="idCard" :label-width="auto"><u-input placeholder="请输入身份证号" v-model="form.idCard" /></u-form-item>
  18. <u-form-item label="手机号码" :required="true" prop="telphone" :label-width="auto"><u-input :disabled="true" v-model="form.telphone" /></u-form-item>
  19. <u-form-item label="学历" :required="true">
  20. <picker @change="bindPickerChangeLevel" :value="index_level" :range="dictObj['edu_level']">
  21. <view class="picker">
  22. {{index_level?dictObj['edu_level'][index_level]:'未知'}}
  23. </view>
  24. </picker>
  25. </u-form-item>
  26. <u-form-item label="工作单位" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
  27. <u-form-item label="报名岗位" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
  28. <u-form-item label="所学专业" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
  29. <u-form-item label="工作年限" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
  30. <u-form-item label="个人近照" :required="true" :label-width="auto" label-position="top">
  31. <text style="color: #999999;position: absolute;top: 20rpx;left: 130rpx;">竖向证件照 文件大小≤2M</text>
  32. <u-upload @on-list-change="changePhotoListHeader" :auto-upload="false" custom-btn="true" :action="action" :file-list="fileList" width="120" height ="120" size-type="['compressed']" max-count="1">
  33. <template v-slot:addBtn >
  34. <image src="/static/info_1.png" style="width: 120rpx; height: 169rpx;"></image>
  35. </template>
  36. </u-upload>
  37. </u-form-item>
  38. <u-form-item label="身份证人像面" :required="true" :label-width="auto" label-position="top">
  39. <text style="color: #999999;position: absolute;top: 20rpx;left: 180rpx;">文件大小≤2M</text>
  40. <u-upload
  41. :auto-upload="false"
  42. custom-btn="true"
  43. :action="action"
  44. :file-list="fileList1"
  45. width="120"
  46. height="82"
  47. size-type="['compressed']"
  48. max-count="1"
  49. @on-list-change="changePhotoListZ"
  50. >
  51. <template v-slot:addBtn>
  52. <image src="/static/info_2.png" style="width: 120rpx; height: 82rpx;"></image>
  53. </template>
  54. </u-upload>
  55. </u-form-item>
  56. <u-form-item label="身份证国徽面" :required="true" :label-width="auto" label-position="top">
  57. <text style="color: #999999;position: absolute;top: 20rpx;left: 180rpx;">文件大小≤2M</text>
  58. <u-upload
  59. :auto-upload="false"
  60. custom-btn="true"
  61. :action="action"
  62. :file-list="fileList2"
  63. width="120"
  64. height="82"
  65. size-type="['compressed']"
  66. max-count="1"
  67. @on-list-change="changePhotoListF"
  68. >
  69. <template v-slot:addBtn>
  70. <image src="/static/info_3.png" style="width: 120rpx; height: 82rpx;"></image>
  71. </template>
  72. </u-upload>
  73. </u-form-item>
  74. <u-form-item label="承诺书" :required="true" :label-width="auto" label-position="top">
  75. <view style="line-height: 40rpx;text-indent:2em">
  76. <text>
  77. 本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
  78. </text>
  79. <view style="line-height: 40rpx;text-indent:2em">
  80. <text>特此承诺!</text>
  81. </view>
  82. </view>
  83. </u-form-item>
  84. <u-form-item label="签名板" :required="true" :label-width="auto" label-position="top">
  85. <text style="color: #999999;position: absolute;top: 20rpx;left: 100rpx;">请在下方签名区进行签名</text>
  86. <view class="headerSDels">
  87. <text @click="retDraw" style="width: 80rpx;height: 50rpx;" mode="">清空</text>
  88. </view>
  89. <view class="handCenter">
  90. <canvas
  91. class="handWriting"
  92. disable-scroll="true"
  93. @touchstart="uploadScaleStart"
  94. @touchmove="uploadScaleMove"
  95. @touchend="uploadScaleEnd"
  96. @tap="mouseDown"
  97. canvas-id="handWriting"
  98. ></canvas>
  99. </view>
  100. </u-form-item>
  101. </u-form>
  102. </view>
  103. <view @click="resultForm" class="submit_btn">提交资料</view>
  104. </view>
  105. </template>
  106. <script>
  107. import Handwriting from '@/common/signature.js';
  108. export default {
  109. data() {
  110. return {
  111. form:{
  112. sex: 0,
  113. },
  114. array_sex: ['男', '女'],
  115. pageInfo: {},
  116. lineColor: 'black',
  117. slideValue: 50,
  118. handwriting: ''
  119. };
  120. },
  121. onReady(res) {
  122. this.handwriting = new Handwriting({
  123. lineColor: this.lineColor,
  124. slideValue: this.slideValue, // 0, 25, 50, 75, 100
  125. canvasName: 'handWriting'
  126. });
  127. },
  128. methods: {
  129. bindPickerChangeSex(e) {
  130. this.form.sex = e.detail.value;
  131. },
  132. retDraw() {
  133. this.handwriting.retDraw();
  134. },
  135. uploadScaleStart(event) {
  136. this.handwriting.uploadScaleStart(event);
  137. },
  138. uploadScaleMove(event) {
  139. this.handwriting.uploadScaleMove(event);
  140. },
  141. uploadScaleEnd(event) {
  142. this.handwriting.uploadScaleEnd(event);
  143. },
  144. subCanvas() {
  145. var self = this;
  146. self.handwriting
  147. .saveCanvas()
  148. .then(res => {
  149. console.log(res);
  150. })
  151. .catch(err => {
  152. uni.showToast({
  153. title: '签名上传失败',
  154. icon: 'error'
  155. });
  156. });
  157. }
  158. }
  159. };
  160. </script>
  161. <style >
  162. page {
  163. background: #EAEEF1;
  164. }
  165. </style>
  166. <style scope>
  167. .handCenter{
  168. background: #F7F7F7;
  169. border: 2rpx solid #EEEEEE;
  170. border-radius: 24rpx;
  171. }
  172. .headerSDels {
  173. height: 58rpx;
  174. padding: 0rpx 24rpx;
  175. font-weight: bold;
  176. display: flex;
  177. align-items: center;
  178. flex-direction: row-reverse;
  179. }
  180. .listBox {
  181. margin: 24rpx 32rpx 0rpx;
  182. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  183. border-radius: 32rpx;
  184. background-color: #fff;
  185. overflow: hidden;
  186. }
  187. .imgBoxs {
  188. width: 156rpx;
  189. height: 203rpx;
  190. }
  191. .imgBoxs2 {
  192. width: 171rpx;
  193. height: 108rpx;
  194. }
  195. .submit_btn {
  196. width: 526rpx;
  197. height: 80rpx;
  198. background: #007AFF;
  199. border-radius: 40rpx;
  200. text-align: center;
  201. line-height: 80rpx;
  202. color: #FFFFFF;
  203. margin: 30rpx auto;
  204. }
  205. .picker {
  206. text-align: right;
  207. }
  208. input{
  209. text-align: right;
  210. }
  211. .bodyBox{
  212. background: #FFFFFF;
  213. border-radius: 24rpx;
  214. width: 100%;
  215. }
  216. .topBox{
  217. height: 80rpx;
  218. background: #FFFFFF;
  219. border-radius: 24rpx;
  220. width: 100%;
  221. display: flex;
  222. justify-content: space-between;
  223. line-height: 80rpx;
  224. padding: 0 20rpx;
  225. font-size: 24rpx;
  226. }
  227. </style>