Kaynağa Gözat

操作日志修改

duy 1 yıl önce
ebeveyn
işleme
b377cc2f79
1 değiştirilmiş dosya ile 20 ekleme ve 2 silme
  1. 20 2
      src/views/user/index.vue

+ 20 - 2
src/views/user/index.vue

@@ -183,6 +183,14 @@
                                 />
                             </el-select>
                         </div>
+                        <div class="w-20 ml-2">
+                            <el-select v-model="searchLogForm.createUser" clearable placeholder="操作人">
+                                <el-option
+                                    v-for="item in userListData" :key="item.userId" :label="item?.userName"
+                                    :value="item?.userId"
+                                />
+                            </el-select>
+                        </div>
                         <div class="w-64 ml-2">
                             <HcDatePicker :dates="betweenTime" clearable @change="betweenDateUpdate" />
                         </div>
@@ -253,6 +261,7 @@ import { useRoute, useRouter } from 'vue-router'
 import avatarPng from '~src/assets/images/avatar.png'
 import { getTokenHeader } from '~src/api/request/header'
 import { arrIndex, formValidate, getArrValue, isPhone } from 'js-fast-way'
+import { getContractUserList } from '~api/other'
 import md5 from 'js-md5'
 
 //初始变量
@@ -333,11 +342,19 @@ const handleMenuValue = (item) => {
     })
     getPageTypeData(item?.key)
 }
-
+//获取用户列表
+const userListData = ref([])
+const getUserListData = async () => {
+    const { data } = await getContractUserList({
+        contractId: contractId.value,
+    })
+    userListData.value = getArrValue(data)
+}
 //渲染完成
 onMounted(() => {
     menuObjItem()
     getPageTypeData(menuKey.value)
+    getUserListData()
 })
 
 //根据类型,获取相关数据
@@ -546,7 +563,7 @@ const setDefaultProjectClick = async () => {
 const searchLogForm = ref({
     operationModule: null, operationView: null, operationType: null, operationMedium: null,
     queryValue: null, startTime: null, endTime: null,
-    current: 1, size: 10, total: 0,
+    current: 1, size: 10, total: 0, createUser:null,
 })
 
 //业务模块
@@ -605,6 +622,7 @@ const logTableColumn = ref([
     { key: 'operationTypeValue', name: '操作类型', width: '220' },
     { key: 'operationMedium', name: '设备', align: 'center', width: '80' },
     { key: 'operationContent', name: '操作内容' },
+    { key: 'createUserName', name: '操作人', align: 'center', width: '120' },
     { key: 'createTime', name: '操作时间', align: 'center', width: '180' },
 ])
 const logTableData = ref([])