Compare commits

..

No commits in common. "b637fc58564464c2415e2c565b1e4bb5de9c2d76" and "31d3a17b80cb0a17b788f727ebfdd9b9629e25f2" have entirely different histories.

10 changed files with 147 additions and 164 deletions

View File

@ -111,11 +111,10 @@ export default {
this.isRender = true
},
methods: {
async handleSave() {
const valid = await this.$refs.assessmentForm.validate()
if (!valid) return
const loading = this.$loading({ fullscreen: true })
try {
handleSave() {
this.$refs.assessmentForm.validate(async valid => {
if (!valid) return
const loading = this.$loading({ fullscreen: true })
var answers = []
for (const k in this.form) {
answers.push({ questionId: k, answer: this.form[k] })
@ -124,15 +123,13 @@ export default {
visitTaskId: this.visitTaskId,
answerList: answers
}
const res = await submitTaskAdditionalQuestion(params)
if (res.IsSuccess) {
submitTaskAdditionalQuestion(params).then(res => {
this.$emit('sign')
}
loading.close()
} catch (e) {
console.log(e)
loading.close()
}
loading.close()
}).catch(() => {
loading.close()
})
})
},
handleCancel() {
this.$emit('close')

View File

@ -1,6 +1,6 @@
<template>
<el-form
ref="customWWWC"
ref="subjectForm"
v-loading="loading"
:model="form"
:rules="rules"
@ -67,10 +67,11 @@ export default {
}
},
methods: {
async handleSave() {
const valid = await this.$refs.customWWWC.validate()
if (!valid) return
this.$emit('setWwwc', this.form)
handleSave() {
this.$refs.subjectForm.validate(valid => {
if (!valid) return
this.$emit('setWwwc', this.form)
})
},
handleCancel() {
this.$emit('close')

View File

@ -1062,30 +1062,28 @@ export default {
})
},
methods: {
async getWwcTpl() {
// const loading = this.$loading({ fullscreen: true })
try {
const res = await getUserWLTemplateList()
getWwcTpl() {
const loading = this.$loading({ fullscreen: true })
getUserWLTemplateList().then(res => {
this.customWwcTpl = []
res.Result.map(i => {
this.customWwcTpl.push({ label: i.TemplateName, wc: i.WL, ww: i.WW })
})
this.wwwcArr = [...this.defaultWwwc, ...this.customWwcTpl]
} catch (e) {
console.log(e)
}
loading.close()
}).catch(() => { loading.close() })
},
async getHotKeys() {
// const loading = this.$loading({ fullscreen: true })
try {
const res = await getDoctorShortcutKey({ imageToolType: 0 })
getHotKeys() {
const loading = this.$loading({ fullscreen: true })
getDoctorShortcutKey({ imageToolType: 0 }).then(res => {
res.Result.map(item => {
this.hotKeyList.push({ id: item.Id, altKey: item.AltKey, ctrlKey: item.CtrlKey, shiftKey: item.ShiftKey, metaKey: item.MetaKey, key: item.Keyboardkey, code: item.Code, text: item.Text, shortcutKeyEnum: item.ShortcutKeyEnum })
})
this.bindHotKey()
} catch (e) {
console.log(e)
}
loading.close()
}).catch(() => {
loading.close()
})
},
resetHotkeyList(arr) {
this.hotKeyList = []

View File

@ -56,25 +56,22 @@ export default {
this.getHotkeys()
},
methods: {
async getHotkeys(isReset = false) {
getHotkeys(isReset = false) {
this.loading = true
this.hotKeyList = []
try {
const res = await getDoctorShortcutKey({ imageToolType: this.readingTool })
if (res.IsSuccess) {
res.Result.map(item => {
this.hotKeyList.push({ id: item.Id, keys: { controlKey: { altKey: item.AltKey, ctrlKey: item.CtrlKey, shiftKey: item.ShiftKey, metaKey: item.MetaKey, key: item.Keyboardkey, code: item.Code }, text: item.Text }, label: item.ShortcutKeyEnum })
})
if (isReset) {
this.$emit('reset', this.hotKeyList)
}
getDoctorShortcutKey({ imageToolType: this.readingTool }).then(res => {
res.Result.map(item => {
this.hotKeyList.push({ id: item.Id, keys: { controlKey: { altKey: item.AltKey, ctrlKey: item.CtrlKey, shiftKey: item.ShiftKey, metaKey: item.MetaKey, key: item.Keyboardkey, code: item.Code }, text: item.Text }, label: item.ShortcutKeyEnum })
})
if (isReset) {
this.$emit('reset', this.hotKeyList)
}
this.loading = false
} catch (e) {
}).catch(() => {
this.loading = false
}
})
},
async handleSave() {
handleSave() {
var params = {
imageToolType: this.readingTool,
shortcutKeyList: []
@ -89,15 +86,17 @@ export default {
emptyLabel = item.label
break
} else {
shortcutKeyList.push({
shortcutKeyEnum: item.label,
keyboardkey: item.keys.controlKey.key,
code: item.keys.controlKey.code,
text: item.keys.text,
altKey: item.keys.controlKey.altKey,
ctrlKey: item.keys.controlKey.ctrlKey,
shiftKey: item.keys.controlKey.shiftKey,
metaKey: item.keys.controlKey.metaKey })
shortcutKeyList.push(
{
shortcutKeyEnum: item.label,
keyboardkey: item.keys.controlKey.key,
code: item.keys.controlKey.code,
text: item.keys.text,
altKey: item.keys.controlKey.altKey,
ctrlKey: item.keys.controlKey.ctrlKey,
shiftKey: item.keys.controlKey.shiftKey,
metaKey: item.keys.controlKey.metaKey }
)
}
}
if (isExistEmptyText) {
@ -113,40 +112,43 @@ export default {
})
} else {
this.loading = true
// this.hotKeyList.map(item => {
// shortcutKeyList.push(
// {
// shortcutKeyEnum: item.label,
// keyboardkey: item.keys.controlKey.key,
// code: item.keys.controlKey.code,
// text: item.keys.text,
// altKey: item.keys.controlKey.altKey,
// ctrlKey: item.keys.controlKey.ctrlKey,
// shiftKey: item.keys.controlKey.shiftKey,
// metaKey: item.keys.controlKey.metaKey }
// )
// })
params.shortcutKeyList = shortcutKeyList
try {
const res = await setShortcutKey(params)
if (res.IsSuccess) {
this.$emit('reset', this.hotKeyList)
}
setShortcutKey(params).then(res => {
this.$emit('reset', this.hotKeyList)
// this.$emit('close')
this.loading = false
} catch (e) {
}).catch(() => {
this.loading = false
}
})
}
},
async handleReset() {
handleReset() {
// ''
const confirm = await this.$confirm(
this.$t('trials:hotkeys:message:confirmReset'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
this.loading = true
try {
const res = await restoreDefaultShortcutKey({ imageToolType: this.readingTool })
if (res.IsSuccess) {
this.$message.success(this.$t('trials:hotkeys:message:resetSuccessfully')) // ''
this.getHotkeys(true)
}
this.loading = false
} catch (e) {
this.loading = false
}
this.$confirm(this.$t('trials:hotkeys:message:confirmReset'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
this.loading = true
restoreDefaultShortcutKey({ imageToolType: this.readingTool }).then(res => {
this.$message.success(this.$t('trials:hotkeys:message:resetSuccessfully')) // ''
this.getHotkeys(true)
}).catch(() => { this.loading = false })
})
.catch(action => {})
},
handleHotkeyVerify(hotkey) {
for (const item of this.hotKeyList) {

View File

@ -51,23 +51,19 @@ export default {
this.getList()
},
methods: {
async getList() {
getList() {
this.loading = true
try {
var param = {
trialId: this.trialId
}
const res = await getManualList(param)
if (res.IsSuccess) {
this.fileList = res.Result
if (this.fileList.length > 0) {
this.preview(this.fileList[0])
}
}
this.loading = false
} catch (e) {
this.loading = false
var param = {
trialId: this.trialId
}
getManualList(param).then(res => {
this.fileList = res.Result
if (this.fileList.length > 0) {
this.preview(this.fileList[0])
}
this.loading = false
}).catch(() => { this.loading = false })
},
preview(file) {
this.$set(this.selected, 'filePath', file.Path)

View File

@ -79,7 +79,7 @@
import { getTableAnswerRowInfoList } from '@/api/trials'
import { on, off } from 'element-ui/src/utils/dom'
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
// import store from '@/store'
import store from '@/store'
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
var ctx = '' //
export default {
@ -223,16 +223,16 @@ export default {
getCanvasData() {
return new Promise(async resolve => {
this.visitTaskId = this.$router.currentRoute.query.visitTaskId
this.canvasData = []
const res = await getTableAnswerRowInfoList(this.visitTaskId)
this.canvasData = []
let res = await getTableAnswerRowInfoList(this.visitTaskId)
res.Result.forEach(el => {
if (!el.IsDicomReading) {
if (!el.IsDicomReading){
if (el.MeasureData) {
el.MeasureData = JSON.parse(el.MeasureData)
el.MeasureData.data.remark = el.OrderMarkName
this.canvasData.push(el.MeasureData)
}
}
}
})
sessionStorage.setItem('measureData', this.canvasData)
// await store.dispatch('reading/getMeasuredData', this.visitTaskId)

View File

@ -31,7 +31,7 @@
/>
<div ref="imagesWrapper" class="images">
<div v-if="noData" class="empty-text">
<slot name="empty">{{ $t('trial:reading:noneDicoms:noData') }}</slot>
<slot name="empty">暂无数据</slot>
</div>
<div v-show="!noData" class="items" :style="itemsStyle">
<div

View File

@ -36,31 +36,27 @@ export default {
this.initForm()
},
methods: {
async initForm() {
initForm() {
this.loading = true
try {
const res = await getAutoCutNextTask()
if (res.IsSuccess) {
this.form.AutoCutNextTask = res.Result.AutoCutNextTask
}
getAutoCutNextTask().then(async res => {
this.form.AutoCutNextTask = res.Result.AutoCutNextTask
this.loading = false
} catch (e) {
}).catch(() => {
this.loading = false
}
})
},
async handleSave() {
const valid = await this.$refs.otherForm.validate()
if (!valid) return
this.loading = true
try {
const res = await setAutoCutNextTask(this.form)
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
handleSave() {
this.$refs.otherForm.validate((valid) => {
if (valid) {
this.loading = true
setAutoCutNextTask(this.form).then((res) => {
this.loading = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
}).catch(() => {
this.loading = false
})
}
this.loading = false
} catch (e) {
this.loading = false
}
})
}
}
}

View File

@ -83,16 +83,13 @@ export default {
this.getWL()
},
methods: {
async getWL() {
getWL() {
this.loading = true
try {
const res = await getUserWLTemplateList()
getUserWLTemplateList().then(res => {
this.tableData = res.Result
this.loading = false
this.$emit('getWwcTpl')
} catch (e) {
this.loading = false
}
}).catch(() => { this.loading = false })
},
handleAdd() {
this.customWwc.title = this.$t('common:button:new')
@ -104,27 +101,22 @@ export default {
this.row = Object.assign({}, row)
this.customWwc.visible = true
},
async handleDelete(row) {
handleDelete(row) {
// ''
var msg = this.$t('trials:reading:wlTemplate:delete')
const confirm = await this.$confirm(
msg,
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
this.loading = true
try {
await deleteUserWLTemplate(row.Id)
this.loading = false
//
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getWL()
} catch (e) {
this.loading = false
}
this.$confirm(msg, {
type: 'warning',
distinguishCancelAndClose: true
}).then(() => {
this.loading = true
deleteUserWLTemplate(row.Id).then(res => {
this.loading = false
//
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getWL()
}).catch(() => { this.loading = false })
})
}
}
}

View File

@ -83,23 +83,24 @@ export default {
}
},
methods: {
async handleSave() {
const valid = await this.$refs.wlForm.validate()
if (!valid) return
this.loading = true
try {
await addOrUpdateUserWLTemplate(this.form)
this.loading = false
this.$emit('getWL')
this.$emit('close')
if (this.form.Id) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
} else {
this.$message.success(this.$t('common:message:addedSuccessfully'))
handleSave() {
this.$refs.wlForm.validate((valid) => {
if (valid) {
this.loading = true
addOrUpdateUserWLTemplate(this.form).then((res) => {
this.loading = false
this.$emit('getWL')
this.$emit('close')
if (this.form.Id) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
} else {
this.$message.success(this.$t('common:message:addedSuccessfully'))
}
}).catch(() => {
this.loading = false
})
}
} catch (e) {
this.loading = false
}
})
},
handleCancel() {
this.$emit('close')