|
@@ -49,7 +49,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getDataDictionary, queryProperty, updateProperty, upDateTableMain, delProperty, getEquipmentFamily } from "@/api/scan/request";
|
|
|
+import { getDataDictionary, queryProperty, updateProperty, deleteProperty, upDateTableMain, delProperty, getEquipmentFamily } from "@/api/scan/request";
|
|
|
|
|
|
import tools from "@/utils/scan/tools"
|
|
|
import handsonUtils from "@/utils/scan/hasontableUtils"
|
|
@@ -183,7 +183,6 @@ export default {
|
|
|
},
|
|
|
//获取主体数据
|
|
|
getTableData() {
|
|
|
- let _this = this
|
|
|
this.loading = true
|
|
|
//type存在发送请求
|
|
|
if (!!this.mess.deviceId) {
|
|
@@ -205,19 +204,19 @@ export default {
|
|
|
param.Filters += `;floorId='${this.mess.floorId}'`
|
|
|
}
|
|
|
queryProperty(param, res => {
|
|
|
- this.loading = false;
|
|
|
- _this.tableData = res.Content;
|
|
|
- _this.copyMain = tools.deepCopy(res.Content);
|
|
|
- _this.page.total = res.Total;
|
|
|
- if (_this.hot) {
|
|
|
- _this.hot.destroy();
|
|
|
- _this.hot = null;
|
|
|
+ this.loading = false
|
|
|
+ this.tableData = res.Content
|
|
|
+ this.copyMain = tools.deepCopy(res.Content)
|
|
|
+ this.page.total = res.Total
|
|
|
+ if (this.hot) {
|
|
|
+ this.hot.destroy()
|
|
|
+ this.hot = null
|
|
|
}
|
|
|
if (res.Content && res.Content.length) {
|
|
|
if (this.onlyRead) {
|
|
|
this.getBatch(res.Content)
|
|
|
}
|
|
|
- _this.initTable();
|
|
|
+ this.initTable();
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -325,14 +324,14 @@ export default {
|
|
|
//格式化表头
|
|
|
formatHeaderData(list) {
|
|
|
let arr = tools.copyArr(list)
|
|
|
- let data = showTools.headerTextFilter(arr, 'equipment', this.onlyRead, this.showType, true)
|
|
|
+ let data = showTools.headerTextFilter(arr, 'property', this.onlyRead, this.showType, true)
|
|
|
data.unshift("操作", "当前关联的设备")
|
|
|
return data
|
|
|
},
|
|
|
//格式化表内容
|
|
|
formatHeaderType(list) {
|
|
|
let arr = tools.copyArr(list)
|
|
|
- let data = showTools.headerTypeFilter(arr, 'equipment', this.onlyRead, this.showType, true)
|
|
|
+ let data = showTools.headerTypeFilter(arr, 'property', this.onlyRead, this.showType, true)
|
|
|
data.unshift(
|
|
|
{
|
|
|
data: "caozuo",
|
|
@@ -350,7 +349,7 @@ export default {
|
|
|
let winHeight = document.documentElement.clientHeight;
|
|
|
this.hot = new Handsontable(container, {
|
|
|
data: this.tableData,
|
|
|
- fixedColumnsLeft: 6,
|
|
|
+ fixedColumnsLeft: 4,
|
|
|
colHeaders: this.formatHeaderData(this.tableHeader), //表头文案
|
|
|
columns: this.formatHeaderType(this.tableHeader), //数据显示格式
|
|
|
filters: true,
|
|
@@ -462,7 +461,7 @@ export default {
|
|
|
},
|
|
|
// 删除资产
|
|
|
async removeDevice(param) {
|
|
|
- await deleteEquip(param, res => {
|
|
|
+ await deleteProperty(param, res => {
|
|
|
this.$message.success("删除成功")
|
|
|
this.$emit('close','')
|
|
|
this.getTableData()
|
|
@@ -775,7 +774,7 @@ export default {
|
|
|
<style lang="less">
|
|
|
.hanson-bar {
|
|
|
height: 40px;
|
|
|
- padding: 5px 10px;
|
|
|
+ padding: 5px 0;
|
|
|
font-size: 14px;
|
|
|
overflow: hidden;
|
|
|
margin-top: 0;
|
|
@@ -783,8 +782,8 @@ export default {
|
|
|
.iconfont {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
- // .el-button {
|
|
|
- // margin-right: 10px;
|
|
|
- // }
|
|
|
+}
|
|
|
+.cancelButtonClass {
|
|
|
+ width: 180px;
|
|
|
}
|
|
|
</style>
|