satisfactionHome.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <view class="list">
  5. <view class="item" v-for="(item,index) in list" :key="index" @click="itemClick(item)">
  6. <image class="item_img" :src="iconUrl.home_back"></image>
  7. <view class="item_val">{{item.SubjectTitle}}</view>
  8. </view>
  9. <view v-if="list.length == 0" class="noData">
  10. <noData value="暂无数据"></noData>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script lang="ts" setup>
  17. import { reactive, ref } from 'vue';
  18. import { useOnLoad } from '@/hook';
  19. import { useDomain } from '@kasite/uni-app-base';
  20. import { mapGetters } from '@kasite/uni-app-base/store/hook';
  21. import {
  22. QuerySubjectListToChannelTask_V3
  23. } from '../../service';
  24. import icon from '@/utils/icon';
  25. import { common, throttle } from '@/utils';
  26. import fn from './fn';
  27. const app = getApp();
  28. const list = ref([])
  29. const iconUrl = ref(icon)
  30. const objType = ref("")
  31. const cardNo = ref("")
  32. const cardType = ref("")
  33. const type = ref("")
  34. useOnLoad((options) => {
  35. console.log("options===",options,app.globalData)
  36. main(options);
  37. });
  38. const main = async (options) => {
  39. let queryData = {
  40. OrgId: app.globalData.hosId,
  41. State: 1,
  42. SubjectWay: 'smallpro',
  43. // 1=面向所有患者、2=面向医院职工、3=面向门诊患者、4=面向住院患者、5=面向体检患者
  44. GroupType: options.objType || "3"
  45. }
  46. let resp = await QuerySubjectListToChannelTask_V3(queryData);
  47. if(!common.isEmpty(resp)) {
  48. objType.value = options.objType || '3'
  49. list.value = resp || []
  50. cardNo.value = options.cardNo
  51. cardType.value = options.cardType
  52. type.value = options.type
  53. }
  54. };
  55. /**
  56. * 满意度点击
  57. */
  58. const itemClick = (item) => {
  59. common.goToUrl(`/pagesAdmin/satisfaction/business/satisfactionQuestions/satisfactionQuestions?subjectId=${item.SubjectId}&taskId=${item.TaskId}&cardNo=${cardNo.value}&cardType=${cardType.value}&type=${type.value}`)
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .list {
  64. padding: 30upx;
  65. }
  66. .item {
  67. margin-bottom: 30upx;
  68. background: rgba(255, 255, 255, 1);
  69. border-radius: 20upx;
  70. overflow: hidden;
  71. }
  72. .item_img {
  73. width: 100%;
  74. height: 340upx;
  75. }
  76. .item_val {
  77. font-size: 32upx;
  78. font-family: Source Han Sans CN;
  79. font-weight: 500;
  80. color: rgba(0, 0, 0, 1);
  81. height: 100upx;
  82. display: flex;
  83. align-items: center;
  84. padding: 0 30upx;
  85. line-height: 1.4em;
  86. }
  87. </style>