|
@@ -67,8 +67,8 @@
|
|
|
<!-- 全部与未完成 -->
|
|
|
<div class="build_operate" ref="operate">
|
|
|
<el-radio-group v-model="checked" @change="changeChecked(checked)">
|
|
|
- <el-radio-button label="" >全部</el-radio-button>
|
|
|
- <el-radio-button label="0">未完成修订</el-radio-button>
|
|
|
+ <el-radio-button :label="''" >全部</el-radio-button>
|
|
|
+ <el-radio-button :label="0">未完成修订</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
<div class="undo_btn" @click="undo">
|
|
|
<el-button plain>撤回</el-button>
|
|
@@ -297,7 +297,7 @@
|
|
|
getEquipBelongs, //数据中心-获取设备族
|
|
|
queryProperty, //数据中心-资产查询
|
|
|
deleteProperty, //数据中心-删除资产
|
|
|
- updateProperty, //数据中心-更新
|
|
|
+ updateProperty, //数据中心-更新资产
|
|
|
getDataDictionary, //数据中心-查询表头
|
|
|
} from "@/api/scan/request";
|
|
|
import { mapGetters, mapActions } from "vuex"
|
|
@@ -390,7 +390,12 @@
|
|
|
//获取所有设备族
|
|
|
getAllFamily() {
|
|
|
let pa = {
|
|
|
- data:{ Orders:'Family asc', PageSize: 500 }
|
|
|
+ data:{
|
|
|
+ Orders:'Family asc',
|
|
|
+ Distinct:true,
|
|
|
+ PageSize: 500,
|
|
|
+ Projection:["Family","FamilyName"]
|
|
|
+ }
|
|
|
}
|
|
|
getEquipBelongs(pa, res => {
|
|
|
this.AllFamily = res.Content.map(t => {
|
|
@@ -436,9 +441,6 @@
|
|
|
this.myHotArr[this.tabChecked].loadData(data)
|
|
|
this.myHotMainArr[this.tabChecked] = data
|
|
|
} else {
|
|
|
- console.log("创建实例", this.tabChecked,
|
|
|
- data,
|
|
|
- this.myHotHeaderArr[this.tabChecked])
|
|
|
this.createHot(
|
|
|
this.tabChecked,
|
|
|
data,
|
|
@@ -533,16 +535,11 @@
|
|
|
document.onmousemove = function(e) {
|
|
|
e.preventDefault();
|
|
|
let endY = e.clientY;
|
|
|
- // let headerH = _this.$refs['header'].offsetHeight + 48 + _this.$refs['operate'].offsetHeight + 300
|
|
|
- // if (headerH > endY) {
|
|
|
- // _this.mouseUp()
|
|
|
- // }
|
|
|
_this.picHeight = _this.picHeight - endY + startY;
|
|
|
if (_this.picHeight > 245){
|
|
|
_this.mouseUp()
|
|
|
}
|
|
|
startY = endY;
|
|
|
- //如果图片容器高度大于表格最小高度,停止拖拽
|
|
|
};
|
|
|
},
|
|
|
//移动图片容器的时候鼠标up时触发重新渲染表格高度
|
|
@@ -568,30 +565,14 @@
|
|
|
},
|
|
|
//获取点位标签详情
|
|
|
getPointDetail() {
|
|
|
- let param = {
|
|
|
- PointId: this.pointId,
|
|
|
- UserId: this.userId,
|
|
|
- ProjId: this.projectId
|
|
|
- };
|
|
|
- getPoint(param).then(result => {
|
|
|
- if (result.data.Result == "success") {
|
|
|
- this.pointList = result.data.PointList[0];
|
|
|
- this.imgList = this.delImage(result.data.PointList[0].ImageList);
|
|
|
- this.dialogTableVisible = true;
|
|
|
- } else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
- this.$message.error("请求出错")
|
|
|
- }
|
|
|
- });
|
|
|
- // let pa = {
|
|
|
- // Filters: `Id='${this.pointId}'`
|
|
|
- // }
|
|
|
- // queryLocationPoint(pa, res => {
|
|
|
- // this.pointList = res.Content[0];
|
|
|
- // this.imgList = this.delImage(res.Content[0].ImageList || []);
|
|
|
- // this.dialogTableVisible = true;
|
|
|
- // })
|
|
|
+ let pa = {
|
|
|
+ Filters: `Id='${this.pointId}'`
|
|
|
+ }
|
|
|
+ queryLocationPoint(pa, res => {
|
|
|
+ this.pointList = res.Content[0];
|
|
|
+ this.imgList = this.delImage(res.Content[0].ImageList || []);
|
|
|
+ this.dialogTableVisible = true;
|
|
|
+ })
|
|
|
},
|
|
|
delImage(imageList) {
|
|
|
let list = {
|
|
@@ -648,66 +629,29 @@
|
|
|
},
|
|
|
//保存点位标签详情的修改
|
|
|
savePoint() {
|
|
|
- let param = {
|
|
|
- ProjId: this.projectId,
|
|
|
- UserId: this.userId,
|
|
|
- PointList: this.pointList
|
|
|
- };
|
|
|
- updatePoint(param).then(result => {
|
|
|
- if (result.data.Result == "success") {
|
|
|
- this.$message({
|
|
|
- message: "保存成功",
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- return;
|
|
|
- } else {
|
|
|
- this.$message.error("保存失败");
|
|
|
- }
|
|
|
- });
|
|
|
- // let pa = {
|
|
|
- // Content:[this.pointList]
|
|
|
- // }
|
|
|
- // updateLocationPoint(pa, res => {
|
|
|
- // this.$message.success('更新成功')
|
|
|
- // })
|
|
|
+ let pa = {
|
|
|
+ Content:[this.pointList]
|
|
|
+ }
|
|
|
+ updateLocationPoint(pa, res => {
|
|
|
+ this.$message.success('更新成功')
|
|
|
+ })
|
|
|
},
|
|
|
//获取点位标签
|
|
|
getPT() {
|
|
|
- let param = {
|
|
|
- BeginTime: this.checkTimeArr[0],
|
|
|
- EndTime: this.checkTimeArr[1],
|
|
|
- BuildId: this.buildId,
|
|
|
- FloorId: this.floorId,
|
|
|
- ProjId: this.projectId,
|
|
|
- UserId: this.userId
|
|
|
- };
|
|
|
- getPT(param).then(result => {
|
|
|
- if (result.data.Result == "success") {
|
|
|
- this.PTArr = result.data.PointList;
|
|
|
- // this.labelShow = true
|
|
|
- //赋予swiper重新操作
|
|
|
- this.labelShow = true;
|
|
|
- this.createPTSwiper();
|
|
|
- } else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
- this.$message.error("请求出错")
|
|
|
- }
|
|
|
- });
|
|
|
- // let pa = {
|
|
|
- // Filters: `LastUpdate>='${this.checkTimeArr[0]}';LastUpdate<='${this.checkTimeArr[1]}';Build='${this.buildId}'`,
|
|
|
- // PageSize: 100
|
|
|
- // }
|
|
|
- // if(this.floorId == 'noKnow'){
|
|
|
- // pa.Filters += `;FloorId isNull`
|
|
|
- // }else if(this.floorId!='all'){
|
|
|
- // pa.Filters += `;FloorId='${this.floorId}'`
|
|
|
- // }
|
|
|
- // queryLocationPoint(pa, res => {
|
|
|
- // this.PTArr = res.Content;
|
|
|
- // this.labelShow = true;
|
|
|
- // this.createPTSwiper();
|
|
|
- // })
|
|
|
+ let pa = {
|
|
|
+ Filters: `LastUpdate>='${this.checkTimeArr[0]}';LastUpdate<='${this.checkTimeArr[1]}';BuildId='${this.buildId}'`,
|
|
|
+ PageSize: 100
|
|
|
+ }
|
|
|
+ if(this.floorId == 'noKnow'){
|
|
|
+ pa.Filters += `;FloorId isNull`
|
|
|
+ }else if(this.floorId!='all'){
|
|
|
+ pa.Filters += `;FloorId='${this.floorId}'`
|
|
|
+ }
|
|
|
+ queryLocationPoint(pa, res => {
|
|
|
+ this.PTArr = res.Content;
|
|
|
+ this.labelShow = true;
|
|
|
+ this.createPTSwiper();
|
|
|
+ })
|
|
|
},
|
|
|
//获取楼层列表
|
|
|
getFloorData() {
|
|
@@ -734,7 +678,6 @@
|
|
|
ProjId: this.projectId,
|
|
|
UserId: this.userId
|
|
|
};
|
|
|
- console.log("data修改")
|
|
|
upDateTableMain(param, paramList).then(result => {
|
|
|
if (result.data.Result == "success") {
|
|
|
return;
|
|
@@ -860,15 +803,6 @@
|
|
|
ProjId: this.projectId
|
|
|
};
|
|
|
if (!!this.code) {
|
|
|
- // getTableHeader(param).then(result => {
|
|
|
- // if (result.data.Result == "success") {
|
|
|
- // this.myHotHeaderArr[this.tabChecked] = result.data.Content;
|
|
|
- // this.getTableMain();
|
|
|
- // } else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
- // }
|
|
|
- // });
|
|
|
let pa = {
|
|
|
type: this.code,
|
|
|
data:{
|
|
@@ -884,24 +818,6 @@
|
|
|
},
|
|
|
//获取表格主体内容
|
|
|
async getTableMain() {
|
|
|
- // let param = {
|
|
|
- // BeginTime: this.checkTimeArr[0],
|
|
|
- // BuildId: this.buildId,
|
|
|
- // Checked: this.checked,
|
|
|
- // EndTime: this.checkTimeArr[1],
|
|
|
- // Family: this.code,
|
|
|
- // FloorId: this.floorId,
|
|
|
- // PageNum: this.currentPage[this.tabChecked],
|
|
|
- // PageSize: this.pageSizeArr[this.tabChecked],
|
|
|
- // PointId: this.pointCheck,
|
|
|
- // ProjId: this.projectId,
|
|
|
- // UserId: this.userId
|
|
|
- // };
|
|
|
- // getdelMain(param).then(res => {
|
|
|
- // if (res.data.Result == "success") {
|
|
|
- // this.updateBusiness(res.data.FmList)
|
|
|
- // }
|
|
|
- // })
|
|
|
let pa = {
|
|
|
PageNumber: this.currentPage[this.tabChecked],
|
|
|
PageSize: this.pageSizeArr[this.tabChecked],
|
|
@@ -1035,8 +951,6 @@
|
|
|
this.getTabFamily();
|
|
|
return;
|
|
|
} else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
this.$message.error("请求出错")
|
|
|
}
|
|
|
});
|
|
@@ -1061,8 +975,6 @@
|
|
|
this.getTabFamily();
|
|
|
return;
|
|
|
} else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
this.$message.error("请求出错")
|
|
|
}
|
|
|
});
|
|
@@ -1117,7 +1029,6 @@
|
|
|
},
|
|
|
//点击点位标签整个swiper事件
|
|
|
checkPoint(val, id, name) {
|
|
|
- // this.labelShow = false
|
|
|
name = name || "";
|
|
|
if (name == "") {
|
|
|
this.labelChecked = "请选择点位标签!";
|
|
@@ -1134,7 +1045,6 @@
|
|
|
}
|
|
|
this.pointCheck = id;
|
|
|
this.changeChecked(0);
|
|
|
- // let id = document.getElementById('table' + this.tabChecked)
|
|
|
},
|
|
|
getTable(pointId, index) {
|
|
|
this.pointId = pointId;
|
|
@@ -1146,13 +1056,6 @@
|
|
|
if (rowArr.row < 0) {
|
|
|
return
|
|
|
}
|
|
|
- //else{
|
|
|
- // let infos = this.myHotMainArr[this.tabChecked][rowArr.row].Infos
|
|
|
- // this.tablePicArr = infos.Pic || []
|
|
|
- // this.tablePicMsg = '该设备照片为空'
|
|
|
- // this.picShow = true
|
|
|
- // this.createPicSwiper()
|
|
|
- // }
|
|
|
let filter = this.filtersArr[this.tabChecked];
|
|
|
//被筛选过后的数组
|
|
|
let trimmedArr = this.trimmedRows();
|
|
@@ -1182,15 +1085,6 @@
|
|
|
getInfors(data, rowArr, falg = false) {
|
|
|
let val = this.myHotArr[this.tabChecked].getActiveEditor().prop;
|
|
|
this.$refs.recommend.randerData(data, val, this.myHotHeaderArr[this.tabChecked])
|
|
|
- // if (infos.Pic || infos.Nameplate) {
|
|
|
- // if (!!infos.Nameplate) {
|
|
|
- // this.tablePicArr.Pic = infos.Nameplate.concat(infos.Pic) || [];
|
|
|
- // } else {
|
|
|
- // this.tablePicArr.Pic = infos.Pic || [];
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.tablePicArr.Pic = infos.Pic || [];
|
|
|
- // }
|
|
|
if(data.LedgerParam.PhotoDoc&&(data.LedgerParam.PhotoDoc.Pic||data.LedgerParam.PhotoDoc.Nameplate)){
|
|
|
if(data.LedgerParam.PhotoDoc.Nameplate){
|
|
|
this.tablePicArr.Pic = data.LedgerParam.PhotoDoc.Nameplate.concat(data.LedgerParam.PhotoDoc.Pic) || [];
|
|
@@ -1312,6 +1206,7 @@
|
|
|
},
|
|
|
//改变checked,全部未完成修订
|
|
|
changeChecked(val) {
|
|
|
+ console.log(val)
|
|
|
this.checked = val;
|
|
|
this.tabChecked = 0;
|
|
|
this.tabAvtive = "table0";
|
|
@@ -1322,10 +1217,6 @@
|
|
|
//当表格中的内容被修改
|
|
|
tdChange(changeData, source) {
|
|
|
// 修改了的数据
|
|
|
- //过滤条件
|
|
|
- // if(changeData[0][1] == "Family"){
|
|
|
- // this.buildMsgShow = true
|
|
|
- // }
|
|
|
let filter = this.filtersArr[this.tabChecked];
|
|
|
if (changeData) {
|
|
|
let trimmedArr = this.trimmedRows();
|
|
@@ -1340,7 +1231,6 @@
|
|
|
if (changeData.length == 1 && changeData[0][1].indexOf("/") > 0) {
|
|
|
changeData[0][1] = changeData[0][1].split("/").join(".")
|
|
|
}
|
|
|
- console.log(data)
|
|
|
//存在data进行修改请求
|
|
|
if (data && data.length) {
|
|
|
this.updateBusiness(data, changeData, firstObj);
|
|
@@ -1348,42 +1238,50 @@
|
|
|
}
|
|
|
},
|
|
|
//修改请求
|
|
|
- async updateBusiness(data, change, obj) {
|
|
|
- console.log(data, change, obj, "obj")
|
|
|
+ updateBusiness(data, change, obj) {
|
|
|
// let param = []
|
|
|
//生成对应修改数据
|
|
|
- let infoArr = ["Brand", "Specification", "Manufacturer", "Supplier", "Maintainer", "Insurer"]
|
|
|
- let versArr = ["Manufacturer", "Supplier", "Maintainer", "Insurer"]
|
|
|
- let falg = true
|
|
|
- let param = data.map(item => {
|
|
|
- let obj = {}
|
|
|
- obj.id = item.FmId
|
|
|
- obj.Checked = item.Checked
|
|
|
- obj.family = item.Family
|
|
|
- obj.infos = item.Infos
|
|
|
- return obj
|
|
|
- })
|
|
|
- console.log(param, "param")
|
|
|
- let changeParam = await this.getIdForVender({
|
|
|
- "projectId": this.projectId,
|
|
|
- "criterias": param
|
|
|
- })
|
|
|
- console.log(changeParam, "changeParam")
|
|
|
- let lastData = changeParam.map(item => {
|
|
|
- return {
|
|
|
- FmId: item.id,
|
|
|
- Checked: param.find((value) => { return value.id === item.id }).Checked,
|
|
|
- Family: item.family,
|
|
|
- Infos: item.infos
|
|
|
- }
|
|
|
- })
|
|
|
- upDateTableMain({
|
|
|
- ProjId: this.projectId,
|
|
|
- UserId: this.userId
|
|
|
- }, lastData).then(res => {
|
|
|
- if (falg) {
|
|
|
- this.loadData()
|
|
|
- }
|
|
|
+ // let infoArr = ["Brand", "Specification", "Manufacturer", "Supplier", "Maintainer", "Insurer"]
|
|
|
+ // let versArr = ["Manufacturer", "Supplier", "Maintainer", "Insurer"]
|
|
|
+ // let falg = true
|
|
|
+ // let param = data.map(item => {
|
|
|
+ // let obj = {}
|
|
|
+ // obj.id = item.FmId
|
|
|
+ // obj.Checked = item.Checked
|
|
|
+ // obj.family = item.Family
|
|
|
+ // obj.infos = item.Infos
|
|
|
+ // return obj
|
|
|
+ // })
|
|
|
+ // console.log(param, "param")
|
|
|
+ // let changeParam = await this.getIdForVender({
|
|
|
+ // "projectId": this.projectId,
|
|
|
+ // "criterias": param
|
|
|
+ // })
|
|
|
+ // console.log(changeParam, "changeParam")
|
|
|
+ // let lastData = changeParam.map(item => {
|
|
|
+ // return {
|
|
|
+ // FmId: item.id,
|
|
|
+ // Checked: param.find((value) => { return value.id === item.id }).Checked,
|
|
|
+ // Family: item.family,
|
|
|
+ // Infos: item.infos
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // upDateTableMain({
|
|
|
+ // ProjId: this.projectId,
|
|
|
+ // UserId: this.userId
|
|
|
+ // }, lastData).then(res => {
|
|
|
+ // if (falg) {
|
|
|
+ // this.loadData()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ console.log(data)
|
|
|
+ console.log(change)
|
|
|
+ console.log(obj)
|
|
|
+ let pa = {
|
|
|
+ Content: data
|
|
|
+ }
|
|
|
+ updateProperty(pa, res => {
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
//判断文案是否相同
|
|
@@ -1589,10 +1487,6 @@
|
|
|
this.tabChecked = variableNum;
|
|
|
let pro = document.getElementById("hot-display-license-info");
|
|
|
pro.parentNode.removeChild(pro);
|
|
|
- // this.loading = false
|
|
|
- // this.$nextTick(
|
|
|
- // document.getElementById('hot-display-license-info').style.display = 'none'
|
|
|
- // )
|
|
|
},
|
|
|
afterDocumentKeyDown(e) {
|
|
|
// this.$nextTick(() => {
|