xiaodai2017 há 2 anos atrás
pai
commit
290be40fab

+ 1 - 1
src/api/reportForm/reportRecord/index.ts

@@ -18,7 +18,7 @@ export const httpList = (data: object): ResponseType => {
 };
 // 删除
 export const httpDelete = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}logdel`, { data });
+  return http.request("post", `${yewuApi}execlogdel`, { data });
 };
 // 备选类型
 export const httpListAll = (data: object): ResponseType => {

+ 16 - 4
src/views/reportForm/reportRecord/config/content.config.ts

@@ -26,7 +26,7 @@ const columns = [
   {
     label: "执行类型",
     prop: "type",
-    width: "100px",
+    width: "90px",
     cellRenderer: ({ row, props }) =>
       h(
         ElTag,
@@ -43,7 +43,7 @@ const columns = [
   {
     label: "状态",
     prop: "status",
-    width: "100px",
+    width: "90px",
     cellRenderer: ({ row, props }) => {
       const { type, label } = tag_type.find(
         s => String(row.status) === s.value
@@ -60,10 +60,22 @@ const columns = [
       );
     }
   },
+  {
+    label: "开始时间",
+    prop: "start",
+    width: "140px",
+    formatter: ({ start }) => dayjs(start).format("YYYY-MM-DD HH:mm:ss")
+  },
+  {
+    label: "结束时间",
+    prop: "end",
+    width: "140px",
+    formatter: ({ end }) => dayjs(end).format("YYYY-MM-DD HH:mm:ss")
+  },
   {
     label: "业务公司编码",
     prop: "companyNo",
-    width: "180px"
+    width: "160px"
   },
   {
     label: "业务公司名称",
@@ -84,7 +96,7 @@ const columns = [
   {
     label: "操作",
     fixed: "right",
-    width: 100,
+    width: 80,
     slot: "operation"
   }
 ];

+ 9 - 0
src/views/reportForm/reportRecord/config/modal.config.ts

@@ -39,6 +39,15 @@ const modalConfig: ModalConfig = {
         disabled: true
       }
     },
+    {
+      field: "type",
+      type: "select",
+      label: "执行类型",
+      labelWidth: "120px",
+      placeholder: "执行类型",
+      rules: [{ required: true, trigger: "change", message: "请选择执行类型" }],
+      options: type_options
+    },
     {
       field: "create_timer",
       type: "date_picker",

+ 22 - 4
src/views/reportForm/reportRecord/index.vue

@@ -4,8 +4,9 @@ import searchConfig from "./config/search.config";
 import modalConfig from "./config/modal.config";
 import { usePageSearch, usePageModal, type PageHooks } from "/@/hooks/page";
 import { useCompany } from "/@/hooks/core/useCompany";
-
-const PageName = "reportApply";
+import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
+import dayjs from "dayjs";
+const PageName = "reportRecord";
 
 const { currentCompany } = useCompany();
 
@@ -14,11 +15,16 @@ const hooks: PageHooks = {
   pageModalHook: pageContentRef =>
     usePageModal({
       pageContentRef,
-      confirmCallback: () => ({
+      confirmCallback: ({ create_timer }) => ({
+        start: dayjs(create_timer[0]).format("YYYY-MM-DD"),
+        end: dayjs(create_timer[1]).format("YYYY-MM-DD"),
         companyNo: currentCompany.value.companyNo
       })
     })
 };
+const download = url => {
+  console.log(url);
+};
 </script>
 
 <template>
@@ -28,6 +34,18 @@ const hooks: PageHooks = {
       :contentConfig="contentConfig"
       :search-config="searchConfig"
       :modal-config="modalConfig"
-    />
+    >
+      <template #content_action="{ status, down_url }">
+        <ElButton
+          link
+          size="small"
+          class="fl"
+          type="primary"
+          v-if="String(status) === '2'"
+          @click="download(down_url)"
+          :icon="useRenderIcon('arrow-down-line')"
+        />
+      </template>
+    </PageContainer>
   </PageAuth>
 </template>