1
0

handleFile.vue 5.7 KB

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