update 基本完成设备信息的编辑和新增
Cette révision appartient à :
Parent
f17fab4749
révision
3e42b99996
@ -38,7 +38,11 @@
|
||||
:props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
|
||||
></el-cascader>
|
||||
<el-time-select v-if="getType(n, c) === 'time'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"></el-time-select>
|
||||
<el-date-picker v-if="getType(n, c) === 'date'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"></el-date-picker>
|
||||
<el-date-picker
|
||||
v-if="getType(n, c) === 'date'"
|
||||
v-bind="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
|
||||
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -322,6 +326,8 @@ export default {
|
||||
return 'select'
|
||||
} else if (['cascader'].includes(opt.type)) {
|
||||
return 'cascader'
|
||||
} else if (['date'].includes(opt.type)) {
|
||||
return 'date'
|
||||
}
|
||||
// add more...
|
||||
} else {
|
||||
|
@ -9,8 +9,8 @@
|
||||
:on-preview="handleDownload"
|
||||
:on-remove="handleRemove"
|
||||
:before-upload="/.*?image.*?/i.test(extraParams.typeCode) ? validateImage : validateFile"
|
||||
:before-remove="beforeRemove"
|
||||
>
|
||||
<!-- :before-remove="beforeRemove" -->
|
||||
<!-- accept="image/*" -->
|
||||
<!-- <el-upload class="yd-upload" :action="$http.adornUrl(url)" multiple name="files" :data="extraParams" :file-list="fileList" :on-remove="handleRemove" :before-remove="beforeRemove"> -->
|
||||
<el-button size="small" type="primary">{{ buttonContent }}</el-button>
|
||||
@ -97,7 +97,7 @@ export default {
|
||||
|
||||
/** 大小验证,由配置文件开启 */
|
||||
validateFile(file) {
|
||||
console.log("[*] 验证文件大小")
|
||||
console.log('[*] 验证文件大小')
|
||||
|
||||
const isRightSize = file.size / 1024 / 1024 < 2
|
||||
if (!isRightSize) {
|
||||
@ -109,7 +109,7 @@ export default {
|
||||
|
||||
/** 图片验证,由配置文件开启 */
|
||||
validateImage(file) {
|
||||
console.log("[*] 验证图片")
|
||||
console.log('[*] 验证图片')
|
||||
|
||||
const isRightSize = file.size / 1024 / 1024 < 2
|
||||
if (!isRightSize) {
|
||||
|
@ -66,8 +66,32 @@ const addOrUpdateConfigs = {
|
||||
{ name: 'abbr', label: '缩写' },
|
||||
{ name: 'equipmentTypeId', label: '设备类型', required: true, type: 'select', options: [] },
|
||||
{ name: 'groupId', label: '设备分组', required: true, type: 'select', options: [] },
|
||||
{ name: 'productionTime', label: '生产日期' },
|
||||
{ name: 'enterTime', label: '进厂日期' },
|
||||
{
|
||||
name: 'productionTime',
|
||||
label: '生产日期',
|
||||
type: 'date',
|
||||
props: {
|
||||
'type': 'date', // element-ui 的配置
|
||||
'placeholder': '请选择日期',
|
||||
'value-format': 'yyyy-MM-ddTHH:mm:ss',
|
||||
'style': {
|
||||
width: '100%'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'enterTime',
|
||||
label: '进厂日期',
|
||||
type: 'date',
|
||||
props: {
|
||||
'type': 'date', // element-ui 的配置
|
||||
'placeholder': '请选择日期',
|
||||
'value-format': 'yyyy-MM-ddTHH:mm:ss',
|
||||
'style': {
|
||||
width: '100%'
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'tvalue', label: '设备TT值', required: true, rules: [{ type: 'number', message: '请输入正确的浮点值', trigger: 'blur', transform: val => Number(val) }] },
|
||||
{ name: 'processingTime', label: '单件产品加工时间(秒)', rules: [{ type: 'number', message: '请输入正确的数值', trigger: 'blur', transform: val => Number(val) }] },
|
||||
{ name: 'manufacturer', label: '制造商' },
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user