14 changed files with 372 additions and 219 deletions
@ -0,0 +1,8 @@
|
||||
import request from "@/api/request"; |
||||
|
||||
export function listRiskClues(query) { |
||||
return request.get({ |
||||
url: `/risk/clues`, |
||||
query |
||||
}); |
||||
} |
||||
@ -0,0 +1,59 @@
|
||||
<template> |
||||
<div class="container"> |
||||
<header> |
||||
<div class="flex gap"> |
||||
<el-upload |
||||
:multiple="false" |
||||
:show-file-list="false" |
||||
:action="`${BASE_PATH}/negative/import`" |
||||
:headers="{ Authorization: getToken() }" |
||||
:before-upload="beforeUpload" |
||||
@success="handleSuccess" |
||||
@error="handleError" |
||||
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" |
||||
v-perms="['police:import']" |
||||
> |
||||
<el-button type="primary"> |
||||
<template #icon> |
||||
<icon name="el-icon-Upload" /> |
||||
</template> |
||||
黄赌毒历史问题下发</el-button |
||||
> |
||||
</el-upload> |
||||
<a |
||||
class="link" |
||||
:href="`${BASE_PATH}/templates/数字督察警员权限导入模板.xlsx`" |
||||
target="__blank" |
||||
style="padding: 8px" |
||||
v-perms="['police:import']" |
||||
>黄赌毒历史问题模板下载</a |
||||
> |
||||
</div> |
||||
</header> |
||||
</div> |
||||
</template> |
||||
<script setup> |
||||
import { BASE_PATH } from "@/api/request"; |
||||
import { getToken } from "@/utils/token"; |
||||
import feedback from "@/utils/feedback"; |
||||
|
||||
import { ElLoading } from "element-plus"; |
||||
let importLoading; |
||||
function beforeUpload() { |
||||
importLoading = ElLoading.service({ |
||||
lock: true, |
||||
text: "数据导入中", |
||||
background: "rgba(0, 0, 0, 0.7)", |
||||
}); |
||||
} |
||||
function handleSuccess(result) { |
||||
importLoading.close(); |
||||
if (result.code !== 200) { |
||||
feedback.msgError(result.message); |
||||
return; |
||||
} |
||||
feedback.msgSuccess('下发成功'); |
||||
} |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
</style> |
||||
Loading…
Reference in new issue