|
@@ -57,7 +57,7 @@
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
|
|
+ <el-button type="warning" plain icon="el-icon-download" size="mini" @click="exportExcel"
|
|
|
v-hasPermi="['business:rzjg:export']">导出
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -557,10 +557,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getKhxxByJg, listChxxx, listJtxx, listKhxxByJg, advancedListKhxxByJg } from '@/api/search/xxcx/lrxx/rzjg'
|
|
|
+import { getKhxxByJg, listChxxx, listJtxx, listKhxxByJg, advancedListKhxxByJg, exportExcel } from '@/api/search/xxcx/lrxx/rzjg'
|
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
|
import { mapState } from 'vuex'
|
|
|
import { decryptData_ECB, decryptRowData_ECB } from "@/api/tool/sm4";
|
|
|
+import { Loading } from 'element-ui';
|
|
|
|
|
|
export default {
|
|
|
name: 'Khjbxx',
|
|
@@ -584,7 +585,8 @@ export default {
|
|
|
'CH029',
|
|
|
'CH047',
|
|
|
'CZ028',
|
|
|
- 'XZ114'
|
|
|
+ 'XZ114',
|
|
|
+ "C0034",
|
|
|
],
|
|
|
data() {
|
|
|
return {
|
|
@@ -605,6 +607,7 @@ export default {
|
|
|
// 显示高级查询
|
|
|
showDrawer: false,
|
|
|
editJtxxAndChxxx: true,
|
|
|
+ downloadLoadingInstance: null,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
jtxxTotal: 0,
|
|
@@ -694,6 +697,24 @@ export default {
|
|
|
pageSize:10,
|
|
|
createuserType:'01',
|
|
|
},
|
|
|
+ // 导出数据
|
|
|
+ excelData:{
|
|
|
+ keys:[
|
|
|
+ { label: '姓名', prop: 'xm', width: '' },
|
|
|
+ { label: '性别', prop: 'xb', width: '' },
|
|
|
+ { label: '身份证件类型', prop: 'zjlx', width: '' },
|
|
|
+ { label: '公民身份证号码', prop: 'zjhm', width: '' },
|
|
|
+ { label: '民族', prop: 'mz', width: '' },
|
|
|
+ { label: '国籍', prop: 'gj', width: '' },
|
|
|
+ { label: '户籍类别', prop: 'hjlb', width: '' },
|
|
|
+ { label: '婚姻状况', prop: 'hyzk', width: '' },
|
|
|
+ { label: '居住地行政区划', prop: 'xjdxzqy', width: '' },
|
|
|
+ { label: '居住地址', prop: 'xjd', width: '' },
|
|
|
+ { label: '身体能力评估等级', prop: 'nlpg', width: '' },
|
|
|
+ { label: '人员状态', prop: 'ryzt', width: '' },
|
|
|
+ ],
|
|
|
+ vales:[]
|
|
|
+ },
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
familyForm: {},
|
|
@@ -949,18 +970,42 @@ export default {
|
|
|
rowYljgKhChxxxIndex({ row, rowIndex }) {
|
|
|
row.index = rowIndex + 1
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download(
|
|
|
- 'business/lrxxcx/export',
|
|
|
- {
|
|
|
- ...this.queryParams
|
|
|
- },
|
|
|
- `入住养老机构老年人信息.xlsx`
|
|
|
- )
|
|
|
+ // /** 导出按钮操作 */
|
|
|
+ // handleExport() {
|
|
|
+ // this.download(
|
|
|
+ // 'business/lrxxcx/export',
|
|
|
+ // {
|
|
|
+ // ...this.queryParams
|
|
|
+ // },
|
|
|
+ // `入住养老机构老年人信息.xlsx`
|
|
|
+ // )
|
|
|
+ // },
|
|
|
+ exportExcel() {
|
|
|
+ this.downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
|
|
+ exportExcel(this.queryParams).then((res) => {
|
|
|
+ res.data.map((item) => {
|
|
|
+ if (item) {
|
|
|
+ item = decryptData_ECB(item, ["xm", "zjhm", "xjd"], [1, 2, 4]);
|
|
|
+ item.xb = this.translateDict("C0007", item.xb)
|
|
|
+ item.zjlx = this.translateDict("C0015", item.zjlx)
|
|
|
+ item.mz = this.translateDict("C0009", item.mz)
|
|
|
+ item.gj = this.translateDict("XZ002", item.gj)
|
|
|
+ item.hjlb = this.translateDict("C0031", item.hjlb)
|
|
|
+ item.hyzk = this.translateDict("C0010", item.hyzk)
|
|
|
+ item.nlpg = this.translateDict("CZ036", item.nlpg)
|
|
|
+ item.ryzt = this.translateDict("C0034", item.ryzt)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(res.data)
|
|
|
+ this.excelData.vales = res.data;
|
|
|
+ this.handleExport(this.excelData,'入住养老机构老年人')
|
|
|
+ this.downloadLoadingInstance.close();
|
|
|
+ }).catch((r) => {
|
|
|
+ this.$modal.msgError(r);
|
|
|
+ this.downloadLoadingInstance.close();
|
|
|
+ });
|
|
|
},
|
|
|
/** */
|
|
|
-
|
|
|
particulars(row) {
|
|
|
this.dataDetails = {}
|
|
|
getKhxxByJg(row.id).then((response) => {
|