Commit e41eeacc by 林家欣

后台新增预览功能

parent 3380b42e
...@@ -158,7 +158,7 @@ ...@@ -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>
<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')" /> <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: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> <el-button v-if="isAuth('application:news:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -295,7 +295,20 @@ export default { ...@@ -295,7 +295,20 @@ export default {
selectionChangeHandle (val) { selectionChangeHandle (val) {
this.dataListSelections = 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) { addOrUpdateHandle (id, showInfo) {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true
this.$nextTick(() => { this.$nextTick(() => {
......
...@@ -269,13 +269,8 @@ export default { ...@@ -269,13 +269,8 @@ export default {
}) })
}, },
showMsg (data) { showMsg (data) {
if (!data.directpath || data.directpath === null) { console.log(data, 'datadatadata');
window.open(this.$store.state.config.urls + '/home?id=' + data.id, '_blank') window.open(`${this.$store.state.config.urls}/home?indexCarouselManageId=${data.id}`, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
......
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
v-if="isAuth('standard:cases:info')" v-if="isAuth('standard:cases:info')"
type="text" type="text"
size="small" size="small"
@click="addOrUpdateHandle(scope.row.id, true)" @click="previewHandle(scope.row)"
>预览</el-button >预览</el-button
> >
<el-button <el-button
...@@ -390,6 +390,19 @@ export default { ...@@ -390,6 +390,19 @@ export default {
selectionChangeHandle(val) { selectionChangeHandle(val) {
this.dataListSelections = 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) { addOrUpdateHandle(id, showInfo) {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
v-if="isAuth('standard:partners:info')" v-if="isAuth('standard:partners:info')"
type="text" type="text"
size="small" size="small"
@click="addOrUpdateHandle(scope.row.id, true)" @click="previewHandle(scope.row)"
>预览</el-button >预览</el-button
> >
<el-button <el-button
...@@ -437,6 +437,20 @@ export default { ...@@ -437,6 +437,20 @@ export default {
selectionChangeHandle(val) { selectionChangeHandle(val) {
this.dataListSelections = 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) { addOrUpdateHandle(id, showInfo) {
this.addOrUpdateVisible = true; 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