From 35ae0c74148cd9e18506c730e945afbac4dd944d Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Mon, 24 Feb 2025 17:52:27 +0800
Subject: [PATCH] up
---
.env.development | 7 +-
.env.production | 8 +-
.env.staging | 9 +-
src/api/recommend/index.js | 60 +++++++
.../parameter/components/addRecommend.vue | 151 ++++++++++++++++++
src/views/parameter/recommend.vue | 138 ++++++++++++++++
src/views/resource/components/addLr.vue | 2 +-
vue.config.js | 2 +-
8 files changed, 368 insertions(+), 9 deletions(-)
create mode 100644 src/api/recommend/index.js
create mode 100644 src/views/parameter/components/addRecommend.vue
create mode 100644 src/views/parameter/recommend.vue
diff --git a/.env.development b/.env.development
index fa3ea85..e7eb9e4 100644
--- a/.env.development
+++ b/.env.development
@@ -2,6 +2,9 @@
ENV='development'
# base api
-VUE_APP_BASE_API=http://saifen.ali251.langye.net
-VUE_APP_UPLOAD_API=http://saifen.ali251.langye.net/api/admin/upload-file
+VUE_APP_BASE_API = https://saifen.ali251.langye.net
+VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file
VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview
+
+#VUE_APP_BASE_API = https://sepax-pdm-test.langye.net
+#VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file
diff --git a/.env.production b/.env.production
index d4dfca7..0eed221 100644
--- a/.env.production
+++ b/.env.production
@@ -2,6 +2,10 @@
ENV = 'production'
# base api
-VUE_APP_BASE_API = http://saifen.ali251.langye.net
-VUE_APP_UPLOAD_API = http://saifen.ali251.langye.net/api/admin/upload-file
+VUE_APP_BASE_API = https://saifen.ali251.langye.net
+VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file
VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview
+
+#VUE_APP_BASE_API = https://sepax-pdm-test.langye.net
+#VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file
+
diff --git a/.env.staging b/.env.staging
index 23ae78a..aa920af 100644
--- a/.env.staging
+++ b/.env.staging
@@ -4,7 +4,10 @@ NODE_ENV = production
ENV = 'staging'
# base api
-VUE_APP_BASE_API=http://saifen.ali251.langye.net
-VUE_APP_UPLOAD_API=http://saifen.ali251.langye.net/api/admin/upload-file
-VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview
+VUE_APP_BASE_API = https://saifen.ali251.langye.net
+VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file
+VUE_APP_PREVIEW_API=https://view.ali251.langye.net:8012/onlinePreview
+
+#VUE_APP_BASE_API = https://sepax-pdm-test.langye.net
+#VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file
diff --git a/src/api/recommend/index.js b/src/api/recommend/index.js
new file mode 100644
index 0000000..2d0de3f
--- /dev/null
+++ b/src/api/recommend/index.js
@@ -0,0 +1,60 @@
+import request from "@/utils/request";
+function customParamsSerializer(params) {
+ let result = '';
+ for (let key in params) {
+ if (params.hasOwnProperty(key)) {
+ if (Array.isArray(params[key])) {
+ params[key].forEach((item,index) => {
+ if(item.key){
+ result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
+
+ }else{
+ result +=`${key}[${index}]=${item}&`
+ }
+ });
+ } else {
+ result += `${key}=${params[key]}&`;
+ }
+ }
+ }
+ return result.slice(0, -1);
+}
+
+export function index(params,isLoading = false) {
+ return request({
+ method: "get",
+ url: "/api/admin/recommend/index",
+ params,
+ paramsSerializer: customParamsSerializer,
+ isLoading
+ })
+}
+
+export function show(params, isLoading = true) {
+ return request({
+ method: "get",
+ url: "/api/admin/recommend/show",
+ params,
+ isLoading
+ })
+}
+
+export function save(data) {
+ return request({
+ method: "post",
+ url: "/api/admin/recommend/save",
+ data
+ })
+}
+
+export function destroy(params) {
+ return request({
+ method: "get",
+ url: "/api/admin/recommend/destroy",
+ params
+ })
+}
+
+
+
+
diff --git a/src/views/parameter/components/addRecommend.vue b/src/views/parameter/components/addRecommend.vue
new file mode 100644
index 0000000..3f63430
--- /dev/null
+++ b/src/views/parameter/components/addRecommend.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ *Product Phase:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/parameter/recommend.vue b/src/views/parameter/recommend.vue
new file mode 100644
index 0000000..6dfe35f
--- /dev/null
+++ b/src/views/parameter/recommend.vue
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ search
+
+
+ reset
+
+
+ add
+
+
+
+
+
+
+
+
+
+
+
+ edit
+
+ delete
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/resource/components/addLr.vue b/src/views/resource/components/addLr.vue
index a6757ae..5325cc7 100644
--- a/src/views/resource/components/addLr.vue
+++ b/src/views/resource/components/addLr.vue
@@ -323,7 +323,7 @@
this.form.date = res.date ? res.date : this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.category_ids = res.category_ids ? res.category_ids : [],
- this.form.product_numbers = res.product_numbers ? res.product_numbers : []
+ this.form.product_numbers = res.product_numbers ? res.product_numbers : []
this.form.separation_mode = res.separation_mode ? res.separation_mode : []
this.form.broad_sample_type = res.broad_sample_type ? res.broad_sample_type : []
this.form.specific_sample = res.specific_sample ? res.specific_sample : []
diff --git a/vue.config.js b/vue.config.js
index 2e40aa3..e1ec061 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
- outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin',
+ outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin_test',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项