home.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="home" :style="homeBj">
  3. <view class="nav">
  4. <view class="navBox" @click="$goBack(2,'/pages/leadership/leadership')">
  5. <image src="../../static/images/ldgb.png" mode="" class="img"></image>
  6. <!-- <image src="file:///storage/emulated/0/QingTianGB/ceshi.png" mode="" class="img"></image> -->
  7. <text class="text">领导干部</text>
  8. </view>
  9. <view class="navBox" @click="$goBack(2,'/pages/quitLeadership/quitLeadership')">
  10. <image src="../../static/images/txldgb.png" mode="" class="img"></image>
  11. <text class="text">退出领导岗位</text>
  12. </view>
  13. <view class="navBox" @click="$goBack(2,'/pages/excellent/excellent')">
  14. <image src="../../static/images/yxnqgb.png" mode="" class="img"></image>
  15. <text class="text">优秀年轻干部</text>
  16. </view>
  17. </view>
  18. <view class="nav">
  19. <view class="navBox" @click="$goBack(2,'/pages/shareholder/shareholder')">
  20. <image src="../../static/images/gjgb.png" mode="" class="img"></image>
  21. <text class="text">股级干部</text>
  22. </view>
  23. <view class="navBox" @click="$goBack(2,'/pages/search/search')">
  24. <image src="../../static/images/zhcx.png" mode="" class="img"></image>
  25. <text class="text">综合查询</text>
  26. </view>
  27. <view class="navBox" @click="$goBack(2,'/pages/analyse/analyse')">
  28. <image src="../../static/images/znfx.png" mode="" class="img"></image>
  29. <text class="text">智能分析</text>
  30. </view>
  31. </view>
  32. <!-- <view class="" style="width: 800px;height: 400px;position: relative;top: 0;left: 0;">
  33. <video-Vue :src="videoSrc"></video-Vue>
  34. </view> -->
  35. <view class="setting-up">
  36. <uni-icons type="gear-filled" size="20" @click="$goBack(2,'/pages/settingUp/settingUp')"></uni-icons>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. // import videoVue from "@/components/myVideo/myVideo.vue"
  42. import sqlLite from '../../utils/sqllite-utils.js';
  43. import {
  44. dateFormat1
  45. } from "../../utils/index.js"
  46. export default {
  47. components: {
  48. // videoVue
  49. },
  50. data() {
  51. return {
  52. homeBj: {
  53. background: "url('../../static/imgs/qq.png') no-repeat",
  54. backgroundSize: "100% 100%"
  55. },
  56. // videoSrc: '@/static/aaaa.mp4'
  57. };
  58. },
  59. methods: {
  60. // 开启数据库
  61. openSqllite() {
  62. if (sqlLite.isOpen()) {} else {
  63. // 开启数据库
  64. sqlLite.openSqllite()
  65. .then((e) => {
  66. console.log('开启数据库成功');
  67. sqlLite.selectFromTable(
  68. 'select * from Biz_Time'
  69. ).then((res) => {
  70. })
  71. .catch((e) => {
  72. console.log("查询失败");
  73. sqlLite.createTable('Biz_Time', 'time').then(res1 => {
  74. let time = dateFormat1()
  75. console.log(time);
  76. sqlLite.insertTableData('Biz_Time', time, 'time').then(res2 => {
  77. console.log("添加数据成功");
  78. }).catch(err2 => {
  79. console.log("添加数据失败");
  80. })
  81. }).catch(err1 => {
  82. console.log('添加表失败');
  83. })
  84. })
  85. })
  86. .catch((e) => {
  87. console.log('开启数据库失败');
  88. })
  89. }
  90. },
  91. },
  92. created() {
  93. // 开启数据库
  94. this.openSqllite()
  95. // sqlLite.dropTable('Biz_Time').then(res => {
  96. // console.log('cg');
  97. // }).catch(err => {
  98. // console.log('sb');
  99. // })
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .home {
  105. width: 100%;
  106. height: 100%;
  107. display: flex;
  108. flex-direction: column;
  109. justify-content: space-evenly;
  110. align-items: center;
  111. position: relative;
  112. .nav {
  113. width: 100%;
  114. display: flex;
  115. align-items: center;
  116. justify-content: space-evenly;
  117. .navBox {
  118. width: 18vw;
  119. height: 18vw;
  120. display: flex;
  121. justify-content: center;
  122. flex-direction: column;
  123. align-items: center;
  124. border-radius: 50%;
  125. background: rgba(225, 244, 251, 0.70);
  126. box-shadow: 4px 4px 17px 0px rgba(0, 0, 0, 0.25);
  127. .img {
  128. width: 50%;
  129. height: 50%;
  130. }
  131. .text {
  132. color: #213B42;
  133. font-weight: 600;
  134. margin-top: 10rpx;
  135. font-size: 38rpx;
  136. }
  137. }
  138. }
  139. .setting-up {
  140. position: absolute;
  141. top: 30rpx;
  142. right: 40rpx;
  143. }
  144. }
  145. </style>