Эх сурвалжийг харах

0.0.41

自助建站和修改bug
Sean 4 сар өмнө
parent
commit
dd50dbebff

+ 2 - 1
package.json

@@ -17,7 +17,8 @@
     "test:ci": "npm run lint && npm run test:unit",
     "liujian": "cross-env NODE_ENV=development vue-cli-service serve --mode liujian",
     "liujiawei": "cross-env NODE_ENV=development vue-cli-service serve --mode liujiawei",
-    "fengrui": "cross-env NODE_ENV=development vue-cli-service serve --mode fengrui"
+    "fengrui": "cross-env NODE_ENV=development vue-cli-service serve --mode fengrui",
+    "master": "cross-env NODE_ENV=development vue-cli-service serve --mode master"
   },
   "dependencies": {
     "axios": "0.18.1",

+ 7 - 0
public/index.html

@@ -7,6 +7,13 @@
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= webpackConfig.name %></title>
+    <!-- 引入 Element UI -->
+    <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.2/lib/theme-chalk/index.css">
+    <script src="https://unpkg.com/element-ui@2.13.2/lib/index.js"></script>
+    <script src="https://unpkg.com/element-ui@2.13.2/lib/umd/locale/en.js"></script>
+    <script src="https://unpkg.com/element-ui@2.13.2/lib/umd/locale/zh-CN.js"></script> -->
+    <!-- 引入 ECharts -->
+    <!-- <script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script> -->
   </head>
   <body>
     <div id="app"></div>

+ 9 - 0
src/api/userMember.js

@@ -64,4 +64,13 @@ export function updateUser(data) {
     data
   })
 }
+
+//1.8 重置用户密码
+export function resetPassword(data) {
+  return request({
+    url: '/user/resetPassword',
+    method: 'post',
+    data
+  })
+}
 //用户管理 end ------------------------------------->

BIN
src/assets/template/style1.png


BIN
src/assets/template/style2.png


BIN
src/assets/template/style3.png


BIN
src/assets/template/style4.png


BIN
src/assets/template/style5.png


BIN
src/assets/template/style6.png


BIN
src/assets/template/style7.png


BIN
src/assets/template/style8.png


+ 1 - 0
src/layout/creatWebsite.vue

@@ -59,6 +59,7 @@ export default {
 <style lang="scss" scoped>
   @import "~@/styles/mixin.scss";
   @import "~@/styles/variables.scss";
+  
 
   .app-wrapper {
     @include clearfix;

+ 1 - 0
src/main.js

@@ -4,6 +4,7 @@ import Cookies from 'js-cookie'
 
 import 'normalize.css/normalize.css' // a modern alternative to CSS resets
 
+// 因为通过 CDN 加载,所以这里不需要直接 import ElementUI 和 ECharts
 import Element from 'element-ui'
 import './styles/element-variables.scss'
 

+ 17 - 1
src/router/modules/dangyunlong.js

@@ -308,6 +308,22 @@ const dangyunlongRouter= [
         }
       }
     ]
-  }
+  },
+  {
+    path: '/templateStyle',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/template/templateStyle'),
+        meta: {
+          title: '选择模板风格',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+  },
 ]
 export default dangyunlongRouter

+ 11 - 1
src/store/modules/userMember.js

@@ -1,5 +1,5 @@
 import {getUserList,getUserInfo,createUser,verifyUserInfo,getUser,
-  upUserStatus,updateUser
+  upUserStatus,updateUser,resetPassword
 } from '@/api/userMember'
 
 const state = {
@@ -81,6 +81,16 @@ const actions = {
         reject(error)
       })
     })
+  },
+  //修改用户密码
+  resetPassword({commit},data) {
+    return new Promise((resolve, reject) => {
+      resetPassword(data).then(response => {
+        resolve(response)
+      }).catch(error => {
+        reject(error)
+      })
+    })
   }
   //用户管理管理 end ---------------------------------------->
 }

+ 1 - 1
src/views/chat/creatTopic.vue

@@ -319,7 +319,7 @@ export default {
             //汇报结果
             this.$message({
               type: 'success',
-              message: '已成功修改信息!'
+              message: '已成功修改课题信息!'
             });
             this.cleatForm();
             //返回列表页

+ 67 - 25
src/views/chat/hall.vue

@@ -333,7 +333,7 @@
                 type="textarea"
                 placeholder="请输入内容"
                 v-model="userMessage"
-                :rows="6"
+                :rows="4"
                 resize="none"
                 maxlength="200"
                 @keyup.enter.native="sendUserMessage"
@@ -394,6 +394,16 @@
             </div>
 
             <div class="rightSlideUserBox">
+              <div class="rightSlideUserItem rightEditUserItem" @click="editGroupMember">
+                <div class="rightSlideUserItemIcon">
+                  <div class="addUserIcon">
+                    <i class="el-icon-user-solid"></i>
+                  </div>
+                </div>
+                <div class="rightSlideUserItemName">
+                  编辑成员
+                </div>
+              </div>
               <div class="rightSlideUserItem" v-for="item in groupUserList" :key="item.user_id">
                 <div class="rightSlideUserItemIcon">
                   <span class="el-dropdown-link">
@@ -402,7 +412,8 @@
                   </span>
                 </div>
                 <div class="rightSlideUserItemName">
-                  {{item.user_name}}
+                  <span v-if="item.user_name!=null">{{item.user_name}}</span>
+                  <span v-else>未知用户</span>
                 </div>
                 <!-- <div class="rightSlideUserItemMore">
                   <div class="rightSlideUserItemMoreMain">
@@ -452,16 +463,7 @@
                 </div> -->
               </div>
 
-              <div class="rightSlideUserItem rightEditUserItem" @click="editGroupMember">
-                <div class="rightSlideUserItemIcon">
-                  <div class="addUserIcon">
-                    <i class="el-icon-user-solid"></i>
-                  </div>
-                </div>
-                <div class="rightSlideUserItemName">
-                  编辑成员
-                </div>
-              </div>
+              
             </div>
             <!-- <div class="rightSlideMore">
               显示更多 <i class="el-icon-arrow-down"></i>
@@ -528,7 +530,13 @@
               </div> -->
             </div>
             <!--群聊设置 end------------------------------------------------------------>
-            <div class="rightSlideFooter isShare" @click="openShareMyGroup">
+            <div class="rightSlideFooterBox">
+              <div @click="openShareMyGroup">分享群</div>
+              <div @click="delGroup" v-if="creatorId==myUserId">解散群</div>
+              <div @click="closeGroup" v-else>退出群</div>
+              <div @click="openGroupSystem">关闭</div>
+            </div>
+            <!-- <div class="rightSlideFooter isShare" @click="openShareMyGroup">
               分享群聊
             </div>
             <div class="rightSlideFooter" @click="delGroup" v-if="creatorId==myUserId">
@@ -539,7 +547,7 @@
             </div>
             <div class="rightSlideFooter isLast" @click="openGroupSystem">
               关闭
-            </div>
+            </div> -->
           </div>
         </div>
         <!--右侧菜单 end------------------------------------------>
@@ -940,7 +948,9 @@
               <img :src="item.avatar" v-if="item.avatar!=null&&item.avatar!=''">
               <img src="@/assets/chat/user/admin.png" v-else>
               <div class="searchUserName" v-if="item.remark!=null">{{item.remark}}</div>
-              <div class="searchUserName" v-else>{{item.user_name}}</div>
+              <div class="searchUserName" v-else>
+                {{item.user_name}}
+              </div>
             </div>
           </div>
           <!--通讯录列表 end------------------------------------------------------------>
@@ -960,7 +970,8 @@
                 </div>
               </div>
               <div class="searchWindowUserName" v-if="item.remark!=null">{{item.remark}}</div>
-              <div class="searchWindowUserName" v-else>{{item.user_name}}</div>
+              <div class="searchWindowUserName" v-else-if="item.user_name!=null">{{item.user_name}}</div>
+              <div class="searchWindowUserName" v-else>未知用户</div>
             </div>
           </div>
           <div class="searchWindowFooter">
@@ -2448,7 +2459,7 @@ export default {
         top: 0;
         left: 0;
         width: 420px;
-        height: 1184px;
+        height: 740px;
         display: flex;
         align-items: center;
         justify-content: center;
@@ -2753,9 +2764,10 @@ export default {
       .rightPositionBox { 
         flex: 1;
         position: relative;
+        
         .rightUserMessageBox {
           padding: 40px;
-          height: 320px;
+          height: 375px;
           box-sizing: border-box;
           overflow-y: auto;
           .timeBox {
@@ -2885,10 +2897,11 @@ export default {
       }
       //消息框
       .sendMessageBox {
-        padding: 20px 40px;
+        //height: 250px;
+        padding: 20px 40px 0 40px;
         border-top: 1px solid #E7E7E7;
         box-sizing: border-box;
-        height: 276px;
+
         .sendMessageTools {
           display: flex;
           align-items: center;
@@ -2932,7 +2945,7 @@ export default {
           }
         }
         .sendMessageInput {
-          margin-top: 20px;
+          margin-top: 5px;
         }
         .sendMessageButton {
           padding-top: 20px;
@@ -2946,14 +2959,16 @@ export default {
       //右侧菜单
       .rightSlideBox {
         width: 420px;
+        height: 100%;
         position: absolute;
         right: 0;
         top: 0;
         background: #fff;
-        height: 100%;
         box-shadow: -4px 0px 4px 0px rgba(0, 0, 0, 0.1); 
         .rightSlideBoxClose {
           padding: 20px 20px 0 20px;
+          height: 50px;
+          overflow: hidden;
           display: flex;  
           align-items: center;
           justify-content: space-between;
@@ -2973,6 +2988,8 @@ export default {
         }
         .rightSlideSearch {
           padding: 30px 25px 0 25px;
+          height: 66px;
+          overflow: hidden;
           position: relative;
           .searchFriendBox {
             position: absolute;
@@ -3089,6 +3106,8 @@ export default {
         .rightSlideUserBox {
           box-sizing: border-box;
           padding: 40px 40px 10px 40px;
+          height: 180px;
+          overflow-y: auto;
           display: flex;
           align-items: center;
           flex-wrap: wrap;
@@ -3257,11 +3276,11 @@ export default {
         //聊天记录
         .rightSlideFunction {
           .rightSlideFunctionItem {
-            height: 80px;
+            height: 60px;
             display: flex;
             align-items: center;
             justify-content: space-between;
-            padding: 30px 40px;
+            padding: 20px 40px;
             border-bottom: 1px solid #E9EDF7;
             cursor: pointer;
             .rightSlideFunctionItemText {
@@ -3282,18 +3301,41 @@ export default {
           padding-bottom: 30px;
           .groupChatSystem {
             padding: 30px 40px 0 40px;
+            height: 80px;
+            overflow: hidden; 
             .groupChatTitle {
               font-size: 18px;
               color: #333;
-              margin-bottom: 15px;
+              margin-bottom: 10px;
             }
             .groupChatText {
+              width: 100%;
+              height: 20px;
+              overflow: hidden;
               font-size: 18px;
               color: #999;
               cursor: pointer;
+              white-space: nowrap;
+              text-overflow: ellipsis;
             }
           }
         }
+        .rightSlideFooterBox {
+          flex: 1;
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          div{
+            width: 33%;
+            text-align: center;
+            font-size: 16px;
+            color: #666;
+            cursor: pointer;
+            margin-top: 30px;
+            box-sizing: border-box;
+            border-right: 1px solid #E9EDF7;
+          }
+        }
         .rightSlideFooter {
           font-size: 18px;
           color: #666;

+ 30 - 2
src/views/role/components/userAdmin.vue

@@ -83,7 +83,8 @@
     <div class="bottomBtnBox">
       <el-button type="info" @click="goList">返回</el-button>
       <el-button type="primary" @click="addData" v-if="editId==''">提交</el-button>
-      <el-button type="primary" @click="editData" v-else>修改</el-button>
+      <el-button type="primary" @click="editData" v-if="editId!=''">修改</el-button>
+      <el-button type="warning" @click="resetPassword" v-if="editId!=''">重置密码</el-button>
     </div>
   </div>
 </template>
@@ -102,6 +103,17 @@ export default {
         callback()
       }
     }
+    const validatePhone = (rule, value, callback) => {
+      const phoneRegex = /^1[34578]\d{9}$/g; // 正则表达式验证手机号
+      if (!value || value.trim() === "") {
+        callback(new Error('该项不能为空!'));
+      } else if (!phoneRegex.test(value.trim())) {
+        callback(new Error('请输入有效的手机号')); // 更新错误信息
+      } else {
+        console.log("手机号验证通过!")
+        callback();
+      }
+    }
     const validateEmpty = (rule,value,callback) => {
       if (value.length == 0) {
         callback(new Error('该项不能为空!'))
@@ -130,7 +142,7 @@ export default {
       passwordType2: 'password',
       //配置from表单验证规则
       loginRules: { 
-        user_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        user_name: [{ required: true, trigger: 'blur', validator: validatePhone }],
         role_id: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         password: [{ required: true, trigger: 'blur', validator: validatePassword }],
         confirm_password: [{ required: true, trigger: 'blur', validator: validatePassword }],
@@ -261,6 +273,22 @@ export default {
         });
       })
     },
+    //重置密码
+    resetPassword(){
+      this.$store.dispatch('userMember/resetPassword',{id:this.editId}).then(res=> {
+        if(res.code==200){
+          this.$message({
+            type: 'success',
+            message: '密码重置为:111111'
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '网络错误,请重试!'
+        });
+      })
+    },
     //编辑表单 end ------------------------------------------------------------>
     goList(){
       this.$router.push({

+ 2 - 1
src/views/role/components/userDefault.vue

@@ -172,7 +172,8 @@
     <div class="bottomBtnBox">
       <el-button type="info" @click="goList">返回</el-button>
       <el-button type="primary" @click="addData" v-if="editId==''">提交</el-button>
-      <el-button type="primary" @click="editData" v-else>修改</el-button>
+      <el-button type="primary" @click="editData" v-if="editId!=''">修改</el-button>
+      <el-button type="warning" @click="resetPassword" v-if="editId!=''">重置密码</el-button>
     </div>
   </div>
 </template>

+ 18 - 1
src/views/role/components/userEnterprise.vue

@@ -146,7 +146,8 @@
     <div class="bottomBtnBox">
       <el-button type="info" @click="goList">返回</el-button>
       <el-button type="primary" @click="addData" v-if="editId==''">提交</el-button>
-      <el-button type="primary" @click="editData" v-else>修改</el-button>
+      <el-button type="primary" @click="editData" v-if="editId!=''">修改</el-button>
+      <el-button type="warning" @click="resetPassword" v-if="editId!=''">重置密码</el-button>
     </div>
   </div>
 </template>
@@ -513,6 +514,22 @@ export default {
         }
       })
     },
+    //重置密码
+    resetPassword(){
+      this.$store.dispatch('userMember/resetPassword',{id:this.editId}).then(res=> {
+        if(res.code==200){
+          this.$message({
+            type: 'success',
+            message: '密码重置为:111111'
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '网络错误,请重试!'
+        });
+      })
+    },
     //编辑表单 end ------------------------------------------------------------>
     goList(){
       this.$router.push({

+ 46 - 7
src/views/role/components/userInvestigate.vue

@@ -180,7 +180,8 @@
     <div class="bottomBtnBox">
       <el-button type="info" @click="goList">返回</el-button>
       <el-button type="primary" @click="addData" v-if="editId==''">提交</el-button>
-      <el-button type="primary" @click="editData" v-else>修改</el-button>
+      <el-button type="primary" @click="editData" v-if="editId!=''">修改</el-button>
+      <el-button type="warning" @click="resetPassword" v-if="editId!=''">重置密码</el-button>
     </div>
   </div>
 </template>
@@ -208,6 +209,17 @@ export default {
         callback()
       }
     }
+    const validatePhone = (rule, value, callback) => {
+      const phoneRegex = /^1[34578]\d{9}$/g; // 正则表达式验证手机号
+      if (!value || value.trim() === "") {
+        callback(new Error('该项不能为空!'));
+      } else if (!phoneRegex.test(value.trim())) {
+        callback(new Error('请输入有效的手机号')); // 更新错误信息
+      } else {
+        console.log("手机号验证通过!")
+        callback();
+      }
+    }
     const validateEmpty = (rule,value,callback) => {
       if (!value || value.trim() === "") {
         callback(new Error('该项不能为空!'));
@@ -269,7 +281,7 @@ export default {
         //1.角色id
         role_id: [{ required: true, trigger: 'blur', validator: validateArray }],
         //2.登录账号
-        user_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        user_name: [{ required: true, trigger: 'blur', validator: validatePhone }],
         //3.密码和确认密码
         password: [{ required: true, trigger: 'blur', validator: validatePassword }],
         confirm_password: [{ required: true, trigger: 'blur', validator: validatePassword }],
@@ -336,6 +348,8 @@ export default {
     update_city_arr_id(value){
       console.log("工作区域ID已更新:", value);
       this.form.city_arr_id = value;
+
+      console.log(this.form.city_arr_id);
     },
     //1.4更新籍贯
     update_native_place_arr_id(value){
@@ -442,7 +456,7 @@ export default {
       }
       //判断用户工作区域是否为全国
       if(this.isNational==1){
-        this.form.city_arr_id = ["0"];
+        this.form.city_arr_id = [0];
       }
       console.log(this.form)
       //2.开始验证
@@ -562,15 +576,24 @@ export default {
           this.$store.dispatch('userMember/verifyUserInfo',{id:this.editId,user_name:this.form.user_name}).then(res=>{
             if(res.code==0){
               console.log(this.form);
-              this.form.address_arr_id = JSON.parse(this.form.address_arr_id);
-              this.form.native_place_arr_id = JSON.parse(this.form.native_place_arr_id);
-              this.form.city_arr_id = JSON.parse(this.form.address_arr_id);
+              if(!Array.isArray(this.form.address_arr_id)){
+                this.form.address_arr_id = JSON.parse(this.form.address_arr_id);
+              }
+              if(!Array.isArray(this.form.native_place_arr_id)){
+                this.form.native_place_arr_id = JSON.parse(this.form.native_place_arr_id);
+              }
+              if(!Array.isArray(this.form.city_arr_id)){
+                this.form.city_arr_id = JSON.parse(this.form.address_arr_id);
+              }
+              //this.form.address_arr_id = JSON.parse(this.form.address_arr_id);
+              //this.form.native_place_arr_id = JSON.parse(this.form.native_place_arr_id);
+              //this.form.city_arr_id = JSON.parse(this.form.address_arr_id);
 
               //2.设置修改的用户id
               this.form.id = this.editId;
               //判断用户工作区域是否为全国
               if(this.isNational==1){
-                this.form.city_arr_id = ["0"];
+                this.form.city_arr_id = [0];
               }
               //3.提交用户修改
               //如果code为0表示用户不存在,提交表单
@@ -598,6 +621,22 @@ export default {
         }
       })
     },
+    //重置密码
+    resetPassword(){
+      this.$store.dispatch('userMember/resetPassword',{id:this.editId}).then(res=> {
+        if(res.code==200){
+          this.$message({
+            type: 'success',
+            message: '密码重置为:111111'
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '网络错误,请重试!'
+        });
+      })
+    },
     //编辑表单 end ------------------------------------------------------------>
     goList(){
       this.$router.push({

+ 2 - 1
src/views/role/components/userPolitician.vue

@@ -149,7 +149,8 @@
     <div class="bottomBtnBox">
       <el-button type="info" @click="goList">返回</el-button>
       <el-button type="primary" @click="addData" v-if="editId==''">提交</el-button>
-      <el-button type="primary" @click="editData" v-else>修改</el-button>
+      <el-button type="primary" @click="editData" v-if="editId!=''">修改</el-button>
+      <el-button type="warning" @click="resetPassword" v-if="editId!=''">重置密码</el-button>
     </div>
   </div>
 </template>

+ 54 - 0
src/views/template/templateBase.vue

@@ -1,5 +1,13 @@
 <template>
   <div class="mainBox">
+    <div class="stepBox">
+      <el-steps :active="1" align-center>
+        <el-step title="填写模板基本信息" description="设置类型和网站底部信息" />
+        <el-step title="选择模板风格" description="确定网站整体风格和样式" />
+        <el-step title="配置网站模块" description="选择展示哪些模块到网页" />
+        <el-step title="应用网站模板" description="应用该模板到您的站点" />
+      </el-steps>
+    </div>
     <el-form ref="form" :model="form" :rules="loginRules" class="login-form" autocomplete="on" label-position="left" label-width="120px">
       <div class="layerBox">
         <tableTitle :name="templateBaseTitle"/>
@@ -80,6 +88,49 @@
               <el-input type="text" v-model="form.website_statement" placeholder="请输入.."></el-input>
             </div>
           </el-form-item>
+          <el-form-item label="公司LOGO:" class="custom-align-right">
+            <div class="uploaderBox">
+              <el-upload class="avatar-uploader" action="#" :show-file-list="false" :before-upload="beforeAvatarUpload">
+                <!-- <img v-if="imgUrl" :src="imgUrl" class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
+                <!-- 预览图片 -->
+                <img v-if="form.project_img_src" :src="form.project_img_src" class="avatar">
+                <!-- 上传图标 -->
+                <!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
+                <div v-else class="chooseImgDiv">
+                  <div>
+                    <img src="@/assets/public/upload/noImage.png">
+                    <div>选择图片</div>
+                  </div>
+                </div>
+              </el-upload>
+            </div>
+          </el-form-item>
+          <el-form-item label="公司名称:" :label-width="formLabelWidth" prop="website_statement" class="custom-align-right">
+            <div class="formLabelFloatBox">
+              <el-input type="text" v-model="form.website_statement" placeholder="请输入.."></el-input>
+            </div>
+          </el-form-item>
+          <el-form-item label="公司网址:" :label-width="formLabelWidth" prop="website_statement" class="custom-align-right">
+            <div class="formLabelFloatBox">
+              <el-input type="text" v-model="form.website_statement" placeholder="请输入.."></el-input>
+            </div>
+          </el-form-item>
+          <el-form-item label="网站备案号:" :label-width="formLabelWidth" prop="website_statement" class="custom-align-right">
+            <div class="formLabelFloatBox">
+              <el-input type="text" v-model="form.website_statement" placeholder="请输入.."></el-input>
+            </div>
+          </el-form-item>
+          <el-form-item label="网安备案号:" :label-width="formLabelWidth" prop="website_statement" class="custom-align-right">
+            <div class="formLabelFloatBox">
+              <el-input type="text" v-model="form.website_statement" placeholder="请输入.."></el-input>
+            </div>
+          </el-form-item>
+          <el-form-item label="客服QQ号:" :label-width="formLabelWidth" prop="website_statement" class="custom-align-right">
+            <div class="formLabelFloatBox">
+              <el-input type="text" v-model="form.website_statement" placeholder="请输入.."></el-input>
+            </div>
+          </el-form-item>
         </div>
       </div>
     </el-form>
@@ -243,6 +294,9 @@ export default {
 </script>
 
 <style scoped lang="less">
+  .stepBox {
+    margin: 30px 30px 20px 30px;
+  }
   .formDiv{
     background: #F5F7FB;
     padding: 10px 20px 10px 20px;

+ 329 - 0
src/views/template/templateStyle.vue

@@ -0,0 +1,329 @@
+<template>
+  <div class="mainBox">
+    <div class="stepBox">
+      <el-steps :active="2" align-center>
+        <el-step title="填写模板基本信息" description="设置类型和网站底部信息" />
+        <el-step title="选择模板风格" description="确定网站整体风格和样式" />
+        <el-step title="配置网站模块" description="选择展示哪些模块到网页" />
+        <el-step title="应用网站模板" description="应用该模板到您的站点" />
+      </el-steps>
+    </div>
+    <!--搜索功能 start------------------------------------------------------------>
+    <div class="layerBox_search">
+      <div class="layerBoxLine">
+        <el-row>
+          <el-col :span="8">
+            <div class="searchBox">
+              <div class="searchTitle">模板风格</div>
+              <el-select v-model="getApiData.islink" placeholder="请选择..">
+                <el-option label="全部" value="0"></el-option>
+                <el-option label="简约" value="1"></el-option>
+                <el-option label="商务" value="2"></el-option>
+                <el-option label="科技" value="3"></el-option>
+                <el-option label="金融" value="4"></el-option>
+                <el-option label="教育" value="5"></el-option>
+                <el-option label="医疗" value="6"></el-option>
+                <el-option label="政府" value="7"></el-option>
+              </el-select>
+            </div>
+          </el-col>
+          <el-col :span="16">
+            <div class="searchBtnBox">
+              <el-button @click="clearSearchList">重置</el-button>
+              <el-button type="primary" @click="getData('search')">搜索</el-button>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+    <!--搜索功能 end------------------------------------------------------------>
+    <!--表格内容 start------------------------------------------------------------>
+    <div class="layerBox">
+      <tableTitle :name="tableDivTitle"/>
+      <div class="templateStyleBox">
+        <div class="templateStyleItem" v-for="(item,index) in tableData" :key="index">
+          <div :class="['templateStyleItemBox',{active:item.status === 1}]" @click="useIt(item.id)">
+            <img :src="item.img">
+            <div class="templateStyleItemTitle">{{item.title}}</div>
+          </div>
+        </div>
+      </div>
+      <div class="paginationBox">
+        <el-pagination @size-change="handleSizeChange" :current-page="getApiData.page" @current-change="handleCurrentChange" :page-size="10" layout="total, prev, pager, next, jumper" :total="allCount"></el-pagination>
+      </div>
+    </div>
+    <div class="layerBox">
+      <tableTitle :name="useTemplateName"/>
+      <div class="thumbnailBox">
+        <div class="thumbnailItem">
+          <div class="thumbnailItemBox">
+            <img src="@/assets/template/style1.png">
+            <div class="thumbnailItemTitle">首页</div>
+          </div>
+        </div>
+        <div class="thumbnailItem">
+          <div class="thumbnailItemBox">
+            <img src="@/assets/template/style1.png">
+            <div class="thumbnailItemTitle">分类页</div>
+          </div>
+        </div>
+        <div class="thumbnailItem">
+          <div class="thumbnailItemBox">
+            <img src="@/assets/template/style1.png">
+            <div class="thumbnailItemTitle">列表页</div>
+          </div>
+        </div>
+        <div class="thumbnailItem">
+          <div class="thumbnailItemBox">
+            <img src="@/assets/template/style1.png">
+            <div class="thumbnailItemTitle">详情页</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!--步骤按钮 start------------------------------------------------------------>
+    <div class="btnBox">
+      <el-button type="info" @click="goBase">上一步</el-button>
+      <el-button type="primary" @click="goCreat">下一步</el-button>
+    </div>
+    <!--步骤按钮 end------------------------------------------------------------>
+    <!--表格内容 end------------------------------------------------------------>
+  </div>
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle';
+//引入公用样式
+import '@/styles/global.less';
+
+export default {
+  components: {
+    tableTitle,//表格标题
+  },
+  data() {
+    return {
+      //1.列表和分页相关 start ------------------------------------------------------------>
+      tableDivTitle:"模板列表",
+      useTemplateName:"已选择风格",
+      tableData:[
+        {id:1,img:require("@/assets/template/style1.png"),title:"廉政风云",status:1},
+        {id:2,img:require("@/assets/template/style2.png"),title:"误判",status:0},
+        {id:3,img:require("@/assets/template/style3.png"),title:"逆转裁判",status:0},
+        {id:4,img:require("@/assets/template/style4.png"),title:"寒战",status:0},
+        {id:5,img:require("@/assets/template/style5.png"),title:"冲锋车",status:0},
+        {id:6,img:require("@/assets/template/style6.png"),title:"无间道",status:0},
+        {id:7,img:require("@/assets/template/style7.png"),title:"机动部队",status:0},
+        {id:8,img:require("@/assets/template/style8.png"),title:"枪火",status:0},
+      ],//内容
+      editId:0,//要修改的网站id
+      getApiData:{
+        title:"",//标题
+        category_name:"",//导航池id
+        author:"",//作者
+        islink:"",//是否使用外链
+        status:"",//资讯状态
+        page:1,//当前是第几页
+        pageSize:10,//一共多少条
+      },
+      allCount:0,//总条数
+      //分页相关 end ------------------------------------------------------------>
+    }
+  },
+  methods: {
+    //1.列表和分页相关 start ------------------------------------------------------------>
+    //1.1 开始请求列表信息方法
+    getData(type){
+      if(type=="search"){
+        this.getApiData.page = 1;
+      }
+      this.$store.dispatch('news/getArticleList',this.getApiData).then(res=> {
+        //格式化:islink=0为不使用外面 islink=1为使用外链
+        //status=1为显示 status=2为不显示
+        let data = [];
+        for(let item of res.data.rows){
+          // if(item.status==0){item.status="隐藏"}
+          // if(item.status==1){item.status="显示"}
+          // if(item.status==404){item.status="已删除"}
+          if(item.islink==0){item.islink="否"}
+          if(item.islink==1){item.islink="是"}
+          data.push(item)
+        }
+        this.tableData = res.data.rows; //给与内容
+        this.allCount = res.data.count; //给与总条数
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '网络错误,请重试!'
+        });
+      })
+    },
+    
+    //选择风格
+    useIt(id){
+      console.log(id)
+      this.tableData.forEach(item=>{
+        item.status = 0;
+      })
+      this.tableData.find(item=>item.id==id).status = 1;
+
+      
+    },
+
+
+
+
+
+
+
+
+
+
+
+
+
+    //1.4 列表内容分页
+    //直接跳转
+    handleSizeChange(val) {
+      this.getApiData.page = val;
+      this.getData();
+    },
+    //1.5 点击分页
+    handleCurrentChange(val) {
+      this.getApiData.page = val;
+      this.getData();
+    },
+    //1.6 重置按钮
+    clearSearchList(){
+      this.tableData = [];
+      this.getApiData.title = "";
+      this.getApiData.category_name = "";
+      this.getApiData.author = "";
+      this.getApiData.islink = "";
+      this.getApiData.status = "";
+      this.getApiData.page = 1;
+      this.getApiData.pageSize = 10;
+      this.getData();
+    },
+    //列表和分页相关 end ------------------------------------------------------------>
+
+    //2.添加新闻 start ------------------------------------------------------------>
+    //跳转到资讯发布页面
+    goBase(){
+      this.$router.push({
+        path: '/templateBase',
+      });
+    },
+    goCreat(id){
+      let data = {
+        id:id
+      }
+      this.$router.push({
+        path: '/templateCreat',
+        query: data
+      });
+    }
+    //添加新闻 end ------------------------------------------------------------>
+  },
+  mounted(){
+    //1.获得初始数据
+    //this.getData();
+  }
+}
+</script>
+
+<style scoped lang="less">
+  .stepBox {
+    margin: 30px 30px 20px 30px;
+  }
+  .searchBtnBox {
+    padding-top: 26px;
+    text-align: right;
+  }
+  .paginationBox {
+    padding: 20px 0 0 0;
+    text-align: center;
+  }
+  .btnBox {
+    padding:0 0 40px 0;
+    text-align: center;
+  }
+  .thumbnailBox {
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+    justify-content:flex-start;
+    .thumbnailItem {
+      //width: 12.5%;
+      width: 180px;
+      height: 180px;
+      text-align: center;
+      padding: 0 10px 10px 10px;
+      .thumbnailItemBox {
+        background: #ECEFFD;
+        border-radius: 10px;
+        position: relative;
+        cursor: pointer;
+        .thumbnailItemTitle {
+          position: absolute;
+          bottom: 10px;
+          left: 10px;
+          background: rgba(0,0,0,0.5);
+          color: #fff;
+          font-size: 14px;
+          text-align: center;
+          padding: 5px 10px;
+          border-radius: 4px;
+        }
+      }
+    }
+    img {
+      height: 180px;
+    }
+  }
+  .templateStyleBox {
+    padding: 20px 20px 0 20px;
+    background-color: #F5F7FB;
+    display: flex;
+    flex-wrap: wrap;
+    .templateStyleItem {
+      width: 20%;
+      box-sizing: border-box;
+      padding: 10px 10px 10px 10px;
+      text-align: center;
+      cursor: pointer;
+      margin-bottom: 20px;
+      .templateStyleItemBox {
+        background: #fff;
+        border-radius: 10px;
+        padding-top: 10px;
+        border-top: 5px solid #E9EDF7;
+        border-bottom: 5px solid #E9EDF7;
+        border-left: 1px solid #E9EDF7;
+        border-right: 1px solid #E9EDF7;
+        // &:hover {
+        //   border-top: 5px solid #E9EDF7;
+        //   border-bottom: 5px solid #E9EDF7;
+        //   border-left: 1px solid #E9EDF7;
+        //   border-right: 1px solid #E9EDF7;
+        // }
+      }
+      .active {
+        border-top: 5px solid #5570F1;
+        border-bottom: 5px solid #5570F1;
+        border-left: 1px solid #5570F1;
+        border-right: 1px solid #5570F1;
+      }
+      .templateStyleItemTitle {
+        font-size: 14px;
+        color: #333;
+        text-align: center;
+        padding: 10px 0;
+      }
+      img {
+        width: 100%;
+      }
+    }
+  }
+</style>
+