Lvtianfang
杜函宇 2 years ago
parent 8a057147bd
commit dd6c6d7943

@ -24,10 +24,7 @@ export default {
}; };
}, },
mounted() { mounted() {
setTimeout(async () => {
let msg1 = await this.$api.toLogin.frimLogin();
localStorage.setItem("MSSM-LIAONING__TOKEN", msg1.data.result.userToken);
}, 100);
}, },
}; };
</script> </script>

@ -54,4 +54,6 @@ export default {
params: query, params: query,
}); });
}, },
} }

@ -0,0 +1,40 @@
import request from "@/utils/request2";
export function download(data) {
//上传
return request({
url: "/common/uploadMinioonfile",
method: 'post',
headers: {
"Content-Type": "multipart/form-data",
},
data
})
}
//条件导出化妆品数据
export function dchzpsj(query) {
return request({
url: "/pharmaceuticals/gccp/export",
method: "GET",
params: query,
responseType: 'blob'
});
}
//条件导出药品数据
export function dcyp(query) {
return request({
url: "/pharmaceuticals/vRdgYpwhGxwz/export",
method: "GET",
params: query,
responseType: 'blob'
});
}
//条件导出医疗器械数据
export function dcylqx(query) {
return request({
url: "/pharmaceuticals/ylqxJnyelcp/export",
method: "GET",
params: query,
responseType: 'blob'
});
}

@ -1,8 +1,10 @@
import toLogin from "./archives/toLogin"; import toLogin from "./archives/toLogin";
import cosmetics from "./archives/cosmetics"; import cosmetics from "./archives/cosmetics";
import apparatus from "./apparatus"; import apparatus from "./apparatus";
import updata from "./archives/updata";
export default { export default {
toLogin, toLogin,
cosmetics, cosmetics,
apparatus apparatus,
updata
}; };

@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: location.origin + process.env.VUE_APP_BASE_API, baseURL: location.origin + process.env.VUE_APP_BASE_API,
// 超时 // 超时
timeout: 15000, timeout: 150000,
}); });
// request拦截器 // request拦截器

@ -9,28 +9,40 @@
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="产品名称"> <el-form-item label="产品名称">
<el-input v-model="form1.cpmc" placeholder="请输入"></el-input> <el-input
v-model="form1.cpmc"
placeholder="请输入产品名称"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="备案编号"> <el-form-item label="备案编号">
<el-input v-model="form1.babm" placeholder="请输入"></el-input> <el-input
v-model="form1.babm"
placeholder="请输入备案编号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="生产企业"> <el-form-item label="生产企业">
<el-input v-model="form1.scqy" placeholder="请输入"></el-input> <el-input
v-model="form1.scqy"
placeholder="请输入生产企业"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="注册证编号"> <el-form-item label="注册证编号">
<el-input v-model="form1.name" placeholder="请输入"></el-input> <el-input
v-model="form1.name"
placeholder="请输入注册证编号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="化妆品类型" placeholder="请输入"> <el-form-item label="化妆品类型" placeholder="请输入化妆品类型">
<el-select <el-select
v-model="types" v-model="types"
placeholder="请选择化妆品类型" placeholder="请选择化妆品类型"
@ -61,7 +73,12 @@
<div class="searchP">产品列表</div> <div class="searchP">产品列表</div>
</div> </div>
<div class="exportBtn"> <div class="exportBtn">
<el-button type="primary" icon="el-icon-edit-outline">导出</el-button> <el-button
type="primary"
icon="el-icon-edit-outline"
@click="exportList()"
>导出</el-button
>
</div> </div>
<section class="table-box"> <section class="table-box">
<div class="table-item"> <div class="table-item">
@ -115,7 +132,6 @@
</div> </div>
</section> </section>
<pagination <pagination
v-show="total > 0"
:total="total" :total="total"
:page="form.current" :page="form.current"
:limit="form.size" :limit="form.size"
@ -124,10 +140,19 @@
></pagination> ></pagination>
</div> </div>
</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> </div>
</template> </template>
<script> <script>
import { download, dchzpsj } from "../../../api/archives/updata";
import { Notification, MessageBox, Message, Loading } from "element-ui";
export default { export default {
components: {}, components: {},
data() { data() {
@ -169,6 +194,10 @@ export default {
current: 1, current: 1,
}, },
jieliuShow: true, jieliuShow: true,
loadA: null,
showCK: false,
src: "",
}; };
}, },
mounted() {}, mounted() {},
@ -176,6 +205,64 @@ export default {
this.changeType("1"); this.changeType("1");
}, },
methods: { methods: {
openDC() {
this.showCK = false;
this.loadA = Loading.service({
text: "正在下载数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let query1 = {
//使 1 2 3 4
type: this.types,
//
scqy: this.form1.scqy,
//
cpmc: this.form1.cpmc,
//
name: this.form1.name,
//
babm: this.form1.babm,
};
dchzpsj(query1).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 = this.filterTypes(this.types)+ '.xlsx' ;
link.click();
this.loadA.close();
this.$message({
type: "success",
message: "导出成功",
});
});
},
closeDC() {
this.showCK = false;
this.$message({
type: "info",
message: "已取消导出",
});
},
exportList() {
this.src = `确定导出${
this.form1.cpmc ? `产品名称为${this.form1.cpmc}` : ""
}${this.form1.babm ? `备案编号为${this.form1.babm}` : ""}${
this.form1.scqy ? `生产企业为${this.form1.scqy}` : ""
}${
this.form1.name ? `注册证编号为${this.form1.name}` : ""
}${`化妆品类型为${this.filterTypes(this.types)}`}数据吗?`;
this.showCK = true;
},
filterTypes(e) {
let arr = this.options.filter((value1) => {
return value1.value == e;
});
console.log(arr);
return arr[0].label;
},
jieliuFunc() { jieliuFunc() {
if (this.jieliuShow) { if (this.jieliuShow) {
this.getData(this.types); this.getData(this.types);
@ -306,6 +393,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <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 { ::v-deep .el-select {
width: 100% !important; width: 100% !important;
} }

@ -9,7 +9,10 @@
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="产品名称"> <el-form-item label="产品名称">
<el-input v-model="form1.cpmc" placeholder="请输入"></el-input> <el-input
v-model="form1.cpmc"
placeholder="请输入产品名称"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
@ -27,14 +30,20 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="生产企业"> <el-form-item label="生产企业">
<el-input v-model="form1.scqy" placeholder="请输入"></el-input> <el-input
v-model="form1.scqy"
placeholder="请输入生产企业"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="注册证编号或备案编号"> <el-form-item label="注册证编号或备案编号">
<el-input v-model="form1.zczh" placeholder="请输入"></el-input> <el-input
v-model="form1.zczh"
placeholder="请输入注册证编号或备案编号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -53,7 +62,12 @@
<div class="searchP">产品列表</div> <div class="searchP">产品列表</div>
</div> </div>
<div class="exportBtn"> <div class="exportBtn">
<el-button type="primary" icon="el-icon-edit-outline">导出</el-button> <el-button
type="primary"
icon="el-icon-edit-outline"
@click="exportList()"
>导出</el-button
>
</div> </div>
<section class="table-box"> <section class="table-box">
<div class="table-item"> <div class="table-item">
@ -118,7 +132,6 @@
</div> </div>
</section> </section>
<pagination <pagination
v-show="total > 0"
:total="total" :total="total"
:page="form.current" :page="form.current"
:limit="form.size" :limit="form.size"
@ -127,10 +140,19 @@
></pagination> ></pagination>
</div> </div>
</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> </div>
</template> </template>
<script> <script>
import { download, dcylqx } from "../../../api/archives/updata";
import { Notification, MessageBox, Message, Loading } from "element-ui";
export default { export default {
components: {}, components: {},
data() { data() {
@ -138,7 +160,7 @@ export default {
//=========== //===========
loading: false, loading: false,
tableData: [], tableData: [],
total: 1, total: 0,
options: [ options: [
{ {
value: 1, value: 1,
@ -162,6 +184,10 @@ export default {
current: 1, current: 1,
}, },
jieliuShow: true, jieliuShow: true,
loadA: null,
showCK: false,
src: "",
}; };
}, },
mounted() {}, mounted() {},
@ -169,6 +195,44 @@ export default {
this.chinaCosmetics(); this.chinaCosmetics();
}, },
methods: { methods: {
openDC() {
this.showCK = false;
this.loadA = Loading.service({
text: "正在下载数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
dcylqx(this.form1).then((res) => {
const blob = new Blob([res],{type:res.type});
const link = document.createElement("a");
link.style.display = 'none'
link.href = window.URL.createObjectURL(blob);
link.download = "医疗器械"+ '.xlsx';
link.click();
this.loadA.close();
this.$message({
type: "success",
message: "导出成功",
});
});
},
closeDC() {
this.showCK = false;
this.$message({
type: "info",
message: "已取消导出",
});
},
exportList() {
this.src = `确定导出${
this.form1.cpmc ? `产品名称为${this.form1.cpmc}` : ""
}${this.form1.cplb ? `产品类别为${this.form1.cplb}` : ""}${
this.form1.scqy ? `生产企业为${this.form1.scqy}` : ""
}${
this.form1.zczh ? `注册证编号或备案编号为${this.form1.zczh}` : ""
}数据吗?`;
this.showCK = true;
},
jieliuFunc() { jieliuFunc() {
if (this.jieliuShow) { if (this.jieliuShow) {
this.chinaCosmetics(); this.chinaCosmetics();
@ -231,6 +295,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <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 { ::v-deep .el-select {
width: 100% !important; width: 100% !important;
} }

@ -3,7 +3,7 @@
<!-- <span>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span> --> <!-- <span>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span> -->
<!-- <iframe src="https://dev-mssm-liaoning.imian.org.cn/ggfw/#/firmContent/drugInfo" frameborder="0" style="width: 100%;height: 100%;"></iframe> --> <!-- <iframe src="https://dev-mssm-liaoning.imian.org.cn/ggfw/#/firmContent/drugInfo" frameborder="0" style="width: 100%;height: 100%;"></iframe> -->
<iframe <iframe
:src="Url" :src="url"
frameborder="0" frameborder="0"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
ref="iframes" ref="iframes"
@ -17,23 +17,22 @@ export default {
iframViewStyle: { iframViewStyle: {
height: "", height: "",
}, },
// url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation?type=${ url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation?type=${
// this.$route.query.type
// }&flag=${this.$route.query.flag}&data=${
// this.$route.query.data
// }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}`,
// url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation`
url: `http://localhost:81?type=${
this.$route.query.type this.$route.query.type
}&flag=${this.$route.query.flag}&data=${ }&flag=${this.$route.query.flag}&data=${
this.$route.query.data this.$route.query.data
}&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}` }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}`,
// url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation`
// url: `http://localhost:81?type=${this.$route.query.type}&flag=${
// this.$route.query.flagyppzwh
// }&data=${this.$route.query.data}&token=${localStorage.getItem(
// "MSSM-LIAONING__TOKEN"
// )}`,
}; };
}, },
methods: {}, methods: {},
created() { created() {
this.$nextTick(() => { this.$nextTick(() => {});
});
}, },
methods: {}, methods: {},
mounted() { mounted() {

@ -9,7 +9,10 @@
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="产品名称"> <el-form-item label="产品名称">
<el-input v-model="form1.name" placeholder="请输入"></el-input> <el-input
v-model="form1.cpmc"
placeholder="请输入产品名称"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
@ -27,7 +30,10 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="批准文号"> <el-form-item label="批准文号">
<el-input v-model="form1.pzwh" placeholder="请输入"></el-input> <el-input
v-model="form1.pzwh"
placeholder="请输入批准文号"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -35,7 +41,10 @@
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="生产企业"> <el-form-item label="生产企业">
<el-input v-model="form1.scqy" placeholder="请输入"></el-input> <el-input
v-model="form1.scqy"
placeholder="请输入生产企业"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
@ -65,7 +74,12 @@
<div class="searchP">药品列表</div> <div class="searchP">药品列表</div>
</div> </div>
<div class="exportBtn"> <div class="exportBtn">
<el-button type="primary" icon="el-icon-edit-outline">导出</el-button> <el-button
type="primary"
icon="el-icon-edit-outline"
@click="exportList()"
>导出</el-button
>
</div> </div>
<section class="table-box"> <section class="table-box">
<div class="table-item"> <div class="table-item">
@ -73,7 +87,7 @@
v-loading="loading" v-loading="loading"
:data="tableData" :data="tableData"
border border
height="49vh" height="43vh"
:stripe="false" :stripe="false"
> >
<el-table-column <el-table-column
@ -127,7 +141,6 @@
</div> </div>
</section> </section>
<pagination <pagination
v-show="total > 0"
:total="total" :total="total"
:page="form.current" :page="form.current"
:limit="form.size" :limit="form.size"
@ -136,10 +149,19 @@
></pagination> ></pagination>
</div> </div>
</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> </div>
</template> </template>
<script> <script>
import { download, dcyp } from "../../api/archives/updata";
import { Notification, MessageBox, Message, Loading } from "element-ui";
export default { export default {
components: {}, components: {},
data() { data() {
@ -148,34 +170,17 @@ export default {
loading: false, loading: false,
tableData: [], tableData: [],
total: 0, total: 0,
options: [
{
value: 1,
label: "全部",
},
{
value: 2,
label: "中药",
},
{
value: 3,
label: "辅料",
},
{
value: 4,
label: "生物制品",
},
{
value: 5,
label: "化学药品",
},
],
form1: { form1: {
//
cpmc: "",
//
jx: "", jx: "",
ypfl: "", //
name: "",
pzwh: "", pzwh: "",
//
scqy: "", scqy: "",
//
ypfl: "",
}, },
form: { form: {
size: 10, size: 10,
@ -196,6 +201,11 @@ export default {
"喷雾剂", "喷雾剂",
"气雾剂", "气雾剂",
], ],
jieliuShow: true,
loadA: null,
showCK: false,
src: "",
}; };
}, },
mounted() {}, mounted() {},
@ -203,6 +213,57 @@ export default {
this.chinaCosmetics(1); this.chinaCosmetics(1);
}, },
methods: { methods: {
// convertFileStreamToBinary(fileStream) {
// return new Promise((resolve, reject) => {
// const reader = new FileReader();
// reader.onload = function (event) {
// const binaryData = event.target.result;
// resolve(binaryData);
// };
// reader.onerror = function (event) {
// reject(event.target.error);
// };
// reader.readAsArrayBuffer(fileStream);
// });
// },
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: "导出成功",
});
});
},
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() { jieliuFunc() {
if (this.jieliuShow) { if (this.jieliuShow) {
this.chinaCosmetics(); this.chinaCosmetics();
@ -239,11 +300,16 @@ export default {
// //
reset() { reset() {
this.form1 = { this.form1 = {
//
cpmc: "",
//
jx: "", jx: "",
ypfl: "", //
name: "",
pzwh: "", pzwh: "",
//
scqy: "", scqy: "",
//
ypfl: "",
}; };
this.form = { this.form = {
size: 10, size: 10,
@ -267,6 +333,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <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 { ::v-deep .el-select {
width: 100% !important; width: 100% !important;
} }

Loading…
Cancel
Save