田源
2024-04-24 813b237509319b8db2e0ac8c82025b70713aa11c
Source/UBCS-WEB/src/views/monitor/log/operateLog.vue
@@ -19,6 +19,21 @@
        <small slot="more">...</small>
      </avue-text-ellipsis>
    </template>
      <template slot="menuLeft">
        <span style="width: 200px;display: inline-block">
                <el-select slot="prepend" v-model="searchSelect" placeholder="请选择" size="small">
                <el-option v-for="item in searchData" :key="item.prop" :label="item.label" :value="item.prop"
                ></el-option>
              </el-select>
            </span>
        <span style="margin-left: 5px">
                 <el-input v-model="searchValue" class="attrSearch" clearable placeholder="请输入内容"
                           prefix-icon="el-icon-search"
                           size="small" type="text"></el-input>
              <el-button  icon="el-icon-search" plain size="small" type="primary"
                         @click="searchHandler">&nbsp;搜索</el-button>
              </span>
      </template>
    </avue-crud>
  </basic-container>
</template>
@@ -30,6 +45,23 @@
  export default {
    data() {
      return {
        searchSelect: "userName",
        searchValue: '',
        searchData: [
          {
            label: "用户名",
            prop: "userName",
            align: "left",
            display: false,
            width: 200,
            required: true
          }, {
            label: "姓名",
            prop: "realName",
            align: "left",
            display: false
          }
        ],
        form: {},
        selectionList: [],
        query: {},
@@ -45,10 +77,10 @@
        },
        option: {
          height: 'auto',
          calcHeight: 30,
          calcHeight: 20,
          columnBtn:false,
          tip: false,
          searchShow: true,
          searchShow: false,
          searchMenuSpan: 6,
          border: true,
          index: true,
@@ -63,33 +95,32 @@
              label: "用户名",
              prop: "userName",
              search: true,
              width:'100'
              width:'120'
            },
            {
              label: "姓名",
              prop: "realName",
              search: true,
              width:'100'
              width:'120'
            },
            {
              label: "用户ip",
              prop: "ip",
              width:'100'
            },
            {
              label: "模块",
              prop: "model",
              width:'140'
            },
            {
              label: "时间",
              prop: "time",
              width:'160'
            },
            {
              label: "操作结果",
              prop: "operateResult",
              width:'100'
            },
            {
              label: "描述",
@@ -97,6 +128,7 @@
              span: 24,
              minRows: 20,
              type: "textarea",
              hide:true,
              slot: true,
            },
          ]
@@ -116,6 +148,13 @@
      this.getRouteParam()
    },
    methods: {
      searchHandler(){
        let params = {
          [this.searchSelect]:this.searchValue
        };
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
      },
      //获取数据
      getRouteParam() {
        const logType = this.$route.query.log_type; // 获取log_type参数的值
@@ -159,7 +198,7 @@
        }
        this.loading = true;
        listLogOperate(
          page.currentPage,
          page.currentPage,
          page.pageSize,
          conditionMaps
        ).then(res => {