EmpowerInfo.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <a-modal v-model:visible="show" :width="900" @cancel="() => show = false" :title="props.title" :footer="null">
  3. <ul class="info">
  4. <li>
  5. <span>审核结果:{{ info?.shzt }}</span><span>审核意见:{{ shyjInfo }}</span>
  6. </li>
  7. <li>
  8. <p>访问地址:{{ info?.resInfo?.MAPINGURL }}</p>
  9. </li>
  10. </ul>
  11. </a-modal>
  12. </template>
  13. <script>
  14. import { defineComponent, reactive, ref, onMounted, watch, toRefs } from 'vue';
  15. import { message } from 'ant-design-vue';
  16. import { session } from '/@/utils/Memory';
  17. import moment from 'moment';
  18. import { setHtmlImg } from '/@/views/minWidgets/CommonWay.js';
  19. import { getResInCar, getResViewInfo, queryServiceTags } from '/@/api/resource/plat';
  20. import { getAllTags } from '/@/api/sys/tag';
  21. export default defineComponent({
  22. name: 'EmpowerInfo',
  23. components: {},
  24. props: {
  25. title: {
  26. type: String,
  27. default: '资源申请信息'
  28. }
  29. },
  30. setup(props, { emit }) {
  31. const show = ref(false);
  32. const info = ref({});
  33. const shyjInfo = ref("");
  34. function showInfo(e) {
  35. show.value = !show.value;
  36. if (e) getInfo(e);
  37. }
  38. function getInfo(e) {
  39. console.log("1111:", e);
  40. getResInCar({
  41. keyword: e.SERVICENAME,
  42. userId: session.getItem('userId')
  43. }).then(r => {
  44. if (r?.resp_code == 0 && r?.datas?.length) {
  45. var a = r.datas.find(i => i.resInfo.SERVICEID == e.SERVICEID);
  46. if (a) {
  47. // var shyj = [];
  48. // if (a?.shlc?.length > 1) {
  49. // a.shlc.map((i, index) => {
  50. // if (index != 0 && index != a.shlc.length - 1) {
  51. // shyj.push(i.USER_NAME + ":" + i.CHECKINFO)
  52. // }
  53. // })
  54. // }
  55. var shyj = a?.shlc?.slice(1, -1).map(i => i.USER_NAME + ":" + i.CHECKINFO) || [];
  56. shyjInfo.value = shyj.join(";");
  57. info.value = a;
  58. }
  59. }
  60. })
  61. }
  62. return {
  63. shyjInfo,
  64. info,
  65. showInfo,
  66. show,
  67. props,
  68. };
  69. },
  70. });
  71. </script>
  72. <style lang="less">
  73. .info {
  74. padding: 20px;
  75. }
  76. .info li span {
  77. display: inline-block;
  78. width: 50%;
  79. }
  80. .info li {
  81. margin-bottom: 20px;
  82. }
  83. </style>