feat:搭好了工作台架子,增加了工单的搜索方法,修改了部分样式

This commit is contained in:
KindSeven
2024-09-15 01:16:00 +08:00
parent 18508b5ecc
commit 162bae7fc3
7 changed files with 204 additions and 22 deletions

View File

@@ -1,2 +1,2 @@
# 开发环境基地址
VITE_BASE_URL='http://frp.feashow.cn:31800/'
VITE_BASE_URL='/api'

View File

@@ -1,12 +1,142 @@
<template>
工作台
<div class="home">
<div class="real-time-call">实时通话</div>
<div class="call-history">历史通话记录
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
</div>
</div>
</template>
<script setup>
<script setup lang="jsx">
const tableIns = ref()
const mockData = ref([
{
workOrderNumber: 1211,
workOrderTime: '2022-02-09 00 : 12',
state: 0,
callState: 0
},
{
workOrderNumber: 232,
state: 1,
callState: 1
}
])
const auths = reactive({
report: ['mosr:collect:reported'],
})
const tableConfig = reactive({
columns: [
{
prop: 'index',
type: 'index',
label: '工单号',
align: 'center',
width: 80,
},
{
prop: 'workOrderNumber',
label: '工单名称',
align: 'center'
},
{
prop: 'workOrderNumber',
label: '工单内容',
align: 'center'
},
{
prop: 'workOrderNumber',
label: '处理人',
align: 'center'
},
{
prop: 'workOrderNumber',
label: '关单人',
align: 'center'
},
{
prop: 'workOrderNumber',
label: '用户名',
align: 'center'
},
{
prop: 'workOrderNumber',
label: '号码',
align: 'center'
},
{
prop: 'callState',
label: '电话拨打状态',
align: 'center',
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.callState !== null) {
return (<PointTag dictType={'call_state'} value={row.callState} />)
} else {
return '--'
}
}
},
{
prop: 'workOrderTime',
label: '拨打时间',
align: 'center',
width: 200
},{
prop: 'oper',
label: '操作',
align: 'center',
fixed: 'right',
width: 150,
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
// 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' })
return (
<div style={{ width: '100%' }}>
{
btn.map(item => (
<el-button
type={item.type}
// v-perm={item.prem}
onClick={() => item.func()}
link
>
{item.label}
</el-button>
))
}
</div>
)
}
}
],
api: '',
params: {},
btns: [
// {name: '新增', key: 'add',type:'primary',icon:'Plus'},
]
})
</script>
<style lang="scss" scoped>
.home {
.real-time-call {
width: 100%;
height: 50vh;
// background-color: red;
}
.call-history {
width: 100%;
height: 50vh;
// background-color: blue;
}
}
</style>

View File

@@ -144,8 +144,8 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.state !== null) {
return (<Tag dictType={'work_order_status'} value={row.state} />)
if (row.orderState !== null) {
return (<Tag dictType={'work_order_status'} value={row.orderState} />)
} else {
return '--'
}
@@ -155,6 +155,7 @@ const tableConfig = reactive({
prop: 'callState',
label: '电话拨打状态',
align: 'center',
width: 150,
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.callState !== null) {
@@ -169,6 +170,7 @@ const tableConfig = reactive({
label: '处理人',
align: 'center'
},
{
prop: 'processedContent',
label: '处理内容',
@@ -192,6 +194,11 @@ const tableConfig = reactive({
align: 'center',
width: 200
},
{
prop: 'workOrderNumber',
label: '关单人',
align: 'center'
},
{
prop: 'oper',
label: '操作',
@@ -231,6 +238,16 @@ const tableConfig = reactive({
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
]
})
const search = (val) => {
let obj = { ...val }
if (obj.dateValue) {
obj.startTime = obj.dateValue[0]
obj.endTime = obj.dateValue[1]
delete obj.dateValue
}
tableConfig.params = obj
tableIns.value.refresh()
}
const headBtnClick = (key) => {
// console.log(key);

View File

@@ -112,7 +112,7 @@ defineExpose({
auto>
<div class="common-layout">
<el-container>
<el-header class="header"><span>工单号 :</span>
<el-header class="header"><span>工单号</span>
<span>{{ rowData.orderNumber }}</span>
</el-header>
<el-container class="main-container">
@@ -130,33 +130,33 @@ defineExpose({
<el-main :style="{ position: 'static' }" class="main-content">
<div class="top">
<div class="info">
<span>创始人 : {{ rowData.createBy }}</span>
<span>处理人 :{{ rowData.operationUser }}</span>
<span>创始人{{ rowData.createBy }}</span>
<span>处理人{{ rowData.operationUser }}</span>
</div>
<div class="info">
<span>工单名称 :{{ rowData.siteName }}</span>
<span>关单人 :{{ rowData.knotter }}</span>
<span>工单名称{{ rowData.siteName }}</span>
<span>关单人{{ rowData.knotter }}</span>
</div>
</div>
<div class="body">
<div>
<div>工单内容 :</div>
<div>工单内容</div>
<div class="text">{{ rowData.orderContent }}</div>
</div>
<div>
<div>处理内容 :</div>
<div>处理内容</div>
<div class="text">{{ rowData.processedContent }}</div>
</div>
<div>
<div>录音信息 :</div>
<div>录音信息</div>
<div class="text">{{ rowData.recordUrl }}</div>
</div>
</div>
<div class="footer">
<div>电话拨打记录 :</div>
<div>电话拨打记录</div>
<div class="timebox">
<div>
<el-scrollbar height="20vh">
@@ -171,8 +171,7 @@ defineExpose({
<span :style="{ color: '#a8abb2' }">{{ activity.callIdNumber
}}</span>
<span :style="{
color: activity.callState
=== '通话中' ? '#6cc23a' : '#409eff'
color: activity.callState === '通话中' ? '#6cc23a' : '#409eff'
}">{{ activity.callState }}</span>
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
activity.answer_time }}</span>

View File

@@ -144,8 +144,8 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.state !== null) {
return (<Tag dictType={'work_order_status'} value={row.state} />)
if (row.orderState !== null) {
return (<Tag dictType={'work_order_status'} value={row.orderState} />)
} else {
return '--'
}
@@ -155,6 +155,7 @@ const tableConfig = reactive({
prop: 'callState',
label: '电话拨打状态',
align: 'center',
width: 150,
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.callState !== null) {
@@ -169,6 +170,7 @@ const tableConfig = reactive({
label: '处理人',
align: 'center'
},
{
prop: 'processedContent',
label: '处理内容',
@@ -192,6 +194,11 @@ const tableConfig = reactive({
align: 'center',
width: 200
},
{
prop: 'workOrderNumber',
label: '关单人',
align: 'center'
},
{
prop: 'oper',
label: '操作',
@@ -231,6 +238,17 @@ const tableConfig = reactive({
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
]
})
const search = (val) => {
let obj = {...val}
if (obj.dateValue) {
obj.startTime = obj.dateValue[0]
obj.endTime = obj.dateValue[1]
delete obj.dateValue
}
tableConfig.params = obj
tableIns.value.refresh()
}
const headBtnClick = (key) => {
// console.log(key);

View File

@@ -144,8 +144,8 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.state !== null) {
return (<Tag dictType={'work_order_status'} value={row.state} />)
if (row.orderState !== null) {
return (<Tag dictType={'work_order_status'} value={row.orderState} />)
} else {
return '--'
}
@@ -155,6 +155,7 @@ const tableConfig = reactive({
prop: 'callState',
label: '电话拨打状态',
align: 'center',
width: 150,
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.callState !== null) {
@@ -169,6 +170,7 @@ const tableConfig = reactive({
label: '处理人',
align: 'center'
},
{
prop: 'processedContent',
label: '处理内容',
@@ -192,6 +194,11 @@ const tableConfig = reactive({
align: 'center',
width: 200
},
{
prop: 'workOrderNumber',
label: '关单人',
align: 'center'
},
{
prop: 'oper',
label: '操作',
@@ -231,6 +238,17 @@ const tableConfig = reactive({
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
]
})
const search = (val) => {
let obj = {...val}
if (obj.dateValue) {
obj.startTime = obj.dateValue[0]
obj.endTime = obj.dateValue[1]
delete obj.dateValue
}
tableConfig.params = obj
tableIns.value.refresh()
}
const headBtnClick = (key) => {
// console.log(key);

View File

@@ -77,9 +77,9 @@ export default defineConfig({
// },
"/api": {
// target: "http://192.168.31.176:9010",
target: "http://112.19.165.99:20002/",
target: "http://frp.feashow.cn:31800/",
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, ""),
rewrite: (path) => path.replace(/^\/api/, ""),
}
},
},