Lvtianfang
杜函宇 2 years ago
parent fbc1157e86
commit 807098c5ce

@ -5,6 +5,7 @@ VUE_APP_TITLE = 产品档案管理系统
ENV = 'development' ENV = 'development'
# 开发环境 # 开发环境
VUE_APP_BASE_API = '/configApi' VUE_APP_BASE_API = '/configApi'
VUE_APP_BASE_API2 = '/api'
VUE_APP_PREFIX ='' VUE_APP_PREFIX =''
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -26,12 +26,11 @@ export default {
mounted(){ mounted(){
setTimeout(async () => { setTimeout(async () => {
let Authentication = await this.$api.toLogin.frimLogin(); let Authentication = await this.$api.toLogin.frimLogin();
console.log(Authentication);
localStorage.setItem( localStorage.setItem(
"Authentication", "MSSM-LIAONING__TOKEN",
Authentication.data.result.userToken Authentication.data.result.userToken
); );
}, 1000); }, 10);
} }
}; };
</script> </script>

@ -0,0 +1,18 @@
import request from "@/utils/request2";
export default {
//分页条件查询器械品种
apparatusList(query) {
return request({
url: "/pharmaceuticals/ylqxJnyelcp",
method: "GET",
params: query,
});
},
//通过注册证编号查询单条器械品种数据
// apparatusGet(zczh) {
// return request({
// url: `/pharmaceuticals/ylqxJnyelcp/${zczh}`,
// method: "GET",
// });
// },
}

@ -3,16 +3,8 @@ import request from "@/utils/request";
//获取用户信息 //获取用户信息
export function getselfInfo() { export function getselfInfo() {
return request({ return request({
url: "/user/getSelfInfo", url: "/api/admin/user/getSelfInfo",
method: "GET", method: "GET",
}); });
} }
//修改密码
export function changePass(query) {
return request({
url: "/SystemManager/UserManager/modify/password",
method: "GET",
params: query,
});
}

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

@ -40,30 +40,6 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<!-- <ul
v-show="visible"
:style="{ left: left + 'px', top: top + 'px' }"
class="contextmenu"
>
<li @click="refreshSelectedTag(selectedTag)">
<i class="el-icon-refresh-right"></i> 刷新页面
</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
<i class="el-icon-close"></i> 关闭当前
</li>
<li @click="closeOthersTags">
<i class="el-icon-circle-close"></i> 关闭其他
</li>
<li v-if="!isFirstView()" @click="closeLeftTags">
<i class="el-icon-back"></i> 关闭左侧
</li>
<li v-if="!isLastView()" @click="closeRightTags">
<i class="el-icon-right"></i> 关闭右侧
</li>
<li @click="closeAllTags(selectedTag)">
<i class="el-icon-circle-close"></i> 全部关闭
</li>
</ul> -->
</div> </div>
</template> </template>
@ -204,10 +180,8 @@ export default {
}); });
}, },
refreshSelectedTag(view) { refreshSelectedTag(view) {
this.$tab.refreshPage(view); let obj = {path:view.path,name:view.name}
if (this.$route.meta.link) { this.$tab.refreshPage(obj);
this.$store.dispatch("tagsView/delIframeView", this.$route);
}
}, },
closeSelectedTag(view) { closeSelectedTag(view) {
this.$tab.closePage(view).then(({ visitedViews }) => { this.$tab.closePage(view).then(({ visitedViews }) => {
@ -280,6 +254,7 @@ export default {
this.visible = false; this.visible = false;
}, },
handleScroll() { handleScroll() {
console.log(111);
this.closeMenu(); this.closeMenu();
}, },
}, },

@ -12,69 +12,49 @@ function kickOut() {
} }
} }
NProgress.configure({ showSpinner: false }); NProgress.configure({ showSpinner: false });
const whiteList = [ const routerSList = [
// "/login",
// "/register",
"/index",
'/drugArchives', '/drugArchives',
'/cosmeticsArchives', '/cosmeticsArchives',
'/health', '/health',
'/productInfo',
'/cosmeticsDetail'
]; ];
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start(); NProgress.start();
if (getToken()) { let token = localStorage.getItem('MSSM-LIAONING__TOKEN')
console.log('有token'); if (token) {
to.meta.title && store.dispatch("settings/setTitle", to.meta.title); if(to.path == '/cosmeticsDetail' && routerSList.indexOf(from.path) == -1){
/* has token*/ next({ path: '/' })
if (to.path === "/login") { }else {
next({ path: "/" }); next()
NProgress.done(); }
if (store.state.myselfPermission.routerList.length > 0) {
let current = store.state.myselfPermission.routerList.filter(
(item) => item.path == to.path || from.path == "/"
);
if (current.length > 0) {
next();
} else {
Message.error("无权限访问!");
}
} else { } else {
next(); store
.dispatch("GetPermission")
.then((res) => {
console.log(res);
if (res.length > 0) {
next();
} else {
kickOut();
}
})
.catch((error) => {
kickOut();
});
} }
} else { } else {
next()
// 没有token // 没有token
// if (whiteList.indexOf(to.path) !== -1) { Message.error("获取令牌失败!");
// next() kickOut();
// let token = localStorage.getItem("MSSM-LIAONING__TOKEN"); NProgress.done();
// if (token) {
// if (store.state.myselfPermission.routerList.length > 0) {
// let current = store.state.myselfPermission.routerList.filter(
// (item) => item.path == to.path || from.path == "/"
// );
// if (current.length > 0) {
// next();
// } else {
// next();
// // Message.error("无权限访问!");
// }
// } else {
// store
// .dispatch("GetPermission")
// .then((res) => {
// console.log(res);
// if (res.length > 0) {
// next({ path: res });
// } else {
// kickOut();
// }
// })
// .catch((error) => {
// kickOut();
// });
// }
// } else {
// //没有token踢出去
// Message.error("获取令牌失败!");
// kickOut();
// }
// } else {
// // kickOut();
// NProgress.done();
// }
} }
}); });

@ -4,16 +4,18 @@ import router from "@/router";
export default { export default {
// 刷新当前tab页签 // 刷新当前tab页签
refreshPage(obj) { refreshPage(obj) {
console.log(obj);
console.log( router.currentRoute);
const { path, query, matched } = router.currentRoute; const { path, query, matched } = router.currentRoute;
if (obj === undefined) { // if (obj === undefined) {
matched.forEach((m) => { // matched.forEach((m) => {
if (m.components && m.components.default && m.components.default.name) { // if (m.components && m.components.default && m.components.default.name) {
if (!["Layout", "ParentView"].includes(m.components.default.name)) { // if (!["Layout", "ParentView"].includes(m.components.default.name)) {
obj = { name: m.components.default.name, path: path, query: query }; // obj = { name: m.components.default.name, path: path, query: query };
} // }
} // }
}); // });
} // }
return store.dispatch("tagsView/delCachedView", obj).then(() => { return store.dispatch("tagsView/delCachedView", obj).then(() => {
const { path, query } = obj; const { path, query } = obj;

@ -30,27 +30,27 @@ import Layout from "@/layout";
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [
{ // {
path: "/redirect", // path: "/redirect",
component: Layout, // component: Layout,
hidden: true, // hidden: true,
children: [ // children: [
{ // {
path: "/redirect/:path(.*)", // path: "/redirect/:path(.*)",
component: () => import("@/views/redirect"), // component: () => import("@/views/redirect"),
}, // },
], // ],
}, // },
{ // {
path: "/login", // path: "/login",
component: () => import("@/views/login"), // component: () => import("@/views/login"),
hidden: true, // hidden: true,
}, // },
{ // {
path: "/register", // path: "/register",
component: () => import("@/views/register"), // component: () => import("@/views/register"),
hidden: true, // hidden: true,
}, // },
{ {
path: "/404", path: "/404",
component: () => import("@/views/error/404"), component: () => import("@/views/error/404"),
@ -61,8 +61,6 @@ export const constantRoutes = [
component: () => import("@/views/error/401"), component: () => import("@/views/error/401"),
hidden: true, hidden: true,
}, },
{ {
path: '', path: '',
component: () => import("@/views/index"), component: () => import("@/views/index"),
@ -71,37 +69,32 @@ export const constantRoutes = [
children: [ children: [
{ {
path: "/drugArchives", path: "/drugArchives",
name: "药品档案", name: "drugArchives",
icon: require("@/assets/images/tree4.svg"), icon: require("@/assets/images/tree4.svg"),
component: () => import("@/views/productsMsg/index.vue"), component: () => import("@/views/productsMsg/index.vue"),
meta: { title: "药品档案", icon: "netWork" }, isDiy:true,
meta: { title: "药品档案", },
}, },
{ {
path: "/cosmeticsArchives", path: "/cosmeticsArchives",
name: "化妆品档案", name: "cosmeticsArchives",
icon: require("@/assets/images/tree4.svg"), icon: require("@/assets/images/tree4.svg"),
component: () => import("@/views/productsMsg/components/cosmeticsArchives.vue"), component: () => import("@/views/productsMsg/components/cosmeticsArchives.vue"),
meta: { title: "化妆品档案", icon: "netWork" }, meta: { title: "化妆品档案", flag: true },
}, },
{ {
path: "/cosmeticsDetail", path: "/cosmeticsDetail",
name: "化妆品详情", name: "cosmeticsDetail",
icon: require("@/assets/images/tree4.svg"), icon: require("@/assets/images/tree4.svg"),
component: () => import("@/views/cosmeticsFile/detail.vue"), component: () => import("@/views/cosmeticsFile/detail.vue"),
meta: { title: "化妆品详情", icon: "netWork" }, meta: { title: "详情", },
}, },
{ {
path: "/health", path: "/health",
name: "医疗器械档案", name: "health",
icon: require("@/assets/images/tree4.svg"), icon: require("@/assets/images/tree4.svg"),
component: () => import("@/views/productsMsg/components/health.vue"), component: () => import("@/views/productsMsg/components/health.vue"),
meta: { title: "医疗器械档案", icon: "netWork" }, meta: { title: "医疗器械档案", },
},
{
path: "/productInfo",
name: "productInfo",
component:() => import("@/views/productsMsg/components/productInfo.vue"),
meta: { title: "产品档案", icon: "netWork" },
}, },
] ]
}, },

@ -14,17 +14,21 @@ const selfPermission = {
}, },
mutations: { mutations: {
//动态按钮权限
SET_PERMISSIONLIST: (state, permissions) => { SET_PERMISSIONLIST: (state, permissions) => {
permissions.forEach((item) => { permissions.forEach((item) => {
state.permissionList.push(item.menuPerms); state.permissionList.push(item.menuPerms);
}); });
}, },
//动态路由
SET_ROUTER: (state, router) => { SET_ROUTER: (state, router) => {
state.routerList = router; state.routerList = router;
}, },
//用户信息
SET_USERDATA: (state, data) => { SET_USERDATA: (state, data) => {
state.userData = data; state.userData = data;
}, },
//某个id
SET_INSPECTORID: (state, id) => { SET_INSPECTORID: (state, id) => {
state.inspectorId = id; state.inspectorId = id;
}, },
@ -35,30 +39,32 @@ const selfPermission = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getselfInfo() getselfInfo()
.then((res) => { .then((res) => {
console.log(res);
let infoData = res.result; let infoData = res.result;
// let query = {
let query = { // id: infoData.userDto.cardId,
id: infoData.userDto.cardId, // };
}; // getcarid(query).then((res) => {
getcarid(query).then((res) => { // commit(
commit( // "SET_INSPECTORID",
"SET_INSPECTORID", // res.result.length > 0 ? res.result[0].id : null
res.result.length > 0 ? res.result[0].id : null // );
); // });
});
//存储用户信息 //存储用户信息
commit("SET_USERDATA", infoData.userDto); commit("SET_USERDATA", infoData.userDto);
//过滤出按钮权限字符 //过滤出按钮权限字符
let menuButton = infoData.menuButton.filter( // let menuButton = infoData.menuButton.filter(
(item) => item.appCode == "JCYGL" // (item) => item.appCode == "JCYGL"
); // );
commit("SET_PERMISSIONLIST", menuButton); // commit("SET_PERMISSIONLIST", menuButton);
//过滤菜单 //过滤菜单
let menuTree = infoData.menuTree.filter( let menuTree = infoData.menuTree.filter(
(item) => item.appCode == "JCYGL" (item) => item.appCode == "CPGL"
); );
console.log(menuTree);
let fileTreeOut = filterTree(menuTree[0].childMenuList, []); let fileTreeOut = filterTree(menuTree[0].childMenuList, []);
console.log(fileTreeOut);
commit("SET_ROUTER", fileTreeOut); commit("SET_ROUTER", fileTreeOut);
resolve(fileTreeOut.length > 0 ? fileTreeOut[0].path : []); resolve(fileTreeOut.length > 0 ? fileTreeOut[0].path : []);

@ -6,6 +6,9 @@ const state = {
const mutations = { const mutations = {
ADD_IFRAME_VIEW: (state, view) => { ADD_IFRAME_VIEW: (state, view) => {
// console.log(111);
// console.log(state);
// console.log(view);
if (state.iframeViews.some((v) => v.path === view.path)) return; if (state.iframeViews.some((v) => v.path === view.path)) return;
state.iframeViews.push( state.iframeViews.push(
Object.assign({}, view, { Object.assign({}, view, {
@ -14,6 +17,9 @@ const mutations = {
); );
}, },
ADD_VISITED_VIEW: (state, view) => { ADD_VISITED_VIEW: (state, view) => {
// console.log(222);
// console.log(state);
// console.log(view);
if (state.visitedViews.some((v) => v.path === view.path)) return; if (state.visitedViews.some((v) => v.path === view.path)) return;
state.visitedViews.push( state.visitedViews.push(
Object.assign({}, view, { Object.assign({}, view, {
@ -22,12 +28,18 @@ const mutations = {
); );
}, },
ADD_CACHED_VIEW: (state, view) => { ADD_CACHED_VIEW: (state, view) => {
// console.log(333);
// console.log(state);
// console.log(view);
if (state.cachedViews.includes(view.name)) return; if (state.cachedViews.includes(view.name)) return;
if (view.meta && !view.meta.noCache) { if (view.meta && !view.meta.noCache) {
state.cachedViews.push(view.name); state.cachedViews.push(view.name);
} }
}, },
DEL_VISITED_VIEW: (state, view) => { DEL_VISITED_VIEW: (state, view) => {
// console.log(444);
// console.log(state);
// console.log(view);
for (const [i, v] of state.visitedViews.entries()) { for (const [i, v] of state.visitedViews.entries()) {
if (v.path === view.path) { if (v.path === view.path) {
state.visitedViews.splice(i, 1); state.visitedViews.splice(i, 1);
@ -39,16 +51,23 @@ const mutations = {
); );
}, },
DEL_IFRAME_VIEW: (state, view) => { DEL_IFRAME_VIEW: (state, view) => {
// console.log(555);
// console.log(state,view);
state.iframeViews = state.iframeViews.filter( state.iframeViews = state.iframeViews.filter(
(item) => item.path !== view.path (item) => item.path !== view.path
); );
}, },
DEL_CACHED_VIEW: (state, view) => { DEL_CACHED_VIEW: (state, view) => {
console.log(666);
console.log(state);
console.log(view);
const index = state.cachedViews.indexOf(view.name); const index = state.cachedViews.indexOf(view.name);
index > -1 && state.cachedViews.splice(index, 1); index > -1 && state.cachedViews.splice(index, 1);
}, },
DEL_OTHERS_VISITED_VIEWS: (state, view) => { DEL_OTHERS_VISITED_VIEWS: (state, view) => {
// console.log(777);
// console.log(state,view);
state.visitedViews = state.visitedViews.filter((v) => { state.visitedViews = state.visitedViews.filter((v) => {
return v.meta.affix || v.path === view.path; return v.meta.affix || v.path === view.path;
}); });
@ -57,6 +76,8 @@ const mutations = {
); );
}, },
DEL_OTHERS_CACHED_VIEWS: (state, view) => { DEL_OTHERS_CACHED_VIEWS: (state, view) => {
// console.log(888);
// console.log(state,view);
const index = state.cachedViews.indexOf(view.name); const index = state.cachedViews.indexOf(view.name);
if (index > -1) { if (index > -1) {
state.cachedViews = state.cachedViews.slice(index, index + 1); state.cachedViews = state.cachedViews.slice(index, index + 1);
@ -66,12 +87,16 @@ const mutations = {
}, },
DEL_ALL_VISITED_VIEWS: (state) => { DEL_ALL_VISITED_VIEWS: (state) => {
// keep affix tags // keep affix tags
// console.log(999);
// console.log(state);
const affixTags = state.visitedViews.filter((tag) => tag.meta.affix); const affixTags = state.visitedViews.filter((tag) => tag.meta.affix);
state.visitedViews = affixTags; state.visitedViews = affixTags;
state.iframeViews = []; state.iframeViews = [];
}, },
DEL_ALL_CACHED_VIEWS: (state) => { DEL_ALL_CACHED_VIEWS: (state) => {
state.cachedViews = []; state.cachedViews = [];
// console.log(101010);
// console.log(state);
}, },
UPDATE_VISITED_VIEW: (state, view) => { UPDATE_VISITED_VIEW: (state, view) => {
for (let v of state.visitedViews) { for (let v of state.visitedViews) {

@ -15,7 +15,7 @@ axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
// 创建axios实例 // 创建axios实例
const service = axios.create({ 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_API2,
// 超时 // 超时
timeout: 15000, timeout: 15000,
}); });

@ -29,7 +29,7 @@ service.interceptors.request.use(
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false; const isRepeatSubmit = (config.headers || {}).repeatSubmit === false;
if (!isToken) { if (!isToken) {
config.headers["Authentication"] = localStorage.getItem( config.headers["Authentication"] = localStorage.getItem(
"Authentication" "MSSM-LIAONING__TOKEN"
); );
} }
// get请求映射params参数 // get请求映射params参数

@ -1,6 +1,6 @@
<template> <template>
<div class="container"> <div class="container">
<!-- <div class="headerText"> <div class="headerText">
<span>药品通用名称 : </span> <span>药品通用名称 : </span>
<span class="header-name">健母宝经典修护精华液</span> <span class="header-name">健母宝经典修护精华液</span>
<button class="headerBtn c1">百年产品</button> <button class="headerBtn c1">百年产品</button>
@ -8,9 +8,9 @@
</div> </div>
<div class="section-main"> <div class="section-main">
<div></div> <div></div>
</div> --> </div>
<iframe src="http://localhost:81/#/firmContent/firmInfo/pinzhongInfo" frameborder="0" height="100%" width="100%"></iframe> <!-- <iframe src="http://localhost:81/#/firmContent/firmInfo/pinzhongInfo" frameborder="0" height="100%" width="100%"></iframe> -->
</div> </div>
</template> </template>
<script> <script>

@ -12,7 +12,7 @@
> >
<div class="view-child"> <div class="view-child">
<img :src="item.icon" alt="" class="router-icon" /> <img :src="item.icon" alt="" class="router-icon" />
{{ item.name }} {{ item.meta.title }}
</div> </div>
<div></div> <div></div>
</router-link> </router-link>
@ -40,14 +40,7 @@ export default {
computed: { computed: {
// //
myRouter() { myRouter() {
console.log(this.$router.options.routes); return this.$store.state.myselfPermission.routerList;
console.log( this.$router.options.routes[5].children);
// let staticRouter = router.options.routes.filter(
// (item) => item.isDiy == true
// )[0].children;
// return staticRouter;
// return this.$store.state.myselfPermission.routerList;
return this.$router.options.routes[5].children;
}, },
}, },
created() {}, created() {},

@ -1,98 +0,0 @@
<template>
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" />
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default {
name: 'Index',
components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
data() {
return {
lineChartData: lineChartData.newVisitis
}
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
}
}
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
background-color: rgb(240, 242, 245);
position: relative;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
}
}
</style>

@ -4,44 +4,42 @@
<div class="headerText"> <div class="headerText">
<div class="searchP">查询条件</div> <div class="searchP">查询条件</div>
</div> </div>
<el-form ref="form1" :model="form1" label-width="80px"> <el-form ref="form1" :model="form1" label-width="150px">
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<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"></el-input> <el-input v-model="form1.name"></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-select
v-model="types"
placeholder="请选择化妆品类型"
@change="changeType"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> </el-form-item
></el-col>
<!-- <el-col :span="7">
<el-form-item label="备案编码"> <el-form-item label="备案编码">
<el-input v-model="form1.name"></el-input> <el-input v-model="form1.name"></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.a1"></el-input> <el-input v-model="form1.a1"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
</div> </div>
<el-row>
<el-col :span="7">
<el-form-item label="化妆品类型">
<el-select
v-model="types"
placeholder="请选择化妆品类型"
@change="changeType"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> </el-form-item
></el-col>
</el-row>
</el-form> </el-form>
<div class="footBox"> <div class="footBox">
<el-button icon="el-icon-refresh-left" @click="reset"></el-button> <el-button icon="el-icon-refresh-left" @click="reset"></el-button>
@ -161,7 +159,8 @@ export default {
methods: { methods: {
// //
toDetail(e) { toDetail(e) {
console.log(e); // console.log(e);
this.$router.push(`/cosmeticsDetail`)
}, },
// //
searchList() { searchList() {
@ -242,8 +241,8 @@ export default {
} }
}, },
async changeType(e) { async changeType(e) {
this.reset() this.reset();
this.getData(e) this.getData(e);
}, },
}, },
}; };
@ -281,7 +280,7 @@ export default {
} }
.tabs { .tabs {
width: 100%; width: 100%;
height: 30%; height: 25%;
background: #fff; background: #fff;
} }
} }
@ -294,7 +293,7 @@ export default {
text-align: center; text-align: center;
} }
.tabsBottom { .tabsBottom {
height: 70%; height: 75%;
padding-top: 10px; padding-top: 10px;
.foot-main { .foot-main {
height: 100%; height: 100%;

@ -1,549 +1,228 @@
<template> <template>
<div class="container"> <div class="container">
<div class="right-content"> <div class="tabs">
<div class="tabs"> <div class="headerText">
<el-tabs v-model="activeName" style="color: #edeef0"> <div class="searchP">查询条件</div>
<el-tab-pane label="查询条件" name="first"> </div>
<div class="screen"> <el-form ref="form1" :model="form1">
<div class="task-name"> <div style="margin-top: 10px">
<span class="task-name-text">产品名称</span> <el-row>
<div class="task-input"> <el-col :span="10">
<el-input <el-form-item
v-model="queryCondition.fullTextSearch" label="产品名称或者注册证编号或备案编号"
placeholder="请输入内容" label-width="230px"
></el-input> >
</div> <el-input v-model="form1.name"></el-input>
</div> </el-form-item>
<div class="task-name"> </el-col>
<span class="task-name-text">注册证号/备案号</span> <el-col :span="10">
<div class="task-input"> <el-form-item label="产品管理类别" label-width="130px">
<el-input <el-select v-model="form1.cplb" placeholder="请选择产品类别">
v-model="queryCondition.firmName" <el-option
placeholder="请输入内容" v-for="item in options"
></el-input> :key="item.value"
</div> :label="item.label"
</div> :value="item.label"
<div class="task-name">
<span class="task-name-text">生产企业</span>
<div class="task-input">
<el-input
v-model="queryCondition.approvalNumber"
placeholder="请输入内容"
></el-input>
</div>
</div>
<div class="btn">
<el-button size="mini" icon="el-icon-refresh-left"
>重置</el-button
>
<el-button size="mini" type="primary" icon="el-icon-search"
>查询</el-button
>
</div>
</div>
</el-tab-pane>
</el-tabs>
<div class="tabsTwo" :style="tabsTwoStyle">
<el-tabs v-model="activeName" style="color: #edeef0">
<el-tab-pane label="医疗器械列表" name="first">
<div class="daochu">
<div class="btn">导出</div>
</div>
<div class="mytable">
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
border
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
header-align="center"
class-name="column-text-one"
width="44"
>
</el-table-column>
<el-table-column label="序号" width="50">
<template slot-scope="scope">{{ scope.row.date }}</template>
</el-table-column>
<el-table-column prop="name" label="产品名称">
</el-table-column>
<el-table-column
prop="firmName"
label="注册证号/备案号"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="firmName"
label="生产企业"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="address" label="操作" width="180">
<template slot-scope="scope">
<div class="button">
<el-button
size="mini"
type="primary"
class="xiangqing"
plain
@click="handleEdit(scope.$index, scope.row)"
>详情</el-button
>
<el-button
size="mini"
type="primary"
class="bianji"
plain
@click="handleView(scope.$index, scope.row)"
>编辑</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<!-- <span class="custom"
>{{ total }}显示{{
total == 0
? "0"
: queryCondition.current == 1
? "1"
: queryCondition.size * (queryCondition.current - 1) + 1
}}-{{ numberMap() }}</span
> -->
<span class="custom"> 共100条显示1-10 </span>
<el-pagination
background
:page-sizes="[10, 15]"
:total="total"
layout=" prev, pager, next, sizes, jumper"
@current-change="currentChange"
@size-change="sizeChange"
:current-page.sync="currentPage"
:page-size.sync="pageSize"
> >
</el-pagination> </el-option>
</div> </el-select>
</div> </el-form-item>
</el-tab-pane> </el-col>
</el-tabs> </el-row>
</div> </div>
</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>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
drugnum: "(20)", //===========
activeName: "first", loading: false,
queryCondition: { tableData: [],
fullTextSearch: "", // total: 0,
firmName: "", // options: [
approvalNumber: "", //
taskName: "", //
PrescriptionContent: "", //
majorFunction: "", //
startTime: "", //
endTime: "", //
checkList: [],
checkListTwo: [],
},
tableData: [
{
date: "1",
name: "辽-xxxx",
type: "药品",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{
date: "2",
name: "辽-aaaa",
type: "医疗器械",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{ {
date: "3", value: 1,
name: "辽-zzzz", label: "第一类",
type: "化妆品",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
}, },
{ {
date: "4", value: 2,
name: "辽-qqqq", label: "第二类",
type: "药品",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{
date: "5",
name: "辽-xxxx",
type: "医疗器械",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{
date: "6",
name: "辽-aaaa",
type: "化妆品",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{
date: "7",
name: "辽-zzzz",
type: "药品",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{
date: "8",
name: "辽-qqqq",
type: "医疗器械",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{
date: "9",
name: "辽-xxxx",
type: "化妆品",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
},
{
date: "10",
name: "辽-aaaa",
type: "药品",
approvalNumber: "12421432143214321",
firmName: "XXX有限公司",
}, },
], ],
tabsTwoStyle: { form1: {
height: "", cplb: "",
name: "",
size: 10,
current: 1,
}, },
multipleSelection: [],
total: 100,
currentPage: 1,
pageSize: 10,
}; };
}, },
mounted() { mounted() {},
document.getElementsByClassName( created() {
"el-pagination__jump" this.chinaCosmetics();
)[0].childNodes[0].nodeValue = "跳至";
this.$nextTick(() => {
let dom = document.getElementsByClassName("tabsTwo");
let height = dom[0].getBoundingClientRect();
// let windowWidth = window.innerWidth;
let windowHeight = window.innerHeight;
let relativeHeight = windowHeight - height.top;
this.tabsTwoStyle.height = relativeHeight + "px";
});
}, },
methods: { methods: {
handleSelectionChange(val) { //
this.multipleSelection = val; toDetail(e) {
console.log(e);
}, },
currentChange(val) {}, //
sizeChange(val) {}, searchList() {
// this.chinaCosmetics();
handleEdit(index, row) { },
console.log(index); getPagination(e) {
this.$router.push({ name: "productInfo" }); 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;
}, },
//
handleView(index, row) {},
}, },
}; };
</script> </script>
<style lang="scss" scoped>
<style lang="scss" scoped>
::v-deep .el-select {
width: 100% !important;
}
.container { .container {
height: 100%; height: 100%;
box-sizing: border-box; // overflow: auto;
display: flex;
align-items: center;
background: #f2f2f2; background: #f2f2f2;
// padding: 10px;
& > div { .headerText {
flex: 1; width: 100%;
height: 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;
}
}
} }
& > div:nth-child(2) { .tabs {
flex: 2; width: 100%;
margin: 0 10px; height: 25%;
background: #fff;
} }
.middle { }
//===================
::v-deep .el-button--medium {
padding: 8px;
}
.footBox {
width: 100%;
text-align: center;
}
.tabsBottom {
height: 75%;
padding-top: 10px;
.foot-main {
height: 100%; height: 100%;
background: #ffff; // min-height: 600px;
border-radius: 8px; width: 100%;
overflow: hidden; background: white;
}
.left,
.right {
display: flex;
flex-direction: column;
align-items: center;
& > div {
width: 100%;
border-radius: 8px;
flex: 1;
background: #ffffff;
}
} }
.right-content { }
background-color: #fff; .exportBtn {
::v-deep .el-tabs__header { padding: 10px 20px;
margin: 0; }
.el-tabs__nav-scroll { .table-box {
padding-left: 15px; padding: 0 20px;
padding-top: 3px; .table-item {
}
.el-tabs__item {
font-size: 18px;
font-family: Source Han Sans SC-Bold, Source Han Sans SC;
font-weight: bold;
color: #323233;
}
.el-tabs__active-bar {
background-color: #1349c5;
height: 2px;
border-radius: 0px 0px 0px 0px;
}
}
.tabs {
background: #f2f2f2;
box-shadow: 0px 0px 12px 0px rgba(194, 212, 226, 0.64);
border-radius: vw(10);
min-height: 88vh;
// padding-top: 3px;
// padding-left: 15px;
::v-deep .el-tabs {
background-color: #fff;
}
}
.screen {
padding: 15px 0 26px 28px;
display: flex;
flex-wrap: wrap;
align-items: center;
.task-name {
display: flex;
align-items: center;
margin-right: 30px;
.task-name-text {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #6a6c6f;
line-height: 50px;
// margin-right: vw(10);
}
.task-input {
width: 251px;
height: 32px;
::v-deep .el-input {
width: 251px;
height: 32px;
}
::v-deep .el-input__inner {
width: 100%;
height: 100%;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
// color: #B1B6BF;
line-height: 50px;
padding-left: 15px;
}
}
}
.checkbox-group-name {
width: 695px;
}
.btn {
width: 100%;
// padding-left: 600px;
text-align: center;
margin-top: 15px;
}
.time-interval {
display: flex;
align-items: center;
margin-right: 20px;
.interval-text {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #6a6c6f;
// line-height: 50px;
// margin-right: vw(10);
}
.interval-select {
display: flex;
align-items: center;
border: 1px solid #dbe0e8;
border-radius: 4px;
height: 32px;
.star-time,
.end-time {
position: relative;
.data_icon {
position: absolute;
top: 50%;
right: 17px;
z-index: 9;
color: #c0c4cc;
font-size: 14px;
transform: translateY(-50%);
}
::v-deep .el-input__prefix {
display: none;
}
::v-deep .el-input {
width: 243px;
height: 30px;
}
::v-deep .el-input__inner {
width: 100%;
height: 100%;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
// color: #B1B6BF;
line-height: 30px;
padding-left: 15px;
border: none;
cursor: pointer;
}
}
.symbol {
background: rgba(219, 224, 232, 0.5);
width: 40px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #292f38;
line-height: 28px;
}
}
}
}
.tabsTwo {
margin: 10px 0;
overflow-y: scroll;
// padding: 10px 0;
padding-bottom: 20px;
background-color: #fff;
.daochu {
padding: 10px;
.btn {
display: flex;
justify-content: center;
width: 64px;
height: 32px;
background: #1e80eb;
border-radius: 4px 4px 4px 4px;
font-size: 14px;
font-family: MicrosoftYaHei-, MicrosoftYaHei;
font-weight: normal;
color: #ffffff;
line-height: 31px;
}
}
.mytable {
width: 99%;
margin: 0 auto;
::v-deep .column-text-one {
text-align: center;
}
::v-deep .el-table td {
height: 40px;
padding: 0;
}
::v-deep .el-table th {
height: 40px;
padding: 0;
font-size: 14px;
font-family: Source Han Sans SC-Medium, Source Han Sans SC;
font-weight: bold;
color: #292f38;
line-height: 36px;
}
.button {
display: flex;
align-items: center;
.xiangqing {
height: 23px;
padding: 3px;
border-radius: 4px;
line-height: 20px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 5px;
background: #ebf5ff;
border: 1px solid #a1cbf8;
::v-deep span {
display: inline-block;
color: #0e7cf4;
}
}
.bianji {
height: 23px;
padding: 3px;
border-radius: 4px;
line-height: 20px;
display: flex;
justify-content: center;
align-items: center;
background: #ffefe3;
border: 1px solid #ffc89f;
::v-deep span {
display: inline-block;
color: #f88129;
}
}
}
}
.pagination {
margin-top: 17px;
display: flex;
align-items: center;
justify-content: space-between;
// padding-bottom: vh(20);
::v-deep .el-pagination__jump {
margin: 0;
}
.custom {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #292f38;
line-height: 18px;
}
}
}
.tabsTwo::-webkit-scrollbar {
display: none;
}
} }
} }
</style> .pagination {
display: flex;
justify-content: space-between;
padding: 15px 20px;
}
</style>

@ -48,6 +48,13 @@ module.exports = {
"^/configApi": "", "^/configApi": "",
}, },
}, },
"/api": {
target: "https://dev-mssm-liaoning.imian.org.cn",
changeOrigin: true,
pathRewrite: {
["api"]: "",
},
},
}, },
disableHostCheck: true, disableHostCheck: true,
}, },

Loading…
Cancel
Save