feat: 新增-用户-用户列表,添加查看设备

This commit is contained in:
wanglihui 2024-12-29 19:37:01 +08:00
parent b1909f7bbf
commit b778723a8c
3 changed files with 17 additions and 13 deletions

View File

@ -1,7 +1,7 @@
{
"name": "tsdd-control",
"private": true,
"version": "1.0.0",
"version": "1.2.0",
"scripts": {
"dev": "cross-env APP_ENV=dev vite",
"build": "cross-env APP_ENV=prod vite build",

View File

@ -62,8 +62,6 @@
/>
</div>
</div>
<!-- 查看设备 -->
<Devices v-model:value="devicesValue" :uid="devicesUid" />
</bd-page>
</template>
@ -77,7 +75,6 @@ meta:
import { useRoute } from 'vue-router';
import { ElButton, ElSpace, ElAvatar, ElMessage, ElMessageBox } from 'element-plus';
import BdMsg from '@/components/BdMsg/index.vue';
import Devices from './components/Devices.vue';
import { BU_DOU_CONFIG } from '@/config';
// API
@ -272,15 +269,6 @@ const onDel = (item: any) => {
});
};
//
const devicesValue = ref(false);
const devicesUid = ref('');
const onDevices = () => {
devicesUid.value = route.query.touid as string;
devicesValue.value = true;
};
//
onMounted(() => {
getUserList();

View File

@ -56,6 +56,8 @@
</div>
<!-- 发消息 -->
<bd-send-msg v-model:value="sendValue" v-bind="sendInfo" />
<!-- 查看设备 -->
<Devices v-model:value="devicesValue" :uid="devicesUid" />
</bd-page>
</template>
@ -68,6 +70,7 @@ meta:
<script lang="tsx" setup>
import { useRouter } from 'vue-router';
import { ElButton, ElSpace, ElAvatar, ElDropdown, ElDropdownMenu, ElDropdownItem, ElMessage, ElMessageBox } from 'element-plus';
import Devices from '@/pages/message/components/Devices.vue';
import { useUserStore } from '@/stores/modules/user';
import { BU_DOU_CONFIG } from '@/config';
// API
@ -197,6 +200,10 @@ const column = reactive<Column.ColumnOptions[]>([
<i-bd-info class={'mr-4px'} />
{scope.row.status === 1 ? '封禁' : '解禁'}
</ElDropdownItem>
<ElDropdownItem onClick={() => onDevices(scope.row)}>
<i-bd-devices class={'mr-4px'} />
查看设备
</ElDropdownItem>
</ElDropdownMenu>
);
}
@ -318,6 +325,15 @@ const onUseLiftban = (item: any) => {
});
};
//
const devicesValue = ref(false);
const devicesUid = ref('');
const onDevices = (item: any) => {
devicesUid.value = item.uid;
devicesValue.value = true;
};
//
onMounted(() => {
getUserList();