对接虚拟清单的发布撤回

This commit is contained in:
qq787203167
2022-04-12 16:59:11 +08:00
parent 3b14934098
commit 1e2a0eb78f
3 changed files with 28 additions and 15 deletions
+3 -2
View File
@@ -639,11 +639,12 @@ module.exports = {
China:'China', China:'China',
onlyOnefileUploaded:'only one file can be uploaded', onlyOnefileUploaded:'only one file can be uploaded',
typeCannotUploaded:'this type of file cannot be uploaded', typeCannotUploaded:'this type of file cannot be uploaded',
confirmWithdraw:'confirm Withdraw', confirmWithdraw:'confirm Withdraw ?',
OperationDetails:'Operation details', OperationDetails:'Operation details',
OperationTime:'Operation time', OperationTime:'Operation time',
oneTableAdded:'only one table can be added', oneTableAdded:'only one table can be added',
addATable:'please add a table', addATable:'please add a table',
pleaseUploadSplitFile:'please upload split file', pleaseUploadSplitFile:'please upload split file',
release:'release',
confirmRelease:'confirm Release ?',
} }
+2 -1
View File
@@ -649,5 +649,6 @@ module.exports = {
oneTableAdded:'只能添加一个表格', oneTableAdded:'只能添加一个表格',
addATable:'请添加一个表格', addATable:'请添加一个表格',
pleaseUploadSplitFile:'请上传拆分文件', pleaseUploadSplitFile:'请上传拆分文件',
release:'发布',
confirmRelease:'确认发布?',
} }
@@ -7,8 +7,8 @@
<div class="title-text" :title="$t('VirtualListName')"> <div class="title-text" :title="$t('VirtualListName')">
<span>{{$t('VirtualListName')}}</span> <span>{{$t('VirtualListName')}}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('VirtualListName')" <j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('VirtualListName')"
v-model="queryParam.name"></a-input> v-model="queryParam.name"></j-input>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
@@ -57,12 +57,14 @@
</span> </span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="withdraw(record)">{{$t('withdraw')}}</a> <a class="text-operation" @click="withdraw(record)">
<a class="text-operation" @click="maintenanceList(record)">{{$t('maintenanceList')}}</a> {{record.state == 2 ? $t('release') : $t('withdraw')}}
<a class="text-operation" @click="subscribe(record)">
{{!record.subscribeFlag || record.subscribeFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
</a> </a>
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a> <a class="text-operation" @click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
<a class="text-operation" :disabled="record.state == 2?true:false" @click="subscribe(record)">
{{!record.readFlag || record.readFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
</a>
<a class="text-operation" :disabled="record.state == 2?true:false" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -229,12 +231,21 @@
this.visible = true this.visible = true
}, },
//撤回 //撤回
withdraw(item) { withdraw(val) {
let item = JSON.parse(JSON.stringify(val))
let content = ''
if (item.state == 2) {
content = this.$t('confirmRelease')
item.state = 1
} else {
item.state = 2
content = this.$t('confirmWithdraw')
}
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: _this.$t('confirmWithdraw'), content: content,
onOk() { onOk() {
getAction(_this.url.urlWithdraw, { id: item.id }).then((res) => { postAction(_this.url.edit, item).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.getList() _this.getList()
@@ -262,10 +273,10 @@
subscribe(val) { subscribe(val) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: val.subscribeFlag == 0 || !val.subscribeFlag ? _this.$t('ConfirmSubscribe') : _this.$t('cancelConfirmSubscribe'), content: val.readFlag == 0 || !val.readFlag ? _this.$t('ConfirmSubscribe') : _this.$t('cancelConfirmSubscribe'),
onOk() { onOk() {
let url = '' let url = ''
if (val.subscribeFlag == 0 || !val.subscribeFlag) { if (val.readFlag == 0 || !val.readFlag) {
url = 'dummy/dummyInventoryBaseEO/read' url = 'dummy/dummyInventoryBaseEO/read'
} else { } else {
url = 'dummy/dummyInventoryBaseEO/cancelRead' url = 'dummy/dummyInventoryBaseEO/cancelRead'