|
@@ -10,10 +10,10 @@
|
|
|
</el-radio-group>
|
|
|
<!--<el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="add" circle></el-button>-->
|
|
|
<el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="addTools" circle></el-button>
|
|
|
- <span style="margin-left: 50px;">
|
|
|
- <el-checkbox v-model="armTrayConf" :disabled="showRadio">{{$t("prepare.common.armTrayConf")}}</el-checkbox>
|
|
|
- <el-checkbox v-model="armFixtureConf" :disabled="showRadio">{{$t("prepare.common.armFixtureConf")}}</el-checkbox>
|
|
|
- </span>
|
|
|
+<!-- <span style="margin-left: 50px;">-->
|
|
|
+<!-- <el-checkbox v-model="armTrayConf" :disabled="showRadio">{{$t("prepare.common.armTrayConf")}}</el-checkbox>-->
|
|
|
+<!-- <el-checkbox v-model="armFixtureConf" :disabled="showRadio">{{$t("prepare.common.armFixtureConf")}}</el-checkbox>-->
|
|
|
+<!-- </span>-->
|
|
|
</div>
|
|
|
<!-- Table数据 :span-method="objectSpanMethod" -->
|
|
|
<el-table
|
|
@@ -45,9 +45,9 @@
|
|
|
<el-table-column prop="armorPic" :label='$t("prepare.table.toolGroup.armorPic")' align="center" width="180px">
|
|
|
<template slot-scope="{ row }">
|
|
|
<div v-if="row.jjImgList && row.jjImgList.length > 0" class="demo-image__preview">
|
|
|
- <el-image
|
|
|
+ <el-image
|
|
|
style="width: 100px; height: 60px"
|
|
|
- :src="row.jjImgList[0]"
|
|
|
+ :src="row.jjImgList[0]"
|
|
|
:preview-src-list="row.jjImgList">
|
|
|
</el-image>
|
|
|
</div>
|
|
@@ -88,7 +88,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<pagination
|
|
|
v-show="tableData.total > 0"
|
|
|
:limit.sync="queryParams.size"
|
|
@@ -96,7 +96,7 @@
|
|
|
:total="Number(tableData.total)"
|
|
|
@pagination="fetch"
|
|
|
/>
|
|
|
-
|
|
|
+
|
|
|
<!-- 托盘 -->
|
|
|
<tenant-add
|
|
|
ref="add"
|
|
@@ -105,7 +105,7 @@
|
|
|
@close="editAddClose"
|
|
|
@success="editAddSuccess"
|
|
|
/>
|
|
|
-
|
|
|
+
|
|
|
<!-- 夹具 -->
|
|
|
<tenant-edit
|
|
|
ref="edit"
|
|
@@ -119,12 +119,12 @@
|
|
|
:dialog-visible="tenantViewVisible"
|
|
|
@close="viewClose"
|
|
|
/>
|
|
|
-
|
|
|
+
|
|
|
<!-- 上传图片对话框 -->
|
|
|
- <el-dialog
|
|
|
- title="上传图片"
|
|
|
+ <el-dialog
|
|
|
+ title="上传图片"
|
|
|
width="350px"
|
|
|
- :visible.sync="uploadQcVisible"
|
|
|
+ :visible.sync="uploadQcVisible"
|
|
|
:append-to-body="true"
|
|
|
@closed="closePic"
|
|
|
>
|
|
@@ -162,7 +162,7 @@
|
|
|
// 附件上传需要的组件和函数
|
|
|
import db from "@/utils/localstorage";
|
|
|
import {Base64} from 'js-base64';
|
|
|
-
|
|
|
+
|
|
|
export default {
|
|
|
name: "TrayForm",
|
|
|
components: { Pagination, TenantAdd, TenantEdit, TenantView },
|
|
@@ -185,7 +185,7 @@
|
|
|
},
|
|
|
fileList: [], // 附件的数据
|
|
|
tempObj: {}, // 当前的Row数据
|
|
|
-
|
|
|
+
|
|
|
radio: '3',
|
|
|
audioStatus: [],
|
|
|
dialogAdd: {
|
|
@@ -317,7 +317,7 @@
|
|
|
}
|
|
|
return list
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//获得数据相同的行数
|
|
|
rowspanFiled(data, filed) {
|
|
|
let spanArr5 = [];
|
|
@@ -367,7 +367,7 @@
|
|
|
this.fileList = Object.assign([],row.jjImgList)
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 上传成功,push到当前行的jjImgList数组中
|
|
|
handleSuccss(res, file, fileList) {
|
|
|
// console.log("图片:", res)
|
|
@@ -380,7 +380,7 @@
|
|
|
this.uploadQcVisible = false
|
|
|
this.closePic()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//关闭对话框时,重载组件,并且把fileList清空,否则会有异常
|
|
|
closePic() {
|
|
|
this.timer = new Date().getTime()
|
|
@@ -413,7 +413,7 @@
|
|
|
this.$refs.table.clearFilter()
|
|
|
this.search()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 【删除】按钮-事件 groupSort
|
|
|
domDelete(row){
|
|
|
this.$confirm(this.$t("tips.comTips"), this.$t("common.tips"), {
|
|
@@ -432,7 +432,7 @@
|
|
|
this.tableData = list;
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 【删除】按钮-事件 groupSort
|
|
|
domDelete_v1(row){
|
|
|
this.$confirm(this.$t("tips.comTips"), this.$t("common.tips"), {
|
|
@@ -445,18 +445,18 @@
|
|
|
let list = this.tableData.filter(item => item.groupSort != row.groupSort)
|
|
|
// 重新赋值
|
|
|
this.tableData = list
|
|
|
-
|
|
|
+
|
|
|
// 要合并列的准备数据
|
|
|
if(this.tableData.length > 0){
|
|
|
this.spanArr = this.rowspanFiled(this.tableData, "groupSort")
|
|
|
this.spanArr2 = this.rowspanFiled(this.tableData, "groupPrority")
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 把值给父组件【程序】赋值
|
|
|
this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 托盘【新增】按钮-事件
|
|
|
add () {
|
|
|
// 设置【组序】
|
|
@@ -468,7 +468,7 @@
|
|
|
this.dialogAdd.title = this.$t("common.add") + this.$t("prepare.common.tpJgroup")
|
|
|
this.dialogAdd.isVisible = true
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 托盘【修改】按钮-事件
|
|
|
addRow(row){
|
|
|
// 设置【组序】
|
|
@@ -477,12 +477,12 @@
|
|
|
this.dialogAdd.title = this.$t("common.edit") + this.$t("prepare.common.tpJgroup")
|
|
|
this.dialogAdd.isVisible = true
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 弹出框【取消】按钮-事件
|
|
|
editAddClose () {
|
|
|
this.dialogAdd.isVisible = false
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 弹出框【确定】按钮-事件
|
|
|
editAddSuccess (arr) {
|
|
|
// 通过深层复制,避免相同地址引起数据,一起改变
|
|
@@ -535,7 +535,7 @@
|
|
|
// 把值给父组件【程序】赋值
|
|
|
this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 设置数据前,需要合并
|
|
|
setDataMustSpan(data){
|
|
|
this.tableData = data
|
|
@@ -547,14 +547,14 @@
|
|
|
this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 【夹具】新增-事件
|
|
|
addTools(){
|
|
|
this.$refs.edit.type = "add";
|
|
|
this.dialog.title = this.$t("common.add") + this.$t("prepare.common.tab5");
|
|
|
this.dialog.isVisible = true;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 【夹具】修改-事件
|
|
|
editTools(row){
|
|
|
this.dialog.title = this.$t("common.edit") + this.$t("prepare.common.tab5");
|
|
@@ -564,11 +564,11 @@
|
|
|
this.$refs.edit.keys = keys;
|
|
|
this.dialog.isVisible = true;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
editClose(){
|
|
|
this.dialog.isVisible = false
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
editSuccess(data, type){
|
|
|
// 最新数组
|
|
|
let list = []
|
|
@@ -610,9 +610,9 @@
|
|
|
this.tableData = target;
|
|
|
console.log("最终数据:", this.tableData);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
editSuccess_v1(obj){
|
|
|
// 深度Copy,防止翻车
|
|
|
let tool = JSON.parse(obj)
|
|
@@ -635,12 +635,12 @@
|
|
|
// 重新赋值
|
|
|
this.tableData = list
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
clearSelections () {
|
|
|
this.$refs.table.clearSelection()
|
|
|
},
|
|
|
delete (ids) {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
view (row) {
|
|
|
this.$refs.view.setTenant(row)
|
|
@@ -678,7 +678,7 @@
|
|
|
this.dialog.isVisible = true
|
|
|
},
|
|
|
fetch (params = {}) {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -703,4 +703,4 @@
|
|
|
.itemDiv{
|
|
|
margin: 10px 0;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|