|
@@ -137,16 +137,17 @@
|
|
|
<!-- v-hasPermi="['user:fsUser:remove']"-->
|
|
<!-- v-hasPermi="['user:fsUser:remove']"-->
|
|
|
<!-- >删除</el-button>-->
|
|
<!-- >删除</el-button>-->
|
|
|
<!-- </el-col>-->
|
|
<!-- </el-col>-->
|
|
|
- <!-- <el-col :span="1.5">-->
|
|
|
|
|
- <!-- <el-button-->
|
|
|
|
|
- <!-- type="warning"-->
|
|
|
|
|
- <!-- plain-->
|
|
|
|
|
- <!-- icon="el-icon-download"-->
|
|
|
|
|
- <!-- size="mini"-->
|
|
|
|
|
- <!-- @click="handleExport"-->
|
|
|
|
|
- <!-- v-hasPermi="['user:fsUser:export']"-->
|
|
|
|
|
- <!-- >导出</el-button>-->
|
|
|
|
|
- <!-- </el-col>-->
|
|
|
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ plain
|
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ :loading="exportLoading"
|
|
|
|
|
+ @click="handleExport"
|
|
|
|
|
+ v-hasPermi="['user:fsUser:export']"
|
|
|
|
|
+ >导出</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
@@ -318,6 +319,7 @@
|
|
|
import { listUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
|
|
import { listUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
|
|
|
import {getUserList} from "@/api/company/companyUser";
|
|
import {getUserList} from "@/api/company/companyUser";
|
|
|
import userDetails from '@/views/store/components/userDetails.vue';
|
|
import userDetails from '@/views/store/components/userDetails.vue';
|
|
|
|
|
+import { getTask } from '@/api/common'
|
|
|
export default {
|
|
export default {
|
|
|
name: "FsUser",
|
|
name: "FsUser",
|
|
|
components: {userDetails},
|
|
components: {userDetails},
|
|
@@ -338,6 +340,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 遮罩层
|
|
// 遮罩层
|
|
|
loading: true,
|
|
loading: true,
|
|
|
|
|
+ // 导出遮罩层
|
|
|
|
|
+ exportLoading: false,
|
|
|
// 选中数组
|
|
// 选中数组
|
|
|
ids: [],
|
|
ids: [],
|
|
|
// 非单个禁用
|
|
// 非单个禁用
|
|
@@ -625,15 +629,34 @@ export default {
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
|
|
+ const that = this
|
|
|
const queryParams = this.queryParams;
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有用户数据项?', "警告", {
|
|
this.$confirm('是否确认导出所有用户数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
|
|
+ this.exportLoading = true;
|
|
|
return exportUser(queryParams);
|
|
return exportUser(queryParams);
|
|
|
}).then(response => {
|
|
}).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
|
|
|
|
+ if (response.code === 200){
|
|
|
|
|
+ that.msgSuccess(response.msg);
|
|
|
|
|
+ that.taskId = response.data;
|
|
|
|
|
+ that.time = setInterval(function(){
|
|
|
|
|
+ //查订单
|
|
|
|
|
+ getTask(that.taskId).then(res => {
|
|
|
|
|
+ if(res.data.status === 1){
|
|
|
|
|
+ that.exportLoading = false;
|
|
|
|
|
+ clearTimeout(that.time)
|
|
|
|
|
+ that.time = null;
|
|
|
|
|
+ that.download(res.data.fileUrl);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },10000);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.msgError(response.msg)
|
|
|
|
|
+ that.exportLoading = false
|
|
|
|
|
+ }
|
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
|
},
|
|
},
|
|
|
|
|
|