|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<scroll-view style="flex:1">
|
|
<scroll-view style="flex:1">
|
|
<view class="tableTop">
|
|
<view class="tableTop">
|
|
- <u-subsection bg-color="rgb(215,224,233)" button-color="rgb(0,99,208)" active-color="white" :list="list" ></u-subsection>
|
|
|
|
|
|
+ <u-subsection bg-color="rgb(215,224,233)" button-color="rgb(0,99,208)" active-color="white" :list="list" @change="subChange"></u-subsection>
|
|
<view class="operation">
|
|
<view class="operation">
|
|
<uni-easyinput placeholder="请输入编号"></uni-easyinput>
|
|
<uni-easyinput placeholder="请输入编号"></uni-easyinput>
|
|
<u-button type="primary" size="medium" ripple>查询</u-button>
|
|
<u-button type="primary" size="medium" ripple>查询</u-button>
|
|
@@ -9,53 +9,89 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-line length="95%" margin="auto" color="#000"/>
|
|
<u-line length="95%" margin="auto" color="#000"/>
|
|
- <myTable :column="column" :tableData="tableData" blUrl="/pages/information/information?url=/pages/handleFile/handleFile"></myTable>
|
|
|
|
|
|
+ <myTable
|
|
|
|
+ :column="column"
|
|
|
|
+ :tableData="tableData"
|
|
|
|
+ :pageCurrent="pageCurrent"
|
|
|
|
+ :pageSize="pageSize"
|
|
|
|
+ :total="total"
|
|
|
|
+ blUrl="/pages/information/information?url=/pages/handleFile/handleFile"
|
|
|
|
+ @pageChange="pageChange"
|
|
|
|
+ >
|
|
|
|
+ </myTable>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
- import { onLoad, onReady } from"@dcloudio/uni-app"
|
|
|
|
|
|
+ import { onReady } from"@dcloudio/uni-app"
|
|
import { ApiRequest } from "@/utils/request.js"
|
|
import { ApiRequest } from "@/utils/request.js"
|
|
|
|
|
|
- const list = ref([
|
|
|
|
- {
|
|
|
|
- name: '待办',
|
|
|
|
- num: 2
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '已办'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '办结',
|
|
|
|
- num: 6
|
|
|
|
- }
|
|
|
|
- ])
|
|
|
|
-
|
|
|
|
|
|
+ const list = ref([{name: '待办'}, {name: '已办'}, {name: '办结'}])
|
|
|
|
+
|
|
|
|
+ const currentUrl = ref('/g2work/routeinfo/queryDataTodoWithPage')
|
|
|
|
+ const pageCurrent = ref(1)
|
|
|
|
+ const pageSize = ref(15)
|
|
|
|
+ const total = ref(0)
|
|
const column = ref(["紧急程度", "公文种类", "标题", "发文字号", "主办处室", "是否已阅", "操作"])
|
|
const column = ref(["紧急程度", "公文种类", "标题", "发文字号", "主办处室", "是否已阅", "操作"])
|
|
- const tableData = ref([
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
- "date": "不紧急",
|
|
|
|
- "name": "Dcloud1",
|
|
|
|
- "address": "上海市普陀区金沙江路 1518 弄",
|
|
|
|
- "fwzh": "1322",
|
|
|
|
- "zbcs": "政务处",
|
|
|
|
- "sfyy": "是"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "date": "不紧急",
|
|
|
|
- "name": "Dcloud2",
|
|
|
|
- "address": "上海市普陀区金沙江路 1518 弄",
|
|
|
|
- "fwzh": "1322",
|
|
|
|
- "zbcs": "政务处",
|
|
|
|
- "sfyy": "是"
|
|
|
|
|
|
+ const tableData = ref([])
|
|
|
|
+
|
|
|
|
+ //切换页签
|
|
|
|
+ function subChange(e){
|
|
|
|
+ pageCurrent.value = 1 //重置当前页码
|
|
|
|
+ switch (e){
|
|
|
|
+ case 0: //待办
|
|
|
|
+ currentUrl.value = '/g2work/routeinfo/queryDataTodoWithPage'
|
|
|
|
+ getTableList('/g2work/routeinfo/queryDataTodoWithPage')
|
|
|
|
+ break;
|
|
|
|
+ case 1: //已办
|
|
|
|
+ currentUrl.value = '/g2work/routeinfo/queryDataDoneWithPage'
|
|
|
|
+ getTableList('/g2work/routeinfo/queryDataDoneWithPage')
|
|
|
|
+ break;
|
|
|
|
+ case 2: //办结
|
|
|
|
+ currentUrl.value = '/g2work/routeinfo/queryDataFinishWithPage'
|
|
|
|
+ getTableList('/g2work/routeinfo/queryDataFinishWithPage')
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- ])
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- onLoad(()=>{
|
|
|
|
- console.log('onLoad获取页面传参');
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function getTableList(url, pageno){
|
|
|
|
+ ApiRequest({
|
|
|
|
+ url: url,
|
|
|
|
+ method: 'POST',
|
|
|
|
+ data:{
|
|
|
|
+ pageno: pageno || pageCurrent.value,
|
|
|
|
+ pagesize: pageSize.value,
|
|
|
|
+ userid: uni.getStorageSync('GlWorkPlatform-userid'),
|
|
|
|
+ querycondition: "[]",
|
|
|
|
+ ordercondition: "",
|
|
|
|
+ flowid: "AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA06"
|
|
|
|
+ }
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.code === 0 && res.success){
|
|
|
|
+ tableData.value = res.data.map(item=>{
|
|
|
|
+ return {
|
|
|
|
+ 'FW_WFH.JJCDCAPTION': item['FW_WFH.JJCDCAPTION'],
|
|
|
|
+ 'FLOWNAME': item['FLOWNAME'],
|
|
|
|
+ 'FW_WFH.BT': item['FW_WFH.BT'],
|
|
|
|
+ 'FW_WFH.FWZH': item['FW_WFH.FWZH'],
|
|
|
|
+ 'FW_WFH.ZS': item['FW_WFH.ZS'],
|
|
|
|
+ 'FW_WFH.SFXYJDCAPTION': item['FW_WFH.SFXYJDCAPTION']
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ total.value = res.meta.totalCount
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //更改页码
|
|
|
|
+ function pageChange(val){
|
|
|
|
+ pageCurrent.value = val
|
|
|
|
+ getTableList(currentUrl.value, val)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ onReady(()=>{
|
|
|
|
+ getTableList('/g2work/routeinfo/queryDataTodoWithPage')
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|