|
@@ -7,6 +7,22 @@
|
|
@cancel="handleCancel"
|
|
@cancel="handleCancel"
|
|
>
|
|
>
|
|
<a-form :form="form">
|
|
<a-form :form="form">
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="车间位置"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-tree-select
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
|
+ :treeData="treeData"
|
|
|
|
+ :treeNodeFilterProp="'title'"
|
|
|
|
+ :showSearch="true"
|
|
|
|
+ v-model="line"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ </a-tree-select>
|
|
|
|
+ </a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="上传文件"
|
|
label="上传文件"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
@@ -30,6 +46,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { importRemoteOpc } from '@/api/remote/opc'
|
|
import { importRemoteOpc } from '@/api/remote/opc'
|
|
|
|
+import { getSbPositionTree } from '@/api/sb/position'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'RemoteMeasureImportForm',
|
|
name: 'RemoteMeasureImportForm',
|
|
@@ -39,7 +56,9 @@ export default {
|
|
modalTitle: null,
|
|
modalTitle: null,
|
|
form: this.$form.createForm(this),
|
|
form: this.$form.createForm(this),
|
|
visible: false,
|
|
visible: false,
|
|
|
|
+ line: null,
|
|
type: null,
|
|
type: null,
|
|
|
|
+ treeData: [],
|
|
fileList: []
|
|
fileList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -48,6 +67,9 @@ export default {
|
|
this.visible = true
|
|
this.visible = true
|
|
this.modalTitle = '新增导入'
|
|
this.modalTitle = '新增导入'
|
|
this.type = 1
|
|
this.type = 1
|
|
|
|
+ getSbPositionTree({ opcFlag: 1 }).then(res => {
|
|
|
|
+ this.treeData = res.data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
handleRemove (file) {
|
|
handleRemove (file) {
|
|
const index = this.fileList.indexOf(file)
|
|
const index = this.fileList.indexOf(file)
|
|
@@ -87,6 +109,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
const formData = new FormData()
|
|
const formData = new FormData()
|
|
|
|
+ formData.append('line', this.line)
|
|
formData.append('file', this.fileList[0])
|
|
formData.append('file', this.fileList[0])
|
|
importRemoteOpc(formData)
|
|
importRemoteOpc(formData)
|
|
.then((res) => {
|
|
.then((res) => {
|