|
|
@@ -6,8 +6,9 @@ import { villageCommonContent } from "./common";
|
|
|
import { goFormStatic } from "@/pages/composeable/TaskEntryForm";
|
|
|
import type { SelectIdProps } from "@imengyu/vue-dynamic-form-ant";
|
|
|
import type { DataModel } from "@imengyu/js-request-transform";
|
|
|
-import type { ButtonProps } from "ant-design-vue";
|
|
|
+import { Modal, type ButtonProps } from "ant-design-vue";
|
|
|
import { h } from "vue";
|
|
|
+import { useCollectStore } from "@/stores/collect";
|
|
|
|
|
|
export function villageInfoFolkCultureForm(title: string) : SingleForm {
|
|
|
return [VillageBulidingInfo, (m) => ({
|
|
|
@@ -32,8 +33,10 @@ export function villageInfoFolkCultureForm(title: string) : SingleForm {
|
|
|
defaultValue: null,
|
|
|
additionalProps: {
|
|
|
loadData: {
|
|
|
- callback: (m, r, p, i) => async () =>
|
|
|
- (await VillageInfoApi.getList(
|
|
|
+ callback: (m, r, p, i) => async () => {
|
|
|
+ const collectStore = useCollectStore();
|
|
|
+ return (await VillageInfoApi.getList(
|
|
|
+ collectStore.getCollectModuleId('ich'),
|
|
|
'ich', undefined, undefined,
|
|
|
i.formGlobalParams.villageId as number,
|
|
|
i.formGlobalParams.villageVolunteerId as number
|
|
|
@@ -42,6 +45,7 @@ export function villageInfoFolkCultureForm(title: string) : SingleForm {
|
|
|
text: p.title,
|
|
|
raw: p,
|
|
|
}))
|
|
|
+ }
|
|
|
},
|
|
|
} as IDynamicFormItemCallbackAdditionalProps<SelectIdProps<DataModel>>,
|
|
|
rules: [],
|
|
|
@@ -100,7 +104,10 @@ export const villageInfoCulture : GroupForm = {
|
|
|
additionalProps: {
|
|
|
loadData: {
|
|
|
callback(_, m, p, i) {
|
|
|
- return async () => (await VillageInfoApi.getList('speaker', undefined, undefined,
|
|
|
+ const collectStore = useCollectStore();
|
|
|
+ return async () => (await VillageInfoApi.getList(
|
|
|
+ collectStore.getCollectModuleId('speaker'),
|
|
|
+ 'speaker', undefined, undefined,
|
|
|
i.formGlobalParams.villageId as number,
|
|
|
i.formGlobalParams.villageVolunteerId as number
|
|
|
))
|
|
|
@@ -128,6 +135,14 @@ export const villageInfoCulture : GroupForm = {
|
|
|
additionalProps: {
|
|
|
onClick: { callback(v, m, p, i) {
|
|
|
return () => {
|
|
|
+ const collectStore = useCollectStore();
|
|
|
+ if (!collectStore.getCollectModuleId('speaker')) {
|
|
|
+ Modal.warning({
|
|
|
+ title: '提示',
|
|
|
+ content: '您暂无权限采编口述人,请联系管理员。',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
goFormStatic(
|
|
|
i.formGlobalParams.villageId as number,
|
|
|
i.formGlobalParams.villageVolunteerId as number,
|