index.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <div class="info">
  3. <div class="infodetail">
  4. <div class="title">基本信息</div>
  5. <div class="list" v-if="overviewInfo">
  6. <div class="list_item" v-for="item in refundSchema" :key="item.field">
  7. <div class="lable">{{item.label}}</div>
  8. <div class="value">
  9. <Icon icon="icon-park-outline:vip-one" :style="`color:${overviewInfo[item.field] == 1?'#d3d334':''}`" v-if="item.field == 'vip'" />
  10. <span v-else>{{overviewInfo[item.field]}}</span>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. <a-divider />
  16. <div class="infodetail">
  17. <div class="title">硬件产品</div>
  18. <div class="list">
  19. <div class="list_item">
  20. <div class="lable">相机数量</div>
  21. <div class="value">
  22. <div class="text">{{overviewInfo.cameraCount}}台</div>
  23. <Button type="primary" size="small" v-if="getCheckPerm('account-cameraDetails')" @click="openCaremModal(true)"> 查看详情 </Button>
  24. </div>
  25. </div>
  26. <div class="list_item">
  27. <div class="lable">场景数量</div>
  28. <div class="value">
  29. <div class="text">{{overviewInfo.sceneNum}}个</div>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <a-divider />
  35. <div class="infodetail">
  36. <div class="title">软件服务</div>
  37. <div class="list" v-if="overviewInfo">
  38. <div class="list_item">
  39. <div class="lable">四维看看</div>
  40. <div class="value">
  41. <div class="text">专业会员 {{overviewInfo.incrementCount}}个</div>
  42. <Button type="primary" v-if="getCheckPerm('account-equityDetails')" size="small" @click="openInteresModal(true,{})"> 权益详情 </Button>
  43. <Button type="primary" v-if="getCheckPerm('increment-add')" size="small" @click="handleAddEquity('equity')"> 新增权益 </Button>
  44. </div>
  45. </div>
  46. <div class="list_item">
  47. <div class="lable"></div>
  48. <div class="value">
  49. <div class="text">下载次数 {{overviewInfo.surDownNum}}次</div>
  50. <Button type="primary" size="small" v-if="getCheckPerm('download-add')" @click="handleaddDown('0')"> 新增下载 </Button>
  51. </div>
  52. </div>
  53. <div class="list_item">
  54. <div class="lable">四维深时</div>
  55. <div class="value">
  56. <div class="text">下载次数 {{overviewInfo.surSSDownNum}}次</div>
  57. <Button type="primary" size="small" v-if="getCheckPerm('download-add')" @click="handleaddDown('1')"> 新增下载 </Button>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <a-divider />
  63. <AddModal @register="registerAddModal" />
  64. <AddDownModal @register="registerAddDowmModal" />
  65. <interesModal @register="registerInteres" />
  66. <caremModal @register="registerCarem" />
  67. </div>
  68. </template>
  69. <script lang="ts">
  70. import { defineComponent, computed } from 'vue';
  71. import { Description } from '/@/components/Description/index';
  72. import { BasicTable } from '/@/components/Table';
  73. import { PageWrapper } from '/@/components/Page';
  74. import { Icon } from '/@/components/Icon';
  75. import { Divider, Button } from 'ant-design-vue';
  76. import { otherInfoStore } from '/@/store/modules/other';
  77. import AddModal from './AddModal.vue';
  78. import AddDownModal from './AddDownModal.vue';
  79. import caremModal from './caremModal.vue';
  80. import interesModal from './interesModal.vue';
  81. import { useModal } from '/@/components/Modal';
  82. import { usePermissionStore } from '/@/store/modules/permission';
  83. import {
  84. refundSchema,
  85. refundData,
  86. personSchema,
  87. personData,
  88. } from './data';
  89. export default defineComponent({
  90. components: { Icon, Button,interesModal, Description, AddModal, AddDownModal, caremModal, BasicTable, PageWrapper, [Divider.name]: Divider },
  91. setup() {
  92. const otherInfo = otherInfoStore();
  93. const [registerAddModal, { openModal: openAddModal }] = useModal();
  94. const [registerAddDowmModal, { openModal: openAddDowmModal }] = useModal();
  95. const [registerInteres, { openModal: openInteresModal }] = useModal();
  96. const [registerCarem, { openModal: openCaremModal }] = useModal();
  97. const overviewInfo = computed(() => otherInfo.getOverviewInfo);
  98. const permissionStore = usePermissionStore();
  99. const { getCheckPerm } = permissionStore;
  100. function handleaddDown(type: string) {
  101. openAddDowmModal(true, {
  102. ...overviewInfo.value,
  103. type: type,
  104. });
  105. }
  106. function handleAddEquity(type: string) {
  107. console.log('type', type);
  108. if(type == 'down'){
  109. openAddDowmModal(true, {
  110. ...overviewInfo.value,
  111. type,
  112. });
  113. }else{
  114. openAddModal(true, {
  115. type,
  116. userId:overviewInfo.value.id,
  117. });
  118. }
  119. }
  120. function handleSetEquity(){
  121. openInteresModal(true, {
  122. ...overviewInfo.value,
  123. });
  124. }
  125. return {
  126. registerAddModal,
  127. registerInteres,
  128. registerAddDowmModal,
  129. registerCarem,
  130. openAddModal,
  131. openInteresModal,
  132. openCaremModal,
  133. refundSchema,
  134. refundData,
  135. personSchema,
  136. personData,
  137. overviewInfo,
  138. handleAddEquity,
  139. handleaddDown,
  140. handleSetEquity,
  141. getCheckPerm,
  142. };
  143. },
  144. });
  145. </script>
  146. <style lang="less" scoped>
  147. .info{
  148. margin: 16px;
  149. background-color: #fff;
  150. padding: 12px 10px 6px;
  151. .title{
  152. min-height: 48px;
  153. margin-bottom: -1px;
  154. padding: 0 24px;
  155. color: #000000d9;
  156. font-weight: 500;
  157. font-size: 16px;
  158. background: transparent;
  159. border-bottom: 1px solid #f0f0f0;
  160. border-radius: 2px 2px 0 0;
  161. }
  162. .list{
  163. padding: 0 24px;
  164. .list_item{
  165. display: flex;
  166. padding-top: 12px;
  167. .lable{
  168. width: 100px;
  169. text-align: right;
  170. margin-right: 20px;
  171. }
  172. .value{
  173. .ant-btn{
  174. margin-right: 30px;
  175. }
  176. .text{
  177. width: 130px;
  178. display: inline-block;
  179. }
  180. }
  181. }
  182. }
  183. }
  184. .desc-wrap {
  185. padding: 16px;
  186. background-color: @component-background;
  187. }
  188. </style>