JohnnyChan 1 місяць тому
батько
коміт
37f7c0bdfe

+ 1 - 1
JLHWEB/package.json

@@ -48,7 +48,7 @@
     "driver.js": "^1.3.1",
     "echarts": "^5.4.2",
     "echarts-liquidfill": "^3.1.0",
-    "element-plus": "^2.7.4",
+    "element-plus": "^2.11.4",
     "exceljs": "^4.4.0",
     "file-saver": "^2.0.5",
     "js-md5": "^0.7.3",

+ 16 - 1
JLHWEB/src/components/LjDetail/components/BaseForm.vue

@@ -3,7 +3,7 @@
     <el-form
       ref="formRef"
       :model="searchParam"
-      :label-position="publicAttr.labelPosition"
+      :label-position="isLabelPosition"
       :label-width="publicAttr.labelWidth"
       hide-required-asterisk
       :rules="rules"
@@ -1049,6 +1049,16 @@ const confirmBtnLoading = ref(false);
 // 获取响应式断点
 const gridRef = ref();
 const breakPoint = computed<BreakPoint>((): BreakPoint => gridRef.value?.breakPoint);
+const isLabelPosition = computed(() => {
+  // if (["xs", "sm"].includes(breakPoint.value)) {
+  //   return "top";
+  // }
+  let width = window.innerWidth;
+  if (width <= 1180) {
+    return "top";
+  }
+  return publicAttr.value.labelPosition;
+});
 // const breakPoint = ref("xl");
 // provide("breakPoint", breakPoint);
 //另外如果需要全局改变msg,provide接受一个方法作为参数
@@ -2729,6 +2739,11 @@ defineExpose({
       }
     }
   }
+  :deep(.el-form-item--label-top) {
+    .el-form-item__label {
+      margin-bottom: 0;
+    }
+  }
   // :deep(.el-form-item__content) {
   //   color: $color-text-secondary-text;
   //   // line-height: 22px !important;

+ 28 - 1
JLHWEB/src/components/LjDetail/index.vue

@@ -72,7 +72,7 @@ const props = withDefaults(defineProps<DetailProp>(), {
   layoutAttr: () => TABLE_LAYOUT_ATTR,
   layoutAttrDefine: () => TABLE_LAYOUT_ATTR_DEFINE,
   searchCol: () => ({ xs: 2, sm: 4, md: 5, lg: 6, xl: 6 }),
-  basicGroupCol: () => ({ xs: 3, sm: 3, md: 6, lg: 6, xl: 6 }),
+  basicGroupCol: () => ({ xs: 6, sm: 6, md: 6, lg: 6, xl: 6 }),
   autoLoadLayout: false,
   ifFoldLayout: true,
   ifLayoutEditable: true,
@@ -149,6 +149,11 @@ const currentMould = ref<any>();
 const isScrollspy = computed(() => {
   console.log("isScrollspy currentMould.value :>> ", currentMould.value);
   console.log("DETAIL_LAYOUT_DEFINE :>> ", DETAIL_LAYOUT_DEFINE);
+
+  let width = window.innerWidth;
+  if (width <= 1180) {
+    return true;
+  }
   return currentMould.value?.header?.tabsProp?.scrollspy ?? DETAIL_LAYOUT_DEFINE.tabsProp.scrollspy;
 });
 /**
@@ -1692,6 +1697,28 @@ const RenderTabs = (rProps: DetailProp) => {
               item,
               () => {
                 let val = _detailData.value && _detailData.value[item.id];
+                let _slot = [];
+                let _slotDefault = slots[item.id]?.({
+                  data: val,
+                  props: item,
+                  orderStatus: orderStatus.value,
+                  isScrollspy: isScrollspy.value,
+                  layout: currentMould.value.header
+                });
+                if (_limited) return [];
+                if (isScrollspy.value) {
+                  _slot.push(
+                    <div class="flx-col h-full" style={{ minHeight: "400px" }}>
+                      <LjHeader title={item.label}></LjHeader>
+                      {_slotDefault}
+                    </div>
+                  );
+                } else {
+                  _slot.push(_slotDefault);
+                }
+
+                return _slot;
+
                 return slots[item.id]?.({
                   data: _mainData.value,
                   props: item,

+ 25 - 3
JLHWEB/src/components/LjDrawer/index.vue

@@ -1,5 +1,11 @@
 <template>
-  <el-drawer v-model="drawer" v-bind="{ ...drawerDefineProp, ...$attrs }" :key="drawerKey" @closed="emit('closed')">
+  <el-drawer
+    v-model="drawer"
+    v-bind="{ ...drawerDefineProp, ...omit($attrs, 'size') }"
+    :size="drawerSize"
+    :key="drawerKey"
+    @closed="emit('closed')"
+  >
     <template v-for="slotKey in Object.keys($slots)" #[slotKey]="scope">
       <slot :name="slotKey" v-bind="scope"></slot>
     </template>
@@ -16,8 +22,9 @@
 </template>
 
 <script setup lang="ts" name="LjDrawer">
-import { ref, useSlots, nextTick, onMounted, onActivated, onUnmounted, onDeactivated } from "vue";
+import { ref, useSlots, nextTick, onMounted, onActivated, onUnmounted, onDeactivated, computed } from "vue";
 import type { BreakPoint } from "@/components/Grid/interface/index";
+import { omit } from "lodash-es";
 
 // // 抽屉数据模型
 // interface LjDrawerData {
@@ -38,6 +45,7 @@ interface LjDrawerProps {
    * @description 保持组件状态
    */
   keepAlive?: boolean;
+  size?: string;
 }
 const props = withDefaults(defineProps<LjDrawerProps>(), {
   keepAlive: false
@@ -49,15 +57,29 @@ const emit = defineEmits(["closed"]);
  * @description 抽屉默认属性
  */
 const drawerDefineProp: any = {
-  size: "50%",
+  // size: "50%",
   direction: "rtl",
   appendToBody: true
 };
 
+const drawerSize = ref("50%");
+
+const getDrawerSize = () => {
+  let width = window.innerWidth;
+  let _size = props?.size || "50%";
+  switch (!!width) {
+    case width <= 1180:
+      _size = "100%";
+      break;
+  }
+  drawerSize.value = _size;
+};
+
 const drawer = ref(false);
 const drawerKey = ref(0);
 const show = (refresh = false) => {
   refresh && drawerKey.value++;
+  getDrawerSize();
   drawer.value = true;
 };
 const hide = () => {

+ 81 - 26
JLHWEB/src/components/LjVxeTable/index.vue

@@ -54,7 +54,7 @@
             </el-tooltip>
 
             <!-- <el-button-group class="table-main__tool-button ml-12 mr-12"  -->
-            <el-dropdown trigger="contextmenu" ref="printerListTpDropdownRef" v-if="getToolButton('print')">
+            <!-- <el-dropdown trigger="contextmenu" ref="printerListTpDropdownRef" v-if="getToolButton('print')">
               <el-button :icon="Printer" circle @click="checkPrintTemplateList('')"> </el-button>
               <template #dropdown>
                 <el-dropdown-menu>
@@ -89,11 +89,11 @@
                   </el-dropdown-item>
                 </el-dropdown-menu>
               </template>
-            </el-dropdown>
+            </el-dropdown> -->
             <!-- <el-button class="pl-10 pr-10" :icon="Setting" @click="openPrint('')"> </el-button> -->
             <!-- </el-button-group> -->
 
-            <el-button-group class="table-main__tool-button mr-12" v-if="getToolButton('printMx')">
+            <!-- <el-button-group class="table-main__tool-button mr-12" v-if="getToolButton('printMx')">
               <el-tooltip
                 v-if="Boolean(hiprinterStateMx)"
                 effect="dark"
@@ -113,7 +113,7 @@
                 </el-button>
               </el-tooltip>
               <el-button :icon="Setting" class="pl-10 pr-10" @click="openPrint('_mx')"> </el-button>
-            </el-button-group>
+            </el-button-group> -->
 
             <el-button class="refresh-btn" :icon="Refresh" circle @click="refresh" v-if="toolButton.indexOf('refresh') > -1" />
 
@@ -314,7 +314,7 @@
     @reset="resetSetting"
     @save-default="saveDefaultLayout"
   />
-  <PrintEditor ref="printEditorRef" v-if="toolButton.length && toolButton.indexOf('print') > -1" @closed="toClosedPrintEditor" />
+  <!-- <PrintEditor ref="printEditorRef" v-if="toolButton.length && toolButton.indexOf('print') > -1" @closed="toClosedPrintEditor" />
   <PrintTemplateSelector
     ref="printTemplateRef"
     v-if="toolButton.length && toolButton.indexOf('print') > -1"
@@ -323,7 +323,7 @@
     @preview="toPreviewPrintTemplate"
     @confirm="toPrintPrintTemplate"
     @closed="toGetPrinterState"
-  />
+  /> -->
 
   <!-- <LjDialog
     ref="locationDialogRef"
@@ -567,6 +567,7 @@ const _defineProps = ref({
   border: true,
   showOverflow: "tooltip",
   showHeaderOverflow: false,
+  headerRowClassName: "lj-table-header-row",
   height: "auto",
   minHeight: "100px",
   rowConfig: {
@@ -1370,22 +1371,22 @@ const getSelectRecords = () => {
   return selectRecords.value;
 };
 
-const {
-  printEditorRef,
-  printTemplateRef,
-  printerListTpDropdownRef,
-  activePrint,
-  hiprinterStateList,
-  hiprinterStateMx,
-  printerTpList,
-  toGetPrinterState,
-  openPrint,
-  openPrintPriveiew,
-  toPreviewPrintTemplate,
-  toPrintPrintTemplate,
-  toEditPrintTemplate,
-  checkPrintTemplateList
-} = usePrint(t, props.dwname, getSelectRecords, funcBeforePrintCheck, props.printDataCallback);
+// const {
+//   printEditorRef,
+//   printTemplateRef,
+//   printerListTpDropdownRef,
+//   activePrint,
+//   hiprinterStateList,
+//   hiprinterStateMx,
+//   printerTpList,
+//   toGetPrinterState,
+//   openPrint,
+//   openPrintPriveiew,
+//   toPreviewPrintTemplate,
+//   toPrintPrintTemplate,
+//   toEditPrintTemplate,
+//   checkPrintTemplateList
+// } = usePrint(t, props.dwname, getSelectRecords, funcBeforePrintCheck, props.printDataCallback);
 // 清空选中数据列表
 // const clearSelection = () => tableRef.value!.clearSelection();
 
@@ -2114,6 +2115,7 @@ const loadColumns = (columns: any) => {
  */
 const afterGetData = () => {
   emit("afterMounted", tableData.value);
+  tableRef.value.recalculate(true);
   if (props.autoSelectFirstAfterRefresh && tableData.value.length) {
     nextTick(() => {
       tableRef.value?.setCurrentRow(tableData.value[0]);
@@ -2150,7 +2152,7 @@ onMounted(async () => {
   /**
    * @description 获取打印机选项状态
    */
-  toGetPrinterState();
+  // toGetPrinterState();
 });
 
 /**
@@ -2588,9 +2590,9 @@ const importDataEvent = () => {
  * 关闭后,是否刷新打印模板列表页
  * @param saved 是否有保存过
  */
-const toClosedPrintEditor = (saved: boolean) => {
-  saved && printTemplateRef.value?.getData();
-};
+// const toClosedPrintEditor = (saved: boolean) => {
+//   saved && printTemplateRef.value?.getData();
+// };
 
 const locationRef = ref();
 const locationBtnRef = ref();
@@ -2955,4 +2957,57 @@ defineExpose({
     }
   }
 }
+
+.lj-main-body {
+  .tableheader-tabs {
+    .el-tabs__header {
+      margin-bottom: 0;
+    }
+  }
+  &.small {
+    --vxe-ui-layout-padding-half: 2px;
+    --vxe-ui-upload-image-wh-mini: 24px;
+
+    .tableheader-tabs {
+      --el-tabs-header-height: 33px;
+    }
+    .table-box .table-search,
+    .table-main .table-search {
+      margin-bottom: 0;
+    }
+
+    .vxe-upload--image-item-remove-btn {
+      width: 14px;
+      height: 14px;
+
+      [class*="vxe-icon-"] {
+        font-size: 10px;
+      }
+    }
+  }
+}
+.vxe-header--column .vxe-cell--edit-icon {
+  padding: 0;
+}
+.lj-table-header-row .vxe-header--column .vxe-cell {
+  height: 24px;
+  display: inline-flex;
+  align-items: center;
+
+  .vxe-cell--title {
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    line-clamp: 2;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: normal;
+    word-break: break-word;
+  }
+}
+.vxe-table--body {
+  .vxe-body--row {
+    height: var(--vxe-ui-table-row-height-mini);
+  }
+}
 </style>

+ 18 - 8
JLHWEB/src/styles/element.scss

@@ -368,17 +368,27 @@
   }
 }
 
-.col--filter {
-  &:not(.is--filter-active) {
+.lj-vxetable {
+  .col--filter {
+    &:not(.is--filter-active) {
+      .vxe-cell--filter {
+        display: none;
+        // opacity: 0;
+      }
+    }
     .vxe-cell--filter {
-      display: none;
-      opacity: 0;
+      position: absolute;
+      bottom: 6px;
+      right: 0;
     }
   }
-  &:hover {
-    .vxe-cell--filter {
-      opacity: 1;
-      display: inline-block;
+  &:not(.drag--resize) {
+    .col--filter {
+      &:hover {
+        .vxe-cell--filter {
+          display: block;
+        }
+      }
     }
   }
 }

+ 5 - 0
JLHWEB/src/styles/var/vxe-variable.scss

@@ -29,6 +29,11 @@
   --vxe-ui-table-popup-border-color: var(--lj-color-gray-5);
 
   /*table*/
+  --vxe-ui-font-family: "Microsoft YaHei"; // k3
+  --vxe-ui-table-header-font-weight: 400; // k3
+  --vxe-ui-table-column-padding-mini: 2px 0; // k3
+  --vxe-ui-table-cell-padding-left: 5px; // k3
+  --vxe-ui-table-cell-padding-right: 5px; // k3
   --vxe-ui-table-header-font-color: var(--lj-color-text-secondary-text);
   --vxe-ui-table-footer-font-color: var(--lj-color-text-title);
   --vxe-ui-table-border-color: var(--lj-color-gray-4);

+ 3 - 1
JLHWEB/src/utils/index.ts

@@ -133,7 +133,9 @@ export function getTimeState(t: any) {
  */
 export function getBrowserLang() {
   let browserLang = navigator.language ? navigator.language : navigator.browserLanguage;
-  console.log("getBrowserLang browserLang :>> ", browserLang);
+  let localLang = localGet("longjoe-global")?.language || "";
+  localLang && (browserLang = localLang);
+  console.log("getBrowserLang browserLang :>> ", browserLang, navigator.language, navigator.browserLanguage);
   let defaultBrowserLang = "";
   if (["cn", "zh", "zh-cn"].includes(browserLang.toLowerCase())) {
     defaultBrowserLang = "zh-cn";

+ 1 - 1
JLHWEB/src/views/quote/bednetQuote/detail.vue

@@ -209,7 +209,7 @@ const tableProps_mx = ref({
   height: "auto",
   align: "left",
   // height: "",
-  // minHeight: "300px",
+  minHeight: "200px",
   editConfig: { trigger: "click", mode: "row", enabled: false, autoFocus: true },
   editRules: {
     bednet_height: [

+ 1 - 1
JLHWEB/src/views/quote/mattressQuote/detail.vue

@@ -1038,7 +1038,7 @@ const tableProps_mx = ref({
   height: "auto",
   align: "left",
   // height: "",
-  minHeight: "100px",
+  minHeight: "200px",
   editConfig: { trigger: "click", mode: "row", enabled: false, autoClear: false },
   // exportConfig: {
   //   filename: t("menu.saleTaskCrmDetail") + formatToDate(new Date(), "YYYY-MM-DDHH:mm:ss")