|
@@ -97,7 +97,7 @@
|
|
<el-button class="btns" link @click="viewDetails(scope.row.id,scope.row.name)"
|
|
<el-button class="btns" link @click="viewDetails(scope.row.id,scope.row.name)"
|
|
>设备历史建议</el-button
|
|
>设备历史建议</el-button
|
|
>
|
|
>
|
|
- <el-button class="btns" link @click="exportRecord(scope.row.id)"
|
|
|
|
|
|
+ <el-button class="btns" link @click="exportRecord(scope.row.name)"
|
|
>导出记录</el-button
|
|
>导出记录</el-button
|
|
>
|
|
>
|
|
<el-button class="btns-warn" link @click="delBefore(scope.row.id)"
|
|
<el-button class="btns-warn" link @click="delBefore(scope.row.id)"
|
|
@@ -145,6 +145,8 @@ import { Filter } from "@element-plus/icons-vue";
|
|
import { Search } from "@element-plus/icons-vue";
|
|
import { Search } from "@element-plus/icons-vue";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import ModalComponent from "@/components/ModalComponent/index.vue";
|
|
import ModalComponent from "@/components/ModalComponent/index.vue";
|
|
|
|
+import { downloadDeviceRepair } from "@/api/index";
|
|
|
|
+import { downloadFile } from "@/utils/utils";
|
|
|
|
|
|
// 基础路由
|
|
// 基础路由
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -165,6 +167,10 @@ const getHealthStatusClass = (sts: number) => {
|
|
return "info"; // 处理未知或未定义的状态
|
|
return "info"; // 处理未知或未定义的状态
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+const exportRecord=(value:string)=>{
|
|
|
|
+
|
|
|
|
+ downloadFile(downloadDeviceRepair(), "设备历史维修策略.xlsx", {name:value });
|
|
|
|
+}
|
|
// 当前健康状态:1-良好;2-一般;3-较差;4-危险
|
|
// 当前健康状态:1-良好;2-一般;3-较差;4-危险
|
|
const getHealthStatusText = (status: number) => {
|
|
const getHealthStatusText = (status: number) => {
|
|
switch (status) {
|
|
switch (status) {
|