mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
添加四个重命名
This commit is contained in:
102
web/src/components/KeywordDeleteOperator.vue
Normal file
102
web/src/components/KeywordDeleteOperator.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">filter_list</v-icon>
|
||||
关键词删除
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
关键词删除
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
删除节点名中的关键词
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
关键词
|
||||
<v-chip-group>
|
||||
<v-chip
|
||||
close
|
||||
close-icon="mdi-delete"
|
||||
v-for="(keyword, idx) in keywords"
|
||||
:key="idx"
|
||||
@click:close="remove(idx)"
|
||||
>
|
||||
{{ keyword }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新关键词"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add(form.keyword)"
|
||||
@keyup.enter="add(form.keyword)"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['args'],
|
||||
data: function () {
|
||||
return {
|
||||
idx: this.$vnode.key,
|
||||
mode: "IN",
|
||||
form: {
|
||||
keyword: ""
|
||||
},
|
||||
keywords: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add(keyword) {
|
||||
if (keyword) {
|
||||
this.keywords.push(keyword);
|
||||
this.form.keyword = "";
|
||||
} else {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
|
||||
}
|
||||
},
|
||||
remove(idx) {
|
||||
this.keywords.splice(idx, 1);
|
||||
},
|
||||
save() {
|
||||
this.$emit("dataChanged", {
|
||||
idx: this.idx,
|
||||
args: this.keywords
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.keywords = this.args || [];
|
||||
},
|
||||
watch: {
|
||||
keywords() {
|
||||
this.save();
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -4,6 +4,12 @@
|
||||
<v-icon left color="primary">filter_list</v-icon>
|
||||
关键词过滤
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "KeywordRename"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
127
web/src/components/KeywordRenameOperator.vue
Normal file
127
web/src/components/KeywordRenameOperator.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">filter_list</v-icon>
|
||||
关键词重命名
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
关键词重命名
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
替换节点名中的关键词。
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
关键词
|
||||
<v-chip-group>
|
||||
<v-chip
|
||||
close
|
||||
close-icon="mdi-delete"
|
||||
v-for="(chip, idx) in chips"
|
||||
:key="idx"
|
||||
@click:close="remove(idx)"
|
||||
>
|
||||
{{ chip }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
placeholder="关键词"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
placeholder="替换为"
|
||||
solo
|
||||
v-model="form.replace"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add"
|
||||
@keyup.enter="add"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['args'],
|
||||
data: function () {
|
||||
return {
|
||||
idx: this.$vnode.key,
|
||||
mode: "IN",
|
||||
form: {
|
||||
keyword: "",
|
||||
replace: ""
|
||||
},
|
||||
keywords: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
chips() {
|
||||
return this.keywords.map(k => {
|
||||
const {old, now} = k;
|
||||
return `${old} ⇒ ${now}`;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
if (this.form.keyword && this.form.replace) {
|
||||
this.keywords.push({
|
||||
old: this.form.keyword,
|
||||
now: this.form.replace
|
||||
});
|
||||
this.form.keyword = "";
|
||||
this.form.replace = "";
|
||||
} else {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
|
||||
}
|
||||
},
|
||||
remove(idx) {
|
||||
this.keywords.splice(idx, 1);
|
||||
},
|
||||
save() {
|
||||
this.$emit("dataChanged", {
|
||||
idx: this.idx,
|
||||
args: this.keywords
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.keywords = this.args || [];
|
||||
},
|
||||
watch: {
|
||||
keywords() {
|
||||
this.save();
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -18,7 +18,7 @@
|
||||
关键词排序
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
根据给出的关键词的顺序对节点进行排序。
|
||||
根据给出的关键词的顺序对节点进行排序,没有出现的关键词将会按照正序排列。
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
105
web/src/components/RegexDeleteOperator.vue
Normal file
105
web/src/components/RegexDeleteOperator.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">code</v-icon>
|
||||
正则删除
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
正则删除
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
根据正则表达式删除节点名中的字段,注意正则表达式需要注意转义。
|
||||
<br/>这里是一个合法的正则表达式:
|
||||
<br/>
|
||||
<b>IEPL|IPLC</b>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
正则表达式
|
||||
<v-chip-group>
|
||||
<v-chip
|
||||
close
|
||||
close-icon="mdi-delete"
|
||||
v-for="(regex, idx) in regexps"
|
||||
:key="idx"
|
||||
@click:close="remove(idx)"
|
||||
>
|
||||
{{ regex }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新正则表达式"
|
||||
solo
|
||||
v-model="form.regex"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add(form.regex)"
|
||||
@keyup.enter="add(form.regex)"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['args'],
|
||||
data: function () {
|
||||
return {
|
||||
mode: "IN",
|
||||
form: {
|
||||
regex: ""
|
||||
},
|
||||
regexps: [],
|
||||
idx: this.$vnode.key,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add(keyword) {
|
||||
if (keyword) {
|
||||
this.regexps.push(keyword);
|
||||
this.form.regex = "";
|
||||
} else {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "正则表达式不能为空!");
|
||||
}
|
||||
},
|
||||
remove(idx) {
|
||||
this.regexps.splice(idx, 1);
|
||||
},
|
||||
save() {
|
||||
this.$emit("dataChanged", {
|
||||
idx: this.idx,
|
||||
args: this.regexps
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
regexps() {
|
||||
this.save();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.regexps = this.args || [];
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -4,6 +4,12 @@
|
||||
<v-icon left color="primary">code</v-icon>
|
||||
正则过滤
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "RegexRename"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
127
web/src/components/RegexRenameOperator.vue
Normal file
127
web/src/components/RegexRenameOperator.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">filter_list</v-icon>
|
||||
正则重命名
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
正则重命名
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
使用替换节点名中的字段。
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
正则表达式
|
||||
<v-chip-group>
|
||||
<v-chip
|
||||
close
|
||||
close-icon="mdi-delete"
|
||||
v-for="(chip, idx) in chips"
|
||||
:key="idx"
|
||||
@click:close="remove(idx)"
|
||||
>
|
||||
{{ chip }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
placeholder="关键词"
|
||||
solo
|
||||
v-model="form.regex"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
placeholder="替换为"
|
||||
solo
|
||||
v-model="form.replace"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add"
|
||||
@keyup.enter="add"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['args'],
|
||||
data: function () {
|
||||
return {
|
||||
idx: this.$vnode.key,
|
||||
mode: "IN",
|
||||
form: {
|
||||
regex: "",
|
||||
replace: ""
|
||||
},
|
||||
regexps: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
chips() {
|
||||
return this.regexps.map(k => {
|
||||
const {expr, now} = k;
|
||||
return `${expr} ⇒ ${now}`;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
if (this.form.regex && this.form.replace) {
|
||||
this.regexps.push({
|
||||
expr: this.form.regex,
|
||||
now: this.form.replace
|
||||
});
|
||||
this.form.regex = "";
|
||||
this.form.replace = "";
|
||||
} else {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
|
||||
}
|
||||
},
|
||||
remove(idx) {
|
||||
this.regexps.splice(idx, 1);
|
||||
},
|
||||
save() {
|
||||
this.$emit("dataChanged", {
|
||||
idx: this.idx,
|
||||
args: this.regexps
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.regexps = this.args || [];
|
||||
},
|
||||
watch: {
|
||||
regexps() {
|
||||
this.save();
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -4,6 +4,12 @@
|
||||
<v-icon left color="primary">flag</v-icon>
|
||||
区域过滤
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
@@ -82,7 +88,6 @@ export default {
|
||||
selection() {
|
||||
this.$emit("dataChanged", {
|
||||
idx: this.idx,
|
||||
type: "Region Filter",
|
||||
args: this.selection
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
<v-icon left color="primary">sort_by_alpha</v-icon>
|
||||
节点排序
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon>
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
@@ -28,13 +34,13 @@
|
||||
<v-radio-group v-model="mode">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-radio label="正序" value="ASC"/>
|
||||
<v-radio label="正序" value="asc"/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-radio label="逆序" value="DESC"/>
|
||||
<v-radio label="逆序" value="desc"/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-radio label="随机" value="RANDOM"/>
|
||||
<v-radio label="随机" value="random"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-radio-group>
|
||||
@@ -44,11 +50,25 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ["args"],
|
||||
data: function () {
|
||||
return {
|
||||
mode: "ASC"
|
||||
idx: this.$vnode.key,
|
||||
mode: "asc"
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.mode = this.args;
|
||||
},
|
||||
watch: {
|
||||
mode() {
|
||||
this.$emit("dataChanged", {
|
||||
idx: this.idx,
|
||||
args: this.mode
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
<v-icon left color="primary">cloud_circle</v-icon>
|
||||
节点类型过滤
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('up', idx)">
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('down', idx)">
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click="$emit('deleteProcess', idx)">
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
|
||||
Reference in New Issue
Block a user