修改禅道已知问题

This commit is contained in:
qq787203167
2022-03-10 19:13:11 +08:00
parent 7fcd61cbfd
commit ca0e81a9c0
7 changed files with 293 additions and 178 deletions
@@ -40,11 +40,21 @@
ref="table"
size="middle"
bordered
:scroll="{x: true}"
rowKey="id"
:data-source="tableData"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<span slot="operation" slot-scope="record">
<a @click="Collection(record)" class="text-operation">
{{!record.collectFlag || record.collectFlag == 0 ? $t('Collection') :$t('CancelCollection')}}
</a>
<a @click="subscribe(record)" class="text-operation">
{{!record.subscribeFlag || record.subscribeFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
</a>
<a> {{$t('Push')}}</a>
</span>
<!-- 字符串超长截取省略号显示-->
<!-- <span slot="templateContent" slot-scope="text">-->
<!-- <j-ellipsis :value="text" :length="25"/>-->
@@ -85,12 +95,22 @@
</div>
</div>
</div>
<libraryPush
:url="url"
ref="libraryPushRef"
/>
</div>
</template>
<script>
import eventBUs from '../../../../common/event'
import { getAction, postAction } from '@/api/manage'
import libraryPush from '@/components/libraryPush/index'
export default {
name: 'DocumentLibrary',
components:{
libraryPush
},
data() {
return {
searchOption: [
@@ -201,43 +221,61 @@
}
],
tableData: [],
url:{
pullMessage: 'document/bussDocumentLibraryEO/pullMessage',//推送
},
columns: [
{
title: '编号',
title: this.$t('standard'),
align: 'center',
dataIndex: 'templateCode'
},
{
title: '标题',
title: this.$t('title'),
align: 'center',
dataIndex: 'templateName'
},
{
title: '文件名称',
title: this.$t('fileName'),
align: 'center',
dataIndex: 'template'
},
{
title: '状态',
title: this.$t('status'),
align: 'center',
dataIndex: 'templateCon',
sorter: (a, b) => a.age - b.age
dataIndex: 'templateCon'
},
{
title: '适用地区',
title: this.$t('zoneOfApplication'),
align: 'center',
dataIndex: 'templateCont',
sorter: (a, b) => a.age - b.age
dataIndex: 'templateCont'
},
{
title: '功能领域',
title: this.$t('functionalAreas'),
align: 'center',
dataIndex: 'templateContent1'
},
{
title: '技术领域',
title: this.$t('technicalField'),
align: 'center',
dataIndex: 'templateContent2'
},
{
title: this.$t('releaseTime'),
align: 'center',
dataIndex: 'releaseTime'
},
{
title: this.$t('standardImplementationTime'),
align: 'center',
dataIndex: 'standardImplementationTime'
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
}
],
selectedRowKeys: [],
@@ -330,11 +368,72 @@
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
},
//收藏按钮
Collection(val) {
let _this = this
this.$confirm({
content: val.collectFlag == 0 || !val.collectFlag ? _this.$t('ConfirmCollection') : _this.$t('cancelConfirmCollection'),
onOk() {
let url = ''
if (val.collectFlag == 0 || !val.collectFlag) {
url = 'document/bussDocumentLibraryEO/addCollect'
} else {
url = 'document/bussDocumentLibraryEO/cancelCollect'
}
getAction(url, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//订阅按钮
subscribe(val) {
let _this = this
this.$confirm({
content: val.subscribeFlag == 0 || !val.subscribeFlag ? _this.$t('ConfirmSubscribe') : _this.$t('cancelConfirmSubscribe'),
onOk() {
let url = ''
if (val.subscribeFlag == 0 || !val.subscribeFlag) {
url = 'document/bussDocumentLibraryEO/addSubscribe'
} else {
url = 'document/bussDocumentLibraryEO/cancelSubscribe'
}
getAction(url, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//推送
handleCompare(val) {
let item = JSON.parse(JSON.stringify(val))
this.$nextTick(() => {
this.$refs.libraryPushRef.visible = true
this.$refs.libraryPushRef.tableKey = item.id.split(',')
})
}
}
}
</script>
<style>
.table .ant-table-column-title {
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
.checkbox-left .ant-checkbox-inner {
width: 18px !important;
height: 18px !important;
@@ -495,8 +594,13 @@
padding: 0 0 0 8px;
box-sizing: border-box;
}
.page {
text-align: right;
margin-top: 20px;
}
.text-operation {
margin-right: 8px;
}
</style>