LAPTOP-16IUEB3P\Lenovo 3 роки тому
батько
коміт
2c64ec7be2

+ 26 - 24
src/api/ledgerAssets/boat.js → src/api/ledgerAssets/index.js

@@ -11,14 +11,14 @@ export async function getBoatList (data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-// 查询实例详情
-export async function getCategoryInfo (id) {
-  const res = await request.get(`/main/category/info/${id}`);
-  if (res.data.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.data.message));
-}
+// // 查询实例详情
+// export async function getCategoryInfo (id) {
+//   const res = await request.get(`/main/category/info/${id}`);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
 
 
 // 获取单个类别实体明细分页
@@ -32,9 +32,27 @@ export async function getPageSingle (data) {
 }
 
 
+// 获取实体列表分页
+export async function getAssetList (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 
 
 
+// 查询实例详情
+export async function getAssetInfo (id) {
+  const res = await request.get(`/main/asset/login/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 
 
 
@@ -42,19 +60,3 @@ export async function getPageSingle (data) {
 
 
 
-// 删除分类
-export async function deleteCategory (id) {
-  const res = await request.get(`/main/categoryLevel/delete/${id}`);
-  if (res.data.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.data.message));
-}
-//根据ID查询分类详情系信息
-export async function getInfoById (id) {
-  const res = await request.get(`/main/categoryLevel/getById/${id}`);
-  if (res.data.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.data.message));
-}

+ 0 - 43
src/api/ledgerAssets/turnovercar.js

@@ -1,43 +0,0 @@
-import request from '@/utils/request';
-
-
-// 获取实体列表分页
-export async function getAssetList (data) {
-  let par = new URLSearchParams(data);
-  const res = await request.get(`/main/asset/page?` + par, {});
-  if (res.data.code == 0) {
-    return res.data.data;
-  }
-  return Promise.reject(new Error(res.data.message));
-}
-
-// 查询实例详情
-export async function getCategoryInfo (id) {
-  const res = await request.get(`/main/category/info/${id}`);
-  if (res.data.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.data.message));
-}
-
-
-// 获取单个类别实体明细分页
-export async function getPageSingle (data) {
-  let par = new URLSearchParams(data);
-  const res = await request.get(`/main/asset/pageSingleSubstance?` + par, {});
-  if (res.data.code == 0) {
-    return res.data.data;
-  }
-  return Promise.reject(new Error(res.data.message));
-}
-
-
-
-
-
-
-
-
-
-
-

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
src/assets/upload-placeholder.svg


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

@@ -77,7 +77,7 @@
   import {
     getCategoryInfo,
     getPageSingle
-  } from '@/api/ledgerAssets/boat.js';
+  } from '@/api/ledgerAssets';
 export default {
   props: {
     rowId:{

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

@@ -37,7 +37,7 @@
   import BoatSearch from './boat-search.vue';
   import {
     getBoatList
-  } from '@/api/ledgerAssets/boat.js';
+  } from '@/api/ledgerAssets';
 
   export default {
     components: { BoatSearch },

+ 1 - 1
src/views/ledgerAssets/boat/index.vue

@@ -34,7 +34,7 @@
   import BoatList from './components/boat-list.vue';
   import {
     getBoatList
-  } from '@/api/ledgerAssets/boat.js';
+  } from '@/api/ledgerAssets';
   export default {
     components: {
       AssetTree ,

+ 1 - 1
src/views/ledgerAssets/material/components/baseInfo.vue

@@ -172,7 +172,7 @@
   import {
     getCategoryInfo,
     getPageSingle
-  } from '@/api/ledgerAssets/boat.js';
+  } from '@/api/ledgerAssets';
 export default {
   props: {
      rowId:{

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

@@ -37,7 +37,7 @@
   import MaterialSearch from './material-search.vue';
   import {
     getBoatList
-  } from '@/api/ledgerAssets/boat.js';
+  } from '@/api/ledgerAssets';
 
   export default {
     components: { MaterialSearch },

+ 1 - 1
src/views/ledgerAssets/material/index.vue

@@ -34,7 +34,7 @@
   import MaterialList from './components/material-list.vue';
   import {
     getBoatList
-  } from '@/api/ledgerAssets/boat.js';
+  } from '@/api/ledgerAssets';
   export default {
     components: {
       AssetTree ,

+ 49 - 36
src/views/ledgerAssets/turnoverCar/components/baseInfo.vue

@@ -5,43 +5,43 @@
     </div>
     <el-descriptions title="" :column="4" size="medium" border>
       <el-descriptions-item>
-        <template slot="label"> 周转编码 </template>
-        {{ info.assetCode }}
+        <template slot="label"> 编码 </template>
+        {{ info.code }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 周转车名称 </template>
-        {{ info.assetName }}
+        <template slot="label"> 名称 </template>
+        {{ info.name }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 材质</template>
-        {{info.extraInfo.texture?info.extraInfo.texture:''}}
+        <!-- {{info.extraInfo.texture?info.extraInfo.texture:''}} -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 型号 </template>
-        {{info.information.modelType}}
+        <!-- {{info.information.modelType}} -->
       </el-descriptions-item>
       <el-descriptions-item :span="2">
         <template slot="label"> 分类 </template>
-        {{info.information.classificationUrl}}
+        <!-- {{info.information.classificationUrl}} -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 采购日期 </template>
-       {{info.warehouseDetail.procurementTime}}
+       <!-- {{info.warehouseDetail.procurementTime}} -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 过保日期</template>
-        {{info.warehouseDetail.expirationTime}}
+        <!-- {{info.warehouseDetail.expirationTime}} -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 计量单位</template>
-        {{info.information.measuringUnit}}
+        <!-- {{info.information.measuringUnit}} -->
       </el-descriptions-item>
-      <el-descriptions-item>
+     <!-- <el-descriptions-item>
         <template slot="label"> 生命周期</template>
         <div v-if="queryInfo.source==1" style="color: #70B603">在用</div>
         <div v-if="queryInfo.source==2" style="color: #F59A23">在库</div>
         <div v-if="queryInfo.source==3" style="color: #AAAAAA">消耗</div>
-      </el-descriptions-item>
+      </el-descriptions-item> -->
     </el-descriptions>
 
     <div class="basic-details-title border-none">
@@ -50,7 +50,7 @@
     <el-descriptions title="" :column="4" size="medium" border>
       <el-descriptions-item>
         <template slot="label"> 固资编码 </template>
-        {{info.fixAssetCode}}
+        {{info.fixCode}}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 品牌 </template>
@@ -66,7 +66,7 @@
       </el-descriptions-item>
       <el-descriptions-item :span="2">
         <template slot="label"> {{queryInfo.source==2?'入库单号':'出库单号'}} </template>
-        <el-link style="color: #70B603" @click="jumpDetails">{{info.warehouseDetail.bizNum}}</el-link>
+        <!-- <el-link style="color: #70B603" @click="jumpDetails">{{info.warehouseDetail.bizNum}}</el-link> -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 所在部门 </template>
@@ -92,16 +92,16 @@
     <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"
          />
          <img v-else :src="imageUrl" alt="周转车图片" />
        </div>
-    </div> -->
+    </div>
     <div class="basic-details-title border-none">
       <span class="border-span">扩展信息</span>
     </div>
@@ -116,9 +116,9 @@
       </el-descriptions-item>
     </el-descriptions>
 
-    <DetailsDialog
+ <!--   <DetailsDialog
       ref="detailsDialogRef"
-    />
+    /> -->
   </div>
 </template>
 
@@ -126,11 +126,17 @@
 // 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';
 export default {
   props: {
-    queryInfo:{
-      type:Object,
-      default:{}
+    rowId:{
+      type:String ,
+      default:''
     },
   },
   // components: { DetailsDialog },
@@ -179,26 +185,29 @@ export default {
       // 设备图片
       imageUrl: "",
 
+      queryInfo:{}
+
     }
   },
   created () {
-     let id = this.queryInfo.id
-     this.getDetilInfo(id)
+     // let id = this.queryInfo.id
+     this.getDetilInfo()
   },
   methods:{
-     async getDetilInfo(id){
-       const res = await getAssetInfo({id:id})
-       if (res.success){
+     async getDetilInfo(){
+       const res = await getAssetInfo(this.rowId)
+       console.log('rrrrr',res)
+       if (res){
           this.info = res.data
-          this.$set(this.info, 'information', res.data.information)
-          this.$set(this.info, 'warehouseDetail', res.data.warehouseDetail)
-          this.$set(this.info, 'extraInfo', JSON.parse(res.data.information.extendField))
-          this.$set(this.info, 'extendField', JSON.parse(res.data.extendField))
-          if (res.data.imageUrl) {
-            imageView(res.data.imageUrl).then((res) => {
-              this.imageUrl = res;
-            });
-          }
+          // this.$set(this.info, 'information', res.data.information)
+          // this.$set(this.info, 'warehouseDetail', res.data.warehouseDetail)
+          // this.$set(this.info, 'extraInfo', JSON.parse(res.data.information.extendField))
+          // this.$set(this.info, 'extendField', JSON.parse(res.data.extendField))
+          // if (res.data.imageUrl) {
+          //   imageView(res.data.imageUrl).then((res) => {
+          //     this.imageUrl = res;
+          //   });
+          // }
        }
      },
      // 打开详情弹窗
@@ -223,6 +232,10 @@ export default {
   .content {
     padding: 0 20px;
   }
+  .basic-details-title{
+    font-size: 16px;
+    margin: 15px 0;
+  }
   .upload-container {
     width:100%;
     display: flex;

+ 3 - 3
src/views/ledgerAssets/turnoverCar/components/turnovercar-list.vue

@@ -50,7 +50,7 @@
   import TurnovercarSearch from './turnovercar-search.vue';
   import {
     getAssetList
-  } from '@/api/ledgerAssets/turnovercar.js';
+  } from '@/api/ledgerAssets';
 
   export default {
     components: { TurnovercarSearch },
@@ -94,7 +94,7 @@
             minWidth: 110
           },
           {
-            prop: 'brandNum',
+            prop: 'fixCode',
             label: '固资编码',
             showOverflowTooltip: true,
             minWidth: 110
@@ -182,7 +182,7 @@
     },
     watch: {
       // 监听类别id变化
-      rootId() {
+      categoryId() {
         this.reload();
       }
     }

+ 7 - 2
src/views/ledgerAssets/turnoverCar/components/turnovercar-search.vue

@@ -42,7 +42,7 @@
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="固定资产编码:" label-width="100px">
-          <el-input clearable v-model="where.fixAssetCode" placeholder="请输入" />
+          <el-input clearable v-model="where.fixCode" placeholder="请输入" />
         </el-form-item>
         <div class="ele-form-actions">
           <el-button
@@ -75,7 +75,12 @@
       // 默认表单数据
       const defaultWhere = {
         name: '',
-        groupId: ''
+        code: '',
+        fixCode:'',
+        // source:'',
+        // texture:'',
+        // spaceModule:'',
+        // dept:''
       };
       return {
         // 表单数据

+ 6 - 28
src/views/ledgerAssets/turnoverCar/detail.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!-- tab切换 -->
-    <div class="switch">
+<!--    <div class="switch">
       <div class="switch_left">
         <ul>
           <li
@@ -15,53 +15,31 @@
         </ul>
         <el-button size="small" @click="$router.go(-1)">返回</el-button>
       </div>
-    </div>
+    </div> -->
     <div class="content-wrapper">
-      <component :is="activeComp" :queryInfo="queryInfo"></component>
+      <component :is="activeComp" :rowId="rowId"></component>
     </div>
   </div>
 </template>
 
 <script>
 import baseInfo from './components/baseInfo.vue'
-// import mould from '../components/details/mould.vue'
-// import maintain from '../components/details/maintain.vue'
-// import repair from '../components/details/repair.vue'
-// import malfunction from '../components/details/malfunction.vue'
-// import InternetRecord from '../components/details/InternetRecord.vue'
-// import production from '../components/details/production.vue'
-// import pointInspection from '../components/details/point-inspection.vue'
 export default {
   components: {
     baseInfo,
-    // mould,
-    // pointInspection,
-    // maintain,
-    // repair,
-    // production,
-    // InternetRecord,
-    // malfunction
   },
   data () {
     return {
       activeComp: 'baseInfo',
       tabOptions: [
-        { key: 'baseInfo', name: '基本信息' },
-        // { key: 'mould', name: '关联模具' },
-        // { key: 'pointInspection', name: '点巡检记录' },
-        // { key: 'maintain', name: '保养记录' },
-        // { key: 'repair', name: '维修记录' },
-        // { key: 'malfunction', name: '故障记录' },
-        // { key: 'production', name: '生产记录' },
-        // { key: 'internet', name: '物联数据' },
-        // { key: 'InternetRecord', name: '物联记录' }
+        { key: 'baseInfo', name: '基本信息' }
       ],
-      queryInfo:null
+      rowId:null
     }
   },
 
   created () {
-     this.queryInfo = JSON.parse(this.$route.query.row)
+     this.rowId = this.$route.query.id
   },
 
 }

+ 247 - 203
src/views/ledgerAssets/turnoverCar/edit.vue

@@ -15,31 +15,31 @@
         <el-descriptions title="" :column="4" size="medium" border>
           <el-descriptions-item>
             <template slot="label"> 周转车编码 </template>
-            {{info.assetCode}}
+            {{ info.assetCode }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 周转车名称 </template>
-            {{info.assetName}}
+            {{ info.assetName }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 材质 </template>
-            {{info.textureInfo.texture?info.textureInfo.texture:''}}
+            {{ info.textureInfo.texture ? info.textureInfo.texture : '' }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 型号 </template>
-            {{info.information.modelType}}
+            {{ info.information.modelType }}
           </el-descriptions-item>
           <el-descriptions-item :span="2">
             <template slot="label"> 分类 </template>
-            {{info.information.classificationUrl}}
+            {{ info.information.classificationUrl }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 采购日期 </template>
-            {{info.warehouseDetail.procurementTime}}
+            {{ info.warehouseDetail.procurementTime }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 过保日期 </template>
-            {{info.warehouseDetail.expirationTime}}
+            {{ info.warehouseDetail.expirationTime }}
           </el-descriptions-item>
         </el-descriptions>
 
@@ -60,13 +60,12 @@
               ></el-form-item>
             </el-col>
             <el-col :md="8" :xs="8" :sm="8">
-               <!-- :initStr="info.ownershipDeptCode" -->
               <el-form-item label="权属部门" prop="name" class="qsbm">
                 <el-input
                   v-model="info.ownershipDeptCode"
                   v-show="false"
                 ></el-input>
-                <selectTree
+<!--                <selectTree
                   ref="tree2"
                   class="input"
                   :value="info.ownershipDeptCode"
@@ -74,10 +73,10 @@
                   :props="{
                     value: 'code',
                     label: 'name',
-                    children: 'children',
+                    children: 'children'
                   }"
                   @getValue="qsDeptClick"
-                />
+                /> -->
               </el-form-item>
             </el-col>
           </el-row>
@@ -86,33 +85,60 @@
           <span class="border-span">文档信息</span>
         </div>
         <div class="upload-container">
-          <UploadImg  @getImgs="cbUploadImg" :assetName="`周转车`" ref="UploadImg"/>
+          <!-- <UploadImg
+            @getImgs="cbUploadImg"
+            :assetName="`周转车`"
+            ref="UploadImg"
+          /> -->
         </div>
         <div class="basic-details-title border-none">
           <span class="border-span">扩展信息</span>
         </div>
         <el-row>
-           <el-form :model="itemForm" :rules="customRule" ref="formCustom" class="row-form">
-                <el-col :span="8" v-for="(item,index) in itemForm.addList" :key="index">
-                     <el-form-item
-                        :prop="'addList.' + index + '.key'"
-                        :rules="{
-                           required: true, message: '自定义参数名称不能为空', trigger: 'blur'
-                       }"
-                     >
-                       <div  class="add-col">
-                           <el-input class="col-input" v-model="item.key" placeholder="参数名称"></el-input>
-                           <el-input class="col-input" v-model="item.value" placeholder="参数值"></el-input>
-                           <el-button type="text" @click="delt(item,index)"> 删除 </el-button>
-                       </div>
-                     </el-form-item>
-                </el-col>
-                <el-col :span="8" v-if="itemForm.addList.length<10">
-                    <el-form-item label-width="20px">
-                         <el-button type="primary" @click="addItem">增加自定义参数</el-button>
-                    </el-form-item>
-                </el-col>
-           </el-form>
+          <el-form
+            :model="itemForm"
+            :rules="customRule"
+            ref="formCustom"
+            class="row-form"
+          >
+            <el-col
+              :span="8"
+              v-for="(item, index) in itemForm.addList"
+              :key="index"
+            >
+              <el-form-item
+                :prop="'addList.' + index + '.key'"
+                :rules="{
+                  required: true,
+                  message: '自定义参数名称不能为空',
+                  trigger: 'blur'
+                }"
+              >
+                <div class="add-col">
+                  <el-input
+                    class="col-input"
+                    v-model="item.key"
+                    placeholder="参数名称"
+                  ></el-input>
+                  <el-input
+                    class="col-input"
+                    v-model="item.value"
+                    placeholder="参数值"
+                  ></el-input>
+                  <el-button type="text" @click="delt(item, index)">
+                    删除
+                  </el-button>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8" v-if="itemForm.addList.length < 10">
+              <el-form-item label-width="20px">
+                <el-button type="primary" @click="addItem"
+                  >增加自定义参数</el-button
+                >
+              </el-form-item>
+            </el-col>
+          </el-form>
         </el-row>
       </div>
     </div>
@@ -120,191 +146,209 @@
 </template>
 
 <script>
-// import selectUpload from '@/components/selectUpload'
-// import UploadImg from '@/components/uploadImg/WithView.vue'
-// import {getAssetInfo,toSaveAsset} from "@/api/ledgerAssets/asset"
-// import { imageView } from "@/utils";
-// import org from "@/api/main/org";
-// import selectTree from "@/components/selectTree";
-export default {
-  // components: { selectUpload, UploadImg , selectTree},
-  data () {
-    return {
-      formData: {},
-      info:{
-        textureInfo:{},
-        information:{},
-        warehouseDetail:{},
-        extendField:[],
-      },
-      customRule:{},
-      itemForm:{
-        addList:[]
-      },
+  // import selectUpload from '@/components/selectUpload'
+  // import UploadImg from '@/components/uploadImg/WithView.vue'
+  // import {getAssetInfo,toSaveAsset} from "@/api/ledgerAssets/asset"
+  // import { imageView } from "@/utils";
+  // import org from "@/api/main/org";
+  // import selectTree from "@/components/selectTree";
+  import {
+    getAssetInfo
+  } from '@/api/ledgerAssets';
+  export default {
+    // components: { selectUpload, UploadImg , selectTree},
+    data () {
+      return {
+        formData: {},
+        info: {
+          textureInfo: {},
+          information: {},
+          warehouseDetail: {},
+          extendField: []
+        },
+        customRule: {},
+        itemForm: {
+          addList: []
+        },
 
-      imageUrl: null,
-      deptList:[]
-
-    }
-  },
-  created(){
-    let id =  this.$route.query.id
-    this.getDetilInfo(id)
-    this.getTreeList()
-  },
-  methods: {
-    // 树形结构数据
-    getTreeList() {
-      org.tree().then((res) => {
-        this.deptList = res.data;
-      });
+        imageUrl: null,
+        deptList: []
+      };
     },
-    // 权属部门点击回调
-    qsDeptClick(info) {
-      this.info.ownershipDeptCode = info.code;
-      this.info.ownershipDeptName = info.name
-    },
-    async getDetilInfo(id){
-      const res = await getAssetInfo({id:id})
-      if (res.success){
-         this.info = res.data
-         this.$set(this.info, 'information', res.data.information)
-         this.$set(this.info, 'warehouseDetail', res.data.warehouseDetail)
-         this.$set(this.info, 'textureInfo', JSON.parse(res.data.information.extendField))
-         this.$set(this.info, 'extendField', JSON.parse(res.data.extendField))
-         // this.$set(this.info, 'imgUrl', res.data.imageUrl)
-         this.itemForm.addList = this.info.extendField?this.info.extendField:[]
-         // 设备图片
-         this.imageUrl = res.data.imageUrl;
-         if (this.imageUrl) {
-           imageView(this.imageUrl).then((res) => {
-             this.$refs.UploadImg.setImg(res);
-           });
-         }
-      }
-    },
-
-    // 删除自定义参数
-    delt(item,index){
-        this.itemForm.addList.splice(index,1)
-    },
-    // 添加自定义参数
-    addItem(){
-      if(this.itemForm.addList.length<10){
-        let item = {key:'',value:''}
-         this.itemForm.addList.push(item)
-      }else{
-        this.$message.warning('自定义参数最多添加10条')
-      }
+    created () {
+      let id = this.$route.query.id;
+      this.getDetilInfo(id);
+      // this.getTreeList();
     },
+    methods: {
+      // 树形结构数据
+      // getTreeList () {
+      //   org.tree().then((res) => {
+      //     this.deptList = res.data;
+      //   });
+      // },
+      // 权属部门点击回调
+      qsDeptClick (info) {
+        this.info.ownershipDeptCode = info.code;
+        this.info.ownershipDeptName = info.name;
+      },
+      async getDetilInfo (id) {
+        const res = await getAssetInfo(id);
+        if (res.success) {
+          this.info = res.data;
+          this.$set(this.info, 'information', res.data.information);
+          this.$set(this.info, 'warehouseDetail', res.data.warehouseDetail);
+          this.$set(
+            this.info,
+            'textureInfo',
+            JSON.parse(res.data.information.extendField)
+          );
+          this.$set(this.info, 'extendField', JSON.parse(res.data.extendField));
+          // this.$set(this.info, 'imgUrl', res.data.imageUrl)
+          this.itemForm.addList = this.info.extendField
+            ? this.info.extendField
+            : [];
+          // 设备图片
+          this.imageUrl = res.data.imageUrl;
+          if (this.imageUrl) {
+            imageView(this.imageUrl).then((res) => {
+              this.$refs.UploadImg.setImg(res);
+            });
+          }
+        }
+      },
 
-    // 选择图片回调
-    cbUploadImg(data) {
-      if (data.length > 0) {
-        this.imageUrl = data[0];
-      } else {
-        this.imageUrl = "";
-      }
-    },
+      // 删除自定义参数
+      delt (item, index) {
+        this.itemForm.addList.splice(index, 1);
+      },
+      // 添加自定义参数
+      addItem () {
+        if (this.itemForm.addList.length < 10) {
+          let item = { key: '', value: '' };
+          this.itemForm.addList.push(item);
+        } else {
+          this.$message.warning('自定义参数最多添加10条');
+        }
+      },
 
-    // 点击确定保存
-    toSave(){
-      let extendField = this.itemForm.addList
-      let params = {
-         id:this.info.id,
-         assetCode: this.info.assetCode,
-         imageUrl: this.imageUrl,
-         extendField:JSON.stringify(extendField),
-         fixAssetCode:this.info.fixAssetCode,
-         isIotEnable:false,
-         ownershipDeptCode:this.info.ownershipDeptCode,
-         ownershipDeptName:this.info.ownershipDeptName
-      }
-      this.$refs['formCustom'].validate((valid) => {
-        if (valid) {
-          toSaveAsset(params).then(res=>{
-             if(res.success){
-                 this.$message.success('周转车编辑成功')
-                 this.$router.go(-1)
-             }
-          })
+      // 选择图片回调
+      cbUploadImg (data) {
+        if (data.length > 0) {
+          this.imageUrl = data[0];
         } else {
-          return false;
+          this.imageUrl = '';
         }
-      });
-    },
+      },
 
+      // 点击确定保存
+      toSave () {
+        let extendField = this.itemForm.addList;
+        let params = {
+          id: this.info.id,
+          assetCode: this.info.assetCode,
+          imageUrl: this.imageUrl,
+          extendField: JSON.stringify(extendField),
+          fixAssetCode: this.info.fixAssetCode,
+          isIotEnable: false,
+          ownershipDeptCode: this.info.ownershipDeptCode,
+          ownershipDeptName: this.info.ownershipDeptName
+        };
+        this.$refs['formCustom'].validate((valid) => {
+          if (valid) {
+            toSaveAsset(params).then((res) => {
+              if (res.success) {
+                this.$message.success('周转车编辑成功');
+                this.$router.go(-1);
+              }
+            });
+          } else {
+            return false;
+          }
+        });
+      }
 
-    // //使用说明书
-    // operatingManual (info) {
-    //   if (info.length > 0) {
-    //     console.log(info, '------info-----')
-    //     this.formData.operatingManual = info[0]
-    //     console.log(this.formData.operatingManual, 'getImgs')
-    //   } else {
-    //     this.formData.operatingManual = null
-    //     console.log(this.formData.operatingManual, 'getImgs')
-    //   }
-    // },
-    // productionLicence (info) {
-    //   this.formData.productionLicence = info[0]
-    // },
-    // explosionProofCertificate (info) {
-    //   this.formData.explosionProofCertificate = info[0]
-    // },
-    // surveyReport (info) {
-    //   this.formData.surveyReport = info[0]
-    // },
-    // inspectionCycleManual (info) {
-    //   this.formData.inspectionCycleManual = info[0]
-    // },
-    // informationDrawing (info) {
-    //   this.formData.informationDrawing = info[0]
-    // },
-    // productCertificate (info) {
-    //   this.formData.productCertificate = info[0]
-    // }
-  }
-}
+      // //使用说明书
+      // operatingManual (info) {
+      //   if (info.length > 0) {
+      //     console.log(info, '------info-----')
+      //     this.formData.operatingManual = info[0]
+      //     console.log(this.formData.operatingManual, 'getImgs')
+      //   } else {
+      //     this.formData.operatingManual = null
+      //     console.log(this.formData.operatingManual, 'getImgs')
+      //   }
+      // },
+      // productionLicence (info) {
+      //   this.formData.productionLicence = info[0]
+      // },
+      // explosionProofCertificate (info) {
+      //   this.formData.explosionProofCertificate = info[0]
+      // },
+      // surveyReport (info) {
+      //   this.formData.surveyReport = info[0]
+      // },
+      // inspectionCycleManual (info) {
+      //   this.formData.inspectionCycleManual = info[0]
+      // },
+      // informationDrawing (info) {
+      //   this.formData.informationDrawing = info[0]
+      // },
+      // productCertificate (info) {
+      //   this.formData.productCertificate = info[0]
+      // }
+    }
+  };
 </script>
 
 <style lang="scss" scoped>
-.equipment-container {
-  background-color: #fff;
-  padding: 20px;
-  .content {
-    padding: 0 20px;
-  }
-  .label-none {
+  .equipment-container {
+    background-color: #fff;
+    padding: 20px;
+    .basic-details-title {
+      width: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin: 15px 0px;
+      font-size: 16px;
+    }
+    .basic-details-title:first-child {
+      margin: 0px 0px 15px;
+    }
+    .content {
+      padding: 0 20px;
+    }
+    .label-none {
+      .el-form-item__content {
+        margin-left: 0 !important;
+      }
+    }
+    .upload-container {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      // .file-list {
+      //   margin-left: 50px;
+      //   flex: 1;
+      // }
+    }
     .el-form-item__content {
-      margin-left: 0 !important;
+      display: flex;
     }
-  }
-  .upload-container {
-    display: flex;
-    align-items:center;
-    justify-content:center;
-    // .file-list {
-    //   margin-left: 50px;
-    //   flex: 1;
-    // }
-  }
-  .el-form-item__content{
-    display:flex;
-  }
-  .row-form{
-    width:100%;
-    .add-col{
-      display:flex;
-      align-items:center;
-      margin-left: 20px;
-      .col-input{
-        margin-right:5px;
+    .row-form {
+      width: 100%;
+      .add-col {
+        display: flex;
+        align-items: center;
+        margin-left: 20px;
+        .col-input {
+          margin-right: 5px;
+        }
       }
     }
+    .qsbm .el-select {
+      width: 100%;
+    }
   }
-  .qsbm .el-select{
-    width:100%
-  }
-}
 </style>

+ 1 - 0
src/views/ledgerAssets/turnoverCar/index.vue

@@ -10,6 +10,7 @@
            <div class="ele-border-lighter sys-organization-list">
              <AssetTree
                @handleNodeClick="handleNodeClick"
+               @setRootId="setRootId"
                :type="'5'"
                :paramsType="'type'"
                ref="treeList"

Деякі файли не було показано, через те що забагато файлів було змінено