浏览代码

官网及后台修改

ZhouRuiTing 5 年之前
父节点
当前提交
02cfac289f

文件差异内容过多而无法显示
+ 1 - 0
official_frontend/src/icons/svg/customer.svg


+ 13 - 0
official_frontend/src/router/index.js

@@ -75,6 +75,19 @@ export const constantRoutes = [
     ]
   },
 
+  {
+    path: '/customer',
+    component: Layout,
+    children: [
+      {
+        path: '',
+        name: 'customer',
+        component: () => import('@/views/index/customer'),
+        meta: { title: '客户说', icon: 'customer' }
+      }
+    ]
+  },
+
   {
     path: '/advantage',
     component: Layout,

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

@@ -8,7 +8,7 @@ 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.101:8098",
+    // baseURL: "http://192.168.5.184:8098",
     // withCredentials: true, // send cookies when cross-domain requests
     timeout: 5000 // request timeout
 })

+ 305 - 0
official_frontend/src/views/index/customer.vue

@@ -0,0 +1,305 @@
+<template>
+    <div class="app-container">
+        <el-button size="small" type="primary" @click="openDialog(false, null)" :loading="loading">添加</el-button>
+        <el-button size="small" type="primary" @click="openDialog1()" :loading="loading">编辑文案</el-button>
+        <div>
+            <h3>客户说文案</h3>
+            <p>{{copywriting}}</p>
+        </div>
+        <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.picUrl"></el-image>
+                    <!--  style="width: 200px; height: 200px" -->
+                </template>
+            </el-table-column>
+            <el-table-column prop="companyName" label="客户名称" width="150"></el-table-column>
+            <el-table-column prop="clientName" 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="100px">
+                <el-form-item label="客户名称" prop="title">
+                    <el-input v-model="cooperationsForm.title" placeholder="请输入客户名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="客户负责人" prop="title1">
+                    <el-input v-model="cooperationsForm.title1" placeholder="请输入客户负责人" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="客户评价" prop="introduction">
+                    <el-input type="textarea" rows="5" 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>
+
+        <!-- 添加和编辑的dialog -->
+        <el-dialog title="客户说文案" :visible.sync="addDialogVisible1" width="500px">
+            <el-form ref="form" :model="cooperationsForm" :rules="rules" label-width="80px">
+                <el-form-item label="客户名称" prop="copywriting">
+                    <el-input type="textarea" rows="5" v-model="cooperationsForm.copywriting" placeholder="请输入产品名称" clearable></el-input>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="addDialogVisible1 = false">取消</el-button>
+                <el-button type="primary" @click="addCooperation1()" :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,
+                    title1: null,
+                    introduction: null,
+                    address: null,
+                    image: null,
+                    copywriting: null
+                },
+                rules: {
+                    title: [{ required: true, message: "请输入客户名称", trigger: "blur" }],
+                    title1: [{ required: true, message: "请输入客户负责人", trigger: "blur" }],
+                    introduction: [{ required: true, message: "请输入客户评价", trigger: "blur"}],
+                    copywriting: [{ required: true, message: "请输入客户说文案", trigger: "blur"}],
+                },
+
+                addDialogVisible1: false,
+                copywriting: '',
+            };
+        },
+        methods: {
+            //打开对话框
+            openDialog(isEdit, index) {
+                this.editing = isEdit;
+                if (this.editing) {
+                    this.cooperationsForm.id = this.cooperations[index].id;
+                    this.cooperationsForm.title = this.cooperations[index].companyName;
+                    this.cooperationsForm.title1 = this.cooperations[index].companyName;
+                    this.cooperationsForm.introduction = this.cooperations[index].description;
+                    this.cooperationsForm.image = null;
+                } else {
+                    this.cooperationsForm.id = null;
+                    this.cooperationsForm.title = "";
+                    this.cooperationsForm.title1 = "";
+                    this.cooperationsForm.introduction = "";
+                    this.cooperationsForm.image = null;
+                }
+                this.addDialogVisible = true;
+            },
+
+            openDialog1() {
+                this.addDialogVisible1 = true;
+            },
+
+            getFeedbackTitle() {
+                request({
+                    url: "/feedback/getFeedbackTitle",
+                    method: "post",
+                    params: {}
+                })
+                .then(response => {
+                    this.copywriting = response.data.parameterValue;
+                    this.cooperationsForm.copywriting = response.data.parameterValue;
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            addCooperation1() {
+                this.$refs.form.validate(valid => {
+                    if (valid) {
+                        request({
+                            url: "/feedback/list",
+                            method: "post",
+                            params: {content: this.cooperationsForm.copywriting}
+                        })
+                        .then(response => {
+                            this.$message({
+                                message: "编辑成功",
+                                type: "success"
+                            });
+                            this.addDialogVisible1 = false;
+                            this.getFeedbackTitle();
+                        })
+                        .catch(error => {
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                            this.loading = false;
+                        });
+                    }
+                })
+            },
+
+            //获取合作信息
+            getCooperations() {
+                this.loading = true;
+                request({
+                    url: "/feedback/listFeedback",
+                    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: "/feedback/deleteFeedback",
+                    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("companyName", this.cooperationsForm.title);
+                        form.append("clientName", this.cooperationsForm.title1);
+                        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: "/feedback/insertOrUpdateFeedback",
+                            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.getFeedbackTitle();
+            this.getCooperations();
+        }
+    };
+</script>
+
+<style scoped>
+</style>
+

+ 21 - 23
official_frontend/src/views/index/label.vue

@@ -3,12 +3,12 @@
         <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">
+            <!-- <el-table-column label="标签图片" width="200">
                 <template slot-scope="scope">
                     <el-image :src="scope.row.imageUrl"></el-image>
-                    <!--  style="width: 200px; height: 200px" -->
+                     style="width: 200px; height: 200px"
                 </template>
-            </el-table-column>
+            </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">
@@ -28,11 +28,11 @@
                 <el-form-item label="标签描述" prop="introduction">
                     <el-input v-model="cooperationsForm.introduction" placeholder="请输入标签描述" clearable></el-input>
                 </el-form-item>
-                <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-item> -->
             </el-form>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="addDialogVisible = false">取消</el-button>
@@ -55,15 +55,13 @@
                     id: null,
                     title: null,
                     introduction: null,
-                    // type: null,
                     address: null,
-                    image: 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" }]
                 }
             };
         },
@@ -75,12 +73,12 @@
                     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;
+                    // this.cooperationsForm.image = null;
                 } else {
                     this.cooperationsForm.id = null;
                     this.cooperationsForm.title = "";
                     this.cooperationsForm.introduction = "";
-                    this.cooperationsForm.image = null;
+                    // this.cooperationsForm.image = null;
                 }
                 this.addDialogVisible = true;
             },
@@ -140,18 +138,18 @@
                         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.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);
                         }
@@ -161,7 +159,7 @@
                             data: form
                         })
                         .then(response => {
-                            this.$refs.upload.clearFiles();
+                            // this.$refs.upload.clearFiles();
                             this.getCooperations();
                             this.addDialogVisible = false;
                             this.loading = false;

+ 66 - 60
website/src/main/resources/templates/index.html

@@ -99,9 +99,15 @@
     <section class="bar background-white background-wap">
         <div class="container text-center">
             <div class="row">
-                <div class="col-lg-4 col-md-6" th:each="item : ${characteristic}">
+                <div class="col-lg-4 col-md-6" th:each="item,itemStat : ${characteristic}">
                     <div class="box-simple">
-                        <img class="icon-outlined" style="border: none;border-radius:unset;width:150px;height: unset;line-height: unset;" th:src="${{item.imageUrl}}">
+<!--                        <img class="icon-outlined" style="border: none;border-radius:unset;width:150px;height: unset;line-height: unset;" th:src="${{item.imageUrl}}">-->
+                        <div class="icon-outlined" th:if="${{itemStat.index}}==0"><i class="fa fa-desktop"></i></div>
+                        <div class="icon-outlined" th:if="${{itemStat.index}}==1"><i class="fa fa-print"></i></div>
+                        <div class="icon-outlined" th:if="${{itemStat.index}}==2"><i class="fa fa-globe"></i></div>
+                        <div class="icon-outlined" th:if="${{itemStat.index}}==3"><i class="fa fa-lightbulb-o"></i></div>
+                        <div class="icon-outlined" th:if="${{itemStat.index}}==4"><i class="fa fa-envelope-o"></i></div>
+                        <div class="icon-outlined" th:if="${{itemStat.index}}==5"><i class="fa fa-user"></i></div>
                         <h3 class="h4" th:text="${{item.name}}"></h3>
                         <p th:text="${{item.description}}"></p>
                     </div>
@@ -114,79 +120,79 @@
             <div class="heading text-center">
                 <h2>客户说</h2>
             </div>
-            <p class="lead">塑维智造是一款云端制造协同系统,通过数据和算法让生产更加高效。基于数据聚合、多角色协同、可视化分析、
+            <p class="lead" th:text="${{feedbackTitle}}">塑维智造是一款云端制造协同系统,通过数据和算法让生产更加高效。基于数据聚合、多角色协同、可视化分析、
                 智能决策四大亮点,帮助企业缩短生产周期、降低库存积压、提升产能利用率、透明化制造流程,实现数据驱动下的精益制造。</p>
             <!-- Carousel Start-->
             <ul class="owl-carousel testimonials list-unstyled equal-height">
-                <li class="item">
+                <li class="item" th:each="item,itemStat : ${feedback}">
                     <div class="testimonial d-flex flex-wrap">
                         <div class="text">
-                            <p>「 对比多家供应商后,我们选择了塑维,事实证明我们的选择是正确的,产能得到了大幅度提升! 」</p>
+                            <p th:text="${{item.description}}">「 对比多家供应商后,我们选择了塑维,事实证明我们的选择是正确的,产能得到了大幅度提升! 」</p>
                         </div>
                         <div class="bottom d-flex align-items-center justify-content-between align-self-end">
                             <div class="icon"><i class="fa fa-quote-left"></i></div>
                             <div class="testimonial-info d-flex">
                                 <div class="title">
-                                    <h5>南京维和制造</h5>
-                                    <p>CEO, 杨树人</p>
+                                    <h5 th:text="${{item.companyName}}">南京维和制造</h5>
+                                    <p th:text="${{item.clientName}}">CEO, 杨树人</p>
                                 </div>
-                                <div class="avatar"><img alt="" src="img/person-1.jpg" class="img-fluid"></div>
-                            </div>
-                        </div>
-                    </div>
-                </li>
-                <li class="item">
-                    <div class="testimonial d-flex flex-wrap">
-                        <div class="text">
-                            <p>「 工厂内很多以前难以收集、分析的数据,通过黑湖智造系统得以聚合、分析,帮助我们更好地发现生产问题,提升产能! 」</p>
-                        </div>
-                        <div class="bottom d-flex align-items-center justify-content-between align-self-end">
-                            <div class="icon"><i class="fa fa-quote-left"></i></div>
-                            <div class="testimonial-info d-flex">
-                                <div class="title">
-                                    <h5>黑湖科技</h5>
-                                    <p>设备 生产主管</p>
-                                </div>
-                                <div class="avatar"><img alt="" src="img/person-2.jpg" class="img-fluid"></div>
-                            </div>
-                        </div>
-                    </div>
-                </li>
-                <li class="item">
-                    <div class="testimonial d-flex flex-wrap">
-                        <div class="text">
-                            <p>「 上了黑湖智造系统之后,有效改造了厂内协同混乱的情况!物料、排程、生产、质检等信息都能够无缝打通! 」</p>
-                            <!--<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>-->
-                        </div>
-                        <div class="bottom d-flex align-items-center justify-content-between align-self-end">
-                            <div class="icon"><i class="fa fa-quote-left"></i></div>
-                            <div class="testimonial-info d-flex">
-                                <div class="title">
-                                    <h5>黑湖科技</h5>
-                                    <p>设备 项目经理</p>
-                                </div>
-                                <div class="avatar"><img alt="" src="img/person-3.png" class="img-fluid"></div>
-                            </div>
-                        </div>
-                    </div>
-                </li>
-                <li class="item">
-                    <div class="testimonial d-flex flex-wrap">
-                        <div class="text">
-                            <p>「 对比多家供应商后,我们选择了塑维,事实证明我们的选择是正确的,产能得到了大幅度提升! 」</p>
-                        </div>
-                        <div class="bottom d-flex align-items-center justify-content-between align-self-end">
-                            <div class="icon"><i class="fa fa-quote-left"></i></div>
-                            <div class="testimonial-info d-flex">
-                                <div class="title">
-                                    <h5>南京维和制造</h5>
-                                    <p>生产经理, 张大牛</p>
-                                </div>
-                                <div class="avatar"><img alt="" src="img/person-4.jpg" class="img-fluid"></div>
+                                <div class="avatar"><img alt="" th:src="${{item.picUrl}}" class="img-fluid"></div>
                             </div>
                         </div>
                     </div>
                 </li>
+<!--                <li class="item">-->
+<!--                    <div class="testimonial d-flex flex-wrap">-->
+<!--                        <div class="text">-->
+<!--                            <p>「 工厂内很多以前难以收集、分析的数据,通过黑湖智造系统得以聚合、分析,帮助我们更好地发现生产问题,提升产能! 」</p>-->
+<!--                        </div>-->
+<!--                        <div class="bottom d-flex align-items-center justify-content-between align-self-end">-->
+<!--                            <div class="icon"><i class="fa fa-quote-left"></i></div>-->
+<!--                            <div class="testimonial-info d-flex">-->
+<!--                                <div class="title">-->
+<!--                                    <h5>黑湖科技</h5>-->
+<!--                                    <p>设备 生产主管</p>-->
+<!--                                </div>-->
+<!--                                <div class="avatar"><img alt="" src="img/person-2.jpg" class="img-fluid"></div>-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                </li>-->
+<!--                <li class="item">-->
+<!--                    <div class="testimonial d-flex flex-wrap">-->
+<!--                        <div class="text">-->
+<!--                            <p>「 上了黑湖智造系统之后,有效改造了厂内协同混乱的情况!物料、排程、生产、质检等信息都能够无缝打通! 」</p>-->
+<!--                            &lt;!&ndash;<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>&ndash;&gt;-->
+<!--                        </div>-->
+<!--                        <div class="bottom d-flex align-items-center justify-content-between align-self-end">-->
+<!--                            <div class="icon"><i class="fa fa-quote-left"></i></div>-->
+<!--                            <div class="testimonial-info d-flex">-->
+<!--                                <div class="title">-->
+<!--                                    <h5>黑湖科技</h5>-->
+<!--                                    <p>设备 项目经理</p>-->
+<!--                                </div>-->
+<!--                                <div class="avatar"><img alt="" src="img/person-3.png" class="img-fluid"></div>-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                </li>-->
+<!--                <li class="item">-->
+<!--                    <div class="testimonial d-flex flex-wrap">-->
+<!--                        <div class="text">-->
+<!--                            <p>「 对比多家供应商后,我们选择了塑维,事实证明我们的选择是正确的,产能得到了大幅度提升! 」</p>-->
+<!--                        </div>-->
+<!--                        <div class="bottom d-flex align-items-center justify-content-between align-self-end">-->
+<!--                            <div class="icon"><i class="fa fa-quote-left"></i></div>-->
+<!--                            <div class="testimonial-info d-flex">-->
+<!--                                <div class="title">-->
+<!--                                    <h5>南京维和制造</h5>-->
+<!--                                    <p>生产经理, 张大牛</p>-->
+<!--                                </div>-->
+<!--                                <div class="avatar"><img alt="" src="img/person-4.jpg" class="img-fluid"></div>-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                </li>-->
             </ul>
             <!-- Carousel End-->
         </div>