Commit 5cfd559d authored by 邓春圆's avatar 邓春圆

添加查看渠道

parent 82e4d334
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form :disabled="isView" ref="form" :model="form" :rules="rules" label-width="120px">
<el-card shadow="never">
<div slot="header" class="clearfix">
<span>{{ $t('渠道信息') }}</span>
......@@ -178,7 +178,7 @@
<!-- </el-card>-->
</el-form>
<div>
<el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
<el-button v-if="!isView" type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
<el-button @click="$router.back()">{{ $t('返回列表') }}</el-button>
</div>
<el-dialog
......@@ -249,6 +249,7 @@ export default {
} */
},
mounted() {
console.log(this.$route,'rotue')
getTradeCountryList().then(r => {
this.countryList = r.data
})
......@@ -296,6 +297,9 @@ export default {
},
computed: {
isView(){
return this.$route.path.includes('view_channel')
},
DICT_TYPE() {
return DICT_TYPE
},
......
......@@ -129,6 +129,9 @@
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:channel:update']">{{ $t('修改') }}
</el-button>
<el-button size="mini" type="text" icon="el-icon-view" @click="handleUpdate(scope.row,2)"
v-hasPermi="['ecw:channel:view']">{{ $t('查看') }}
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:channel:delete']">{{ $t('删除') }}
......@@ -244,8 +247,12 @@ export default {
return this.$router.push('create_channel')
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate(row, type = 1) {
if (type === 1) {
return this.$router.push('edit_channel?id=' + row.channelId)
} else {
return this.$router.push('view_channel?id=' + row.channelId)
}
},
/** 删除按钮操作 */
......
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