Browse Source

表单传参修改,签字版调试

360view
bianyaqi 2 years ago
parent
commit
42eff8ad73
  1. 1
      package.json
  2. 71
      src/components/360View/img-editor.vue
  3. 8
      src/components/360View/index1.vue
  4. 79
      src/page-subspecialty/views/modules/formList/mraOrder.vue
  5. 3
      src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/addPatientOrder.vue

1
package.json

@ -31,6 +31,7 @@
"echarts": "^4.9.0", "echarts": "^4.9.0",
"element-resize-detector": "^1.2.3", "element-resize-detector": "^1.2.3",
"element-ui": "^2.13.2", "element-ui": "^2.13.2",
"fabric": "^5.3.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"jquery": "^3.6.0", "jquery": "^3.6.0",

71
src/components/360View/img-editor.vue

@ -25,6 +25,7 @@
import 'tui-image-editor/dist/tui-image-editor.css' import 'tui-image-editor/dist/tui-image-editor.css'
import 'tui-color-picker/dist/tui-color-picker.css' import 'tui-color-picker/dist/tui-color-picker.css'
import ImageEditor from 'tui-image-editor' import ImageEditor from 'tui-image-editor'
import { fabric } from 'fabric'
// //
const locale_zh = { const locale_zh = {
// override default English locale to your custom // override default English locale to your custom
@ -199,12 +200,50 @@ export default {
instance: null, instance: null,
textOne: '', textOne: '',
textTwo: '', textTwo: '',
textThree: ''
textThree: '',
editorOptions: {
includeUI: {
loadImage: {
path: '',
name: 'image'
},
// menu: ['crop', 'rotate', 'draw', 'shape', 'icon', 'text', 'filter'], // flipmask
initMenu: 'draw',
selectionStyle: {
lineWidth: 5,
borderColor: '#000000'
},
menuBarPosition: 'bottom',
locale: locale_zh, //
theme: customTheme //
},
fabricConfig: {
//
backgroundColor: 'rgba(255, 255, 255, 1)',
//
scalable: false,
//
customShapes: [
{
name: 'triangle',
icon: 'path://M0,0 L50,50 L100,0 Z',
points: [25, 0, 50, 50, 0, 50],
offset: 25
}
]
}
}
} }
}, },
mounted() { mounted() {
// ImageEditor
// const ref = this.$refs.can
// const canvas = new fabric.Canvas(ref)
// const rect = new fabric.Rect({
// fill: 'red',
// width: 20,
// height: 20
// })
// canvas.add(rect)
}, },
methods: { methods: {
init(textOne, textTwo, textThree) { init(textOne, textTwo, textThree) {
@ -213,28 +252,12 @@ export default {
textThree ? this.textThree = textThree : '' textThree ? this.textThree = textThree : ''
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
// console.log(this.imgUrl)
this.editorOptions.includeUI.loadImage.path = this.imgUrl
this.instance = new ImageEditor( this.instance = new ImageEditor(
document.querySelector('#tui-image-editor'),
{
includeUI: {
loadImage: {
path: this.imgUrl,
name: 'image'
},
// menu: ['crop', 'rotate', 'draw', 'shape', 'icon', 'text', 'filter'], // flipmask
initMenu: 'draw',
selectionStyle: {
lineWidth: 5,
borderColor: '#000000'
},
menuBarPosition: 'bottom',
locale: locale_zh, //
theme: customTheme //
}
}
'#tui-image-editor',
this.editorOptions
) )
// document.querySelector('.tie-btn-resize').style.display = 'none' //
this.instance.setBrush({ width: 20, color: 'red' })
document.querySelector('.tie-btn-mask').style.display = 'none' // document.querySelector('.tie-btn-mask').style.display = 'none' //
}) })
}, },
@ -257,11 +280,9 @@ export default {
// //
replaceHandle(e) { replaceHandle(e) {
var file = e.target.files[0] var file = e.target.files[0]
console.log(file)
var reader = new FileReader() var reader = new FileReader()
var that = this var that = this
reader.readAsDataURL(file) reader.readAsDataURL(file)
console.log(reader)
reader.onload = function(e) { reader.onload = function(e) {
that.imgUrl = reader.result that.imgUrl = reader.result
that.init() that.init()

8
src/components/360View/index1.vue

@ -396,8 +396,12 @@ export default {
this.drawerWidth = (this.drawerWidth === '500px') ? '800px' : '500px' this.drawerWidth = (this.drawerWidth === '500px') ? '800px' : '500px'
}, },
backList() { backList() {
this.$parent.detailViewVisible = false
this.$parent.getDataListInitial()
if (this.$route.query.patientId) {
this.$router.go(-1)
} else {
this.$parent.detailViewVisible = false
this.$parent.getDataListInitial()
}
}, },
// 360 // 360
handlePacs() { handlePacs() {

79
src/page-subspecialty/views/modules/formList/mraOrder.vue

@ -122,9 +122,10 @@
</td> </td>
<td> <td>
<el-date-picker <el-date-picker
v-model="formData.date"
v-model="formData.examineDate"
style="width: 100%" style="width: 100%"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
/> />
</td> </td>
</tr> </tr>
@ -180,6 +181,7 @@ export default {
return { return {
origin: '', origin: '',
formData: { formData: {
idList: [],
patientName: '', patientName: '',
patientAge: '', patientAge: '',
patientSex: '', patientSex: '',
@ -195,7 +197,7 @@ export default {
remark: '', remark: '',
yzOpen: '', yzOpen: '',
isPrint: '', isPrint: '',
date: '',
examineDate: '',
checkAdvice: '', checkAdvice: '',
docAdvice: '' docAdvice: ''
}, },
@ -228,23 +230,74 @@ export default {
] ]
} }
}, },
watch: {
caseId(val) {
if (val) {
this.getOrderDetail()
}
}
},
created() { created() {
this.origin = JSON.parse(JSON.stringify(this.formData))
//
this.formData.patientName = this.patientDetail.patientName
this.formData.patientAge = this.patientDetail.patientAge
this.formData.patientSex = this.patientDetail.patientSex
this.formData.patientId = this.patientDetail.patientId
this.formData.patientBirthday = this.patientDetail.patientBirthday
this.formData.patientPhone = this.patientDetail.patientPhone
this.getOrderDetail()
this.queryProject()
}, },
methods: { methods: {
handleSaveTable() { handleSaveTable() {
this.$emit('handleSaveTable', this.formData)
this.formData.jzNumber = window.localStorage.getItem('jzNumber')
this.$http.post('/mzbl/saveMzblYdxgzy', {
caseId: this.caseId,
...this.formData
}).then(() => {
this.$emit('handleSaveTable')
})
},
getOrderDetail() {
this.$http.get('/mzbl/getMzblYdxgzyInfo', { params: {
caseId: this.caseId,
patientId: this.patientDetail.patientId
}}).then(data => {
this.formData = { ...data.data.data }
//
this.formData.patientName = this.patientDetail.patientName
this.formData.patientAge = this.patientDetail.patientAge
this.formData.patientSex = this.patientDetail.patientSex
this.formData.patientId = this.patientDetail.patientId
this.formData.patientBirthday = this.patientDetail.patientBirthday
this.formData.patientPhone = this.patientDetail.patientPhone
})
},
// id
async queryProject() {
const project = window.localStorage.getItem('projectItem') ? JSON.parse(window.localStorage.getItem('projectItem')) : []
const { data: res } = await this.$http.get(
'/patient/getZlItemDict',
{
params: {
caseName: '眼底血管造影患者预约单'
}
}
)
if (res.code === 0) {
const data = res.data || []
const list = []
if (data.length) {
for (let i = 0; i < data.length; i++) {
for (let j = 0; j < project.length; j++) {
if (data[i].itemId === project[j].porjectCode) {
list.push(project[j].id)
}
}
}
this.confirmData.idList = list
}
} else {
this.$message.error(res.msg)
}
}, },
//
formDelete() { formDelete() {
this.$confirmFun('确定删除吗?').then(() => {
this.$http.post('/case/delete', {
this.$confirmFun('确定删除吗?').then(() => {
this.$http.post('/mzbl/delMzblYdxgzyInfo', {
id: this.caseId id: this.caseId
}).then(() => { }).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')

3
src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/addPatientOrder.vue

@ -243,7 +243,7 @@ export default {
}, },
goFormList() { goFormList() {
if (this.patientInfo) { if (this.patientInfo) {
const { href } = this.$router.resolve({
this.$router.push({
path: '/360view', path: '/360view',
query: { query: {
onlyRead: false, onlyRead: false,
@ -252,7 +252,6 @@ export default {
patientIdNumber: this.patientInfo.patientIdNumber patientIdNumber: this.patientInfo.patientIdNumber
} }
}) })
window.open(href, '_blank')
} else { } else {
this.$message.info('请选择患者') this.$message.info('请选择患者')
} }

Loading…
Cancel
Save