访客修改
This commit is contained in:
parent
14d70b22d1
commit
7ad4613fc8
@ -24,6 +24,14 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
fieldName: 'status',
|
fieldName: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_processing_weight'),
|
||||||
|
},
|
||||||
|
fieldName: 'processingWeight',
|
||||||
|
label: '处理权重',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
@ -148,6 +156,15 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
componentProps: {},
|
componentProps: {},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '处理权重',
|
||||||
|
fieldName: 'processingWeight',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_processing_weight'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// label: '状态',
|
// label: '状态',
|
||||||
// fieldName: 'status',
|
// fieldName: 'status',
|
||||||
@ -216,9 +233,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
fieldName: 'remarkremark',
|
fieldName: 'remark',
|
||||||
component: 'Textarea',
|
component: 'Textarea',
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// label: '是否超时',
|
// label: '是否超时',
|
||||||
@ -230,6 +246,15 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
// },
|
// },
|
||||||
// rules: 'selectRequired',
|
// rules: 'selectRequired',
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
label: '工单图片',
|
||||||
|
fieldName: 'orderImgUrl',
|
||||||
|
component: 'ImageUpload',
|
||||||
|
componentProps: {
|
||||||
|
maxCount: 1,
|
||||||
|
},
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
export const ordersModalSchema: FormSchemaGetter = () => [
|
export const ordersModalSchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
|
@ -77,6 +77,11 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<DescriptionsItem label="完成时间">
|
<DescriptionsItem label="完成时间">
|
||||||
{{ orderDetail.compleTime }}
|
{{ orderDetail.compleTime }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="处理权重">
|
||||||
|
<component
|
||||||
|
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="是否超时" v-if="orderDetail.isTimeOut!=null">
|
<DescriptionsItem label="是否超时" v-if="orderDetail.isTimeOut!=null">
|
||||||
<component
|
<component
|
||||||
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
|
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
|
||||||
@ -91,6 +96,9 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<DescriptionsItem label="评价图片" v-if="orderDetail.imgUrl" :span="2">
|
<DescriptionsItem label="评价图片" v-if="orderDetail.imgUrl" :span="2">
|
||||||
{{ orderDetail.imgUrl }}
|
{{ orderDetail.imgUrl }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgUrl" :span="2">
|
||||||
|
{{ orderDetail.orderImgUrl }}
|
||||||
|
</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
<Divider orientation="left" orientation-margin="0px">
|
<Divider orientation="left" orientation-margin="0px">
|
||||||
处理记录
|
处理记录
|
||||||
|
@ -62,7 +62,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
}
|
}
|
||||||
modalApi.modalLoading(true);
|
modalApi.modalLoading(true);
|
||||||
await queryPersonData()
|
await queryPersonData()
|
||||||
await queryWorkOrdersType()
|
|
||||||
const {id} = modalApi.getData() as { id?: number | string };
|
const {id} = modalApi.getData() as { id?: number | string };
|
||||||
isUpdate.value = !!id;
|
isUpdate.value = !!id;
|
||||||
|
|
||||||
@ -134,30 +134,6 @@ async function queryPersonData() {
|
|||||||
}])
|
}])
|
||||||
}
|
}
|
||||||
|
|
||||||
async function queryWorkOrdersType() {
|
|
||||||
let params = {
|
|
||||||
pageSize: 1000,
|
|
||||||
pageNum: 1
|
|
||||||
}
|
|
||||||
const res = await workOrdersTypeList(params)
|
|
||||||
const options = res.rows.map((item) => ({
|
|
||||||
label: item.orderTypeName,
|
|
||||||
value: item.id,
|
|
||||||
}));
|
|
||||||
formApi.updateSchema([{
|
|
||||||
componentProps: () => ({
|
|
||||||
options: options,
|
|
||||||
filterOption: filterOption,
|
|
||||||
showSearch:true,
|
|
||||||
}),
|
|
||||||
fieldName: 'type',
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
const filterOption = (input: string, option: any) => {
|
|
||||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -10,6 +10,7 @@ import { inspectionPointAdd, inspectionPointInfo, inspectionPointUpdate } from '
|
|||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
|
import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType";
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
@ -53,7 +54,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
modalApi.modalLoading(true);
|
modalApi.modalLoading(true);
|
||||||
|
await queryWorkOrdersType()
|
||||||
const { id } = modalApi.getData() as { id?: number | string };
|
const { id } = modalApi.getData() as { id?: number | string };
|
||||||
isUpdate.value = !!id;
|
isUpdate.value = !!id;
|
||||||
|
|
||||||
@ -91,6 +92,31 @@ async function handleClosed() {
|
|||||||
await formApi.resetForm();
|
await formApi.resetForm();
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function queryWorkOrdersType() {
|
||||||
|
let params = {
|
||||||
|
pageSize: 1000,
|
||||||
|
pageNum: 1
|
||||||
|
}
|
||||||
|
const res = await workOrdersTypeList(params)
|
||||||
|
const options = res.rows.map((item) => ({
|
||||||
|
label: item.orderTypeName,
|
||||||
|
value: item.id,
|
||||||
|
}));
|
||||||
|
formApi.updateSchema([{
|
||||||
|
componentProps: () => ({
|
||||||
|
options: options,
|
||||||
|
filterOption: filterOption,
|
||||||
|
showSearch:true,
|
||||||
|
}),
|
||||||
|
fieldName: 'type',
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
|
||||||
|
const filterOption = (input: string, option: any) => {
|
||||||
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import {type FormSchemaGetter, z} from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
|
|
||||||
@ -61,6 +61,16 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '巡检点',
|
||||||
|
fieldName: 'pointId',
|
||||||
|
component: 'ApiSelect',
|
||||||
|
componentProps:{
|
||||||
|
mode: 'multiple',
|
||||||
|
},
|
||||||
|
rules: z.array(z.string()).min(1, { message: '请选择' }),
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
fieldName: 'remark',
|
fieldName: 'remark',
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { inspectionRouteAdd, inspectionRouteInfo, inspectionRouteUpdate } from '#/api/property/inspectionManagement/inspectionRoute';
|
import { inspectionRouteAdd, inspectionRouteInfo, inspectionRouteUpdate } from '#/api/property/inspectionManagement/inspectionRoute';
|
||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
import {
|
||||||
|
inspectionPointList,
|
||||||
|
} from '#/api/property/inspectionManagement/inspectionPoint';
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
@ -21,7 +21,7 @@ const title = computed(() => {
|
|||||||
const [BasicForm, formApi] = useVbenForm({
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
// 默认占满两列
|
// 默认占满两列
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-1',
|
||||||
// 默认label宽度 px
|
// 默认label宽度 px
|
||||||
labelWidth: 100,
|
labelWidth: 100,
|
||||||
// 通用配置项 会影响到所有表单项
|
// 通用配置项 会影响到所有表单项
|
||||||
@ -43,7 +43,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
|||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
// 在这里更改宽度
|
// 在这里更改宽度
|
||||||
class: 'w-[550px]',
|
class: 'w-[60%]',
|
||||||
fullscreenButton: false,
|
fullscreenButton: false,
|
||||||
onBeforeClose,
|
onBeforeClose,
|
||||||
onClosed: handleClosed,
|
onClosed: handleClosed,
|
||||||
@ -53,12 +53,13 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
modalApi.modalLoading(true);
|
modalApi.modalLoading(true);
|
||||||
|
await queryWorkOrdersType()
|
||||||
const { id } = modalApi.getData() as { id?: number | string };
|
const { id } = modalApi.getData() as { id?: number | string };
|
||||||
isUpdate.value = !!id;
|
isUpdate.value = !!id;
|
||||||
|
|
||||||
if (isUpdate.value && id) {
|
if (isUpdate.value && id) {
|
||||||
const record = await inspectionRouteInfo(id);
|
const record = await inspectionRouteInfo(id);
|
||||||
|
record.pointId = record.pointId?.split(',')
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
}
|
}
|
||||||
await markInitialized();
|
await markInitialized();
|
||||||
@ -76,6 +77,7 @@ async function handleConfirm() {
|
|||||||
}
|
}
|
||||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
|
data.pointId = data.pointId?.join(',')
|
||||||
await (isUpdate.value ? inspectionRouteUpdate(data) : inspectionRouteAdd(data));
|
await (isUpdate.value ? inspectionRouteUpdate(data) : inspectionRouteAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
@ -91,6 +93,31 @@ async function handleClosed() {
|
|||||||
await formApi.resetForm();
|
await formApi.resetForm();
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function queryWorkOrdersType() {
|
||||||
|
let params = {
|
||||||
|
pageSize: 1000,
|
||||||
|
pageNum: 1
|
||||||
|
}
|
||||||
|
const res = await inspectionPointList(params)
|
||||||
|
const options = res.rows.map((item) => ({
|
||||||
|
label: item.pointName,
|
||||||
|
value: item.id,
|
||||||
|
}));
|
||||||
|
formApi.updateSchema([{
|
||||||
|
componentProps: () => ({
|
||||||
|
options: options,
|
||||||
|
showSearch: true,
|
||||||
|
filterOption: filterOption,
|
||||||
|
mode: 'multiple',
|
||||||
|
}),
|
||||||
|
fieldName: 'pointId',
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
|
||||||
|
const filterOption = (input: string, option: any) => {
|
||||||
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
Reference in New Issue
Block a user