yangys
2025-10-08 288369dd7487adc61fe45f24d6d141152f5492df
翻页问题修复
已修改6个文件
154 ■■■■■ 文件已修改
src/views/statreport/approveTablePrint.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/statreport/confirmTablePrint.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/statreport/newprogramming.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/statreport/sendrecord.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tasks/machinebacktask.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/statreport/approveTablePrint.vue
@@ -8,7 +8,7 @@
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
            @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @selection-change="selectionChange">
            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            <template #menu-left>
               <!--
                <el-button type="primary" :disabled="this.selection.length==0" plain @click="handleDelBatch">批量删除</el-button>
@@ -33,12 +33,12 @@
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
    name: 'MachineReturnFileOp',
    name: 'approveTablePrint',
    data() {
        return {
            page: {
                size: 10,
                current: 1,
                pageSize: 10,//
                currentPage: 1,
                total: 0,
            },
            form: {},
@@ -58,7 +58,7 @@
                // tree: true,
                border: true,
                index: true,
                selection: true,
                selection: false,
                // viewBtn: true,
                menuWidth: 140,
                menu: true,
@@ -117,17 +117,12 @@
                        hide: false,
                    }
                ],
                selection: [],
            },
            selection: [],
        }
    },
    methods: {
        selectionChange (list) {
            this.selection = list;
        },
        handleExport(row,index) {
            //审批表下载
            this.$confirm('是否导出审批表?', '提示', {
@@ -143,7 +138,7 @@
                    let name = res.headers['content-disposition'].split('filename=')[1]
                    //console.log(res.headers['content-disposition'].split('filename=')[1]);
                    name = decodeURI(name)
                    console.log(name)
                    //console.log(name)
                    downloadFile(res.data, `${name}`);
                    NProgress.done();
                });
@@ -153,8 +148,8 @@
        searchChange(params, done) {
            let data = {}
            this.query = params;
            this.page.currentPage = 1;
            console.log('searchChange', params);
            this.page.current = 1;
            //console.log('searchChange', params);
            params.createTimeBegin = params?.createTime?.[0] || '';
            params.createTimeEnd = params?.createTime?.[1] || '';
            
@@ -179,12 +174,11 @@
            this.onLoad(this.page, data);
            done();
        },
        currentChange(currentPage) {
            this.page.currentPage = currentPage;
            // this.onLoad();
        currentChange(current) {
            this.page.currentPage = current;
        },
        sizeChange(pageSize) {
            this.page.pageSize = pageSize;
        sizeChange(size) {
            this.page.pageSize = size;
        },
        refreshChange() {
            this.onLoad(this.page, this.query);
@@ -192,7 +186,7 @@
        /** * 页面加载时获取数据
         */
        onLoad(page, params = {}) {
            console.log('onLoad', page, params);
            //console.log('onLoad', page, params);
            const query = {
                ...this.query,
                // category: params.category ? flowCategory(params.category) : null,
@@ -203,9 +197,9 @@
            } catch (error) {
                console.error('日期格式化错误', error);
            }
            //alert(page.size)
            this.loading = true;
            getDispatchTaskList(page.current, page.size, Object.assign(query, params)).then(res => {
            getDispatchTaskList(page.currentPage, page.pageSize, Object.assign(query, params)).then(res => {
                const data = res.data.data;
                this.page.total = data.total;
                this.data = data.records;
src/views/statreport/confirmTablePrint.vue
@@ -80,8 +80,8 @@
                        hide: true,
                    },
                    {
                        label: '关键字',
                        prop: 'keyword',
                        label: '零组件号',
                        prop: 'drawingNo',
                        search: true,
                        searchType: 'input',
                        hide: true,
@@ -238,7 +238,7 @@
            data = {
                createTimeBegin: params.createTimeBegin || undefined,
                createTimeEnd: params.createTimeEnd || undefined,
                keyword: params.keyword || undefined,
                drawingNo: params.drawingNo || undefined,
                myProcessName: params.myProcessName || undefined
            }
            this.query = data
src/views/statreport/newprogramming.vue
@@ -11,14 +11,7 @@
            @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
            @selection-change="selectionChange">
            <!--v-model:search="search"
            <template #search="{ size }">
                <el-tag>标题</el-tag>
                <el-input placeholder="自定义输入框"
                            :size="size"
                            style="width: 200px"
                            v-model:value="search.slot"></el-input>
            </template> -->
        </avue-crud>
    </basic-container>
@@ -39,7 +32,7 @@
            //tableData: [],
            viewRow: {},
            page: {
                pageSize: 10,
                pageSize: 10,//
                currentPage: 1,
                total: 0,
            },
@@ -132,15 +125,11 @@
                ],
            },
            
            selectedList: [],
            dialogVisible: false,
           
        }
    },
    mounted() {
        //this.option.column[0].disabled = true;
        //this.option.column[0].value = '2025-08-31';
        getDeptData().then(res => {
            this.option.column[1].dicData = res.data.data;
        }, () => {
src/views/statreport/sendrecord.vue
@@ -88,8 +88,8 @@
      },
      loading: true,
      mypage: {
        size: 10,
        current: 1,
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      fileViewModel:false,
@@ -177,7 +177,7 @@
    },
    nodeClick(data) {
      //this.treeDeptId = data.id;
      this.mypage.current = 1;
      this.mypage.currentPage = 1;
      this.onLoad(this.page);
    },
    getQueryObj(){
@@ -187,6 +187,8 @@
          param.createTimeBegin = param.createTime[0];
          param.createTimeEnd = param.createTime[1];
        }
        param.current = this.mypage.currentPage;
        param.size = this.mypage.pageSize;
        return param;
    },
    handleExport() {
@@ -217,15 +219,15 @@
      //this.onLoad(this.mypage);
    },
    searchChange(params, done) {
      this.mypage.current = 1;
      this.mypage.currentPage = 1;
      this.onLoad();
      done();
    },
    currentChange(current) {
      this.mypage.current = current;
      this.mypage.currentPage = current;
    },
    sizeChange(size) {
      this.mypage.size = size;
      this.mypage.pageSize = size;
    },
    refreshChange() {
      
src/views/system/user.vue
@@ -41,6 +41,7 @@
              @click="$refs.crud.rowAdd()"
              >新 增
            </el-button>
            <!--
            <el-button
              type="danger"
              plain
@@ -49,6 +50,7 @@
              @click="handleDelete"
              >删 除
            </el-button>
            -->
            <el-button
              type="primary"
              plain
src/views/tasks/machinebacktask.vue
@@ -16,17 +16,9 @@
      @selection-change="selectionChange"
      @on-load="onLoad"
    >
      <template #menu-left>
        <!-- el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">导出</el-button>
        <el-button type="primary" v-if="this.search.dirType!='REC'" :disabled="this.selection.length==0" size="default" icon="el-icon-circle-plus" plain @click="receiveBtn">接收已选</el-button>
-->
      </template>
      <!--
      <template #menu="scope">
        <el-button type="primary" v-if="scope.row.dirType==='TEMP'" text size="default" icon="el-icon-document-delete" @click.stop="rejectBtn(scope.row, scope.index)">拒绝</el-button>
        <el-button type="primary" v-if="scope.row.dirType==='TEMP'" text size="default" icon="el-icon-document-add" @click.stop="acceptBtn(scope.row, scope.index)">接收</el-button>
          <el-button type="primary" v-if="scope.row.status==1" text size="default" icon="el-icon-delete" @click.stop="handleDel(scope.row)">删除</el-button>
      </template>
      -->
    </avue-crud>
  </basic-container>
</template>
@@ -67,7 +59,7 @@
        emptyBtn: false,
        searchLabelWidth: "80",
        searchSpan: 4,
        menu:false,
        menu:true,
        width:'100%',
        column: [
            {
@@ -143,55 +135,28 @@
      this.selection = selection;
    },
    receiveAll() {
      //接收符合条件的所有数据
      this.$confirm('确定要接收符合条件的所有文件吗?', {  //同接收接口相同
        confirmButtonText: '是',
        cancelButtonText: '否',
        type: 'warning',
      }).then(() => {
        //调用接口
        this.loading = true;
        axios({
          url: '/blade-mdm/machinefile/file/temp-accept-all',
          method: 'post',
          params: {}
        }).then(
          res => {
            this.loading = false;
            this.onLoad();
          }
        );
      })
    handleDel(row) {
      this.loading = true;
      axios({
        url: '/blade-mdm/gkw/machinebacktask/remove',
        method: 'post',
        params: {ids: row.id},
      }).then(
        res => {
          this.loading = false;
          this.$message({
            type: 'success',
            message: '操作成功!',
          });
          this.onLoad();
          done();
        },
        error => {
          this.loading = false;
        }
      );
    },
    receiveBtn() {
      if(this.selection.length == 0) {
        ElMessage({message: '请选择数据',type: 'error'})
      }
      var ids = [];
      this.selection.forEach(item=> {
        ids.push(item.id);
      })
      this.$confirm('确定要接收吗?', {  //同接收接口相同
        confirmButtonText: '是',
        cancelButtonText: '否',
        type: 'warning',
      }).then(() => {
        //调用接口
        this.loading = true;
        axios({
          url: '/blade-mdm/machinefile/collect/temp-accept',
          method: 'post',
          params: {ids: ids.join(',')},
        }).then(
          res => {
            this.loading = false;
            this.onLoad();
          }
        );
      })
    },
    
    searchReset() {
      //this.onLoad(this.mypage);