移动"屏蔽福利片"到源编辑页面

This commit is contained in:
haiyangcui
2020-11-03 12:53:36 +01:00
parent 9d71991103
commit 55d1740354
4 changed files with 31 additions and 17 deletions

View File

@@ -2,6 +2,7 @@
<div class="listpage" id="sites">
<div class="listpage-header" v-show="!enableBatchEdit">
<el-switch v-model="enableBatchEdit" active-text="批处理分组">></el-switch>
<el-checkbox v-model="excludeR18Films" @change="excludeR18FilmsChangeEvent">屏蔽福利片</el-checkbox>
<el-button @click="addSite" icon="el-icon-document-add">新增</el-button>
<el-button @click="exportSites" icon="el-icon-upload2" >导出</el-button>
<el-button @click="importSites" icon="el-icon-download">导入</el-button>
@@ -111,7 +112,7 @@
</template>
<script>
import { mapMutations } from 'vuex'
import { sites } from '../lib/dexie'
import { sites, setting } from '../lib/dexie'
import zy from '../lib/site/tools'
import { remote } from 'electron'
import { sites as defaultSites } from '../lib/dexie/initData'
@@ -152,7 +153,8 @@ export default {
multipleSelection: [],
tableKey: 1,
checkAllSiteLoading: false,
editeOldkey: ''
editeOldkey: '',
excludeR18Films: true
}
},
computed: {
@@ -187,6 +189,13 @@ export default {
},
methods: {
...mapMutations(['SET_SETTING', 'SET_EDITSITES']),
excludeR18FilmsChangeEvent () {
setting.find().then(res => {
res.excludeR18Films = this.excludeR18Films
setting.update(res)
this.setting = res
})
},
filterHandle (value, row) {
return row.group === value
},
@@ -457,6 +466,11 @@ export default {
this.updateDatabase()
this.tableKey = Math.random()
this.checkAllSiteLoading = false
},
getSettings () {
setting.find().then(res => {
this.excludeR18Films = res.excludeR18Films
})
}
},
mounted () {
@@ -465,6 +479,7 @@ export default {
},
created () {
this.getSites()
this.getSettings()
}
}
</script>

View File

@@ -252,6 +252,9 @@ export default {
},
sitesList () {
return this.$store.getters.getEditSites.sites // 需要监听的数据
},
filterSettings () {
return this.$store.getters.getSetting.excludeR18Films // 需要监听的数据
}
},
filters: {
@@ -269,6 +272,9 @@ export default {
},
sitesList () {
this.getAllsites()
},
filterSettings () {
this.siteClick(this.site)
}
},
methods: {
@@ -284,10 +290,9 @@ export default {
this.classList = []
this.type = {}
this.getClass().then(res => {
if (res) {
this.show.class = true
this.infiniteId += 1
}
this.show.class = true
this.infiniteId += 1
this.classClick(this.classList[0])
})
}
},
@@ -464,10 +469,10 @@ export default {
if (this.view === 'Film') {
if (this.setting.view === 'picture') {
this.$refs.filmWaterfall.refresh()
this.getPage().then(() => {
this.infiniteId += 1
})
}
this.getPage().then(() => {
this.infiniteId += 1
})
}
},
getAllSearch () {

View File

@@ -87,9 +87,6 @@
<div class="zy-input" @click="toggleExcludeRootClasses">
<input type="checkbox" v-model = "d.excludeRootClasses" @change="updateSettingEvent"> 屏蔽主分类
</div>
<div class="zy-input" @click="toggleExcludeR18Films">
<input type="checkbox" v-model = "d.excludeR18Films" @change="updateSettingEvent"> 屏蔽福利片
</div>
</div>
</div>
<div class="theme">
@@ -270,10 +267,6 @@ export default {
this.d.searchAllSites = !this.d.searchAllSites
this.updateSettingEvent()
},
toggleExcludeR18Films () {
this.d.excludeR18Films = !this.d.excludeR18Films
this.updateSettingEvent()
},
toggleExcludeRootClasses () {
this.d.excludeRootClasses = !this.d.excludeRootClasses
this.updateSettingEvent()

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import { Message, Button, Table, TableColumn, Tag, Input, Dialog, Form, FormItem, Switch, Select, Option } from 'element-ui'
import { Message, Button, Table, TableColumn, Tag, Input, Dialog, Form, FormItem, Switch, Select, Option, Checkbox } from 'element-ui'
import Plugin from 'v-fit-columns'
Vue.use(Button)
Vue.use(Table)
@@ -13,4 +13,5 @@ Vue.use(Switch)
Vue.use(Plugin)
Vue.use(Select)
Vue.use(Option)
Vue.use(Checkbox)
Vue.prototype.$message = Message