[update] 市场法规清单增加直接发布功能

This commit is contained in:
lideqin
2024-09-27 11:47:35 +08:00
parent b38dc8df32
commit c541c302d8
3 changed files with 36 additions and 2 deletions
@@ -80,7 +80,10 @@ module.exports = {
haveStandardExist: 'Some standards already exist',
pleaseSelectAListPublish: 'Please select a list to publish',
pleaseSelectCorrectData: 'Select an unpublished or modified list to publish',
listNumberEnglishPart: 'List number English abbreviation'
listNumberEnglishPart: 'List number English abbreviation',
directRelease: 'Direct release',
confirmDirectRelease: 'Want to publish directly?',
directReleaseAData: 'Do you want to publish selected data directly?'
},
// 市场清单详情列表字段
marketListField: {
@@ -80,7 +80,10 @@ module.exports = {
haveStandardExist: '部分标准已存在',
pleaseSelectAListPublish: '请选择一个清单进行发布',
pleaseSelectCorrectData: '请选择未发布或者修改中的清单进行发布',
listNumberEnglishPart: '清单编号英文缩写'
listNumberEnglishPart: '清单编号英文缩写',
directRelease: '直接发布',
confirmDirectRelease: '确认直接发布?',
directReleaseAData: '是否直接发布选中数据?'
},
// 市场清单详情列表字段
marketListField: {
@@ -87,6 +87,8 @@
</a-button>
<!-- 查看 -->
<a-button icon="eye" type="primary" ghost @click="handleLook" v-has="'marketStandard:detail'">{{ $t('view') }}</a-button>
<!-- 直接发布 -->
<a-button icon="plus" type="primary" ghost @click="handleDirectRelease" v-has="'marketStandard:directRelease'">{{ $t('standardRegulationLibrary.marketRegulationsList.directRelease') }}</a-button>
</div>
<!-- table区域-begin -->
@@ -331,6 +333,32 @@ export default {
}
})
},
// 直接发布
handleDirectRelease () {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecord'))
} else {
const ids = this.selectedRowKeys.join(',')
const that = this
this.$confirm({
title: this.$t('standardRegulationLibrary.marketRegulationsList.confirmDirectRelease'),
content: this.$t('standardRegulationLibrary.marketRegulationsList.directReleaseAData'),
onOk: function () {
that.loading = true
marketRegulationDetailPublish({ ids: ids }).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadData()
} else {
that.$message.warning(res.message)
}
}).finally(() => {
that.loading = false
})
}
})
}
},
// 点击清单编号/清单名称查看详情
toDetail (record) {
this.$router.push({