From b5e4adfc3a55490ad1cd49f50dfcc9dfb7b57d33 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 31 八月 2023 13:45:34 +0800
Subject: [PATCH] 文档名称来源 修改

---
 src/views/eam/newEquipment/EquipmentDocumentList.vue |  206 ++++++++++++++++++++++++++++-----------------------
 1 files changed, 114 insertions(+), 92 deletions(-)

diff --git a/src/views/eam/newEquipment/EquipmentDocumentList.vue b/src/views/eam/newEquipment/EquipmentDocumentList.vue
index 4a30fcf..92347dc 100644
--- a/src/views/eam/newEquipment/EquipmentDocumentList.vue
+++ b/src/views/eam/newEquipment/EquipmentDocumentList.vue
@@ -1,8 +1,14 @@
 <template>
-  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
+  <a-card
+    :bordered="false"
+    :class="'cust-erp-sub-tab'"
+  >
     <!-- 鏌ヨ鍖哄煙 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
+      <a-form
+        layout="inline"
+        @keyup.enter.native="searchQuery"
+      >
         <a-row :gutter="24">
         </a-row>
       </a-form>
@@ -10,8 +16,15 @@
     <!-- 鏌ヨ鍖哄煙-END -->
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
-    <div class="table-operator" v-if="mainId">
-      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+    <div
+      class="table-operator"
+      v-if="mainId"
+    >
+      <a-button
+        @click="handleAdd"
+        type="primary"
+        icon="plus"
+      >鏂板</a-button>
       <!-- <a-button type="primary" icon="download" @click="handleExportXls('璁惧鏂囨。')">瀵煎嚭</a-button>
       <a-upload
         name="file"
@@ -24,7 +37,10 @@
       </a-upload> -->
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
+          <a-menu-item
+            key="1"
+            @click="batchDel"
+          ><a-icon type="delete" />鍒犻櫎</a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button>
       </a-dropdown>
@@ -32,9 +48,15 @@
 
     <!-- table鍖哄煙-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <div
+        class="ant-alert ant-alert-info"
+        style="margin-bottom: 16px;"
+      >
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
-        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+        <a
+          style="margin-left: 24px"
+          @click="onClearSelected"
+        >娓呯┖</a>
       </div>
 
       <a-table
@@ -48,7 +70,8 @@
         :pagination="ipagination"
         :loading="loading"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
+        @change="handleTableChange"
+      >
 
         <span
           slot="size"
@@ -109,64 +132,68 @@
       </a-table>
     </div>
     <pdf-view ref="pdfview"></pdf-view>
-    <equipmentDocument-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></equipmentDocument-modal>
+    <equipmentDocument-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+      :mainId="mainId"
+    ></equipmentDocument-modal>
   </a-card>
 </template>
 
 <script>
 
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import EquipmentDocumentModal from '../modules/equipmentNew/EquipmentDocumentModal'
-  import { preview } from 'vue-photo-preview'
-  import { mixinDevice } from '@/utils/mixin'
- import { ACCESS_TOKEN } from '@/store/mutation-types'
- import Vue from 'vue'
- import PdfView from '@views/common/PdfView'
- import JInput from '@/components/jeecg/JInput'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import EquipmentDocumentModal from '../modules/equipmentNew/EquipmentDocumentModal'
+import { preview } from 'vue-photo-preview'
+import { mixinDevice } from '@/utils/mixin'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+import Vue from 'vue'
+import PdfView from '@views/common/PdfView'
+import JInput from '@/components/jeecg/JInput'
 import Tooltip from 'ant-design-vue/es/tooltip'
 import JEllipsis from "@/components/jeecg/JEllipsis";
- import { getFileAccessHttpUrl } from '@/api/manage';
- import '@/assets/less/TableExpand.less'
- import store from '@/store/' 
+import { getFileAccessHttpUrl } from '@/api/manage';
+import '@/assets/less/TableExpand.less'
+import store from '@/store/'
 import { downFile, getAction } from '../../../api/manage'
-  export default {
-    name: "EquipmentDocumentList",
-    mixins:[JeecgListMixin,mixinDevice],
-    components: { 
-      EquipmentDocumentModal,  
-      PdfView,
-      preview,
-      JInput,
-      Tooltip,
-      JEllipsis, 
+export default {
+  name: "EquipmentDocumentList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    EquipmentDocumentModal,
+    PdfView,
+    preview,
+    JInput,
+    Tooltip,
+    JEllipsis,
   },
-    props:{
-      mainId:{
-        type:String,
-        default:'',
-        required:false
-      }
-    },
-    watch:{
-      mainId:{
-        immediate: true,
-        handler(val) {
-          if(!this.mainId){
-            this.clearList()
-          }else{
-            this.queryParam['equipmentId'] = val
-            this.loadData(1);
-          }
+  props: {
+    mainId: {
+      type: String,
+      default: '',
+      required: false
+    }
+  },
+  watch: {
+    mainId: {
+      immediate: true,
+      handler(val) {
+        if (!this.mainId) {
+          this.clearList()
+        } else {
+          this.queryParam['equipmentId'] = val
+          this.loadData(1);
         }
       }
-    },
-    data () {
-      return {
-        description: '璁惧鍙拌处绠$悊椤甸潰',
-        disableMixinCreated:true,
-        colorMap: {},
-        // 琛ㄥご
-        columns: [
+    }
+  },
+  data() {
+    return {
+      description: '璁惧鍙拌处绠$悊椤甸潰',
+      disableMixinCreated: true,
+      colorMap: {},
+      // 琛ㄥご
+      columns: [
         {
           title: '#',
           dataIndex: '',
@@ -181,31 +208,26 @@
           title: '鏂囨。缂栧彿',
           dataIndex: 'num',
           align: "center",
-          width:300,
         },
         {
           title: '鏂囨。鍚嶇О',
           align: 'center',
           dataIndex: 'name',
-          width:300,
         },
         {
           title: '鏂囨。绫诲瀷',
           align: 'center',
-          dataIndex: 'type_dictText',
-          width:300,
+          dataIndex: 'fileType_dictText',
         },
         {
           title: '涓婁紶鏃堕棿',
           align: "center",
           dataIndex: 'createTime',
-          width:300,
         },
         {
           title: '涓婁紶鑰�',
           align: "center",
           dataIndex: 'createBy',
-          width:300,
         },
         {
           title: '澶у皬',
@@ -214,7 +236,7 @@
           scopedSlots: {
             customRender: 'size'
           },
-          width:300,
+          width: 300,
         },
         {
           title: '鎿嶄綔',
@@ -225,32 +247,32 @@
           },
           width: 200,
         },
-        ],
-        url: {
-            list: "/eam/equipmentDocument/list",
-            delete: "/eam/equipmentDocument/delete",
-            deleteBatch: '/eam/equipmentDocument/deleteBatch',
-            urlDownload: window._CONFIG['staticDomainURL'],
-            download: '/sys/upload/downloadFile',
-        },
-        dictOptions:{
-        }
-      }
-    },
-    created() {
-    },
-    computed: {
-      importExcelUrl(){
-        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
-      }
-    },
-    methods: {
-      clearList(){
-        this.dataSource=[]
-        this.selectedRowKeys=[]
-        this.ipagination.current = 1
+      ],
+      url: {
+        list: "/eam/equipmentDocument/list",
+        delete: "/eam/equipmentDocument/delete",
+        deleteBatch: '/eam/equipmentDocument/deleteBatch',
+        urlDownload: window._CONFIG['staticDomainURL'],
+        download: '/sys/upload/downloadFile',
       },
-      sizeConvert(limit) {
+      dictOptions: {
+      }
+    }
+  },
+  created() {
+  },
+  computed: {
+    importExcelUrl() {
+      return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
+    }
+  },
+  methods: {
+    clearList() {
+      this.dataSource = []
+      this.selectedRowKeys = []
+      this.ipagination.current = 1
+    },
+    sizeConvert(limit) {
       var size = "";
       if (limit < 0.1 * 1024) {
         size = parseFloat(limit).toFixed(2) + "B";//灏忎簬0.1KB锛屽垯杞寲鎴怋
@@ -306,10 +328,10 @@
         // object-key琛ㄧず浠嶰SS涓嬭浇鏂囦欢鏃堕渶瑕佹寚瀹氬寘鍚枃浠跺悗缂�鍦ㄥ唴鐨勫畬鏁磋矾寰勶紝渚嬪abc/efg/123.jpg銆�
         return client.signatureUrl(record.path)
       }
-      },
-      view(record) {
+    },
+    view(record) {
       this.$refs.pdfview.showPdf(record.upload.src);
-      },
+    },
 
     handleDownload(record) {
       downFile(this.url.download, { id: record.id }).then((res) => {
@@ -371,11 +393,11 @@
 
 
 
-    }
   }
+}
 </script>
 <style scoped>
- @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 /deep/ .frozenRowClass {
   color: #c9c9c9;
 }

--
Gitblit v1.9.3