Commit 04cd62e7 authored by 何鹏程's avatar 何鹏程

完成新功能

parent c8652e84
...@@ -3,5 +3,5 @@ const merge = require('webpack-merge') ...@@ -3,5 +3,5 @@ const merge = require('webpack-merge')
const prodEnv = require('./prod.env') const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"' NODE_ENV: '"development"',
}) })
...@@ -5,13 +5,10 @@ module.exports = { ...@@ -5,13 +5,10 @@ module.exports = {
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/',
proxyTable: { proxyTable: {
'/api': { '/mdxtpt/teamwork/api': {
// target: 'http://172.16.15.117:8084/', // 开发环境 // target: 'http://172.16.15.117:8084/', // 开发环境
target: 'http://122.51.94.140/mdxtpt/teamwork/', // 远程开发环境 target: 'http://122.51.94.140/', // 远程开发环境
changeOrigin: true, changeOrigin: true
pathRewrite: {
'^/api': '/api'
}
} }
}, },
host: '0.0.0.0', host: '0.0.0.0',
......
'use strict' 'use strict'
module.exports = { module.exports = {
NODE_ENV: '"production"', NODE_ENV: '"production"'
// BASE_API: '"http://40.1.2.84/teamwork/"' // 测试环境
// BASE_API: '"http://122.51.94.140/mdxtpt/teamwork/"' // 远程开发环境
// BASE_API: '"http://40.4.6.250:9002/mdxtpt/teamwork/"' // 线上环境
// BASE_API: '"http://10.88.26.49:82/mdxtpt/teamwork/"' // 线上环境
// BASE_API: '"http://88.3.201.57:82/mdxtpt/teamwork/"' // 专网环境
// BASE_API: '"http://10.88.26.49:82/mdxtpt/teamwork/"' // 专网环境2
// BASE_API: '"/teamwork/"'// 开发环境
} }
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<!-- <script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script> --> <!-- <script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script> -->
<!-- 引入百度DuGIS --> <!-- 引入百度DuGIS -->
<!-- 打包后修改引入地址 /mdxtpt/static/config.js --> <!-- 打包后修改引入地址 /mdxtpt/static/config.js -->
<script type="text/javascript" src="/static/config.js"></script>
</head> </head>
<body> <body>
......
This diff is collapsed.
import request from '../util/ajax'
export function loginByWrite(params) {
return request({
url: '/api/team/loginByWrite',
method: 'POST',
data: params
})
}
export function queryHospitalByName(name = "") {
return request({
url: '/api/team/hospital/queryHospitalByName',
method: 'GET',
params: {
name: name
}
})
}
\ No newline at end of file
...@@ -24,3 +24,10 @@ export function deleteScreeningById(params) { ...@@ -24,3 +24,10 @@ export function deleteScreeningById(params) {
}) })
} }
export function toExamineScreening(params) {
return request({
url: '/api/team/screening/toExamineScreening',
method: 'POST',
data: params
})
}
\ No newline at end of file
...@@ -9,7 +9,6 @@ import store from './store' ...@@ -9,7 +9,6 @@ import store from './store'
import axios from './util/ajax' import axios from './util/ajax'
import checkPermission from './util/permission' import checkPermission from './util/permission'
import 'sysStatic/css/theme-default-new.scss' import 'sysStatic/css/theme-default-new.scss'
//import '../mock/index.js'
import './components/install' import './components/install'
import { import {
message message
......
...@@ -229,12 +229,13 @@ export default { ...@@ -229,12 +229,13 @@ export default {
var a = document.createElement('a') var a = document.createElement('a')
let href = "", fileName = '' let href = "", fileName = ''
if (this.activeTab == '1') { if (this.activeTab == '1') {
href = "/static/xls/chest.xls" href = "/mdxtpt/static/xls/chest.xls"
fileName = "胸痛上报模板.xls" fileName = "胸痛上报模板.xls"
} else if (this.activeTab == '2') { } else if (this.activeTab == '2') {
href = "/static/xls/stroke.xls" href = "/mdxtpt/static/xls/stroke.xls"
fileName = "卒中上报模板.xls" fileName = "卒中上报模板.xls"
} }
console.log(href)
a.href = href a.href = href
a.download = fileName a.download = fileName
a.style.display = 'none' a.style.display = 'none'
...@@ -246,7 +247,7 @@ export default { ...@@ -246,7 +247,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.InHosFirstAid{ .InHosFirstAid{
.el-input.is-disabled .el-input__inner{ .el-input.is-disabled .el-input__inner{
color:#606266; color:#606266;
......
...@@ -346,7 +346,7 @@ export default { ...@@ -346,7 +346,7 @@ export default {
return { return {
dialogVisible: false, dialogVisible: false,
loading: false, loading: false,
uploadUrl: (process.env.NODE_ENV === 'production' && window.global.BASE_API ? window.global.BASE_API : '') + '/api/team/base/uploadImage ', uploadUrl: '/mdxtpt/teamwork/api/team/base/uploadImage ',
formDisabled: false, formDisabled: false,
token: Auth.getLoginInfo(), token: Auth.getLoginInfo(),
dataForm: { dataForm: {
...@@ -436,6 +436,7 @@ export default { ...@@ -436,6 +436,7 @@ export default {
this.areaList = res.area this.areaList = res.area
this.vechieSpecialPurposeList = res.vechie_special_purpose this.vechieSpecialPurposeList = res.vechie_special_purpose
}) })
console.log(process.env.NODE_ENV)
}, },
methods: { methods: {
resetForm(formName) { resetForm(formName) {
......
<template>
<el-dialog
title="单位信息及人员信息登记"
:visible.sync="dialogVisible"
width="800px"
:show-close="false"
:close-on-click-modal="false"
>
<el-form
ref="dataForm"
:model="dataForm"
size="small"
label-width="150px"
:rules="rules"
v-loading="loading"
>
<el-row>
<el-col :span="12">
<el-form-item
label="单位全称:"
prop="hospitalName"
>
<el-input
placeholder="请输入单位全称"
v-model="dataForm.hospitalName"
@blur="blurHandle"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="所属辖区:"
prop="area"
>
<el-select
v-model="dataForm.area"
placeholder="请选择辖区"
style="width: 100%"
>
<el-option
v-for="item in areaList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="单位性质:"
prop="unitType"
>
<el-radio-group
class="radio-group-type1"
v-model="dataForm.unitType"
>
<el-radio :label="1">公立医疗</el-radio>
<el-radio :label="2">民营医院</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="机构等级:"
prop="hospitalStep"
>
<el-select
v-model="dataForm.hospitalStep"
placeholder="请选择医院等级"
style="width: 100%"
>
<el-option
v-for="item in hospitalGradeList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="负责人:"
prop="name"
>
<el-input
placeholder="请输入负责人姓名"
v-model="dataForm.name"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="性别:"
prop="sex"
>
<el-radio-group
class="radio-group-type1"
v-model="dataForm.sex"
>
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="负责人11位手机号:"
prop="cellphone"
>
<el-input
placeholder="请输入手机号"
v-model="dataForm.cellphone"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="备注:"
prop="remark"
>
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入备注"
v-model="dataForm.remark"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span
slot="footer"
class="dialog-footer"
>
<el-button
type="primary"
size="small"
@click="submitForm()"
>确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { getDic } from '../../util/dict'
import store from '../../store'
import { loginByWrite, queryHospitalByName } from '@/api/info'
export default {
data() {
const checkContactPhone = (rule, value, callback) => {
let reg = /^[1][3,4,5,7,8,9][0-9]{9}$/;
if (!reg.test(value)) {
callback(new Error("请输入正确格式的联系方式"))
} else {
callback()
}
};
return {
dialogVisible: true,
loading: false,
areaList: [],
dataForm: {
hospitalStep: '',
area: '',
unitType: '',
},
rules: {
hospitalName: [
{ required: true, message: '请输入单位全称' },
],
area: [
{ required: true, message: '请选择辖区' },
],
unitType: [
{ required: true, message: '请选择单位性质' },
],
hospitalStep: [
{ required: true, message: '请选择医院等级' },
],
name: [
{ required: true, message: '请输入负责人姓名' },
],
sex: [
{ required: true, message: '请选择性别' },
],
cellphone: [
{ required: true, message: '请输入负责人联系方式' },
{ validator: checkContactPhone }
],
},
hospitalGradeList: []
}
},
mounted() {
// 获取字典
getDic(['area', 'hospital_grade']).then(res => {
this.areaList = res.area
this.hospitalGradeList = res.hospital_grade
})
},
methods: {
submitForm() {
this.$refs.dataForm.validate((valid) => {
if (valid) {
const params = {
...this.dataForm
}
loginByWrite(params).then(res => {
if (res.msg === 201) {
// this.dialogVisible = false
this.$message.success('登记成功')
store.dispatch('saveLoginMsg', res)
this.$router.push('/')
} else {
this.$message.error(res.content)
}
})
}
})
},
blurHandle() {
if (!this.dataForm.hospitalName) {
return
}
queryHospitalByName(this.dataForm.hospitalName).then(res => {
if (res.respData) {
this.dataForm.hospitalStep = res.respData.hospitalStep
this.dataForm.area = res.respData.area
// this.dataForm.unitType = res.respData.unitType
}
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
<div class="bt"> <div class="bt">
<el-button <el-button
type="primary" type="primary"
v-if="!checkPermission()"
size="small" size="small"
@click="showSaveDialog()" @click="showSaveDialog()"
>新增</el-button> >新增</el-button>
...@@ -114,12 +115,19 @@ ...@@ -114,12 +115,19 @@
>查看详情</el-link> >查看详情</el-link>
<el-link <el-link
type="primary" type="primary"
v-if="!checkPermission()"
@click="showSaveDialog('update', scope.row)" @click="showSaveDialog('update', scope.row)"
>修改</el-link> >修改</el-link>
<el-link <el-link
type="primary" type="primary"
v-if="!checkPermission()"
@click="delHandler(scope.row.id)" @click="delHandler(scope.row.id)"
>删除</el-link> >删除</el-link>
<el-link
type="primary"
v-if="(scope.row.auditStatus === 1 || scope.row.auditStatus === 5) && checkPermission()"
@click="auditHandler(scope.row.id)"
>审核</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -135,7 +143,7 @@ ...@@ -135,7 +143,7 @@
<script> <script>
import { tableDataMixin } from '../../common/js/mixin' import { tableDataMixin } from '../../common/js/mixin'
import { queryHospitalList } from '@/api/common' import { queryHospitalList } from '@/api/common'
import { queryScreeningPageList, deleteScreeningById } from '@/api/screenTaskStatistics' import { queryScreeningPageList, deleteScreeningById, toExamineScreening } from '@/api/screenTaskStatistics'
import SaveDialog from './components/saveDialog.vue' import SaveDialog from './components/saveDialog.vue'
import { getDic } from '../../util/dict' import { getDic } from '../../util/dict'
export default { export default {
...@@ -261,7 +269,31 @@ export default { ...@@ -261,7 +269,31 @@ export default {
this.search() this.search()
}) })
}) })
} },
auditHandler(id) {
this.$confirm('是否审批通过?', '提示', {
confirmButtonText: '通过',
cancelButtonText: '拒绝',
distinguishCancelAndClose: true,
type: 'warning'
}).then(() => {
this.auditData(id, 2)
}).catch(action => {
if (action === 'cancel') {
this.auditData(id, 3)
}
})
},
auditData(id, auditStatus) {
toExamineScreening({ id: id, auditStatus: auditStatus }).then(res => {
if (res.msg === 201) {
this.$message.success('操作成功!')
} else {
this.$message.error(res.content)
}
this.search()
})
},
} }
} }
</script> </script>
......
...@@ -44,12 +44,13 @@ router.beforeEach((to, from, next) => { ...@@ -44,12 +44,13 @@ router.beforeEach((to, from, next) => {
const routers = router.getRoutes() const routers = router.getRoutes()
const menu = store.getters.menuMap const menu = store.getters.menuMap
const userInfo = store.getters.userInfo const userInfo = store.getters.userInfo
// console.log('router', routers) console.log('router', routers)
console.log('router', staticRoute)
// console.log('token', token) // console.log('token', token)
// console.log('_token', _token) // console.log('_token', _token)
// console.log('userInfo', userInfo) // console.log('userInfo', userInfo)
// console.log('menu', menu) // console.log('menu', menu)
if ((token && token !== _token) || (_token && (routers.length === 8 || !menu || !userInfo))) { //新用户登或重新登录 if ((token && token !== _token) || (_token && (routers.length === 9 || !menu || !userInfo))) { //新用户登或重新登录
console.log('拉取用户数据') console.log('拉取用户数据')
store.dispatch('LoginByToken', token || _token).then(res => { store.dispatch('LoginByToken', token || _token).then(res => {
// const { // const {
...@@ -76,7 +77,7 @@ router.beforeEach((to, from, next) => { ...@@ -76,7 +77,7 @@ router.beforeEach((to, from, next) => {
console.log('该页面无需登录即可访问') console.log('该页面无需登录即可访问')
next() next()
} else { } else {
if (routers.length > 8 && _token && menu && userInfo) { if (routers.length > 9 && _token && menu && userInfo) {
console.log('有数据无需登录') console.log('有数据无需登录')
next() next()
} else { } else {
......
...@@ -31,6 +31,10 @@ const staticRoute = [ ...@@ -31,6 +31,10 @@ const staticRoute = [
path: '/bigscreen', path: '/bigscreen',
component: () => import('../page/bigscreen/index') component: () => import('../page/bigscreen/index')
}, },
{
path: '/info',
component: () => import('../page/info/index')
},
{ {
path: '/business/hospital/detail', path: '/business/hospital/detail',
component: () => import('../page/hospital/detail') component: () => import('../page/hospital/detail')
......
// 免登录白名单页面 // 免登录白名单页面
const whiteList = [ const whiteList = [
'/info',
'/error/401', '/error/401',
'/error/403', '/error/403',
'/error/404', '/error/404',
......
...@@ -30,6 +30,24 @@ export const saveUserInfo = function({ ...@@ -30,6 +30,24 @@ export const saveUserInfo = function({
commit(types.SET_USERINFO, Cache.setUserInfo(data)) commit(types.SET_USERINFO, Cache.setUserInfo(data))
} }
export const saveLoginMsg = function({
commit
}, data) {
const {
menuMap: {
parentMenuList
},
token,
noLoginStr,
userDto
} = data.respData;
commit(types.SET_MENUMAP, Cache.setMenuMap(parentMenuList))
commit(types.SET_USERINFO, Cache.setUserInfo(userDto))
Auth.setLoginInfo(token)
Auth.setNoLoginStr(noLoginStr)
router.addRoutes(routeHandle(parentMenuList))
}
export const LoginByToken = function({ export const LoginByToken = function({
commit commit
}, data) { }, data) {
...@@ -48,6 +66,7 @@ export const LoginByToken = function({ ...@@ -48,6 +66,7 @@ export const LoginByToken = function({
await commit(types.SET_MENUMAP, Cache.setMenuMap(parentMenuList)) await commit(types.SET_MENUMAP, Cache.setMenuMap(parentMenuList))
await commit(types.SET_USERINFO, Cache.setUserInfo(userDto)) await commit(types.SET_USERINFO, Cache.setUserInfo(userDto))
Auth.setLoginInfo(token) Auth.setLoginInfo(token)
Auth.clearNoLoginStr()
router.addRoutes(routeHandle(parentMenuList)) router.addRoutes(routeHandle(parentMenuList))
resolve() resolve()
} else { } else {
......
...@@ -18,8 +18,7 @@ import { ...@@ -18,8 +18,7 @@ import {
const service = axios.create({ const service = axios.create({
// 请求超时时间 // 请求超时时间
timeout: 30000, timeout: 30000,
// baseURL: process.env.NODE_ENV === 'production' && process.env.BASE_API ? process.env.BASE_API : '', baseURL: '/mdxtpt/teamwork/'
baseURL: process.env.NODE_ENV === 'production'? window.global.BASE_API : ''
}) })
// http request 拦截器 // http request 拦截器
...@@ -29,6 +28,11 @@ service.interceptors.request.use( ...@@ -29,6 +28,11 @@ service.interceptors.request.use(
if (Auth.getLoginInfo()) { if (Auth.getLoginInfo()) {
config.headers['token'] = Auth.getLoginInfo() config.headers['token'] = Auth.getLoginInfo()
}; };
if (Auth.getNoLoginStr()) {
config.headers['noLoginStr'] = Auth.getNoLoginStr()
};
if(config.url==`/api/team/importExcel/uploadExcel`){ //上传文件接口 if(config.url==`/api/team/importExcel/uploadExcel`){ //上传文件接口
config.headers['productType']=config.data.get('productType'); config.headers['productType']=config.data.get('productType');
}; };
...@@ -43,9 +47,9 @@ service.interceptors.request.use( ...@@ -43,9 +47,9 @@ service.interceptors.request.use(
service.interceptors.response.use( service.interceptors.response.use(
response => { response => {
if (response.data && response.data.msg && response.data.msg === 303) { if (response.data && response.data.msg && response.data.msg === 303) {
if (window.global.URL_303) { // if (window.global.URL_303) {
window.location.href = window.global.URL_303 // window.location.href = window.global.URL_303
} // }
} }
return Promise.resolve(response.data) return Promise.resolve(response.data)
}, },
......
...@@ -41,9 +41,9 @@ const Auth = { ...@@ -41,9 +41,9 @@ const Auth = {
setLoginInfo: function(obj) { setLoginInfo: function(obj) {
// TODO: 设置超时登录时间,在该时间范围内没有任何请求操作则自动删除 // TODO: 设置超时登录时间,在该时间范围内没有任何请求操作则自动删除
var maxAge = new Date(new Date().getTime() + 30 * 60 * 1000) var maxAge = new Date(new Date().getTime() + 30 * 60 * 1000)
// Cookies.set(this.loginKey, obj, { Cookies.set(this.loginKey, obj, {
// expires: maxAge expires: maxAge
// }) })
Cookies.set(this.loginKey, obj) Cookies.set(this.loginKey, obj)
return obj return obj
}, },
...@@ -51,6 +51,21 @@ const Auth = { ...@@ -51,6 +51,21 @@ const Auth = {
// 移除登录状态 // 移除登录状态
clearLoginInfo: function() { clearLoginInfo: function() {
Cookies.remove(this.loginKey) Cookies.remove(this.loginKey)
},
// 免登录
getNoLoginStr: function() {
return Cookies.get('noLoginStr')
},
// 设置登录状态
setNoLoginStr: function(obj) {
Cookies.set('noLoginStr', obj)
return obj
},
clearNoLoginStr: function() {
Cookies.remove('noLoginStr')
} }
} }
......
...@@ -9,5 +9,6 @@ window.global = { ...@@ -9,5 +9,6 @@ window.global = {
// MAP_URL: 'http://40.1.2.251:8219/bmapgl/', // 测试环境地图地址 // MAP_URL: 'http://40.1.2.251:8219/bmapgl/', // 测试环境地图地址
// MAP_URL: 'http://88.252.0.251:8022/bmapgl/?path=gateway', // 专网环境地图地址 // MAP_URL: 'http://88.252.0.251:8022/bmapgl/?path=gateway', // 专网环境地图地址
MAP_URL: '', MAP_URL: '',
URL_303: '' URL_303: '',
FILE_URL: '/mdxtpt', //文件下载路径
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment