mirror of https://github.com/certd/certd
chore:
parent
64e5449ab3
commit
4bb0918e27
|
@ -95,6 +95,7 @@ export const certdResources = [
|
|||
meta: {
|
||||
icon: "ion:link-outline",
|
||||
auth: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -105,6 +106,7 @@ export const certdResources = [
|
|||
meta: {
|
||||
icon: "mdi:format-list-group",
|
||||
auth: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -198,6 +200,7 @@ export const certdResources = [
|
|||
},
|
||||
icon: "ion:bag-check-outline",
|
||||
auth: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -87,6 +87,7 @@ export const sysResources = [
|
|||
},
|
||||
icon: "ion:menu",
|
||||
permission: "sys:settings:view",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -101,6 +102,7 @@ export const sysResources = [
|
|||
},
|
||||
icon: "ion:disc-outline",
|
||||
permission: "sys:settings:view",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -160,6 +162,7 @@ export const sysResources = [
|
|||
icon: "ion:list-outline",
|
||||
//需要校验权限
|
||||
permission: "sys:auth:per:view",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -170,6 +173,7 @@ export const sysResources = [
|
|||
meta: {
|
||||
icon: "ion:people-outline",
|
||||
permission: "sys:auth:role:view",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -180,6 +184,7 @@ export const sysResources = [
|
|||
meta: {
|
||||
icon: "ion:person-outline",
|
||||
permission: "sys:auth:user:view",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -195,6 +200,7 @@ export const sysResources = [
|
|||
const settingStore = useSettingStore();
|
||||
return settingStore.isComm;
|
||||
},
|
||||
keepAlive: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -223,6 +229,7 @@ export const sysResources = [
|
|||
},
|
||||
icon: "ion:bag-check",
|
||||
permission: "sys:settings:edit",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -237,6 +244,7 @@ export const sysResources = [
|
|||
},
|
||||
icon: "ion:gift-outline",
|
||||
auth: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -32,8 +32,8 @@ export default defineComponent({
|
|||
|
||||
return {
|
||||
crudBinding,
|
||||
crudRef
|
||||
crudRef,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { DeleteBatch } from "./api";
|
||||
|
||||
defineOptions({
|
||||
name: "CnameRecord"
|
||||
name: "CnameRecord",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
|
@ -41,7 +41,7 @@ const handleBatchDelete = () => {
|
|||
message.info("删除成功");
|
||||
crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
message.error("请先勾选记录");
|
||||
|
@ -52,7 +52,8 @@ const handleBatchDelete = () => {
|
|||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
</script>
|
||||
<style lang="less">
|
||||
|
||||
</style>
|
||||
<style lang="less"></style>
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {onActivated, onMounted} from "vue";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { DeleteBatch } from "./api";
|
||||
|
||||
defineOptions({
|
||||
name: "PipelineHistory"
|
||||
name: "PipelineHistory",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
|
@ -36,7 +36,7 @@ const handleBatchDelete = () => {
|
|||
message.info("删除成功");
|
||||
crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
message.error("请先勾选记录");
|
||||
|
|
|
@ -24,7 +24,7 @@ import { siteInfoApi } from "./api";
|
|||
import { Modal, notification } from "ant-design-vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
defineOptions({
|
||||
name: "SiteCertMonitor"
|
||||
name: "SiteCertMonitor",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
const settingStore = useSettingStore();
|
||||
|
@ -36,9 +36,9 @@ function checkAll() {
|
|||
await siteInfoApi.CheckAll();
|
||||
notification.success({
|
||||
message: "检查任务已提交",
|
||||
description: "请稍后刷新页面查看结果"
|
||||
description: "请稍后刷新页面查看结果",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ export default defineComponent({
|
|||
|
||||
return {
|
||||
crudBinding,
|
||||
crudRef
|
||||
crudRef,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -17,7 +17,7 @@ import createCrudOptions from "./crud";
|
|||
import { OPEN_API_DOC } from "/@/views/certd/open/openkey/api";
|
||||
|
||||
defineOptions({
|
||||
name: "OpenKey"
|
||||
name: "OpenKey",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ export default defineComponent({
|
|||
|
||||
return {
|
||||
crudBinding,
|
||||
crudRef
|
||||
crudRef,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -34,13 +34,7 @@
|
|||
<div class="duration flex-between mt-5">
|
||||
<div class="flex-o duration-label">时长</div>
|
||||
<div class="duration-list">
|
||||
<div
|
||||
v-for="dp of product.durationPrices"
|
||||
:key="dp.duration"
|
||||
class="duration-item"
|
||||
:class="{ active: selected.duration === dp.duration }"
|
||||
@click="selected = dp"
|
||||
>
|
||||
<div v-for="dp of product.durationPrices" :key="dp.duration" class="duration-item" :class="{ active: selected.duration === dp.duration }" @click="selected = dp">
|
||||
{{ durationDict.dataMap[dp.duration]?.label }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -74,8 +68,8 @@ const selected = ref(props.product.durationPrices[0]);
|
|||
const productTypeDictRef = dict({
|
||||
data: [
|
||||
{ value: "suite", label: "套餐", color: "green" },
|
||||
{ value: "addon", label: "加量包", color: "blue" }
|
||||
]
|
||||
{ value: "addon", label: "加量包", color: "blue" },
|
||||
],
|
||||
});
|
||||
|
||||
const emit = defineEmits(["order"]);
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { DeleteBatch } from "./api";
|
||||
|
||||
defineOptions({
|
||||
name: "MyTrade"
|
||||
name: "MyTrade",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
|
@ -36,7 +36,7 @@ const handleBatchDelete = () => {
|
|||
message.info("删除成功");
|
||||
crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
message.error("请先勾选记录");
|
||||
|
@ -47,5 +47,8 @@ const handleBatchDelete = () => {
|
|||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, onMounted } from "vue";
|
||||
import { defineComponent, onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "../../certd/access/crud";
|
||||
import { createAccessApi } from "/@/views/certd/access/api";
|
||||
|
@ -27,10 +27,14 @@ export default defineComponent({
|
|||
crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
return {
|
||||
crudBinding,
|
||||
crudRef
|
||||
crudRef,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -20,7 +20,7 @@ import * as api from "./api";
|
|||
import { notification } from "ant-design-vue";
|
||||
|
||||
defineOptions({
|
||||
name: "AccountBind"
|
||||
name: "AccountBind",
|
||||
});
|
||||
const iframeRef = ref();
|
||||
|
||||
|
@ -44,7 +44,7 @@ onMounted(() => {
|
|||
const iframeClient = new IframeClient(iframeRef.value, (e: any) => {
|
||||
notification.error({
|
||||
message: " error",
|
||||
description: e.message
|
||||
description: e.message,
|
||||
});
|
||||
});
|
||||
iframeClient.register("getSubjectInfo", async (req: any) => {
|
||||
|
@ -52,33 +52,33 @@ onMounted(() => {
|
|||
subjectId: settingStore.installInfo.siteId,
|
||||
installAt: settingStore.installInfo.installTime,
|
||||
vipType: settingStore.plusInfo.vipType || "free",
|
||||
expiresAt: settingStore.plusInfo.expireTime
|
||||
expiresAt: settingStore.plusInfo.expireTime,
|
||||
};
|
||||
return subjectInfo;
|
||||
});
|
||||
|
||||
let preBindUserId: any = null;
|
||||
iframeClient.register("preBindUser", async (req) => {
|
||||
iframeClient.register("preBindUser", async req => {
|
||||
const userId = req.data.userId;
|
||||
preBindUserId = userId;
|
||||
await api.PreBindUser(userId);
|
||||
});
|
||||
|
||||
iframeClient.register("onBoundUser", async (req) => {
|
||||
iframeClient.register("onBoundUser", async req => {
|
||||
await api.BindUser(preBindUserId);
|
||||
});
|
||||
|
||||
iframeClient.register("unbindUser", async (req) => {
|
||||
iframeClient.register("unbindUser", async req => {
|
||||
const userId = req.data.userId;
|
||||
await api.UnbindUser(userId);
|
||||
});
|
||||
|
||||
iframeClient.register("updateLicense", async (req) => {
|
||||
iframeClient.register("updateLicense", async req => {
|
||||
await api.UpdateLicense(req.data);
|
||||
await settingStore.init();
|
||||
notification.success({
|
||||
message: "更新成功",
|
||||
description: "专业版/商业版已激活"
|
||||
description: "专业版/商业版已激活",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,21 +8,13 @@
|
|||
<fs-icon :icon="ui.icons.add"></fs-icon>
|
||||
添加
|
||||
</a-button>
|
||||
<fs-permission-tree
|
||||
class="permission-tree mt-10"
|
||||
:tree="crudBinding.data"
|
||||
:checkable="false"
|
||||
:actions="permission"
|
||||
@add="addHandle"
|
||||
@edit="editHandle"
|
||||
@remove="removeHandle"
|
||||
></fs-permission-tree>
|
||||
<fs-permission-tree class="permission-tree mt-10" :tree="crudBinding.data" :checkable="false" :actions="permission" @add="addHandle" @edit="editHandle" @remove="removeHandle"></fs-permission-tree>
|
||||
</fs-crud>
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, onMounted, ref } from "vue";
|
||||
import { defineComponent, onActivated, onMounted, ref } from "vue";
|
||||
import createCrudOptions from "./crud.js";
|
||||
import FsPermissionTree from "./fs-permission-tree.vue";
|
||||
import { usePermission } from "/src/plugin/permission";
|
||||
|
@ -40,6 +32,9 @@ export default defineComponent({
|
|||
onMounted(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
const { ui } = useUi();
|
||||
|
||||
|
@ -59,7 +54,7 @@ export default defineComponent({
|
|||
const permission = ref({
|
||||
add: hasPermissions("1sys:auth:per:add"),
|
||||
edit: hasPermissions("1sys:auth:per:edit"),
|
||||
remove: hasPermissions("1sys:auth:per:remove")
|
||||
remove: hasPermissions("1sys:auth:per:remove"),
|
||||
});
|
||||
|
||||
return {
|
||||
|
@ -69,9 +64,9 @@ export default defineComponent({
|
|||
addHandle,
|
||||
editHandle,
|
||||
removeHandle,
|
||||
permission
|
||||
permission,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less">
|
||||
|
|
|
@ -5,21 +5,13 @@
|
|||
</template>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding" />
|
||||
<a-modal v-model:open="authzDialogVisible" width="860px" title="分配权限" @ok="updatePermission">
|
||||
<fs-permission-tree
|
||||
ref="permissionTreeRef"
|
||||
v-model:checked-keys="checkedKeys"
|
||||
:tree="permissionTreeData"
|
||||
:editable="false"
|
||||
checkable
|
||||
:replace-fields="{ key: 'id', label: 'title' }"
|
||||
>
|
||||
</fs-permission-tree>
|
||||
<fs-permission-tree ref="permissionTreeRef" v-model:checked-keys="checkedKeys" :tree="permissionTreeData" :editable="false" checkable :replace-fields="{ key: 'id', label: 'title' }"> </fs-permission-tree>
|
||||
</a-modal>
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, onMounted, ref } from "vue";
|
||||
import { defineComponent, onActivated, onMounted, ref } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import * as permissionApi from "../permission/api";
|
||||
|
@ -87,7 +79,7 @@ function useAuthz() {
|
|||
authzDialogVisible,
|
||||
permissionTreeData,
|
||||
checkedKeys,
|
||||
permissionTreeRef
|
||||
permissionTreeRef,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -102,7 +94,7 @@ export default defineComponent({
|
|||
extra: ({ hasActionPermission }: UseCrudPermissionExtraProps): any => {
|
||||
//额外按钮权限控制
|
||||
return { rowHandle: { buttons: { authz: { show: hasActionPermission("authz") } } } };
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// 初始化crud配置
|
||||
|
@ -116,11 +108,14 @@ export default defineComponent({
|
|||
crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
return {
|
||||
crudBinding,
|
||||
crudRef,
|
||||
...authz
|
||||
...authz,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, onMounted } from "vue";
|
||||
import { defineComponent, ref, onMounted, onActivated } from "vue";
|
||||
import { useCrud, useExpose, useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
export default defineComponent({
|
||||
|
@ -23,11 +23,14 @@ export default defineComponent({
|
|||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
return {
|
||||
crudBinding,
|
||||
crudRef
|
||||
crudRef,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { DeleteBatch } from "./api";
|
||||
|
||||
defineOptions({
|
||||
name: "CnameProvider"
|
||||
name: "CnameProvider",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
|
@ -42,7 +42,7 @@ const handleBatchDelete = () => {
|
|||
message.info("删除成功");
|
||||
crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
message.error("请先勾选记录");
|
||||
|
@ -53,5 +53,8 @@ const handleBatchDelete = () => {
|
|||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
|
@ -25,6 +25,10 @@ defineOptions({
|
|||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
const selectedRowKeys = context.selectedRowKeys;
|
||||
const handleBatchDelete = () => {
|
||||
if (selectedRowKeys.value?.length > 0) {
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
|
||||
defineOptions({
|
||||
name: "SettingsHeaderMenus"
|
||||
name: "SettingsHeaderMenus",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
|
@ -23,5 +23,8 @@ const settingStore = useSettingStore();
|
|||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
|
|
|
@ -27,7 +27,7 @@ import { useRoute, useRouter } from "vue-router";
|
|||
import { ref } from "vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
defineOptions({
|
||||
name: "SysSettings"
|
||||
name: "SysSettings",
|
||||
});
|
||||
const settingsStore = useSettingStore();
|
||||
const activeKey = ref("");
|
||||
|
|
|
@ -47,7 +47,7 @@ import { useUserStore } from "/@/store/modules/user";
|
|||
import { merge } from "lodash-es";
|
||||
|
||||
defineOptions({
|
||||
name: "SiteSetting"
|
||||
name: "SiteSetting",
|
||||
});
|
||||
|
||||
interface FormState {
|
||||
|
@ -78,7 +78,7 @@ const onFinish = async (form: any) => {
|
|||
await loadSysSiteSettings();
|
||||
await settingsStore.loadSysSettings();
|
||||
notification.success({
|
||||
message: "保存成功"
|
||||
message: "保存成功",
|
||||
});
|
||||
} finally {
|
||||
saveLoading.value = false;
|
||||
|
@ -91,11 +91,11 @@ const uploaderConfig = ref({
|
|||
action: "/basic/file/upload",
|
||||
name: "file",
|
||||
headers: {
|
||||
Authorization: "Bearer " + userStore.getToken
|
||||
Authorization: "Bearer " + userStore.getToken,
|
||||
},
|
||||
successHandle(res: any) {
|
||||
return res;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
function buildUrl(key: string) {
|
||||
|
@ -109,12 +109,12 @@ function onFinishFailed(err: any) {
|
|||
const cropperOptions = ref({
|
||||
aspectRatio: 1,
|
||||
autoCropArea: 1,
|
||||
viewMode: 0
|
||||
viewMode: 0,
|
||||
});
|
||||
const loginLogoCropperOptions = ref({
|
||||
aspectRatio: 3,
|
||||
autoCropArea: 1,
|
||||
viewMode: 0
|
||||
viewMode: 0,
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineEmits, onMounted, ref } from "vue";
|
||||
import { defineEmits, onActivated, onMounted, ref } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
|
||||
defineOptions({
|
||||
name: "ProductManager"
|
||||
name: "ProductManager",
|
||||
});
|
||||
const emit = defineEmits(["refreshed"]);
|
||||
|
||||
|
@ -19,5 +19,8 @@ const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context
|
|||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { DeleteBatch } from "./api";
|
||||
|
||||
defineOptions({
|
||||
name: "TradeManager"
|
||||
name: "TradeManager",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
|
@ -39,7 +39,7 @@ const handleBatchDelete = () => {
|
|||
message.info("删除成功");
|
||||
crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
message.error("请先勾选记录");
|
||||
|
@ -50,5 +50,8 @@ const handleBatchDelete = () => {
|
|||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
|
|
|
@ -16,7 +16,7 @@ import { useFs } from "@fast-crud/fast-crud";
|
|||
import createCrudOptions from "./crud";
|
||||
|
||||
defineOptions({
|
||||
name: "UserSuites"
|
||||
name: "UserSuites",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
|
||||
|
|
Loading…
Reference in New Issue