修改禅道已知bug

This commit is contained in:
sunFlower
2022-10-12 16:53:14 +08:00
parent bb4de00f00
commit ae7a9c7a62
9 changed files with 153 additions and 41 deletions
+1
View File
@@ -1219,6 +1219,7 @@ module.exports = {
documentNumber: 'Document Number', documentNumber: 'Document Number',
documentTitle: 'Document Title', documentTitle: 'Document Title',
bringInDocumentInformation: 'Bring in document information', bringInDocumentInformation: 'Bring in document information',
addStandardInformation:'Add standard information',
thereWhichCannotDeleted: 'There are sub headings under this title, which cannot be deleted', thereWhichCannotDeleted: 'There are sub headings under this title, which cannot be deleted',
sdt: 'Sdt', sdt: 'Sdt',
dre: 'Dre', dre: 'Dre',
+1
View File
@@ -1321,6 +1321,7 @@ module.exports = {
documentNumber: '文档编号', documentNumber: '文档编号',
documentTitle: '文档标题', documentTitle: '文档标题',
bringInDocumentInformation: '带入文档信息', bringInDocumentInformation: '带入文档信息',
addStandardInformation:'添加标准信息',
thereWhichCannotDeleted: '该标题下存在子标题无法进行删除', thereWhichCannotDeleted: '该标题下存在子标题无法进行删除',
sdt: '工程接口人', sdt: '工程接口人',
dre: '填写人', dre: '填写人',
@@ -34,9 +34,10 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('problemClassification')">{{$t('problemClassification')}}</span> :title="$t('problemClassification')">{{$t('problemClassification')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="problemType"> <a-form-model-item class="itemModel itemModel-multi" prop="problemType">
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')" <a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
@change="problemTypeChange" @change="problemTypeChange"
mode="multiple"
v-model="formInline.problemType"> v-model="formInline.problemType">
<a-select-option v-for="(item, key) in problemTypeList" <a-select-option v-for="(item, key) in problemTypeList"
:key="key" :key="key"
@@ -125,9 +126,9 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-button class="box-button-index" <a-button class="box-button-index"
:title="$t('bringInDocumentInformation')" :title="$t('addStandardInformation')"
type="primary" @click="bringInDocumentInformationClick"> type="primary" @click="bringInDocumentInformationClick">
{{$t('bringInDocumentInformation')}} {{$t('addStandardInformation')}}
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -356,7 +357,7 @@
document.title = this.$t('problemKnowledgeBase') + this.$t('edit') document.title = this.$t('problemKnowledgeBase') + this.$t('edit')
} else { } else {
this.isDisplayIndex = true this.isDisplayIndex = true
this.$nextTick(()=>{ this.$nextTick(() => {
this.myQuillEditor() this.myQuillEditor()
}) })
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded') document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
@@ -476,6 +477,11 @@
} else { } else {
this.formInline.standNumber = [] this.formInline.standNumber = []
} }
if (this.formInline.problemType) {
this.formInline.problemType = this.formInline.problemType.split(',')
} else {
this.formInline.problemType = []
}
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
} else { } else {
this.formInline = {} this.formInline = {}
@@ -491,7 +497,7 @@
this.$router.go(-1) this.$router.go(-1)
}, },
onEditorReady(quill) { onEditorReady(quill) {
if (this.formInlineOne.content){ if (this.formInlineOne.content) {
document.getElementsByClassName('ql-editor')[0].innerHTML = this.formInlineOne.content document.getElementsByClassName('ql-editor')[0].innerHTML = this.formInlineOne.content
} }
}, },
@@ -600,9 +606,12 @@
if (valid) { if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline)) let formInline = JSON.parse(JSON.stringify(this.formInline))
// if (formInline.standNumber && formInline.standNumber.length > 0) { // if (formInline.standNumber && formInline.standNumber.length > 0) {
if (formInline.standNumber instanceof Array){ if (formInline.standNumber instanceof Array) {
formInline.standNumber = formInline.standNumber.join(',') formInline.standNumber = formInline.standNumber.join(',')
} }
if (formInline.problemType instanceof Array) {
formInline.problemType = formInline.problemType.join(',')
}
// } // }
this.loading = true this.loading = true
this.confirmLoading = true this.confirmLoading = true
@@ -65,16 +65,16 @@
{{val}} {{val}}
</span> </span>
</div> </div>
<div class="content-box-content" @click="detailClcik(item)"> <div class="content-box-content">
<div class="content-box-content-top" v-html="item.contentOne"> <div class="content-box-content-top" @click="detailClcik(item)"
v-html="item.contentOne">
</div> </div>
<div class="content-box-content-botton"> <div class="content-box-content-botton">
<div class="content-box-content-botton-text" <div class="content-box-content-botton-text"
v-if="item.accessoryFileNameList && item.accessoryFileNameList.length > 0" v-if="item.accessoryFileNameList && item.accessoryFileNameList.length > 0"
:title="val.fileName" :title="val.fileName"
v-for="val in item.accessoryFileNameList"> v-for="val in item.accessoryFileNameList">
{{val.fileName}} <span @click="fileClick(val)">{{val.fileName}}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -85,9 +85,13 @@
<a-icon type="user"/> <a-icon type="user"/>
{{item.createBy}} {{item.createBy}}
</div> </div>
<div class="content-box-button-text"> <div class="content-box-button-text" v-if="item.standNumber">
<a-icon type="audit"/> <a-icon type="audit"/>
{{item.problemTypeName}} {{item.standNumber}}
</div>
<div class="content-box-button-text" v-if="item.targetMarket_dicText">
<a-icon type="idcard"/>
{{item.targetMarket_dicText}}
</div> </div>
<div class="content-box-button-text"> <div class="content-box-button-text">
<a-icon type="history"/> <a-icon type="history"/>
@@ -170,6 +174,7 @@
import SelectedBy from '@/components/SelectedBy/index' import SelectedBy from '@/components/SelectedBy/index'
import problemKnowledgeBaseListView from './problemKnowledgeBaseListView' import problemKnowledgeBaseListView from './problemKnowledgeBaseListView'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { Base64 } from 'js-base64'
export default { export default {
name: 'problemKnowledgeBaseList', name: 'problemKnowledgeBaseList',
@@ -193,6 +198,7 @@
queryForm: {}, queryForm: {},
tagList: [], tagList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
pageNo: 1, pageNo: 1,
url: { url: {
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page' getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page'
@@ -255,6 +261,26 @@
this.getList() this.getList()
}) })
}, },
fileClick(fileQuery) {
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
},
problemKnowledgeBase() { problemKnowledgeBase() {
this.pageNo = 1 this.pageNo = 1
this.isTrue = true this.isTrue = true
@@ -309,7 +335,8 @@
}, },
getText(str) { getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签 let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
return words.replace(/\s/g, '') //这里是去除空格 //.replace(/\s/g, '') //这里是去除空格
return words
}, },
getList() { getList() {
let selectedTags = JSON.parse(JSON.stringify(this.selectedTags)) let selectedTags = JSON.parse(JSON.stringify(this.selectedTags))
@@ -629,7 +656,7 @@
background: #DBF2F3; background: #DBF2F3;
border-radius: 3px; border-radius: 3px;
margin-left: 6px; margin-left: 6px;
max-width: 120px; max-width: 140px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@@ -662,22 +689,22 @@
margin-top: 10px; margin-top: 10px;
.content-box-content-botton-text { .content-box-content-botton-text {
max-width: 198px; /*max-width: 198px;*/
height: 32px; height: 32px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
padding: 0 10px; /*background: #EFF1F3;*/
background: #EFF1F3;
border-radius: 4px; border-radius: 4px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size: 12px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #040B29; color: #040B29;
margin-right: 10px; margin-right: 20px;
cursor: pointer; cursor: pointer;
text-decoration: underline;
} }
} }
} }
@@ -789,7 +816,7 @@
background: #fff; background: #fff;
background: rgba(4, 11, 41, 0.06); background: rgba(4, 11, 41, 0.06);
color: #363C54; color: #363C54;
max-width: 150px; max-width: 280px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -33,9 +33,13 @@
<a-icon type="user"/> <a-icon type="user"/>
{{queryForm.createBy}} {{queryForm.createBy}}
</div> </div>
<div class="content-box-button-text"> <div class="content-box-button-text" v-if="queryForm.standNumber">
<a-icon type="audit"/> <a-icon type="file-markdown"/>
{{queryForm.problemTypeName}} {{queryForm.standNumber}}
</div>
<div class="content-box-button-text" v-if="queryForm.targetMarket_dicText">
<a-icon type="idcard"/>
{{queryForm.targetMarket_dicText}}
</div> </div>
<div class="content-box-button-text"> <div class="content-box-button-text">
<a-icon type="history"/> <a-icon type="history"/>
@@ -96,8 +100,16 @@
<div class="commentContent-content"> <div class="commentContent-content">
{{item.commentContent}} {{item.commentContent}}
</div> </div>
<div class="answer-text" style="margin-bottom: 14px" @click="messageClick(item)"> <div class="answer-text-index"
{{$t('answer')}} style="margin-bottom: 14px">
<span class="answer-text" @click="messageClick(item)">
{{$t('answer')}}
</span>
<span class="answer-text"
v-if="administrators || item.createBy == userInfoQuery.username"
@click="deleteClick(item)">
{{$t('delete')}}
</span>
</div> </div>
<div class="commentContent-text-one" v-for="(val,index1) in item.problemKnowledgeBaseCommentVOList" <div class="commentContent-text-one" v-for="(val,index1) in item.problemKnowledgeBaseCommentVOList"
v-if="item.problemKnowledgeBaseCommentVOList && item.problemKnowledgeBaseCommentVOList.length > 0"> v-if="item.problemKnowledgeBaseCommentVOList && item.problemKnowledgeBaseCommentVOList.length > 0">
@@ -109,8 +121,15 @@
<div class="commentContent-content"> <div class="commentContent-content">
{{val.commentContent}} {{val.commentContent}}
</div> </div>
<div class="answer-text" @click="messageClick(item)"> <div class="answer-text-index">
<span class="answer-text" @click="messageClick(item)">
{{$t('answer')}} {{$t('answer')}}
</span>
<span class="answer-text"
v-if="administrators || val.createBy == userInfoQuery.username"
@click="deleteClick(val)">
{{$t('delete')}}
</span>
</div> </div>
</div> </div>
</div> </div>
@@ -158,6 +177,7 @@
import SelectedBy from '@/components/SelectedBy/index' import SelectedBy from '@/components/SelectedBy/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { deleteAction } from '../../../../api/manage'
export default { export default {
name: 'problemKnowledgeBaseListView', name: 'problemKnowledgeBaseListView',
@@ -167,6 +187,8 @@
data() { data() {
return { return {
visibleComment: false, visibleComment: false,
administrators: false,
userInfoQuery: {},
releaseList: [], releaseList: [],
loading: false, loading: false,
formInline: {}, formInline: {},
@@ -205,7 +227,15 @@
} }
}, },
mounted() { mounted() {
this.administrators = false
this.userInfoQuery = this.userInfo()
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
@@ -229,6 +259,28 @@
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
}, },
deleteClick(item) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
let url = ''
if (item.problemKnowledgeBaseId) {
url = '/problemKnowledgeBase/problemKnowledgeBaseCommentEO/deleteBatch'
} else {
url = '/project/problemKnowledgeBaseReplyEO/deleteBatch'
}
deleteAction(url, { ids: item.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.releaseData()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
}, },
@@ -494,22 +546,22 @@
margin-top: 10px; margin-top: 10px;
.content-box-content-botton-text { .content-box-content-botton-text {
max-width: 200px; /*max-width: 200px;*/
/*min-width: 120px;*/ /*min-width: 120px;*/
height: 32px; height: 32px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
padding: 0 10px; /*padding: 0 10px;*/
background: #EFF1F3; /*background: #EFF1F3;*/
border-radius: 4px; border-radius: 4px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size: 12px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #040B29; color: #040B29;
margin-right: 10px; margin-right: 20px;
cursor: pointer; cursor: pointer;
.file-text { .file-text {
@@ -517,6 +569,7 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
text-decoration: underline;
display: inline-block; display: inline-block;
margin-right: 6px; margin-right: 6px;
cursor: pointer; cursor: pointer;
@@ -632,6 +685,10 @@
margin-top: 6px; margin-top: 6px;
} }
.answer-text-index {
width: 100%;
}
.answer-text { .answer-text {
display: inline-block; display: inline-block;
padding: 3px 14px; padding: 3px 14px;
@@ -3,9 +3,9 @@
<div class="doc-detail-wrap"> <div class="doc-detail-wrap">
<div class="doc-detail-header" style="position: fixed;top: 0"> <div class="doc-detail-header" style="position: fixed;top: 0">
<div class="doc-detail-title"> <div class="doc-detail-title">
<!-- <span style="line-height: 66px;display: inline-block;float: left" @click="backClick">--> <!-- <span style="line-height: 66px;display: inline-block;float: left" @click="backClick">-->
<!-- <a-icon type="arrow-left" style="margin-right: 6px;"/>--> <!-- <a-icon type="arrow-left" style="margin-right: 6px;"/>-->
<!-- </span>--> <!-- </span>-->
{{$t('managePublishing')}} {{$t('managePublishing')}}
</div> </div>
</div> </div>
@@ -42,8 +42,10 @@
{{item.contentOne}} {{item.contentOne}}
</div> </div>
<div class="text-text-right-text"> <div class="text-text-right-text">
<a style="margin-right: 10px" @click="edit(item)">{{$t('edit')}}</a> <a style="margin-right: 10px" @click="edit(item)"
<a @click="deleteData(item)">{{$t('delete')}}</a> v-if="userInfoQuery.username == item.createBy || administrators">{{$t('edit')}}</a>
<a @click="deleteData(item)"
v-if="userInfoQuery.username == item.createBy || administrators">{{$t('delete')}}</a>
</div> </div>
</div> </div>
</div> </div>
@@ -85,8 +87,10 @@
pageSize: 10, pageSize: 10,
searchStr: '', searchStr: '',
loading: false, loading: false,
administrators: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
pageNo: 1, pageNo: 1,
userInfoQuery: {},
url: { url: {
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page', getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page',
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseEO/deleteBatch' deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseEO/deleteBatch'
@@ -96,6 +100,15 @@
mounted() { mounted() {
this.getList() this.getList()
document.title = this.$t('managePublishing') document.title = this.$t('managePublishing')
this.administrators = false
this.userInfoQuery = this.userInfo()
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
@@ -119,7 +132,8 @@
}, },
getText(str) { getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签 let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
return words.replace(/\s/g, '') //这里是去除空格 //.replace(/\s/g, '') //这里是去除空格
return words
}, },
getList() { getList() {
let query = { let query = {
@@ -205,7 +205,8 @@
}, },
getText(str) { getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签 let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
return words.replace(/\s/g, '') //这里是去除空格 //.replace(/\s/g, '') //这里是去除空格
return words
}, },
getList() { getList() {
let query = { let query = {
@@ -222,7 +222,8 @@
}, },
getText(str) { getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签 let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
return words.replace(/\s/g, '') //这里是去除空格 //.replace(/\s/g, '') //这里是去除空格
return words
}, },
getParagraphInfoList() { getParagraphInfoList() {
let queryParamIndex = JSON.parse(JSON.stringify(this.queryParam)) let queryParamIndex = JSON.parse(JSON.stringify(this.queryParam))
@@ -201,7 +201,8 @@
}, },
getText(str) { getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签 let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
return words.replace(/\s/g, '') //这里是去除空格 //.replace(/\s/g, '') //这里是去除空格
return words
}, },
getList() { getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let queryParam = JSON.parse(JSON.stringify(this.queryParam))