微调
This commit is contained in:
@@ -172,6 +172,19 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
width: 200,
|
||||
render: scope => {
|
||||
if (scope.row.createTime) {
|
||||
const date = new Date(scope.row.createTime);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||
])
|
||||
@@ -193,20 +206,10 @@ const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
||||
// 批量删除设备
|
||||
const batchDelete = async (id: string[]) => {
|
||||
const patternId = dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? ''//获取数据字典中对应的id
|
||||
const result = await useHandleData(deletePqDev, { 'ids': id, 'pattern': patternId }, '删除所选设备')
|
||||
console.log(result)
|
||||
if(result.code != 'A0000'){
|
||||
proTable.value?.clearSelection()
|
||||
ElMessage.error('1')
|
||||
console.log('1')
|
||||
}else{
|
||||
ElMessage.error('12')
|
||||
console.log('12')
|
||||
proTable.value?.clearSelection()
|
||||
proTable.value?.getTableList()
|
||||
}
|
||||
|
||||
await useHandleData(deletePqDev, { 'ids': id, 'pattern': patternId }, '删除所选设备')
|
||||
|
||||
proTable.value?.clearSelection()
|
||||
proTable.value?.getTableList()
|
||||
}
|
||||
|
||||
// 删除设备
|
||||
@@ -214,6 +217,7 @@ const handleDelete = async (params: Device.ResPqDev) => {
|
||||
const patternId = dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id//获取数据字典中对应的id
|
||||
await useHandleData(deletePqDev, { 'ids': [params.id], 'pattern': patternId }, `删除【${params.name}】设备`)
|
||||
proTable.value?.getTableList()
|
||||
|
||||
}
|
||||
|
||||
// 导出设备
|
||||
|
||||
@@ -122,7 +122,7 @@ const open = async (sign: string,row: any,currentMode: string,id:string) => {
|
||||
}
|
||||
});
|
||||
|
||||
console.log('secondLevelOptions',secondLevelOptions);
|
||||
//console.log('secondLevelOptions',secondLevelOptions);
|
||||
|
||||
if(id != ''){//新增的时候才会重新赋值值类型
|
||||
formContent.value.valueType = id
|
||||
|
||||
Reference in New Issue
Block a user