fix: 性能检验列表展示用户名
This commit is contained in:
parent
5c5a0bafc0
commit
0a12e323f9
|
@ -5,16 +5,8 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'ptest.create'">新增</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.test_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
<el-date-picker v-model="query.test_date" type="date" value-format="YYYY-MM-DD" />
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
|
@ -36,51 +28,44 @@
|
|||
</el-tabs>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<scTable ref="table" :data="tableData" :apiObj="apiObj" row-key="id" stripe :params="query">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="实验日期" prop="test_date" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="样品编号" prop="sample_number">
|
||||
</el-table-column>
|
||||
<el-table-column label="样品厚度/mm" prop="val_hd" v-if="activeName=='透过率'">
|
||||
<el-table-column label="样品厚度/mm" prop="val_hd" v-if="activeName == '透过率'">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格" prop="specification" v-if="activeName=='中温粘度'||activeName=='膨胀'">
|
||||
<el-table-column label="型号规格" prop="specification" v-if="activeName == '中温粘度' || activeName == '膨胀'">
|
||||
</el-table-column>
|
||||
<el-table-column label="样品数量" prop="sample_count" v-if="activeName=='析晶'">
|
||||
<el-table-column label="样品数量" prop="sample_count" v-if="activeName == '析晶'">
|
||||
</el-table-column>
|
||||
<el-table-column label="样品密度" prop="sample_density" v-if="activeName=='高温粘度'">
|
||||
<el-table-column label="样品密度" prop="sample_density" v-if="activeName == '高温粘度'">
|
||||
</el-table-column>
|
||||
<el-table-column label="检验员" prop="test_user" show-overflow-tooltip>
|
||||
<el-table-column label="检验员" prop="test_user_name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="实验温度及保温时间" prop="sample_number" v-if="activeName=='析晶'">
|
||||
<el-table-column label="实验温度及保温时间" prop="sample_number" v-if="activeName == '析晶'">
|
||||
</el-table-column>
|
||||
<el-table-column label="升至最高温度/℃" prop="val_zgwd" v-if="activeName=='高温粘度'">
|
||||
<el-table-column label="升至最高温度/℃" prop="val_zgwd" v-if="activeName == '高温粘度'">
|
||||
</el-table-column>
|
||||
<el-table-column label="仪器状态" prop="factory" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag>{{ state_[scope.row.equip_state] }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折射率(589nm)" prop="val_zsl" v-if="activeName=='折射率'">
|
||||
<el-table-column label="折射率(589nm)" prop="val_zsl" v-if="activeName == '折射率'">
|
||||
</el-table-column>
|
||||
<el-table-column label="透过率(550nm)" prop="val_tgl" v-if="activeName=='透过率'">
|
||||
<el-table-column label="透过率(550nm)" prop="val_tgl" v-if="activeName == '透过率'">
|
||||
</el-table-column>
|
||||
<el-table-column label="Ts/℃" prop="val_ts" v-if="activeName=='中温粘度'">
|
||||
<el-table-column label="Ts/℃" prop="val_ts" v-if="activeName == '中温粘度'">
|
||||
</el-table-column>
|
||||
<el-table-column label="30-300℃膨胀系数" prop="val_pzxs" v-if="activeName=='膨胀'">
|
||||
<el-table-column label="30-300℃膨胀系数" prop="val_pzxs" v-if="activeName == '膨胀'">
|
||||
</el-table-column>
|
||||
<el-table-column label="Tg/℃" prop="val_tg" v-if="activeName=='膨胀'">
|
||||
<el-table-column label="Tg/℃" prop="val_tg" v-if="activeName == '膨胀'">
|
||||
</el-table-column>
|
||||
<el-table-column label="Tf/℃" prop="val_tf" v-if="activeName=='膨胀'">
|
||||
<el-table-column label="Tf/℃" prop="val_tf" v-if="activeName == '膨胀'">
|
||||
</el-table-column>
|
||||
<el-table-column label="析晶" prop="val_xj" v-if="activeName=='析晶'">
|
||||
<el-table-column label="析晶" prop="val_xj" v-if="activeName == '析晶'">
|
||||
<template #default="scope">
|
||||
<el-tag>{{ state_xj[scope.row.val_xj] }}</el-tag>
|
||||
</template>
|
||||
|
@ -97,8 +82,8 @@
|
|||
</el-container>
|
||||
|
||||
</el-main>
|
||||
<save-dialog v-if="visible" ref="saveDialog" :activeName="activeName" :activeId="activeId"
|
||||
@success="handleSuccess" @closed="visible = false">
|
||||
<save-dialog v-if="visible" ref="saveDialog" :activeName="activeName" :activeId="activeId" @success="handleSuccess"
|
||||
@closed="visible = false">
|
||||
</save-dialog>
|
||||
<!-- <el-dialog
|
||||
title="上传"
|
||||
|
@ -135,92 +120,92 @@
|
|||
</template>
|
||||
<script>
|
||||
import saveDialog from './behavior_form.vue';
|
||||
export default {
|
||||
name: "rparty",
|
||||
components:{ saveDialog },
|
||||
data() {
|
||||
return {
|
||||
apiObj: null,
|
||||
query: {
|
||||
testitem:'',
|
||||
test_date:''
|
||||
},
|
||||
state_:{
|
||||
'R':'正常',
|
||||
'T':'异常'
|
||||
},
|
||||
state_xj:{
|
||||
'S':'析晶',
|
||||
'K':'不析晶',
|
||||
'θ':'未化'
|
||||
},
|
||||
form:{
|
||||
file:'',
|
||||
fileName:'',
|
||||
},
|
||||
rules: {
|
||||
file:[{required:true, message:'请上传上传文件', trigger: "blur"}]
|
||||
},
|
||||
activeId:'3442815297965547520',
|
||||
activeName:'折射率',
|
||||
visible:false,
|
||||
isSaveing:false,
|
||||
selection: [],
|
||||
behaviors:[],
|
||||
tableData:[],
|
||||
};
|
||||
export default {
|
||||
name: "rparty",
|
||||
components: { saveDialog },
|
||||
data() {
|
||||
return {
|
||||
apiObj: null,
|
||||
query: {
|
||||
testitem: '',
|
||||
test_date: ''
|
||||
},
|
||||
state_: {
|
||||
'R': '正常',
|
||||
'T': '异常'
|
||||
},
|
||||
state_xj: {
|
||||
'S': '析晶',
|
||||
'K': '不析晶',
|
||||
'θ': '未化'
|
||||
},
|
||||
form: {
|
||||
file: '',
|
||||
fileName: '',
|
||||
},
|
||||
rules: {
|
||||
file: [{ required: true, message: '请上传上传文件', trigger: "blur" }]
|
||||
},
|
||||
activeId: '3442815297965547520',
|
||||
activeName: '折射率',
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
selection: [],
|
||||
behaviors: [],
|
||||
tableData: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getTextItem();
|
||||
},
|
||||
methods: {
|
||||
//获取检验项目
|
||||
getTextItem() {
|
||||
let that = this;
|
||||
that.$API.qm.getTestItem.get({ tag: 'performance', page: 0 }).then(res => {
|
||||
that.behaviors = res;
|
||||
that.query.testitem = res[0].id;
|
||||
that.apiObj = that.$API.qm.ptest.list;
|
||||
})
|
||||
},
|
||||
mounted(){
|
||||
this.getTextItem();
|
||||
handleClick(val) {
|
||||
this.activeId = val.props.name;
|
||||
this.activeName = val.props.label;
|
||||
this.query.testitem = val.props.name;
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
methods: {
|
||||
//获取检验项目
|
||||
getTextItem(){
|
||||
let that = this;
|
||||
that.$API.qm.getTestItem.get({tag:'performance',page:0}).then(res=>{
|
||||
that.behaviors = res;
|
||||
that.query.testitem = res[0].id;
|
||||
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();
|
||||
},
|
||||
add(){
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
importInspect(){
|
||||
this.visible = true;
|
||||
},
|
||||
submitFile(){
|
||||
add() {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
importInspect() {
|
||||
this.visible = true;
|
||||
},
|
||||
submitFile() {
|
||||
|
||||
},
|
||||
closeVisible(){
|
||||
this.visible = false;
|
||||
},
|
||||
handleSuccess(){
|
||||
this.visible = false;
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
closeVisible() {
|
||||
this.visible = false;
|
||||
},
|
||||
handleSuccess() {
|
||||
this.visible = false;
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue