|
|
@@ -119,6 +119,7 @@
|
|
|
<script>
|
|
|
import BasicContainer from '@/components/basic-container/main.vue'
|
|
|
import baseButton from '@/components/base-button.vue'
|
|
|
+import api from '@/api/index.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'dispatch',
|
|
|
@@ -296,7 +297,7 @@ export default {
|
|
|
},
|
|
|
beforeOpen(done, type) {
|
|
|
if (type === 'view') {
|
|
|
- this.previewFile(this.form.fileId)
|
|
|
+ this.previewFile(this.form)
|
|
|
} else if (type === 'edit') {
|
|
|
console.log(this.form)
|
|
|
this.$router.push({
|
|
|
@@ -310,16 +311,22 @@ export default {
|
|
|
done()
|
|
|
}
|
|
|
},
|
|
|
- previewFile(id) {
|
|
|
- console.log(id)
|
|
|
- if (id === undefined || id.length === 0) {
|
|
|
+ previewFile(item) {
|
|
|
+ console.log(item)
|
|
|
+ if (item.id === undefined || item.length === 0) {
|
|
|
return
|
|
|
}
|
|
|
- const routeData = this.$router.resolve({
|
|
|
- path: '/home/file_detail',
|
|
|
- query: { id }
|
|
|
- })
|
|
|
- window.open(routeData.href, '_blank')
|
|
|
+ if (api.offices.includes(item.fileFolder.suffix)) {
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: '/home/file_detail',
|
|
|
+ query: { idL: item.id }
|
|
|
+ })
|
|
|
+ window.open(routeData.href, '_blank')
|
|
|
+ } else {
|
|
|
+ this.srcList.length = 0
|
|
|
+ this.srcList.push(item.fileFolder.url)
|
|
|
+ this.showImage = true
|
|
|
+ }
|
|
|
},
|
|
|
rowDel(row, index, done) {
|
|
|
this.$confirm('确定将选择数据删除?', {
|