fix:成品检验切换类型时,清空原有数据

This commit is contained in:
shijing 2024-09-19 16:48:20 +08:00
parent ab9b9bc18f
commit c92cbbdcec
2 changed files with 13 additions and 5 deletions

View File

@ -3,8 +3,10 @@
<el-header> <el-header>
<div class="right-panel"> <div class="right-panel">
<!-- 检验类型 --> <!-- 检验类型 -->
<el-select v-model="query.process_name" <el-select
placeholder="检验类型"> v-model="query.process_name"
placeholder="检验类型"
@change="processChange">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
@ -161,12 +163,15 @@ export default {
let that = this; let that = this;
let obj = {}; let obj = {};
obj.query = that.query; obj.query = that.query;
that.tableData = [];
that.$API.bi.dataset.exec.req('ftestDay', obj).then((res) => { that.$API.bi.dataset.exec.req('ftestDay', obj).then((res) => {
that.tableData = res.data2.ds0; that.tableData = res.data2.ds0;
console.log(that.tableData); console.log(that.tableData);
}); });
}, },
processChange(){
this.handleQuery();
},
handleQuery() { handleQuery() {
if(this.query.start_date){ if(this.query.start_date){
this.query.end_date = this.query.start_date; this.query.end_date = this.query.start_date;

View File

@ -572,12 +572,15 @@ export default {
top: "3", top: "3",
right: "3%", right: "3%",
}, },
color: ["rgb(64,158,255)", "orange"], color: ["rgb(64,158,255)", "rgb(255,165,0)"],
series: { series: {
name: "任务进度", name: "任务进度",
type: "pie", type: "pie",
radius: ["40%", "70%"], radius: ["40%", "70%"],
center: ["50%", "60%"], center: ["50%", "55%"],
itemStyle: {
borderRadius: 5
},
label: { label: {
show: true, show: true,
position: "outside", position: "outside",