布局知识库

This commit is contained in:
qq787203167
2022-08-03 11:56:10 +08:00
parent 530350df13
commit 25801c7483
9 changed files with 662 additions and 26 deletions
+4
View File
@@ -1221,4 +1221,8 @@ module.exports = {
dre:'dre',
applicableInstructionsMarketList:'Applicable instructions of market list',
pleaseSelectTheDataCompared:'Please select the data to be compared',
problemLabel:'Problem label',
personCharge:'Person in charge',
addLabel:'Add Label',
editLabel:'Edit Label',
}
+4
View File
@@ -1324,4 +1324,8 @@ module.exports = {
dre:'填写人',
applicableInstructionsMarketList:'市场清单适用说明',
pleaseSelectTheDataCompared:'请选择需要对比的数据',
problemLabel:'问题标签',
personCharge:'负责人',
addLabel:'新增标签',
editLabel:'编辑标签',
}
@@ -0,0 +1,172 @@
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('problemLabel')">{{$t('problemLabel')}}</span>
</div>
<a-form-model-item class="itemModel" prop="problemLabel">
<a-input class="box-input"
v-model="formInline.problemLabel"
:placeholder="$t('PleaseEnter')+$t('problemLabel')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('personCharge')">{{$t('personCharge')}}</span>
</div>
<a-form-model-item class="itemModel" prop="personChargeName">
<PersonnelSelection
:query="{db_field_name:'personCharge',db_field_txt:$t('personCharge')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.personChargeName"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
export default {
name: 'classificationMaintenanceAdd',
components: {
PersonnelSelection
},
data() {
return {
visible: false,
confirmLoading: false,
formInline: {},
rules: {
personChargeName: [
{
required: true,
message: this.$t('personCharge') + this.$t('cannotEmpty'),
trigger: 'change'
},
{
max: 100,
message: this.$t('personCharge') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'change'
}
],
problemLabel: [
{
required: true,
message: this.$t('problemLabel') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('problemLabel') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
]
},
title: ''
}
},
mounted() {
},
methods: {
add() {
this.visible = true
this.title = this.$t('addLabel')
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
edit(data) {
this.visible = true
this.title = this.$t('editLabel')
this.$nextTick(() => {
this.formInline = data
this.$refs.ruleForm.clearValidate()
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
}
})
},
handleCancel() {
this.visible = false
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 84px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
@@ -0,0 +1,206 @@
<template>
<div>
<a-drawer
:title="$t('classificationMaintenance')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="box-title">
<div @click="addLabelClick" class="operator-text">
<a-icon type="plus"/>
{{$t('addLabel')}}
</div>
</div>
<a-table
:columns="columns"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
:data-source="dataList"
:pagination="false"
:loading="loading">
<span slot="operation" slot-scope="text,record">
<a style="margin-right: 8px" @click="edit(record)">{{$t('edit')}}</a>
<a @click="deleteData">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+`${total}`+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
</div>
</a-drawer>
<classificationMaintenanceAdd ref="classificationMaintenanceAddRef"
@classificationMaintenanceAddForm="classificationMaintenanceAddForm"/>
</div>
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import classificationMaintenanceAdd from './classificationMaintenanceAdd'
export default {
name: 'classificationMaintenanceModel',
components: {
classificationMaintenanceAdd
},
data() {
return {
url: {
list: '',
deleteOne: ''
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
columns: [
{
title: this.$t('number'),
align: 'center',
width: 70,
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: this.$t('problemLabel'),
dataIndex: 'title',
align: 'center',
ellipsis: true
},
{
title: this.$t('personCharge'),
dataIndex: 'region',
align: 'center',
ellipsis: true
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 180,
scopedSlots: { customRender: 'operation' }
}
]
}
},
mounted() {
},
methods: {
getData() {
this.visible = true
},
handleCancel() {
this.visible = false
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
addLabelClick() {
this.$refs.classificationMaintenanceAddRef.add()
},
edit(val) {
this.$refs.classificationMaintenanceAddRef.edit(JSON.parse(JSON.stringify(val)))
},
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
classificationMaintenanceAddForm() {
this.pageNo = 1
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
this.loading = true
postAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title {
width: 100%;
text-align: right;
margin-bottom: 20px;
}
.operator-text {
cursor: pointer;
margin-right: 13px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
}
</style>
@@ -76,14 +76,19 @@
@showSizeChange="SizeChange"
/>
</div>
<classificationMaintenanceModel ref="classificationMaintenanceModelRef"/>
</div>
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import classificationMaintenanceModel from './classificationMaintenanceModel'
export default {
name: 'problemKnowledgeBaseList',
components: {
classificationMaintenanceModel
},
data() {
return {
searchContent: '',
@@ -109,11 +114,7 @@
},
classificationClick() {
let newUrl = this.$router.resolve({
path: '/problemKnowledgeBaseView',
query: {}
})
window.open(newUrl.href, '_blank')
this.$refs.classificationMaintenanceModelRef.getData()
},
managePublishingClick() {
let newUrl = this.$router.resolve({
@@ -154,12 +155,8 @@
},
titleClick(item) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: item.id.slice(0, 32),
title: item.title,
serial_number: item.serial_number
}
path: '/problemKnowledgeBaseView',
query: {}
})
window.open(newUrl.href, '_blank')
}
@@ -11,16 +11,149 @@
</div>
<div style="padding-top: 68px;background: #fff">
<div class="detail-content" style="padding: 24px">
<div class="content-text">
<div class="text-field" v-for="(item,index) in standardContentList" :key="index">
<span class="text-field-left" :title="item.title">{{item.title}}</span>
<span class="text-field-right text-field-right-url"
@click="clickButtonToUpload(queryForm[item.value])"
v-if="item.type == 2 && queryForm[item.value]"
>{{ $t('viewFile') }}</span>
<span class="text-field-right"
:title="queryForm[item.value]" v-else>
{{queryForm[item.value]}}fdgdgdfg
</span>
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
<div class="content-icon">
<span class="content-icon-text">
<a-icon class="icon" type="eye"/>
<span>123456</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="like"/>
<span>123456</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="star"/>
<span>123456</span>
</span>
</div>
<div class="box-text">
<div class="header-text">
{{$t('comment')}}
</div>
</div>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<a-form-model-item class="itemModel" prop="approvalOpinion">
<a-textarea :placeholder="$t('pleaseEnter')+$t('comment')"
v-model="formInline.approvalOpinion"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
<div class="content-button">
<a-button class="header-btn submit" @click="release" type="primary">{{$t('release')}}</a-button>
</div>
<div>
<div class="box-text">
<div class="header-text">
<span style="margin-right: 20px">张三</span>
2022-12-12 10:10:12
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
<div class="box-text">
<div class="header-text">
<span style="margin-right: 20px">张三</span>
2022-12-12 10:10:12
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
</div>
</div>
</div>
</div>
<viewFileModel ref="viewFileModelRef"/>
</div>
</template>
<script>
import viewFileModel from '@/components/viewFileModel/index'
export default {
name: 'problemKnowledgeBaseView'
name: 'problemKnowledgeBaseView',
components: {
viewFileModel
},
data() {
return {
standardContentList: [
{
title: this.$t('problemClassification'),
value: ''
},
{
title: this.$t('market'),
value: ''
},
{
title: this.$t('standardNo'),
value: ''
},
{
title: this.$t('standardName'),
value: ''
},
{
title: this.$t('enclosure'),
type: 2,
value: ''
}
],
queryForm: {},
formInline: {},
rules: {}
}
},
mounted() {
document.title = this.$t('applicableInstructionsMarketList')
},
methods: {
clickButtonToUpload(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
},
release() {
}
}
}
</script>
@@ -85,4 +218,132 @@
}
}
}
.box-text {
display: flex;
justify-content: space-between;
height: 60px;
line-height: 40px;
.header-text {
font-size: 16px;
font-weight: 400;
color: #000F16;
}
}
.content-text {
width: 100%;
display: flex;
flex-wrap: wrap;
.text-field {
width: 33%;
margin-bottom: 8px;
.text-field-left {
width: 124px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 24px;
}
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #040B29;
font-weight: 400;
}
.text-field-right-url {
color: #00B3BE !important;
cursor: pointer;
margin-top: 10px;
}
}
}
.content {
font-size: 16px;
color: #040B29;
font-weight: 400;
}
.content-icon {
height: 40px;
line-height: 40px;
font-size: 16px;
color: #040B29;
font-weight: 400;
text-align: right;
margin-top: 20px;
}
.content-icon-text {
display: inline-block;
padding: 0 20px;
cursor: pointer;
line-height: 40px;
}
.content-icon-text .icon {
font-size: 24px;
color: #3b4249 !important;
}
.content-icon-text span {
display: inline-block;
margin-left: 4px;
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 88px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
color: #000F16;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: 100%;
display: inline-block;
margin-top: 2px;
margin-bottom: 12px;
}
.content-button {
text-align: right;
}
.header-btn {
height: 38px;
}
</style>
@@ -27,7 +27,7 @@
</div>
</div>
<div style="padding-top: 68px;background: #fff">
<div class="detail-content">
<div class="detail-content" style="padding-bottom: 20px">
<div style="width: 100%;height: auto;overflow: hidden">
<div class="detail-content-left">
<div class="detail-content-left-header">
@@ -324,6 +324,7 @@
if (res.success) {
this.loading = false
this.$message.success(this.$t('OperationSuccessful'))
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
@@ -26,19 +26,10 @@
<div class="title-text" :title="$t('releaseSituation')">
<span>{{$t('releaseSituation')}}</span>
</div>
<a-select :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="queryParam.flowStatus">
<a-select-option v-for="(item, key) in gatherResultList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<j-dict-select-tag class="box-input" v-model="queryParam.releaseCondition"
:placeholder="$t('PleaseSelect')+$t('releaseSituation')"
:type="'select'"
:triggerChange="false" dictCode="release_condition"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">