photo_show.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. var httpData=GetRequest(),
  2. doctorInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
  3. function showSuccessMessage(msg) {
  4. layer.msg(msg, {
  5. icon: 1
  6. })
  7. }
  8. function showErrorMessage(msg) {
  9. layer.msg(msg, {
  10. icon: 5
  11. })
  12. }
  13. function showWarningMessage(msg) {
  14. layer.msg(msg, {
  15. icon: 2
  16. })
  17. }
  18. function showInfoMessage(msg) {
  19. layer.msg(msg, {
  20. icon: 6
  21. })
  22. }
  23. parent.$("#layui-layer" + parent.photoLayerIndex + " .layui-layer-setwin").addClass("set-close-btn")
  24. new Vue({
  25. el: "#app",
  26. data: {
  27. photoList: null,
  28. curryIndex: 0
  29. },
  30. mounted: function() {
  31. this.findPatientCertificateByType();
  32. },
  33. methods: {
  34. findPatientCertificateByType: function() {
  35. var vm = this,
  36. loadding = layer.load(0, {shade: false}),
  37. params = {
  38. patient: httpData.patientCode,
  39. type: httpData.serverType
  40. }
  41. signAPI.findPatientCertificateByType(params).then(function(res) {
  42. layer.close(loadding)
  43. if(res.status == 200) {
  44. vm.photoList = res.data
  45. } else {
  46. showErrorMessage(res.msg);
  47. }
  48. })
  49. },
  50. changeCurryIndex: function(index) {
  51. this.curryIndex = index
  52. },
  53. setImg: function(str) {
  54. return httpRequest.getImgUrl(str);
  55. },
  56. }
  57. })