多体系建设信息化条统-前端
zhouwx
2026-02-10 70e78853b25954c916f3a31aa868faea869fce34
src/views/monitor/operlog/index.vue
@@ -36,7 +36,7 @@
               style="width: 240px"
            >
               <el-option
                  v-for="dict in sys_oper_type"
                  v-for="dict in data.sysTypeList"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
@@ -51,7 +51,7 @@
               style="width: 240px"
            >
               <el-option
                  v-for="dict in sys_common_status"
                  v-for="dict in data.sysStatus"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
@@ -109,18 +109,18 @@
      <el-table ref="operlogRef" v-loading="loading" :data="operlogList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
         <el-table-column type="selection" width="50" align="center" />
         <el-table-column label="日志编号" align="center" prop="operId" />
         <el-table-column label="日志编号" align="center" prop="id" />
         <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
         <el-table-column label="操作类型" align="center" prop="businessType">
            <template #default="scope">
               <dict-tag :options="sys_oper_type" :value="scope.row.businessType" />
               <dict-tag :options="data.sysTypeList" :value="scope.row.businessType" />
            </template>
         </el-table-column>
         <el-table-column label="操作人员" align="center" width="110" prop="operName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
         <el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
         <el-table-column label="操作状态" align="center" prop="status">
            <template #default="scope">
               <dict-tag :options="sys_common_status" :value="scope.row.status" />
               <dict-tag :options="data.sysStatus" :value="scope.row.status" />
            </template>
         </el-table-column>
         <el-table-column label="操作日期" align="center" prop="operTime" width="180" sortable="custom" :sort-orders="['descending', 'ascending']">
@@ -213,7 +213,7 @@
const total = ref(0);
const title = ref("");
const dateRange = ref([]);
const defaultSort = ref({ prop: "operTime", order: "descending" });
const defaultSort = ref({ prop: "operTime", order: "desc" });
const data = reactive({
  form: {},
@@ -225,7 +225,60 @@
    operName: undefined,
    businessType: undefined,
    status: undefined
  }
  },
  sysTypeList:[
    {
      label:'其他',
      value:'0'
    },
    {
      label:'新增',
      value:'1'
    },
    {
      label:'修改',
      value:'2'
    },
    {
      label:'删除',
      value:'3'
    },
    {
      label:'授权',
      value:'4'
    },
    {
      label:'导出',
      value:'5'
    },
    {
      label:'导入',
      value:'6'
    },
    {
      label:'强退',
      value:'7'
    },
    {
      label:'生成代码',
      value:'8'
    },
    {
      label:'清空数据',
      value:'9'
    },
  ],
  sysStatus:[
    {
      label:'正常',
      value:'0'
    },
    {
      label:'异常',
      value:'1'
    },
  ]
});
const { queryParams, form } = toRefs(data);
@@ -234,8 +287,8 @@
function getList() {
  loading.value = true;
  list(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
    operlogList.value = response.rows;
    total.value = response.total;
    operlogList.value = response.data.list;
    total.value = response.data.total;
    loading.value = false;
  });
}
@@ -257,7 +310,7 @@
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
  ids.value = selection.map(item => item.operId);
  ids.value = selection.map(item => item.id);
  multiple.value = !selection.length;
}
/** 排序触发事件 */
@@ -273,7 +326,7 @@
}
/** 删除按钮操作 */
function handleDelete(row) {
  const operIds = row.operId || ids.value;
  const operIds = row.id || ids.value;
  proxy.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function () {
    return delOperlog(operIds);
  }).then(() => {