fix:性能检验加一个编号搜索
This commit is contained in:
parent
29de95414a
commit
142233e6c0
|
@ -2,11 +2,32 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'ptest.create'">新增</el-button>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="add"
|
||||||
|
v-auth="'ptest.create'"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-date-picker v-model="query.test_date" type="date" value-format="YYYY-MM-DD" />
|
<el-date-picker
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
v-model="query.test_date"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="编号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
@ -21,72 +42,183 @@
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group> -->
|
</el-radio-group> -->
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header style="padding:13px 15px 7px;">
|
<el-header style="padding: 13px 15px 7px">
|
||||||
<el-tabs v-model="activeId" class="demo-tabs" @tab-click="handleClick" type="card">
|
<el-tabs
|
||||||
<el-tab-pane v-for="item in behaviors" v-bind:key="item.id" :label="item.name" :name="item.id">
|
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-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :data="tableData" :apiObj="apiObj" row-key="id" stripe :params="query">
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:data="tableData"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:params="query"
|
||||||
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="实验日期" prop="test_date" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
label="实验日期"
|
||||||
|
prop="test_date"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="样品编号" prop="sample_number">
|
<el-table-column label="样品编号" prop="sample_number">
|
||||||
</el-table-column>
|
</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>
|
||||||
<el-table-column label="型号规格" prop="specification"
|
<el-table-column
|
||||||
v-if="activeName == '中温粘度' || activeName == '膨胀'">
|
label="型号规格"
|
||||||
|
prop="specification"
|
||||||
|
v-if="
|
||||||
|
activeName == '中温粘度' || activeName == '膨胀'
|
||||||
|
"
|
||||||
|
>
|
||||||
</el-table-column>
|
</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>
|
||||||
<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>
|
||||||
<el-table-column label="检验员" prop="test_user_name" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
label="检验员"
|
||||||
|
prop="test_user_name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
</el-table-column>
|
</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>
|
||||||
<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>
|
||||||
<el-table-column label="仪器状态" prop="factory" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
label="仪器状态"
|
||||||
|
prop="factory"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag>{{ state_[scope.row.equip_state] }}</el-tag>
|
<el-tag>{{
|
||||||
|
state_[scope.row.equip_state]
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<el-table-column label="析晶" prop="val_xj" v-if="activeName == '析晶'">
|
<el-table-column
|
||||||
|
label="析晶"
|
||||||
|
prop="val_xj"
|
||||||
|
v-if="activeName == '析晶'"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag>{{ state_xj[scope.row.val_xj] }}</el-tag>
|
<el-tag>{{
|
||||||
|
state_xj[scope.row.val_xj]
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="160">
|
<el-table-column label="操作" fixed="right" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link type="primary" @click="table_edit(scope.row)" v-auth="'ptest.update'">编辑</el-link>
|
<el-link
|
||||||
<el-divider direction="vertical" v-auth="'ptest.update'"></el-divider>
|
type="primary"
|
||||||
<el-link type="primary" @click="table_show(scope.row)">查看</el-link>
|
@click="table_edit(scope.row)"
|
||||||
<el-divider direction="vertical" v-auth="'ptest.delete'"></el-divider>
|
v-auth="'ptest.update'"
|
||||||
<el-link type="danger" @click="table_del(scope.row)" v-auth="'ptest.delete'">删除</el-link>
|
>编辑</el-link
|
||||||
|
>
|
||||||
|
<el-divider
|
||||||
|
direction="vertical"
|
||||||
|
v-auth="'ptest.update'"
|
||||||
|
></el-divider>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="table_show(scope.row)"
|
||||||
|
>查看</el-link
|
||||||
|
>
|
||||||
|
<el-divider
|
||||||
|
direction="vertical"
|
||||||
|
v-auth="'ptest.delete'"
|
||||||
|
></el-divider>
|
||||||
|
<el-link
|
||||||
|
type="danger"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
v-auth="'ptest.delete'"
|
||||||
|
>删除</el-link
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
</el-main>
|
</el-main>
|
||||||
<save-dialog v-if="visible" ref="saveDialog" :activeName="activeName" :activeId="activeId" @success="handleSuccess"
|
<save-dialog
|
||||||
@closed="visible = false">
|
v-if="visible"
|
||||||
|
ref="saveDialog"
|
||||||
|
:activeName="activeName"
|
||||||
|
:activeId="activeId"
|
||||||
|
@success="handleSuccess"
|
||||||
|
@closed="visible = false"
|
||||||
|
>
|
||||||
</save-dialog>
|
</save-dialog>
|
||||||
<!-- <el-dialog
|
<!-- <el-dialog
|
||||||
title="上传"
|
title="上传"
|
||||||
|
@ -122,7 +254,7 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from './behavior_form.vue';
|
import saveDialog from "./behavior_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "rparty",
|
name: "rparty",
|
||||||
components: { saveDialog },
|
components: { saveDialog },
|
||||||
|
@ -130,27 +262,33 @@ export default {
|
||||||
return {
|
return {
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
query: {
|
query: {
|
||||||
testitem: '',
|
testitem: "",
|
||||||
test_date: ''
|
test_date: "",
|
||||||
},
|
},
|
||||||
state_: {
|
state_: {
|
||||||
'R': '正常',
|
R: "正常",
|
||||||
'T': '异常'
|
T: "异常",
|
||||||
},
|
},
|
||||||
state_xj: {
|
state_xj: {
|
||||||
'S': '析晶',
|
S: "析晶",
|
||||||
'K': '不析晶',
|
K: "不析晶",
|
||||||
'θ': '未化'
|
θ: "未化",
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
file: '',
|
file: "",
|
||||||
fileName: '',
|
fileName: "",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
file: [{ required: true, message: '请上传上传文件', trigger: "blur" }]
|
file: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请上传上传文件",
|
||||||
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
activeId: '3442815297965547520',
|
],
|
||||||
activeName: '折射率',
|
},
|
||||||
|
activeId: "3442815297965547520",
|
||||||
|
activeName: "折射率",
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
selection: [],
|
selection: [],
|
||||||
|
@ -165,11 +303,13 @@ export default {
|
||||||
//获取检验项目
|
//获取检验项目
|
||||||
getTextItem() {
|
getTextItem() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.qm.getTestItem.get({ tag: 'performance', page: 0 }).then(res => {
|
that.$API.qm.getTestItem
|
||||||
|
.get({ tag: "performance", page: 0 })
|
||||||
|
.then((res) => {
|
||||||
that.behaviors = res;
|
that.behaviors = res;
|
||||||
that.query.testitem = res[0].id;
|
that.query.testitem = res[0].id;
|
||||||
that.apiObj = that.$API.qm.ptest.list;
|
that.apiObj = that.$API.qm.ptest.list;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
this.activeId = val.props.name;
|
this.activeId = val.props.name;
|
||||||
|
@ -194,18 +334,16 @@ export default {
|
||||||
that.$confirm(`确定删除吗?`, "提示", {
|
that.$confirm(`确定删除吗?`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
that.$API.qm.ptest.delete.req(row.id).then(res => {
|
that.$API.qm.ptest.delete.req(row.id).then((res) => {
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
that.$refs.table.refresh();
|
that.$refs.table.refresh();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
importInspect() {
|
importInspect() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
submitFile() {
|
submitFile() {},
|
||||||
|
|
||||||
},
|
|
||||||
closeVisible() {
|
closeVisible() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
},
|
||||||
|
@ -221,7 +359,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query)
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
|
|
Loading…
Reference in New Issue