WorkerReport.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <template>
  2. <div>
  3. <common @asynCallBack="asynCallBack" :checkOpenId="checkOpenId"></common>
  4. <top-header :pageTitle="pageTitle" :leftShow="leftShow" ></top-header>
  5. <div class="mui-content vongi-qingjiadt">
  6. <div class="mui-content-padded">
  7. <h5>身份信息</h5>
  8. </div>
  9. <form class="mui-input-group">
  10. <div class="mui-input-row">
  11. <label>姓名</label>
  12. <span>{{student&&student.name}}</span>
  13. </div>
  14. <div class="mui-input-row">
  15. <label>手机号</label>
  16. <span>{{showTel(student&&student.phone)}}</span>
  17. </div>
  18. <div class="mui-input-row">
  19. <label>所属单位</label>
  20. <span v-text="student.position1"></span>
  21. </div>
  22. <div class="mui-input-row" v-if="student.position2" >
  23. <label>所属部门</label>
  24. <span v-text="student.position2"></span>
  25. </div>
  26. <div class="mui-input-row" v-if="student.position3">
  27. <label>岗位</label>
  28. <span v-text="student.position3"></span>
  29. </div>
  30. </form>
  31. <div class="mui-content-padded">
  32. <h5>健康状态</h5>
  33. </div>
  34. <form class="mui-input-group vongi-editme">
  35. <div class="mui-input-row">
  36. <label style="width:50%">健康码颜色<i class="colorfe616c" v-if="!curDateIsUpload">*</i></label>
  37. <span v-if="curDateIsUpload" style="width:50%" v-text="report.healthCodeN">其他</span>
  38. <button class="mui-btn mui-btn-block mui-navigate-right" v-if="!curDateIsUpload" @click="selectHealth" type='button'
  39. style="width:50%">
  40. {{report.healthCodeN?report.healthCodeN:'请选择'}}
  41. </button>
  42. <i style="
  43. margin-left: 14px;
  44. font-size: 10px;
  45. "
  46. v-if="!curDateIsUpload">以湖北健康码的颜色为准</i>
  47. </div>
  48. <div class="mui-input-row">
  49. <label style="width:50%">自身健康情况<i class="colorfe616c" v-if="!curDateIsUpload">*</i></label>
  50. <span v-if="curDateIsUpload" style="width:50%" v-text="report.healthStatusN">其他</span>
  51. <button class="mui-btn mui-btn-block mui-navigate-right" v-if="!curDateIsUpload" @click="selectHealthStatus" type='button'
  52. style="width:50%">
  53. {{report.healthStatusN?report.healthStatusN:'请选择'}}
  54. </button>
  55. </div>
  56. <div class="mui-input-row">
  57. <label style="width:50%">疫苗接种情况<i class="colorfe616c" v-if="!curDateIsUpload">*</i></label>
  58. <span v-if="curDateIsUpload" style="width:50%" v-text="report.vaccinationStatusN">其他</span>
  59. <button class="mui-btn mui-btn-block mui-navigate-right" v-if="!curDateIsUpload" @click="selectHealthStatusVaccination" type='button'
  60. style="width:50%">
  61. {{report.vaccinationStatusN?report.vaccinationStatusN:'请选择'}}
  62. </button>
  63. </div>
  64. <div class="mui-input-row">
  65. <label>今日体温<i class="colorfe616c" v-if="!curDateIsUpload">*</i></label>
  66. <span v-if="curDateIsUpload" style="width:50%" v-text="report.temperature"></span>
  67. <input type="text" class="mui-input-clear" v-if="!curDateIsUpload" v-model="report.temperature" placeholder="请输入体温度数 ">
  68. </div>
  69. <div class="mui-input-row">
  70. <label>其他情况</label>
  71. <span v-if="curDateIsUpload" style="width:50%" v-text="report.healthRemark"></span>
  72. <input type="text" class="mui-input-clear" v-if="!curDateIsUpload" v-model="report.healthRemark" placeholder="请填写具体情况 ">
  73. </div>
  74. <div class="mui-input-row">
  75. <label style="width:70%">家庭成员身体健康情况<i class="colorfe616c" v-if="!curDateIsUpload">*</i></label>
  76. <span v-if="curDateIsUpload" style="width:30%" v-text="report.familyStatusN">其他</span>
  77. <button v-if="!curDateIsUpload" @click="selectFamilyHealthStatus" class="mui-btn mui-btn-block mui-navigate-right"
  78. type='button' style="width:30%">
  79. {{report.familyStatusN?report.familyStatusN:'请选择'}}
  80. </button>
  81. </div>
  82. <div class="mui-input-row vongi-wordcard vongi-input-up">
  83. <div class="mui-media-body">上传家庭成员健康码</div>
  84. <div class="fyy-upphoto">
  85. <div class="mui-col-xs-3 fyy-upphoto-close" v-for="(picture,index) in report.pictures" :key="index">
  86. <img v-if="picture" :src="picture + '?x-oss-process=image/resize,m_fill,w_128,h_128'" />
  87. <a class="mui-icon mui-icon-closeempty" v-if="!curDateIsUpload" @click="delImg(index)"></a>
  88. </div>
  89. <div class="mui-col-xs-3" v-if="!curDateIsUpload" @click="changeImg">
  90. <a><i class="mui-icon mui-icon-plusempty"></i></a>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="mui-input-row " :class="!curDateIsUpload?'vongi-pad':''">
  95. <div class="mui-media-body" v-if="!curDateIsUpload">假期是否曾前往重点疫区<i class="colorfe616c">*</i></div>
  96. <label v-if="curDateIsUpload" style="width:70%;">假期是否曾前往重点疫区</label>
  97. <span v-if="curDateIsUpload" style="width:30%" v-text="report.isGoto ? '是' : '否'">是</span>
  98. <div class="mui-input-group flew" v-if="!curDateIsUpload">
  99. <div class="mui-radio mui-left mui-col-xs-6">
  100. <label>是</label>
  101. <input v-model="report.isGoto" name="isGoto" value="true" type="radio">
  102. </div>
  103. <div class="mui-radio mui-left mui-col-xs-6">
  104. <label>否</label>
  105. <input v-model="report.isGoto" name="isGoto" value="false" type="radio">
  106. </div>
  107. </div>
  108. </div>
  109. <div class="mui-input-row " :class="!curDateIsUpload?'vongi-pad':''">
  110. <div class="mui-media-body" v-if="!curDateIsUpload">是否接触重点疫区高危人群<i class="colorfe616c">*</i></div>
  111. <label v-if="curDateIsUpload" style="width:70%;">是否接触重点疫区高危人群</label>
  112. <span v-if="curDateIsUpload" style="width:30%" v-text="report.isTouch ? '是' : '否'">是</span>
  113. <div class="mui-input-group flew" v-if="!curDateIsUpload">
  114. <div class="mui-radio mui-left mui-col-xs-6">
  115. <label>是</label>
  116. <input v-model="report.isTouch" name="isTouch" value="true" type="radio">
  117. </div>
  118. <div class="mui-radio mui-left mui-col-xs-6">
  119. <label>否</label>
  120. <input v-model="report.isTouch" name="isTouch" value="false" type="radio">
  121. </div>
  122. </div>
  123. </div>
  124. <div class="mui-input-row" style="height: 100px" >
  125. <label style="width:30%;height: 100px;">定位<i class="colorfe616c" v-if="!curDateIsUpload">*</i></label>
  126. <span v-if="!curDateIsUpload" style="text-align: left;" class="vongi-yidi-location" @click="getPoint"
  127. >{{report.address}}<i class="mui-icon mui-icon-location" style="color: #096DD9;font-size: 13px;">重新定位</i></span>
  128. <span v-if="curDateIsUpload" class="vongi-yidi-location aaa" style="text-align: left;" >{{address?address:report.address}}</span>
  129. </div>
  130. </form>
  131. <div class="vongi-btn vongi-login-btn" v-if="!curDateIsUpload&&!send">
  132. <button class="mui-btn mui-btn-primary " @click="submitReport()">
  133. 提交
  134. </button>
  135. </div>
  136. <div class="fyy-popup-button" v-if="curDateIsUpload&&!send">
  137. <div class="mui-col-xs-6">
  138. <button class="mui-btn mui-btn-primary " @click="sendReport()">
  139. 确认提交
  140. </button>
  141. </div>
  142. <div class="mui-col-xs-6">
  143. <button class="mui-btn mui-btn-warning " @click="noSubmitReport()">
  144. 撤回编辑
  145. </button>
  146. </div>
  147. </div>
  148. </div>
  149. <loading :visible="isLoading"></loading>
  150. </div>
  151. </template>
  152. <script>
  153. require('$project/assets/js/mui.picker.min.js');
  154. import * as API_Health from '@/apis/Master/health'
  155. import Common from '$project/components/Common.vue'
  156. import Loading from '$project/components/Loading.vue'
  157. import TopHeader from '$project/components/TopHeader.vue'
  158. import MapLoader from '$project/utils/AMap'
  159. import * as WxJsApi from '$project/utils/wxJsApi'
  160. import {
  161. mapGetters,
  162. mapMutations
  163. } from 'vuex'
  164. import {
  165. showTel,
  166. currentTimeStamp,
  167. parseUnixTime
  168. } from '$project/utils'
  169. export default {
  170. name: 'MasterHealthWorkerReport',
  171. components: {
  172. Common,
  173. Loading,
  174. TopHeader
  175. },
  176. data() {
  177. return {
  178. pageTitle: '健康打卡',
  179. id: '',
  180. student: {},
  181. report: {
  182. isJingzhou:null,
  183. isProvince:null,
  184. healthCode: "",
  185. healthCodeN: "请选择",
  186. healthStatus: "",
  187. healthStatusN: "请选择",
  188. vaccinationStatus: "",
  189. vaccinationStatusN: "请选择",
  190. healthRemark: "",
  191. familyStatus: "",
  192. familyStatusN: "请选择",
  193. pictures: [],
  194. isGoto: false,
  195. isTouch: false,
  196. longitude: 112.276527,
  197. latitude: 30.306427,
  198. address: '定位中……',
  199. },
  200. address:'',
  201. curDateIsUpload: false,
  202. send: false,
  203. isLoading: false,
  204. leftShow:true,
  205. checkOpenId:true,
  206. max: 37.3,
  207. healthStatusList: [],
  208. healthStatusListVaccination: [],
  209. healthCodeList:[{
  210. text: "绿码",
  211. value: "00"
  212. },
  213. {
  214. text: "黄码",
  215. value: "01"
  216. },
  217. {
  218. text: "红码",
  219. value: "10"
  220. }
  221. ],
  222. healthCodeObj:{
  223. "00":"绿码",
  224. "01":"黄码",
  225. "10":"红码",
  226. }
  227. }
  228. },
  229. created() {
  230. if(this.$route.query.token){
  231. this.leftShow=false;
  232. this.checkOpenId=false;
  233. }
  234. this.id = this.$route.query.id;
  235. },
  236. methods: {
  237. showTel(val){
  238. return showTel(val);
  239. },
  240. getPoint(){
  241. this.report.address='定位中……';
  242. //this.isLoading = true;
  243. WxJsApi.getLocation().then((res) => {
  244. this.isLoading = false;
  245. this.report.latitude = parseFloat(res.latitude);
  246. this.report.longitude = parseFloat(res.longitude);
  247. mui.toast("经纬度已经获取,正在转换地址...");
  248. //获取定位地址
  249. this.getPositionByLonLats()
  250. }).catch(error => {
  251. this.isLoading = false;
  252. console.log(error)
  253. WxJsApi.addSysLog(error)
  254. })
  255. }, //获取定位地址
  256. getPositionByLonLats() {
  257. var _this = this;
  258. MapLoader().then(AMap => {
  259. var lnglatXY = [_this.report.longitude, _this.report.latitude];
  260. AMap.service('AMap.Geocoder', function() {
  261. let geocoder = new AMap.Geocoder({});
  262. geocoder.getAddress(lnglatXY, function(status, result) {
  263. console.log(lnglatXY);
  264. mui.toast("定位成功!");
  265. console.log(status, result);
  266. if (status === 'complete' && result.info === 'OK') {
  267. var address = result.regeocode.formattedAddress;
  268. console.log(address);
  269. _this.report.address = address;
  270. } else {
  271. _this.report.address = '无法获取定位';
  272. }
  273. });
  274. });
  275. }).catch(error => {
  276. console.log(error)
  277. mui.toast(JSON.stringify(error));
  278. })
  279. },
  280. asynCallBack() {},
  281. delImg(index) {
  282. this.report.pictures.splice(index, 1);
  283. },
  284. changeImg() {
  285. if (this.report.pictures.length >= 3) {
  286. mui.toast("只能上传3张家庭成员健康码");
  287. return;
  288. }
  289. var _this = this;
  290. WxJsApi.chooseImage().then(res => {
  291. var localData = res.localData;
  292. if (localData.indexOf('data:image') != 0) {
  293. //判断是否有这样的头部
  294. localData = 'data:image/jpeg;base64,' + localData
  295. }
  296. localData = localData.replace(/\r|\n/g, '').replace('data:image/jgp', 'data:image/jpeg')
  297. this.imgBase64 = localData;
  298. //显示裁剪图片
  299. //_this.showCropper(field);
  300. this.uploadpic();
  301. }).catch(error => {
  302. mui.toast(error);
  303. })
  304. },
  305. //上传图片
  306. uploadpic() {
  307. this.isLoading = true;
  308. WxJsApi.uploadPic(this.imgBase64).then(response => {
  309. this.isLoading = false;
  310. this.report.pictures.push(response);
  311. }).catch(error => {
  312. this.isLoading = false;
  313. mui.toast(error);
  314. })
  315. },
  316. selectHealthStatusVaccination() {
  317. var picker = new mui.PopPicker();
  318. picker.setData(this.healthStatusListVaccination);
  319. picker.show((selectItems) => {
  320. this.report.vaccinationStatusN = selectItems[0].text;
  321. this.report.vaccinationStatus = selectItems[0].value;
  322. });
  323. },
  324. selectHealthStatus() {
  325. var picker = new mui.PopPicker();
  326. picker.setData(this.healthStatusList);
  327. picker.show((selectItems) => {
  328. this.report.healthStatusN = selectItems[0].text;
  329. this.report.healthStatus = selectItems[0].value;
  330. });
  331. },
  332. selectFamilyHealthStatus() {
  333. var picker = new mui.PopPicker();
  334. picker.setData(this.healthStatusList);
  335. picker.show((selectItems) => {
  336. this.report.familyStatusN = selectItems[0].text;
  337. this.report.familyStatus = selectItems[0].value;
  338. });
  339. },
  340. uploadPicture(event) {
  341. if (this.report.pictures.length >= 3) {
  342. mui.toast("只能上传3张家庭成员健康码");
  343. return;
  344. }
  345. var fileData = event.target.files[0];
  346. this.isLoading = true;
  347. API_Health.uploadPicture(fileData).then(data => {
  348. this.report.pictures.push(data);
  349. this.isLoading = false;
  350. }).catch(error => {
  351. this.isLoading = false;
  352. mui.toast(error);
  353. })
  354. },
  355. fatherMethod(idCard) {
  356. this.student.idCard = idCard
  357. },
  358. selectGoto() {
  359. var picker = new mui.PopPicker();
  360. picker.setData([{
  361. text: "是",
  362. value: true
  363. },
  364. {
  365. text: "否",
  366. value: false
  367. }
  368. ]);
  369. picker.show((selectItems) => {
  370. this.report.isGoto = selectItems[0].value;
  371. });
  372. },
  373. selectHealth() {
  374. var picker = new mui.PopPicker();
  375. picker.setData(this.healthCodeList);
  376. picker.show((selectItems) => {
  377. this.report.healthCode = selectItems[0].value;
  378. this.report.healthCodeN = selectItems[0].text;
  379. });
  380. },
  381. selectTouch() {
  382. var picker = new mui.PopPicker();
  383. picker.setData([{
  384. text: "是",
  385. value: true
  386. },
  387. {
  388. text: "否",
  389. value: false
  390. }
  391. ]);
  392. picker.show((selectItems) => {
  393. this.report.isTouch = selectItems[0].value;
  394. });
  395. },
  396. sendReport() {
  397. this.isLoading = true;
  398. API_Health.save({
  399. ...this.report,
  400. personId: this.student.id,
  401. familyGreenCode: this.report.pictures.join(",")
  402. }).then(data => {
  403. mui.toast("已提交");
  404. this.send = true;
  405. this.isLoading = false;
  406. if(this.student.url&&this.student.url!='#'&&this.student.url!=''){
  407. setTimeout(()=>{
  408. window.location=this.student.url;
  409. }, 2000);
  410. }
  411. }).catch(error => {
  412. this.isLoading = false;
  413. mui.toast(error);
  414. })
  415. },
  416. noSubmitReport() {
  417. this.curDateIsUpload = false;
  418. },
  419. submitReport() {
  420. if(!this.student.id){
  421. mui.toast("页面加载失败!");
  422. return;
  423. }
  424. if (process.env.VUE_APP_NODE_NAME != 'devlopment') {
  425. if (this.report.address=='定位中……'||this.report.address=='无法获取定位') {
  426. mui.alert("定位失败,请检查手机权限后,点击<span class=\"mui-icon mui-icon-location\" style=\"color: #096DD9;font-size: 16px;\"></span>蓝色定位图标重新获取位置信息!");
  427. return;
  428. }
  429. }
  430. // if (this.report.healthStatus.length == 0) {
  431. // mui.toast("请选择自身健康情况!");
  432. // return;
  433. // }
  434. // if (this.report.vaccinationStatus.length == 0) {
  435. // mui.toast("请选择疫苗接种情况!");
  436. // return;
  437. // }
  438. if (!this.report.healthCodeN||this.report.healthCodeN=='请选择') {
  439. mui.toast("请选择健康码颜色!");
  440. return;
  441. }
  442. // if (this.report.familyStatus.length == 0) {
  443. // mui.toast("请选择家庭成员身体健康情况!");
  444. // return;
  445. // }
  446. if (!this.report.healthStatusN||this.report.healthStatusN=='请选择') {
  447. mui.toast("请选择自身健康情况!");
  448. return;
  449. }
  450. if (!this.report.vaccinationStatusN||this.report.vaccinationStatusN=='请选择') {
  451. mui.toast("请选择疫苗接种情况!");
  452. return;
  453. }
  454. if (!this.report.familyStatusN||this.report.familyStatusN=='请选择') {
  455. mui.toast("请选择家庭成员身体健康情况!");
  456. return;
  457. }
  458. if (!this.report.temperature) {
  459. mui.toast('请输入体温度数');
  460. return;
  461. }
  462. var reg = new RegExp("^((3\\d)|(3\\d\\.\\d|40|40.0))$");
  463. if (!reg.test(this.report.temperature)) {
  464. mui.toast('请输入正确的数字[30.0-40.0]');
  465. return;
  466. }
  467. if (this.report.isGoto == "true" || this.report.isGoto == true) {
  468. this.report.isGoto = true;
  469. } else {
  470. this.report.isGoto = false;
  471. }
  472. if (this.report.isTouch == "true" || this.report.isTouch == true) {
  473. this.report.isTouch = true;
  474. } else {
  475. this.report.isTouch = false;
  476. }
  477. // if (this.report.pictures.length == 0) {
  478. // mui.toast("请上传家庭成员健康码!");
  479. // return;
  480. // }
  481. this.curDateIsUpload = true;
  482. if (this.report.temperature > this.max) {
  483. // mui.alert("提交温度大于等于<span style='color: red'>37.2°</span><br/>需要点击下方【确认提交】<br/>确认后不能修改!");
  484. // mui.alert("提交温度大于等于<span style='color: red'>37.2°</span><br/><ul><li>1、过高体温将会上报至平台管理人员</li><li>2、过高体温将会上报至学校领导</li></ul><br/>需要点击下方【确认提交】<br/>确认后不能修改!");
  485. mui.alert("提交体温<span style='color: red'>" + this.report.temperature +
  486. "℃</span>为异常体温,系统会将异常数据通报公司相关负责人。<br>如体温属实请点击下方【确认提交】按钮,确认后无法修改!");
  487. } else {
  488. mui.alert("需要点击下方【确认提交】<br/>确认后不能修改!");
  489. }
  490. //mui.alert("需要点击下方确认提交,确认后不能修改!");
  491. },
  492. getInfo() {
  493. this.isLoading = true;
  494. API_Health.curDateIsUpload().then(data => {
  495. this.curDateIsUpload = data;
  496. this.send = data;
  497. if (data) {
  498. API_Health.getDetail(this.id, '1').then(response => {
  499. this.isLoading = false;
  500. this.student = response;
  501. if (response.personHealthLedger != null) {
  502. this.report.vaccinationStatusN = response.personHealthLedger.vaccinationStatusN;
  503. if(response.personHealthLedger.healthCode){
  504. this.report.healthCodeN = this.healthCodeObj[response.personHealthLedger.healthCode];
  505. }
  506. this.report.healthStatusN = response.personHealthLedger.healthStatusN;
  507. this.report.healthRemark = response.personHealthLedger.healthRemark;
  508. this.report.familyStatusN = response.personHealthLedger.familyStatusN;
  509. this.report.isGoto = response.personHealthLedger.isGoto;
  510. this.report.isTouch = response.personHealthLedger.isTouch;
  511. this.report.pictures = response.personHealthLedger.familyGreenCode.split(',');
  512. this.report.temperature = response.personHealthLedger.temperature;
  513. this.address=response.personHealthLedger.address;
  514. }
  515. }).catch(error => {
  516. this.isLoading = false;
  517. mui.toast(error);
  518. })
  519. } else {
  520. this.getPoint();
  521. API_Health.getPersonInfo('1').then(response => {
  522. this.isLoading = false;
  523. this.student = response;
  524. if (response.personHealthLedger != null) {
  525. this.report.healthRemark = response.personHealthLedger.healthRemark;
  526. //this.report.temperature=response.personHealthLedger.temperature;
  527. this.report.healthStatusN = response.personHealthLedger.healthStatusN;
  528. this.report.familyStatusN = response.personHealthLedger.familyStatusN;
  529. this.report.vaccinationStatusN = response.personHealthLedger.vaccinationStatusN;
  530. this.report.vaccinationStatus = response.personHealthLedger.vaccinationStatus;
  531. this.report.healthCode = response.personHealthLedger.healthCode;
  532. if(response.personHealthLedger.healthCode){
  533. this.report.healthCodeN = this.healthCodeObj[response.personHealthLedger.healthCode];
  534. }
  535. this.report.healthStatus = response.personHealthLedger.healthStatus;
  536. this.report.familyStatus = response.personHealthLedger.familyStatus;
  537. this.report.isGoto = response.personHealthLedger.isGoto;
  538. this.report.isTouch = response.personHealthLedger.isTouch;
  539. //this.report.pictures=response.personHealthLedger.familyGreenCode.split(',');
  540. }
  541. this.id = response.id;
  542. }).catch(error => {
  543. this.isLoading = false;
  544. mui.toast(error);
  545. })
  546. }
  547. }).catch(error => {
  548. this.isLoading = false;
  549. mui.toast(error);
  550. })
  551. },
  552. getStatus() {
  553. API_Health.getHealthStatusList("健康情况").then(data => {
  554. var arr = data.map(item => {
  555. return {
  556. value: item.value,
  557. text: item.name
  558. };
  559. });
  560. this.healthStatusList = arr
  561. }).catch(error => {
  562. //this.isLoading = false;
  563. mui.toast(error);
  564. })
  565. API_Health.getHealthStatusList("疫苗接种情况").then(data => {
  566. var arr = data.map(item => {
  567. return {
  568. value: item.value,
  569. text: item.name
  570. };
  571. });
  572. this.healthStatusListVaccination = arr
  573. }).catch(error => {
  574. //this.isLoading = false;
  575. mui.toast(error);
  576. })
  577. },
  578. //获取详情
  579. getDetail() {
  580. this.isLoading = true;
  581. API_Health.getDetail(this.id, '3').then(response => {
  582. this.isLoading = false;
  583. this.detail = response;
  584. }).catch(error => {
  585. this.isLoading = false;
  586. mui.toast(error);
  587. })
  588. },
  589. asynCallBack() {},
  590. },
  591. mounted() {
  592. WxJsApi.getWxConfig(['chooseImage', 'getLocalImgData', 'getLocation']);
  593. //获取经纬度
  594. this.getStatus();
  595. this.getInfo();
  596. },
  597. destroyed() {
  598. },
  599. computed: {
  600. ...mapGetters({
  601. openId: 'wx_openid',
  602. token: 'token',
  603. person_data: 'person_data',
  604. person_popedom: 'person_popedom',
  605. })
  606. }
  607. }
  608. </script>
  609. <style src="$project/assets/css/mui.picker.min.css"></style>
  610. <style scoped src="$project/assets/css/xpwyfyy.css"></style>
  611. <style src="$project/assets/css/iconfont.css"></style>
  612. <style scoped>
  613. .fyy-popup-button {
  614. display: flex;
  615. padding: 10px
  616. }
  617. .fyy-popup-button .mui-col-xs-6 {
  618. padding: 0 5px
  619. }
  620. .fyy-popup-button button {
  621. width: 100%
  622. }
  623. </style>