Commit 6107e6d9 by wuwx

修复第一轮bug

1 parent fa8d3994
......@@ -308,8 +308,8 @@ export default {
// 离线率
let n = [];
n.push({ value: this.accSub(100, obj.offlineRate), name: "" });
n.push({ value: obj.offlineRate, name: "" });
n.push({ value: this.accSub(100, obj.offlineRate), name: "" });
if (this.hasPermission('data_doard_offLine')) {
n = []
......@@ -317,7 +317,7 @@ export default {
n.push({ value: this.accSub(obj.offlineRate, obj.fakeOfflineRate), name: "" });
n.push({ value: this.addSub(b, obj.fakeOfflineRate), name: "" });
}
this.createBindChart("offlineChart", n);
this.createChart("offlineChart", n);
// 假性离线率
let x = []
......@@ -430,12 +430,43 @@ export default {
show: false,
},
data: data,
// minAngle: 20
minAngle: 11
},
],
});
},
createChart(id, data) {
var aChart = echarts.init(document.getElementById(id));
aChart.setOption({
tooltip: {
show: true,
formatter: "{c0}%",
},
legendHoverLink: false,
color: [
"#F6B06F",
"#c0c0c0",
"#fac858",
"#ee6666",
"#73c0de",
"#3ba272",
"#fc8452",
"#9a60b4",
"#ea7ccc",
],
series: [
{
type: "pie",
radius: ["40%", "70%"],
labelLine: {
show: false,
},
data: data,
minAngle: 11
},
],
});
},
// 页面跳转
linkToPage(path, start, end) {
let row = { alarmStatus: 1 };
......
......@@ -5,7 +5,7 @@
<select-info ref="selectInfoCom" :id="id" :key="id"></select-info>
</el-tab-pane>
<el-tab-pane label="导入数据" name="2">
<import-vehicle ref="importVehicleCom" :id="id" :key="id"></import-vehicle>
<import-vehicle ref="importVehicleCom" :id="id" :key="id" @monitorFlag="monitorFlag" @monitorChangeFlag="monitorChangeFlag"></import-vehicle>
</el-tab-pane>
<el-tab-pane label="按组织授权" name="3">
<authorization-info ref="authorizationInfoCom" :id="id" :key="id"></authorization-info>
......@@ -35,7 +35,8 @@ export default {
activeTabs: "1",
userId: "",
randomKey: "",
monitorFlags: false
monitorFlags: false,
showBtnFlag: true
};
},
watch: {
......@@ -63,8 +64,20 @@ export default {
return false;
}
this.$refs.importVehicleCom.saveInfo();
this.monitorFlags = this.$refs.importVehicleCom.monitorFlag;
},
monitorFlag(val) {
this.monitorFlags = val
},
monitorChangeFlag(val) {
if (val && !this.monitorFlags) {
this.showBtnFlag = true
}
if (this.monitorFlags) {
this.showBtnFlag = false
this.monitorFlags = !this.monitorFlags
}
this.$emit('showBtnFlags', this.showBtnFlag)
}
},
};
</script>
......
......@@ -66,8 +66,7 @@ export default {
uploadParams: {},
uploadResult: {},
acceptFile: ".xlsx,.xls",
fileList: [],
monitorFlag: false
fileList: []
};
},
mounted() {
......@@ -87,6 +86,7 @@ export default {
this.uploadFile = file;
this.fileList = [file];
}
this.$emit('monitorChangeFlag', true)
},
// 下载失败文件
......@@ -98,7 +98,6 @@ export default {
// 文件上传前
beforeUpload() {
this.uploadResult = {};
this.monitorFlag = false;
},
// 文件上传失败
......@@ -109,7 +108,7 @@ export default {
// 监听文件上传成功
onSuccess(response, file, fileList) {
console.log(response);
this.monitorFlag = true;
this.$emit('monitorFlag', true)
let _this = this;
broadcast("cancel-loading");
_this.$refs.uploadBox.clearFiles();
......
......@@ -59,11 +59,11 @@
<!-- 指定数据弹框 开始 -->
<glsx-dialog :show="showDialog" title="指定数据" @close="closeDialog()" width="900px">
<div>
<assign-info ref="assignInfo" v-if="showDialog" :id="currentUserId"></assign-info>
<assign-info ref="assignInfo" v-if="showDialog" :id="currentUserId" @showBtnFlags="showBtnFlags"></assign-info>
</div>
<template slot="footer">
<el-button type="default" size="small" @click="closeDialog">取消</el-button>
<el-button type="primary" size="small" :loading="loading" @click="saveInfo">确定</el-button>
<el-button type="primary" size="small" :loading="loading" @click="saveInfo" v-show="showFlags">确定</el-button>
</template>
</glsx-dialog>
<!-- 指定数据弹框 end -->
......@@ -314,6 +314,7 @@ export default {
showDialog: false,
loading: false,
currentUserId: "",
showFlags: true
};
},
watch: {
......@@ -336,6 +337,9 @@ export default {
this.init();
},
methods: {
showBtnFlags(val) {
this.showFlags = val
},
init() {
this.getTreeOrg();
// this.getRoleList();
......@@ -731,15 +735,13 @@ export default {
// 关闭弹框
closeDialog() {
this.showDialog = false;
this.showFlags = true;
},
// 保存数据
saveInfo() {
this.loading = true;
this.$refs.assignInfo.saveInfo();
if(this.$refs.assignInfo.monitorFlags) {
this.loading = false;
}
},
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!