fix:coding#560二、1性能检验改动

This commit is contained in:
shijing 2024-11-27 14:28:27 +08:00
parent 52aa3b167b
commit 208c0aee5c
2 changed files with 183 additions and 191 deletions

View File

@ -11,16 +11,31 @@
>
</div>
<div class="right-panel">
<el-select
v-model="query.testitem"
clearable
style="width: 150px"
@change="testitemChange"
>
<el-option
v-for="item in behaviors"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
<el-date-picker
v-model="query.test_date"
type="date"
value-format="YYYY-MM-DD"
style="width: 150px"
/>
<el-input
v-model="query.search"
placeholder="编号"
clearable
style="width: 200px"
style="width: 150px"
></el-input>
<el-button
type="primary"
@ -30,35 +45,6 @@
>
</div>
</el-header>
<el-main class="nopadding">
<!-- <el-radio-group v-model="radio1" class="ml-4">
<el-radio
v-for="item in behaviors"
:key="item.id"
:label="item.id"
size="large"
>
{{ item.name }}
</el-radio>
</el-radio-group> -->
<el-container>
<el-header style="padding: 13px 15px 7px">
<el-tabs
v-model="activeId"
class="demo-tabs"
@tab-click="handleClick"
type="card"
>
<el-tab-pane
v-for="item in behaviors"
v-bind:key="item.id"
:label="item.name"
:name="item.id"
>
</el-tab-pane>
</el-tabs>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:data="tableData"
@ -66,6 +52,7 @@
row-key="id"
stripe
:params="query"
:query="query"
>
<el-table-column type="index" width="50" />
<el-table-column
@ -208,14 +195,9 @@
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-main>
<save-dialog
v-if="visible"
ref="saveDialog"
:activeName="activeName"
:activeId="activeId"
@success="handleSuccess"
@closed="visible = false"
>
@ -287,7 +269,6 @@ export default {
},
],
},
activeId: "3442815297965547520",
activeName: "折射率",
visible: false,
isSaveing: false,
@ -311,11 +292,14 @@ export default {
that.apiObj = that.$API.qm.ptest.list;
});
},
handleClick(val) {
this.activeId = val.props.name;
this.activeName = val.props.label;
this.query.testitem = val.props.name;
this.$refs.table.refresh();
testitemChange(){
let that = this;
that.behaviors.forEach((item) => {
if(item.id==that.query.testitem){
that.activeName = item.name;
}
that.$refs.table.refresh();
})
},
add() {
this.visible = true;

View File

@ -7,7 +7,7 @@
@closed="$emit('closed')"
>
<el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px">
<el-main style="padding: 0">
<el-form
ref="dialogForm"
:model="form"
@ -22,7 +22,7 @@
placeholder="检验类型"
clearable
style="width: 100%"
disabled
@change="testitemChange"
>
<el-option
v-for="item in behaviors"
@ -279,7 +279,6 @@ export default {
emits: ["success", "closed"],
props: {
activeId: { type: String, default: "" },
activeName: { type: String, default: "" },
},
data() {
return {
@ -349,6 +348,7 @@ export default {
belong_dept_options: [],
group: [],
behaviors: [],
activeName:'折射率'
};
},
mounted() {
@ -399,6 +399,14 @@ export default {
that.processOptions = res;
});
},
testitemChange(){
let that = this;
that.behaviors.forEach((item) => {
if(item.id==that.form.testitem){
that.activeName = item.name;
}
})
},
handleClick() {},
//
submit() {