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

View File

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

View File

@ -1062,30 +1062,28 @@ export default {
}) })
}, },
methods: { methods: {
async getWwcTpl() { getWwcTpl() {
// const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
try { getUserWLTemplateList().then(res => {
const res = await getUserWLTemplateList()
this.customWwcTpl = [] this.customWwcTpl = []
res.Result.map(i => { res.Result.map(i => {
this.customWwcTpl.push({ label: i.TemplateName, wc: i.WL, ww: i.WW }) this.customWwcTpl.push({ label: i.TemplateName, wc: i.WL, ww: i.WW })
}) })
this.wwwcArr = [...this.defaultWwwc, ...this.customWwcTpl] this.wwwcArr = [...this.defaultWwwc, ...this.customWwcTpl]
} catch (e) { loading.close()
console.log(e) }).catch(() => { loading.close() })
}
}, },
async getHotKeys() { getHotKeys() {
// const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
try { getDoctorShortcutKey({ imageToolType: 0 }).then(res => {
const res = await getDoctorShortcutKey({ imageToolType: 0 })
res.Result.map(item => { 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.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() this.bindHotKey()
} catch (e) { loading.close()
console.log(e) }).catch(() => {
} loading.close()
})
}, },
resetHotkeyList(arr) { resetHotkeyList(arr) {
this.hotKeyList = [] this.hotKeyList = []

View File

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

View File

@ -51,23 +51,19 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
async getList() { getList() {
this.loading = true this.loading = true
try { var param = {
var param = { trialId: this.trialId
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
} }
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) { preview(file) {
this.$set(this.selected, 'filePath', file.Path) this.$set(this.selected, 'filePath', file.Path)

View File

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

View File

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

View File

@ -36,31 +36,27 @@ export default {
this.initForm() this.initForm()
}, },
methods: { methods: {
async initForm() { initForm() {
this.loading = true this.loading = true
try { getAutoCutNextTask().then(async res => {
const res = await getAutoCutNextTask() this.form.AutoCutNextTask = res.Result.AutoCutNextTask
if (res.IsSuccess) {
this.form.AutoCutNextTask = res.Result.AutoCutNextTask
}
this.loading = false this.loading = false
} catch (e) { }).catch(() => {
this.loading = false this.loading = false
} })
}, },
async handleSave() { handleSave() {
const valid = await this.$refs.otherForm.validate() this.$refs.otherForm.validate((valid) => {
if (!valid) return if (valid) {
this.loading = true this.loading = true
try { setAutoCutNextTask(this.form).then((res) => {
const res = await setAutoCutNextTask(this.form) this.loading = false
if (res.IsSuccess) { this.$message.success(this.$t('common:message:savedSuccessfully'))
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() this.getWL()
}, },
methods: { methods: {
async getWL() { getWL() {
this.loading = true this.loading = true
try { getUserWLTemplateList().then(res => {
const res = await getUserWLTemplateList()
this.tableData = res.Result this.tableData = res.Result
this.loading = false this.loading = false
this.$emit('getWwcTpl') this.$emit('getWwcTpl')
} catch (e) { }).catch(() => { this.loading = false })
this.loading = false
}
}, },
handleAdd() { handleAdd() {
this.customWwc.title = this.$t('common:button:new') this.customWwc.title = this.$t('common:button:new')
@ -104,27 +101,22 @@ export default {
this.row = Object.assign({}, row) this.row = Object.assign({}, row)
this.customWwc.visible = true this.customWwc.visible = true
}, },
async handleDelete(row) { handleDelete(row) {
// '' // ''
var msg = this.$t('trials:reading:wlTemplate:delete') var msg = this.$t('trials:reading:wlTemplate:delete')
const confirm = await this.$confirm(
msg, this.$confirm(msg, {
{ type: 'warning',
type: 'warning', distinguishCancelAndClose: true
distinguishCancelAndClose: true }).then(() => {
} this.loading = true
) deleteUserWLTemplate(row.Id).then(res => {
if (confirm !== 'confirm') return this.loading = false
this.loading = true //
try { this.$message.success(this.$t('common:message:deletedSuccessfully'))
await deleteUserWLTemplate(row.Id) this.getWL()
this.loading = false }).catch(() => { this.loading = false })
// })
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getWL()
} catch (e) {
this.loading = false
}
} }
} }
} }

View File

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