|
@@ -6,7 +6,7 @@
|
|
|
<img :src="userInfo['avatar'] || avatarPng" alt="" crossOrigin="anonymous"/>
|
|
|
<div class="user-avatar-upload">
|
|
|
<el-upload class="upload-dom" :action="action" :accept="accept" :headers="getTokenHeader()" :data="upData" :show-file-list="false" :on-success="uploadFinish" :on-error="uploadError" :before-upload="beforeUpload">
|
|
|
- <HcIcon name="photo_camera" fill/>
|
|
|
+ <HcIcon name="camera" fill/>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -83,7 +83,7 @@
|
|
|
<el-menu :default-active="projectKey" class="hc-project-menu" unique-opened>
|
|
|
<el-sub-menu v-for="item in projectContractArr" :index="item.id">
|
|
|
<template #title>
|
|
|
- <HcIcon name="topic" class="hc-menu-icon"/>
|
|
|
+ <HcIcon name="folder-2" class="hc-menu-icon"/>
|
|
|
<span>{{ item?.name }}</span>
|
|
|
</template>
|
|
|
<el-menu-item v-for="items in item?.contractInfoList ?? []" :index="items?.id" @click="projectMenuValue(item,items)">
|
|
@@ -100,11 +100,11 @@
|
|
|
<span>保存</span>
|
|
|
</el-button>
|
|
|
<el-button hc-btn @click="cancelUserClick">
|
|
|
- <HcIcon name="cancel"/>
|
|
|
+ <HcIcon name="close"/>
|
|
|
<span>取消</span>
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <HcCard :title="menuItem.label" v-if="menuKey === 'log'">
|
|
|
+ <HcCard :title="menuItem.label" :scrollbar="false" v-if="menuKey === 'log'">
|
|
|
<template #search>
|
|
|
<div class="flex items-center">
|
|
|
<div class="w-32">
|
|
@@ -134,49 +134,31 @@
|
|
|
<el-input v-model="searchLogForm.queryValue" placeholder="请输入名称关键词检索" clearable @keyup="keyUpEvent"/>
|
|
|
</div>
|
|
|
<div class="ml-2">
|
|
|
- <el-button type="primary" @click="searchClick">搜索</el-button>
|
|
|
+ <el-button type="primary" @click="searchClick">
|
|
|
+ <HcIcon name="search-2"/>
|
|
|
+ <span>搜索</span>
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div class="hc-table-ref-box">
|
|
|
- <el-table hc :data="logTableData" :loading="logTableLoading" stripe>
|
|
|
- <el-table-column prop="num" label="序号" width="80">
|
|
|
- <template #default="scope">
|
|
|
- {{scope.$index + 1}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="operationModule" label="业务模块" width="180"/>
|
|
|
- <el-table-column prop="operationTypeValue" label="操作类型"/>
|
|
|
- <el-table-column prop="operationMedium" label="设备" width="80"/>
|
|
|
- <el-table-column prop="operationContent" label="操作内容" />
|
|
|
- <el-table-column prop="createTime" label="操作时间" width="180"/>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
+ <HcTable :column="logTableColumn" :datas="logTableData" :loading="logTableLoading"/>
|
|
|
<template #action>
|
|
|
<HcPages :pages="searchLogForm" @change="pageLogChange"/>
|
|
|
</template>
|
|
|
</HcCard>
|
|
|
- <HcCard :title="menuItem.label" v-if="menuKey === 'recycle'" actionSize="lg">
|
|
|
+ <HcCard :scrollbar="false" v-if="menuKey === 'recycle'" actionSize="lg">
|
|
|
+ <template #header>
|
|
|
+ <div class="mr-5">{{menuItem.label}}</div>
|
|
|
+ <HcNewSwitch :datas="userTypeTab" :keys="userTypeKey" @change="userTypeChange"/>
|
|
|
+ </template>
|
|
|
<template #extra>
|
|
|
<HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/>
|
|
|
</template>
|
|
|
- <div class="hc-table-ref-box">
|
|
|
- <el-table ref="recycleTableRef" hc :data="recycleTableData" stripe @selection-change="recycleTableSelectionChange">
|
|
|
- <el-table-column type="selection" width="50" />
|
|
|
- <el-table-column prop="num" label="序号" width="80">
|
|
|
- <template #default="scope">
|
|
|
- {{scope.$index + 1}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="fileName" label="删除内容" />
|
|
|
- <el-table-column prop="position" label="父节点名称"/>
|
|
|
- <el-table-column prop="operationTime" label="删除时间"/>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
+ <HcTable ref="recycleTableRef" :column="recycleTableColumn" :datas="recycleTableData" :loading="recycleTableLoading" isCheck @selection-change="recycleTableSelectionChange"/>
|
|
|
<template #action>
|
|
|
<div class="foot-recycle">
|
|
|
- <el-button type="primary" hc-btn :loading="recycleBtnLoading" @click="recycleBtnClick">
|
|
|
- <HcIcon name="reply"/>
|
|
|
+ <el-button type="primary" hc-btn :disabled="userTypeKey === '2'" :loading="recycleBtnLoading" @click="recycleBtnClick">
|
|
|
+ <HcIcon name="reply" fill/>
|
|
|
<span>恢复</span>
|
|
|
</el-button>
|
|
|
<HcPages :pages="searchRecycleForm" @change="pageRecycleChange"/>
|
|
@@ -190,7 +172,7 @@
|
|
|
<script setup>
|
|
|
import {ref, onMounted} from "vue";
|
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
|
-import {useAppStore} from "~src/store/index";
|
|
|
+import {useAppStore} from "~src/store";
|
|
|
import avatarPng from '~src/assets/images/avatar.png';
|
|
|
import {getTokenHeader} from '~src/api/request/header';
|
|
|
import userApi from "~api/userInfo/index"
|
|
@@ -252,11 +234,11 @@ const uploadError = () => {
|
|
|
const menuKey = ref(MenuType)
|
|
|
const menuItem = ref({})
|
|
|
const menuOptions = ref([
|
|
|
- {key: 'basic', label: '基础信息', icon: 'person'},
|
|
|
- {key: 'password', label: '密码设置', icon: 'lock_open'},
|
|
|
- {key: 'project', label: '参建项目', icon: 'home_storage'},
|
|
|
- {key: 'log', label: '操作日志', icon: 'package'},
|
|
|
- {key: 'recycle', label: '回收站', icon: 'delete'},
|
|
|
+ {key: 'basic', label: '基础信息', icon: 'user-3'},
|
|
|
+ {key: 'password', label: '密码设置', icon: 'lock-unlock'},
|
|
|
+ {key: 'project', label: '参建项目', icon: 'folder-2'},
|
|
|
+ {key: 'log', label: '操作日志', icon: 'file-mark'},
|
|
|
+ {key: 'recycle', label: '回收站', icon: 'delete-bin-5'},
|
|
|
]);
|
|
|
//获取菜单对象数据
|
|
|
const menuObjItem = () => {
|
|
@@ -532,6 +514,13 @@ const operationTypeStatus = async () => {
|
|
|
//设备
|
|
|
const deviceData = ref([{label: "APP", value: "APP"}, {label: "PC", value: "PC"}])
|
|
|
//表格数据
|
|
|
+const logTableColumn = ref([
|
|
|
+ {key:'operationModule', name: '业务模块', width: '180'},
|
|
|
+ {key:'operationTypeValue', name: '操作类型', width: '220'},
|
|
|
+ {key:'operationMedium', name: '设备', align: 'center', width: '80'},
|
|
|
+ {key:'operationContent', name: '操作内容'},
|
|
|
+ {key:'createTime', name: '操作时间', align: 'center', width: '180'},
|
|
|
+])
|
|
|
const logTableData = ref([]);
|
|
|
|
|
|
//日期时间被选择
|
|
@@ -582,6 +571,19 @@ const getLogTableData = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+//个人和全部切换
|
|
|
+const userTypeKey = ref('1')
|
|
|
+const userTypeTab = ref([{key:'1', name: '个人'}, {key:'2', name: '全部'}]);
|
|
|
+const userTypeChange = (item) => {
|
|
|
+ userTypeKey.value = item?.key;
|
|
|
+ if (item?.key === '1') {
|
|
|
+ searchRecycleForm.value.createUserName = ''
|
|
|
+ } else {
|
|
|
+ searchRecycleForm.value.createUserName = 'ALL'
|
|
|
+ }
|
|
|
+ getRecycleTableData()
|
|
|
+}
|
|
|
+
|
|
|
//结构类型tab数据和相关处理
|
|
|
const tabTypeKey = ref('1')
|
|
|
const tabTypeTab = ref([
|
|
@@ -598,12 +600,19 @@ const tabTypeChange = (item) => {
|
|
|
|
|
|
//搜索和分页数据
|
|
|
const searchRecycleForm = ref({
|
|
|
- projectId: projectId.value, contractId: contractId.value,
|
|
|
+ projectId: projectId.value, contractId: contractId.value, createUserName: '',
|
|
|
delType: tabTypeKey.value, current: 1, size: 20, total: 0
|
|
|
})
|
|
|
|
|
|
//表格数据
|
|
|
const recycleTableRef = ref(null)
|
|
|
+const recycleTableColumn = ref([
|
|
|
+ {key:'fileName', name: '删除内容'},
|
|
|
+ {key:'position', name: '父节点名称'},
|
|
|
+ {key:'createUserName', name: '操作人'},
|
|
|
+ {key:'operationTime', name: '删除时间', align: 'center', width: '180'},
|
|
|
+])
|
|
|
+const recycleTableLoading = ref(false)
|
|
|
const recycleTableData = ref(null);
|
|
|
|
|
|
//分页被点击
|