瀏覽代碼

栏目类型上线到正式环境

Jing 12 小時之前
父節點
當前提交
169a1fb114

+ 2 - 4
src/views/job/creatJob.vue

@@ -339,8 +339,6 @@ export default {
         due_data: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         // 薪水
         salary: [{ required: true, trigger: 'change', validator: validateZero }],
-        // 公司性质
-        company_nature: [{ required: true, trigger: 'change', validator: validateEmpty }],
 
 
         // 公司名称
@@ -423,7 +421,7 @@ export default {
           }
 
           let parames = {
-            // 'type': 4,
+            'type': 4,
             'website_id': this.websiteid ? this.websiteid : 0,
             'pid': parentId ? parentId : 0
 
@@ -721,7 +719,7 @@ export default {
           this.form.jt_description = res.data.jt_description;//具体要求
           if (res.data.job_level == 0 || res.data.job_level == null || res.data.job_level == '') {
             this.form.job_level = '';  //推荐等级
-          } else {
+          }else{
             this.form.job_level = Number(res.data.job_level);  //推荐等级
           }
           this.form.business_name = res.data.business_name;

+ 7 - 14
src/views/news/addBook.vue

@@ -8,12 +8,11 @@
         <div class="formDiv">
 
           <el-form-item label="站点名称:" prop="website_id" class="custom-align-right" v-if="userType == 10000">
-            <el-select v-model="form.website_id" placeholder="请选择站点名称" filterable clearable @change="get_WebSite_id">
+            <el-select v-model="form.website_id" placeholder="请选择站点名称" filterable clearable>
               <el-option v-for="item in websiteOptions" :key="item.value" :label="item.label" :value="item.value">
               </el-option>
             </el-select>
           </el-form-item>
-
           <el-form-item label="栏目名称:" prop="cat_arr_id" class="custom-align-right">
             <el-cascader :key="parentKey" v-model="form.cat_arr_id" placeholder="请选择要绑定的栏目名称" :props="parentData"
               filterable clearable></el-cascader>
@@ -192,8 +191,8 @@ export default {
       }
     }
     const validateEmpty = (rule, value, callback) => {
-      console.log(value, '-------------------------------')
-      if (value.length == 0) {
+      console.log(value, '-----------validateEmpty--------------------')
+      if (value == '') {
         callback(new Error('该项不能为空!'))
       } else {
         callback()
@@ -355,6 +354,7 @@ export default {
           let website_id = self.form.website_id == '' ? 2 : self.form.website_id;
           console.log(website_id, 'website_id--111-----');
           let parames = {
+            'type': 3,
             'website_id': website_id,
             'pid': pid
           }
@@ -364,6 +364,7 @@ export default {
                 value: item.category_id,
                 label: item.alias,
                 leaf: level >= 3,
+                disabled: item.type != 3,
                 children: []
               }))
               resolve(nodes)
@@ -414,7 +415,6 @@ export default {
     async fetchWebsiteOptions() {
       try {
         const response = await this.$store.dispatch('news/websiteList', { page: 1, pageSize: 1000 });
-        console.log(response, 'response');
         if (response && response.data) {
           this.websiteOptions = response.data.rows.map(item => ({
             value: item.id,
@@ -439,10 +439,6 @@ export default {
         });
       })
     },
-    get_WebSite_id(val){
-      // this.form.website_id = val; //赋值
-      console.log(val, 'val')
-    },
     //1.提交表单 start ------------------------------------------------------------>
     beforeAvatarUpload(file) {
       const isJPG = file.type === 'image/jpeg';
@@ -508,8 +504,6 @@ export default {
           this.form.price == '' ? this.form.price = 0 : this.form.price = this.form.price;
           this.form.market_price == '' ? this.form.market_price = 0 : this.form.market_price = this.form.market_price;
           this.form.page == '' ? this.form.page = 0 : this.form.page = this.form.page;
-          console.log(this.form, 'this.form');
-          
           this.$store.dispatch('news/addBook', this.form).then(res => {
             if (res.code == 200) {
               //汇报结果
@@ -585,7 +579,7 @@ export default {
         this.form.cat_arr_id = Array.isArray(res.data.cat_arr_id) ? res.data.cat_arr_id : JSON.parse(res.data.cat_arr_id);
         this.form.city_arr_id = Array.isArray(res.data.city_arr_id) ? res.data.city_arr_id : JSON.parse(res.data.city_arr_id);
         this.parentKey += 1; // 触发级联选择器重新加载
-        this.loadCascaderPath(this.form.cat_arr_id); // 加载路径数据
+        // this.loadCascaderPath(this.form.cat_arr_id); // 加载路径数据
         //回显推荐等级
         this.form.title = res.data.title;
         this.form.website_id = res.data.website_id;
@@ -725,7 +719,6 @@ export default {
 
   },
   watch: {
-
     '$route'(to, from) {
       console.log(from, '---------------------------------------');
       // 监听路由参数中的 id 变化,若变化则更新页面状态并获取数据
@@ -834,4 +827,4 @@ export default {
   color: #999;
 }
 
-//执行v-deep穿透scope选择器 end------------------------------------------------------------>*/</style>
+//执行v-deep穿透scope选择器 end------------------------------------------------------------>*/</style>

+ 17 - 15
src/views/news/addGood.vue

@@ -10,13 +10,13 @@
               <el-radio :label="2">求购商品</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item label="商品标题:" prop="name" class="custom-align-right">
+          <el-form-item label="商品名称:" prop="name" class="custom-align-right">
             <template #label>
               <span class="askBox" v-if="form.type_id == 1">
-                商品标题
+                商品名称
               </span>
               <span class="askBox" v-if="form.type_id == 2">
-                商品标题:
+                标题:
               </span>
             </template>
             <el-input v-model="form.name" autocomplete="off" placeholder="请输入商品标题"></el-input>
@@ -166,6 +166,9 @@
           <el-form-item label="详细地址:" prop="address" class="custom-align-right">
             <el-input v-model="form.address" autocomplete="off" placeholder="请输入详细地址"></el-input>
           </el-form-item>
+
+
+
         </div>
       </el-form>
     </div>
@@ -223,6 +226,7 @@ export default {
         callback()
       }
     }
+
     function validatePhone(phone) {
       // 正则表达式:11位数字,以1开头
       const regex = /^1\d{10}$/;
@@ -238,8 +242,8 @@ export default {
     let self = this;
     //0.全局操作 end ------------------------------------------------------------>
     return {
-      user_type: 0,//用户类型
       userType: 0,
+      user_type: 0,
       websiteOptions: [],
       checked: false,
       formLabelWidth: '80px',//表单的长度
@@ -253,8 +257,7 @@ export default {
       imgUrl: [],//图片数组
       //提交表单
       form: {
-        //1.
-        com: '',//公司名称
+        //1.1使用了外链
         name: '',//商品标题
         type_id: 1,//布类型:1:供应,2求购
         city_arr_id: [],//行政区划
@@ -283,6 +286,7 @@ export default {
         address: '',
         city_id: '',
         imgurl: [],//缩略图
+        com: '',
       },
       //1.2 表单验证规则
       formRules: {
@@ -297,7 +301,7 @@ export default {
 
         price: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         unit: [{ required: true, trigger: 'blur', validator: validateEmpty }],
-        validity: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        validity: [{ required: true, trigger: 'blur', validator: validateNull }],
         description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         detail: [{ required: true, trigger: 'blur', validator: validateEmpty }],
 
@@ -424,6 +428,7 @@ export default {
           let website_id = self.form.website_id == '' ? 2 : self.form.website_id;
           console.log(website_id, 'website_id--111-----');
           let parames = {
+            'type': 2,
             'website_id': website_id,
             'pid': pid
           }
@@ -433,6 +438,7 @@ export default {
                 value: item.category_id,
                 label: item.alias,
                 leaf: level >= 3,
+                disabled: item.type != 2,
                 children: []
               }))
               resolve(nodes)
@@ -652,7 +658,7 @@ export default {
         id: this.$route.query.id
       };
       this.$store.dispatch('news/getGoodInfo', data).then(res => {
-        console.log('res', res);
+        console.log(res);
         this.form.name = res.data.name;
         // 回显导航池
         this.form.cat_arr_id = Array.isArray(res.data.cat_arr_id) ? res.data.cat_arr_id : JSON.parse(res.data.cat_arr_id);
@@ -676,10 +682,7 @@ export default {
         this.form.description = res.data.description;
         //回显编辑器内容
         this.$nextTick(() => {
-          if (res.data.detail) {
-            this.form.detail = res.data.detail;
-          }
-          // this.form.detail = res.data.detail;
+          this.form.detail = res.data.detail;
         });
         this.form.hits = res.data.hits;
         this.form.contact = res.data.contact;
@@ -714,7 +717,7 @@ export default {
           .then((res) => {
             const nodes = res.data.map(item => ({
               value: item.id,
-              label: item.name,
+              label: item.alias,
               leaf: level >= 3, // 假设4层结构,设置叶子节点标记
             }));
             // 级联选择器加载数据
@@ -970,7 +973,6 @@ export default {
 
 .imgBox {
   color: #999;
-  font-size: 14px;
 }
 
-//执行v-deep穿透scope选择器 end------------------------------------------------------------>*/</style>
+//执行v-deep穿透scope选择器 end------------------------------------------------------------>*/</style>

+ 1 - 1
src/views/news/addJobHunting.vue

@@ -599,7 +599,7 @@ export default {
           }
 
           let parames = {
-            // 'type': 5,
+            'type': 5,
             'website_id': this.websiteid ? this.websiteid : 0,
             'pid': parentId ? parentId : 0
           }

+ 37 - 6
src/views/website/categoryList.vue

@@ -34,7 +34,7 @@
             <el-table-column prop="name" label="栏目名称">
               <template slot-scope="scope">
                 <span :class="{ highlight: isHighlight(scope.row, search) }" v-if="scope.row.pid == 0">{{ scope.row.name
-                  }}</span>
+                }}</span>
                 <span :class="{ highlight: isHighlight(scope.row, search) }" v-else>____{{ scope.row.name }}</span>
               </template>
             </el-table-column>
@@ -54,7 +54,8 @@
                       class="el-icon-delete"></i>删除</div>
                   <div class="listEditBtn" @click="getDataMain(scope.row.id, tableData)"><i
                       class="el-icon-edit-outline"></i>编辑</div>
-                  <!-- <div class="listMainBtn" @click="addCategoryList(scope.row)"><i class="el-icon-document-add"></i>添加</div> -->
+                  <!-- <div class="listMainBtn" @click="addCategoryList(scope.row)"><i class="el-icon-document-add"></i>添加
+                  </div> -->
                 </div>
                 <!-- <el-button @click.native.prevent="deleteData(scope.row.id, tableData)" type="text" size="small">删除</el-button>
                 <el-button @click.native.prevent="getDataMain(scope.row.id, tableData)" type="text" size="small">编辑</el-button> -->
@@ -83,7 +84,8 @@
       <el-form :model="form" ref="form" :rules="formRules" autocomplete="off" label-position="left">
         <div class="formDiv">
           <el-form-item label="栏目名称:" :label-width="formLabelWidth" prop="name" class="custom-align-right">
-            <el-input v-model="form.name" autocomplete="off" placeholder="请输入栏目名称"></el-input>
+            <el-input v-model="form.name" autocomplete="off" placeholder="请输入栏目名称"
+              :disabled="editId ? true : false"></el-input>
             <el-checkbox v-model="show_url" @change="ifUrl">引用外链</el-checkbox>
           </el-form-item>
           <div v-if="show_url == 1">
@@ -115,6 +117,32 @@
             <el-form-item label="父级栏目:" :label-width="formLabelWidth" class="custom-align-right">
               <el-cascader :key="parentKey" v-model="form.pid_arr" placeholder="请选择要绑定的父级栏目" :props="parentData"
                 filterable clearable></el-cascader>
+            </el-form-item>
+            <el-form-item label="栏目类型:" :label-width="formLabelWidth" prop="type" class="custom-align-right">
+              <template #label>
+                <span class="askBox">
+                  栏目类型:
+                  <el-tooltip class="item" effect="dark" content=" 选择类型提交后不可更改,请谨慎考虑后提交!" placement="top">
+                    <i class="el-icon-question"></i>
+                  </el-tooltip>
+                </span>
+              </template>
+
+              <el-radio-group v-model="form.type" size="small" :disabled="editId ? true : false">
+                <el-radio-button label="1">资讯</el-radio-button>
+                <el-radio-button label="2">商品</el-radio-button>
+                <el-radio-button label="3">书刊音响</el-radio-button>
+                <el-radio-button label="4">招聘</el-radio-button>
+                <el-radio-button label="5">求职</el-radio-button>
+                <el-radio-button label="6">企业</el-radio-button>
+                <el-radio-button label="7">项目</el-radio-button>
+              </el-radio-group>
+              <!-- 选择类型提交后不可更改,请谨慎考虑后提交! 提示词 -->
+              <div style="color: brown;">
+                选择类型提交后不可更改,请谨慎考虑后提交!
+              </div>
+
+
             </el-form-item>
             <el-form-item label="栏目标题:" :label-width="formLabelWidth" prop="" class="custom-align-right">
               <template #label>
@@ -313,6 +341,7 @@ export default {
         seo_title: "",//标题
         seo_keywords: "",//关键词
         seo_description: "",//描述
+        type: 1,//栏目类型
         pid_arr: []//父级栏目
       },
       //4.2表单验证规则
@@ -554,6 +583,7 @@ export default {
         // this.form.department_arr_id = [];
         // this.form.city_arr_id = [];
         this.form.pid_arr = [];
+        this.form.type = 1;
       }
       if (type == 2) { //type2 全部清理
         this.form.name = "";
@@ -566,6 +596,7 @@ export default {
         this.form.seo_keywords = "";
         this.form.seo_description = "";
         this.form.pid_arr = [];
+        this.form.type = 1;
         //存在验证的时候再清理
         if (this.$refs.form && this.$refs.form.fields.some(field => field.validateState === 'error')) {
           this.$refs.form.clearValidate();
@@ -629,7 +660,7 @@ export default {
       this.$store.dispatch('pool/getCategoryInfo', { id: id }).then(res => {
         //清除错误状态
         //this.$refs.form.clearValidate();
-        // console.log(res)
+        console.log('resres',res)
         //回显栏目池名称
         this.form.name = res.data.name;
 
@@ -666,6 +697,7 @@ export default {
         this.form.seo_keywords = res.data.seo_keywords;
         this.tags = res.data.seo_keywords ? res.data.seo_keywords.split(',') : [];
         this.form.seo_description = res.data.seo_description;
+        this.form.type = res.data.type;
 
         //回显排序
         this.form.sort = res.data.sort;
@@ -794,7 +826,6 @@ export default {
     top: 12px;
     left: 8px;
   }
-
 }
 
 
@@ -810,4 +841,4 @@ export default {
   }
 }
 
-//表单微调 end------------------------------------------------------------>*/</style>
+//表单微调 end------------------------------------------------------------>*/</style>

+ 117 - 106
src/views/website/editNavigation.vue

@@ -5,7 +5,7 @@
         <el-col :span="8">
           <div class="searchBox">
             <div class="searchTitle">栏目名称:</div>
-            <el-input v-model="search"   placeholder="请输入栏目名称"  :clearable="true"/>
+            <el-input v-model="search" placeholder="请输入栏目名称" :clearable="true" />
             <!-- <el-input placeholder="请输入栏目名称" autocomplete="off" v-model="getApiData.name" /> -->
           </div>
         </el-col>
@@ -66,41 +66,46 @@
 
     <!--表格内容 start------------------------------------------------------------>
     <div class="layerBox">
-      <tableTitle :name="tableDivTitle"/>
+      <tableTitle :name="tableDivTitle" />
       <el-row>
         <template>
-          <el-table   
-            :data="tableData.filter(data => searchFilter(data, search))"
-            style="width: 100%"
-            row-key="id"
-            :default-expand-all="isExpandAll"
-            :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
-            :row-class-name="tableRowClassName"
-            >
+          <el-table :data="tableData.filter(data => searchFilter(data, search))" style="width: 100%" row-key="id"
+            :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+            :row-class-name="tableRowClassName">
             <el-table-column fixed prop="category_id" label="编号" width="180"></el-table-column>
             <el-table-column prop="name" label="栏目名称">
               <template slot-scope="scope">
-                <span :class="{ highlight: isHighlight(scope.row, search) }" v-if="scope.row.pid==0">{{ scope.row.name }}</span>
-                <span :class="{ highlight: isHighlight(scope.row, search)}"  v-else>____{{ scope.row.name }}</span>
+                <span :class="{ highlight: isHighlight(scope.row, search) }" v-if="scope.row.pid == 0">{{ scope.row.name
+                }}</span>
+                <span :class="{ highlight: isHighlight(scope.row, search) }" v-else>____{{ scope.row.name }}</span>
               </template>
             </el-table-column>
             <el-table-column prop="alias" label="展示名称"></el-table-column>
-            <el-table-column label="排序"    width="95">
-            <template slot-scope="scope" >
-              <el-input
-                v-model="scope.row.sort"
-                @blur="handleBlur(scope.row)"
-                placeholder="请输入排序值"
-                maxlength="5"
-              ></el-input>
-            </template>
-          </el-table-column>
+            <el-table-column prop="type" label="栏目类型">
+              <template slot-scope="scope">
+                <span v-if="scope.row.type == 1">资讯</span>
+                <span v-else-if="scope.row.type == 2">商品</span>
+                <span v-else-if="scope.row.type == 3">书刊音像</span>
+                <span v-else-if="scope.row.type == 4">招聘</span>
+                <span v-else-if="scope.row.type == 5">求职</span>
+                <span v-else-if="scope.row.type == 6">企业</span>
+                <span v-else-if="scope.row.type == 7">项目</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="排序" width="95">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" placeholder="请输入排序值"
+                  maxlength="5"></el-input>
+              </template>
+            </el-table-column>
             <el-table-column prop="created_at" label="创建时间"></el-table-column>
             <el-table-column prop="updated_at" label="修改时间"></el-table-column>
             <el-table-column fixed="right" label="操作" width="120" header-align="center">
               <template slot-scope="scope">
                 <div class="listBtnBox">
-                  <div class="listEditBtn" @click="editRow(scope.row.category_id)"><i class="el-icon-edit-outline"></i>编辑</div>
+                  <div class="listEditBtn" @click="editRow(scope.row.category_id)"><i
+                      class="el-icon-edit-outline"></i>编辑
+                  </div>
                 </div>
               </template>
             </el-table-column>
@@ -129,8 +134,8 @@
             <input type="hidden" v-model="form.seo_title">
           </el-form-item>
 
-          <el-form-item label="名称拼音:" :label-width="formLabelWidth"  class="custom-align-right">
-            <el-input v-model="form.alias_pinyin" autocomplete="off"></el-input>
+          <el-form-item label="名称拼音:" :label-width="formLabelWidth" class="custom-align-right">
+            <el-input v-model="form.alias_pinyin" autocomplete="off" disabled></el-input>
           </el-form-item>
 
           <el-form-item label="展示标题:" :label-width="formLabelWidth" prop="seo_title" class="custom-align-right">
@@ -140,7 +145,7 @@
           </el-form-item>
           <el-form-item label="展示关键词:" :label-width="formLabelWidth" prop="seo_keywords" class="custom-align-right">
             <div class="formLabelFloatBox">
-              <inputTag  :initialTags="tags" @tags-updated="updateTags"/> 
+              <inputTag :initialTags="tags" @tags-updated="updateTags" />
               <!-- <inputTag  :initialTags="form.seo_keywords" @tags-updated="updateTags"/> -->
               <!-- <el-input v-model="form.seo_keywords" autocomplete="off"></el-input> -->
             </div>
@@ -150,7 +155,7 @@
           </el-form-item>
           <el-form-item label="排序:" :label-width="formLabelWidth" prop="sort" class="custom-align-right">
             <div class="formLabelFloatBox">
-              <el-input v-model="form.sort" autocomplete="off" ></el-input>
+              <el-input v-model="form.sort" autocomplete="off"></el-input>
             </div>
           </el-form-item>
         </div>
@@ -183,7 +188,7 @@ export default {
   data() {
     //0.全局操作 start ------------------------------------------------------------>
     //表单验证
-    const validateEmpty = (rule,value,callback) => {
+    const validateEmpty = (rule, value, callback) => {
       if (value.length == 0) {
         callback(new Error('该项不能为空!'))
       } else {
@@ -198,35 +203,35 @@ export default {
       search: '',
       tags: [],
       //1.列表和分页相关 start ------------------------------------------------------------>
-      tableDivTitle:"栏目详情",
+      tableDivTitle: "栏目详情",
       tableData: [],//列表
-      allCount:0,//总条数
-      editId:0,//要修改的网站id
-      getApiData:{
-        website_id:0,//网站id
-        name:"",//导航名称
-        alias:"",//网站导航名称
-        city_id:"",//行政区划
-        department_id:"",//行政职能部门
-        page:1,//当前是第几页
-        pageSize:10,//一共多少条
+      allCount: 0,//总条数
+      editId: 0,//要修改的网站id
+      getApiData: {
+        website_id: 0,//网站id
+        name: "",//导航名称
+        alias: "",//网站导航名称
+        city_id: "",//行政区划
+        department_id: "",//行政职能部门
+        page: 1,//当前是第几页
+        pageSize: 10,//一共多少条
       },
-      website_column_arr:[],//获得的网系
+      website_column_arr: [],//获得的网系
       //分页相关 end ------------------------------------------------------------>
 
       //2.弹出框设置 start ------------------------------------------------------------>
       //是否显示弹出窗口
-      windowStatus:false,
+      windowStatus: false,
       formLabelWidth: '120px',
       //弹出框设置 end ------------------------------------------------------------>
 
       //3.搜索相关 start ------------------------------------------------------------>
       //3.1获得职能部门
-      searchDepartmentKey:0,
+      searchDepartmentKey: 0,
       searchDepartmentData: {
         checkStrictly: true,
         lazy: true,
-        async lazyLoad (node, resolve) {
+        async lazyLoad(node, resolve) {
           const { level, data } = node;
           if (data && data.children && data.children.length !== 0) {
             return resolve(node)
@@ -234,14 +239,15 @@ export default {
           console.log(level)
           let parentId = level == 0 ? 0 : data.value
           let parames = {
-            'pid':parentId
+            'pid': parentId
           }
-          self.$store.dispatch('pool/getDepartment',parames).then(res=> {
+          self.$store.dispatch('pool/getDepartment', parames).then(res => {
             if (res.data) {
               const nodes = res.data.map(item => ({
                 value: item.id,
                 label: item.name,
                 leaf: level >= 3,
+                disabled: item.type != 1,
                 children: []
               }))
               resolve(nodes)
@@ -250,11 +256,11 @@ export default {
         }
       },
       //3.2获得行政区划
-      searchCascaderKey:0, //列表缓存key
+      searchCascaderKey: 0, //列表缓存key
       searchCityData: {
         checkStrictly: true,
         lazy: true,
-        async lazyLoad (node, resolve) {
+        async lazyLoad(node, resolve) {
           const { level, data } = node;
           if (data && data.children && data.children.length !== 0) {
             return resolve(node)
@@ -262,9 +268,9 @@ export default {
           console.log(level)
           let parentId = level == 0 ? 0 : data.value
           let parames = {
-            'pid':parentId
+            'pid': parentId
           }
-          self.$store.dispatch('pool/getcityList',parames).then(res=> {
+          self.$store.dispatch('pool/getcityList', parames).then(res => {
             if (res.data) {
               const nodes = res.data.map(item => ({
                 value: item.id,
@@ -282,47 +288,47 @@ export default {
       //3.弹出框中的表单设置 start ------------------------------------------------------------>
       //3.1 表单收集的数据
       form: {
-        website_id:0,//网站id
-        category_id:0,//导航id
-        alias:"",//导航名称
-        alias_pinyin:"",//导航名称拼音
-        seo_title:"",//导航seo名称
-        seo_keywords:"",//导航关键词
-        seo_description:"",//导航描述
-        sort:0//排序
+        website_id: 0,//网站id
+        category_id: 0,//导航id
+        alias: "",//导航名称
+        alias_pinyin: "",//导航名称拼音
+        seo_title: "",//导航seo名称
+        seo_keywords: "",//导航关键词
+        seo_description: "",//导航描述
+        sort: 0//排序
       },
       //3.2表单验证规则
       formRules: {
         //网站名称不能为空
-        alias:[{required:true,trigger:'blur',validator:validateEmpty}],
-        sort:[{required:true,trigger:'blur',validator:validateEmpty}],
+        alias: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        sort: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         //网站标题,关键词,描述不能为空
-        seo_title:[{required:true,trigger:'blur',validator:validateEmpty}],
-        seo_keywords:[{required:true,trigger:'blur',validator:validateEmpty}],
-        seo_description:[{required:true,trigger:'blur',validator:validateEmpty}],
+        seo_title: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        seo_keywords: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        seo_description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
       },
       //弹出框中的表单设置 end ------------------------------------------------------------>
     }
   },
   methods: {
-      tableRowClassName({row, rowIndex}) {
-        if (row.pid == 0) {
-          return 'warning-row';
-        } 
-        return '';
-      },
+    tableRowClassName({ row, rowIndex }) {
+      if (row.pid == 0) {
+        return 'warning-row';
+      }
+      return '';
+    },
     //1.列表和分页相关 start ------------------------------------------------------------>
     //1.1 获取内容
-    getData(){
+    getData() {
       //行政职能部门提交最后一个
-      if(this.getApiData.department_id.length>0){
+      if (this.getApiData.department_id.length > 0) {
         this.getApiData.department_id = this.getApiData.department_id[this.getApiData.department_id.length - 1];
       }
       //城市id提交最后一个
-      if(this.getApiData.city_id.length>0){
+      if (this.getApiData.city_id.length > 0) {
         this.getApiData.city_id = this.getApiData.city_id[this.getApiData.city_id.length - 1];
       }
-      this.$store.dispatch('pool/getWebsiteAllCategory',this.getApiData).then(res=> {
+      this.$store.dispatch('pool/getWebsiteAllCategory', this.getApiData).then(res => {
         let data = res.data;
         this.tableData = data;//放入数据
         // this.allCount = res.data.count;//放入总条数
@@ -340,7 +346,7 @@ export default {
     //   this.getData();
     // },
     //1.4 重置按钮
-    clearSearchList(){
+    clearSearchList() {
       this.tableData = [];
       this.getApiData.alias = "";
       this.getApiData.name = "";
@@ -359,12 +365,12 @@ export default {
       this.windowStatus = true;
     },
     //2.2 关闭弹出框
-    closeWindow(){
+    closeWindow() {
       this.windowStatus = false;
       this.clearToServe();
     },
     //2.3 清空提交窗口
-    clearToServe(){
+    clearToServe() {
       //重置窗口
       this.editId = "";
       this.form.website_id = 0;
@@ -379,13 +385,13 @@ export default {
 
     //4.编辑导航 start ------------------------------------------------------------>
     //回显数据
-    editRow(id){
+    editRow(id) {
       this.openWindow();
       let data = {
-        website_id:this.$route.query.website_id,
-        category_id:id
+        website_id: this.$route.query.website_id,
+        category_id: id
       }
-      this.$store.dispatch('pool/getWebsiteCategoryOnes',data).then(res=> {
+      this.$store.dispatch('pool/getWebsiteCategoryOnes', data).then(res => {
         // console.log(res.data)
         this.form.website_id = this.$route.query.website_id;
         this.form.category_id = id;
@@ -393,18 +399,18 @@ export default {
         this.form.alias = res.data.alias;
         this.form.seo_title = res.data.seo_title;
         this.form.seo_keywords = res.data.seo_keywords;
-        this.tags = res.data.seo_keywords?res.data.seo_keywords.split(','):[];
+        this.tags = res.data.seo_keywords ? res.data.seo_keywords.split(',') : [];
         this.form.seo_description = res.data.seo_description;
         this.form.sort = res.data.sort;
       })
     },
     //提交编辑的数据
-    addToServe(){
+    addToServe() {
       //把标题的值给与seo_title
       // this.form.seo_title = this.form.alias;
       this.$refs.form.validate(valid => {
         if (valid) {
-          this.$store.dispatch('pool/upWebsiteCategoryones',this.form).then(res=> {
+          this.$store.dispatch('pool/upWebsiteCategoryones', this.form).then(res => {
             //汇报结果
             this.$message({
               type: 'success',
@@ -425,32 +431,32 @@ export default {
     },
     //编辑导航 end ------------------------------------------------------------>
     updateTags(newTags) {
-            // this.foem.seo_keywords = newTags;
-            this.tags = newTags;
-            this.form.seo_keywords = newTags.join(',');
+      // this.foem.seo_keywords = newTags;
+      this.tags = newTags;
+      this.form.seo_keywords = newTags.join(',');
     },
     handleBlur(row) {
       const inputValue = row.sort;
       if (/^\d+$/.test(inputValue)) {
         row.sort = parseInt(inputValue, 10);
         let parems = {
-            'website_id':row.website_id,
-            'id':row.id,
-            'sort':row.sort
+          'website_id': row.website_id,
+          'id': row.id,
+          'sort': row.sort
         }
-        this.$store.dispatch('pool/upWebsiteCategorySort',parems).then(res=> {
-            //汇报结果
-            this.$message({
-              type: 'success',
-              message: '排序修改成功!'
-            });
-            this.getData();
-          }).catch(() => {
-            this.$message({
-              type: 'info',
-              message: '网络错误,请重试!'
-            });
-          })
+        this.$store.dispatch('pool/upWebsiteCategorySort', parems).then(res => {
+          //汇报结果
+          this.$message({
+            type: 'success',
+            message: '排序修改成功!'
+          });
+          this.getData();
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '网络错误,请重试!'
+          });
+        })
         // 这里可以添加保存数据到后端的逻辑,例如使用 axios 发送请求
         console.log('数据保存成功:', row);
       } else {
@@ -480,7 +486,7 @@ export default {
       return row.name.toLowerCase().includes(lowerSearch);
     },
   },
-  mounted(){
+  mounted() {
     //console.log(this.$route.query);
     //获取具体参数
     this.getApiData.website_id = this.$route.query.website_id;
@@ -492,7 +498,7 @@ export default {
   watch: {
     search(newValue, oldValue) {
       this.isExpandAll = true
-      console.log("====:",this.isExpandAll)
+      console.log("====:", this.isExpandAll)
     }
   }
 }
@@ -502,14 +508,19 @@ export default {
 ::v-deep .highlight {
   background-color: yellow;
 }
+
 //表单微调 start------------------------------------------------------------>*/
-::v-deep .custom-form-item > .el-form-item__label {
+::v-deep .custom-form-item>.el-form-item__label {
   line-height: 140px !important;
 }
+
 ::v-deep .custom-textarea .el-textarea__inner {
-  resize: none; /* 禁止用���拖拽调整大小 */
+  resize: none;
+  /* 禁止用���拖拽调整大小 */
 }
+
 ::v-deep .custom-align-right .el-form-item__label {
-  text-align: right; /* 设置标签文字右对齐 */
+  text-align: right;
+  /* 设置标签文字右对齐 */
 }
 </style>