|
@@ -66,20 +66,29 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="index" label="序号" align="center" />
|
|
|
- <el-table-column label="标题名称" align="center" key="title" prop="title" v-if="columns[0].visible" />
|
|
|
+ <el-table-column label="标题名称" align="center" key="title" prop="title" v-if="columns[0].visible">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tooltip class="item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
+ <div style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
|
|
+ <span style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ scope.row.title }}</span>
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="发布时间" align="center" key="releaseTime" prop="releaseTime" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="上/下架状态" align="center" key="status" v-if="columns[2].visible">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch
|
|
|
- v-model="scope.row.status"
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#ccc"
|
|
|
+ <switchBox
|
|
|
+ :defaultChecked="true"
|
|
|
+ v-model="scope.row.status"
|
|
|
+ @changeFun="handleRelease(scope.row)"
|
|
|
+ :disabled="false"
|
|
|
:active-value="2"
|
|
|
:inactive-value="1"
|
|
|
- ></el-switch>
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="发布人" align="center" key="releaseBy" prop="releaseBy" v-if="columns[3].visible" width="120" />
|
|
|
+ <el-table-column label="发布人" align="center" key="releaseBy" prop="releaseBy" v-if="columns[3].visible" />
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
@@ -87,14 +96,6 @@
|
|
|
class-name="small-padding fixed-width"
|
|
|
>
|
|
|
<template slot-scope="scope" v-if="scope.row.id !== 1">
|
|
|
- <el-button
|
|
|
- v-if="false"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-document"
|
|
|
- @click="handleDetails(scope.row)"
|
|
|
- v-hasPermi="configPermi.details"
|
|
|
- >详情</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -136,6 +137,7 @@
|
|
|
import {
|
|
|
listTableApi,
|
|
|
delTableParamsApi,
|
|
|
+ publicByPutApi as releaseApi
|
|
|
} from "@/api/CURD";
|
|
|
import addAndEdit from "./formBox/tourismStrategyForm.vue"
|
|
|
import detailsBox from "./detailsBox/navigationManagementDetails.vue"
|
|
@@ -153,6 +155,7 @@ export default {
|
|
|
edit: ['system:user:edit'], // 编辑权限
|
|
|
upload: ['system:user:upload'],// 导入权限
|
|
|
export: ['system:user:export'],// 导出权限
|
|
|
+ release: ['system:user:release']
|
|
|
},
|
|
|
configUrl: {
|
|
|
list: '/merchant/merchantIntroduction/pageList', // 列表地址
|
|
@@ -160,6 +163,7 @@ export default {
|
|
|
upload: '',// 导入地址
|
|
|
download:'', // 下载模板地址
|
|
|
export: '',// 导出地址
|
|
|
+ release: '/merchant/merchantIntroduction/updateStatus',// 上下线接口
|
|
|
},
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
@@ -253,7 +257,7 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除用户编号为"' + ids + '"的数据项?').then( () => {
|
|
|
+ this.$modal.confirm('是否确认删除编号为"' + ids + '"的数据项?').then( () => {
|
|
|
return delTableParamsApi(this.configUrl.delect,{
|
|
|
id: ids
|
|
|
});
|
|
@@ -284,6 +288,21 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ /** 开/闭 园 */
|
|
|
+ handleRelease(row) {
|
|
|
+ const ids = row.id;
|
|
|
+ this.$modal.confirm(`是否确认${row.status == 1 ? '上架' : '下架'}编号为"${ids}"的数据项?`).then( () => {
|
|
|
+ return releaseApi(this.configUrl.release,{
|
|
|
+ id: ids,
|
|
|
+ status: row.status == 1 ? 2 : 1
|
|
|
+ });
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess(`${row.status == 1 ? '上架' : '下架'}成功`);
|
|
|
+ }).catch((e) => {
|
|
|
+ console.error("发布失败====",e)
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|