Commit 2562e140 authored by 黄奎's avatar 黄奎

页面修改

parent 88b5e5c2
......@@ -77,6 +77,11 @@
<el-button type="danger" icon="iconfont icon-img_delete_small" circle @click="isdelete(item.Id)">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下载" placement="top-start">
<el-button type="danger" icon="iconfont icon-img_delete_small" circle @click="ToDownWord(item.Id)">
</el-button>
</el-tooltip>
</td>
</tr>
</table>
......@@ -171,8 +176,41 @@
Id:item.Id
}
});
},
//生成word
ToDownWord:function(item){
this.loading = true;
let msg = {
Id:item.Id,
//用户Id
UId:this.getLocalStorage().EmployeeId,
};
let urlObj = this.domainManager();
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/GetViittoContract',
data: {
"msg": msg
}
}).then(res => {
if (res.data.resultCode === 1) {
let sign = item.CustomerName+"_合同.doc";
const a = document.createElement('a');
a.setAttribute('download', '');
a.setAttribute('href', urlObj.DomainUrl + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.doc&&fPath=' + res.data.data);
a.click();
} else {
this.Error('WORD获取失败');
}
this.loading = false;
}).catch(err => {
}
})
},
},
mounted() {
this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment