|
@@ -222,6 +222,17 @@
|
|
|
v-hasPermi="['qw:externalContact:export']"
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ :loading="exportUnionidLoading"
|
|
|
+ @click="handleExportUnionId"
|
|
|
+ v-hasPermi="['qw:externalContact:export']"
|
|
|
+ >导出unionid</el-button>
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
@@ -402,7 +413,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listExternalContact, getExternalContact, delExternalContact, addExternalContact, updateExternalContact, exportExternalContact } from "@/api/qw/externalContact";
|
|
|
+import { listExternalContact, getExternalContact, delExternalContact, addExternalContact, updateExternalContact, exportExternalContact, exportUnionId } from "@/api/qw/externalContact";
|
|
|
import {getCompanyList} from "@/api/company/company";
|
|
|
import {getAllUserlist} from "@/api/company/companyUser";
|
|
|
import {getQwUserInfo} from "@/api/qw/qwUser";
|
|
@@ -420,6 +431,7 @@ export default {
|
|
|
loading: false,
|
|
|
// 导出遮罩层
|
|
|
exportLoading: false,
|
|
|
+ exportUnionidLoading: false,
|
|
|
//等级状态
|
|
|
ratingUpFall: [],
|
|
|
// 性别字典
|
|
@@ -908,7 +920,29 @@ export default {
|
|
|
this.download(response.msg);
|
|
|
this.exportLoading = false;
|
|
|
}).catch(() => {});
|
|
|
- }
|
|
|
+ },
|
|
|
+ /** 导出Unionid按钮操作 */
|
|
|
+ handleExportUnionId() {
|
|
|
+ //验证是否选择企业
|
|
|
+ if(!this.queryParams.companyId){
|
|
|
+ return this.$message.warning({
|
|
|
+ message: "请先选择企业!",
|
|
|
+ duration: 3000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const queryParams = this.queryParams;
|
|
|
+ this.$confirm('是否确认导出所有企业微信客户unionid数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.exportUnionidLoading = true;
|
|
|
+ return exportUnionId(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ this.exportUnionidLoading = false;
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|