|
@@ -15,12 +15,18 @@
|
|
|
<m-button type="orange" icon="el-icon-refresh" :loading="loading" @click="onInit">刷新</m-button>
|
|
|
<m-button type="orange" icon="el-icon-plus" @click="onAdd">申报</m-button>
|
|
|
</template>
|
|
|
- <!-- <template #actions="{ row }">
|
|
|
- <m-button text type="primary" @click="onDetails(row)">查看明细</m-button>
|
|
|
- </template> -->
|
|
|
+ <template #actions="{ row }">
|
|
|
+ <m-button text type="primary" @click="getFile(row)">查看附件</m-button>
|
|
|
+ </template>
|
|
|
</m-table>
|
|
|
<AccumulatePointsApplyEdit ref="accumulatePointsApplyEditRefs" @refresh="onInit"></AccumulatePointsApplyEdit>
|
|
|
- <AccumulatePointsApplyDetails ref="accumulatePointsApplyDetailsRefs"></AccumulatePointsApplyDetails>
|
|
|
+ <!-- <AccumulatePointsApplyDetails ref="accumulatePointsApplyDetailsRefs"></AccumulatePointsApplyDetails> -->
|
|
|
+ <el-image
|
|
|
+ ref="hiddenPreview"
|
|
|
+ style="display: none;"
|
|
|
+ :src="previewUrl.length ? previewUrl[0] : ''"
|
|
|
+ :preview-src-list="previewUrl"
|
|
|
+ ></el-image>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -28,13 +34,13 @@
|
|
|
import {
|
|
|
getAccumulatePoint
|
|
|
} from '@/api/accumulatePoint'
|
|
|
-import AccumulatePointsApplyDetails from '../components/accumulatePointsApplyDetails.vue'
|
|
|
+// import AccumulatePointsApplyDetails from '../components/accumulatePointsApplyDetails.vue'
|
|
|
import AccumulatePointsApplyEdit from './accumulatePointsApplyEdit.vue'
|
|
|
export default {
|
|
|
name: 'accumulatePointsEntering',
|
|
|
components: {
|
|
|
- AccumulatePointsApplyEdit,
|
|
|
- AccumulatePointsApplyDetails
|
|
|
+ AccumulatePointsApplyEdit
|
|
|
+ // AccumulatePointsApplyDetails
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -42,11 +48,12 @@ export default {
|
|
|
{ label: '分类', prop: 'category' },
|
|
|
{ label: '积分类型', prop: 'title' },
|
|
|
{ label: '积分值', prop: 'score', align: 'center' },
|
|
|
- { label: '描述', prop: 'desc' }
|
|
|
- // { label: '操作', prop: 'actions' }
|
|
|
+ { label: '描述', prop: 'desc' },
|
|
|
+ { label: '操作', prop: 'actions' }
|
|
|
],
|
|
|
items: [],
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ previewUrl: []
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -67,9 +74,18 @@ export default {
|
|
|
onAdd () {
|
|
|
this.$refs.accumulatePointsApplyEditRefs.open()
|
|
|
},
|
|
|
- onDetails (item) {
|
|
|
- this.$refs.accumulatePointsApplyDetailsRefs.open(item)
|
|
|
+ getFile (row) {
|
|
|
+ this.previewUrl = row.images
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ const img = this.$refs.hiddenPreview.$el.querySelector('img')
|
|
|
+ img && img.click()
|
|
|
+ }, 100)
|
|
|
+ })
|
|
|
},
|
|
|
+ // onDetails (item) {
|
|
|
+ // this.$refs.accumulatePointsApplyDetailsRefs.open(item)
|
|
|
+ // },
|
|
|
onPageChange (index) {
|
|
|
this.pageInfo.current = index
|
|
|
this.onInit()
|