fix:漫画添加批量设置
This commit is contained in:
@@ -0,0 +1,119 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="title" :visible.sync="Visible" calss="ac-dialog" center width="800px" @close="close">
|
||||||
|
<div>
|
||||||
|
<el-form :rules="rules" :model="dialogForm" label-width="130px" ref="dialogForm">
|
||||||
|
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否VIP" prop="isVip">
|
||||||
|
<el-switch v-model="dialogForm.isVip" :active-value="true" :inactive-value="false" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||||
|
<el-form-item label="售价">
|
||||||
|
<el-input placeholder="请输入售价" v-model.number="dialogForm.price" style="width: 180px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||||
|
<el-form-item label="漫画上架状态">
|
||||||
|
<el-select placeholder="请选择漫画上架状态" v-model="dialogForm.status">
|
||||||
|
<el-option label="上架" :value="1" />
|
||||||
|
<el-option label="下架" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||||
|
<el-form-item label="漫画更新状态">
|
||||||
|
<el-select placeholder="请选择漫画更新状态" v-model="dialogForm.updateStatus">
|
||||||
|
<el-option label="待发布" :value="0" />
|
||||||
|
<el-option label="连载中" :value="1" />
|
||||||
|
<el-option label="已完结" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="dialog-footer" slot="footer">
|
||||||
|
<el-button @click="Visible = false">取 消</el-button>
|
||||||
|
<el-button @click="submitForm('dialogForm')" type="primary">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { comicsUpdate } from '@/api/comicsManagement/comics'
|
||||||
|
|
||||||
|
import UploadImg from '@/components/UploadImg/index'
|
||||||
|
export default {
|
||||||
|
name: 'AddOrEdit',
|
||||||
|
props: ['data', 'circleList'],
|
||||||
|
components: {
|
||||||
|
UploadImg
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
Visible: true,
|
||||||
|
title: '',
|
||||||
|
// 表单数据
|
||||||
|
dialogForm: {
|
||||||
|
isVip: undefined, // true,是否VIp
|
||||||
|
price: undefined, // 0,售价,单位分
|
||||||
|
status: undefined, // 0,漫画状态
|
||||||
|
},
|
||||||
|
labelList: [],
|
||||||
|
rules: {
|
||||||
|
// sort: [{ required: true, message: '必填', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
resData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.$emit('close')
|
||||||
|
},
|
||||||
|
// 提交按钮
|
||||||
|
submitForm() {
|
||||||
|
if (this.data.length) {
|
||||||
|
this.data.forEach(item => {
|
||||||
|
const data = {
|
||||||
|
id: item.id,
|
||||||
|
param: item
|
||||||
|
}
|
||||||
|
data.param.status = this.dialogForm.status
|
||||||
|
data.param.updateStatus = this.dialogForm.updateStatus
|
||||||
|
if (this.dialogForm.price) {
|
||||||
|
data.param.price = this.dialogForm.price * 100
|
||||||
|
} else if (this.dialogForm.price === 0) {
|
||||||
|
data.param.price = 0
|
||||||
|
}
|
||||||
|
comicsUpdate(data).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: item.id + '修改成功'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: item.id + '修改失败'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: '未选择漫画'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.Visible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ v-model="searchData.comicsPayType"
|
|||||||
<el-button @click="setTag" icon="el-icon-edit-outline" plain type="warning">批量设置主题</el-button>
|
<el-button @click="setTag" icon="el-icon-edit-outline" plain type="warning">批量设置主题</el-button>
|
||||||
<el-button @click="setTags" icon="el-icon-edit-outline" plain type="warning">批量添加标签</el-button>
|
<el-button @click="setTags" icon="el-icon-edit-outline" plain type="warning">批量添加标签</el-button>
|
||||||
<!-- <el-button @click="delTheme" icon="el-icon-edit-outline" plain type="warning">一键移除漫画主题</el-button> -->
|
<!-- <el-button @click="delTheme" icon="el-icon-edit-outline" plain type="warning">一键移除漫画主题</el-button> -->
|
||||||
|
<el-button @click="batch" icon="el-icon-edit-outline" plain type="warning">批量设置漫画</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -289,6 +289,7 @@ layout="total, sizes, prev, pager, next, jumper" />
|
|||||||
<DelTag :data="topicIdList" v-if="delThemeVisible" @close="closeEdit"></DelTag>
|
<DelTag :data="topicIdList" v-if="delThemeVisible" @close="closeEdit"></DelTag>
|
||||||
<EditCom :data="editData" v-if="editComVisible" :objectype="5" @close="closeEdit" />
|
<EditCom :data="editData" v-if="editComVisible" :objectype="5" @close="closeEdit" />
|
||||||
<AddTags :data="selectBatch" v-if="tagsVisible" @close="closeEdit" />
|
<AddTags :data="selectBatch" v-if="tagsVisible" @close="closeEdit" />
|
||||||
|
<Bach :data="selectBatch" v-if="batchVisible" @close="closeEdit" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -303,6 +304,7 @@ import { circleListSearch } from '@/api/user/circleList'
|
|||||||
import ChapterList from './components/chapterList'
|
import ChapterList from './components/chapterList'
|
||||||
import ShowImg from '@/components/ShowImg/index.vue'
|
import ShowImg from '@/components/ShowImg/index.vue'
|
||||||
import Edit from './components/AddOrEdit'
|
import Edit from './components/AddOrEdit'
|
||||||
|
import Bach from './components/Bach'
|
||||||
import SetTag from './components/setTag'
|
import SetTag from './components/setTag'
|
||||||
import DelTag from './components/delTag'
|
import DelTag from './components/delTag'
|
||||||
import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
||||||
@@ -316,7 +318,8 @@ export default {
|
|||||||
SetTag,
|
SetTag,
|
||||||
EditCom,
|
EditCom,
|
||||||
AddTags,
|
AddTags,
|
||||||
DelTag
|
DelTag,
|
||||||
|
Bach
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -343,7 +346,7 @@ export default {
|
|||||||
setTagVisible: false,
|
setTagVisible: false,
|
||||||
tagsVisible: false, // 批量添加标签
|
tagsVisible: false, // 批量添加标签
|
||||||
delThemeVisible: false,
|
delThemeVisible: false,
|
||||||
|
batchVisible:false,
|
||||||
editData: {},
|
editData: {},
|
||||||
topicIdList: [],
|
topicIdList: [],
|
||||||
tagIdList: [],
|
tagIdList: [],
|
||||||
@@ -530,6 +533,7 @@ export default {
|
|||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
this.chapterListVisible = false
|
this.chapterListVisible = false
|
||||||
this.tagsVisible = false
|
this.tagsVisible = false
|
||||||
|
this.batchVisible = false
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -556,6 +560,9 @@ export default {
|
|||||||
data: row
|
data: row
|
||||||
}
|
}
|
||||||
this.editComVisible = true
|
this.editComVisible = true
|
||||||
|
},
|
||||||
|
batch(){
|
||||||
|
this.batchVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user