|
@@ -104,16 +104,16 @@ import systemType from "@/components/dialogs/list/systemType"
|
|
|
import myPagination from "@/components/ledger/lib/myPagination";
|
|
|
import detailsDialog from "@/components/ledger/lib/detailsDia"
|
|
|
import changeRea from "@/components/dialogs/changeRea"
|
|
|
+import { mapGetters, mapActions } from "vuex";
|
|
|
//图片查看
|
|
|
import lookPic from "@/components/ledger/lib/lookImages"
|
|
|
-//下拉插件
|
|
|
-import "@/assets/js/chosen.jquery.min";
|
|
|
-import "@/assets/js/handsontable-chosen-editor";
|
|
|
-import { mapGetters, mapActions } from "vuex";
|
|
|
-
|
|
|
import Handsontable from "handsontable-pro"
|
|
|
import 'handsontable-pro/dist/handsontable.full.css'
|
|
|
import zhCN from 'handsontable-pro/languages/zh-CN';
|
|
|
+//下拉插件
|
|
|
+// import "@/assets/js/chosen.jquery.min";
|
|
|
+// import "@/assets/js/handsontable-chosen-editor";
|
|
|
+
|
|
|
export default {
|
|
|
props: ["myParam"],
|
|
|
components: {
|
|
@@ -134,6 +134,15 @@ export default {
|
|
|
lookPic,
|
|
|
myCascader
|
|
|
},
|
|
|
+ created() { },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters("layout", ["projectId", "secret", "userId"]),
|
|
|
+ showTypes() {
|
|
|
+ return this.onlyRead ?
|
|
|
+ [{ value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }] :
|
|
|
+ [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }]
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
options: [{
|
|
@@ -189,15 +198,6 @@ export default {
|
|
|
addData: {}, //添加设备选择的设备类型
|
|
|
};
|
|
|
},
|
|
|
- created() { },
|
|
|
- computed: {
|
|
|
- ...mapGetters("layout", ["projectId", "secret", "userId"]),
|
|
|
- showTypes() {
|
|
|
- return this.onlyRead ?
|
|
|
- [{ value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }] :
|
|
|
- [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }]
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
//获取表头
|
|
|
getHeaderData(code) {
|
|
@@ -221,7 +221,6 @@ export default {
|
|
|
},
|
|
|
//获取主体数据
|
|
|
getTableData() {
|
|
|
- let _this = this
|
|
|
this.loading = true
|
|
|
//type存在发送请求
|
|
|
if (!!this.mess.deviceId) {
|
|
@@ -244,18 +243,18 @@ export default {
|
|
|
}
|
|
|
getEquipTableCon(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.tableData = res.Content;
|
|
|
+ this.copyMain = tools.deepCopy(this.tableData);
|
|
|
+ this.page.total = res.Total;
|
|
|
+ if (this.hot) {
|
|
|
+ this.hot.destroy();
|
|
|
+ this.hot = null;
|
|
|
}
|
|
|
- if (res.Content && res.Content.length) {
|
|
|
+ if (this.tableData && this.tableData.length) {
|
|
|
if (this.onlyRead) {
|
|
|
- this.getBatch(res.Content)
|
|
|
+ this.getBatch(this.tableData)
|
|
|
}
|
|
|
- _this.initTable();
|
|
|
+ this.initTable();
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -458,7 +457,8 @@ export default {
|
|
|
afterChange: this.handleUpdataTable, //修改后
|
|
|
afterFilter: this.trimmedRows, //排序前
|
|
|
afterRemoveRow: this.handleDeleteTableRow, //右键删除
|
|
|
- afterOnCellMouseDown: this.eventClick //鼠标点击
|
|
|
+ afterOnCellMouseDown: this.eventClick, //鼠标点击
|
|
|
+ // beforeColumnSort: this.sort
|
|
|
});
|
|
|
let pro = document.getElementById("hot-display-license-info");
|
|
|
if (!!pro) {
|
|
@@ -466,6 +466,17 @@ export default {
|
|
|
}
|
|
|
this.isLoading = false;
|
|
|
},
|
|
|
+ // sort(currentSortConfig, destinationSortConfigs){
|
|
|
+ // const columnSortPlugin = this.hot.getPlugin('columnSorting');
|
|
|
+ // debugger
|
|
|
+ // columnSortPlugin.setSortConfig(destinationSortConfigs);
|
|
|
+ // debugger
|
|
|
+ // // const newData = ... // Calculated data set, ie. from an AJAX call.
|
|
|
+
|
|
|
+ // // this.loadData(newData);
|
|
|
+
|
|
|
+ // return false; // The blockade for the default sort action.
|
|
|
+ // },
|
|
|
//表格中的点击
|
|
|
eventClick(el, rowArr) {
|
|
|
//点击的是表头
|