|
@@ -2,141 +2,211 @@
|
|
<div class="hc-layout-box">
|
|
<div class="hc-layout-box">
|
|
<div class="hc-layout-left-box">
|
|
<div class="hc-layout-left-box">
|
|
<div class="user-avatar-box">
|
|
<div class="user-avatar-box">
|
|
- <n-upload :action="action" :accept="accept" :headers="getTokenHeader()" :data="upData" @before-upload="beforeUpload" @finish="uploadFinish">
|
|
|
|
- <n-avatar round :size="110" :src="userInfo['avatar'] || avatarPng"/>
|
|
|
|
- </n-upload>
|
|
|
|
- <div class="text-sm text-gray-400">点击头像更换</div>
|
|
|
|
|
|
+ <div class="user-avatar" v-loading="avatarLoading">
|
|
|
|
+ <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/>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="user-name truncate">{{ userInfo['real_name'] || '游客' }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="user-menu-box">
|
|
<div class="user-menu-box">
|
|
- <n-menu :options="menuOptions" v-model:value="menuKey" accordion @update:value="handleMenuValue"/>
|
|
|
|
|
|
+ <el-scrollbar>
|
|
|
|
+ <HcMenuSimple :datas="menuOptions" :keys="menuKey" @change="handleMenuValue"/>
|
|
|
|
+ </el-scrollbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="hc-layout-content-box">
|
|
<div class="hc-layout-content-box">
|
|
- <n-card class="hc-card-overflow-p-box" :segmented="{content: true}">
|
|
|
|
- <template #header>
|
|
|
|
- <div class="hc-card-header flex items-center">
|
|
|
|
- <div class="card-title" v-if="menuKey === 'basic'">基础信息</div>
|
|
|
|
- <div class="card-title" v-if="menuKey === 'password'">密码设置</div>
|
|
|
|
- <div class="card-title" v-if="menuKey === 'project'">参见项目</div>
|
|
|
|
- <div class="card-title" v-if="menuKey === 'log'">操作日志</div>
|
|
|
|
- <div class="card-title" v-if="menuKey === 'recycle'">回收站</div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <HcCard :title="menuItem.label" :ui="basicHight?'basic-hight':''" v-if="menuKey !== 'log' && menuKey !== 'recycle'">
|
|
|
|
+ <template #extra>
|
|
|
|
+ <span class="text-link" v-if="menuKey === 'basic' && !basicFormEdit" @click="basicFormEditClick">编辑</span>
|
|
|
|
+ <span class="text-link" v-if="menuKey === 'project'" @click="setDefaultProjectClick">设置默认项目</span>
|
|
</template>
|
|
</template>
|
|
- <template #header-extra>
|
|
|
|
- <n-button type="primary" strong secondary class="px-4" v-if="menuKey === 'project'" @click="setDefaultProjectClick">设置默认项目</n-button>
|
|
|
|
- <HcTabs :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange" v-if="menuKey === 'recycle'"/>
|
|
|
|
|
|
+ <template v-if="menuKey === 'basic'">
|
|
|
|
+ <el-form ref="formUserRef" :model="formUserModel" :rules="formUserRules" size="large" label-position="top">
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="用户名称" :prop="basicFormEdit?'real_name':''">
|
|
|
|
+ <el-input v-model="formUserModel.real_name" placeholder="请输入用户名称" :disabled="!basicHight"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="登录账号">
|
|
|
|
+ <el-input v-model="formUserModel.account" placeholder="" disabled/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="身份证号">
|
|
|
|
+ <el-input v-model="formUserModel.idNumber" placeholder="" disabled/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="绑定手机">
|
|
|
|
+ <el-input v-model="formUserModel.phone" placeholder="" disabled/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="所属角色">
|
|
|
|
+ <el-input v-model="formUserModel.role_name" placeholder="" disabled/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="所属部门">
|
|
|
|
+ <el-input v-model="formUserModel.deptId" placeholder="" disabled/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="CA签字体">
|
|
|
|
+ <!--el-image style="height: 60px" src="" :preview-src-list="srcList" :initial-index="0" fit="cover"/-->
|
|
|
|
+ 开发中...
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
</template>
|
|
</template>
|
|
- <div class="card-form-box" v-if="menuKey === 'basic'">
|
|
|
|
- <n-form ref="formUserRef" :model="formUserModel" :rules="formUserRules" label-placement="left" label-width="auto" size="large">
|
|
|
|
- <n-form-item label="用户名称" path="nick_name">
|
|
|
|
- <n-input v-model:value="formUserModel.real_name" placeholder="请输入用户名称"/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="登录账号">
|
|
|
|
- <n-input v-model:value="formUserModel.account" disabled placeholder=""/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="身份证号">
|
|
|
|
- <n-input v-model:value="formUserModel.idNumber" disabled placeholder=""/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="绑定手机">
|
|
|
|
- <n-input v-model:value="formUserModel.phone" disabled placeholder=""/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="所属角色">
|
|
|
|
- <n-input v-model:value="formUserModel.role_name" disabled placeholder=""/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="所属部门">
|
|
|
|
- <n-input v-model:value="formUserModel.deptId" disabled placeholder=""/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="CA签字体">
|
|
|
|
- <n-image height="60" src="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"/>
|
|
|
|
- </n-form-item>
|
|
|
|
- </n-form>
|
|
|
|
- </div>
|
|
|
|
- <div class="card-form-box" v-if="menuKey === 'password'">
|
|
|
|
- <n-form ref="formUserPassRef" :model="formUserPassModel" :rules="formUserPassRules" label-placement="left" label-width="auto" size="large">
|
|
|
|
- <n-form-item label="原始密码" path="oldPassword">
|
|
|
|
- <n-input v-model:value="formUserPassModel.oldPassword" placeholder="请输入原始密码"/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="新的密码" path="newPassword">
|
|
|
|
- <n-input v-model:value="formUserPassModel.newPassword" placeholder="请输入新的密码"/>
|
|
|
|
- </n-form-item>
|
|
|
|
- <n-form-item label="确认新密码" path="newPassword1">
|
|
|
|
- <n-input v-model:value="formUserPassModel.newPassword1" placeholder="请输入确认新密码"/>
|
|
|
|
- </n-form-item>
|
|
|
|
- </n-form>
|
|
|
|
- </div>
|
|
|
|
- <div class="card-form-box project-menu" v-if="menuKey === 'project'">
|
|
|
|
- <n-menu ref="projectMenuRef" :options="projectMenu" :icon-size="16" v-model:value="projectKey" accordion @update:value="projectMenuValue"/>
|
|
|
|
- </div>
|
|
|
|
- <div class="card-form-box" v-if="menuKey === 'log'">
|
|
|
|
|
|
+ <template v-if="menuKey === 'password'">
|
|
|
|
+ <el-form ref="formUserPassRef" :model="formUserPassModel" :rules="formUserPassRules" size="large" label-position="top" style="max-width: 400px; margin: auto;">
|
|
|
|
+ <el-form-item label="原始密码" prop="oldPassword">
|
|
|
|
+ <el-input type="password" v-model="formUserPassModel.oldPassword" placeholder="请输入原始密码" show-password/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="新的密码" prop="newPassword">
|
|
|
|
+ <el-input type="password" v-model="formUserPassModel.newPassword" placeholder="请输入新的密码" show-password/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="确认新密码" prop="newPassword1">
|
|
|
|
+ <el-input type="password" v-model="formUserPassModel.newPassword1" placeholder="请输入确认新密码" show-password/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="menuKey === 'project'">
|
|
|
|
+ <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"/>
|
|
|
|
+ <span>{{ item?.name }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <el-menu-item v-for="items in item?.contractInfoList ?? []" :index="items?.id" @click="projectMenuValue(item,items)">
|
|
|
|
+ <HcIcon name="star" class="hc-menu-icon" fill v-if="projectKey === items?.id"/>
|
|
|
|
+ <span>{{ items?.name }}</span>
|
|
|
|
+ </el-menu-item>
|
|
|
|
+ </el-sub-menu>
|
|
|
|
+ </el-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </HcCard>
|
|
|
|
+ <div class="hc-card-foot-box" v-if="basicFormEdit">
|
|
|
|
+ <el-button type="primary" hc-btn :loading="saveUserLoading" @click="saveUserInfoClick">
|
|
|
|
+ <HcIcon name="save"/>
|
|
|
|
+ <span>保存</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button hc-btn @click="cancelUserClick">
|
|
|
|
+ <HcIcon name="cancel"/>
|
|
|
|
+ <span>取消</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <HcCard :title="menuItem.label" v-if="menuKey === 'log'">
|
|
|
|
+ <template #search>
|
|
<div class="flex items-center">
|
|
<div class="flex items-center">
|
|
<div class="w-32">
|
|
<div class="w-32">
|
|
- <n-select v-model:value="searchLogForm.operationModule" :options="operationModuleData" placeholder="业务模块" clearable label-field="dictValue" value-field="dictKey" @update:value="BusinessModuleValue"/>
|
|
|
|
|
|
+ <el-select v-model="searchLogForm.operationModule" placeholder="业务模块" clearable @change="BusinessModuleValue">
|
|
|
|
+ <el-option v-for="item in operationModuleData" :key="item.value" :label="item?.dictValue" :value="item?.dictKey"/>
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
<div class="w-32 ml-2">
|
|
<div class="w-32 ml-2">
|
|
- <n-select v-model:value="searchLogForm.operationView" :options="operationViewData" placeholder="页面" clearable label-field="dictValue" value-field="dictKey" @update:value="OperationViewValue"/>
|
|
|
|
|
|
+ <el-select v-model="searchLogForm.operationView" placeholder="页面" clearable @change="OperationViewValue">
|
|
|
|
+ <el-option v-for="item in operationViewData" :key="item.value" :label="item?.dictValue" :value="item?.dictKey"/>
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
- <div class="w-44 ml-2">
|
|
|
|
- <n-select v-model:value="searchLogForm.operationType" :options="operationTypeData" placeholder="操作类型" clearable label-field="dictValue" value-field="dictKey"/>
|
|
|
|
|
|
+ <div class="w-40 ml-2">
|
|
|
|
+ <el-select v-model="searchLogForm.operationType" placeholder="操作类型" clearable>
|
|
|
|
+ <el-option v-for="item in operationTypeData" :key="item.value" :label="item?.dictValue" :value="item?.dictKey"/>
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
- <div class="w-24 ml-2">
|
|
|
|
- <n-select v-model:value="searchLogForm.operationMedium" :options="deviceData" placeholder="设备" clearable/>
|
|
|
|
|
|
+ <div class="w-20 ml-2">
|
|
|
|
+ <el-select v-model="searchLogForm.operationMedium" placeholder="设备" clearable>
|
|
|
|
+ <el-option v-for="item in deviceData" :key="item.value" :label="item?.label" :value="item?.value"/>
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
- <div class="w-72 ml-2">
|
|
|
|
- <n-date-picker v-model:formatted-value="betweenTime" value-format="yyyy-MM-dd" type="daterange" clearable @update:value="betweenTimeUpdate"/>
|
|
|
|
|
|
+ <div class="w-64 ml-2">
|
|
|
|
+ <HcDatePicker :dates="betweenTime" clearable @change="betweenDateUpdate"/>
|
|
</div>
|
|
</div>
|
|
<div class="w-60 ml-2">
|
|
<div class="w-60 ml-2">
|
|
- <n-input v-model:value="searchLogForm.queryValue" type="text" placeholder="请输入名称关键词检索" @keyup="keyUpEvent" clearable/>
|
|
|
|
|
|
+ <el-input v-model="searchLogForm.queryValue" placeholder="请输入名称关键词检索" clearable @keyup="keyUpEvent"/>
|
|
</div>
|
|
</div>
|
|
<div class="ml-2">
|
|
<div class="ml-2">
|
|
- <n-button type="primary" class="px-5" @click="searchClick">搜索</n-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="searchClick">搜索</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="card-data-table">
|
|
|
|
- <n-data-table :columns="logTableColumns" :data="logTableData" :single-line="false" :loading="logTableLoading" striped/>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="card-form-box" v-if="menuKey === 'recycle'">
|
|
|
|
- <n-data-table :columns="recycleTableColumns" :data="recycleTableData" :row-key="row => row.name" :single-line="false" striped/>
|
|
|
|
- </div>
|
|
|
|
- <template #action v-if="menuKey !== 'project'">
|
|
|
|
- <div class="text-center" v-if="menuKey === 'basic' || menuKey === 'password'">
|
|
|
|
- <n-button type="primary" class="px-8" :loading="saveUserLoading" @click="saveUserInfoClick" v-if="menuKey === 'basic'">保存</n-button>
|
|
|
|
- <n-button type="primary" class="px-8" :loading="userPassLoading" @click="saveUserPassClick" v-if="menuKey === 'password'">保存</n-button>
|
|
|
|
- </div>
|
|
|
|
- <HcPage :pages="searchLogForm" @change="pageLogChange" v-if="menuKey === 'log'"/>
|
|
|
|
- <div class="foot-recycle" v-if="menuKey === 'recycle'">
|
|
|
|
- <n-button type="primary" class="px-8">恢复</n-button>
|
|
|
|
- <HcPage :pages="searchRecycleForm" @change="pageRecycleChange"/>
|
|
|
|
|
|
+ </template>
|
|
|
|
+ <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>
|
|
|
|
+ <template #action>
|
|
|
|
+ <HcPages :pages="searchLogForm" @change="pageLogChange"/>
|
|
|
|
+ </template>
|
|
|
|
+ </HcCard>
|
|
|
|
+ <HcCard :title="menuItem.label" v-if="menuKey === 'recycle'" actionSize="lg">
|
|
|
|
+ <template #extra>
|
|
|
|
+ <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/>
|
|
|
|
+ </template>
|
|
|
|
+ <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="title" label="删除内容"/>
|
|
|
|
+ <el-table-column prop="name" label="父节点名称"/>
|
|
|
|
+ <el-table-column prop="date" label="删除时间"/>
|
|
|
|
+ </el-table>
|
|
|
|
+ <template #action>
|
|
|
|
+ <div class="foot-recycle">
|
|
|
|
+ <el-button type="primary" hc-btn>
|
|
|
|
+ <HcIcon name="reply"/>
|
|
|
|
+ <span>恢复</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ <HcPages :pages="searchRecycleForm" @change="pageRecycleChange"/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- </n-card>
|
|
|
|
|
|
+ </HcCard>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import {ref, watch, onMounted, nextTick} from "vue";
|
|
|
|
-import {useRoute} from 'vue-router'
|
|
|
|
-import router from '~src/router/index';
|
|
|
|
|
|
+import {ref, watch, onMounted} from "vue";
|
|
|
|
+import {useRouter, useRoute} from 'vue-router'
|
|
import {useAppStore} from "~src/store/index";
|
|
import {useAppStore} from "~src/store/index";
|
|
import {deepClone} from "~src/utils/lib/util";
|
|
import {deepClone} from "~src/utils/lib/util";
|
|
-import {HcIcon} from "~src/plugins/renderele";
|
|
|
|
import avatarPng from '~src/assets/images/avatar.png';
|
|
import avatarPng from '~src/assets/images/avatar.png';
|
|
import {getTokenHeader} from '~src/api/request/header';
|
|
import {getTokenHeader} from '~src/api/request/header';
|
|
import userApi from "~api/userInfo/index"
|
|
import userApi from "~api/userInfo/index"
|
|
-import HcPage from "~com/plugins/naive/HcPage.vue"
|
|
|
|
-import HcTabs from "~com/plugins/naive/HcTabs.vue"
|
|
|
|
-import tasksDataApi from '~api/tasks/data';
|
|
|
|
|
|
+import {utilsArray} from "vue-utils-plus"
|
|
import md5 from 'js-md5';
|
|
import md5 from 'js-md5';
|
|
|
|
|
|
-//变量
|
|
|
|
|
|
+//初始变量
|
|
|
|
+const router = useRouter()
|
|
const useRoutes = useRoute()
|
|
const useRoutes = useRoute()
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
|
|
+const { getIndex } = utilsArray()
|
|
|
|
+
|
|
|
|
+//全局变量信息
|
|
const userInfo = ref(useAppState.getUserInfo);
|
|
const userInfo = ref(useAppState.getUserInfo);
|
|
const projectId = ref(useAppState.getProjectId);
|
|
const projectId = ref(useAppState.getProjectId);
|
|
const contractId = ref(useAppState.getContractId);
|
|
const contractId = ref(useAppState.getContractId);
|
|
const projectContractArr = ref(useAppState.getProjectContract);
|
|
const projectContractArr = ref(useAppState.getProjectContract);
|
|
|
|
|
|
|
|
+//路由参数数据
|
|
const routerQuery = useRoutes?.query;
|
|
const routerQuery = useRoutes?.query;
|
|
let MenuType = routerQuery?.MenuType || 'basic'
|
|
let MenuType = routerQuery?.MenuType || 'basic'
|
|
|
|
|
|
@@ -153,77 +223,95 @@ watch(() => [
|
|
projectContractArr.value = projectContract
|
|
projectContractArr.value = projectContract
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+
|
|
//上传组件参数
|
|
//上传组件参数
|
|
const action = '/api/blade-resource/oss/endpoint/put-file';
|
|
const action = '/api/blade-resource/oss/endpoint/put-file';
|
|
const accept = 'image/png,image/jpg,image/jpeg';
|
|
const accept = 'image/png,image/jpg,image/jpeg';
|
|
const upData = ref({})
|
|
const upData = ref({})
|
|
-
|
|
|
|
//上传前
|
|
//上传前
|
|
-const loadingReactive = ref(null)
|
|
|
|
|
|
+const avatarLoading = ref(false)
|
|
const beforeUpload = () => {
|
|
const beforeUpload = () => {
|
|
- loadingReactive.value = window?.$message?.loading('上传中...', {duration: 0})
|
|
|
|
|
|
+ avatarLoading.value = true
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
-
|
|
|
|
//上传完成
|
|
//上传完成
|
|
-const uploadFinish = ({event}) => {
|
|
|
|
- const res = JSON.parse(event?.target?.response);
|
|
|
|
- const link = res?.data?.link || '';
|
|
|
|
|
|
+const uploadFinish = (res) => {
|
|
|
|
+ const link = res?.data?.link ?? '';
|
|
|
|
+ const user_id = userInfo.value?.user_id ?? '';
|
|
if (link) {
|
|
if (link) {
|
|
userApi.updateUserInfo({
|
|
userApi.updateUserInfo({
|
|
avatar: link,
|
|
avatar: link,
|
|
- id: userInfo.value?.user_id
|
|
|
|
|
|
+ id: user_id
|
|
}).then(({data}) => {
|
|
}).then(({data}) => {
|
|
- loadingReactive.value.destroy()
|
|
|
|
- loadingReactive.value = null
|
|
|
|
|
|
+ avatarLoading.value = false
|
|
if (data.code === 200) {
|
|
if (data.code === 200) {
|
|
- window?.$message?.success('更换头像成功')
|
|
|
|
|
|
+ window?.$ElMessage?.success('更换头像成功')
|
|
userInfo.value.avatar = link
|
|
userInfo.value.avatar = link
|
|
useAppState.setUserInfo(userInfo.value)
|
|
useAppState.setUserInfo(userInfo.value)
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
- loadingReactive.value.destroy()
|
|
|
|
- loadingReactive.value = null
|
|
|
|
|
|
+ avatarLoading.value = false
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- window?.$message?.warning('上传头像异常,请稍后再试')
|
|
|
|
- loadingReactive.value.destroy()
|
|
|
|
- loadingReactive.value = null
|
|
|
|
|
|
+ window?.$ElMessage?.warning('上传头像异常,请稍后再试')
|
|
|
|
+ avatarLoading.value = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+//上传失败
|
|
|
|
+const uploadError = () => {
|
|
|
|
+ avatarLoading.value = false
|
|
|
|
+ window?.$ElMessage?.warning('上传头像失败')
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
|
|
//左侧菜单
|
|
//左侧菜单
|
|
const menuKey = ref(MenuType)
|
|
const menuKey = ref(MenuType)
|
|
|
|
+const menuItem = ref({})
|
|
const menuOptions = ref([
|
|
const menuOptions = ref([
|
|
- {key: 'basic', label: '基础信息', icon: HcIcon('cicon-my-o')},
|
|
|
|
- {key: 'password', label: '密码设置', icon: HcIcon('cicon-lock-open')},
|
|
|
|
- {key: 'project', label: '参建项目', icon: HcIcon('cicon-folder-o')},
|
|
|
|
- {key: 'log', label: '操作日志', icon: HcIcon('cicon-file-text-o')},
|
|
|
|
- {key: 'recycle', label: '回收站', icon: HcIcon('cicon-delete-line-o')},
|
|
|
|
|
|
+ {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'},
|
|
]);
|
|
]);
|
|
-
|
|
|
|
|
|
+//获取菜单对象数据
|
|
|
|
+const menuObjItem = () => {
|
|
|
|
+ const index = getIndex(menuOptions.value, 'key', menuKey.value)
|
|
|
|
+ menuItem.value = menuOptions.value[index]
|
|
|
|
+}
|
|
//菜单被点击
|
|
//菜单被点击
|
|
-const handleMenuValue = (_, item) => {
|
|
|
|
|
|
+const handleMenuValue = (item) => {
|
|
|
|
+ menuItem.value = item
|
|
|
|
+ menuKey.value = item?.key
|
|
router.push({
|
|
router.push({
|
|
path: useRoutes.path,
|
|
path: useRoutes.path,
|
|
query: {
|
|
query: {
|
|
- MenuType: item.key
|
|
|
|
|
|
+ MenuType: item?.key
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- getPageTypeData(item.key)
|
|
|
|
|
|
+ getPageTypeData(item?.key)
|
|
}
|
|
}
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ menuObjItem()
|
|
getPageTypeData(menuKey.value)
|
|
getPageTypeData(menuKey.value)
|
|
})
|
|
})
|
|
|
|
|
|
//根据类型,获取相关数据
|
|
//根据类型,获取相关数据
|
|
const getPageTypeData = (key) => {
|
|
const getPageTypeData = (key) => {
|
|
|
|
+ //编辑状态
|
|
|
|
+ if (key === 'password') {
|
|
|
|
+ basicFormEdit.value = true
|
|
|
|
+ basicHight.value = true
|
|
|
|
+ } else {
|
|
|
|
+ basicFormEdit.value = false
|
|
|
|
+ basicHight.value = false
|
|
|
|
+ }
|
|
|
|
+ //请求数据
|
|
if (key === 'basic') {
|
|
if (key === 'basic') {
|
|
queryCurrentUserData()
|
|
queryCurrentUserData()
|
|
} else if (key === 'project') {
|
|
} else if (key === 'project') {
|
|
- setProjectMenu(projectContractArr.value)
|
|
|
|
getDefaultProject()
|
|
getDefaultProject()
|
|
} else if (key === 'log') {
|
|
} else if (key === 'log') {
|
|
queryBusinessModule()
|
|
queryBusinessModule()
|
|
@@ -233,21 +321,61 @@ const getPageTypeData = (key) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+//是否编辑
|
|
|
|
+const basicFormEdit = ref(false)
|
|
|
|
+const basicHight = ref(false)
|
|
//基础信息表单
|
|
//基础信息表单
|
|
const formUserRef = ref(null)
|
|
const formUserRef = ref(null)
|
|
const formUserModel = ref(deepClone(userInfo.value))
|
|
const formUserModel = ref(deepClone(userInfo.value))
|
|
const formUserRules = {
|
|
const formUserRules = {
|
|
real_name: {
|
|
real_name: {
|
|
required: true,
|
|
required: true,
|
|
- trigger: ["blur", "input"],
|
|
|
|
|
|
+ trigger: "blur",
|
|
message: "请输入用户名称"
|
|
message: "请输入用户名称"
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
+//获取用户信息
|
|
|
|
+const queryCurrentUserData = () => {
|
|
|
|
+ userApi.queryCurrentUserData().then(({data}) => {
|
|
|
|
+ if (data.code === 200) {
|
|
|
|
+ formUserModel.value.deptId = data.data?.deptId || ''
|
|
|
|
+ formUserModel.value.idNumber = data.data?.idNumber || ''
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//切换编辑模式
|
|
|
|
+const basicFormEditClick = () => {
|
|
|
|
+ basicFormEdit.value = true
|
|
|
|
+ basicHight.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//保存数据
|
|
const saveUserLoading = ref(false)
|
|
const saveUserLoading = ref(false)
|
|
const saveUserInfoClick = () => {
|
|
const saveUserInfoClick = () => {
|
|
- formUserRef.value?.validate(erro => {
|
|
|
|
- if (!erro) {
|
|
|
|
|
|
+ const key = menuKey.value
|
|
|
|
+ if (key === 'basic') {
|
|
|
|
+ saveUserInfoData()
|
|
|
|
+ } else if (key === 'password') {
|
|
|
|
+ saveUpdatePassword()
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//取消修改
|
|
|
|
+const cancelUserClick = () => {
|
|
|
|
+ const key = menuKey.value
|
|
|
|
+ if (key === 'basic') {
|
|
|
|
+ basicFormEdit.value = false
|
|
|
|
+ basicHight.value = false
|
|
|
|
+ } else {
|
|
|
|
+ console.log('我也不知道这个点了干什么,反正UI图上有,至于有什么作用,不知道。。')
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//保存用户信息
|
|
|
|
+const saveUserInfoData = () => {
|
|
|
|
+ formUserRef.value.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
const form = formUserModel.value
|
|
const form = formUserModel.value
|
|
saveUserLoading.value = true
|
|
saveUserLoading.value = true
|
|
userApi.updateUserInfo({
|
|
userApi.updateUserInfo({
|
|
@@ -256,140 +384,93 @@ const saveUserInfoClick = () => {
|
|
}).then(({data}) => {
|
|
}).then(({data}) => {
|
|
saveUserLoading.value = false
|
|
saveUserLoading.value = false
|
|
if (data.code === 200) {
|
|
if (data.code === 200) {
|
|
- window?.$message?.success('保存成功')
|
|
|
|
|
|
+ window?.$ElMessage?.success('保存成功')
|
|
userInfo.value.real_name = form?.real_name
|
|
userInfo.value.real_name = form?.real_name
|
|
useAppState.setUserInfo(userInfo.value)
|
|
useAppState.setUserInfo(userInfo.value)
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
saveUserLoading.value = false
|
|
saveUserLoading.value = false
|
|
})
|
|
})
|
|
- }
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-//获取用户信息
|
|
|
|
-const queryCurrentUserData = () => {
|
|
|
|
- userApi.queryCurrentUserData().then(({data}) => {
|
|
|
|
- if (data.code === 200) {
|
|
|
|
- formUserModel.value.deptId = data.data?.deptId || ''
|
|
|
|
- formUserModel.value.idNumber = data.data?.idNumber || ''
|
|
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
//密码设置表单
|
|
//密码设置表单
|
|
const formUserPassRef = ref(null)
|
|
const formUserPassRef = ref(null)
|
|
-const userPassLoading = ref(false)
|
|
|
|
const formUserPassModel = ref({oldPassword: '', newPassword: '', newPassword1: ''})
|
|
const formUserPassModel = ref({oldPassword: '', newPassword: '', newPassword1: ''})
|
|
const formUserPassRules = {
|
|
const formUserPassRules = {
|
|
oldPassword: {
|
|
oldPassword: {
|
|
required: true,
|
|
required: true,
|
|
- trigger: ["blur", "input"],
|
|
|
|
|
|
+ trigger: "blur",
|
|
message: "请输入原始密码"
|
|
message: "请输入原始密码"
|
|
},
|
|
},
|
|
newPassword: {
|
|
newPassword: {
|
|
required: true,
|
|
required: true,
|
|
- validator(rule, value) {
|
|
|
|
|
|
+ validator(rule, value, callback) {
|
|
const pass = formUserPassModel.value.newPassword1;
|
|
const pass = formUserPassModel.value.newPassword1;
|
|
if (!value) {
|
|
if (!value) {
|
|
- return new Error("请输入新的密码");
|
|
|
|
|
|
+ callback(new Error("请输入新的密码"))
|
|
} else if (pass && value !== pass) {
|
|
} else if (pass && value !== pass) {
|
|
- return new Error("新的密码和确认新密码不一致");
|
|
|
|
|
|
+ callback(new Error("新的密码和确认新密码不一致"))
|
|
}
|
|
}
|
|
- return true;
|
|
|
|
|
|
+ callback()
|
|
},
|
|
},
|
|
- trigger: ["blur", "input"]
|
|
|
|
|
|
+ trigger: "blur"
|
|
},
|
|
},
|
|
newPassword1: {
|
|
newPassword1: {
|
|
required: true,
|
|
required: true,
|
|
- validator(rule, value) {
|
|
|
|
|
|
+ validator(rule, value, callback) {
|
|
const pass = formUserPassModel.value.newPassword;
|
|
const pass = formUserPassModel.value.newPassword;
|
|
if (!value) {
|
|
if (!value) {
|
|
- return new Error("请输入确认新密码");
|
|
|
|
|
|
+ callback(new Error("请输入确认新密码"))
|
|
} else if (pass && value !== pass) {
|
|
} else if (pass && value !== pass) {
|
|
- return new Error("新的密码和确认新密码不一致");
|
|
|
|
|
|
+ callback(new Error("新的密码和确认新密码不一致"))
|
|
}
|
|
}
|
|
- return true;
|
|
|
|
|
|
+ callback()
|
|
},
|
|
},
|
|
- trigger: ["blur", "input"]
|
|
|
|
|
|
+ trigger: "blur"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-const saveUserPassClick = () => {
|
|
|
|
- formUserPassRef.value?.validate(erro => {
|
|
|
|
- if (!erro) {
|
|
|
|
- userPassLoading.value = true
|
|
|
|
|
|
+
|
|
|
|
+//更新密码
|
|
|
|
+const saveUpdatePassword = () => {
|
|
|
|
+ formUserPassRef.value.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
const form = formUserPassModel.value;
|
|
const form = formUserPassModel.value;
|
|
|
|
+ saveUserLoading.value = true
|
|
userApi.updatePassword({
|
|
userApi.updatePassword({
|
|
- oldPassword: md5(form.oldPassword),
|
|
|
|
- newPassword: md5(form.newPassword),
|
|
|
|
- newPassword1: md5(form.newPassword1),
|
|
|
|
- plaintextPassword: form.newPassword
|
|
|
|
|
|
+ oldPassword: md5(form?.oldPassword),
|
|
|
|
+ newPassword: md5(form?.newPassword),
|
|
|
|
+ newPassword1: md5(form?.newPassword1),
|
|
|
|
+ plaintextPassword: form?.newPassword
|
|
}).then(({data}) => {
|
|
}).then(({data}) => {
|
|
- userPassLoading.value = false
|
|
|
|
|
|
+ saveUserLoading.value = false
|
|
if (data.code === 200) {
|
|
if (data.code === 200) {
|
|
- window?.$message?.success('密码修改成功')
|
|
|
|
|
|
+ window?.$ElMessage?.success('密码修改成功')
|
|
formUserPassModel.value = {oldPassword: '', newPassword: '', newPassword1: ''}
|
|
formUserPassModel.value = {oldPassword: '', newPassword: '', newPassword1: ''}
|
|
} else {
|
|
} else {
|
|
- window?.$message?.warning(data.msg || '密码修改失败')
|
|
|
|
|
|
+ window?.$ElMessage?.warning(data.msg || '密码修改失败')
|
|
}
|
|
}
|
|
- }).catch(erro => {
|
|
|
|
- userPassLoading.value = false
|
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ saveUserLoading.value = false
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
- });
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-//项目列表
|
|
|
|
-const projectKey = ref(null)
|
|
|
|
-const projectMenuRef = ref(null)
|
|
|
|
-const projectMenu = ref([]);
|
|
|
|
-//设置项目列表
|
|
|
|
-const projectIcon = HcIcon('hcicon-xiangmu');
|
|
|
|
-const setProjectMenu = (arr) => {
|
|
|
|
- if (arr.length > 0) {
|
|
|
|
- let newArr = [];
|
|
|
|
- arr.forEach(item => {
|
|
|
|
- //项目数据
|
|
|
|
- let itemArr = {
|
|
|
|
- key: item.id,
|
|
|
|
- label: `${item.projectAlias} (${item.name})`,
|
|
|
|
- icon: projectIcon,
|
|
|
|
- children: []
|
|
|
|
- }
|
|
|
|
- //合同段数据处理
|
|
|
|
- let children = item['contractInfoList'] || []
|
|
|
|
- if (children.length > 0) {
|
|
|
|
- children.forEach(items => {
|
|
|
|
- itemArr.children.push({
|
|
|
|
- key: items.id,
|
|
|
|
- parent: {
|
|
|
|
- key: item.id,
|
|
|
|
- label: item.projectAlias
|
|
|
|
- },
|
|
|
|
- label: items.name
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- newArr.push(itemArr)
|
|
|
|
- })
|
|
|
|
- projectMenu.value = newArr
|
|
|
|
- } else {
|
|
|
|
- projectMenu.value = []
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
//获取默认项目
|
|
//获取默认项目
|
|
|
|
+const projectKey = ref(null)
|
|
const getDefaultProject = () => {
|
|
const getDefaultProject = () => {
|
|
userApi.getDefaultProject().then(({data}) => {
|
|
userApi.getDefaultProject().then(({data}) => {
|
|
if (data.code === 200) {
|
|
if (data.code === 200) {
|
|
let res = data['data'] || {}
|
|
let res = data['data'] || {}
|
|
projectKey.value = res['contractId']
|
|
projectKey.value = res['contractId']
|
|
- nextTick(() => {
|
|
|
|
- projectMenuRef.value.showOption(res['contractId'])
|
|
|
|
- })
|
|
|
|
} else {
|
|
} else {
|
|
- window?.$message?.error(data.msg || '设置出错')
|
|
|
|
|
|
+ window?.$ElMessage?.error(data.msg || '设置出错')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -397,9 +478,10 @@ const getDefaultProject = () => {
|
|
//项目被选择
|
|
//项目被选择
|
|
const menuProjectId = ref('')
|
|
const menuProjectId = ref('')
|
|
const menuContractId = ref('')
|
|
const menuContractId = ref('')
|
|
-const projectMenuValue = (_,item) => {
|
|
|
|
- menuContractId.value = item?.key
|
|
|
|
- menuProjectId.value = item?.parent?.key
|
|
|
|
|
|
+const projectMenuValue = (item,items) => {
|
|
|
|
+ menuProjectId.value = item?.id
|
|
|
|
+ menuContractId.value = items?.id
|
|
|
|
+ projectKey.value = items?.id
|
|
}
|
|
}
|
|
|
|
|
|
//设置为默认项目
|
|
//设置为默认项目
|
|
@@ -412,13 +494,13 @@ const setDefaultProjectClick = () => {
|
|
contractId: cid
|
|
contractId: cid
|
|
}).then(({data}) => {
|
|
}).then(({data}) => {
|
|
if (data.code === 200) {
|
|
if (data.code === 200) {
|
|
- window?.$message?.success('设置成功')
|
|
|
|
|
|
+ window?.$ElMessage?.success('设置成功')
|
|
} else {
|
|
} else {
|
|
- window?.$message?.error(data.msg || '设置出错')
|
|
|
|
|
|
+ window?.$ElMessage?.error(data.msg || '设置出错')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- window?.$message?.warning('请先在下方选择一个项目合同段')
|
|
|
|
|
|
+ window?.$ElMessage?.warning('请先在下方选择一个项目合同段')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -426,7 +508,7 @@ const setDefaultProjectClick = () => {
|
|
const searchLogForm = ref({
|
|
const searchLogForm = ref({
|
|
operationModule: null, operationView: null, operationType: null, operationMedium: null,
|
|
operationModule: null, operationView: null, operationType: null, operationMedium: null,
|
|
queryValue: null, startTime: null, endTime: null,
|
|
queryValue: null, startTime: null, endTime: null,
|
|
- current: 1, size: 20, total: 0
|
|
|
|
|
|
+ current: 1, size: 10, total: 0
|
|
})
|
|
})
|
|
|
|
|
|
//业务模块
|
|
//业务模块
|
|
@@ -482,33 +564,15 @@ const operationTypeStatus = () => {
|
|
|
|
|
|
//设备
|
|
//设备
|
|
const deviceData = ref([{label: "APP", value: "APP"}, {label: "PC", value: "PC"}])
|
|
const deviceData = ref([{label: "APP", value: "APP"}, {label: "PC", value: "PC"}])
|
|
-//表格表头
|
|
|
|
-const logTableColumns = [
|
|
|
|
- {title: '序号', key: 'num', width: 80, align: 'center',
|
|
|
|
- render(_, index) {
|
|
|
|
- return index + 1
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {title: '业务模块', key: 'operationModule'},
|
|
|
|
- {title: '操作类型', key: 'operationTypeValue'},
|
|
|
|
- {title: '设备', key: 'operationMedium', width: 80, align: 'center'},
|
|
|
|
- {title: '操作内容', key: 'operationContent'},
|
|
|
|
- {title: '操作时间', key: 'createTime', width: 180, align: 'center'}
|
|
|
|
-]
|
|
|
|
//表格数据
|
|
//表格数据
|
|
const logTableData = ref([]);
|
|
const logTableData = ref([]);
|
|
|
|
|
|
//日期时间被选择
|
|
//日期时间被选择
|
|
const betweenTime = ref(null)
|
|
const betweenTime = ref(null)
|
|
-const betweenTimeUpdate = (_,res) => {
|
|
|
|
- res = res || []
|
|
|
|
- if (res.length > 0) {
|
|
|
|
- searchLogForm.value.startTime = res[0]
|
|
|
|
- searchLogForm.value.endTime = res[1]
|
|
|
|
- } else {
|
|
|
|
- searchLogForm.value.startTime = null
|
|
|
|
- searchLogForm.value.endTime = null
|
|
|
|
- }
|
|
|
|
|
|
+const betweenDateUpdate = ({val,arr}) => {
|
|
|
|
+ betweenTime.value = arr
|
|
|
|
+ searchLogForm.value.startTime = val?.start
|
|
|
|
+ searchLogForm.value.endTime = val?.end
|
|
}
|
|
}
|
|
|
|
|
|
//回车搜索
|
|
//回车搜索
|
|
@@ -526,8 +590,9 @@ const searchClick = () => {
|
|
}
|
|
}
|
|
|
|
|
|
//分页被点击
|
|
//分页被点击
|
|
-const pageLogChange = (res) => {
|
|
|
|
- searchLogForm.value = res
|
|
|
|
|
|
+const pageLogChange = ({current, size}) => {
|
|
|
|
+ searchLogForm.value.current = current
|
|
|
|
+ searchLogForm.value.size = size
|
|
getLogTableData()
|
|
getLogTableData()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -549,40 +614,27 @@ const getLogTableData = () => {
|
|
logTableData.value = []
|
|
logTableData.value = []
|
|
searchLogForm.value.total = 0
|
|
searchLogForm.value.total = 0
|
|
}
|
|
}
|
|
- }).catch(erro => {
|
|
|
|
|
|
+ }).catch(() => {
|
|
logTableLoading.value = false
|
|
logTableLoading.value = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
//结构类型tab数据和相关处理
|
|
//结构类型tab数据和相关处理
|
|
const tabTypeKey = ref('file')
|
|
const tabTypeKey = ref('file')
|
|
const tabTypeTab = ref([
|
|
const tabTypeTab = ref([
|
|
{key:'file', name: '文件资料'},
|
|
{key:'file', name: '文件资料'},
|
|
{key:'project', name: '工程划分'}
|
|
{key:'project', name: '工程划分'}
|
|
]);
|
|
]);
|
|
-const tabTypeChange = (value) => {
|
|
|
|
- tabTypeKey.value = value;
|
|
|
|
|
|
+const tabTypeChange = (item) => {
|
|
|
|
+ tabTypeKey.value = item?.key;
|
|
}
|
|
}
|
|
|
|
|
|
//搜索和分页数据
|
|
//搜索和分页数据
|
|
const searchRecycleForm = ref({
|
|
const searchRecycleForm = ref({
|
|
contractId: contractId.value, current: 1, size: 20, total: 0
|
|
contractId: contractId.value, current: 1, size: 20, total: 0
|
|
})
|
|
})
|
|
-//表格表头
|
|
|
|
-const recycleTableColumns = [
|
|
|
|
- {type: 'selection'},
|
|
|
|
- {title: '序号', key: 'num', width: 80, align: 'center',
|
|
|
|
- render(_, index) {
|
|
|
|
- return index + 1
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {title: '删除内容', key: 'title'},
|
|
|
|
- {title: '父节点名称', key: 'name'},
|
|
|
|
- {title: '删除时间', key: 'date'}
|
|
|
|
-]
|
|
|
|
//表格数据
|
|
//表格数据
|
|
|
|
+const recycleTableRef = ref(null)
|
|
const recycleTableData = ref([
|
|
const recycleTableData = ref([
|
|
{ title: '-', name: 'test1', date: "-" },
|
|
{ title: '-', name: 'test1', date: "-" },
|
|
{ title: '-', name: 'test2', date: "-" },
|
|
{ title: '-', name: 'test2', date: "-" },
|
|
@@ -591,91 +643,30 @@ const recycleTableData = ref([
|
|
]);
|
|
]);
|
|
|
|
|
|
//分页被点击
|
|
//分页被点击
|
|
-const pageRecycleChange = (res) => {
|
|
|
|
- searchRecycleForm.value = res
|
|
|
|
|
|
+const pageRecycleChange = ({current, size}) => {
|
|
|
|
+ searchRecycleForm.value.current = current
|
|
|
|
+ searchRecycleForm.value.size = size
|
|
getRecycleTableData()
|
|
getRecycleTableData()
|
|
}
|
|
}
|
|
//获取数据
|
|
//获取数据
|
|
const getRecycleTableData = () => {
|
|
const getRecycleTableData = () => {
|
|
|
|
|
|
|
|
+}
|
|
|
|
+//多选
|
|
|
|
+const recycleTableSelectionChange = (val) => {
|
|
|
|
+ console.log(val)
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-.hc-layout-box {
|
|
|
|
- position: relative;
|
|
|
|
- height: 100%;
|
|
|
|
- max-width: 1600px;
|
|
|
|
- display: flex;
|
|
|
|
- padding: 36px 0;
|
|
|
|
- margin: 0 auto;
|
|
|
|
- .hc-layout-left-box {
|
|
|
|
- position: relative;
|
|
|
|
- color: var(--n-text-color);
|
|
|
|
- background-color: var(--hc-bg-color);
|
|
|
|
- width: 260px;
|
|
|
|
- margin-left: 24px;
|
|
|
|
- border-radius: 12px;
|
|
|
|
- .user-avatar-box {
|
|
|
|
- position: relative;
|
|
|
|
- text-align: center;
|
|
|
|
- margin: 20px;
|
|
|
|
- padding-top: 4px;
|
|
|
|
- padding-bottom: 20px;
|
|
|
|
- border-bottom: 1px solid var(--n-color);
|
|
|
|
- }
|
|
|
|
- .user-menu-box {
|
|
|
|
- position: relative;
|
|
|
|
- padding: 0 12px;
|
|
|
|
- height: calc(100% - 210px);
|
|
|
|
- border-radius: 0 0 12px 12px;
|
|
|
|
- overflow: auto;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .hc-layout-content-box {
|
|
|
|
- flex: 1;
|
|
|
|
- overflow: auto;
|
|
|
|
- position: relative;
|
|
|
|
- padding: 0 24px 0 24px;
|
|
|
|
- .card-form-box {
|
|
|
|
- position: relative;
|
|
|
|
- height: 100%;
|
|
|
|
- &.project-menu {
|
|
|
|
- margin: 0 -5px;
|
|
|
|
- }
|
|
|
|
- .card-data-table {
|
|
|
|
- position: relative;
|
|
|
|
- margin-top: 24px;
|
|
|
|
- height: calc(100% - 50px);
|
|
|
|
- overflow: auto;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .foot-recycle {
|
|
|
|
- position: relative;
|
|
|
|
- display: flex;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-.hc-card-header {
|
|
|
|
- position: relative;
|
|
|
|
- font-size: initial;
|
|
|
|
- font-weight: initial;
|
|
|
|
-}
|
|
|
|
|
|
+@import "../../styles/user/index.scss";
|
|
</style>
|
|
</style>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
-.hc-layout-box .hc-layout-left-box .user-menu-box .n-menu {
|
|
|
|
- --n-font-size: 18px !important;
|
|
|
|
- --n-item-height: 48px !important;
|
|
|
|
-}
|
|
|
|
-.hc-layout-box .hc-layout-content-box .n-card.hc-card-overflow-p-box {
|
|
|
|
- border: initial;
|
|
|
|
- border-radius: 12px;
|
|
|
|
-}
|
|
|
|
-.hc-layout-content-box .n-image {
|
|
|
|
- border: 1px solid #eee;
|
|
|
|
-}
|
|
|
|
-.foot-recycle .card-page-box {
|
|
|
|
- flex: 1;
|
|
|
|
|
|
+<style lang="scss">
|
|
|
|
+.user-avatar-upload {
|
|
|
|
+ .upload-dom, .upload-dom .el-upload {
|
|
|
|
+ height: 100%;
|
|
|
|
+ width: 100%;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|