695593266@qq.com 11 сар өмнө
parent
commit
e6b1b4c6e6

+ 163 - 156
src/components/addDoc/file-table-listTemplate.vue

@@ -27,168 +27,175 @@
 </template>
 
 <script>
-  import { filePageAPI } from './api';
-  import browse from './browse.vue';
+    import { filePageAPI } from './api';
+    import browse from './browse.vue';
 
-  export default {
-    components: { browse },
-    props: {
-      // 上级
-      parentData: {
-        type: Object,
-        default: () => {}
+    export default {
+      components: { browse },
+      props: {
+        // 上级
+        parentData: {
+          type: Object,
+          default: () => {}
+        },
+
+        disabledTableList: {
+          //已选择列表
+          default: () => []
+  <<<<<<< HEAD
+  =======
+        },
+        isQueryAll: {
+          //查看全部
+          default: 1
+  >>>>>>> b51fba53bb497847ec0ef14e4e42a6d74537703c
+        }
       },
 
-      disabledTableList: {
-        //已选择列表
-        default: () => []
-      }
-    },
+      data() {
+        return {
+          selection: [],
+          columns: [
+            {
+              width: 45,
+              type: 'selection',
+              columnKey: 'selection',
+              align: 'center',
+              selectable: (row, index) => {
+                return !this.disabledTableList
+                  .map((item) => item.id)
+                  .includes(row.id);
+              }
+            },
+            {
+              label: '编码',
+              prop: 'code',
+              width: 180,
+              align: 'center',
+              fixed: 'left',
+              showOverflowTooltip: true
+            },
+            {
+              prop: 'name',
+              label: '文档名称',
+              align: 'center',
+              slot: 'name',
+              showOverflowTooltip: true,
+              minWidth: 200
+            },
+            {
+              prop: 'storagePath',
+              label: '文件名称',
+              align: 'center',
 
-    data() {
-      return {
-        selection: [],
-        columns: [
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center',
-            selectable: (row, index) => {
-              return !this.disabledTableList
-                .map((item) => item.id)
-                .includes(row.id);
-            }
-          },
-          {
-            label: '编码',
-            prop: 'code',
-            width: 180,
-            align: 'center',
-            fixed: 'left',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'name',
-            label: '文档名称',
-            align: 'center',
-            slot: 'name',
-            showOverflowTooltip: true,
-            minWidth: 200
-          },
-          {
-            prop: 'storagePath',
-            label: '文件名称',
-            align: 'center',
-
-            showOverflowTooltip: true,
-            minWidth: 200,
-            formatter: (_row, _column, cellValue) => {
-              return cellValue[0]?.name;
-            }
-          },
-          {
-            prop: 'version',
-            label: '版本',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100
-          },
-          {
-            prop: 'checkOutUserName',
-            label: '检出人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100
-          },
-          {
-            prop: 'checkOutStatus',
-            label: '检出状态',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100,
-            formatter: (_row, _column, cellValue) => {
-              return cellValue == 1 ? '已检出' : '';
+              showOverflowTooltip: true,
+              minWidth: 200,
+              formatter: (_row, _column, cellValue) => {
+                return cellValue[0]?.name;
+              }
+            },
+            {
+              prop: 'version',
+              label: '版本',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 100
+            },
+            {
+              prop: 'checkOutUserName',
+              label: '检出人',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 100
+            },
+            {
+              prop: 'checkOutStatus',
+              label: '检出状态',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 100,
+              formatter: (_row, _column, cellValue) => {
+                return cellValue == 1 ? '已检出' : '';
+              }
+            },
+            {
+              prop: 'checkOutTime',
+              label: '检出时间',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 160
+            },
+            {
+              prop: 'createUserName',
+              label: '创建人',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 100
+            },
+            {
+              prop: 'createTime',
+              label: '创建时间',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 160,
+              formatter: (_row, _column, cellValue) => {
+                return this.$util.toDateString(cellValue);
+              }
+            },
+            {
+              prop: 'updateUserName',
+              label: '修改人',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 100
+            },
+            {
+              prop: 'updateTime',
+              label: '修改时间',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 160
+            },
+            {
+              prop: 'sizeUnit',
+              label: '文档大小',
+              align: 'center',
+              showOverflowTooltip: true,
+              minWidth: 100
+            },
+            {
+              columnKey: 'action',
+              label: '操作',
+              width: 150,
+              align: 'center',
+              resizable: false,
+              slot: 'action',
+              showOverflowTooltip: true,
+              fixed: 'right'
             }
-          },
-          {
-            prop: 'checkOutTime',
-            label: '检出时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 160
-          },
-          {
-            prop: 'createUserName',
-            label: '创建人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100
-          },
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 160,
-            formatter: (_row, _column, cellValue) => {
-              return this.$util.toDateString(cellValue);
-            }
-          },
-          {
-            prop: 'updateUserName',
-            label: '修改人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100
-          },
-          {
-            prop: 'updateTime',
-            label: '修改时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 160
-          },
-          {
-            prop: 'sizeUnit',
-            label: '文档大小',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100
-          },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 150,
-            align: 'center',
-            resizable: false,
-            slot: 'action',
-            showOverflowTooltip: true,
-            fixed: 'right'
-          }
-        ]
-      };
-    },
-    created() {},
-
-    methods: {
-      /* 表格数据源 */
-      datasource({ page, limit, where, order }) {
-        return filePageAPI({
-          ids: "'" + this.parentData?.id + "'"
-        });
-      },
-      /* 刷新表格 */
-      reload(where) {
-        this.$refs.table.reload({ pageNum: 1, where: where });
+          ]
+        };
       },
+      created() {},
 
-      browseOpen(row) {
-        this.$refs.browseRef.open(row);
-      },
-      getTableList() {
-        return JSON.parse(JSON.stringify(this.selection));
+      methods: {
+        /* 表格数据源 */
+        datasource({ page, limit, where, order }) {
+          return filePageAPI({
+            ids: "'" + this.parentData?.id + "'"
+          });
+        },
+        /* 刷新表格 */
+        reload(where) {
+          this.$refs.table.reload({ pageNum: 1, where: where });
+        },
+
+        browseOpen(row) {
+          this.$refs.browseRef.open(row);
+        },
+        getTableList() {
+          return JSON.parse(JSON.stringify(this.selection));
+        }
       }
-    }
-  };
+    };
 </script>

+ 0 - 1
src/views/material/BOMmanage/file/index.vue

@@ -48,7 +48,6 @@
               :initLoad="false"
               height="calc(60vh)"
               tool-class="ele-toolbar-form"
-              :needPage="false"
               row-key="id"
               :selection.sync="selection"
               highlight-current-row