zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<template>
  <div class="file-page">
    <SectionTitle title="影像资料信息"></SectionTitle>
    <!-- <p class="file-top-buttons"> -->
    <!-- <el-button size="small" class="top-button">手机扫码上传</el-button> -->
    <!-- <el-button size="small" class="top-button" @click="getList">刷新</el-button> -->
    <!-- </p> -->
    <ul class="file-ul">
      <li v-for="item in menu" :key="item.imageListCode">
        <div class="file-section">
          <p class="section-title">
            {{item.imageListName}}
            <span
              v-if="Array.isArray(item.list) && item.list.length > 0"
            >({{item.list.length}}张)</span>
          </p>
          <div class="file-content">
            <PhotoList
              :list="item.list"
              @action="init"
              :isEdit="isEdit"
              :info="item"
              @getList="getList"
            ></PhotoList>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
// 影像资料信息
import SectionTitle from '@/components/SectionTitle'
import qryImageMenuList from '@/controller/qryImageMenuList'
import queryEcmPageList from '@/controller/queryEcmPageList'
import infoDataAuthority from '@/controller/infoDataAuthority'  // 初始化
import PhotoList from '@/components/PhotoList'
 
export default {
  components: {
    SectionTitle,
    PhotoList
  },
  props: {
    conf: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      menu: [],
      isEdit: true,
      objectNo:'',
      objectType:'',
    }
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      const { $route, conf } = this
      const { query } = $route
 
      const { edit } = conf
 
      this.query = query
      this.isEdit = edit === 'Y'
      this.model = queryEcmPageList()
      // this.initImg = infoDataAuthority()
      this.getMenu()
    },
    async getMenu() {
      const { query } = this
      const { transLogSerialno = '', transCode = '', imgTransCode = '', pageId, phaseNo, transCodeOne } = query
      const menuModel = qryImageMenuList()
       const  reqData = {
        phaseNo,
        transCode: '5006'
      }
      const { list } = await menuModel.request(reqData)
      this.menu = list
      this.getList()
    },
 
    async getList(item) {
      const { menu } = this
      menu.forEach(item => {
        this.getItem(item)
      })
    },
 
    async getItem(item) {
      const { query, model } = this
      const { transLogSerialno, objectType, objectNo } = query
      const { imageListCode } = item
      const { list } = await model.request({
        objectNo,
        objectType,
        typeNo: imageListCode
      })
      const { menu } = this
      this.menu = menu.map(menuItem => {
        if (menuItem.imageListCode === imageListCode) {
          return {
            ...item,
            list
          }
        } else {
          return menuItem
        }
      })
    },
  },
  watch: {
    $route() {
      const { transSerialNo } = this.$route.query
      if (transSerialNo) {
        this.init()
      }
    }
  }
}
</script>
<style lang="postcss" scoped>
.file-page {
  & .file-top-buttons {
    padding: 0 0 20px 0;
    & .top-button {
      line-height: 23px;
      border-radius: 2px;
      padding: 0 8px;
      border: 1px solid rgba(238, 238, 238, 1);
      font-size: 12px;
      font-weight: 400;
      color: rgba(119, 119, 119, 1);
      margin: 0 28px 0 0;
    }
  }
  & .section-title {
    font-size: 14px;
    font-weight: 400;
    color: rgba(51, 51, 51, 1);
    line-height: 20px;
    /* &::before {
      content: '';
      display: inline-block;
      width: 4px;
      height: 4px;
      margin-right: 8px;
      background: rgba(255, 67, 0, 1);
    } */
    & span {
      font-weight: 400;
      color: rgba(197, 197, 197, 1);
    }
  }
  & .file-ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    & li {
      width: 460px;
      &:nth-child(odd) {
        margin-right: 165px;
      }
    }
    & .file-content {
      background: rgba(249, 249, 249, 1);
      border-radius: 4px;
      padding: 11px 11px 0 11px;
    }
  }
}
</style>