|
|
@@ -60,7 +60,10 @@
|
|
|
<el-button slot="reference" v-if="scope.row.Status=='0' || scope.row.Status=='' || scope.row.Status=='-1' || scope.row.Status=='-2' || scope.row.Status=='-4'" type="text" title="删除" style="margin-left:10px" size="mini" icon="el-icon-delete">删除</el-button>
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
+
|
|
|
+ <el-button type="text" @click="toWord(scope.row)" title="下载" size="mini" icon="el-icon-download" width="120px">下载</el-button>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column width="160px" align="center" prop="Status" label="审核状态" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.Status=='0' || scope.row.Status==''" style="color:#E6A23C">待提交</span>
|
|
|
@@ -462,8 +465,9 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import { mapGetters } from 'vuex';
|
|
|
- import api from '@/api/oilsupplier/supplier';
|
|
|
+ import { mapGetters } from 'vuex'
|
|
|
+ import api from '@/api/oilsupplier/supplier'
|
|
|
+ import dataapi from '@/api/oilsupplier/dataentry'
|
|
|
import certApi from '@/api/oilsupplier/suppliercert'
|
|
|
|
|
|
export default {
|
|
|
@@ -979,6 +983,29 @@
|
|
|
this.clearSearch()
|
|
|
}
|
|
|
},
|
|
|
+ //导出到Word文件
|
|
|
+ toWord (val) {
|
|
|
+ dataapi.docexport(val.Id, this.$axios)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ let docurl = res.data.item
|
|
|
+ // 内网服务器专用
|
|
|
+ if (process.client && docurl.indexOf('/upfile') === 0) {
|
|
|
+ const myDomain = window.location.host
|
|
|
+ location.href = 'http://' + myDomain + '/' + docurl
|
|
|
+ } else {
|
|
|
+ location.href = 'http://' + docurl
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
//列表排序功能
|
|
|
orderby(column) {
|
|
|
if (column.order == 'ascending') {
|