" +
+ "
" +
response.msg +
"
",
- "导入结果",
- {dangerouslyUseHTMLString: true}
+ "导入结果",
+ { dangerouslyUseHTMLString: true }
);
getList();
};
@@ -618,20 +617,19 @@ function submitFileForm() {
}
const downloadImportTemplate = async () => {
- const blob = await downloadEnterpriseTemplate()
- saveAs(blob, "企业导入模版.xlsx")
-}
+ const blob = await downloadEnterpriseTemplate();
+ saveAs(blob, "企业导入模版.xlsx");
+};
const handleDelete = async (id) => {
const delIds = id || ids.value.join(",");
ElMessageBox.confirm(`是否确认删除编号为${delIds}的数据项?`)
- .then(async () => {
- await companyDelete(delIds);
- getList();
- ElMessage.success("删除成功");
- })
- .catch(() => {
- });
+ .then(async () => {
+ await companyDelete(delIds);
+ getList();
+ ElMessage.success("删除成功");
+ })
+ .catch(() => {});
};
let downloadLoadingInstance;
@@ -641,41 +639,41 @@ const download = (url, filename) => {
background: "rgba(0, 0, 0, 0.7)",
});
return request
- .get(url, {
- // transformRequest: [
- // (params) => {
- // return tansParams(params);
- // },
- // ],
- headers: {"Content-Type": "application/x-www-form-urlencoded"},
- responseType: "blob",
- })
- .then(async (data) => {
- const isLogin = await blobValidate(data);
- if (isLogin) {
- const blob = new Blob([data]);
- saveAs(blob, filename);
- } else {
- const resText = await data.text();
- const rspObj = JSON.parse(resText);
- const errMsg =
- errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
- ElMessage.error(errMsg);
- }
- downloadLoadingInstance.close();
- })
- .catch((r) => {
- console.error(r);
- ElMessage.error("下载文件出现错误,请联系管理员!");
- downloadLoadingInstance.close();
- });
+ .get(url, {
+ // transformRequest: [
+ // (params) => {
+ // return tansParams(params);
+ // },
+ // ],
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ responseType: "blob",
+ })
+ .then(async (data) => {
+ const isLogin = await blobValidate(data);
+ if (isLogin) {
+ const blob = new Blob([data]);
+ saveAs(blob, filename);
+ } else {
+ const resText = await data.text();
+ const rspObj = JSON.parse(resText);
+ const errMsg =
+ errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
+ ElMessage.error(errMsg);
+ }
+ downloadLoadingInstance.close();
+ })
+ .catch((r) => {
+ console.error(r);
+ ElMessage.error("下载文件出现错误,请联系管理员!");
+ downloadLoadingInstance.close();
+ });
};
const handleExport = () => {
ElMessageBox.confirm(`是否确认企业列表?`).then(() => {
download(
- `/business/enterprise/export`,
- `企业信息(${dayjs().format("YYYYMMDDHHmmss")}).xlsx`
+ `/business/enterprise/export`,
+ `企业信息(${dayjs().format("YYYYMMDDHHmmss")}).xlsx`
);
});
};
diff --git a/src/views/dataList/expert/index.vue b/src/views/dataList/expert/index.vue
index 09a5702..41bd20f 100644
--- a/src/views/dataList/expert/index.vue
+++ b/src/views/dataList/expert/index.vue
@@ -3,24 +3,24 @@
搜索
+ icon="search"
+ size="default"
+ type="primary"
+ @click="handleQuery"
+ >搜索
重置
+ >重置
@@ -28,58 +28,60 @@
新增
+ icon="plus"
+ plain
+ size="default"
+ type="primary"
+ @click="handleAdd"
+ >新增
导入
+ icon="upload"
+ plain
+ size="default"
+ type="info"
+ @click="handleImport"
+ >导入
批量删除
+ :disabled="!ids.length"
+ icon="delete"
+ type="danger"
+ @click="handleDelete()"
+ >批量删除
-
-
-
+
+
+
{{ row.industryStr }}
-
- {{ educationOptions.find((el) => el.key === row.education)?.text ?? "无" }}
+
+ {{
+ educationOptions.find((el) => el.key === row.education)?.text ??
+ "无"
+ }}
-
-
+
修改
+ icon="edit"
+ size="small"
+ type="text"
+ @click="handleDetail(row.id)"
+ >修改
删除
+ icon="edit"
+ size="small"
+ type="text"
+ @click="handleDelete(row.id)"
+ >删除
已认领专利
+ icon="plus"
+ size="small"
+ type="text"
+ @click="handleClaim(row.id)"
+ >已认领专利
分配账号
+ icon="edit"
+ size="small"
+ type="text"
+ @click="openAssignAccount(row.id)"
+ >分配账号
重置密码
+ icon="edit"
+ size="small"
+ type="text"
+ @click="openResetPassword(row.id)"
+ >重置密码
专家详情
+ icon="edit"
+ size="small"
+ type="text"
+ @click="goToDetail(row.id)"
+ >专家详情
@@ -149,34 +151,34 @@
-
+
将文件拖到此处,或点击上传
@@ -187,21 +189,23 @@
/>是否更新已经存在的用户数据
-->