Commit 0165f96d by 温丽香

主应用的设置和取消

1 parent 45b75887
Pipeline #3890 passed
in 1 minute 57 seconds
Showing with 9 additions and 3 deletions
......@@ -24,8 +24,8 @@
<i class="el-icon-view eye-btn" @mousedown="showSecret = row.appid" @mouseup="showSecret = ''"></i>
</div>
<div slot="operate" slot-scope="row">
<span class="operate" v-if="row.number === 1" @click="setHostApp(row)">设置为主应用</span>
<span class="operate" v-else @click="setHostApp(row)">取消设置为主应用</span>
<span class="operate" v-if="row.ismainapp === 0" @click="setHostApp(row)">设置为主应用</span>
<span class="operate" v-else @click="cancelHostApp(row)">取消设置为主应用</span>
<span class="operate operate-delete" @click="handleDelete(row)">删除</span>
</div>
</st-table>
......@@ -154,7 +154,13 @@ export default {
this.getData()
}
},
cancelHostApp() {}
async cancelHostApp(row) {
const res = await setApp({ appid: row.appid, mainapp: 0, username: 'test' })
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.getData()
}
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!