修改部分会议提到的bug

This commit is contained in:
2023-03-14 18:11:48 +08:00
parent afcb62b4eb
commit 92657ea736
18 changed files with 1186 additions and 284 deletions

View File

@@ -61,7 +61,7 @@ function openDialog(type) {
}
}
async function onDelete() {
const ids = lbt_ids.value.map(item => item.ID)
const ids = lbt_ids.value.map(item => item.banner_id)
const res = await api.delLbt({ ids })
if (res.code === 0) {
ElMessage({
@@ -111,12 +111,15 @@ const submitForm = async (formEl) => {
}
async function saveForm() {
let func_name = ''
if(form.value.ID){ // 编辑
if(form.value.banner_id){ // 编辑
func_name = 'editLbtManage'
}
else{
func_name = 'addLbtManage'
}
form.value.status = parseInt(form.value.status)
form.value.lbtSkipUrlType = parseInt(form.value.lbtSkipUrlType)
form.value.lbtType = parseInt(form.value.lbtType)
const res = await api[func_name](form.value)
if(res.code === 0)
{
@@ -144,7 +147,7 @@ function delLbtFunc(item) {
.then(async() => {
console.log(1)
const res = await api.delLbt({
ids:[item.ID]
ids:[item.banner_id]
})
if (res.code === 0) {
ElMessage({
@@ -199,7 +202,7 @@ function handleSizeChange(val) {
</el-table-column>
<el-table-column align="left" label="是否启用" min-width="150" prop="status" >
<template #default="scope">
{{scope.row.status === '1'?'启用':'禁用'}}
{{scope.row.status == '1'?'启用':'禁用'}}
</template>
</el-table-column>
<el-table-column align="left" label="说明" min-width="150" prop="lbtIntroduction" />
@@ -268,7 +271,7 @@ function handleSizeChange(val) {
<el-input v-model="form.lbtSkipUrl" placeholder="链接地址" autocomplete="off" />
</el-form-item>
<el-form-item label="启用状态" prop="status">
<el-switch v-model="form.status" active-value="1" inactive-value="2" active-text="启用" inactive-text="禁用" />
<el-switch v-model="form.status" :active-value="1" :inactive-value="2" active-text="启用" inactive-text="禁用" />
</el-form-item>
<el-form-item label="展示位置" prop="lbtType">
<el-select v-model="form.lbtType" class="m-2" placeholder="请选择">