Commit f90ac9c6 authored by zhanglw's avatar zhanglw

ds

parent c2b9f592
...@@ -20,6 +20,15 @@ export const HttpReq = { ...@@ -20,6 +20,15 @@ export const HttpReq = {
method: 'get' method: 'get'
}) })
}, },
updateIfUp: function(data) {
return request({
url: 'apps/updateIfUp',
method: 'post',
data: data
}).then((res) => {
return res
})
},
api: null api: null
}, },
// web端接口列表 // web端接口列表
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
</div> </div>
<div class="toolbar"> <div class="toolbar">
<div> <div>
<el-button type="danger" icon="el-icon-download" :disabled="!multipleSelection.length" @click="batchOperate(0, null)">下架</el-button> <el-button type="danger" icon="el-icon-download" :disabled="!multipleSelection.length" @click="batchOperate(1, null)">下架</el-button>
<el-button type="success" icon="el-icon-finished" :disabled="!multipleSelection.length" @click="batchOperate(1, null)">上架</el-button> <el-button type="success" icon="el-icon-finished" :disabled="!multipleSelection.length" @click="batchOperate(0, null)">上架</el-button>
</div> </div>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="primary" icon="el-icon-upload2" @click="toAdd">上传app</el-button> <el-button type="primary" icon="el-icon-upload2" @click="toAdd">上传app</el-button>
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<el-table-column prop="uploadtime" label="最后维护日期" align="center" width="180" /> <el-table-column prop="uploadtime" label="最后维护日期" align="center" width="180" />
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip content="下架"><el-button round plain type="danger" icon="el-icon-download" @click="batchOperate(0, scope.row)" /></el-tooltip> <el-tooltip content="下架"><el-button round plain type="danger" icon="el-icon-download" @click="batchOperate(1, scope.row)" /></el-tooltip>
<el-tooltip content="上架"><el-button round plain type="success" icon="el-icon-finished" @click="batchOperate(1, scope.row)" /></el-tooltip> <el-tooltip content="上架"><el-button round plain type="success" icon="el-icon-finished" @click="batchOperate(0, scope.row)" /></el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -118,12 +118,12 @@ export default { ...@@ -118,12 +118,12 @@ export default {
type: 'info' type: 'info'
}) })
} }
HttpReq.backstageApi.batchReleaseAndRecovery({ HttpReq.backstageApi.updateIfUp({
ids: row ? [row.productId] : this.multipleSelection.map(item => { return item.productId }), ids: row ? [row.id] : this.multipleSelection.map(item => { return item.id }),
type: type ifUp: type
}).then((res) => { }).then((res) => {
this.$notify({ this.$notify({
title: res.msg, title: res.message,
type: res.code === 200 ? 'success' : 'error', type: res.code === 200 ? 'success' : 'error',
duration: 2500 duration: 2500
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment