|
|
@@ -805,6 +805,30 @@
|
|
|
ref="firstArticleDualInspectionParamRef"
|
|
|
></term>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="NC程序" name="NC程序">
|
|
|
+ <ele-pro-table
|
|
|
+ ref="ncFileTable"
|
|
|
+ :columns="jobColumns2"
|
|
|
+ :datasource="ncCodeList"
|
|
|
+ :need-page="false"
|
|
|
+ :immediate="true"
|
|
|
+ >
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
+ <template v-if="!isView" v-slot:toolbar>
|
|
|
+ <el-button type="primary" @click="addFile('ncCodeList')"
|
|
|
+ >添加</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-slot:action="{ row, $index }">
|
|
|
+ <el-link type="primary" @click="handleDel(row, $index)"
|
|
|
+ >删除</el-link
|
|
|
+ >
|
|
|
+ <el-link type="primary" @click="fileDetails(row, 'nc')"
|
|
|
+ >详情</el-link
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-card>
|
|
|
<!-- 选择工艺参数 -->
|
|
|
@@ -1185,7 +1209,76 @@
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
],
|
|
|
-
|
|
|
+ // 表格选中数据
|
|
|
+ jobColumns2: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '编码',
|
|
|
+ prop: 'code',
|
|
|
+ width: 180,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'name',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'versions',
|
|
|
+ label: '版本',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'remark',
|
|
|
+ label: '文本描述',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ncSize',
|
|
|
+ label: '文件大小',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createName',
|
|
|
+ label: '创建人',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 260,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
standardCol: [
|
|
|
{
|
|
|
prop: 'code',
|
|
|
@@ -1247,14 +1340,16 @@
|
|
|
},
|
|
|
|
|
|
qualityParam: [],
|
|
|
- firstArticleDualInspectionParam:[],
|
|
|
+ ncCodeList: [],
|
|
|
+ firstArticleDualInspectionParam: [],
|
|
|
qualityPointParam: [],
|
|
|
|
|
|
fileShow: false,
|
|
|
resourceBomId: '',
|
|
|
level: '',
|
|
|
attributeData: {},
|
|
|
- unitList: []
|
|
|
+ unitList: [],
|
|
|
+ fileListType: ''
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -1263,24 +1358,38 @@
|
|
|
this.getDicTUnitList('measuring_uint');
|
|
|
},
|
|
|
methods: {
|
|
|
- addFile() {
|
|
|
+ addFile(fileListType) {
|
|
|
this.fileShow = true;
|
|
|
+ this.fileListType = fileListType;
|
|
|
},
|
|
|
fileClose(val) {
|
|
|
if (val == false) {
|
|
|
this.fileShow = false;
|
|
|
} else {
|
|
|
this.fileShow = false;
|
|
|
-
|
|
|
- this.$refs.fileTable.setData([
|
|
|
- ...val,
|
|
|
- ...this.$refs.fileTable.getData()
|
|
|
- ]);
|
|
|
- this.$set(
|
|
|
- this.tableData.taskParam[this.currentIndex],
|
|
|
- 'fileParam',
|
|
|
- this.$refs.fileTable.getData()
|
|
|
- );
|
|
|
+ if (this.fileListType == 'ncCodeList') {
|
|
|
+ console.log(val, 'val');
|
|
|
+
|
|
|
+ this.ncCodeList.push(
|
|
|
+ ...val.map((item) => {
|
|
|
+ item.ncSize = item.sizeUnit;
|
|
|
+ item.versions = item.version;
|
|
|
+ item.fileId = item.id;
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+ );
|
|
|
+ // this.tableData.taskParam[this.currentIndex].ncCodeList=this.tableData.taskParam[this.currentIndex].ncCodeList||[]
|
|
|
+ } else {
|
|
|
+ this.$refs.fileTable.setData([
|
|
|
+ ...val,
|
|
|
+ ...this.$refs.fileTable.getData()
|
|
|
+ ]);
|
|
|
+ this.$set(
|
|
|
+ this.tableData.taskParam[this.currentIndex],
|
|
|
+ 'fileParam',
|
|
|
+ this.$refs.fileTable.getData()
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -1329,13 +1438,25 @@
|
|
|
|
|
|
this.tableData.taskParam[this.currentIndex].materialQuota = res.data;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
console.log(this.tableData, 'this.tableData');
|
|
|
});
|
|
|
// this.$refs.bomDetailList.open(this.resourceBomId, this.level)
|
|
|
},
|
|
|
|
|
|
- fileDetails(row) {
|
|
|
- window.open(setFileUrl(row));
|
|
|
+ fileDetails(row, type) {
|
|
|
+ if (type == 'nc') {
|
|
|
+ newFilePageAPI({
|
|
|
+ ids: "'" + row.fileId + "'"
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.length) {
|
|
|
+ window.open(setFileUrl(res[0]));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ window.open(setFileUrl(row));
|
|
|
+ }
|
|
|
},
|
|
|
addJob() {
|
|
|
this.$refs.jobRef.open();
|
|
|
@@ -1443,6 +1564,8 @@
|
|
|
type = 'standardOutput';
|
|
|
} else if (this.activeName === '关键设备') {
|
|
|
type = 'standardDevice';
|
|
|
+ } else if (this.activeName === 'NC程序') {
|
|
|
+ type = 'ncCodeList';
|
|
|
}
|
|
|
|
|
|
this.tableData.taskParam[this.currentIndex][type].splice(index, 1);
|
|
|
@@ -1611,10 +1734,11 @@
|
|
|
} else if (this.activeName === '质检项参数') {
|
|
|
this.qualityParam =
|
|
|
this.tableData.taskParam[this.currentIndex].qualityParam || [];
|
|
|
- }else if (this.activeName === '首件两检') {
|
|
|
+ } else if (this.activeName === '首件两检') {
|
|
|
this.firstArticleDualInspectionParam =
|
|
|
- this.tableData.taskParam[this.currentIndex].firstArticleDualInspectionParam || [];
|
|
|
- } else if (this.activeName === '生产节拍') {
|
|
|
+ this.tableData.taskParam[this.currentIndex]
|
|
|
+ .firstArticleDualInspectionParam || [];
|
|
|
+ } else if (this.activeName === '生产节拍') {
|
|
|
this.beatParam =
|
|
|
this.tableData.taskParam[this.currentIndex].beatParam ||
|
|
|
this.beatParam;
|
|
|
@@ -1806,7 +1930,8 @@
|
|
|
|
|
|
this.baseCount2 = rowData.baseCount2;
|
|
|
this.baseCountUnit2 = rowData.baseCountUnit2;
|
|
|
-
|
|
|
+ this.ncCodeList =
|
|
|
+ this.tableData.taskParam[this.currentIndex].ncCodeList || [];
|
|
|
this.visible = true;
|
|
|
setTimeout(() => {
|
|
|
console.log(this.$refs);
|
|
|
@@ -1889,7 +2014,9 @@
|
|
|
this.$refs.qualityParamRef.getDate() || [];
|
|
|
}
|
|
|
if (this.$refs.firstArticleDualInspectionParamRef) {
|
|
|
- this.tableData.taskParam[this.currentIndex].firstArticleDualInspectionParam =
|
|
|
+ this.tableData.taskParam[
|
|
|
+ this.currentIndex
|
|
|
+ ].firstArticleDualInspectionParam =
|
|
|
this.$refs.firstArticleDualInspectionParamRef.getDate() || [];
|
|
|
}
|
|
|
//工艺文件只传id
|
|
|
@@ -1908,7 +2035,11 @@
|
|
|
this.$set(this.tableData.taskParam[index], 'fileParam', val);
|
|
|
}
|
|
|
});
|
|
|
- console.log('111112223344', this.tableData.taskParam);
|
|
|
+ this.$set(
|
|
|
+ this.tableData.taskParam[this.currentIndex],
|
|
|
+ 'ncCodeList',
|
|
|
+ this.ncCodeList
|
|
|
+ );
|
|
|
|
|
|
// 保存过程控制事项
|
|
|
this.$refs.userSettingMatterProcessRef?.saveMatterList();
|