修改文档库分享改订阅

This commit is contained in:
gaosong
2023-11-18 13:27:32 +08:00
parent e4a2ad5a56
commit 13f034fb98
5 changed files with 51 additions and 17 deletions
@@ -42,17 +42,23 @@
</div>
<div @click="CollectionClick({'collectFlag':collectFlag,'id':documentId})"
v-has="'bussLog:collect'" class="operator-text-text"
:title="$t('Collection')">
:title="collectFlag == '1' ? $t('CancelCollection') : $t('Collection')">
<a-icon class="icon" type="star" />
{{ collectFlag == '1' ? $t('CancelCollection') : $t('Collection') }}
</div>
<div @click="shareClick" v-has="'bussLog:share'" class="operator-text-text"
:title="$t('share')">
<a-icon type="share-alt" />
{{ $t('share') }}
</div>
<!-- <div @click="shareClick" v-has="'bussLog:share'" class="operator-text-text"-->
<!-- :title="$t('share')">-->
<!-- <a-icon type="share-alt" />-->
<!-- {{ $t('share') }}-->
<!-- </div>-->
<div @click="subscribeClick({'subscribeFlag':subscribeFlag,'id':documentId})"
v-has="'bussLog:subscribe'" class="operator-text-text"
:title="subscribeFlag == '1' ? $t('CancelSubscribe') : $t('subscribe')">
<a-icon type="pushpin" />
{{ subscribeFlag == '1' ? $t('CancelSubscribe') : $t('subscribe') }}
</div>
</div>
</div>
<div style="margin-top: 68px;background: #fff" class="detail-box">
@@ -466,6 +472,28 @@ export default {
}
})
},
subscribeClick(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'))
_this.getWdkCollectAndSubscribeInfoByUser()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
CollectionClick(val) {
let _this = this
this.$confirm({
@@ -959,14 +987,14 @@ body {
font-weight: 400;
color: #040B29;
display: inline-block;
width: 130px;
max-width: 130px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-align: center;
height: 40px;
border: 1px solid #CED0D8;
border-radius: 4px;
//border: 1px solid #CED0D8;
//border-radius: 4px;
line-height: 40px;
padding: 0 5px;
}
@@ -758,22 +758,22 @@
],
designRemark: [
{
max: 300,
message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 1000,
message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 1000 + this.$t('Characters'),
trigger: 'blur'
}
],
verifyRemark: [
{
max: 300,
message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 1000,
message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 1000 + this.$t('Characters'),
trigger: 'blur'
}
],
prehomoRemark: [
{
max: 300,
message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 1000,
message: this.$t('descriptionDeliverables') + this.$t('cannotExceed') + 1000 + this.$t('Characters'),
trigger: 'blur'
}
],
@@ -2997,7 +2997,7 @@
this.confirmLoading = false
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.$message.warning(res.message)
this.confirmLoading = false
}
let that = this