|
@@ -12,31 +12,33 @@
|
|
|
</div>
|
|
|
<el-row class="right">
|
|
|
<el-checkbox v-model="checked">隐藏自动填充的信息</el-checkbox>
|
|
|
- <el-button @click="addparts">添加部件</el-button>
|
|
|
+ <el-button @click="addparts">添加3部件</el-button>
|
|
|
<el-button>刷新</el-button>
|
|
|
<el-button>撤销</el-button>
|
|
|
</el-row>
|
|
|
<div class="tableBox">
|
|
|
<handson-table ref="table"></handson-table>
|
|
|
</div>
|
|
|
- <el-pagination
|
|
|
- class="center"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="page.pageNumber"
|
|
|
- :page-sizes="page.pageSizes"
|
|
|
- :page-size="page.pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="page.total">
|
|
|
- </el-pagination>
|
|
|
+ <div class="table-bottom">
|
|
|
+ <el-pagination
|
|
|
+ class="fr"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="page.pageNumber"
|
|
|
+ :page-sizes="page.pageSizes"
|
|
|
+ :page-size="page.pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="page.total"
|
|
|
+ ></el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import tools from "@/utils/scan/tools";
|
|
|
-import handsonUtils from "@/utils/hasontableUtils"
|
|
|
-import showTools from "@/utils/handsontable/notShow"
|
|
|
-import text from "@/utils/handsontable/mainText"
|
|
|
+import handsonUtils from "@/utils/hasontableUtils";
|
|
|
+import showTools from "@/utils/handsontable/notShow";
|
|
|
+import text from "@/utils/handsontable/mainText";
|
|
|
|
|
|
import handsonTable from "@/components/common/handsontable";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
@@ -45,9 +47,7 @@ export default {
|
|
|
components: {
|
|
|
handsonTable
|
|
|
},
|
|
|
- props: {
|
|
|
-
|
|
|
- },
|
|
|
+ props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
partsId: "",
|
|
@@ -68,7 +68,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -77,7 +78,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -86,7 +88,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -95,7 +98,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -104,7 +108,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -113,7 +118,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -122,7 +128,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -131,7 +138,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -140,7 +148,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -159,7 +168,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -168,7 +178,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -177,7 +188,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -186,7 +198,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -195,7 +208,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -204,7 +218,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -213,7 +228,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -222,7 +238,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -231,7 +248,8 @@ export default {
|
|
|
info3: "王靖",
|
|
|
info4: "文强",
|
|
|
info5: "小白"
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
operation: "查看详情",
|
|
|
demo1: "小龙",
|
|
|
demo2: "三娘",
|
|
@@ -292,21 +310,20 @@ export default {
|
|
|
methods: {
|
|
|
//获取表头
|
|
|
getHeaderData() {
|
|
|
- this.changeCader()
|
|
|
- if(this.mess.deviceId){
|
|
|
- getTableHeader({
|
|
|
- code: this.mess.deviceId,
|
|
|
- ProjId: this.projectId
|
|
|
+ this.changeCader();
|
|
|
+ if (this.mess.deviceId) {
|
|
|
+ getTableHeader({
|
|
|
+ code: this.mess.deviceId,
|
|
|
+ ProjId: this.projectId
|
|
|
}).then(res => {
|
|
|
- this.headers = res.data.Content;
|
|
|
- this.getMain()
|
|
|
+ this.headers = res.data.Content;
|
|
|
+ this.getMain();
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
- addparts(){
|
|
|
- this.$router.push({ name: 'addparts', params: { facilityId: 1 }});
|
|
|
- console.log("dianjile")
|
|
|
+ addparts() {
|
|
|
+ this.$router.push({ name: "addparts", params: { facilityId: 1 } });
|
|
|
+ console.log("dianjile");
|
|
|
},
|
|
|
createTable() {
|
|
|
const params = {
|
|
@@ -315,7 +332,7 @@ export default {
|
|
|
PageNumber: this.page.pageNumber,
|
|
|
PageSize: this.page.pageSize,
|
|
|
Projection: []
|
|
|
- }
|
|
|
+ };
|
|
|
let settings = {
|
|
|
data: this.tableData,
|
|
|
colHeaders: this.header,
|
|
@@ -342,7 +359,8 @@ export default {
|
|
|
this.tableExample = this.$refs.table.init(settings);
|
|
|
});
|
|
|
},
|
|
|
- handleTdClick(el, rowArr) { //点击表格的操作
|
|
|
+ handleTdClick(el, rowArr) {
|
|
|
+ //点击表格的操作
|
|
|
//点击的是表头
|
|
|
if (rowArr.row < 0) {
|
|
|
return;
|
|
@@ -358,7 +376,8 @@ export default {
|
|
|
this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
|
|
|
} else if (isSort) {
|
|
|
//排序后的数组
|
|
|
- let sortArr = this.tableExample.getPlugin("columnSorting").rowsMapper.__arrayMap;
|
|
|
+ let sortArr = this.tableExample.getPlugin("columnSorting").rowsMapper
|
|
|
+ .__arrayMap;
|
|
|
let infos = this.tableData[sortArr[rowArr.row]];
|
|
|
this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
|
|
|
} else if (trimmedArr.length) {
|
|
@@ -373,12 +392,17 @@ export default {
|
|
|
getInfors(infos, row) {
|
|
|
//其他的开始判断
|
|
|
let val = this.tableExample.colToProp(row.col);
|
|
|
- this.row = row.row
|
|
|
- this.messKey = val
|
|
|
- this.systemId = infos.id
|
|
|
+ this.row = row.row;
|
|
|
+ this.messKey = val;
|
|
|
+ this.systemId = infos.id;
|
|
|
debugger;
|
|
|
if (val == "operation") {
|
|
|
- window.open(`http://47.94.89.44:8058/spread?id=${infos.id}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
|
|
|
+ window.open(
|
|
|
+ `http://47.94.89.44:8058/spread?id=${infos.id}&pid=${
|
|
|
+ this.projectId
|
|
|
+ }&secret=${this.secret}`,
|
|
|
+ "_blank"
|
|
|
+ );
|
|
|
// this.iframeSrc =
|
|
|
// process.env.BASE_URL +
|
|
|
// ":8889/#/details?perjectId=" +
|
|
@@ -400,51 +424,71 @@ export default {
|
|
|
val == "infos.Drawing"
|
|
|
) {
|
|
|
if (this.onlyRead) {
|
|
|
- this.dialog.lookPic = true
|
|
|
- this.picsArr = this.tableData[row.row].infos ? (this.tableData[row.row].infos[val.split(".")[1]] ? this.tableData[row.row].infos[val.split(".")[1]] : []) : []
|
|
|
+ this.dialog.lookPic = true;
|
|
|
+ this.picsArr = this.tableData[row.row].infos
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ : []
|
|
|
+ : [];
|
|
|
} else {
|
|
|
- this.imgsArr = this.tableData[row.row].infos ? (this.tableData[row.row].infos[val.split(".")[1]] ? this.tableData[row.row].infos[val.split(".")[1]] : []) : []
|
|
|
- this.dialog.uploadImgs = true
|
|
|
+ this.imgsArr = this.tableData[row.row].infos
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ : []
|
|
|
+ : [];
|
|
|
+ this.dialog.uploadImgs = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (val == "linkSystem") {
|
|
|
- this.dialog.systemType = true
|
|
|
+ this.dialog.systemType = true;
|
|
|
}
|
|
|
|
|
|
if (val == "linkName" && this.onlyRead) {
|
|
|
- this.$router.push({ name: 'partsLedger'});
|
|
|
+ this.$router.push({ name: "partsLedger" });
|
|
|
} else if (val == "linkName" && !this.onlyRead) {
|
|
|
- this.$router.push({ name: 'partsLedger'});
|
|
|
+ this.$router.push({ name: "partsLedger" });
|
|
|
}
|
|
|
|
|
|
if (val == "infos.Pic") {
|
|
|
- this.picsArr = this.tableData[row.row].infos ? (this.tableData[row.row].infos[val.split(".")[1]] ? this.tableData[row.row].infos[val.split(".")[1]] : []) : []
|
|
|
+ this.picsArr = this.tableData[row.row].infos
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ : []
|
|
|
+ : [];
|
|
|
if (this.onlyRead) {
|
|
|
- this.dialog.lookPic = true
|
|
|
+ this.dialog.lookPic = true;
|
|
|
} else {
|
|
|
- this.dialog.pic = true
|
|
|
+ this.dialog.pic = true;
|
|
|
}
|
|
|
}
|
|
|
- if (val == "infos.InsuranceFile" || val == "infos.Archive" || val == "infos.CheckReport") {
|
|
|
- this.filesArr = this.tableData[row.row].infos ? (this.tableData[row.row].infos[val.split(".")[1]] ? this.tableData[row.row].infos[val.split(".")[1]] : []) : []
|
|
|
- this.dialog.uploadFiles = true
|
|
|
+ if (
|
|
|
+ val == "infos.InsuranceFile" ||
|
|
|
+ val == "infos.Archive" ||
|
|
|
+ val == "infos.CheckReport"
|
|
|
+ ) {
|
|
|
+ this.filesArr = this.tableData[row.row].infos
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
+ : []
|
|
|
+ : [];
|
|
|
+ this.dialog.uploadFiles = true;
|
|
|
}
|
|
|
if (val == "linkName" && this.linkNameFalg) {
|
|
|
- this.category = this.tableData[row.row]
|
|
|
- this.dialog.changeRea = true
|
|
|
+ this.category = this.tableData[row.row];
|
|
|
+ this.dialog.changeRea = true;
|
|
|
}
|
|
|
if (val == "infos.EquipQRCode") {
|
|
|
- this.qrcodeUrl = this.tableData[row.row].infos.EquipQRCode
|
|
|
+ this.qrcodeUrl = this.tableData[row.row].infos.EquipQRCode;
|
|
|
if (!!this.qrcodeUrl) {
|
|
|
this.dialog.qrcode = true;
|
|
|
} else {
|
|
|
- this.$message("此设备没有设备二维码")
|
|
|
+ this.$message("此设备没有设备二维码");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (this.onlyRead) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
if (val == "infos.DPManufacturerID") {
|
|
@@ -452,43 +496,41 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (val == "infos.SupplierContractID") {
|
|
|
- let falg = null
|
|
|
+ let falg = null;
|
|
|
if (!!this.tableData[row.row].infos) {
|
|
|
if (!!this.tableData[row.row].infos.DPSupplierID) {
|
|
|
- falg = this.tableData[row.row].infos.DPSupplierID.split("-")[0]
|
|
|
+ falg = this.tableData[row.row].infos.DPSupplierID.split("-")[0];
|
|
|
}
|
|
|
}
|
|
|
if (!!falg) {
|
|
|
- this.id = falg
|
|
|
+ this.id = falg;
|
|
|
this.dialog.supply = true;
|
|
|
} else {
|
|
|
- this.$message("请先选择供应商")
|
|
|
+ this.$message("请先选择供应商");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (val == "infos.InsuranceNum") {
|
|
|
//选择保单
|
|
|
- let falg = null
|
|
|
+ let falg = null;
|
|
|
if (!!this.tableData[row.row].infos) {
|
|
|
if (!!this.tableData[row.row].infos.DPInsurerID) {
|
|
|
- falg = this.tableData[row.row].infos.DPInsurerID.split("-")[0]
|
|
|
+ falg = this.tableData[row.row].infos.DPInsurerID.split("-")[0];
|
|
|
}
|
|
|
}
|
|
|
if (!!falg) {
|
|
|
- this.id = falg
|
|
|
+ this.id = falg;
|
|
|
this.dialog.guarantee = true;
|
|
|
} else {
|
|
|
- this.$message("请先选择保险商")
|
|
|
+ this.$message("请先选择保险商");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (
|
|
|
- val == "infos.DPSupplierID"
|
|
|
- ) {
|
|
|
+ if (val == "infos.DPSupplierID") {
|
|
|
if (!!infos.linkId) {
|
|
|
this.dialog.supplier = true;
|
|
|
} else {
|
|
|
- this.$message("该设备无关联资产")
|
|
|
+ this.$message("该设备无关联资产");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -496,16 +538,15 @@ export default {
|
|
|
if (!!infos.linkId) {
|
|
|
this.dialog.maintainer = true;
|
|
|
} else {
|
|
|
- this.$message("该设备无关联资产")
|
|
|
+ this.$message("该设备无关联资产");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (
|
|
|
- val == "infos.DPInsurerID") {
|
|
|
+ if (val == "infos.DPInsurerID") {
|
|
|
if (!!infos.linkId) {
|
|
|
this.dialog.insurer = true;
|
|
|
} else {
|
|
|
- this.$message("该设备无关联资产")
|
|
|
+ this.$message("该设备无关联资产");
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -543,8 +584,8 @@ export default {
|
|
|
}
|
|
|
return a;
|
|
|
},
|
|
|
- handleTabClick() { //切换部件时回调
|
|
|
-
|
|
|
+ handleTabClick() {
|
|
|
+ //切换部件时回调
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
console.log(`每页 ${val} 条`);
|
|
@@ -581,7 +622,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
.tableBox {
|
|
|
height: calc(100% - 150px);
|
|
|
}
|
|
@@ -590,4 +631,7 @@ export default {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
}
|
|
|
+.fr {
|
|
|
+ float: right;
|
|
|
+}
|
|
|
</style>
|