|
@@ -24,6 +24,12 @@
|
|
<TableAction
|
|
<TableAction
|
|
:actions="[
|
|
:actions="[
|
|
{
|
|
{
|
|
|
|
+ label: '发布',
|
|
|
|
+ icon: 'arcticons:efa-publish',
|
|
|
|
+ ifShow:getTypeCheckPerm('sdk-publish') && record.status != 1,
|
|
|
|
+ onClick: handlePublish.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
label: '编辑',
|
|
label: '编辑',
|
|
icon: 'ep:edit',
|
|
icon: 'ep:edit',
|
|
ifShow: getTypeCheckPerm('sdk-update'),
|
|
ifShow: getTypeCheckPerm('sdk-update'),
|
|
@@ -171,6 +177,7 @@ export default defineComponent({
|
|
checked: record.isTop == 1 ? true : false,
|
|
checked: record.isTop == 1 ? true : false,
|
|
checkedChildren: '启用',
|
|
checkedChildren: '启用',
|
|
unCheckedChildren: '禁用',
|
|
unCheckedChildren: '禁用',
|
|
|
|
+ disabled:record.status != 1,
|
|
loading: false,
|
|
loading: false,
|
|
onChange: async (checked: boolean) => {
|
|
onChange: async (checked: boolean) => {
|
|
record.pendingStatus = true;
|
|
record.pendingStatus = true;
|
|
@@ -213,7 +220,7 @@ export default defineComponent({
|
|
dataIndex: 'action',
|
|
dataIndex: 'action',
|
|
slots: { customRender: 'action' },
|
|
slots: { customRender: 'action' },
|
|
},
|
|
},
|
|
- canResize: false,
|
|
|
|
|
|
+ canResize: true,
|
|
});
|
|
});
|
|
function tabChange(val: string) {
|
|
function tabChange(val: string) {
|
|
console.log('tabChange', val);
|
|
console.log('tabChange', val);
|
|
@@ -226,7 +233,7 @@ export default defineComponent({
|
|
case 1:
|
|
case 1:
|
|
return t(`routes.product.statusType.1`);
|
|
return t(`routes.product.statusType.1`);
|
|
default:
|
|
default:
|
|
- return t(`routes.product.statusType.1`);
|
|
|
|
|
|
+ return t(`routes.product.statusType.0`);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
async function handleDelete(record: Recordable) {
|
|
async function handleDelete(record: Recordable) {
|
|
@@ -238,6 +245,11 @@ export default defineComponent({
|
|
function handleOpen(record: Recordable) {
|
|
function handleOpen(record: Recordable) {
|
|
console.log('点击了启用', record);
|
|
console.log('点击了启用', record);
|
|
}
|
|
}
|
|
|
|
+ async function handlePublish(record: Recordable) {
|
|
|
|
+ await SpaceSdkOnline({ id: record.id, status:1 });//状态 0 - 未发布 1 -发布 2-下架
|
|
|
|
+ createMessage.success(t('common.optSuccess'));
|
|
|
|
+ reload();
|
|
|
|
+ }
|
|
async function handleOff(record: Recordable) {
|
|
async function handleOff(record: Recordable) {
|
|
await SpaceSdkOnline({ id: record.id, status:2 });//状态 0 - 未发布 1 -发布 2-下架
|
|
await SpaceSdkOnline({ id: record.id, status:2 });//状态 0 - 未发布 1 -发布 2-下架
|
|
createMessage.success(t('common.optSuccess'));
|
|
createMessage.success(t('common.optSuccess'));
|
|
@@ -258,6 +270,7 @@ export default defineComponent({
|
|
registerTimeTable,
|
|
registerTimeTable,
|
|
handleDelete,
|
|
handleDelete,
|
|
handleOpen,
|
|
handleOpen,
|
|
|
|
+ handlePublish,
|
|
tabChange,
|
|
tabChange,
|
|
handleOff,
|
|
handleOff,
|
|
reload,
|
|
reload,
|