|
@@ -36,11 +36,12 @@
|
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="部门" prop="deptId">
|
|
|
|
|
- <DeptSelect
|
|
|
|
|
- v-model="queryParams.deptId"
|
|
|
|
|
- placeholder="请选择部门"
|
|
|
|
|
|
|
+ <el-form-item label="报告编号" prop="reportNo">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="queryParams.reportNo"
|
|
|
|
|
+ placeholder="请输入报告编号"
|
|
|
clearable
|
|
clearable
|
|
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -60,7 +61,14 @@
|
|
|
<el-option label="已拒绝" value="300" />
|
|
<el-option label="已拒绝" value="300" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
|
|
+ <el-form-item label="部门" prop="deptId">
|
|
|
|
|
+ <DeptSelect
|
|
|
|
|
+ v-model="queryParams.deptId"
|
|
|
|
|
+ placeholder="请选择部门"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ class="!w-240px"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="是否办证" prop="hasCertificateNo">
|
|
<el-form-item label="是否办证" prop="hasCertificateNo">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="queryParams.hasCertificateNo"
|
|
v-model="queryParams.hasCertificateNo"
|
|
@@ -79,6 +87,14 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ plain
|
|
|
|
|
+ @click="handleExport"
|
|
|
|
|
+ :loading="exportLoading"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
|
|
+ </el-button>
|
|
|
<!-- <el-button-->
|
|
<!-- <el-button-->
|
|
|
<!-- type="primary"-->
|
|
<!-- type="primary"-->
|
|
|
<!-- plain-->
|
|
<!-- plain-->
|
|
@@ -96,8 +112,9 @@
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
|
<ContentWrap>
|
|
<ContentWrap>
|
|
|
- <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border>
|
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border @selection-change="handleSelectionChange">
|
|
|
|
|
|
|
|
|
|
+ <el-table-column type="selection" align="center" width="40" />
|
|
|
<el-table-column type="index" label="序号" align="center" width="60" />
|
|
<el-table-column type="index" label="序号" align="center" width="60" />
|
|
|
<el-table-column label="工程号" align="center" prop="projectNo" min-width="180px"/>
|
|
<el-table-column label="工程号" align="center" prop="projectNo" min-width="180px"/>
|
|
|
<el-table-column label="使用单位名称" align="center" prop="unitName" min-width="270px"/>
|
|
<el-table-column label="使用单位名称" align="center" prop="unitName" min-width="270px"/>
|
|
@@ -216,6 +233,7 @@ const queryParams = reactive({
|
|
|
})
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
+const selectedRows = ref<PipeUseRegistrationReportVO[]>([]) // 勾选的行
|
|
|
|
|
|
|
|
/** 查询列表 */
|
|
/** 查询列表 */
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
@@ -241,6 +259,11 @@ const resetQuery = () => {
|
|
|
handleQuery()
|
|
handleQuery()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/** 勾选变化 */
|
|
|
|
|
+const handleSelectionChange = (rows: PipeUseRegistrationReportVO[]) => {
|
|
|
|
|
+ selectedRows.value = rows
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
const handleDelete = async (id: number) => {
|
|
const handleDelete = async (id: number) => {
|
|
|
try {
|
|
try {
|
|
@@ -268,9 +291,13 @@ const handleExport = async () => {
|
|
|
try {
|
|
try {
|
|
|
// 导出的二次确认
|
|
// 导出的二次确认
|
|
|
await message.exportConfirm()
|
|
await message.exportConfirm()
|
|
|
- // 发起导出
|
|
|
|
|
exportLoading.value = true
|
|
exportLoading.value = true
|
|
|
- const data = await PipeUseRegistrationReportApi.exportPipeUseRegistrationReport(queryParams)
|
|
|
|
|
|
|
+ // 有勾选时导出勾选的数据,否则导出全部
|
|
|
|
|
+ const params: any = { ...queryParams }
|
|
|
|
|
+ if (selectedRows.value.length > 0) {
|
|
|
|
|
+ params.ids = selectedRows.value.map(row => row.id).join(',')
|
|
|
|
|
+ }
|
|
|
|
|
+ const data = await PipeUseRegistrationReportApi.exportPipeUseRegistrationReport(params)
|
|
|
download.excel(data, '管道使用登记.xls')
|
|
download.excel(data, '管道使用登记.xls')
|
|
|
} catch {
|
|
} catch {
|
|
|
} finally {
|
|
} finally {
|