From 9c91c96c4c1dca21670abfa7a0c879a734a888de Mon Sep 17 00:00:00 2001
From: lxp <1928192722@qq.com>
Date: 星期五, 14 三月 2025 20:09:37 +0800
Subject: [PATCH] 工时管理
---
src/views/business/reportPreparation/index.vue | 116 +++++++++++++++++++--------------------------------------
1 files changed, 39 insertions(+), 77 deletions(-)
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index 1512399..ecb205b 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -244,37 +244,6 @@
</el-dropdown-menu>
</el-dropdown>
</template>
- <template>
- <el-button
- size="small"
- type="primary"
- @click="handleDowns"
- :loading="outLoading"
- style="margin-right: 6px"
- >鎵归噺涓嬭浇</el-button
- >
- <el-button
- size="small"
- type="primary"
- @click="openBatchUploadDia()"
- :loading="inLoading"
- >鎵归噺涓婁紶</el-button
- >
- <el-button
- size="small"
- type="primary"
- @click="oneClickApproval()"
- :loading="approvalLoading"
- >涓�閿鎵�</el-button
- >
- <el-button
- size="small"
- type="primary"
- @click="openApprovalConfig()"
- :loading="approvalConfigLoading"
- >瀹℃壒绛惧悕閰嶇疆</el-button
- >
- </template>
</div>
<!-- <div class="btns">
<el-button size="small" type="primary" @click="handleDowns" :loading="outLoading" style="margin-right: 16px;">鎵归噺涓嬭浇</el-button>
@@ -316,6 +285,8 @@
</p>
</div>
<lims-table
+ :handleSelectionChange="handleSelectionChange"
+ isSelection
:tableData="tableData"
:column="column"
:tableLoading="tableLoading"
@@ -850,15 +821,18 @@
downAll,
getBatchApprovalProgress,
getReportCountInfo,
- downReport,
upReportUrl,
ratifyReport,
writeReport,
examineReport,
downLoad,
getReportInfo,
- getURL
+ getURL,
+ batchApprovalReport,
+ downReport,
} from "../../../api/business/reportPreparation";
+
+import { getToken } from "@/utils/auth";
export default {
components: {
@@ -1129,11 +1103,10 @@
{
name: "涓婁紶",
type: "upload",
- url: "/file/attachmentType/upload",
+ url: "/insReport/inReport",
data: (row) => {
return {
id: row.id,
- type: 1,
};
},
uploadIdFun: (row) => {
@@ -1238,12 +1211,13 @@
},
computed: {
headers() {
+ let token = getToken();
return {
- token: sessionStorage.getItem("token"),
+ authorization: token,
};
},
action() {
- return "";
+ return this.javaApi + "/insReport/upAll";
},
},
created() {
@@ -1332,7 +1306,7 @@
},
// 鎾ゅ洖 寮规
withdraw(row) {
- getLaboratoryByReportId(row.id).then((res) => {
+ getLaboratoryByReportId({ id: row.id }).then((res) => {
this.laboratorys = res.data;
this.reportId = row.id;
this.withdrawDialogVisible = true;
@@ -1350,6 +1324,7 @@
withdraw(data).then((res) => {
if (res.code == 200) {
this.$message.success("鎾ゅ洖鎴愬姛");
+ this.laboratory = [];
this.withdrawDialogVisible = false;
this.refresh();
}
@@ -1400,6 +1375,7 @@
getAuthorizedPerson() {
getUserList()
.then((res) => {
+ console.log('res',res);
this.personList = res.data;
})
.catch((error) => {
@@ -1540,6 +1516,10 @@
handleChange(arr) {
this.mutiList = arr;
},
+ handleSelectionChange(val) {
+ this.mutiList = val;
+ console.log(`output->val`, val);
+ },
handleDowns() {
if (this.mutiList.length == 0) {
this.$message.error("璇烽�夋嫨鎶ュ憡");
@@ -1583,14 +1563,8 @@
downAll({ ids: str }).then((res) => {
this.outLoading = false;
this.$message.success("瀵煎嚭鎴愬姛");
- // const blob = new Blob([res],{ type: 'application/octet-stream' });
- // const url = URL.createObjectURL(blob);
- // const link = document.createElement('a');
- // link.href = url;
- // link.download = '鎶ュ憡.zip';
- // link.click();
const link = document.createElement("a");
- link.href = this.javaApi + res.message;
+ link.href = this.javaApi + res.data;
link.target = "_blank";
document.body.appendChild(link);
link.click();
@@ -1719,27 +1693,21 @@
console.log(`output->row`, row);
},
download(row) {
- getReportInfo({ id: row.id, type: 1,suffix:'.docx' }).then((response) => {
- if (response.data && response.data.contentType) {
- downLoad({ id: row.id, type: 1, code: row.code,suffix: '.docx' })
- .then((res) => {
- // 鑾峰彇鏂囦欢鍚�
- const blob = new Blob([res], { type: response.data.contentType });
- const url = URL.createObjectURL(blob);
- let link = document.createElement("a");
- link.href = url;
- link.download = row.code;
- document.body.appendChild(link);
- link.click();
- document.body.removeChild(link);
- URL.revokeObjectURL(url);
- })
- .catch((error) => {
- this.$message.error(error);
- });
- } else {
- this.$message.error("鏈壘鍒版枃浠�");
- }
+ downReport({ id: row.id, type: 0 }).then((res) => {
+ let rowUrl = row.urlS ? row.urlS : row.url;
+ let fileName =
+ rowUrl.indexOf("_") == -1
+ ? rowUrl.split("/")[2]
+ : rowUrl.split("_")[1];
+ console.log(fileName);
+ const blod = new Blob([res], { type: "application/octet-stream" });
+ const url = URL.createObjectURL(blod);
+ const link = document.createElement("a");
+ link.href = url;
+ link.target = "_blank";
+ link.download = fileName;
+ document.body.appendChild(link);
+ link.click();
});
},
// 杩樺師鎿嶄綔
@@ -1750,7 +1718,7 @@
type: "warning",
})
.then(() => {
- upReportUrl({ id: row.id,type:1 }).then((res) => {
+ upReportUrl({ id: row.id, type: 1 }).then((res) => {
if (res.code === 200) {
this.$message.success("鎿嶄綔鎴愬姛");
this.refreshTable("page");
@@ -1763,7 +1731,7 @@
this.currentInfo = row;
let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
fileName = fileName.replace("/word/", "");
- const userName = JSON.parse(localStorage.getItem("user")).name;
+ const userName = this.$store.state.user.name;
this.option = {
url: this.javaApi + "/word/" + fileName,
isEdit: false,
@@ -1799,17 +1767,11 @@
},
handleApprove(row) {
this.currentInfo = row;
- getURL().then(res => {
-
- })
-
-
-
let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
fileName = fileName.replace("/word/", "");
const userName = this.$store.state.user.name;
this.option = {
- url: javaApi + "/word/" + fileName,
+ url: this.javaApi + "/word/" + fileName,
isEdit: false,
fileType: "docx",
title: fileName,
@@ -1895,8 +1857,8 @@
this.loadingApproveReason = true;
examineReport({
id: this.currentInfo.id,
- isRatify: 0,
- ratifyTell: this.reason,
+ isExamine: 0,
+ examineTell: this.reason,
})
.then((res) => {
this.loadingApproveReason = false;
--
Gitblit v1.9.3