对接我的收藏问题知识库

This commit is contained in:
范强强
2022-08-31 17:58:01 +08:00
parent 1926a9b10f
commit d1afece6a5
@@ -10,8 +10,8 @@
<div class="title-text" :title="$t('title')"> <div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span> <span>{{$t('title')}}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')" <j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParams.title"></a-input> v-model="queryParams.title"></j-input>
</div> </div>
</a-col> </a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" <span style="float: right;overflow: hidden;margin-right: 11px"
@@ -60,7 +60,10 @@
</div> </div>
<!-- </a-tooltip>--> <!-- </a-tooltip>-->
</div> </div>
<div @click="CancelCollectionClick" class="text-text-right-text">{{$t('CancelCollection')}}</div> <div @click="CancelCollectionClick(item)"
:title="$t('CancelCollection')"
class="text-text-right-text">{{$t('CancelCollection')}}
</div>
</div> </div>
</div> </div>
</a-checkbox-group> </a-checkbox-group>
@@ -98,7 +101,8 @@
loading: false, loading: false,
queryParams: {}, queryParams: {},
url: { url: {
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page' getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/queryCollectPageList',
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/deleteBatch'
} }
} }
}, },
@@ -107,7 +111,6 @@
}, },
watch: { watch: {
checkboxText: function(value) { checkboxText: function(value) {
console.log(value)
this.conList.forEach(val => { this.conList.forEach(val => {
val.checked = false val.checked = false
}) })
@@ -159,9 +162,11 @@
this.$confirm({ this.$confirm({
content: _this.$t('BatchCancelCollection'), content: _this.$t('BatchCancelCollection'),
onOk() { onOk() {
getAction('', {}).then((res) => { let checkboxText = JSON.parse(JSON.stringify(_this.checkboxText))
deleteAction(_this.url.deleteBatch, { ids: checkboxText.join(',') }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.checkboxText = []
_this.getList() _this.getList()
} else { } else {
_this.$message.warning(res.message) _this.$message.warning(res.message)
@@ -178,7 +183,7 @@
this.$confirm({ this.$confirm({
content: _this.$t('confirmCancelCollection'), content: _this.$t('confirmCancelCollection'),
onOk() { onOk() {
getAction('', {}).then((res) => { deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.getList() _this.getList()
@@ -221,7 +226,7 @@
if (this.conList && this.conList.length > 0) { if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => { this.conList.forEach(val => {
if (val.content) { if (val.content) {
val.contentOne = this.getText(val.content) val.content = this.getText(val.content)
} }
}) })
} }