Merge pull request 'master' (#36) from master into test

Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/36
This commit is contained in:
springlog
2024-09-14 20:45:41 +00:00
11 changed files with 5874 additions and 79 deletions

5521
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
<script setup>
const dialogVisible = ref(false);
const open = (row) => {
dialogVisible.value = true;
};
defineExpose({
open,
});
</script>
<template>
<el-dialog v-model="dialogVisible" title="语音详情" width="500" :before-close="handleClose">
<audio src="" controls style="width: 100%;"></audio>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false">
关闭
</el-button>
</div>
</template>
</el-dialog>
</template>
<style></style>

View File

@@ -0,0 +1,31 @@
<script setup>
import LiveCall from '@/components/liveCall/index.vue'
const dialogVisible = ref(false);
const open = (row) => {
dialogVisible.value = true;
};
defineExpose({
open,
});
</script>
<template>
<el-dialog v-model="dialogVisible" title="语音详情" width="1500" :before-close="handleClose" class="box">
<LiveCall />
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false">
关闭
</el-button>
</div>
</template>
</el-dialog>
</template>
<style>
.box{
height: 65vh;
}
</style>

View File

@@ -141,7 +141,7 @@ const initWebSocket = () => {
<style lang="scss" scoped>
.live-call {
width: 48%;
height: 450px;
height: 47.5vh;
margin-bottom: 20px;
overflow: hidden;
border: 1px solid #d5d4d4;

View File

@@ -1,5 +1,5 @@
<template>
<h3 style="margin-bottom: 15px">实时通话</h3>
<div class="live-call-block">
<live-call-item v-for="item in 2"/>
</div>
@@ -13,7 +13,7 @@
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
justify-content: space-around;
height: 470px;
overflow-y: auto;

View File

@@ -1,14 +1,159 @@
<template>
<div style="padding:15px 20px;">
<live-call/>
<div class="home">
<h3 style="margin-bottom: 10px;margin-top: 10px">实时通话</h3>
<div class="real-time-call">
<LiveCall />
</div>
<hr><br>
<div class="call-history"><h3 >历史通话记录</h3>
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
<Voice ref="voiceRef" />
<infoLiveCall ref="infoLiveCallRef"/>
</div>
</div>
</template>
<script setup>
<script setup lang="jsx">
import LiveCall from '@/components/liveCall/index.vue'
import Voice from '@/components/voice/index.vue'
import infoLiveCall from '@/components/infoLiveCall/index.vue'
const infoLiveCallRef=ref()
const voiceRef=ref()
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: () => handleVoice(row), type: 'primary' })
btn.push({ label: '信息', prem: auths.detail, func: () => handleInfo(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'},
]
})
const handleVoice = (row) => {
voiceRef.value.open(true)
}
const handleInfo = (row) => {
infoLiveCallRef.value.open(true)
}
</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

@@ -6,13 +6,12 @@
</template>
<script setup lang="jsx">
import { isShallow, reactive, shallowRef } from 'vue';
import { reactive, shallowRef } from 'vue';
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import WorkDialog from '../components/WorkDialog.vue';
import { orderdDetele, orderdClose, orderAdd } from "@/api/order/order.js"
const rowData = ref()
const isShow = ref(false)
const workDialogRef = ref()
const router = useRouter()
const tableIns = ref()
@@ -36,7 +35,7 @@ const auths = reactive({
const searchConfig = reactive([
{
label: '工单号',
prop: 'requirementName',
prop: 'orderNumber',
props: {
placeholder: '请输入工单号查询',
clearable: true,
@@ -45,7 +44,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '工单名称',
prop: 'requirementName',
prop: 'orderName',
props: {
placeholder: '请输入工单名查询',
clearable: true,
@@ -54,7 +53,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '工单状态',
prop: 'requirementName',
prop: 'orderState',
props: {
placeholder: '请选择工单状态查询',
cacheKey: 'work_order_status',
@@ -64,7 +63,7 @@ const searchConfig = reactive([
component: shallowRef(fvSelect),
}, {
label: '处理人',
prop: 'requirementName',
prop: 'operationUser',
props: {
placeholder: '请输入处理人查询',
clearable: true,
@@ -73,7 +72,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '关单人',
prop: 'requirementName',
prop: 'knotter',
props: {
placeholder: '请输入关单人查询',
clearable: true,
@@ -83,7 +82,7 @@ const searchConfig = reactive([
},
{
label: '创建日期',
prop: 'requirementDate',
prop: 'createTime',
props: {
placeholder: '请选择',
clearable: true,
@@ -92,7 +91,7 @@ const searchConfig = reactive([
component: 'el-date-picker',
}, {
label: '处理时间',
prop: 'requirementDate',
prop: 'te',
props: {
placeholder: '请选择',
clearable: true,
@@ -101,7 +100,7 @@ const searchConfig = reactive([
component: 'el-date-picker',
}, {
label: '完成时间',
prop: 'requirementDate',
prop: 'completionTime',
props: {
placeholder: '请选择',
clearable: true,
@@ -127,7 +126,7 @@ const tableConfig = reactive({
width: 200
},
{
prop: 'siteName',
prop: 'orderName',
label: '工单名称',
align: 'center',
width: 200
@@ -144,8 +143,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 +154,7 @@ const tableConfig = reactive({
prop: 'callState',
label: '电话拨打状态',
align: 'center',
width: 150,
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
if (row.callState !== null) {
@@ -169,6 +169,7 @@ const tableConfig = reactive({
label: '处理人',
align: 'center'
},
{
prop: 'processedContent',
label: '处理内容',
@@ -192,6 +193,11 @@ const tableConfig = reactive({
align: 'center',
width: 200
},
{
prop: 'knotter',
label: '关单人',
align: 'center'
},
{
prop: 'oper',
label: '操作',
@@ -231,6 +237,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

@@ -1,5 +1,5 @@
<script setup>
import { onMounted, reactive, ref, watch } from "vue";
import { nextTick, onMounted, reactive, ref, watch } from "vue";
import { ElMessageBox } from "element-plus";
import { MoreFilled } from "@element-plus/icons-vue";
import { time } from "echarts";
@@ -13,8 +13,8 @@ const dialogVisible = ref(false);
const props = defineProps({
rowData: Object
})
let dataDetails = {};
let opsCallList = {};
let dataDetails = ref();
let opsCallList = ref([]);
const open = (row) => {
dialogVisible.value = true;
};
@@ -31,18 +31,17 @@ const getData = async () => {
watch(() => props.rowData, (newRowData) => {
if (newRowData) {
// console.log(getData(newRowData));
getData(newRowData).then((data) => {
// console.log(data.data);
dataDetails = data.data
console.log(dataDetails.value);
opsCallList = dataDetails.opsCallList
console.log(opsCallList);
dataDetails = data.data.opsCallList
// console.log(dataDetails);
// opsCallList = dataDetails.opsCallList
dataDetails.forEach(item => {
// console.log(item);
opsCallList.value.push(item)
});
// console.log(opsCallList);
})
}
}, {
immediate: true // 立即执行一次以便在rowData初始值非空时也能触发
@@ -108,11 +107,10 @@ defineExpose({
</script>
<template>
<el-dialog v-model="dialogVisible" show-close="true" title="工单详情" width="80%" :before-close="handleClose" overflow:
auto>
<el-dialog v-model="dialogVisible" :show-close=true title="工单详情" width="80%" overflow: 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">
@@ -122,7 +120,7 @@ defineExpose({
<el-timeline-item v-for="(activity, index) in test" :key="index" :icon="activity.icon"
:type="activity.type" :color="activity.color" :size="activity.size"
:hollow="activity.hollow" :timestamp="activity.timestamp">
<p style="font-size: 17px;"> {{ activity.content }}</p>
<p style="font-size: 17px;"> {{ activity.content }}</p>
</el-timeline-item>
</el-timeline>
</div>
@@ -130,33 +128,44 @@ 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 class="text">{{ rowData.orderContent }}</div>
<div>工单内容</div>
<div class="textBox">
<el-scrollbar >
<div class="text">{{ rowData.orderContent }}</div>
</el-scrollbar>
</div>
</div>
<div>
<div>处理内容</div>
<div class="textBox">
<el-scrollbar >
<div class="text">{{ rowData.processedContent }}</div>
</el-scrollbar>
</div>
</div>
<div>
<div>处理内容 :</div>
<div class="text">{{ rowData.processedContent }}</div>
</div>
<div>
<div>录音信息 :</div>
<div class="text">{{ rowData.recordUrl }}</div>
<div>录音信息</div>
<div class="textBox">
<el-scrollbar >
<div class="text">{{ rowData.recordUrl }}</div>
</el-scrollbar>
</div>
</div>
</div>
<div class="footer">
<div>电话拨打记录 :</div>
<div>电话拨打记录</div>
<div class="timebox">
<div>
<el-scrollbar height="20vh">
@@ -171,8 +180,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>
@@ -229,13 +237,25 @@ defineExpose({
color: black
}
.main-content .body .text {
.main-content .body .textBox {
width: 100%;
height: 10vh;
min-height: 10vh;
max-height: 15vh;
border: 1.5px solid #e4e7ed;
resize: none;
margin-bottom: 20px;
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
margin-bottom: 20px;
padding: 15px;
}
.main-content .body .text {
resize: none;
// overflow-y: auto;
font-size: 16px;
line-height: 25px
}
.main-content .footer {

View File

@@ -36,7 +36,7 @@ const auths = reactive({
const searchConfig = reactive([
{
label: '工单号',
prop: 'requirementName',
prop: 'orderNumber',
props: {
placeholder: '请输入工单号查询',
clearable: true,
@@ -45,7 +45,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '工单名称',
prop: 'requirementName',
prop: 'orderName',
props: {
placeholder: '请输入工单名查询',
clearable: true,
@@ -54,7 +54,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '工单状态',
prop: 'requirementName',
prop: 'orderState',
props: {
placeholder: '请选择工单状态查询',
cacheKey: 'work_order_status',
@@ -64,7 +64,7 @@ const searchConfig = reactive([
component: shallowRef(fvSelect),
}, {
label: '处理人',
prop: 'requirementName',
prop: 'operationUser',
props: {
placeholder: '请输入处理人查询',
clearable: true,
@@ -73,7 +73,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '关单人',
prop: 'requirementName',
prop: 'knotter',
props: {
placeholder: '请输入关单人查询',
clearable: true,
@@ -83,7 +83,7 @@ const searchConfig = reactive([
},
{
label: '创建日期',
prop: 'requirementDate',
prop: 'createTime',
props: {
placeholder: '请选择',
clearable: true,
@@ -92,7 +92,7 @@ const searchConfig = reactive([
component: 'el-date-picker',
}, {
label: '处理时间',
prop: 'requirementDate',
prop: 'te',
props: {
placeholder: '请选择',
clearable: true,
@@ -101,7 +101,7 @@ const searchConfig = reactive([
component: 'el-date-picker',
}, {
label: '完成时间',
prop: 'requirementDate',
prop: 'completionTime',
props: {
placeholder: '请选择',
clearable: true,
@@ -127,7 +127,7 @@ const tableConfig = reactive({
width: 200
},
{
prop: 'siteName',
prop: 'orderName',
label: '工单名称',
align: 'center',
width: 200
@@ -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: 'knotter',
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

@@ -36,7 +36,7 @@ const auths = reactive({
const searchConfig = reactive([
{
label: '工单号',
prop: 'requirementName',
prop: 'orderNumber',
props: {
placeholder: '请输入工单号查询',
clearable: true,
@@ -45,7 +45,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '工单名称',
prop: 'requirementName',
prop: 'orderName',
props: {
placeholder: '请输入工单名查询',
clearable: true,
@@ -54,7 +54,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '工单状态',
prop: 'requirementName',
prop: 'orderState',
props: {
placeholder: '请选择工单状态查询',
cacheKey: 'work_order_status',
@@ -64,7 +64,7 @@ const searchConfig = reactive([
component: shallowRef(fvSelect),
}, {
label: '处理人',
prop: 'requirementName',
prop: 'operationUser',
props: {
placeholder: '请输入处理人查询',
clearable: true,
@@ -73,7 +73,7 @@ const searchConfig = reactive([
component: 'el-input',
}, {
label: '关单人',
prop: 'requirementName',
prop: 'knotter',
props: {
placeholder: '请输入关单人查询',
clearable: true,
@@ -83,7 +83,7 @@ const searchConfig = reactive([
},
{
label: '创建日期',
prop: 'requirementDate',
prop: 'createTime',
props: {
placeholder: '请选择',
clearable: true,
@@ -92,7 +92,7 @@ const searchConfig = reactive([
component: 'el-date-picker',
}, {
label: '处理时间',
prop: 'requirementDate',
prop: 'te',
props: {
placeholder: '请选择',
clearable: true,
@@ -101,7 +101,7 @@ const searchConfig = reactive([
component: 'el-date-picker',
}, {
label: '完成时间',
prop: 'requirementDate',
prop: 'completionTime',
props: {
placeholder: '请选择',
clearable: true,
@@ -127,7 +127,7 @@ const tableConfig = reactive({
width: 200
},
{
prop: 'siteName',
prop: 'orderName',
label: '工单名称',
align: 'center',
width: 200
@@ -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: 'knotter',
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/, ""),
}
},
},