|
@@ -133,23 +133,15 @@ const handleSelect = (item) => {
|
|
const initIndex = () => {
|
|
const initIndex = () => {
|
|
state.loadingIndex = true
|
|
state.loadingIndex = true
|
|
sysLabelGetAllIndexsByKey().then(res => {
|
|
sysLabelGetAllIndexsByKey().then(res => {
|
|
- if (res.code === 200) {
|
|
|
|
- state.indexList = res.data
|
|
|
|
- state.loadingIndex = false
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
- }
|
|
|
|
|
|
+ state.indexList = res.data
|
|
|
|
+ state.loadingIndex = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
const initRelation = () => {
|
|
const initRelation = () => {
|
|
state.query.loading = true
|
|
state.query.loading = true
|
|
sysThemeIndexFindAll(props.transfer.id).then(res => {
|
|
sysThemeIndexFindAll(props.transfer.id).then(res => {
|
|
- if (res.code === 200) {
|
|
|
|
- state.query.result.data = res.data
|
|
|
|
- state.query.loading = false
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
- }
|
|
|
|
|
|
+ state.query.result.data = res.data
|
|
|
|
+ state.query.loading = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
const onMain = (row) => {
|
|
const onMain = (row) => {
|
|
@@ -195,29 +187,21 @@ const onDel = (row) => {
|
|
} as any).then(() => {
|
|
} as any).then(() => {
|
|
state.loading = true
|
|
state.loading = true
|
|
sysThemeIndexDelete(row.id).then(res => {
|
|
sysThemeIndexDelete(row.id).then(res => {
|
|
- if (res.code === 200) {
|
|
|
|
- ElMessage.success('删除成功!')
|
|
|
|
- emit('refresh')
|
|
|
|
- state.loading = false
|
|
|
|
- initRelation()
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
- }
|
|
|
|
|
|
+ ElMessage.success('删除成功!')
|
|
|
|
+ emit('refresh')
|
|
|
|
+ state.loading = false
|
|
|
|
+ initRelation()
|
|
})
|
|
})
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
}
|
|
}
|
|
const initDetail = () => {
|
|
const initDetail = () => {
|
|
state.loading = true
|
|
state.loading = true
|
|
sysThemeFind(props.transfer.id).then(res => {
|
|
sysThemeFind(props.transfer.id).then(res => {
|
|
- if (res.code === 200) {
|
|
|
|
- state.form = res.data
|
|
|
|
- if (state.form.themeType == '2') {
|
|
|
|
- state.form.themeParam = state.form.themeParam.split(',')
|
|
|
|
- }
|
|
|
|
- state.loading = false
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error(res.msg)
|
|
|
|
|
|
+ state.form = res.data
|
|
|
|
+ if (state.form.themeType == '2') {
|
|
|
|
+ state.form.themeParam = state.form.themeParam.split(',')
|
|
}
|
|
}
|
|
|
|
+ state.loading = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
watch(() => props.show, (n) => {
|
|
watch(() => props.show, (n) => {
|