فهرست منبع

添加知识库和知识审核

201250038 2 سال پیش
والد
کامیت
8b06654f39

+ 0 - 0
src/components/KnowledgeCard/CertificationCard.vue


+ 190 - 0
src/components/KnowledgeCard/LiteratureCard.vue

@@ -0,0 +1,190 @@
+<template xmlns:el-col="http://www.w3.org/1999/html">
+    <el-card class="literature-card" shadow="hover">
+        <!-- 第一行 -->
+        <template #header>
+            <el-row>
+                <el-col :span="3">
+                    <span><strong>S/N: </strong>{{ curNum + 1 }} / {{ totalNum }}</span>
+                </el-col>
+
+                <el-col :span="9">
+                    <span><strong>标题: </strong>{{ literatureVO.title }}</span>
+                </el-col>
+
+                <el-col :span="6" />
+                <!-- 查看全部按钮 -->
+                <el-col :span="1">
+                    <el-button type="text" circle @click="expand" v-if="!isAll"><strong>查看全部</strong></el-button>
+                    <el-button type="text" circle @click="withdraw" v-if="isAll"><strong>收起</strong></el-button>
+                </el-col>
+                <el-col :span="1" />
+
+                <!-- 编辑和删除按钮 -->
+                <el-col :span="1" v-if="editMode">
+                    <el-button type="primary" plain size="small" @click="dialog = true"><i
+                            class="el-icon-edit"></i></el-button>
+                </el-col>
+                <el-col :span="1" v-if="editMode">
+                    <el-button type="danger" plain size="small" @click="isDelete = true"><i
+                            class="el-icon-delete"></i></el-button>
+                </el-col>
+
+                <!-- 审核通过和拒绝按钮 -->
+                <el-col :span="1" v-if="checkMode">
+                    <el-button type="primary" plain size="small" @click="dialog = true"><i
+                            class="el-icon-check"></i></el-button>
+                </el-col>
+                <el-col :span="1" v-if="checkMode">
+                    <el-button type="danger" plain size="small" @click="isDelete = true"><i
+                            class="el-icon-close"></i></el-button>
+                </el-col>
+
+            </el-row>
+        </template>
+
+        <!-- 主要信息 -->
+        <div class="literature-card-body">
+            <el-row style="margin-bottom: 8px;">
+                <el-col :span="24">
+                    <strong>作者:</strong>{{ literatureVO.author }}
+                </el-col>
+            </el-row>
+
+            <el-row style="margin-bottom: 8px;">
+                <el-col :span="24">
+                    <strong>期刊名:</strong>{{ literatureVO.journal }}
+                </el-col>
+            </el-row>
+
+            <el-row style="margin-bottom: 8px;">
+                <el-col :span="24">
+                    <strong>年份:</strong>{{ literatureVO.year }}
+                </el-col>
+            </el-row>
+
+            <el-row style="margin-bottom: 8px;">
+                <el-col :span="24">
+                    <strong>全文链接:</strong>
+                    <el-link :href="literatureVO.link" target="_blank">
+                        {{ literatureVO.link }}
+                    </el-link>
+                </el-col>
+            </el-row>
+
+            <el-row>
+                <el-col :span="24">
+                    <strong>摘要:</strong>{{ literatureVO.abstract }}
+                </el-col>
+            </el-row>
+        </div>
+
+        <el-divider v-if="isAll"></el-divider>
+
+        <div class="literature-card-foot" v-if="isAll">
+            <el-row>
+                <el-col :span="3">
+                    <div><strong>状态: </strong>已审核</div>
+                </el-col>
+                <el-col :span="3">
+                    <div><strong>审核人: </strong>小苏</div>
+                </el-col>
+
+                <el-col :span="12"></el-col>
+
+                <el-col :span="6" v-if="!literatureVO.lastModifiedTime">
+                    <div><strong>CreateTime: </strong>{{ toMyDate(literatureVO.createdTime) }}</div>
+                </el-col>
+
+                <el-col :span="6" v-else>
+                    <div><strong>lastModifiedTime: </strong>{{ toMyDate(literatureVO.lastModifiedTime) }}</div>
+                </el-col>
+            </el-row>
+        </div>
+
+    </el-card>
+
+</template>
+
+<script>
+import axios from "axios";
+import MarkdownText from "@/components/MarkdownText";
+import { markdownToHTML } from "@/utils/markdown";
+
+export default {
+    name: "LiteratureCard",
+    components: {
+        MarkdownText
+    },
+    props: {
+        literatureVO: Object,
+        totalNum: Number,
+        curNum: Number,
+        checkMode: Boolean,
+        editMode: Boolean,
+    },
+    computed: {
+    },
+    data() {
+        return {
+            isAll: false,
+            dialog: false,
+            isDelete: false,
+        }
+    },
+    methods: {
+        markdownToHTML,
+        expand() {
+            if (!this.isAll) {
+                this.isAll = true;
+            }
+        },
+        withdraw() {
+            if (this.isAll) {
+                this.isAll = false;
+            }
+        },
+        handleClose() {
+            this.$confirm('此操作将丢失填写信息, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.dialog = false;
+            })
+        },
+        closeDialog() {
+            this.dialog = false;
+        },
+        toMyDate(instant) {
+            let date = new Date(instant);
+            var year = date.getFullYear();
+            var month = date.getMonth() + 1;
+            var theDate = date.getDate();
+            var hour = date.getHours();
+            var minute = date.getMinutes();
+            var second = date.getSeconds();
+
+            if (month < 10) { month = '0' + month; }
+            if (theDate < 10) { theDate = '0' + theDate; }
+            if (hour < 10) { hour = '0' + hour; }
+            if (minute < 10) { minute = '0' + minute; }
+            if (second < 10) { second = '0' + second; }
+            return year + "-" + month + "-" + theDate + " " + hour + ":" + minute + ":" + second;
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+/* 淡绿色背景 */
+.literature-card {
+    margin: 20px;
+    font-size: 18px;
+    background-color: #eef7f2;
+}
+
+.literature-card-body {
+    text-align: left;
+    font-size: 15px;
+}
+</style>

+ 0 - 0
src/components/KnowledgeCard/MonographCard.vue


+ 177 - 0
src/components/KnowledgeCard/StandardCard.vue

@@ -0,0 +1,177 @@
+<template xmlns:el-col="http://www.w3.org/1999/html">
+    <el-card class="standard-card" shadow="hover">
+        <!-- 第一行 -->
+        <template #header>
+            <el-row>
+                <el-col :span="3">
+                    <span><strong>S/N: </strong>{{ curNum + 1 }} / {{ totalNum }}</span>
+                </el-col>
+
+                <el-col :span="9">
+                    <span><strong>国际规范编号: </strong>{{ standardVO.id }}</span>
+                </el-col>
+
+                <el-col :span="6" />
+                <!-- 查看全部按钮 -->
+                <el-col :span="1">
+                    <el-button type="text" circle @click="expand" v-if="!isAll"><strong>查看全部</strong></el-button>
+                    <el-button type="text" circle @click="withdraw" v-if="isAll"><strong>收起</strong></el-button>
+                </el-col>
+                <el-col :span="1" />
+
+                <!-- 编辑和删除按钮 -->
+                <el-col :span="1" v-if="editMode">
+                    <el-button type="primary" plain size="small" @click="dialog = true"><i
+                            class="el-icon-edit"></i></el-button>
+                </el-col>
+                <el-col :span="1" v-if="editMode">
+                    <el-button type="danger" plain size="small" @click="isDelete = true"><i
+                            class="el-icon-delete"></i></el-button>
+                </el-col>
+
+                <!-- 审核通过和拒绝按钮 -->
+                <el-col :span="1" v-if="checkMode">
+                    <el-button type="primary" plain size="small" @click="dialog = true"><i
+                            class="el-icon-check"></i></el-button>
+                </el-col>
+                <el-col :span="1" v-if="checkMode">
+                    <el-button type="danger" plain size="small" @click="isDelete = true"><i
+                            class="el-icon-close"></i></el-button>
+                </el-col>
+
+            </el-row>
+        </template>
+
+        <!-- 主要信息 -->
+        <div class="standard-card-body">
+            <!-- 标题,左对齐 -->
+            <el-row style="margin-bottom: 8px;">
+                <el-col :span="24">
+                    <strong>规范标题:</strong>{{ standardVO.title }}
+                </el-col>
+            </el-row>
+
+            <el-row style="margin-bottom: 8px;">
+                <el-col :span="24">
+                    <strong>全文链接:</strong><el-link :href="standardVO.link" target="_blank">{{ standardVO.link
+                        }}</el-link>
+                </el-col>
+            </el-row>
+
+            <el-row>
+                <el-col :span="24">
+                    <strong>摘要:</strong>{{ standardVO.abstract }}
+                </el-col>
+            </el-row>
+        </div>
+
+        <el-divider v-if="isAll"></el-divider>
+
+        <div class="standard-card-foot" v-if="isAll">
+            <el-row>
+                <el-col :span="3">
+                    <div><strong>状态: </strong>已审核</div>
+                </el-col>
+                <el-col :span="3">
+                    <div><strong>审核人: </strong>小苏</div>
+                </el-col>
+
+                <el-col :span="12"></el-col>
+
+                <el-col :span="6" v-if="!standardVO.lastModifiedTime">
+                    <div><strong>CreateTime: </strong>{{ toMyDate(standardVO.createdTime) }}</div>
+                </el-col>
+
+                <el-col :span="6" v-else>
+                    <div><strong>lastModifiedTime: </strong>{{ toMyDate(standardVO.lastModifiedTime) }}</div>
+                </el-col>
+            </el-row>
+        </div>
+
+    </el-card>
+
+</template>
+
+<script>
+import axios from "axios";
+import MarkdownText from "@/components/MarkdownText";
+import { markdownToHTML } from "@/utils/markdown";
+
+export default {
+    name: "StandardCard",
+    components: {
+        MarkdownText
+    },
+    props: {
+        standardVO: Object,
+        totalNum: Number,
+        curNum: Number,
+        checkMode: Boolean,
+        editMode: Boolean,
+    },
+    computed: {
+    },
+    data() {
+        return {
+            isAll: false,
+            dialog: false,
+            isDelete: false,
+        }
+    },
+    methods: {
+        markdownToHTML,
+        expand() {
+            if (!this.isAll) {
+                this.isAll = true;
+            }
+        },
+        withdraw() {
+            if (this.isAll) {
+                this.isAll = false;
+            }
+        },
+        handleClose() {
+            this.$confirm('此操作将丢失填写信息, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.dialog = false;
+            })
+        },
+        closeDialog() {
+            this.dialog = false;
+        },
+        toMyDate(instant) {
+            let date = new Date(instant);
+            var year = date.getFullYear();
+            var month = date.getMonth() + 1;
+            var theDate = date.getDate();
+            var hour = date.getHours();
+            var minute = date.getMinutes();
+            var second = date.getSeconds();
+
+            if (month < 10) { month = '0' + month; }
+            if (theDate < 10) { theDate = '0' + theDate; }
+            if (hour < 10) { hour = '0' + hour; }
+            if (minute < 10) { minute = '0' + minute; }
+            if (second < 10) { second = '0' + second; }
+            return year + "-" + month + "-" + theDate + " " + hour + ":" + minute + ":" + second;
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+/* 淡绿色背景 */
+.standard-card {
+    margin: 20px;
+    font-size: 18px;
+    background-color: #eef7f2;
+}
+
+.standard-card-body {
+    text-align: left;
+    font-size: 15px;
+}
+</style>

+ 10 - 0
src/router/index.js

@@ -81,6 +81,16 @@ const routes = [
         name: "UserInteraction",
         component: () => import("@/views/Bok/Main/UserInteraction"),
       },
+      {
+        path: "knowledgeRepo",
+        name: "KnowledgeRepo",
+        component: () => import("@/views/Bok/Main/KnowledgeRepo"),
+      },
+      {
+        path: "knowledgeCheck",
+        name: "KnowledgeCheck",
+        component: () => import("@/views/Bok/Main/KnowledgeCheck"),
+      },
     ],
   },
 ];

+ 3 - 3
src/views/Bok/Main/Knowledge.vue

@@ -1,11 +1,11 @@
 <template>
   <el-space :fill="true" direction="vertical" class="knowledge-wrapper">
-    <h1>知识</h1>
+    <h1>知识</h1>
     <div class="tree_body">
       <el-input class="tree_input" placeholder="输入关键字进行过滤" v-model="filterText">
       </el-input>
       <el-tree node-key="id" :data="knowledgeData" :props="defaultProps" :filter-node-method="filterNode"
-        :default-expanded-keys="expandId" ref="tree">
+        :default-expanded-keys="expandId" ref="tree" :defalt-expand-all>
         <template #default="{ node, data }">
           <span class="custom-tree-node">
             <!-- 知识名 -->
@@ -49,7 +49,7 @@ export default {
   methods: {
     filterNode(value, data) {
       if (!value) return true;
-      return data.label.indexOf(value) !== -1;
+      return data.label.includes(value);
     },
     append(data) {
       if (!data.children) {

+ 173 - 0
src/views/Bok/Main/KnowledgeCheck.vue

@@ -0,0 +1,173 @@
+<template>
+    <div>
+        <h1>知识审核</h1>
+        <el-tabs v-model="activeName" @tab-click="handleClick" stretch>
+            <el-tab-pane v-for="tab in tabs" :key="tab.name" :label="tab.label" :name="tab.name">
+                <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange()"
+                    :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next, jumper" :total=checkTotalNum
+                    tv-if="checkKnowledgeLis.length !== 0" />
+                <standard-card v-for="(item, index) in checkKnowledgeList" :checkMode="true"
+                    v-show="item.status === activeName && item.type === 'standard'" :key="item.id" :standard-v-o="item"
+                    :total-num="checkTotalNum" :cur-num="index + (currentPage - 1) * pageSize" />
+                <literature-card v-for="(item, index) in checkKnowledgeList" :checkMode="true"
+                    v-show="item.status === activeName && item.type === 'literature'" :key="item.id"
+                    :literature-v-o="item" :total-num="checkTotalNum" :cur-num="index + (currentPage - 1) * pageSize" />
+            </el-tab-pane>
+        </el-tabs>
+    </div>
+</template>
+
+<script>
+import StandardCard from "@/components/KnowledgeCard/StandardCard.vue";
+import LiteratureCard from "@/components/KnowledgeCard/LiteratureCard.vue";
+
+export default {
+    name: "KnowledgeCheck",
+    components: {
+        StandardCard,
+        LiteratureCard,
+    },
+    data() {
+        return {
+            tabs: [
+                { name: "CREATING", label: "新建知识审核" },
+                { name: "UPDATING", label: "更新知识审核" },
+                { name: "DELETING", label: "删除知识审核" },
+            ],
+
+            // 分页所需数据
+            activeName: "CREATING",
+
+            // 待审核知识列表
+            checkKnowledgeList: [{
+                type: 'standard',
+                id: 'ISO/IEC 9126-1:2001',
+                title: '软件工程 - 产品质量 - 第1部分:质量模型',
+                abstract: 'ISO/IEC 9126-1:2001是ISO/IEC 9126系列标准的第1部分,是一个质量模型,定义了软件产品质量的特性和度量。其中,质量特性分为内部质量特性、外部质量特性和使用质量特性。',
+                link: 'https://www.iso.org/standard/22749.html',
+                status: 'CREATING',
+            }, {
+                type: 'standard',
+                id: 'ISO 5807:1985',
+                title: "信息处理 - 数据、程序和系统流程图、程序网络图以及系统资源图表用的文档符号和约定",
+                abstract: "ISO 5807:1985定义了用于数据、程序和系统流程图、程序网络图以及系统资源图表的文档符号和约定。这些符号和约定用于表示数据、程序和系统的逻辑和物理特性,以及它们之间的关系。",
+                link: 'http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=11955',
+                status: 'UPDATING',
+            },
+            {
+                type: 'literature', // 文献综述
+                title: '软件过程与管理方法综述',
+                author: '荣国平, 张贺, 邵栋, 王青',
+                journal: '软件学报',
+                abstract: '工程化软件开发需要对软件开发整个过程进行有效的组织和管理,由此产生了一系列软件开发组织和管理方法,其主要目的是形成一种载体,用以积累和传递关于软件开发的经验教训.然而,由于软件开发的一些天然特性(比如复杂性和不可见性)的存在,使得描述软件开发过程的软件开发与组织方法也天然地带着一定的抽象性.由此带来了很多概念上的误导和实践中的争论,影响了上述目的的达成.例如,对于究竟该如何选择和定义合适的软件开发过程以更好地满足某个特定项目的要求,目前仍然缺少可靠的手段.甚至有些面向工业界的调研报告表明:在实际软件项目开发中,过程改进(例如引入新的工具或者方法)的主要驱动力是佚闻.试图厘清软件组织与管理话题的若干核心概念,系统梳理软件组织和管理方法的特征,并且以软件发展的历史为主线,介绍软件组织与管理方法的历史沿革,整理出这种历史沿革背后的缘由.在此基础上,讨论和总结若干发现,以期为研究者和实践者提供参考.',
+                year: '2019',
+                link: 'https://www.jos.org.cn/html/2019/1/5645.htm',
+                status: 'DELETING',
+            }],
+
+            pageSize: 20,
+            currentPage: 1,
+            checkTotalNum: 0,
+        }
+    },
+    methods: {
+        handleSizeChange(val) { //修改页面大小
+            this.pageSize = val;
+        },
+        handleCurrentChange(val) { // 当点击新的页面时才请求新的数据
+            console.log(`Check-handleCurrentChange 当前页: ${val}`);
+            this.currentPage = val;
+            this.$api.getStatusKnowledge(this.activeName, val - 1, this.pageSize)
+                .then(res => {
+                    console.log(res);
+                    this.checkKnowledgeList = res.data.result.content;
+                }).catch(error => {
+                    console.log(error);
+                })
+        },
+        async getQuestionById(id) {
+            let res = await this.$api.getQuestionById(id)
+            console.log("test", res.data.result);
+            return res.data.result
+        },
+        // 切换分页
+        handleClick(tab, event) {
+            const _this = this
+            switch (tab.props.name) {
+                // 新建审核
+                case "checking":
+                    //新建审核实现:
+                    _this.createQuestionList = [];
+                    _this.$api.getStateQuestion(tab.props.name.toUpperCase(), 0, this.pageSize)
+                        .then(async res => {
+                            console.log("getStateQuestion-checking");
+                            console.log(res);
+                            this.createQuestionList = res.data.result.content;
+                            this.createTotalNum = res.data.result.totalElements;
+                        }).catch(err => {
+                            console.log(err);
+                        })
+                    break;
+                // 更新审核
+                case "updating":
+                    _this.updateQuestionList = [];
+                    _this.$api.getStateQuestion(tab.props.name.toUpperCase(), 0, this.pageSize)
+                        .then(async res => {
+                            console.log("getStateQuestion-UPDATING");
+                            const update_list = res.data.result.content;
+                            console.log("update_list", update_list);
+                            let updating_num = 0;
+                            // console.log(update_list)
+                            for (const updateListElement of update_list) {
+                                if (updateListElement.remark) {
+                                    updating_num += 1;
+                                    console.log("updateListElement", updateListElement);
+                                    let item = { "oldQuestionVO": updateListElement };
+                                    let newQuestionVO = await _this.getQuestionById(updateListElement.remark);
+                                    item.newQuestionVO = newQuestionVO;
+                                    this.updateQuestionList.push(item);
+                                }
+                            }
+                            this.updateTotalNum = updating_num;
+                        }).catch(err => {
+                            console.log(err);
+                        })
+                    break;
+                // 删除审核
+                case "deleting":
+                    _this.executeQuestionList = [];
+                    _this.$api.getStateQuestion(tab.props.name.toUpperCase(), 0, this.pageSize)
+                        .then(async res => {
+                            console.log("getStateQuestion-deleting");
+                            console.log(res);
+                            this.executeQuestionList = res.data.result.content;
+                            this.executeTotalNum = res.data.result.totalElements;
+                        }).catch(err => {
+                            console.log(err);
+                        })
+
+                    break;
+                default:
+                    break;
+            }
+        },
+
+        // 处理题目审核通过
+        handleApproved(index, questionList) {
+            const _this = this
+            _this.$message({
+                type: "success",
+                message: "handle approved"
+            })
+            // todo: 更换真实代码后取消注释
+            // questionList.splice(index, 1)
+        },
+    },
+    mounted() {
+        this.handleClick({ props: { name: "CREATING" } }, null);
+    }
+}
+</script>
+
+<style scoped></style>

+ 122 - 0
src/views/Bok/Main/KnowledgeRepo.vue

@@ -0,0 +1,122 @@
+<template>
+    <h1>知识库</h1>
+
+    <el-space :fill="true" direction="vertical" alignment="flex-start" :size="30" style="width: 100%;">
+        <!--搜索框-->
+        <el-input placeholder="请输入搜索内容" v-model="searchContent" @keydown.enter="clickSearch">
+            <template #append>
+                <el-button icon="el-icon-search" @click="clickSearch"></el-button>
+            </template>
+        </el-input>
+
+        <!--四个板块: 国际规范 综述文献 专著 认证 -->
+        <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" stretch>
+            <el-tab-pane label="国际规范" name="国际规范">
+                <div>
+                    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pageSize"
+                        layout="total, sizes, prev, pager, next, jumper" :total=this.totalNum
+                        v-if="this.knowledgeList.length !== 0" />
+                    <standard-card v-for="(item, index) in knowledgeList" v-show="item.type === 'standard'"
+                        :key="item.id" :editMode="true" :standard-v-o="item" :total-num="totalNum"
+                        :cur-num="index + (currentPage - 1) * pageSize" />
+                    <el-backtop :bottom="50">
+                        <div
+                            style="height: 100%;width: 100%;background-color: #f2f5f6;box-shadow: 0 0 6px rgba(0,0,0, .12);line-height: 40px;">
+                            UP
+                        </div>
+                    </el-backtop>
+                </div>
+            </el-tab-pane>
+
+            <el-tab-pane label="综述文献" name="综述文献">
+                <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next, jumper" :total=this.totalNum
+                    v-if="this.knowledgeList.length !== 0" />
+                <literature-card v-for="(item, index) in knowledgeList" v-show="item.type === 'literature'"
+                    :key="item.id" :editMode="true" :literature-v-o="item" :total-num="totalNum"
+                    :cur-num="index + (currentPage - 1) * pageSize" />
+                <el-backtop :bottom="50">
+                    <div
+                        style="height: 100%;width: 100%;background-color: #f2f5f6;box-shadow: 0 0 6px rgba(0,0,0, .12);line-height: 40px;">
+                        UP
+                    </div>
+                </el-backtop>
+            </el-tab-pane>
+            <el-tab-pane label="专著" name="专著"></el-tab-pane>
+            <el-tab-pane label="认证" name="认证"></el-tab-pane>
+        </el-tabs>
+    </el-space>
+
+</template>
+
+<script>
+import StandardCard from "@/components/KnowledgeCard/StandardCard";
+import LiteratureCard from "@/components/KnowledgeCard/LiteratureCard.vue";
+
+export default {
+    name: "KnowledgeRepo",
+    components: {
+        StandardCard,
+        LiteratureCard,
+    },
+
+    data() {
+        return {
+            totalNum: 1,
+            currentPage: 1,
+            pageSize: 10,
+
+            tabActiveName: '国际规范',
+            searchContent: '',
+            // 知识列表
+            knowledgeList: [{
+                type: 'standard',
+                id: 'ISO/IEC 9126-1:2001',
+                title: '软件工程 - 产品质量 - 第1部分:质量模型',
+                abstract: 'ISO/IEC 9126-1:2001是ISO/IEC 9126系列标准的第1部分,是一个质量模型,定义了软件产品质量的特性和度量。其中,质量特性分为内部质量特性、外部质量特性和使用质量特性。',
+                link: 'https://www.iso.org/standard/22749.html'
+            }, {
+                type: 'standard',
+                id: 'ISO 5807:1985',
+                title: "信息处理 - 数据、程序和系统流程图、程序网络图以及系统资源图表用的文档符号和约定",
+                abstract: "ISO 5807:1985定义了用于数据、程序和系统流程图、程序网络图以及系统资源图表的文档符号和约定。这些符号和约定用于表示数据、程序和系统的逻辑和物理特性,以及它们之间的关系。",
+                link: 'http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=11955'
+            },
+            {
+                type: 'literature', // 文献综述
+                title: '软件过程与管理方法综述',
+                author: '荣国平, 张贺, 邵栋, 王青',
+                journal: '软件学报',
+                abstract: '工程化软件开发需要对软件开发整个过程进行有效的组织和管理,由此产生了一系列软件开发组织和管理方法,其主要目的是形成一种载体,用以积累和传递关于软件开发的经验教训.然而,由于软件开发的一些天然特性(比如复杂性和不可见性)的存在,使得描述软件开发过程的软件开发与组织方法也天然地带着一定的抽象性.由此带来了很多概念上的误导和实践中的争论,影响了上述目的的达成.例如,对于究竟该如何选择和定义合适的软件开发过程以更好地满足某个特定项目的要求,目前仍然缺少可靠的手段.甚至有些面向工业界的调研报告表明:在实际软件项目开发中,过程改进(例如引入新的工具或者方法)的主要驱动力是佚闻.试图厘清软件组织与管理话题的若干核心概念,系统梳理软件组织和管理方法的特征,并且以软件发展的历史为主线,介绍软件组织与管理方法的历史沿革,整理出这种历史沿革背后的缘由.在此基础上,讨论和总结若干发现,以期为研究者和实践者提供参考.',
+                year: '2019',
+                link: 'https://www.jos.org.cn/html/2019/1/5645.htm'
+            }],
+        }
+    },
+    methods: {
+        handleTabClick(tab) {
+            console.log(tab);
+        },
+        clickSearch() {
+            console.log(this.searchContent);
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+        },
+        handleCurrentChange(val) {
+            console.log(`当前页: ${val}`);
+        },
+
+    }
+}
+
+</script>
+
+<style scoped>
+/* 搜索框宽度为100px */
+.el-input {
+    width: 500px;
+}
+</style>

+ 64 - 91
src/views/Bok/Main/QuestionRepository.vue

@@ -1,27 +1,17 @@
 <template>
-    <h1>题库</h1>
+  <h1>题库</h1>
   <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" stretch>
     <!--APPROVED-->
     <el-tab-pane label="APPROVED" name="APPROVED">
       <div>
-        <el-pagination @size-change="handleSizeChange"
-                       @current-change="handleCurrentChange"
-                       :current-page="currentPage"
-                       :page-sizes="[5, 10, 15, 20]"
-                       :page-size="pageSize"
-                       layout="total, sizes, prev, pager, next, jumper"
-                       :total=this.totalNum
-                       v-if="this.questionList.length !== 0"
-        />
-        <approved-question-card v-for="(item,index) in questionList"
-                               :key="item.id"
-                               :question-v-o="item"
-                               :total-num="totalNum"
-                               :cur-num="index+(currentPage-1)*pageSize"
-                               @update="handleQuestionUpdate(item)"/>
+        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+          :page-sizes="[5, 10, 15, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+          :total=this.totalNum v-if="this.questionList.length !== 0" />
+        <approved-question-card v-for="(item, index) in questionList" :key="item.id" :question-v-o="item"
+          :total-num="totalNum" :cur-num="index + (currentPage - 1) * pageSize" @update="handleQuestionUpdate(item)" />
         <el-backtop :bottom="50">
           <div
-              style="height: 100%;width: 100%;background-color: #f2f5f6;box-shadow: 0 0 6px rgba(0,0,0, .12);line-height: 40px;">
+            style="height: 100%;width: 100%;background-color: #f2f5f6;box-shadow: 0 0 6px rgba(0,0,0, .12);line-height: 40px;">
             UP
           </div>
         </el-backtop>
@@ -31,26 +21,16 @@
     <!--REFUSED-->
     <el-tab-pane label="REFUSED" name="REFUSED">
       <div>
-        <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleRefusedCurrentChange"
-            :current-page="refusedCurrentPage"
-            :page-sizes="[5, 10, 15, 20]"
-            :page-size="pageSize"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total=this.refusedTotalNum
-            v-if="this.refusedQuestionList.length !== 0"
-        />
-        <primary-question-card
-            v-for="(item,index) in refusedQuestionList"
-            :key="item.id"
-            :question-v-o="item"
-            :total-num="refusedTotalNum"
-            :cur-num="index+(refusedCurrentPage-1)*pageSize"
-            @update="handleQuestionUpdate(item)"/>
+        <el-pagination @size-change="handleSizeChange" @current-change="handleRefusedCurrentChange"
+          :current-page="refusedCurrentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pageSize"
+          layout="total, sizes, prev, pager, next, jumper" :total=this.refusedTotalNum
+          v-if="this.refusedQuestionList.length !== 0" />
+        <primary-question-card v-for="(item, index) in refusedQuestionList" :key="item.id" :question-v-o="item"
+          :total-num="refusedTotalNum" :cur-num="index + (refusedCurrentPage - 1) * pageSize"
+          @update="handleQuestionUpdate(item)" />
         <el-backtop :bottom="50">
           <div
-              style="height: 100%;width: 100%;background-color: #f2f5f6;box-shadow: 0 0 6px rgba(0,0,0, .12);line-height: 40px;">
+            style="height: 100%;width: 100%;background-color: #f2f5f6;box-shadow: 0 0 6px rgba(0,0,0, .12);line-height: 40px;">
             UP
           </div>
         </el-backtop>
@@ -58,17 +38,10 @@
     </el-tab-pane>
   </el-tabs>
   <!--修改框-->
-  <el-drawer
-      title="更新题目"
-      :before-close="handleClose"
-      v-model="dialog"
-      direction="rtl"
-      custom-class="question-drawer"
-      ref="drawer"
-      size="35%">
-    <single-question-creator ref="QuestionUpdater"
-                             @acknowledge="handleQuestionCreatorAcknowledge"
-                             :target="creatorTarget"/>
+  <el-drawer title="更新题目" :before-close="handleClose" v-model="dialog" direction="rtl" custom-class="question-drawer"
+    ref="drawer" size="35%">
+    <single-question-creator ref="QuestionUpdater" @acknowledge="handleQuestionCreatorAcknowledge"
+      :target="creatorTarget" />
   </el-drawer>
 </template>
 
@@ -107,14 +80,14 @@ export default {
     // 挂载时获取第一页题目列表
     let states = 'APPROVED';
     this.$api.getStateQuestion(states, 0, this.pageSize)
-        .then(res => {
-          console.log(res);
-          this.questionList = res.data.result.content;
-          this.totalNum = res.data.result.totalElements;
-        })
-        .catch(error => {
-          console.log(error);
-        })
+      .then(res => {
+        console.log(res);
+        this.questionList = res.data.result.content;
+        this.totalNum = res.data.result.totalElements;
+      })
+      .catch(error => {
+        console.log(error);
+      })
   },
   computed: {},
   methods: {
@@ -124,11 +97,11 @@ export default {
 
     handleClose(done) {
       this.$confirm('确认关闭?')
-          .then(_ => {
-            done();
-          })
-          .catch(_ => {
-          });
+        .then(_ => {
+          done();
+        })
+        .catch(_ => {
+        });
     },
 
     closeDialog() {
@@ -144,26 +117,26 @@ export default {
       this.currentPage = val;
       let states = 'APPROVED';
       this.$api.getStateQuestion(states, val - 1, this.pageSize)
-          .then(res => {
-            console.log(res);
-            this.questionList = res.data.result.content;
-          })
-          .catch(error => {
-            console.log(error);
-          })
+        .then(res => {
+          console.log(res);
+          this.questionList = res.data.result.content;
+        })
+        .catch(error => {
+          console.log(error);
+        })
     },
 
     handleRefusedCurrentChange(val) { // 当点击新的页面时才请求新的数据
       this.refusedCurrentPage = val;
       let states = 'REFUSED';
       this.$api.getStateQuestion(states, val - 1, this.pageSize)
-          .then(res => {
-            console.log(res);
-            this.refusedQuestionList = res.data.result.content;
-          })
-          .catch(error => {
-            console.log(error);
-          })
+        .then(res => {
+          console.log(res);
+          this.refusedQuestionList = res.data.result.content;
+        })
+        .catch(error => {
+          console.log(error);
+        })
     },
 
     handleTabClick(tabItem) {
@@ -171,27 +144,27 @@ export default {
       switch (state) {
         case "APPROVED":
           this.$api.getStateQuestion(state, 0, this.pageSize)
-              .then(res => {
-                console.log(res);
-                this.questionList = res.data.result.content;
-                this.totalNum = res.data.result.totalElements;
-                this.currentPage = 1;
-              })
-              .catch(error => {
-                console.log(error);
-              });
+            .then(res => {
+              console.log(res);
+              this.questionList = res.data.result.content;
+              this.totalNum = res.data.result.totalElements;
+              this.currentPage = 1;
+            })
+            .catch(error => {
+              console.log(error);
+            });
           break;
         case "REFUSED":
           this.$api.getStateQuestion(state, 0, this.pageSize)
-              .then(res => {
-                console.log(res);
-                this.refusedQuestionList = res.data.result.content;
-                this.refusedTotalNum = res.data.result.totalElements;
-                this.refusedCurrentPage = 1;
-              })
-              .catch(error => {
-                console.log(error);
-              })
+            .then(res => {
+              console.log(res);
+              this.refusedQuestionList = res.data.result.content;
+              this.refusedTotalNum = res.data.result.totalElements;
+              this.refusedCurrentPage = 1;
+            })
+            .catch(error => {
+              console.log(error);
+            })
           break;
         default:
           break;

+ 22 - 14
src/views/Bok/SideBar.vue

@@ -8,22 +8,26 @@
     <!-- 导航栏 -->
     <el-menu :default-active="active" class="el-menu-vertical-demo" @select="handleSelect" @open="handleOpen"
       @close="handleClose">
-      <el-menu-item index="search">
-        <i class="el-icon-search"></i>
-        <template #title>搜索</template>
+      <el-menu-item index="knowledgePoint">
+        <i class="el-icon-s-data"></i>
+        <template #title>知识树</template>
       </el-menu-item>
-      <el-menu-item index="questionRepository">
+      <el-menu-item index="knowledgeRepo">
         <i class="el-icon-box"></i>
-        <template #title>题库</template>
+        <template #title>知识库</template>
+      </el-menu-item>
+      <el-menu-item index="knowledgeCheck">
+        <i class="el-icon-s-check"></i>
+        <template #title>知识审核</template>
+      </el-menu-item>
+      <el-menu-item index="search">
+        <i class="el-icon-search"></i>
+        <template #title>题目搜索</template>
       </el-menu-item>
       <el-menu-item index="operation">
-        <i class="el-icon-edit-outline"></i>
+        <i class="el-icon-folder-add"></i>
         <template #title>新建题目</template>
       </el-menu-item>
-      <el-menu-item index="knowledgePoint">
-        <i class="el-icon-menu"></i>
-        <template #title>知识点</template>
-      </el-menu-item>
       <el-menu-item index="knowledgeGraph" v-if="false">
         <i class="el-icon-connection"></i>
         <template #title>知识图谱</template>
@@ -33,8 +37,12 @@
         <template #title>试卷袋</template>
       </el-menu-item>
       <el-menu-item index="check" v-if="role">
-        <i class="el-icon-circle-check"></i>
-        <template #title>审核</template>
+        <i class="el-icon-s-check"></i>
+        <template #title>题目审核</template>
+      </el-menu-item>
+      <el-menu-item index="questionRepository">
+        <i class="el-icon-files"></i>
+        <template #title>题库</template>
       </el-menu-item>
       <el-menu-item index="my">
         <i class="el-icon-user"></i>
@@ -44,10 +52,10 @@
         <i class="el-icon-setting"></i>
         <template #title>设置</template>
       </el-menu-item>
-      <el-menu-item index="instructions">
+      <!-- <el-menu-item index="instructions">
         <i class="el-icon-question"></i>
         <template #title>使用说明</template>
-      </el-menu-item>
+      </el-menu-item> -->
     </el-menu>
   </div>
 </template>

+ 1 - 0
vue.config.js

@@ -46,6 +46,7 @@ module.exports = {
       },
     },
     port: 8000,
+    disableHostCheck:true,
   },
   lintOnSave: false,
 };