whychdw
2021-12-11 05a3b01fc63129abe421d17c59694de984c30f52
操作记录内容提交
2个文件已修改
102 ■■■■ 已修改文件
src/assets/js/const/const_operation.js 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/userMager/operationRecord.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/const/const_operation.js
@@ -5,25 +5,49 @@
            value: 0,
        },
        {
            label: '登录系统',
            label: "系统级事件",
            value: 1,
            children: [
                {
                    label: '登录系统',
                    value: 1,
                },
                {
                    label: '登出系统',
                    value: 2,
                },
                {
                    label: '增加',
                    value: 3,
                },
                {
                    label: '更改',
                    value: 4,
                },
                {
                    label: '删除',
                    value: 5
                },
            ]
        },
        {
            label: '登出系统',
            label: "业务级事件",
            value: 2,
        },
        {
            label: '增加',
            value: 3,
        },
        {
            label: '更改',
            value: 4,
        },
        {
            label: '删除',
            value: 5
        },
            children: [
                {
                    label: '增加',
                    value: 3,
                },
                {
                    label: '更改',
                    value: 4,
                },
                {
                    label: '删除',
                    value: 5
                },
            ]
        }
        // {
        //     label: '设置',
        //     value: 6
src/pages/userMager/operationRecord.vue
@@ -17,14 +17,20 @@
                </div>
                <div class="table-cell text-right">操作类型:</div>
                <div class="table-cell">
                    <el-select v-model="formObj.czlx"  size="small" placeholder="请选择操作类型" class="select_box">
                        <el-option
                        v-for="item in czlxList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                        </el-option>
                    </el-select>
                  <el-cascader
                    class="select_box"
                    size="small"
                    v-model="czlx"
                    :options="czlxList"
                    @change="changeCzLx"></el-cascader>
<!--                    <el-select  size="small" placeholder="请选择操作类型" class="select_box">-->
<!--                        <el-option-->
<!--                        v-for="item in czlxList"-->
<!--                        :key="item.value"-->
<!--                        :label="item.label"-->
<!--                        :value="item.value">-->
<!--                        </el-option>-->
<!--                    </el-select>-->
                </div>
                <div class="table-cell text-right">操作记录时间段:</div>
                <div class="table-cell">
@@ -59,7 +65,7 @@
</template>
<script>
import { const_operation } from '../../assets/js/const'
import { const_operation } from '../../assets/js/const'
// 引入导出表格
import {
    export_json_to_excel
@@ -73,14 +79,16 @@
        let day1 = yy + '-' + MM + '-' + dd;
        return {
            czlx: [0],
            userList:[],//列表数据
            czrxmList:[],
            czlxList:[],
            formObj:{
                czrxm:"",
                czlx:0,
                eventType: 0,
                startDrsj:'2000-01-01',
                endDrsj:day1,
                endDrsj: day1,
                currentPage:1,
                pagesize:10,
            },
@@ -175,6 +183,7 @@
                    uOprateDay:vm.formObj.startDrsj + ' 00:00:00',
                    uOprateDay1:vm.formObj.endDrsj + ' 23:59:59',
                    uOprateType: vm.formObj.czlx,
                    eventType: vm.formObj.eventType
                }
            };
            vm.$apis.userMager.operationRecord.search(searchParams).then(res=>{
@@ -200,13 +209,14 @@
                }
                vm.userList = arrList;
            }).catch(error=>{
                console.log(error);
                // 关闭等待框
                    vm.$layer.close(loading);
                    vm.$layer.msg('查询失败');
                vm.$layer.close(loading);
                vm.$layer.msg('查询失败');
            });
        },
        getOprateText(type) {
            let czlxList = this.czlxList;
            let czlxList = this.czlxList[1].children;
            let result = "未知";
            for(let i=0; i<czlxList.length; i++) {
                let czlx = czlxList[i];
@@ -215,7 +225,16 @@
                }
            }
            return result;
        },
      changeCzLx(value) {
        if(value.length == 1) {
          this.formObj.czlx = 0;
          this.formObj.eventType = 0;
        }else {
          this.formObj.czlx = value[1];
          this.formObj.eventType = value[0];
        }
      }
    },
    computed: {
        userLabel() {
@@ -226,6 +245,9 @@
</script>
<style scoped>
.select_box.el-cascader {
  width: 100%;
}
</style>