Category.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view>
  3. <view class="certification-card serve-main ">
  4. <view class="serve-box flex_c_s" @click="viewStatus && goModifyIt()">
  5. <view class="font-32-1D">服务类目</view>
  6. <view class="flex_c_r" v-if="viewStatus">
  7. <view class="font-32-05">{{ project ? project.businessTierName:'选择' }}</view>
  8. <up-icon name="arrow-right" color="#C9CDD4" size="16"></up-icon>
  9. </view>
  10. <view class="font-32-05" v-else>{{ project.businessTierName }}</view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script setup>
  16. import { inject } from 'vue';
  17. import { computed } from 'vue';
  18. const formData = inject('formData');
  19. const viewStatus = inject('viewStatus');
  20. const project = computed(() => formData.project);
  21. console.log("TCL: project=============", project)
  22. const goModifyIt = async() => {
  23. try {
  24. uni.navigateTo({
  25. url: `/pages_home/pages/serviceManagement/Class?data=${encodeURIComponent(JSON.stringify(formData.activeProjects))}&value=${encodeURIComponent(JSON.stringify( project.value))}`
  26. });
  27. } catch (error) {
  28. console.log("TCL: goModifyIt -> error", error)
  29. }
  30. }
  31. const racioClick = (item) => {
  32. try {
  33. Object.assign(formData, { whether: item.value });
  34. } catch (error) {
  35. console.log("TCL: racioClick -> error", error)
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. @import "./index.scss";
  41. </style>