You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LiaoNingDangAn/src/views/productsMsg/components/health.vue

228 lines
5.5 KiB

2 years ago
<template>
2 years ago
<div class="container">
2 years ago
<div class="tabs">
<div class="headerText">
<div class="searchP">查询条件</div>
</div>
<el-form ref="form1" :model="form1">
<div style="margin-top: 10px">
<el-row>
<el-col :span="10">
<el-form-item
label="产品名称或者注册证编号或备案编号"
label-width="230px"
>
<el-input v-model="form1.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="产品管理类别" label-width="130px">
<el-select v-model="form1.cplb" placeholder="请选择产品类别">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.label"
2 years ago
>
2 years ago
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
2 years ago
</div>
2 years ago
</el-form>
<div class="footBox">
<el-button icon="el-icon-refresh-left" @click="reset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="searchList"
>查询</el-button
>
</div>
</div>
<div class="tabsBottom">
<div class="foot-main">
<div class="headerText">
<div class="searchP">产品列表</div>
</div>
<div class="exportBtn">
<el-button type="primary" icon="el-icon-edit-outline">导出</el-button>
</div>
<section class="table-box">
<div class="table-item">
<el-table
v-loading="loading"
:data="tableData"
border
height="300"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" />
<el-table-column label="产品名称" prop="cpmc"> </el-table-column>
<el-table-column label="产品类型" prop="cplx"></el-table-column>
<el-table-column label="产品管理类别" prop="cplb"></el-table-column>
<el-table-column label="注册证编号/备案编号" prop="zczh"> </el-table-column>
<el-table-column
label="操作"
class-name="small-padding fixed-width"
width="140"
>
<template slot-scope="scope">
<el-button
size="mini"
plain
type="primary"
@click="toDetail(scope.row)"
>详情</el-button
>
<el-button size="mini" plain type="warning">编辑</el-button>
</template>
</el-table-column>
</el-table>
</div>
</section>
<pagination
v-show="total > 0"
:total="total"
:page="form1.current"
:limit="form1.size"
@pagination="getPagination"
></pagination>
2 years ago
</div>
2 years ago
</div>
2 years ago
</div>
</template>
2 years ago
<script>
2 years ago
export default {
components: {},
data() {
return {
2 years ago
//===========
loading: false,
tableData: [],
total: 0,
options: [
2 years ago
{
2 years ago
value: 1,
label: "第一类",
2 years ago
},
{
2 years ago
value: 2,
label: "第二类",
2 years ago
},
],
2 years ago
form1: {
cplb: "",
name: "",
size: 10,
current: 1,
2 years ago
},
};
},
2 years ago
mounted() {},
created() {
this.chinaCosmetics();
2 years ago
},
methods: {
2 years ago
//去内嵌页面
toDetail(e) {
console.log(e);
2 years ago
},
2 years ago
//搜索
searchList() {
this.chinaCosmetics();
},
getPagination(e) {
this.form1.current = e.page;
this.form1.size = e.limit;
this.chinaCosmetics();
},
//重置
reset() {
this.form1 = {
cplb: "",
name: "",
size: 10,
current: 1,
};
},
async chinaCosmetics() {
this.loading = true;
let msg1 = await this.$api.apparatus.apparatusList(this.form1);
this.tableData = msg1.data.records;
this.total = msg1.data.total;
this.form1.size = msg1.data.size;
this.form1.current = msg1.data.current;
this.loading = false;
2 years ago
},
},
};
</script>
2 years ago
<style lang="scss" scoped>
::v-deep .el-select {
width: 100% !important;
}
2 years ago
.container {
height: 100%;
2 years ago
// overflow: auto;
2 years ago
background: #f2f2f2;
2 years ago
.headerText {
width: 100%;
padding: 10px 20px;
border-bottom: 1px solid #f2f3f5;
color: #323233;
font-size: 20px;
font-weight: bold;
.searchP {
position: relative;
cursor: pointer;
&::before {
content: "";
width: 78px;
height: 3px;
background: #1349c5;
position: absolute;
bottom: -10px;
}
}
2 years ago
}
2 years ago
.tabs {
width: 100%;
height: 25%;
background: #fff;
2 years ago
}
2 years ago
}
//===================
::v-deep .el-button--medium {
padding: 8px;
}
.footBox {
width: 100%;
text-align: center;
}
.tabsBottom {
height: 75%;
padding-top: 10px;
.foot-main {
2 years ago
height: 100%;
2 years ago
// min-height: 600px;
width: 100%;
background: white;
2 years ago
}
2 years ago
}
.exportBtn {
padding: 10px 20px;
}
.table-box {
padding: 0 20px;
.table-item {
2 years ago
}
}
2 years ago
.pagination {
display: flex;
justify-content: space-between;
padding: 15px 20px;
}
</style>