handleMeeting.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <scroll-view style="flex:1">
  3. <view class="tableTop">
  4. <u-subsection bg-color="rgb(215,224,233)" button-color="rgb(0,99,208)" active-color="white" :list="list" @change="subChange"></u-subsection>
  5. <!-- <view class="operation">
  6. <uni-easyinput placeholder="请输入编号"></uni-easyinput>
  7. <u-button type="primary" size="medium" ripple>查询</u-button>
  8. <u-button size="medium" ripple @click="getTableList()">刷新</u-button>
  9. </view> -->
  10. </view>
  11. <u-line length="95%" margin="auto" color="#000"/>
  12. <myTable
  13. :column="column"
  14. :tableData="tableData"
  15. :pageCurrent="pageCurrent"
  16. :pageSize="pageSize"
  17. :total="total"
  18. blUrl="/pages/information/information?url=/pages/handleMeeting/handleMeeting"
  19. >
  20. <template #action="{row, blUrl}">
  21. <button class="uni-button" size="mini" type="primary" @click="handleBL(row, blUrl)">办理</button>
  22. <!-- <button class="uni-button" size="mini" type="warn" @click="handleDel(row)">删除</button> -->
  23. </template>
  24. </myTable>
  25. </scroll-view>
  26. </template>
  27. <script setup>
  28. import { ref } from 'vue';
  29. import { onReady, onShow } from"@dcloudio/uni-app"
  30. import { ApiRequest } from "@/utils/request.js"
  31. const list = ref([{name: '待办'}, {name: '已办'}, {name: '办结'}])
  32. const s4 = new SM4Util()
  33. const currentUrl = ref('')
  34. const pageCurrent = ref(1)
  35. const pageSize = ref(15)
  36. const total = ref(0)
  37. const jjcdList = ref([])
  38. const column = ref([])
  39. const column1 = ref([
  40. {
  41. title:"紧急程度",
  42. key:"FW_WFH.JJCDCAPTION"
  43. },
  44. {
  45. title:"公文种类",
  46. key:"FLOWNAME"
  47. },
  48. {
  49. title:"标题",
  50. key:"FW_WFH.BT"
  51. },
  52. {
  53. title:"发文字号",
  54. key:"FW_WFH.FWZH"
  55. },
  56. {
  57. title:"主办处室",
  58. key:"FW_WFH.ZS"
  59. },
  60. {
  61. title:"是否已阅",
  62. key:"FW_WFH.SFXYJDCAPTION"
  63. },
  64. {
  65. title:"操作",
  66. key:"action"
  67. }
  68. ])
  69. const column2 = ref([
  70. {
  71. title:"紧急程度",
  72. key:"JJCD",
  73. formatter: (val)=>{
  74. for(let i=0; i<jjcdList.value.length; i++){
  75. if(jjcdList.value[i].CODE === val){
  76. return jjcdList.value[i].CNAME
  77. }
  78. }
  79. }
  80. },
  81. {
  82. title:"公文种类",
  83. key:"FLOWNAME"
  84. },
  85. {
  86. title:"标题",
  87. key:"TITLE"
  88. },
  89. {
  90. title:"发文字号",
  91. key:"FWZH"
  92. },
  93. {
  94. title:"主办处室",
  95. key:"NGRBM"
  96. },
  97. {
  98. title:"上一节点转办时间",
  99. key:"RECEIVEDATE"
  100. },
  101. {
  102. title:"操作",
  103. key:"action"
  104. }
  105. ])
  106. const column3 = ref([
  107. {
  108. title:"紧急程度",
  109. key:"JJCD"
  110. },
  111. {
  112. title:"公文种类",
  113. key:"FLOWNAME"
  114. },
  115. {
  116. title:"标题",
  117. key:"TITLE"
  118. },
  119. {
  120. title:"发文字号",
  121. key:"FWZH"
  122. },
  123. {
  124. title:"主办处室",
  125. key:"NGRBM"
  126. },
  127. {
  128. title:"上一节点转办时间",
  129. key:"RECEIVEDATE"
  130. },
  131. {
  132. title:"操作",
  133. key:"action"
  134. }
  135. ])
  136. const tableData = ref([])
  137. //切换页签
  138. function subChange(e){
  139. pageCurrent.value = 1 //重置当前页码
  140. switch (e){
  141. case 0: //待办
  142. column.value = column1.value
  143. currentUrl.value = '/g2work/routeinfo/queryDataTodoWithPage'
  144. getTableList()
  145. break;
  146. case 1: //已办
  147. column.value = column2.value
  148. currentUrl.value = '/g2work/routeinfo/queryDataDoneWithPage'
  149. getTableList()
  150. break;
  151. case 2: //办结
  152. column.value = column3.value
  153. currentUrl.value = '/g2work/routeinfo/queryDataFinishWithPage'
  154. getTableList()
  155. break;
  156. }
  157. }
  158. function getTableList(pageno){
  159. ApiRequest({
  160. url: currentUrl.value,
  161. method: 'POST',
  162. data:{
  163. pageno: pageno || pageCurrent.value,
  164. pagesize: pageSize.value,
  165. userid: uni.getStorageSync('GlWorkPlatform-userid'),
  166. querycondition: "[]",
  167. ordercondition: "",
  168. flowid: "AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA06",
  169. 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"}]'
  170. }
  171. }).then(res=>{
  172. if(res.code === 0 && res.success){
  173. tableData.value = res.data
  174. total.value = res.meta.totalCount
  175. }
  176. })
  177. }
  178. //更改页码
  179. function pageChange(val){
  180. pageCurrent.value = val
  181. getTableList(val)
  182. }
  183. function handleBL(row, blUrl){
  184. console.log(row);
  185. uni.reLaunch({
  186. url: blUrl + '&name=' + row.name
  187. })
  188. }
  189. function handleDel(row){
  190. uni.showModal({
  191. title: "提示",
  192. content: "再次确认是否删除",
  193. confirmColor: "#ff1919",
  194. success: (e)=>{
  195. if(e.confirm){
  196. console.log(row);
  197. }
  198. }
  199. })
  200. }
  201. //获取紧急程度列表
  202. function getJJCD(){
  203. ApiRequest({
  204. url: '/g2app/abase/queryDataCode',
  205. method: 'POST',
  206. data: {
  207. data: s4.encryptData_CBC(JSON.stringify({ckey: "CODE_EMERGENCY", routeinfoid: '0'}))
  208. }
  209. }).then(obj=>{
  210. let res = strToJson(s4.decryptData_CBC(obj.data))
  211. if(res.code === 0 && res.success){
  212. jjcdList.value = res.data.CODE_EMERGENCY
  213. }
  214. })
  215. }
  216. onReady(()=>{
  217. getJJCD() //获取紧急程度列表
  218. subChange(0) //获取表格
  219. })
  220. </script>
  221. <style lang="scss" scoped>
  222. ::v-deep .uni-table-scroll{
  223. margin: 0 50rpx !important;
  224. width: calc(100vw - 100rpx) !important;
  225. }
  226. </style>