Kaynağa Gözat

更新藏品总账细节

shaogen1995 4 yıl önce
ebeveyn
işleme
634ca77081
1 değiştirilmiş dosya ile 32 ekleme ve 2 silme
  1. 32 2
      src/views/holding/holding3_look.vue

+ 32 - 2
src/views/holding/holding3_look.vue

@@ -61,7 +61,19 @@
               <div><span>入藏时间范围:</span>{{ myObj.checkInScope }}</div>
             </div>
             <div class="row">
-              <div><span>藏品位置:</span>{{myObj.outPath}}</div>
+              <div><span>入库位置:</span>
+                     <el-cascader
+                    v-if="myObj.location&&myObj.location.length===3"
+                    placeholder=""
+                    disabled
+                    style="width:80%"
+                    :props="{value:'id',label:'name'}"
+                    v-model="myObj.location"
+                    :options="options"
+                  ></el-cascader>
+                  <i v-else>-</i>
+              </div>
+              <div><span>出库位置:</span>{{myObj.outPath?myObj.outPath:'-'}}</div>
             </div>
           </div>
         </div>
@@ -109,6 +121,7 @@
 </template>
 
 <script>
+import { getTreeList } from '@/apis/statistics0'
 import { getFileList } from '../../apis/holding'
 import axios from '@/utils/request'
 import TabList from '@/components/tabLeft.vue'
@@ -119,6 +132,7 @@ export default {
   data () {
     // 这里存放数据
     return {
+      options: [],
       // 服务器前缀地址
       baseURL: '',
       myObj: [],
@@ -161,9 +175,16 @@ export default {
     this.baseURL = axios.defaults.baseURL
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
+  async mounted () {
+    // 获取位置信息
+    const res1 = await getTreeList()
+    this.options = res1.data
     // 拿到路由跳转传过来的数据
     this.myObj = this.$route.query
+    if (this.myObj.storageId) {
+      this.myObj.location = this.myObj.storageId.split(',')
+      this.myObj.location = this.myObj.location.map(Number)
+    }
     // 调用获取附件方法
     this.getFileList()
   },
@@ -257,6 +278,15 @@ body .el-table::before {
         width: 90%;
         // margin-bottom: 60px;
         .row {
+      /deep/.el-input__inner{
+        padding: 0;
+        background-color: transparent;
+        border: none;
+        font-size: 16px;
+        color: black;      }
+      /deep/.el-input__suffix-inner{
+        opacity: 0;
+      }
           display: flex;
           & > div {
             padding-left: 20px;