Browse Source

Merge branch 'internationalization' into testToMerge

xiaohaizhao 1 year ago
parent
commit
a934368f62
53 changed files with 347 additions and 232 deletions
  1. 2 1
      src/HDrpManagement/competitor/detail/modules/competeProjects/components/table.vue
  2. 2 2
      src/HDrpManagement/contractManage/components/productClassList/table.vue
  3. 2 2
      src/HDrpManagement/orderManage/details/tabs/table.vue
  4. 2 1
      src/HDrpManagement/payvoucher/components/table.vue
  5. 2 2
      src/HDrpManagement/productMoneyOdd/components/table.vue
  6. 9 8
      src/HDrpManagement/projectChange/modules/modules/andEnterprise/components/table.vue
  7. 2 2
      src/HDrpManagement/projectData/components/table.vue
  8. 2 1
      src/HDrpManagement/recvoucher/components/table.vue
  9. 2 1
      src/HDrpManagement/salerpriceData/components/table.vue
  10. 2 1
      src/HDrpManagement/writeoffbill/modules/order/selectOrder.vue
  11. 2 2
      src/HManagement/roleManage/modules/table.vue
  12. 9 8
      src/SDrpManagement/QuotedPrice/detail/components/table.vue
  13. 2 1
      src/SDrpManagement/salerPrivatecustomer/components/table.vue
  14. 2 1
      src/SManagement/project_target/modules/components/projectAdd/table.vue
  15. 2 2
      src/SManagement/sales_forecast/components/mergeTable.vue
  16. 2 2
      src/SManagement/sales_forecast/components/readHeaderTable.vue
  17. 34 13
      src/WebsiteManagement/consultManage/modules/add.vue
  18. 39 20
      src/WebsiteManagement/consultManage/modules/detailInfo.vue
  19. 33 13
      src/WebsiteManagement/consultManage/modules/edit.vue
  20. 2 1
      src/components/dynamic-newTable/index.vue
  21. 2 1
      src/components/dynamic-newTable/index1.vue
  22. 111 57
      src/components/dynamic-newTable/index2.vue
  23. 2 2
      src/components/dynamic-table-detail/index.vue
  24. 2 1
      src/components/dynamic-table-merge/index.vue
  25. 2 1
      src/components/dynamic-table/index.vue
  26. 2 1
      src/components/dynamic-table/index1.vue
  27. 2 1
      src/components/dynamic-table/index2.vue
  28. 2 1
      src/components/dynamic-table/index3.vue
  29. 2 2
      src/components/normal-basic-layout-new/modules/table.vue
  30. 2 2
      src/components/normal-basic-layout-new/modules/tableBook.vue
  31. 2 2
      src/components/normal-basic-layout/modules/table.vue
  32. 2 2
      src/components/selectTable/index.vue
  33. 2 2
      src/components/table/index.vue
  34. 2 2
      src/components/table/index10.vue
  35. 2 2
      src/components/table/index2.vue
  36. 2 2
      src/components/table/index3.vue
  37. 2 2
      src/components/table/index5.vue
  38. 2 2
      src/components/table/index6.vue
  39. 2 2
      src/components/table/index7.vue
  40. 2 2
      src/components/table/index8.vue
  41. 2 2
      src/components/table/index9.vue
  42. 2 1
      src/optionSystem/FProductManage/modules/table.vue
  43. 2 2
      src/template/addProduct/table.vue
  44. 2 2
      src/template/addProductContract/table.vue
  45. 2 2
      src/template/addTool/table.vue
  46. 2 2
      src/template/popoverTable/table.vue
  47. 2 2
      src/template/prediction/table.vue
  48. 2 2
      src/template/tableDetailLayout/index.vue
  49. 2 2
      src/template/tableMainLayout/index.vue
  50. 2 2
      src/template/tableTemplate/index.vue
  51. 2 2
      src/template/tableTemplate/index1.vue
  52. 20 36
      src/utils/tool.js
  53. 2 2
      src/views/salesData/components/table.vue

+ 2 - 1
src/HDrpManagement/competitor/detail/modules/competeProjects/components/table.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
     <el-table ref="tables"
+              :fit="tool.calculatedColumnWidth($refs.tables,layout)"
               :row-class-name="tableClassName"
               v-loading="loading" highlight-current-row
               :data="data"
@@ -13,7 +14,7 @@
           type="selection"
           width="55" @handleSelectionChange="handleSelectionChange"  v-if="checkbox">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/HDrpManagement/contractManage/components/productClassList/table.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
-    <el-table ref="tables"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data"  size="mini" :height="height" style="width:100%"  >
+    <el-table ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data"  size="mini" :height="height" style="width:100%"  >
         <el-table-column
         type="selection"
         width="45"
         align="center"
         fixed>
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :fixed="col.columnname === fixedName?'right':false">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="col.columnname === fixedName?'right':false">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/HDrpManagement/orderManage/details/tabs/table.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table  ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height" @row-click="rowClick" style="width:100%" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+    <el-table  ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height" @row-click="rowClick" style="width:100%" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
@@ -11,7 +11,7 @@
         v-for="(col,index) in layout" :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="fixedCalc(col.columnname)"
       >
         <template :slot="headerOptions ? headerOptions.includes(col.columnname) ? 'header' : '' : ''" slot-scope="scope">

+ 2 - 1
src/HDrpManagement/payvoucher/components/table.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
     <el-table ref="tables"
+              :fit="tool.calculatedColumnWidth($refs.tables,layout)"
               :row-class-name="tableClassName"
               v-loading="loading" highlight-current-row
               :data="data"
@@ -13,7 +14,7 @@
           type="selection"
           width="55" @handleSelectionChange="handleSelectionChange"  v-if="checkbox">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/HDrpManagement/productMoneyOdd/components/table.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
-    <el-table ref="tables"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" style="width:100%"  border>
+    <el-table ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" style="width:100%"  border>
         <el-table-column
         type="selection"
         width="45"
         align="center"
         fixed>
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :fixed="col.columnname === fixedName?'right':false">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="col.columnname === fixedName?'right':false">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 9 - 8
src/HDrpManagement/projectChange/modules/modules/andEnterprise/components/table.vue

@@ -1,19 +1,20 @@
 <template>
   <div>
     <el-table ref="tables"
-              :row-class-name="tableClassName"
-              v-loading="loading" highlight-current-row
-              :data="data"
-              :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini"
-              :height="height" @row-click="rowClick" style="width:100%"
-               border
-              @select="select"
+      :fit="tool.calculatedColumnWidth($refs.tables,layout)"
+      :row-class-name="tableClassName"
+      v-loading="loading" highlight-current-row
+      :data="data"
+      :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini"
+      :height="height" @row-click="rowClick" style="width:100%"
+        border
+      @select="select"
       >
       <el-table-column
           type="selection"
           width="55" @handleSelectionChange="handleSelectionChange"  v-if="checkbox">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/HDrpManagement/projectData/components/table.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data" style="height:100%"  size="mini" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data" style="height:100%"  size="mini" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template v-slot:header="{ column,$index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>
         </template>

+ 2 - 1
src/HDrpManagement/recvoucher/components/table.vue

@@ -3,6 +3,7 @@
     <el-table
       ref="tables"
       :row-class-name="tableClassName"
+      :fit="tool.calculatedColumnWidth($refs.tables,layout)"
       v-loading="loading"
       highlight-current-row
       :data="data"
@@ -29,7 +30,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.tables,layout,index)"
+        :min-width="col.width || 150"
       >
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->

+ 2 - 1
src/HDrpManagement/salerpriceData/components/table.vue

@@ -4,6 +4,7 @@
     <el-table
       :loading="loading"
       ref="table"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       :row-class-name="tableClassName"
       highlight-current-row
       :data="data"
@@ -28,7 +29,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="
           fixedName
             ? fixedName.indexOf(col.columnname) != -1

+ 2 - 1
src/HDrpManagement/writeoffbill/modules/order/selectOrder.vue

@@ -4,6 +4,7 @@
       ref="tables"
       @select="aaaa"
       @select-all="selectAll"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       v-loading="loading"
       highlight-current-row
       :data="data"
@@ -20,7 +21,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.tables,layout,index)"
+        :min-width="col.width || 150"
         :fixed="col.columnname === fixedName ? 'right' : false"
       >
         <template slot-scope="scope">

+ 2 - 2
src/HManagement/roleManage/modules/table.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
-    <el-table ref="tables"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" style="width:100%"  border>
+    <el-table ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" style="width:100%"  border>
         <el-table-column
         type="selection"
         width="45"
         align="center"
         fixed>
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :fixed="col.columnname === fixedName?'right':false">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="col.columnname === fixedName?'right':false">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 9 - 8
src/SDrpManagement/QuotedPrice/detail/components/table.vue

@@ -1,19 +1,20 @@
 <template>
   <div>
     <el-table ref="tables"
-              :row-class-name="tableClassName"
-              v-loading="loading" highlight-current-row
-              :data="data"
-              :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini"
-              :height="height" @row-click="rowClick" style="width:100%"
-               border
-              @select="select"
+      :fit="tool.calculatedColumnWidth($refs.tables,layout)"
+      :row-class-name="tableClassName"
+      v-loading="loading" highlight-current-row
+      :data="data"
+      :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini"
+      :height="height" @row-click="rowClick" style="width:100%"
+      border
+      @select="select"
       >
       <el-table-column
           type="selection"
           width="55" @handleSelectionChange="handleSelectionChange"  v-if="checkbox">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 1
src/SDrpManagement/salerPrivatecustomer/components/table.vue

@@ -2,6 +2,7 @@
   <div>
     <el-table
       ref="tables"
+      :fit="tool.calculatedColumnWidth($refs.tables,layout)"
       :row-class-name="tableClassName"
       v-loading="loading"
       highlight-current-row
@@ -29,7 +30,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="$t(col.title)"
-        :min-width="tool.calcTableColWidth($refs.tables,layout,index)"
+        :min-width="col.width || 150"
       >
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->

+ 2 - 1
src/SManagement/project_target/modules/components/projectAdd/table.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
     <el-table ref="tables"
+    :fit="tool.calculatedColumnWidth($refs.tables,layout)"
               :row-class-name="tableClassName"
               v-loading="loading" highlight-current-row
               :data="data"
@@ -13,7 +14,7 @@
           type="selection"
           width="55" @handleSelectionChange="handleSelectionChange"  v-if="checkbox">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/SManagement/sales_forecast/components/mergeTable.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
-    <el-table ref="table" :span-method="arraySpanMethod" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data1" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%"  border>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)">
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :span-method="arraySpanMethod" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data1" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%"  border>
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/SManagement/sales_forecast/components/readHeaderTable.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
-    <el-table ref="table" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%"  border>
-      <el-table-column :render-header="(h,obj) => readHeaderFun1(h, obj, col.columnname)" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)">
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%"  border>
+      <el-table-column :render-header="(h,obj) => readHeaderFun1(h, obj, col.columnname)" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 34 - 13
src/WebsiteManagement/consultManage/modules/add.vue

@@ -4,7 +4,7 @@
       size="small"
       type="primary"
       @click="addBtn((dialogFormVisible = true))"
-      >{{$t(`新 建`)}}</el-button
+      >{{ $t(`新 建`) }}</el-button
     >
     <el-drawer
       :title="$t('新增资讯')"
@@ -26,6 +26,14 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('副标题')">
+                <el-input
+                  v-model="form.summary"
+                  :placeholder="$t('请输入副标题')"
+                ></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('分类')" prop="sat_notice_classid">
                 <el-select
@@ -47,14 +55,14 @@
             <el-col :span="24">
               <el-form-item :label="$t('状态')" prop="status">
                 <el-radio-group v-model="form.status" style="width: 100%">
-                  <el-radio label="新建">{{$t('新建')}}</el-radio>
-                  <el-radio label="发布">{{$t(`发布`)}}</el-radio>
+                  <el-radio label="新建">{{ $t("新建") }}</el-radio>
+                  <el-radio label="发布">{{ $t(`发布`) }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
-        <p style="font-size: 14px">{{$t('资讯封面')}}</p>
+        <p style="font-size: 14px">{{ $t("资讯封面") }}</p>
         <div style="margin-top: 10px">
           <previewImage
             v-if="form.cover"
@@ -76,10 +84,12 @@
             @onSuccess="onCoverSubmit"
           ></upload>
           <p class="info">
-            {{$t('注:建议上传图片大小')}}130x80,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG/jpg/png
+            {{ $t("注:建议上传图片大小") }}130x80,{{ $t("大小不超过") }}2M,{{
+              $t("格式为")
+            }}JPG/PNG/jpg/png
           </p>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('附件上传')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("附件上传") }}</p>
         <div style="margin-top: 10px">
           <attachmentList
             :attinfos="attinfo_attachment"
@@ -98,7 +108,7 @@
             ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('资讯正文')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("资讯正文") }}</p>
         <div style="margin-top: 10px">
           <myEditor
             ref="editor"
@@ -114,10 +124,14 @@
           @click="onCancel"
           plain
           class="normal-btn-width"
-          >{{$t(`取 消`)}}</el-button
+          >{{ $t(`取 消`) }}</el-button
         >
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width"
-          >{{$t(`确 定`)}}</el-button
+        <el-button
+          size="small"
+          type="primary"
+          @click="onSubmit"
+          class="normal-btn-width"
+          >{{ $t(`确 定`) }}</el-button
         >
       </div>
     </el-drawer>
@@ -154,9 +168,15 @@ export default {
         checkdate: "",
       },
       rules: {
-        title: [{ required: true, message: this.$t( "请输入标题名称"), trigger: "blur" }],
+        title: [
+          {
+            required: true,
+            message: this.$t("请输入标题名称"),
+            trigger: "blur",
+          },
+        ],
         sat_notice_classid: [
-          { required: true,  message: this.$t( "请选择分类"), trigger: "change" },
+          { required: true, message: this.$t("请选择分类"), trigger: "change" },
         ],
       },
       classData: [],
@@ -187,7 +207,7 @@ export default {
         content: {
           where: {
             condition: "",
-            isused:"1"
+            isused: "1",
           },
         },
       };
@@ -207,6 +227,7 @@ export default {
           this.dialogFormVisible = false;
           this.$refs.form.resetFields();
           this.form.cover = "";
+          this.form.summary = "";
           this.image = null;
           this.form.content = "";
           this.attinfo_attachment = [];

+ 39 - 20
src/WebsiteManagement/consultManage/modules/detailInfo.vue

@@ -4,7 +4,7 @@
       size="small"
       type="text"
       @click="detailBtn((dialogFormVisible = true))"
-      >{{$t('详情')}}</el-button
+      >{{ $t("详情") }}</el-button
     >
     <el-drawer
       :title="$t('资讯管理')"
@@ -17,7 +17,7 @@
       @close="onClose"
     >
       <div style="display: flex; justify-content: space-between; padding: 10px">
-        <div>{{$t('资讯管理')}}</div>
+        <div>{{ $t("资讯管理") }}</div>
         <div>
           <edit
             v-if="tool.checkAuth($route.name, 'update')"
@@ -32,15 +32,17 @@
             size="small"
             @click="delBtn"
             :disabled="form.status == '发布'"
-            >{{$t(`删除`)}}</el-button
+            >{{ $t(`删除`) }}</el-button
           >
           <el-button
-              size="small"
-              type="primary"
-              style="margin-right: 25px!important;"
-              @click="statusChange"
-              v-if="tool.checkAuth($route.name, 'update')"
-          >{{ form.status == '新建' ? $t("发布") : $t("取消发布") }}</el-button
+            size="small"
+            type="primary"
+            style="margin-right: 25px !important"
+            @click="statusChange"
+            v-if="tool.checkAuth($route.name, 'update')"
+            >{{
+              form.status == "新建" ? $t("发布") : $t("取消发布")
+            }}</el-button
           >
         </div>
       </div>
@@ -56,6 +58,15 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('副标题')" prop="summary">
+                <el-input
+                  v-model="form.summary"
+                  :placeholder="$t('请输入副标题')"
+                  disabled
+                ></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('分类')" prop="sat_notice_classid">
                 <el-select
@@ -82,14 +93,14 @@
                   style="width: 100%"
                   disabled
                 >
-                  <el-radio :label="$t(`新建`)">{{$t(`新建`)}}</el-radio>
-                  <el-radio :label="$t(`发布`)">{{$t(`发布`)}}</el-radio>
+                  <el-radio :label="$t(`新建`)">{{ $t(`新建`) }}</el-radio>
+                  <el-radio :label="$t(`发布`)">{{ $t(`发布`) }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
-        <p style="font-size: 14px">{{$t('资讯封面')}}</p>
+        <p style="font-size: 14px">{{ $t("资讯封面") }}</p>
         <div style="margin-top: 10px">
           <previewImage
             v-if="form.cover"
@@ -111,10 +122,12 @@
             @onSuccess="onCoverSubmit"
           ></upload>
           <p class="info">
-            {{$t('注:建议上传图片大小')}}130x80px,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG
+            {{ $t("注:建议上传图片大小") }}130x80px,{{
+              $t("大小不超过")
+            }}2M,{{ $t("格式为") }}JPG/PNG
           </p>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('附件上传')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("附件上传") }}</p>
         <div style="margin-top: 10px">
           <attachmentList
             :attinfos="attinfo_attachment"
@@ -133,7 +146,7 @@
             ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('资讯正文')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("资讯正文") }}</p>
         <div style="margin-top: 10px">
           <myEditor
             ref="editor"
@@ -181,9 +194,15 @@ export default {
         cover: "",
       },
       rules: {
-        title: [{ required: true, message: this.$t( "请输入标题名称"), trigger: "blur" }],
+        title: [
+          {
+            required: true,
+            message: this.$t("请输入标题名称"),
+            trigger: "blur",
+          },
+        ],
         sat_notice_classid: [
-          { required: true,  message: this.$t( "请选择分类"), trigger: "change" },
+          { required: true, message: this.$t("请选择分类"), trigger: "change" },
         ],
       },
       classData: [],
@@ -327,7 +346,7 @@ export default {
       });
     },
     delBtn() {
-      this.$confirm(this.$t('确定删除当前资讯吗')+"?", this.$t("提示"),{
+      this.$confirm(this.$t("确定删除当前资讯吗") + "?", this.$t("提示"), {
         confirmButtonText: this.$t("确定"),
         cancelButtonText: this.$t("取消"),
         type: "warning",
@@ -355,8 +374,8 @@ export default {
       const res = await this.$api.requested({
         id: "20240925161703",
         content: {
-          "sat_noticeid": this.form.sat_noticeid,
-          "isrecheck":this.form.status == '新建'?1:0,
+          sat_noticeid: this.form.sat_noticeid,
+          isrecheck: this.form.status == "新建" ? 1 : 0,
         },
       });
       this.tool.showMessage(res, () => {

+ 33 - 13
src/WebsiteManagement/consultManage/modules/edit.vue

@@ -5,7 +5,7 @@
       :type="disabled ? '' : 'primary'"
       @click="detailBtn((dialogFormVisible = true))"
       :disabled="disabled"
-      >{{$t(`编辑`)}}</el-button
+      >{{ $t(`编辑`) }}</el-button
     >
     <el-drawer
       :title="$t('编辑资讯')"
@@ -27,6 +27,14 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('副标题')">
+                <el-input
+                  v-model="form.summary"
+                  :placeholder="$t('请输入副标题')"
+                ></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('分类')" prop="sat_notice_classid">
                 <el-select
@@ -48,14 +56,14 @@
             <el-col :span="24">
               <el-form-item :label="$t('状态')" prop="status">
                 <el-radio-group v-model="form.status" style="width: 100%">
-                  <el-radio label="新建`)">{{$t(`新建`)}}</el-radio>
-                  <el-radio label="发布`)">{{$t(`发布`)}}</el-radio>
+                  <el-radio label="新建">{{ $t(`新建`) }}</el-radio>
+                  <el-radio label="发布">{{ $t(`发布`) }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
-        <p style="font-size: 14px">{{$t('资讯封面')}}</p>
+        <p style="font-size: 14px">{{ $t("资讯封面") }}</p>
         <div style="margin-top: 10px">
           <previewImage
             v-if="form.cover"
@@ -77,10 +85,12 @@
             @onSuccess="onCoverSubmit"
           ></upload>
           <p class="info">
-            {{$t('注:建议上传图片大小')}}130x80,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG/jpg/png
+            {{ $t("注:建议上传图片大小") }}130x80,{{ $t("大小不超过") }}2M,{{
+              $t("格式为")
+            }}JPG/PNG/jpg/png
           </p>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('附件上传')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("附件上传") }}</p>
         <div style="margin-top: 10px">
           <attachmentList
             :attinfos="attinfo_attachment"
@@ -99,7 +109,7 @@
             ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px; margin-top: 10px">{{$t('资讯正文')}}</p>
+        <p style="font-size: 14px; margin-top: 10px">{{ $t("资讯正文") }}</p>
         <div style="margin-top: 10px">
           <myEditor
             ref="editor"
@@ -114,10 +124,14 @@
           @click="onCancel"
           plain
           class="normal-btn-width"
-          >{{$t(`取 消`)}}</el-button
+          >{{ $t(`取 消`) }}</el-button
         >
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width"
-          >{{$t(`确 定`)}}</el-button
+        <el-button
+          size="small"
+          type="primary"
+          @click="onSubmit"
+          class="normal-btn-width"
+          >{{ $t(`确 定`) }}</el-button
         >
       </div>
     </el-drawer>
@@ -156,9 +170,15 @@ export default {
         cover: "",
       },
       rules: {
-        title: [{ required: true, message: this.$t( "请输入标题名称"), trigger: "blur" }],
+        title: [
+          {
+            required: true,
+            message: this.$t("请输入标题名称"),
+            trigger: "blur",
+          },
+        ],
         sat_notice_classid: [
-          { required: true,  message: this.$t( "请选择分类"), trigger: "change" },
+          { required: true, message: this.$t("请选择分类"), trigger: "change" },
         ],
       },
       classData: [],
@@ -198,7 +218,7 @@ export default {
         content: {
           where: {
             condition: "",
-            isused:"1"
+            isused: "1",
           },
         },
       };

+ 2 - 1
src/components/dynamic-newTable/index.vue

@@ -9,6 +9,7 @@
       size="mini"
       :height="height ? height : data.length <= 5?'280px':'calc(100vh - 268px)'"
       @row-click="rowClick"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       :style="{width:'100%',minHeight:minHeight?minHeight:''}"
       :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
       :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
@@ -23,7 +24,7 @@
         :prop="col.columnname"
         :label="col.title"
         :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
       >
         <template v-slot:header="{ column,$index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>

+ 2 - 1
src/components/dynamic-newTable/index1.vue

@@ -9,6 +9,7 @@
       size="mini"
       :height="height ? height : data.length <= 5?'280px':'calc(100vh - 268px)'"
       @row-click="rowClick"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       style="width:100%;"
       :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
       :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
@@ -22,7 +23,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false"
       >
         <template

+ 111 - 57
src/components/dynamic-newTable/index2.vue

@@ -1,26 +1,67 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height ? height : data.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" :style="{width:'100%',minHeight:minHeight?minHeight:''}" :header-cell-style="{background:'#fafafafa',height:'40px',color:'#000000',fontSize:'12px'}"
-              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange"
-              :row-key="rowKey"
-            >
-      <el-table-column
-          type="selection"
-          width="35" fixed v-if="checkbox">
+    <el-table
+      ref="table"
+      :row-class-name="tableClassName"
+      highlight-current-row
+      :data="data"
+      size="mini"
+      :height="
+        height ? height : data.length <= 5 ? '280px' : 'calc(100vh - 268px)'
+      "
+      :fit="tool.calculatedColumnWidth($refs.table, layout)"
+      @row-click="rowClick"
+      :style="{ width: '100%', minHeight: minHeight ? minHeight : '' }"
+      :header-cell-style="{
+        background: '#fafafafa',
+        height: '40px',
+        color: '#000000',
+        fontSize: '12px',
+      }"
+      :cell-style="{ height: '40px', color: '#666666', fontWeight: '400' }"
+      border
+      @selection-change="selectionChange"
+      :row-key="rowKey"
+    >
+      <el-table-column type="selection" width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
-        <template v-slot:header="{ column,$index }" v-if="customHeader">
+      <el-table-column
+        show-overflow-tooltip
+        v-for="(col, index) in layout"
+        :key="col.tablecolid"
+        :prop="col.columnname"
+        :label="col.title"
+        :min-width="col.width || 150"
+        :fixed="
+          fixedName
+            ? fixedName.indexOf(col.columnname) != -1
+              ? redirect
+                ? redirect
+                : 'right'
+              : false
+            : false
+        "
+      >
+        <template v-slot:header="{ column, $index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>
         </template>
         <template slot-scope="scope">
           <div class="table-panel">
             <!-- 自定义表格显示内容 -->
-            <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
+            <slot
+              v-if="custom"
+              name="customcol"
+              :column="{ data: scope.row, columnname: col.columnname }"
+            ></slot>
             <!-- 否则就是默认 -->
-            <span v-else>{{scope.row[col.columnname]}}</span>
+            <span v-else>{{ scope.row[col.columnname] }}</span>
             <!-- 操作结构内容 -->
-            <slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
+            <slot
+              v-if="col.columnname === 'operation'"
+              name="opreation"
+              :data="scope.row"
+            ></slot>
           </div>
         </template>
       </el-table-column>
@@ -29,8 +70,8 @@
 </template>
 
 <script>
-import {mapGetters} from "vuex"
-import Sortable from 'sortablejs'
+import { mapGetters } from "vuex";
+import Sortable from "sortablejs";
 export default {
   /*
     layout:表结构数据;
@@ -38,63 +79,76 @@ export default {
     custom:是否启用自定义结构;
     opwidth:操作列宽度
   */
-  props:['layout','data','custom','height','fixedName','width','checkbox','redirect','customHeader','minHeight','rowKey'],
-  data () {
+  props: [
+    "layout",
+    "data",
+    "custom",
+    "height",
+    "fixedName",
+    "width",
+    "checkbox",
+    "redirect",
+    "customHeader",
+    "minHeight",
+    "rowKey",
+  ],
+  data() {
     return {
-      list:[],
-      isCopy:true,
-      isRowSort:true,
-      highlightCurrentRow:[],
-      isShowTreeStyle:true
-    }
+      list: [],
+      isCopy: true,
+      isRowSort: true,
+      highlightCurrentRow: [],
+      isShowTreeStyle: true,
+    };
   },
-  computed:{
+  computed: {
     ...mapGetters({
-      loading:'loading'
-    })
+      loading: "loading",
+    }),
   },
-  watch:{
-    data(val){
-      this.doLayout()
-    }
+  watch: {
+    data(val) {
+      this.doLayout();
+    },
   },
-  methods:{
-    rowClick (row) {
-      this.$emit('rowClick',row)
+  methods: {
+    rowClick(row) {
+      this.$emit("rowClick", row);
     },
-    tableClassName ({row,rowIndex}) {
-      row.index = rowIndex
+    tableClassName({ row, rowIndex }) {
+      row.index = rowIndex;
     },
-    selectionChange(row){
-      this.$emit('selectionChange',row)
+    selectionChange(row) {
+      this.$emit("selectionChange", row);
     },
-    doLayout(){
-      if (this.$refs.table){
-        this.$nextTick(()=>{
-          this.$refs.table.doLayout()
-        })
+    doLayout() {
+      if (this.$refs.table) {
+        this.$nextTick(() => {
+          this.$refs.table.doLayout();
+        });
       }
     },
     initSort() {
-      if (!this.isRowSort) return
-      const el = this.$refs['table'].$el.querySelector('.el-table__body-wrapper > table > tbody')
+      if (!this.isRowSort) return;
+      const el = this.$refs["table"].$el.querySelector(
+        ".el-table__body-wrapper > table > tbody"
+      );
       new Sortable(el, {
         animation: 150, // 动画
-        onEnd: evt => {
-          const curRow = this.data.splice(evt.oldIndex, 1)[0]
-          this.$nextTick(()=>{
-            this.data.splice(evt.newIndex, 0, curRow)
-            this.$emit('rowSort', this.data)
-          })
-        }
-      })
-    }
+        onEnd: (evt) => {
+          const curRow = this.data.splice(evt.oldIndex, 1)[0];
+          this.$nextTick(() => {
+            this.data.splice(evt.newIndex, 0, curRow);
+            this.$emit("rowSort", this.data);
+          });
+        },
+      });
+    },
   },
-  mounted () {
-    this.initSort()
-  }
-}
-
+  mounted() {
+    this.initSort();
+  },
+};
 </script>
 <style>
 </style>

+ 2 - 2
src/components/dynamic-table-detail/index.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height"  @row-click="rowClick" :style="{width:'100%',minHeight:minHeight?minHeight:''}" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height"  @row-click="rowClick" :style="{width:'100%',minHeight:minHeight?minHeight:''}" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template v-slot:header="{ column,$index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>
         </template>

+ 2 - 1
src/components/dynamic-table-merge/index.vue

@@ -6,6 +6,7 @@
       :row-class-name="tableClassName"
       :data="data"
       size="mini"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       :height="height ? height : data.length <= 4?'260px':data.length <= 20?'calc(100vh - 420px)':'calc(100vh - 420px)'"
       @row-click="rowClick"
       style="width:100%"
@@ -21,7 +22,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false"
       >
         <template v-slot:header="{ column,$index }" v-if="customHeader">

+ 2 - 1
src/components/dynamic-table/index.vue

@@ -7,6 +7,7 @@
       highlight-current-row
       :data="data"
       size="mini"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       :height="height ? height : data.length <= 4?'260px':data.length <= 20?'calc(100vh - 420px)':'calc(100vh - 420px)'"
       @row-click="rowClick"
       style="width:100%;min-height:260px;max-height: calc(100vh - 420px)"
@@ -21,7 +22,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false"
       >
         <template v-slot:header="{ column,$index }" v-if="customHeader">

+ 2 - 1
src/components/dynamic-table/index1.vue

@@ -3,6 +3,7 @@
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
     <el-table
       ref="table"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       :row-class-name="tableClassName"
       highlight-current-row
       :data="data"
@@ -21,7 +22,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false"
       >
         <template v-slot:header="{ column,$index }" v-if="customHeader">

+ 2 - 1
src/components/dynamic-table/index2.vue

@@ -3,6 +3,7 @@
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
     <el-table
       ref="table"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       :row-class-name="tableClassName"
       highlight-current-row
       :data="data"
@@ -21,7 +22,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false"
       >
         <template v-slot:header="{ column,$index }" v-if="customHeader">

+ 2 - 1
src/components/dynamic-table/index3.vue

@@ -4,6 +4,7 @@
     <el-table
       ref="table"
       :row-class-name="tableClassName"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       highlight-current-row
       :data="data"
       size="mini"
@@ -21,7 +22,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table,layout,index)"
+        :min-width="col.width || 150"
         :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false"
       >
         <template

+ 2 - 2
src/components/normal-basic-layout-new/modules/table.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="bs-table" :style="{height:height?height:'calc(100vh - 330px)'}">
-    <el-table :data="data"  border stripe ref="tables" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row  size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
+    <el-table :data="data"  border stripe ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row  size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
       <!-- <div slot="empty">
         <el-empty :image="require('../../../assets/empty.svg')" :image-size="250">
         </el-empty>
@@ -11,7 +11,7 @@
         align="center"
         @handleSelectionChange="handleSelectionChange">
       </el-table-column>
-      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :fixed="checkFixed(col.columnname)">
+      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="checkFixed(col.columnname)">
         <template slot-scope="scope">
 
           <slot v-if="col.columnname !== 'operation'" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/components/normal-basic-layout-new/modules/tableBook.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="bs-table" :style="{height:height?height:'calc(100vh - 330px)'}">
-    <el-table :data="data"  border stripe ref="tables" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row  size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
+    <el-table :data="data"  border stripe ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row  size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
       <!-- <div slot="empty">
         <el-empty :image="require('../../../assets/empty.svg')" :image-size="250">
         </el-empty>
@@ -11,7 +11,7 @@
         align="center"
         @handleSelectionChange="handleSelectionChange">
       </el-table-column>
-      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title"  :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :fixed="checkFixed(col.columnname)">
+      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title"  :min-width="col.width || 150" :fixed="checkFixed(col.columnname)">
         <template slot-scope="scope">
 
           <slot v-if="col.columnname !== 'operation'" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/components/normal-basic-layout/modules/table.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="bs-table" :style="{height:height?height:'calc(100vh - 330px)'}">
-    <el-table border stripe ref="tables" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row :data="data" size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
+    <el-table border stripe ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row :data="data" size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
       <!-- <div slot="empty">
         <el-empty :image="require('../../../assets/empty.svg')" :image-size="250">
         </el-empty>
@@ -11,7 +11,7 @@
         align="center"
         @handleSelectionChange="handleSelectionChange">
       </el-table-column>
-      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :label="$t(col.title)" :fixed="checkFixed(col.columnname)">
+      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :min-width="col.width || 150" :label="$t(col.title)" :fixed="checkFixed(col.columnname)">
         <template slot-scope="scope">
 
           <slot v-if="col.columnname !== 'operation'" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/components/selectTable/index.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
-    <el-table ref="tables"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data" size="mini" :height="height" style="width:100%"  border>
+    <el-table ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)"  @select="aaaa" @select-all="selectAll" v-loading="loading" highlight-current-row :data="data" size="mini" :height="height" style="width:100%"  border>
         <el-table-column
         type="selection"
         width="45"
         align="center"
         fixed>
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :fixed="col.columnname === fixedName?'right':false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="col.columnname === fixedName?'right':false">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/components/table/index.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <el-table ref="tables" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" @selection-change="handleSelectionChange"  border>
+    <el-table ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" @selection-change="handleSelectionChange"  border>
       <el-table-column
         type="selection"
         width="55" @handleSelectionChange="handleSelectionChange" v-if="checkbox" :selectable="isCheck">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/components/table/index10.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="small"    @row-click="rowClick" show-summary
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="small"    @row-click="rowClick" show-summary
               style="width:100%;" :header-cell-style="{height:'60px',fontWeight:'400',fontSize:'22px',color:'#333333',background:'#ddebf7'}"
               :cell-style="{height:'40px',fontWeight:'400',fontSize:'18px'}" border @selection-change="selectionChange" >
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="$t(col.title)" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="$t(col.title)" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template :slot="headerOptions ? headerOptions.includes(col.columnname) ? 'header' : '' : ''" slot-scope="scope">
           <slot name="header" :column="{data:scope.row,columnname:col.columnname}"></slot>
         </template>

+ 2 - 2
src/components/table/index2.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <el-table ref="tables" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" @selection-change="handleSelectionChange"  border>
+    <el-table ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" @selection-change="handleSelectionChange"  border>
       <el-table-column
         type="selection"
         width="55" @handleSelectionChange="handleSelectionChange" v-if="checkbox">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/components/table/index3.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <el-table ref="tables" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" @selection-change="handleSelectionChange"  border>
+    <el-table ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" @selection-change="handleSelectionChange"  border>
       <el-table-column
         type="selection"
         width="55" @handleSelectionChange="handleSelectionChange"  v-if="checkbox">
       </el-table-column>
-      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)">
+      <el-table-column :show-overflow-tooltip="col.title == '来源' || col.title == '地址' || col.title == '备注'" v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150">
         <template slot-scope="scope">
           <!-- 自定义表格显示内容 -->
           <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/components/table/index5.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height ==''?data.length <= 4?'260px':data.length <= 20?'':'calc(100vh - 420px)':height"  @row-click="rowClick"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height ==''?data.length <= 4?'260px':data.length <= 20?'':'calc(100vh - 420px)':height"  @row-click="rowClick"
               style="width:100%;min-height:260px;max-height: calc(100vh - 420px)" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template :slot="headerOptions ? headerOptions.includes(col.columnname) ? 'header' : '' : ''" slot-scope="scope">
           <slot name="header" :column="{data:scope.row,columnname:col.columnname}"></slot>
         </template>

+ 2 - 2
src/components/table/index6.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height ==''?data.length <= 4?'260px':data.length <= 20?'calc(100vh - 420px)':'calc(100vh - 420px)':height"  @row-click="rowClick"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height ==''?data.length <= 4?'260px':data.length <= 20?'calc(100vh - 420px)':'calc(100vh - 420px)':height"  @row-click="rowClick"
               style="width:100%;" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}" tooltip-effect="dark"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column  v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column  v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template :slot="headerOptions ? headerOptions.includes(col.columnname) ? 'header' : '' : ''" slot-scope="scope">
           <slot name="header" :column="{data:scope.row,columnname:col.columnname}"></slot>
         </template>

+ 2 - 2
src/components/table/index7.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="data.length <= 4?'260px':''"  @row-click="rowClick"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="data.length <= 4?'260px':''"  @row-click="rowClick"
               style="width:100%;min-height:260px;max-height: calc(100vh - 420px)" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
           <div class="table-panel">
             <!-- 自定义表格显示内容 -->

+ 2 - 2
src/components/table/index8.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="data.length <= 4?'260px':height"  @row-click="rowClick"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="data.length <= 4?'260px':height"  @row-click="rowClick"
               style="width:100%;" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
           <div class="table-panel">
             <!-- 自定义表格显示内容 -->

+ 2 - 2
src/components/table/index9.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height ==''?data.length <= 4?'260px':data.length <= 20?'441px':'441px':height"  @row-click="rowClick"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height ==''?data.length <= 4?'260px':data.length <= 20?'441px':'441px':height"  @row-click="rowClick"
               style="width:100%;" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}" tooltip-effect="dark"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column  v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column  v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template :slot="headerOptions ? headerOptions.includes(col.columnname) ? 'header' : '' : ''" slot-scope="scope">
           <slot name="header" :column="{data:scope.row,columnname:col.columnname}"></slot>
         </template>

+ 2 - 1
src/optionSystem/FProductManage/modules/table.vue

@@ -4,6 +4,7 @@
     <el-table
       v-loading="loading"
       ref="table"
+      :fit="tool.calculatedColumnWidth($refs.table,layout)"
       :row-class-name="tableClassName"
       highlight-current-row
       :data="data != undefined ? data : list"
@@ -33,7 +34,7 @@
         :key="col.tablecolid"
         :prop="col.columnname"
         :label="col.title"
-        :min-width="tool.calcTableColWidth($refs.table, layout, index)"
+        :min-width="col.width || 150"
         :fixed="
           fixedName
             ? fixedName == col.columnname

+ 2 - 2
src/template/addProduct/table.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <el-table ref="table" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
       <el-table-column
           type="selection"
           width="55"  fixed>
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
           <div class="table-panel" style="color: #333333">
             <!-- 自定义表格显示内容 -->

+ 2 - 2
src/template/addProductContract/table.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <el-table ref="table" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
       <el-table-column
           type="selection"
           width="55"  fixed>
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
           <div class="table-panel" style="color: #333333">
             <!-- 自定义表格显示内容 -->

+ 2 - 2
src/template/addTool/table.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <el-table ref="table" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
       <el-table-column
           type="selection"
           width="55"  fixed>
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
           <div class="table-panel" style="color: #333333">
             <!-- 自定义表格显示内容 -->

+ 2 - 2
src/template/popoverTable/table.vue

@@ -2,13 +2,13 @@
   <div>
     <el-input v-if="isInput !== false" style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column  ref="table" show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column  ref="table" show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template v-slot:header="{ column,$index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>
         </template>

+ 2 - 2
src/template/prediction/table.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <el-table ref="table" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" @selection-change="selectionChange" :header-cell-style="{height:'40px','color':'#333333'}" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini" :height="height" @row-click="rowClick" style="width:100%;min-height:300px;"  border >
       <el-table-column
           type="selection"
           width="55"  fixed>
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
           <div class="table-panel" style="color: #333333">
             <!-- 自定义表格显示内容 -->

+ 2 - 2
src/template/tableDetailLayout/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="bs-table" >
-    <el-table border stripe ref="tables" :row-class-name="tableClassName" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}" :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"  highlight-current-row :data="data" size="mini" @row-click="rowClick" :height="height" @selection-change="handleSelectionChange" >
+    <el-table border stripe ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}" :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"  highlight-current-row :data="data" size="mini" @row-click="rowClick" :height="height" @selection-change="handleSelectionChange" >
       <el-table-column
           type="selection"
           v-if="isCheck === true"
@@ -8,7 +8,7 @@
           align="center"
           @handleSelectionChange="handleSelectionChange">
       </el-table-column>
-      <el-table-column show-overflow-tooltip v-for="(col) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title"  :min-width="col.width === 0 ? 150 : col.width" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column show-overflow-tooltip v-for="(col) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title"  :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template slot-scope="scope">
 
           <slot v-if="col.columnname !== 'operation'" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/template/tableMainLayout/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="bs-table" :style="{height:height?height:'calc(100vh - 330px)'}">
-    <el-table border stripe ref="tables" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row :data="data" size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
+    <el-table border stripe ref="tables" :fit="tool.calculatedColumnWidth($refs.tables,layout)" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row :data="data" size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
       <!-- <div slot="empty">
         <el-empty :image="require('../../../assets/empty.svg')" :image-size="250">
         </el-empty>
@@ -12,7 +12,7 @@
           align="center"
           @handleSelectionChange="handleSelectionChange">
       </el-table-column>
-      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.tables,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template slot-scope="scope">
 
           <slot v-if="col.columnname !== 'operation'" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>

+ 2 - 2
src/template/tableTemplate/index.vue

@@ -4,13 +4,13 @@
     <slot name="add"></slot>
     <el-input v-if="isInput !== false" style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column  ref="table" show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column  ref="table" show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template v-slot:header="{ column,$index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>
         </template>

+ 2 - 2
src/template/tableTemplate/index1.vue

@@ -4,13 +4,13 @@
     <slot name="add"></slot>
     <el-input  style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+    <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column  ref="table" show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column  ref="table" show-overflow-tooltip v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template v-slot:header="{ column,$index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>
         </template>

+ 20 - 36
src/utils/tool.js

@@ -2,7 +2,9 @@ import { Message } from 'element-ui';
 import store from "../store/index";
 import router from '@/router';
 import api from '@/api/api';
-let timer = null
+import { set } from 'nprogress';
+let timer = null,
+  _uids = [];
 export default {
   // 获取应用权限
   checkAuth (appname,auth) {
@@ -226,42 +228,24 @@ export default {
     
     return result
   },
-  //计算表格列宽度
- async calcTableColWidth (vm,layout,index) {
-    if (!vm) return
+  calculatedColumnWidth(dom, layout) {
+    if (!dom || _uids.includes(dom._uid)) return;
+    _uids.push(dom._uid)
     let lang = localStorage.getItem('lang') || 'ZH';
-    if (lang != 'ZH') {
-        const res = await new Promise((resolve, reject) => {
-          setTimeout(() => {
-            let widths = [],
-              el = vm.$el,
-              width = 0;
-            const ths = el.querySelector('.el-table__header-wrapper').querySelectorAll('table thead tr:first-child th .cell') // 获取头部列元素
-            // 定义变量 存储每列的宽度数据
-            // 获取标题中的单元格宽度
-            ths.forEach((item, i) => {
-              widths[i] = item.offsetWidth
-            })
-            if (timer) clearTimeout(timer)
-            timer = setTimeout(() => {
-              vm.doLayout()
-            }, 1000)
-            let isCheckbox = ths[0].querySelector('.el-checkbox__inner') ? 1 : 0
-            if (typeof layout == 'number') {
-              width = widths[index + isCheckbox] > layout ? widths[index + isCheckbox] : layout
-            } else {
-              width = widths[index + isCheckbox] > layout[index].width ? widths[index + isCheckbox] : layout[index].width
-            }
-            resolve(Number(width - 0 + 20))
-          });
+    if (lang!='ZH') setTimeout(() => {     
+      try {
+        const ths = dom.$el.querySelector('.el-table__header-wrapper').querySelectorAll('table thead tr:first-child th'),
+          nodes = [];
+        for (var key of ths.keys()) {
+            const node = ths[key].querySelector('.cell')
+            if (node && layout.some(v => v.title == node.innerText)) nodes.push(node);
+          } 
+        layout.forEach((v,i) => {
+          v.width = v.width > nodes[i].offsetWidth ? v.width : nodes[i].offsetWidth
         })
-         return Number(res)
-    } else {
-      if (typeof layout == 'number') {
-        return layout === 0 ? 150 : layout
-      } else {
-        return layout[index].width === 0 ? 150 : layout[index].width
-      }
-    }
+        _uids = _uids.filter(v => v != _uids)
+      } catch (error) {}
+    });
+    return true
   },
 }

+ 2 - 2
src/views/salesData/components/table.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table :loading="loading" ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height"  @row-click="rowClick"
+    <el-table :loading="loading" ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height"  @row-click="rowClick"
               style="width:100%;" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="$t(col.title)" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+      <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="$t(col.title)" :min-width="col.width || 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
           <div class="table-panel">
             <!-- 自定义表格显示内容 -->