Merge pull request 'fix : 屏蔽话务语音配置的批量删除, 修复所有页面按钮权限' (#146) from dj into master
Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/146
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
// 获取参数配置表详情
|
||||
export const getConfigDetails = (configId,extraConfigType) => {
|
||||
export const getConfigDetails = (configId) => {
|
||||
return request({
|
||||
url: `/extra/config/${configId}/${extraConfigType}`,
|
||||
url: `/extra/config/${configId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -27,9 +27,9 @@ export const editConfig = (data) => {
|
||||
}
|
||||
|
||||
// 删除参数配置表
|
||||
export const delConfig =(configIdList,extraConfigType) => {
|
||||
export const delConfig =(configIdList) => {
|
||||
return request({
|
||||
url: `/extra/config/${configIdList}/${extraConfigType}`,
|
||||
url: `/extra/config/${configIdList}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ const infoLiveCallRef = ref()
|
||||
const voiceRef = ref()
|
||||
const tableIns = ref()
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
record: ['order:dialogue:list'],
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
@@ -97,21 +97,26 @@ const tableConfig = reactive({
|
||||
currentRender: ({ row, index }) => {
|
||||
// console.log(row);
|
||||
let btn = []
|
||||
btn.push({ label: '播放语音', prem: auths.detail, func: () => handleVoice(row), type: 'primary' })
|
||||
btn.push({ label: '通话记录', prem: auths.detail, func: () => handleInfo(row), type: 'primary' })
|
||||
btn.push({ label: '播放语音', func: () => handleVoice(row), type: 'primary' })
|
||||
btn.push({ label: '通话记录', prem: auths.record, func: () => handleInfo(row), type: 'primary' })
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<>
|
||||
item.prem?
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link>
|
||||
{item.label}
|
||||
</el-button>
|
||||
</>
|
||||
: <el-button
|
||||
type={item.type}
|
||||
onClick={() => item.func()}
|
||||
link>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div >
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {addContact, editContact, getContactDetail, deleteContact} from "@/api/address-book";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {reactive} from "vue";
|
||||
|
||||
const router = useRouter()
|
||||
const tableIns = ref()
|
||||
@@ -152,6 +153,11 @@ const searchConfig = reactive([
|
||||
component: 'el-input',
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['order:contacts:add'],
|
||||
edit: ['order:contacts:edit'],
|
||||
delete: ['order:contacts:del'],
|
||||
})
|
||||
const addressBookTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -207,15 +213,15 @@ const addressBookTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete,func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -231,8 +237,8 @@ const addressBookTableConfig = reactive({
|
||||
api: '/contact/list',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add', type: 'primary'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add', type: 'primary' , auth: auths.add},
|
||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const searchAddressBook = (val) => {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import {reactive, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addConfig, delConfig, editConfig, getConfigDetails} from "@/api/phone-traffic-config";
|
||||
@@ -131,12 +131,17 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['extra:config:add'],
|
||||
edit: ['extra:config:edit'],
|
||||
delete: ['extra:config:del'],
|
||||
})
|
||||
const phoneTrafficTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
// {
|
||||
// type: 'selection',
|
||||
// prop: 'selection'
|
||||
// },
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
@@ -191,15 +196,15 @@ const phoneTrafficTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete, func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -217,8 +222,8 @@ const phoneTrafficTableConfig = reactive({
|
||||
extraConfigType:extraConfigType.value
|
||||
},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary', auth: auths.add},
|
||||
// {name: '删除', key: 'delete', type: 'danger'},
|
||||
]
|
||||
})
|
||||
const searchPhoneTraffic = (val) => {
|
||||
@@ -261,9 +266,8 @@ const handleEdit = (row) => {
|
||||
dialogType.value = "edit";
|
||||
}
|
||||
const getDetail = (row) => {
|
||||
getConfigDetails(row.configId,extraConfigType.value).then(res => {
|
||||
getConfigDetails(row.configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
res.data.configType=''+res.data.configType
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||
@@ -271,6 +275,7 @@ const getDetail = (row) => {
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
})
|
||||
} else {
|
||||
ElMessage.success(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -283,7 +288,7 @@ const selectionChange = (selection) => {
|
||||
}
|
||||
}
|
||||
const deleteContactMethod = (configId) => {
|
||||
delConfig(configId,extraConfigType.value).then(res => {
|
||||
delConfig(configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tableIns.value.refresh()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search">
|
||||
</fvSearchForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||
<WorkDialog ref="workDialogRef" :rowData="rowData" />
|
||||
</template>
|
||||
@@ -30,7 +29,9 @@ const mockData = ref([
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
detail: ['order:order:detail'],
|
||||
close: ['order:order:close'],
|
||||
delete: ['order:order:del'],
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -224,15 +225,15 @@ const tableConfig = reactive({
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'danger'})
|
||||
btn.push({ label: '关单', prem: auths.close, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
@@ -31,7 +31,9 @@ const mockData = ref([
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
detail: ['order:order:detail'],
|
||||
close: ['order:order:close'],
|
||||
delete: ['order:order:del'],
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -207,16 +209,16 @@ const tableConfig = reactive({
|
||||
// console.log(row);
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'danger' })
|
||||
btn.push({ label: '详情',prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.close, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger' })
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
@@ -31,7 +31,9 @@ const mockData = ref([
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
detail: ['order:order:detail'],
|
||||
close: ['order:order:close'],
|
||||
delete: ['order:order:del'],
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -208,15 +210,15 @@ const tableConfig = reactive({
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'danger' })
|
||||
btn.push({ label: '关单', prem: auths.close,func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger' })
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import {reactive, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addSensitive, deleteSensitive, editSensitive,getSensitiveDetail} from "@/api/sensitive-words";
|
||||
@@ -103,6 +103,11 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
},
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['order:sensitive:add'],
|
||||
edit: ['order:sensitive:edit'],
|
||||
delete: ['order:sensitive:del'],
|
||||
})
|
||||
const sensitiveTableConfig= reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -153,15 +158,15 @@ const sensitiveTableConfig= reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete,func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -178,8 +183,8 @@ const sensitiveTableConfig= reactive({
|
||||
api: '/sensitive/list',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus', auth: auths.add},
|
||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const searchSensitive = (val) => {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addVerbal, editVerbal,deleteVerbal, getVerbalDetail} from "@/api/verbal-trick";
|
||||
import {reactive} from "vue";
|
||||
const router = useRouter()
|
||||
const dialogTitle = ref("");
|
||||
const dialogType = ref("");
|
||||
@@ -60,6 +61,11 @@ const searchConfig = reactive([
|
||||
// component: shallowRef(fvSelect),
|
||||
// },
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['order:verbal:add'],
|
||||
edit: ['order:verbal:edit'],
|
||||
delete: ['order:verbal:del'],
|
||||
})
|
||||
const verbalTrickTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -134,15 +140,15 @@ const verbalTrickTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete, func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -158,8 +164,8 @@ const verbalTrickTableConfig = reactive({
|
||||
api: '/verbal/list',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus', auth: auths.add},
|
||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const formRules = reactive({
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import {reactive, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addConfig, delConfig, editConfig, getConfigDetails} from "@/api/phone-traffic-config";
|
||||
@@ -131,12 +131,17 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['extra:config:add'],
|
||||
edit: ['extra:config:edit'],
|
||||
delete: ['extra:config:del'],
|
||||
})
|
||||
const phoneTrafficTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
// {
|
||||
// type: 'selection',
|
||||
// prop: 'selection'
|
||||
// },
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
@@ -191,15 +196,15 @@ const phoneTrafficTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑',prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete,func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -217,8 +222,8 @@ const phoneTrafficTableConfig = reactive({
|
||||
extraConfigType:extraConfigType.value
|
||||
},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary',auth: auths.add},
|
||||
// {name: '删除', key: 'delete', type: 'danger'},
|
||||
]
|
||||
})
|
||||
const searchPhoneTraffic = (val) => {
|
||||
@@ -261,9 +266,8 @@ const handleEdit = (row) => {
|
||||
dialogType.value = "edit";
|
||||
}
|
||||
const getDetail = (row) => {
|
||||
getConfigDetails(row.configId,extraConfigType.value).then(res => {
|
||||
getConfigDetails(row.configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
res.data.configType=''+res.data.configType
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||
@@ -271,6 +275,7 @@ const getDetail = (row) => {
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
})
|
||||
} else {
|
||||
ElMessage.success(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -283,7 +288,7 @@ const selectionChange = (selection) => {
|
||||
}
|
||||
}
|
||||
const deleteContactMethod = (configId) => {
|
||||
delConfig(configId,extraConfigType.value).then(res => {
|
||||
delConfig(configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tableIns.value.refresh()
|
||||
|
||||
Reference in New Issue
Block a user