|
@@ -1,38 +1,21 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="ma-content-block">
|
|
<div class="ma-content-block">
|
|
|
- <sa-table
|
|
|
|
|
- ref="crudRef"
|
|
|
|
|
- :options="options"
|
|
|
|
|
- :columns="columns"
|
|
|
|
|
- :searchForm="searchForm"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
|
|
|
<!-- 搜索区 tableSearch -->
|
|
<!-- 搜索区 tableSearch -->
|
|
|
<template #tableSearch>
|
|
<template #tableSearch>
|
|
|
<a-col :sm="8" :xs="24">
|
|
<a-col :sm="8" :xs="24">
|
|
|
<a-form-item label="媒体id" field="id">
|
|
<a-form-item label="媒体id" field="id">
|
|
|
- <a-input
|
|
|
|
|
- v-model="searchForm.id"
|
|
|
|
|
- placeholder="请输入媒体id"
|
|
|
|
|
- allow-clear
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <a-input v-model="searchForm.id" placeholder="请输入媒体id" allow-clear />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :sm="8" :xs="24">
|
|
<a-col :sm="8" :xs="24">
|
|
|
<a-form-item label="媒体名称" field="name">
|
|
<a-form-item label="媒体名称" field="name">
|
|
|
- <a-input
|
|
|
|
|
- v-model="searchForm.name"
|
|
|
|
|
- placeholder="请输入媒体名称"
|
|
|
|
|
- allow-clear
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <a-input v-model="searchForm.name" placeholder="请输入媒体名称" allow-clear />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :sm="8" :xs="24">
|
|
<a-col :sm="8" :xs="24">
|
|
|
<a-form-item label="媒体渠道简称" field="channel_name">
|
|
<a-form-item label="媒体渠道简称" field="channel_name">
|
|
|
- <a-input
|
|
|
|
|
- v-model="searchForm.channel_name"
|
|
|
|
|
- placeholder="请输入媒体渠道简称"
|
|
|
|
|
- allow-clear
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <a-input v-model="searchForm.channel_name" placeholder="请输入媒体渠道简称" allow-clear />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</template>
|
|
</template>
|
|
@@ -46,22 +29,22 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { onMounted, ref, reactive } from "vue";
|
|
|
|
|
-import { Message } from "@arco-design/web-vue";
|
|
|
|
|
-import EditForm from "./edit.vue";
|
|
|
|
|
-import api from "../../api/advert/mediaList";
|
|
|
|
|
|
|
+import { onMounted, ref, reactive } from 'vue'
|
|
|
|
|
+import { Message } from '@arco-design/web-vue'
|
|
|
|
|
+import EditForm from './edit.vue'
|
|
|
|
|
+import api from '../../api/advert/mediaList'
|
|
|
|
|
|
|
|
// 引用定义
|
|
// 引用定义
|
|
|
-const crudRef = ref();
|
|
|
|
|
-const editRef = ref();
|
|
|
|
|
-const viewRef = ref();
|
|
|
|
|
|
|
+const crudRef = ref()
|
|
|
|
|
+const editRef = ref()
|
|
|
|
|
+const viewRef = ref()
|
|
|
|
|
|
|
|
// 搜索表单
|
|
// 搜索表单
|
|
|
const searchForm = ref({
|
|
const searchForm = ref({
|
|
|
- id: "",
|
|
|
|
|
- name: "",
|
|
|
|
|
- channel_name: "",
|
|
|
|
|
-});
|
|
|
|
|
|
|
+ id: '',
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ channel_name: '',
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
// SaTable 基础配置
|
|
// SaTable 基础配置
|
|
|
const options = reactive({
|
|
const options = reactive({
|
|
@@ -69,61 +52,65 @@ const options = reactive({
|
|
|
rowSelection: { showCheckedAll: true },
|
|
rowSelection: { showCheckedAll: true },
|
|
|
add: {
|
|
add: {
|
|
|
show: true,
|
|
show: true,
|
|
|
- auth: ["/v1/advert/MediaList/save"],
|
|
|
|
|
|
|
+ auth: ['/v1/advert/MediaList/save'],
|
|
|
func: async () => {
|
|
func: async () => {
|
|
|
- editRef.value?.open();
|
|
|
|
|
|
|
+ editRef.value?.open()
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
edit: {
|
|
edit: {
|
|
|
show: true,
|
|
show: true,
|
|
|
- auth: ["/v1/advert/MediaList/update"],
|
|
|
|
|
|
|
+ auth: ['/v1/advert/MediaList/update'],
|
|
|
func: async (record) => {
|
|
func: async (record) => {
|
|
|
- editRef.value?.open("edit");
|
|
|
|
|
- editRef.value?.setFormData(record);
|
|
|
|
|
|
|
+ editRef.value?.open('edit')
|
|
|
|
|
+ editRef.value?.setFormData(record)
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
delete: {
|
|
delete: {
|
|
|
show: true,
|
|
show: true,
|
|
|
- auth: ["/v1/advert/MediaList/destroy"],
|
|
|
|
|
|
|
+ auth: ['/v1/advert/MediaList/destroy'],
|
|
|
func: async (params) => {
|
|
func: async (params) => {
|
|
|
- const resp = await api.destroy(params);
|
|
|
|
|
|
|
+ const resp = await api.destroy(params)
|
|
|
if (resp.code === 200) {
|
|
if (resp.code === 200) {
|
|
|
- Message.success(`删除成功!`);
|
|
|
|
|
- crudRef.value?.refresh();
|
|
|
|
|
|
|
+ Message.success(`删除成功!`)
|
|
|
|
|
+ crudRef.value?.refresh()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
-});
|
|
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
// SaTable 列配置
|
|
// SaTable 列配置
|
|
|
const columns = reactive([
|
|
const columns = reactive([
|
|
|
- { title: "媒体id", dataIndex: "id", width: 180 },
|
|
|
|
|
- { title: "媒体名称", dataIndex: "name", width: 180 },
|
|
|
|
|
- { title: "媒体渠道简称", dataIndex: "channel_name", width: 180 },
|
|
|
|
|
- { title: "安卓监测链接", dataIndex: "andurl", width: 180 },
|
|
|
|
|
- { title: "ios监测链接", dataIndex: "iosurl", width: 180 },
|
|
|
|
|
- { title: "小游戏监测链接", dataIndex: "xyxurl", width: 180 },
|
|
|
|
|
- { title: "小游戏路径参数补充", dataIndex: "appleturl", width: 180 },
|
|
|
|
|
|
|
+ { title: '媒体id', dataIndex: 'id', width: 180 },
|
|
|
|
|
+ { title: '媒体名称', dataIndex: 'name', width: 180 },
|
|
|
|
|
+ { title: '媒体渠道简称', dataIndex: 'channel_name', width: 180 },
|
|
|
|
|
+ { title: '安卓监测链接', dataIndex: 'andurl', width: 180 },
|
|
|
|
|
+ { title: 'ios监测链接', dataIndex: 'iosurl', width: 180 },
|
|
|
|
|
+ { title: '小游戏监测链接', dataIndex: 'xyxurl', width: 180 },
|
|
|
|
|
+ { title: '小游戏路径参数补充', dataIndex: 'appleturl', width: 180 },
|
|
|
{
|
|
{
|
|
|
- title: "状态",
|
|
|
|
|
- dataIndex: "status",
|
|
|
|
|
- type: "dict",
|
|
|
|
|
- dict: "nomal_or_stop",
|
|
|
|
|
|
|
+ title: '状态',
|
|
|
|
|
+ dataIndex: 'status',
|
|
|
|
|
+ type: 'dict',
|
|
|
|
|
+ dict: 'nomal_or_stop',
|
|
|
width: 120,
|
|
width: 120,
|
|
|
},
|
|
},
|
|
|
-]);
|
|
|
|
|
|
|
+])
|
|
|
|
|
|
|
|
// 页面数据初始化
|
|
// 页面数据初始化
|
|
|
-const initPage = async () => {};
|
|
|
|
|
|
|
+const initPage = async () => {}
|
|
|
|
|
|
|
|
// SaTable 数据请求
|
|
// SaTable 数据请求
|
|
|
const refresh = async () => {
|
|
const refresh = async () => {
|
|
|
- crudRef.value?.refresh();
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ crudRef.value?.refresh()
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
// 页面加载完成执行
|
|
// 页面加载完成执行
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
- initPage();
|
|
|
|
|
- refresh();
|
|
|
|
|
-});
|
|
|
|
|
|
|
+ initPage()
|
|
|
|
|
+ refresh()
|
|
|
|
|
+})
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+export default { name: 'v1/advert/mediaList' }
|
|
|
</script>
|
|
</script>
|