|
|
@@ -3,7 +3,7 @@
|
|
|
<el-row :gutter="10">
|
|
|
<!--机构数据-->
|
|
|
<el-col :span="4" :xs="24">
|
|
|
- <org-tree v-model="queryParams.belongOrgId" @defaultKey="getDefaultKey" @checkChange="checkChange"
|
|
|
+ <org-tree v-model="queryParams.belongOrgId" @defaultKey="getDefaultKey" @defaultOrg="getDefaultOrg" @checkChange="checkChange"
|
|
|
@click="clickTreeNode" hangsheTree :defaultCheckSub="false"></org-tree>
|
|
|
</el-col>
|
|
|
<!--搜索栏-->
|
|
|
@@ -44,7 +44,8 @@
|
|
|
<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>
|
|
|
+ <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">导出勾选
|
|
|
@@ -53,52 +54,52 @@
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" @click="getDownList()">下载列表</el-button>
|
|
|
</el-col>
|
|
|
-<!-- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- icon="el-icon-plus"
|
|
|
- size="mini"
|
|
|
- @click="handleAdd"
|
|
|
- v-hasPermi="['core:registerBook:add']"
|
|
|
- >新增
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- v-hasPermi="['core:registerBook:edit']"
|
|
|
- >修改
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- plain
|
|
|
- icon="el-icon-delete"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleDelete"
|
|
|
- v-hasPermi="['core:registerBook:remove']"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['core:registerBook:export']"
|
|
|
- >导出
|
|
|
- </el-button>
|
|
|
- </el-col>-->
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['core:registerBook:add']"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="handleUpdate"
|
|
|
+ v-hasPermi="['core:registerBook:edit']"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleDelete"
|
|
|
+ v-hasPermi="['core:registerBook:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['core:registerBook:export']"
|
|
|
+ >导出
|
|
|
+ </el-button>
|
|
|
+ </el-col>-->
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
@@ -114,37 +115,37 @@
|
|
|
</el-table-column>
|
|
|
<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>-->
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.date, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>-->
|
|
|
</el-table-column>
|
|
|
|
|
|
<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>
|
|
|
+ target="_blank">{{ r.row.fileName }}</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['core:registerBook:edit']"
|
|
|
- >修改
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['core:registerBook:remove']"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>-->
|
|
|
+ <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['core:registerBook:edit']"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['core:registerBook:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>-->
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
@@ -174,7 +175,7 @@ import dayjs from "dayjs";
|
|
|
export default {
|
|
|
name: "RegisterBook",
|
|
|
dicts: ['register_book_type'],
|
|
|
- components: {OrgTree,DownListDialog},
|
|
|
+ components: {OrgTree, DownListDialog},
|
|
|
mixins: [tableList],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -200,12 +201,13 @@ export default {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- // 导出全部:0,导出勾选:1
|
|
|
- exportType:1,
|
|
|
+ // 导出全部:0,导出勾选:1
|
|
|
+ exportType: 1,
|
|
|
registerBookType: null,
|
|
|
date: new Date(),
|
|
|
orgId: null,
|
|
|
},
|
|
|
+ selectedOrgName: null,
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
@@ -263,6 +265,11 @@ export default {
|
|
|
this.queryParams.orgId = key;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ getDefaultOrg(org) {
|
|
|
+ this.queryParams.orgId = org.id;
|
|
|
+ this.selectedOrgName = org.shortName;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
//单选框状态改变
|
|
|
checkChange(state) {
|
|
|
this.queryParams.checkSub = state;
|
|
|
@@ -271,6 +278,7 @@ export default {
|
|
|
// 节点单击事件
|
|
|
clickTreeNode(data) {
|
|
|
this.queryParams.orgId = data.id;
|
|
|
+ this.selectedOrgName = data.shortName;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
@@ -299,17 +307,12 @@ export default {
|
|
|
this.$message.error('请先选择需要导出的文件!');
|
|
|
return;
|
|
|
}
|
|
|
- let pdfIdList=this.ids;
|
|
|
+ let pdfIdList = this.ids;
|
|
|
this.queryParams.exportType = 1;
|
|
|
- let fileName=`登记簿-${dayjs(new Date()).format("YYYYMMDD")}.zip`;
|
|
|
- console.log("fileName",fileName)
|
|
|
- console.log("this.queryParams",this.queryParams)
|
|
|
- await selectExport({...this.queryParams, pdfIdList});
|
|
|
- /* this.download(
|
|
|
- "/core/registerBook/batch/export",
|
|
|
- {...this.queryParams, pdfIdList},
|
|
|
- `${this.selectedOrgName}-'登记簿'-${dayjs(new Date()).format("YYYYMMDD")}.zip`
|
|
|
- );*/
|
|
|
+ let fileName = `登记簿-${dayjs(new Date()).format("YYYYMMDD")}.zip`;
|
|
|
+ await selectExport({...this.queryParams, pdfIdList},
|
|
|
+ `${this.selectedOrgName}_${this.$tab.getCurrentTabName()}_${dayjs().format("YYYYMMDD")}.zip`);
|
|
|
+
|
|
|
},
|
|
|
getDownList() {
|
|
|
this.$refs.downListDialog.show(this.search);
|