Browse Source

修改

master
刘灿 7 months ago
parent
commit
c89aa0f9ed
  1. 2
      .env.development
  2. 2
      .env.production
  3. 4
      src/components/hm-crf/followUp.vue
  4. 103
      src/components/hm-crf/index.vue
  5. 2
      src/components/hm-crf/load_crf.vue
  6. 2
      src/components/hm-crf/preview.vue
  7. 2
      src/components/hm-crf/preview_dialog.vue
  8. 2
      src/components/user-logout/index.vue
  9. 2
      src/mixins/qgyCRFData.js
  10. 3
      src/mixins/urlAddress.js
  11. 50
      src/page-subspecialty/router/index.js
  12. 4
      src/page-subspecialty/views/article/index.vue
  13. 4
      src/page-subspecialty/views/articleList/index.vue
  14. 4
      src/page-subspecialty/views/editor/index.vue
  15. 6
      src/page-subspecialty/views/jmjlQuestionEyehistory/index.vue
  16. 2
      src/page-subspecialty/views/login/index.vue
  17. 4
      src/page-subspecialty/views/question/index.vue
  18. 6
      src/page-subspecialty/views/questionEyehistory/index.vue
  19. 13
      vue.config.js

2
.env.development

@ -1,3 +1,3 @@
NODE_ENV=development
# VUE_APP_NODE_ENV=dev
VUE_APP_LOGIN_URL='http://192.168.0.35:8028'
VUE_APP_LOGIN_URL='http://192.168.0.35:8001'

2
.env.production

@ -7,6 +7,8 @@ NODE_ENV=production
# 公司地址
# VUE_APP_LOGIN_URL='http://192.168.0.35:8028'
# 后缀 -- 公司内部环境打开
# VUE_APP_BASE_HOUZHUI='/hz_qg_wj'
# 部署到60上置空
VUE_APP_LOGIN_URL=''

4
src/components/hm-crf/followUp.vue

@ -74,7 +74,7 @@ export default {
this.crfDataVisible = false
// console.log(this.dataForm)
this.$nextTick(() => {
this.$http.get(`/quguang/visit/record/${this.dataForm.formId}`)
this.$http.get(`/hz_quguang/visit/record/${this.dataForm.formId}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -104,7 +104,7 @@ export default {
const ifrDoc = ifr.contentWindow.document || ifr.contentDocument
const body = ifrDoc.getElementsByTagName('body')[0]
const crfContent = body.innerHTML
this.$http.post('/quguang/visit/record/saveWriteVisit', {
this.$http.post('/hz_quguang/visit/record/saveWriteVisit', {
formContent: Base64.encode(crfContent),
// inputDate: this.inputDate,
id: this.dataForm.formId

103
src/components/hm-crf/index.vue

@ -1,6 +1,7 @@
<template>
<div id="tinymceContainer" ref="ceshi" class="tinymce-editor">
<editor v-if="isshow" :id="'myEditor' + editorIDName" v-model="myValue" :init="init" :disabled="disabled" @onClick="onClick" />
<editor v-if="isshow" :id="'myEditor' + editorIDName" v-model="myValue" :init="init" :disabled="disabled"
@onClick="onClick" />
</div>
</template>
@ -21,6 +22,7 @@ import 'tinymce/plugins/code'
import 'tinymce/plugins/print'
import 'tinymce/plugins/anchor'
import 'tinymce/plugins/quickbars'
import 'tinymce/plugins/link'
/**
* 自定义部分
@ -36,8 +38,10 @@ import './tinymce/plugins/hm_button'
import './tinymce/plugins/hm_indent2em/plugin'
import { isInclude } from './tinymce/plugins/hm_utils'
import urlAddress from '@/mixins/urlAddress'
import Cookies from 'js-cookie'
export default {
mixins: [urlAddress],
components: {
Editor
},
@ -60,12 +64,12 @@ export default {
},
plugins: {
type: [String, Array],
default: 'hminput hmcheckbox hmradio hmbutton quickbars print hmpreview lists image media table code letterspacing indent2em anchor'// paste contextmenu colorpicker textcolor
default: 'hminput hmcheckbox hmradio hmbutton quickbars link print hmpreview lists image media table code letterspacing indent2em anchor'// paste contextmenu colorpicker textcolor
},
toolbar: {
type: [String, Array],
default:
`undo redo | image | bold italic forecolor backcolor | letterspacing | fontsizeselect | fontselect| lineheight |
`undo redo | image | media | link | bold italic forecolor backcolor | letterspacing | fontsizeselect | fontselect| lineheight |
alignleft aligncenter alignright alignjustify |
bullist numlist outdent indent indent2em| hmpreview code`
},
@ -111,19 +115,86 @@ export default {
paste_data_images: true,
// images_upload_url: "/demo/eUpload.php",
images_upload_base_path: '', // "/demo/"
// linkimagemedia
file_picker_types: 'file image media',
// forced_root_block: '', // P
images_upload_handler: function(blobInfo, succFun, failFun) {
images_upload_handler: function (blobInfo, succFun, failFun) {
//
// blobInfo: blob
// succFun(url|string)
// failFun(string)
var file = blobInfo.blob()
var reader = new FileReader()
reader.onload = function(e) {
reader.onload = function (e) {
succFun(e.target.result)
}
reader.readAsDataURL(file)
},
//be used to add custom file picker to those dialogs that have it.
file_picker_callback: (callback, value, meta)=> {
let that = this
//
var filetype = '.pdf, .txt, .zip, .rar, .7z, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .mp3, .mp4';
//
var upurl = 'http://192.168.0.35:8028/hz_quguang/sys/user/saveUserImg';
//
switch (meta.filetype) {
// case 'image':
// filetype = '.jpg, .jpeg, .png, .gif';
// upurl = 'upimg.php';
// break;
case 'media':
filetype = '.mp3, .mp4';
upurl = this.url + '/hz_quguang/upload/uploadFile';
break;
case 'file':
default:
}
//input
var input = document.createElement('input');
input.setAttribute('type', 'file');
input.setAttribute('accept', filetype);
input.click();
input.onchange = function () {
var file = this.files[0];
var xhr, formData;
console.log(file.name);
xhr = new XMLHttpRequest();
xhr.withCredentials = false;
xhr.open('POST', upurl);
console.log('token',Cookies.get('qg-token'));
xhr.setRequestHeader('Authorization', 'Bearer ' + Cookies.get('qg-token')); // token
console.log('getAllResponseHeaders',xhr.getAllResponseHeaders()); // Authorization
xhr.onload = function () {
var json;
if (xhr.status != 200) {
console.log('HTTP Error: ' + xhr.status);
// failure('HTTP Error: ' + xhr.status);
return;
}
json = JSON.parse(xhr.responseText);
if (!json || typeof json.location != 'string') {
console.log('Invalid JSON: ' + xhr.responseText);
// failure('Invalid JSON: ' + xhr.responseText);
return;
}
callback(json.location);
};
formData = new FormData();
formData.append('file', file, file.name);
// that.$http({
// method: 'post',
// url: 'http://192.168.0.35:8028/hz_quguang/upload/uploadFile',
// headers: {
// 'Content-Type': 'multipart/form-data'
// },
// data: formData
// }).then((res) => {
// })
xhr.send(formData);
};
},
content_css: '/static/css/hmcrf.css',
setup: (editor) => {
editor.on('click', e => {
@ -164,16 +235,16 @@ export default {
},
mounted() {
// Cookies.set('qg-token', '9def6f4db676363e9f01990d56e62929')
this.$http.get(`/quguang/sys/table/dict/getList`, {
params: {
isCrf: 1
}
}).then(({ data: res }) => {
if (res.code === 0) {
const data = res.data
window.localStorage.setItem('dictField', JSON.stringify(data))
}
})
// this.$http.get(`/hz_quguang/sys/table/dict/getList`, {
// params: {
// isCrf: 1
// }
// }).then(({ data: res }) => {
// if (res.code === 0) {
// const data = res.data
// window.localStorage.setItem('dictField', JSON.stringify(data))
// }
// })
this.$nextTick(() => {
})

2
src/components/hm-crf/load_crf.vue

@ -38,7 +38,7 @@ export default {
},
//
getInfo() {
this.$http.get('/quguang/crf/form', { params: { id: this.id }})
this.$http.get('/hz_quguang/crf/form', { params: { id: this.id }})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)

2
src/components/hm-crf/preview.vue

@ -56,7 +56,7 @@ export default {
},
//
getInfo() {
const url = this.title === '病历模板' ? '/quguang/medical/record/template' : '/quguang/crf/template'
const url = this.title === '病历模板' ? '/hz_quguang/medical/record/template' : '/hz_quguang/crf/template'
this.$http.get(`${url}/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)

2
src/components/hm-crf/preview_dialog.vue

@ -43,7 +43,7 @@ export default {
},
//
getInfo() {
this.$http.get('/quguang/crf/template', { params: { crfId: this.dataForm.id }}).then(({ data: res }) => {
this.$http.get('/hz_quguang/crf/template', { params: { crfId: this.dataForm.id }}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

2
src/components/user-logout/index.vue

@ -28,7 +28,7 @@ export default {
methods: {
async selectPopover(val) {
if (val.text === '退出登录') {
const { data: res } = await this.$http.post('/quguang/logout')
const { data: res } = await this.$http.post('/hz_quguang/logout')
if (res.code !== 0) {
return this.$message.error(res.msg)
}

2
src/mixins/qgyCRFData.js

@ -6,7 +6,7 @@ export default {
methods: {
// 青光眼的数据获取不在crf/getFlowForm下的firstVisit中,需要单独调取此接口获取
getQgyCRFData() {
this.$http.get('/quguang/view/out/patient/getVisitOutPatientForHis', {
this.$http.get('/hz_quguang/view/out/patient/getVisitOutPatientForHis', {
params: {
patientIdNumber: this.patientIdNumber,
patientId: this.patientId ? this.patientId : '',

3
src/mixins/urlAddress.js

@ -8,7 +8,8 @@ export default {
getUrlAddress() {
console.log(window.location)
const jointUrl = window.location.protocol + '//' + window.location.hostname // 地址栏获取
this.url = jointUrl.includes('https://qgdzbl.wzeye.cn') ? jointUrl : jointUrl + ':8022'
this.url = jointUrl.includes('qgdzbl.hzeye.cn') ? jointUrl :
(jointUrl.includes('127.0.0.1') ? jointUrl + `:${window.location.port}` : jointUrl + ':84')
}
}
}

50
src/page-subspecialty/router/index.js

@ -5,13 +5,13 @@ Vue.use(Router)
// 页面路由(独立页面)
const pageRoutes = [
// { path: '/', redirect: '/login' },
// {
// path: '/login',
// component: () => import('@/page-subspecialty/views/login'),
// name: 'login',
// meta: { title: '登录' }
// },
{ path: '/', redirect: '/login' },
{
path: '/login',
component: () => import('@/page-subspecialty/views/login'),
name: 'login',
meta: { title: '登录' }
},
{
path: '/question',
component: () => import('@/page-subspecialty/views/question'),
@ -35,27 +35,29 @@ const pageRoutes = [
name: 'complete',
meta: { title: '调查完成' }
},
// {
// path: '/article',
// component: () => import('@/page-subspecialty/views/article'),
// name: 'article',
// meta: { title: '文章' }
// },
// {
// path: '/articleList',
// component: () => import('@/page-subspecialty/views/articleList'),
// name: 'articleList',
// meta: { title: '文章列表' }
// }, {
// path: '/editor',
// component: () => import('@/page-subspecialty/views/editor'),
// name: 'editor',
// meta: { title: '编辑器' }
// }
// 部署时注销掉
{
path: '/article',
component: () => import('@/page-subspecialty/views/article'),
name: 'article',
meta: { title: '文章' }
},
{
path: '/articleList',
component: () => import('@/page-subspecialty/views/articleList'),
name: 'articleList',
meta: { title: '文章列表' }
}, {
path: '/editor',
component: () => import('@/page-subspecialty/views/editor'),
name: 'editor',
meta: { title: '编辑器' }
}
]
const router = new Router({
mode: 'history',
// base: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_HOUZHUI : '/', // 公司内部环境打开--浏览器基础路径
routes: pageRoutes
})

4
src/page-subspecialty/views/article/index.vue

@ -94,7 +94,7 @@ export default {
async getArticle() {
console.log('this.url', this.url)
this.isLoading = true
const { data: res } = await this.$http.get(this.url + `/quguang/article/${this.paramsInfo.id ? this.paramsInfo.id : this.dataForm.id}`)
const { data: res } = await this.$http.get(this.url + `/hz_quguang/article/${this.paramsInfo.id ? this.paramsInfo.id : this.dataForm.id}`)
if (res.code === 0) {
this.dataForm = res.data
this.dataForm.substance = Base64.decode(res.data.substance)
@ -114,7 +114,7 @@ export default {
const percent = this.scrollPercent > 99 ? '100' : this.scrollPercent + ''
console.log(percent)
if (this.paramsInfo.backId) {
const { data: res } = await this.$http.post(this.url + '/quguang/propagation', {
const { data: res } = await this.$http.post(this.url + '/hz_quguang/propagation', {
id: this.paramsInfo.backId,
rate: percent
})

4
src/page-subspecialty/views/articleList/index.vue

@ -44,7 +44,7 @@ export default {
methods: {
async getArticleList() {
console.log('this.url', this.url)
const { data: res } = await this.$http.get(this.url + '/quguang/article/page')
const { data: res } = await this.$http.get(this.url + '/hz_quguang/article/page')
if (res.code === 0) {
this.articleList = res.data
} else {
@ -81,7 +81,7 @@ export default {
})
.then(async() => {
// on confirm
const { data: res } = await this.$http.delete(this.url + `/quguang/article/${item.id}`)
const { data: res } = await this.$http.delete(this.url + `/hz_quguang/article/${item.id}`)
if (res.code === 0) {
Toast(res.msg)
this.getArticleList()

4
src/page-subspecialty/views/editor/index.vue

@ -52,7 +52,7 @@ export default {
methods: {
//
async getarticleInfo() {
const { data: res } = await this.$http.get(this.url + `/quguang/article/${this.dataForm.id}`)
const { data: res } = await this.$http.get(this.url + `/hz_quguang/article/${this.dataForm.id}`)
if (res.code === 0) {
this.dataForm.name = res.data.name
this.dataForm.substance = Base64.decode(res.data.substance)
@ -67,7 +67,7 @@ export default {
//
saveEditorHandle() {
console.log(this.dataForm.substance)
this.$http[!this.dataForm.id ? 'post' : 'put'](this.url + '/quguang/article', { ...this.dataForm, substance: Base64.encode(this.dataForm.substance) }).then(({ data: res }) => {
this.$http[!this.dataForm.id ? 'post' : 'put'](this.url + '/hz_quguang/article', { ...this.dataForm, substance: Base64.encode(this.dataForm.substance) }).then(({ data: res }) => {
if (res.code === 0) {
this.$router.push({ name: 'articleList' })
} else {

6
src/page-subspecialty/views/jmjlQuestionEyehistory/index.vue

@ -763,7 +763,7 @@ export default {
this.tipShow = false
},
async getInfo() {
const { data: res } = await this.$http.get('/quguang/survey/getInfo', {
const { data: res } = await this.$http.get('/hz_quguang/survey/getInfo', {
params: {
backId: this.patientInfo.backId
}
@ -837,7 +837,7 @@ export default {
//
async judgeTodayWrite() {
this.buttonDisbled = true
const { data: res } = await this.$http.get(this.url + '/quguang/survey/judgeTodayWrite', {
const { data: res } = await this.$http.get(this.url + '/hz_quguang/survey/judgeTodayWrite', {
params: {
patientIdNumber: this.dataForm.idcard.trim(),
formName: '眼科病史问卷调查'
@ -872,7 +872,7 @@ export default {
})
}
this.buttonText = '提交中请稍等'
const { data: res } = await this.$http.post(this.url + '/quguang/survey', {
const { data: res } = await this.$http.post(this.url + '/hz_quguang/survey', {
backId: this.patientInfo.backId,
centreCode: this.patientInfo.centreCode ? this.patientInfo.centreCode : 'WZYSG_QG',
formContent: JSON.stringify(this.dataForm),

2
src/page-subspecialty/views/login/index.vue

@ -57,7 +57,7 @@ export default {
methods: {
//
loginHandle() {
this.$http.post(this.url + '/quguang/login', this.dataForm).then(({ data: res }) => {
this.$http.post(this.url + '/hz_quguang/login', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
console.log(res.msg)
return Toast.fail(res.msg)

4
src/page-subspecialty/views/question/index.vue

@ -290,7 +290,7 @@ export default {
Toast('请签名后再提交')
return
}
const { data: res } = await this.$http.get(this.url + '/quguang/survey/judgeTodayWrite', {
const { data: res } = await this.$http.get(this.url + '/hz_quguang/survey/judgeTodayWrite', {
params: {
patientIdNumber: this.routerParams.patientIdNumber ? this.routerParams.patientIdNumber : this.dataForm.idcard.trim(),
formName: '屈光手术心理评估表'
@ -323,7 +323,7 @@ export default {
scoreOdd: this.scoreOdd,
patientInfo: this.routerParams.patientIdNumber ? this.routerParams : this.dataForm
}
const { data: res } = await this.$http.post(this.url + '/quguang/survey', {
const { data: res } = await this.$http.post(this.url + '/hz_quguang/survey', {
backId: this.patientInfo.backId,
centreCode: this.patientInfo.centreCode ? this.patientInfo.centreCode : 'WZYSG_QG',
formContent: JSON.stringify(formContent),

6
src/page-subspecialty/views/questionEyehistory/index.vue

@ -822,7 +822,7 @@ export default {
this.tipShow = false
},
async getInfo() {
const { data: res } = await this.$http.get('/quguang/survey/getInfo', {
const { data: res } = await this.$http.get('/hz_quguang/survey/getInfo', {
params: {
backId: this.patientInfo.backId
}
@ -905,7 +905,7 @@ export default {
//
async judgeTodayWrite() {
this.buttonDisbled = true
const { data: res } = await this.$http.get(this.url + '/quguang/survey/judgeTodayWrite', {
const { data: res } = await this.$http.get(this.url + '/hz_quguang/survey/judgeTodayWrite', {
params: {
patientIdNumber: this.dataForm.idcard.trim(),
formName: '眼科病史问卷调查'
@ -940,7 +940,7 @@ export default {
})
}
this.buttonText = '提交中请稍等'
const { data: res } = await this.$http.post(this.url + '/quguang/survey', {
const { data: res } = await this.$http.post(this.url + '/hz_quguang/survey', {
backId: this.patientInfo.backId,
centreCode: this.patientInfo.centreCode ? this.patientInfo.centreCode : 'WZYSG_QG',
formContent: JSON.stringify(this.dataForm),

13
vue.config.js

@ -14,6 +14,7 @@ function resolve(dir) {
module.exports = {
parallel: false,
publicPath: '/', // 多页面情况 process.env.NODE_ENV === 'production' ? './' : '/',
// publicPath: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_HOUZHUI : '/', //公司内部环境
assetsDir: 'static',
chainWebpack: config => {
const svgRule = config.module.rule('svg')
@ -30,7 +31,7 @@ module.exports = {
devServer: {
open: true,
hot: true,
port: 8022,
port: 8001,
host: '127.0.0.1',
overlay: {
errors: true,
@ -44,11 +45,11 @@ module.exports = {
// }
proxy: {
// 反向代理
'/quguang': {
'/hz_quguang': {
target: process.env.VUE_APP_LOGIN_URL, // 想请求的目标地址
changOrigin: true, // 允许跨域
pathRewrite: { // 路径重写
'^/quguang': '/quguang'
'^/hz_quguang': '/hz_quguang'
}
}
}
@ -66,9 +67,11 @@ module.exports = {
// new CopyPlugin([
// { from: path.resolve(__dirname, './static'), to: 'static' }
// ])
new CopyPlugin({ patterns: [
new CopyPlugin({
patterns: [
{ from: path.resolve(__dirname, 'static'), to: 'static' }
] })
]
})
]
},
// rem适配

Loading…
Cancel
Save