|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<PageWrapper contentBackground>
|
|
<PageWrapper contentBackground>
|
|
<template #footer>
|
|
<template #footer>
|
|
- <a-tabs v-model:activeKey="searchInfo.type" @change="tabChange">
|
|
|
|
|
|
+ <a-tabs v-model:activeKey="searchInfo.platformType" @change="tabChange">
|
|
<a-tab-pane key="1" :tab="t('routes.product.sdkType.1')" />
|
|
<a-tab-pane key="1" :tab="t('routes.product.sdkType.1')" />
|
|
<a-tab-pane key="2" :tab="t('routes.product.sdkType.2')" />
|
|
<a-tab-pane key="2" :tab="t('routes.product.sdkType.2')" />
|
|
</a-tabs>
|
|
</a-tabs>
|
|
@@ -14,7 +14,7 @@
|
|
v-if="getTypeCheckPerm('sdk-add')"
|
|
v-if="getTypeCheckPerm('sdk-add')"
|
|
@click="
|
|
@click="
|
|
() => {
|
|
() => {
|
|
- openAddModal(true, searchInfo.type);
|
|
|
|
|
|
+ openAddModal(true, searchInfo.platformType);
|
|
}
|
|
}
|
|
"
|
|
"
|
|
>{{ t('routes.product.addVstive') }}</a-button
|
|
>{{ t('routes.product.addVstive') }}</a-button
|
|
@@ -95,11 +95,11 @@ export default defineComponent({
|
|
const permissionStore = usePermissionStore();
|
|
const permissionStore = usePermissionStore();
|
|
const { getCheckPerm } = permissionStore;
|
|
const { getCheckPerm } = permissionStore;
|
|
const searchInfo = reactive<Recordable>({
|
|
const searchInfo = reactive<Recordable>({
|
|
- type: '1',
|
|
|
|
|
|
+ platformType: '1',
|
|
});
|
|
});
|
|
const [registerAddModal, { openModal: openAddModal }] = useModal();
|
|
const [registerAddModal, { openModal: openAddModal }] = useModal();
|
|
const [registerEditModal, { openModal: openEditModal }] = useModal();
|
|
const [registerEditModal, { openModal: openEditModal }] = useModal();
|
|
- const { createMessage } = useMessage();
|
|
|
|
|
|
+ const { createMessage, createConfirm } = useMessage();
|
|
const searchForm: Partial<FormProps> = {
|
|
const searchForm: Partial<FormProps> = {
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
schemas: [
|
|
schemas: [
|
|
@@ -129,12 +129,6 @@ export default defineComponent({
|
|
dataIndex: 'imprintCh',
|
|
dataIndex: 'imprintCh',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '版本更新说明',
|
|
|
|
- width: 150,
|
|
|
|
- ifShow:true,
|
|
|
|
- dataIndex: 'status',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
title: '首次发布时间',
|
|
title: '首次发布时间',
|
|
width: 120,
|
|
width: 120,
|
|
dataIndex: 'publishTime',
|
|
dataIndex: 'publishTime',
|
|
@@ -237,34 +231,54 @@ export default defineComponent({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
async function handleDelete(record: Recordable) {
|
|
async function handleDelete(record: Recordable) {
|
|
- console.log('点击了删除', record);
|
|
|
|
- await SpaceSdkDelete({ id: record.id });
|
|
|
|
- createMessage.success(t('common.optSuccess'));
|
|
|
|
- reload();
|
|
|
|
|
|
+ createConfirm({
|
|
|
|
+ iconType: 'warning',
|
|
|
|
+ title: () => h('span', t('sys.app.logoutTip')),
|
|
|
|
+ content: () => h('span', '确定要删除吗?'),
|
|
|
|
+ onOk: async () => {
|
|
|
|
+ await SpaceSdkDelete({ id: record.id });
|
|
|
|
+ createMessage.success(t('common.optSuccess'));
|
|
|
|
+ reload();
|
|
|
|
+ },
|
|
|
|
+ });
|
|
}
|
|
}
|
|
function handleOpen(record: Recordable) {
|
|
function handleOpen(record: Recordable) {
|
|
console.log('点击了启用', record);
|
|
console.log('点击了启用', record);
|
|
}
|
|
}
|
|
async function handlePublish(record: Recordable) {
|
|
async function handlePublish(record: Recordable) {
|
|
- await SpaceSdkOnline({ id: record.id, status:1 });//状态 0 - 未发布 1 -发布 2-下架
|
|
|
|
- createMessage.success(t('common.optSuccess'));
|
|
|
|
- reload();
|
|
|
|
|
|
+ createConfirm({
|
|
|
|
+ iconType: 'warning',
|
|
|
|
+ title: () => h('span', t('sys.app.logoutTip')),
|
|
|
|
+ content: () => h('span', '是否确定发布该文件?发布后将在官网展示。'),
|
|
|
|
+ onOk: async () => {
|
|
|
|
+ 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-下架
|
|
|
|
- createMessage.success(t('common.optSuccess'));
|
|
|
|
- reload();
|
|
|
|
|
|
+ createConfirm({
|
|
|
|
+ iconType: 'warning',
|
|
|
|
+ title: () => h('span', t('sys.app.logoutTip')),
|
|
|
|
+ content: () => h('span', '是否确定下架?下架后官网不再展示该SDK。'),
|
|
|
|
+ onOk: async () => {
|
|
|
|
+ await SpaceSdkOnline({ id: record.id, status:2 });//状态 0 - 未发布 1 -发布 2-下架
|
|
|
|
+ createMessage.success(t('common.optSuccess'));
|
|
|
|
+ reload();
|
|
|
|
+ },
|
|
|
|
+ });
|
|
}
|
|
}
|
|
function handleEdit(record: Recordable) {
|
|
function handleEdit(record: Recordable) {
|
|
console.log('record', record);
|
|
console.log('record', record);
|
|
openEditModal(true, {
|
|
openEditModal(true, {
|
|
...record,
|
|
...record,
|
|
- type:searchInfo.type
|
|
|
|
|
|
+ type:searchInfo.platformType
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
function getTypeCheckPerm(val){
|
|
function getTypeCheckPerm(val){
|
|
- let myType = searchInfo.type
|
|
|
|
|
|
+ let myType = searchInfo.platformType
|
|
return getCheckPerm(val) || getCheckPerm(`${val}-${myType}`)
|
|
return getCheckPerm(val) || getCheckPerm(`${val}-${myType}`)
|
|
}
|
|
}
|
|
return {
|
|
return {
|