Procházet zdrojové kódy

设备和舟皿台账修改提交

LAPTOP-16IUEB3P\Lenovo před 2 roky
rodič
revize
4f6efd4ad6

+ 1 - 1
src/api/ledgerAssets/index.js

@@ -41,7 +41,7 @@ export async function getAssetList (data) {
 
 // 查询实例详情
 export async function getAssetInfo (id) {
-  const res = await request.get(`/main/asset/login/${id}`);
+  const res = await request.get(`main/asset/getById/${id}`);
   if (res.data.code == 0) {
     return res.data.data;
   }

+ 2 - 2
src/components/upload/fileUpload.vue

@@ -148,7 +148,7 @@
     computed: {
       fileList: {
         set (val) {
-          console.log(val);
+          // console.log(val);
           this.$emit(
             'input',
             val.map((item) => ({
@@ -158,7 +158,7 @@
           );
         },
         get () {
-          console.log(this.value, 2);
+          // console.log(this.value, 2);
           const arr =
             (this.value &&
               this.value.map((item) => ({

+ 1 - 1
src/views/ledgerAssets/boat/components/boat-list.vue

@@ -26,7 +26,7 @@
       </template>
       <!-- 编码列 -->
       <template v-slot:code="{ row }">
-        <el-link @click="details(row)">
+        <el-link @click="details(row)" type="primary" :underline="false">
           {{ row.code }}
         </el-link>
       </template>

+ 21 - 30
src/views/ledgerAssets/equipment/components/baseInfo.vue

@@ -55,7 +55,7 @@
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 网络状态</template>
-        {{ basicInfo.networkStatus == 1 ? '在线' : '离线' }}
+        {{ basicInfo.networkStatus === 1 ? '在线' : ( basicInfo.networkStatus === 0 ?'离线':'') }}
       </el-descriptions-item>
     </el-descriptions>
 
@@ -87,10 +87,10 @@
     <div class="basic-details-title border-none">
       <span class="border-span">文档信息</span>
     </div>
-    <!-- <div class="upload-container">
+    <div class="upload-container">
       <div class="img-box">
         <img
-          src="~@/assets/img/upload-placeholder.svg"
+          src="~@/assets/upload-placeholder.svg"
           alt=""
           v-if="!imageUrl"
         />
@@ -98,7 +98,7 @@
       </div>
       <div class="file-list">
         <div
-          :class="{ disabled: !item.accessUrl }"
+          :class="{ disabled: !item.storePath }"
           @click="openfile(item)"
           v-for="(item, index) in fileList"
           :key="index"
@@ -107,7 +107,7 @@
           {{ item.t_name }}
         </div>
       </div>
-    </div> -->
+    </div>
     <div class="basic-details-title border-none">
       <span class="border-span">物联参数</span>
     </div>
@@ -165,7 +165,8 @@
 
 <script>
   import { getAssetInfo } from '@/api/ledgerAssets';
-  // import { imageView, fileSystemDownload } from '@/utils'
+  import { getImageUrl } from '@/utils/file.js';
+  import { getFile } from '@/api/system/file/index.js';
   // import DetailsDialog from '@/views/ledgerAssets/components/outstoreDetailsDialog.vue'
   export default {
     props: ['id'],
@@ -233,33 +234,24 @@
           this.basicInfo = data.category;
           if (data.attUrl && data.attUrl.length > 0) {
             // 文档信息
-            // Object.keys(this.attUrl).forEach((n, index) => {
-            //   if (data.attUrl[index].accessUrl) {
-            //     this.attUrl[n] = data.attUrl[index];
-            //   }
-            // });
+            data.attUrl.forEach((item, index) => {
+              Object.assign(this.fileList[item.sort - 1], item)
+            })
           }
-
           // 资产信息
           for (const item of this.prodOpt) {
             // 地址
             if (item.key == 'detailLocation') {
-              item.value = data.positionList[0]?.path
-                ?.map((i) => i.name)
-                .join(',');
+              item.value = data.positionList[0]?.pathName
+                // ?.map((i) => i.name)
+                // .join(',');
             } else {
               item.value = data[item.key] || this.basicInfo[item.key];
             }
           }
-
-          console.log('this.prodOpt', this.prodOpt);
-
           // 设备图片
-          this.imageUrl = data.imageUrl;
-          if (this.imageUrl) {
-            // imageView(this.imageUrl).then((res) => {
-            //   this.$refs.UploadImg.setImg(res);
-            // });
+          if(typeof data.imageUrl !='string' ){
+             this.imageUrl  = getImageUrl(data.imageUrl.storePath)
           }
         });
       },
@@ -272,8 +264,8 @@
         return item.standardCapacity || '';
       },
       openfile (row) {
-        if (row.accessUrl) {
-          fileSystemDownload(row);
+        if (row.storePath) {
+          getFile({ objectName: row.storePath }, row.name);
         }
       },
       // 打开详情弹窗
@@ -288,9 +280,9 @@
       },
       // 设备位置
       initDetailLocation (val) {
-        console.log(val);
+        // console.log(val);
         let list = String(val)
-          .split('/')
+          .split(',')
           .filter((n) => {
             return n !== 'null';
           });
@@ -338,10 +330,9 @@
           height: 57px;
           text-align: center;
           line-height: 55px;
-          border: 1px solid var(--mainColor);
-          color: var(--mainColor);
+          border: 1px solid #1890ff;
+          color: #1890ff;
           cursor: pointer;
-
           &.disabled {
             cursor: not-allowed;
             border-color: rgba(215, 215, 215, 1);

+ 1 - 1
src/views/ledgerAssets/equipment/edit.vue

@@ -115,7 +115,7 @@
             </el-descriptions-item>
             <el-descriptions-item v-if="pageType == 'edit'">
               <template slot="label"> 网络状态</template>
-              {{ networkStatus == 1 ? '在线' : '离线' }}
+              {{ networkStatus === 1 ? '在线' : ( networkStatus === 0 ?'离线':'') }}
             </el-descriptions-item>
           </el-descriptions>
 

+ 8 - 12
src/views/ledgerAssets/turnoverCar/components/baseInfo.vue

@@ -14,7 +14,7 @@
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 材质</template>
-        {{ info.category.extendField && JSON.parse(info.category.extendField).texture }}
+        {{getDictValue('周转车材质',  info.category.materialQuality)}}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 型号 </template>
@@ -123,13 +123,9 @@
 <script>
 // import {getAssetInfo} from "@/api/ledgerAssets/asset"
 // import DetailsDialog from '@/views/ledgerAssets/components/outstoreDetailsDialog.vue'
-import { imageView } from "@/utils"
-  import {
-    getAssetInfo
-  } from '@/api/ledgerAssets';
-  import {
-    getDetails
-  } from '@/api/classifyManage/itemInformation';
+  import { getImageUrl } from '@/utils/file.js';
+  import { getAssetInfo } from '@/api/ledgerAssets';
+  import { getDetails } from '@/api/classifyManage/itemInformation';
   import dictMixins from '@/mixins/dictMixins';
 export default {
   mixins: [dictMixins],
@@ -154,6 +150,7 @@ export default {
   created () {
      this.getDetilInfo()
      this.requestDict('生命周期');
+     this.requestDict('周转车材质');
   },
   methods:{
      async getDetilInfo(){
@@ -164,10 +161,9 @@ export default {
           this.$set(this.info, 'category', res.category)
           this.$set(this.info, 'extInfoSelf', res.extInfoSelf?res.extInfoSelf:[])
           // this.$set(this.info, 'warehouseDetail', res.data.warehouseDetail)
-          if (res.imageUrl) {
-            imageView(res.imageUrl).then((res) => {
-              this.imageUrl = res;
-            });
+          // 设备图片
+          if(typeof res.imageUrl !='string' ){
+             this.imageUrl  = getImageUrl(res.imageUrl.storePath)
           }
        }
      },