|
@@ -6,6 +6,7 @@ import type { PickerFieldProps } from "@/components/form/PickerField.vue";
|
|
|
import type { UploaderFieldProps } from "@/components/form/UploaderField.vue";
|
|
import type { UploaderFieldProps } from "@/components/form/UploaderField.vue";
|
|
|
import type { GroupForm, SingleForm } from "../forms";
|
|
import type { GroupForm, SingleForm } from "../forms";
|
|
|
import { villageCommonContent } from "./common";
|
|
import { villageCommonContent } from "./common";
|
|
|
|
|
+import type { SpEditorProps } from "@/common/components/form/RichTextEditor.vue";
|
|
|
|
|
|
|
|
export const villageInfoTravelGuideForm : SingleForm = [CommonInfoModel, (r) => ({
|
|
export const villageInfoTravelGuideForm : SingleForm = [CommonInfoModel, (r) => ({
|
|
|
formItems: [
|
|
formItems: [
|
|
@@ -451,8 +452,27 @@ export const villageInfoRouteForm : SingleForm = [CommonInfoModel, (r) => ({
|
|
|
additionalProps: {
|
|
additionalProps: {
|
|
|
placeholder: '请输入描述',
|
|
placeholder: '请输入描述',
|
|
|
maxLength: 5000,
|
|
maxLength: 5000,
|
|
|
- showWordLimit: true,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ enableAi: true,
|
|
|
|
|
+ extraProps: {
|
|
|
|
|
+ get() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ title: r.value.getValueByPath('name'),
|
|
|
|
|
+ images: r.value.getValueByPath('images'),
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ update(extraProps) {
|
|
|
|
|
+ r.value.setValueByPath('images', extraProps.images);
|
|
|
|
|
+ r.value.setValueByPath('name', extraProps.title);
|
|
|
|
|
+ },
|
|
|
|
|
+ storageInfo: () => ({
|
|
|
|
|
+ villageId: r.value.getGlobalParams().villageId,
|
|
|
|
|
+ uploadPath: 'xiangyuan/environment',
|
|
|
|
|
+ }),
|
|
|
|
|
+ },
|
|
|
|
|
+ getExtraAiInfo() {
|
|
|
|
|
+ return [ '用户正在栏目《游览路线》,编辑游览描述']
|
|
|
|
|
+ },
|
|
|
|
|
+ } as SpEditorProps,
|
|
|
rules: [{
|
|
rules: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
message: '请输入描述',
|
|
message: '请输入描述',
|