Browse Source

CRM14.0 暂存

hbchen 1 year ago
parent
commit
76e0dd75b2

+ 1 - 0
package.json

@@ -28,6 +28,7 @@
     "crypto-js": "^3.1.9-1",
     "dependencies": "^0.0.1",
     "dll": "^0.2.0",
+    "drag-tree-table": "^2.2.0",
     "element-resize-detector": "^1.2.2",
     "element-ui": "2.13.0",
     "font-awesome": "^4.7.0",

+ 5 - 1
src/api/api.js

@@ -73,6 +73,9 @@ import {reportVarietyENInterence} from './modules/reportVariety'
 //商家管理
 import {businessCustomInterence} from './modules/businessCustom'
 
+//帮助中心
+import {assistanceDocInterence} from './modules/assistanceDoc'
+
 export {
   dataBaseInterface,
   mychartInterface,
@@ -110,7 +113,8 @@ export {
   cloudDiskInterface,
   businessTripInterence,
   reportVarietyENInterence,
-  businessCustomInterence
+  businessCustomInterence,
+  assistanceDocInterence
 };
 
 //老接口 研报 ppt等

+ 127 - 0
src/api/modules/assistanceDoc.js

@@ -0,0 +1,127 @@
+/**
+ * 帮助中心api
+ */
+import http from "@/api/http.js"
+
+export const assistanceDocInterence = {
+    /**
+     * 获取分类列表
+     * @param Keyword String分类名称
+     * @returns 
+     */
+    getAssistanceClassifyList:(params)=>{
+      return http.get('/help_doc/classify/list',params)
+    },
+    /**
+     * 新增分类
+     * @param ParentId number 父节点Id
+     * @param HelpDocClassifyName string 添加的目录名称
+     */
+    addAssistanceClassify:(params)=>{
+      return http.post('/help_doc/classify/add',params)
+    },
+    /**
+     * 编辑分类
+     * @param HelpDocClassifyId number 节点Id
+     * @param ParentId number 父节点Id
+     * @param HelpDocClassifyName string 添加的目录名称
+     */
+    editAssistanceClassify:(params)=>{
+      return http.post('/help_doc/classify/edit',params)
+    },
+    /**
+     * 删除分类
+     * @param ClassifyId number 节点Id
+     */
+    deleteAssistanceClassify:(params)=>{
+      return http.get('/help_doc/classify/delete',params)
+    },
+    /**
+     * 移动分类
+     * @param ClassifyId number 节点Id
+     * @param ParentClassifyId number 父节点Id
+     * @param PrevClassifyId number 上一个节点Id 没有为0
+     * @param NextClassifyId number 下一个节点Id 没有为0
+     */
+    moveAssistanceClassify:(params)=>{
+      return http.post('/help_doc/classify/move',params)
+    },
+    // /**
+    //  * 获取操作日志列表
+    //  * @param EtaBusinessId Integer 商家ID
+    //  */
+    // getTimeLineList:(params)=>{
+    //     return http.get('/eta_business/operate_record_list',params)
+    // },
+    // /**
+    //  * 获取商家详情
+    //  * @param EtaBusinessId Integer 商家ID
+    //  */
+    // getBusinessDetail:(params)=>{
+    //     return http.get('/eta_business/detail',params)
+    // },
+    // /**
+    //  * 添加续约
+    //  * @param EtaBusinessId Integer 商家ID
+    //  * @param SigningTime String 签约时间
+    //  * @param ExpiredTime String 到期时间
+    //  * @returns 
+    //  */
+    // addNewContract:(params)=>{
+    //     return http.post('/eta_business/signing',params)
+    // },
+    // /**
+    //  * 修改销售
+    //  * @param EtaBusinessId Integer 商家ID
+    //  * @param SellerId Integer 销售ID
+    //  * @param SellerName String 销售名称
+    //  */
+    // changeBusinessSeller:(params)=>{
+    //     return http.post('/eta_business/move_seller',params)
+    // },
+    // /**
+    //  * 启用禁用商家
+    //  * @param EtaBusinessId Integer 商家ID
+    //  */
+    // changeBusinessStatus:(params)=>{
+    //     return http.post('/eta_business/enable',params)
+    // },
+    // /**
+    //  * 编辑商家
+    //  * @param EtaBusinessId Integer 商家ID
+    //  * @param Province String 省份
+    //  * @param City String 城市
+    //  * @param Leader String 决策人姓名
+    //  * @param IndustryId Integer 行业ID
+    //  * @param IndustryName String 行业名称
+    //  * @param CapitalScale String 资金规模
+    //  * @param ResearchTeamSize String 研究团队规模
+    //  * @param UserMax Integer 用户上限
+    //  */
+    // editBusiness:(params)=>{
+    //     return http.post('/eta_business/edit',params)
+    // },
+    // /**
+    //  * 添加商家
+    //  * @param BusinessName String 商家名称
+    //  * @param CreditCode String 社会信用码
+    //  * @param RegionType String 所属区域:国内;海外
+    //  * @param Province String 省份
+    //  * @param City String 城市
+    //  * @param SellerId Integer 销售ID
+    //  * @param SellerName String 销售姓名
+    //  * @param Leader String 决策人姓名
+    //  * @param IndustryId Integer 行业ID
+    //  * @param IndustryName String 行业名称
+    //  * @param CapitalScale String 资金规模
+    //  * @param ResearchTeamSize String 研究团队规模
+    //  * @param UserMax Integer 用户上限
+    //  * @param SigningTime String 签约时间(IsCheck为false时必填)
+    //  * @param ExpiredTime String 到期时间(IsCheck为false时必填)
+    //  * @param IsCheck Boolean 是否仅校验,为true时校验参数但不实际新增
+    //  * @returns 
+    //  */
+    // addBusiness:(params)=>{
+    //     return http.post('/eta_business/add',params)
+    // }
+}

+ 51 - 5
src/routes/modules/operateRoutes.js

@@ -8,8 +8,8 @@ export default [
 		name: '运营管理',
 		hidden: false,
 		icon_path: require('@/assets/img/home/custom_ico.png'),
-        children:[
-            {
+		children:[
+			{
 				path:'daynews',
 				component:()=> import('@/views/report_manage/dayilyNews.vue'),
 				name:'每日资讯',
@@ -49,12 +49,58 @@ export default [
 				name: '留言管理员',
 				hidden: false,
 			},
-            {
+			{
 				path:"voiceManage",
 				component: () => import('@/views/system_manage/voiceManage.vue'),
 				name: '语音播报管理',
 				hidden: false,
 			},
-        ]
-    }
+			{
+				path:"assistanceCenter",
+				component: () => import('@/views/system_manage/assistance_center/assistanceCenter.vue'),
+				name: '帮助中心配置',
+				hidden: false,
+			},
+			{
+				path:"assistanceDocDetail",
+				component: () => import('@/views/system_manage/assistance_center/assistanceDocDetail.vue'),
+				name: '查看文章',
+				hidden: true,
+				meta: {
+					pathFrom: 'assistanceCenter',
+					pathName: '帮助中心配置'
+				}
+			},
+			{
+				path:"assistanceDocAdd",
+				component: () => import('@/views/system_manage/assistance_center/assistanceDocAdd.vue'),
+				name: '添加文章',
+				hidden: true,
+				meta: {
+					pathFrom: 'assistanceCenter',
+					pathName: '帮助中心配置'
+				}
+			},
+			{
+				path:"assistanceDocEdit",
+				component: () => import('@/views/system_manage/assistance_center/assistanceDocAdd.vue'),
+				name: '编辑文章',
+				hidden: true,
+				meta: {
+					pathFrom: 'assistanceCenter',
+					pathName: '帮助中心配置'
+				}
+			},
+			{
+				path:"docClassifyManage",
+				component: () => import('@/views/system_manage/assistance_center/docClassifyManage.vue'),
+				name: '分类管理',
+				hidden: true,
+				meta: {
+					pathFrom: 'assistanceCenter',
+					pathName: '帮助中心配置'
+				}
+			},
+		]
+	}
 ]

+ 32 - 0
src/styles/index.scss

@@ -28,4 +28,36 @@ $color_green:#67C23A;
   border-radius: 5px;
   color: #3994fb;
   background-color: #dcecfc;
+}
+
+// froala富文本编辑器图片居中、居左、居右样式类
+img.fr-dib {
+  margin: 5px auto;
+  display: block;
+  float: none;
+  vertical-align: top;
+}
+img.fr-dib.fr-fil {
+  margin-left: 0;
+  text-align: left;
+}
+img.fr-dib.fr-fir {
+  margin-right: 0;
+  text-align: right;
+}
+
+// froala富文本编辑器 视频居中、居左、居右样式类
+.fr-video {
+  text-align: center;
+  position: relative;
+}
+.fr-video.fr-dvb {
+  display: block;
+  clear: both;
+}
+.fr-video.fr-dvb.fr-fvl {
+  text-align: left;
+}
+.fr-video.fr-dvb.fr-fvr {
+  text-align: right;
 }

+ 246 - 0
src/views/system_manage/assistance_center/assistanceCenter.vue

@@ -0,0 +1,246 @@
+<template>
+  <div class="assistance-center-container">
+    <div class="assistance-center-top-zone">
+      <div class="assistance-center-top-operation">
+        <el-button type="primary" @click="addDocument">添加文章</el-button>
+        <el-button type="primary" @click="classifyManage" style="margin-left: 20px;">分类管理</el-button>
+      </div>
+      <div class="assistance-center-top-search">
+        <el-cascader
+          v-model="queryParams.classifyId"
+          :options="classifyList"
+          collapse-tags
+          clearable
+          :props="{
+            multiple:true,
+            value:'id',
+            label:'text',
+            children:'child'
+          }"
+          placeholder="所属分类"
+          @change="handlSearchClassify"
+        />
+        <el-input placeholder="文章标题" v-model="queryParams.title" @input="handlSearchClassify" clearable 
+        style="width:500px;margin-left: 20px;">
+				  <i slot="prefix" class="el-input__icon el-icon-search"></i>
+			  </el-input>
+      </div>
+    </div>
+    <el-table ref="documentTable" :data="documentList" border class="document-table">
+      <el-table-column prop="title" label="文章标题" align="center">
+        <template slot-scope="scope">
+          <span @click="goDetail(scope.row)" class="document-title">{{scope.row.title}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="classify" label="所属分类" align="center">
+        <template slot-scope="scope"> <span>{{scope.row.classify}}</span> </template>
+      </el-table-column>
+      <el-table-column prop="author" label="文章作者" align="center">
+        <template slot-scope="scope"> <span>{{scope.row.author}}</span> </template>
+      </el-table-column>
+      <el-table-column prop="status" label="发布状态" align="center">
+        <template slot-scope="scope"> 
+          <span :style="{color:scope.row.status==1?'#4FB112':'#F56C6C'}">{{scope.row.status==1?"已发布":"未发布"}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="updateTime" label="更新时间" align="center">
+        <template slot-scope="scope"> <span>{{scope.row.updateTime}}</span> </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" min-width="110" v-if="Role!='admin'">
+        <template slot-scope="scope">
+          <div style="color:#4099ef;">
+            <span style="margin-right:10px;cursor: pointer;" @click="publish(scope.row)" v-if="scope.row.status==1">取消发布</span>
+            <template v-if="scope.row.status==0">
+              <span style="margin-right:10px;cursor: pointer;" @click="editDocument(scope.row)">编辑</span>
+              <span style="margin-right:10px;cursor: pointer;" @click="publish(scope.row)">发布</span>
+            </template>
+            <span style="color: #F56C6C;cursor: pointer;" @click="deleteDocument(scope.row)">删除</span>
+          </div>
+        </template>
+      </el-table-column>
+      <div slot="empty" style="lineHeight:44px;margin:60px 0;color:#999;">
+        <img src="~@/assets/img/cus_m/nodata.png" style="display:block;width:160px;height:128px;margin: auto;">
+        <span>暂无数据</span>
+      </div>
+    </el-table>
+    <!-- 页数选择器 -->
+    <m-page :page_no="queryParams.CurrentIndex" :pageSize="queryParams.PageSize"
+    :total="total" style="position: absolute;right: 40px;bottom: 40px;" @handleCurrentChange="pageChange"
+    />
+  </div>
+</template>
+
+<script>
+import mPage from '@/components/mPage.vue';
+
+  export default {
+    name:"assistanceCenter",
+    components:{mPage},
+    data() {
+      return {
+        classifyList:[],
+        documentList:[],
+        queryParams:{
+          CurrentIndex:1,
+          PageSize:10,
+          classifyId:[],
+          title:""
+        },
+        total:100
+      }
+    },
+    created(){
+      this.getClassifyList()
+      this.getDocumentList()
+    },
+    methods: {
+      getClassifyList(){
+        //TODO: 获取分类列表接口
+        this.classifyList = [
+          {id:1,text:"分类介绍",child:[{id:11,text:"分类介绍1",child:[{id:111,text:"分类介绍11",child:null}]}]},
+          {id:2,text:"ETA使用",child:[{id:22,text:"ETA使用1",child:[{id:222,text:"ETA使用11",child:null}]}]},
+          {id:3,text:"ETA移动",child:[{id:33,text:"ETA移动1",child:[{id:333,text:"ETA移动11",child:null}]}]},
+          {id:4,text:"指标成图",child:[{id:44,text:"指标成图1",child:[{id:444,text:"指标成图11",child:null}]}]},
+          {id:5,text:"图表分析",child:[{id:55,text:"图表分析1",child:[{id:555,text:"图表分析11",child:null}]}]}
+        ]
+      },
+      getDocumentList(){
+        //TODO: 获取文章列表接口
+        this.documentList=[
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+        Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+        Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+        Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+        Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:0,updateTime:"2023-07-21 12:12:12",
+        Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+        Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:0,updateTime:"2023-07-21 12:12:12",
+        Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
+        {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
+      Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`}]
+      },
+      handlSearchClassify(){
+        console.log(this.queryParams);
+        this.getDocumentList()
+      },
+      pageChange(page_no){
+        this.queryParams.CurrentIndex=page_no
+        this.handlSearchClassify()
+      },
+      goDetail(item){
+        //TODO: 去往详情
+        sessionStorage.setItem("documentDoc",item.Content)
+        let { href } = this.$router.resolve({ path: "/assistanceDocDetail" });
+        window.open(href, "_blank");
+      },
+      //发布/取消发布
+      publish(item){
+        console.log(item.status);
+        let text = item.status==1?'取消发布':'发布'
+
+        this.$confirm(`是否确认${text}?`,"提示",
+        {
+          type:"warning",
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+        }).then(res=>{
+        //TODO: 接口对接
+          this.$message.success(text+"成功")
+          this.getDocumentList()
+        }).catch(() => {});
+      },
+      editDocument(item){
+        //TODO: 编辑文章
+        
+      },
+      //删除文章
+      deleteDocument(item){
+        this.$confirm('删除后不可恢复,是否确认删除?',"提示",
+        {
+          type:"warning",
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+        }).then(res=>{
+        //TODO: 接口对接
+          this.$message.success("删除成功")
+          this.getDocumentList()
+        }).catch(() => {});
+      },
+      addDocument(){
+        this.$router.push("/assistanceDocAdd")
+      },
+      classifyManage(){
+        this.$router.push("/docClassifyManage")
+      }
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+.assistance-center-container{
+  background-color: white;
+  min-height: calc(100vh - 110px);
+  padding: 30px 30px 80px;
+  box-sizing: border-box;
+  border: solid 1px #ECECEC;
+  .assistance-center-top-zone{
+    display: flex;
+    align-items: flex-start;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    margin-bottom: 20px;
+    .assistance-center-top-operation{
+      display: flex;
+      align-items: center;
+      justify-content: flex-start;
+      margin: 0 30px 8px 0;
+    }
+    .assistance-center-top-search{
+      margin-bottom: 8px;
+    }
+  }
+  .document-table{
+    .document-title{
+      color:#409EFF;
+      cursor:pointer;
+    }
+  }
+}
+</style>

+ 318 - 0
src/views/system_manage/assistance_center/assistanceDocAdd.vue

@@ -0,0 +1,318 @@
+<template>
+  <div class="assistance-edit-container">
+    <div class="edit-container-rich-text">
+      <froala
+        id="froala-editor"
+        ref="froalaEditor"
+        :tag="'textarea'"
+        :config="froalaConfig"
+        v-model="addDocForm.Content"
+      ></froala>
+    </div>
+    <div class="edit-container-document-options">
+      <div class="document-options-button-box">
+        <el-button type="primary" class="document-options-button" @click="previewDocument">预览</el-button>
+        <el-button type="primary" class="document-options-button" @click="saveDocument('保存')">保存</el-button>
+        <el-button type="primary" class="document-options-button" @click="saveDocument('发布')">发布</el-button>
+      </div>
+      <div class="document-options-form">
+        <el-form :model="addDocForm" ref="addDocForm" :rules="addDocRules">
+          <el-form-item label="文章标题" prop="title">
+            <el-input v-model="addDocForm.title" placeholder="请输入文章标题"></el-input>
+          </el-form-item>
+          <el-form-item label="所属分类" prop="classify">
+            <el-cascader style="width: 100%;"
+              v-model="addDocForm.classify" :options="classifyList"
+              :props="{value:'id',label:'text',children:'child'}" placeholder="所属分类"/>
+          </el-form-item>
+          <el-form-item label="文章作者" prop="author">
+            <el-input v-model="addDocForm.author" placeholder="请输入文章作者"></el-input>
+          </el-form-item>
+          <el-form-item label="相关推荐">
+            <div v-for="(item,index) in addDocForm.recommendedLink" :key="index" class="form-item-recommendedLink">
+              <el-input v-model="item.linkName" placeholder="请输入链接名称" style="width: 190px;"></el-input>
+              <div class="recommendedLink-line"></div>
+              <el-input v-model="item.linkUrl" placeholder="请输入链接" style="width: 190px;"></el-input>
+            </div>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+
+  export default {
+    name:"assistanceDocAdd",
+    data() {
+      this.classifyList=[          
+        {id:1,text:"分类介绍",child:[{id:11,text:"分类介绍1",child:[{id:111,text:"分类介绍11",child:null}]}]},
+        {id:2,text:"ETA使用",child:[{id:22,text:"ETA使用1",child:[{id:222,text:"ETA使用11",child:null}]}]},
+        {id:3,text:"ETA移动",child:[{id:33,text:"ETA移动1",child:[{id:333,text:"ETA移动11",child:null}]}]},
+        {id:4,text:"指标成图",child:[{id:44,text:"指标成图1",child:[{id:444,text:"指标成图11",child:null}]}]},
+        {id:5,text:"图表分析",child:[{id:55,text:"图表分析1",child:[{id:555,text:"图表分析11",child:null}]}]}
+      ]
+      const that = this;
+      return {
+        editor: null,
+        froalaConfig: {
+          toolbarButtons: [
+            "insertImage",
+            "insertVideo",
+            "embedly",
+            "insertFile",
+            "textColor",
+            "bold",
+            "italic",
+            "underline",
+            "strikeThrough",
+            "subscript",
+            "superscript",
+            "fontFamily",
+            "fontSize",
+            "color",
+            "inlineClass",
+            "inlineStyle",
+            "paragraphStyle",
+            "lineHeight",
+            "paragraphFormat",
+            "align",
+            "formatOL",
+            "formatUL",
+            "outdent",
+            "indent",
+            "quote",
+            "insertTable",
+            "emoticons",
+            "fontAwesome",
+            "specialCharacters",
+            "insertHR",
+            "selectAll",
+            "clearFormatting",
+            "html",
+            "undo",
+            "redo"
+          ],
+          height:"calc(100vh - 230px)",
+          fontSize: ["12", "14", "16", "18", "20", "24", "28", "32", "36", "40"],
+          fontSizeDefaultSelection: "16",
+          theme: "dark", //主题
+          placeholderText: "请输入内容",
+          language: "zh_cn", //国际化
+          imageUploadURL: process.env.API_ROOT + "/report/uploadImg", //上传url
+          videoUploadURL: process.env.API_ROOT + "/report/uploadImg", //上传url
+          fileUploadURL: process.env.API_ROOT + "/report/uploadImg", //上传url 更多上传介绍 请访问https://www.froala.com/wysiwyg-editor/docs/options
+          imageEditButtons:['imageAlign', 'imageCaption', 'imageRemove',  '-', 'imageDisplay',  'imageSize'],
+          quickInsertButtons: ["image","video","hr"], //快速插入项
+          toolbarVisibleWithoutSelection: false, //是否开启 不选中模式
+          // disableRightClick:true,//是否屏蔽右击
+          toolbarSticky: false, //操作栏是否自动吸顶
+          // zIndex:99999,
+          saveInterval: 0,
+          /* 				saveParam: 'content',
+            saveURL: process.env.API_ROOT+'/report/saveReportContent',
+            saveMethod: 'POST',
+            saveParams: {}, */
+          events: {
+            //this.editor 定义在vue data 中
+            initialized: function () {
+              that.editor = this;
+            },
+            keyup: function (e, editor) {
+              //添加事件,在每次按键按下时,都记录一下最后停留位置
+              that.$nextTick(function () {
+                that.lastEditRange = getSelection().getRangeAt(0);
+              });
+            },
+            click: function (e, editor) {
+              //添加事件,在每次鼠标点击时,都记录一下最后停留位置
+              that.$nextTick(function () {
+                that.lastEditRange = getSelection().getRangeAt(0);
+              });
+            },
+          },
+        },
+        addDocForm:{
+          title:"",
+          classify:"",
+          author:"",
+          recommendedLink:[{linkName:"",linkUrl:""},{linkName:"",linkUrl:""}],
+          Content:''
+        },
+        addDocRules:{
+          title:{required:true,message:'文章标题不能为空',trigger:'blur'},
+          classify:{required:true,message:'文章所属分类不能为空',trigger:'change'},
+          author:{required:true,message:'文章作者不能为空',trigger:'blur'}
+        },
+        anchorData:[]
+      }
+    },
+    created() {
+      if(this.$route.query.id){
+        //TODO: 详情接口
+        console.log("详情接口");
+      }      
+    },
+    methods: {
+      // 生成锚点
+      generateAnchor(){
+        // 搜索富文本中的h1和h2标签 当做一级和二级的锚点
+        this.searchTitleTag(0,1)
+        // console.log(this.addDocForm.Content,this.anchorData);
+        // window.anchorData = this.anchorData
+        console.log(this.anchorData);
+      },
+      // 搜索标题标签h1,h2
+      searchTitleTag(searchPosition,firstLevel){
+        let frontH1Posiiton,nextH1Posiiton,H2Posiiton=0
+        // 本次搜索第一个h1的位置
+        frontH1Posiiton = this.addDocForm.Content.indexOf('<h1>',searchPosition)
+        if(frontH1Posiiton == -1) return 
+
+        let anchorText=`id="doc_anchor_${firstLevel}"`
+        // console.log(frontH1Posiiton,firstLevel,'firstLevel');
+        this.addDocForm.Content = this.addDocForm.Content.substring(0, frontH1Posiiton+3) 
+                                  +" "+anchorText + this.addDocForm.Content.substring(frontH1Posiiton+3);
+        this.anchorData.push({AnchorId:`${firstLevel}`,Anchor:`doc_anchor_${firstLevel}`,Child:[]})
+        // 本次搜索下一个h1的位置
+        nextH1Posiiton = this.addDocForm.Content.indexOf('<h1>',frontH1Posiiton)==-1?
+                          this.addDocForm.Content.length:this.addDocForm.Content.indexOf('<h1>',frontH1Posiiton)
+        // 从第一个h1的位置开始查找h2标签
+        H2Posiiton = this.addDocForm.Content.indexOf('<h2>',frontH1Posiiton)
+        let secondLevel=1
+        while (!(H2Posiiton==-1 || H2Posiiton>nextH1Posiiton)) {
+          // 找到了,并且位置小于下一个h1的位置 
+          console.log(H2Posiiton,nextH1Posiiton);
+          let anchorTextH2=`id="doc_anchor_${firstLevel}_${secondLevel}"`
+          // console.log(H2Posiiton,secondLevel,'secondLevel');
+          this.addDocForm.Content = this.addDocForm.Content.substring(0, H2Posiiton+3) 
+                                    +" "+anchorTextH2 + this.addDocForm.Content.substring(H2Posiiton+3);
+          this.anchorData[firstLevel-1].Child.push(
+            {AnchorId:`${firstLevel}_${secondLevel}`,
+            Anchor:`doc_anchor_${firstLevel}_${secondLevel}`,
+            Child:[]
+          })
+          // nextH1Posiiton 和 secondLevel 随之增加
+          nextH1Posiiton +=anchorTextH2.length+1
+          secondLevel++
+          H2Posiiton = this.addDocForm.Content.indexOf('<h2>',frontH1Posiiton)
+        }
+        // 结束一轮 <h1></h1>标签的寻找
+        if(this.addDocForm.Content.indexOf('<h1>',frontH1Posiiton)!=-1){
+          // 如果有下一个h1的标签,说明寻找还没结束,继续寻找
+          firstLevel++
+          this.searchTitleTag(frontH1Posiiton,firstLevel)
+        }
+      },
+      // 生成底部的两个链接
+      createBottomHref(){
+        let hrefStringBuiler='<ul style="margin-top:40px">'
+        this.addDocForm.recommendedLink.map(item =>{
+          if(item.linkName){
+            hrefStringBuiler+=`<li><a href="${item.linkUrl}" target="_blank" style="text-decoration: underline;">${item.linkName}</a></li>`
+          }
+        })
+        return hrefStringBuiler+"</ul>"
+      },
+      previewDocument(){
+        this.addDocForm.Content=`<p>范德萨发的刚发的</p><p>刚发的g梵蒂冈</p><p>割发代首刚发的</p><hr><h1>1. 个刚发的施工方</h1><p>刚发的刚发的g规范的施工方都是割发代首规范</p><h2>1.1. 规范的三个富士达割发代首</h2><p>个梵蒂冈是梵蒂冈讽德诵功范德萨割发代首个割发代首</p><p>刚分手的割发代首割发代首高富帅d</p><p>刚分手的刚分手的</p><p>割发代首刚分手的</p><p>刚分手的公司发的</p><p>刚发的事故发生的</p><p><br></p><p>割发代首刚分手的刚分手的</p><h2>1.2. 噶规范十多个范德萨刚发的施工方多少公分</h2><p>个讽德诵功范德萨</p><p>割发代首割发代首刚发的s规范的三个</p><h1>2.讽德诵功是反的</h1><p>割发代首割发代首个人的施工方都是</p><p>范德萨个人东方闪电方式</p><p>割发代首割发代首</p><h2>2.1.个梵蒂冈</h2><p>讽德诵功范德萨规范的三个范德萨讽德诵功放大s</p><h2>2.2.刚发的广泛地个</h2><p>刚分手的割发代首</p><p>割发代首割发代首割发代首</p><p><br></p><p>范德萨割发代首</p><h2>2.3.辅导费是的</h2><p>范甘迪个放大割发代首个</p><p>刚发的刚发的</p><h1>3. 个梵蒂冈放大</h1>`
+        // 生成锚点
+        this.generateAnchor()
+        let bottomLink = this.createBottomHref()
+        
+        sessionStorage.setItem("documentDoc",this.addDocForm.Content+bottomLink)
+        let { href } = this.$router.resolve({ path: "/assistanceDocDetail" });
+        window.open(href, "_blank");
+      },
+      saveDocument(type){
+        this.$refs.addDocForm.validate(valid=>{
+          if(valid){
+            console.log(this.addDocForm);
+            //TODO: 保存文章和发布文章
+            if(type=="发布"){
+              // 发布
+            }
+            if(this.addDocForm.id){
+              //编辑
+            }else{
+              //新增
+            }
+            // this.$message({
+            //   type:'success',
+            //   message:'操作成功',
+            //   duration:2000
+            // })
+            // setTimeout(()=>{
+            //   this.$router.back()
+            // },2000)
+          }
+        })
+      }
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .assistance-edit-container{
+    display: flex;
+    justify-content: flex-start;
+    .edit-container-rich-text{
+      flex-grow: 1;
+      min-height: calc(100vh - 110px);
+      background-color: white;
+      border:solid 1px #ECECEC;
+      box-sizing: border-box;
+    }
+    .edit-container-document-options{
+      background-color: white;
+      margin-left: 20px;
+      min-height: calc(100vh - 110px);
+      border:solid 1px #ECECEC;
+      box-sizing: border-box;
+      width: 440px;
+      min-width: 440px;
+      .document-options-button-box{
+        width: 100%;
+        height: 80px;
+        box-sizing: border-box;
+        padding: 20px;
+        box-shadow: 0px 5px 10px #ECECEC;
+        border-bottom: solid 1px #ECECEC;
+        .document-options-button{
+          height: 40px;
+          width: 120px;
+        }
+      }
+      .document-options-form{
+        padding: 30px 20px;
+        .form-item-recommendedLink{
+          display: flex;
+          align-items: center;
+          justify-content: flex-start;
+          width: 100%;
+          margin-bottom: 20px;
+          &:last-child{
+            margin-bottom: 0;
+          }
+          .recommendedLink-line{
+            flex: 1;
+            height: 1px;
+            background-color:#DCDFE6 ;
+          }
+        }
+      }
+    }
+  }
+</style>
+<style lang="scss">
+.assistance-edit-container{
+  .fr-toolbar,.fr-box.fr-basic .fr-wrapper{
+    border: none;
+  }
+}
+.fr-popup.fr-active{
+  z-index: 100000!important;
+  opacity: 1!important;
+}
+</style>

+ 32 - 0
src/views/system_manage/assistance_center/assistanceDocDetail.vue

@@ -0,0 +1,32 @@
+<template>
+  <div class="assistance-detail-container">
+    <div class="assistance-detail-box" v-html="docData"></div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name:"assistanceDocDetail",
+    data() {
+      return {
+        docData:sessionStorage.getItem("documentDoc") || ""
+      }
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+.assistance-detail-container{
+  background-color: white;
+  min-height: calc(100vh - 110px);
+  // height: calc(100vh - 110px);
+  padding: 20px;
+  box-sizing: border-box;
+  border: solid 1px #ECECEC;
+  // .assistance-detail-box{
+  //   border: solid 1px #333333;
+  //   height: 100%;
+  //   width: 100%;
+  // }
+}
+</style>

+ 463 - 0
src/views/system_manage/assistance_center/docClassifyManage.vue

@@ -0,0 +1,463 @@
+<template>
+  <div class="doc-classifyMana-container">
+    <div class="doc-classifyMana-top-zone">
+      <el-button type="primary" @click="addClassify">添加分类</el-button>
+      <el-input placeholder="分类名称" v-model="queryParams.KeyWord" @input="getclassifyData" clearable 
+      style="width:500px;margin-left: 20px;">
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
+      </el-input>
+    </div>
+    <!-- <el-table style="border:1px solid #eaeaea;" ref="classifyTableRef"
+    :data="classifyList" :row-class-name="tableRowClassName" row-key="id" :tree-props="{children:'child'}">
+      <el-table-column prop="text" label="一级分类">
+        <template slot-scope="scope">
+          <span>{{scope.row.level==1?scope.row.text:''}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="text" label="二级分类">
+        <template slot-scope="scope">
+          <span>{{scope.row.level==2?scope.row.text:''}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="text" label="三级分类">
+        <template slot-scope="scope">
+          <span>{{scope.row.level==3?scope.row.text:''}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center">
+        <template slot-scope="scope">
+          <div class="table-button">
+            <span @click="configItem(scope.row)">权限配置</span>
+            <span @click="edititem(scope.row)">编辑</span>
+            <span @click="checkdeleteitem(scope.row)" style="margin-right: 0;color: #F56C6C;">删除</span>
+          </div>
+            </template>
+      </el-table-column>
+    </el-table> -->
+    <dragTreeTable ref="dragTreeTableRef" :beforeDragOver="beforeDrag"
+    :data="treeData" :onDrag="onTreeDataChange"
+    hightRowChange resize border >
+    <!-- onlySameLevelCanDrag -->
+    </dragTreeTable>
+    <!-- 添加分类弹窗 -->
+    <el-dialog :title="dialogTitle" :visible.sync="showAddClassifyDia" width="625px"
+    append-to-body :close-on-click-modal="false" @close="resetForm">
+      <div style="display: flex;flex-direction: column; align-items: center;margin-bottom: 35px;">
+        <el-form :model="classifyForm" ref="classifyFormRef" label-width="80px">
+          <el-form-item label="上级目录" prop="ParentId">
+            <el-cascader v-model="classifyForm.ParentId" :options="treeData.lists" placeholder="请选择上级目录"
+              :props="{ value:'ClassifyId',label:'ClassifyName',children:'Children',checkStrictly:true,emitPath:false}" 
+              class="lastCatalogCascader" :disabled="this.dialogTitle.indexOf('编辑分类')!=-1" />
+          </el-form-item>
+          <el-form-item label="分类名称" prop="HelpDocClassifyName" :rules="{required:true,message:'分类名称不能为空',trigger:'blur'}">
+            <el-input v-model="classifyForm.HelpDocClassifyName" placeholder="请输入分类名称" style="width: 337px;"
+             maxlength="10"></el-input>
+          </el-form-item>
+        </el-form>
+        <div style="margin-top: 40px;">
+          <el-button type="primary" style="width:120px;margin-right:10px" @click="classifySave" size="medium">保存</el-button>
+          <el-button  style="width:120px;" @click="showAddClassifyDia=false" size="medium">取消</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 设置权限弹窗 -->
+    <el-dialog :title="dialogTitle" :visible.sync="showPermissionDia" width="625px"
+    append-to-body :close-on-click-modal="false" @close="resetPermissonForm">
+      <div style="display: flex;flex-direction: column; align-items: center;margin-bottom: 35px;">
+        <el-form :model="permissionForm" ref="permissionFormRef" label-width="80px">
+          <el-form-item label="可见权限" prop="merchantIds">
+            <el-select v-model="permissionForm.merchantIds" placeholder="请选择商家" 
+            multiple style="width: 337px;" collapse-tags clearable >
+              <el-option :label="item.merchantName" :value="item.merchantId" 
+              v-for="item in merchantList" :key="item.merchantId"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+        <div style="margin-top: 40px;">
+          <el-button type="primary" style="width:120px;margin-right:10px" @click="configSave" size="medium">保存</el-button>
+          <el-button  style="width:120px;" @click="showPermissionDia=false" size="medium">取消</el-button>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Sortable from "sortablejs";
+import {assistanceDocInterence} from "@/api/api.js"
+import dragTreeTable from "drag-tree-table";
+  export default {
+    name:"docClassifyManage",
+    components:{dragTreeTable},
+    data() {
+      // 表格头设置
+      this.tableHeadList=[
+        {
+          type:"selection",
+          title: '一级分类',
+          field: 'ClassifyName',
+          flex:1,
+          align: 'center',
+          formatter: (item) => {    
+            return item.Level==1?item.ClassifyName:""
+          }
+        },
+        {
+          title: '二级分类',
+          field: 'ClassifyName',
+          // width: 200,
+          flex:1,
+          align: 'center',
+          formatter: (item) => {
+            return item.Level==2?item.ClassifyName:""
+          }
+        },
+        {
+          title: '三级分类',
+          field: 'ClassifyName',
+          // width: 200,
+          flex:1,
+          align: 'center',
+          formatter: (item) => {
+            return item.Level==3?item.ClassifyName:""
+          }
+        },
+        {
+          type: 'action',
+          title: '操作',
+          width: 260,
+          // flex:1,
+          align: 'center',
+          actions:[
+            {
+              text: '权限配置',
+              onclick: (item) => {
+                // item是当前行的数据
+                this.configClassify(item)
+              },
+              formatter: (item) => {
+                return '<span class="table-button">权限配置</span>'
+              }
+            },
+            {
+              text: '编辑',
+              onclick: (item) => {
+                this.editClassify(item)
+              },
+              formatter: (item) => {
+                return '<span class="table-button">编辑</span>'
+              }
+            },
+            {
+              text: '删除',
+              onclick: (item) => {
+                this.deleteClassify(item)
+              },
+              formatter: (item) => {
+                return '<span class="table-button" style="margin-right: 0;color: #F56C6C;">删除</span>'
+              }
+            }
+          ]
+        }
+      ]
+      // 自定义字段替换
+      this.custom_field={
+        id: 'ClassifyId',
+        order: 'Sort',
+        lists: 'Children',
+        parent_id: 'ParentId'
+      }
+
+      return {
+        queryParams:{
+          KeyWord:''
+        },
+        treeData:{
+          columns:this.tableHeadList,
+          lists:[],
+          custom_field:this.custom_field
+        },
+        // 用于拖拽失败后的重置
+        classifyListResetUse:[],
+        // 扁平化之后的数据
+        classifyListFlat:[],
+        dialogTitle:"",
+        showAddClassifyDia:false,
+        classifyForm:{
+          ParentId:0,
+          HelpDocClassifyName:''
+        },
+        merchantList:[],
+        showPermissionDia:false,
+        permissionForm:{
+          HelpDocClassifyId:0,
+          merchantIds:[]
+        }
+      }
+    },
+    created(){
+      this.getmerchantList()
+      this.getclassifyData()
+    },
+    mounted(){
+      this.$nextTick(()=>{
+        // this.tableDropSet()
+      })
+    },
+    methods: {
+      getmerchantList(){
+        //TODO: 获取商家列表接口
+        this.merchantList=[{merchantId:1,merchantName:"依诺"},
+        {merchantId:2,merchantName:"依诺2"},{merchantId:3,merchantName:"依诺3"},{merchantId:4,merchantName:"依诺4"}]
+      },
+      getclassifyData(){
+        assistanceDocInterence.getAssistanceClassifyList(this.queryParams).then(res=>{
+          if(res.Ret == 200){
+            console.log(res);
+            this.treeData.lists = res.Data?res.Data.AllNodes||[]:[]
+            this.$refs.dragTreeTableRef.OpenAll()
+            console.log(this.treeData.lists);
+          }
+        })
+        // this.classifyListResetUse = [
+        //   {id:1,text:"分类介绍",level:1,child:[{id:11,text:"分类介绍1",level:2,child:[{id:111,text:"分类介绍11",level:3,child:null},{id:1111,text:"分类介绍111",level:3,child:null}]}]},
+        //   {id:2,text:"ETA使用",level:1,child:[{id:22,text:"ETA使用1",level:2,child:[{id:222,text:"ETA使用11",level:3,child:null}]}]},
+        //   {id:3,text:"ETA移动",level:1,child:[{id:33,text:"ETA移动1",level:2,child:[{id:333,text:"ETA移动11",level:3,child:null}]}]},
+        //   {id:4,text:"指标成图",level:1,child:[{id:44,text:"指标成图1",level:2,child:[{id:444,text:"指标成图11",level:3,child:null}]}]},
+        //   {id:5,text:"图表分析",level:1,child:[{id:55,text:"图表分析1",level:2,child:[{id:555,text:"图表分析11",level:3,child:null}]}]}
+        // ]
+        
+        // this.classifyListFlat=[]
+      },
+      tableRowClassName({row,rowIndex}) {
+        if( row.child && row.child.length>0 ){
+          return 'has-child-row';
+        }else{
+          return '';
+        }
+      },
+      beforeDrag(dragItem,effectItem,type){
+        // console.log(arguments,'arguments');
+        if(type=='center'){
+          // 放里面
+          if((dragItem.Level-1)!=effectItem.Level) return false
+        }else{
+          //不放里面
+          if(dragItem.Level!=effectItem.Level) return false
+        }
+        // return false
+      },
+      onTreeDataChange(list,dragItem){
+        console.log(list,dragItem,'arguments');
+        // list - 拖拽后的数据 dragItem-拖拽的项
+        let ClassifyId,PrevClassifyId,NextClassifyId,ParentClassifyId=0
+        // 在拖拽后的数据中找到拖拽项对应的位置
+        const findDraggedItem=(list)=>{
+          let itemIndex = list.findIndex(it => it.ClassifyId == dragItem.ClassifyId)
+          if(itemIndex!=-1){
+            if(itemIndex==0){
+              PrevClassifyId=0
+            }else{
+              PrevClassifyId = list[itemIndex-1].ClassifyId
+            }
+            if(itemIndex==(list.length-1)){
+              NextClassifyId=0
+            }else{
+              NextClassifyId = list[itemIndex+1].ClassifyId
+            }
+            ClassifyId = dragItem.ClassifyId
+            ParentClassifyId = dragItem.ParentId
+            console.log({
+              ClassifyId,ParentClassifyId,PrevClassifyId,NextClassifyId
+            });
+            assistanceDocInterence.moveAssistanceClassify({
+              ClassifyId,ParentClassifyId,PrevClassifyId,NextClassifyId
+            }).then(res=>{
+              if(res.Ret == 200){
+                this.$message.success("移动分类成功")
+                this.getclassifyData()
+              }
+            })
+          }else{
+            list.map(li => {
+              li.Children && li.Children.length>0 && findDraggedItem(li.Children)
+            })
+          }
+        }
+        findDraggedItem(list)
+      },
+      tableDropSet(){
+        const tbody = this.$refs.classifyTableRef.$el.querySelector(
+          ".el-table__body-wrapper > table > tbody"
+        );
+        const _this = this;
+        Sortable.create(tbody, {
+          animation: 150, 
+          onStart(evt){
+            if(_this.classifyListFlat && _this.classifyListFlat.length>0){
+              return 
+            }else{
+              _this.flatClassifyList(_this.classifyList,0)
+            }
+            console.log(_this.classifyListFlat);
+          },
+          onEnd({ newIndex, oldIndex }) {
+            console.log({ newIndex, oldIndex });
+            if(newIndex == oldIndex) return 
+            const oldRow = _this.classifyListFlat[oldIndex]
+            const newRow = _this.classifyListFlat[newIndex]
+            console.log(oldRow,newRow);
+            _this.$message.success("拖拽成功")
+            _this.getclassifyData()
+          },
+          onMove({ dragged, related }){
+            console.log(dragged.rowIndex, related.rowIndex);
+            const oldRow = _this.classifyListFlat[dragged.rowIndex]
+            const newRow = _this.classifyListFlat[related.rowIndex]
+            console.log(oldRow.level,newRow.level);
+            if (oldRow.level !== newRow.level) {
+              return false // 不允许不同级的拖动
+            }
+          }
+        });
+      },
+      flatClassifyList(list,parentId){
+        for (let i = 0; i < list.length; i++) {
+          const element = list[i];
+          const lastElementId = i==0?0:list[i-1].id
+          const nextElementId = i==(list.length-1)?0:list[i+1].id
+          this.classifyListFlat.push({id:element.id,lastElementId,nextElementId,parentId,level:element.level})
+          if(element.child && element.child.length>0){
+            this.flatClassifyList(element.child,element.id)
+          }
+        }
+      },
+      // 添加分类
+      addClassify(){
+        this.dialogTitle="添加分类"
+        this.showAddClassifyDia=true
+      },
+      // 编辑分类
+      editClassify(item){
+        this.classifyForm={
+          ParentId:item.ParentId,
+          HelpDocClassifyId:item.ClassifyId,
+          HelpDocClassifyName:item.ClassifyName
+        }
+        this.dialogTitle="编辑分类"
+        this.showAddClassifyDia=true
+      },
+      deleteClassify(item){
+        this.$confirm('是否确认删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+          assistanceDocInterence.deleteAssistanceClassify({ClassifyId:item.ClassifyId}).then(res=>{
+            if(res.Ret == 200){
+              this.$message.success("删除分类成功")
+              this.getclassifyData()
+            }
+          })
+        }).catch(()=>{})
+      },
+      // 保存
+      classifySave(){
+        this.$refs.classifyFormRef.validate(valid=>{
+          if(valid){
+            console.log(this.classifyForm);
+            if(this.classifyForm.HelpDocClassifyId){
+              //编辑
+              assistanceDocInterence.editAssistanceClassify(this.classifyForm).then(res=>{
+                if(res.Ret == 200){
+                  this.$message.success(this.dialogTitle+"成功")
+                  this.showAddClassifyDia=false
+                  this.resetForm()
+                  this.getclassifyData()
+                }
+              })
+            }else{
+              //新增
+              assistanceDocInterence.addAssistanceClassify({...this.classifyForm}).then(res=>{
+                if(res.Ret == 200){
+                  this.$message.success(this.dialogTitle+"成功")
+                  this.showAddClassifyDia=false
+                  this.resetForm()
+                  this.getclassifyData()
+                }
+              })
+            }
+          }
+        })
+      },
+      resetForm(){
+        this.classifyForm={
+          ParentId:0,
+          HelpDocClassifyName:''
+        }
+        this.$refs.classifyFormRef.clearValidate()
+      },
+      //权限配置
+      configClassify(row){
+        this.permissionForm={
+          HelpDocClassifyId:row.ClassifyId,
+          merchantIds:[]
+        }
+        this.dialogTitle="设置权限"
+        this.showPermissionDia=true
+      },
+      resetPermissonForm(){
+        this.permissionForm={
+          HelpDocClassifyId:0,
+          merchantIds:[]
+        }
+        this.$refs.permissionFormRef.clearValidate()
+      },
+      configSave(){
+        //TODO: 保存权限设置
+        // assistanceDocInterence.editAssistanceClassify(this.classifyForm).then(res=>{
+        //   if(res.Ret == 200){
+        //     this.$message.success(this.dialogTitle+"成功")
+        //     this.showAddClassifyDia=false
+        //     this.resetForm()
+        //     this.getclassifyData()
+        //   }
+        // })
+        this.$message.success("设置成功")
+        this.showPermissionDia=false
+      }
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+.doc-classifyMana-container{
+  background-color: white;
+  min-height: calc(100vh - 110px);
+  padding: 30px;
+  box-sizing: border-box;
+  border: solid 1px #ECECEC;
+  .doc-classifyMana-top-zone{
+    display: flex;
+    align-items: flex-start;
+    justify-content: space-between;
+    margin-bottom: 20px;
+  }
+}
+</style>
+<style lang="scss">
+.lastCatalogCascader{
+  width: 337px;
+  .el-input{
+    width: 337px;
+  }
+}
+.has-child-row {
+    background-color: #f2f6fa!important;
+}
+.table-button{
+    color:#4099ef; 
+    cursor: pointer;
+    margin-right: 10px;
+  }
+</style>