HeaderButtonBar.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. <template>
  2. <div class="header-button-bar" style="position: relative">
  3. <el-tabs v-model="activeTab" type="border-card" @tab-click="handleTabClick">
  4. <!-- 特殊按钮 tab 退出 打开 保存 -->
  5. <el-tab-pane v-for="btn in fakeTabs" :key="btn.name" :name="btn.name">
  6. <template #label>
  7. <span @click.stop>
  8. <el-tooltip :content="btn.label" placement="top" effect="light">
  9. <el-button
  10. :type="btn.type"
  11. :size="btn.size || 'small'"
  12. @click="btn.onClick"
  13. class="icon-only-button"
  14. >
  15. <img :src="btn.icon" alt="icon" class="button-icon" />
  16. </el-button>
  17. </el-tooltip>
  18. </span>
  19. </template>
  20. <template #default></template>
  21. </el-tab-pane>
  22. <!-- 普通标签页 -->
  23. <el-tab-pane v-for="tab in tabs" :key="tab.name" :name="tab.name">
  24. <template #label>
  25. <span class="tab-label">
  26. <img :src="tab.icon" alt="icon" class="tab-icon" />
  27. {{ tab.label }}
  28. </span>
  29. </template>
  30. <div class="button-group">
  31. <el-tooltip
  32. v-for="button in tab.buttons"
  33. :key="button.action"
  34. :content="button.label"
  35. placement="top"
  36. effect="light"
  37. >
  38. <el-button
  39. type=""
  40. @click="emitButtonClick(button.action)"
  41. class="icon-text-button"
  42. >
  43. <img :src="button.icon" alt="icon" class="button-icon" />
  44. {{ button.label }}
  45. </el-button>
  46. </el-tooltip>
  47. </div>
  48. </el-tab-pane>
  49. <!-- 特殊按钮 tab 帮助 -->
  50. <el-tab-pane v-for="btn in fakeTabs2" :key="btn.name" :name="btn.name">
  51. <template #label>
  52. <span @click.stop>
  53. <el-tooltip :content="btn.label" placement="top" effect="light">
  54. <el-button
  55. :type="btn.type"
  56. :size="btn.size || 'small'"
  57. @click="btn.onClick"
  58. class="icon-only-button"
  59. >
  60. <img :src="btn.icon" alt="icon" class="button-icon" />
  61. </el-button>
  62. </el-tooltip>
  63. </span>
  64. </template>
  65. <template #default></template>
  66. </el-tab-pane>
  67. <el-tab-pane name="user" key="userButton">
  68. <template #label>
  69. <span @click.stop style="margin-top: 5px">
  70. <el-avatar :src="user" :size="22" />
  71. <el-dropdown style="margin-top: 4px">
  72. <div class="user-dropdown-trigger">
  73. <span class="nickname">{{ nickName }}</span>
  74. <el-icon class="el-icon--right"><arrow-down /></el-icon>
  75. </div>
  76. <template #dropdown>
  77. <el-dropdown-menu>
  78. <el-dropdown-item @click="handleProfile">
  79. <el-icon><User /></el-icon>
  80. <span>{{ $t("index.userinfo") }}</span>
  81. </el-dropdown-item>
  82. <el-dropdown-item @click="handleChangePassword">
  83. <el-icon><Key /></el-icon>
  84. <span>{{ $t("index.changePassword") }}</span>
  85. </el-dropdown-item>
  86. <el-dropdown-item
  87. divided
  88. @click="handleLogout"
  89. style="color: #f56c6c"
  90. >
  91. <el-icon><SwitchButton /></el-icon>
  92. <span>{{ $t("index.logout") }}</span>
  93. </el-dropdown-item>
  94. </el-dropdown-menu>
  95. </template>
  96. </el-dropdown>
  97. </span>
  98. </template>
  99. <template #default></template>
  100. </el-tab-pane>
  101. </el-tabs>
  102. </div>
  103. <el-dialog
  104. v-model="dialog.userinfoDialog"
  105. align-center
  106. :append-to-body="true"
  107. width="600"
  108. class="dialog_class"
  109. draggable
  110. >
  111. <template #header="{ titleId, titleClass }">
  112. <div class="my-header">
  113. <h4 :id="titleId" :class="titleClass">{{ $t("dialog.userinfo") }}</h4>
  114. </div>
  115. </template>
  116. <el-card class="userinfo-card" shadow="never">
  117. <template #header>
  118. <div class="userinfo-header">
  119. <el-avatar :src="user" :size="30" style="margin-right: 10px" />
  120. <h4 class="userinfo-nickname">
  121. {{ userStore.userInfo.nickName || "User" }}
  122. </h4>
  123. </div>
  124. </template>
  125. <el-form :label-width="labelWidth" label-position="left">
  126. <el-row :gutter="20">
  127. <el-col :span="12">
  128. <el-form-item :label="$t('dialog.username')">
  129. {{ userStore.userInfo.userName }}
  130. </el-form-item>
  131. <el-form-item :label="$t('dialog.mobileNo')">
  132. {{ userStore.userInfo.mobileNo }}
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="12">
  136. <el-form-item :label="$t('dialog.nickname')">
  137. {{ userStore.userInfo.nickName || "User" }}
  138. </el-form-item>
  139. <el-form-item :label="$t('dialog.email')">
  140. {{ userStore.userInfo.email }}
  141. </el-form-item>
  142. </el-col>
  143. </el-row>
  144. <el-form-item :label="$t('dialog.regTime')">
  145. {{ userStore.userInfo.regTime }}
  146. </el-form-item>
  147. </el-form>
  148. </el-card>
  149. <template #footer>
  150. <span class="userinfo-footer lastbtn">
  151. <el-button @click="dialog.userinfoDialog = false">{{
  152. $t("dialog.cancel")
  153. }}</el-button>
  154. <el-button @click="dialog.userinfoDialog = false">
  155. {{ $t("dialog.ok") }}
  156. </el-button>
  157. </span>
  158. </template>
  159. </el-dialog>
  160. <el-dialog
  161. v-model="dialog.changePassword"
  162. align-center
  163. :append-to-body="true"
  164. width="500"
  165. class="dialog_class"
  166. draggable
  167. >
  168. <template #header="{ titleId, titleClass }">
  169. <div class="my-header">
  170. <h4 :id="titleId" :class="titleClass">
  171. {{ $t("dialog.changePassword") }}
  172. </h4>
  173. </div>
  174. </template>
  175. <el-card class="userinfo-card" shadow="never">
  176. <el-form :label-width="labelWidth1">
  177. <el-form-item :label="`${$t('dialog.oldPassword')}:`">
  178. <el-input
  179. v-model="pwd.oldPassword"
  180. type="password"
  181. show-password
  182. :placeholder="$t('dialog.inputOldPassword')"
  183. />
  184. </el-form-item>
  185. <el-form-item :label="`${$t('dialog.newPassword')}:`">
  186. <el-input
  187. v-model="pwd.newPassword"
  188. type="password"
  189. show-password
  190. :placeholder="$t('dialog.inputNewPassword')"
  191. />
  192. </el-form-item>
  193. <el-form-item :label="`${$t('dialog.confirmNewPassword')}:`">
  194. <el-input
  195. v-model="pwd.confirmNewPassword"
  196. type="password"
  197. show-password
  198. :placeholder="$t('dialog.inputConfirmNewPassword')"
  199. />
  200. </el-form-item>
  201. </el-form>
  202. </el-card>
  203. <template #footer>
  204. <span class="lastbtn">
  205. <el-button @click="dialog.changePassword = false">{{
  206. $t("dialog.cancel")
  207. }}</el-button>
  208. <el-button @click="ChangePassword">
  209. {{ $t("dialog.ok") }}
  210. </el-button>
  211. </span>
  212. </template>
  213. </el-dialog>
  214. <ProjectListDialog
  215. v-model:visible="dialog.projectListDialog"
  216. identify="openProject"
  217. @confirm="handleProjectConfirm"
  218. @flow-imported="handleFlowImported"
  219. />
  220. </template>
  221. <script setup>
  222. import { ref, computed } from "vue"
  223. import { request } from "@/utils/request"
  224. import { useRouter } from "vue-router"
  225. import { useI18n } from "vue-i18n"
  226. import { useUserStore } from "@/store/user"
  227. import { removeToken, removeUserId } from "@/utils/token"
  228. import { ElMessageBox, ElMessage } from "element-plus"
  229. import { ArrowDown, User, Key, SwitchButton } from "@element-plus/icons-vue"
  230. import { useProjectStore } from "@/store/project"
  231. import ProjectListDialog from "@/components/dialog/ProjectListDialog.vue";
  232. import exitIcon from "@/assets/icons/exit.png"
  233. const userStore = useUserStore()
  234. const router = useRouter()
  235. const { t } = useI18n()
  236. const nickName = computed(() => userStore.userInfo.nickName || "User")
  237. // 退出
  238. import openIcon from "@/assets/icons/open.png" // 打开文件
  239. import saveFileIcon from "@/assets/icons/save.png" // 保存文件
  240. import saveProjectIcon from "@/assets/icons/saveProject.png" // 保存项目
  241. import editIcon from "@/assets/icons/edit.png" // 编辑
  242. import importProIcon from "@/assets/icons/importPro.png" // 导入
  243. import tutorialIcon from "@/assets/icons/tutorial.png" // 配置
  244. import copyIcon from "@/assets/icons/copy.png" // 复制
  245. import cutIcon from "@/assets/icons/cut.png" // 剪切
  246. import pasteIcon from "@/assets/icons/paste.png" // 粘贴
  247. import importProjectIcon from "@/assets/icons/importProject.png" // 导入项目
  248. import importExportIcon from "@/assets/icons/import.png" // 导入导出
  249. import importFMUIcon from "@/assets/icons/importfmu.png" // 导入FMU
  250. import importCADIcon from "@/assets/icons/importCAD.png" // 导入CAD
  251. import exportXMLIcon from "@/assets/icons/exportXML.png" // 导出XML
  252. import exportFMUIcon from "@/assets/icons/exportFMU.png" // 导出FMU
  253. import unitManagementIcon from "@/assets/icons/unit.png" // 单位管理
  254. import perferenceIcon from "@/assets/icons/perference.png" // 偏好设置
  255. import systemSettingsIcon from "@/assets/icons/system.png" // 系统设置
  256. import toolIcon from "@/assets/icons/tool.png" // 工具
  257. import undoIcon from "@/assets/icons/withDrawing.png" // 撤销
  258. import redoIcon from "@/assets/icons/redo.png" // 重做
  259. import configIcon from "@/assets/icons/tutorial.png" // 配置
  260. import navigationIcon from "@/assets/icons/navigation.png" // 导航
  261. import parameterAssistantIcon from "@/assets/icons/parameterAssistant.png" // 参数助手
  262. import helpIcon from "@/assets/icons/help.png" // 帮助
  263. import user from "@/assets/img/user.png" // 用户头像
  264. const emit = defineEmits(["button-click"])
  265. const showSecondContent = ref(false)
  266. const projectStore = useProjectStore()
  267. onMounted(() => {
  268. getprojectlist()
  269. })
  270. const fakeTabs = [
  271. {
  272. name: "exit",
  273. label: t("buttons.exit"),
  274. type: "",
  275. icon: exitIcon,
  276. onClick: () => {
  277. handleExit()
  278. }
  279. },
  280. {
  281. name: "open",
  282. label: t("buttons.open"),
  283. type: "",
  284. icon: openIcon,
  285. onClick: () => {
  286. dialog.value.projectListDialog = true;
  287. }
  288. },
  289. {
  290. name: "save",
  291. label: t("buttons.save"),
  292. type: "",
  293. icon: saveProjectIcon,
  294. onClick: () => {
  295. handleSaveProject()
  296. }
  297. }
  298. ]
  299. const fakeTabs2 = [
  300. {
  301. name: "help",
  302. label: t("tabs.help"),
  303. type: "",
  304. icon: helpIcon,
  305. onClick: () => {
  306. console.log("点击了 帮助")
  307. }
  308. }
  309. ]
  310. const tabs = [
  311. {
  312. name: "edit",
  313. label: t("tabs.edit"),
  314. icon: editIcon,
  315. buttons: [
  316. { action: "cut", label: t("buttons.cut"), icon: cutIcon },
  317. { action: "copy", label: t("buttons.copy"), icon: copyIcon },
  318. { action: "paste", label: t("buttons.paste"), icon: pasteIcon },
  319. { action: "undo", label: t("buttons.undo"), icon: undoIcon },
  320. { action: "redo", label: t("buttons.redo"), icon: redoIcon }
  321. ]
  322. },
  323. {
  324. name: "import-export",
  325. label: t("tabs.importExport"),
  326. icon: importExportIcon,
  327. buttons: [
  328. {
  329. action: "importProject",
  330. label: t("buttons.importProject"),
  331. icon: importProjectIcon
  332. },
  333. {
  334. action: "importFMU",
  335. label: t("buttons.importFMU"),
  336. icon: importFMUIcon
  337. },
  338. {
  339. action: "importCAD",
  340. label: t("buttons.importCAD"),
  341. icon: importCADIcon
  342. },
  343. {
  344. action: "exportXML",
  345. label: t("buttons.exportXML"),
  346. icon: exportXMLIcon
  347. },
  348. {
  349. action: "exportFMU",
  350. label: t("buttons.exportFMU"),
  351. icon: exportFMUIcon
  352. }
  353. ]
  354. },
  355. {
  356. name: "config",
  357. label: t("tabs.config"),
  358. icon: configIcon,
  359. buttons: [
  360. {
  361. action: "unitManagement",
  362. label: t("buttons.unitManagement"),
  363. icon: unitManagementIcon
  364. },
  365. {
  366. action: "preference",
  367. label: t("buttons.preference"),
  368. icon: perferenceIcon
  369. }
  370. ]
  371. },
  372. {
  373. name: "tools",
  374. label: t("tabs.tools"),
  375. icon: toolIcon,
  376. buttons: [
  377. { action: "wizard", label: t("buttons.wizard"), icon: navigationIcon },
  378. {
  379. action: "parameterAssisant",
  380. label: t("buttons.parameterAssistant"),
  381. icon: parameterAssistantIcon
  382. }
  383. ]
  384. }
  385. ]
  386. const activeTab = ref(tabs[0].name)
  387. // 弹窗开关
  388. let dialog = ref({
  389. userinfoDialog: false,
  390. changePassword: false,
  391. projectListDialog: false
  392. })
  393. // 分页
  394. let gd = ref({
  395. total: 1,
  396. currentPage4: 1,
  397. pageSize4: 5,
  398. searchtag: ""
  399. })
  400. let projectlists = ref([])
  401. let selectedRows = ref([])
  402. let pwd = ref({
  403. oldPassword: "",
  404. newPassword: "",
  405. confirmNewPassword: ""
  406. })
  407. const handleProfile = () => {
  408. dialog.value.userinfoDialog = true
  409. }
  410. const handleChangePassword = () => {
  411. dialog.value.changePassword = true
  412. pwd.value.oldPassword = ""
  413. pwd.value.newPassword = ""
  414. pwd.value.confirmNewPassword = ""
  415. }
  416. const handleLogout = () => {
  417. userStore.clearUserInfo()
  418. removeToken()
  419. removeUserId()
  420. ElMessage.success(t("message.logoutSuccess"))
  421. router.push("/login")
  422. }
  423. const emitButtonClick = (action) => {
  424. emit("button-click", action)
  425. }
  426. const handleTabClick = (tab) => {
  427. console.log("Tab switched to:", tab.name)
  428. }
  429. // 退出项目
  430. const handleExit = () => {
  431. router.push("/project")
  432. }
  433. // 打开项目
  434. const handleOpenProject = () => {
  435. dialog.value.projectListDialog = true
  436. getprojectlist()
  437. }
  438. // 保存项目
  439. const handleSaveProject = () => {
  440. emit("button-click", "save");
  441. }
  442. // 获取项目列表
  443. const getprojectlist = () => {
  444. const params = {
  445. transCode: "ES0001",
  446. count: gd.value.pageSize4,
  447. page: gd.value.currentPage4,
  448. searchtag: gd.value.searchtag
  449. }
  450. request(params)
  451. .then((res) => {
  452. gd.value.total = res.total
  453. projectlists.value = res.rows.map((item) => ({
  454. ...item,
  455. updateTime: item.updateTime.split(" +")[0]
  456. }))
  457. })
  458. .catch((err) => {
  459. console.error(err)
  460. ElMessage.error(err.returnMsg)
  461. })
  462. }
  463. // 处理行点击事件
  464. const handleRowClick = (row) => {
  465. const index = selectedRows.value.findIndex((item) => item.pid === row.pid)
  466. if (index === -1) {
  467. selectedRows.value = [row] // 单选模式,只保留一个选中项
  468. // selectedRows.value.push(row); // 如果是多选模式,使用 push
  469. } else {
  470. selectedRows.value.splice(index, 1) // 如果已选中,则取消选中
  471. }
  472. }
  473. // 为行添加类名
  474. const tableRowClassName = ({ row }) => {
  475. return selectedRows.value.some((item) => item.pid === row.pid)
  476. ? "selected-row"
  477. : ""
  478. }
  479. // 处理分页变化
  480. const handleSizeChange = (newSize) => {
  481. gd.value.pageSize4 = newSize
  482. gd.value.currentPage4 = 1
  483. getprojectlist()
  484. }
  485. // 获取项目
  486. const handleCurrentChange2 = (val) => {
  487. getprojectlist()
  488. }
  489. // 确认选中行
  490. const confirmSelected = () => {
  491. if (selectedRows.value.length !== 1) {
  492. ElMessage.warning("请选择一个项目!")
  493. return
  494. }
  495. const selected = selectedRows.value[0]
  496. const project = {
  497. projectId: selected.pid,
  498. projectName: selected.name || `Project ${projectStore.projects.length + 1}`,
  499. keywords: selected.keywords || "",
  500. remark: selected.remark || "",
  501. flow: selected.flow ? selected.flow : { nodes: [], edges: [] }
  502. }
  503. // 如果项目已存在,更新信息;否则添加新项目
  504. if (projectStore.projects.some((p) => p.projectId === selected.pid)) {
  505. projectStore.updateProjectInfo(selected.pid, project)
  506. } else {
  507. projectStore.addProject(project)
  508. }
  509. // 设置激活项目
  510. projectStore.setActiveProject(selected.pid)
  511. // 跳转到首页
  512. router.push({ path: "/home" })
  513. dialog.value.projectListDialog = false
  514. }
  515. // 处理项目选择确认
  516. const handleProjectConfirm = (project) => {
  517. router.push({ path: "/home" });
  518. dialog.value.projectListDialog = false;
  519. };
  520. const handleFlowImported = (newFlow) => {
  521. // 这里可以调用 VueFlow 的刷新方法
  522. // 或者直接重新加载当前项目
  523. // 例如:重新调用 flowInit() 或其他刷新方法
  524. console.log('Flow imported, need to refresh VueFlow', newFlow);
  525. // 如果你有访问 vueflow.vue 组件的方法,可以调用它的刷新方法
  526. // 例如:vueFlowRef.value.flowInit();
  527. }
  528. </script>
  529. <style scoped>
  530. .header-button-bar {
  531. position: relative; /* 作为绝对定位的参照 */
  532. display: flex;
  533. align-items: center;
  534. width: 100%;
  535. background: #ffffff;
  536. margin: -1px 0 -3px -1px;
  537. }
  538. :deep(.el-tabs) {
  539. width: 100%;
  540. }
  541. :deep(.el-tabs__nav-wrap) {
  542. width: 100%;
  543. position: relative; /* 备用定位参照 */
  544. }
  545. :deep(.el-tabs__nav) {
  546. display: flex;
  547. gap: 4px;
  548. width: calc(100% - 100px); /* 为 #tab-user 预留空间 */
  549. }
  550. :deep(#tab-user) {
  551. position: absolute;
  552. right: -70px; /* 紧贴右边缘 */
  553. top: 50%; /* 垂直居中 */
  554. transform: translateY(-50%); /* 调整垂直位置 */
  555. padding: 0;
  556. display: flex;
  557. align-items: center;
  558. background-color: #edf2fa;
  559. border: none;
  560. }
  561. .custom-tab-nav {
  562. display: flex;
  563. align-items: center;
  564. gap: 8px;
  565. }
  566. .left-buttons {
  567. display: flex;
  568. gap: 8px;
  569. }
  570. .tab-like-button {
  571. padding: 8px 16px;
  572. font-size: 14px;
  573. border: none;
  574. background: #fff;
  575. transition: all 0.3s;
  576. }
  577. .tab-like-button:hover {
  578. background-color: #f0f0f0;
  579. color: #075679;
  580. }
  581. .tabs-nav {
  582. flex: 1;
  583. }
  584. .button-group {
  585. display: flex;
  586. flex-wrap: wrap;
  587. gap: 4px;
  588. padding: 6px;
  589. border: 1px solid #d0cdcd;
  590. border-radius: 5px;
  591. }
  592. .button-group .el-button {
  593. min-width: 60px;
  594. padding: 4px 8px;
  595. font-size: 14px;
  596. border: none;
  597. transition: all 0.3s;
  598. }
  599. .button-group .el-button:hover {
  600. background-color: #f0f0f0;
  601. color: #075679;
  602. }
  603. :deep(.el-tabs__header) {
  604. margin: 0;
  605. border-bottom: 1px solid #e4e7ed;
  606. background-color: #edf2fa;
  607. }
  608. :deep(.el-tabs__content) {
  609. padding: 0;
  610. background: #ffffff;
  611. }
  612. .icon-only-button {
  613. padding: 0;
  614. min-width: 32px;
  615. height: 39px;
  616. display: flex;
  617. align-items: center;
  618. justify-content: center;
  619. background-color: #edf2fa;
  620. border: none;
  621. }
  622. :deep(.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active) {
  623. border-top: none;
  624. }
  625. .icon-text-button {
  626. display: flex;
  627. align-items: center;
  628. gap: 4px;
  629. }
  630. .button-icon {
  631. width: 16px;
  632. height: 16px;
  633. }
  634. .tab-label {
  635. display: flex;
  636. align-items: center;
  637. gap: 4px;
  638. }
  639. .tab-icon {
  640. width: 16px;
  641. height: 16px;
  642. }
  643. :deep(#tab-exit) {
  644. padding: 0 !important;
  645. }
  646. :deep(#tab-open) {
  647. padding: 0 !important;
  648. }
  649. :deep(#tab-save) {
  650. padding: 0 !important;
  651. }
  652. :deep(#tab-help) {
  653. padding: 0 !important;
  654. }
  655. .open-page-header-icons {
  656. width: 150px;
  657. display: flex;
  658. align-items: center;
  659. justify-content: space-around;
  660. }
  661. .open-page-header-icons .el-button {
  662. padding: 0;
  663. border: none;
  664. margin: 0;
  665. }
  666. .user-dropdown-trigger {
  667. display: flex;
  668. align-items: center;
  669. cursor: pointer;
  670. }
  671. .nickname {
  672. margin-left: 6px;
  673. }
  674. .userinfo-header {
  675. display: flex;
  676. align-items: center;
  677. justify-content: center;
  678. }
  679. .userinfo-footer {
  680. display: flex;
  681. justify-content: center;
  682. }
  683. /* 选中行的样式 */
  684. :deep(.el-table .selected-row) {
  685. background-color: #f3f8fb !important;
  686. position: relative;
  687. }
  688. :deep(.el-table .selected-row td:first-child) {
  689. border-left: 4px solid #12739e !important;
  690. }
  691. :deep(.el-table .selected-row td) {
  692. border-top: 1px solid #12739e !important;
  693. /* border-right: 1px solid #12739E !important; */
  694. border-bottom: 1px solid #12739e !important;
  695. }
  696. :deep(.el-table .selected-row td:last-child) {
  697. border-right: 1px solid #12739e !important;
  698. }
  699. </style>