Commit c060897d authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 76591d9e 76621a8f
...@@ -758,7 +758,10 @@ export default { ...@@ -758,7 +758,10 @@ export default {
handleBack() { handleBack() {
let path = sessionStorage.getItem("sitestat"); let path = sessionStorage.getItem("sitestat");
if (path) { if (path) {
this.$router.push(path); this.$router.push({
path,
query: this.info,
});
} else { } else {
this.$router.back(); this.$router.back();
} }
......
...@@ -139,22 +139,24 @@ ...@@ -139,22 +139,24 @@
<el-divider></el-divider> <el-divider></el-divider>
<el-row <el-row
v-for="(label, value, index) in tableData.dict.productId" v-for="(v, index) in tableData.data"
:key="index" :key="index"
type="flex" type="flex"
style="border-bottom: 1px solid #e8eaec; padding: 10px" style="border-bottom: 1px solid #e8eaec; padding: 10px"
justify="space-between" justify="space-between"
> >
<!-- <img src="../../assets/images/排队机.png" alt="" /> -->
<img <img
v-if="label" v-if="formatDevIcon(v.productId)"
:src="require(`../../assets/images/${label}.png`)" :src="require(`@/assets/images/${formatDevIcon(v.productId)}.png`)"
/> />
<img v-else src="@/assets/images/dn.png" />
<!-- <i style="font-size: 20px" class="el-icon-location-information"></i> --> <!-- <i style="font-size: 20px" class="el-icon-location-information"></i> -->
<span style="font-size: 12px">{{ label }}</span> <span style="font-size: 12px">{{
formatDevIcon(v.productId) || "--"
}}</span>
<el-switch <el-switch
v-model="items[index]" v-model="items[index]"
:active-value="value" :active-value="String(v.productId)"
:inactive-value="0" :inactive-value="0"
@change="switchChange" @change="switchChange"
active-color="#2882ED" active-color="#2882ED"
...@@ -251,15 +253,14 @@ export default { ...@@ -251,15 +253,14 @@ export default {
if (arr.length > 0) { if (arr.length > 0) {
this.query = Object.assign({}, this.query, { productIdList: arr }); this.query = Object.assign({}, this.query, { productIdList: arr });
} }
this.getData(); this.getData();
}, },
afterRender(data) { afterRender(data) {
if (!this.sync) { if (!this.sync) {
this.$nextTick(() => { this.$nextTick(() => {
var count = 0; let count = 0;
for (var i in data.dict.productId) { for (let i of data.data) {
this.items[count] = i + ""; this.items[count] = i.productId + "";
count++; count++;
} }
this.sync = true; this.sync = true;
...@@ -287,6 +288,12 @@ export default { ...@@ -287,6 +288,12 @@ export default {
toView(row) { toView(row) {
this.$refs.drawerViewform.view(row); this.$refs.drawerViewform.view(row);
}, },
// 格式设备图标
formatDevIcon(product) {
let { productId } = this.tableData.dict;
let label = productId[product];
return label || "";
},
}, },
data() { data() {
return { return {
...@@ -314,21 +321,7 @@ export default { ...@@ -314,21 +321,7 @@ export default {
deviceStatus: null, deviceStatus: null,
deviceName: null, deviceName: null,
items: { items: {},
item0: "",
item1: "",
item2: "",
item3: "",
item4: "",
item5: "",
item6: "",
item7: "",
item8: "",
item9: "",
item10: "",
item11: "",
item12: "",
},
info: {}, info: {},
options: [ options: [
......
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
this.$router.push({ this.$router.push({
path: "/sitestat/mapDetail", path: "/sitestat/mapDetail",
// query: info, // query: info,
query: { sitestatId: info.id, siteId: info.siteId || info.id }, query: { sitestatId: info.siteStatId, siteId: info.siteId || info.id },
}); });
}, },
...@@ -317,7 +317,7 @@ export default { ...@@ -317,7 +317,7 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
.ckxq { .ckxq {
font-size: 10px; font-size: 12px;
margin-right: 20px; margin-right: 20px;
margin-top: 8px; margin-top: 8px;
color: #1890ff; color: #1890ff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment