Browse Source

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

360view
bianyaqi 2 years ago
parent
commit
42eff8ad73
  1. 1
      package.json
  2. 65
      src/components/360View/img-editor.vue
  3. 4
      src/components/360View/index1.vue
  4. 69
      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",
"element-resize-detector": "^1.2.3",
"element-ui": "^2.13.2",
"fabric": "^5.3.0",
"file-saver": "^2.0.5",
"hammerjs": "^2.0.8",
"jquery": "^3.6.0",

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

@ -25,6 +25,7 @@
import 'tui-image-editor/dist/tui-image-editor.css'
import 'tui-color-picker/dist/tui-color-picker.css'
import ImageEditor from 'tui-image-editor'
import { fabric } from 'fabric'
//
const locale_zh = {
// override default English locale to your custom
@ -199,27 +200,11 @@ export default {
instance: null,
textOne: '',
textTwo: '',
textThree: ''
}
},
mounted() {
// ImageEditor
},
methods: {
init(textOne, textTwo, textThree) {
textOne ? this.textOne = textOne : ''
textTwo ? this.textTwo = textTwo : ''
textThree ? this.textThree = textThree : ''
this.visible = true
this.$nextTick(() => {
// console.log(this.imgUrl)
this.instance = new ImageEditor(
document.querySelector('#tui-image-editor'),
{
textThree: '',
editorOptions: {
includeUI: {
loadImage: {
path: this.imgUrl,
path: '',
name: 'image'
},
// menu: ['crop', 'rotate', 'draw', 'shape', 'icon', 'text', 'filter'], // flipmask
@ -231,10 +216,48 @@ export default {
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() {
// 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: {
init(textOne, textTwo, textThree) {
textOne ? this.textOne = textOne : ''
textTwo ? this.textTwo = textTwo : ''
textThree ? this.textThree = textThree : ''
this.visible = true
this.$nextTick(() => {
this.editorOptions.includeUI.loadImage.path = this.imgUrl
this.instance = new ImageEditor(
'#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' //
})
},
@ -257,11 +280,9 @@ export default {
//
replaceHandle(e) {
var file = e.target.files[0]
console.log(file)
var reader = new FileReader()
var that = this
reader.readAsDataURL(file)
console.log(reader)
reader.onload = function(e) {
that.imgUrl = reader.result
that.init()

4
src/components/360View/index1.vue

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

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

@ -122,9 +122,10 @@
</td>
<td>
<el-date-picker
v-model="formData.date"
v-model="formData.examineDate"
style="width: 100%"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
/>
</td>
</tr>
@ -180,6 +181,7 @@ export default {
return {
origin: '',
formData: {
idList: [],
patientName: '',
patientAge: '',
patientSex: '',
@ -195,7 +197,7 @@ export default {
remark: '',
yzOpen: '',
isPrint: '',
date: '',
examineDate: '',
checkAdvice: '',
docAdvice: ''
},
@ -228,8 +230,33 @@ export default {
]
}
},
watch: {
caseId(val) {
if (val) {
this.getOrderDetail()
}
}
},
created() {
this.origin = JSON.parse(JSON.stringify(this.formData))
this.getOrderDetail()
this.queryProject()
},
methods: {
handleSaveTable() {
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
@ -237,14 +264,40 @@ export default {
this.formData.patientId = this.patientDetail.patientId
this.formData.patientBirthday = this.patientDetail.patientBirthday
this.formData.patientPhone = this.patientDetail.patientPhone
})
},
methods: {
handleSaveTable() {
this.$emit('handleSaveTable', this.formData)
// 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() {
this.$confirmFun('确定删除吗?').then(() => {
this.$http.post('/case/delete', {
this.$confirmFun('确定删除吗?').then(() => {
this.$http.post('/mzbl/delMzblYdxgzyInfo', {
id: this.caseId
}).then(() => {
this.$message.success('删除成功')

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

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

Loading…
Cancel
Save