Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
@@ -59,3 +59,19 @@ export function workOrdersUpdate(data: WorkOrdersForm) {
|
||||
export function workOrdersRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/workOrders/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 派单
|
||||
* @param data
|
||||
*/
|
||||
export function workOrdersDispatch(data: WorkOrdersForm) {
|
||||
return requestClient.putWithMsg<void>('/property/workOrders/dispatch', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 抢单
|
||||
* @param data
|
||||
*/
|
||||
export function workOrdersGrab(data: WorkOrdersForm) {
|
||||
return requestClient.putWithMsg<void>('/property/workOrders/grab', data);
|
||||
}
|
||||
|
@@ -83,7 +83,7 @@ export interface WorkOrdersVO {
|
||||
*/
|
||||
imgUrl: string;
|
||||
|
||||
evaluateImgPath: string | undefined;
|
||||
evaluateImgPath: string[];
|
||||
/**
|
||||
* 评价内容
|
||||
*/
|
||||
@@ -101,7 +101,7 @@ export interface WorkOrdersVO {
|
||||
*/
|
||||
orderImgUrl: string;
|
||||
|
||||
orderImgPath: string|undefined;
|
||||
orderImgPath: string[];
|
||||
|
||||
reportingType: string;
|
||||
|
||||
|
@@ -37,6 +37,11 @@ export interface WorkOrdersTypeVO {
|
||||
isTransfers: string;
|
||||
|
||||
excludeId: string;
|
||||
/**
|
||||
* 处理优先级
|
||||
*/
|
||||
processingWeight: string;
|
||||
|
||||
}
|
||||
|
||||
export interface WorkOrdersTypeForm extends BaseEntity {
|
||||
@@ -79,6 +84,11 @@ export interface WorkOrdersTypeForm extends BaseEntity {
|
||||
* 上级类型id
|
||||
*/
|
||||
parentId?: string;
|
||||
|
||||
/**
|
||||
* 处理优先级
|
||||
*/
|
||||
processingWeight: string;
|
||||
}
|
||||
|
||||
export interface WorkOrdersTypeQuery extends PageQuery {
|
||||
|
@@ -8,7 +8,7 @@ import {
|
||||
import {
|
||||
workOrdersList,
|
||||
} from '#/api/property/businessManagement/workOrders';
|
||||
import workOrdersDetail from './work-orders-detail.vue';
|
||||
import workOrdersDetail from '../workOrders/work-orders-detail.vue';
|
||||
import {columns, querySchema} from './data';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
|
@@ -56,7 +56,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'reportingType',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.reportingType, 'wy_gdsblx');
|
||||
return row.reportingType!=null?renderDict(row.reportingType, 'wy_gdsblx'):'';
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
@@ -86,7 +86,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'processingWeight',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.processingWeight, 'pro_processing_weight');
|
||||
return row.processingWeight!=null?renderDict(row.processingWeight, 'pro_processing_weight'):'';
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
|
@@ -184,14 +184,16 @@ onMounted(async () => {
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['property:workOrders:dispatch']"
|
||||
@click.stop="handleOrders(row,'group')"
|
||||
v-if="row.status!=='1' && row.status!=='2'"
|
||||
v-if="row.status!=='1' && row.status!=='2'&&row.operationMode!=='2'"
|
||||
>
|
||||
{{ '派单' }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['property:workOrders:grab']"
|
||||
@click.stop="handleOrders(row,'rob')"
|
||||
v-if="row.status!=='1' && row.status!=='2'"
|
||||
v-if="row.status!=='1' && row.status!=='2'&&row.operationMode!=='2'"
|
||||
>
|
||||
{{ '抢单' }}
|
||||
</ghost-button>
|
||||
|
@@ -3,6 +3,7 @@ import {useVbenModal} from '@vben/common-ui';
|
||||
import {cloneDeep} from '@vben/utils';
|
||||
import {useVbenForm} from '#/adapter/form';
|
||||
import {
|
||||
workOrdersDispatch, workOrdersGrab,
|
||||
workOrdersInfo,
|
||||
workOrdersUpdate
|
||||
} from '#/api/property/businessManagement/workOrders';
|
||||
@@ -84,11 +85,15 @@ async function handleConfirm() {
|
||||
}
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
if(title.value === '派单'){
|
||||
//派单
|
||||
record.value.handler = data.handler
|
||||
await workOrdersDispatch(record.value)
|
||||
}else{
|
||||
//抢单
|
||||
record.value.handler = userStore.userInfo.userId
|
||||
await workOrdersGrab(record.value)
|
||||
}
|
||||
await workOrdersUpdate(record.value)
|
||||
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
|
@@ -1,7 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, shallowRef} from 'vue';
|
||||
import {ref, shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem, Timeline, TimelineItem, Rate,Divider} from 'ant-design-vue';
|
||||
import {
|
||||
Descriptions,
|
||||
DescriptionsItem,
|
||||
Timeline,
|
||||
TimelineItem,
|
||||
Rate,
|
||||
Divider
|
||||
} from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
@@ -21,7 +28,8 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
});
|
||||
|
||||
const orderDetail = shallowRef<null | WorkOrdersVO>(null);
|
||||
const handleRecords=ref<HandleRecords[]>([])
|
||||
const handleRecords = ref<HandleRecords[]>([])
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
@@ -29,8 +37,8 @@ async function handleOpenChange(open: boolean) {
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
orderDetail.value = await workOrdersInfo(id);
|
||||
if(orderDetail.value.workOrdersRecordVoList){
|
||||
handleRecords.value = orderDetail.value.workOrdersRecordVoList.map( (item, index) => ({
|
||||
if (orderDetail.value.workOrdersRecordVoList) {
|
||||
handleRecords.value = orderDetail.value.workOrdersRecordVoList.map((item, index) => ({
|
||||
status: item.status,
|
||||
createTime: item.createTime,
|
||||
handlerName: index === 0 ? item.initiatorPeople : item.handlerName
|
||||
@@ -39,16 +47,23 @@ async function handleOpenChange(open: boolean) {
|
||||
try {
|
||||
if (orderDetail.value.orderImgUrl) {
|
||||
const res = await ossInfo([orderDetail.value.orderImgUrl]);
|
||||
orderDetail.value.orderImgPath = res?.[0]?.url
|
||||
let imgUrls = [];
|
||||
res.forEach(item => {
|
||||
imgUrls.push(item.url)
|
||||
})
|
||||
orderDetail.value.orderImgPath = imgUrls;
|
||||
}
|
||||
if (orderDetail.value.imgUrl) {
|
||||
const res = await ossInfo([orderDetail.value.imgUrl]);
|
||||
orderDetail.value.evaluateImgPath = res?.[0]?.url
|
||||
let imgUrls = [];
|
||||
res.forEach(item => {
|
||||
imgUrls.push(item.url)
|
||||
})
|
||||
orderDetail.value.evaluateImgPath = imgUrls
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
modalApi.modalLoading(false);
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -63,16 +78,16 @@ async function handleOpenChange(open: boolean) {
|
||||
{{ orderDetail.orderName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="工单类型">
|
||||
{{orderDetail.typeName}}
|
||||
{{ orderDetail.typeName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="上报类型">
|
||||
<component
|
||||
:is="renderDict(orderDetail.reportingType,'wy_gdsblx')"
|
||||
<component v-if="orderDetail.reportingType!=null"
|
||||
:is="renderDict(orderDetail.reportingType,'wy_gdsblx')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理优先级">
|
||||
<component
|
||||
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
|
||||
<component v-if="orderDetail.processingWeight!=null"
|
||||
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="发起人">
|
||||
@@ -87,9 +102,9 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="具体位置" :span="2">
|
||||
{{ orderDetail.location }}
|
||||
</DescriptionsItem>
|
||||
<!-- <DescriptionsItem label="计划完成时间">-->
|
||||
<!-- {{ orderDetail.planCompleTime }}-->
|
||||
<!-- </DescriptionsItem>-->
|
||||
<!-- <DescriptionsItem label="计划完成时间">-->
|
||||
<!-- {{ orderDetail.planCompleTime }}-->
|
||||
<!-- </DescriptionsItem>-->
|
||||
|
||||
|
||||
<DescriptionsItem label="备注" :span="2">
|
||||
@@ -101,12 +116,15 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="完成时间">
|
||||
{{ orderDetail.compleTime }}
|
||||
</DescriptionsItem>
|
||||
|
||||
<DescriptionsItem label="是否超时" v-if="orderDetail.isTimeOut!=null">
|
||||
<component
|
||||
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
|
||||
<DescriptionsItem label="是否超时" :span="2">
|
||||
<component v-if="orderDetail.isTimeOut!=null"
|
||||
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgPath" :span="2">
|
||||
<img v-for="item in orderDetail.orderImgPath" :src="item" alt="图片加载失败"
|
||||
class="orders-img"/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务评价" v-if="orderDetail.serviceEvalua!=null" :span="2">
|
||||
<Rate :value="orderDetail.serviceEvalua" disabled/>
|
||||
</DescriptionsItem>
|
||||
@@ -114,10 +132,8 @@ async function handleOpenChange(open: boolean) {
|
||||
{{ orderDetail.serviceEvaluaText }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="评价图片" v-if="orderDetail.evaluateImgPath" :span="2">
|
||||
<img :src="orderDetail.evaluateImgPath" alt="图片加载失败" class="w-[100px] h-[100px]"/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgPath" :span="2">
|
||||
<img :src="orderDetail.orderImgPath" alt="图片加载失败" class="w-[100px] h-[100px]"/>
|
||||
<img v-for="item in orderDetail.evaluateImgPath" :src="item" alt="图片加载失败"
|
||||
class="orders-img"/>
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
<Divider orientation="left" orientation-margin="0px">
|
||||
@@ -125,14 +141,22 @@ async function handleOpenChange(open: boolean) {
|
||||
</Divider>
|
||||
<Timeline>
|
||||
<TimelineItem v-for="(item,index) in handleRecords" :key="index">
|
||||
<p style="display: flex;">类型:
|
||||
<component
|
||||
:is="renderDict(item.status,'wy_gdclzt')"
|
||||
/></p>
|
||||
<p>时间:{{item.createTime}}</p>
|
||||
<p>处理人:{{item.handlerName}}</p>
|
||||
<p style="display: flex;">类型:
|
||||
<component v-if="item.status!=null"
|
||||
:is="renderDict(item.status,'wy_gdclzt')"
|
||||
/>
|
||||
</p>
|
||||
<p>时间:{{ item.createTime }}</p>
|
||||
<p>处理人:{{ item.handlerName }}</p>
|
||||
</TimelineItem>
|
||||
</Timeline>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.orders-img {
|
||||
width: 100px;
|
||||
margin: 5px 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
@@ -15,6 +15,7 @@ import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||
|
||||
import {modalSchema} from './data';
|
||||
import {workOrdersTypeTree} from "#/api/property/businessManagement/workOrdersType";
|
||||
import type {WorkOrdersTypeVO} from "#/api/property/businessManagement/workOrdersType/model";
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
@@ -108,7 +109,7 @@ async function queryWorkOrdersType() {
|
||||
const options = await workOrdersTypeTree()
|
||||
formApi.updateSchema([
|
||||
{
|
||||
componentProps: () => ({
|
||||
componentProps: (formModel) => ({
|
||||
class: 'w-full',
|
||||
fieldNames: {
|
||||
key: 'id',
|
||||
@@ -123,16 +124,15 @@ async function queryWorkOrdersType() {
|
||||
treeLine: { showLeafIcon: false },
|
||||
treeNodeFilterProp: 'orderTypeName',
|
||||
treeNodeLabelProp: 'orderTypeName',
|
||||
async onSelect(type:string,node:WorkOrdersTypeVO) {
|
||||
formModel.processingWeight = node.processingWeight;
|
||||
},
|
||||
}),
|
||||
fieldName: 'type',
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
const filterOption = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@@ -46,6 +46,16 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
width:180,
|
||||
},
|
||||
{
|
||||
title: '处理优先级',
|
||||
field: 'processingWeight',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return row.processingWeight!=null?renderDict(row.processingWeight, 'pro_processing_weight'):'';
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '排序值',
|
||||
field: 'sort',
|
||||
@@ -105,6 +115,15 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '处理优先级',
|
||||
fieldName: 'processingWeight',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_processing_weight'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '完成时效(小时)',
|
||||
fieldName: 'completionNumber',
|
||||
|
@@ -37,11 +37,16 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="类型名称">
|
||||
{{ workOrdersTypeInfoDetail.orderTypeName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="运作模式" v-if="workOrdersTypeInfoDetail.operationMode!=null">
|
||||
<component
|
||||
<DescriptionsItem label="运作模式" >
|
||||
<component v-if="workOrdersTypeInfoDetail.operationMode!=null"
|
||||
:is="renderDict(workOrdersTypeInfoDetail.operationMode,'pro_operation_pattern')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理优先级">
|
||||
<component v-if="workOrdersTypeInfoDetail.processingWeight!=null"
|
||||
:is="renderDict(workOrdersTypeInfoDetail.processingWeight,'pro_processing_weight')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="排序值">
|
||||
{{ workOrdersTypeInfoDetail.sort }}
|
||||
</DescriptionsItem>
|
||||
|
Reference in New Issue
Block a user