微调
This commit is contained in:
@@ -64,7 +64,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
{
|
||||
prop: 'name',
|
||||
label: '名称',
|
||||
search: { el: 'input',order:2,offset:0.1},
|
||||
search: { el: 'input'},
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
@@ -74,36 +74,12 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
fieldNames: { label: 'name', value: 'code' },
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
prop: 'devChns',
|
||||
label: '设备通道数',
|
||||
minWidth: 110,
|
||||
},
|
||||
{
|
||||
prop: 'devVolt',
|
||||
label: '额定电压(V)',
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
prop: 'devCurr',
|
||||
label: '额定电流(A)',
|
||||
minWidth: 130,
|
||||
|
||||
},
|
||||
{
|
||||
prop: 'manufacturer',
|
||||
label: '生产厂商',
|
||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||
search: { el: 'select', props: { filterable: true }},
|
||||
fieldNames: { label: 'name', value: 'code' },
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
prop: 'createDate',
|
||||
label: '生产日期',
|
||||
minWidth: 200,
|
||||
search: {
|
||||
order:1,
|
||||
span:2,
|
||||
render: () => {
|
||||
return (
|
||||
<div class='flx-flex-start'>
|
||||
@@ -117,6 +93,38 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'devChns',
|
||||
label: '设备通道数',
|
||||
minWidth: 110,
|
||||
render: scope => {
|
||||
return String(scope.row.devChns) // 将数字转换为字符串
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'devVolt',
|
||||
label: '额定电压(V)',
|
||||
minWidth: 130,
|
||||
render: scope => {
|
||||
return String(scope.row.devVolt) // 将数字转换为字符串
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'devCurr',
|
||||
label: '额定电流(A)',
|
||||
minWidth: 130,
|
||||
render: scope => {
|
||||
return String(scope.row.devCurr) // 将数字转换为字符串
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'manufacturer',
|
||||
label: '生产厂商',
|
||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||
search: { el: 'select', props: { filterable: true },order:1},
|
||||
fieldNames: { label: 'name', value: 'code' },
|
||||
minWidth: 200,
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||
])
|
||||
|
||||
@@ -127,13 +135,10 @@ const endDate = ref('')
|
||||
const handleDateChange = (startDateTemp: string, endDateTemp: string) => {
|
||||
startDate.value = startDateTemp
|
||||
endDate.value = endDateTemp
|
||||
//console.log(startDateTemp)
|
||||
//console.log(endDateTemp)
|
||||
}
|
||||
// 打开 drawer(新增、编辑)
|
||||
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
||||
devicePopup.value?.open(titleType, row)
|
||||
console.log(columns)
|
||||
}
|
||||
|
||||
// 批量删除设备
|
||||
@@ -150,9 +155,16 @@ const handleDelete = async (params: Device.ResPqDev) => {
|
||||
}
|
||||
|
||||
// 导出设备
|
||||
const downloadFile = async () => {
|
||||
const downloadFile = async (params: Device.ReqPqDevParams) => {
|
||||
// 获取当前的搜索参数
|
||||
const searchParam = proTable.value?.searchParam || {};
|
||||
|
||||
// 将开始时间和结束时间添加到搜索参数中
|
||||
searchParam.searchBeginTime = startDate.value;
|
||||
searchParam.searchEndTime = endDate.value;
|
||||
|
||||
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>
|
||||
useDownload(exportPqDev, '被检设备导出数据', proTable.value?.searchParam, false,'.xlsx'),
|
||||
useDownload(exportPqDev,'被检设备导出数据', proTable.value?.searchParam, false,'.xlsx'),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user