bluejay
2025-04-14 a4feab010b1f2af3585cc8a46dc7d21916db48cf
钣金计划\气体管理 页面调整
已重命名1个文件
已复制1个文件
已修改1个文件
已添加1个文件
847 ■■■■■ 文件已修改
src/api/mainPlan/apsPlatePlan.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mainPlan/gasPiping.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ApsPlatePlan/index.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/gasPiping/index.vue 764 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mainPlan/apsPlatePlan.js
ÎļþÃû´Ó src/api/ApsPlatePlan/ApsPlatePlan.js ÐÞ¸Ä
@@ -1,4 +1,4 @@
import request from '@/utils/request'
import request from '@/utils/request.js'
// æŸ¥è¯¢é’£é‡‘计划管理列表
export function listPlan(query) {
src/api/mainPlan/gasPiping.js
copy from src/api/ApsPlatePlan/ApsPlatePlan.js copy to src/api/mainPlan/gasPiping.js
Îļþ´Ó src/api/ApsPlatePlan/ApsPlatePlan.js ¸´ÖÆ
@@ -3,7 +3,7 @@
// æŸ¥è¯¢é’£é‡‘计划管理列表
export function listPlan(query) {
  return request({
    url: '/aps/apsPlatePlan/list',
    url: '/aps/gasPiping/list',
    method: 'get',
    params: query
  })
@@ -12,7 +12,7 @@
// æŸ¥è¯¢é’£é‡‘计划管理详细
export function getApsPlatePlan(id) {
  return request({
    url: '/aps/ApsPlatePlan/ApsPlatePlan/' + id,
    url: '/aps/gasPiping/' + id,
    method: 'get'
  })
}
@@ -20,7 +20,7 @@
// æ–°å¢žé’£é‡‘计划管理
export function addApsPlatePlan(data) {
  return request({
    url: '/aps/ApsPlatePlan/ApsPlatePlan/add',
    url: '/aps/gasPiping/add',
    method: 'post',
    data: data
  })
@@ -29,7 +29,7 @@
// ä¿®æ”¹é’£é‡‘计划管理
export function updateApsPlatePlan(data) {
  return request({
    url: '/ApsPlatePlan/ApsPlatePlan',
    url: '/aps/gasPiping',
    method: 'put',
    data: data
  })
@@ -38,14 +38,14 @@
// åˆ é™¤é’£é‡‘计划管理
export function delApsPlatePlan(id) {
  return request({
    url: '/ApsPlatePlan/ApsPlatePlan/' + id,
    url: '/aps/gasPiping/' + id,
    method: 'delete'
  })
}
//钣金计划上传
export function uploadApsPlatePlan(data) {
  return request({
    url: '/aps/ApsPlatePlan/upload',
    url: '/aps/gasPiping/upload',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: data
@@ -54,7 +54,7 @@
// æŸ¥è¯¢é›¶ä»¶è®¡åˆ’管理列表
export function examplePlan(query) {
  return request({
    url: '/aps/apsPlatePlanTemp/list',
    url: '/aps/gasPipingTemp/list',
    method: 'get',
    params: query
  })
@@ -63,7 +63,7 @@
// æŸ¥è¯¢é›¶ä»¶è®¡åˆ’管理列表
export function confirmPart(data) {
  return request({
    url: '/aps/apsPlatePlan/confirmPart',
    url: '/aps/gasPiping/confirmGasPiping',
    method: 'post',
    data: data
  })
src/views/ApsPlatePlan/index.vue
@@ -109,49 +109,40 @@
    </HxlhTable>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹é’£é‡‘è®¡åˆ’ç®¡ç†å¯¹è¯æ¡† -->
    <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel">
    <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel" >
      <el-row :gutter="10">
        <el-col>
          <div style="border-bottom: 1px solid #ccc;" >
            <p>上传Excel文件,包含零件工单信息。系统将解析数据并保存到本地,用于关联到零件计划中。</p>
            <p>上传Excel文件,包含钣金计划信息。系统将解析数据并保存到本地,用于关联到钣金计划中。</p>
          </div>
        </el-col>
        <el-col >
          <div></div>
        </el-col>
      </el-row>
      <el-row :gutter="10" style="margin-top: 20px;"> </el-row>
      <el-row>
        <el-col>
          <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag>
            <el-icon class="el-icon--upload"><upload-filled /></el-icon>
            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
            <template #tip>
              <div class="el-upload__tip">
                <!-- <div class="el-upload__tip">
                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
                </div> -->
                <span>仅允许导入xls、xlsx格式文件。</span>
                <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link> -->
              </div>
            </template>
          <el-upload ref="uploadRef"
                     :limit="1"
                     accept=".xlsx, .xls"
                     :headers="upload.headers"
                     :action="upload.url + '?updateSupport=' + upload.updateSupport"
                     :disabled="upload.isUploading"
                     :on-progress="handleFileUploadProgress"
                     :on-success="handleFileSuccess"
                     :auto-upload="true" drag>
              <el-icon class="el-icon--upload"><upload-filled /></el-icon>
              <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
              <template #tip>
                <div class="el-upload__tip">
                  <span>仅允许导入xls、xlsx格式文件。</span>
                 </div>
              </template>
          </el-upload>
        </el-col>
      </el-row>
      <el-row style="margin-top: 20px;">
        <el-col>
          <div>
            <el-button
                type="success"
                plain
                icon="Check"
                :disabled="planned"
                @click="uploadParse"
                v-hasPermi="['partPlan:confirmPart']"
            >上传并解析</el-button>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col style="margin-top: 20px;">
          <div v-show="isVisible">
@@ -185,7 +176,16 @@
      </el-row>
      <template #footer>
        <div class="dialog-footer">
          <!-- <el-button type="primary" @click="submitFileForm">ç¡® å®š</el-button> -->
            <el-button
                type="success"
                plain
                icon="Check"
                :disabled="planned"
                @click="uploadParse"
                v-hasPermi="['partPlan:confirmPart']"
            >确认上传</el-button>
          <el-button @click="dialogCancel">取 æ¶ˆ</el-button>
        </div>
      </template>
@@ -195,7 +195,7 @@
</template>
<script setup name="ApsPlatePlan">
import { listPlan, examplePlan, confirmPart} from "@/api/ApsPlatePlan/ApsPlatePlan";
import { listPlan, examplePlan, confirmPart} from "@/api/mainPlan/apsPlatePlan";
import HxlhTable from '@/components/HxlhTable'
import { ref } from "vue";
import { getToken } from "@/utils/auth";
@@ -213,6 +213,7 @@
const total = ref(0);
const daterangePlanStartDay = ref([]);
const daterangePlanEndDay = ref([]);
const height = ref(document.documentElement.clientHeight - 210 + "px;")
const isVisible = ref(false);
const isError = ref(false);
@@ -742,7 +743,7 @@
    planned.value = true;
    upload.open = false;
    ElMessage({
      message: '钣金计划数据已成功上传和解析',
      message: '气体管路计划数据已成功上传和解析',
      type: 'success',
    })
    getList();
src/views/mainPlan/gasPiping/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,764 @@
<template>
  <div class="app-container">
    <el-row :gutter="20"> <el-col>
    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="计划开工日" style="width: 100%;">
          <el-date-picker
              v-model="daterangePlanStartDay"
              value-format="YYYY-MM-DD"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        </el-col>
        <el-col :span="6">
        <el-form-item label="计划完工日" style="width: 100%;">
          <el-date-picker
              v-model="daterangePlanEndDay"
              value-format="YYYY-MM-DD"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        </el-col>
        <el-col :span="6">
        <el-form-item label="单据号" prop="documentNumber" style="width: 100%;">
          <el-input
              v-model="queryParams.documentNumber"
              placeholder="请输入单据号"
              clearable
              @keyup.enter="handleQuery"
          />
        </el-form-item>
        </el-col>
        <el-col :span="6">
        <el-form-item label="客户名称" prop="customer" style="width: 100%;">
          <el-input
              v-model="queryParams.customer"
              placeholder="请输入客户名称"
              clearable
              @keyup.enter="handleQuery"
          />
        </el-form-item>
        </el-col>
        <el-col  :span="24"  style="text-align: right;">
        <el-form-item>
          <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
          <el-button icon="Refresh" @click="resetQuery">重置</el-button>
        </el-form-item>
        </el-col>
      </el-row>
      </el-form>
    </el-col> </el-row>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
            type="primary"
            plain
            icon="Plus"
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['apsPlatePlan:edit']"
        >批量修改计划开工日</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
            type="success"
            plain
            icon="Edit"
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['apsPlatePlan:edit']"
        >批量修改计划完工日</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
            type="info"
            plain
            icon="Upload"
            @click="handleImport"
            v-hasPermi="['apsPlatePlan:import']"
        >导入</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="Download"
          @click="handleExport"
          v-hasPermi="['apsPlatePlan:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <HxlhTable
        style="width: 100%"
        :columns="columns"
        :data="planList"
        :loading="loading"
        :height="height"
        @on-checkbox="handleCheckboxChange"
    >
    </HxlhTable>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹é’£é‡‘è®¡åˆ’ç®¡ç†å¯¹è¯æ¡† -->
    <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel">
      <el-row :gutter="10">
        <el-col>
          <div style="border-bottom: 1px solid #ccc;" >
            <p>上传Excel文件,包含零件工单信息。系统将解析数据并保存到本地,用于关联到零件计划中。</p>
          </div>
        </el-col>
        <el-col >
          <div></div>
        </el-col>
      </el-row>
      <el-row :gutter="10" style="margin-top: 20px;"> </el-row>
      <el-row>
        <el-col>
          <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag>
            <el-icon class="el-icon--upload"><upload-filled /></el-icon>
            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
            <template #tip>
              <div class="el-upload__tip">
                <!-- <div class="el-upload__tip">
                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
                </div> -->
                <span>仅允许导入xls、xlsx格式文件。</span>
                <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link> -->
              </div>
            </template>
          </el-upload>
        </el-col>
      </el-row>
      <el-row>
        <el-col style="margin-top: 20px;">
          <div v-show="isVisible">
            <el-alert icon="Check" :show-icon="true" title="钣金计划数据已成功解析" type="success" :closable="false"/>
          </div>
          <div v-show="isError">
            <el-alert icon="Close" :show-icon="true" title="钣金计划数据已解析失败" type="error" :closable="false"/>
          </div>
        </el-col>
      </el-row>
      <el-row v-show="isVisible">
        <el-col>
          <div>
            <h2>数据预览</h2>
          </div>
          <HxlhTable
              style="width: 100%"
              :columns="exampleColumns"
              :data="exampleList"
              :loading="loading"
              :maxHeight="exampleHeight"
              @on-checkbox="handleCheckboxChange"
          >
          </HxlhTable>
        </el-col>
        <el-col>
          <div style="text-align: right;">
            <h4>共上传<span style="color: blue;">{{ total }}</span>条零件工单数据</h4>
          </div>
        </el-col>
      </el-row>
      <template #footer>
        <div class="dialog-footer">
          <el-button
              type="success"
              plain
              icon="Check"
              :disabled="planned"
              @click="uploadParse"
              v-hasPermi="['partPlan:confirmPart']"
          >确认上传</el-button>
          <!-- <el-button type="primary" @click="submitFileForm">ç¡® å®š</el-button> -->
          <el-button @click="dialogCancel">取 æ¶ˆ</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
<script setup name="ApsPlatePlan">
import { listPlan, examplePlan, confirmPart} from "@/api/mainPlan/gasPiping.js";
import HxlhTable from '@/components/HxlhTable/index.vue'
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import {ElMessage} from "element-plus";
const { proxy } = getCurrentInstance();
const { aps_is_suspended, aps_document_status, aps_account, aps_business_type } = proxy.useDict('aps_is_suspended', 'aps_document_status', 'aps_account', 'aps_business_type');
const exampleList = ref([]);
const planList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const single = ref(true);
const total = ref(0);
const daterangePlanStartDay = ref([]);
const daterangePlanEndDay = ref([]);
const height = ref(document.documentElement.clientHeight - 210 + "px;")
const isVisible = ref(false);
const isError = ref(false);
const planned = ref(true);
const batchNumber = ref(null);
const exampleHeight = ref("500px");
const uploadRef = ref();
/*** ç”¨æˆ·å¯¼å…¥å‚æ•° */
const upload = reactive({
  // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚(用户导入)
  open: false,
  // å¼¹å‡ºå±‚标题(用户导入)
  title: "",
  // æ˜¯å¦ç¦ç”¨ä¸Šä¼ 
  isUploading: false,
  // æ˜¯å¦æ›´æ–°å·²ç»å­˜åœ¨çš„用户数据
  updateSupport: 0,
  // è®¾ç½®ä¸Šä¼ çš„请求头部
  headers: { Authorization: "Bearer " + getToken() ,local: 'zhl'},
  // ä¸Šä¼ çš„地址
  url: import.meta.env.VITE_APP_BASE_API + "/aps/gasPiping/importData"
});
// è¡¨æ ¼é…ç½®
const exampleColumns = ref([
  { type: 'seq', title: '序号', width: 60 },
  {
    title: '主计划员',
    field: 'masterPlanner',
    width: 100,
  },
  {
    title: '周日',
    field: 'weekDay',
    width: 100,
    formatter: (({ cellValue, row, column }) => {
      if (cellValue) {
        const weekDay = new Date(cellValue);
        const year = weekDay.getFullYear();
        const month = String(weekDay.getMonth() + 1).padStart(2, '0');
        const day = String(weekDay.getDate()).padStart(2, '0');
        return `${month}-${day}`;
      }
      return '';
    })
  },
  {
    title: '周度',
    field: 'weekCycle',
    width: 80,
  },
  {
    title: '主件料号',
    field: 'mainPartNumber',
    width: 150,
  },
  {
    title: '主件图号',
    field: 'mainPartDrawingNumber',
    width: 150,
  },
  {
    title: '客户名称',
    field: 'customer',
    width: 200,
  },
  {
    title: '业务类型',
    field: 'businessType',
    width: 150,
  },
  {
    title: '单据号',
    field: 'documentNumber',
    width: 150,
  },
  {
    title: '需求分类',
    field: 'requirementType',
    width: 150,
  },
  {
    title: '单据状态',
    field: 'documentStatus',
    width: 100,
  },
  {
    title: '料号',
    field: 'itemNumber',
    width: 150,
  },
  {
    title: '图号',
    field: 'drawingNo',
    width: 150,
  },
  {
    title: '版本号',
    field: 'versionNumber',
    width: 100,
  },
  {
    title: '生产数量',
    field: 'productionQuantity',
    width: 100,
  },
  {
    title: '良品数量',
    field: 'goodProductsQuantity',
    width: 100,
  },
  {
    title: '工序号',
    field: 'processNumber',
    width: 150,
  },
  {
    title: '工作中心',
    field: 'workCenter',
    width: 150,
  },
  {
    title: '所属部门',
    field: 'department',
    width: 100,
  },
  {
    title: '计划开工日',
    field: 'planStartDay',
    width: 100,
  },
  {
    title: '计划完工日',
    field: 'planEndDay',
    width: 100,
  },
  {
    title: '备料料号',
    field: 'standbyNumber',
    width: 100,
  },
  {
    title: '备料名称',
    field: 'standbyName',
    width: 200,
  },
  {
    title: '备料库存',
    field: 'standbyStock',
    width: 100,
  },
  {
    title: '下道工序所属部门',
    field: 'nextProcessDeparment',
    width: 150,
  },
  {
    title: '是否挂起',
    field: 'isSuspended',
    width: 100,
  },
  {
    title: '外协标识',
    field: 'isOutsourcing',
    width: 100,
  },
  {
    title: '账套',
    field: 'account',
    width: 100,
  },
  // {
  //   title: '上阶物料',
  //   field: 'advancedMaterials',
  //   width: 100,
  // },
  // {
  //   title: '上阶单据号',
  //   field: 'advancedDocumentNumber',
  //   width: 100,
  // },
  // {
  //   title: '上阶需求日期',
  //   field: 'advancedRequirementDay',
  //   width: 150,
  // },
  // {
  //   title: '计划齐套',
  //   field: 'isPlanComplete',
  //   width: 100,
  // },
  // {
  //   title: '库存齐套',
  //   field: 'isStockComplete',
  //   width: 100,
  // },
  // {
  //   title: '是否有折返工序',
  //   field: 'hasTurnback',
  //   width: 150,
  // },
  // {
  //   title: '风险标识',
  //   field: 'hasRisk',
  //   width: 100,
  // },
]);
// è¡¨æ ¼é…ç½®
const columns = ref([
  { type: 'checkbox', width: 60, align:"center"},
  { type: 'seq', title: '序号', width: 60 },
  {
    title: '主计划员',
    field: 'masterPlanner',
    width: 100,
  },
  {
    title: '周日',
    field: 'weekDay',
    width: 100,
    formatter: (({ cellValue, row, column }) => {
      if (cellValue) {
        const weekDay = new Date(cellValue);
        const year = weekDay.getFullYear();
        const month = String(weekDay.getMonth() + 1).padStart(2, '0');
        const day = String(weekDay.getDate()).padStart(2, '0');
        return `${month}-${day}`;
      }
      return '';
    })
  },
  {
    title: '周度',
    field: 'weekCycle',
    width: 80,
  },
  {
    title: '主件料号',
    field: 'mainPartNumber',
    width: 150,
  },
  {
    title: '主件图号',
    field: 'mainPartDrawingNumber',
    width: 150,
  },
  {
    title: '客户名称',
    field: 'customer',
    width: 200,
  },
  {
    title: '业务类型',
    field: 'businessType',
    width: 100,
  },
  {
    title: '单据号',
    field: 'documentNumber',
    width: 100,
  },
  {
    title: '需求分类',
    field: 'requirementType',
    width: 100,
  },
  {
    title: '单据状态',
    field: 'documentStatus',
    width: 100,
  },
  {
    title: '料号',
    field: 'itemNumber',
    width: 100,
  },
  {
    title: '图号',
    field: 'drawingNo',
    width: 100,
  },
  {
    title: '版本号',
    field: 'versionNumber',
    width: 100,
  },
  {
    title: '生产数量',
    field: 'productionQuantity',
    width: 100,
  },
  {
    title: '良品数量',
    field: 'goodProductsQuantity',
    width: 100,
  },
  {
    title: '工序号',
    field: 'processNumber',
    width: 100,
  },
  {
    title: '工作中心',
    field: 'workCenter',
    width: 100,
  },
  {
    title: '所属部门',
    field: 'department',
    width: 100,
  },
  {
    title: '计划开工日',
    field: 'planStartDay',
    width: 100,
  },
  {
    title: '计划完工日',
    field: 'planEndDay',
    width: 100,
  },
  {
    title: '备料料号',
    field: 'standbyNumber',
    width: 100,
  },
  {
    title: '备料名称',
    field: 'standbyName',
    width: 100,
  },
  {
    title: '备料库存',
    field: 'standbyStock',
    width: 100,
  },
  {
    title: '下道工序所属部门',
    field: 'nextProcessDeparment',
    width: 100,
  },
  {
    title: '是否挂起',
    field: 'isSuspended',
    width: 100,
  },
  {
    title: '外协标识',
    field: 'isOutsourcing',
    width: 100,
  },
  {
    title: '账套',
    field: 'account',
    width: 100,
  },
  {
    title: '上阶物料',
    field: 'advancedMaterials',
    width: 100,
  },
  {
    title: '上阶单据号',
    field: 'advancedDocumentNumber',
    width: 100,
  },
  {
    title: '上阶需求日期',
    field: 'advancedRequirementDay',
    width: 100,
  },
  {
    title: '计划齐套',
    field: 'isPlanComplete',
    width: 100,
  },
  {
    title: '库存齐套',
    field: 'isStockComplete',
    width: 100,
  },
  {
    title: '是否有折返工序',
    field: 'hasTurnback',
    width: 100,
  },
  {
    title: '风险标识',
    field: 'hasRisk',
    width: 100,
  },
]);
const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    customer: null,
    documentNumber: null
  },
  rules: {
    id: [
      { required: true, message: "主键id不能为空", trigger: "blur" }
    ],
  }
});
const { queryParams } = toRefs(data);
/** æŸ¥è¯¢é’£é‡‘计划临时管理列表 */
function getExampleList() {
  loading.value = true;
  queryParams.value = {};
  queryParams.value.batchNumber = batchNumber.value;
  examplePlan(queryParams.value).then(response => {
    exampleList.value = response.rows;
    total.value = response.total;
    loading.value = false;
  });
}
/** æŸ¥è¯¢é›¶ä»¶è®¡åˆ’管理列表 */
function getList() {
  loading.value = true;
  queryParams.value.params = {};
  if (null != daterangePlanStartDay && '' !== daterangePlanStartDay) {
    queryParams.value.params["beginPlanStartDay"] = daterangePlanStartDay.value[0];
    queryParams.value.params["endPlanStartDay"] = daterangePlanStartDay.value[1];
  }
  if (null != daterangePlanEndDay && '' !== daterangePlanEndDay) {
    queryParams.value.params["beginPlanEndDay"] = daterangePlanEndDay.value[0];
    queryParams.value.params["endPlanEndDay"] = daterangePlanEndDay.value[1];
  }
  listPlan(queryParams.value).then(response => {
    planList.value = response.rows;
    loading.value = false;
  });
}
/** æœç´¢æŒ‰é’®æ“ä½œ */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}
/** é‡ç½®æŒ‰é’®æ“ä½œ */
function resetQuery() {
  daterangePlanStartDay.value = [];
  daterangePlanEndDay.value = [];
  proxy.resetForm("queryRef");
  handleQuery();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
const handleCheckboxChange = (data) => {
  console.log(data);
};
/** æ‰¹é‡ä¿®æ”¹è®¡åˆ’开工日按钮操作 */
function plannedStart() {
}
/** æ‰¹é‡ä¿®æ”¹è®¡åˆ’完工日按钮操作 */
function plannedEnd() {
}
/** å¯¼å…¥æŒ‰é’®æ“ä½œ */
function handleImport() {
  upload.title = "气体管路计划数据上传";
  upload.open = true;
};
/** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
function handleExport() {
  proxy.download('aps/gasPiping/export', {
    ...queryParams.value
  }, `plan_${new Date().getTime()}.xlsx`)
}
/** ä¸‹è½½æ¨¡æ¿æ“ä½œ */
function importTemplate() {
  proxy.download("system/user/importTemplate", {
  }, `user_template_${new Date().getTime()}.xlsx`);
};
/** buildEexample */
function buildEexample() {
  proxy.$refs["uploadRef"].submit();
};
/**文件上传中处理 */
const handleFileUploadProgress = (event, file, fileList) => {
  upload.isUploading = true;
};
/** æ–‡ä»¶ä¸Šä¼ æˆåŠŸå¤„ç† */
const handleFileSuccess = (response, file, fileList) => {
  if(response.code == '200'){
    batchNumber.value = response.data;
    isVisible.value = true;
    planned.value = false;
    isError.value = false;
    getExampleList();
  }else{
    isError.value = true;
    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
  }
  proxy.$refs["uploadRef"].handleRemove(file);
  upload.isUploading = false;
};
/** ä¸Šä¼ å¹¶è§£æžæŒ‰é’®æ“ä½œ */
function uploadParse() {
  queryParams.value.params = {};
  queryParams.value.params["batchNumber"] = batchNumber.value;
  confirmPart(queryParams.value).then(response => {
    exampleList.value = response.rows;
    loading.value = false;
    isVisible.value = false;
    isError.value = false;
    planned.value = true;
    upload.open = false;
    ElMessage({
      message: '气体管路计划数据已成功上传和解析',
      type: 'success',
    })
    getList();
  });
}
/** dialog取消 */
function dialogCancel(){
  if (uploadRef.value) {
    uploadRef.value.clearFiles();
  }
  isVisible.value = false;
  isError.value = false;
  planned.value = true;
  upload.open = false;
  upload.isUploading = false;
}
getList();
</script>
<style lang="css" scoped>
h4 {
  font-weight: bold;
}
</style>