Commit d69a7042 authored by 何鹏程's avatar 何鹏程

完成新需求

parent 04cd62e7
......@@ -9,7 +9,12 @@ module.exports = {
// target: 'http://172.16.15.117:8084/', // 开发环境
target: 'http://122.51.94.140/', // 远程开发环境
changeOrigin: true
}
},
'/mdxtpt/mdImage': {
// target: 'http://172.16.15.117:8084/', // 开发环境
target: 'http://122.51.94.140/', // 远程开发环境
changeOrigin: true
},
},
host: '0.0.0.0',
port: 8086,
......
<template>
<el-upload
class="upload-demo"
:action="uploadUrl"
:before-upload="beforeHandle"
:on-preview="previewHandle"
:on-remove="removeHandle"
:limit="5"
multiple
:on-success="successHandle"
:file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传5个文件,且不超过100M</div>
</el-upload>
</template>
<script>
export default {
data() {
return {
uploadUrl: '/mdxtpt/teamwork/api/team/base/uploadImage',
fileList: []
}
},
props: {
setFileList: {
type: Array,
default: null
}
},
watch:{
setFileList: function(val) {
this.fileList = val || []
}
},
methods: {
beforeHandle(file) {
const isLt500M = file.size / 1024 / 1024 < 500;
if (!isLt500M) {
this.$message.error('上传文件大小不能超过 500MB!');
}
return isLt500M
},
successHandle(res, file) {
if (res.msg === 201 && file.name && file.response && file.response.respData) {
this.fileList.push({
name: file.name,
url: file.response.respData
})
} else {
this.$message.error(res.content)
}
console.log(file, this.fileList)
},
previewHandle(file) {
var a = document.createElement('a')
a.href = file.url
a.download = file.name
a.style.display = 'none'
document.body.appendChild(a)
a.click()
a.remove()
},
removeHandle(file, fileList) {
this.fileList = fileList
},
getFileList() {
return this.fileList.map(item => {
return {
name: item.name,
url: item.url
}
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -287,6 +287,12 @@
v-model="dataForm.specialDeviceOther"
/>
</el-form-item>
<el-form-item
label="附件上传:"
prop="fileList"
>
<fileUpload :setFileList="fileList" ref="fileUpload" />
</el-form-item>
</el-col>
</el-row>
</el-form>
......@@ -312,6 +318,7 @@
import { getDic } from '../../../util/dict'
import { Auth } from '@/util/auth'
import { saveOrUpdateEmergencyCar, queryTeamEmergencyCarInfo } from '@/api/emergencyCar'
import fileUpload from '../../../components/fileUpload.vue'
export default {
name: 'emergencyCarDialog',
computed: {
......@@ -327,6 +334,9 @@ export default {
return str
}
},
components: {
fileUpload
},
data() {
const checkVechieUseStatus = (rule, value, callback) => {
if (value === 3 && !(this.dataForm.otherStatus)) {
......@@ -346,7 +356,8 @@ export default {
return {
dialogVisible: false,
loading: false,
uploadUrl: '/mdxtpt/teamwork/api/team/base/uploadImage ',
fileList: [],
uploadUrl: '/mdxtpt/teamwork/api/team/base/uploadImage',
formDisabled: false,
token: Auth.getLoginInfo(),
dataForm: {
......@@ -448,6 +459,7 @@ export default {
if (valid) {
const params = {
...this.dataForm,
fileList: this.$refs.fileUpload.getFileList(),
specialDevice: this.dataForm.specialDevice.join()
}
......@@ -479,6 +491,7 @@ export default {
...res.respData,
specialDevice: res.respData.specialDevice ? res.respData.specialDevice.split(',') : []
}
this.fileList = res.respData.fileList || []
this.$nextTick(() => {
this.loading = false
this.$refs.dataForm.clearValidate()
......@@ -499,6 +512,7 @@ export default {
},
closedHandler() {
this.$refs.dataForm.resetFields()
this.fileList = []
},
handleAvatarSuccess(res, file) {
if (res.msg === 201) {
......
......@@ -96,6 +96,12 @@
v-model="dataForm.emergencyName"
/>
</el-form-item>
<el-form-item
label="附件上传:"
prop="fileList"
>
<fileUpload :setFileList="fileList" ref="fileUpload" />
</el-form-item>
</el-form>
<formItem
labelWidth="150px"
......@@ -125,6 +131,7 @@
import { queryExtendConfig, queryHospitalList } from '@/api/common'
import { queryInfoById, addOrUpdateEmergencyExpert } from '@/api/expert'
import { mapGetters } from 'vuex'
import fileUpload from '../../../components/fileUpload.vue'
export default {
computed: {
title: function() {
......@@ -142,12 +149,16 @@ export default {
'userInfo'
])
},
components: {
fileUpload
},
data() {
return {
dialogVisible: false,
loading: false,
formDisabled: false,
selectLoading: false,
fileList: [],
hospitalList: [],
type: 'add',
dataForm: {
......@@ -197,6 +208,7 @@ export default {
queryInfoById({ id: id }).then(res => {
if (res.msg === 201) {
this.dataForm = res.respData || {}
this.fileList = res.respData.fileList || []
if (res.respData && res.respData.extendValueDtoList && res.respData.extendValueDtoList.length > 0) {
this.$refs.formItem.init(res.respData.extendValueDtoList)
} else {
......@@ -226,6 +238,7 @@ export default {
const params = {
...this.dataForm,
auditStatus: 1,
fileList: this.$refs.fileUpload.getFileList(),
// hospitalName: this.$refs.hospitalCode.query
hospitalCode: this.userInfo.hospitalCode,
hospitalName: this.userInfo.hospitalName
......@@ -252,6 +265,7 @@ export default {
},
closedHandler() {
this.$refs.dataForm.resetFields()
this.fileList = []
}
}
}
......
......@@ -139,6 +139,12 @@
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="附件上传:"
prop="fileList"
>
<fileUpload :setFileList="fileList" ref="fileUpload" />
</el-form-item>
</el-form>
<formItem
labelWidth="300px"
......@@ -168,6 +174,7 @@
import { queryHospitalList, queryExtendConfig } from '@/api/common'
import { queryInfoById, saveOrUpdateEmergencyGreenway } from '@/api/greenWay'
import { getDic } from '@/util/dict'
import fileUpload from '../../../components/fileUpload.vue'
import { mapGetters } from 'vuex'
export default {
computed: {
......@@ -186,6 +193,9 @@ export default {
'userInfo'
])
},
components: {
fileUpload
},
data() {
const checkGreenCenter = (rule, value, callback) => {
if (value.indexOf('1') > -1 && !(this.dataForm.chest)) {
......@@ -204,6 +214,7 @@ export default {
loading: false,
formDisabled: false,
selectLoading: false,
fileList: [],
dataForm: {
hospitalCode: '',
unitType: '',
......@@ -302,6 +313,7 @@ export default {
stroke: stroke,
greenCenter: greenCenter
}
this.fileList = res.respData.fileList || []
if (res.respData && res.respData.extendValueDtoList && res.respData.extendValueDtoList.length > 0) {
this.$refs.formItem.init(res.respData.extendValueDtoList)
} else {
......@@ -336,6 +348,7 @@ export default {
...this.dataForm,
auditStatus: 1,
greenCenter: greenCenter.join(),
fileList: this.$refs.fileUpload.getFileList(),
greenCenterSecond:greenCenterSecond,
// hospitalName: this.$refs.hospitalCode.query
hospitalCode: this.userInfo.hospitalCode,
......@@ -374,6 +387,7 @@ export default {
},
closedHandler() {
this.$refs.dataForm.resetFields()
this.fileList = []
}
}
}
......
......@@ -1569,6 +1569,12 @@
</el-checkbox-group>
</el-form-item>
</template>
<el-form-item
label="附件上传:"
prop="fileList"
>
<fileUpload :setFileList="fileList" ref="fileUpload" />
</el-form-item>
<div
v-if="type==='update' || type === 'add'"
style="height: 30px"
......@@ -1591,6 +1597,7 @@ import { queryDetail, savePreInfo } from '@/api/hospital'
import { queryHospitalList } from '@/api/common'
import { queryEmergencySiteList } from '@/api/site'
import { identityNumberCheck, onsetTimeLengthCheck, breathingCheck, pulseCheck, bodyTemperatureCheck, bloodOxygenSaturationCheck, bloodSugarCheck, heightCheck, weightCheck, bloodPressureCheck, burnAreaCheck } from '../../util/valid'
import fileUpload from '../../components/fileUpload.vue'
export default {
name: "detail",
data() {
......@@ -1617,6 +1624,7 @@ export default {
patientType: '1',//1.胸痛;2.卒中;3.创伤,4烧伤
type: '',
associationId: '',
fileList: [],
siteList: [],
hospitalList: [],
hospitalList2: [],
......@@ -1655,6 +1663,9 @@ export default {
mounted() {
this.init()
},
components: {
fileUpload
},
methods: {
init() {
this.patientType = this.$route.query.patientType || '1'
......@@ -1696,6 +1707,7 @@ export default {
firstAidMeasuresList: res.respData.firstAidMeasuresList || [],
eventType: res.respData.eventType ? res.respData.eventType.split(',') : []
}
this.fileList = res.respData.fileList || []
} else {
this.$message.error(res.content)
}
......@@ -1774,6 +1786,7 @@ export default {
});
const params = {
type: this.patientType,
fileList: this.$refs.fileUpload.getFileList(),
secret: this.secret
}
const formData = {
......
......@@ -75,6 +75,12 @@
<el-radio :label="3">医院急诊科</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="附件上传:"
prop="fileList"
>
<fileUpload :setFileList="fileList" ref="fileUpload" />
</el-form-item>
</el-form>
<formItem
labelWidth="150px"
......@@ -103,6 +109,7 @@
<script>
import { queryHospitalList, queryExtendConfig } from '@/api/common'
import { queryInfoById, addOrUpdateEmergencyMedical } from '@/api/medical'
import fileUpload from '../../../components/fileUpload.vue'
import { mapGetters } from 'vuex'
export default {
computed: {
......@@ -121,12 +128,16 @@ export default {
'userInfo'
])
},
components: {
fileUpload
},
data() {
return {
dialogVisible: false,
loading: false,
formDisabled: false,
type: 'add',
fileList: [],
dataForm: {
hospitalCode: '',
materialType: '',
......@@ -182,6 +193,7 @@ export default {
queryInfoById({ id: id }).then(res => {
if (res.msg === 201) {
this.dataForm = res.respData || {}
this.fileList = res.respData.fileList || []
if (res.respData && res.respData.extendValueDtoList && res.respData.extendValueDtoList.length > 0) {
this.$refs.formItem.init(res.respData.extendValueDtoList)
} else {
......@@ -211,6 +223,7 @@ export default {
const params = {
...this.dataForm,
auditStatus: 1,
fileList: this.$refs.fileUpload.getFileList(),
hospitalCode: this.userInfo.hospitalCode,
hospitalName: this.userInfo.hospitalName,
hospitalGrade: this.userInfo.hospitalGrade,
......@@ -248,6 +261,7 @@ export default {
},
closedHandler() {
this.$refs.dataForm.resetFields()
this.fileList = []
}
}
}
......
......@@ -182,7 +182,7 @@ export default{
console.log("数据准备好了,但dom没挂在完成")
}
var VoLis=(that.activeTab==1)?(that.gv(respData.chestVoList,[])):(that.gv(respData.strokeVoList,[]))
var kys=(that.activeTab==1)?([`diagnoseCount`,`sTEMICount`,`nSTEMICount`,`uACount`,`aorticCount`,`pulmonaryCount`,`unAcsCount`,`otherAcsCount`,`giveUpCount`,`otherCount`,`monthTotal`]):([`thrombolysisCount`,`operationCount`,`conservativeCount`,`monthTotal`]);
var kys=(that.activeTab==1)?([`diagnoseCount`,`sTEMICount`,`nSTEMICount`,`uACount`,`aorticCount`,`pulmonaryCount`,`unAcsCount`,`otherAcsCount`,`giveUpCount`,`otherCount`,`monthTotal`]):([`conservativeCount`,`thrombolysisCount`,`operationCount`,`fourCount`,`fiveCount`,`monthTotal`]);
var oAr=kys.map(function(){return [];});
var result=VoLis.reduce(function(prv,cur,index,arr){
prv.NameLis.push(cur.month);
......@@ -471,7 +471,7 @@ export default{
var that=this;
var title=that.activeTab==1?'胸痛病患数量趋势统计':'卒中病患数量趋势统计';
var colors=(that.activeTab==1)?([`#EA8E97`,`#E8AC63`,`#8AD7AF`,`#48959A`,`#8DCA86`,`#7094F2`,`#80B2F1`,`#4294EA`,`#4371BE`,`#3683B8`,`#1F71FF`]):([`#E8AC63`,`#8DCA86`,`#4294EA`,`#1F71FF`]);
var itemLis=(that.activeTab==1)?([`诊断中`,`STEMI`,`NSTEMI`,`UA`,`主动脉夹层`,`肺动脉栓塞`,`非ACS心源性胸痛`,`其他心源性胸痛`,`放弃治疗,病因未明`,`其他`,`总量`]):([`溶栓`,`手术`,`保守治疗`,`总量`]);
var itemLis=(that.activeTab==1)?([`诊断中`,`STEMI`,`NSTEMI`,`UA`,`主动脉夹层`,`肺动脉栓塞`,`非ACS心源性胸痛`,`其他心源性胸痛`,`放弃治疗,病因未明`,`其他`,`总量`]):([`脑梗死总数`,`脑出血总数`,`TIA总数`,`蛛网膜下腔出血总数`,`其他总数`,`总量`]);
var result=itemLis.reduce(function(prv,cur,index,orgarr){
var citem={name:cur,data:arr[index]};
let flag=index===(orgarr.length-1);
......
......@@ -98,6 +98,12 @@
/>
</el-select>
</el-form-item>
<el-form-item
label="附件上传:"
prop="fileList"
>
<fileUpload :setFileList="fileList" ref="fileUpload" />
</el-form-item>
</el-form>
<span
slot="footer"
......@@ -121,6 +127,7 @@
import { queryHospitalList } from '@/api/common'
import { addOrUpdateScreeningInfo } from '@/api/screenTaskStatistics'
import { getDic } from '../../../util/dict'
import fileUpload from '../../../components/fileUpload.vue'
// 是否正整数
function isNumber(obj) {
return typeof obj === 'number' && !isNaN(obj) && obj > 0
......@@ -148,7 +155,9 @@ export default {
return ''
}
},
components: {
fileUpload
},
data() {
return {
dialogVisible: false,
......@@ -156,6 +165,7 @@ export default {
selectLoading: false,
formDisabled: false,
areaList: [],
fileList: [],
centerType: '',
dataForm: {
hospitalCode: '',
......@@ -206,6 +216,7 @@ export default {
...row,
hospitalCode: row.hospitalCode
}
this.fileList = row.fileList || []
this.$nextTick(() => {
this.$refs.dataForm.clearValidate()
})
......@@ -231,6 +242,7 @@ export default {
const params = {
...this.dataForm,
hospitalName: hospital.hospitalName,
fileList: this.$refs.fileUpload.getFileList(),
completeRate: this.completeRate,
}
addOrUpdateScreeningInfo(params).then(res => {
......@@ -255,6 +267,7 @@ export default {
},
closedHandler() {
this.$refs.dataForm.resetFields()
this.fileList = []
}
}
}
......
......@@ -100,6 +100,12 @@
<el-radio :label="2">停用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="附件上传:"
prop="fileList"
>
<fileUpload :setFileList="fileList" ref="fileUpload" />
</el-form-item>
</el-form>
<span
slot="footer"
......@@ -124,6 +130,7 @@ import { queryEmergencySiteDtoById, saveOrUpdateEmergencySite } from '@/api/site
import { queryHospitalList } from '@/api/common'
import { getDic } from '@/util/dict'
import { mapGetters } from 'vuex'
import fileUpload from '../../../components/fileUpload.vue'
export default {
computed: {
title: function() {
......@@ -141,6 +148,9 @@ export default {
'userInfo'
])
},
components: {
fileUpload
},
data() {
return {
dialogVisible: false,
......@@ -148,6 +158,7 @@ export default {
formDisabled: false,
selectLoading: false,
type: 'add',
fileList: [],
dataForm: {
siteName: '',
area: '',
......@@ -204,6 +215,7 @@ export default {
queryEmergencySiteDtoById({ id: id }).then(res => {
if (res.msg === 201) {
this.dataForm = res.respData || {}
this.fileList = res.respData.fileList || []
this.$nextTick(() => {
this.loading = false
this.$refs.dataForm.clearValidate()
......@@ -226,6 +238,7 @@ export default {
const params = {
...this.dataForm,
auditStatus: 1,
fileList: this.$refs.fileUpload.getFileList(),
hospitalCode: this.userInfo.hospitalCode,
hospitalName: this.userInfo.hospitalName,
}
......@@ -266,6 +279,7 @@ export default {
},
closedHandler() {
this.$refs.dataForm.resetFields()
this.fileList = []
}
}
}
......
......@@ -44,13 +44,26 @@ router.beforeEach((to, from, next) => {
const routers = router.getRoutes()
const menu = store.getters.menuMap
const userInfo = store.getters.userInfo
console.log('router', routers)
console.log('router', staticRoute)
let staticRouteLength = 0
staticRoute.forEach(item => {
staticRouteLength ++
if (item.children && item.children.length > 0){
staticRouteLength += item.children.length
}
})
if (routers.length === staticRouteLength) {
router.addRoutes(routeHandle(menu))
next({
...to,
replace: true
})
return
}
// console.log('token', token)
// console.log('_token', _token)
// console.log('userInfo', userInfo)
// console.log('menu', menu)
if ((token && token !== _token) || (_token && (routers.length === 9 || !menu || !userInfo))) { //新用户登或重新登录
if ((token && token !== _token) || (_token && (routers.length === staticRouteLength || !menu || !userInfo))) { //新用户登或重新登录
console.log('拉取用户数据')
store.dispatch('LoginByToken', token || _token).then(res => {
// const {
......@@ -77,7 +90,7 @@ router.beforeEach((to, from, next) => {
console.log('该页面无需登录即可访问')
next()
} else {
if (routers.length > 9 && _token && menu && userInfo) {
if (routers.length > staticRouteLength && _token && menu && userInfo) {
console.log('有数据无需登录')
next()
} else {
......
No preview for this file type
No preview for this file type
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