修改已知bug

This commit is contained in:
qq787203167
2022-08-10 18:09:00 +08:00
parent 9d07771c82
commit 46c7cc49b1
7 changed files with 71 additions and 19 deletions
+1
View File
@@ -1255,4 +1255,5 @@ module.exports = {
deleteNode:'If there is any file information, the file will be deleted. Are you sure to delete this data?', deleteNode:'If there is any file information, the file will be deleted. Are you sure to delete this data?',
HaveReleased:'Have released', HaveReleased:'Have released',
forward:'Forward', forward:'Forward',
issuedBy:'Issued by',
} }
+1
View File
@@ -1358,4 +1358,5 @@ module.exports = {
deleteNode:'若有文件信息将同步删除确认删除该条数据', deleteNode:'若有文件信息将同步删除确认删除该条数据',
HaveReleased:'已发布', HaveReleased:'已发布',
forward:'转发', forward:'转发',
issuedBy:'发布人',
} }
@@ -190,7 +190,6 @@
}) })
}) })
}) })
console.log(this.contentList)
}, },
queryCountry(callback) { queryCountry(callback) {
this.loading = true this.loading = true
@@ -92,9 +92,8 @@
<span class="title-text-text" :title="$t('market')">{{$t('market')}}</span> <span class="title-text-text" :title="$t('market')">{{$t('market')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="targetMarket"> <a-form-model-item class="itemModel" prop="targetMarket">
<j-dict-select-tag class="box-input" v-model="formInline.targetMarket" <j-multi-select-tag class="box-input" v-model="formInline.targetMarket"
:disabled="disabled" :disabled="disabled"
@input="handleInput('targetMarket')"
:placeholder="$t('PleaseSelect')+$t('market')" :placeholder="$t('PleaseSelect')+$t('market')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'region'"/> :triggerChange="false" :dictCode="'region'"/>
@@ -110,6 +109,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="standNumber"> <a-form-model-item class="itemModel" prop="standNumber">
<a-input class="box-input" <a-input class="box-input"
:title="formInline.standNumber"
:disabled="true" :disabled="true"
v-model="formInline.standNumber" v-model="formInline.standNumber"
:placeholder="$t('PleaseEnter')+$t('standardNo')"/> :placeholder="$t('PleaseEnter')+$t('standardNo')"/>
@@ -133,11 +133,12 @@
<div class="title-text"> <div class="title-text">
<span class="title-text-text">{{$t('content')}}</span> <span class="title-text-text">{{$t('content')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="vehiclePlatform"> <a-form-model-item style="height: 300px" class="itemModel" prop="content">
<quill-editor <quill-editor
style="height: 300px" style="height: 300px"
:content="formInline.content" :content="formInline.content"
:options="editorOption" :options="editorOption"
@blur="quilleditorBlur"
@change="onEditorChange($event)" @change="onEditorChange($event)"
/> />
</a-form-model-item> </a-form-model-item>
@@ -239,6 +240,13 @@
message: this.$t('market') + this.$t('cannotEmpty'), message: this.$t('market') + this.$t('cannotEmpty'),
trigger: 'change' trigger: 'change'
} }
],
content: [
{
max: 5000,
message: this.$t('content') + this.$t('cannotExceed') + 5000 + this.$t('Characters'),
trigger: 'change'
}
] ]
}, },
url: { url: {
@@ -276,6 +284,9 @@
} }
}, },
methods: { methods: {
quilleditorBlur() {
this.$refs.ruleForm.validateField('content')
},
getBase() { getBase() {
getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => { getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => {
if (res.success) { if (res.success) {
@@ -340,7 +351,6 @@
} }
, ,
onEditorChange({ quill, html, text }) { onEditorChange({ quill, html, text }) {
console.log('editor change!', quill, html, text)
this.formInline.content = html this.formInline.content = html
} }
, ,
@@ -53,7 +53,7 @@
</a-tooltip> </a-tooltip>
</div> </div>
<div class="text-content"> <div class="text-content">
{{item.content}} {{item.contentOne}}
</div> </div>
</div> </div>
</div> </div>
@@ -130,6 +130,7 @@
? [...selectedTags, tag] ? [...selectedTags, tag]
: selectedTags.filter(t => t !== tag) : selectedTags.filter(t => t !== tag)
this.selectedTags = nextSelectedTags this.selectedTags = nextSelectedTags
this.getList()
}, },
ResetSearch() { ResetSearch() {
this.searchStr = '' this.searchStr = ''
@@ -160,16 +161,29 @@
this.pageSize = pageSize this.pageSize = pageSize
this.getList() this.getList()
}, },
getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
return words.replace(/\s/g, '') //这里是去除空格
},
getList() { getList() {
let selectedTags = JSON.parse(JSON.stringify(this.selectedTags))
let query = { let query = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
searchStr: this.searchStr searchStr: this.searchStr,
problemTypes: selectedTags.join(',')
} }
this.loading = true this.loading = true
getAction(this.url.getInfoList, query).then((res) => { getAction(this.url.getInfoList, query).then((res) => {
if (res.success) { if (res.success) {
this.conList = res.result.records this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
if (val.content) {
val.contentOne = this.getText(val.content)
}
})
}
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -22,7 +22,7 @@
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button> <a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
</div> </div>
</div> </div>
<div v-if="conList.length > 0" style="height: calc(100vh - 180px);overflow:auto;"> <div v-if="conList.length > 0" style="height: calc(100vh - 240px);overflow:auto;">
<div v-for="(item,index) in conList" :key="item.id"> <div v-for="(item,index) in conList" :key="item.id">
<div style="margin-bottom: 10px;position: relative;overflow: hidden"> <div style="margin-bottom: 10px;position: relative;overflow: hidden">
<!-- <a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>--> <!-- <a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>-->
@@ -36,7 +36,8 @@
<span class="text-header-text" style="cursor: pointer" v-html="item.title"></span> <span class="text-header-text" style="cursor: pointer" v-html="item.title"></span>
</a-tooltip> </a-tooltip>
</div> </div>
<div class="text-content" v-html="item.content"> <div class="text-content">
{{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)">{{$t('edit')}}</a>
@@ -113,6 +114,10 @@
this.pageNo = 1 this.pageNo = 1
this.getList() this.getList()
}, },
getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
return words.replace(/\s/g, '') //这里是去除空格
},
getList() { getList() {
let query = { let query = {
pageNo: this.pageNo, pageNo: this.pageNo,
@@ -124,6 +129,13 @@
getAction(this.url.getInfoList, query).then((res) => { getAction(this.url.getInfoList, query).then((res) => {
if (res.success) { if (res.success) {
this.conList = res.result.records this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
if (val.content) {
val.contentOne = this.getText(val.content)
}
})
}
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -139,11 +151,9 @@
}, },
titleClick(item) { titleClick(item) {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/docManage/library/detail', path: '/problemKnowledgeBaseView',
query: { query: {
id: item.id.slice(0, 32), id: item.id
title: item.title,
serial_number: item.serial_number
} }
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
@@ -17,6 +17,14 @@
</div> </div>
<div style="padding-top: 68px;background: #fff"> <div style="padding-top: 68px;background: #fff">
<div class="detail-content" style="padding: 24px"> <div class="detail-content" style="padding: 24px">
<div class="content-text-top">
<span style="margin-right: 10px">
{{$t('issuedBy')}}:{{this.queryForm.createBy}}
</span>
<span>
{{$t('releaseDate')}}:{{this.queryForm.createTime}}
</span>
</div>
<div class="content-text"> <div class="content-text">
<div class="text-field" v-for="(item,index) in standardContentList" :key="index"> <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-left" :title="item.title">{{item.title}}</span>
@@ -104,11 +112,11 @@
standardContentList: [ standardContentList: [
{ {
title: this.$t('problemClassification'), title: this.$t('problemClassification'),
value: 'problemType' value: 'problemTypeName'
}, },
{ {
title: this.$t('market'), title: this.$t('market'),
value: 'targetMarket' value: 'targetMarket_dicText'
}, },
{ {
title: this.$t('standardNo'), title: this.$t('standardNo'),
@@ -493,4 +501,13 @@
overflow: hidden; overflow: hidden;
text-align: right; text-align: right;
} }
.content-text-top {
width: 100%;
text-align: right;
color: #040B29;
font-weight: 400;
font-size: 16px;
margin-bottom: 20px;
}
</style> </style>