zhaoke 1 rok pred
rodič
commit
36092f3526

+ 0 - 1
src/utils/axiosReq.ts

@@ -14,7 +14,6 @@ service.interceptors.request.use(
   (request: AxiosReqTy) => {
     const authMap = useUserStore().authMap
     const data = request.data!
-    console.log(data)
     if (data.btnAuth) {
       if (authMap[data.btnAuth]) {
         request.headers['auth-id'] = authMap[data.btnAuth]

+ 14 - 0
src/views/systemSettings/log/customRender.tsx

@@ -0,0 +1,14 @@
+export const ellipsisCell = (scope: any) => {
+  return defineComponent({
+    setup() {
+      const cellValue = scope.row[scope.column.property]
+
+      return () =>
+        cellValue == '1' || cellValue == '成功' ? (
+          <span class={'success'}>{cellValue}</span>
+        ) : (
+          <span class={'error'}>{cellValue}</span>
+        )
+    },
+  })
+}

+ 10 - 9
src/views/systemSettings/log/index.vue

@@ -27,12 +27,12 @@
     </div>
     <div class="interfaceLog_content">
       <el-row :gutter="24">
-        <el-col :span="19">
+        <el-col :span="24">
           <div class="app-containers">
-            <DataTable :table-header="tableColumns" :table-data="tableData" :table-property="{ rowKey: 'ID' }" @row-click="rowClickHandler" />
+            <DataTable class="table" :data="tableData" :columns="tableColumns" />
           </div>
         </el-col>
-        <el-col :span="5">
+        <el-col v-if="false" :span="5">
           <div class="interfaceLog_content_progress">
             <el-timeline>
               <el-timeline-item v-for="(item, index) in progressList" :key="index">
@@ -52,10 +52,11 @@
   </div>
 </template>
 <script setup lang="ts">
-import DataTable from "@/components/tableTemp/index.vue";
+import DataTable from "@/components/SimpleTable/index.vue";
 import { ElMessage } from "element-plus";
 import { Query } from "@/api/webApi";
 import { CommonTableColumn } from "~/common";
+import { ellipsisCell } from "./customRender";
 
 type TableColumn = {
   label: string;
@@ -106,11 +107,11 @@ const getTableData = async () => {
           : [timeStart.value, timeEnd.value, selMsg.value],
     });
     if (Number(code) === 0) {
-      tableColumns.value = columnSet.map((column) => ({
-        label: column.columnLabel,
-        key: column.columnName,
-        ...column,
-      }));
+      // customRender: ellipsisCell,
+      columnSet.map((item) => {
+        if (item.columnName == "success") item.customRender = ellipsisCell;
+      });
+      tableColumns.value = [...columnSet];
       if (listValues.length === 0) {
         page--;
         noMore.value = true;