digitalHousing.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <scroll-view>
  3. <view class="overview content">
  4. <scroll-view scroll-x="true">
  5. <view class="part">
  6. <view class="card" v-for="(item,index) in cardList" :key="index" :style="{'background-color':item.bgcColor}">
  7. <view>
  8. <image :src="item.icon" mode="scaleToFill"></image>
  9. </view>
  10. <view>
  11. <view>{{item.CNAME}}</view>
  12. <view style="margin-top: 20rpx;font-size: 50rpx;font-weight:600">{{item.TODOCOUNT}} 件</view>
  13. </view>
  14. </view>
  15. </view>
  16. </scroll-view>
  17. <view class="other">
  18. <button type="primary" @click="link1">住建一张图</button>
  19. <button type="primary" @click="link2">数据分析平台</button>
  20. </view>
  21. </view>
  22. <scroll-view class="tableList content">
  23. <myTable
  24. :column="column"
  25. :tableData="tableData"
  26. :pageCurrent="pageCurrent"
  27. :pageSize="pageSize"
  28. :total="total"
  29. blUrl="/pages/information/information?url=/pages/digitalHousing/digitalHousing"
  30. >
  31. <template #action="{row, blUrl}">
  32. <button class="uni-button" size="mini" type="primary" @click="handleBL(row, blUrl)">办理</button>
  33. </template>
  34. </myTable>
  35. </scroll-view>
  36. </scroll-view>
  37. </template>
  38. <script setup>
  39. import {ref} from "vue"
  40. import { onReady, onShow } from "@dcloudio/uni-app"
  41. import { ApiRequest } from "@/utils/request.js"
  42. const cardList = ref([
  43. {
  44. icon: "../../static/digitalIcon/u1.svg",
  45. CNAME: "党建工作",
  46. bgcColor: "#cfe8f5",
  47. TODOCOUNT: 0
  48. },
  49. {
  50. icon: "../../static/digitalIcon/u2.svg",
  51. CNAME: "公文办理",
  52. bgcColor: "#cfe8f5",
  53. TODOCOUNT: 5
  54. },
  55. {
  56. icon: "../../static/digitalIcon/u3.svg",
  57. CNAME: "业务办理",
  58. bgcColor: "#cfe8f5",
  59. TODOCOUNT: 0
  60. },
  61. {
  62. icon: "../../static/digitalIcon/u4.svg",
  63. CNAME: "数字住建",
  64. bgcColor: "#ffeccf",
  65. TODOCOUNT: 0
  66. },
  67. {
  68. icon: "../../static/digitalIcon/u5.svg",
  69. CNAME: "政务管理",
  70. bgcColor: "#eae9f7",
  71. TODOCOUNT: 1
  72. },
  73. {
  74. icon: "../../static/digitalIcon/u6.svg",
  75. CNAME: "监察督办",
  76. bgcColor: "#eae9f7",
  77. TODOCOUNT: 0
  78. }
  79. ])
  80. const pageCurrent = ref(1)
  81. const pageSize = ref(15)
  82. const total = ref(0)
  83. const column = ref([
  84. {
  85. title:"紧急程度",
  86. key:"JJCD"
  87. },
  88. {
  89. title:"公文种类",
  90. key:"FLOWNAME"
  91. },
  92. {
  93. title:"标题",
  94. key:"TITLE"
  95. },
  96. {
  97. title:"操作",
  98. key:"action"
  99. }
  100. ])
  101. const tableData = ref([])
  102. function link1() {
  103. console.log(123+'一张图')
  104. }
  105. function link2() {
  106. console.log(456+'分析平台')
  107. }
  108. //加载顶部卡片
  109. function loadCard(){
  110. ApiRequest({
  111. url: '/g2work/routeinfo/queryDataToDoFlowRouteCountDesktopByUseridGroup',
  112. method: 'POST',
  113. data:{
  114. userid:uni.getStorageSync('GlWorkPlatform-userid')
  115. }
  116. }).then(res=>{
  117. if(res.code === 0 && res.success){
  118. cardList.value = res.data.map((item,index)=>{
  119. return{
  120. icon: `../../static/digitalIcon/u${index > 5 ? index - 5 : index + 1}.svg`,
  121. CNAME: item.CNAME,
  122. TODOCOUNT: item.TODOCOUNT,
  123. bgcColor: index < 3 ? '#cfe8f5' : index===3 ? '#ffeccf': '#eae9f7'
  124. }
  125. })
  126. }
  127. })
  128. }
  129. function getTableList(pageno){
  130. ApiRequest({
  131. url: '/g2work/routeinfo/queryDataTodoWithPage',
  132. method: 'POST',
  133. data:{
  134. pageno: pageno || pageCurrent.value,
  135. pagesize: pageSize.value,
  136. userid: uni.getStorageSync('GlWorkPlatform-userid'),
  137. querycondition: "[]",
  138. ordercondition: "",
  139. flowid: "AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA06",
  140. columnscondition: '[{"COLID":"JJCD","COLUMNS":"FW_ZSWSXW.JJCD|FW_ZSWPXXW.JJCD|FW_ZB.JJCD|FW_GFXWJXGMRBM.JJCD|FW_WFH.JJCD|FW_SPJ.JJCD|FW_ZRBGHYJY.JJCD|FW_HYJY.JJCD"},{"COLID":"GWZL","COLUMNS":"FW_ZSWSXW.GWZL|FW_ZSWPXXW.GWZL|FW_ZB.GWZL|FW_GWHBGSFW.FWZL|FW_GWHFWGZ.FWZL|FW_GFXWJXGMRBM.GWZL|FW_WFH.GWZL|FW_SPJ.GWZL|FW_ZRBGHYJY.GWZL|FW_HYJY.GWZL"},{"COLID":"FWZH","COLUMNS":"FW_ZSWSXW.FWZH|FW_ZSWPXXW.FWZH|FW_ZB.FWZH|FW_GFXWJXGMRBM.FWZH|FW_WFH.FWZH|FW_SPJ.FWZH|FW_ZRBGHYJY.FWZH|FW_HYJY.FWZH"},{"COLID":"NGRBM","COLUMNS":"FW_ZSWSXW.NGRBM|FW_ZSWPXXW.NGRBM|FW_ZB.NGRBM|FW_GWHBGSFW.NGRBM|FW_GWHFWGZ.NGRBM|FW_GFXWJXGMRBM.NGRBM|FW_WFH.NGRBM|FW_SPJ.NGRBM|FW_ZRBGHYJY.NGRBM|FW_HYJY.NGRBM"},{"COLID":"NGR","COLUMNS":"FW_ZSWSXW.NGR|FW_ZSWPXXW.NGR|FW_ZB.NGR|FW_GWHBGSFW.NGR|FW_GWHFWGZ.NGR|FW_GFXWJXGMRBM.NGR|FW_WFH.NGR|FW_SPJ.NGR|FW_ZRBGHYJY.NGR|FW_HYJY.NGR"}]'
  141. }
  142. }).then(res=>{
  143. if(res.code === 0 && res.success){
  144. tableData.value = res.data
  145. total.value = res.meta.totalCount
  146. }
  147. })
  148. }
  149. function handleBL(row, blUrl){
  150. console.log(row);
  151. uni.reLaunch({
  152. url: blUrl + '&name=' + row.name
  153. })
  154. }
  155. onReady(()=>{
  156. loadCard() //加载卡片
  157. getTableList()
  158. })
  159. </script>
  160. <style lang="scss" scoped>
  161. body{
  162. background-color: #0063d0;
  163. }
  164. .content{
  165. margin: 50rpx;
  166. background-color: #fff;
  167. border-radius: 20rpx;
  168. width: calc(100vw - 100rpx);
  169. }
  170. .overview{
  171. height: 600rpx;
  172. padding: 30rpx;
  173. .part{
  174. display: flex;
  175. flex-direction: row;
  176. .card{
  177. width: 450rpx;
  178. flex-shrink: 0;
  179. margin: 10rpx;
  180. height: 300rpx;
  181. border-radius: 10rpx;
  182. display: flex;
  183. flex-direction: row;
  184. justify-content: center;
  185. align-items: center;
  186. >view:nth-child(1){
  187. width: 150rpx;
  188. height: 150rpx;
  189. border-radius: 20rpx;
  190. background-color: #91d2f6;
  191. margin-right: 40rpx;
  192. display: flex;
  193. justify-content: center;
  194. align-items: center;
  195. image{
  196. width: 75rpx;
  197. height: 75rpx;
  198. }
  199. }
  200. }
  201. }
  202. .other{
  203. display: flex;
  204. flex-direction: row;
  205. justify-content: space-around;
  206. margin-top: 50rpx;
  207. button{
  208. width: 45vw;
  209. height: 120rpx;
  210. display: flex;
  211. justify-content: center;
  212. align-items: center;
  213. }
  214. }
  215. }
  216. .tableList{
  217. padding: 50rpx 0;
  218. height: calc(100vh - 950rpx);
  219. margin-top: 0;
  220. }
  221. </style>