feat: 一键编辑标签下渠道重定向
This commit is contained in:
@@ -691,7 +691,7 @@ const ChannelsTable = () => {
|
||||
}
|
||||
setSearching(true);
|
||||
const res = await API.get(
|
||||
`/api/channel/search?keyword=${searchKeyword}&group=${searchGroup}&model=${searchModel}`
|
||||
`/api/channel/search?keyword=${searchKeyword}&group=${searchGroup}&model=${searchModel}&id_sort=${idSort}`
|
||||
);
|
||||
const { success, message, data } = res.data;
|
||||
if (success) {
|
||||
|
||||
@@ -8,7 +8,8 @@ const EditTagModal = (props) => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const originInputs = {
|
||||
tag: '',
|
||||
newTag: null,
|
||||
new_tag: null,
|
||||
model_mapping: null,
|
||||
}
|
||||
const [inputs, setInputs] = useState(originInputs);
|
||||
|
||||
@@ -18,11 +19,13 @@ const EditTagModal = (props) => {
|
||||
let data = {
|
||||
tag: tag,
|
||||
}
|
||||
let shouldSave = true;
|
||||
if (inputs.newTag === tag) {
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
if (inputs.model_mapping !== null) {
|
||||
data.model_mapping = inputs.model
|
||||
}
|
||||
data.newTag = inputs.newTag;
|
||||
if (data.newTag === '') {
|
||||
Modal.confirm({
|
||||
@@ -80,8 +83,8 @@ const EditTagModal = (props) => {
|
||||
<TextInput
|
||||
label="新标签(留空则解散标签,不会删除标签下的渠道)"
|
||||
name="newTag"
|
||||
value={inputs.newTag}
|
||||
onChange={(value) => setInputs({ ...inputs, newTag: value })}
|
||||
value={inputs.new_tag}
|
||||
onChange={(value) => setInputs({ ...inputs, new_tag: value })}
|
||||
placeholder="请输入新标签"
|
||||
/>
|
||||
</Spin>
|
||||
|
||||
Reference in New Issue
Block a user