lrf402788946 5 年之前
父節點
當前提交
0967353536

+ 6 - 7
src/components/upload.vue

@@ -93,19 +93,18 @@ export default {
       }
     },
     defalutProcess(val) {
-      if (typeof val === 'object' && _.get(val, length) !== undefined && val.length > 0) {
-        let newArr = [];
-        val.map(item => {
+      if (_.isArray(val)) {
+        let newArr = val.map(item => {
           let object = {};
           object.name = item.name;
-          object.url = `${item.uri}`;
-          newArr.push(object);
+          object.url = item.url;
+          return object;
         });
         this.$set(this, `fileList`, newArr);
-      } else if (typeof val === 'object' && _.get(val, length) === undefined) {
+      } else if (_.isObject(val)) {
         let object = {};
         object.name = val.name;
-        object.url = `${val.uri}`;
+        object.url = val.url;
         this.$set(this, `fileList`, [object]);
       } else if (typeof val === 'string') {
         this.$set(this, `fileList`, [{ name: '附件', url: val }]);

+ 1 - 1
src/layout/enterprise/contextfabu.vue

@@ -198,7 +198,7 @@ export default {
     uploadSuccess({ type, data }) {
       let arr = _.get(this.demandForm, type);
       if (arr !== undefined) {
-        this.demandForm[type].push({ name: data.name, url: data.image });
+        this.demandForm[type].push({ name: data.name, url: data.uri });
       } else {
         let newArr = [{ name: data.name, url: data.uri }];
         this.$set(this.demandForm, `${type}`, newArr);

+ 9 - 3
src/layout/enterprise/contextfabuxx.vue

@@ -18,7 +18,9 @@
                       <el-col :span="24" class="fbListCenter">
                         <el-col :span="6" class="fimage">
                           <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                            <template v-if="index === 0">
+                              <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                            </template>
                           </el-col>
                         </el-col>
                         <el-col :span="6" class="fbListCenterC">
@@ -67,7 +69,9 @@
                       <el-col :span="24" class="fbListCenter">
                         <el-col :span="6" class="fimage">
                           <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                            <template v-if="index === 0">
+                              <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                            </template>
                           </el-col>
                         </el-col>
                         <el-col :span="6" class="fbListCenterC">
@@ -113,7 +117,9 @@
                       <el-col :span="24" class="fbListCenter">
                         <el-col :span="6" class="fimage">
                           <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                            <template v-if="index === 0">
+                              <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                            </template>
                           </el-col>
                         </el-col>
                         <el-col :span="6" class="fbListCenterC">

+ 1 - 0
src/layout/index/top.vue

@@ -49,6 +49,7 @@ export default {
     loginBtn() {
       this.$router.push({ path: '/login' });
     },
+    toLogOut() {},
   },
 };
 </script>

+ 1 - 1
src/views/supermaket/supermarketlist.vue

@@ -52,7 +52,7 @@ export default {
     ...mapSite(['showInfo']),
     ...mapEnterpriseproject({ list: 'query', fetch: 'fetch' }),
     ...transaction({ transactioncreate: 'create', transactionfetch: 'fetch' }),
-     ...transaction({ transactioncreate: 'create', transactionfetch: 'fetch' }),
+    ...transaction({ transactioncreate: 'create', transactionfetch: 'fetch' }),
     ...tranaudit({ tranauditcreate: 'create' }),
     // 查询站点信息
     async searchSite() {