|
@@ -4,16 +4,6 @@
|
|
|
<el-form-item label="广告主名称">
|
|
|
<el-input v-model="pages.keyword" placeholder="输入广告主关键词" clearable />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="状态">
|
|
|
- <el-select filterable clearable v-model="pages.status" style="width: 200px">
|
|
|
- <el-option
|
|
|
- v-for="item in statusList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSubmit">搜索</el-button>
|
|
|
<el-button type="primary" link @click="() => creatEditPlan()">创建广告主</el-button>
|
|
@@ -25,12 +15,6 @@
|
|
|
<el-table-column prop="enterpriseBrand" label="品牌" />
|
|
|
<el-table-column prop="enterpriseContacts" label="联系人" />
|
|
|
<el-table-column prop="enterpriseTel" label="联系电话" />
|
|
|
- <el-table-column label="状态" width="60">
|
|
|
- <template #default="scope">
|
|
|
- <el-tag v-if="scope.row.status == 10" type="success">启用</el-tag>
|
|
|
- <el-tag v-if="scope.row.status == 6" type="danger">禁用</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
|
|
|
<el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
@@ -45,37 +29,6 @@
|
|
|
<el-button link type="primary" size="small" @click="() => creatEditPlan(scope.row)">
|
|
|
修改
|
|
|
</el-button>
|
|
|
-
|
|
|
- <el-popconfirm
|
|
|
- v-if="scope.row.status == 6"
|
|
|
- @confirm="
|
|
|
- () =>
|
|
|
- updateAdvertiserStatus({
|
|
|
- id: scope.row.advertiserId,
|
|
|
- status: 10,
|
|
|
- }).then(() => onSubmit())
|
|
|
- "
|
|
|
- title="确定启用该广告主吗?"
|
|
|
- >
|
|
|
- <template #reference>
|
|
|
- <el-button link type="primary" size="small"> 启用 </el-button>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
- <el-popconfirm
|
|
|
- v-if="scope.row.status == 10"
|
|
|
- @confirm="
|
|
|
- () =>
|
|
|
- updateAdvertiserStatus({
|
|
|
- id: scope.row.advertiserId,
|
|
|
- status: 6,
|
|
|
- }).then(() => onSubmit())
|
|
|
- "
|
|
|
- title="确定禁用该广告主吗?"
|
|
|
- >
|
|
|
- <template #reference>
|
|
|
- <el-button link type="primary" size="small"> 禁用 </el-button>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -117,12 +70,11 @@ import type { Advertiser } from '@/types/Advertiser'
|
|
|
import {
|
|
|
getAdvertiserList,
|
|
|
deleteAdvertiser,
|
|
|
- updateAdvertiserStatus,
|
|
|
updateAdvertiser,
|
|
|
createAdvertiser,
|
|
|
} from '@/api/index'
|
|
|
import { ref } from 'vue'
|
|
|
-import { statusList } from '@/tool'
|
|
|
+// import { statusList } from '@/tool'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
const pages = ref<Pages>({
|
|
|
pageNum: 1,
|