|
|
@@ -6,8 +6,9 @@ |
|
|
|
<template #search> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.text" style="width: 200px;" |
|
|
|
placeholder="请输入文本内容" /> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.businessType" style="width: 200px;" |
|
|
|
placeholder="请输入业务类型" /> |
|
|
|
<el-select clearable v-model="searchForm.businessType" style="width: 200px;" placeholder="请选择业务类型"> |
|
|
|
<el-option v-for="item in BUSINESS_TYPE" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.title" style="width: 200px;" |
|
|
|
placeholder="请输入题目" /> |
|
|
|
</template> |
|
|
@@ -35,6 +36,12 @@ const searchForm = ref({ |
|
|
|
businessType: '', |
|
|
|
title: '', |
|
|
|
}) |
|
|
|
|
|
|
|
// 业务类型字典 |
|
|
|
const BUSINESS_TYPE = computed(() => { |
|
|
|
return $storeinitData.state.dictData['BUSINESS_TYPE'] || [] |
|
|
|
}) |
|
|
|
|
|
|
|
let tableData: any = ref([]); |
|
|
|
const typeOption = ref(""); |
|
|
|
const ChannelType = ref([]) |
|
|
@@ -55,7 +62,7 @@ function handleEdit(idx: any, row: any) { |
|
|
|
// 删除按钮 |
|
|
|
function handleDelete(idx: any, row: any) { |
|
|
|
const data = toRaw(row); |
|
|
|
BaseService.post('/managew/prompttext/delete', { id: data.id }).then((res: any) => { |
|
|
|
BaseService.post('/managew/api/operation/promptText/delete', { id: data.id }).then((res: any) => { |
|
|
|
if (res && res.code === 0) { |
|
|
|
ElMessage.success("操作成功"); |
|
|
|
getList(); |
|
|
@@ -95,9 +102,9 @@ function refreshLeft() { |
|
|
|
|
|
|
|
//编辑与添加提交 |
|
|
|
function submit(data: any) { |
|
|
|
let api = '/managew/prompttext/add' |
|
|
|
let api = '/managew/api/operation/promptText/add' |
|
|
|
if (typeOption.value === 'edit') { |
|
|
|
api = '/managew/prompttext/update' |
|
|
|
api = '/managew/api/operation/promptText/update' |
|
|
|
} |
|
|
|
BaseService.post(api, data).then((res: any) => { |
|
|
|
if (res && res.code === 0) { |
|
|
@@ -122,11 +129,11 @@ function getList() { |
|
|
|
params[key] = searchFormList[key] |
|
|
|
} |
|
|
|
} |
|
|
|
BaseService.post('/managew/prompttext/page', params).then((res: any) => { |
|
|
|
BaseService.post('/managew/api/operation/promptText/page', params).then((res: any) => { |
|
|
|
if (res && res.code === 0) { |
|
|
|
//数据转换 |
|
|
|
let bizContent = res.data |
|
|
|
let data = bizContent.data || []; |
|
|
|
let data = bizContent.result || []; |
|
|
|
//数据渲染 |
|
|
|
tableData.value = data; |
|
|
|
crudRef.value.tableLoding = false; |
|
|
@@ -183,13 +190,16 @@ let formLabelWidth = '150px' |
|
|
|
//表单数据配置 |
|
|
|
let field = ref({ |
|
|
|
border: true, //是否添加边框(默认false) |
|
|
|
searchShow: IsPermission(route, 'QUERY_BASE'), //搜索展示 |
|
|
|
// searchShow: IsPermission(route, 'QUERY_BASE'), //搜索展示 |
|
|
|
searchShow: true, //搜索展示 |
|
|
|
operateWidth: '250px', //操作栏宽度 |
|
|
|
paginStart: true, //是否显示分页查询 (默认false) |
|
|
|
operateTitle: '操作', //操作栏标题(默认为"") |
|
|
|
operate: { |
|
|
|
edit: IsPermission(route, 'EDIT_LIST'), //是否编辑(默认true) |
|
|
|
delete: IsPermission(route, 'DEL_LIST'), //是否删除(默认true) |
|
|
|
// edit: IsPermission(route, 'EDIT_LIST'), //是否编辑(默认true) |
|
|
|
// delete: IsPermission(route, 'DEL_LIST'), //是否删除(默认true) |
|
|
|
edit: true, //是否编辑(默认true) |
|
|
|
delete: true, //是否删除(默认true) |
|
|
|
info: false, // 详情 |
|
|
|
remark: false, // 详情 |
|
|
|
announcement: false, // 公告 |
|
|
@@ -199,7 +209,8 @@ let field = ref({ |
|
|
|
cancel: false,// 取消订单 |
|
|
|
}, |
|
|
|
crud: { |
|
|
|
add: IsPermission(route, 'ADD_BASE'), |
|
|
|
// add: IsPermission(route, 'ADD_BASE'), |
|
|
|
add: true, |
|
|
|
}, |
|
|
|
tableSize: -1, |
|
|
|
paging: { |
|
|
@@ -252,11 +263,13 @@ let field = ref({ |
|
|
|
{ |
|
|
|
prop: "businessType", |
|
|
|
label: "业务类型", |
|
|
|
listData: BUSINESS_TYPE, |
|
|
|
form: { |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
type: 'select', |
|
|
|
required: true, |
|
|
|
formLabelWidth |
|
|
|
formLabelWidth, |
|
|
|
listData: BUSINESS_TYPE |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |