Lvtianfang
parent
f88afdea2c
commit
4977b1a80d
@ -0,0 +1,357 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="tabs">
|
||||||
|
<div class="headerText">
|
||||||
|
<div class="searchP">查询条件</div>
|
||||||
|
</div>
|
||||||
|
<el-form ref="form1" :model="form1" label-width="80px">
|
||||||
|
<div style="margin-top: 10px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label="通用名称">
|
||||||
|
<el-input v-model="form1.tymc" placeholder="请输入通用名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label="备案号">
|
||||||
|
<el-input v-model="form1.bah" placeholder="请输入备案号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label=" 剂型">
|
||||||
|
<el-select v-model="form1.jx" placeholder=" 请选择剂型">
|
||||||
|
<el-option v-for="item in ypType" :key="item" :label="item" :value="item">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label="医疗机构名称">
|
||||||
|
<el-input v-model="form1.yljgmc" placeholder="请输入医疗机构名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</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" @click="exportList()">导出</el-button>
|
||||||
|
</div>
|
||||||
|
<section class="table-box">
|
||||||
|
<div class="table-item">
|
||||||
|
<el-table v-loading="loading" :data="tableData" border height="43vh" :stripe="false">
|
||||||
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||||
|
<el-table-column label="通用名称" align="center" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.tymc }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备案号" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.bah }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="剂型" align="center" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.jx }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="医疗机构名称" align="center" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.yljgmc }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" class-name="small-padding fixed-width" width="70" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" plain type="primary" @click="toDetail(scope.row)">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<pagination :total="total" :page="form.current" :limit="form.size" @pagination="getPagination"
|
||||||
|
:current-page.sync="form.current"></pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-dialog title="提示" :visible.sync="showCK" width="30%">
|
||||||
|
<span>{{ src }}</span>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="closeDC()">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="openDC()">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { download, dcyp } from "../../api/archives/updata";
|
||||||
|
import { Notification, MessageBox, Message, Loading } from "element-ui";
|
||||||
|
export default {
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//===========
|
||||||
|
loading: false,
|
||||||
|
tableData: [],
|
||||||
|
total: 0,
|
||||||
|
form1: {
|
||||||
|
//通用名称
|
||||||
|
tymc: "",
|
||||||
|
//备案号
|
||||||
|
bah: "",
|
||||||
|
//剂型
|
||||||
|
jx: "",
|
||||||
|
//生产企业
|
||||||
|
scqy: "",
|
||||||
|
//医疗机构名称
|
||||||
|
yljgmc: "",
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
size: 10,
|
||||||
|
current: 1,
|
||||||
|
},
|
||||||
|
//药品分类
|
||||||
|
ypType: ["中药", "生物制品", "化学药品"],
|
||||||
|
//剂型
|
||||||
|
jxType: [
|
||||||
|
"散剂",
|
||||||
|
"片剂",
|
||||||
|
"颗粒剂",
|
||||||
|
"胶囊剂",
|
||||||
|
"溶液剂",
|
||||||
|
"乳剂",
|
||||||
|
"混悬剂",
|
||||||
|
"注射剂",
|
||||||
|
"喷雾剂",
|
||||||
|
"气雾剂",
|
||||||
|
],
|
||||||
|
jieliuShow: true,
|
||||||
|
|
||||||
|
loadA: null,
|
||||||
|
showCK: false,
|
||||||
|
src: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() { },
|
||||||
|
created() {
|
||||||
|
this.chinaCosmetics(1);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openDC() {
|
||||||
|
this.showCK = false;
|
||||||
|
this.loadA = Loading.service({
|
||||||
|
text: "正在下载数据,请稍候",
|
||||||
|
spinner: "el-icon-loading",
|
||||||
|
background: "rgba(0, 0, 0, 0.7)",
|
||||||
|
});
|
||||||
|
dcyp(this.form1).then((res) => {
|
||||||
|
const blob = new Blob([res], { type: res.type });
|
||||||
|
const link = document.createElement("a");
|
||||||
|
link.href = window.URL.createObjectURL(blob);
|
||||||
|
link.style.display = "none";
|
||||||
|
link.download = "药品" + ".xlsx";
|
||||||
|
link.click();
|
||||||
|
this.loadA.close();
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "导出成功",
|
||||||
|
}).catch((err) => {
|
||||||
|
this.$message({
|
||||||
|
type: "info",
|
||||||
|
message: "导出失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
closeDC() {
|
||||||
|
this.showCK = false;
|
||||||
|
this.$message({
|
||||||
|
type: "info",
|
||||||
|
message: "已取消导出",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
exportList() {
|
||||||
|
this.src = `确定导出${this.form1.cpmc ? `产品名称为${this.form1.cpmc}、` : ""
|
||||||
|
}${this.form1.ypfl ? `药品分类为${this.form1.ypfl}、` : ""}${this.form1.pzwh ? `批准文号为${this.form1.pzwh}、` : ""
|
||||||
|
}${this.form1.scqy ? `生产企业为${this.form1.scqy}、` : ""}${this.form1.jx ? `剂型为${this.form1.jx}、` : ""
|
||||||
|
}数据吗?`;
|
||||||
|
this.showCK = true;
|
||||||
|
},
|
||||||
|
jieliuFunc() {
|
||||||
|
if (this.jieliuShow) {
|
||||||
|
this.chinaCosmetics();
|
||||||
|
this.jieliuShow = false;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.jieliuShow = true;
|
||||||
|
}, 3000);
|
||||||
|
} else {
|
||||||
|
this.$message("点击过快");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//去内嵌页面
|
||||||
|
toDetail(e) {
|
||||||
|
this.$router.push({
|
||||||
|
path: `/cosmeticsDetail`,
|
||||||
|
query: { type: "4", data: e.id },
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//搜索
|
||||||
|
searchList() {
|
||||||
|
this.form.current = 1;
|
||||||
|
for (let i in this.form1) {
|
||||||
|
this.form[i] = this.form1[i];
|
||||||
|
}
|
||||||
|
console.log(this.form);
|
||||||
|
this.jieliuFunc();
|
||||||
|
},
|
||||||
|
getPagination(e) {
|
||||||
|
console.log(e);
|
||||||
|
this.form.current = e.page;
|
||||||
|
this.form.size = e.limit;
|
||||||
|
this.chinaCosmetics(1);
|
||||||
|
},
|
||||||
|
//重置
|
||||||
|
reset() {
|
||||||
|
this.form1 = {
|
||||||
|
//通用名称
|
||||||
|
tymc: "",
|
||||||
|
//备案号
|
||||||
|
bah: "",
|
||||||
|
//剂型
|
||||||
|
jx: "",
|
||||||
|
//生产企业
|
||||||
|
scqy: "",
|
||||||
|
//医疗机构名称
|
||||||
|
yljgmc: "",
|
||||||
|
};
|
||||||
|
this.form = {
|
||||||
|
size: 10,
|
||||||
|
current: 1,
|
||||||
|
};
|
||||||
|
this.jieliuFunc();
|
||||||
|
},
|
||||||
|
//国产化妆品
|
||||||
|
async chinaCosmetics() {
|
||||||
|
this.loading = true;
|
||||||
|
let msg1 = await this.$api.cosmetics.deasCorpTcmpFiling(this.form);
|
||||||
|
console.log(msg1);
|
||||||
|
this.tableData = msg1.data.records;
|
||||||
|
this.total = msg1.data.total;
|
||||||
|
this.form.size = msg1.data.size;
|
||||||
|
this.form.current = msg1.data.current;
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-dialog:not(.is-fullscreen) {
|
||||||
|
margin-top: 30vh !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-select {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
height: 100%;
|
||||||
|
// overflow: auto;
|
||||||
|
background: #f2f2f2;
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs {
|
||||||
|
width: 100%;
|
||||||
|
height: 30%;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//===================
|
||||||
|
::v-deep .el-button--medium {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footBox {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabsBottom {
|
||||||
|
// height: 70%;
|
||||||
|
padding-top: 10px;
|
||||||
|
|
||||||
|
.foot-main {
|
||||||
|
height: 100%;
|
||||||
|
// min-height: 600px;
|
||||||
|
width: 100%;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.exportBtn {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-box {
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 0 20px;
|
||||||
|
|
||||||
|
.table-item {}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 15px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep.el-table--medium .el-table__cell {
|
||||||
|
padding: 7px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-table {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue