diff --git a/config/index.js b/config/index.js
index 0f99d4f..4ac2066 100644
--- a/config/index.js
+++ b/config/index.js
@@ -11,7 +11,7 @@
assetsPublicPath: "/",
proxyTable: {
"/warnApi": {
- /* target: "http://139.155.49.237:8286", //服务器接口 */
+ // target: "http://139.155.49.237:8286", //服务器接口 */
target: "http://192.168.30.199:7099", //服务器接口
changeOrigin: true, //是否跨域
pathRewrite: {
@@ -22,7 +22,7 @@
target: "http://192.168.30.199:7099", //陈迁接口
changeOrigin: true, //是否跨域
pathRewrite: {
- "^/nfQuery": "" //需要rewrite重写的,
+ "^/nfQuery": "" //需要rewrite重写的,git
}
},
"/Api": {
@@ -100,19 +100,19 @@
"^/serverManage": "" //需要rewrite重写的,
}
},
- '/dataLvWangapi': {
+ "/dataLvWangapi": {
// 测试环境
// 'target': 'http://192.168.30.44:8800', // 接口域名
- 'target': 'http://192.168.30.146:8865', // 熊凯
- 'changeOrigin': true, //是否跨域
- 'pathRewrite': {
- '^/dataLvWangapi': '' //需要rewrite重写的,
+ target: "http://192.168.30.146:8865", // 熊凯
+ changeOrigin: true, //是否跨域
+ pathRewrite: {
+ "^/dataLvWangapi": "" //需要rewrite重写的,
}
- }
+ }
},
// Various Dev Server settings
- host: "localhost", // can be overwritten by process.env.HOST
+ host: "192.168.30.113", // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/config/index.js b/config/index.js
index 0f99d4f..4ac2066 100644
--- a/config/index.js
+++ b/config/index.js
@@ -11,7 +11,7 @@
assetsPublicPath: "/",
proxyTable: {
"/warnApi": {
- /* target: "http://139.155.49.237:8286", //服务器接口 */
+ // target: "http://139.155.49.237:8286", //服务器接口 */
target: "http://192.168.30.199:7099", //服务器接口
changeOrigin: true, //是否跨域
pathRewrite: {
@@ -22,7 +22,7 @@
target: "http://192.168.30.199:7099", //陈迁接口
changeOrigin: true, //是否跨域
pathRewrite: {
- "^/nfQuery": "" //需要rewrite重写的,
+ "^/nfQuery": "" //需要rewrite重写的,git
}
},
"/Api": {
@@ -100,19 +100,19 @@
"^/serverManage": "" //需要rewrite重写的,
}
},
- '/dataLvWangapi': {
+ "/dataLvWangapi": {
// 测试环境
// 'target': 'http://192.168.30.44:8800', // 接口域名
- 'target': 'http://192.168.30.146:8865', // 熊凯
- 'changeOrigin': true, //是否跨域
- 'pathRewrite': {
- '^/dataLvWangapi': '' //需要rewrite重写的,
+ target: "http://192.168.30.146:8865", // 熊凯
+ changeOrigin: true, //是否跨域
+ pathRewrite: {
+ "^/dataLvWangapi": "" //需要rewrite重写的,
}
- }
+ }
},
// Various Dev Server settings
- host: "localhost", // can be overwritten by process.env.HOST
+ host: "192.168.30.113", // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/src/components/newFiber/NewFiberSearch.vue b/src/components/newFiber/NewFiberSearch.vue
index f6684b6..46439f9 100644
--- a/src/components/newFiber/NewFiberSearch.vue
+++ b/src/components/newFiber/NewFiberSearch.vue
@@ -215,6 +215,7 @@
:label="item.title"
:key="index"
show-overflow-tooltip
+ :render-header="labelHead"
>
@@ -239,12 +240,6 @@
class="ButtonImg"
@click="Search()"
/>
-
@@ -263,6 +258,7 @@
:label="col.title"
:key="index"
show-overflow-tooltip
+ :render-header="labelHead"
>
@@ -491,6 +487,16 @@
};
},
methods: {
+ labelHead(h, { column, index }) {
+ let l = column.label.length;
+ let f = 16; //每个字大小,其实是每个字的比例值,大概会比字体大小差不多大一点,
+ column.minWidth = f * l; //字大小乘个数即长度 ,注意不要加px像素,这里minWidth只是一个比例值,不是真正的长度 //然后将列标题放在一个div块中,注意块的宽度一定要100%,否则表格显示不完全
+
+ return h("div", { class: "table-head", style: { width: "100%" } }, [
+ column.label
+ ]);
+ },
+
// 加载页面分组信息
loadFZData(event) {
// console.log(event);
@@ -588,6 +594,7 @@
case "detail":
this.showCurrentSiteInfo = true;
this.currentSiteNo = data.stCode;
+ // console.log(this.currentSiteNo);
this.LoadGridTitleData();
break;
case "search":
@@ -616,27 +623,13 @@
// 时间改动了,需要调整其状态
this.DateisChange = true;
},
- // 根据站点编号查询站点的表头数据
- LoadGridTitleData() {
+
+ // 根据站点编号查询站点的实时数据
+ LoadSiteDataNow() {
this.HistoryTableData = [];
this.NFSNowDataTableData = [];
this.NFSNowDataTableHead = [];
- this.$http
- .get(this.nozzle.siteGetHeads + `?siteNo=${this.currentSiteNo}`)
- .then(response => {
- // 加载表头
- this.NFSNowDataTableHead = response.data.data;
- // 加载实时数据
- this.LoadSiteDataNow();
- // 加载历史数据
- this.loadDataGridData();
- })
- .catch(response => {
- message(response);
- });
- },
- // 根据站点编号查询站点的实时数据
- LoadSiteDataNow() {
+
this.loading2 = true;
this.$http
.get(
@@ -646,9 +639,8 @@
)
.then(response => {
this.loading2 = false;
- this.NFSNowDataTableData = JSON.parse(
- JSON.stringify([response.data])
- );
+
+ var tablearr = JSON.parse(JSON.stringify([response.data]));
// 通过state显示图标
if (response.data.state == 1) {
// 异常
@@ -666,12 +658,49 @@
// 正常
this.SiteTypeUrl = "../../../static/img/NFLv.png";
}
+
+ for (var k in tablearr[0]) {
+ if (tablearr[0][k] == "NaN") {
+ delete tablearr[0][k];
+ }
+ }
+ this.NFSNowDataTableData = tablearr;
})
.catch(response => {
message(response);
this.loading2 = false;
});
},
+ // 根据站点编号查询站点的表头数据
+ LoadGridTitleData() {
+ // 加载实时数据//在表头前面加载
+ this.LoadSiteDataNow();
+ this.$http
+ .get(this.nozzle.siteGetHeads + `?siteNo=${this.currentSiteNo}`)
+ .then(response => {
+ // 加载表头
+ var headobj = response.data.data;
+ // console.log(headobj);
+ console.log(11111, this.NFSNowDataTableData);
+ // let arr = [];
+ this.NFSNowDataTableHead = headobj.filter((item, index, obj) => {
+ for (let k in this.NFSNowDataTableData[0]) {
+ if (item.field === k) {
+ return item;
+ }
+ }
+ });
+ // console.log(8888, arr);
+ console.log(22222222, this.NFSNowDataTableHead);
+
+ // 加载历史数据
+ this.loadDataGridData();
+ })
+ .catch(response => {
+ message(response);
+ });
+ },
+
//tabs的点击事件
HistoryHandleClick(tab, event) {
if (tab.index == 1) {
diff --git a/config/index.js b/config/index.js
index 0f99d4f..4ac2066 100644
--- a/config/index.js
+++ b/config/index.js
@@ -11,7 +11,7 @@
assetsPublicPath: "/",
proxyTable: {
"/warnApi": {
- /* target: "http://139.155.49.237:8286", //服务器接口 */
+ // target: "http://139.155.49.237:8286", //服务器接口 */
target: "http://192.168.30.199:7099", //服务器接口
changeOrigin: true, //是否跨域
pathRewrite: {
@@ -22,7 +22,7 @@
target: "http://192.168.30.199:7099", //陈迁接口
changeOrigin: true, //是否跨域
pathRewrite: {
- "^/nfQuery": "" //需要rewrite重写的,
+ "^/nfQuery": "" //需要rewrite重写的,git
}
},
"/Api": {
@@ -100,19 +100,19 @@
"^/serverManage": "" //需要rewrite重写的,
}
},
- '/dataLvWangapi': {
+ "/dataLvWangapi": {
// 测试环境
// 'target': 'http://192.168.30.44:8800', // 接口域名
- 'target': 'http://192.168.30.146:8865', // 熊凯
- 'changeOrigin': true, //是否跨域
- 'pathRewrite': {
- '^/dataLvWangapi': '' //需要rewrite重写的,
+ target: "http://192.168.30.146:8865", // 熊凯
+ changeOrigin: true, //是否跨域
+ pathRewrite: {
+ "^/dataLvWangapi": "" //需要rewrite重写的,
}
- }
+ }
},
// Various Dev Server settings
- host: "localhost", // can be overwritten by process.env.HOST
+ host: "192.168.30.113", // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/src/components/newFiber/NewFiberSearch.vue b/src/components/newFiber/NewFiberSearch.vue
index f6684b6..46439f9 100644
--- a/src/components/newFiber/NewFiberSearch.vue
+++ b/src/components/newFiber/NewFiberSearch.vue
@@ -215,6 +215,7 @@
:label="item.title"
:key="index"
show-overflow-tooltip
+ :render-header="labelHead"
>
@@ -239,12 +240,6 @@
class="ButtonImg"
@click="Search()"
/>
-
@@ -263,6 +258,7 @@
:label="col.title"
:key="index"
show-overflow-tooltip
+ :render-header="labelHead"
>
@@ -491,6 +487,16 @@
};
},
methods: {
+ labelHead(h, { column, index }) {
+ let l = column.label.length;
+ let f = 16; //每个字大小,其实是每个字的比例值,大概会比字体大小差不多大一点,
+ column.minWidth = f * l; //字大小乘个数即长度 ,注意不要加px像素,这里minWidth只是一个比例值,不是真正的长度 //然后将列标题放在一个div块中,注意块的宽度一定要100%,否则表格显示不完全
+
+ return h("div", { class: "table-head", style: { width: "100%" } }, [
+ column.label
+ ]);
+ },
+
// 加载页面分组信息
loadFZData(event) {
// console.log(event);
@@ -588,6 +594,7 @@
case "detail":
this.showCurrentSiteInfo = true;
this.currentSiteNo = data.stCode;
+ // console.log(this.currentSiteNo);
this.LoadGridTitleData();
break;
case "search":
@@ -616,27 +623,13 @@
// 时间改动了,需要调整其状态
this.DateisChange = true;
},
- // 根据站点编号查询站点的表头数据
- LoadGridTitleData() {
+
+ // 根据站点编号查询站点的实时数据
+ LoadSiteDataNow() {
this.HistoryTableData = [];
this.NFSNowDataTableData = [];
this.NFSNowDataTableHead = [];
- this.$http
- .get(this.nozzle.siteGetHeads + `?siteNo=${this.currentSiteNo}`)
- .then(response => {
- // 加载表头
- this.NFSNowDataTableHead = response.data.data;
- // 加载实时数据
- this.LoadSiteDataNow();
- // 加载历史数据
- this.loadDataGridData();
- })
- .catch(response => {
- message(response);
- });
- },
- // 根据站点编号查询站点的实时数据
- LoadSiteDataNow() {
+
this.loading2 = true;
this.$http
.get(
@@ -646,9 +639,8 @@
)
.then(response => {
this.loading2 = false;
- this.NFSNowDataTableData = JSON.parse(
- JSON.stringify([response.data])
- );
+
+ var tablearr = JSON.parse(JSON.stringify([response.data]));
// 通过state显示图标
if (response.data.state == 1) {
// 异常
@@ -666,12 +658,49 @@
// 正常
this.SiteTypeUrl = "../../../static/img/NFLv.png";
}
+
+ for (var k in tablearr[0]) {
+ if (tablearr[0][k] == "NaN") {
+ delete tablearr[0][k];
+ }
+ }
+ this.NFSNowDataTableData = tablearr;
})
.catch(response => {
message(response);
this.loading2 = false;
});
},
+ // 根据站点编号查询站点的表头数据
+ LoadGridTitleData() {
+ // 加载实时数据//在表头前面加载
+ this.LoadSiteDataNow();
+ this.$http
+ .get(this.nozzle.siteGetHeads + `?siteNo=${this.currentSiteNo}`)
+ .then(response => {
+ // 加载表头
+ var headobj = response.data.data;
+ // console.log(headobj);
+ console.log(11111, this.NFSNowDataTableData);
+ // let arr = [];
+ this.NFSNowDataTableHead = headobj.filter((item, index, obj) => {
+ for (let k in this.NFSNowDataTableData[0]) {
+ if (item.field === k) {
+ return item;
+ }
+ }
+ });
+ // console.log(8888, arr);
+ console.log(22222222, this.NFSNowDataTableHead);
+
+ // 加载历史数据
+ this.loadDataGridData();
+ })
+ .catch(response => {
+ message(response);
+ });
+ },
+
//tabs的点击事件
HistoryHandleClick(tab, event) {
if (tab.index == 1) {
diff --git a/src/components/site/previewOfSiteStatus.vue b/src/components/site/previewOfSiteStatus.vue
index 978102e..781fff7 100644
--- a/src/components/site/previewOfSiteStatus.vue
+++ b/src/components/site/previewOfSiteStatus.vue
@@ -3,16 +3,14 @@
-
-
-
-
+ src="./../../../static/img/fw_btn.png"
+ alt
+ class="fwStyle"
+ @click="fwClick"
+ />
+
+
+