prodb_specialtylist1.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <div class="prodb_specialtylist1" v-loading="loading">
  3. <head-component :headinfo=headinfo ref="headinfoRef"></head-component>
  4. <div class="page-content">
  5. <div class="content">
  6. <div class="result-box">
  7. <div class="two-page-result">
  8. <div v-for="(item,index) in data_rows"
  9. :class="[item.selected?'item-result-box-active':'item-result-box']"
  10. @click="toSpecialty2(item)">
  11. <div v-html="item.name"></div>
  12. </div>
  13. </div>
  14. </div>
  15. <div class="pagination">
  16. <!-- <pagination v-show="total > 0" size="large" :total="total" v-model:page="queryParams.pageNum"-->
  17. <!-- v-model:limit="queryParams.pageSize" @pagination="list1"/>-->
  18. <!-- <el-pagination-->
  19. <!-- size="small"-->
  20. <!-- background-->
  21. <!-- layout="prev, pager, next"-->
  22. <!-- :total="total"-->
  23. <!-- v-model:page="queryParams.pageNum"-->
  24. <!-- v-model:limit="queryParams.pageSize"-->
  25. <!-- @pagination="list1"-->
  26. <!-- class="mt-4"-->
  27. <!-- />-->
  28. </div>
  29. </div>
  30. </div>
  31. <drag_component></drag_component>
  32. </div>
  33. </template>
  34. <script setup>
  35. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  36. import Drag_component from "@/views/xjc-integratedmachine/components/drag_component.vue";
  37. import {specialtyList1} from '@/api/xjc-integratedmachine/environment/specialty.js'
  38. import {ref} from "vue";
  39. const router = useRouter()
  40. const route = useRoute()
  41. const total = ref(0)
  42. const param = route.query
  43. const data_rows = ref([])
  44. const headinfo = ref({})
  45. const headinfoRef = ref(null);
  46. const loading= ref(false)
  47. function setHeadinfo() {
  48. headinfo.value = {
  49. title: '专业类',
  50. user: {
  51. avatar: '头像路径',
  52. nickName: '张三'
  53. },
  54. backUrl: '/xjc-integratedmachine/environment/index',
  55. homeUrl: '/xjc-integratedmachine/environment/index',
  56. contrast:true,
  57. contrastType:2
  58. }
  59. }
  60. onMounted(() => {
  61. setHeadinfo()
  62. setTimeout(() => {
  63. if (headinfoRef.value) {
  64. headinfoRef.value.getCompareSizeData(2); // 调用子组件的 sayHello 函数
  65. }
  66. }, 500)
  67. })
  68. const queryParams = ref({
  69. pageNum: 1,
  70. pageSize: 10,
  71. oldid: param.oldid
  72. })
  73. function list1() {
  74. loading.value = true;
  75. specialtyList1(queryParams.value).then(resp => {
  76. data_rows.value = resp.data.rows
  77. total.value = resp.data.total
  78. loading.value = false;
  79. })
  80. if (headinfoRef.value) {
  81. headinfoRef.value.getCompareSizeData(2); // 调用子组件的 sayHello 函数
  82. }
  83. }
  84. function toSpecialty2(item) {
  85. router.push({
  86. path: '/xjc-integratedmachine/environment/prodb_specialtylist2',
  87. query: {
  88. oldid: item.oldid
  89. }
  90. })
  91. }
  92. list1()
  93. </script>
  94. <style scoped lang="scss">
  95. div,p{
  96. margin: 0;
  97. padding: 0;
  98. }
  99. .prodb_specialtylist1 {
  100. background: url('@/assets/images/login/login-home-background.png') no-repeat;
  101. background-size: 1920px 1080px;
  102. z-index: 10;
  103. width: 100%;
  104. height: 1080px;
  105. .page-content {
  106. width: 100%;
  107. position: absolute;
  108. top: 100px;
  109. bottom: 0;
  110. display: flex;
  111. justify-content: center;
  112. .content{
  113. width: 1832px;
  114. height: 922px;
  115. background: #FFFFFF;
  116. border-radius: 35px 35px 35px 35px;
  117. margin-top:13px;
  118. .pagination{
  119. //border: 1px solid;
  120. display: flex;
  121. justify-content: center;
  122. margin-top: 30px;
  123. font-size: 32px;
  124. }
  125. }
  126. .result-box {
  127. width: 100%;
  128. height: 830px;
  129. overflow: auto;
  130. .two-page-result {
  131. display: flex;
  132. flex-wrap: wrap;
  133. //justify-content: space-between;
  134. align-items: center;
  135. .item-result-box-active {
  136. min-width: 320px;
  137. height: 92px;
  138. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  139. box-shadow: inset 0px -2px 7px 0px #1E410E;
  140. border-radius: 5px 5px 5px 5px;
  141. border: 1px solid #A2F57F;
  142. font-weight: 400;
  143. font-size: 30px;
  144. color: #0DE6A1;
  145. line-height: 90px;
  146. text-align: center;
  147. margin-left: 50px;
  148. margin-right: 50px;
  149. margin-top: 32px;
  150. padding-left: 20px;
  151. padding-right: 20px;
  152. }
  153. .item-result-box {
  154. min-width: 320px;
  155. height: 92px;
  156. background: #E0EEF4;
  157. border-radius: 5px 5px 5px 5px;
  158. font-weight: 400;
  159. font-size: 30px;
  160. color: #000000;
  161. line-height: 90px;
  162. text-align: center;
  163. margin-left: 50px;
  164. margin-right: 50px;
  165. margin-top: 32px;
  166. padding-left: 20px;
  167. padding-right: 20px;
  168. }
  169. .item-result-box:hover {
  170. min-width: 320px;
  171. height: 92px;
  172. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  173. box-shadow: inset 0px -2px 7px 0px #1E410E;
  174. border-radius: 5px 5px 5px 5px;
  175. border: 1px solid #A2F57F;
  176. font-weight: 400;
  177. font-size: 30px;
  178. color: #000000;
  179. line-height: 90px;
  180. text-align: center;
  181. margin-left: 50px;
  182. margin-top: 32px;
  183. padding-left: 20px;
  184. padding-right: 20px;
  185. }
  186. }
  187. }
  188. }
  189. }
  190. </style>