|
@@ -1,4 +1,4 @@
|
|
-import { AddReq, CreateCrudOptionsProps,dict, CreateCrudOptionsRet, UserPageQuery } from '@fast-crud/fast-crud';
|
|
|
|
|
|
+import { AddReq, CreateCrudOptionsProps,dict, CreateCrudOptionsRet, UserPageQuery,compute } from '@fast-crud/fast-crud';
|
|
import * as api from './api';
|
|
import * as api from './api';
|
|
import { auth } from '/@/utils/authFunction';
|
|
import { auth } from '/@/utils/authFunction';
|
|
import { ja } from 'element-plus/es/locale';
|
|
import { ja } from 'element-plus/es/locale';
|
|
@@ -130,7 +130,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
minWidth: 120,
|
|
minWidth: 120,
|
|
},
|
|
},
|
|
form: {
|
|
form: {
|
|
- show:false,
|
|
|
|
|
|
+ show:true,
|
|
component: { placeholder: '请填写设备编码' },
|
|
component: { placeholder: '请填写设备编码' },
|
|
rules: [{ required: true, message: '请填写设备编码' }],
|
|
rules: [{ required: true, message: '请填写设备编码' }],
|
|
},
|
|
},
|
|
@@ -204,14 +204,14 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
}
|
|
}
|
|
},
|
|
},
|
|
damage_reason:{
|
|
damage_reason:{
|
|
- title: '报损原因',
|
|
|
|
|
|
+ title: '原因',
|
|
type: 'input',
|
|
type: 'input',
|
|
column: {
|
|
column: {
|
|
minWidth: 120,
|
|
minWidth: 120,
|
|
},
|
|
},
|
|
form: {
|
|
form: {
|
|
- component: { placeholder: '请填写报损原因' },
|
|
|
|
- rules: [{ required: false, message: '请填写报损原因' }],
|
|
|
|
|
|
+ component: { placeholder: '请填写原因' },
|
|
|
|
+ rules: [{ required: false, message: '请填写原因' }],
|
|
},
|
|
},
|
|
viewForm:{
|
|
viewForm:{
|
|
component: { placeholder: '' },
|
|
component: { placeholder: '' },
|
|
@@ -223,14 +223,26 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
type: 'input',
|
|
type: 'input',
|
|
column: {
|
|
column: {
|
|
minWidth: 120,
|
|
minWidth: 120,
|
|
|
|
+ show:compute(({ form }) => {
|
|
|
|
+ // 只有当选择了胜任力标签时才显示配置
|
|
|
|
+ return form && form.damage_type === 1;
|
|
|
|
+ })
|
|
},
|
|
},
|
|
form: {
|
|
form: {
|
|
component: { placeholder: '请填写预估维修费用' },
|
|
component: { placeholder: '请填写预估维修费用' },
|
|
rules: [{ required: false, message: '请填写预估维修费用' }],
|
|
rules: [{ required: false, message: '请填写预估维修费用' }],
|
|
|
|
+ show:compute(({ form }) => {
|
|
|
|
+ // 只有当选择了胜任力标签时才显示配置
|
|
|
|
+ return form && form.damage_type === 1;
|
|
|
|
+ })
|
|
},
|
|
},
|
|
viewForm:{
|
|
viewForm:{
|
|
component: { placeholder: '' },
|
|
component: { placeholder: '' },
|
|
rules: [{ required: true, message: '' }],
|
|
rules: [{ required: true, message: '' }],
|
|
|
|
+ show:compute(({ form }) => {
|
|
|
|
+ // 只有当选择了胜任力标签时才显示配置
|
|
|
|
+ return form && form.damage_type === 1;
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
responsible_person:{
|
|
responsible_person:{
|