|
@@ -134,12 +134,13 @@
|
|
|
align="center"
|
|
|
prop="status"
|
|
|
width="110px"
|
|
|
+ :formatter="columnformatter"
|
|
|
>
|
|
|
<!-- 状态 -->
|
|
|
- <template>
|
|
|
- {{ tableData.records.status}}
|
|
|
+ <!-- <template> -->
|
|
|
+ <!-- {{ tableData.records.status}} -->
|
|
|
<!-- {{ ['离线','在线', '异常', '缺料'][tableData?.records?.status] }} -->
|
|
|
- </template>
|
|
|
+ <!-- </template> -->
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
:label="$t('_bug.table.10')"
|
|
@@ -228,6 +229,9 @@ export default {
|
|
|
this.fetch();
|
|
|
},
|
|
|
methods: {
|
|
|
+ columnformatter(...e){
|
|
|
+ return ['离线','在线', '异常', '缺料'][e[2]]
|
|
|
+ },
|
|
|
onSelectChange(selection) {
|
|
|
this.selection = selection;
|
|
|
},
|
|
@@ -251,32 +255,9 @@ export default {
|
|
|
if (res.code === 0 && res.isSuccess) {
|
|
|
this.tableData = res.data;
|
|
|
}
|
|
|
- console.log(res);
|
|
|
- debugger;
|
|
|
})
|
|
|
.finally(() => (this.loading = false));
|
|
|
},
|
|
|
- clear(type) {
|
|
|
- this.$confirm("确认要清除日志吗?", this.$t("common.tips"), {
|
|
|
- confirmButtonText: this.$t("common.confirm"),
|
|
|
- cancelButtonText: this.$t("common.cancel"),
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- optLogApi.clear({ type: type }).then((response) => {
|
|
|
- const res = response.data;
|
|
|
- if (res.isSuccess) {
|
|
|
- this.$message({
|
|
|
- message: this.$t("tips.deleteSuccess"),
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- this.search();
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
singleDelete(row) {
|
|
|
this.$refs.table.clearSelection();
|
|
|
this.$refs.table.toggleRowSelection(row, true);
|
|
@@ -307,7 +288,9 @@ export default {
|
|
|
this.$refs.table.clearSelection();
|
|
|
},
|
|
|
delete(logIds) {
|
|
|
- optLogApi.delete({ ids: logIds }).then((response) => {
|
|
|
+ console.log('+++++++++++++')
|
|
|
+ console.log(logIds)
|
|
|
+ bug.delete({ ids: logIds }).then((response) => {
|
|
|
const res = response.data;
|
|
|
if (res.isSuccess) {
|
|
|
this.$message({
|