|
@@ -54,6 +54,15 @@
|
|
|
>
|
|
>
|
|
|
转派
|
|
转派
|
|
|
</el-link>
|
|
</el-link>
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ v-if="row.orderStatus == 3"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ @click="downLoadOrder(row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 下载
|
|
|
|
|
+ </el-link>
|
|
|
<!-- <el-link
|
|
<!-- <el-link
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
@@ -97,6 +106,10 @@
|
|
|
import redeployOther from '@/views/maintenance/components/redeployOther.vue';
|
|
import redeployOther from '@/views/maintenance/components/redeployOther.vue';
|
|
|
import { getWorkOrderList, applySpareParts } from '@/api/maintenance/repair';
|
|
import { getWorkOrderList, applySpareParts } from '@/api/maintenance/repair';
|
|
|
import outin from '@/api/maintenance/outin';
|
|
import outin from '@/api/maintenance/outin';
|
|
|
|
|
+ import { getToken } from '@/utils/token-util';
|
|
|
|
|
+ import { download } from '@/utils/file';
|
|
|
|
|
+ import { API_BASE_URL } from '@/config/setting';
|
|
|
|
|
+ import axios from 'axios';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
WorkorderSearch,
|
|
WorkorderSearch,
|
|
@@ -243,8 +256,9 @@
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
columnKey: 'action',
|
|
columnKey: 'action',
|
|
|
|
|
+ fixed: 'right',
|
|
|
label: '操作',
|
|
label: '操作',
|
|
|
- width: 240,
|
|
|
|
|
|
|
+ width: 300,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
resizable: false,
|
|
resizable: false,
|
|
|
slot: 'action',
|
|
slot: 'action',
|
|
@@ -259,6 +273,22 @@
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ downLoadOrder(row) {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ id: row.id
|
|
|
|
|
+ };
|
|
|
|
|
+ // downloadAsset(params, '设备台账导出数据');
|
|
|
|
|
+ axios({
|
|
|
|
|
+ url: `${API_BASE_URL}/eam/workorder/excel?id=${row.id}`,
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ responseType: 'blob',
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ Authorization: getToken()
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ download(res.data, '维修工单');
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
async handleNewSave() {
|
|
async handleNewSave() {
|
|
|
let { user } = JSON.parse(sessionStorage.getItem('vuex-eam'));
|
|
let { user } = JSON.parse(sessionStorage.getItem('vuex-eam'));
|
|
|
console.log(user);
|
|
console.log(user);
|