Jelajahi Sumber

官网及后台修改

ZhouRuiTing 5 tahun lalu
induk
melakukan
fd5870f2fe

File diff ditekan karena terlalu besar
+ 1 - 0
official_frontend/src/icons/svg/label.svg


+ 18 - 4
official_frontend/src/router/index.js

@@ -63,14 +63,14 @@ export const constantRoutes = [
   },
 
   {
-    path: '/cooperation',
+    path: '/label',
     component: Layout,
     children: [
       {
         path: '',
-        name: 'Cooperation',
-        component: () => import('@/views/cooperation/client'),
-        meta: { title: '合作伙伴', icon: 'partner' }
+        name: 'label',
+        component: () => import('@/views/index/label'),
+        meta: { title: '首页标签', icon: 'label' }
       }
     ]
   },
@@ -88,6 +88,20 @@ export const constantRoutes = [
     ]
   },
 
+  
+  {
+    path: '/cooperation',
+    component: Layout,
+    children: [
+      {
+        path: '',
+        name: 'Cooperation',
+        component: () => import('@/views/cooperation/client'),
+        meta: { title: '合作伙伴', icon: 'partner' }
+      }
+    ]
+  },
+
   {
     path: '/case',
     component: Layout,

+ 2 - 2
official_frontend/src/utils/request.js

@@ -7,8 +7,8 @@ import { getToken } from '@/utils/auth'
 const service = axios.create({
     // url = base url + request url
     // baseURL: process.env.VUE_APP_BASE_API,
-    baseURL: "http://111.231.87.63:8088",
-    // baseURL: "http://192.168.5.184:8098",
+    // baseURL: "http://111.231.87.63:8088",
+    baseURL: "http://192.168.5.101:8098",
     // withCredentials: true, // send cookies when cross-domain requests
     timeout: 5000 // request timeout
 })

+ 225 - 0
official_frontend/src/views/index/label.vue

@@ -0,0 +1,225 @@
+<template>
+    <div class="app-container">
+        <el-button size="small" type="primary" @click="openDialog(false, null)" :loading="loading">添加</el-button>
+        <el-table :data="cooperations" style="width: 100%">
+            <el-table-column type="index" width="50"></el-table-column>
+            <el-table-column label="标签图片" width="200">
+                <template slot-scope="scope">
+                    <el-image :src="scope.row.imageUrl"></el-image>
+                    <!--  style="width: 200px; height: 200px" -->
+                </template>
+            </el-table-column>
+            <el-table-column prop="name" label="标签名称" width="150"></el-table-column>
+            <el-table-column prop="description" label="标签描述"></el-table-column>
+            <el-table-column label="操作" width="180">
+                <template slot-scope="scope">
+                    <el-button size="small" @click="openDialog(true, scope.$index)" :loading="loading">编辑</el-button>
+                    <el-button size="small" type="danger" @click="deleteCooperation(scope.row.id)" :loading="loading">删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <!-- 添加和编辑的dialog -->
+        <el-dialog title="首页标签" :visible.sync="addDialogVisible" width="500px">
+            <el-form ref="form" :model="cooperationsForm" :rules="rules" label-width="80px">
+                <el-form-item label="标签名称" prop="title">
+                    <el-input v-model="cooperationsForm.title" placeholder="请输入标签名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="标签描述" prop="introduction">
+                    <el-input v-model="cooperationsForm.introduction" placeholder="请输入标签描述" clearable></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-upload ref="upload" action="customize" :http-request="uploadDiscardFile" :limit="1" :before-remove="beforeRemove">
+                        <el-button size="small" type="primary" :loading="loading">上传一张图片</el-button>
+                    </el-upload>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="addDialogVisible = false">取消</el-button>
+                <el-button type="primary" @click="addCooperation()" :loading="loading">提交</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import request from "@/utils/request";
+    export default {
+        data() {
+            return {
+                editing: false,
+                loading: false,
+                addDialogVisible: false,
+                cooperations: [],
+                cooperationsForm: {
+                    id: null,
+                    title: null,
+                    introduction: null,
+                    // type: null,
+                    address: null,
+                    image: null
+                },
+                rules: {
+                    title: [{ required: true, message: "请输入标签名称", trigger: "blur" }],
+                    introduction: [{ required: true, message: "请输入标签描述", trigger: "blur"}],
+                    address: [{ required: true, message: "请输入标签网址", trigger: "blur"}],
+                    // type: [{ required: true, message: "请选择标签类型", trigger: "change" }]
+                }
+            };
+        },
+        methods: {
+            //打开对话框
+            openDialog(isEdit, index) {
+                this.editing = isEdit;
+                if (this.editing) {
+                    this.cooperationsForm.id = this.cooperations[index].id;
+                    this.cooperationsForm.title = this.cooperations[index].name;
+                    this.cooperationsForm.introduction = this.cooperations[index].description;
+                    this.cooperationsForm.image = null;
+                } else {
+                    this.cooperationsForm.id = null;
+                    this.cooperationsForm.title = "";
+                    this.cooperationsForm.introduction = "";
+                    this.cooperationsForm.image = null;
+                }
+                this.addDialogVisible = true;
+            },
+
+            //获取合作信息
+            getCooperations() {
+                this.loading = true;
+                request({
+                    url: "/characteristic/list",
+                    method: "post",
+                    params: {pageIndex:1,pageSize: 9999999}
+                })
+                .then(response => {
+                    this.cooperations = response.data;
+                    this.loading = false;
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    this.loading = false;
+                });
+            },
+
+            //删除合作信息
+            deleteCooperation(id) {
+                request({
+                    url: "/characteristic/delete",
+                    method: "post",
+                    params: { id: id }
+                })
+                .then(response => {
+                    this.$message({
+                        message: "删除成功",
+                        type: "success"
+                    });
+                    this.getCooperations();
+                    this.addDialogVisible = false;
+                    this.loading = false;
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    this.loading = false;
+                });
+            },
+
+            //添加/编辑合作信息
+            addCooperation() {
+                this.$refs.form.validate(valid => {
+                    if (valid) {
+                        this.loading = true;
+                        var form = new FormData();
+                        form.append("name", this.cooperationsForm.title);
+                        form.append("description", this.cooperationsForm.introduction);
+                        //新增记录 并且 没有图片时
+                        if (this.cooperationsForm.image == null && this.editing == false) {
+                            //如果没上传文件的话
+                            this.loading =false;
+                            this.$message({
+                                message: "尚未上传图片",
+                                type: "error"
+                            });
+                            return;
+                            //有图片时
+                        } else if (this.cooperationsForm.image != null) {
+                            form.append("file", this.cooperationsForm.image);
+                        }
+                        if (this.cooperationsForm.id != null) {
+                            form.append("id", this.cooperationsForm.id);
+                        }
+                        request({
+                            url: "/characteristic/insertOrUpdate",
+                            method: "post",
+                            data: form
+                        })
+                        .then(response => {
+                            this.$refs.upload.clearFiles();
+                            this.getCooperations();
+                            this.addDialogVisible = false;
+                            this.loading = false;
+                            this.$message({
+                                message: "添加成功",
+                                type: "success"
+                            });
+                        })
+                        .catch(error => {
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                            this.loading = false;
+                        });
+                    }
+                });
+            },
+
+            //切换置顶
+            switchSticky(id) {
+                request({
+                    url: "/cooperations/switchCooperationSticky",
+                    method: "post",
+                    params: { id: id }
+                })
+                .then(response => {
+                    this.$message({
+                        message: "操作成功",
+                        type: "success"
+                    });
+                    this.getCooperations();
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //文件上传的部分操作
+            uploadDiscardFile(params) {
+                this.cooperationsForm.image = params.file;
+                return false;
+            },
+
+            //文件上传的移除操作
+            beforeRemove(params) {
+                this.cooperationsForm.image = null;
+            }
+        },
+        mounted() {
+            this.getCooperations();
+        }
+    };
+</script>
+
+<style scoped>
+</style>
+

+ 1 - 1
official_frontend/src/views/vipproduct/vip.vue

@@ -23,7 +23,7 @@
                 </template>
             </el-table-column> -->
             <el-table-column prop="introduction" label="产品描述"></el-table-column>
-            <el-table-column prop="address" label="产品址" width="300"></el-table-column>
+            <el-table-column prop="address" label="产品址" width="300"></el-table-column>
             <el-table-column label="操作" width="180">
                 <template slot-scope="scope">
                     <el-button size="small" @click="openDialog(true, scope.$index)" :loading="loading">编辑</el-button>

+ 1 - 1
website/src/main/resources/templates/about.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/apply.html

@@ -61,7 +61,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/case.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/caseDetail.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/goods.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 51 - 44
website/src/main/resources/templates/index.html

@@ -63,7 +63,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                             <div class="qrcode">
                                 <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                <div>请关注塑维公众号</div>
+                                <div>关注我们</div>
                             </div>
                         </li>
                         <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>
@@ -99,51 +99,58 @@
     <section class="bar background-white background-wap">
         <div class="container text-center">
             <div class="row">
-                <div class="col-lg-4 col-md-6">
+                <div class="col-lg-4 col-md-6" th:each="item : ${characteristic}">
                     <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-desktop"></i></div>
-                        <h3 class="h4">原料入场</h3>
-                        <p>扫码录入仓位和物料信息,出入库记录随时查询。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-print"></i></div>
-                        <h3 class="h4">生产执行</h3>
-                        <p>线上即可接单、报工、扫码进行投产、生产效率数据线上直接看。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-globe"></i></div>
-                        <h3 class="h4">仓库管理</h3>
-                        <p>二维码轻松完成物料入库管理,库存清晰可查。</p>
-                    </div>
-                </div>
-            </div>
-            <div class="row">
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-lightbulb-o"></i></div>
-                        <h3 class="h4">计划排程</h3>
-                        <p>智能分配生产设备时间、批量发生产任务到工位。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-envelope-o"></i></div>
-                        <h3 class="h4">图形分析报表</h3>
-                        <p>物料、生产、设备等多维度数据图形化呈现、实时查看监管监控。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-user"></i></div>
-                        <h3 class="h4">设备维护</h3>
-                        <p>扫码即可查看设备信息、云端配置维保计划。</p>
+                        <img class="icon-outlined" style="border: none;" th:src="${{item.imageUrl}}">
+                        <h3 class="h4" th:text="${{item.name}}"></h3>
+                        <p th:text="${{item.description}}"></p>
                     </div>
                 </div>
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-desktop"></i></div>-->
+<!--                        <h3 class="h4">原料入场</h3>-->
+<!--                        <p>扫码录入仓位和物料信息,出入库记录随时查询。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-print"></i></div>-->
+<!--                        <h3 class="h4">生产执行</h3>-->
+<!--                        <p>线上即可接单、报工、扫码进行投产、生产效率数据线上直接看。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-globe"></i></div>-->
+<!--                        <h3 class="h4">仓库管理</h3>-->
+<!--                        <p>二维码轻松完成物料入库管理,库存清晰可查。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
             </div>
+<!--            <div class="row">-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-lightbulb-o"></i></div>-->
+<!--                        <h3 class="h4">计划排程</h3>-->
+<!--                        <p>智能分配生产设备时间、批量发生产任务到工位。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-envelope-o"></i></div>-->
+<!--                        <h3 class="h4">图形分析报表</h3>-->
+<!--                        <p>物料、生产、设备等多维度数据图形化呈现、实时查看监管监控。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-user"></i></div>-->
+<!--                        <h3 class="h4">设备维护</h3>-->
+<!--                        <p>扫码即可查看设备信息、云端配置维保计划。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--            </div>-->
         </div>
     </section>
     <section class="bar background-pentagon no-mb text-md-center">
@@ -232,9 +239,9 @@
              class="bar no-mb color-white text-center bg-fixed relative-positioned">
         <div class="dark-mask"></div>
         <div class="container">
-            <div class="icon icon-outlined icon-lg"><i class="fa fa-file-code-o"></i></div>
+            <img src="img/qrCode.jpg" alt="..." class="img-fluid" style="width: 6.5rem;margin-bottom: 1rem">
             <h3 class="text-uppercase">想要看到更多吗?</h3>
-            <p class="lead">我们准备了多个关于本公司的400多个产品的介绍,想要了解更多点击了解详情。</p>
+            <p class="lead">我们准备了多个关于本公司的多个产品的介绍,想要了解更多点击了解详情。</p>
             <p class="text-center"><a href="about.html" class="btn btn-template-outlined-white btn-lg">了解详情</a></p>
         </div>
     </section>

+ 1 - 1
website/src/main/resources/templates/job1.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/job2.html

@@ -60,7 +60,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/job3.html

@@ -60,7 +60,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/job4.html

@@ -60,7 +60,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/login.html

@@ -60,7 +60,7 @@
                                     <a href="about.html">关于我们 <b class="caret"></b></a>
                                     <div class="qrcode">
                                         <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                        <div>请关注塑维公众号</div>
+                                        <div>关注我们</div>
                                     </div>
                                 </li>
                                 <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/partner.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/product.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/vip.html

@@ -65,7 +65,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                             <div class="qrcode">
                                 <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                <div>请关注塑维公众号</div>
+                                <div>关注我们</div>
                             </div>
                         </li>
                         <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>