|
@@ -61,32 +61,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
- <!-- <div class="swiper-container" id="swiper"> -->
|
|
|
- <!-- <div class="swiper-wrapper" ref="swiperPoint">
|
|
|
- <div class="swiper-slide" :class="checkPointClass == 'all' ? 'active_swiper' : ''" @click="checkPoint('all','all','all')">
|
|
|
- <div class="all_view">
|
|
|
- <h3>全部</h3>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="swiper-slide" v-for="(item,index) in PTArr" :key="index" :class="checkPointClass == index ? 'active_swiper' : ''" @click="checkPoint(index,item.Id,item.Name)">
|
|
|
- <div class="img_view">
|
|
|
- <div :class="index == 0 ? 'msg_view' : 'title_view'">
|
|
|
- <h3>{{item.Name}}</h3>
|
|
|
- <p>
|
|
|
- 附近的资产:
|
|
|
- <span>{{item.Total}}</span> 个(
|
|
|
- <em>{{item.Nocheck}}</em> 个未完成修订)
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <img v-if="index != 0" v-load @error="setErrorImg" :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Image +'&width=200'" :alt="item.Name">
|
|
|
- <p v-if="index != 0" class="btn" @click.stop="getTable(item.Id,index)">查看详情</p>
|
|
|
- <i v-if="index != 0" class="iconfont icon-shuaxin icon" @click.stop="refreshImg(index)"></i>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
- <!-- Add Pagination -->
|
|
|
- <!-- -->
|
|
|
- <!-- </div> -->
|
|
|
</div>
|
|
|
<!-- 右按钮 -->
|
|
|
<div class="turn_right">
|
|
@@ -96,33 +70,21 @@
|
|
|
<!-- 控制点位标签显示 -->
|
|
|
<div class="label_show">
|
|
|
<el-button plain @click="labelShowBtn">{{ labelChecked }}</el-button>
|
|
|
- <!-- <div class="label_btn" @click="labelShowBtn">
|
|
|
- <span>{{labelChecked}}</span>
|
|
|
- <i class="iconfont" :class="!labelShow ? 'icon-unfold' : 'icon-packup'"></i>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 全部与未完成 -->
|
|
|
<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>
|
|
|
- <!-- <span @click="changeChecked('')" :class="checked === '' ? 'Blue' : ''">全部</span>
|
|
|
- <span @click="changeChecked(0)" :class="checked === 0 ? 'Blue' : ''">未完成修订</span> -->
|
|
|
<div class="undo_btn" @click="undo">
|
|
|
- <!-- <i class="iconfont icon-undo"></i>
|
|
|
- <i>撤回</i> -->
|
|
|
<el-button plain>撤回</el-button>
|
|
|
</div>
|
|
|
<div class="undo_btn" @click="refresh">
|
|
|
- <!-- <i class="iconfont icon-shuaxin"></i>
|
|
|
- <i>刷新</i> -->
|
|
|
<el-button plain>刷新</el-button>
|
|
|
</div>
|
|
|
<div class="undo_btn" @click="download">
|
|
|
- <!-- <i class="iconfont icon-xiazai"></i>
|
|
|
- <i>下载</i> -->
|
|
|
<el-button plain>下载</el-button>
|
|
|
</div>
|
|
|
<p class="build_msg" v-show="buildMsgShow" :class="buildMsg ? 'blink' : ''">
|
|
@@ -132,13 +94,14 @@
|
|
|
<div class="build_table">
|
|
|
<el-tabs type="card" v-model="tabAvtive" @tab-click="createHotBtn">
|
|
|
<el-tab-pane v-for="(item,index) in facilityList" :key="index" :name="'table' + index"
|
|
|
- :label="item.Name + '(' + item.Total + ')'">
|
|
|
- <div style="padding: .2rem;width:100%;" v-loading="loading">
|
|
|
+ :label="item.familyName + '(' + item.count + ')'">
|
|
|
+ <div style="padding: .2rem;width:100%;padding-bottom:35px;" v-loading="loading">
|
|
|
<div :id="'table' + index" v-loading="tableLoading"></div>
|
|
|
- <div class="data_page center" style="position: inherit">
|
|
|
+ <div class="data_page center">
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
- :current-page.sync="currentPage[tabChecked]" :page-sizes="pageSizeArrs"
|
|
|
- :page-size="pageSizeArr[tabChecked]" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :current-page.sync="currentPage[tabChecked]"
|
|
|
+ :page-sizes="pageSizeArrs" :page-size="pageSizeArr[tabChecked]"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="pageCount[tabChecked]"></el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -212,10 +175,10 @@
|
|
|
:src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
|
|
|
:title="item.Name" :alt="item.Name">
|
|
|
<!-- <i
|
|
|
- @click="delPic($index)"
|
|
|
- class="iconfont icon-guanbi"
|
|
|
- style="z-index:99;background:#fff;position:absolute;right:10px;top:10px;"
|
|
|
- ></i>-->
|
|
|
+ @click="delPic($index)"
|
|
|
+ class="iconfont icon-guanbi"
|
|
|
+ style="z-index:99;background:#fff;position:absolute;right:10px;top:10px;"
|
|
|
+ ></i>-->
|
|
|
<i class="iconfont icon-shuaxin icon" @click.stop="changeImgUrl('Pic',$index)"></i>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -235,8 +198,8 @@
|
|
|
<i class="iconfont icon-guanbi"></i>
|
|
|
</div>
|
|
|
<iframe id="google_ads_frame2" name="google_ads_frame2" frameborder="0" :src="iframeSrc" marginwidth="0"
|
|
|
- marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"
|
|
|
- allowfullscreen="true"></iframe>
|
|
|
+ marginheight="0" vspace="0"
|
|
|
+ hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true"></iframe>
|
|
|
</div>
|
|
|
<!-- 编辑点位标签弹窗 -->
|
|
|
<el-dialog title="点位标签编辑" class="modification" :visible.sync="dialogTableVisible" @close="closeDialog">
|
|
@@ -253,12 +216,14 @@
|
|
|
<p :title="floorName">现场位置:{{ floorName ? floorName : '暂无' }}</p>
|
|
|
<div class="input_view">
|
|
|
<input type="text" v-model="pointList.PointName" @focus="nameShow = true" @blur="nameNotShow"
|
|
|
- @keyup.enter="savePointChange" placeholder="点位标签的名称">
|
|
|
+ @keyup.enter="savePointChange"
|
|
|
+ placeholder="点位标签的名称">
|
|
|
<i class="iconfont icon-check" v-show="nameShow" @click="savePointChange"></i>
|
|
|
</div>
|
|
|
<div class="input_view">
|
|
|
<input type="text" v-model="pointList.PointLocalId" @focus="noShow = true" @blur="noNotShow"
|
|
|
- @keyup.enter="savePointChange" placeholder="点位标签的本地编码">
|
|
|
+ @keyup.enter="savePointChange"
|
|
|
+ placeholder="点位标签的本地编码">
|
|
|
<i class="iconfont icon-check" v-show="noShow" @click="savePointChange"></i>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -365,9 +330,9 @@
|
|
|
<el-dialog title="提示" :visible.sync="deldialog">
|
|
|
<span>你确定删除该资产吗?</span>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="refresh">取 消</el-button>
|
|
|
- <el-button type="primary" @click="delTrue">确 定</el-button>
|
|
|
- </span>
|
|
|
+ <el-button @click="refresh">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="delTrue">确 定</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
<drag v-show="dragShow" @closeDrag="dragShow = false" :iframeSrc="dragSrc"></drag>
|
|
|
</div>
|
|
@@ -383,7 +348,7 @@ import buildTime from "@/components/data_admin/selectTime";
|
|
|
import drag from "@/components/data_admin/drag";
|
|
|
import Swiper from "swiper";
|
|
|
import tools from "@/utils/scan/tools"
|
|
|
-import recommend from "@/components/data_admin/buildData/recommend";
|
|
|
+import recommend from "@/components/data_admin/buildData/recommend-2";
|
|
|
import showTools from "@/utils/handsontable/notShow"
|
|
|
import text from "@/utils/handsontable/mainText"
|
|
|
// import DragResize from '@/assets/js/resize'
|
|
@@ -396,8 +361,6 @@ import 'handsontable-pro/dist/handsontable.full.css'
|
|
|
import zhCN from 'handsontable-pro/languages/zh-CN';
|
|
|
//接口
|
|
|
import {
|
|
|
- getBuildSelect, //根据项目ID获得建筑列表
|
|
|
- getFloor, //根据建筑id获取楼层id
|
|
|
getPT, //根据时间、建筑名称、楼层查询点位标签
|
|
|
getPoint, //获取点位标签详情
|
|
|
updatePoint, //修改点位标签
|
|
@@ -406,22 +369,29 @@ import {
|
|
|
getTableMain, //获取表格主体内容
|
|
|
upDateTableMain, //提交修改设备资产
|
|
|
delErrAssets, //删除设备资产
|
|
|
- getAllFamily, //获取所有设备族
|
|
|
- defaultFloor, //获取默认楼层
|
|
|
getdelMain, //获取过滤掉后的表格主体
|
|
|
getBasicMatch, //获取完全匹配的厂商库id
|
|
|
// buildingQuery, //数据中心-建筑查询
|
|
|
// floorQuery, //数据中心-楼层查询
|
|
|
+ queryLocationPoint, //数据中心-点位标签查询
|
|
|
+ updateLocationPoint, //数据中心-更新点位标签
|
|
|
+ getEquipBelongs, //数据中心-获取设备族
|
|
|
+ queryProperty, //数据中心-资产查询
|
|
|
+ deleteProperty, //数据中心-删除资产
|
|
|
+ updateProperty, //数据中心-更新资产
|
|
|
+ // getDataDictionary, //数据中心-查询表头
|
|
|
+ queryPropertyTypeCount, //数据中心-资产分类及数量
|
|
|
+ queryPropertyPoint, //数据中心-位置标签及对应资产数量
|
|
|
} from "@/api/scan/request";
|
|
|
+import { getDataDictionary } from "@/api/dict";
|
|
|
import { buildingQuery } from '@/api/object/build';
|
|
|
-// todo buildingQuery
|
|
|
import { floorQuery } from '@/api/object/floor';
|
|
|
import { mapGetters, mapActions } from "vuex"
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- "build-time": buildTime,
|
|
|
- "drag": drag,
|
|
|
+ buildTime,
|
|
|
+ drag,
|
|
|
recommend
|
|
|
},
|
|
|
data() {
|
|
@@ -443,9 +413,7 @@ export default {
|
|
|
ajaxMsg: "", //请求错误提示
|
|
|
picShow: false, //最底层图片窗
|
|
|
pointList: "", //点位标签详情数组
|
|
|
- pointId: "", //点位标签详情查询需求的id
|
|
|
- // ProjId: this.$route.query.projId, //项目id
|
|
|
- // UserId: this.$route.query.userId, //用户id
|
|
|
+ pointId: "all", //点位标签详情查询需求的id
|
|
|
checkPointClass: "all", //点击点位标签的当前标签
|
|
|
pointCheck: "", //当前点击到的点位标签
|
|
|
checked: 0, //审核标志
|
|
@@ -477,7 +445,6 @@ export default {
|
|
|
rowArr: "", //鼠标单击表格时的位置
|
|
|
nameShow: false, //点位标签名的勾号是否显示
|
|
|
noShow: false, //点位标签no是否显示
|
|
|
- defaultFloorData: "", //默认楼层
|
|
|
imgList: [], //点位标签的图片数组
|
|
|
floorName: "", //被选中的楼层名
|
|
|
buildMsgShow: false, //提示显示与否
|
|
@@ -509,15 +476,22 @@ export default {
|
|
|
methods: {
|
|
|
//获取所有设备族
|
|
|
getAllFamily() {
|
|
|
- getAllFamily().then(result => {
|
|
|
- if (result.data.Result == "success") {
|
|
|
- this.AllFamily = this.changeArr(result.data.Content);
|
|
|
- } else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
- this.$message.error("请求出错")
|
|
|
+ let pa = {
|
|
|
+ data: {
|
|
|
+ orders: 'family asc',
|
|
|
+ distinct: true,
|
|
|
+ pageSize: 500,
|
|
|
+ projection: ["family", "familyName"]
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
+ getEquipBelongs(pa, res => {
|
|
|
+ this.AllFamily = res.content.map(t => {
|
|
|
+ return {
|
|
|
+ Code: t.family,
|
|
|
+ Name: t.familyName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
//重新获取数据loadhot
|
|
|
loadData() {
|
|
@@ -554,9 +528,6 @@ export default {
|
|
|
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,
|
|
@@ -651,16 +622,11 @@ export default {
|
|
|
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时触发重新渲染表格高度
|
|
@@ -680,33 +646,20 @@ export default {
|
|
|
},
|
|
|
//获取建筑列表
|
|
|
getBuilding() {
|
|
|
- buildingQuery({
|
|
|
- pageNumber: 1,
|
|
|
- pageSize: 1000,
|
|
|
- orders: "localName asc",
|
|
|
- Projection: ["id", "localName"]
|
|
|
- }, res => {
|
|
|
+ buildingQuery({}, res => {
|
|
|
this.buildList = res.content;
|
|
|
});
|
|
|
},
|
|
|
//获取点位标签详情
|
|
|
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;
|
|
|
+ })
|
|
|
},
|
|
|
delImage(imageList) {
|
|
|
let list = {
|
|
@@ -761,75 +714,58 @@ export default {
|
|
|
}
|
|
|
return list;
|
|
|
},
|
|
|
+ //保存点位标签详情的修改
|
|
|
+ savePoint() {
|
|
|
+ let pa = {
|
|
|
+ Content: [this.pointList]
|
|
|
+ }
|
|
|
+ updateLocationPoint(pa, res => {
|
|
|
+ this.$message.success('更新成功')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取点位标签
|
|
|
+ getPT() {
|
|
|
+ let pa = {
|
|
|
+ buildingId: this.buildId,
|
|
|
+ endingTime: this.checkTimeArr[1],
|
|
|
+ startTime: this.checkTimeArr[0]
|
|
|
+ }
|
|
|
+ if (this.floorId == 'all') {
|
|
|
+ pa.floorId = `all`
|
|
|
+ } else if (this.floorId != 'noKnow') {
|
|
|
+ pa.floorId = this.floorId
|
|
|
+ }
|
|
|
+ queryPropertyPoint(pa, res => {
|
|
|
+ this.PTArr = res.Content;
|
|
|
+ this.labelShow = true;
|
|
|
+ this.createPTSwiper();
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取楼层列表
|
|
|
getFloorData() {
|
|
|
let param = {
|
|
|
filters: `buildingId='${this.buildId}'`,
|
|
|
- orders: 'id desc'
|
|
|
+ orders: 'floorSequenceId desc'
|
|
|
};
|
|
|
floorQuery(param, res => {
|
|
|
this.floorList = res.content
|
|
|
this.floorList.unshift({
|
|
|
name: "全部",
|
|
|
localName: "全部",
|
|
|
- floorId: "all"
|
|
|
+ id: "all"
|
|
|
}, {
|
|
|
name: "未明确楼层",
|
|
|
localName: "未明确楼层",
|
|
|
- floorId: "noKnow"
|
|
|
+ id: "noKnow"
|
|
|
})
|
|
|
});
|
|
|
},
|
|
|
- //保存点位标签详情的修改
|
|
|
- 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("保存失败");
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- //获取点位标签
|
|
|
- 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("请求出错")
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
//保存设备资产的更新
|
|
|
upDateTableMain(paramList) {
|
|
|
let param = {
|
|
|
ProjId: this.projectId,
|
|
|
UserId: this.userId
|
|
|
};
|
|
|
- console.log("data修改")
|
|
|
upDateTableMain(param, paramList).then(result => {
|
|
|
if (result.data.Result == "success") {
|
|
|
return;
|
|
@@ -841,44 +777,40 @@ export default {
|
|
|
},
|
|
|
//获取设备族列表
|
|
|
getTabFamily() {
|
|
|
- let param = {
|
|
|
- ProjId: this.projectId,
|
|
|
- UserId: this.userId,
|
|
|
- BeginTime: this.checkTimeArr[0],
|
|
|
- EndTime: this.checkTimeArr[1],
|
|
|
- PointId: this.pointId,
|
|
|
- FloorId: this.floorId,
|
|
|
- Checked: this.checked,
|
|
|
- BuildId: this.buildId
|
|
|
- };
|
|
|
- getTabFamily(param).then(result => {
|
|
|
- if (result.data.Result == "success") {
|
|
|
- //赋予页面arr的数组长度和默认数据
|
|
|
- this.myHotArr.length = this.myHotMainArr.length = this.myHotMainArr.length = this.pageCount.length = this.currentPageArr.length = this.pageSizeArr.length = this.currentPage.length =
|
|
|
- result.data.FamilyList.length;
|
|
|
- for (let i = 0; i < this.pageCount.length; i++) {
|
|
|
- this.pageCount[i] = 10;
|
|
|
- this.currentPageArr[i] = 1;
|
|
|
- this.pageSizeArr[i] = 10;
|
|
|
- this.currentPage[i] = 1;
|
|
|
- }
|
|
|
- if (this.facilityList.length == result.data.FamilyList.length) {
|
|
|
- this.facilityList = result.data.FamilyList;
|
|
|
- this.createHotBtn({
|
|
|
- index: this.tabAvtive.split("table")[1]
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.facilityList = result.data.FamilyList;
|
|
|
- this.createHotBtn({
|
|
|
- index: 0
|
|
|
- });
|
|
|
- }
|
|
|
+ let pa = {
|
|
|
+ buildingId: this.buildId,
|
|
|
+ checked: this.checked,
|
|
|
+ endingTime: this.checkTimeArr[1],
|
|
|
+ pointId: this.pointId,
|
|
|
+ startTime: this.checkTimeArr[0]
|
|
|
+ }
|
|
|
+ if (this.floorId == 'noKnow') {
|
|
|
+ pa.floorId = 'isNull'
|
|
|
+ } else if (this.floorId != 'all') {
|
|
|
+ pa.floorId = this.floorId
|
|
|
+ }
|
|
|
+ queryPropertyTypeCount(pa, res => {
|
|
|
+ console.log('=================');
|
|
|
+ console.log(res);
|
|
|
+ this.myHotArr.length = this.myHotMainArr.length = this.pageCount.length = this.currentPageArr.length = this.pageSizeArr.length = this.currentPage.length = res.content.length;
|
|
|
+ for (let i = 0; i < this.pageCount.length; i++) {
|
|
|
+ this.pageCount[i] = 10;
|
|
|
+ this.currentPageArr[i] = 1;
|
|
|
+ this.pageSizeArr[i] = 10;
|
|
|
+ this.currentPage[i] = 1;
|
|
|
+ }
|
|
|
+ if (this.facilityList.length == res.content.length) {
|
|
|
+ this.facilityList = res.content;
|
|
|
+ this.createHotBtn({
|
|
|
+ index: this.tabAvtive.split("table")[1]
|
|
|
+ });
|
|
|
} else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
- this.$message.error("请求出错")
|
|
|
+ this.facilityList = res.content;
|
|
|
+ this.createHotBtn({
|
|
|
+ index: 0
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
//点击刷新图片
|
|
|
refreshImg(index) {
|
|
@@ -945,54 +877,55 @@ export default {
|
|
|
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,
|
|
|
+ orders: 'sort asc',
|
|
|
+ pageSize: 500
|
|
|
+ }
|
|
|
+ getDataDictionary(pa, res => {
|
|
|
+ this.myHotHeaderArr[this.tabChecked] = res.content;
|
|
|
+ this.getTableMain();
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
//获取表格主体内容
|
|
|
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") {
|
|
|
- // let paramData = res.data.FmList.map(item => {
|
|
|
- // return {
|
|
|
- // id: item.FmId,
|
|
|
- // family: item.Family,
|
|
|
- // infos: item.Infos
|
|
|
- // }
|
|
|
- // })
|
|
|
- // let data = await this.getIdForVender({
|
|
|
- // "criterias":paramData
|
|
|
- // })
|
|
|
- // let updateData = data.map(item => {
|
|
|
- // return {
|
|
|
- // FmId: item.id,
|
|
|
- // Family: item.family,
|
|
|
- // Infos: item.infos
|
|
|
- // }
|
|
|
- // })
|
|
|
- this.updateBusiness(res.data.FmList)
|
|
|
+ let pa = {
|
|
|
+ pageNumber: this.currentPage[this.tabChecked],
|
|
|
+ pageSize: this.pageSizeArr[this.tabChecked],
|
|
|
+ filters: `createTime>='${this.checkTimeArr[0]}';createTime<='${this.checkTimeArr[1]}';buildingId='${this.buildId}';family='${this.code}'`
|
|
|
+ }
|
|
|
+ //;codeType in [ -1,-2,-3,0,2]
|
|
|
+ // 添加建筑条件
|
|
|
+ if (this.floorId == 'noKnow') {
|
|
|
+ pa.filters += `;floorId isNull`
|
|
|
+ } else if (this.floorId != 'all') {
|
|
|
+ pa.filters += `;floorId='${this.floorId}'`
|
|
|
+ }
|
|
|
+ // 添加完成修订条件
|
|
|
+ if (this.checked === 0) {
|
|
|
+ pa.filters += `;checked=false or checked isNull`
|
|
|
+ }
|
|
|
+ // 添加标签条件
|
|
|
+ if (!this.pointCheck) {
|
|
|
+ pa.filters += `;pointId isNull`
|
|
|
+ } else if (this.pointCheck != 'all') {
|
|
|
+ pa.filters += `;pointId='${this.pointCheck}'`
|
|
|
+ }
|
|
|
+ queryProperty(pa, res => {
|
|
|
+ let data = res.content
|
|
|
+ this.myHotMainArr[this.tabChecked] = data;
|
|
|
+ this.pageCount[this.tabChecked] = res.total;
|
|
|
+ let dom = this.myHotArr[this.tabChecked];
|
|
|
+ this.tableLoading = false;
|
|
|
+ this.deepArr = this.deepCopy(data);
|
|
|
+ if (!!this.myHotArr[this.tabChecked]) {
|
|
|
+ this.myHotArr[this.tabChecked].loadData(data)
|
|
|
+ this.myHotMainArr[this.tabChecked] = data
|
|
|
} else {
|
|
|
+ this.createHot(this.tabChecked, data, this.myHotHeaderArr[this.tabChecked]);
|
|
|
}
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
},
|
|
|
getTabsData2() {
|
|
@@ -1064,7 +997,7 @@ export default {
|
|
|
})
|
|
|
this.facilityList.map((item, index) => {
|
|
|
if (index == this.tabChecked) {
|
|
|
- fileName += '-' + item.Name + item.Total
|
|
|
+ fileName += '-' + item.familyName + item.count
|
|
|
}
|
|
|
})
|
|
|
this.myHotArr[this.tabChecked].getPlugin('exportFile').downloadFile("csv", {
|
|
@@ -1091,8 +1024,6 @@ export default {
|
|
|
this.getTabFamily();
|
|
|
return;
|
|
|
} else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
this.$message.error("请求出错")
|
|
|
}
|
|
|
});
|
|
@@ -1117,8 +1048,6 @@ export default {
|
|
|
this.getTabFamily();
|
|
|
return;
|
|
|
} else {
|
|
|
- // this.dialogVisible = true;
|
|
|
- // this.ajaxMsg = "请求出错";
|
|
|
this.$message.error("请求出错")
|
|
|
}
|
|
|
});
|
|
@@ -1132,7 +1061,7 @@ export default {
|
|
|
this.loading = true;
|
|
|
this.tabChecked = tab.index;
|
|
|
this.rowArr = "";
|
|
|
- this.code = this.facilityList.length ? this.facilityList[tab.index].Code : null;
|
|
|
+ this.code = this.facilityList.length ? this.facilityList[tab.index].family : null;
|
|
|
this.getTableHeader();
|
|
|
},
|
|
|
//创建点位标签swiper
|
|
@@ -1173,7 +1102,6 @@ export default {
|
|
|
},
|
|
|
//点击点位标签整个swiper事件
|
|
|
checkPoint(val, id, name) {
|
|
|
- // this.labelShow = false
|
|
|
name = name || "";
|
|
|
if (name == "") {
|
|
|
this.labelChecked = "请选择点位标签!";
|
|
@@ -1190,7 +1118,6 @@ export default {
|
|
|
}
|
|
|
this.pointCheck = id;
|
|
|
this.changeChecked(0);
|
|
|
- // let id = document.getElementById('table' + this.tabChecked)
|
|
|
},
|
|
|
getTable(pointId, index) {
|
|
|
this.pointId = pointId;
|
|
@@ -1202,20 +1129,11 @@ export default {
|
|
|
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();
|
|
|
//是否启用了排序
|
|
|
- let isSort = this.myHotArr[this.tabChecked]
|
|
|
- .getPlugin("columnSorting")
|
|
|
- .isSorted();
|
|
|
+ let isSort = this.myHotArr[this.tabChecked].getPlugin("columnSorting").isSorted();
|
|
|
if (trimmedArr.length && isSort) {
|
|
|
let sortArr = this.myHotArr[this.tabChecked].getPlugin("columnSorting")
|
|
|
.rowsMapper.__arrayMap;
|
|
@@ -1240,15 +1158,14 @@ export default {
|
|
|
getInfors(data, rowArr, falg = false) {
|
|
|
let val = this.myHotArr[this.tabChecked].getActiveEditor().prop;
|
|
|
this.$refs.recommend.randerData(data, val, this.myHotHeaderArr[this.tabChecked])
|
|
|
- let infos = data.Infos
|
|
|
- if (infos.Pic || infos.Nameplate) {
|
|
|
- if (!!infos.Nameplate) {
|
|
|
- this.tablePicArr.Pic = infos.Nameplate.concat(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) || [];
|
|
|
} else {
|
|
|
- this.tablePicArr.Pic = infos.Pic || [];
|
|
|
+ this.tablePicArr.Pic = data.LedgerParam.PhotoDoc.Pic || [];
|
|
|
}
|
|
|
} else {
|
|
|
- this.tablePicArr.Pic = infos.Pic || [];
|
|
|
+ this.tablePicArr.Pic = [];
|
|
|
}
|
|
|
if (this.tablePicArr.Pic && this.tablePicArr.Pic.length) {
|
|
|
this.dragSrc =
|
|
@@ -1275,7 +1192,7 @@ export default {
|
|
|
changeFloor() {
|
|
|
this.checkPointClass = -1;
|
|
|
for (let i = 0; i < this.floorList.length; i++) {
|
|
|
- if (this.floorId == this.floorList[i].floorId) {
|
|
|
+ if (this.floorId == this.floorList[i].id) {
|
|
|
this.floorName = this.floorList[i].localName;
|
|
|
}
|
|
|
}
|
|
@@ -1374,10 +1291,6 @@ export default {
|
|
|
//当表格中的内容被修改
|
|
|
tdChange(changeData, source) {
|
|
|
// 修改了的数据
|
|
|
- //过滤条件
|
|
|
- // if(changeData[0][1] == "Family"){
|
|
|
- // this.buildMsgShow = true
|
|
|
- // }
|
|
|
let filter = this.filtersArr[this.tabChecked];
|
|
|
if (changeData) {
|
|
|
let trimmedArr = this.trimmedRows();
|
|
@@ -1392,7 +1305,6 @@ export default {
|
|
|
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);
|
|
@@ -1400,44 +1312,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//修改请求
|
|
|
- async updateBusiness(data, change, obj) {
|
|
|
- console.log(data, change, obj, "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()
|
|
|
- }
|
|
|
+ updateBusiness(data, change, obj) {
|
|
|
+ let pa = {
|
|
|
+ Content: data
|
|
|
+ }
|
|
|
+ updateProperty(pa, res => {
|
|
|
+ this.getTabFamily();
|
|
|
})
|
|
|
},
|
|
|
//判断文案是否相同
|
|
@@ -1565,7 +1445,6 @@ export default {
|
|
|
let pointH = this.$refs["point"].offsetHeight;
|
|
|
let operateH = this.$refs["operate"].offsetHeight;
|
|
|
let picH = this.$refs["picview"].offsetHeight;
|
|
|
- console.log(winHeight, headerH, operateH, picH)
|
|
|
height = winHeight - headerH - 48 - operateH - picH - 32 - 32 - 32 - 155;
|
|
|
let headers = this.delHeader(headerArr)
|
|
|
let customBorders = data.map((item, index) => {
|
|
@@ -1603,7 +1482,6 @@ export default {
|
|
|
return undefined
|
|
|
}
|
|
|
}).filter(d => d)
|
|
|
- console.log(customBorders)
|
|
|
let options = {
|
|
|
data: data,
|
|
|
colHeaders: headers,
|
|
@@ -1617,7 +1495,7 @@ export default {
|
|
|
autoColumnSize: true,
|
|
|
fixedColumnsLeft: 5,
|
|
|
language: "zh-CN",
|
|
|
- contextMenu: this.onlyRead ? false : {
|
|
|
+ contextMenu: {
|
|
|
items: {
|
|
|
remove_row: {
|
|
|
name: "删除资产"
|
|
@@ -1645,10 +1523,6 @@ export default {
|
|
|
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(() => {
|
|
@@ -1747,19 +1621,17 @@ export default {
|
|
|
},
|
|
|
//处理头部header方法
|
|
|
delHeader(arr) {
|
|
|
- let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "X", "L", "L1", "L2", "M"]
|
|
|
- let data = showTools.changeHeader(arr, readArr, false, false, true, true, true)
|
|
|
+ let data = showTools.headerTextFilter(arr, 'property', false, 'Visible')
|
|
|
data.unshift("标记", "点位标签", "设备族");
|
|
|
- console.log(data)
|
|
|
return data;
|
|
|
},
|
|
|
//通过header生成columns
|
|
|
getType(arr) {
|
|
|
- let data = showTools.changeTypes(arr, false, false, true, true, true)
|
|
|
+ let data = showTools.headerTypeFilter(arr, 'property', false, 'Visible')
|
|
|
data.unshift({
|
|
|
type: "checkbox",
|
|
|
- checkedTemplate: 1,
|
|
|
- uncheckedTemplate: 0,
|
|
|
+ checkedTemplate: true,
|
|
|
+ uncheckedTemplate: false,
|
|
|
data: "Checked",
|
|
|
label: {
|
|
|
position: "after",
|
|
@@ -1777,21 +1649,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
data = data.filter(item => item)
|
|
|
- console.log(data)
|
|
|
return data;
|
|
|
},
|
|
|
- changeArr(arr) {
|
|
|
- if (arr.length) {
|
|
|
- return arr.map(item => {
|
|
|
- return {
|
|
|
- Code: item.code,
|
|
|
- Name: item.Name
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- return "";
|
|
|
- }
|
|
|
- },
|
|
|
//工具函数浅复制深拷贝,防止共用存储空间
|
|
|
deepCopy(obj) {
|
|
|
var out = [],
|
|
@@ -1851,7 +1710,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.center {
|
|
|
- text-align: center
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
|
|
|
.el-radio-button__inner {
|