|
|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-tabs v-model="activeTab" type="border-card" @tab-change="handleTabChange">
|
|
|
- <el-tab-pane label="本单位工程隐患" name="selfEng">
|
|
|
- <div ref="containerRef" class="table-page-wrap">
|
|
|
+ <el-tab-pane v-if="hasTabPermi('selfEng')" label="本单位工程隐患" name="selfEng">
|
|
|
+ <div class="table-page-wrap">
|
|
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
<el-form-item label="隐患名称" prop="hiddName">
|
|
|
<el-input v-model="queryParams.hiddName" placeholder="请输入" clearable style="width: 200px" @keyup.enter="handleQuery" />
|
|
|
@@ -14,6 +14,7 @@
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['hidd:objhidd:add']">新建</el-button>
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['hidd:objhidd:export']">导出</el-button>
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['hidd:objhidd:remove']">删除</el-button>
|
|
|
+ <el-button type="success" plain icon="Upload" :disabled="ids.length === 0" @click="handleReport" v-hasPermi="['hidd:objhidd:report']">上报</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -34,6 +35,11 @@
|
|
|
<dict-tag :options="hidd_clas" :value="scope.row.hiddClas" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="隐患来源" align="center" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="hidd_sour" :value="scope.row.hiddSour" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="排查日期" align="center" width="100" prop="inspDate" />
|
|
|
<el-table-column label="要求整改完成日期" align="center" width="120" prop="requCompDate" />
|
|
|
<el-table-column label="督办状态" align="center" width="90">
|
|
|
@@ -48,10 +54,10 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="200" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" @click="handleRectify(scope.row)">整改</el-button>
|
|
|
- <el-button v-if="scope.row.hiddStat==='2' && scope.row.supStat==='1' && scope.row.cancelState==='0'" link type="warning" @click="handleCancelApply(scope.row)">销号申请</el-button>
|
|
|
- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" />
|
|
|
- <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" />
|
|
|
+ <el-button v-if="scope.row.hiddStat==='0' || scope.row.hiddStat==='1'" link type="primary" v-hasPermi="['hidd:objhidd:rectify']" @click="handleRectify(scope.row)">整改</el-button>
|
|
|
+ <el-button v-if="scope.row.hiddStat==='2' && scope.row.supStat==='1' && scope.row.cancelState==='0'" link type="warning" v-hasPermi="['hidd:objhidd:writeoff']" @click="handleCancelApply(scope.row)">销号申请</el-button>
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['hidd:objhidd:edit']" />
|
|
|
+ <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['hidd:objhidd:remove']" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -61,8 +67,8 @@
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="下级单位隐患" name="subEng">
|
|
|
- <div ref="containerRef2" class="table-page-wrap">
|
|
|
+ <el-tab-pane v-if="hasTabPermi('subEng')" label="下级单位隐患" name="subEng">
|
|
|
+ <div class="table-page-wrap">
|
|
|
<el-form :model="queryParams2" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
<el-form-item label="隐患名称" prop="hiddName">
|
|
|
<el-input v-model="queryParams2.hiddName" placeholder="请输入" clearable style="width: 200px" @keyup.enter="handleQuery2" />
|
|
|
@@ -75,11 +81,15 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-left:auto;">
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport2">导出</el-button>
|
|
|
+ <el-button type="primary" plain icon="Position" :disabled="!ids2 || ids2.length === 0" @click="handleSupFromSub" v-hasPermi="['hidd:objhidd:supervise']">督办</el-button>
|
|
|
+ <el-button type="warning" plain icon="Back" :disabled="!ids2 || ids2.length === 0" @click="handleReturnFromSub" v-hasPermi="['hidd:objhidd:return']">退回</el-button>
|
|
|
+ <el-button type="success" plain icon="Upload" :disabled="!ids2 || ids2.length === 0" @click="handleReport2" v-hasPermi="['hidd:objhidd:report']">上报</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<div class="table-wrapper">
|
|
|
- <el-table :height="tableHeight" v-loading="loading2" :data="list2" border style="width:100%" :header-cell-style="{ 'text-align': 'center' }">
|
|
|
+ <el-table :height="tableHeight" v-loading="loading2" :data="list2" border style="width:100%" :header-cell-style="{ 'text-align': 'center' }" @selection-change="rows => ids2 = rows.map(r => r.guid)">
|
|
|
+ <el-table-column type="selection" width="50" align="center" />
|
|
|
<el-table-column label="序号" align="center" type="index" width="60" />
|
|
|
<el-table-column label="排查单位" align="center" prop="orgName" min-width="140" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="隐患名称" align="center" prop="hiddName" min-width="160" :show-overflow-tooltip="true" />
|
|
|
@@ -89,6 +99,11 @@
|
|
|
<dict-tag :options="hidd_clas" :value="scope.row.hiddClas" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="隐患来源" align="center" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="hidd_sour" :value="scope.row.hiddSour" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="录入时间" align="center" width="100" prop="collTime" />
|
|
|
<el-table-column label="排查日期" align="center" width="100" prop="inspDate" />
|
|
|
<el-table-column label="要求完成整改日期" align="center" width="130" prop="requCompDate" />
|
|
|
@@ -109,8 +124,8 @@
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="本单位标段隐患" name="bidEng">
|
|
|
- <div ref="containerRef3" class="table-page-wrap">
|
|
|
+ <el-tab-pane v-if="hasTabPermi('bidEng')" label="本单位标段隐患" name="bidEng">
|
|
|
+ <div class="table-page-wrap">
|
|
|
<el-form :model="queryParams3" ref="queryRef3" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
<el-form-item label="隐患名称" prop="hiddName">
|
|
|
<el-input v-model="queryParams3.hiddName" placeholder="请输入" clearable style="width: 200px" @keyup.enter="handleQuery3" />
|
|
|
@@ -122,6 +137,7 @@
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd3">新建</el-button>
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport3">导出</el-button>
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple3" @click="handleDelete3">删除</el-button>
|
|
|
+ <el-button type="success" plain icon="Upload" :disabled="ids3.length === 0" @click="handleReport3" v-hasPermi="['hidd:objhidd:report']">上报</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -142,6 +158,11 @@
|
|
|
<dict-tag :options="hidd_clas" :value="scope.row.hiddClas" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="隐患来源" align="center" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="hidd_sour" :value="scope.row.hiddSour" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="录入时间" align="center" width="100" prop="collTime" />
|
|
|
<el-table-column label="排查日期" align="center" width="100" prop="inspDate" />
|
|
|
<el-table-column label="要求整改完成日期" align="center" width="130" prop="requCompDate" />
|
|
|
@@ -157,9 +178,10 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="150" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" @click="handleRectify(scope.row)">整改</el-button>
|
|
|
- <el-button link type="primary" icon="Edit" @click="handleUpdate3(scope.row)" />
|
|
|
- <el-button link type="danger" icon="Delete" @click="handleDelete3(scope.row)" />
|
|
|
+ <el-button v-if="scope.row.hiddStat==='0' || scope.row.hiddStat==='1'" link type="primary" v-hasPermi="['hidd:objhidd:rectify']" @click="handleRectify(scope.row)">整改</el-button>
|
|
|
+ <el-button v-if="scope.row.hiddStat==='2' && scope.row.supStat==='1' && scope.row.cancelState==='0'" link type="warning" v-hasPermi="['hidd:objhidd:writeoff']" @click="handleCancelApply(scope.row)">销号申请</el-button>
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate3(scope.row)" v-hasPermi="['hidd:objhidd:edit']" />
|
|
|
+ <el-button link type="danger" icon="Delete" @click="handleDelete3(scope.row)" v-hasPermi="['hidd:objhidd:remove']" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -169,8 +191,8 @@
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="施工单位隐患" name="consEng">
|
|
|
- <div ref="containerRef4" class="table-page-wrap">
|
|
|
+ <el-tab-pane v-if="hasTabPermi('consEng')" label="施工单位隐患" name="consEng">
|
|
|
+ <div class="table-page-wrap">
|
|
|
<el-form :model="queryParams4" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
<el-form-item label="隐患名称" prop="hiddName">
|
|
|
<el-input v-model="queryParams4.hiddName" placeholder="请输入" clearable style="width: 200px" @keyup.enter="handleQuery4" />
|
|
|
@@ -185,6 +207,7 @@
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd4">新建</el-button>
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport4">导出</el-button>
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple4" @click="handleDelete4">删除</el-button>
|
|
|
+ <el-button type="success" plain icon="Upload" :disabled="ids4.length === 0" @click="handleReport4" v-hasPermi="['hidd:objhidd:report']">上报</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -205,6 +228,11 @@
|
|
|
<dict-tag :options="hidd_clas" :value="scope.row.hiddClas" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="隐患来源" align="center" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="hidd_sour" :value="scope.row.hiddSour" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="录入时间" align="center" width="100" prop="collTime" />
|
|
|
<el-table-column label="排查日期" align="center" width="100" prop="inspDate" />
|
|
|
<el-table-column label="要求整改完成日期" align="center" width="130" prop="requCompDate" />
|
|
|
@@ -220,8 +248,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="100" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" icon="Edit" @click="handleUpdate4(scope.row)" />
|
|
|
- <el-button link type="danger" icon="Delete" @click="handleDelete4(scope.row)" />
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate4(scope.row)" v-hasPermi="['hidd:objhidd:edit']" />
|
|
|
+ <el-button link type="danger" icon="Delete" @click="handleDelete4(scope.row)" v-hasPermi="['hidd:objhidd:remove']" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -231,8 +259,8 @@
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="参建单位隐患" name="partEng">
|
|
|
- <div ref="containerRef5" class="table-page-wrap">
|
|
|
+ <el-tab-pane v-if="hasTabPermi('partEng')" label="参建单位隐患" name="partEng">
|
|
|
+ <div class="table-page-wrap">
|
|
|
<el-form :model="queryParams5" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
<el-form-item label="隐患名称" prop="hiddName">
|
|
|
<el-input v-model="queryParams5.hiddName" placeholder="请输入" clearable style="width: 200px" @keyup.enter="handleQuery5" />
|
|
|
@@ -247,6 +275,7 @@
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd5">新建</el-button>
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport5">导出</el-button>
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple5" @click="handleDelete5">删除</el-button>
|
|
|
+ <el-button type="success" plain icon="Upload" :disabled="ids5.length === 0" @click="handleReport5" v-hasPermi="['hidd:objhidd:report']">上报</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -267,6 +296,11 @@
|
|
|
<dict-tag :options="hidd_clas" :value="scope.row.hiddClas" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="隐患来源" align="center" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="hidd_sour" :value="scope.row.hiddSour" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="录入时间" align="center" width="100" prop="collTime" />
|
|
|
<el-table-column label="排查日期" align="center" width="100" prop="inspDate" />
|
|
|
<el-table-column label="要求整改完成日期" align="center" width="130" prop="requCompDate" />
|
|
|
@@ -282,8 +316,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="100" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" icon="Edit" @click="handleUpdate5(scope.row)" />
|
|
|
- <el-button link type="danger" icon="Delete" @click="handleDelete5(scope.row)" />
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate5(scope.row)" v-hasPermi="['hidd:objhidd:edit']" />
|
|
|
+ <el-button link type="danger" icon="Delete" @click="handleDelete5(scope.row)" v-hasPermi="['hidd:objhidd:remove']" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -516,7 +550,7 @@
|
|
|
<tr>
|
|
|
<td class="label-cell"><span class="required">*</span>隐患名称</td>
|
|
|
<td class="value-cell">
|
|
|
- <el-input v-model="form.hiddName" placeholder="请输入隐患名称" size="small" />
|
|
|
+ <el-autocomplete v-model="form.hiddName" :fetch-suggestions="queryHiddName" placeholder="请输入隐患名称(支持模糊搜索)" size="small" :trigger-on-focus="true" clearable style="width:100%" />
|
|
|
</td>
|
|
|
<td class="label-cell"><span class="required">*</span>排查日期</td>
|
|
|
<td class="value-cell">
|
|
|
@@ -563,6 +597,14 @@
|
|
|
</el-select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <td class="label-cell"><span class="required">*</span>隐患来源</td>
|
|
|
+ <td class="value-cell" colspan="3">
|
|
|
+ <el-select v-model="form.hiddSour" placeholder="请选择隐患来源" size="small" style="width:100%">
|
|
|
+ <el-option v-for="dict in hidd_sour" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
+ </el-select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<td class="label-cell"><span class="required">*</span>排查单位</td>
|
|
|
<td class="value-cell">
|
|
|
@@ -573,6 +615,15 @@
|
|
|
<el-input v-model="form.inspLeader" placeholder="请输入发现人" size="small" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ <tr v-if="activeTab === 'consEng'">
|
|
|
+ <td class="label-cell"><span class="required">*</span>目标施工单位</td>
|
|
|
+ <td class="value-cell" colspan="3">
|
|
|
+ <el-select v-model="form.orgGuid" placeholder="请选择目标施工单位" size="small" style="width:100%" filterable
|
|
|
+ @change="val => { const o = consOrgList.find(o => o.value === val); if (o) form.orgName = o.label }">
|
|
|
+ <el-option v-for="item in consOrgList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<td class="label-cell">职务</td>
|
|
|
<td class="value-cell">
|
|
|
@@ -616,27 +667,91 @@
|
|
|
<el-button type="primary" @click="submitFormDrawer" :loading="formLoading">保 存</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 退回弹窗 -->
|
|
|
+ <el-dialog title="隐患退回" v-model="returnOpen" width="500px" append-to-body>
|
|
|
+ <el-form :model="returnForm" label-width="80px">
|
|
|
+ <el-form-item label="退回说明" required>
|
|
|
+ <el-input v-model="returnForm.returnDesc" type="textarea" :rows="4" maxlength="500" show-word-limit placeholder="请输入退回说明(500字以内)" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="submitReturn">确 定</el-button>
|
|
|
+ <el-button @click="returnOpen = false">取 消</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 督办弹窗(从subEng发起) -->
|
|
|
+ <el-dialog title="隐患督办" v-model="supDialogOpen" width="700px" append-to-body>
|
|
|
+ <el-form :model="supDialogForm" label-width="100px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="隐患名称">
|
|
|
+ <el-input v-model="supDialogForm.hiddName" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="隐患级别">
|
|
|
+ <el-input :value="supDialogForm.hiddGrad === '2' ? '重大隐患' : '一般隐患'" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="督办文号" required>
|
|
|
+ <el-input v-model="supDialogForm.supLareId" placeholder="请输入督办文号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="整改期限" required>
|
|
|
+ <el-date-picker v-model="supDialogForm.rectPeri" type="date" value-format="YYYY-MM-DD" placeholder="选择整改期限" style="width:100%" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-form-item label="督办意见" required>
|
|
|
+ <el-input v-model="supDialogForm.supOpin" type="textarea" :rows="4" placeholder="请输入督办意见" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="submitSupDialog">确 定</el-button>
|
|
|
+ <el-button @click="supDialogOpen = false">取 消</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="OrgEngQuery">
|
|
|
-import { listObjHidd, delObjHidd, addObjHidd, updateObjHidd, compoundSaveHidd, getHiddGroupBy, listBisHiddRectImpl, addBisHiddRectImpl, updateBisHiddRectImpl, listBisHiddRectAcce, addBisHiddRectAcce, updateBisHiddRectAcce, listBisHiddRectProg, addBisHiddRectProg, listAttEngBase } from "@/api/slaj/hidd"
|
|
|
+import { listObjHidd, delObjHidd, addObjHidd, updateObjHidd, compoundSaveHidd, getHiddGroupBy, listBisHiddRectImpl, addBisHiddRectImpl, updateBisHiddRectImpl, listBisHiddRectAcce, addBisHiddRectAcce, updateBisHiddRectAcce, listBisHiddRectProg, addBisHiddRectProg, listAttEngBase, listNextDepHidd, writeOffBisMajHiddSup, getHiddListByName, listAttOrgBase, applyWriteOffBisMajHiddSup, approveWriteOffBisMajHiddSup, reportHidd, returnHidd, addBisMajHiddSup } from "@/api/slaj/hidd"
|
|
|
import { getToken } from "@/utils/auth"
|
|
|
-import { useTableHeight } from '@/hooks/useTableHeight'
|
|
|
import useUserStore from '@/store/modules/user'
|
|
|
|
|
|
-const { tableHeight, containerRef } = useTableHeight()
|
|
|
-const containerRef2 = ref(null)
|
|
|
-const containerRef3 = ref(null)
|
|
|
-const containerRef4 = ref(null)
|
|
|
-const containerRef5 = ref(null)
|
|
|
+const tableHeight = ref('calc(100vh - 240px)')
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
-const { hidd_grad, hidd_stat, sup_stat, hidd_clas } = proxy.useDict("hidd_grad", "hidd_stat", "sup_stat", "hidd_clas")
|
|
|
+const { hidd_grad, hidd_stat, sup_stat, hidd_sour, hidd_clas } = proxy.useDict("hidd_grad", "hidd_stat", "sup_stat", "hidd_sour", "hidd_clas")
|
|
|
const userStore = useUserStore()
|
|
|
|
|
|
-const activeTab = ref('selfEng')
|
|
|
+const tabPermiMap = {
|
|
|
+ selfEng: 'hidd:tab:selfEng',
|
|
|
+ subEng: 'hidd:tab:subEng',
|
|
|
+ bidEng: 'hidd:tab:bidEng',
|
|
|
+ consEng: 'hidd:tab:consEng',
|
|
|
+ partEng: 'hidd:tab:partEng'
|
|
|
+}
|
|
|
+function hasTabPermi(name) {
|
|
|
+ const permi = tabPermiMap[name]
|
|
|
+ if (!permi) return true
|
|
|
+ return proxy.$auth.hasPermi(permi)
|
|
|
+}
|
|
|
+const activeTab = ref(Object.keys(tabPermiMap).find(k => hasTabPermi(k)) || 'selfEng')
|
|
|
const showSearch = ref(true)
|
|
|
|
|
|
+watch(activeTab, (val) => {
|
|
|
+ if (!hasTabPermi(val)) {
|
|
|
+ const first = Object.keys(tabPermiMap).find(k => hasTabPermi(k))
|
|
|
+ if (first) activeTab.value = first
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
// Tab1 本单位工程隐患
|
|
|
const list = ref([]); const loading = ref(false); const total = ref(0)
|
|
|
const ids = ref([]); const single = ref(true); const multiple = ref(true)
|
|
|
@@ -663,6 +778,7 @@ const fileAttachList = ref([])
|
|
|
const engList = ref([])
|
|
|
|
|
|
const tendList = ref([])
|
|
|
+const consOrgList = ref([])
|
|
|
const filteredTendList = computed(() => {
|
|
|
if (!form.value.engGuid) return tendList.value
|
|
|
return tendList.value.filter(t => t.engGuid === form.value.engGuid)
|
|
|
@@ -694,6 +810,14 @@ const form = ref({})
|
|
|
const formLoading = ref(false)
|
|
|
const isEditMode = computed(() => !!form.value.guid)
|
|
|
|
|
|
+function queryHiddName(queryString, cb) {
|
|
|
+ if (!queryString) { cb([]); return }
|
|
|
+ getHiddListByName({ hiddName: queryString, pageSize: 20 }).then(res => {
|
|
|
+ const list = (res.rows || []).map(item => ({ value: item.hiddName, hiddGrad: item.hiddGrad, hiddClas: item.hiddClas, proPart: item.proPart }))
|
|
|
+ cb(list)
|
|
|
+ }).catch(() => cb([]))
|
|
|
+}
|
|
|
+
|
|
|
function handleAdd() {
|
|
|
formTitle.value = '本级单位工程隐患新增'
|
|
|
form.value = { hiddSort: '1', hiddGrad: '1', hiddStat: '0', inspDate: '', inspLeader: '', inspLeaderPost: '', proPart: '', hiddDesc: '', engGuid: '', tendGuid: '', engName: '', tendName: '', orgGuid: userStore.orgGuid || '' }
|
|
|
@@ -761,6 +885,87 @@ function submitFormDrawer() {
|
|
|
function handleExport() { proxy.download("hidd/objhidd/export", { ...queryParams }, `本单位工程隐患_${new Date().getTime()}.xlsx`) }
|
|
|
function handleExport2() { proxy.download("hidd/objhidd/export", { ...queryParams2 }, `下级单位隐患_${new Date().getTime()}.xlsx`) }
|
|
|
|
|
|
+function handleReport() {
|
|
|
+ if (!ids.value.length) { proxy.$modal.msgWarning('请先选择要上报的隐患'); return }
|
|
|
+ proxy.$modal.confirm('确认上报选中的隐患?').then(() => {
|
|
|
+ reportHidd(ids.value).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('上报成功')
|
|
|
+ getList()
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
+}
|
|
|
+function handleReport2() {
|
|
|
+ if (!ids2.value || !ids2.value.length) { proxy.$modal.msgWarning('请先选择要上报的隐患'); return }
|
|
|
+ proxy.$modal.confirm('确认逐级上报选中的隐患?').then(() => {
|
|
|
+ reportHidd(ids2.value).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('上报成功')
|
|
|
+ getList2()
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
+}
|
|
|
+function handleReport3() {
|
|
|
+ if (!ids3.value.length) { proxy.$modal.msgWarning('请先选择要上报的隐患'); return }
|
|
|
+ proxy.$modal.confirm('确认上报选中的隐患?').then(() => {
|
|
|
+ reportHidd(ids3.value).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('上报成功')
|
|
|
+ getList3()
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
+}
|
|
|
+function handleReport4() {
|
|
|
+ if (!ids4.value.length) { proxy.$modal.msgWarning('请先选择要上报的隐患'); return }
|
|
|
+ proxy.$modal.confirm('确认上报选中的隐患?').then(() => {
|
|
|
+ reportHidd(ids4.value).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('上报成功')
|
|
|
+ getList4()
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
+}
|
|
|
+function handleReport5() {
|
|
|
+ if (!ids5.value.length) { proxy.$modal.msgWarning('请先选择要上报的隐患'); return }
|
|
|
+ proxy.$modal.confirm('确认上报选中的隐患?').then(() => {
|
|
|
+ reportHidd(ids5.value).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('上报成功')
|
|
|
+ getList5()
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
+}
|
|
|
+
|
|
|
+const returnForm = ref({})
|
|
|
+const returnOpen = ref(false)
|
|
|
+function handleReturnFromSub() {
|
|
|
+ if (!ids2.value || !ids2.value.length) { proxy.$modal.msgWarning('请先选择要退回的隐患'); return }
|
|
|
+ returnForm.value = { guids: ids2.value, returnDesc: '' }
|
|
|
+ returnOpen.value = true
|
|
|
+}
|
|
|
+function submitReturn() {
|
|
|
+ if (!returnForm.value.returnDesc) { proxy.$modal.msgWarning('请填写退回说明'); return }
|
|
|
+ returnHidd(returnForm.value.guids, returnForm.value.returnDesc).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('退回成功')
|
|
|
+ returnOpen.value = false
|
|
|
+ getList2()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const supDialogOpen = ref(false)
|
|
|
+const supDialogForm = ref({})
|
|
|
+function handleSupFromSub() {
|
|
|
+ if (!ids2.value || !ids2.value.length) { proxy.$modal.msgWarning('请先选择要督办的隐患'); return }
|
|
|
+ supDialogForm.value = { hiddGuids: ids2.value, hiddName: list2.value.find(r => ids2.value.includes(r.guid))?.hiddName || '', hiddGrad: list2.value.find(r => ids2.value.includes(r.guid))?.hiddGrad || '', proPart: list2.value.find(r => ids2.value.includes(r.guid))?.proPart || '', engName: list2.value.find(r => ids2.value.includes(r.guid))?.engName || '', supLareId: '', supDate: '', supWiunName: '', rectPeri: '', isList: '0', supOpin: '' }
|
|
|
+ supDialogOpen.value = true
|
|
|
+}
|
|
|
+function submitSupDialog() {
|
|
|
+ if (!supDialogForm.value.supOpin) { proxy.$modal.msgWarning('请填写督办意见'); return }
|
|
|
+ if (!supDialogForm.value.supLareId) { proxy.$modal.msgWarning('请填写督办文号'); return }
|
|
|
+ if (!supDialogForm.value.rectPeri) { proxy.$modal.msgWarning('请选择整改期限'); return }
|
|
|
+ const hiddGuid = supDialogForm.value.hiddGuids[0]
|
|
|
+ addBisMajHiddSup({ ...supDialogForm.value, hiddGuid }).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('督办成功')
|
|
|
+ supDialogOpen.value = false
|
|
|
+ getList2()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
function handleDelete(row) {
|
|
|
const guids = row ? [row.guid] : ids.value
|
|
|
if (!guids.length) { proxy.$modal.msgWarning('请先选择一条数据'); return }
|
|
|
@@ -779,13 +984,17 @@ function handleCancelApply(row) {
|
|
|
function submitCancel() {
|
|
|
cancelFormRef.value.validate(valid => {
|
|
|
if (!valid) return
|
|
|
- proxy.$modal.msgSuccess('销号申请已提交')
|
|
|
- cancelOpen.value = false
|
|
|
+ applyWriteOffBisMajHiddSup({ guid: cancelForm.value.guid }).then(() => {
|
|
|
+ proxy.$modal.msgSuccess('销号申请已提交,等待上级审批')
|
|
|
+ cancelOpen.value = false
|
|
|
+ if (activeTab.value === 'bidEng') { getList3() } else if (activeTab.value === 'consEng') { getList4() } else if (activeTab.value === 'partEng') { getList5() } else { getList() }
|
|
|
+ }).catch(() => {})
|
|
|
})
|
|
|
}
|
|
|
|
|
|
// Tab2-5 下级/标段/施工/参建
|
|
|
const list2 = ref([]); const loading2 = ref(false); const total2 = ref(0)
|
|
|
+const ids2 = ref([])
|
|
|
const queryParams2 = reactive({ pageNum: 1, pageSize: 10, hiddName: undefined, orgName: undefined })
|
|
|
const list3 = ref([]); const loading3 = ref(false); const total3 = ref(0)
|
|
|
const ids3 = ref([]); const single3 = ref(true); const multiple3 = ref(true)
|
|
|
@@ -807,8 +1016,11 @@ function getList4() {
|
|
|
}
|
|
|
function handleAdd4() {
|
|
|
formTitle.value = '施工单位隐患新增'
|
|
|
- form.value = { hiddSort: '1', hiddGrad: '1', hiddStat: '0', inspDate: '', inspLeader: '', inspLeaderPost: '', proPart: '', hiddDesc: '', engGuid: '', tendGuid: '', engName: '', tendName: '', orgName: '', orgGuid: userStore.orgGuid || '' }
|
|
|
+ form.value = { hiddSort: '1', hiddGrad: '1', hiddStat: '0', hiddSour: '1', inspDate: '', inspLeader: '', inspLeaderPost: '', proPart: '', hiddDesc: '', engGuid: '', tendGuid: '', engName: '', tendName: '', orgName: '', orgGuid: userStore.orgGuid || '' }
|
|
|
listAttEngBase({}).then(res => { engList.value = (res.rows || []).map(e => ({ value: e.guid, label: e.engName })) })
|
|
|
+ listAttOrgBase({ orgNature: '7' }).then(res => {
|
|
|
+ consOrgList.value = (res.rows || []).map(o => ({ value: o.guid, label: o.orgName }))
|
|
|
+ })
|
|
|
fileAttachList.value = []
|
|
|
uploadFileList.value = []
|
|
|
formDrawer.value = true
|
|
|
@@ -838,7 +1050,7 @@ function handleQuery4() { queryParams4.pageNum = 1; getList4() }
|
|
|
function handleExport4() { proxy.download("hidd/objhidd/export", { ...queryParams4, wiunProp: '7' }, `施工单位隐患_${new Date().getTime()}.xlsx`) }
|
|
|
function getList2() {
|
|
|
loading2.value = true
|
|
|
- listObjHidd({ ...queryParams2, pageNum: queryParams2.pageNum, pageSize: queryParams2.pageSize }).then(res => {
|
|
|
+ listNextDepHidd({ ...queryParams2, pageNum: queryParams2.pageNum, pageSize: queryParams2.pageSize, orgGuid: userStore.orgGuid || undefined, hiddSort: '1' }).then(res => {
|
|
|
list2.value = res.rows || []
|
|
|
total2.value = res.total || 0
|
|
|
loading2.value = false
|
|
|
@@ -846,7 +1058,7 @@ function getList2() {
|
|
|
}
|
|
|
function getList3() {
|
|
|
loading3.value = true
|
|
|
- listObjHidd({ ...queryParams3, pageNum: queryParams3.pageNum, pageSize: queryParams3.pageSize }).then(res => {
|
|
|
+ listObjHidd({ ...queryParams3, pageNum: queryParams3.pageNum, pageSize: queryParams3.pageSize, orgGuid: userStore.orgGuid || undefined, hiddSort: '1' }).then(res => {
|
|
|
list3.value = res.rows || []
|
|
|
total3.value = res.total || 0
|
|
|
loading3.value = false
|
|
|
@@ -1010,6 +1222,11 @@ function submitRectify() {
|
|
|
}
|
|
|
})
|
|
|
Promise.all([p1, p2, p3]).then(() => {
|
|
|
+ const completedRect = !!(rectAcceForm.value.requCompDate && rectAcceForm.value.accepLegPers)
|
|
|
+ const newHiddStat = completedRect ? '2' : '1'
|
|
|
+ if (rectifyRow.value.hiddStat !== newHiddStat) {
|
|
|
+ updateObjHidd({ guid: hiddGuid, hiddStat: newHiddStat }).catch(() => {})
|
|
|
+ }
|
|
|
proxy.$modal.msgSuccess('保存成功')
|
|
|
rectifyOpen.value = false
|
|
|
rectifyLoading.value = false
|
|
|
@@ -1025,32 +1242,6 @@ function handleTabChange() {
|
|
|
else if (activeTab.value === 'bidEng') getList3()
|
|
|
else if (activeTab.value === 'consEng') getList4()
|
|
|
else if (activeTab.value === 'partEng') getList5()
|
|
|
- // 切换 tab 后重算表格高度,确保分页位置与本单位 tab 一致
|
|
|
- setTimeout(() => {
|
|
|
- const map = { selfEng: containerRef, subEng: containerRef2, bidEng: containerRef3, consEng: containerRef4, partEng: containerRef5 }
|
|
|
- const el = map[activeTab.value]?.value
|
|
|
- if (!el) return
|
|
|
- const rect = el.getBoundingClientRect()
|
|
|
- const ch = window.innerHeight - rect.top
|
|
|
- if (ch <= 0) return
|
|
|
- let used = 0
|
|
|
- const cs = window.getComputedStyle(el)
|
|
|
- used += parseFloat(cs.paddingTop) || 0
|
|
|
- used += parseFloat(cs.paddingBottom) || 0
|
|
|
- for (const child of el.children) {
|
|
|
- if (child.classList?.contains('table-wrapper')) continue
|
|
|
- if (child.classList?.contains('el-dialog')) continue
|
|
|
- const oh = child.offsetHeight
|
|
|
- if (oh === 0) {
|
|
|
- if (child.classList?.contains('pagination-container')) used += 50
|
|
|
- continue
|
|
|
- }
|
|
|
- const style = window.getComputedStyle(child)
|
|
|
- used += oh + (parseFloat(style.marginTop) || 0) + (parseFloat(style.marginBottom) || 0)
|
|
|
- }
|
|
|
- const h = ch - used
|
|
|
- if (h > 200) tableHeight.value = h
|
|
|
- }, 50)
|
|
|
}
|
|
|
|
|
|
onMounted(() => { getList() })
|