This commit is contained in:
@@ -89,7 +89,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'inspectResult',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.inspectResult, 'pro_inspection_results');
|
||||
return row.inspectResult!=null? renderDict(row.inspectResult, 'pro_inspection_results'):'';
|
||||
},
|
||||
},
|
||||
minWidth: '120',
|
||||
@@ -152,6 +152,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
labelWidth: 100,
|
||||
formItemClass:'col-span-2'
|
||||
},
|
||||
{
|
||||
label: '服务地点',
|
||||
@@ -160,6 +161,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
defaultValue: undefined,
|
||||
rules: 'required',
|
||||
labelWidth: 100,
|
||||
formItemClass:'col-span-2'
|
||||
},
|
||||
{
|
||||
label: '服务类型',
|
||||
@@ -226,50 +228,51 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
rules: 'required',
|
||||
labelWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '巡检结果',
|
||||
fieldName: 'inspectResult',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_inspection_results'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
labelWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '处理措施',
|
||||
fieldName: 'measure',
|
||||
component: 'Textarea',
|
||||
rules: 'required',
|
||||
labelWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '客户评分',
|
||||
fieldName: 'customerScore',
|
||||
component: 'Rate',
|
||||
componentProps: {
|
||||
allowHalf: false,
|
||||
count: 5,
|
||||
tooltips: ['1星', '2星', '3星', '4星', '5星'],
|
||||
defaultValue: 0,
|
||||
},
|
||||
rules: 'required',
|
||||
labelWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '客户反馈',
|
||||
fieldName: 'customerAdvice',
|
||||
component: 'Textarea',
|
||||
labelWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '处理状态',
|
||||
fieldName: 'state',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_processing_status'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
labelWidth: 100,
|
||||
},
|
||||
//
|
||||
// {
|
||||
// label: '巡检结果',
|
||||
// fieldName: 'inspectResult',
|
||||
// component: 'Select',
|
||||
// componentProps: {
|
||||
// options: getDictOptions('pro_inspection_results'),
|
||||
// },
|
||||
// rules: 'selectRequired',
|
||||
// labelWidth: 100,
|
||||
// },
|
||||
// {
|
||||
// label: '处理措施',
|
||||
// fieldName: 'measure',
|
||||
// component: 'Textarea',
|
||||
// rules: 'required',
|
||||
// labelWidth: 100,
|
||||
// },
|
||||
// {
|
||||
// label: '客户评分',
|
||||
// fieldName: 'customerScore',
|
||||
// component: 'Rate',
|
||||
// componentProps: {
|
||||
// allowHalf: false,
|
||||
// count: 5,
|
||||
// tooltips: ['1星', '2星', '3星', '4星', '5星'],
|
||||
// defaultValue: 0,
|
||||
// },
|
||||
// rules: 'required',
|
||||
// labelWidth: 100,
|
||||
// },
|
||||
// {
|
||||
// label: '客户反馈',
|
||||
// fieldName: 'customerAdvice',
|
||||
// component: 'Textarea',
|
||||
// labelWidth: 100,
|
||||
// },
|
||||
// {
|
||||
// label: '处理状态',
|
||||
// fieldName: 'state',
|
||||
// component: 'Select',
|
||||
// componentProps: {
|
||||
// options: getDictOptions('pro_processing_status'),
|
||||
// },
|
||||
// rules: 'selectRequired',
|
||||
// labelWidth: 100,
|
||||
// },
|
||||
];
|
||||
|
@@ -5,6 +5,7 @@ import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import {plantsProductInfo} from '#/api/property/productManagement';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {ossInfo} from "#/api/system/oss";
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
@@ -21,8 +22,11 @@ async function handleOpenChange(open: boolean) {
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await plantsProductInfo(id);
|
||||
plantsProductDetail.value = response;
|
||||
plantsProductDetail.value = await plantsProductInfo(id);
|
||||
if(plantsProductDetail.value.imgPath){
|
||||
const res = await ossInfo([plantsProductDetail.value.imgPath]);
|
||||
plantsProductDetail.value.plantImg = res?.[0]?.url
|
||||
}
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
@@ -56,7 +60,7 @@ async function handleOpenChange(open: boolean) {
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产品图片">
|
||||
<img :src="plantsProductDetail.imgPath" alt="">
|
||||
<img v-if="plantsProductDetail.plantImg" :src="plantsProductDetail.plantImg" alt="图片加载失败" class="w-[100px] h-[100px]" />
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="备注">
|
||||
{{ plantsProductDetail.remark }}
|
||||
|
Reference in New Issue
Block a user