|
@@ -36,13 +36,14 @@
|
|
|
<el-button type="success" size="small" icon="el-icon-document-add" @click="add">绑定</el-button>
|
|
|
<el-button type="warning" size="small" icon="el-icon-document-remove" :disabled="disabledBtn"
|
|
|
@click="unbind">解绑</el-button>
|
|
|
- <el-button type="danger" size="small" icon="el-icon-document" @click="exportTable">导出</el-button>
|
|
|
+ <!-- <el-button type="danger" size="small" icon="el-icon-document" @click="exportTable">导出</el-button> -->
|
|
|
+ <ExportBtn :componentTable="componentTable" />
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div v-loading="tableLoading" class="tableheight">
|
|
|
- <table-item :table-data="list" :column="column" :pagination="true" :is-select="false"
|
|
|
+ <table-item ref='comTable' :table-data="list" :column="column" :pagination="true" :is-select="false"
|
|
|
:pagesize="pagination.size" :currentpage="pagination.current" :border="true" :multiple="true" :total="total"
|
|
|
:fixed="true" :isdelete="false" @handleCurrentChange="handleCurrentChange"
|
|
|
@handleSizeChange="handleSizeChange" @handleSelectionChange="handleSelectionChange" />
|
|
@@ -64,6 +65,7 @@
|
|
|
|
|
|
<script>
|
|
|
import TableItem from "@/components/TableAuto";
|
|
|
+import ExportBtn from '@/views/zhpt/wxreportforms/components/ExportBtn'
|
|
|
import { client } from "@/utils/index";
|
|
|
import DMAManageUserDialog from "../components/DMAManageUserDialog";
|
|
|
import { removeUser } from "@/api/waterMeterDataMatchApi";
|
|
@@ -81,9 +83,10 @@ import { lcInfo } from "staticPub/config";
|
|
|
import axios from "axios";
|
|
|
const XLSX = require('xlsx'); // 导入 xlsx 库
|
|
|
export default {
|
|
|
- components: { TableItem, DMAManageUserDialog },
|
|
|
+ components: { TableItem, DMAManageUserDialog ,ExportBtn},
|
|
|
data() {
|
|
|
return {
|
|
|
+ componentTable:null,
|
|
|
postBingUser: postBingUser,
|
|
|
postBingAllUser: postBingAllUser,
|
|
|
postBingUserBD: postBingUserBD,
|
|
@@ -157,6 +160,9 @@ export default {
|
|
|
this.getDMAData();
|
|
|
// this.getCbblist()
|
|
|
},
|
|
|
+ mounted(){
|
|
|
+ this.componentTable = this.$refs.comTable.$children[0].$el
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 获取当前页
|
|
|
handleCurrentChange(currentPage) {
|
|
@@ -355,9 +361,29 @@ export default {
|
|
|
withCredentials: true, // 跨域请求时发送cookiesokies
|
|
|
timeout: 60000, // 请求超时
|
|
|
});
|
|
|
+ // newaxios({
|
|
|
+ // method: "get",
|
|
|
+ // url: lcInfo.otherUrlUserdetail,
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/x-www-form-urlencoded",
|
|
|
+ // Appkey: "oievemzt7bowa9v9sf2iczmg",
|
|
|
+ // AppSecret: "9rbbnwcs3idyyzfpvs2xv9aqr2g28hd7",
|
|
|
+ // // Appkey: "sz8ihx4tyyf56h2jn1zunhj7",
|
|
|
+ // // AppSecret: "ihzzm4cgog275557bw84jqfwwn2dggxt",
|
|
|
+ // },
|
|
|
+ // params: {
|
|
|
+ // start: data.current,
|
|
|
+ // limit: data.size,
|
|
|
+ // // inputcontent:data.inputcontent
|
|
|
+ // // userid: "",
|
|
|
+
|
|
|
+ // },
|
|
|
+ // })
|
|
|
newaxios({
|
|
|
method: "get",
|
|
|
- url: lcInfo.otherUrlUserdetail,
|
|
|
+ // url: lcInfo.otherUrlUserdetail,
|
|
|
+ url: lcInfo.otherUrlUserdetail3,
|
|
|
+
|
|
|
headers: {
|
|
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
|
Appkey: "oievemzt7bowa9v9sf2iczmg",
|
|
@@ -366,17 +392,21 @@ export default {
|
|
|
// AppSecret: "ihzzm4cgog275557bw84jqfwwn2dggxt",
|
|
|
},
|
|
|
params: {
|
|
|
- start: data.current,
|
|
|
- limit: data.size,
|
|
|
- // inputcontent:data.inputcontent
|
|
|
- // userid: "",
|
|
|
-
|
|
|
+ pageNum: this.pagination.current,
|
|
|
+ pageSize: this.pagination.size,
|
|
|
+ // areaName: this.form.cbqyBm,
|
|
|
+ // areaName: '',
|
|
|
+ // keyWord: this.form.cxnr,
|
|
|
+ keyWord:this.pagination.inputcontent
|
|
|
+ // userid: "0101012064",
|
|
|
},
|
|
|
- }).then((res) => {
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
this.tableLoading = false;
|
|
|
console.log("浪潮接口获取用户详情", res);
|
|
|
- let tableList = res.data.result.data;
|
|
|
- tableList.forEach((item) => {
|
|
|
+ let tableList =JSON.parse(JSON.parse(JSON.stringify(res.data.result)));
|
|
|
+ console.log(tableList.data.user,'tableList')
|
|
|
+ tableList.data.user.forEach((item) => {
|
|
|
item.userCode = item.userid;
|
|
|
item.userName = item.username;
|
|
|
item.contactNumber = item.tel1;
|
|
@@ -388,8 +418,10 @@ export default {
|
|
|
item.waterMeterNature = item.watertype1;
|
|
|
item.waterMeterCaliber = item.caliber;
|
|
|
});
|
|
|
- this.list = res.data.result.data;
|
|
|
- this.total = Number(res.data.result.total);
|
|
|
+ // this.list = res.data.result.data;
|
|
|
+ this.list = tableList.data.user;
|
|
|
+ // this.total = Number(res.data.result.total);
|
|
|
+ this.total = tableList.data.total
|
|
|
this.tableLoading = false;
|
|
|
});
|
|
|
|