index.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <div class="home-styles-box">
  3. <div class="hc-home-input-box">
  4. <div class="hc-home-content">
  5. <div class="hc-slogan-icon">
  6. <img class="logo" :src="ImgText3" alt="">
  7. </div>
  8. <SearchInput v-model="searchKey" placeholder="请输入您想查找的内容" @input="SearchKeyInput" />
  9. <div class="home-link-box">
  10. <span>他们都在搜索:</span>
  11. <div class="home-link">
  12. <router-link to="/data-fill/wbs">资料填报</router-link>
  13. </div>
  14. <div class="home-link">
  15. <router-link to="/data-fill/query">资料查询</router-link>
  16. </div>
  17. <div class="home-link">
  18. <router-link to="/ledger/query">日志填报</router-link>
  19. </div>
  20. <div class="home-link">
  21. <router-link to="/schedule/data">资料进度</router-link>
  22. </div>
  23. </div>
  24. <!-- <el-button type="danger" @click="delClick">删除提醒</el-button>
  25. <el-button type="warning" @click="abnormalClick">异常提醒</el-button> -->
  26. </div>
  27. </div>
  28. </div>
  29. </template>
  30. <script setup>
  31. import { ref, watch } from 'vue'
  32. import { useAppStore } from '~src/store'
  33. import SearchInput from '~com/home/SearchInput.vue'
  34. import { apiErrorMessage, delMessageV2 } from '~com/message/index.js'
  35. import ImgText3 from '~src/assets/view/text-3.png'
  36. //变量
  37. const useAppState = useAppStore()
  38. const HomeTheme = ref(useAppState.getHomeTheme)
  39. //监听
  40. watch(() => [
  41. useAppState.getHomeTheme,
  42. ], ([theme]) => {
  43. HomeTheme.value = theme
  44. })
  45. //搜索
  46. const searchKey = ref('')
  47. const SearchKeyInput = (value) => {
  48. searchKey.value = value
  49. }
  50. //删除提醒
  51. const delClick = () => {
  52. delMessageV2((action, instance, done) => {
  53. if (action === 'confirm') {
  54. instance.confirmButtonLoading = true
  55. instance.confirmButtonText = 'Loading...'
  56. setTimeout(() => {
  57. done()
  58. setTimeout(() => {
  59. instance.confirmButtonLoading = false
  60. }, 300)
  61. }, 3000)
  62. } else {
  63. done()
  64. }
  65. })
  66. }
  67. //删除提醒
  68. const abnormalClick = () => {
  69. apiErrorMessage()
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. @import "../../styles/view/home.scss";
  74. </style>
  75. <style lang="scss">
  76. .home-link a {
  77. color: inherit;
  78. text-decoration: none;
  79. }
  80. </style>