|
@@ -44,16 +44,16 @@ updateUserId: null -->
|
|
<template #houseType="{ record }">
|
|
<template #houseType="{ record }">
|
|
{{ renderHouseType(record.houseType) }}
|
|
{{ renderHouseType(record.houseType) }}
|
|
</template>
|
|
</template>
|
|
- <template #action>
|
|
|
|
|
|
+ <template #action="{ record }">
|
|
<TableAction
|
|
<TableAction
|
|
:actions="[
|
|
:actions="[
|
|
{
|
|
{
|
|
- icon: 'clarity:note-edit-line',
|
|
|
|
- label: '编辑',
|
|
|
|
- onClick: () => {
|
|
|
|
- createMessage.info(`暂未接入`);
|
|
|
|
- },
|
|
|
|
|
|
+ icon: 'eos-icons:role-binding',
|
|
|
|
+ label: '绑定主播',
|
|
|
|
+ color: 'warning',
|
|
|
|
+ onClick: handleBindAnchor.bind(null, record),
|
|
},
|
|
},
|
|
|
|
+
|
|
{
|
|
{
|
|
icon: 'ant-design:delete-outlined',
|
|
icon: 'ant-design:delete-outlined',
|
|
color: 'error',
|
|
color: 'error',
|
|
@@ -69,6 +69,7 @@ updateUserId: null -->
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</BasicTable>
|
|
</BasicTable>
|
|
|
|
+ <bindModal @register="registerBindModal" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
@@ -77,22 +78,26 @@ updateUserId: null -->
|
|
BasicTable,
|
|
BasicTable,
|
|
useTable,
|
|
useTable,
|
|
BasicColumn,
|
|
BasicColumn,
|
|
|
|
+ // FormSchema,
|
|
FormProps,
|
|
FormProps,
|
|
TableAction,
|
|
TableAction,
|
|
TableImg,
|
|
TableImg,
|
|
} from '/@/components/Table';
|
|
} from '/@/components/Table';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
- import { uploadApi } from '/@/api/sys/upload';
|
|
|
|
|
|
+ // import { uploadApi } from '/@/api/sys/upload';
|
|
import { Switch } from 'ant-design-vue';
|
|
import { Switch } from 'ant-design-vue';
|
|
import { h } from 'vue';
|
|
import { h } from 'vue';
|
|
import { ListApi } from '/@/api/scene/live';
|
|
import { ListApi } from '/@/api/scene/live';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
|
+ import { useModal } from '/@/components/Modal';
|
|
|
|
+ import bindModal from './bindModal.vue';
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
- components: { BasicTable, TableAction, TableImg },
|
|
|
|
|
|
+ components: { BasicTable, TableAction, TableImg, bindModal },
|
|
setup() {
|
|
setup() {
|
|
const { createMessage } = useMessage();
|
|
const { createMessage } = useMessage();
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
+ const [registerBindModal, { openModal: openBindModal }] = useModal();
|
|
|
|
|
|
const columns: BasicColumn[] = [
|
|
const columns: BasicColumn[] = [
|
|
{
|
|
{
|
|
@@ -168,7 +173,8 @@ updateUserId: null -->
|
|
title: '操作',
|
|
title: '操作',
|
|
dataIndex: '',
|
|
dataIndex: '',
|
|
slots: { customRender: 'action' },
|
|
slots: { customRender: 'action' },
|
|
- width: 120,
|
|
|
|
|
|
+ width: 200,
|
|
|
|
+ fixed: 'right',
|
|
},
|
|
},
|
|
];
|
|
];
|
|
|
|
|
|
@@ -214,7 +220,7 @@ updateUserId: null -->
|
|
title: '直播列表',
|
|
title: '直播列表',
|
|
api: ListApi,
|
|
api: ListApi,
|
|
columns: columns,
|
|
columns: columns,
|
|
- useSearchForm: false,
|
|
|
|
|
|
+ useSearchForm: true,
|
|
formConfig: searchForm,
|
|
formConfig: searchForm,
|
|
showTableSetting: true,
|
|
showTableSetting: true,
|
|
tableSetting: { fullScreen: true },
|
|
tableSetting: { fullScreen: true },
|
|
@@ -233,12 +239,18 @@ updateUserId: null -->
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ function handleBindAnchor(record: Recordable) {
|
|
|
|
+ console.log('record', record);
|
|
|
|
+ openBindModal(true, record);
|
|
|
|
+ }
|
|
|
|
+
|
|
return {
|
|
return {
|
|
registerTable,
|
|
registerTable,
|
|
createMessage,
|
|
createMessage,
|
|
renderHouseType,
|
|
renderHouseType,
|
|
t,
|
|
t,
|
|
- uploadApi: uploadApi as any,
|
|
|
|
|
|
+ registerBindModal,
|
|
|
|
+ handleBindAnchor,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|