Browse Source

ShowList管理优化

zhangqiang 9 months ago
parent
commit
9216224989
14 changed files with 188 additions and 535 deletions
  1. 9 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/controller/OkkiShowlistController.java
  2. 3 3
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/param/OverviewParam.java
  3. 2 2
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/param/ProductParam.java
  4. 8 8
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/param/PushShowlistParam.java
  5. 4 3
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/service/IOkkiShowlistService.java
  6. 36 120
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/service/impl/OkkiShowlistServiceImpl.java
  7. 11 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/vo/ProductListDataVO.java
  8. 13 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/vo/ProductListVO.java
  9. 9 13
      jeecgboot-vue3/src/views/okki/showlist/OkkiShowlist.api.ts
  10. 61 320
      jeecgboot-vue3/src/views/okki/showlist/OkkiShowlist.data.ts
  11. 25 3
      jeecgboot-vue3/src/views/okki/showlist/OkkiShowlistList.vue
  12. 4 29
      jeecgboot-vue3/src/views/okki/showlist/components/OkkiShowlistForm.vue
  13. 3 32
      jeecgboot-vue3/src/views/okki/showlist/components/OkkiShowlistModal.vue
  14. 0 2
      jeecgboot-vue3/src/views/okki/site/OkkiSite.data.ts

+ 9 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/controller/OkkiShowlistController.java

@@ -16,6 +16,8 @@ import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.okki.showlist.entity.*;
 import org.jeecg.modules.okki.showlist.service.*;
 import org.jeecg.modules.okki.showlist.vo.OkkiShowlistPage;
+import org.jeecg.modules.okki.showlist.vo.ProductListDataVO;
+import org.jeecg.modules.okki.showlist.vo.ProductListVO;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -116,6 +118,7 @@ public class OkkiShowlistController {
 	 public Result<String> edit(@RequestBody OkkiShowlistPage okkiShowlistPage) {
 		 OkkiShowlist okkiShowlist = new OkkiShowlist();
 		 BeanUtils.copyProperties(okkiShowlistPage, okkiShowlist);
+		 okkiShowlistPage.setStatus(0);
 		 OkkiShowlist okkiShowlistEntity = okkiShowlistService.getById(okkiShowlist.getId());
 		 if(okkiShowlistEntity==null) {
 			 return Result.error("未找到对应数据");
@@ -377,4 +380,10 @@ public class OkkiShowlistController {
 			 return Result.error("操作失败");
 		 }
 	 }
+
+	 @GetMapping(value = "productList")
+	 public Result<ProductListVO> productList(@RequestParam String siteId) throws Exception {
+		 final ProductListVO productList = okkiShowlistService.getProductList(siteId);
+		 return Result.OK(productList);
+	 }
 }

+ 3 - 3
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/param/OverviewParam.java

@@ -11,7 +11,7 @@ public class OverviewParam {
 
     private String content;
 
-    private String pic;
-
-    private ButtonParam button;
+//    private String pic;
+//
+//    private ButtonParam button;
 }

+ 2 - 2
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/param/ProductParam.java

@@ -9,11 +9,11 @@ public class ProductParam {
 
     private String title;
 
-    private String subtitles;
+//    private String subtitles;
 
     private String[] pid_list;
 
-    private Integer sid;
+//    private Integer sid;
 
 //    public Optional<Integer> getSid() {
 //        return Optional.ofNullable(sid);

+ 8 - 8
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/param/PushShowlistParam.java

@@ -12,7 +12,7 @@ public class PushShowlistParam {
 
     private String url;
 
-    private String json_ld;
+//    private String json_ld;
 
     private OverviewParam overview;
 
@@ -22,25 +22,25 @@ public class PushShowlistParam {
 
     private List<AdvantageParam> advantage;
 
-    private ProductParam recommended_products;
+//    private ProductParam recommended_products;
 
     private KeywordsParam keywords;
 
-    private KeywordSeriesParam keyword_series;
+//    private KeywordSeriesParam keyword_series;
 
-    private ReviewParam review;
+//    private ReviewParam review;
 
     private FaqParam faq;
 
-    private BlogParam blog;
+//    private BlogParam blog;
 
     private TdkParam tdk;
 
-    private Integer inquiry_type;
+//    private Integer inquiry_type;
 
-    private Integer report_score;
+//    private Integer report_score;
 
-    private String report_link;
+//    private String report_link;
 
 
 }

+ 4 - 3
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/service/IOkkiShowlistService.java

@@ -2,16 +2,15 @@ package org.jeecg.modules.okki.showlist.service;
 
 import org.jeecg.modules.okki.showlist.entity.OkkiOverview;
 import org.jeecg.modules.okki.showlist.entity.OkkiProductList;
-import org.jeecg.modules.okki.showlist.entity.OkkiHighlight;
 import org.jeecg.modules.okki.showlist.entity.OkkiAdvantage;
 import org.jeecg.modules.okki.showlist.entity.OkkiRecommendedProducts;
 import org.jeecg.modules.okki.showlist.entity.OkkiKeywords;
-import org.jeecg.modules.okki.showlist.entity.OkkiKeywordsSeries;
-import org.jeecg.modules.okki.showlist.entity.OkkiReview;
 import org.jeecg.modules.okki.showlist.entity.OkkiFaq;
 import org.jeecg.modules.okki.showlist.entity.OkkiShowlistBlog;
 import org.jeecg.modules.okki.showlist.entity.OkkiShowlist;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.okki.showlist.vo.ProductListVO;
+
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
@@ -67,4 +66,6 @@ public interface IOkkiShowlistService extends IService<OkkiShowlist> {
 	public void delBatchMain (Collection<? extends Serializable> idList);
 
 	boolean changeStatus(OkkiShowlist okkiShowlist, String domain);
+
+	ProductListVO getProductList(String siteId) throws Exception;
 }

+ 36 - 120
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/service/impl/OkkiShowlistServiceImpl.java

@@ -21,9 +21,8 @@ import org.jeecg.modules.okki.showlist.mapper.OkkiFaqMapper;
 import org.jeecg.modules.okki.showlist.mapper.OkkiShowlistBlogMapper;
 import org.jeecg.modules.okki.showlist.mapper.OkkiShowlistMapper;
 import org.jeecg.modules.okki.showlist.service.IOkkiShowlistService;
-import org.jeecg.modules.okki.showlist.entity.OkkiHighlight;
-import org.jeecg.modules.okki.showlist.entity.OkkiReview;
 import org.jeecg.modules.okki.showlist.param.*;
+import org.jeecg.modules.okki.showlist.vo.ProductListVO;
 import org.jeecg.modules.okki.utils.HttpClientUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -72,6 +71,9 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public void saveMain(OkkiShowlist okkiShowlist, List<OkkiOverview> okkiOverviewList,List<OkkiProductList> okkiProductListList,List<OkkiAdvantage> okkiAdvantageList,List<OkkiRecommendedProducts> okkiRecommendedProductsList,List<OkkiKeywords> okkiKeywordsList,List<OkkiFaq> okkiFaqList,List<OkkiShowlistBlog> okkiShowlistBlogList) {
+		if ("".equals(okkiShowlist.getUrl()) || okkiShowlist.getUrl() == null) {
+			okkiShowlist.setUrl(okkiOverviewList.get(0).getTitle().replaceAll(" +", ""));
+		}
 		okkiShowlistMapper.insert(okkiShowlist);
 		if(okkiOverviewList!=null && okkiOverviewList.size()>0) {
 			for(OkkiOverview entity:okkiOverviewList) {
@@ -225,17 +227,11 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 		OkkiShowlist okkiShowlist = okkiShowlistMapper.selectById(id);
 		List<OkkiOverview> okkiOverviews = okkiOverviewMapper.selectByMainId(id);
 		List<OkkiProductList> okkiProductLists = okkiProductListMapper.selectByMainId(id);
-//		List<OkkiHighlight> okkiHighlights = okkiHighlightMapper.selectByMainId(id);
 		List<OkkiAdvantage> okkiAdvantages = okkiAdvantageMapper.selectByMainId(id);
-		List<OkkiRecommendedProducts> okkiRecommendedProducts = okkiRecommendedProductsMapper.selectByMainId(id);
 		List<OkkiKeywords> okkiKeywords = okkiKeywordsMapper.selectByMainId(id);
-//		List<OkkiKeywordsSeries> okkiKeywordsSeries = okkiKeywordsSeriesMapper.selectByMainId(id);
-//		List<OkkiReview> okkiReviews = okkiReviewMapper.selectByMainId(id);
 		List<OkkiFaq> okkiFaqs = okkiFaqMapper.selectByMainId(id);
-		List<OkkiShowlistBlog> okkiShowlistBlogs = okkiShowlistBlogMapper.selectByMainId(id);
 		// 组装传入参数
 		try {
-
 			String imageBaseUrl = domain + "/shop-api/sys/common/static/";
 			System.out.println(imageBaseUrl);
 //			 将内容图片和其他图片地址通过接口上传到小满
@@ -259,59 +255,23 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 			String queryStr = HttpClientUtils.buildQueryString(query);
 			pushShowlistParam.setShowlist_id(id);
 			pushShowlistParam.setUrl(okkiShowlist.getUrl());
-			pushShowlistParam.setJson_ld(okkiShowlist.getJsonLd());
 			// overview
 			OverviewParam overviewParam = new OverviewParam();
-			overviewParam.setOverview_type(okkiOverviews.get(0).getOverviewType());
+			overviewParam.setOverview_type(1);
 			overviewParam.setTitle(okkiOverviews.get(0).getTitle());
 			overviewParam.setContent(okkiOverviews.get(0).getContent());
-			overviewParam.setPic(okkiOverviews.get(0).getPic());
-			ButtonParam buttonParam = new ButtonParam();
-			buttonParam.setName(okkiOverviews.get(0).getButtonName());
-			buttonParam.setUrl(okkiOverviews.get(0).getButtonUrl());
-			overviewParam.setButton(buttonParam);
 			pushShowlistParam.setOverview(overviewParam);
 			// product_list
 			ProductParam productListParam = new ProductParam();
-			productListParam.setProduct_list_type(okkiProductLists.get(0).getProductListType());
+			productListParam.setProduct_list_type(1);
 			productListParam.setTitle(okkiProductLists.get(0).getTitle());
-			productListParam.setSubtitles(okkiProductLists.get(0).getSubtitles());
 			// 将字符串转数组
 			String pidList = okkiProductLists.get(0).getPidList();
 			if (!"".equals(pidList) && pidList != null) {
 				String[] split = pidList.split(",");
 				productListParam.setPid_list(split);
 			}
-			if (okkiProductLists.get(0).getSid() != null) {
-				productListParam.setSid(okkiProductLists.get(0).getSid());
-			}else {
-				productListParam.setSid(0);
-			}
 			pushShowlistParam.setProduct_list(productListParam);
-			// highlight
-			HighlightParam highlightParam = new HighlightParam();
-//			highlightParam.setTitle(okkiShowlist.getHighlightTitle());
-//			highlightParam.setContent(okkiShowlist.getHighlightContent());
-			highlightParam.setTitle("Title");
-			highlightParam.setContent("Content");
-			LayoutParam highlightLayoutParam = new LayoutParam();
-			highlightLayoutParam.setAlignment(okkiShowlist.getHighlightLayoutAlignment());
-			highlightLayoutParam.setColumns_per_row(okkiShowlist.getHighlightLayoutColumnsPerRow());
-			highlightParam.setLayout(highlightLayoutParam);
-			List<BlockParam> highlightBlockParams = new ArrayList<>();
-//			for (OkkiHighlight okkiHighlight : okkiHighlights) {
-//				BlockParam blockParam = new BlockParam();
-//				blockParam.setTitle(okkiHighlight.getBlockTitle());
-//				blockParam.setContent(okkiHighlight.getBlockContent());
-//				blockParam.setPic(okkiHighlight.getBlockPic());
-//				// button
-//				ButtonParam highlightBlockButtonParam = new ButtonParam();
-//				highlightBlockButtonParam.setName(okkiHighlight.getButtonName());
-//				highlightBlockButtonParam.setUrl(okkiHighlight.getButtonUrl());
-//				blockParam.setButton(highlightBlockButtonParam);
-//				highlightBlockParams.add(blockParam);
-//			}
-			highlightParam.setBlock(highlightBlockParams);
 			// advantage
 			if (okkiAdvantages.size()>0) {
 				for (OkkiAdvantage okkiAdvantage : okkiAdvantages) {
@@ -326,43 +286,7 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 			AdvantageParam advantageParam = new AdvantageParam();
 			advantageParam.setTitle(okkiShowlist.getAdvantageTitle());
 			advantageParam.setContent(okkiShowlist.getAdvantageContent());
-			LayoutParam advantageLayoutParam = new LayoutParam();
-			advantageLayoutParam.setAlignment(okkiShowlist.getAdvantageLayoutAlignment());
-			advantageLayoutParam.setColumns_per_row(okkiShowlist.getAdvantageLayoutColumnsPerRow());
-			advantageParam.setLayout(advantageLayoutParam);
-			List<BlockParam> advantageBlockParams = new ArrayList<>();
-			for (OkkiAdvantage okkiAdvantage : okkiAdvantages) {
-				BlockParam blockParam = new BlockParam();
-				blockParam.setTitle(okkiAdvantage.getBlockTitle());
-				blockParam.setContent(okkiAdvantage.getBlockContent());
-				blockParam.setPic(okkiAdvantage.getBlockPic());
-				// button
-				ButtonParam  advantageBlockButtonParam = new ButtonParam();
-				advantageBlockButtonParam.setName(okkiAdvantage.getButtonName());
-				advantageBlockButtonParam.setUrl(okkiAdvantage.getButtonUrl());
-				blockParam.setButton(advantageBlockButtonParam);
-				advantageBlockParams.add(blockParam);
-			}
-			advantageParam.setBlock(advantageBlockParams);
-			advantageParams.add(advantageParam);
 			pushShowlistParam.setAdvantage(advantageParams);
-			// recommended_products
-			ProductParam recommendedProductParam = new ProductParam();
-			recommendedProductParam.setProduct_list_type(okkiRecommendedProducts.get(0).getProductListType());
-			recommendedProductParam.setTitle(okkiRecommendedProducts.get(0).getTitle());
-			recommendedProductParam.setSubtitles(okkiRecommendedProducts.get(0).getSubtitles());
-			if (okkiRecommendedProducts.get(0).getSid() != null) {
-				recommendedProductParam.setSid(okkiRecommendedProducts.get(0).getSid());
-			}else {
-				recommendedProductParam.setSid(0);
-			}
-			// 将字符串转数组
-			String pidList1 = okkiRecommendedProducts.get(0).getPidList();
-			if (!"".equals(pidList1) && pidList1 != null) {
-				String[] split1 = pidList1.split(",");
-				recommendedProductParam.setPid_list(split1);
-			}
-			pushShowlistParam.setRecommended_products(recommendedProductParam);
 			// keywords
 			KeywordsParam keywordsParam = new KeywordsParam();
 			keywordsParam.setTitle(okkiShowlist.getKeywordsTitle());
@@ -375,26 +299,6 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 			}
 			keywordsParam.setKeyword_list(keywordListParams);
 			pushShowlistParam.setKeywords(keywordsParam);
-			//TODO:: keyword_series
-
-			// review
-			ReviewParam reviewParam = new ReviewParam();
-			reviewParam.setTitle(okkiShowlist.getReviewTitle());
-			reviewParam.setSubtitles(okkiShowlist.getReviewSubtitles());
-			LayoutParam reviewLayoutParam = new LayoutParam();
-			reviewLayoutParam.setAlignment(okkiShowlist.getReviewLayoutAlignment());
-			reviewLayoutParam.setColumns_per_row(okkiShowlist.getReviewLayoutColumnsPerRow());
-			reviewParam.setLayout(reviewLayoutParam);
-			ArrayList<ReviewListParam> reviewListParams = new ArrayList<>();
-//			for (OkkiReview okkiReview : okkiReviews) {
-//				ReviewListParam reviewListParam = new ReviewListParam();
-//				reviewListParam.setContent(okkiReview.getReviewListContent());
-//				reviewListParam.setAvatar_url(okkiReview.getReviewListAvatarUrl());
-//				reviewListParam.setName(okkiReview.getReviewListName());
-//				reviewListParams.add(reviewListParam);
-//			}
-			reviewParam.setReview_list(reviewListParams);
-			pushShowlistParam.setReview(reviewParam);
 			// faq
 			FaqParam faqParam = new FaqParam();
 			faqParam.setTitle(okkiShowlist.getFaqTitle());
@@ -408,26 +312,11 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 			}
 			faqParam.setFaq_list(faqListParams);
 			pushShowlistParam.setFaq(faqParam);
-			// blog
-			BlogParam blogParam = new BlogParam();
-			blogParam.setTitle(okkiShowlistBlogs.get(0).getTitle());
-			LayoutParam blogLayoutParam = new LayoutParam();
-			blogLayoutParam.setAlignment(okkiShowlistBlogs.get(0).getLayoutAlignment());
-			blogLayoutParam.setColumns_per_row(okkiShowlistBlogs.get(0).getLayoutColumnsPerRow());
-			blogParam.setLayout(blogLayoutParam);
-			// 将字符串转数组
-			String blogList = okkiShowlistBlogs.get(0).getBlogList();
-			if (!"".equals(blogList) && blogList != null) {
-				String[] blogSplit = blogList.split(",");
-				blogParam.setBlog_list(blogSplit);
-			}
-			pushShowlistParam.setBlog(blogParam);
-			pushShowlistParam.setInquiry_type(okkiShowlist.getInquiryType());
 			// tdk
 			TdkParam tdkParam = new TdkParam();
-			tdkParam.setTitle(okkiShowlist.getTdkTitle());
-			tdkParam.setDescription(okkiShowlist.getTdkDescription());
-			tdkParam.setKeywords(okkiShowlist.getTdkKeywords());
+			tdkParam.setTitle(okkiOverviews.get(0).getTitle());
+			tdkParam.setDescription(okkiOverviews.get(0).getContent());
+			tdkParam.setKeywords(okkiShowlist.getKeywordsTitle());
 			pushShowlistParam.setTdk(tdkParam);
 			// 组装完成
 			String body = JSON.toJSONString(pushShowlistParam);
@@ -455,4 +344,31 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 		}
 	}
 
+	@Override
+	public ProductListVO getProductList(String siteId) throws Exception{
+		// 请求okki平台接口
+		Map<String, String> query = new TreeMap<>();
+		query.put("sign_method", "hmac-md5");
+		query.put("timestamp", String.valueOf(System.currentTimeMillis()));
+		query.put("site_id", siteId);
+		query.put("method", "search_content");
+		String queryStr = HttpClientUtils.buildQueryString(query);
+		final HashMap<String, String> map = new HashMap<>();
+		map.put("type", "product");
+		String body = JSON.toJSONString(map);
+		String signStr = queryStr + body;
+		query.put("signature", HttpClientUtils.generateHmacMD5(signStr, CLIENT_SECRET));
+		String okkiUrl = URL + "?" + HttpClientUtils.buildQueryString(query);
+		log.info("url:" + okkiUrl + ",body:" + body);
+		String res = HttpClientUtils.doPost(okkiUrl, body);
+		log.info(res);
+		JSONObject jsonObject= JSONObject.parseObject(res);
+		if (jsonObject.get("code").equals(0)) {
+			final Object data = jsonObject.get("data");
+			final ProductListVO productListVO = JSONObject.parseObject(data.toString(), ProductListVO.class);
+			return productListVO;
+		}else {
+			throw new RuntimeException(jsonObject.get("msg").toString());
+		}
+	}
 }

+ 11 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/vo/ProductListDataVO.java

@@ -0,0 +1,11 @@
+package org.jeecg.modules.okki.showlist.vo;
+
+import lombok.Data;
+
+@Data
+public class ProductListDataVO {
+
+    private Integer cid;
+
+    private String c_title;
+}

+ 13 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/vo/ProductListVO.java

@@ -0,0 +1,13 @@
+package org.jeecg.modules.okki.showlist.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ProductListVO {
+
+    private Integer count;
+
+    private List<ProductListDataVO> list;
+}

+ 9 - 13
jeecgboot-vue3/src/views/okki/showlist/OkkiShowlist.api.ts

@@ -7,6 +7,7 @@ enum Api {
   list = '/showlist/okkiShowlist/list',
   save='/showlist/okkiShowlist/add',
   edit='/showlist/okkiShowlist/edit',
+  changeStatus='/showlist/okkiShowlist/status',
   deleteOne = '/showlist/okkiShowlist/delete',
   deleteBatch = '/showlist/okkiShowlist/deleteBatch',
   importExcel = '/showlist/okkiShowlist/importExcel',
@@ -14,10 +15,8 @@ enum Api {
   okkiOverviewList = '/showlist/okkiShowlist/queryOkkiOverviewByMainId',
   okkiProductListList = '/showlist/okkiShowlist/queryOkkiProductListByMainId',
   okkiAdvantageList = '/showlist/okkiShowlist/queryOkkiAdvantageByMainId',
-  okkiRecommendedProductsList = '/showlist/okkiShowlist/queryOkkiRecommendedProductsByMainId',
   okkiKeywordsList = '/showlist/okkiShowlist/queryOkkiKeywordsByMainId',
   okkiFaqList = '/showlist/okkiShowlist/queryOkkiFaqByMainId',
-  okkiShowlistBlogList = '/showlist/okkiShowlist/queryOkkiShowlistBlogByMainId',
 }
 /**
  * 导出api
@@ -48,11 +47,6 @@ export const okkiAdvantageList = Api.okkiAdvantageList;
  * 查询子表数据
  * @param params
  */
-export const okkiRecommendedProductsList = Api.okkiRecommendedProductsList;
-/**
- * 查询子表数据
- * @param params
- */
 export const okkiKeywordsList = Api.okkiKeywordsList;
 /**
  * 查询子表数据
@@ -60,17 +54,19 @@ export const okkiKeywordsList = Api.okkiKeywordsList;
  */
 export const okkiFaqList = Api.okkiFaqList;
 /**
- * 查询子表数据
- * @param params
- */
-export const okkiShowlistBlogList = Api.okkiShowlistBlogList;
-/**
  * 列表接口
  * @param params
  */
 export const list = (params) =>
   defHttp.get({url: Api.list, params});
-
+/**
+ * 同步给小满
+ */
+export const changeStatus = (params,handleSuccess) => {
+  return defHttp.post({url: Api.changeStatus, params}, {joinParamsToUrl: true}).then(() => {
+    handleSuccess();
+  });
+}
 /**
  * 删除单个
  */

+ 61 - 320
jeecgboot-vue3/src/views/okki/showlist/OkkiShowlist.data.ts

@@ -15,26 +15,21 @@ export const columns: BasicColumn[] = [
     align:"center",
     dataIndex: 'url'
    },
-   // {
-   //  title: '优势标题',
-   //  align:"center",
-   //  dataIndex: 'advantageTitle'
-   // },
-   // {
-   //  title: '关键词标题',
-   //  align:"center",
-   //  dataIndex: 'keywordsTitle'
-   // },
-   // {
-   //  title: '关键词系列标题',
-   //  align:"center",
-   //  dataIndex: 'keywordsSeriesTitle'
-   // },
-   // {
-   //  title: 'faq标题',
-   //  align:"center",
-   //  dataIndex: 'faqTitle'
-   // },
+   {
+    title: '优势标题',
+    align:"center",
+    dataIndex: 'advantageTitle'
+   },
+   {
+    title: '关键词标题',
+    align:"center",
+    dataIndex: 'keywordsTitle'
+   },
+   {
+    title: 'faq标题',
+    align:"center",
+    dataIndex: 'faqTitle'
+   },
    {
     title: '同步状态',
     align:"center",
@@ -74,193 +69,47 @@ export const formSchema: FormSchema[] = [
     field: 'url',
     component: 'Input',
   },
-  // {
-  //   label: '优势标题',
-  //   field: 'advantageTitle',
-  //   component: 'Input',
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入优势标题!'},
-  //         ];
-  //    },
-  // },
-  // {
-  //   label: '优势内容',
-  //   field: 'advantageContent',
-  //   component: 'JEditor',
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入优势内容!'},
-  //         ];
-  //    },
-  // },
-  // {
-  //   label: '优势布局文字对齐方式',
-  //   field: 'advantageLayoutAlignment',
-  //   component: 'JDictSelectTag',
-  //   componentProps:{
-  //       dictCode:"layout_alignment"
-  //    },
-  // },
-  // {
-  //   label: '优势布局每行列数',
-  //   field: 'advantageLayoutColumnsPerRow',
-  //   component: 'JDictSelectTag',
-  //   componentProps:{
-  //       dictCode:"layout_columns_per_row"
-  //    },
-  // },
-  // {
-  //   label: '关键词标题',
-  //   field: 'keywordsTitle',
-  //   component: 'Input',
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入关键词标题!'},
-  //         ];
-  //    },
-  // },
-  // {
-  //   label: '关键词系列标题',
-  //   field: 'keywordsSeriesTitle',
-  //   component: 'Input',
-  // },
-  // {
-  //   label: '关键词系列排版结构',
-  //   field: 'keywordsSeriesLayoutType',
-  //   component: 'JDictSelectTag',
-  //   componentProps:{
-  //       dictCode:"layout_type"
-  //    },
-  // },
-  // {
-  //   label: 'faq标题',
-  //   field: 'faqTitle',
-  //   component: 'Input',
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入faq标题!'},
-  //         ];
-  //    },
-  // },
-	// TODO 主键隐藏字段,目前写死为ID
-	{
-	  label: '',
-	  field: 'id',
-	  component: 'Input',
-	  show: false
-	},
-];
-//子表单数据
-export const okkiOverviewFormSchema: FormSchema[] = [
-  // {
-  //   label: '概览类型',
-  //   field: 'overviewType',
-  //   component: 'JDictSelectTag',
-  //   componentProps:{
-  //       dictCode:"overview_type"
-  //    },
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入概览类型!'},
-  //         ];
-  //    },
-  // },
   {
-    label: '概览标题',
-    field: 'title',
+    label: '优势标题',
+    field: 'advantageTitle',
     component: 'Input',
     dynamicRules: ({model,schema}) => {
           return [
-                 { required: true, message: '请输入概览标题!'},
+                 { required: true, message: '请输入优势标题!'},
           ];
      },
   },
   {
-    label: '概览内容',
-    field: 'content',
+    label: '优势内容',
+    field: 'advantageContent',
     component: 'JEditor',
     dynamicRules: ({model,schema}) => {
           return [
-                 { required: true, message: '请输入概览内容!'},
+                 { required: true, message: '请输入优势内容!'},
           ];
      },
   },
-  // {
-  //   label: '概览图片链接',
-  //   field: 'pic',
-  //    component: 'JImageUpload',
-  //    componentProps:{
-  //     },
-  // },
-  // {
-  //   label: '按钮文字',
-  //   field: 'buttonName',
-  //   component: 'Input',
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入按钮文字!'},
-  //         ];
-  //    },
-  // },
-  // {
-  //   label: '按钮跳转链接',
-  //   field: 'buttonUrl',
-  //   component: 'Input',
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入按钮跳转链接!'},
-  //         ];
-  //    },
-  // },
-	{
-	  label: '',
-	  field: 'id',
-	  component: 'Input',
-	  show: false
-	},
-];
-export const okkiFaqFormSchema: FormSchema[] = [
   {
-    label: 'faq标题',
-    field: 'title',
+    label: '关键词标题',
+    field: 'keywordsTitle',
     component: 'Input',
+    dynamicRules: ({model,schema}) => {
+          return [
+                 { required: true, message: '请输入关键词标题!'},
+          ];
+     },
   },
-];
-export const okkiProductListFormSchema: FormSchema[] = [
-  // {
-  //   label: '产品列表类型',
-  //   field: 'productListType',
-  //   component: 'JDictSelectTag',
-  //   componentProps:{
-  //       dictCode:"product_list_type"
-  //    },
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入产品列表类型!'},
-  //         ];
-  //    },
-  // },
   {
-    label: '标题',
-    field: 'title',
+    label: 'faq标题',
+    field: 'faqTitle',
     component: 'Input',
-  },
-  {
-    label: '商品列表',
-    field: 'pidList',
-    component: 'JSearchSelect',
     dynamicRules: ({model,schema}) => {
           return [
-                 { required: true, message: '请选择商品!'},
+                 { required: true, message: '请输入faq标题!'},
           ];
      },
   },
-  // {
-  //   label: '商品分类sid',
-  //   field: 'sid',
-  //   component: 'InputNumber',
-  // },
+	// TODO 主键隐藏字段,目前写死为ID
 	{
 	  label: '',
 	  field: 'id',
@@ -268,81 +117,28 @@ export const okkiProductListFormSchema: FormSchema[] = [
 	  show: false
 	},
 ];
-export const okkiAdvantageListFormSchema: FormSchema[] = [
-  // {
-  //   label: '产品列表类型',
-  //   field: 'productListType',
-  //   component: 'JDictSelectTag',
-  //   componentProps:{
-  //       dictCode:"product_list_type"
-  //    },
-  //   dynamicRules: ({model,schema}) => {
-  //         return [
-  //                { required: true, message: '请输入产品列表类型!'},
-  //         ];
-  //    },
-  // },
+//子表单数据
+export const okkiOverviewFormSchema: FormSchema[] = [
   {
-    label: '优势标题',
-    field: 'advantage_title',
+    label: '概览标题',
+    field: 'title',
     component: 'Input',
-  },
-  {
-    label: '优势内容',
-    field: 'advantage_content',
-    component: 'JEditor',
     dynamicRules: ({model,schema}) => {
-      return [
-        { required: true, message: '请输入优势内容!'},
-      ];
-    },
-  },
-  // {
-  //   label: '商品分类sid',
-  //   field: 'sid',
-  //   component: 'InputNumber',
-  // },
-  {
-    label: '',
-    field: 'id',
-    component: 'Input',
-    show: false
-  },
-];
-export const okkiRecommendedProductsFormSchema: FormSchema[] = [
-  {
-    label: '类型',
-    field: 'productListType',
-    component: 'JDictSelectTag',
-    componentProps:{
-        dictCode:"product_list_type"
+          return [
+                 { required: true, message: '请输入概览标题!'},
+          ];
      },
   },
   {
-    label: '标题',
-    field: 'title',
-    component: 'Input',
-  },
-  // {
-  //   label: '字幕',
-  //   field: 'subtitles',
-  //   component: 'Input',
-  // },
-  {
-    label: '商品pid',
-    field: 'pidList',
-    component: 'Input',
+    label: '概览内容',
+    field: 'content',
+    component: 'JEditor',
     dynamicRules: ({model,schema}) => {
           return [
-                 { required: true, message: '请输入商品pid!'},
+                 { required: true, message: '请输入概览内容!'},
           ];
      },
   },
-  // {
-  //   label: '商品分类sid',
-  //   field: 'sid',
-  //   component: 'InputNumber',
-  // },
 	{
 	  label: '',
 	  field: 'id',
@@ -350,33 +146,25 @@ export const okkiRecommendedProductsFormSchema: FormSchema[] = [
 	  show: false
 	},
 ];
-export const okkiShowlistBlogFormSchema: FormSchema[] = [
+export const okkiProductListFormSchema: FormSchema[] = [
   {
     label: '标题',
     field: 'title',
     component: 'Input',
   },
   {
-    label: '文字对齐方式',
-    field: 'layoutAlignment',
-    component: 'JDictSelectTag',
+    label: '商品pid',
+    field: 'pidList',
+    component: 'Input',
     componentProps:{
-        dictCode:"layout_alignment"
+
      },
-  },
-  {
-    label: '每行列数',
-    field: 'layoutColumnsPerRow',
-    component: 'JDictSelectTag',
-    componentProps:{
-        dictCode:"layout_columns_per_row"
+    dynamicRules: ({model,schema}) => {
+          return [
+                 // { required: true, message: '请输入商品pid!'},
+          ];
      },
   },
-  {
-    label: '博客列表',
-    field: 'blogList',
-    component: 'Input',
-  },
 	{
 	  label: '',
 	  field: 'id',
@@ -421,22 +209,6 @@ export const okkiAdvantageColumns: JVxeColumn[] = [
           { required: true, message: '${title}不能为空' },
         ],
     },
-    // {
-    //   title: '按钮文字',
-    //   key: 'buttonName',
-    //   type: JVxeTypes.input,
-    //   width:"200px",
-    //   placeholder: '请输入${title}',
-    //   defaultValue:'',
-    // },
-    // {
-    //   title: '按钮跳转链接',
-    //   key: 'buttonUrl',
-    //   type: JVxeTypes.input,
-    //   width:"200px",
-    //   placeholder: '请输入${title}',
-    //   defaultValue:'',
-    // },
   ]
 export const okkiKeywordsColumns: JVxeColumn[] = [
     {
@@ -487,34 +259,26 @@ export const superQuerySchema = {
   siteId: {title: '站点id',order: 0,view: 'number', type: 'number',dictTable: "okki_site", dictCode: 'site_id', dictText: 'company_name',},
   url: {title: '页面路径',order: 1,view: 'text', type: 'string',},
   advantageTitle: {title: '优势标题',order: 2,view: 'text', type: 'string',},
-  keywordsTitle: {title: '关键词标题',order: 6,view: 'text', type: 'string',},
-  keywordsSeriesTitle: {title: '关键词系列标题',order: 7,view: 'text', type: 'string',},
-  faqTitle: {title: 'faq标题',order: 9,view: 'text', type: 'string',},
-  status: {title: '同步状态',order: 10,view: 'number', type: 'number',},
-  createTime: {title: '创建日期',order: 11,view: 'datetime', type: 'string',},
-  updateTime: {title: '更新日期',order: 12,view: 'datetime', type: 'string',},
+  keywordsTitle: {title: '关键词标题',order: 4,view: 'text', type: 'string',},
+  faqTitle: {title: 'faq标题',order: 5,view: 'text', type: 'string',},
+  status: {title: '同步状态',order: 6,view: 'number', type: 'number',},
+  createTime: {title: '创建日期',order: 7,view: 'datetime', type: 'string',},
+  updateTime: {title: '更新日期',order: 8,view: 'datetime', type: 'string',},
   //子表高级查询
   okkiOverview: {
     title: '概览',
     view: 'table',
     fields: {
-        overviewType: {title: '概览类型',order: 0,view: 'number', type: 'number',},
-        title: {title: '概览标题',order: 1,view: 'text', type: 'string',},
-        content: {title: '概览内容',order: 2,view: 'textarea', type: 'string',},
-        pic: {title: '概览图片链接',order: 3,view: 'image', type: 'string',},
-        buttonName: {title: '按钮文字',order: 4,view: 'text', type: 'string',},
-        buttonUrl: {title: '按钮跳转链接',order: 5,view: 'text', type: 'string',},
+        title: {title: '概览标题',order: 0,view: 'text', type: 'string',},
+        content: {title: '概览内容',order: 1,view: 'textarea', type: 'string',},
     }
   },
   okkiProductList: {
     title: '产品',
     view: 'table',
     fields: {
-        productListType: {title: '产品列表类型',order: 0,view: 'number', type: 'number',},
-        title: {title: '标题',order: 1,view: 'text', type: 'string',},
-        subtitles: {title: '字幕',order: 2,view: 'text', type: 'string',},
-        pidList: {title: '商品pid',order: 3,view: 'text', type: 'string',},
-        sid: {title: '商品分类sid',order: 4,view: 'number', type: 'number',},
+        title: {title: '标题',order: 0,view: 'text', type: 'string',},
+        pidList: {title: '商品pid',order: 1,view: 'list_multi', type: 'string',},
     }
   },
   okkiAdvantage: {
@@ -524,19 +288,6 @@ export const superQuerySchema = {
         blockTitle: {title: '组件标题',order: 0,view: 'text', type: 'string',},
         blockContent: {title: '组件内容',order: 1,view: 'textarea', type: 'string',},
         blockPic: {title: '组件图片',order: 2,view: 'image', type: 'string',},
-        // buttonName: {title: '按钮文字',order: 3,view: 'text', type: 'string',},
-        // buttonUrl: {title: '按钮跳转链接',order: 4,view: 'text', type: 'string',},
-    }
-  },
-  okkiRecommendedProducts: {
-    title: '推荐商品列表',
-    view: 'table',
-    fields: {
-        productListType: {title: '类型',order: 0,view: 'number', type: 'number',},
-        title: {title: '标题',order: 1,view: 'text', type: 'string',},
-        subtitles: {title: '字幕',order: 2,view: 'text', type: 'string',},
-        pidList: {title: '商品pid',order: 3,view: 'text', type: 'string',},
-        sid: {title: '商品分类sid',order: 4,view: 'number', type: 'number',},
     }
   },
   okkiKeywords: {
@@ -555,14 +306,4 @@ export const superQuerySchema = {
         answer: {title: '答案',order: 1,view: 'text', type: 'string',},
     }
   },
-  okkiShowlistBlog: {
-    title: '博客',
-    view: 'table',
-    fields: {
-        title: {title: '标题',order: 0,view: 'text', type: 'string',},
-        layoutAlignment: {title: '文字对齐方式',order: 1,view: 'number', type: 'number',},
-        layoutColumnsPerRow: {title: '每行列数',order: 2,view: 'number', type: 'number',},
-        blogList: {title: '博客列表',order: 3,view: 'text', type: 'string',},
-    }
-  },
 };

+ 25 - 3
jeecgboot-vue3/src/views/okki/showlist/OkkiShowlistList.vue

@@ -47,7 +47,14 @@
   import {useModal} from '/@/components/Modal';
   import OkkiShowlistModal from './components/OkkiShowlistModal.vue'
   import {columns, searchFormSchema, superQuerySchema} from './OkkiShowlist.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './OkkiShowlist.api';
+  import {
+    list,
+    deleteOne,
+    batchDelete,
+    getImportUrl,
+    getExportUrl,
+    changeStatus
+  } from './OkkiShowlist.api';
   import {downloadFile} from '/@/utils/common/renderUtils';
   import { useUserStore } from '/@/store/modules/user';
   const queryParam = reactive<any>({});
@@ -134,6 +141,12 @@
        showFooter: false,
      });
    }
+  /**
+   * 同步给小满
+   */
+  async function handleChangeStatus(record) {
+    await changeStatus({id: record.id}, handleSuccess);
+  }
    /**
     * 删除事件
     */
@@ -173,7 +186,16 @@
       {
         label: '详情',
         onClick: handleDetail.bind(null, record),
-      }, {
+      },
+      {
+        label: '同步给小满',
+        popConfirm: {
+          title: '是否确认同步给小满',
+          confirm: handleChangeStatus.bind(null, record),
+          placement: 'topLeft',
+        }
+      },
+      {
         label: '删除',
         popConfirm: {
           title: '是否确认删除',
@@ -188,4 +210,4 @@
 
 <style scoped>
 
-</style>
+</style>

+ 4 - 29
jeecgboot-vue3/src/views/okki/showlist/components/OkkiShowlistForm.vue

@@ -3,7 +3,7 @@
   <!-- 子表单区域 -->
     <a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
      <!--主表区域 -->
-     <a-tab-pane tab="ShowList" :key="refKeys[0]" :forceRender="true" :style="tabsStyle">
+     <a-tab-pane tab="showlist" :key="refKeys[0]" :forceRender="true" :style="tabsStyle">
        <BasicForm @register="registerForm" ref="formRef"/>
      </a-tab-pane>
   <!--子表单区域 -->
@@ -31,10 +31,6 @@
           :toolbar="true"
           />
       </a-tab-pane>
-      <a-tab-pane tab="推荐商品列表" key="okkiRecommendedProducts" :forceRender="true" :style="tabsStyle">
-        <OkkiRecommendedProductsForm ref="okkiRecommendedProductsForm" :disabled="formDisabled"></OkkiRecommendedProductsForm>
-      </a-tab-pane>
-
       <a-tab-pane tab="关键词" key="okkiKeywords" :forceRender="true" :style="tabsStyle">
         <JVxeTable
           keep-source
@@ -52,7 +48,6 @@
           />
       </a-tab-pane>
       <a-tab-pane tab="常见问题" key="okkiFaq" :forceRender="true" :style="tabsStyle">
-        <OkkiFaqForm ref="okkiFaqForm" :disabled="formDisabled"></OkkiFaqForm>
         <JVxeTable
           keep-source
           resizable
@@ -68,10 +63,6 @@
           :toolbar="true"
           />
       </a-tab-pane>
-      <a-tab-pane tab="博客" key="okkiShowlistBlog" :forceRender="true" :style="tabsStyle">
-        <OkkiShowlistBlogForm ref="okkiShowlistBlogForm" :disabled="formDisabled"></OkkiShowlistBlogForm>
-      </a-tab-pane>
-
     </a-tabs>
 
     <div style="width: 100%;text-align: center;margin-top: 10px;" v-if="showFlowSubmitButton">
@@ -88,21 +79,16 @@
     import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
     import OkkiOverviewForm from './OkkiOverviewForm.vue'
     import OkkiProductListForm from './OkkiProductListForm.vue'
-    import OkkiRecommendedProductsForm from './OkkiRecommendedProductsForm.vue'
-    import OkkiShowlistBlogForm from './OkkiShowlistBlogForm.vue'
     import {formSchema,okkiAdvantageColumns,okkiKeywordsColumns,okkiFaqColumns} from '../OkkiShowlist.data';
-    import {saveOrUpdate,okkiOverviewList,okkiProductListList,okkiAdvantageList,okkiRecommendedProductsList,okkiKeywordsList,okkiFaqList,okkiShowlistBlogList} from '../OkkiShowlist.api';
+    import {saveOrUpdate,okkiOverviewList,okkiProductListList,okkiAdvantageList,okkiKeywordsList,okkiFaqList} from '../OkkiShowlist.api';
     import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
-    const refKeys = ref(['okkiShowlist','okkiOverview', 'okkiProductList', 'okkiAdvantage', 'okkiRecommendedProducts', 'okkiKeywords', 'okkiFaq', 'okkiShowlistBlog', ]);
+    const refKeys = ref(['okkiShowlist','okkiOverview', 'okkiProductList', 'okkiAdvantage', 'okkiKeywords', 'okkiFaq', ]);
     const activeKey = ref('okkiShowlist');
     const okkiOverviewForm = ref();
-    const okkiFaqForm = ref();
     const okkiProductListForm = ref();
     const okkiAdvantage = ref();
-    const okkiRecommendedProductsForm = ref();
     const okkiKeywords = ref();
     const okkiFaq = ref();
-    const okkiShowlistBlogForm = ref();
     const tableRefs = {okkiAdvantage, okkiKeywords, okkiFaq, };
     const okkiAdvantageTable = reactive({
           loading: false,
@@ -168,10 +154,7 @@
           ...data
         });
         okkiOverviewForm.value.initFormData(okkiOverviewList, data.id)
-        okkiFaqForm.value.initFormData(okkiFaqList, data.id)
         okkiProductListForm.value.initFormData(okkiProductListList, data.id)
-        okkiRecommendedProductsForm.value.initFormData(okkiRecommendedProductsList, data.id)
-        okkiShowlistBlogForm.value.initFormData(okkiShowlistBlogList, data.id)
         requestSubTableData(okkiAdvantageList, {id: data.id}, okkiAdvantageTable, ()=>{
           okkiAdvantageTable.show = true;
         })
@@ -201,26 +184,20 @@
       await resetFields();
       activeKey.value = 'okkiShowlist';
       okkiOverviewForm.value.resetFields();
-      okkiFaqForm.value.resetFields();
       okkiProductListForm.value.resetFields();
       okkiAdvantageTable.dataSource = [];
-      okkiRecommendedProductsForm.value.resetFields();
       okkiKeywordsTable.dataSource = [];
       okkiFaqTable.dataSource = [];
-      okkiShowlistBlogForm.value.resetFields();
     }
     function classifyIntoFormData(allValues) {
          let main = Object.assign({}, allValues.formValue)
          return {
            ...main, // 展开
            okkiOverviewList: okkiOverviewForm.value.getFormData(),
-           okkiFaqList: okkiFaqForm.value.getFormData(),
            okkiProductListList: okkiProductListForm.value.getFormData(),
            okkiAdvantageList: allValues.tablesValue[0].tableData,
-           okkiRecommendedProductsList: okkiRecommendedProductsForm.value.getFormData(),
            okkiKeywordsList: allValues.tablesValue[1].tableData,
            okkiFaqList: allValues.tablesValue[2].tableData,
-           okkiShowlistBlogList: okkiShowlistBlogForm.value.getFormData(),
          }
        }
      //校验所有一对一子表表单
@@ -229,8 +206,6 @@
              Promise.all([
                   okkiOverviewForm.value.validateForm(1),
                   okkiProductListForm.value.validateForm(2),
-                  okkiRecommendedProductsForm.value.validateForm(4),
-                  okkiShowlistBlogForm.value.validateForm(7),
              ]).then(() => {
                  resolve(allValues)
              }).catch(e => {
@@ -285,4 +260,4 @@
     overflow: hidden auto;
   }
 }
-</style>
+</style>

+ 3 - 32
jeecgboot-vue3/src/views/okki/showlist/components/OkkiShowlistModal.vue

@@ -15,11 +15,7 @@
         <OkkiProductListForm ref="okkiProductListForm" :disabled="formDisabled"></OkkiProductListForm>
       </a-tab-pane>
 
-      <a-tab-pane tab="优势" key="okkiAdvantageList" :forceRender="true" :style="tabsStyle">
-        <OkkiAdvantageListForm ref="okkiAdvantageListForm" :disabled="formDisabled"></OkkiAdvantageListForm>
-      </a-tab-pane>
-
-      <a-tab-pane tab="优势详情" key="okkiAdvantage" :forceRender="true" :style="tabsStyle">
+      <a-tab-pane tab="优势" key="okkiAdvantage" :forceRender="true" :style="tabsStyle">
         <JVxeTable
           keep-source
           resizable
@@ -34,10 +30,6 @@
           :toolbar="true"
           />
       </a-tab-pane>
-<!--      <a-tab-pane tab="推荐商品列表" key="okkiRecommendedProducts" :forceRender="true" :style="tabsStyle">-->
-<!--        <OkkiRecommendedProductsForm ref="okkiRecommendedProductsForm" :disabled="formDisabled"></OkkiRecommendedProductsForm>-->
-<!--      </a-tab-pane>-->
-
       <a-tab-pane tab="关键词" key="okkiKeywords" :forceRender="true" :style="tabsStyle">
         <JVxeTable
           keep-source
@@ -54,7 +46,6 @@
           />
       </a-tab-pane>
       <a-tab-pane tab="常见问题" key="okkiFaq" :forceRender="true" :style="tabsStyle">
-        <OkkiFaqForm ref="okkiFaqForm" :disabled="formDisabled"></OkkiFaqForm>
         <JVxeTable
           keep-source
           resizable
@@ -69,10 +60,6 @@
           :toolbar="true"
           />
       </a-tab-pane>
-<!--      <a-tab-pane tab="博客" key="okkiShowlistBlog" :forceRender="true" :style="tabsStyle">-->
-<!--        <OkkiShowlistBlogForm ref="okkiShowlistBlogForm" :disabled="formDisabled"></OkkiShowlistBlogForm>-->
-<!--      </a-tab-pane>-->
-
     </a-tabs>
   </BasicModal>
 </template>
@@ -84,29 +71,22 @@
     import { JVxeTable } from '/@/components/jeecg/JVxeTable'
     import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
     import OkkiOverviewForm from './OkkiOverviewForm.vue'
-    import OkkiFaqForm from './OkkiFaqForm.vue'
     import OkkiProductListForm from './OkkiProductListForm.vue'
-    import OkkiAdvantageListForm from './OkkiAdvantageListForm.vue'
-    import OkkiRecommendedProductsForm from './OkkiRecommendedProductsForm.vue'
-    import OkkiShowlistBlogForm from './OkkiShowlistBlogForm.vue'
     import {formSchema,okkiAdvantageColumns,okkiKeywordsColumns,okkiFaqColumns} from '../OkkiShowlist.data';
-    import {saveOrUpdate,okkiOverviewList,okkiProductListList,okkiAdvantageList,okkiRecommendedProductsList,okkiKeywordsList,okkiFaqList,okkiShowlistBlogList} from '../OkkiShowlist.api';
+    import {saveOrUpdate,okkiOverviewList,okkiProductListList,okkiAdvantageList,okkiKeywordsList,okkiFaqList} from '../OkkiShowlist.api';
     import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
     // Emits声明
     const emit = defineEmits(['register','success']);
     const isUpdate = ref(true);
     const formDisabled = ref(false);
     const modalRef = ref();
-    const refKeys = ref(['okkiShowlist','okkiOverview', 'okkiProductList', 'okkiAdvantage', 'okkiRecommendedProducts', 'okkiKeywords', 'okkiFaq', 'okkiShowlistBlog', ]);
+    const refKeys = ref(['okkiShowlist','okkiOverview', 'okkiProductList', 'okkiAdvantage', 'okkiKeywords', 'okkiFaq', ]);
     const activeKey = ref('okkiShowlist');
     const okkiOverviewForm = ref();
-    const okkiFaqForm = ref();
     const okkiProductListForm = ref();
     const okkiAdvantage = ref();
-    const okkiRecommendedProductsForm = ref();
     const okkiKeywords = ref();
     const okkiFaq = ref();
-    const okkiShowlistBlogForm = ref();
     const tableRefs = {okkiAdvantage, okkiKeywords, okkiFaq, };
     const okkiAdvantageTable = reactive({
           loading: false,
@@ -144,8 +124,6 @@
             });
              okkiOverviewForm.value.initFormData(okkiOverviewList,data?.record?.id)
              okkiProductListForm.value.initFormData(okkiProductListList,data?.record?.id)
-             okkiRecommendedProductsForm.value.initFormData(okkiRecommendedProductsList,data?.record?.id)
-             okkiShowlistBlogForm.value.initFormData(okkiShowlistBlogList,data?.record?.id)
              requestSubTableData(okkiAdvantageList, {id:data?.record?.id}, okkiAdvantageTable)
              requestSubTableData(okkiKeywordsList, {id:data?.record?.id}, okkiKeywordsTable)
              requestSubTableData(okkiFaqList, {id:data?.record?.id}, okkiFaqTable)
@@ -176,13 +154,10 @@
       await resetFields();
       activeKey.value = 'okkiShowlist';
       okkiOverviewForm.value.resetFields();
-      okkiFaqForm.value.resetFields();
       okkiProductListForm.value.resetFields();
       okkiAdvantageTable.dataSource = [];
-      okkiRecommendedProductsForm.value.resetFields();
       okkiKeywordsTable.dataSource = [];
       okkiFaqTable.dataSource = [];
-      okkiShowlistBlogForm.value.resetFields();
     }
     function classifyIntoFormData(allValues) {
          let main = Object.assign({}, allValues.formValue)
@@ -191,10 +166,8 @@
            okkiOverviewList: okkiOverviewForm.value.getFormData(),
            okkiProductListList: okkiProductListForm.value.getFormData(),
            okkiAdvantageList: allValues.tablesValue[0].tableData,
-           okkiRecommendedProductsList: okkiRecommendedProductsForm.value.getFormData(),
            okkiKeywordsList: allValues.tablesValue[1].tableData,
            okkiFaqList: allValues.tablesValue[2].tableData,
-           okkiShowlistBlogList: okkiShowlistBlogForm.value.getFormData(),
          }
        }
      //校验所有一对一子表表单
@@ -203,8 +176,6 @@
              Promise.all([
                   okkiOverviewForm.value.validateForm(1),
                   okkiProductListForm.value.validateForm(2),
-                  okkiRecommendedProductsForm.value.validateForm(4),
-                  okkiShowlistBlogForm.value.validateForm(7),
              ]).then(() => {
                  resolve(allValues)
              }).catch(e => {

+ 0 - 2
jeecgboot-vue3/src/views/okki/site/OkkiSite.data.ts

@@ -1,7 +1,5 @@
 import {BasicColumn} from '/@/components/Table';
 import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
-import { render } from '/@/utils/common/renderUtils';
 //列表数据
 export const columns: BasicColumn[] = [
    {