info.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <div>
  3. <el-row :gutter="20" class="detail">
  4. <el-col :xs="24" :lg="8" :sm="12">
  5. <label>名称:</label> <span>{{ info.name }}</span>
  6. </el-col>
  7. <el-col :xs="24" :lg="8" :sm="12">
  8. <label>地区:</label> <span>{{ [info.province, info.city, info.area].join(' / ') }}</span>
  9. </el-col>
  10. <el-col :span=24>
  11. <label>详细地址:</label> <span>{{ info.address }}</span>
  12. </el-col>
  13. <el-col :xs="24" :lg="8" :sm="12">
  14. <label>在校人数:</label> <span>{{ info.person_num }}</span>
  15. </el-col>
  16. <el-col :xs="24" :lg="8" :sm="12">
  17. <label>负责人:</label> <span>{{ info.bind_user_id }}</span>
  18. </el-col>
  19. <el-col :xs="24" :lg="8" :sm="12">
  20. <label>是否有饿了么校内站:</label> <span>{{ info.is_eleme_in_school ? '有' : '无'}}</span>
  21. </el-col>
  22. <el-col :xs="24" :lg="8" :sm="12">
  23. <label>是否有饿了么校外站:</label> <span>{{ info.is_eleme_out_school ? '有' : '无'}}</span>
  24. </el-col>
  25. <el-col :xs="24" :lg="8" :sm="12">
  26. <label>是否有美团校内站:</label> <span>{{ info.is_meituan_in_school ? '有' : '无'}}</span>
  27. </el-col>
  28. <el-col :xs="24" :lg="8" :sm="12">
  29. <label>是否有美团校外站:</label> <span>{{ info.is_meituan_out_school ? '有' : '无'}}</span>
  30. </el-col>
  31. <el-col :xs="24" :lg="8" :sm="12">
  32. <label>是否能上楼:</label> <span>{{ info.can_go_upstairs ? '不能' : '能'}}</span>
  33. </el-col>
  34. <el-col :xs="24" :lg="8" :sm="12">
  35. <label>是否合作:</label> <span>{{ info.is_cooperate ? '已合作' : '未合作'}}</span>
  36. </el-col>
  37. <el-col :xs="24" :lg="8" :sm="12">
  38. <label>是否允许骑电动车:</label> <span>{{ info.can_ride ? '不能' : '能'}}</span>
  39. </el-col>
  40. <el-col :span=24>
  41. <label>宿舍分布情况:</label> <span>{{ info.dormitory_distribution }}</span>
  42. </el-col>
  43. <el-col :span=24>
  44. <label>校门口取餐点离宿舍情况:</label> <span>{{ info.qucan_station_distribution }}</span>
  45. </el-col>
  46. <el-col :span=24>
  47. <label>校外商圈情况:</label> <span>{{ info.out_business_description }}</span>
  48. </el-col>
  49. <el-col :span=24>
  50. <label>备注:</label> <span>{{ info.memo }}</span>
  51. </el-col>
  52. <el-col v-auth="140200">
  53. <label>关系人:</label>
  54. <el-table border :data="info.relations || []" style="width: 100%; margin-top: 10px">
  55. <el-table-column prop="name" label="姓名" />
  56. <el-table-column prop="position" label="职位" />
  57. <el-table-column prop="phone" label="手机号" />
  58. <el-table-column prop="weixin" label="微信号" />
  59. </el-table>
  60. </el-col>
  61. </el-row>
  62. </div>
  63. </template>
  64. <script setup lang="ts">
  65. // 初始化表单数据
  66. import {schoolApi} from "@/api/schoolApi";
  67. import {onMounted} from "vue";
  68. import {companyApi} from "@/api/companyApi";
  69. const DefaultData = <Api.School.SchoolInfo>{
  70. id:0,
  71. province: '',
  72. city: '',
  73. area: '',
  74. name: '',
  75. distinct:[],
  76. address: '',
  77. person_num: '',
  78. bind_user_id: 0,
  79. is_eleme_in_school: 0,
  80. is_eleme_out_school: 0,
  81. is_meituan_in_school: 0,
  82. is_meituan_out_school: 0,
  83. can_go_upstairs: 0,
  84. is_cooperate: 0,
  85. can_ride: 0,
  86. dormitory_distribution: '',
  87. qucan_station_distribution: '',
  88. out_business_description: '',
  89. memo: '',
  90. create_date:'',
  91. update_date:'',
  92. bind_user_name: '',
  93. canteens:[],
  94. relations:[],
  95. }
  96. const info = reactive<Api.School.SchoolInfo>({ ...DefaultData })
  97. onMounted(() => {
  98. companyApi.info(parseInt(useRoute().query.id as string)).then((res) => {
  99. Object.assign(info, res)
  100. })
  101. })
  102. </script>
  103. <style scoped>
  104. .detail {
  105. padding-top: 20px;
  106. font-size: 14px;
  107. .el-col {
  108. margin-bottom: 30px;
  109. label {
  110. font-weight: bold;
  111. margin-right: 10px;
  112. }
  113. }
  114. }
  115. </style>