Merge pull request 'refactor(task-management): 重构工单管理功能' (#174) from dj into master
Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/174
This commit is contained in:
2
auto-imports.d.ts
vendored
2
auto-imports.d.ts
vendored
@@ -5,6 +5,8 @@
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
|
||||
33
components.d.ts
vendored
33
components.d.ts
vendored
@@ -11,56 +11,41 @@ declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
ElAside: typeof import('element-plus/es')['ElAside']
|
||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRate: typeof import('element-plus/es')['ElRate']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElText: typeof import('element-plus/es')['ElText']
|
||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTree: typeof import('element-plus/es')['ElTree']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
FvCheckbox: typeof import('./src/fvcomponents/fvCheckbox/index.vue')['default']
|
||||
FvForm: typeof import('./src/fvcomponents/fvForm/index.vue')['default']
|
||||
FvFormDialog: typeof import('./src/fvcomponents/fvFormDialog/index.vue')['default']
|
||||
FvPagination: typeof import('./src/fvcomponents/fvPagination/index.vue')['default']
|
||||
FvRadio: typeof import('./src/fvcomponents/fvRadio/index.vue')['default']
|
||||
FvSearchForm: typeof import('./src/fvcomponents/fvSearchForm/index.vue')['default']
|
||||
@@ -74,18 +59,20 @@ declare module '@vue/runtime-core' {
|
||||
IconSelect: typeof import('./src/components/iconSelect/index.vue')['default']
|
||||
IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
|
||||
IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
|
||||
JavaCodeEdit: typeof import('./src/components/codeEdit/JavaCodeEdit.vue')['default']
|
||||
JsCodeEdit: typeof import('./src/components/codeEdit/JsCodeEdit.vue')['default']
|
||||
InfoLiveCall: typeof import('./src/components/infoLiveCall/index.vue')['default']
|
||||
LiveCall: typeof import('./src/components/liveCall/index.vue')['default']
|
||||
LiveCallItem: typeof import('./src/components/liveCall/LiveCallItem.vue')['default']
|
||||
LiveCallItemHome: typeof import('./src/components/liveCall/LiveCallItemHome.vue')['default']
|
||||
Pagination: typeof import('./src/components/pagination/index.vue')['default']
|
||||
ParentView: typeof import('./src/components/ParentView.vue')['default']
|
||||
PointTag: typeof import('./src/components/PointTag.vue')['default']
|
||||
PopoverDelete: typeof import('./src/components/PopoverDelete.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SqlCodeEdit: typeof import('./src/components/codeEdit/SqlCodeEdit.vue')['default']
|
||||
SvgIcon: typeof import('./src/components/svgIcon/index.vue')['default']
|
||||
Tag: typeof import('./src/components/Tag.vue')['default']
|
||||
TheWelcome: typeof import('./src/components/TheWelcome.vue')['default']
|
||||
Voice: typeof import('./src/components/voice/index.vue')['default']
|
||||
WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
|
||||
}
|
||||
export interface ComponentCustomProperties {
|
||||
|
||||
@@ -11,8 +11,9 @@ export const orderGetList=(params)=>{
|
||||
|
||||
export const orderGetDetails =(params)=>{
|
||||
return request({
|
||||
url:`/order/info/${params}`,
|
||||
method:'get'
|
||||
url:'/order/info',
|
||||
method:'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -33,8 +34,9 @@ export const orderdDetele =(params)=>{
|
||||
|
||||
export const orderdClose =(params)=>{
|
||||
return request({
|
||||
url:`/order/${params}`,
|
||||
method:'post'
|
||||
url:`/order`,
|
||||
method:'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@ import request from '@/utils/request.js'
|
||||
//获取历史通话文本记录
|
||||
export const getHistoryCallContent=(params)=>{
|
||||
return request({
|
||||
url:`/text/history/list/${params}`,
|
||||
method:'get'
|
||||
url:`/text/history/list`,
|
||||
method:'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
//获取工作台当前线路记录
|
||||
|
||||
@@ -8,8 +8,8 @@ const recordLeftRef = ref(null);
|
||||
const emit = defineEmits(['update:value'])
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type:String,
|
||||
default:''
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -54,7 +54,12 @@ watch(() => props.value, async (newVal) => {
|
||||
})
|
||||
const getHistoryDetail=(newVal)=>{
|
||||
detailLoading.value=true
|
||||
getHistoryCallContent(newVal).then(res => {
|
||||
let param={
|
||||
orderNumber:newVal.orderNumber,
|
||||
alarmObject :newVal.alarmObject,
|
||||
alarmUnit :newVal.alarmUnit,
|
||||
}
|
||||
getHistoryCallContent(param).then(res => {
|
||||
if (res.code === 1000) {
|
||||
detailLoading.value=false
|
||||
res.data?.forEach(item => {
|
||||
@@ -69,6 +74,7 @@ const getHistoryDetail=(newVal)=>{
|
||||
leftHeadData.value.orderName = res.data[0].orderName || '--';
|
||||
}
|
||||
} else {
|
||||
detailLoading.value=false
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<h3>历史通话记录</h3>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :isLoading="isLoading"></fvTable>
|
||||
<voice ref="voiceRef" title="语音详情" :rowUrl="rowUrl" />
|
||||
<infoLiveCall ref="infoLiveCallRef" v-model:value="orderNumber" />
|
||||
<infoLiveCall ref="infoLiveCallRef" v-model:value="historyData" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,6 +17,7 @@
|
||||
import LiveCall from '@/components/liveCall/index.vue'
|
||||
import Voice from '@/components/voice/index.vue'
|
||||
import InfoLiveCall from '@/components/infoLiveCall/index.vue'
|
||||
const historyData = ref({})
|
||||
const orderNumber = ref('')
|
||||
const rowUrl = ref()
|
||||
const infoLiveCallRef = ref()
|
||||
@@ -147,12 +148,13 @@ const handleVoice = (row) => {
|
||||
|
||||
}
|
||||
const handleInfo = (row) => {
|
||||
historyData.value=row
|
||||
orderNumber.value = row.orderNumber
|
||||
infoLiveCallRef.value.open()
|
||||
}
|
||||
window.setInterval(() => {
|
||||
setTimeout(tableIns.value.refresh(), 0)
|
||||
}, 2000)
|
||||
// window.setInterval(() => {
|
||||
// setTimeout(tableIns.value.refresh(), 0)
|
||||
// }, 2000)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||
<WorkDialog ref="workDialogRef" :rowData="rowData" />
|
||||
<WorkDialog ref="workDialogRef" :rowData="rowData"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { 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 } from "@/api/order/order.js"
|
||||
import {orderdDetele, orderdClose} from "@/api/order/order.js"
|
||||
|
||||
const rowData = ref()
|
||||
const workDialogRef = ref()
|
||||
@@ -150,9 +150,9 @@ const tableConfig = reactive({
|
||||
label: '工单状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.orderState !== null) {
|
||||
return (<Tag dictType={'work_order_status'} value={row.orderState} />)
|
||||
return (<Tag dictType={'work_order_status'} value={row.orderState}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
@@ -164,9 +164,9 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.callState !== null) {
|
||||
return (<Tag dictType={'call_status'} value={row.callState} />)
|
||||
return (<Tag dictType={'call_status'} value={row.callState}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
@@ -176,7 +176,7 @@ const tableConfig = reactive({
|
||||
prop: 'operationUser',
|
||||
label: '处理人',
|
||||
align: 'center',
|
||||
currentRender: ({ row, index }) => {
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.operationUser) {
|
||||
return row.operationUser
|
||||
} else {
|
||||
@@ -220,28 +220,28 @@ const tableConfig = reactive({
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
currentRender: ({row, index}) => {
|
||||
// console.log(row);
|
||||
|
||||
let btn = []
|
||||
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'})
|
||||
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}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<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>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -253,7 +253,7 @@ const tableConfig = reactive({
|
||||
]
|
||||
})
|
||||
const search = (val) => {
|
||||
let obj = { ...val }
|
||||
let obj = {...val}
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
@@ -282,30 +282,35 @@ const handleDetail = (row) => {
|
||||
const handleClose = async (row) => {
|
||||
if (row.orderState !== '2') {
|
||||
ElMessageBox.confirm(
|
||||
'确定要关单吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdClose(row.orderNumber)
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '关闭成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
'确定要关单吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdClose(
|
||||
{
|
||||
orderNumber: row.orderNumber,
|
||||
alarmObject: row.alarmObject,
|
||||
alarmUnit: row.alarmUnit
|
||||
})
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '关闭成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||
@@ -321,30 +326,30 @@ const handleClose = async (row) => {
|
||||
const handleDelete = async (row) => {
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'确定要删除吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdDetele(row.orderNumber)
|
||||
console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
'确定要删除吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdDetele(row.orderNumber)
|
||||
console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -25,7 +25,11 @@ const open = (row) => {
|
||||
|
||||
const getData = async () => {
|
||||
// console.log(123);
|
||||
const data = await orderGetDetails(props.rowData.orderNumber)
|
||||
const data = await orderGetDetails({
|
||||
orderNumber:props.rowData.orderNumber,
|
||||
alarmObject :props.rowData.alarmObject,
|
||||
alarmUnit :props.rowData.alarmUnit
|
||||
})
|
||||
// console.log("111", data);
|
||||
return data
|
||||
|
||||
@@ -253,15 +257,15 @@ defineExpose({
|
||||
</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 class="textBox">-->
|
||||
<!-- <el-scrollbar>-->
|
||||
<!-- <div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>-->
|
||||
<!-- </el-scrollbar>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
<div>录音信息:</div>
|
||||
<div class="textBox—record">
|
||||
|
||||
Reference in New Issue
Block a user