Initial commit: 景耀JY1.0项目
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<el-input
|
||||
v-model="partsName"
|
||||
size="small"
|
||||
placeholder="零件名称"
|
||||
placeholder="图号"
|
||||
clearable
|
||||
style="float: left;width: 200px"/>
|
||||
<el-button
|
||||
@@ -29,7 +29,7 @@
|
||||
plain
|
||||
@click="deletePart">删除
|
||||
</el-button>
|
||||
<el-upload
|
||||
<!-- <el-upload
|
||||
:action="action"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadFailure"
|
||||
@@ -54,7 +54,7 @@
|
||||
icon="el-icon-upload2"
|
||||
plain
|
||||
@click="openDialog">总图
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -96,6 +96,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="700" effect="dark" content="PLM" placement="top">
|
||||
<el-button type="text" icon="el-icon-connection" size="mini" @click="handlePLM(scope.row)">PLM</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看或删除图纸" placement="top">
|
||||
<el-button type="text" icon="el-icon-picture-outline" size="mini" @click="getNum(scope.row)"/>
|
||||
</el-tooltip>
|
||||
@@ -126,7 +129,7 @@
|
||||
size="small"
|
||||
@clear="clearData"
|
||||
@change="getData"/>
|
||||
<el-upload
|
||||
<!-- <el-upload
|
||||
:action="action2"
|
||||
:on-success="uploadSuccess2"
|
||||
:on-error="uploadFailure2"
|
||||
@@ -142,7 +145,7 @@
|
||||
plain
|
||||
@click="batchImportOfDrawings1">产品图
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-upload> -->
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -607,6 +610,29 @@ export default {
|
||||
})
|
||||
},
|
||||
// 查看零件图
|
||||
handlePLM(row) {
|
||||
const msgId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||
const r = Math.random() * 16 | 0
|
||||
const v = c === 'x' ? r : (r & 0x3 | 0x8)
|
||||
return v.toString(16)
|
||||
})
|
||||
request({
|
||||
url: 'http://192.168.1.27:9982/api/GetMaterialDrawingUrl',
|
||||
method: 'post',
|
||||
data: {
|
||||
msgId: msgId,
|
||||
materialCode: row.物料编码
|
||||
}
|
||||
}).then(response => {
|
||||
if (response.data.Code === '200' && response.data.Data.url) {
|
||||
window.open(response.data.Data.url, '_blank')
|
||||
} else {
|
||||
this.$message.warning('PLM未返回有效链接')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('PLM请求发送失败')
|
||||
})
|
||||
},
|
||||
getNum(row) {
|
||||
this.num = row.num
|
||||
this.dialogVisible = true
|
||||
|
||||
Reference in New Issue
Block a user