Browse Source

内容管理模块

bulusiLuo 3 years ago
parent
commit
9b607432e5

+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "vue-baidu-map": "^0.21.22",
     "vue-pdf": "^4.3.0",
     "vue-print-nb": "^1.7.4",
+    "vue-quill-editor": "^3.0.6",
     "vue-router": "3.0.6",
     "vuedraggable": "^2.24.3",
     "vuex": "3.1.0",

+ 8 - 0
src/main.js

@@ -33,6 +33,14 @@ Vue.prototype.$echarts = echarts
 import html2pdf from '@/utils/html2pdf'
 Vue.use(html2pdf)
 
+// 引入富文本编辑器
+import VueQuillEditor from 'vue-quill-editor'
+// require styles 引入样式
+import 'quill/dist/quill.core.css'
+import 'quill/dist/quill.snow.css'
+import 'quill/dist/quill.bubble.css'
+Vue.use(VueQuillEditor)
+
 Vue.use(BaiduMap, {
   ak: 'CO5txfs21UEm2XUgiaPiGhZcvfpjVBXS'
 })

+ 515 - 136
src/views/mbsys/collaborative/announcement/announcementzoning/index.vue

@@ -1,127 +1,342 @@
 <template>
-  <!-- 公告分区 -->
+  <!-- 内容管理 -->
   <div class="content-container">
-    <div class="right-box">
-      <div class="top">
-        <el-form ref="form" :model="form" style="float: left; height: 45px">
-          <el-form-item>
-            <el-input
-              v-model="form.name"
-              size="small"
-              placeholder="请输入公告分区"
-              style="width: 260px"
-            ></el-input>
-            <el-select
-              v-model="value2"
-              multiple
-              collapse-tags
-              placeholder="分区"
-              style="width: 260px; margin: 0 20px"
-              size="small"
+    <el-row class="search">
+      <el-col :span="5" class="left-box">
+        <el-input
+          placeholder="输入关键字进行过滤"
+          v-model="filterText"
+          size="small"
+          clearable
+        ></el-input>
+        <el-tree
+          class="filter-tree"
+          :data="data"
+          :props="defaultProps"
+          default-expand-all
+          node-key="id"
+          :filter-node-method="filterNode"
+          @node-click="nodeClick"
+          :expand-on-click-node="false"
+          ref="tree"
+        >
+        </el-tree>
+      </el-col>
+      <el-col :span="19" class="right-box">
+        <div class="top">
+          <p style="margin: 0">内容管理</p>
+          <el-button type="primary" style="margin: 10px 0" @click="addClick"
+            >新增</el-button
+          >
+          <br />
+          <el-col :span="21">
+            <el-form :model="form" label-width="auto" size="mini">
+              <el-row :gutter="24">
+                <el-col :span="5">
+                  <el-form-item label="所属栏目:">
+                    <el-select
+                      v-model="value2"
+                      multiple
+                      collapse-tags
+                      placeholder="所属栏目"
+                    >
+                      <el-option
+                        v-for="item in []"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                  <el-form-item label="内容类型:">
+                    <el-select
+                      v-model="value2"
+                      multiple
+                      collapse-tags
+                      placeholder="内容类型"
+                    >
+                      <el-option
+                        v-for="item in []"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                  <el-form-item label="标题:">
+                    <el-input
+                      v-model="input"
+                      placeholder="请输入标题"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                  <el-form-item label="发布时间:">
+                    <el-date-picker
+                      v-model="value3"
+                      type="daterange"
+                      range-separator="至"
+                      start-placeholder="开始日期"
+                      end-placeholder="结束日期"
+                      style="width: 180px"
+                    >
+                    </el-date-picker>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="4">
+                  <el-form-item label="状态:">
+                    <el-select
+                      v-model="value2"
+                      multiple
+                      collapse-tags
+                      placeholder="是否发布"
+                    >
+                      <el-option
+                        v-for="item in []"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </el-col>
+          <el-col :span="3" style="text-align: right">
+            <el-button type="primary" size="small">查询</el-button>
+            <el-button type="primary" :disabled="true" size="small"
+              >重置</el-button
             >
-              <el-option
-                v-for="item in []"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
+          </el-col>
+          <!-- <el-form ref="form" :model="form" style="float: left; height: 45px"> -->
+        </div>
+        <div class="table-div">
+          <el-table
+            :data="tableData"
+            :style="{ width: '100%' }"
+            height="100%"
+            border
+            :header-cell-style="{
+              background: 'rgba(250,250,250)',
+              color: 'rgb(50,59,65)',
+              height: '38px',
+              textAlign: 'center',
+            }"
+          >
+            <template slot="empty">
+              <img src="@/assets/icon/null.png" alt="" />
+              <p class="empty-p">暂无数据</p>
+            </template>
+            <el-table-column
+              prop="id"
+              label="序号"
+              align="center"
+              width="55px"
+            ></el-table-column>
+            <el-table-column
+              prop="moduleType"
+              label="所属栏目"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="moduleFunction"
+              label="内容类型"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="theme"
+              label="标题"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="releaseTime"
+              label="发布时间"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="createUserName"
+              label="发布者"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="num"
+              label="排序号"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="isRelease"
+              label="状态"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="isRelease"
+              label="有效期"
+              align="center"
+            ></el-table-column>
+            <el-table-column label="操作" align="center">
+              <template slot-scope="scope">
+                <el-button
+                  @click="newPlanForMonthDia(true, scope.row)"
+                  type="text"
+                  size="small"
+                  >详细</el-button
+                >
+                <el-button
+                  @click="deletePlan(scope.row, 'singleD')"
+                  type="text"
+                  size="small"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <el-pagination
+          :current-page="pagination.current"
+          :page-sizes="[20, 30, 40, 50, 100, 200]"
+          :page-size="pagination.size"
+          :total="pagination.total"
+          layout="total, sizes, prev, pager, next, jumper"
+        ></el-pagination>
+      </el-col>
+    </el-row>
+
+    <!-- 信息公开编辑 -->
+    <el-dialog
+      title="信息公开编辑"
+      :visible.sync="dialogFormVisible"
+      label-width="auto"
+      width="70%"
+    >
+      <el-form :model="sizeForm" label-width="auto" size="mini">
+        <el-row :gutter="24">
+          <el-col :span="24">
+            <el-form-item label="标题:">
+              <el-input v-model="sizeForm.theme" placeholder="请输入标题"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="所属栏目:" style="width: 100%">
+              <el-select
+                v-model="sizeForm.moduleType"
+                placeholder="请选择"
+                style="width: 100%"
               >
-              </el-option>
-            </el-select>
-            <el-button type="primary" icon="el-icon-search" size="small"
-              >搜索</el-button
+                <el-option
+                  v-for="item in optionType"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="内容类型:">
+              <el-select
+                v-model="sizeForm.moduleFunction"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in optionFunction"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="内容:">
+              <quill-editor
+                v-model="sizeForm.content"
+                ref="myQuillEditor"
+                :options="options2"
+              ></quill-editor>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="发布者:">
+              <el-input v-model="sizeForm.updateUserName" placeholder="请输入内容"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="发布时间:">
+              <el-date-picker
+                v-model="sizeForm.releaseTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                style="width: 100%"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="排序号:">
+              <el-col :span="16" style="padding: 0">
+                <el-input v-model="input" placeholder="请输入标题"></el-input>
+              </el-col>
+              <el-col :span="8">
+                <span>注:数字越大越靠前</span>
+              </el-col>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="有效期:">
+              <el-col :span="16" style="padding: 0">
+                <el-date-picker
+                  v-model="value1"
+                  type="datetime"
+                  placeholder="年/月/日"
+                  style="width: 100%"
+                >
+                </el-date-picker>
+              </el-col>
+              <el-col :span="8">
+                <el-checkbox v-model="checked">永久有效</el-checkbox>
+              </el-col>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-upload
+              class="upload-demo"
+              action="#"
+              :http-request="httpRequest"
+              accept=".xls,.xlsx"
+              :file-list="fileList"
+              :show-file-list="false"
             >
-          </el-form-item>
-        </el-form>
-
-        <el-button
-          type="primary"
-          @click="dialogFormVisible = true"
-          icon="el-icon-plus"
-          size="small"
-          >新建分区</el-button
+              <el-button size="small">附件上传</el-button>
+            </el-upload>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogFormVisible = false"
+          >保 存</el-button
         >
-        <el-button type="primary" size="small">修改</el-button>
-        <el-button type="danger" size="small">删除</el-button>
-      </div>
-      <div class="table-div">
-        <el-table
-          :data="tableData"
-          style="width: 100%"
-          :style="{ width: '100%' }"
-          height="100%"
-          :header-cell-style="{
-            background: 'rgba(250,250,250)',
-            color: 'rgb(50,59,65)',
-            height: '38px',
-            textAlign: 'center',
-          }"
+        <el-button type="primary" @click="submitFn"
+          >确 定</el-button
         >
-          <template slot="empty">
-            <img src="@/assets/icon/null.png" alt="" />
-            <p class="empty-p">暂无数据</p>
-          </template>
-          <el-table-column type="selection" align="center"></el-table-column>
-          <el-table-column
-            prop="prop"
-            label="序号"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="prop"
-            label="公告名称"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="prop"
-            label="公告内容"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="prop"
-            label="公告分区"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="prop"
-            label="发布人"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="prop"
-            label="发布时间"
-            align="center"
-          ></el-table-column>
-          <el-table-column label="操作" align="center">
-            <template slot-scope="scope">
-              <el-button
-                @click="newPlanForMonthDia(true, scope.row)"
-                type="text"
-                size="small"
-                >详细</el-button
-              >
-              <el-button
-                @click="deletePlan(scope.row, 'singleD')"
-                type="text"
-                size="small"
-                >归还</el-button
-              >
-            </template>
-          </el-table-column>
-        </el-table>
       </div>
-      <el-pagination
-        :current-page="pagination.current"
-        :page-sizes="[20, 30, 40, 50, 100, 200]"
-        :page-size="pagination.size"
-        :total="pagination.total"
-        layout="total, sizes, prev, pager, next, jumper"
-      ></el-pagination>
-    </div>
+    </el-dialog>
 
     <!-- 新建分区 -->
     <el-dialog
       title="新建分区"
-      :visible.sync="dialogFormVisible"
+      :visible.sync="dialogFormVisible2"
       label-width="auto"
       width="25%"
     >
@@ -137,23 +352,67 @@
               <el-input v-model="input" placeholder="请输入内容"></el-input>
             </el-form-item>
           </el-col>
-         
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogFormVisible = false"
+        <el-button @click="dialogFormVisible2 = false">取 消</el-button>
+        <el-button type="primary" @click="dialogFormVisible2 = false"
           >确 定</el-button
         >
       </div>
     </el-dialog>
+
+    
   </div>
 </template>
 
 <script>
+import { getListByPage, portalmoduleApi } from "@/api/mbsys/collaborative";
+import { quillEditor } from "vue-quill-editor"; // 导入quillEditor组件
+import "quill/dist/quill.js";
 export default {
+  components: {
+    quillEditor,
+  },
   data() {
     return {
+      data: [
+        {
+          id: 1,
+          label: "公司动态",
+          children: [
+            {
+              id: 5,
+              label: "公司动态",
+            },
+          ],
+        },
+        {
+          id: 2,
+          label: "信息公开",
+          children: [
+            {
+              id: 4,
+              label: "停水通知",
+              children: [],
+            },
+            {
+              id: 6,
+              label: "办事公开",
+              children: [],
+            },
+            {
+              id: 7,
+              label: "政策法规",
+              children: [],
+            },
+          ],
+        },
+      ],
+      defaultProps: {
+        children: "children",
+        label: "label",
+      },
       fileList: [],
       form: {},
       // 增加文档输入框
@@ -161,18 +420,84 @@ export default {
       tableData: [],
       pagination: { current: 1, size: 40, total: 0 },
       dialogFormVisible: false,
+      dialogFormVisible2: false,
+      dialogFormVisible3: false,
+      // 富文本
+      options2:{},
+      
       options: [],
+      filterText: "",
+      textarea: "",
+      startDate: "",
+      sizeForm: {
+        theme: "",
+        outline: "",
+        moduleFunction: 1,
+        moduleType: 1,
+        isRelease: 1,
+        content: "",
+        updateUserName:'',
+        releaseTime:''
+      },
+      optionType:[
+        {
+          value: 0,
+          label: "0"
+        }, {
+          value: 1,
+          label: "1"
+        }, 
+      ],
+      optionFunction:[
+        {
+          value: 0,
+          label: "0"
+        }, {
+          value: 1,
+          label: "1"
+        }, 
+      ],
       value2: [],
       value1: "",
+      value3: "",
+      checked: false,
     };
   },
   watch: {},
+  created() {
+    getListByPage().then((res) => {
+      if (res.code === 1) {
+        this.tableData = res.result.records;
+        this.tableData.forEach((item) => {
+          item.isRelease = item.isRelease ? "已发布" : "未发布";
+        });
+      }
+    });
+  },
   methods: {
+    // 点击新增按钮
+    addClick() {
+      this.dialogFormVisible = true;
+    },
+    httpRequest() {},
+    // 文章发布点击确定
+    releaseClick() {
+      portalmoduleApi(this.sizeForm).then((res) => {
+        console.log("luo999", res);
+      });
+      this.dialogFormVisible3 = false;
+    },
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    // 点击节点时
+    nodeClick(data, node, self) {},
     /**
-     * 添加文档
+     * 添加分区
      */
-    append(node, data) {
-      this.dialogFormVisible = true;
+    append() {
+      this.dialogFormVisible2 = true;
     },
     //删除
     deletePlan(e, type) {
@@ -183,6 +508,28 @@ export default {
     },
     // 修改
     newPlanForMonthDia(bool, e) {},
+    // 富文本
+    setText() {
+      this.options2 = {
+        debug: "info",
+        modules: {
+          toolbar: "#toolbar",
+        },
+        placeholder: "Compose an epic...",
+        readOnly: true,
+        theme: "snow",
+      };
+
+      // var editor = new Quill("#editor", options);
+    },
+    // 新增发布点击确定
+    submitFn(){
+      console.log(this.sizeForm);
+      // portalmoduleApi(this.sizeForm).then((res) => {
+      //   console.log("luo999", res);
+      // });
+      this.dialogFormVisible=false
+    }
   },
 };
 </script>
@@ -195,32 +542,64 @@ export default {
   position: absolute;
   top: 43px;
   bottom: 0;
+  .custom-tree-node {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 14px;
+    padding-right: 8px;
+  }
+
+  .filter-tree {
+    margin-top: 10px;
+  }
 
-  .right-box {
+  .el-row {
+    width: 100%;
     height: 100%;
-    overflow-y: auto;
-    box-sizing: border-box;
 
-    .top {
-      height: 33px;
-      text-align: right;
+    .left-box {
+      height: 100%;
+      border-right: 1px solid #ebeef5;
+      overflow-y: auto;
+      box-sizing: border-box;
+      padding-right: 10px;
+    }
+
+    .right-box {
+      height: 100%;
+      overflow-y: auto;
+      box-sizing: border-box;
+      padding: 0 15px;
 
-      .upload-demo {
-        display: inline-block;
+      .top {
+        height: 139px;
+        text-align: left;
       }
-    }
-    /deep/.el-form-item__content {
-      display: flex;
-      align-items: center;
-    }
+      // /deep/.el-form-item__content {
+      //   display: flex;
+      //   align-items: center;
+      //   flex-wrap: wrap;
+      // }
 
-    .table-div {
-      height: calc(100% - 81px);
-    }
+      .table-div {
+        height: calc(100% - 187px);
+      }
 
-    .el-pagination {
-      margin-top: 16px;
+      .el-pagination {
+        margin-top: 16px;
+      }
     }
   }
 }
+/deep/.ql-container{
+  min-height: 200px;
+}
+.el-select-dropdown__item{
+  display: block;
+}
+.custom-dialog {
+  background-color: #f3f3f3;
+}
 </style>

+ 60 - 9
src/views/mbsys/collaborative/announcement/information/index.vue

@@ -3,11 +3,47 @@
   <div class="content-container">
     <el-row class="search">
       <el-col :span="5" class="left-box">
-        <ElementuiTree
+        <el-input
+          placeholder="输入关键字进行过滤"
+          v-model="filterText"
+          size="small"
+          clearable
+        ></el-input>
+        <el-tree
+          class="filter-tree"
           :data="data"
-          :defaultProps="defaultProps"
-          @append="append"
-        ></ElementuiTree>
+          :props="defaultProps"
+          default-expand-all
+          node-key="id"
+          :filter-node-method="filterNode"
+          @node-click="nodeClick"
+          :expand-on-click-node="false"
+          ref="tree"
+        >
+          <span class="custom-tree-node" slot-scope="{ node, data }">
+            <span> {{ node.label }}</span>
+            <span>
+              <el-button
+                type="text"
+                size="mini"
+                icon="el-icon-circle-plus-outline"
+                @click="append(node, data)"
+              ></el-button>
+
+              <el-button
+                type="text"
+                size="mini"
+                icon="el-icon-edit"
+              ></el-button>
+              <el-button
+                type="text"
+                size="mini"
+                icon="el-icon-delete"
+                style="color: #f40"
+              ></el-button>
+            </span>
+          </span>
+        </el-tree>
       </el-col>
       <el-col :span="19" class="right-box">
         <div class="top">
@@ -179,7 +215,7 @@
                 v-model="value1"
                 type="datetime"
                 placeholder="选择日期时间"
-                style="wifth: 100%"
+                style="width: 100%"
               >
               </el-date-picker>
             </el-form-item>
@@ -291,12 +327,8 @@
 </template>
 
 <script>
-import ElementuiTree from "../../components/elementuiTree.vue";
 import { getListByPage, portalmoduleApi } from "@/api/mbsys/collaborative";
 export default {
-  components: {
-    ElementuiTree,
-  },
   data() {
     return {
       data: [
@@ -356,6 +388,7 @@ export default {
       dialogFormVisible2: false,
       dialogFormVisible3: false,
       options: [],
+      filterText: "",
       textarea: "",
       startDate: "",
       sizeForm: {
@@ -392,6 +425,12 @@ export default {
       });
       this.dialogFormVisible3 = false;
     },
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    // 点击节点时
+    nodeClick(data, node, self) {},
     /**
      * 添加分区
      */
@@ -419,6 +458,18 @@ export default {
   position: absolute;
   top: 43px;
   bottom: 0;
+  .custom-tree-node {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 14px;
+    padding-right: 8px;
+  }
+
+  .filter-tree {
+    margin-top: 10px;
+  }
 
   .el-row {
     width: 100%;

+ 2 - 54
src/views/mbsys/collaborative/components/elementuiTree.vue

@@ -1,43 +1,7 @@
 <template>
 <!-- tree组件 -->
   <div>
-    <el-input
-      placeholder="输入关键字进行过滤"
-      v-model="filterText"
-      size="small"
-      clearable
-    ></el-input>
-    <el-tree
-      class="filter-tree"
-      :data="data"
-      :props="defaultProps"
-      default-expand-all
-      node-key="id"
-      :filter-node-method="filterNode"
-      @node-click="nodeClick"
-      :expand-on-click-node="false"
-      ref="tree"
-    >
-      <span class="custom-tree-node" slot-scope="{ node, data }">
-        <span> {{ node.label }}</span>
-        <span>
-          <el-button
-            type="text"
-            size="mini"
-            icon="el-icon-circle-plus-outline"
-            @click="append(node, data)"
-          ></el-button>
-
-          <el-button type="text" size="mini" icon="el-icon-edit"></el-button>
-          <el-button
-            type="text"
-            size="mini"
-            icon="el-icon-delete"
-            style="color: #f40"
-          ></el-button>
-        </span>
-      </span>
-    </el-tree>
+   
   </div>
 </template>
 
@@ -51,12 +15,7 @@ export default {
   },
   watch: {},
   methods: {
-    filterNode(value, data) {
-      if (!value) return true;
-      return data.label.indexOf(value) !== -1;
-    },
-    // 点击节点时
-    nodeClick(data, node, self) {},
+    
     /**
      * 添加文档
      */
@@ -68,16 +27,5 @@ export default {
 </script>
  
 <style lang = "scss" scoped>
-.custom-tree-node {
-  flex: 1;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  font-size: 14px;
-  padding-right: 8px;
-}
 
-.filter-tree {
-  margin-top: 10px;
-}
 </style>

+ 64 - 24
src/views/mbsys/collaborative/documentmanage/documentmanage/index.vue

@@ -3,11 +3,51 @@
   <div class="content-container">
     <el-row class="search">
       <el-col :span="5" class="left-box">
-        <ElementuiTree :data="data" :defaultProps="defaultProps" @append="append"></ElementuiTree>
+        <el-input
+          placeholder="输入关键字进行过滤"
+          v-model="filterText"
+          size="small"
+          clearable
+        ></el-input>
+        <el-tree
+          class="filter-tree"
+          :data="data"
+          :props="defaultProps"
+          default-expand-all
+          node-key="id"
+          :filter-node-method="filterNode"
+          @node-click="nodeClick"
+          :expand-on-click-node="false"
+          ref="tree"
+        >
+          <span class="custom-tree-node" slot-scope="{ node, data }">
+            <span> {{ node.label }}</span>
+            <span>
+              <el-button
+                type="text"
+                size="mini"
+                icon="el-icon-circle-plus-outline"
+                @click="append(node, data)"
+              ></el-button>
+
+              <el-button
+                type="text"
+                size="mini"
+                icon="el-icon-edit"
+              ></el-button>
+              <el-button
+                type="text"
+                size="mini"
+                icon="el-icon-delete"
+                style="color: #f40"
+              ></el-button>
+            </span>
+          </span>
+        </el-tree>
       </el-col>
       <el-col :span="19" class="right-box">
         <div class="top">
-          <el-form ref="form" :model="form" style="float: left;height:45px;">
+          <el-form ref="form" :model="form" style="float: left; height: 45px">
             <el-form-item>
               <el-input
                 v-model="form.name"
@@ -142,11 +182,7 @@
 </template>
 
 <script>
-import ElementuiTree from "../../components/elementuiTree.vue"
 export default {
-  components:{
-    ElementuiTree
-  },
   data() {
     return {
       filterText: "",
@@ -212,27 +248,21 @@ export default {
       dialogFormVisible: false,
     };
   },
-  watch: {
-  },
+  watch: {},
   methods: {
-    // // 节点被打开时
-    // currentChange(data) {
-    //   if(data.children){
-    //     this.isopenStatus = true;
-    //   console.log(123456,data);
-    //   }
-    // },
-    // // 节点被关闭时
-    // nodeCollapse() {
-    //   this.isopenStatus = false;
-    // },
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    // 点击节点时
+    nodeClick(data, node, self) {},
     httpRequest() {},
     /* 
       添加文档
     */
-   append(){
-     this.dialogFormVisible=true;
-   }
+    append() {
+      this.dialogFormVisible = true;
+    },
   },
 };
 </script>
@@ -245,6 +275,18 @@ export default {
   position: absolute;
   top: 43px;
   bottom: 0;
+  .custom-tree-node {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 14px;
+    padding-right: 8px;
+  }
+
+  .filter-tree {
+    margin-top: 10px;
+  }
 
   .el-row {
     width: 100%;
@@ -256,8 +298,6 @@ export default {
       overflow-y: auto;
       box-sizing: border-box;
       padding-right: 10px;
-
-      
     }
 
     .right-box {