|
@@ -1,20 +1,13 @@
|
|
|
<template>
|
|
|
<el-card class="box-card">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent>
|
|
|
- <el-form-item>
|
|
|
- <el-button size="small" @click="getList" class="searchBtn">搜索</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <el-button size="small" @click="getDetail" class="searchBtn">查询</el-button>
|
|
|
|
|
|
- <!-- <el-table :data="tableList" :cell-style="{ padding: '0' }" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
|
|
|
- <el-table-column label="AAAA" align="center" prop="AAAA" />
|
|
|
- <el-table-column label="操作" align="center" width="140" fixed="right">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" @click="clickUpdate(scope.row)" v-db-click>修改</el-button>
|
|
|
- <el-button type="text" @click="clickRemove(scope.row)" v-db-click>删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table> -->
|
|
|
+ <div>文件夹路径:</div>
|
|
|
+ <a v-if="detail.fileUrl" style="color: #027db4; cursor: pointer" @click="clickPath(detail.fileUrl)">{{ detail.fileUrl.replace(/\\/g, '/') }}</a>
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <el-button size="small" @click="submit(0)" class="searchBtn">激光完成</el-button>
|
|
|
+ <el-button size="small" @click="submit(1)" style="margin-left: 16px">激光失败</el-button>
|
|
|
</el-card>
|
|
|
</template>
|
|
|
|
|
@@ -25,20 +18,44 @@ export default {
|
|
|
name: 'simulation',
|
|
|
data() {
|
|
|
return {
|
|
|
- queryParams: {},
|
|
|
- tableList: [],
|
|
|
+ detail: {},
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
- this.getList()
|
|
|
+ this.getDetail()
|
|
|
},
|
|
|
methods: {
|
|
|
- getList() {
|
|
|
+ getDetail() {
|
|
|
API.getDrawing({}).then((res) => {
|
|
|
console.log(res)
|
|
|
+ this.detail = res.data.data
|
|
|
})
|
|
|
},
|
|
|
+ clickPath(path) {
|
|
|
+ let a = document.createElement('a')
|
|
|
+ a.href = path.replace(/\//g, '/')
|
|
|
+ a.style.display = 'none'
|
|
|
+ document.body.appendChild(a)
|
|
|
+ a.click()
|
|
|
+ document.body.removeChild(a)
|
|
|
+ },
|
|
|
+ submit(status) {
|
|
|
+ if (this.detail && this.detail.artNum) {
|
|
|
+ let data = {
|
|
|
+ artNum: this.detail.artNum,
|
|
|
+ workshipId: this.detail.workshipId,
|
|
|
+ deviceIdent: '1533311222',
|
|
|
+ result: status,
|
|
|
+ }
|
|
|
+ API.laserEngraving(data).then(() => {
|
|
|
+ this.msgSuccess('提交成功')
|
|
|
+ this.detail = {}
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.msgInfo('请先查询激光图档')
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|