lijj преди 2 години
родител
ревизия
ce473bf823

+ 3 - 0
admin/src/main/java/org/springblade/modules/ycwh/entity/FamousSnacksEntity.java

@@ -57,6 +57,9 @@ public class FamousSnacksEntity extends BaseEntity {
 	 */
 	@ApiModelProperty(value = "名称")
 	private String name;
+
+	@ApiModelProperty(value = "所属菜系")
+	private String cuisineCode;
 	/**
 	 * 副标题
 	 */

+ 4 - 0
admin/src/main/java/org/springblade/modules/ycwh/entity/FamousStoreEntity.java

@@ -57,6 +57,10 @@ public class FamousStoreEntity extends BaseEntity {
 	 */
 	@ApiModelProperty(value = "名称")
 	private String name;
+
+	@ApiModelProperty(value = "所属菜系")
+	private String cuisineCode;
+	
 	/**
 	 * 副标题
 	 */

+ 10 - 0
admin_ui/src/option/ycwh/famousSnacks.js

@@ -97,6 +97,16 @@ export default {
       type: "input",
       search: true
     },
+    {
+      label: "所属菜系",
+      prop: "cuisineCode",
+      dicUrl: "/blade-system/dict-biz/dictionary?code=cuisine",
+      props: {
+        label: 'dictValue',
+        value: 'dictKey'
+      },
+      search: true
+    },
     {
       label: "副标题",
       prop: "subTitle",

+ 10 - 0
admin_ui/src/option/ycwh/famousStore.js

@@ -97,6 +97,16 @@ export default {
       type: "input",
       search: true
     },
+    {
+      label: "所属菜系",
+      prop: "cuisineCode",
+      dicUrl: "/blade-system/dict-biz/dictionary?code=cuisine",
+      props: {
+        label: 'dictValue',
+        value: 'dictKey'
+      },
+      search: true
+    },
     {
       label: "副标题",
       prop: "subTitle",

+ 19 - 0
admin_ui/src/views/ycwh/components/editFamousSnacks/index.vue

@@ -3,6 +3,13 @@
     <el-form-item label="名称" prop="name">
       <el-input v-model="form.name" maxlength="80" show-word-limit />
     </el-form-item>
+    <el-form-item label="所属菜系" prop="cuisineCode">
+      <div style="display: flex;">
+        <el-select v-model="form.cuisineCode" placeholder="请选择所属菜系">
+          <el-option v-for="item in cuisineList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+        </el-select>
+      </div>
+    </el-form-item>
     <el-form-item label="所属地区" prop="regionId">
       <div style="display: flex;">
         <el-select v-model="form.regionId" placeholder="请选择所属区域">
@@ -76,6 +83,7 @@
     uploadFile
   } from "@/api/oss/oss";
   import { getLazyTree } from "@/api/base/region";
+  import { getDictionary } from "@/api/system/dictbiz";
   //
   export default {
     props: ['id'],
@@ -92,6 +100,7 @@
       return {
         loading: false,
         //
+        cuisineList: [],
         regionList: [],
         //
         attachmentList: [],
@@ -103,6 +112,8 @@
           content: '',
           // 标签
           videos: null,
+          cuisineCode: '',
+          regionId: '',
           address: '',
           latitude: '',
           longitude: '',
@@ -199,6 +210,7 @@
       if(this.id && this.id > 0) {
         this.getDetail(this.id)
       }
+      this.getCuisineList();
       this.getRegionList();
     },
     watch: {
@@ -211,6 +223,13 @@
       },
     },
     methods: {
+      getCuisineList() {
+        getDictionary({
+          code: "cuisine"
+        }).then(res => {
+          this.cuisineList = res.data.data || [];
+        })
+      },
       getRegionList() {
         getLazyTree("44").then(res => {
           this.regionList = res.data.data || [];

+ 24 - 5
admin_ui/src/views/ycwh/components/editFamousStore/index.vue

@@ -3,6 +3,13 @@
     <el-form-item label="名称" prop="name">
       <el-input v-model="form.name" maxlength="80" show-word-limit />
     </el-form-item>
+    <el-form-item label="所属菜系" prop="cuisineCode">
+      <div style="display: flex;">
+        <el-select v-model="form.cuisineCode" placeholder="请选择所属菜系">
+          <el-option v-for="item in cuisineList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+        </el-select>
+      </div>
+    </el-form-item>
     <el-form-item label="所属地区" prop="regionId">
       <div style="display: flex;">
         <el-select v-model="form.regionId" placeholder="请选择所属区域">
@@ -76,6 +83,7 @@
     uploadFile
   } from "@/api/oss/oss";
   import { getLazyTree } from "@/api/base/region";
+  import { getDictionary } from "@/api/system/dictbiz";
   //
   export default {
     props: ['id'],
@@ -92,6 +100,7 @@
       return {
         loading: false,
         //
+        cuisineList: [],
         regionList: [],
         //
         attachmentList: [],
@@ -103,6 +112,8 @@
           content: '',
           // 标签
           videos: null,
+          cuisineCode: '',
+          regionId: '',
           address: '',
           latitude: '',
           longitude: '',
@@ -151,11 +162,11 @@
             message: '请选择所属区域',
             trigger: 'blur'
           }],
-//        address: [{
-//          required: true,
-//          message: '请输入详细地址',
-//          trigger: 'blur'
-//        }],
+          //        address: [{
+          //          required: true,
+          //          message: '请输入详细地址',
+          //          trigger: 'blur'
+          //        }],
         },
         // 富文本相关配置
         editorOptions: {
@@ -199,6 +210,7 @@
       if(this.id && this.id > 0) {
         this.getDetail(this.id)
       }
+      this.getCuisineList();
       this.getRegionList();
     },
     watch: {
@@ -211,6 +223,13 @@
       },
     },
     methods: {
+      getCuisineList() {
+        getDictionary({
+          code: "cuisine"
+        }).then(res => {
+          this.cuisineList = res.data.data || [];
+        })
+      },
       getRegionList() {
         getLazyTree("44").then(res => {
           this.regionList = res.data.data || [];