|
|
@@ -2,18 +2,38 @@
|
|
|
<div class="app-container">
|
|
|
<el-row :gutter="10">
|
|
|
<!--机构数据-->
|
|
|
- <el-col :span="4" :xs="24">
|
|
|
+ <!-- <el-col :span="4" :xs="24">
|
|
|
<org-tree v-model="queryParams.belongOrgId" @defaultKey="getDefaultKey" @defaultOrg="getDefaultOrg" @checkChange="checkChange"
|
|
|
@click="clickTreeNode" hangsheTree :defaultCheckSub="false"></org-tree>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<!--搜索栏-->
|
|
|
- <el-col :span="20" :xs="24">
|
|
|
+ <el-col :span="24" :xs="24">
|
|
|
<div class="main-right-box">
|
|
|
<div class="main-search-box">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
>
|
|
|
+ <el-form-item label="创建机构" prop="orgId">
|
|
|
+ <org-tree
|
|
|
+ v-model="queryParams.belongOrgId"
|
|
|
+ @defaultKey="getDefaultKey"
|
|
|
+ @defaultOrg="getDefaultOrg"
|
|
|
+ @checkChange="checkChange"
|
|
|
+ @click="clickTreeNode"
|
|
|
+ hangsheTree
|
|
|
+ :defaultCheckSub="false"
|
|
|
+ ></org-tree>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="登记簿类型" prop="registerBookType">
|
|
|
- <el-select v-model="queryParams.registerBookType" placeholder="请选择登记簿类型" clearable>
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.registerBookType"
|
|
|
+ placeholder="请选择登记簿类型"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.register_book_type"
|
|
|
:key="dict.value"
|
|
|
@@ -27,32 +47,51 @@
|
|
|
v-model="queryParams.date"
|
|
|
type="month"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择保存日期">
|
|
|
+ placeholder="请选择保存日期"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
-
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item> </el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10">
|
|
|
-
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ size="mini"
|
|
|
+ @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" @click="exportAll()" :disabled="this.registerBookList.length<=0">导出全部
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="exportAll()"
|
|
|
+ :disabled="this.registerBookList.length <= 0"
|
|
|
+ >导出全部
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" @click="exportSelected()" :disabled="this.ids.length<=0">导出勾选
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="exportSelected()"
|
|
|
+ :disabled="this.ids.length <= 0"
|
|
|
+ >导出勾选
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" @click="getDownList()">下载列表</el-button>
|
|
|
+ <el-button type="primary" @click="getDownList()"
|
|
|
+ >下载列表</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
|
@@ -100,21 +139,39 @@
|
|
|
>导出
|
|
|
</el-button>
|
|
|
</el-col>-->
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<el-table
|
|
|
border
|
|
|
height="646"
|
|
|
- v-loading="loading" :data="registerBookList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column label="登记簿类型" align="center" prop="registerBookType">
|
|
|
+ v-loading="loading"
|
|
|
+ :data="registerBookList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column
|
|
|
+ label="登记簿类型"
|
|
|
+ align="center"
|
|
|
+ prop="registerBookType"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.register_book_type" :value="scope.row.registerBookType"/>
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.register_book_type"
|
|
|
+ :value="scope.row.registerBookType"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="所属机构" align="center" prop="orgName"/>
|
|
|
- <el-table-column label="统计日期" align="center" prop="date" width="180">
|
|
|
+ <el-table-column label="所属机构" align="center" prop="orgName" />
|
|
|
+ <el-table-column
|
|
|
+ label="统计日期"
|
|
|
+ align="center"
|
|
|
+ prop="date"
|
|
|
+ width="180"
|
|
|
+ >
|
|
|
<!-- <template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.date, '{y}-{m}-{d}') }}</span>
|
|
|
</template>-->
|
|
|
@@ -122,8 +179,12 @@
|
|
|
|
|
|
<el-table-column label="文件名称" align="center" prop="fileName">
|
|
|
<template slot-scope="r">
|
|
|
- <a :href="imageUrl(r.row.fileUrl) " style="color:#45b97c"
|
|
|
- target="_blank">{{ r.row.fileName }}</a>
|
|
|
+ <a
|
|
|
+ :href="imageUrl(r.row.fileUrl)"
|
|
|
+ style="color: #45b97c"
|
|
|
+ target="_blank"
|
|
|
+ >{{ r.row.fileName }}</a
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
@@ -157,7 +218,10 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <down-list-dialog ref="downListDialog" @success="refresh(true)"></down-list-dialog>
|
|
|
+ <down-list-dialog
|
|
|
+ ref="downListDialog"
|
|
|
+ @success="refresh(true)"
|
|
|
+ ></down-list-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -169,13 +233,14 @@ import {
|
|
|
} from "@/api/registerbook/registerBook.js";
|
|
|
import tableList from "@/mixins/tableList";
|
|
|
import DownListDialog from "./dialog.list";
|
|
|
-import {guid} from "@/utils";
|
|
|
+import { guid } from "@/utils";
|
|
|
import dayjs from "dayjs";
|
|
|
-
|
|
|
+// import OrgTree from "@/components/orgTree";
|
|
|
+import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
|
|
|
export default {
|
|
|
name: "RegisterBook",
|
|
|
- dicts: ['register_book_type'],
|
|
|
- components: { DownListDialog},
|
|
|
+ dicts: ["register_book_type"],
|
|
|
+ components: { DownListDialog ,OrgTree},
|
|
|
mixins: [tableList],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -213,18 +278,16 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
registerBookType: [
|
|
|
- {required: true, message: "登记簿类型不能为空", trigger: "change"}
|
|
|
+ { required: true, message: "登记簿类型不能为空", trigger: "change" },
|
|
|
],
|
|
|
date: [
|
|
|
- {required: true, message: "保存日期不能为空", trigger: "blur"}
|
|
|
- ],
|
|
|
- orgId: [
|
|
|
- {required: true, message: "机构id不能为空", trigger: "blur"}
|
|
|
+ { required: true, message: "保存日期不能为空", trigger: "blur" },
|
|
|
],
|
|
|
+ orgId: [{ required: true, message: "机构id不能为空", trigger: "blur" }],
|
|
|
orgName: [
|
|
|
- {required: true, message: "机构名称不能为空", trigger: "blur"}
|
|
|
+ { required: true, message: "机构名称不能为空", trigger: "blur" },
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -236,9 +299,9 @@ export default {
|
|
|
/** 查询registerBook列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
-
|
|
|
- this.queryParams.date=dayjs(this.queryParams.date).format("YYYY-MM-DD");
|
|
|
- listRegisterBook(this.queryParams).then(response => {
|
|
|
+
|
|
|
+ this.queryParams.date = dayjs(this.queryParams.date).format("YYYY-MM-DD");
|
|
|
+ listRegisterBook(this.queryParams).then((response) => {
|
|
|
this.registerBookList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
@@ -261,7 +324,7 @@ export default {
|
|
|
orgId: null,
|
|
|
orgName: null,
|
|
|
orgPath: null,
|
|
|
- fileUrl: null
|
|
|
+ fileUrl: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
@@ -297,31 +360,34 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length !== 1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
//导出全部
|
|
|
async exportAll() {
|
|
|
this.queryParams.exportType = 0;
|
|
|
- await allExport(this.queryParams)
|
|
|
+ await allExport(this.queryParams);
|
|
|
this.$message.success("导出成功,请稍后查看导出结果!");
|
|
|
},
|
|
|
//导出勾选
|
|
|
async exportSelected() {
|
|
|
if (!this.ids || this.ids.length == 0) {
|
|
|
- this.$message.error('请先选择需要导出的文件!');
|
|
|
+ this.$message.error("请先选择需要导出的文件!");
|
|
|
return;
|
|
|
}
|
|
|
let pdfIdList = this.ids;
|
|
|
this.queryParams.exportType = 1;
|
|
|
- await selectExport({...this.queryParams, pdfIdList},
|
|
|
- `${this.selectedOrgName}_${this.$tab.getCurrentTabName()}_${dayjs().format("YYYYMMDD")}.zip`);
|
|
|
-
|
|
|
+ await selectExport(
|
|
|
+ { ...this.queryParams, pdfIdList },
|
|
|
+ `${
|
|
|
+ this.selectedOrgName
|
|
|
+ }_${this.$tab.getCurrentTabName()}_${dayjs().format("YYYYMMDD")}.zip`
|
|
|
+ );
|
|
|
},
|
|
|
getDownList() {
|
|
|
this.$refs.downListDialog.show(this.queryParams);
|
|
|
},
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|