融合通信管理平台————应急与消防知识库平台->知识库管理

This commit is contained in:
LiWeiJie 2024-03-25 15:13:31 +08:00
parent 2f023ad6f5
commit 28e071ac29
3 changed files with 36 additions and 19 deletions

View File

@ -49,6 +49,10 @@ public class RhtxKnowledgeBaseManagement extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
/** 文件上传 */
@Excel(name = "文件上传")
private String fileUpload;
public void setId(String id) public void setId(String id)
{ {
this.id = id; this.id = id;
@ -121,6 +125,15 @@ public class RhtxKnowledgeBaseManagement extends BaseEntity
{ {
return remarks; return remarks;
} }
public void setFileUpload(String fileUpload)
{
this.fileUpload = fileUpload;
}
public String getFileUpload()
{
return fileUpload;
}
@Override @Override
public String toString() { public String toString() {
@ -133,6 +146,7 @@ public class RhtxKnowledgeBaseManagement extends BaseEntity
.append("recordTime", getRecordTime()) .append("recordTime", getRecordTime())
.append("recorder", getRecorder()) .append("recorder", getRecorder())
.append("remarks", getRemarks()) .append("remarks", getRemarks())
.append("fileUpload", getFileUpload())
.toString(); .toString();
} }
} }

View File

@ -13,10 +13,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="recordTime" column="record_time" /> <result property="recordTime" column="record_time" />
<result property="recorder" column="recorder" /> <result property="recorder" column="recorder" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="fileUpload" column="fileUpload" />
</resultMap> </resultMap>
<sql id="selectRhtxKnowledgeBaseManagementVo"> <sql id="selectRhtxKnowledgeBaseManagementVo">
select id, title, knowledge_type, knowledge_content, source, record_time, recorder, remarks from rhtx_knowledge_base_management select id, title, knowledge_type, knowledge_content, source, record_time, recorder, remarks, fileUpload from rhtx_knowledge_base_management
</sql> </sql>
<select id="selectRhtxKnowledgeBaseManagementList" parameterType="RhtxKnowledgeBaseManagement" resultMap="RhtxKnowledgeBaseManagementResult"> <select id="selectRhtxKnowledgeBaseManagementList" parameterType="RhtxKnowledgeBaseManagement" resultMap="RhtxKnowledgeBaseManagementResult">
@ -29,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if> <if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
<if test="recorder != null and recorder != ''"> and recorder like concat('%', #{recorder}, '%')</if> <if test="recorder != null and recorder != ''"> and recorder like concat('%', #{recorder}, '%')</if>
<if test="remarks != null and remarks != ''"> and remarks like concat('%', #{remarks}, '%')</if> <if test="remarks != null and remarks != ''"> and remarks like concat('%', #{remarks}, '%')</if>
<if test="fileUpload != null and fileUpload != ''"> and fileUpload like concat('%', #{fileUpload}, '%')</if>
</where> </where>
</select> </select>
@ -48,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="recordTime != null">record_time,</if> <if test="recordTime != null">record_time,</if>
<if test="recorder != null">recorder,</if> <if test="recorder != null">recorder,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
<if test="fileUpload != null">fileUpload,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -58,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="recordTime != null">#{recordTime},</if> <if test="recordTime != null">#{recordTime},</if>
<if test="recorder != null">#{recorder},</if> <if test="recorder != null">#{recorder},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
<if test="fileUpload != null">#{fileUpload},</if>
</trim> </trim>
</insert> </insert>
@ -71,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="recordTime != null">record_time = #{recordTime},</if> <if test="recordTime != null">record_time = #{recordTime},</if>
<if test="recorder != null">recorder = #{recorder},</if> <if test="recorder != null">recorder = #{recorder},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
<if test="fileUpload != null">fileUpload = #{fileUpload},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

View File

@ -9,14 +9,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="知识类型" prop="knowledgeType">
<el-input
v-model="queryParams.knowledgeType"
placeholder="请输入知识类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="来源" prop="source"> <el-form-item label="来源" prop="source">
<el-input <el-input
v-model="queryParams.source" v-model="queryParams.source"
@ -105,8 +97,7 @@
<el-tag type="" >{{scope.row.knowledgeType}}</el-tag> <el-tag type="" >{{scope.row.knowledgeType}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="知识内容" align="center" prop="knowledgeContent" />
<el-table-column label="知识内容" align="center" prop="knowledgeContent" :show-overflow-tooltip="true"/>
<el-table-column label="来源" align="center" prop="source" /> <el-table-column label="来源" align="center" prop="source" />
<el-table-column label="记录时间" align="center" prop="recordTime" width="180"> <el-table-column label="记录时间" align="center" prop="recordTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -115,8 +106,12 @@
</el-table-column> </el-table-column>
<el-table-column label="记录人" align="center" prop="recorder" /> <el-table-column label="记录人" align="center" prop="recorder" />
<el-table-column label="备注" align="center" prop="remarks" /> <el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="文件上传" align="center" prop="fileUpload" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-download">
<a :href="baseUrl + scope.row.fileUpload" download="" >下载{{scope.row.knowledgeType}}</a>
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -149,11 +144,8 @@
<el-form-item label="标题" prop="title"> <el-form-item label="标题" prop="title">
<el-input v-model="form.title" placeholder="请输入标题" /> <el-input v-model="form.title" placeholder="请输入标题" />
</el-form-item> </el-form-item>
<el-form-item label="知识类型" prop="knowledgeType"> <el-form-item label="知识内容">
<el-input v-model="form.knowledgeType" placeholder="请输入知识类型" /> <editor v-model="form.knowledgeContent" :min-height="192"/>
</el-form-item>
<el-form-item label="知识内容" prop="knowledgeContent">
<el-input v-model="form.knowledgeContent" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="来源" prop="source"> <el-form-item label="来源" prop="source">
<el-input v-model="form.source" placeholder="请输入来源" /> <el-input v-model="form.source" placeholder="请输入来源" />
@ -172,6 +164,9 @@
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="文件上传" prop="fileUpload">
<file-upload v-model="form.fileUpload"/>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -188,6 +183,7 @@ export default {
name: "Management", name: "Management",
data() { data() {
return { return {
baseUrl: process.env.VUE_APP_BASE_API,
// //
loading: true, loading: true,
// //
@ -206,7 +202,7 @@ export default {
title: "", title: "",
// //
open: false, open: false,
// //
daterangeRecordTime: [], daterangeRecordTime: [],
// //
queryParams: { queryParams: {
@ -218,7 +214,8 @@ export default {
source: null, source: null,
recordTime: null, recordTime: null,
recorder: null, recorder: null,
remarks: null remarks: null,
fileUpload: null
}, },
// //
form: {}, form: {},
@ -260,7 +257,8 @@ export default {
source: null, source: null,
recordTime: null, recordTime: null,
recorder: null, recorder: null,
remarks: null remarks: null,
fileUpload: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },