UpLoadComponentV2.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. <!--文件上传组件-->
  2. <template>
  3. <div>
  4. <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
  5. <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
  6. :limit="999" :http-request="httpRequest"
  7. multiple
  8. :on-exceed="(files, fileList) =>{
  9. $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
  10. }"
  11. :show-file-list="false"
  12. :on-change="changes"
  13. :on-progress="uploadVideoProcess"
  14. :file-list="fileList">
  15. <el-button type="info" size="mini" :slot="auth==='view'&&uploadFlag===false?'tip':'trigger'" @click="clickHandel" :disabled="auth==='view'&&uploadFlag===false">点击上传</el-button>
  16. </el-upload>
  17. <div style="height: calc(100% - 80px);margin-top: 10px">
  18. <!-- 进度条 -->
  19. <el-progress style="margin-left: 5em" v-if="progressFlag" :percentage="loadProgress"></el-progress>
  20. <el-table
  21. ref="uploadTable"
  22. :key="tableKey"
  23. @row-click="tableRowClick"
  24. :row-class-name="tableRowClassName"
  25. :data="dataListNew">
  26. <el-table-column type="seq" width="40"></el-table-column>
  27. <el-table-column label="文件名称" prop="name" align="center">
  28. <template scope="scope">
  29. <div v-if="ifName(scope.row) === true">
  30. <el-image
  31. style="width: 30px; height: 30px;padding-top: 4px"
  32. :src="scope.row.lsUrl"
  33. :preview-src-list="[scope.row.lsUrl]"
  34. ></el-image>
  35. </div>
  36. <div v-else>
  37. <el-link type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.name}}</el-link>
  38. </div>
  39. </template>
  40. </el-table-column>
  41. <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
  42. <el-table-column label="创建时间" prop="createDate" align="center"></el-table-column>
  43. <el-table-column label="文件大小" prop="size" align="center">
  44. <template slot-scope="scope">
  45. {{getSize(scope.row.size)}}
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="文件类型" prop="fileType" align="center">
  49. <template slot-scope="scope">
  50. <component
  51. :is="scope.row.fileTypeComponent || 'fileTypeComponentA'"
  52. :options="$dictUtils.getDictList('attachment_type')"
  53. :value="scope.row.fileType"
  54. @updateFileType="updateFileType"
  55. ></component>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="盖章类型" prop="sealType" align="center">
  59. <template slot-scope="scope">
  60. <component
  61. :is="scope.row.sealTypeComponent || 'sealTypeComponentA'"
  62. :options="$dictUtils.getDictList('cw_seal_type')"
  63. :value="scope.row.sealType"
  64. @updateSealType="updateSealType"
  65. ></component>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="备注" prop="remarks" align="center">
  69. <template slot-scope="scope">
  70. <component
  71. :is="scope.row.remarksComponent || 'remarksComponentA'"
  72. :value="scope.row.remarks"
  73. @updateRemarks="updateRemarks"
  74. ></component>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="操作" width="200px" fixed="right" align="center">
  78. <template scope="scope">
  79. <el-button type="text" icon="el-icon-edit" size="small" @click="toHref(scope.row)" :disabled="false">下载</el-button>
  80. <el-button type="text" icon="el-icon-delete" size="small" @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
  81. <!--<el-button size="small" type="text" icon="el-icon-edit"
  82. @click="handleUpdate(scope.row, scope.$index)"
  83. >{{ scope.row.btn || "修改" }}</el-button>-->
  84. </template>
  85. </el-table-column>
  86. </el-table>
  87. </div>
  88. <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>
  89. </div>
  90. </template>
  91. <script>
  92. // eslint-disable-next-line no-unused-vars
  93. import OSSSerivce, {
  94. httpRequest,
  95. // eslint-disable-next-line no-unused-vars
  96. handleRemove,
  97. fileName,
  98. // eslint-disable-next-line no-unused-vars
  99. beforeAvatarUpload,
  100. // eslint-disable-next-line no-unused-vars
  101. openWindowOnUrl,
  102. // eslint-disable-next-line no-unused-vars
  103. toHref
  104. } from '@/api/sys/OSSService'
  105. import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
  106. import moment from 'moment'
  107. export default {
  108. data () {
  109. return {
  110. progressFlag: false,
  111. loadProgress: 0,
  112. fileList: [],
  113. dataList: [],
  114. dataListNew: [],
  115. url: '',
  116. showViewer: false,
  117. ossService: null,
  118. auth: '',
  119. directory: 'public',
  120. maxValue: 300,
  121. tableKey: '',
  122. fileLoading: true,
  123. dividerName: '',
  124. uploadFlag: false,
  125. delFlag: false,
  126. createBy: '',
  127. showDivider: true,
  128. fileType: '',
  129. sealType: '',
  130. remarks: ''
  131. }
  132. },
  133. watch: {
  134. },
  135. created () {
  136. this.ossService = new OSSSerivce()
  137. },
  138. components: {
  139. ElImageViewer,
  140. fileTypeComponentA: {
  141. render: function (h) {
  142. return h('span', {
  143. domProps: {
  144. innerText: this.$dictUtils.getDictLabel('attachment_type', this.value, '')
  145. }
  146. })
  147. },
  148. props: ['options', 'value']
  149. },
  150. fileTypeComponentB: {
  151. data () {
  152. return { fileType: '' }
  153. },
  154. props: ['options', 'value'],
  155. mounted () {
  156. this.fileType = this.value
  157. },
  158. render: function (h) {
  159. return h(
  160. 'el-select',
  161. {
  162. attrs: {
  163. placeholder: '请选择',
  164. value: this.fileType,
  165. size: 'small',
  166. clearable: true
  167. },
  168. props: ['value'],
  169. on: {
  170. change: (value) => {
  171. this.fileType = value
  172. this.$emit('updateFileType', value)
  173. }
  174. }
  175. },
  176. [
  177. this.options.map((item) => {
  178. let { label, value } = item
  179. return h('el-option', {
  180. props: {
  181. label,
  182. value: parseInt(value),
  183. key: value
  184. }
  185. })
  186. })
  187. ]
  188. )
  189. }
  190. },
  191. sealTypeComponentA: {
  192. render: function (h) {
  193. return h('span', {
  194. domProps: {
  195. innerText: this.$dictUtils.getDictLabel('cw_seal_type', this.value, '')
  196. }
  197. })
  198. },
  199. props: ['options', 'value']
  200. },
  201. sealTypeComponentB: {
  202. data () {
  203. return { sealType: '' }
  204. },
  205. props: ['options', 'value'],
  206. mounted () {
  207. this.sealType = this.value
  208. },
  209. render: function (h) {
  210. return h(
  211. 'el-select',
  212. {
  213. attrs: {
  214. placeholder: '请选择',
  215. value: this.sealType,
  216. size: 'small',
  217. clearable: true
  218. },
  219. props: ['value'],
  220. on: {
  221. change: (value) => {
  222. this.sealType = value
  223. this.$emit('updateSealType', value)
  224. }
  225. }
  226. },
  227. [
  228. this.options.map((item) => {
  229. let { label, value } = item
  230. return h('el-option', {
  231. props: {
  232. label,
  233. value: parseInt(value),
  234. key: value
  235. }
  236. })
  237. })
  238. ]
  239. )
  240. }
  241. },
  242. remarksComponentA: {
  243. render: function (h) {
  244. return h('span', {
  245. domProps: {
  246. innerText: this.value
  247. }
  248. })
  249. },
  250. props: ['value']
  251. },
  252. remarksComponentB: {
  253. data () {
  254. return { remarks: '' }
  255. },
  256. props: ['value'],
  257. mounted () {
  258. this.remarks = this.value
  259. },
  260. render: function (h) {
  261. return h(
  262. 'el-input',
  263. {
  264. attrs: {
  265. placeholder: '请输入',
  266. value: this.remarks,
  267. size: 'small',
  268. clearable: true
  269. },
  270. props: ['value'],
  271. on: {
  272. input: (value) => {
  273. this.remarks = value
  274. this.$emit('updateRemarks', value)
  275. }
  276. }
  277. }
  278. )
  279. }
  280. }
  281. },
  282. mounted () {
  283. window.onPreview = this.onPreview
  284. },
  285. methods: {
  286. /**
  287. * dividerName: 组件中divider的名称赋值
  288. * showDivider: ‘附件‘Divider是否展示
  289. * 注:值为空时,默认值为true
  290. * showDivider=false时 ‘附件‘Divider隐藏
  291. **/
  292. setDividerName (dividerName, showDivider) {
  293. if (this.commonJS.isNotEmpty(dividerName)) {
  294. this.dividerName = dividerName
  295. }
  296. if (this.commonJS.isNotEmpty(showDivider)) {
  297. if (showDivider === false) {
  298. this.showDivider = false
  299. } else {
  300. this.showDivider = true
  301. }
  302. } else {
  303. this.showDivider = true
  304. }
  305. },
  306. /**
  307. * 文件上传组件初始化
  308. * @param auth
  309. * auth的值为"view"时,不可上传/编辑文件
  310. * auth为其他值时,可上传/编辑文件
  311. * @param fileList 要显示到文件上传列表中的文件。
  312. * 注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
  313. * 例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
  314. * @param directory 要存放到oss的哪个文件夹下。
  315. * 注:值为空时,默认存放到"public"文件夹
  316. * @param maxValue 上传文件允许的最大值,单位:MB
  317. * 注:值为空时,默认值为300MB
  318. * @param dividerName 组件中divider的名称
  319. * 注:值为空时,默认值为‘附件’
  320. * @param uploadFlag ‘上传文件’按钮是否禁用
  321. * 注:值为空时,默认值为false
  322. * auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
  323. * @param delFlag ‘删除’按钮是否禁用
  324. * 注:值为空时,默认值为false
  325. * auth=view&&delFlag=false时 ‘删除’按钮禁用
  326. * @param showDivider ‘附件‘Divider是否展示
  327. * 注:值为空时,默认值为true
  328. * showDivider=false时 ‘附件‘Divider隐藏
  329. */
  330. async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
  331. await this.fileLoadingFalse()
  332. if (this.commonJS.isEmpty(dividerName)) {
  333. this.dividerName = '附件'
  334. } else {
  335. this.dividerName = dividerName
  336. }
  337. if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
  338. this.directory = directory
  339. } else {
  340. this.directory = 'public'
  341. }
  342. if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
  343. this.maxValue = maxValue
  344. } else {
  345. this.maxValue = 300
  346. }
  347. this.auth = auth
  348. if (this.commonJS.isEmpty(uploadFlag)) {
  349. this.uploadFlag = false
  350. } else {
  351. if (uploadFlag !== true && uploadFlag !== false) {
  352. this.uploadFlag = false
  353. } else {
  354. this.uploadFlag = uploadFlag
  355. }
  356. }
  357. if (this.commonJS.isEmpty(delFlag)) {
  358. this.delFlag = false
  359. } else {
  360. if (delFlag !== true && delFlag !== false) {
  361. this.delFlag = false
  362. this.createBy = delFlag
  363. } else {
  364. this.delFlag = delFlag
  365. }
  366. }
  367. if (this.commonJS.isEmpty(fileList)) {
  368. this.fileLoading = true
  369. }
  370. for await (let item of fileList) {
  371. await this.ossService.getFileSizeByUrl(item.url).then((data) => {
  372. item.lsUrl = data.data.url
  373. item.size = data.data.size
  374. this.dataList.push(item)
  375. this.dataListNew.push(item)
  376. if (this.dataList.length === fileList.length) {
  377. this.fileLoading = true
  378. }
  379. })
  380. }
  381. // this.dataList = JSON.parse(JSON.stringify(fileList))
  382. // this.dataListNew = JSON.parse(JSON.stringify(fileList))
  383. if (this.commonJS.isEmpty(showDivider)) {
  384. this.showDivider = true
  385. } else {
  386. if (showDivider === false) {
  387. this.showDivider = false
  388. } else {
  389. this.showDivider = true
  390. }
  391. }
  392. },
  393. async httpRequest (file) {
  394. await httpRequest(file, fileName(file), this.directory, this.maxValue)
  395. },
  396. uploadVideoProcess (event, file, fileList) {
  397. this.progressFlag = true // 显示进度条
  398. this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
  399. if (this.loadProgress >= 100) {
  400. this.loadProgress = 100
  401. setTimeout(() => {
  402. this.progressFlag = false
  403. }, 1000) // 一秒后关闭进度条
  404. }
  405. },
  406. getSize (value) {
  407. if (this.commonJS.isEmpty(value)) {
  408. return '0 B'
  409. } else {
  410. let val = parseInt(value)
  411. if (this.commonJS.isEmpty(val)) {
  412. return '0 B'
  413. }
  414. if (isNaN(val)) {
  415. return '0 B'
  416. }
  417. if (val === 0) {
  418. return '0 B'
  419. }
  420. let k = 1024
  421. let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
  422. let i = Math.floor(Math.log(val) / Math.log(k))
  423. return (val / Math.pow(k, i)).toPrecision(3) + '' + sizes[i]
  424. }
  425. },
  426. async changes (file, fileList) {
  427. // if (file.status !== 'ready') {
  428. // return
  429. // }
  430. if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
  431. this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
  432. return
  433. }
  434. this.dataListNew = []
  435. this.dataList.forEach((item) => {
  436. this.dataListNew.push(item)
  437. })
  438. for (let item of fileList) {
  439. item.createDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
  440. item.createBy = {
  441. id: '',
  442. name: ''
  443. }
  444. item.createBy.id = this.$store.state.user.id
  445. item.createBy.name = this.$store.state.user.name
  446. this.dataListNew.push(item)
  447. }
  448. for await (let item of this.dataListNew) {
  449. if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
  450. item.url = item.raw.url
  451. if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
  452. await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
  453. item.lsUrl = data.data
  454. })
  455. }
  456. }
  457. }
  458. this.tableKey = Math.random()
  459. },
  460. showFile (row) {
  461. openWindowOnUrl(row)
  462. },
  463. onPreview (url) {
  464. this.url = url
  465. this.showViewer = true
  466. },
  467. // 关闭查看器
  468. closeViewer () {
  469. this.url = ''
  470. this.showViewer = false
  471. },
  472. toHref (row) {
  473. toHref(row)
  474. },
  475. deleteById (row, index) {
  476. this.dataListNew.splice(index, 1)
  477. if (row.id !== null && row.id !== '' && row.id !== undefined) {
  478. this.dataList.splice(index, 1)
  479. // this.ossService.deleteMsgById(row.id)
  480. } else {
  481. let num
  482. if (this.dataList.length > 0) {
  483. num = this.dataList.length - 1
  484. } else {
  485. num = 0
  486. }
  487. this.$refs.upload.uploadFiles.splice(index - num, 1)
  488. }
  489. },
  490. /**
  491. * 关闭dialog时使用 清除el-upload中上传的文件
  492. */
  493. clearUpload () {
  494. this.$refs.upload.uploadFiles = []
  495. this.dataList = []
  496. this.dataListNew = []
  497. this.createBy = ''
  498. },
  499. /**
  500. * 获取当前文件列表中的文件数据
  501. */
  502. getDataList () {
  503. let _this = this
  504. const waitForEach = function () {
  505. return new Promise(function (resolve, reject) {
  506. _this.dataListNew.forEach((item, index) => {
  507. if (item.btnType === 'save') {
  508. _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
  509. _this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
  510. _this.dataListNew[index].remarksComponent = 'remarksComponentA'
  511. _this.dataListNew[index].btn = '修改'
  512. _this.dataListNew[index].btnType = 'edit'
  513. _this.dataListNew[index].fileType = _this.fileType
  514. _this.dataListNew[index].sealType = _this.sealType
  515. _this.dataListNew[index].remarks = _this.remarks
  516. }
  517. })
  518. _this.tableKey = Math.random()
  519. resolve(_this.dataListNew)
  520. })
  521. }
  522. return waitForEach()
  523. },
  524. /**
  525. * 判断进度条是否结束,附件是否加载完成
  526. * @returns {boolean}
  527. */
  528. checkProgress () {
  529. if (this.progressFlag === true) {
  530. this.$message.warning('请等待附件上传完成再进行操作')
  531. return true
  532. }
  533. if (this.fileLoading === false) {
  534. this.$message.warning('请等待附件加载完成再进行操作')
  535. return true
  536. }
  537. return false
  538. },
  539. ifName (row) {
  540. if (this.commonJS.isEmpty(row.name)) {
  541. row.name = '---'
  542. return false
  543. }
  544. let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
  545. if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
  546. return true
  547. } else {
  548. return false
  549. }
  550. },
  551. fileLoadingFalse () {
  552. this.fileLoading = false
  553. },
  554. /** 修改||保存按钮操作 */
  555. handleUpdate: async function (row, rowIndex) {
  556. if (row.btnType === 'edit' || this.commonJS.isEmpty(row.btnType)) {
  557. let _this = this
  558. const waitForEach = function () {
  559. return new Promise(function (resolve, reject) {
  560. _this.dataListNew.forEach((item, index) => {
  561. if (item.btnType === 'save') {
  562. _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
  563. _this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
  564. _this.dataListNew[index].remarksComponent = 'remarksComponentA'
  565. _this.dataListNew[index].btn = '修改'
  566. _this.dataListNew[index].btnType = 'edit'
  567. _this.dataListNew[index].fileType = _this.fileType
  568. _this.dataListNew[index].sealType = _this.sealType
  569. _this.dataListNew[index].remarks = _this.remarks
  570. }
  571. })
  572. resolve()
  573. })
  574. }
  575. waitForEach().then(() => {
  576. this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentB'
  577. this.dataListNew[rowIndex].sealTypeComponent = 'sealTypeComponentB'
  578. this.dataListNew[rowIndex].remarksComponent = 'remarksComponentB'
  579. this.dataListNew[rowIndex].btn = '保存'
  580. this.dataListNew[rowIndex].btnType = 'save'
  581. })
  582. } else {
  583. this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentA'
  584. this.dataListNew[rowIndex].sealTypeComponent = 'sealTypeComponentA'
  585. this.dataListNew[rowIndex].remarksComponent = 'remarksComponentA'
  586. this.dataListNew[rowIndex].btn = '修改'
  587. this.dataListNew[rowIndex].btnType = 'edit'
  588. this.dataListNew[rowIndex].fileType = this.fileType
  589. this.dataListNew[rowIndex].sealType = this.sealType
  590. this.dataListNew[rowIndex].remarks = this.remarks
  591. }
  592. this.tableKey = Math.random()
  593. },
  594. updateFileType (fileType) {
  595. this.fileType = fileType
  596. },
  597. updateSealType (sealType) {
  598. this.sealType = sealType
  599. },
  600. updateRemarks (remarks) {
  601. this.remarks = remarks
  602. },
  603. tableRowClassName ({ row, rowIndex }) {
  604. row.index = rowIndex
  605. },
  606. // 行点击事件
  607. tableRowClick (row, column) {
  608. if (column.label !== '备注') {
  609. let _this = this
  610. const waitForEach = function () {
  611. return new Promise(function (resolve, reject) {
  612. _this.dataListNew.forEach((item, index) => {
  613. if (item.btnType === 'save') {
  614. _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
  615. _this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
  616. _this.dataListNew[index].remarksComponent = 'remarksComponentA'
  617. _this.dataListNew[index].btn = '修改'
  618. _this.dataListNew[index].btnType = 'edit'
  619. _this.dataListNew[index].fileType = _this.fileType
  620. _this.dataListNew[index].sealType = _this.sealType
  621. _this.dataListNew[index].remarks = _this.remarks
  622. }
  623. })
  624. resolve()
  625. })
  626. }
  627. waitForEach().then(() => {
  628. this.fileType = this.dataListNew[row.index].fileType
  629. this.sealType = this.dataListNew[row.index].sealType
  630. this.remarks = this.dataListNew[row.index].remarks
  631. this.dataListNew[row.index].fileTypeComponent = 'fileTypeComponentB'
  632. this.dataListNew[row.index].sealTypeComponent = 'sealTypeComponentB'
  633. this.dataListNew[row.index].remarksComponent = 'remarksComponentB'
  634. this.dataListNew[row.index].btn = '保存'
  635. this.dataListNew[row.index].btnType = 'save'
  636. })
  637. this.tableKey = Math.random()
  638. }
  639. },
  640. // 点击上传文件按钮的时候,把未保存的文件保存一下
  641. clickHandel () {
  642. this.dataListNew.forEach((item, index) => {
  643. if (item.btnType === 'save') {
  644. this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
  645. this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
  646. this.dataListNew[index].remarksComponent = 'remarksComponentA'
  647. this.dataListNew[index].btn = '修改'
  648. this.dataListNew[index].btnType = 'edit'
  649. this.dataListNew[index].fileType = this.fileType
  650. this.dataListNew[index].sealType = this.sealType
  651. this.dataListNew[index].remarks = this.remarks
  652. }
  653. })
  654. }
  655. }
  656. }
  657. </script>