修改栏目预览地址

This commit is contained in:
jacky 2024-04-19 19:24:58 +08:00
parent 80d18f2b83
commit 756582f45a
2 changed files with 3 additions and 11 deletions

View File

@ -121,8 +121,8 @@
</div> </div>
<div class="flex md-2"> <div class="flex md-2">
<el-button v-auth="btnAuth.edit" <el-button v-auth="btnAuth.edit"
:type="scope.row.status === 1 || scope.row.status === 5 ? 'primary' : 'info'" link icon="edit" :type="scope.row.status === 1 || scope.row.status === 5 || scope.row.status === 3 ? 'primary' : 'info'"
:disabled="scope.row.status === 4 || scope.row.status === 2" link icon="edit" :disabled="scope.row.status === 4 || scope.row.status === 2"
@click="handleRowEdit(scope.row.ID)">编辑</el-button> @click="handleRowEdit(scope.row.ID)">编辑</el-button>
</div> </div>
<div class="flex md-2"> <div class="flex md-2">
@ -523,18 +523,10 @@ const getChannelData = async valid => {
initOptions(res.data.channelTree, channelOptions.value, false) initOptions(res.data.channelTree, channelOptions.value, false)
} }
} }
const getSourceData = async valid => {
channelOptions.value = []
const res = await getSourceList({ page: 1, pageSize: 999 })
if (res.code === 0) {
res.data.list && res.data.list.map(item => item.name)
}
}
const setOptions = () => { const setOptions = () => {
getCategoryData() getCategoryData()
getChannelData() getChannelData()
getSourceData()
} }
setOptions() setOptions()

View File

@ -12,7 +12,7 @@
<el-table-column align="left" label="标题" min-width="120" prop="title" /> <el-table-column align="left" label="标题" min-width="120" prop="title" />
<el-table-column align="left" label="预览" min-width="120" prop="preview"> <el-table-column align="left" label="预览" min-width="120" prop="preview">
<template #default="scope"> <template #default="scope">
<el-link type="primary" :href="'http://w1.zkzk.org.cn/channel/' + scope.row.ID + '.htm'" <el-link type="primary" :href="'http://w1.zkzk.org.cn/channel/' + scope.row.ID + '.html'"
target="_blank">预览</el-link> target="_blank">预览</el-link>
</template> </template>
</el-table-column> </el-table-column>