Просмотр исходного кода

告警设置模块,代码优化bug修复

Yue 2 лет назад
Родитель
Сommit
e8d85377bd

+ 44 - 49
src/core/services/RequestService.ts

@@ -6,7 +6,7 @@ import JwtService from "@/core/services/JwtService"
 import configs from "@/core/config/Index"
 import { dialog, toast } from "@/core/utils/message"
 import { useRouter } from "vue-router"
-const router=useRouter()
+const router = useRouter()
 export interface errorObj {
   message: string
   details?: string
@@ -14,20 +14,20 @@ export interface errorObj {
 const DEFAULR_ERROR = {
   error: {
     message: "发生了错误!",
-    details: "服务器未发送错误详细信息。"
+    details: "服务器未发送错误详细信息。",
   },
   error401: {
     message: "您未通过身份验证!",
-    details: "您应该经过身份验证(登录)才能执行此操作。"
+    details: "您应该经过身份验证(登录)才能执行此操作。",
   },
   error403: {
     message: "您没有权限!",
-    details: "您无权执行此操作。"
+    details: "您无权执行此操作。",
   },
 
   error404: {
     message: "找不到资源!",
-    details: "在服务器上找不到请求的资源。"
+    details: "在服务器上找不到请求的资源。",
   },
 
   logError: function (error: string) {
@@ -48,7 +48,7 @@ const DEFAULR_ERROR = {
         DEFAULR_ERROR.showError(DEFAULR_ERROR.error401, {
           beforeClose: () => {
             router.push({ name: "auth" })
-          }
+          },
         })
         break
       case 403:
@@ -61,7 +61,7 @@ const DEFAULR_ERROR = {
         DEFAULR_ERROR.showError(DEFAULR_ERROR.error)
         break
     }
-  }
+  },
 }
 
 /**
@@ -88,28 +88,29 @@ class RequestService {
       responseType: "json",
       // xsrfCookieName: tokenCookieName,
       // xsrfHeaderName: tokenHeaderName,
-      withCid:true,
+      withCid: true,
       contentType: "application/json",
       successAlert: true,
       errorAlert: true,
-      needProcess: true
+      needProcess: true,
     }
     RequestService.vueInstance.axios.defaults.timeout = 5000
-    RequestService.vueInstance.axios.interceptors.request.use((config) => {
+    RequestService.vueInstance.axios.interceptors.request.use(
+      (config) => {
         if (config.loading) {
           //toast.loading()
         }
         config.headers = Object.assign({}, config.headers, {
           Authorization: `${JwtService.getToken()}`,
           //"Authorization": `Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjUiLCJodHRwOi8vd3d3Lml3Ym5ldC5jb20vaWRlbnRpdHkvY2xhaW1zL3JlYWxOYW1lIjoiIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZSI6InNoX2xleXVueXVuIiwiaHR0cDovL3d3dy5pd2JuZXQuY29tL2lkZW50aXR5L2NsYWltcy91c2VyVHlwZSI6IjQiLCJodHRwOi8vd3d3Lml3Ym5ldC5jb20vaWRlbnRpdHkvY2xhaW1zL3VzZXJBY291bnRUeXBlQ2xhaW1UeXBlIjoiMiIsImh0dHA6Ly93d3cuaXdibmV0LmNvbS9pZGVudGl0eS9jbGFpbXMvdXNlckFjb3VudE5vQ2xhaW1UeXBlIjoic2hfbGV5dW55dW4iLCJzdWIiOiI1IiwianRpIjoiYjhjOGRkMjAtMGM0ZS00Mjg1LTk1OGUtMzRlMzgwZGVjNmM4IiwiaWF0IjoxNjc3MTQxNzc3LCJuYmYiOjE2NzcxNDE3NzcsImV4cCI6MTk5MjUwMTc3NywiaXNzIjoiWUNERiIsImF1ZCI6IllDREYifQ.WsRFJccMqIOiaaCbvHxZ2pg0CaQHJaBjf_lbakU6vn0`,
-          "Content-Type": config.contentType || "application/json;charset=UTF-8"
+          "Content-Type": config.contentType || "application/json;charset=UTF-8",
         })
-      if (config.withCid) {
-        config.headers = Object.assign({}, config.headers, {
-         "cid":""
-        })
-      }
-      
+        if (config.withCid) {
+          config.headers = Object.assign({}, config.headers, {
+            cid: "",
+          })
+        }
+
         //config.headers[tokenHeaderName] = getAntForgeryToken()
 
         return config
@@ -118,9 +119,10 @@ class RequestService {
         return Promise.reject(error)
       }
     )
-    RequestService.vueInstance.axios.interceptors.response.use((res) => {
+    RequestService.vueInstance.axios.interceptors.response.use(
+      (res) => {
         const { status, config, data } = res
-        console.debug(`${config.url} =========>`,config.data, data.result || data)
+        console.debug(`${config.url} =========>`, config.data, data.result || data)
         if (config.loading) {
           //toast.close()
         }
@@ -129,9 +131,9 @@ class RequestService {
         }
         if (status === 200) {
           if (data.code == 0) {
-            const result:any = {
+            const result: any = {
               data: data.restluLis ?? data.data ?? data.rows,
-              total: data.total
+              total: data.total,
             }
             if (config.successAlert) {
               toast.success()
@@ -149,17 +151,22 @@ class RequestService {
             } else {
               return Promise.resolve(result.data ? result : data)
             }
+          } else {
+            if (config.errorAlert) {
+              dialog.error(data.msg)
+            }
+          }
+        } else {
+          if (config.errorAlert) {
+            DEFAULR_ERROR.handleErrorStatusCode(status)
+          } else if (status === 401) {
+            router.push({ name: configs.SIGN_ROUTE_NAME })
           }
         }
-        if (config.errorAlert) {
-          DEFAULR_ERROR.handleErrorStatusCode(status)
-        } else if (status === 401) {
-          router.push({ name: configs.SIGN_ROUTE_NAME })
-        }
-        return Promise.reject(data) 
+        return Promise.reject(data)
       },
       (error: any) => {
-        console.log("ERROR",error )
+        console.log("ERROR", error)
         // console.error(`ERROR ==>${config.url} ==>`, response)
         // if (config.loading) {
         //   //toast.close()
@@ -186,10 +193,7 @@ class RequestService {
     return RequestService.vueInstance.axios.request(opt)
   }
 
-  public static get(
-    url: AxiosRequestConfig | string,
-    option?: AxiosRequestConfig
-  ): Promise<AxiosResponse> {
+  public static get(url: AxiosRequestConfig | string, option?: AxiosRequestConfig): Promise<AxiosResponse> {
     if (typeof url == "string") {
       option = option || {}
       option.url = url.toString()
@@ -201,10 +205,7 @@ class RequestService {
     return this.request(option)
   }
 
-  public static post(
-    url: AxiosRequestConfig | string,
-    option?: AxiosRequestConfig
-  ): Promise<AxiosResponse> {
+  public static post(url: AxiosRequestConfig | string, option?: AxiosRequestConfig): Promise<AxiosResponse> {
     if (typeof url == "string") {
       option = option || {}
       option.url = url.toString()
@@ -215,17 +216,14 @@ class RequestService {
     if (option.url && option.url.toLocaleLowerCase().indexOf("/get") > 0) {
       option.successAlert = option.successAlert ?? false
     }
-    if (!option.data&&option.data==undefined) {
-      option.data={}
+    if (!option.data && option.data == undefined) {
+      option.data = {}
     }
     option.method = "post"
     return this.request(option)
   }
 
-  public static put(
-    url: AxiosRequestConfig | string,
-    option?: AxiosRequestConfig
-  ): Promise<AxiosResponse> {
+  public static put(url: AxiosRequestConfig | string, option?: AxiosRequestConfig): Promise<AxiosResponse> {
     if (url instanceof String) {
       option = option || {}
       option.url = url.toString()
@@ -236,10 +234,7 @@ class RequestService {
     return this.request(option)
   }
 
-  public static delete(
-    url: AxiosRequestConfig | string,
-    option?: AxiosRequestConfig
-  ): Promise<AxiosResponse> {
+  public static delete(url: AxiosRequestConfig | string, option?: AxiosRequestConfig): Promise<AxiosResponse> {
     if (url instanceof String) {
       option = option || {}
       option.url = url.toString()
@@ -262,10 +257,10 @@ class RequestService {
       option.successAlert = option.successAlert ?? false
     }
     const params = option.params || option.data || ""
-     delete  option.params
-     delete  option.data
+    delete option.params
+    delete option.data
     option.method = "post"
-    return  RequestService.vueInstance.axios.post(url,params,option)
+    return RequestService.vueInstance.axios.post(url, params, option)
   }
 }
 

+ 7 - 6
src/layouts/main-layout/menus/NotificationsMenu.vue

@@ -21,11 +21,12 @@ const dataList = ref<Array<any>>([])
 const isShow = ref(true)
 function jump(item: any) {
   read(item.id)
+
   switch (appStore.authStore.user?.userType) {
     case "2": //企业账号
       if (item.eventType == "000100003" || item.eventType == "000100005" || item.eventType == "000100007") {
         router.push({
-          path: "/Abnormal/AbnormalList/strongWarn",
+          path: "/redirect/AbnormalList/strongWarn",
           query: {
             id: item.warn_id,
             type: item.eventType,
@@ -33,7 +34,7 @@ function jump(item: any) {
         })
       } else if (item.eventType == "000100006") {
         router.push({
-          path: "/Abnormal/AbnormalList/disConnect",
+          path: "/redirect/AbnormalList/disConnect",
           query: {
             id: item.warn_id,
             type: item.eventType,
@@ -41,7 +42,7 @@ function jump(item: any) {
         })
       } else {
         router.push({
-          path: "/Abnormal/AbnormalList/overdueWarn",
+          path: "/redirect/AbnormalList/overdueWarn",
           query: {
             id: item.warn_id,
             type: item.eventType,
@@ -54,7 +55,7 @@ function jump(item: any) {
     default:
       if (item.eventType == "000100003" || item.eventType == "000100005" || item.eventType == "000100007") {
         router.push({
-          path: "/warn/warnList/concentrationWarn",
+          path: "/redirect/warnList/strongWarn",
           query: {
             id: item.warn_id,
             type: item.eventType,
@@ -62,7 +63,7 @@ function jump(item: any) {
         })
       } else if (item.eventType == "000100006") {
         router.push({
-          path: "/warn/warnList/offlineWarn",
+          path: "/redirect/warnList/disConnect",
           query: {
             id: item.warn_id,
             type: item.eventType,
@@ -70,7 +71,7 @@ function jump(item: any) {
         })
       } else {
         router.push({
-          path: "/warn/warnList/overdueWarn",
+          path: "/redirect/warnList/overdueWarn",
           query: {
             id: item.warn_id,
             type: item.eventType,

+ 7 - 0
src/router/Index.ts

@@ -17,6 +17,13 @@ const routes: Array<RouteRecordRaw> = [
       middleware: "auth",
     },
     children: [
+      {
+        path: "/redirect/:path(.*)",
+        component: () => import("@/views/redirect/index.vue"),
+        meta: {
+          title: "加载中...",
+        },
+      },
       // {
       //   path: "/dashboard",
       //   name: "dashboard",

+ 12 - 0
src/router/menuMap/_warn.ts

@@ -29,5 +29,17 @@ export const menus: Array<MenuRouteMap> = [
     path: "/Abnormal/AbnormalTable",
     component: () => import("@/views/warn/abnormal_declare.vue"),
   },
+  {
+    path: "/warn2/warnOut",
+    component: () => import("@/views/warn/warnSetting/warnOut.vue"),
+  },
+  {
+    path: "/warn2/warnTime",
+    component: () => import("@/views/warn/warnSetting/warnTime.vue"),
+  },
+  {
+    path: "/warn/warnProp",
+    component: () => import("@/views/warn/warnSetting/warnProp.vue"),
+  },
 ]
 export default menus

+ 1 - 1
src/router/statictRouter.ts

@@ -13,7 +13,7 @@ export const staticRotuer: Array<RouteRecordRaw> = [
         },
       },
       {
-        path: "/overAnalysis/overTime/concentrationWarn",
+        path: "/overAnalysis/overTime/",
         component: () => import("@/views/overAnalysis/concentrationWarn.vue"),
         meta: {
           pageTitle: "超标详情",

+ 7 - 5
src/views/account/SignIn.vue

@@ -8,12 +8,10 @@ import appStore from "@/stores"
 const store = appStore.authStore
 const router = useRouter()
 
-const submitButton = ref<HTMLButtonElement | null>(null)
-
 const loginRef = ref<HTMLFormElement>()
 const loginForm = ref({
   username: "admin",
-  password: "admin123",
+  password: "",
   rememberMe: false,
   code: "",
   uuid: "",
@@ -80,7 +78,9 @@ function handleLogin() {
       <h3 class="title">餐饮油烟在线监测系统</h3>
       <el-form-item prop="username">
         <el-input v-model="loginForm.username" type="text" size="large" auto-complete="off" placeholder="账号">
-          <template #prefix><KTIcon icon-name="user" class="el-input__icon input-icon fs-3" /></template>
+          <template #prefix>
+            <i class="fa fa-user"></i>
+          </template>
         </el-input>
       </el-form-item>
       <el-form-item prop="password">
@@ -92,7 +92,9 @@ function handleLogin() {
           placeholder="密码"
           @keyup.enter="handleLogin"
         >
-          <template #prefix><KTIcon icon-name="lock" class="el-input__icon input-icon fs-3" /></template>
+          <template #prefix>
+            <i class="fa fa-lock"></i>
+          </template>
         </el-input>
       </el-form-item>
       <el-form-item prop="code" v-if="captchaEnabled">

+ 3 - 1
src/views/analysisInfo/clean.vue

@@ -2,7 +2,9 @@
 import { ref } from "vue"
 import Overdue from "./_Overdue.vue"
 import WeekClean from "./_WeekClean.vue"
-const queryType = ref(0)
+import { useRoute } from "vue-router"
+const route = useRoute()
+const queryType = ref(Number(route.query.current ?? "0"))
 </script>
 
 <template>

+ 13 - 0
src/views/redirect/index.vue

@@ -0,0 +1,13 @@
+<template>
+  <div></div>
+</template>
+
+<script setup lang="ts">
+import { useRouter, useRoute } from "vue-router"
+const route = useRoute()
+const router = useRouter()
+const { params, query } = route
+const { path } = params
+console.log("PATH", path)
+router.replace({ path: "/" + path, query })
+</script>

+ 0 - 1
src/views/server/busManage/contactManager.vue

@@ -95,7 +95,6 @@ function delRow(row: any) {
     method="post"
     :query-params="queryParams"
     :has-checkbox="false"
-    :pagination="false"
   >
     <template v-slot:table-tool>
       <el-row>

+ 0 - 1
src/views/server/busManage/deviceManage.vue

@@ -458,7 +458,6 @@ function delRow(row: any) {
     :interval-left="10"
     :query-params="queryParams"
     :has-checkbox="false"
-    :pagination="false"
   >
     <template v-slot:table-tool>
       <el-row>

+ 119 - 0
src/views/warn/warnSetting/warnOut.vue

@@ -0,0 +1,119 @@
+<script setup lang="ts">
+import { ref } from "vue"
+import { useRoute } from "vue-router"
+import { ElInput } from "element-plus"
+import Rs from "@/core/services/RequestService"
+import { dialog } from "@/core/utils/message"
+import DySelect from "@/components/select/DySelect.vue"
+import config from "@/core/config"
+
+const queryParams = ref({})
+
+const table = ref()
+const cols = ref([
+  {
+    name: "序号",
+    field: config.TABLE_INDEX_FIELD,
+  },
+
+  {
+    name: "营业规模",
+    field: "catering_scale_name",
+  },
+  {
+    name: "油烟浓度(mg/m³)",
+    field: "smoke_density",
+  },
+  {
+    name: "颗粒物(mg/m³)",
+    field: "pm25",
+  },
+  {
+    name: "非甲烷总烃(mg/m³)",
+    field: "voc_density",
+  },
+  { name: "操作", field: "action", width: 220 },
+])
+const modal = ref()
+const modalTitle = ref("")
+const items = [
+  {
+    field: "catering_scale",
+    label: "规模",
+    required: true,
+    component: "slot",
+    span: 12,
+  },
+  {
+    field: "smoke_density",
+    label: "油烟浓度",
+    component: ElInput,
+    required: true,
+    span: 12,
+  },
+  {
+    field: "voc_density",
+    label: "非甲烷总烃",
+    component: ElInput,
+    required: true,
+    span: 12,
+  },
+  {
+    field: "pm25",
+    label: "颗粒物",
+    component: ElInput,
+    required: true,
+    span: 12,
+  },
+]
+const formData = ref<any>({})
+
+function edit(row: any) {
+  modalTitle.value = "编辑配置"
+  formData.value = Object.assign({}, row)
+  modal.value.show()
+}
+function onSave() {
+  if (formData.value.id) {
+    delete formData.value.catering_scale_name
+    Rs.post("/sys/warnParam/updateWarnParamDischarge", { data: formData.value }).then(() => {
+      table.value.search()
+    })
+  }
+}
+</script>
+
+<template>
+  <VbDataTable
+    ref="table"
+    :header="cols"
+    url="/sys/warnParam/getWarnParamDischargeForPage"
+    method="post"
+    :query-params="queryParams"
+    :has-checkbox="false"
+  >
+    <template #action="{ row }">
+      <span class="table-action" @click="edit(row)">编辑</span>
+    </template>
+  </VbDataTable>
+  <VbModal
+    v-model:modal="modal"
+    :form-data="formData"
+    :form-items="items"
+    backdrop="static"
+    :keyboard="false"
+    :title="modalTitle"
+    form-label-width="100"
+    @confirm="onSave"
+  >
+    <template #catering_scale_form>
+      <DySelect
+        v-model="formData.catering_scale"
+        :formatRemoteData="(v:any)=>{return v?.list}"
+        :url="'sys/dict/getList?code=000090001&key=temp'"
+        class="w-100"
+        placeholder="请选择规模"
+      ></DySelect>
+    </template>
+  </VbModal>
+</template>

+ 95 - 0
src/views/warn/warnSetting/warnProp.vue

@@ -0,0 +1,95 @@
+<script setup lang="ts">
+import { ref, onMounted } from "vue"
+import { useRoute } from "vue-router"
+import { ElInput } from "element-plus"
+import Rs from "@/core/services/RequestService"
+import { dialog } from "@/core/utils/message"
+import DySelect from "@/components/select/DySelect.vue"
+import config from "@/core/config"
+
+const queryParams = ref({})
+
+const table = ref()
+const cols = ref([
+  {
+    name: "序号",
+    field: config.TABLE_INDEX_FIELD,
+    width: 60,
+  },
+  {
+    name: "事件类型",
+    field: "name",
+  },
+  {
+    name: "WEB",
+    field: "web",
+  },
+  {
+    name: "短信",
+    field: "message",
+  },
+])
+const data = ref<Array<any>>([])
+function getConfig() {
+  Rs.get("/sys/pushSettings/getConfig").then((res) => {
+    data.value = res.data
+  })
+}
+function handleChange(row: any, key: string) {
+  const text = row[key] == 1 ? "启用" : "停用"
+  dialog.confirm(`确认要 ${text} ${row.name}[${key}] 通知吗?`, text + "通知", (confirm: any) => {
+    if (confirm.isConfirmed) {
+      Rs.post("/sys/pushSettings/setConfig", { data: data.value })
+        .then(() => {
+          dialog.success(text + "成功")
+        })
+        .catch(() => {
+          row[key] = row[key] == 0 ? 1 : 0
+        })
+    } else {
+      row[key] = row[key] == 0 ? 1 : 0
+    }
+  })
+}
+
+onMounted(() => {
+  getConfig()
+})
+</script>
+
+<template>
+  <VbDataTable
+    ref="table"
+    :header="cols"
+    :data="data"
+    method="get"
+    :query-params="queryParams"
+    :has-checkbox="false"
+    :no-page="true"
+  >
+    <template #tableHeader>
+      <thead>
+        <tr class="text-center">
+          <th class="bg-light-primary" rowspan="2" style="vertical-align: middle; width: 60px">序号</th>
+          <th class="bg-light-primary" rowspan="2" style="vertical-align: middle">事件名称</th>
+          <th class="bg-light-primary" colspan="2">告警方式</th>
+        </tr>
+        <tr class="text-center">
+          <th class="bg-light-primary">WEB</th>
+          <th class="bg-light-primary">短信</th>
+        </tr>
+      </thead>
+    </template>
+    <template #web="{ row }">
+      <el-switch v-model="row.web" :active-value="1" :inactive-value="0" @change="handleChange(row, 'web')"></el-switch>
+    </template>
+    <template #message="{ row }">
+      <el-switch
+        v-model="row.message"
+        :active-value="1"
+        :inactive-value="0"
+        @change="handleChange(row, 'message')"
+      ></el-switch>
+    </template>
+  </VbDataTable>
+</template>

+ 233 - 0
src/views/warn/warnSetting/warnTime.vue

@@ -0,0 +1,233 @@
+<script setup lang="ts">
+import { ref } from "vue"
+import { ElInput } from "element-plus"
+import Rs from "@/core/services/RequestService"
+import { dialog } from "@/core/utils/message"
+import DySelect from "@/components/select/DySelect.vue"
+import config from "@/core/config"
+
+const queryParams = ref<any>({})
+const dySearchSelectStyle = { width: "180px" }
+
+const table = ref()
+const cols = ref([
+  {
+    name: "序号",
+    field: config.TABLE_INDEX_FIELD,
+    width: 60,
+  },
+  {
+    name: "所属菜系",
+    field: "catering_style_name",
+  },
+  {
+    name: "营业规模",
+    field: "catering_scale_name",
+  },
+  {
+    name: "天数",
+    field: "clean_cycle_day",
+  },
+  {
+    name: "开机小时",
+    field: "clean_cycle_hour",
+  },
+  { name: "操作", field: "action", width: 220 },
+])
+const cateringScale = ref("")
+const cateringStyle = ref("")
+
+function query() {
+  const params = {
+    catering_scale: cateringScale.value,
+    catering_style: cateringStyle.value,
+  }
+  const keys = Object.keys(params)
+  keys.forEach((key) => {
+    if (params[key] == "" && params[key] !== 0) {
+      delete params[key]
+    }
+  })
+  queryParams.value = params
+}
+function reset() {
+  cateringScale.value = ""
+  cateringStyle.value = ""
+  query()
+}
+const modal = ref()
+const modalTitle = ref("")
+const items = [
+  {
+    field: "catering_style",
+    label: "菜系名称",
+    required: true,
+    component: "slot",
+    span: 24,
+  },
+  {
+    field: "catering_scale",
+    label: "规模",
+    required: true,
+    component: "slot",
+    span: 24,
+  },
+  {
+    field: "clean_cycle_day",
+    label: "清洗周期(天数)",
+    type: "number",
+    component: ElInput,
+    required: true,
+    labelWidth: 160,
+    span: 24,
+  },
+  {
+    field: "clean_cycle_hour",
+    label: "开机时间(小时)",
+    type: "number",
+    component: ElInput,
+    required: true,
+    labelWidth: 160,
+    span: 24,
+  },
+]
+const formData = ref<any>({})
+
+function add() {
+  formData.value = {}
+  modalTitle.value = "新增清洗周期"
+  modal.value.show()
+}
+function edit(row: any) {
+  modalTitle.value = "编辑清洗周期"
+  formData.value = Object.assign({}, row)
+  modal.value.show()
+}
+function onSave() {
+  const data = {
+    id: formData.value.id,
+    catering_scale: formData.value.catering_scale,
+    catering_style: formData.value.catering_style,
+    clean_cycle_day: formData.value.clean_cycle_day,
+    clean_cycle_hour: formData.value.clean_cycle_hour,
+  }
+  if (data.id) {
+    Rs.post("/sys/warnParam/updateWarnParamClean", { data }).then(() => {
+      table.value.search()
+    })
+  } else {
+    Rs.post("/sys/warnParam/addWarnParamClean", { data }).then(() => {
+      table.value.search()
+    })
+  }
+}
+function delRow(row: any) {
+  dialog.confirm(
+    `确定删除周期【${row.catering_style_name}-${row.catering_scale_name}】吗?`,
+    "删除清洗周期",
+    (confirme: any) => {
+      if (confirme.isConfirmed) {
+        Rs.post("/sys/warnParam/delWarnParamCleanByIds", { data: [row.id] }).then(() => {
+          table.value.search()
+        })
+      }
+    }
+  )
+}
+</script>
+
+<template>
+  <VbDataTable
+    ref="table"
+    :header="cols"
+    url="/sys/warnParam/getWarnParamCleanForPage"
+    method="post"
+    :query-params="queryParams"
+    :has-checkbox="false"
+  >
+    <template #tableHeader>
+      <thead>
+        <tr class="text-center">
+          <th class="bg-light-primary" rowspan="2" style="vertical-align: middle; width: 60px">序号</th>
+          <th class="bg-light-primary" rowspan="2" style="vertical-align: middle">所属菜系</th>
+          <th class="bg-light-primary" rowspan="2" style="vertical-align: middle">营业规模</th>
+          <th class="bg-light-primary" colspan="2">清洗周期</th>
+          <th class="bg-light-primary" rowspan="2" style="vertical-align: middle; width: 150px">操作</th>
+        </tr>
+        <tr class="text-center">
+          <th class="bg-light-primary">天数</th>
+          <th class="bg-light-primary">开机小时</th>
+        </tr>
+      </thead>
+    </template>
+    <template v-slot:table-tool>
+      <el-row>
+        <el-col :span="1.5">
+          <el-form class="align-items-center" :inline="true">
+            <el-form-item class="mb-0 me-5 align-items-center" label="菜系">
+              <DySelect
+                v-model="cateringStyle"
+                :formatRemoteData="(v:any)=>{return v?.list}"
+                :url="'sys/dict/getList?code=000010001&key=temp'"
+                :style="dySearchSelectStyle"
+                placeholder="请选择菜系"
+              ></DySelect>
+            </el-form-item>
+            <el-form-item class="mb-0 me-5 align-items-center" label="规模">
+              <DySelect
+                v-model="cateringScale"
+                :formatRemoteData="(v:any)=>{return v?.list}"
+                :url="'sys/dict/getList?code=000090001&key=temp'"
+                :style="dySearchSelectStyle"
+                placeholder="请选择规模"
+              ></DySelect>
+            </el-form-item>
+            <el-form-item class="mb-0 me-0 align-items-center">
+              <el-button class="ms-3 mt-0 btn btn-sm btn-primary" @click="query">查询</el-button>
+              <el-button class="ms-3 mt-0 btn btn-sm btn-light-primary btn-outline" @click="reset">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+        <div class="ms-auto me-2">
+          <el-button class="ms-3 mt-0 btn btn-sm btn-success" @click="add">
+            <i class="fa-solid fa-plus"></i>
+            新增
+          </el-button>
+        </div>
+      </el-row>
+    </template>
+    <template #action="{ row }">
+      <span class="table-action" @click="edit(row)">编辑</span>
+      <span class="table-action" @click="delRow(row)">删除</span>
+    </template>
+  </VbDataTable>
+  <VbModal
+    v-model:modal="modal"
+    :form-data="formData"
+    :form-items="items"
+    backdrop="static"
+    :keyboard="false"
+    :title="modalTitle"
+    form-label-width="100"
+    @confirm="onSave"
+  >
+    <template #catering_style_form>
+      <DySelect
+        v-model="formData.catering_style"
+        :formatRemoteData="(v:any)=>{return v?.list}"
+        :url="'sys/dict/getList?code=000010001&key=temp'"
+        class="w-100"
+        placeholder="请选择菜系名称"
+      ></DySelect>
+    </template>
+    <template #catering_scale_form>
+      <DySelect
+        v-model="formData.catering_scale"
+        :formatRemoteData="(v:any)=>{return v?.list}"
+        :url="'sys/dict/getList?code=000090001&key=temp'"
+        class="w-100"
+        placeholder="请选择规模"
+      ></DySelect>
+    </template>
+  </VbModal>
+</template>