wgp преди 3 години
родител
ревизия
31ed3dec94

+ 2 - 2
src/components/p-header.vue

@@ -22,7 +22,7 @@
       </div>
       <div class="bars-item" @click="handleCall">
         <i class="el-icon-chat-dot-round"></i>
-        智能应答
+        知识库
       </div>
       <div class="bars-item" @click="handleLogout">
         <i class="el-icon-guide"></i>
@@ -73,7 +73,7 @@ export default {
   },
   methods: {
     handleCall() {
-      this.$switchTab(this, { rountPath: "/chatInit", name: "智能应答" },'chatInit');
+      this.$switchTab(this, { rountPath: "/knowledgetop", name: "知识库" },'knowledgetop');
     },
     change(index, item) {
       this.currentIndex = index;

+ 254 - 0
src/pages/main/knowledgetop/addKnowledge.vue

@@ -0,0 +1,254 @@
+<template>
+  <fullscreen class="mc-container">
+    <div class="container-box">
+      <h2>新增知识库</h2>
+      <el-row :gutter="20" style="margin-top: 15px">
+        <el-col :span="24"
+          ><el-form
+            :model="formData"
+            :rules="rules"
+            ref="ruleForm"
+            label-width="50px"
+            class="demo-ruleForm"
+          >
+            <el-col :span="10">
+              <el-form-item label="标题" prop="title">
+                <el-input
+                  v-model="formData.title"
+                  placeholder="请输入标题"
+                ></el-input>
+              </el-form-item>
+              <el-form-item prop="pubType" label="类型">
+                <el-select
+                  style="width: 100%"
+                  :popper-append-to-body="false"
+                  v-model="formData.pubType"
+                  placeholder="发布类型"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in knowledgeType"
+                    :key="item.id"
+                    :label="item.pubType"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="目录" prop="catalogDesc">
+                <div style="display: flex">
+                  <el-input
+                    v-model="formData.catalogDesc"
+                    readonly
+                    placeholder="请选择目录"
+                  ></el-input>
+                  <el-button @click="selectCatalogs">选择</el-button>
+                </div>
+              </el-form-item>
+              <el-form-item label="附件" prop="catalog">
+                <myUpload
+                  @uploadBack="uploadBack"
+                  :fileInfo="fileInfo"
+                  :fileList="fileInfo.fileList"
+                >
+                </myUpload>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="submitForm('ruleForm')"
+                  >立即创建</el-button
+                >
+                <el-button @click="resetForm('ruleForm')">取消</el-button>
+              </el-form-item>
+            </el-col>
+            <el-col :span="14">
+              <el-form-item label="内容" prop="content">
+                <p-editor-tiny
+                  imgType="upload"
+                  v-model="formData.content"
+                ></p-editor-tiny
+              ></el-form-item>
+            </el-col> </el-form
+        ></el-col>
+      </el-row>
+    </div>
+    <el-dialog
+      title="目录树"
+      :visible.sync="catalogDialogVisible"
+      width="45%"
+      :modal-append-to-body="false"
+    >
+      <el-tree
+        class="filter-tree"
+        :data="treeData"
+        node-key="catalog"
+        :props="defaultProps"
+        default-expand-all
+        :filter-node-method="filterNode"
+        @node-click="nodeClick"
+        ref="tree"
+      >
+      </el-tree>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="clearCatalog">取 消</el-button>
+        <el-button type="primary" @click="trueCatalog">确 定</el-button>
+      </span>
+    </el-dialog>
+  </fullscreen>
+</template><script>
+import myUpload from "../../../components/upload";
+export default {
+  data() {
+    return {
+      catalogDialogVisible: false,
+      departmentDialogVisible: false,
+      formData: {
+        title: "",
+        catalog: "",
+        catalogDesc: "",
+        content: "",
+        pubType: "",
+      },
+      rules: {
+        title: [{ required: true, message: "请输入标题", trigger: "blur" }],
+        catalogDesc: [
+          { required: true, message: "请选择目录", trigger: "change" },
+        ],
+        pubType: [{ required: true, message: "请选择类型", trigger: "change" }],
+        content: [
+          {
+            required: true,
+            message: "请输入内容",
+            trigger: "change",
+          },
+        ],
+      },
+      filterText: "",
+      treeData: [],
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      knowledgeType: [],
+      fileInfo: {
+        limit: 5,
+        url: "/market/cknowledgeatt/upload",
+        fileList: [],
+      },
+    };
+  },
+  components: {
+    PEditorTiny: () =>
+      import(
+        /* webpackChunkName: "peditor-tiny" */ "../../../components/p-editor-tiny"
+      ),
+    myUpload,
+  },
+  methods: {
+    uploadBack(v) {
+      this.attList = v;
+    },
+    // 选择完目录清空
+    clearCatalog() {
+      this.formData.catalogDesc = "";
+      this.formData.catalog = "";
+      this.catalogDialogVisible = false;
+    },
+    // 选择完目录确认
+    trueCatalog() {
+      this.catalogDialogVisible = false;
+    },
+    // 选择目录弹出
+    selectCatalogs() {
+      this.catalogDialogVisible = true;
+    },
+    // 选择部门弹出
+    selectDepartment() {
+      this.departmentDialogVisible = true;
+    },
+    //字典类型
+    getListype(v) {
+      this.$http({
+        url: "/market/mkKnowledgePubMsgType/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          dictCode: "pubType",
+        },
+      }).then((res) => {
+        this.knowledgeType = res.data;
+      });
+    },
+    // 树筛选
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    async submitForm(formName) {
+      let valid = await this.$refs[formName].validate().catch((err) => err);
+      if (valid) {
+        alert("submit!");
+      } else {
+        console.log("error submit!!");
+        return false;
+      }
+    }, // 树点击
+    nodeClick(index, data, node) {
+      this.formData.catalogDesc = data.data.title;
+      this.formData.catalog = data.data.id;
+    },
+    resetForm(formName) {
+      this.$refs[formName].resetFields();
+    },
+    getData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalog/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeData = res.data;
+      });
+    },
+  },
+  mounted() {
+    this.getData();
+    this.getListype();
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+};
+</script>
+<style>
+.mc-container {
+  margin: 15px;
+  background: #fff;
+  border-radius: 5px;
+  height: calc(100vh - 150px);
+  margin-bottom: 0;
+}
+.mc-container .container-box {
+  width: 100%;
+  height: 100%;
+  max-height: 96vh;
+  margin-top: 20px;
+  padding: 0 20px 0 20px;
+  overflow-x: hidden !important;
+  padding-top: 20px;
+}
+.tinymce-editor {
+  height: 300px;
+}
+.mc-container .el-upload{
+  width:100%
+}
+.mc-container .el-upload-dragger{
+  width: 100%;
+}
+</style>

+ 503 - 0
src/pages/main/knowledgetop/catalog.vue

@@ -0,0 +1,503 @@
+<template>
+  <div class="container">
+    <div class="main-box container-box">
+      <div class="inner-left" style="overflow: hidden">
+        <div class="button-list">
+          <el-button type="primary" @click="firstMenu" plain
+            >添加一级目录</el-button
+          >
+          <el-button type="primary" @click="addMenu" plain
+            >添加子目录</el-button
+          >
+          <el-button type="primary" @click="delMenu" plain>删除</el-button>
+          <el-dropdown
+            @command="treeAction"
+            trigger="click"
+            style="margin-left: 15px"
+          >
+            <el-button type="primary" plain>
+              树操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item :command="1">全部展开</el-dropdown-item>
+              <el-dropdown-item :command="2">全部关闭</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </div>
+        <div class="choice-style">
+          <div class="ant-alert-info ant-alert">
+            <i style="color: #1890ff" class="el-icon-warning"></i>当前选择:{{
+              actionName
+            }}
+            <span class="canel-style" @click="canelChoice" v-show="actionName"
+              >取消选择</span
+            >
+          </div>
+        </div>
+        <div style="margin: 10px 0">
+          <el-input
+            placeholder="请输入内容"
+            v-model="filterText"
+            class="input-with-select"
+            clearable
+            @change="
+              () => {
+                if (!filterText) {
+                  searchMenu();
+                }
+              }
+            "
+          >
+            <el-button
+              slot="append"
+              @click="searchMenu"
+              icon="el-icon-search"
+            ></el-button>
+          </el-input>
+        </div>
+        <div
+          v-loading="loading"
+          style="height: calc(100% - 200px); overflow-y: scroll"
+        >
+          <el-tree
+            ref="catalogTree"
+            class="tree-line"
+            :expand-on-click-node="true"
+            :auto-expand-parent="true"
+            :default-expand-all="true"
+            :props="defaultProps"
+            :data="menuList"
+            @node-click="nodeClick"
+            :filter-node-method="filterNode"
+            node-key="id"
+          >
+            <span class="custom-tree-node" slot-scope="{ node }">
+              <span>
+                <span style="color: #009cff" class="iconfont icon-wenjianjia"></span>
+                <!-- <span
+                  v-if="
+                    node.data.hasOwnProperty('children') &&
+                    node.data.children.length > 0
+                  "
+                  style="color: #009cff"
+                  class="iconfont icon-wenjianjia"
+                ></span> -->
+                <!-- <span
+                  v-else
+                  style="color: #fdb441"
+                  class="iconfont icon-wenjian"
+                ></span> -->
+                <span
+                  :style="
+                    node.data.hasOwnProperty('parent')
+                      ? 'font-size:14px;padding-left:5px'
+                      : 'font-size:12px;padding-left:5px'
+                  "
+                  >{{ node.data.title }}</span
+                >
+              </span>
+            </span>
+          </el-tree>
+        </div>
+        <div class="tree-action"></div>
+      </div>
+      <div class="inner-right">
+        <div v-if="actionName">
+          <div class="choice-style" style="width: 80%; margin: 15px auto">
+            <div class="ant-alert-info ant-alert">
+              <i style="color: #1890ff" class="el-icon-warning"></i>请编辑信息
+            </div>
+          </div>
+          <el-form
+            :model="formData"
+            :rules="rules"
+            ref="ruleForm"
+            label-width="100px"
+            class="demo-ruleForm"
+            style="width: 80%; margin: 50px auto"
+          >
+            <el-form-item label="目录名称" prop="title">
+              <el-input
+                v-model="formData.title"
+                placeholder="请输入标题"
+              ></el-input>
+            </el-form-item>
+            <el-form-item
+              prop="parentId"
+              v-if="actionName != 'add'"
+              label="父级编码"
+            >
+              <el-input
+                disabled
+                v-model="formData.parentId"
+                placeholder="请输入父级编码"
+              ></el-input>
+            </el-form-item>
+            <el-form-item
+              label="父级名称"
+              v-if="actionName != 'add'"
+              prop="parentName"
+            >
+              <el-input
+                disabled
+                v-model="formData.parentName"
+                readonly
+                placeholder="请输入父级名称"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="操作人" prop="createName">
+              <el-input
+                v-model="formData.createName"
+                readonly
+                placeholder="请输入操作人"
+              ></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="submitForm('ruleForm')">{{
+                subType
+              }}</el-button>
+              <el-button @click="resetForm('ruleForm')">取消</el-button>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div v-else style="text-align: center">
+          <img src="../../../assets/404.png" alt="" />
+          <div>请先选择一个目录</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      loading: false,
+      defaultExpand: true,
+      functionCode: "",
+      filterText: "", // tree搜索value
+      actionName: "", // 当前选择节点名称
+      menuList: [], // tree数据源
+      checkedMenu: [], // 选中节点的functionCode
+      checkedNodes: [], // 选中节点的node值
+      roleData: "", // 某一条数据
+      formData: {
+        id: "",
+        title: "",
+        createName: JSON.parse(sessionStorage.userInfo).loginName,
+        createId: JSON.parse(sessionStorage.userInfo).loginNo,
+        orgName: JSON.parse(sessionStorage.userInfo).groupName,
+        orgId: JSON.parse(sessionStorage.userInfo).groupId,
+        parentId: "",
+        parentName: "",
+      },
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      rules: {
+        title: [{ required: true, message: "请输入标题", trigger: "change" }],
+        parentId: [
+          { required: false, message: "请选择父级编码", trigger: "change" },
+        ],
+      },
+      subType: "",
+    };
+  },
+  methods: {
+    async submitForm(formName) {
+      let valid = await this.$refs[formName].validate().catch((err) => err);
+      if (valid) {
+        this.$http({
+          url:
+            this.subType == "保存"
+              ? "/market/mkKnowledgeCatalog/add"
+              : "/market/mkKnowledgeCatalog/update",
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: this.formData,
+        }).then((res) => {
+          if (res.data.result == 0) {
+            this.$message({
+              type: "success",
+              message: res.data.desc,
+            });
+            this.actionName = "";
+            this.getData();
+          }
+        });
+      } else {
+        console.log("error submit!!");
+        return false;
+      }
+    },
+    resetForm(formName) {
+      this.actionName = "";
+      this.$refs[formName].resetFields();
+    },
+    addMenu() {
+      if (!this.actionName) {
+        this.$message("请先点击选中要增加菜单的位置");
+      } else {
+        this.subType = "保存";
+        this.formData.parentId = this.formData.id;
+        this.formData.parentName = this.formData.title;
+        this.formData.title = "";
+        this.formData.id = "";
+      }
+    },
+    treeAction(val) {
+      val == 1 ? (this.defaultExpand = true) : (this.defaultExpand = false);
+      for (let i = 0; i < this.$refs.catalogTree.store._getAllNodes().length; i++) {
+        this.$refs.catalogTree.store._getAllNodes()[i].expanded = this.defaultExpand;
+      }
+    },
+    canelChoice() {
+      this.actionName = "";
+      this.formData.title = "";
+    },
+    delMenu() {
+      if (!this.formData.id) {
+        this.$message("请先点击选中要删除的菜单");
+      } else {
+        this.$confirm("即将删除此条数据, 是否删除?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.$http({
+              url: "/market/mkKnowledgeCatalog/del",
+              method: "post",
+              headers: {
+                "Content-Type": "application/json",
+              },
+              data: {
+                id: this.formData.id,
+              },
+            }).then((res) => {
+              if (res.data.result == 0) {
+                this.$notify({
+                  title: "成功",
+                  message: res.data.desc,
+                  type: "success",
+                });
+                this.actionName = "";
+                this.getData();
+              }
+            });
+          })
+          .catch(() => {});
+      }
+    },
+    // 添加一级菜单
+    firstMenu() {
+      this.actionName = "add";
+      this.subType = "保存";
+      this.formData.title = "";
+      this.formData.parentId = "";
+      this.formData.parentName = "";
+      this.formData.id = "";
+    },
+    // 搜索按钮事件
+    searchMenu() {
+      this.$refs.tree.filter(this.filterText);
+    },
+    // tree过滤方法
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.functionName.indexOf(value) !== -1;
+    },
+    // 点击树节点事件
+    nodeClick(a, b, c, d) {
+      let nodeData = JSON.parse(JSON.stringify(b.data));
+      this.formData.title = nodeData.title;
+      this.formData.parentId = nodeData.parentId;
+      this.formData.parentName = nodeData.parentName;
+      this.formData.id = nodeData.id;
+      delete Object["children"];
+      this.actionName = nodeData.title;
+      this.subType = "修改";
+    },
+    closeDialog() {
+      this.actionName = "";
+      this.getTreeData({});
+    },
+    // 树形图 复选框监听事件
+    checkChange(a, b, c, d) {
+      this.checkedNodes = b.checkedNodes;
+    },
+    getData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalog/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.menuList = res.data;
+      });
+    },
+  },
+  mounted() {
+    this.getData();
+  },
+};
+</script>
+<style lang="scss" scoped>
+.container {
+  background-color: #f0f2f5;
+
+  .el-col {
+    background-color: white;
+    padding: 0 20px;
+  }
+
+  .container-box {
+    padding: 0;
+    margin-top: 0;
+    height: 100%;
+  }
+
+  .main-box {
+    overflow: hidden;
+    display: flex;
+
+    > div {
+      background-color: white;
+    }
+
+    .inner-left {
+      width: 40%;
+      padding: 0 20px;
+
+      .canel-style {
+        color: #1890ff;
+        cursor: pointer;
+        padding-left: 10px;
+      }
+    }
+
+    .inner-right {
+      width: 58%;
+      margin-left: 2%;
+      overflow-y: auto;
+    }
+  }
+}
+
+.el-button + .el-button {
+  margin-left: 20px;
+}
+
+.button-list {
+  padding: 30px 0 10px 0;
+}
+
+.choice-style {
+  background: rgb(255, 255, 255);
+}
+
+.tree-action {
+  bottom: 0;
+  width: 100%;
+  // border-top: 1px solid #e8e8e8;
+  padding: 10px 16px;
+  text-align: left;
+  left: 0;
+  background: #fff;
+  border-radius: 0 0 2px 2px;
+}
+
+.tree-line {
+  .el-tree-node__content {
+    padding-left: 0 !important;
+  }
+
+  .el-tree-node__expand-icon.is-leaf {
+    display: none !important;
+  }
+
+  .el-tree-node {
+    position: relative;
+    padding-left: 16px; // 缩进量
+  }
+
+  .el-tree-node__children {
+    padding-left: 16px; // 缩进量
+  }
+
+  // 竖线
+  .el-tree-node::before {
+    content: "";
+    height: 100%;
+    width: 1px;
+    position: absolute;
+    left: -3px;
+    top: -17px;
+    border-width: 1px;
+    border-left: 1px dashed #52627c;
+  }
+
+  // 当前层最后一个节点的竖线高度固定
+  .el-tree-node:last-child::before {
+    height: 38px; // 可以自己调节到合适数值
+  }
+
+  // 横线
+  .el-tree-node::after {
+    content: "";
+    width: 24px;
+    height: 20px;
+    position: absolute;
+    left: -3px;
+    top: 20px;
+    border-width: 1px;
+    border-top: 1px dashed #52627c;
+  }
+
+  // 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
+  & > .el-tree-node::after {
+    border-top: none;
+  }
+
+  & > .el-tree-node::before {
+    border-left: none;
+  }
+
+  // 展开关闭的icon
+  .el-tree-node__expand-icon {
+    font-size: 16px;
+
+    // 叶子节点(无子节点)
+    &.is-leaf {
+      color: transparent;
+      // display: none; // 也可以去掉
+    }
+  }
+}
+
+.ant-alert-info {
+  background-color: #e6f7ff;
+  border: 1px solid #91d5ff;
+}
+
+.ant-alert {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  color: rgb(0, 0, 0);
+  font-size: 14px;
+  font-variant: tabular-nums;
+  line-height: 1.5;
+  list-style: none;
+  font-feature-settings: "tnum";
+  position: relative;
+  padding: 8px 15px 8px 37px;
+  word-wrap: break-word;
+  border-radius: 4px;
+}
+</style>

+ 724 - 0
src/pages/main/knowledgetop/copyIndex.vue

@@ -0,0 +1,724 @@
+<template>
+
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+            <div class="search">
+                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(1)">添加
+                </el-button>
+            </div>
+            <div class="tabbox">
+                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                    tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                    <el-table-column prop="knowledgeTitle" label="标题">
+                    </el-table-column>
+                    <el-table-column label="发布工号">
+                        <template slot-scope="scope">
+                            <span class="">{{scope.row.opNo}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="发布姓名">
+                        <template slot-scope="scope">
+                            <span>{{$desensitization(scope.row.opName,1)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="pubDeptName" label="发布部门">
+                    </el-table-column>
+                    <el-table-column prop="pubTypeName" label="发布类型">
+                    </el-table-column>
+                    <el-table-column prop="pubTime" label="发布时间">
+                    </el-table-column>
+                    <el-table-column prop="stsDesc" label="状态">
+                    </el-table-column>
+
+                    <el-table-column label="操作" width="160px" align="center">
+                        <template slot-scope="scope">
+                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)">查看</el-button>
+                            <el-button size="mini" v-if="scope.row.sts != 1" type="primary"
+                                @click="dialogCheck(3,scope.row)">修改</el-button>
+                            <el-button size="mini" v-if="scope.row.sts != 1" type="danger" @click="delLine(scope.row)">
+                                删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+
+            <el-dialog :title="titname + '知识'" :visible.sync="dialogStatus" width="50%" :close-on-press-escape="false"
+                :show-close="true" :before-close="closedia" :destroy-on-close="true" :modal-append-to-body="false"
+                :close-on-click-modal="false">
+                <div v-loading="loadinged">
+                    <el-form :model="infolist" style="height: 50vh;overflow-y: scroll;" ref="infolist" :rules="rules">
+                        <div class="info-line">
+                            <el-form-item prop="knowledgeTitle">
+                                <span>标题</span>
+                                <el-input v-model="infolist.knowledgeTitle" placeholder="标题" :disabled="disableStatus">
+                                </el-input>
+                            </el-form-item>
+                            <el-form-item prop="pubType">
+                                <span>发布类型</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.pubType" placeholder="发布类型"
+                                    clearable :disabled="disableStatus" @change="verifcheck(1)">
+                                    <el-option v-for="item in knowledge.type.options" :key="item.dataCode"
+                                        :label="item.dataName" :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+
+                        <div v-if="titname == '查看'">
+                            <div class="info-line">
+                                <el-form-item prop="opName">
+                                    <span>发布姓名</span>
+                                    <el-input v-model="infolist.opName" placeholder="发布姓名" disabled="disabled">
+                                    </el-input>
+                                </el-form-item>
+                                <el-form-item prop="opNo">
+                                    <span>发布工号</span>
+                                    <el-input v-model="infolist.opNo" placeholder="发布工号" disabled="disabled"></el-input>
+                                </el-form-item>
+                            </div>
+                            <el-form-item class="info-line online">
+                                <span>发布部门</span>
+                                <el-input v-model="infolist.pubDeptName" placeholder="发布部门" disabled></el-input>
+                            </el-form-item>
+                        </div>
+
+                        <el-form-item prop="visiblec" class="info-line online">
+                            <span>可见部门</span>
+                            <deptTree class="tree" @treeCheck="treeCheck" :defaultList="defaultList" :type="depttype"></deptTree>
+                        </el-form-item>
+
+
+                        <el-form-item class="info-line online" v-if="titname != '新建'">
+                            <span>备注</span>
+                            <el-input disabled v-model="infolist.auditDesc" placeholder="备注" type="textarea" :rows="3">
+                            </el-input>
+                        </el-form-item>
+                        <div style="padding-left: 80px" v-if="!disableStatus">
+                            <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
+                            </myUpload>
+                        </div>
+                        <div style="padding:0 20px 10px 100px" v-if="disableStatus">
+                            <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
+                        </div>
+                    </el-form>
+                    <div class="dialog-footer myfooter">
+                        <el-button @click="dialogCli(2)" v-if="disableStatus">确 定</el-button>
+                        <el-button type="primary" @click="dialogCli(1)" v-if="!disableStatus">保 存</el-button>
+                        <el-button type="primary" @click="dialogCli(3)" v-if="!disableStatus">发 布</el-button>
+                        <el-button @click="dialogCli(2)">取 消</el-button>
+                    </div>
+                </div>
+            </el-dialog>
+            <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
+                v-if="centerDialogVisible"></myMessage>
+        </div>
+    </fullscreen>
+
+</template>
+<script>
+    import myUpload from '../../../components/upload'
+    import uploadDown from '../../../components/uploadDown'
+    import mySearch from '../../../components/search'
+    import toolList from '../../../components/toolList'
+    import myMessage from "../../../components/myMessage.vue"
+    import deptTree from "../../../components/deptTree.vue"
+
+    export default {
+        components: {
+            myUpload,
+            uploadDown,
+            mySearch,
+            toolList,
+            myMessage,
+            deptTree
+        },
+        data() {
+            const knowledgeTitle = (rule, value, callback) => {
+                if (!this.infolist.knowledgeTitle) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opName = (rule, value, callback) => {
+                if (!this.infolist.opName) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const pubType = (rule, value, callback) => {
+                if (!this.infolist.pubType) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opNo = (rule, value, callback) => {
+                if (!this.infolist.opNo) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            return {
+                rules: {
+                    opNo: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opNo
+                    }],
+                    pubType: [{
+                        required: true,
+                        trigger: 'change',
+                        validator: pubType
+                    }],
+                    opName: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opName
+                    }],
+                    knowledgeTitle: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: knowledgeTitle
+                    }],
+                },
+                tooltit: '知识库管理',
+                fileInfo: {
+                    limit: 5,
+                    url: '/market/cknowledgeatt/upload',
+                    fileList: []
+                },
+                fullscreen: false,
+                total: 0,
+                pageSize: 1,
+                knowledge: {
+                    type: {
+                        value: '',
+                        options: []
+                    },
+                    startime: null,
+                    endtime: null,
+                },
+                tableData: [],
+                dialogStatus: false,
+                infolist: {},
+                typeOptions: [],
+                titname: '',
+                disableStatus: false,
+                fileList: [],
+                visiblec: [],
+                visibleList: [],
+                attList: [],
+                datalist: {
+                    url: '/market/compatt/downfile',
+                    type: 1
+                },
+                uploadstatus: false,
+                userInfo: {},
+                searchList: [{
+                        type: 'sel',
+                        tit: '发布类型',
+                        value: '',
+                        width: '19%',
+                        options: []
+                    },
+                    {
+                        type: 'input',
+                        tit: '发布标题',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '开始时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '结束时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'input',
+                        tit: '关键字',
+                        value: '',
+                        width: '19%',
+                    },
+                ],
+                params: {},
+                centerDialogVisible: false,
+                messTit: '',
+                delid: '',
+                loading: false,
+                loadinged: false,
+                treeList: [],
+                defaultList:[],
+                depttype:0,
+            }
+        },
+        methods: {
+            treeCheck(v){
+                this.treeList = v;
+            },
+            closedia() {
+                this.infolist = {};
+                this.dialogStatus = false;
+                this.fileInfo.fileList = [];
+                this.defaultList = [];
+                this.depttype = 0;
+            },
+            uploadBack(v) {
+                this.attList = v;
+            },
+            //搜索数据
+            searchInfo(v) {
+                this.params = {};
+                v[0] ? this.params.pubType = v[0] : '';
+                v[1] ? this.params.knowledgeTitle = v[1] : '';
+                v[2] ? this.params.opTimeFrom = this.$formatDate(v[2], "YYYY-MM-DD") : '';
+                v[3] ? this.params.opTimeTo = this.$formatDate(v[3], "YYYY-MM-DD") : '';
+                if (v[4]) {
+                    this.params = {};
+                    this.params.keyWord = v[4]
+                }
+                this.getList(this.params, this.pageSize);
+            },
+            //获取列表
+            getList(v, n) {
+                this.pageSize = n;
+                let _this = this;
+                this.loading = true;
+                this.tableData = [];
+                this.$http({
+                    url: "/market/cknowledge/queryListByPubDept",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                    },
+                    data: v,
+                }).then((res) => {
+                    this.tableData = res.data.data;
+                    this.total = res.data.totalRecord;
+                    this.loading = false;
+                });
+            },
+            //获取部门
+            getDepot() {
+                this.$http({
+                    url: "/sysmgr/sysdept/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {},
+                }).then((res) => {
+                    this.typeOptions = res.data;
+                });
+            },
+            //字典类型
+            getListype(v) {
+                this.$http({
+                    url: "/market/mkKnowledgePubMsgType/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        dictCode: 'pubType'
+                    },
+                }).then((res) => {
+                    let listopt = [];
+                    res.data.forEach(item => {
+                        listopt.push({
+                            dataCode: item.id,
+                            dataName: item.pubType,
+                        })
+                    })
+                    this.searchList[0].options = listopt;
+                    this.knowledge.type.options = listopt;
+                });
+            },
+            //功能栏
+            iconCli(v) {
+                if (v === 1) {
+                    this.getList(this.params, this.pageSize);
+                }
+                if (v === 2) {
+                    this.fullscreen = !this.fullscreen
+                }
+            },
+            // 分页
+            currchange(v) {
+                this.pageSize = v;
+                this.getList(this.params, this.pageSize);
+            },
+            //查看 修改 新增
+            dialogCheck(v, n) {
+                this.dialogStatus = true;
+                this.disableStatus = false;
+                this.visiblec = [];
+                this.defaultList = [];
+                this.infolist = {};
+                if (v === 1) {
+                    this.titname = '新建';
+                    this.infolist = {};
+                    this.defaultList = [];
+                    this.depttype = 0;
+                    this.getUser();
+                    return
+                } else if (v === 2) {
+                    this.titname = '查看';
+                    this.disableStatus = true;
+                } else if (v === 3) {
+                    this.titname = '修改';
+                    this.loadinged = true;
+                }
+                this.$http({
+                    url: "/market/cknowledge/queryInfo",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        id: n.id
+                    },
+                }).then((res) => {
+                    res.data.opName = this.$desensitization(res.data.opName,1);
+                    this.datalist.attList = res.data.attList;
+                    this.uploadstatus = true;
+                    this.infolist = res.data;
+                    this.fileInfo.fileList = [];
+                    this.attList = [];
+                    this.treeList = this.infolist.visibleList;
+                    res.data.attList.forEach(item => {
+                        this.fileInfo.fileList.push({
+                            name: item.fileName,
+                            url: '',
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName: item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime,
+                        });
+                        this.attList.push({
+                            name: item.fileName,
+                            url: '',
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName: item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime,
+                        });
+                    })
+                    res.data.visibleList.forEach(item => {
+                        this.defaultList.push(item.deptId);
+                    })
+                    this.depttype = 2;
+                    this.loadinged = false;
+                });
+            },
+            //添加 修改
+            dialogCli(v) {
+                this.uploadstatus = false;
+                this.datalist.attList = [];
+                this.fileInfo.fileList = [];
+                if (v === 2) {
+                    this.getUser();
+                    this.dialogStatus = false;
+                    this.defaultList = [];
+                    this.depttype = 0;
+                    return
+                }
+                this.infolist.pubTime = this.$formatDate(new Date(), "YYYY-MM-DD");
+                if (this.titname === '新建') {
+                    this.submitInfo("/market/cknowledge/save", v);
+                } else if (this.titname === '修改') {
+                    this.submitInfo("/market/cknowledge/update", v);
+                }
+            },
+            submitInfo(u, v) {
+                let _this = this;
+                this.$refs.infolist.validate(valid => {
+                    if (valid) {
+                        this.infolist.sts = "0";
+                        this.infolist.stsDesc = "草稿";
+                        this.infolist.opNo = this.userInfo.loginNo;
+                        this.infolist.opName = this.userInfo.loginName;
+                        this.infolist.contactPhone = this.userInfo.phoneNo;
+                        if (v === 3) {
+                            this.infolist.sts = "2";
+                            this.infolist.stsDesc = "待审核";
+                        }
+                        let attList = [];
+                        for (let i = 0; i < this.attList.length; i++) {
+                            attList.push({
+                                id: this.attList[i].id,
+                                fileCode: this.attList[i].fileCode,
+                                fileName: this.attList[i].fileName,
+                                opName: this.attList[i].opName,
+                                opNo: this.attList[i].opNo,
+                                opTime: this.attList[i].opTime,
+                            });
+                        }
+                        this.loadinged = true;
+                        this.$http({
+                            url: u,
+                            method: "post",
+                            headers: {
+                                "Content-Type": "application/json",
+                            },
+                            data: {
+                                knowledge: this.infolist,
+                                attList: attList,
+                                visibleList: this.treeList
+                            },
+                        }).then((res) => {
+                            this.loadinged = false;
+                            if (res.data.result === 1) {
+                                _this.$message({
+                                    message: res.data.desc,
+                                    type: 'error'
+                                });
+                            } else {
+                                _this.$message({
+                                    message: '成功',
+                                    type: 'success'
+                                });
+                                _this.fileInfo.fileList = [];
+                                _this.infolist = {};
+                                _this.dialogStatus = false;
+                                _this.getList(_this.params, _this.pageSize);
+                                _this.defaultList = [];
+                                _this.depttype = 0;
+                            }
+                        })
+                    }
+                })
+            },
+            //处理所需数据
+            verifcheck(v) {
+                if (v === 1) {
+                    for (let i = 0; i < this.knowledge.type.options.length; i++) {
+                        if (this.knowledge.type.options[i].dataCode == this.infolist.pubType) {
+                            this.infolist.pubTypeName = this.knowledge.type.options[i].dataName
+                        }
+                    }
+                }
+            },
+            closeMessage(v) {
+                this.centerDialogVisible = false;
+                let _this = this;
+                if (v === 1) {
+                    this.$http({
+                        url: "/market/cknowledge/queryInfo",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: {
+                            id: this.delid
+                        },
+                    }).then((res) => {
+                        let attList = [];
+                        for (let i = 0; i < res.data.attList.length; i++) {
+                            attList.push({
+                                id: res.data.attList[i].id
+                            })
+                        }
+                        _this.$http({
+                            url: "/market/cknowledge/delete",
+                            method: "post",
+                            headers: {
+                                "Content-Type": "application/json",
+                            },
+                            data: {
+                                knowledge: {
+                                    id: this.delid
+                                },
+                                attList: attList,
+                                visibleList: res.data.visibleList
+                            }
+                        }).then((res) => {
+                            if (res.data.result === 1) {
+                                _this.$message({
+                                    message: res.data.desc,
+                                    type: 'error'
+                                });
+                            } else {
+                                _this.$message({
+                                    message: '删除成功',
+                                    type: 'success'
+                                });
+                                _this.getList(this.params, this.pageSize);
+                            }
+                        });
+                    });
+                }
+            },
+            //删除
+            delLine(v) {
+                this.centerDialogVisible = true;
+                this.messTit = '即将删除此条数据, 是否删除?';
+                this.delid = v.id;
+            },
+            getUser() {
+                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+                this.infolist = {};
+                this.infolist.opNo = this.userInfo.loginNo;
+                // this.infolist.pubDeptId = this.userInfo.group;
+                // this.infolist.pubDeptName = this.userInfo.groupName;
+                this.infolist.opName = this.userInfo.loginName;
+                this.infolist.contactPhone = this.userInfo.phoneNo;
+            },
+        },
+        mounted() {
+            this.getList(this.params, this.pageSize);
+            this.getDepot();
+            this.getListype();
+            this.getUser();
+        },
+        created() {
+
+        }
+    }
+</script>
+<style scoped lang="scss">
+    @import "../../../assets/style";
+
+    .iconfont {
+        font-size: 42px;
+    }
+
+    .icon-excel {
+        color: #67DB63;
+    }
+
+    .icon-word {
+        color: #FF654E;
+    }
+
+    .icon-ppt {
+        color: #FF8943;
+    }
+
+    .icon-wenjian {
+        color: #ccc;
+    }
+
+    .el-icon-picture {
+        font-size: 36px;
+        color: #ccc;
+        background: #fff;
+        padding: 4px 2px;
+        margin-bottom: 2px;
+    }
+
+    .back-box {
+        margin-top: 20px;
+        background: #F2F2F2;
+        padding: 20px;
+
+        div {
+            display: inline-block;
+            text-align: center;
+            margin-right: 20px;
+            cursor: pointer;
+
+            span {
+                display: block;
+                width: 80px;
+                overflow: hidden;
+                padding-top: 10px;
+                margin: 0 10px;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                display: -webkit-box;
+                /* 将对象作为弹性伸缩盒子模型显示 */
+                -webkit-line-clamp: 1;
+                /* 控制最多显示几行 */
+                -webkit-box-orient: vertical;
+                /* 设置或检索伸缩盒对象的子元素的排列方式 */
+            }
+        }
+    }
+
+    .titbox {
+        div {
+            float: right;
+
+            i {
+                font-size: 22px;
+                margin-left: 20px;
+                cursor: pointer;
+            }
+        }
+    }
+
+    .tabbox {
+        margin-top: 15px;
+    }
+
+    .pageBox {
+        text-align: right;
+        margin-top: 10px;
+    }
+
+    .info-line {
+        width: 100%;
+        display: block;
+        padding-left: 20px;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+        .tree{
+            width: calc(100% - 100px);
+        }
+    }
+
+    .online {
+        width: 100%;
+
+        .el-select {
+            width: calc(100% - 100px);
+        }
+
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+</style>

Файловите разлики са ограничени, защото са твърде много
+ 2 - 0
src/pages/main/knowledgetop/data.js


+ 173 - 0
src/pages/main/knowledgetop/index.vue

@@ -0,0 +1,173 @@
+<template>
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <h2 style="margin-top: 20px;">知识库</h2>
+            <div class="adv-type">
+                <div
+                    class="wfour"
+                    @click="jumpinfo('/knowledgeManagement', '知识库管理')"
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识库管理</span>
+                </div>
+                <!-- <div
+                    class="wfour"
+                    @click="jumpinfo('/knowledgeExaminetop', '知识库审核')"
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识库审核</span>
+                </div> -->
+                <div
+                    class="wfour"
+                    @click="jumpinfo('/knowledgeTypetop', '知识类型管理')"
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识类型管理</span>
+                </div>
+                <div
+                    class="wfour"
+                    @click="
+                        jumpinfo('/knowledgeCatalogtop', '知识库目录管理')
+                    "
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识库目录管理</span>
+                </div>
+            </div>
+        </div>
+    </fullscreen>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import myMessage from "../../../components/myMessage.vue";
+import toolList from "../../../components/toolList";
+import myUpload from "../../../components/upload";
+
+export default {
+    components: {
+        mySearch,
+        myMessage,
+        toolList,
+        myUpload
+    },
+    data() {
+        return {
+            fullscreen: false,
+            lockFlag: "see",
+            province: true
+        };
+    },
+    methods: {
+        jumpinfop(p, v, n) {
+            this.$router.push({
+                path: p,
+                query: {
+                    type: v
+                }
+            });
+            this.setabList(n, p + "?type=" + v);
+        },
+        jumpinfo(p, n) {
+            this.$router.push({
+                path: p
+            });
+            this.setabList(n, p);
+        },
+        setabList(n, p) {
+            let params = {
+                children: "",
+                name: n,
+                rountPath: p,
+                target: "_self"
+            };
+            for (let i = 0; i < this.$store.state.tabList.length; i++) {
+                if (this.$store.state.tabList[i].name === params.name) {
+                    this.$store.state.tabList[i] = params;
+                }
+            }
+            let set = new Set([...this.$store.state.tabList, params]);
+            set.add(params);
+            this.$store.commit("setDefaultActive", params.rountPath);
+            this.$store.commit("setTabList", Array.from(set));
+        },
+        // getUser() {
+        //     this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+        //     let Menus = JSON.parse(window.sessionStorage.childrenMenus);
+        //     for (let i = 0; i < Menus.length; i++) {
+        //         if (
+        //             Menus[i].systemflag == 1 &&
+        //             Menus[i].jspUrl == "/publicityAccount"
+        //         ) {
+        //             this.lockFlag = "add"; //省级
+        //         }
+        //         if (
+        //             Menus[i].systemflag == 1 &&
+        //             Menus[i].jspUrl == "/publicity"
+        //         ) {
+        //             this.lockFlag = "updata"; //管理员
+        //             i = Menus.length;
+        //         }
+        //     }
+        //     for (let i = 0; i < Menus.length; i++) {
+        //         if (
+        //             Menus[i].systemflag == 1 &&
+        //             Menus[i].jspUrl == "/province"
+        //         ) {
+        //             this.province = true; //省公司
+        //         }
+        //     }
+        // }
+    },
+    mounted() {
+        // this.getUser();
+    },
+    created() {}
+};
+</script>
+<style scoped lang="scss">
+.container-box {
+    height: calc(100vh - 200px);
+    overflow-y: scroll;
+    padding-bottom: 20px;
+}
+.adv-type {
+    margin-top: 20px;
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    // border: 1px solid #ddd;
+    border-radius: 5px;
+    padding: 20px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    div {
+        width: 33%;
+        text-align: center;
+        height: 80px;
+        overflow: hidden;
+        min-width: 100px;
+        cursor: pointer;
+        padding-top: 10px;
+        margin: 10px 0;
+    }
+    div:hover {
+        background: #cfe8fc;
+        border-radius: 5px;
+    }
+    span {
+        width: 100%;
+        display: inline-block;
+        height: 40px;
+        // line-height: 40px;
+        i {
+            color: #0074d9;
+            font-size: 36px;
+        }
+    }
+    .wfour {
+        width: 25%;
+    }
+    .wfive {
+        width: 20%;
+    }
+}
+</style>

+ 566 - 0
src/pages/main/knowledgetop/knowledgeExamine.vue

@@ -0,0 +1,566 @@
+<template>
+
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+
+        <div class="container-box">
+            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+            <div class="search">
+                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+            </div>
+            <div class="tabbox">
+                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                    tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                    <el-table-column prop="knowledgeTitle" label="标题">
+                    </el-table-column>
+                    <el-table-column label="发布工号">
+                        <template slot-scope="scope">
+                            <span class="">{{scope.row.opNo}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="发布姓名">
+                        <template slot-scope="scope">
+                            <span>{{$desensitization(scope.row.opName,1)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="pubDeptName" label="发布部门">
+                    </el-table-column>
+                    <el-table-column prop="pubTypeName" label="发布类型">
+                    </el-table-column>
+                    <el-table-column prop="pubTime" label="发布时间">
+                    </el-table-column>
+                    <el-table-column prop="stsDesc" label="状态">
+                    </el-table-column>
+
+                    <el-table-column label="操作" width="100px" align="center">
+                        <template slot-scope="scope">
+                            <el-button size="mini" v-if="scope.row.sts == 2" :disabled="!btnctrlStatus" type="danger"
+                                @click="dialogCheck(scope.row)">审核</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+
+            <el-dialog title="审核知识" :visible.sync="dialogStatus" width="50%" :close-on-press-escape="false"
+                :show-close="true" :before-close="closedia" :destroy-on-close="true" :modal-append-to-body="false"
+                :close-on-click-modal="false">
+                <div v-loading="loadinged">
+                    <el-form style="height: 50vh;overflow-y: scroll;" :model="infolist" ref="infolist" :rules="rules">
+                        <div class="info-line">
+                            <el-form-item>
+                                <span>标题</span>
+                                <el-input v-model="infolist.knowledgeTitle" disabled></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>发布类型</span>
+                                <el-input v-model="infolist.pubTypeName" disabled></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>发布姓名</span>
+                                <el-input v-model="infolist.opName" disabled></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>发布工号</span>
+                                <el-input v-model="infolist.opNo" disabled></el-input>
+                            </el-form-item>
+                        </div>
+                        <el-form-item class="info-line online">
+                            <span>发布部门</span>
+                            <el-input v-model="infolist.pubDeptName" disabled></el-input>
+                        </el-form-item>
+                        <el-form-item class="info-line online">
+                            <span>可见部门</span>
+                            <deptTree class="tree" @treeCheck="treeCheck" :defaultList="defaultList" :type="depttype"></deptTree>
+                        </el-form-item>
+                        <el-form-item class="info-line online">
+                            <span>备注</span>
+                            <el-input v-model="infolist.auditDesc" placeholder="备注" type="textarea" :rows="3">
+                            </el-input>
+                        </el-form-item>
+                        <div style="padding:0 20px 10px 100px">
+                            <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
+                        </div>
+                    </el-form>
+                    <div class="dialog-footer myfooter">
+                        <el-button type="primary" @click="dialogCli(1)">通 过</el-button>
+                        <el-button type="primary" @click="dialogCli(3)">打 回</el-button>
+                        <el-button @click="dialogCli(2)">取 消</el-button>
+                    </div>
+                </div>
+            </el-dialog>
+        </div>
+    </fullscreen>
+
+</template>
+<script>
+    import myUpload from '../../../components/upload'
+    import uploadDown from '../../../components/uploadDown'
+    import mySearch from '../../../components/search'
+    import toolList from '../../../components/toolList'
+    import deptTree from '../../../components/deptTree.vue'
+
+    export default {
+        components: {
+            myUpload,
+            uploadDown,
+            mySearch,
+            toolList,
+            deptTree
+        },
+        data() {
+            const knowledgeTitle = (rule, value, callback) => {
+                if (!this.infolist.knowledgeTitle) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opName = (rule, value, callback) => {
+                if (!this.infolist.opName) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const pubType = (rule, value, callback) => {
+                if (!this.infolist.pubType) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opNo = (rule, value, callback) => {
+                if (!this.infolist.opNo) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            return {
+                rules: {
+                    opNo: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opNo
+                    }],
+                    pubType: [{
+                        required: true,
+                        trigger: 'change',
+                        validator: pubType
+                    }],
+                    opName: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opName
+                    }],
+                    knowledgeTitle: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: knowledgeTitle
+                    }],
+                },
+                tooltit: '知识库审核',
+                fileInfo: {
+                    limit: 5,
+                    url: '/market/cknowledgeatt/upload',
+                    fileList: []
+                },
+                fullscreen: false,
+                total: 0,
+                pageSize: 1,
+                knowledge: {
+                    type: {
+                        value: '',
+                        options: []
+                    },
+                    startime: null,
+                    endtime: null,
+                },
+                tableData: [],
+                dialogStatus: false,
+                infolist: {},
+                titname: '',
+                disableStatus: false,
+                fileList: [],
+                visiblec: '',
+                visibleList: [],
+                attList: [],
+                datalist: {
+                    url: '/market/compatt/downfile',
+                    type: 1
+                },
+                uploadstatus: false,
+                userInfo: {},
+                searchList: [{
+                        type: 'sel',
+                        tit: '发布类型',
+                        value: '',
+                        width: '19%',
+                        options: []
+                    },
+                    {
+                        type: 'input',
+                        tit: '发布标题',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '开始时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '结束时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'input',
+                        tit: '关键字',
+                        value: '',
+                        width: '19%',
+                    },
+                ],
+                params: {},
+                centerDialogVisible: false,
+                messTit: '',
+                delid: '',
+                loading: false,
+                loadinged: false,
+                btnctrlStatus: false,
+                treeList: [],
+                defaultList:[],
+                depttype:0,
+            }
+        },
+        methods: {
+            treeCheck(v){
+                this.treeList = v;
+            },
+            closedia() {
+                this.infolist = {};
+                this.dialogStatus = false;
+                this.fileInfo.fileList = [];
+                this.defaultList = [];
+                this.depttype = 0;
+            },
+            //搜索数据
+            searchInfo(v) {
+                this.params = {};
+                v[0] ? this.params.pubType = v[0] : '';
+                v[1] ? this.params.knowledgeTitle = v[1] : '';
+                v[2] ? this.params.opTimeFrom = this.$formatDate(v[2], "YYYY-MM-DD") : '';
+                v[3] ? this.params.opTimeTo = this.$formatDate(v[3], "YYYY-MM-DD") : '';
+                if (v[4]) {
+                    this.params = {};
+                    this.params.keyWord = v[4]
+                }
+                this.getList(this.params, this.pageSize);
+            },
+            //获取列表
+            getList(v, n) {
+                this.pageSize = n;
+                let _this = this;
+                this.loading = true;
+                this.tableData = [];
+                this.$http({
+                    url: "/market/cknowledge/queryChkPage",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                    },
+                    data: v,
+                }).then((res) => {
+                    this.tableData = res.data.data;
+                    this.total = res.data.totalRecord;
+                    this.loading = false;
+                });
+            },
+            //字典
+            getListype(v) {
+                this.$http({
+                    url: "/market/mkKnowledgePubMsgType/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        dictCode: 'pubType'
+                    },
+                }).then((res) => {
+                    let listopt = [];
+                    res.data.forEach(item => {
+                        listopt.push({
+                            dataCode: item.id,
+                            dataName: item.pubType,
+                        })
+                    })
+                    this.searchList[0].options = listopt;
+                    this.knowledge.type.options = listopt;
+                });
+            },
+            //功能栏
+            iconCli(v) {
+                if (v === 1) {
+                    this.getList(this.params, this.pageSize);
+                }
+                if (v === 2) {
+                    this.fullscreen = !this.fullscreen
+                }
+            },
+            // 分页
+            currchange(v) {
+                this.pageSize = v;
+                this.getList(this.params, this.pageSize);
+            },
+            //查看 修改 新增
+            dialogCheck(v) {
+                this.dialogStatus = true;
+                this.visiblec = '';
+                this.infolist = {};
+                this.$http({
+                    url: "/market/cknowledge/queryInfo",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        id: v.id
+                    },
+                }).then((res) => {
+                    res.data.opName = this.$desensitization(res.data.opName,1);
+                    this.datalist.attList = res.data.attList;
+                    this.uploadstatus = true;
+                    this.infolist = res.data;
+                    this.fileInfo.fileList = [];
+                    this.attList = this.infolist.attList;
+                    this.treeList = this.infolist.visibleList;
+                    this.defaultList = [];
+                    res.data.attList.forEach(item => {
+                        this.fileInfo.fileList.push({
+                            name: item.fileName,
+                            url: '',
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName: item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime,
+                        });
+                    })
+                    res.data.visibleList.forEach(item => {
+                        this.defaultList.push(item.deptId);
+                    })
+                    this.depttype = 2;
+                    this.loadinged = false;
+                });
+            },
+            //添加 修改
+            dialogCli(v) {
+                this.uploadstatus = false;
+                this.datalist.attList = [];
+                this.fileInfo.fileList = [];
+                if (v === 2) {
+                    this.getUser();
+                    this.dialogStatus = false;
+                    this.defaultList = [];
+                    this.depttype = 0;
+                    return
+                }
+                this.infolist.sts = v;
+                v == 1 ? this.infolist.stsDesc = "通过" : this.infolist.stsDesc = "打回";
+                this.infolist.auditNo = this.userInfo.loginNo;
+                this.infolist.auditName = this.userInfo.loginName;
+                this.infolist.auditTime = this.$formatDate(new Date(), "YYYY-MM-DD");
+                this.submitInfo("/market/cknowledge/update", v);
+            },
+            submitInfo(u, v) {
+                let _this = this;
+                this.loadinged = true;
+                this.$http({
+                    url: u,
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        knowledge: this.infolist,
+                        attList: this.attList,
+                        visibleList: this.treeList
+                    },
+                }).then((res) => {
+                    this.loadinged = false;
+                    if (res.data.result === 1) {
+                        _this.$message({
+                            message: res.data.desc,
+                            type: 'error'
+                        });
+                    } else {
+                        _this.$message({
+                            message: '成功',
+                            type: 'success'
+                        });
+                        _this.fileInfo.fileList = [];
+                        _this.infolist = {};
+                        _this.dialogStatus = false;
+                        _this.getList(_this.params, _this.pageSize);
+                        _this.defaultList = [];
+                        _this.depttype = 0;
+                    }
+                })
+            },
+            ctrlbtn() {
+                let v = JSON.parse(window.sessionStorage.childrenMenus);
+                for (let i = 0; i < v.length; i++) {
+                    if (v[i].jspUrl == this.$route.path && v[i].systemflag == '1') {
+                        this.btnctrlStatus = true;
+                        return
+                    }
+                }
+            },
+            getUser() {
+                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+            }
+        },
+        mounted() {
+            this.getList(this.params, this.pageSize);
+            this.getListype();
+            this.ctrlbtn();
+        },
+        created() {
+
+        }
+    }
+</script>
+<style scoped lang="scss">
+    @import "../../../assets/style";
+
+    .iconfont {
+        font-size: 42px;
+    }
+
+    .icon-excel {
+        color: #67DB63;
+    }
+
+    .icon-word {
+        color: #FF654E;
+    }
+
+    .icon-ppt {
+        color: #FF8943;
+    }
+
+    .icon-wenjian {
+        color: #ccc;
+    }
+
+    .el-icon-picture {
+        font-size: 36px;
+        color: #ccc;
+        background: #fff;
+        padding: 4px 2px;
+        margin-bottom: 2px;
+    }
+
+    .back-box {
+        margin-top: 20px;
+        background: #F2F2F2;
+        padding: 20px;
+
+        div {
+            display: inline-block;
+            text-align: center;
+            margin-right: 20px;
+            cursor: pointer;
+
+            span {
+                display: block;
+                width: 80px;
+                overflow: hidden;
+                padding-top: 10px;
+                margin: 0 10px;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                display: -webkit-box;
+                /* 将对象作为弹性伸缩盒子模型显示 */
+                -webkit-line-clamp: 1;
+                /* 控制最多显示几行 */
+                -webkit-box-orient: vertical;
+                /* 设置或检索伸缩盒对象的子元素的排列方式 */
+            }
+        }
+    }
+
+    .titbox {
+        div {
+            float: right;
+
+            i {
+                font-size: 22px;
+                margin-left: 20px;
+                cursor: pointer;
+            }
+        }
+    }
+
+    .tabbox {
+        margin-top: 15px;
+    }
+
+    .pageBox {
+        text-align: right;
+        margin-top: 10px;
+    }
+
+    .info-line {
+        width: 100%;
+        display: block;
+        padding-left: 20px;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+        .tree{
+            width: calc(100% - 100px);
+        }
+    }
+
+    .online {
+        width: 100%;
+
+        .el-select {
+            width: calc(100% - 100px);
+        }
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+</style>

+ 987 - 0
src/pages/main/knowledgetop/knowledgeManagement.vue

@@ -0,0 +1,987 @@
+<template>
+  <fullscreen :fullscreen.sync="fullscreen" class="container">
+    <div class="container-box">
+      <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
+      <el-row :gutter="20" style="height: 100%">
+        <el-col :span="4" style="height: 100%">
+          <el-input
+            style="margin-top: 20px"
+            placeholder="输入关键字进行过滤"
+            v-model="filterText"
+          >
+          </el-input>
+          <div class="choice-style">
+            <div class="ant-alert-info ant-alert">
+              <i style="color: #1890ff" class="el-icon-warning"></i>当前选择:{{
+                actionName || "无"
+              }}
+              <div class="canel-style" @click="canelChoice" v-show="actionName">
+                取消选择
+              </div>
+            </div>
+          </div>
+          <div class="tree-box">
+            <el-tree
+              class="filter-tree"
+              :data="treeData"
+              node-key="id"
+              :props="defaultProps"
+              default-expand-all
+              :filter-node-method="filterNode"
+              @node-click="checkNode"
+              ref="tree"
+            ><span class="custom-tree-node" slot-scope="{ node }">
+              <span>
+                <span style="color: #009cff" class="iconfont icon-wenjianjia"></span>
+                <!-- <span
+                  v-if="
+                    node.data.hasOwnProperty('children') &&
+                    node.data.children.length > 0
+                  "
+                  style="color: #009cff"
+                  class="iconfont icon-wenjianjia"
+                ></span> -->
+                <!-- <span
+                  v-else
+                  style="color: #fdb441"
+                  class="iconfont icon-wenjian"
+                ></span> -->
+                <span
+                  :style="
+                    node.data.hasOwnProperty('parent')
+                      ? 'font-size:14px;padding-left:5px'
+                      : 'font-size:12px;padding-left:5px'
+                  "
+                  >{{ node.data.title }}</span
+                >
+              </span>
+            </span>
+            </el-tree>
+          </div>
+        </el-col>
+        <el-col :span="20" style="height: 100%">
+          <div class="search">
+            <mySearch
+              :searchList="searchList"
+              @searchInfo="searchInfo"
+            ></mySearch>
+            <el-button
+              class="btn-check"
+              size="medium"
+              type="primary"
+              @click="dialogCheck(1)"
+              >添加
+            </el-button>
+          </div>
+          <div class="tabbox">
+            <el-table
+              height="calc(100% - 40px)"
+              class="com-table"
+              ref="multipleTable"
+              :data="tableData"
+              tooltip-effect="dark"
+              size="small"
+              border
+              style="width: 100%"
+              v-loading="loading"
+              @sort-change="sortChange"
+            >
+              <el-table-column prop="title" show-overflow-tooltip label="标题">
+              </el-table-column>
+              <el-table-column label="发布工号">
+                <template slot-scope="scope">
+                  <span class="">{{ scope.row.handlerId }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="发布姓名">
+                <template slot-scope="scope">
+                  <span>{{ $desensitization(scope.row.handler, 1) }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="orgName"
+                show-overflow-tooltip
+                label="发布部门"
+              >
+              </el-table-column>
+              <el-table-column prop="typeName" label="发布类型">
+              </el-table-column>
+              <el-table-column
+                prop="catalogName"
+                show-overflow-tooltip
+                label="归属目录"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="createTime"
+                show-overflow-tooltip
+                label="发布时间"
+                width="140"
+              >
+              </el-table-column>
+              <!-- <el-table-column prop="stsDesc" label="状态"> </el-table-column> -->
+              <el-table-column
+                prop="hits"
+                width="90"
+                label="点击量"
+                sortable="custom"
+              >
+              </el-table-column>
+              <el-table-column label="操作" width="250px" align="center">
+                <template slot-scope="scope">
+                  <el-button
+                    size="mini"
+                    type="success"
+                    @click="collectionHandle(scope.row)"
+                    plain
+                    >{{
+                      scope.row.collection == "0" ? "点击收藏" : "取消收藏"
+                    }}</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    type="primary"
+                    plain
+                    @click="dialogCheck(2, scope.row)"
+                    >查看</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    v-if="scope.row.sts != 1"
+                    type="primary"
+                    plain
+                    @click="dialogCheck(3, scope.row)"
+                    >修改</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    v-if="scope.row.sts != 1"
+                    type="danger"
+                    plain
+                    @click="delLine(scope.row)"
+                  >
+                    删除</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-pagination
+              class="pageBox"
+              @current-change="currchange"
+              layout="prev, pager, next"
+              background
+              :total="total"
+            >
+            </el-pagination></div
+        ></el-col>
+      </el-row>
+
+      <el-dialog
+        :title="titname + '知识'"
+        :visible.sync="dialogStatus"
+        width="50%"
+        :close-on-press-escape="false"
+        :show-close="true"
+        :fullscreen="fullscreen"
+        :before-close="closedia"
+        :destroy-on-close="true"
+        :modal-append-to-body="false"
+        :close-on-click-modal="false"
+      >
+        <div slot="title">
+          <div>
+            {{ titname + "知识"
+            }}<i
+              class="el-icon-full-screen"
+              style="float: right; margin-right: 30px"
+              @click="
+                () => {
+                  fullscreen = !fullscreen;
+                }
+              "
+            ></i>
+          </div>
+        </div>
+        <div v-loading="loadinged">
+          <el-form
+            v-if="titname != '查看'"
+            :model="infolist"
+            :style="fullscreen ? '' : 'height: 50vh; overflow-y: scroll'"
+            ref="infolist"
+            :rules="rules"
+          >
+            <div class="info-line">
+              <el-form-item prop="title">
+                <span>标题</span>
+                <el-input v-model="infolist.title" placeholder="标题">
+                </el-input>
+              </el-form-item>
+              <el-form-item prop="type">
+                <span>发布类型</span>
+                <el-select
+                  :popper-append-to-body="false"
+                  v-model="infolist.type"
+                  placeholder="发布类型"
+                  clearable
+                  @change="verifcheck(1)"
+                >
+                  <el-option
+                    v-for="item in knowledge.type.options"
+                    :key="item.dataCode"
+                    :label="item.dataName"
+                    :value="item.dataCode"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </div>
+            <el-form-item prop="catalogName" class="info-line online">
+              <span>目录</span>
+              <div class="treebox">
+                <el-select
+                  v-model="infolist.catalogName"
+                  placeholder="请选择报表路径"
+                  ref="selectReport"
+                >
+                  <el-option
+                    style="height:auto;background-color:#fff"
+                    :value="infolist.catalogName"
+                    :label="infolist.catalogName"
+                  >
+                    <el-tree
+                      :data="treeData"
+                      :props="defaultProps"
+                      @node-click="nodeClick"
+                    ></el-tree>
+                  </el-option>
+                </el-select>
+              </div>
+              <!-- <div class="treebox tree">
+                <p style="padding-left: 10px">
+                  当前选择: <span>{{ infolist.catalogName }}</span>
+                </p>
+                <el-tree
+                  class="tree"
+                  :data="treeData"
+                  node-key="id"
+                  :props="defaultProps"
+                  @node-click="nodeClick"
+                ></el-tree>
+              </div> -->
+            </el-form-item>
+            <el-form-item class="info-line online" prop="text">
+              <span>内容</span>
+              <p-editor-tiny
+                imgType="upload"
+                v-model="infolist.text"
+              ></p-editor-tiny>
+            </el-form-item>
+            <div style="padding-left: 80px">
+              <myUpload
+                @uploadBack="uploadBack"
+                :fileInfo="fileInfo"
+                :fileList="fileInfo.fileList"
+              >
+              </myUpload>
+            </div>
+          </el-form>
+          <div v-loading="loadinged" v-else>
+            <h3 style="text-align: center; margin: 10px 0">
+              {{ infolist.title }}
+            </h3>
+            <div style="font-size: 12px; color: grey; margin: 10px 0">
+              发布时间:{{ infolist.createTime || "暂无" }} 发布人:{{
+                infolist.handler || "暂无"
+              }}
+            </div>
+            <div v-html="infolist.text"></div>
+            <div style="margin: 10px 0">
+              附件:
+              <uploadDown
+                :datalist="datalist"
+                :dialogStatus="uploadstatus"
+              ></uploadDown>
+            </div>
+          </div>
+          <div class="dialog-footer myfooter">
+            <el-button
+              type="primary"
+              v-if="titname != '查看'"
+              @click="dialogCli(1)"
+              >保 存</el-button
+            >
+            <el-button @click="dialogCli(2)">取 消</el-button>
+          </div>
+        </div>
+      </el-dialog>
+      <myMessage
+        :messTit="messTit"
+        @closeMessage="closeMessage"
+        :centerDialogVisible="centerDialogVisible"
+        v-if="centerDialogVisible"
+      ></myMessage>
+    </div>
+  </fullscreen>
+</template>
+<script>
+import myUpload from "../../../components/upload";
+import uploadDown from "../../../components/uploadDown";
+import mySearch from "../../../components/search";
+import toolList from "../../../components/toolList";
+import myMessage from "../../../components/myMessage.vue";
+export default {
+  components: {
+    myMessage,
+    myUpload,
+    uploadDown,
+    mySearch,
+    toolList,
+    PEditorTiny: () =>
+      import(
+        /* webpackChunkName: "peditor-tiny" */ "../../../components/p-editor-tiny"
+      ),
+  },
+  data() {
+    const catalogName = (rule, value, callback) => {
+      if (!this.infolist.catalogName) {
+        callback(new Error("不能为空"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      actionName: "",
+      htmlS: "",
+      filterText: "",
+      choiceName: "", // 点击树提示当前选择项
+      treeData: [], //  目录树数据
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      fullscreen: false, // 是否全屏控制按钮
+      rules: {
+        type: [
+          {
+            required: true,
+            trigger: "change",
+            message: "请选择类型",
+          },
+        ],
+        title: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "请输入标题",
+          },
+        ],
+        text: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "请输入内容",
+          },
+        ],
+        catalogName: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "请选择目录",
+            validator: catalogName,
+          },
+        ],
+      },
+      tooltit: "知识库管理",
+      fileInfo: {
+        limit: 5,
+        url: "/market/cknowledgeatt/upload",
+        fileList: [],
+      },
+      total: 0,
+      pageSize: 1,
+      knowledge: {
+        type: {
+          options: [],
+        },
+      },
+      tableData: [], // 表格数据源
+      dialogStatus: false, // 弹窗开启关闭
+      infolist: {}, // 提交表单数据源
+      typeOptions: [], // 类型数据源
+      titname: "", // 操作名称 -- 新增、修改、查看
+      fileList: [], // 回显附件数据源
+      attList: [], // 修改附件数据源
+      uploadstatus: false,
+      userInfo: {}, // 登录用户信息
+      searchList: [
+        {
+          type: "sel",
+          tit: "类型",
+          value: "",
+          width: "100%",
+          options: [],
+        },
+        {
+          type: "input",
+          tit: "标题",
+          value: "",
+          width: "100%",
+        },
+        {
+          type: "sel",
+          tit: "状态",
+          value: "",
+          width: "100%",
+          options: [
+            {
+              dataCode: "0",
+              dataName: "未收藏",
+            },
+            {
+              dataCode: "1",
+              dataName: "已收藏",
+            },
+          ],
+        },
+      ],
+      params: {},
+      centerDialogVisible: false,
+      messTit: "",
+      dataId: "",
+      loading: false,
+      loadinged: false,
+      datalist: {
+        url: "/market/compatt/downfile",
+        type: 2,
+      },
+    };
+  },
+  methods: {
+    canelChoice() {
+      this.params.catalogId = "";
+      this.actionName = "";
+      this.getList(this.params, this.pageSize);
+    },
+    collectionHandle(val) {
+      this.$http({
+        url: "/market/cnewknowledge/collection",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          id: val.id,
+          collection: val.collection == "0" ? "1" : "0",
+        },
+      }).then((res) => {
+        if (res.data.result === 1) {
+          this.$message({
+            message: res.data.desc,
+            type: "error",
+          });
+        } else {
+          this.$message({
+            message: "成功",
+            type: "success",
+          });
+          this.getList(this.params, this.pageSize);
+        }
+      });
+    },
+    sortChange(val) {
+      if (val.prop == "hits") {
+        this.params.hits = val.order;
+      }
+      this.getList(this.params, this.pageSize);
+    },
+    checkNode(index, data, node) {
+      this.actionName = data.label;
+      this.searchList.map((item) => {
+        item.value = "";
+      });
+      this.params.type = "";
+      this.params.title = "";
+      this.params.collection = "";
+      this.params.catalogId = data.key;
+      this.getList(this.params, this.pageSize);
+    },
+    // 树筛选
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.title.indexOf(value) !== -1;
+    },
+    // 树点击
+    nodeClick(index, data, node) {
+      this.infolist.catalogName = data.data.title;
+      this.infolist.catalogId = data.data.id;
+      this.$forceUpdate();
+    },
+    // 获取树
+    getTreeData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalog/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeData = res.data;
+      });
+    },
+    // 关闭弹窗
+    closedia() {
+      this.fullscreen = false;
+      this.infolist = {};
+      this.dialogStatus = false;
+      this.fileInfo.fileList = [];
+      this.getList(this.params, this.pageSize);
+    },
+    // 上传回调
+    uploadBack(v) {
+      this.attList = v;
+    },
+    //搜索数据
+    searchInfo(v) {
+      this.params = {};
+      v[0] ? (this.params.type = v[0]) : "";
+      v[1] ? (this.params.title = v[1]) : "";
+      v[2] ? (this.params.collection = v[2]) : "";
+      this.getList(this.params, this.pageSize);
+    },
+    //获取列表
+    getList(v, n) {
+      this.pageSize = n;
+      this.loading = true;
+      this.tableData = [];
+      this.$http({
+        url: "/market/mkNewknowledge/queryPage",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+          page: '{"pageNo":"' + n + '","pageSize":"10"}',
+        },
+        data: v,
+      }).then((res) => {
+        this.tableData = res.data.data;
+        this.total = res.data.totalRecord;
+        this.loading = false;
+      });
+    },
+    //字典类型
+    getListype(v) {
+      this.$http({
+        url: "/market/mkKnowledgePubMsgType/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          dictCode: "pubType",
+        },
+      }).then((res) => {
+        let listopt = [];
+        res.data.forEach((item) => {
+          listopt.push({
+            dataCode: item.id,
+            dataName: item.pubType,
+          });
+        });
+        this.searchList[0].options = listopt;
+        this.knowledge.type.options = listopt;
+      });
+    },
+    //功能栏
+    iconCli(v) {
+      if (v === 1) {
+        this.getList(this.params, this.pageSize);
+      }
+      if (v === 2) {
+        this.fullscreen = !this.fullscreen;
+        // let isFullscreen =
+        //   document.body.scrollHeight == window.screen.height &&
+        //   document.body.scrollWidth == window.screen.width;
+        // if (!isFullscreen) {
+        //   this.requestFullscreen();
+        // } else {
+        //   this.exitFullscreen();
+        // }
+      }
+    },
+    // 全屏
+    requestFullscreen() {
+      const element = element || document.documentElement;
+      if (element.requestFullscreen) {
+        element.requestFullscreen();
+      } else if (element.msRequestFullscreen) {
+        element.msRequestFullscreen();
+      } else if (element.mozRequestFullScreen) {
+        element.mozRequestFullScreen();
+      } else if (element.webkitRequestFullscreen) {
+        element.webkitRequestFullscreen();
+      }
+    },
+    // 退出全屏
+    exitFullscreen() {
+      const element = element || document.documentElement;
+      if (document.exitFullscreen) {
+        document.exitFullscreen();
+      } else if (document.msExitFullscreen) {
+        document.msExitFullscreen();
+      } else if (document.mozCancelFullScreen) {
+        document.mozCancelFullScreen();
+      } else if (document.webkitCancelFullScreen) {
+        document.webkitCancelFullScreen();
+      }
+    },
+    // 分页
+    currchange(v) {
+      this.pageSize = v;
+      this.getList(this.params, this.pageSize);
+    },
+    //查看 修改 新增
+    dialogCheck(v, n) {
+      this.dialogStatus = true;
+      this.infolist = {};
+      if (v === 1) {
+        this.titname = "新建";
+        this.infolist = {};
+        this.getUser();
+        return;
+      } else if (v === 2) {
+        this.titname = "查看";
+        this.loadinged = true;
+      } else if (v === 3) {
+        this.titname = "修改";
+        this.loadinged = true;
+      }
+      this.$http({
+        url: "/market/cnewknowledge/queryInfo",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          id: n.id,
+        },
+      }).then((res) => {
+        this.datalist.attList = res.data.attList;
+        this.uploadstatus = true;
+        this.infolist = res.data;
+        this.fileInfo.fileList = [];
+        this.attList = [];
+        res.data.attList.forEach((item) => {
+          this.fileInfo.fileList.push({
+            name: item.fileName,
+            url: "",
+            id: item.id,
+            fileName: item.fileName,
+            fileCode: item.fileCode,
+            opName: item.opName,
+            opNo: item.opNo,
+            opTime: item.opTime,
+          });
+          this.attList.push({
+            name: item.fileName,
+            url: "",
+            id: item.id,
+            fileName: item.fileName,
+            fileCode: item.fileCode,
+            opName: item.opName,
+            opNo: item.opNo,
+            opTime: item.opTime,
+          });
+        });
+        this.loadinged = false;
+      });
+    },
+    //添加 修改
+    dialogCli(v) {
+      this.uploadstatus = false;
+      this.fileInfo.fileList = [];
+      if (v === 2) {
+        this.getUser();
+        this.dialogStatus = false;
+        this.getList(this.params, this.pageSize);
+        return;
+      }
+      if (this.titname === "新建") {
+        this.submitInfo("/market/cnewknowledge/addSave", v);
+      } else if (this.titname === "修改") {
+        this.submitInfo("/market/cnewknowledge/update ", v);
+      }
+    },
+    submitInfo(u, v) {
+      this.$refs.infolist.validate((valid) => {
+        if (valid) {
+          let attList = [];
+          for (let i = 0; i < this.attList.length; i++) {
+            attList.push({
+              id: this.attList[i].id,
+              fileCode: this.attList[i].fileCode,
+              fileName: this.attList[i].fileName,
+              opName: this.attList[i].opName,
+              opNo: this.attList[i].opNo,
+              opTime: this.attList[i].opTime,
+            });
+          }
+          this.loadinged = true;
+          this.$http({
+            url: u,
+            method: "post",
+            headers: {
+              "Content-Type": "application/json",
+            },
+            data: {
+              newKnowleDge: this.infolist,
+              attList: attList,
+            },
+          }).then((res) => {
+            this.loadinged = false;
+            if (res.data.result === 1) {
+              this.$message({
+                message: res.data.desc,
+                type: "error",
+              });
+            } else {
+              this.$message({
+                message: "成功",
+                type: "success",
+              });
+              this.fileInfo.fileList = [];
+              this.infolist = {};
+              this.dialogStatus = false;
+              this.getList(this.params, this.pageSize);
+            }
+          });
+        }
+      });
+    },
+    //处理所需数据
+    verifcheck(v) {
+      if (v === 1) {
+        for (let i = 0; i < this.knowledge.type.options.length; i++) {
+          if (this.knowledge.type.options[i].dataCode == this.infolist.type) {
+            this.infolist.typeName = this.knowledge.type.options[i].dataName;
+          }
+        }
+      }
+    },
+    //删除
+    delLine(val) {
+      this.centerDialogVisible = true;
+      this.messTit = "即将删除此条数据, 是否删除?";
+      this.dataId = val.id;
+    },
+    closeMessage(v) {
+      this.centerDialogVisible = false;
+      if (v === 1) {
+        this.$http({
+          url: "/market/cnewknowledge/delete",
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: { id: this.dataId },
+        }).then((res) => {
+          this.$message({
+            message: "删除成功",
+            type: "success",
+          });
+          this.getList(this.params, this.pageSize);
+        });
+      }
+    },
+    getUser() {
+      this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+      this.infolist = {};
+      this.infolist.handler = this.userInfo.loginNo;
+      this.infolist.orgId = this.userInfo.groupId;
+      this.infolist.orgName = this.userInfo.groupName;
+      this.infolist.handlerId = this.userInfo.loginName;
+    },
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+  mounted() {
+    this.getList(this.params, this.pageSize);
+    this.getListype();
+    this.getUser();
+    this.getTreeData();
+  },
+  created() {},
+};
+</script>
+<style>
+.el-select-dropdown__item {
+  /* padding: 0 !important; */
+}
+</style>
+<style scoped lang="scss">
+@import "../../../assets/style";
+
+// .iconfont {
+//   font-size: 42px;
+// }
+
+.icon-excel {
+  color: #67db63;
+}
+
+.icon-word {
+  color: #ff654e;
+}
+
+.icon-ppt {
+  color: #ff8943;
+}
+
+.icon-wenjian {
+  color: #ccc;
+}
+.tinymce-editor {
+  width: calc(100% - 100px) !important;
+}
+.el-icon-picture {
+  font-size: 36px;
+  color: #ccc;
+  background: #fff;
+  padding: 4px 2px;
+  margin-bottom: 2px;
+}
+.el-icon-full-screen {
+  cursor: pointer;
+}
+.back-box {
+  margin-top: 20px;
+  background: #f2f2f2;
+  padding: 20px;
+
+  div {
+    display: inline-block;
+    text-align: center;
+    margin-right: 20px;
+    cursor: pointer;
+
+    span {
+      display: block;
+      width: 80px;
+      overflow: hidden;
+      padding-top: 10px;
+      margin: 0 10px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box;
+      /* 将对象作为弹性伸缩盒子模型显示 */
+      -webkit-line-clamp: 1;
+      /* 控制最多显示几行 */
+      -webkit-box-orient: vertical;
+      /* 设置或检索伸缩盒对象的子元素的排列方式 */
+    }
+  }
+}
+.tree-box {
+  height: calc(100% - 170px);
+  overflow: auto;
+  border: 1px solid #dcdfe6;
+  border-top: none;
+}
+
+.titbox {
+  div {
+    float: right;
+
+    i {
+      font-size: 22px;
+      margin-left: 20px;
+      cursor: pointer;
+    }
+  }
+}
+
+.tabbox {
+  margin-top: 15px;
+}
+
+.pageBox {
+  text-align: right;
+  margin-top: 10px;
+}
+
+.info-line {
+  width: 100%;
+  display: block;
+  padding-left: 20px;
+
+  div {
+    width: 50%;
+    display: inline-block;
+  }
+
+  span {
+    width: 80px;
+    display: inline-block;
+    text-align: left;
+
+    i {
+      color: red;
+      display: inline-block;
+      padding-right: 5px;
+    }
+  }
+
+  .el-select,
+  .el-input {
+    width: calc(100% - 100px);
+  }
+  .tree {
+    width: calc(100% - 100px);
+  }
+}
+
+.online {
+  width: 100%;
+
+  .el-select {
+    width: calc(100% - 100px);
+  }
+
+  span {
+    vertical-align: top;
+  }
+
+  .el-textarea {
+    width: calc(100% - 100px);
+  }
+}
+.choice-style {
+  background: rgb(255, 255, 255);
+}
+.ant-alert-info {
+  background-color: #e6f7ff;
+  border: 1px solid #91d5ff;
+}
+.ant-alert {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  color: rgb(0, 0, 0);
+  font-size: 14px;
+  font-variant: tabular-nums;
+  line-height: 1.5;
+  list-style: none;
+  font-feature-settings: "tnum";
+  position: relative;
+  padding: 5px 0;
+  word-wrap: break-word;
+  border-radius: 4px;
+}
+.canel-style {
+  color: #1890ff;
+  cursor: pointer;
+  padding-left: 10px;
+}
+</style>

+ 374 - 0
src/pages/main/knowledgetop/knowledgeType.vue

@@ -0,0 +1,374 @@
+<template>
+
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+            <div class="search">
+                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(3)">添加
+                </el-button>
+            </div>
+            <div class="tabbox">
+                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                    tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                    <el-table-column prop="pubType" label="知识类型">
+                    </el-table-column>
+                    <el-table-column prop="createName" label="配置姓名">
+                        <template slot-scope="scope">
+                            <span>{{$desensitization(scope.row.createName,1)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createNo" label="配置工号">
+                        <template slot-scope="scope">
+                            <span class="">{{scope.row.createNo}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="配置时间">
+                    </el-table-column>
+                    <el-table-column label="操作" width="160px" align="center">
+                        <template slot-scope="scope">
+                            <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
+                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)">修改</el-button>
+                            <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+        </div>
+
+        <el-dialog :title="titname + '知识类型'" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
+            :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia">
+            <div v-loading="loadinged">
+                <el-form :model="infolist" ref="infolist" :rules="rules">
+                    <div class="info-line">
+                        <el-form-item prop="pubType">
+                            <span>知识类型</span>
+                            <el-input v-model="infolist.pubType" placeholder="知识类型" :disabled="disableStatus"></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <span>创建时间</span>
+                            <el-date-picker v-model="infolist.createTime" type="date" placeholder="创建时间" disabled>
+                            </el-date-picker>
+                        </el-form-item>
+                    </div>
+
+                    <div class="info-line">
+                        <el-form-item>
+                            <span>创建工号</span>
+                            <el-input v-model="infolist.createNo" placeholder="创建工号" disabled></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <span>创建姓名</span>
+                            <el-input v-model="infolist.createName" placeholder="" disabled></el-input>
+                        </el-form-item>
+                    </div>
+                </el-form>
+
+                <div slot="footer" class="dialog-footer myfooter">
+                    <el-button type="primary" @click="dialogCli(2)" v-if="titname !== '查看'">确 定</el-button>
+                    <el-button @click="dialogCli(1)" v-if="titname === '查看'">确 定</el-button>
+                    <el-button @click="dialogCli(1)">取 消</el-button>
+                </div>
+            </div>
+        </el-dialog>
+
+        <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible" v-if="centerDialogVisible"></myMessage>
+    </fullscreen>
+
+</template>
+<script>
+    import mySearch from "../../../components/search.vue";
+    import myUpload from '../../../components/upload'
+    import myMessage from "../../../components/myMessage.vue"
+    import toolList from '../../../components/toolList'
+
+    export default {
+        components: {
+            mySearch,
+            myUpload,
+            myMessage,
+            toolList
+        },
+        data() {
+            const pubType = (rule, value, callback) => {
+                if (!this.infolist.pubType) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            return {
+                rules: {
+                    pubType: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: pubType
+                    }],
+                },
+                searchList: [
+                    {
+                        type: 'input',
+                        tit: '知识类型',
+                        value: '',
+                        width: '98%',
+                    },
+                ],
+                tooltit:'知识类型管理',
+                fullscreen: false,
+                total: 0,
+                pageSize: 1,
+                tableData: [{}],
+                dialogStatus: false,
+                disableStatus: false,
+                titname: '',
+                infolist: {},
+                userInfo: {},
+                params: {},
+                centerDialogVisible: false,
+                messTit: '',
+                delid: '',
+                loading:false,
+                loadinged:false,
+            }
+        },
+        methods: {
+            closedia() {
+                this.infolist = {};
+                this.dialogStatus = false;
+            },
+            //搜索数据
+            searchInfo(v) {
+                this.params = {};
+                v[0] ? this.params.pubType = v[0] : '';
+                this.getList(this.params, this.pageSize);
+            },
+            //获取列表
+            getList(v, n) {
+                this.pageSize = n;
+                let _this = this;
+                this.loading = true;
+                this.tableData = [];
+                this.$http({
+                    url: "/market/mkKnowledgePubMsgType/queryPage",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                    },
+                    data: v,
+                }).then((res) => {
+                    this.tableData = res.data.data;
+                    this.total = res.data.totalRecord;
+                    this.loading = false;
+                });
+            },
+            // 分页
+            currchange(v) {
+                this.pageSize = v;
+                this.getList(this.params, this.pageSize);
+            },
+            //申请
+            dialogCheck(v, n) {
+                this.dialogStatus = true;
+                this.infolist = Object.assign({}, n);
+                this.infolist.createNo = this.userInfo.loginNo;
+                this.infolist.createName = this.userInfo.loginName;
+                if (v === 1) {
+                    this.titname = '查看';
+                    this.disableStatus = true;
+                } else if (v === 2) {
+                    this.titname = '修改';
+                    this.disableStatus = false;
+                } else if (v === 3) {
+                    this.titname = '添加';
+                    this.disableStatus = false;
+                    return
+                }
+                this.infolist.createName = this.$desensitization(this.infolist.createName,1);
+            },
+            //添加
+            dialogCli(v) {
+                if (v === 1) {
+                    this.infolist = {};
+                    this.dialogStatus = false;
+                    return
+                } else {
+                    this.infolist.createNo = this.userInfo.loginNo;
+                    this.infolist.createName = this.userInfo.loginName;
+                    this.infolist.createTime = this.$formatDate(new Date(), "YYYY-MM-DD");
+                    if (this.titname === '添加') {
+                        this.submitInfo("/market/cpubMsgType/add");
+                    } else if (this.titname === '修改') {
+                        this.submitInfo("/market/mkKnowledgePubMsgType/update", v);
+                    }
+
+                }
+            },
+            submitInfo(u) {
+                let _this = this;
+                this.$refs.infolist.validate(valid => {
+                    if (valid) {
+                        this.loadinged = true;
+                        this.$http({
+                            url: u,
+                            method: "post",
+                            headers: {
+                                "Content-Type": "application/json",
+                            },
+                            data: this.infolist,
+                        }).then((res) => {
+                            this.loadinged = false;
+                            if (res.data.result === 1) {
+                                _this.$message({
+                                    message: res.data.desc,
+                                    type: 'error'
+                                });
+                            } else {
+                                _this.$message({
+                                    message: '成功',
+                                    type: 'success'
+                                });
+                                _this.infolist = {};
+                                _this.dialogStatus = false;
+                                _this.getList({}, _this.pageSize);
+                            }
+
+                        });
+                    }
+                })
+            },
+            closeMessage(v) {
+                this.centerDialogVisible = false;
+                let _this = this;
+                if (v === 1) {
+                    _this.$http({
+                        url: "/market/mkKnowledgePubMsgType/del",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: {
+                            id: this.delid
+                        },
+                    }).then((res) => {
+                        if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        } else {
+                            _this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            });
+                            _this.getList(this.params, this.pageSize);
+                        }
+                    });
+                }
+            },
+            //删除
+            delLine(v) {
+                this.centerDialogVisible = true;
+                this.messTit = '即将删除此条数据, 是否删除?';
+                this.delid = v.id;
+            },
+            //文件返回值
+            uploadBack(v) {
+                console.log(v)
+            },
+            //功能栏
+            iconCli(v) {
+                if (v === 1) {
+                    this.getList(this.params, this.pageSize);
+                }
+                if (v === 2) {
+                    this.fullscreen = !this.fullscreen
+                }
+            },
+            getUser() {
+                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+            }
+        },
+        mounted() {
+            this.getList({}, 1);
+            this.getUser();
+        },
+        created() {
+
+        }
+    }
+</script>
+<style scoped lang="scss">
+    .onetab {
+        margin-bottom: 20px;
+        padding: 0 20px;
+    }
+
+    .titbox {
+        div {
+            float: right;
+
+            i {
+                font-size: 22px;
+                margin-left: 20px;
+                cursor: pointer;
+            }
+        }
+    }
+
+    .tabbox {
+        margin-top: 15px;
+    }
+
+    .pageBox {
+        text-align: right;
+        margin-top: 10px;
+    }
+
+    .info-line {
+        width: 100%;
+        display: block;
+        padding-left: 20px;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+    }
+
+    .online {
+        width: 100%;
+
+        .el-select {
+            width: calc(100% - 100px);
+        }
+
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+</style>

+ 366 - 0
src/pages/main/knowledgetop/mcIndex.vue

@@ -0,0 +1,366 @@
+<template>
+  <fullscreen :fullscreen.sync="fullscreen" class="container">
+    <div class="container-box">
+      <el-row :gutter="20">
+        <el-col :span="4">
+          <el-input placeholder="输入关键字进行过滤" v-model="filterText">
+          </el-input>
+          <div class="tree-box">
+            <el-tree
+              class="filter-tree"
+              :data="treeData"
+              node-key="catalog"
+              :props="defaultProps"
+              default-expand-all
+              :filter-node-method="filterNode"
+              @node-click="nodeClick"
+              ref="tree"
+            >
+            </el-tree>
+          </div>
+        </el-col>
+        <el-col :span="20">
+          <el-input
+            v-model="params.knowledgeName"
+            style="width: 200px"
+            placeholder="知识标题"
+          ></el-input>
+          <el-select
+            :popper-append-to-body="false"
+            v-model="params.pubType"
+            placeholder="发布类型"
+            clearable
+          >
+            <el-option
+              v-for="item in knowledgeTypeOpation"
+              :key="item.id"
+              :label="item.pubType"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+          <el-button>查询</el-button>
+          <el-radio-group v-model="params.knowledgeType" @change="checkType">
+            <el-radio-button label="a">正常</el-radio-button>
+            <el-radio-button label="1">已收藏</el-radio-button>
+          </el-radio-group>
+          <el-button @click="addKnowledge" style="float: right">添加</el-button>
+          <el-table border ref="filterTable" :data="tableData" style="width: 100%;margin-top:20px">
+            <el-table-column prop="title" label="知识标题"> </el-table-column>
+            <el-table-column prop="address" label="地区"> </el-table-column>
+            <el-table-column prop="time" label="时间" sortable>
+            </el-table-column>
+            <el-table-column prop="point" label="点击量" sortable>
+            </el-table-column>
+            <el-table-column prop="address" label="操作">
+              <template slot-scope="scope">
+                <el-button
+                  plain
+                  size="mini"
+                  type="primary"
+                  @click="detailes(scope.row)"
+                  >查看</el-button
+                >
+                <el-button
+                  plain
+                  size="mini"
+                  type="success"
+                  @click="collection(scope.row)"
+                  >{{ scope.row.collectionDesc }}</el-button
+                >
+                <el-button
+                  plain
+                  size="mini"
+                  type="danger"
+                  @click="detailes(scope.row)"
+                  >修改</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-pagination
+            class="pageBox"
+            @current-change="currchange"
+            layout="prev, pager, next"
+            background
+            :total="total"
+          >
+          </el-pagination>
+        </el-col>
+      </el-row>
+    </div>
+    <el-dialog
+      title="增加知识库"
+      :visible.sync="dialogVisible"
+      width="45%"
+      :modal-append-to-body="false"
+    >
+      <el-form :model="formData" ref="infolist">
+        <el-form-item prop="title">
+          <span>标题</span>
+          <el-input v-model="formData.knowledgeTitle" placeholder="标题">
+          </el-input>
+        </el-form-item>
+        <el-form-item prop="catalog">
+          <span>目录</span>
+          <el-tree
+            class="filter-tree"
+            :data="treeData"
+            node-key="catalog"
+            :props="defaultProps"
+            default-expand-all
+            :filter-node-method="filterNode"
+            @node-click="nodeClick"
+            ref="tree"
+          >
+          </el-tree>
+        </el-form-item>
+        <el-form-item prop="content">
+          <span>内容</span>
+          <p-editor-tiny
+            imgType="upload"
+            v-model="formData.content"
+          ></p-editor-tiny>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible = false"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </fullscreen>
+</template>
+<script>
+export default {
+  components: {
+    PEditorTiny: () =>
+      import(
+        /* webpackChunkName: "peditor-tiny" */ "../../../components/p-editor-tiny"
+      ),
+  },
+  data() {
+    return {
+      total: 0,
+      pageSize: 1,
+      formData: {
+        title: "",
+        catalog: "",
+        department: "",
+        content: "",
+      },
+      dialogVisible: false,
+      fullscreen: false,
+      params: {
+        knowledgeType: "a",
+        knowledgeName: "",
+        pubType: "",
+      },
+
+      dataSourse: [
+        {
+          title: "知识库标题1",
+          address: "哈尔滨",
+          time: "2016-05-02",
+          point: "106",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "1",
+        },
+        {
+          title: "知识库标题2",
+          address: "哈尔滨",
+          time: "2016-05-01",
+          point: "3",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "2",
+        },
+        {
+          title: "知识库标题3",
+          address: "哈尔滨",
+          time: "2016-04-02",
+          point: "1",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "3",
+        },
+        {
+          title: "知识库标题4",
+          address: "哈尔滨",
+          time: "2016-03-02",
+          point: "101",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "3",
+        },
+      ],
+      tableData: [
+        {
+          title: "知识库标题1",
+          address: "哈尔滨",
+          time: "2016-05-02",
+          point: "106",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "1",
+        },
+        {
+          title: "知识库标题2",
+          address: "哈尔滨",
+          time: "2016-05-01",
+          point: "3",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "2",
+        },
+        {
+          title: "知识库标题3",
+          address: "哈尔滨",
+          time: "2016-04-02",
+          point: "1",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "3",
+        },
+        {
+          title: "知识库标题4",
+          address: "哈尔滨",
+          time: "2016-03-02",
+          point: "101",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "3",
+        },
+      ],
+      filterText: "",
+      treeData: [],
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      knowledgeTypeOpation: [],
+    };
+  },
+  methods: {
+    // 分页
+    currchange(v) {
+      this.pageSize = v;
+    },
+    //字典类型
+    getListype(v) {
+      this.$http({
+        url: "/market/mkKnowledgePubMsgType/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          dictCode: "pubType",
+        },
+      }).then((res) => {
+        this.knowledgeTypeOpation = res.data;
+      });
+    },
+    addKnowledge() {
+      this.$router.push("/addknowledge");
+      //   this.dialogVisible = true;
+    },
+    //  查看
+    detailes(val) {
+      console.log(val);
+    },
+    // 树点击
+    nodeClick(index, data, node) {
+      let dataArr = JSON.parse(JSON.stringify(this.dataSourse));
+      let catalog = data.data.hasOwnProperty("catalog")
+        ? data.data.catalog
+        : "";
+      if (catalog) {
+        this.tableData = dataArr.filter((item) => {
+          if (item.catalog == catalog) {
+            return item;
+          }
+        });
+      } else {
+        this.tableData = this.dataSourse;
+      }
+    },
+    // 列表筛选
+    checkType(val) {
+      if (val != "a") {
+        this.tableData = this.tableData.filter((item) => {
+          if (item.collection == val) {
+            return item;
+          }
+        });
+      } else {
+        this.tableData = this.dataSourse;
+      }
+    },
+    // 树筛选
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    resetDateFilter() {
+      this.$refs.filterTable.clearFilter("date");
+    },
+    clearFilter() {
+      this.$refs.filterTable.clearFilter();
+    },
+    // 列表数据格式化
+    formatter(row, column) {
+      return row.address;
+    },
+    // 列表筛选
+    filterTag(value, row) {
+      return row.tag === value;
+    },
+    // 收藏
+    collection(val) {
+      if (val.collection == "1") {
+        val.collection = "0";
+        val.collectionDesc = "为收藏";
+      } else {
+        val.collection = "1";
+        val.collectionDesc = "已收藏";
+      }
+    },
+    getData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalog/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeData = res.data;
+      });
+    },
+  },
+  mounted() {
+    this.getListype();
+    this.getData();
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+};
+</script>
+<style>
+.pageBox {
+  text-align: right;
+  margin-top: 10px;
+}
+.tree-box {
+  height: 400px;
+  overflow: auto;
+  border: 1px solid #dcdfe6;
+  border-top: none;
+}
+</style>

+ 52 - 1
src/router/index.js

@@ -1525,7 +1525,58 @@ const routes = [{
             path: '/tvImportTaskList',
             name: 'tvImportTaskList',
             component: (resolve) => require( ['../pages/main/homeMarket/tvIntroduction/taskList'], resolve)
-        }
+        },
+        {
+            meta: {
+                name: '知识库',
+                keepAlive: false
+            },
+            path: '/knowledgetop',
+            name: 'knowledgetop',
+            component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/knowledgetop/index'], resolve)
+        },
+        {
+            meta: {
+                name: '知识库',
+                keepAlive: false
+            },
+            path: '/knowledgeManagement',
+            name: 'knowledgeManagement',
+            component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/knowledgetop/knowledgeManagement'], resolve)
+        }, {
+            meta: {
+                name: '新增知识库',
+                keepAlive: false
+            },
+            path: '/addknowledgetop',
+            name: 'addknowledgetop',
+            component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/knowledgetop/addKnowledge'], resolve)
+        },
+        {
+            meta: {
+                name: '知识库目录',
+                keepAlive: false
+            },
+            path: '/knowledgeCatalogtop',
+            name: 'knowledgeCatalogtop',
+            component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/knowledgetop/catalog'], resolve)
+        }, {
+            meta: {
+                name: '知识库审核',
+                keepAlive: false
+            },
+            path: '/knowledgeExaminetop',
+            name: 'knowledgeExaminetop',
+            component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/knowledgetop/knowledgeExamine'], resolve)
+        }, {
+            meta: {
+                name: '知识库类型',
+                keepAlive: false
+            },
+            path: '/knowledgeTypetop',
+            name: 'knowledgeTypetop',
+            component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/knowledgetop/knowledgeType'], resolve)
+        },
     ]
 },
 {