Browse Source

优化修改

develop
fuguobin 8 months ago
parent
commit
a0a9d8dd0b
  1. 4
      src/types/auto-imports.d.ts
  2. 16
      src/views/monitoring/screen/components/main.vue
  3. 16
      src/views/monitoring/screenData/components/main.vue

4
src/types/auto-imports.d.ts

@ -2,9 +2,11 @@
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const ElForm: typeof import('element-plus/es')['ElForm']
const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const ElNotification: typeof import('element-plus/es')['ElNotification']
const NEllipsis: typeof import('naive-ui')['NEllipsis']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const computed: typeof import('vue')['computed']
@ -271,9 +273,11 @@ import { UnwrapRef } from 'vue'
declare module 'vue' {
interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly ElForm: UnwrapRef<typeof import('element-plus/es')['ElForm']>
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly ElNotification: UnwrapRef<typeof import('element-plus/es')['ElNotification']>
readonly NEllipsis: UnwrapRef<typeof import('naive-ui')['NEllipsis']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
readonly computed: UnwrapRef<typeof import('vue')['computed']>

16
src/views/monitoring/screen/components/main.vue

@ -439,7 +439,7 @@ function tableDatas() {
});
}
const cellDBLClickEvent: VxeTableEvents.CellDblclick<TableVo> = ({ row, column }) => {
const cellDBLClickEvent: VxeTableEvents.CellDblclick<any> = ({ row, column }) => {
//
//edit ty zhousq 2023-10-12 formdata
// ctrlPro.centeruuid UUID cellField.ctrlPro.paramcode cellField.val
@ -487,7 +487,7 @@ const formatRole: VxeColumnPropTypes.Formatter<HeaderVo> = ({ cellValue }) => {
};
//
const mergeRowMethod: VxeTablePropTypes.SpanMethod<TableVo> = ({ row, _rowIndex, column, visibleData }) => {
const mergeRowMethod: VxeTablePropTypes.SpanMethod<any> = ({ row, _rowIndex, column, visibleData }) => {
// console.log(':', useDateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss').value);
const fields = ['gTitle'];
const cellValue = row[column.field];
@ -525,12 +525,12 @@ const submitEvent: VxeFormEvents.Submit = () => {
formLoading.value = false;
editModal.value = false;
if ($table) {
const row = cellRow.value;
const field = cellColumn.value.field;
row[field].val = formData.value.value;
$table.reloadRow(row, null, field);
}
// if ($table) {
// const row = cellRow.value;
// const field = cellColumn.value.field;
// row[field].val = formData.value.value;
// $table.reloadRow(row, null, field);
// }
// VXETable.modal.message({ content: '', status: 'success' });
};

16
src/views/monitoring/screenData/components/main.vue

@ -469,7 +469,7 @@ function asyncTableDatas() {
});
}
const cellDBLClickEvent: VxeTableEvents.CellDblclick<TableVo> = ({ row, column }) => {
const cellDBLClickEvent: VxeTableEvents.CellDblclick<any> = ({ row, column }) => {
//
//edit ty zhousq 2023-10-12 formdata
// ctrlPro.centeruuid UUID cellField.ctrlPro.paramcode cellField.val
@ -515,7 +515,7 @@ const formatRole: VxeColumnPropTypes.Formatter<HeaderVo> = ({ cellValue }) => {
};
//
const mergeRowMethod: VxeTablePropTypes.SpanMethod<TableVo> = ({ row, _rowIndex, column, visibleData }) => {
const mergeRowMethod: VxeTablePropTypes.SpanMethod<any> = ({ row, _rowIndex, column, visibleData }) => {
const fields = ['gTitle'];
const cellValue = row[column.field];
if (cellValue && fields.includes(column.field)) {
@ -551,12 +551,12 @@ const submitEvent: VxeFormEvents.Submit = () => {
formLoading.value = false;
editModal.value = false;
if ($table) {
const row = cellRow.value;
const field = cellColumn.value.field;
row[field].val = formData.value.value;
$table.reloadRow(row, null, field);
}
// if ($table) {
// const row = cellRow.value;
// const field = cellColumn.value.field;
// row[field].val = formData.value.value;
// $table.reloadRow(row, null, field);
// }
// VXETable.modal.message({ content: '', status: 'success' });
};

Loading…
Cancel
Save