addvacfrom.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  1. <template>
  2. <view class="vac-form" v-if="2<1">
  3. <uni-forms :modelValue="formData" label-width="110">
  4. <!-- 基本信息 -->
  5. <uni-group title="基本信息" top="0">
  6. <uni-forms-item required label="身份证号" >
  7. <image src="@/static/image/icon_xz_pz.png" @click="takePhoto" style="z-index: 100; width: 26px; height: 22px; position: absolute; right: 5px; top: 5px; "></image>
  8. <uni-easyinput @blur="getIdcardInfo" :inputBorder="false" style="width: 80%; z-index: 80;" v-model="formData.idCard" placeholder="请输入身份证号码"></uni-easyinput>
  9. </uni-forms-item>
  10. <uni-forms-item required label="姓名">
  11. <uni-easyinput type="text" :inputBorder="false" v-model="formData.userName" placeholder="请输入姓名"></uni-easyinput>
  12. </uni-forms-item>
  13. <!-- <uni-forms-item required label="出生日期">
  14. <uni-easyinput :clearable="false" @focus="showDatePicker" type="text" :inputBorder="false" v-model="formData.birthday" placeholder="请选择出生日期"></uni-easyinput>
  15. </uni-forms-item> -->
  16. <uni-forms-item required label="年龄">
  17. <uni-easyinput type="number" :inputBorder="false" v-model="formData.age" placeholder="请输入年龄"></uni-easyinput>
  18. </uni-forms-item>
  19. <uni-forms-item required label="受种者编号">
  20. <uni-easyinput type="number" :inputBorder="false" v-model="formData.code" placeholder="请输入编号"></uni-easyinput>
  21. </uni-forms-item>
  22. <uni-forms-item label="性别">
  23. <uni-data-checkbox v-model="formData.genderIndex" :localdata="sexRange" ></uni-data-checkbox>
  24. </uni-forms-item>
  25. <uni-forms-item label="联系号码">
  26. <uni-easyinput type="text" :inputBorder="false" v-model="formData.phoneNum" placeholder="请输入联系号码"></uni-easyinput>
  27. </uni-forms-item>
  28. <!-- <uni-forms-item label="编号">
  29. <uni-easyinput :inputBorder="false" type="text" v-model="formData.email" placeholder="请输入编号"></uni-easyinput>
  30. </uni-forms-item> -->
  31. <uni-forms-item label="工作单位">
  32. <uni-easyinput type="text" :inputBorder="false" v-model="formData.workUnit" placeholder="请输入工作单位"></uni-easyinput>
  33. </uni-forms-item>
  34. <uni-forms-item label="重点行业">
  35. <view @click="showTrdesSelect" class="pick-line">
  36. <text v-if='formData.keyIndustries'>{{formData.keyIndustries}}</text>
  37. <text v-else style="color: grey;">请选择重点行业</text>
  38. </view>
  39. </uni-forms-item>
  40. </uni-group>
  41. <!-- 户籍信息 -->
  42. <uni-group title="户籍信息">
  43. <uni-forms-item label="户主">
  44. <uni-data-checkbox v-model="formData.houseTypeValue" :localdata="isUPN" ></uni-data-checkbox>
  45. </uni-forms-item>
  46. <uni-forms-item required label="户籍地址">
  47. <view @click="showbirPicker" class="pick-line">
  48. <text v-if='birAddress'>{{birAddress}}</text>
  49. <text v-else style="color: grey;">请选择户籍地址</text>
  50. </view>
  51. </uni-forms-item>
  52. <uni-forms-item label="详细地址" label-position="top">
  53. <textarea
  54. placeholder="请输入详细地址...." v-model="formData.nowIn"
  55. style="width: 100%;background: #F2F2F2;height: 112rpx;border-radius: 10rpx; "/>
  56. </uni-forms-item>
  57. <uni-forms-item required label="现居地">
  58. <pick-regions class="pick-line" :defaultRegion="defaultRegion" @getRegion="regionPickerChange">
  59. <view >
  60. <text v-if='formData.province'>{{formData.province + formData.city + formData.region}}</text>
  61. <text v-else style="color: grey;">请选择省市区</text>
  62. </view>
  63. </pick-regions>
  64. </uni-forms-item>
  65. <uni-forms-item label="详细地址" label-position="top">
  66. <textarea
  67. placeholder="请输入详细地址...." v-model="formData.domicile"
  68. style="width: 100%; background: #F2F2F2;height: 112rpx;border-radius: 10rpx;"/>
  69. </uni-forms-item>
  70. <!-- <uni-forms-item label="其他" label-position="top">
  71. <textarea
  72. placeholder="请输入其他信息...."
  73. v-model="formData.other"
  74. style="width: 100%;background: #F2F2F2;height: 150rpx;border-radius: 10rpx;"/>
  75. </uni-forms-item> -->
  76. <uni-forms-item label="备注" label-position="top">
  77. <textarea
  78. placeholder="请输入备注信息...."
  79. v-model="formData.remark"
  80. style="width: 100%;background: #F2F2F2;height: 160rpx;border-radius: 10rpx;"/>
  81. </uni-forms-item>
  82. </uni-group>
  83. <uni-group title="是否接种" >
  84. <uni-forms-item label="是否接种">
  85. <uni-data-checkbox v-model="formData.isVaccinationValue" @change="isVaccinationChange" :localdata="vaccination" ></uni-data-checkbox>
  86. </uni-forms-item>
  87. </uni-group>
  88. <uni-group title="未接种详情" v-if='formData.isVaccinationValue == 1'>
  89. <!-- <uni-forms-item label="人群分类">
  90. <uni-easyinput type="text" :inputBorder="false" v-model="" placeholder="请输入人群分类"></uni-easyinput>
  91. </uni-forms-item> -->
  92. <uni-forms-item label="禁忌症">
  93. <view @click="showMonList" class="pick-line">
  94. <text v-if='formData.contraindication'>{{formData.contraindication}}</text>
  95. <text v-else style="color: grey;">请选择禁忌症</text>
  96. </view>
  97. </uni-forms-item>
  98. <uni-forms-item label="禁忌症附件">
  99. <view style="display: flex;flex-wrap: wrap;width: 100%;">
  100. <view v-for="(item,index) in formData.urlArr" :key="index" class="re img-add"
  101. style="overflow: inherit;">
  102. <view class="ab delPop" @click="removeImg(index, 'url')">
  103. <view class="circleRed"></view>
  104. </view>
  105. <image style="width: 100%;height: 100%;border-radius: 10rpx;" :src="item" mode="aspectFill"></image>
  106. </view>
  107. <view class="img-add" @click="chooseImg('url')">
  108. <view class="add re">
  109. <image style="width: 48rpx;height: 48rpx;" src="../../static/image/add.png"
  110. mode="widthFix"></image>
  111. </view>
  112. </view>
  113. </view>
  114. </uni-forms-item>
  115. <uni-forms-item label="暂缓">
  116. <view @click="showWaitList" class="pick-line">
  117. <text v-if='formData.suspend'>{{formData.suspend}}</text>
  118. <text v-else style="color: grey;">请选择暂缓原由</text>
  119. </view>
  120. </uni-forms-item>
  121. <uni-forms-item label="暂缓附件">
  122. <view style="display: flex;flex-wrap: wrap;width: 100%;">
  123. <view v-for="(item,index) in formData.suspendUrlArr" :key="index" class="re img-add"
  124. style="overflow: inherit;">
  125. <view class="ab delPop" @click="removeImg(index, 'suspendUrl')">
  126. <view class="circleRed"></view>
  127. </view>
  128. <image style="width: 100%;height: 100%;border-radius: 10rpx;" :src="item" mode="aspectFill"></image>
  129. </view>
  130. <view class="img-add" @click="chooseImg('suspendUrl')">
  131. <view class="add re">
  132. <image style="width: 48rpx;height: 48rpx;" src="@/static/image/add.png"
  133. mode="widthFix"></image>
  134. </view>
  135. </view>
  136. </view>
  137. </uni-forms-item>
  138. <uni-forms-item label="其他">
  139. <view @click="showOthersPicker" class="pick-line">
  140. <text v-if='formData.other'>{{formData.other}}</text>
  141. <text v-else style="color: grey;">请选择其他原由</text>
  142. </view>
  143. </uni-forms-item>
  144. <uni-forms-item label="其他附件">
  145. <view style="display: flex;flex-wrap: wrap;width: 100%;">
  146. <view v-for="(item,index) in formData.otherUrlArr" :key="index" class="re img-add"
  147. style="overflow: inherit;">
  148. <view class="ab delPop" @click="removeImg(index, 'otherUrl')">
  149. <view class="circleRed"></view>
  150. </view>
  151. <image style="width: 100%;height: 100%;border-radius: 10rpx;" :src="item" mode="aspectFill"></image>
  152. </view>
  153. <view class="img-add" @click="chooseImg('otherUrl')">
  154. <view class="add re">
  155. <image style="width: 48rpx;height: 48rpx;" src="@/static/image/add.png"
  156. mode="widthFix"></image>
  157. </view>
  158. </view>
  159. </view>
  160. </uni-forms-item>
  161. <!-- <uni-forms-item label="死亡">
  162. <uni-data-checkbox v-model="item.value" :localdata="vaccination" ></uni-data-checkbox>
  163. </uni-forms-item>
  164. <uni-forms-item label="失恋失踪">
  165. <uni-data-checkbox v-model="item.value" :localdata="vaccination" ></uni-data-checkbox>
  166. </uni-forms-item> -->
  167. <!-- <uni-forms-item label="应种未种">
  168. <uni-data-checkbox v-model="item.value" :localdata="vaccination" ></uni-data-checkbox>
  169. </uni-forms-item> -->
  170. <!-- <uni-forms-item label="应续未续">
  171. <uni-data-checkbox v-model="item.value" :localdata="vaccination" ></uni-data-checkbox>
  172. </uni-forms-item> -->
  173. </uni-group>
  174. <!-- 接种信息 -->
  175. <div v-for="(item,index) in formData.vaccineInfoUserList" :key="index" v-if='formData.isVaccinationValue == 0&&2<1'>
  176. <uni-group title="接种信息" v-if='item.isDel != "Y"'>
  177. <!-- <uni-forms-item label="人群分类">
  178. <uni-easyinput type="text" :inputBorder="false" v-model="item.inputValue" placeholder="请输入人群分类"></uni-easyinput>
  179. </uni-forms-item> -->
  180. <uni-forms-item required label="疫苗名称">
  181. <view @click="showVacPicker(index)" class="pick-line">
  182. <text v-if='item.vaccineName'>{{item.vaccineName}}</text>
  183. <text v-else style="color: grey;">请选择疫苗名称</text>
  184. </view>
  185. </uni-forms-item>
  186. <uni-forms-item required label="接种时间">
  187. <view @click="showVacTime(index)" class="pick-line">
  188. <text v-if='item.vaccinationTime'>{{item.vaccinationTime}}</text>
  189. <text v-else style="color: grey;">请选择接种时间</text>
  190. </view>
  191. </uni-forms-item>
  192. <uni-forms-item required label="接种地点">
  193. <view @click="showVacArea(index)" class="pick-line">
  194. <text v-if='item.vaccinationPlace'>{{item.vaccinationPlace}}</text>
  195. <text v-else style="color: grey;">请选择接种地点</text>
  196. </view>
  197. </uni-forms-item>
  198. <uni-forms-item required label="剂次">
  199. <view @click="showJiciPicker(index)" class="pick-line">
  200. <text v-if='item.jici'>{{item.jici}}</text>
  201. <text v-else style="color: grey;">请选择剂次</text>
  202. </view>
  203. </uni-forms-item>
  204. <!-- <uni-forms-item required label="进度">
  205. <uni-data-checkbox v-model="item.progressValue" :localdata="vacPro" :disabled="true" ></uni-data-checkbox>
  206. </uni-forms-item> -->
  207. <uni-forms-item label="附件">
  208. <view style="display: flex;flex-wrap: wrap;width: 100%;">
  209. <view v-for="(imgItem, imgIndex) in item.urlArr" :key="imgIndex" class="re img-add"
  210. style="overflow: inherit;">
  211. <view class="ab delPop" @click="removeImg(imgIndex, 'vacUrl', index)">
  212. <view class="circleRed"></view>
  213. </view>
  214. <image style="width: 100%;height: 100%;border-radius: 10rpx;" :src="imgItem" mode="aspectFill"></image>
  215. </view>
  216. <view class="img-add" @click="chooseImg('vacUrl', index)">
  217. <view class="add re">
  218. <image style="width: 48rpx;height: 48rpx;" src="@/static/image/add.png"
  219. mode="widthFix"></image>
  220. </view>
  221. </view>
  222. </view>
  223. </uni-forms-item>
  224. </uni-group>
  225. <view class="flew flew-align-center flew-between" style=" background: #F2F2F2;font-size: 30rpx;padding: 20rpx;" >
  226. <view class="flew flew-align-center" @click="addInfo(item)" :class="index == (formData.vaccineInfoUserList.length - 1) ?'' : 'visibility-hidden'" >
  227. <image class="from_image" src="@/static/image/icon_xz_addjz.png" mode=""></image><text style="color: #009FE8;">添加上方接种信息</text>
  228. </view>
  229. <view class="flew flew-align-center" @click="delVacInfoDialog(item,index)" v-if='item.isDel != "Y"'>
  230. <image class="from_image" src="@/static/image/icon_xz_deljz.png" mode=""></image><text style="color: #F21919;">删除上方接种信息</text>
  231. </view>
  232. </view>
  233. </div>
  234. <view class="pb-4" style="background: #F2F2F2;padding-top:20rpx">
  235. <button class="margin0-auto" style="width: 90%;" type="primary" @click="$noMultipleClicks(submit)">提交</button>
  236. </view>
  237. </uni-forms>
  238. <!-- 时间选择器-->
  239. <dataTimePicke ref="setpicker" type="date" toolBarTitle="请选择出生日期"></dataTimePicke>
  240. <!-- 疫苗选择器 -->
  241. <selectPicker ref="vacselet" :list="vacTitle" title="选择疫苗名称" @vacChange="vacNameChange"></selectPicker>
  242. <!-- 重点行业 -->
  243. <selectPicker ref="tredselet" :list="trades" title="选择重点行业" @vacChange="trdesChange"></selectPicker>
  244. <!-- 户籍地选择 -->
  245. <selectMuPicker ref="birselet" model="muitl-column-auto" :list="birthplace" title="选择户籍地" @vacChange="birRegion"></selectMuPicker>
  246. <!-- 模态框 -->
  247. <hModal ref="h_modal" :content="modalContent"></hModal>
  248. <!-- 接种时间 -->
  249. <dataTimePicke ref="vacTime" :startYear="2021" type="datetime-all" toolBarTitle="请选择接种时间" @change='vacTimeChange'></dataTimePicke>
  250. <!-- 禁忌症 -->
  251. <selectPicker ref="con_selet" :list="contraindication" title="请选择禁忌症" @vacChange="conChange"></selectPicker>
  252. <!-- 暂缓 -->
  253. <selectPicker ref="mor_selet" :list="moratorium" title="请选择暂缓原由" @vacChange="morChange"></selectPicker>
  254. <!-- 其他 -->
  255. <selectPicker ref="others_selet" :list="othersOption" title="请选择其他原因" @vacChange="othersChange"></selectPicker>
  256. <!-- 剂次 -->
  257. <selectPicker ref="jici_select" :list="jiciOption" title="请选择剂次" @vacChange="jiciChange"></selectPicker>
  258. <!-- 接种地点 -->
  259. <selectPicker ref="vacareaselet" :list="vacArea" title="请选择接种地点" @vacChange="vacAreaChange"></selectPicker>
  260. <areaP ref="area" ></areaP>
  261. <uni-popup ref="delPopup" type="center">
  262. <uni-popup-dialog type="info" title="提示" content="确定删除该接种信息吗?" @confirm="delConfirm" ></uni-popup-dialog>
  263. </uni-popup>
  264. </view>
  265. </template>
  266. <script>
  267. import senSetPicker from '@/_components/picker/dateTimePicker.vue'
  268. import hUploadImage from '@/_components/hUploadImage.vue'
  269. import selectMuPicker from '@/_components/picker/selectMutilPicker.vue'
  270. import selectPicker from '@/_components/picker/selectPicker.vue'
  271. import hModal from '@/_components/hModal.vue'
  272. import dataTimePicke from '@/_components/picker/dataTimePicke.vue'
  273. import areaP from '@/_components/picker/areaP.vue'
  274. import pickRegions from '@/components/pick-regions/pick-regions.vue'
  275. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  276. import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
  277. import hostUrl from "@/util/url";
  278. let {host, imgDomain} = hostUrl
  279. export default {
  280. components:{uniPopup, uniPopupDialog,pickRegions,senSetPicker,hUploadImage,selectPicker,hModal,selectMuPicker,dataTimePicke,areaP},
  281. data() {
  282. return {
  283. birAddress: '',
  284. jiciOption: [],// 剂次选项
  285. curItem: {},
  286. curIndex: 0,
  287. noClick: true,// $noMultipleClicks变量
  288. defaultRegion: ['安徽省', '安庆市', '潜山市'], // 初始值必须为空,否则更换默认值时不能生效
  289. searchRegion: [],
  290. formData: {
  291. "id": '',
  292. 'villageTowns':'',
  293. 'village': '',
  294. 'birthday': '',
  295. 'age': '',
  296. 'code': '',
  297. 'villagerGroup':'',
  298. 'houseTypeValue': 0,
  299. 'houseType':'',
  300. 'domicile':'',
  301. 'province':'',
  302. 'city':'',
  303. 'region':'',
  304. 'userName':'',
  305. 'genderIndex': 0,
  306. 'idCard':'',
  307. 'phoneNum':'',
  308. 'keyIndustries':'',
  309. "isVaccinationValue": 0,
  310. "isVaccination": "是",
  311. // "vaccinationPlace": null,
  312. "contraindication": null,
  313. "suspend": "",
  314. "death": "",
  315. "lostInMissing": "",
  316. "shouldBe": "",
  317. "other": "",
  318. // "nowIn": "安徽省安庆市潜山市现居地",
  319. 'nowIn': '',
  320. "remark": "",
  321. "status": "",
  322. "createBy": null,
  323. "createTime": null,
  324. "updateBy": null,
  325. "updateTime": null,
  326. "isDel": null,
  327. "urlArr":[], // 禁忌症文件上传地址
  328. 'url': [],//提交的数据
  329. "suspendUrlArr": [], // 暂缓接种附件
  330. 'suspendUrl': [],// 提交的数据
  331. "otherUrlArr": [], // 其他附件
  332. 'otherUrl': [],// 提交的数据
  333. "vaccineInfoUserList": [{
  334. "vaccineName": "",
  335. "vaccinationTime": "",
  336. "vaccinationPlace": "",
  337. "jici": "",
  338. 'progressValue': 1,
  339. "progress": "未完成",
  340. 'urlArr': [],// 附件
  341. 'isDel': 'N'
  342. }],
  343. // "code": "123",
  344. // "crowd_classification": "人群分类"
  345. },
  346. areaList: [],
  347. inputValue : '',
  348. shixian : false,
  349. imageValue:{},
  350. sexRange: [{"value": 0,"text": "男" },{"value": 1,"text": "女"}],// 性别
  351. isUPN: [{"value": 0,"text": "是" },{"value": 1,"text": "否"}], // 是否户主
  352. vaccination: [{"value": 0,"text": "是" },{"value": 1,"text": "否"}] ,// 是否接种
  353. vacPro:[{"value": 0,"text": "已完成" },{"value": 1,"text": "未完成"}], // 接种进度
  354. vacTitle: [], // 疫苗名称
  355. birthplace:[], // 户籍地
  356. trades:[], // 重点行业
  357. contraindication:[], // 禁忌症
  358. othersOption: [],// 其他原因
  359. moratorium:[], // 暂缓接种
  360. vacTimes:[], // 接种疫苗剂次
  361. vacArea:[],// 疫苗接种地点
  362. modalContent:''
  363. }
  364. },
  365. methods:{
  366. takePhoto() {
  367. console.log('---------')
  368. var that = this
  369. uni.chooseImage({
  370. count: 1,
  371. sourceType: 'camera',
  372. success(res){
  373. var file = res.tempFilePaths[0]
  374. that.ocrParse(file)
  375. }
  376. })
  377. },
  378. ocrParse(filePath) {
  379. var url = host + '/boman-file/ocrIdCard'
  380. var token = uni.getStorageSync('token')
  381. // var token = "df057579-73c8-4bdd-8312-f64db8efd699"
  382. uni.showLoading()
  383. uni.uploadFile({
  384. url: url,
  385. filePath: filePath,
  386. name: 'file',
  387. header: {
  388. // 'Content-type': 'multipart/form-data',
  389. 'Authorization': token
  390. },
  391. success: res => {
  392. uni.hideLoading()
  393. console.log(JSON.stringify(res))
  394. var data = JSON.parse(res.data)
  395. this.formData.idCard = data.data.id
  396. this.formData.userName = data.data.name
  397. this.formData.age = this.getAge(data.data.birth)
  398. this.formData.gender = data.data.gender
  399. if (this.formData.gender == '男') {
  400. this.formData.genderIndex = 0
  401. } else {
  402. this.formData.genderIndex = 1
  403. }
  404. },
  405. fail: err => {
  406. uni.hideLoading();
  407. console.log(JSON.stringify(err))
  408. uni.showToast({
  409. title: err.errMsg,
  410. icon: "none"
  411. })
  412. }
  413. })
  414. },
  415. isVaccinationChange(e) {
  416. console.log('isVaccinationChange ' + JSON.stringify(e))
  417. console.log(this.formData.isVaccinationValue)
  418. },
  419. vacTimeChange(e) {
  420. var curItem = this.formData.vaccineInfoUserList[this.curIndex]
  421. this.$set(curItem, 'vaccinationTime', e)
  422. },
  423. submit() {
  424. if (this.formData.houseTypeValue == 0) {
  425. this.formData.houseType = '是'
  426. } else {
  427. this.formData.houseType = '否'
  428. }
  429. if (this.formData.genderIndex == 0) {
  430. this.formData.gender = '男'
  431. } else {
  432. this.formData.gender = '女'
  433. }
  434. if (this.formData.isVaccinationValue == 0) {
  435. this.formData.isVaccination = '是'
  436. } else {
  437. this.formData.isVaccination = '否'
  438. this.formData.vaccineInfoUserList = []
  439. }
  440. var tempArr = []
  441. if (this.formData.urlArr != undefined && this.formData.urlArr != '') {
  442. for (var i = 0; i < this.formData.urlArr.length; i++) {
  443. var img = this.formData.urlArr[i]
  444. var item = {
  445. 'name': '禁忌症附件',
  446. 'url': img
  447. }
  448. tempArr.push(item)
  449. }
  450. this.formData.url = JSON.stringify(tempArr)
  451. } else {
  452. this.formData.url = ''
  453. }
  454. if (this.formData.suspendUrlArr != undefined && this.formData.suspendUrlArr != '') {
  455. tempArr = []
  456. for (var i = 0; i < this.formData.suspendUrlArr.length; i++) {
  457. var img = this.formData.suspendUrlArr[i]
  458. var item = {
  459. 'name': '暂缓附件',
  460. 'url': img
  461. }
  462. tempArr.push(item)
  463. }
  464. this.formData.suspendUrl = JSON.stringify(tempArr)
  465. } else {
  466. this.formData.suspendUrl = ''
  467. }
  468. if (this.formData.otherUrlArr != undefined && this.formData.otherUrlArr != '') {
  469. tempArr = []
  470. for (var i = 0; i < this.formData.otherUrlArr.length; i++) {
  471. var img = this.formData.otherUrlArr[i]
  472. var item = {
  473. 'name': '其他附件',
  474. 'url': img
  475. }
  476. tempArr.push(item)
  477. }
  478. this.formData.otherUrl = JSON.stringify(tempArr)
  479. } else {
  480. this.formData.otherUrl = ''
  481. }
  482. console.log('vaccineInfoUserList ' + JSON.stringify(this.formData.vaccineInfoUserList))
  483. if (this.formData.vaccineInfoUserList != undefined && this.formData.vaccineInfoUserList != '') {
  484. for (var i = 0; i < this.formData.vaccineInfoUserList.length; i++) {
  485. var item = this.formData.vaccineInfoUserList[i]
  486. if (item.urlArr != undefined && item.urlArr != '') {
  487. tempArr = []
  488. for (var j = 0; j < item.urlArr.length; j++) {
  489. var img = item.urlArr[j]
  490. var subItem = {
  491. 'name': '附件',
  492. 'url': img
  493. }
  494. tempArr.push(subItem)
  495. }
  496. item.url = JSON.stringify(tempArr)
  497. } else {
  498. item.url = ''
  499. }
  500. }
  501. }
  502. console.log(JSON.stringify(this.formData))
  503. if (this.formData.id) {
  504. this.$http.put('boman-web-core/core/info', this.formData).then(res=>{
  505. if(res.code == 200 ) {
  506. uni.showToast({
  507. title: '提交成功',
  508. icon: "none"
  509. })
  510. setTimeout(function() {
  511. uni.navigateBack()
  512. }, 1000)
  513. }
  514. })
  515. } else {
  516. this.$http.post('boman-web-core/core/info', this.formData).then(res=>{
  517. if(res.code == 200 ) {
  518. uni.showToast({
  519. title: '提交成功',
  520. icon: "none"
  521. })
  522. setTimeout(function() {
  523. uni.navigateBack()
  524. }, 1000)
  525. }
  526. })
  527. }
  528. },
  529. regionPickerChange(region) {
  530. this.searchRegion = region
  531. console.log(this.searchRegion,'searchRegion')
  532. var codeArray = this.searchRegion.map(item=>item?item.code:undefined)
  533. var nameArray = this.searchRegion.map(item=>item?item.name:undefined)
  534. this.formData.province = nameArray[0]
  535. this.formData.city = nameArray[1]
  536. this.formData.region = nameArray[2]
  537. },
  538. uploadFile(filePath, type) {
  539. var that = this
  540. uni.showLoading()
  541. var url = host + '/boman-file/upload'
  542. var token = uni.getStorageSync('token')
  543. // var token = "df057579-73c8-4bdd-8312-f64db8efd699"
  544. uni.uploadFile({
  545. url: url,
  546. filePath: filePath,
  547. name: 'file',
  548. header: {
  549. // 'Content-type': 'multipart/form-data',
  550. 'Authorization': token
  551. },
  552. success: res => {
  553. uni.hideLoading()
  554. console.log(JSON.stringify(res))
  555. var data = JSON.parse(res.data)
  556. var imgUrl = data.data.url
  557. console.log('imgUrl ' + imgUrl)
  558. // var regexp = new RegExp("((http|ftp|https)://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*/?", "g");
  559. // imgUrl = imgUrl.replace(regexp, imgDomain + '/');
  560. console.log('imgUrl ' + imgUrl)
  561. if (type == 'url') {// 禁忌症附件
  562. that.formData.urlArr.push(imgUrl)
  563. } else if (type == 'suspendUrl') {// 暂缓接种附件
  564. that.formData.suspendUrlArr.push(imgUrl)
  565. } else if (type == 'otherUrl') {// 其他附件
  566. that.formData.otherUrlArr.push(imgUrl)
  567. } else if (type == 'vacUrl') {// 接种信息每行的附件
  568. var curItem = that.formData.vaccineInfoUserList[that.curIndex]
  569. console.log('--------curItem ' + JSON.stringify(curItem))
  570. curItem.urlArr.push(imgUrl)
  571. that.$set(curItem, 'urlArr', curItem.urlArr)
  572. }
  573. console.log('=========' + JSON.stringify(that.formData))
  574. },
  575. fail: err => {
  576. uni.hideLoading();
  577. console.log(JSON.stringify(err))
  578. uni.showToast({
  579. title: err.errMsg,
  580. icon: "none"
  581. })
  582. }
  583. })
  584. },
  585. chooseImg(type, index) {
  586. console.log('type ' + type + ' index ' + index)
  587. var that = this
  588. if (index) {
  589. that.curIndex = index
  590. console.log('curIndex ' + that.curIndex)
  591. }
  592. var count = 1
  593. // if (type == 'company') {
  594. // count = 9
  595. // }
  596. uni.chooseImage({
  597. count: count,
  598. sizeType: ['original', 'compressed'],
  599. sourceType: ['album', 'camera'],
  600. success: function(res) {
  601. console.log("res.tempFilePaths", res.tempFilePaths)
  602. for (let i = 0; i < res.tempFilePaths.length; i++) {
  603. let imgSrc = res.tempFilePaths[i]
  604. that.uploadFile(imgSrc, type)
  605. }
  606. }
  607. })
  608. },
  609. removeImg(index, type) {
  610. if (type == 'url') {// 禁忌症附件
  611. this.formData.urlArr.splice(index, 1)
  612. } else if (type == 'suspendUrl') {// 暂缓接种附件
  613. this.formData.suspendUrlArr.splice(index, 1)
  614. } else if (type == 'otherUrl') {// 其他附件
  615. this.formData.otherUrlArr.splice(index, 1)
  616. } else if (type == 'vacUrl') {//接种附件
  617. var curItem = this.formData.vaccineInfoUserList[this.curIndex]
  618. curItem.urlArr.splice(index, 1)
  619. }
  620. },
  621. getOthersOption() {
  622. this.$http.get('system/dict/data/type/other_status').then(res=>{
  623. if(res.code == 200) {
  624. this.othersOption = res.data.map(v=>{
  625. return {label: v.dictLabel,vlaue:v.dictValue, children: v.children}
  626. })
  627. console.log('othersOption ' + JSON.stringify(this.othersOption))
  628. }
  629. })
  630. },
  631. /* 获取疫苗名称 */
  632. getVacTitle () {
  633. this.$http.get('system/dict/data/type/vaccine_name').then(res=>{
  634. if(res.code == 200) {
  635. this.vacTitle = res.data.map(v=>{
  636. return {label: v.dictLabel,vlaue:v.dictValue, children: v.children}
  637. })
  638. // 如果是“编辑”模式,根据每行的疫苗厂商,设置剂次选项
  639. if (this.formData.id) {
  640. for (var i = 0; i < this.formData.vaccineInfoUserList.length; i++) {
  641. var curItem = this.formData.vaccineInfoUserList[i]
  642. console.log('------curItem ' + JSON.stringify(curItem))
  643. for (var j = 0; j < this.vacTitle.length; j++) {
  644. var item = this.vacTitle[j]
  645. console.log('======item ' + JSON.stringify(item))
  646. if (item.label == curItem.vaccineName) {
  647. this.$set(curItem, 'jiciOption', item.children)
  648. }
  649. }
  650. }
  651. }
  652. console.log('vacTitle ' + JSON.stringify(this.vacTitle))
  653. }
  654. })
  655. },
  656. /* 获取户籍地 */
  657. getBirthplace () {
  658. this.$http.get('/boman-web-core/administrativeInfo/treeSelect').then(res=>{
  659. if(res.code == 200) {
  660. this.birthplace = res.data
  661. }
  662. })
  663. },
  664. /* 重点行业 */
  665. getTrade () {
  666. this.$http.get('/system/dict/data/type/key_trades').then(res=>{
  667. if(res.code == 200) {
  668. this.trades = res.data.map(v=>{
  669. return {label: v.dictLabel,vlaue:v.dictValue}
  670. })
  671. }
  672. })
  673. },
  674. /* 禁忌症 */
  675. getContraindication() {
  676. this.$http.get('/system/dict/data/type/contraindication').then(res=>{
  677. if(res.code == 200) {
  678. this.contraindication = res.data.map(v=>{
  679. return {label: v.dictLabel,vlaue:v.dictValue}
  680. })
  681. }
  682. })
  683. },
  684. /* 获取暂缓接种 */
  685. getMonVac() {
  686. this.$http.get('/system/dict/data/type/moratorium_on_vaccination').then(res=>{
  687. if(res.code == 200) {
  688. this.moratorium = res.data.map(v=>{
  689. return {label: v.dictLabel,vlaue:v.dictValue}
  690. })
  691. }
  692. })
  693. },
  694. /* 获取疫苗剂次 */
  695. getVacDictValue (val) {
  696. let url = '/system/dict/data/type/' + val
  697. this.$http.get(url).then(res=>{
  698. if(res.code == 200) {
  699. this.vacTimes = res.data
  700. }
  701. })
  702. },
  703. /* 获取接种地点 */
  704. getVacArea () {
  705. this.$http.get('/system/dict/data/type/vaccination_site').then(res=>{
  706. console.log(res)
  707. if(res.code == 200) {
  708. this.vacArea = res.data.map(v=>{
  709. return {label: v.dictLabel,vlaue:v.dictValue}
  710. })
  711. }
  712. })
  713. },
  714. /* 初始化 */
  715. init() {
  716. this.getVacTitle()
  717. this.getBirthplace()
  718. this.getTrade()
  719. this.getContraindication(),
  720. this.getMonVac()
  721. this.getVacArea()
  722. this.getOthersOption()
  723. },
  724. getDetail() {
  725. this.$http.get('boman-web-core/core/info/' + this.formData.id).then(res=>{
  726. if(res.code == 200 ) {
  727. this.init()
  728. this.formData = res.data
  729. if (this.formData.houseType == '是') {
  730. this.formData.houseTypeValue = 0
  731. } else {
  732. this.formData.houseTypeValue = 1
  733. }
  734. if (this.formData.gender == '男') {
  735. this.formData.genderIndex = 0
  736. } else {
  737. this.formData.genderIndex = 1
  738. }
  739. if (this.formData.isVaccination == '是') {
  740. this.formData.isVaccinationValue = 0
  741. } else {
  742. this.formData.isVaccinationValue = 1
  743. }
  744. this.birAddress = ''
  745. if (this.formData.villageTowns) {
  746. this.birAddress += this.formData.villageTowns
  747. }
  748. if (this.formData.village) {
  749. this.birAddress += this.formData.village
  750. }
  751. if (this.formData.villagerGroup) {
  752. this.birAddress += this.formData.villagerGroup
  753. }
  754. var tempArr = []
  755. // for (var i = 0; i < this.formData.urlArr.length; i++) {
  756. // var img = this.formData.urlArr[i]
  757. // var item = {
  758. // 'name': '禁忌症附件',
  759. // 'url': img
  760. // }
  761. // tempArr.push(item)
  762. // }
  763. // this.formData.url = JSON.stringify(tempArr)
  764. // tempArr = []
  765. // for (var i = 0; i < this.formData.suspendUrlArr.length; i++) {
  766. // var img = this.formData.suspendUrlArr[i]
  767. // var item = {
  768. // 'name': '暂缓附件',
  769. // 'url': img
  770. // }
  771. // tempArr.push(item)
  772. // }
  773. // this.formData.suspendUrl = JSON.stringify(tempArr)
  774. // tempArr = []
  775. // for (var i = 0; i < this.formData.otherUrlArr.length; i++) {
  776. // var img = this.formData.otherUrlArr[i]
  777. // var item = {
  778. // 'name': '其他附件',
  779. // 'url': img
  780. // }
  781. // tempArr.push(item)
  782. // }
  783. // this.formData.otherUrl = JSON.stringify(tempArr)
  784. for (var i = 0; i < this.formData.vaccineInfoUserList.length; i++) {
  785. var item = this.formData.vaccineInfoUserList[i]
  786. // 设置“进度”
  787. if (item.progress == '已完成') {
  788. this.$set(item, 'progressValue', 0)
  789. } else {
  790. this.$set(item, 'progressValue', 1)
  791. }
  792. if (item.url != undefined && item.url != '') {
  793. var urlArr = JSON.parse(item.url)
  794. tempArr = urlArr.map(v=>{
  795. return v.url
  796. })
  797. this.$set(item, 'urlArr', tempArr)
  798. } else {
  799. this.$set(item, 'urlArr', [])
  800. }
  801. console.log('============' + JSON.stringify(item))
  802. }
  803. }
  804. })
  805. },
  806. /* 上传后端获取身份证信息 */
  807. getIdcardInfo (val) {
  808. if (this.formData == undefined) {
  809. return
  810. }
  811. console.log(this.formData.idCard)
  812. if (this.formData.idCard == undefined || this.formData.idCard == '') {
  813. return
  814. }
  815. this.$http.post('boman-web-core/core/info/findHjInfo',{
  816. idCard: this.formData.idCard
  817. }).then(res=>{
  818. if(res.code == 200 ) {
  819. this.formData.userName = res.data.userName
  820. this.formData.age = res.data.age
  821. this.formData.gender = res.data.gender
  822. if (this.formData.gender == '男') {
  823. this.formData.genderIndex = 0
  824. } else {
  825. this.formData.genderIndex = 1
  826. }
  827. }
  828. })
  829. },
  830. // 疫苗选择组件
  831. showVacPicker (index) {
  832. if (this.formData.id != undefined && this.formData.id != "") {
  833. return
  834. }
  835. this.curIndex = index
  836. this.$refs.vacselet.show()
  837. },
  838. /* 成功选择疫苗 */
  839. vacNameChange (e) {
  840. console.log(JSON.stringify(e))
  841. var curItem = this.formData.vaccineInfoUserList[this.curIndex]
  842. console.log('------' + JSON.stringify(curItem))
  843. var label = e[0].label
  844. for (var i = 0; i < this.vacTitle.length; i++) {
  845. var item = this.vacTitle[i]
  846. console.log('0000000' + JSON.stringify(item))
  847. if (label == item.label) {
  848. this.$set(curItem, 'vaccineName', label)
  849. this.$set(curItem, 'jiciOption', item.children)
  850. this.$set(curItem, 'vaccineNum', item.children.length)
  851. }
  852. }
  853. console.log('======' + JSON.stringify(this.formData.vaccineInfoUserList[this.curIndex]))
  854. },
  855. // 剂次选择组件
  856. showJiciPicker (index) {
  857. if (this.formData.id != undefined && this.formData.id != "") {
  858. return
  859. }
  860. this.curIndex = index
  861. var curItem = this.formData.vaccineInfoUserList[this.curIndex]
  862. console.log('curItem ' + JSON.stringify(curItem))
  863. // this.jiciOption = curItem.jiciOption
  864. this.jiciOption = curItem.jiciOption.map(v=>{
  865. return {label: v.dictLabel, vlaue:v.dictValue}
  866. })
  867. console.log('jiciOption ' + JSON.stringify(this.jiciOption))
  868. this.$refs.jici_select.show()
  869. },
  870. jiciChange (e) {
  871. console.log(JSON.stringify(e[0]))
  872. var curItem = this.formData.vaccineInfoUserList[this.curIndex]
  873. console.log('curItem ' + JSON.stringify(curItem))
  874. this.$set(curItem, 'jici', e[0].label)
  875. var selectedIndex
  876. for (var i = 0; i < curItem.jiciOption.length; i++) {
  877. var item = curItem.jiciOption[i]
  878. console.log('item ' + JSON.stringify(item))
  879. if (item.dictLabel == curItem.jici) {
  880. selectedIndex = i
  881. }
  882. }
  883. if (selectedIndex == curItem.jiciOption.length - 1) {// 位置为最后一剂次,设置已完成
  884. this.$set(curItem, 'progressValue', 0)
  885. } else {
  886. this.$set(curItem, 'progressValue', 1)
  887. }
  888. },
  889. showOthersPicker(index) {
  890. this.curIndex = index
  891. this.$refs.others_selet.show();
  892. },
  893. /* 其他 */
  894. othersChange(e) {
  895. console.log(JSON.stringify(e[0]))
  896. this.formData.other = e[0].label
  897. },
  898. /* 户籍地选择组件 */
  899. showbirPicker () {
  900. this.$refs.birselet.show()
  901. },
  902. /* 成功选择户籍 */
  903. birRegion (e) {
  904. console.log('---------' + JSON.stringify(e))
  905. this.formData.villageTowns = e[0].label
  906. this.formData.village = e[1].label
  907. this.formData.villagerGroup = e[2].label
  908. this.birAddress = this.formData.villageTowns + this.formData.village + this.formData.villagerGroup
  909. },
  910. /* 出生日期组件 */
  911. showDatePicker () {
  912. this.$refs.setpicker.show();
  913. },
  914. /* 重点行业选择组件 */
  915. showTrdesSelect () {
  916. this.$refs.tredselet.show();
  917. },
  918. /* 成功选择行业 */
  919. trdesChange (e) {
  920. this.formData.keyIndustries = e[0].label
  921. },
  922. /* 接种时间组件 */
  923. showVacTime (index) {
  924. if (this.formData.id != undefined && this.formData.id != "") {
  925. return
  926. }
  927. this.curIndex = index
  928. this.$refs.vacTime.show();
  929. },
  930. /* 禁忌症组件 */
  931. showMonList () {
  932. this.$refs.con_selet.show();
  933. },
  934. /* 成功选择禁忌症 */
  935. conChange(e) {
  936. console.log(JSON.stringify(e))
  937. this.formData.contraindication = e[0].label
  938. },
  939. /* 暂缓接种组件 */
  940. showWaitList () {
  941. this.$refs.mor_selet.show();
  942. },
  943. /* 成功选择暂缓原由 */
  944. morChange (e) {
  945. this.formData.suspend = e[0].label
  946. },
  947. /* 接种地点组件 */
  948. showVacArea (index) {
  949. if (this.formData.id != undefined && this.formData.id != "") {
  950. return
  951. }
  952. this.curIndex = index
  953. this.$refs.vacareaselet.show();
  954. },
  955. /* 成功选择接种地点 */
  956. vacAreaChange (e) {
  957. console.log(JSON.stringify(e[0]))
  958. var curItem = this.formData.vaccineInfoUserList[this.curIndex]
  959. this.$set(curItem, 'vaccinationPlace', e[0].label)
  960. },
  961. /* 省市区组件 */
  962. showArea () {
  963. this.$refs.area.show();
  964. },
  965. // quxiaobutton() {
  966. // this.shixian = false;
  967. // },
  968. // quedingbutton (bangdingyear,bangdingmonth,bangdingday){
  969. // this.shixian = false;
  970. // this.inputValue = bangdingyear + "-" + bangdingmonth + "-" + bangdingday;
  971. // },
  972. /* 添加接种信息 */
  973. addInfo (item) {
  974. if(this.formData.vaccineInfoUserList.length >= 3) {
  975. this.modalContent = '最多可添加三次接种信息'
  976. this.$refs.h_modal.show()
  977. return false
  978. }
  979. let obj = {
  980. "vaccineName": "",
  981. "vaccinationTime": "",
  982. "vaccinationPlace": "",
  983. "jici": "",
  984. 'progressValue': 1,
  985. "progress": "未完成",
  986. 'urlArr': [],// 附件
  987. 'isDel': 'N'
  988. }
  989. this.formData.vaccineInfoUserList.push(obj)
  990. console.log(this.formData.vaccineInfoUserList)
  991. },
  992. delVacInfoDialog(item, index) {
  993. this.curItem = item
  994. this.curIndex = index
  995. this.$refs.delPopup.open()
  996. },
  997. /* 删除接种信息 */
  998. delConfirm (done) {
  999. done()
  1000. if(this.formData.vaccineInfoUserList.length <= 1) {
  1001. this.modalContent = '至少需要填写一次接种信息'
  1002. this.$refs.h_modal.show()
  1003. return false
  1004. }
  1005. // this.formData.vaccineInfoUserList.splice(index,1)
  1006. this.$set(this.formData.vaccineInfoUserList[this.curIndex], 'isDel', 'Y')
  1007. },
  1008. getAge(strAge) {
  1009. var birArr = strAge.split("-");
  1010. var birYear = birArr[0];
  1011. var birMonth = birArr[1];
  1012. var birDay = birArr[2];
  1013. d = new Date();
  1014. var nowYear = d.getFullYear();
  1015. var nowMonth = d.getMonth() + 1; //记得加1
  1016. var nowDay = d.getDate();
  1017. var returnAge;
  1018. if (birArr == null) {
  1019. return false
  1020. };
  1021. var d = new Date(birYear, birMonth - 1, birDay);
  1022. if (d.getFullYear() == birYear && (d.getMonth() + 1) == birMonth && d.getDate() == birDay) {
  1023. if (nowYear == birYear) {
  1024. returnAge = 0; //
  1025. } else {
  1026. var ageDiff = nowYear - birYear; //
  1027. if (ageDiff > 0) {
  1028. if (nowMonth == birMonth) {
  1029. var dayDiff = nowDay - birDay; //
  1030. if (dayDiff < 0) {
  1031. returnAge = ageDiff - 1;
  1032. } else {
  1033. returnAge = ageDiff;
  1034. }
  1035. } else {
  1036. var monthDiff = nowMonth - birMonth; //
  1037. if (monthDiff < 0) {
  1038. returnAge = ageDiff - 1;
  1039. } else {
  1040. returnAge = ageDiff;
  1041. }
  1042. }
  1043. } else {
  1044. return "出生日期晚于今天,数据有误"; //返回-1 表示出生日期输入错误 晚于今天
  1045. }
  1046. }
  1047. return returnAge;
  1048. } else {
  1049. return ("输入的日期格式错误!");
  1050. }
  1051. }
  1052. },
  1053. onLoad(option) {
  1054. console.log('onLoad')
  1055. if (option.id) {
  1056. this.formData.id = option.id
  1057. uni.setNavigationBarTitle({
  1058. title: '修改'
  1059. })
  1060. } else {
  1061. uni.setNavigationBarTitle({
  1062. title: '新增'
  1063. })
  1064. }
  1065. },
  1066. mounted () {
  1067. if (this.formData.id) {// “编辑”模式下,先获取详情,再获取选项列表
  1068. this.getDetail()
  1069. } else {// “新增”模式下,获取选项列表
  1070. this.init()
  1071. }
  1072. }
  1073. }
  1074. </script>
  1075. <style>
  1076. .vac-form textarea {
  1077. display: block;
  1078. padding:16rpx 36rpx;
  1079. font-size: 28rpx;
  1080. box-sizing: border-box;
  1081. }
  1082. </style>
  1083. <style scoped lang="scss">
  1084. .pick-line {
  1085. width: 100%;
  1086. height: 100%;
  1087. display: flex;
  1088. flex-direction: row;
  1089. align-items: center;
  1090. padding-left: 20rpx;
  1091. }
  1092. .from_image{
  1093. width: 30rpx;
  1094. height: 30rpx;
  1095. }
  1096. .delPop {
  1097. z-index: 2;
  1098. top: -10rpx;
  1099. right: -10rpx;
  1100. .circleRed {
  1101. width: 40rpx;
  1102. height: 40rpx;
  1103. background-color: red;
  1104. border-radius: 50%;
  1105. &::after,
  1106. &::before {
  1107. content: '';
  1108. width: 25rpx;
  1109. height: 5rpx;
  1110. position: absolute;
  1111. background-color: white;
  1112. top: 50%;
  1113. left: 50%;
  1114. // transform-origin:center;
  1115. }
  1116. &::after {
  1117. transform: translate(-50%, -50%) rotate(45deg);
  1118. }
  1119. &::before {
  1120. transform: translate(-50%, -50%) rotate(-45deg);
  1121. }
  1122. }
  1123. }
  1124. .img-add {
  1125. width: 120rpx;
  1126. height: 120rpx;
  1127. margin: 10rpx 3% 10rpx 0;
  1128. border-radius: 10rpx;
  1129. overflow: hidden;
  1130. background-color: #f7f7f7;
  1131. display: flex;
  1132. flex-direction: column;
  1133. justify-content: center;
  1134. .add {
  1135. padding-top: 0rpx;
  1136. display: flex;
  1137. flex-direction: column;
  1138. align-items: center;
  1139. image {}
  1140. .font {
  1141. color: #8a8a8a;
  1142. font-size: 26rpx;
  1143. }
  1144. }
  1145. }
  1146. </style>