Commit e41eeacc by 林家欣

后台新增预览功能

parent 3380b42e
......@@ -158,7 +158,7 @@
<el-button v-if="isAuth('application:news:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('application:news:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('application:news:check')" />
<el-button v-if="isAuth('application:news:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button>
<el-button v-if="isAuth('application:news:info')" type="text" size="small" @click="previewHandle(scope.row)">预览</el-button>
<el-button v-if="isAuth('application:news:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('application:news:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
......@@ -295,6 +295,19 @@ export default {
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 预览
previewHandle (info) {
console.log(info, '预览');
let url;
if (!info.directpath || info.directpath === null) {
url = `${this.$store.state.config.urls}/News/msg?id=${info.id}`;
} else if (/^\//.test(info.directpath)) {
url = `${this.$store.state.config.urls}${info.directpath}`;
} else {
url = info.directpath;
}
window.open(url, '_blank');
},
// 新增 / 修改
addOrUpdateHandle (id, showInfo) {
this.addOrUpdateVisible = true
......
......@@ -269,13 +269,8 @@ export default {
})
},
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/home?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
console.log(data, 'datadatadata');
window.open(`${this.$store.state.config.urls}/home?indexCarouselManageId=${data.id}`, '_blank')
},
// 删除
deleteHandle (id) {
......
......@@ -209,7 +209,7 @@
v-if="isAuth('standard:cases:info')"
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id, true)"
@click="previewHandle(scope.row)"
>预览</el-button
>
<el-button
......@@ -390,6 +390,19 @@ export default {
selectionChangeHandle(val) {
this.dataListSelections = val;
},
// 预览
previewHandle (info) {
console.log(info, '预览');
let url;
if (!info.directpath || info.directpath === null) {
url = `${this.$store.state.config.urls}/Service/Partners/caseMsg?id=${info.id}`;
} else if (/^\//.test(info.directpath)) {
url = `${this.$store.state.config.urls}${info.directpath}`;
} else {
url = info.directpath;
}
window.open(url, '_blank');
},
// 新增 / 修改
addOrUpdateHandle(id, showInfo) {
this.addOrUpdateVisible = true;
......
......@@ -232,7 +232,7 @@
v-if="isAuth('standard:partners:info')"
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id, true)"
@click="previewHandle(scope.row)"
>预览</el-button
>
<el-button
......@@ -437,6 +437,20 @@ export default {
selectionChangeHandle(val) {
this.dataListSelections = val;
},
// 预览
previewHandle (info) {
console.log(info, '预览');
let url;
if (!info.directpath || info.directpath === null) {
url = `${this.$store.state.config.urls}/Service/Partners/content?id=${info.id}`;
} else if (/^\//.test(info.directpath)) {
url = `${this.$store.state.config.urls}${info.directpath}`;
} else {
url = info.directpath;
}
window.open(url, '_blank');
},
// 新增 / 修改
addOrUpdateHandle(id, showInfo) {
this.addOrUpdateVisible = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment