消毒机设备
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.8 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <script lang="ts" setup>
  2. import { useSettingStore } from '@/stores/settingStore'
  3. import { ElMessageBox } from 'element-plus'
  4. import { ref } from 'vue'
  5. import AddUser from './AddUser.vue'
  6. const settingStore = useSettingStore()
  7. const tableData = ref(settingStore.userList)
  8. const updatePwd = (userItem: Setting.User) => {
  9. console.log('userItem===', userItem)
  10. settingStore.updateCurrentEditUser(userItem)
  11. settingStore.updateUserModalState('edit')
  12. settingStore.updateVisible(true)
  13. }
  14. const onAddUser = () => {
  15. settingStore.updateUserModalState('add')
  16. settingStore.updateVisible(true)
  17. }
  18. const onDelUser = () => {
  19. ElMessageBox.confirm(
  20. '请确认是否删除?',
  21. '删除',
  22. {
  23. confirmButtonText: '确认',
  24. cancelButtonText: '取消',
  25. type: 'warning',
  26. },
  27. ).then(() => {
  28. })
  29. }
  30. </script>
  31. <template>
  32. <div>
  33. <div class="history-export">
  34. <FtButton type="primary" @click="onAddUser">
  35. <div>
  36. 新增用户
  37. </div>
  38. </FtButton>
  39. <FtButton @click="onDelUser">
  40. <div>
  41. 删除
  42. </div>
  43. </FtButton>
  44. </div>
  45. <div>
  46. <el-table :data="tableData" stripe style="width: 100%">
  47. <el-table-column type="selection" width="55" />
  48. <el-table-column prop="uid" label="用户名" />
  49. <el-table-column prop="detail" label="操作">
  50. <template #default="scoped">
  51. <el-link type="primary" @click="updatePwd(scoped.row)">修改密码</el-link>
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. </div>
  56. <div>
  57. <AddUser/>
  58. </div>
  59. </div>
  60. </template>
  61. <style lang="scss" scoped>
  62. .main-content{
  63. height: 100%;
  64. overflow: hidden;
  65. padding: 10px;
  66. background: $gradient-color;
  67. .history-export{
  68. margin: 2vw;
  69. }
  70. .history-table{
  71. }
  72. }
  73. </style>