马宇豪
2024-04-02 d91fd1557ebed3e9bcb8c051c71b9d41c0e36eef
src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue
@@ -4,30 +4,47 @@
<!--            <el-tab-pane label="申请中" name="1">-->
                <div style="height: 100%">
                    <el-row class="homeCard">
                      <div class="basic-line" style="display:flex;white-space:nowrap;line-height: 40px">
                        <span>时间筛选:</span>
                        <el-date-picker v-model="timeRange" value-format="YYYY-MM-DD" type="daterange" @change="giveTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
                      </div>
                      <div class="basic-line" style="display:flex;white-space:nowrap;line-height: 40px">
                        <span>负责人:</span>
                        <el-input v-model="searPara.headUserName" placeholder="负责人"/>
                      </div>
                      <div class="basic-line">
                        <span>事业部:</span>
                        <el-select v-model="searPara.secondDepId">
                          <el-option
                              v-for="item in dep4List"
                              :key="item.id"
                              :label="item.name"
                              :value="item.id"
                          />
                        </el-select>
                      </div>
                      <div class="basic-line">
                        <span>作业类型:</span>
                        <el-col :span="10">
                            <div class="grid-content topInfo">
                                <el-select v-model="searchWord">
                                    <el-option
                                            v-for="item in workType"
                                            :key="item.id"
                                            :label="item.name"
                                            :value="item.id"
                                    />
                                </el-select>
                                <el-button type="primary" @click="searchRecord">查询</el-button>
                                <el-button plain @click="clearSearch">重置</el-button>
                            </div>
                        </el-col>
                        <el-select v-model="searPara.workType">
                          <el-option
                              v-for="item in workType"
                              :key="item.id"
                              :label="item.name"
                              :value="item.id"
                          />
                        </el-select>
                      </div>
                      <div style="margin-left: 20px">
                        <el-button type="primary" @click="searchRecord">查询</el-button>
                        <el-button plain @click="clearSearch">重置</el-button>
                      </div>
                    </el-row>
                    <div class="homeCard">
                        <div class="main-card">
                            <el-row class="cardTop">
                                <el-col :span="12" class="mainCardBtn">
                                    <el-button type="primary" :icon="Plus" size="default" @click="toApply()">申请</el-button>
                                    <!--                           <el-button type="danger" :icon="Delete" size="default">删除</el-button>-->
                                    <!--                           <el-button type="success" size="default">设置分类</el-button>-->
                                    <el-button type="primary" :icon="Download" size="default" @click="exportSheet()">导出记录</el-button>
                                </el-col>
                                <el-button type="primary" :icon="Refresh" size="default" @click="reLoadData()" />
                            </el-row>
@@ -71,15 +88,18 @@
                                </el-table-column>
                                <el-table-column label="风险研判" align="center">
                                    <template #default="scope">
                                        <el-tag>{{ statusList.find(i=>i.value === scope.row.status)?.label }}</el-tag>
                                        <el-button v-if="scope.row.status == 0" link type="primary" size="small" @click="openReport('上传', scope.row)">上传研判报告</el-button>
                                        <el-tag type="danger" v-else-if="scope.row.status == -1">已废止</el-tag>
                                        <el-button v-else link type="primary" size="small" @click="openReport('查看', scope.row)">查看研判报告</el-button>
                                    </template>
                                </el-table-column>
                                <el-table-column fixed="right" label="操作" align="center" width="300">
                                <el-table-column fixed="right" label="操作" align="center" width="150">
                                    <template #default="scope">
                                        <el-button link type="danger" size="small" :icon="Delete" @click="deleteRecordBtn(scope.row)">作废</el-button>
                                        <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button>
                                        <el-button link type="success" size="small" :icon="Finished">修改</el-button>
                                        <el-button link type="success" size="small" :icon="Download">正式办票</el-button>
                                        <span v-if="scope.row.status == -1">已废止</span>
                                        <el-button v-if="scope.row.status == 0 || scope.row.status == 1" link type="danger" size="small" :icon="Delete" @click="abortRecordBtn(scope.row)">作废</el-button>
                                        <el-button v-if="scope.row.status !== -1" link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button>
                                        <el-button link type="primary" size="small" v-throttle :icon="Edit" @click="openEdit(scope.row)">修改</el-button>
                                        <el-button link type="success" v-throttle v-if="scope.row.status == 0 || scope.row.status == 1" size="small" :icon="Download" @click="checkTicket(scope.row)">正式办票</el-button>
<!--                                        <el-button :disabled="scope.row.status == 7 ? false : true" link type="primary" size="small" :icon="Download" @click="downLoadBtn(scope.row)">导出作业票</el-button>-->
                                    </template>
                                </el-table-column>
@@ -102,133 +122,19 @@
                  <detail-log :type=dialogType :statusList=statusList :details = details></detail-log>
                    <template #footer>
                      <span class="dialog-footer">
                        <el-button type="primary" @click="dialogDetails = false"
                        >确认</el-button
                        >
                        <el-button type="primary" @click="dialogDetails = false">确认</el-button>
                      </span>
                    </template>
                </el-dialog>
                <el-dialog v-model="dialogStatus" title="作业申请进度" width="60%">
                    <el-form v-if="approveInfo.operators.length > 0" style="margin-bottom: 40px">
                        <el-form-item label="申请作业人">
                            <el-input v-model="approveInfo.operators" readonly type="textarea" />
                        </el-form-item>
                    </el-form>
                    <div style="display: flex; flex-direction: column-reverse">
                        <div v-for="(item, index) in approveInfo.approvalSteps" class="stepItem">
                            <div class="stepNum">{{ item.stepSerial }}</div>
                            <div class="stepCard">
                                <el-card class="box-card" shadow="always">
                                    <div class="text">
                                        审批结果:<span class="bold-text">{{ item.approvalResultDesc }}</span>
                                    </div>
                                    <div class="text">
                                        审批类型:<span class="bold-text">{{ item.typeDesc }}</span>
                                    </div>
                                    <div class="text" v-if="item.auditTypeDesc">
                                        审批类型:<span class="bold-text">{{ item.auditTypeDesc }}</span>
                                    </div>
                                    <div class="text" v-show="item.startApprovalTime != null">
                                        开始时间:<span>{{ item.startApprovalTime }}</span>
                                    </div>
                                    <div class="approveUnit">
                                        <div class="item-tit"><span>审批人</span><span>审批状态</span></div>
                                        <div class="item-cont" v-for="i in item.stepUnits">
                                            <span>{{ i.approvalUname }}</span
                                            ><span>{{ i.resultDesc }}</span>
                                        </div>
                                    </div>
                                    <div class="approveItem">
                                        <div class="item-tit">
                                            <span>审批项目</span>
<!--                                            <span>类型</span>-->
                                            <div>措施标准</div>
                                        </div>
                                        <div class="item-cont" v-for="i in item.stepItems">
                                            <span>{{ i.itemName }}</span>
<!--                                            <span>{{ i.typeDesc }}</span>-->
                                            <div v-if="i.measure !== null">
                                                <div>
                                                    <span>作业类型:</span><span>{{ i.measure.workTypeDesc }}</span>
                                                </div>
                                                <div>
                                                    <span>措施内容:</span><span>{{ i.measure.context }}</span>
                                                </div>
                                            </div>
                                            <div v-if="i.stand !== null">
                                                <div>
                                                    <span>标题名称:</span><span>{{ i.stand.title }}</span>
                                                </div>
                                                <div>
                                                    <span>标准内容:</span><span>{{ i.stand.typeDesc }}</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="text" v-show="item.expFinishApprovalTime && item.expFinishApprovalTime != null">
                                        期望结束时间:<span>{{ item.expFinishApprovalTime }}</span>
                                    </div>
                                    <div class="text" v-show="item.finishApprovalTime != null">
                                        结束时间:<span>{{ item.finishApprovalTime }}</span>
                                    </div>
                                </el-card>
                            </div>
                        </div>
                    </div>
                </el-dialog>
                <el-dialog v-model="deleteDialog" title="提示" width="30%" center>
                    <span>您确定要取消该条申请吗?</span>
                    <template #footer>
                        <span class="dialog-footer">
                            <el-button @click="deleteDialog = false" size="default">取消</el-button>
                            <el-button type="primary" @click="conFirmDelete" size="default">确认</el-button>
                        </span>
                    </template>
                </el-dialog>
                <el-dialog v-model="downLoadDialog" title="提示" width="30%" center>
                    <span>您确定要导出该条记录吗?</span>
                    <template #footer>
                                <span class="dialog-footer">
                                    <el-button @click="downLoadDialog = false" size="default">取消</el-button>
                                    <el-button type="primary" @click="conFirmDownLoad" size="default">确认</el-button>
                                </span>
                    </template>
                </el-dialog>
<!--            </el-tab-pane>-->
<!--            <el-tab-pane label="已通过" name="2">-->
<!--                <div style="height: 100%">-->
<!--                    <el-row class="homeCard">-->
<!--                        <el-col :span="8">-->
<!--                            <div class="grid-content topInfo">-->
<!--                                <el-input v-model="searchWord" placeholder="作业证名称"></el-input>-->
<!--                                <el-button type="primary">查询</el-button>-->
<!--                                <el-button plain>重置</el-button>-->
<!--                            </div>-->
<!--                        </el-col>-->
<!--                    </el-row>-->
<!--                    <div class="homeCard">-->
<!--                        <div class="main-card">-->
<!--                            <el-table ref="multipleTableRef" :data="passedData" style="width: 100%" height="calc(100% - 48px)" :header-cell-style="{ background: '#fafafa' }" @selection-change="handleSelectionChange">-->
<!--                                <el-table-column type="selection" width="55" />-->
<!--                                <el-table-column type="index" label="编号" width="200" />-->
<!--                                <el-table-column property="level" label="作业证等级" width="180" sortable />-->
<!--                                <el-table-column property="applyDate" label="申请日期" sortable />-->
<!--                                <el-table-column property="name" label="申请人" width="180" />-->
<!--                                <el-table-column property="department" label="申请部门" width="180" />-->
<!--                                <el-table-column label="申请状态" width="180">-->
<!--                                    <template #default="scope">-->
<!--                                        <el-tag type="success">{{ scope.row.status }}</el-tag>-->
<!--                                    </template>-->
<!--                                </el-table-column>-->
<!--                            </el-table>-->
<!--                            <div class="pageBtn">-->
<!--                                <el-pagination v-model:currentPage="pageIndex2" v-model:page-size="pageSize2" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize2" @size-change="handleSizeChange2" @current-change="handleCurrentChange2" />-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </el-tab-pane>-->
<!--        </el-tabs>-->
                <report-log ref="reportDialogRef" @refresh="getListByPage"></report-log>
                <fire-dialog ref="fireRef" :lists="lists" @refresh="getListByPage"></fire-dialog>
                <plate-dialog ref="plateRef" :lists="lists" @refresh="getListByPage"></plate-dialog>
                <space-dialog ref="spaceRef" :lists="lists" @refresh="getListByPage"></space-dialog>
                <hoist-dialog ref="hoistRef" :lists="lists" @refresh="getListByPage"></hoist-dialog>
                <ground-dialog ref="groundRef" :lists="lists" @refresh="getListByPage"></ground-dialog>
                <broken-dialog ref="brokenRef" :lists="lists" @refresh="getListByPage"></broken-dialog>
                <height-dialog ref="heightRef" :lists="lists" @refresh="getListByPage"></height-dialog>
      <power-dialog ref="powerRef" :lists="lists" @refresh="getListByPage"></power-dialog>
    </div>
</template>
@@ -241,7 +147,7 @@
import { useRouter } from 'vue-router';
import { Edit, View, Plus, Delete, Refresh, Search, Finished, Download } from '@element-plus/icons-vue';
import { ElTable } from 'element-plus';
import { FormInstance, FormRules, ElMessage } from 'element-plus';
import { FormInstance, FormRules, ElMessage, ElMessageBox } from 'element-plus';
import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
import type { TabsPaneContext } from 'element-plus';
import {teamManageApi} from "/@/api/systemManage/basicDateManage/personShiftManage/teamManage";
@@ -257,15 +163,11 @@
    approveInfo: Object;
    dialogDetails: boolean;
    dialogStatus: boolean;
    deleteDialog: boolean;
    downLoadDialog: boolean;
    pageIndex1: number;
    pageSize1: number;
    chosenIndex: null | number;
    deleteId: null | number;
    downLoadId: null | number;
    downLoadName: string;
    searchWord: string;
    totalSize1: number;
    activeName: string;
    addRecord: {};
@@ -276,6 +178,10 @@
    departmentList: Array<any>;
    departmentRecursionList: Array<DepartmentState>;
    statusList: Array<any>;
    searPara: {}
    timeRange: Array<string>;
    dep4List: Array<type>;
    lists: {}
}
interface type {
    id: number;
@@ -288,20 +194,30 @@
export default defineComponent({
    name: 'myApply',
    components: {
        // fire: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/fireLog.vue')),
        // space: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/spaceLog.vue')),
        // hoist: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/hoistLog.vue')),
        // ground: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/groundLog.vue')),
        // broken: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/brokenLog.vue')),
        // height: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/heightLog.vue')),
        // power: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/powerLog.vue')),
        // plate: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/plateLog.vue'))
      detailLog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/detailLog.vue'))
      detailLog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/detailLog.vue')),
      reportLog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/jsaReportDialog.vue')),
      fireDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/fireDialog.vue')),
      plateDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/plateDialog.vue')),
      spaceDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/spaceDialog.vue')),
      hoistDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/hoistDialog.vue')),
      groundDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/groundDialog.vue')),
      brokenDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/brokenDialog.vue')),
      heightDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/heightDialog.vue')),
      powerDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/powerDialog.vue'))
    },
    setup() {
        const userInfo = useUserInfo();
        const { userInfos } = storeToRefs(userInfo);
        const router = useRouter();
        const reportDialogRef = ref();
        const fireRef = ref()
        const plateRef = ref()
        const spaceRef = ref()
        const hoistRef = ref()
        const groundRef = ref()
        const brokenRef = ref()
        const heightRef = ref()
        const powerRef = ref()
        const state = reactive<stateType>({
            pageIndex1: 1,
            pageSize1: 10,
@@ -311,7 +227,14 @@
            departmentList: [],
            departmentRecursionList: [],
            chosenIndex: null,
            searchWord: '',
            searPara:{
              startTime: '',
              endTime: '',
              workType: null,
              headUserName: '',
              secondDepId: null
            },
            timeRange: [],
            applyData: [],
            workTimeList: [],
            multipleSelection: [],
@@ -321,12 +244,9 @@
            },
            dialogDetails: false,
            dialogStatus: false,
            deleteDialog: false,
            downLoadDialog: false,
            addRecord: {},
            details: {},
            statusInfo: {},
            deleteId: null,
            downLoadId: null,
            downLoadName: '',
            deleteArr: [],
@@ -340,6 +260,21 @@
                { id: 7, name: '临时用电作业' },
                { id: 8, name: '盲板抽堵作业' }
            ],
          lists: {
            workerList: [],
            departList: [],
            departList2: [],
            deviceList: [],
            otherWorks: [],
            spList: [],
            riskList: []
          },
          dep4List: [
            {id:49,name:'电石事业部'},
            {id:50,name:'电力事业部'},
            {id:48,name:'有机化工事业部'},
            {id:32,name:'甲醇事业部'}
          ],
          statusList: [
            {
              value: -1,
@@ -387,11 +322,130 @@
            }
          ]
        });
        interface User {
            name: string;
            list: [];
            info: string;
      // 页面载入时执行方法
      onMounted(() => {
        getListByPage();
        getAllDepartment()
        spWorker()
        getAll()
        getAllDevice()
        getAllRisks()
        getOtherWork()
      });
        const openEdit = (row)=>{
          if(row.workType == 1){
            fireRef.value.openDialog(row)
          }
          if(row.workType == 2){
            spaceRef.value.openDialog(row)
          }
          if(row.workType == 3){
            hoistRef.value.openDialog(row)
          }
          if(row.workType == 4){
            groundRef.value.openDialog(row)
          }
          if(row.workType == 5){
            brokenRef.value.openDialog(row)
          }
          if(row.workType == 6){
            heightRef.value.openDialog(row)
          }
          if(row.workType == 7){
            powerRef.value.openDialog(row)
          }
          if(row.workType == 8){
            plateRef.value.openDialog(row)
          }
        }
      const spWorker = async ()=>{
        for(let id of ['17','18','19']){
          const res = await workApplyApi().getSpList({roleId: id})
          if(id == '17'){
            if (res.data.code === '200') {
              state.lists.spList.opList = JSON.parse(JSON.stringify(res.data.data))
            } else {
              ElMessage({
                type: 'warning',
                message: res.data.msg
              });
            }
          }
          if(id == '18'){
            if (res.data.code === '200') {
              state.lists.spList.jhList = JSON.parse(JSON.stringify(res.data.data))
            } else {
              ElMessage({
                type: 'warning',
                message: res.data.msg
              });
            }
          }
          if(id == '19'){
            if (res.data.code === '200') {
              state.lists.spList.sfList = JSON.parse(JSON.stringify(res.data.data))
            } else {
              ElMessage({
                type: 'warning',
                message: res.data.msg
              });
            }
          }
        }
      }
      // 获取用户列表
      const getAll = async ()=>{
        const res = await workApplyApi().getAllUsers()
        if (res.data.code === '200') {
          state.lists.workerList = JSON.parse(JSON.stringify(res.data.data))
        } else {
          ElMessage({
            type: 'warning',
            message: res.data.msg
          });
        }
      };
      // 获取设备列表
      const getAllDevice = async ()=>{
        const res = await workApplyApi().getAllDevices()
        if (res.data.code === '200') {
          state.lists.deviceList = JSON.parse(JSON.stringify(res.data.data))
        } else {
          ElMessage({
            type: 'warning',
            message: res.data.msg
          });
        }
      }
      // 获取设备列表
      const getAllRisks = async ()=>{
        const res = await workApplyApi().getAllRiskIdentity()
        if (res.data.code === '200') {
          // state.allDevices = JSON.parse(JSON.stringify(res.data.data))
          state.lists.riskList = JSON.parse(JSON.stringify(res.data.data))
        } else {
          ElMessage({
            type: 'warning',
            message: res.data.msg
          });
        }
      }
        const giveTime = () => {
          if (state.timeRange && state.timeRange !== null) {
            state.searPara.startTime = state.timeRange[0];
            state.searPara.endTime = state.timeRange[1]
          } else {
            state.searPara.startTime = '';
            state.searPara.endTime = '';
          }
        };
        // 刷新
        const reLoadData = async () => {
@@ -414,12 +468,25 @@
            if (res.data.code === '200') {
                state.departmentList = JSON.parse(JSON.stringify(res.data.data))
                recursion(state.departmentList);
                state.lists.departList = JSON.parse(JSON.stringify(res.data.data))
                state.lists.departList2 = JSON.parse(JSON.stringify(res.data.data))[0].children[0].children.filter(i=>i.depId == 32 || i.depId == 48 || i.depId == 49 || i.depId == 50)
            } else {
                ElMessage({
                    type: 'warning',
                    message: res.data.msg
                });
            }
        };
        const getOtherWork = async () => {
          let res = await workApplyApi().getOtherWork({workPermitNo: '',workType: null});
          if (res.data.code === '200') {
            state.lists.otherWorks = JSON.parse(JSON.stringify(res.data.data))
          } else {
            ElMessage({
              type: 'warning',
              message: res.data.msg
            });
          }
        };
        const recursion = (value: any) => {
@@ -435,7 +502,7 @@
        // 分页获取
        const getListByPage = async () => {
            const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { workType: state.searchWord } };
            const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: state.searPara };
            let res = await workApplyApi().getNewApplyListPage(data);
            if (res.data.code === '200') {
                state.applyData = JSON.parse(JSON.stringify(res.data.data));
@@ -475,19 +542,20 @@
        // 关键词查询记录
        const searchRecord = async () => {
            if (state.searchWord == '') {
                ElMessage({
                    type: 'warning',
                    message: '请输入查询关键词'
                });
            } else {
                getListByPage();
            }
          state.pageIndex1 = 1
          getListByPage();
        };
        // 重置搜索
        const clearSearch = async () => {
            state.searchWord = '';
            getListByPage();
          state.timeRange = []
          state.searPara = {
            startTime: '',
            endTime: '',
            workType: null,
            headUserName: '',
            secondDepId: null
          };
          getListByPage();
        };
        // 查看进度
@@ -510,50 +578,85 @@
            }
        };
        const deleteRecordBtn = (row) => {
            state.deleteId = row.workApplyId;
            state.deleteDialog = true;
        };
        // 取消申请方法
        const deleteRecord = async (data: any) => {
            let res = await workApplyApi().cancelApply(data);
            if (res.data.code === '200') {
                ElMessage({
        const abortRecordBtn = (row:object) => {
          ElMessageBox.confirm(
              '是否作废该项申报?',
              '申报作废',
              {
                confirmButtonText: '确认',
                cancelButtonText: '取消'
              }
          )
              .then(async () => {
                let res = await workApplyApi().abolishTicket({id: row.id});
                if (res.data.code === '200') {
                  ElMessage({
                    type: 'success',
                    message: '删除成功!'
                });
                getListByPage();
            } else {
                ElMessage({
                    message: '作废成功!'
                  });
                  getListByPage();
                } else {
                  ElMessage({
                    type: 'warning',
                    message: res.data.msg
                });
            }
                  });
                }
              })
              .catch(() => {
                console.log('取消废票')
              })
        };
        const conFirmDelete = () => {
            deleteRecord({ workApplyId: state.deleteId });
            state.deleteDialog = false;
        };
        // 正式办票
        const checkTicket = (row:object) =>{
          ElMessageBox.confirm(
              '是否进行正式办票操作?',
              '正式办票',
              {
                confirmButtonText: '确认',
                cancelButtonText: '取消'
              }
          )
              .then(async () => {
                let res = await workApplyApi().checkTicket({id: row.id});
                if (res.data.code === '200') {
                  ElMessage({
                    type: 'success',
                    message: '办票成功!'
                  });
                  getListByPage();
                } else {
                  ElMessage({
                    type: 'warning',
                    message: res.data.msg
                  });
                }
              })
              .catch(() => {
                console.log('取消办票')
              })
        }
        // 导出图表
        const downLoadBtn = (row:any) =>{
            state.downLoadId = row.workApplyId;
            state.downLoadName = row.workTypeDesc + row.workPermitNo
            state.downLoadDialog = true;
        }
        // 导出方法
        const downLoadRecord = async (data: any) => {
        const exportSheet = async () => {
            // let res = await workApplyApi().postPrinting(data);
            axios.post(import.meta.env.VITE_API_URL + `/work/apply/printingPdf`,data,{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{
            axios.post(import.meta.env.VITE_API_URL + `/specialwork9step/work/export/excel`,{startTime: state.searPara.startTime,endTime: state.searPara.endTime,secondDepId: state.searPara.secondDepId},{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{
                if (res) {
                    const link = document.createElement('a')
                    let blob = new Blob([res.data],{type: 'application/pdf'})
                    let blob = new Blob([res.data],{type: 'application/excel'})
                    link.style.display = "none";
                    link.href = URL.createObjectURL(blob); // 创建URL
                    link.setAttribute("download", state.downLoadName + "作业证.pdf");
                    if(state.searPara.startTime !== '' && state.searPara.endTime !==''){
                      link.setAttribute("download", state.searPara.startTime + '—' + state.searPara.endTime +"作业申报记录.xlsx")
                    }else{
                      link.setAttribute("download", "作业申报记录.xlsx")
                    }
                    document.body.appendChild(link);
                    link.click();
                    document.body.removeChild(link);
@@ -567,11 +670,6 @@
        };
        const conFirmDownLoad = () => {
            downLoadRecord({ applyWorkId: state.downLoadId });
            state.downLoadDialog = false;
        };
        const handleSizeChange1 = (val: number) => {
            state.pageSize1 = val;
            getListByPage();
@@ -579,6 +677,10 @@
        const handleCurrentChange1 = (val: number) => {
            state.pageIndex1 = val;
            getListByPage();
        };
        const openReport = (type: string, value: {}) => {
          reportDialogRef.value.showReportDialog(type, value);
        };
        // 查看记录
@@ -595,12 +697,6 @@
            await initBackEndControlRoutes();
        };
        // 页面载入时执行方法
        onMounted(() => {
            getListByPage();
            getAllDepartment()
        });
        return {
            View,
            Edit,
@@ -609,18 +705,31 @@
            Plus,
            Finished,
            Download,
          reportDialogRef,
          fireRef,
          plateRef,
          spaceRef,
          hoistRef,
          groundRef,
          brokenRef,
          heightRef,
          powerRef,
          openEdit,
          getAllDepartment,
          checkTicket,
            giveTime,
            reLoadData,
            toApply,
            handleClick,
            toNames,
            searchRecord,
            clearSearch,
            openReport,
            viewRecord,
            viewStatus,
            deleteRecordBtn,
            abortRecordBtn,
            downLoadBtn,
            conFirmDelete,
            conFirmDownLoad,
            exportSheet,
            getListByPage,
            handleSizeChange1,
            handleCurrentChange1,
@@ -683,208 +792,6 @@
        }
        &:last-of-type {
            height: calc(100% - 100px);
        }
    }
    .stepItem {
        display: flex;
        align-items: flex-start;
        margin-top: 30px;
        margin-left: 30px;
        padding-bottom: 30px;
        padding-left: 40px;
        border-left: 1px solid #a0cfff;
        position: relative;
        &:first-of-type {
            margin-top: 30px;
        }
        &:first-of-type {
            margin-bottom: 0;
            border-left: none;
        }
        .stepNum {
            position: absolute;
            width: 40px;
            height: 40px;
            border-radius: 20px;
            box-sizing: border-box;
            font-size: 18px;
            color: #333;
            border: 1px solid #a0cfff;
            line-height: 38px;
            text-align: center;
            left: -20px;
            top: -30px;
            background: #d9ecff;
        }
        .stepCard {
            width: 100%;
            margin-top: -30px;
            .box-card {
                width: 100%;
                .card-header {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    span {
                        font-weight: bold;
                        margin-left: 10px;
                    }
                }
                .text {
                    width: 100%;
                    font-size: 14px;
                    margin-bottom: 10px;
                    padding-left: 10px;
                    span {
                        color: #409eff;
                    }
                    .bold-text{
                        font-weight: bolder;
                    }
                    &:last-of-type {
                        margin-bottom: 0;
                    }
                }
                .approveUnit {
                    width: 100%;
                    font-size: 14px;
                    margin-bottom: 20px;
                    padding: 10px 15px;
                    border: 1px solid #fff;
                    background: #ecf8ff;
                    border-radius: 6px;
                    .item-tit {
                        width: 100%;
                        display: flex;
                        color: #409eff;
                        align-items: flex-start;
                        justify-content: space-between;
                        padding-bottom: 10px;
                        border-bottom: 1px solid #a0cfff;
                        & > span {
                            flex: 1;
                            &:last-of-type{
                                text-align: center;
                            }
                        }
                        & > div {
                            flex: 1;
                            text-align: center;
                        }
                    }
                    .item-cont {
                        width: 100%;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        padding: 10px 0;
                        border-bottom: 1px solid #c6e2ff;
                        & > span {
                            flex: 1;
                            &:last-of-type{
                                text-align: center;
                            }
                        }
                        & > div {
                            flex: 1;
                            text-align: center;
                            & > div {
                                text-align: left;
                                width: 100%;
                                display: flex;
                                justify-content: center;
                                align-items: center;
                                span {
                                    width: 45%;
                                    &:first-of-type {
                                        width: 30%;
                                    }
                                }
                            }
                        }
                        &:last-of-type {
                            border-bottom: 0;
                        }
                    }
                }
                .approveItem {
                    width: 100%;
                    font-size: 14px;
                    margin-bottom: 20px;
                    padding: 10px 15px;
                    background: #ecf8ff;
                    border: 1px solid #fff;
                    border-radius: 6px;
                    .item-tit {
                        width: 100%;
                        display: flex;
                        color: #409eff;
                        align-items: flex-start;
                        justify-content: space-between;
                        padding-bottom: 10px;
                        border-bottom: 1px solid #a0cfff;
                        & > span {
                            flex: 1;
                        }
                        & > div {
                            flex: 2;
                            text-align: center;
                        }
                    }
                    .item-cont {
                        width: 100%;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        padding: 10px 0;
                        border-bottom: 1px solid #c6e2ff;
                        & > span {
                            flex: 1;
                        }
                        & > div {
                            flex: 2;
                            text-align: center;
                            & > div {
                                text-align: left;
                                width: 100%;
                                display: flex;
                                justify-content: center;
                                align-items: flex-start;
                                margin-bottom: 10px;
                                span {
                                    width: 50%;
                                    &:first-of-type {
                                        width: 25%;
                                    }
                                }
                            }
                        }
                        &:last-of-type {
                            border-bottom: 0;
                        }
                    }
                }
            }
        }
        &:hover .card-header {
            color: #0098f5;
        }
        &:hover .stepNum {
            border: 2px solid #0098f5;
            color: #0098f5;
        }
    }
    .el-row {