账号新增后高亮5秒//测试运营工作台围栏显示点位可运营数量//车辆新增布局优化
3个文件已修改
77 ■■■■■ 已修改文件
src/views/assetManagement/vehicleManagement/inventoryVehicle/add.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/accountPermission/accountManagement/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/testDemo/operationWorkbench/components/FencePanel.vue 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/assetManagement/vehicleManagement/inventoryVehicle/add.vue
@@ -23,6 +23,7 @@
const vehicleFormRef = ref<FormInst | null>(null)
const supplementFormRef = ref<FormInst | null>(null)
const gpsFormRef = ref<FormInst | null>(null)
const completeInfoFormRef = ref<FormInst | null>(null)
const otherInfoFormRef = ref<FormInst | null>(null)
@@ -160,6 +161,12 @@
  return Number.isNaN(timestamp) ? null : timestamp
}
function toStringOrEmpty(value: unknown) {
  if (value === null || value === undefined || value === '')
    return ''
  return String(value)
}
function syncOperationAreaValue() {
  if (
    currentOperationElectronicId.value === null
@@ -236,7 +243,7 @@
      insuranceCompany: data.insuranceCompany || '',
      insuranceNo: data.insuranceNo || '',
      insuranceType: toNumberOrNull(data.insuranceType),
      insuranceAmount: data.insuranceAmount || '',
      insuranceAmount: toStringOrEmpty(data.insuranceAmount),
      insuranceEffectiveTime: toTimestampOrNull(data.insuranceStartTime || data.insuranceEffectiveTime),
      insuranceEndTime: toTimestampOrNull(data.insuranceEndTime),
      onlineCarLicenseExpireDate: toTimestampOrNull(data.qualificationExpireTime || data.onlineCarLicenseExpireDate),
@@ -355,6 +362,7 @@
})
const onlyAllowNumberAndDash = (value: string) => !value || /^[\d-]+$/.test(value)
const onlyAllowAmountInput = (value: string) => !value || /^\d*(\.\d{0,2})?$/.test(value)
// 表单验证规则
const formRules: FormRules = {
@@ -444,7 +452,19 @@
    { max: 50, message: '保单号长度不能超过50位', trigger: ['blur', 'input'] },
  ],
  insuranceAmount: [
    { max: 20, message: '保险金额长度不能超过20位', trigger: ['blur', 'input'] },
    {
      validator: (rule, value) => {
        if (value === null || value === undefined || value === '')
          return true
        const amount = String(value).trim()
        if (amount.length > 20)
          return new Error('保险金额长度不能超过20位')
        if (!/^\d+(\.\d{1,2})?$/.test(amount))
          return new Error('保险金额仅支持数字,最多保留2位小数')
        return true
      },
      trigger: ['blur', 'input'],
    },
  ],
  insuranceEndTime: [
    {
@@ -639,6 +659,7 @@
  try {
    await vehicleFormRef.value?.validate()
    await supplementFormRef.value?.validate()
    await gpsFormRef.value?.validate()
    await completeInfoFormRef.value?.validate()
    await otherInfoFormRef.value?.validate()
  }
@@ -677,7 +698,7 @@
      insuranceCompany: formModel.value.insuranceCompany,
      insuranceNo: formModel.value.insuranceNo,
      insuranceType: formModel.value.insuranceType,
      insuranceAmount: Number(formModel.value.insuranceAmount),
      insuranceAmount: formModel.value.insuranceAmount === '' ? null : Number(formModel.value.insuranceAmount),
      insuranceStartTime: formModel.value.insuranceEffectiveTime ? dayjs(formModel.value.insuranceEffectiveTime).format('YYYY-MM-DD HH:mm:ss') : null,
      insuranceEndTime: formModel.value.insuranceEndTime ? dayjs(formModel.value.insuranceEndTime).format('YYYY-MM-DD HH:mm:ss') : null,
      qualificationExpireTime: formModel.value.onlineCarLicenseExpireDate ? dayjs(formModel.value.onlineCarLicenseExpireDate).format('YYYY-MM-DD HH:mm:ss') : null,
@@ -1210,10 +1231,24 @@
          
          <div class="sub-section-title">
        </n-form>
      </n-card>
      <n-card :bordered="false" class="section-card">
        <div class="section-header">
          <div class="section-title">
            卫星定位装置信息
          </div>
        </div>
        <n-form
          ref="gpsFormRef"
          :model="formModel"
          :rules="formRules"
          label-placement="left"
          label-align="left"
          in-line
          require-mark-placement="left"
        >
          <n-grid :cols="4" :x-gap="24" :y-gap="8">
            <n-gi>
              <n-form-item label="品牌" path="gpsBrand">
@@ -1257,15 +1292,6 @@
            </n-gi>
          </n-grid>
        </n-form>
      </n-card>
      <n-card :bordered="false" class="section-card">
        <!-- <div class="section-header">
          <div class="section-title">
            补充信息
          </div>
        </div> -->
      </n-card>
      <n-card :bordered="false" class="section-card">
@@ -1340,7 +1366,7 @@
                  v-model:value="formModel.insuranceAmount"
                  placeholder="请输入"
                  clearable
                  :allow-input="onlyAllowNumberAndDash"
                  :allow-input="onlyAllowAmountInput"
                />
              </n-form-item>
            </n-gi>
src/views/system/accountPermission/accountManagement/index.vue
@@ -39,12 +39,14 @@
  pageSize: 10,
})
function handleResetSearch() {
  clearHighlight()
  model.value = { ...initialModel }
  pageParams.value.pageNum = 1
  getAccountList()
}
function handleSearch() {
  clearHighlight()
  pageParams.value.pageNum = 1
  getAccountList()
}
@@ -59,6 +61,7 @@
const selectedRowKeys = ref<Array<string | number>>([])
const highlightedRowId = ref<string | number | null>(null)
const highlightedUserAccount = ref<string | null>(null)
let highlightTimer: ReturnType<typeof setTimeout> | null = null
const count = ref(0)
const listData = ref<any[]>([])
@@ -392,9 +395,25 @@
  }
}
function clearHighlight() {
  highlightedRowId.value = null
  highlightedUserAccount.value = null
  if (highlightTimer) {
    clearTimeout(highlightTimer)
    highlightTimer = null
  }
}
function highlightRow(payload?: { id?: string | number | null, userAccount?: string | null }) {
  clearHighlight()
  highlightedRowId.value = payload?.id ?? null
  highlightedUserAccount.value = payload?.userAccount?.trim() || null
  if (highlightedRowId.value || highlightedUserAccount.value) {
    highlightTimer = setTimeout(() => {
      clearHighlight()
    }, 5000)
  }
}
function syncHighlightedRow() {
@@ -426,6 +445,7 @@
}
function changePage(page: number, size: number) {
  clearHighlight()
  const sizeChanged = size !== pageParams.value.pageSize
  pageParams.value.pageSize = size
  pageParams.value.pageNum = sizeChanged ? 1 : page
src/views/testDemo/operationWorkbench/components/FencePanel.vue
@@ -151,6 +151,7 @@
  return [
    ...baseItems,
    { label: "可运营", value: getStatNumber(source?.canOperate), color: "success" },
    { label: "待测试", value: getStatNumber(source?.toBeTested), color: "info" },
    { label: "测试中", value: getStatNumber(source?.testing), color: "info" },
    {