自定义标准更改

uat_us
caiyiling 2024-07-18 17:16:54 +08:00
parent b637fc5856
commit c74806a367
6 changed files with 143 additions and 118 deletions

View File

@ -1052,10 +1052,10 @@ export default {
this.uploadStatus = status
this.uploadImageVisible = true
},
getWwcTpl() {
const loading = this.$loading({ fullscreen: true })
getUserWLTemplateList()
.then((res) => {
async getWwcTpl() {
// const loading = this.$loading({ fullscreen: true })
try {
let res = await getUserWLTemplateList()
this.customWwcTpl = []
res.Result.map((i) => {
this.customWwcTpl.push({
@ -1065,16 +1065,15 @@ export default {
})
})
this.wwwcArr = [...this.defaultWwwc, ...this.customWwcTpl]
loading.close()
})
.catch(() => {
loading.close()
})
} catch(e) {
console.log(e)
}
},
getHotKeys() {
const loading = this.$loading({ fullscreen: true })
getDoctorShortcutKey({ imageToolType: 0 })
.then((res) => {
async getHotKeys() {
// const loading = this.$loading({ fullscreen: true })
try {
let res = await getDoctorShortcutKey({ imageToolType: 0 })
res.Result.map((item) => {
this.hotKeyList.push({
id: item.Id,
@ -1089,11 +1088,9 @@ export default {
})
})
this.bindHotKey()
loading.close()
})
.catch(() => {
loading.close()
})
} catch(e) {
console.log(e)
}
},
resetHotkeyList(arr) {
this.hotKeyList = []

View File

@ -57,10 +57,11 @@ export default {
this.getHotkeys()
},
methods: {
getHotkeys(isReset = false) {
async getHotkeys(isReset = false) {
this.loading = true
this.hotKeyList = []
getDoctorShortcutKey({ imageToolType: this.readingTool }).then(res => {
try{
let res = await getDoctorShortcutKey({ imageToolType: this.readingTool })
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 })
})
@ -68,11 +69,12 @@ export default {
this.$emit('reset', this.hotKeyList)
}
this.loading = false
}).catch(() => {
}catch(e){
this.loading = false
})
}
},
handleSave() {
async handleSave() {
this.loading = true
var params = {
imageToolType: this.readingTool,
@ -93,28 +95,34 @@ export default {
)
})
params.shortcutKeyList = shortcutKeyList
setShortcutKey(params).then(res => {
try {
await setShortcutKey(params)
this.$emit('reset', this.hotKeyList)
this.$emit('close')
this.loading = false
}).catch(() => {
}catch(e){
this.loading = false
})
}
},
handleReset() {
async handleReset() {
// ''
this.$confirm(this.$t('trials:hotkeys:message:confirmReset'), {
const confirm = await this.$confirm(
this.$t('trials:hotkeys:message:confirmReset'),
{
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
}
)
if (confirm !== 'confirm') return
this.loading = true
restoreDefaultShortcutKey({ imageToolType: this.readingTool }).then(res => {
try{
await restoreDefaultShortcutKey({ imageToolType: this.readingTool })
this.$message.success(this.$t('trials:hotkeys:message:resetSuccessfully')) // ''
this.getHotkeys(true)
}).catch(() => { this.loading = false })
})
.catch(action => {})
this.loading = false
}catch(e){
this.loading = false
}
},
handleHotkeyVerify(hotkey) {
for (const item of this.hotKeyList) {

View File

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

View File

@ -3,7 +3,7 @@
<div class="base-dialog-body" style="height:380px;overflow-y: auto;">
<el-form ref="otherForm" :model="form">
<el-form-item
label="是否自动切换到下一任务"
:label="$t('trials:reading:label:autoSwitch')"
prop="AutoCutNextTask"
:rules="[
{ required: true, message: $t('common:ruleMessage:select')}
@ -35,27 +35,27 @@ export default {
this.initForm()
},
methods: {
initForm() {
async initForm() {
this.loading = true
getAutoCutNextTask().then(async res => {
try{
await getAutoCutNextTask()
this.form.AutoCutNextTask = res.Result.AutoCutNextTask
this.loading = false
}).catch(() => {
}catch(e){
this.loading = false
})
}
},
handleSave() {
this.$refs.otherForm.validate((valid) => {
if (valid) {
async handleSave() {
let valid = await this.$refs.otherForm.validate()
if (!valid) return
this.loading = true
setAutoCutNextTask(this.form).then((res) => {
try{
await setAutoCutNextTask(this.form)
this.loading = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
}).catch(() => {
}catch(e){
this.loading = false
})
}
})
}
}
}

View File

@ -7,16 +7,19 @@
style="width: 100%"
class="wl-table"
>
<!-- 名称 -->
<el-table-column
label="名称"
:label="$t('trials:reading:label:wlTplName')"
prop="TemplateName"
/>
<!-- 窗宽 -->
<el-table-column
label="窗宽"
:label="$t('trials:reading:label:wlTplWW')"
prop="WW"
/>
<!-- 窗位 -->
<el-table-column
label="窗位"
:label="$t('trials:reading:label:wlTplWL')"
prop="WL"
/>
<el-table-column
@ -24,22 +27,25 @@
width="200"
>
<template slot="header">
<!-- 新增 -->
<el-button
size="mini"
@click="handleAdd"
>Add</el-button>
>{{ $t('common:button:new') }}</el-button>
</template>
<template slot-scope="scope">
<!-- 编辑 -->
<el-button
type="text"
size="mini"
@click="handleEdit(scope.row)"
>Edit</el-button>
>{{ $t('common:button:edit') }}</el-button>
<!-- 删除 -->
<el-button
type="text"
size="mini"
@click="handleDelete(scope.row)"
>Delete</el-button>
>{{ $t('common:button:delete') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -77,16 +83,19 @@ export default {
this.getWL()
},
methods: {
getWL() {
async getWL() {
this.loading = true
getUserWLTemplateList().then(res => {
try {
const res = await getUserWLTemplateList()
this.tableData = res.Result
this.loading = false
this.$emit('getWwcTpl')
}).catch(() => { this.loading = false })
} catch (e) {
this.loading = false
}
},
handleAdd() {
this.customWwc.title = this.$t('common:button:add')
this.customWwc.title = this.$t('common:button:new')
this.row = {}
this.customWwc.visible = true
},
@ -95,20 +104,27 @@ export default {
this.row = Object.assign({}, row)
this.customWwc.visible = true
},
handleDelete(row) {
var msg = this.$t('trials:staffResearch:message:confirmDel')
this.$confirm(msg, {
async handleDelete(row) {
// ''
var msg = this.$t('trials:reading:wlTemplate:delete')
const confirm = await this.$confirm(
msg,
{
type: 'warning',
distinguishCancelAndClose: true
}).then(() => {
}
)
if (confirm !== 'confirm') return
this.loading = true
deleteUserWLTemplate(row.Id).then(res => {
try {
await deleteUserWLTemplate(row.Id)
this.loading = false
//
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getWL()
}).catch(() => { this.loading = false })
})
} catch (e) {
this.loading = false
}
}
}
}

View File

@ -8,14 +8,16 @@
size="small"
>
<!-- 名称 -->
<el-form-item label="名称" prop="TemplateName">
<el-form-item :label="$t('trials:reading:label:wlTplName')" prop="TemplateName">
<el-input v-model="form.TemplateName" />
</el-form-item>
<el-form-item :label="$t('CustomWwwcForm:form:label:ww')" prop="WW">
<el-input-number v-model="form.WW" controls-position="right" :min="1" :precision="0" :step="1" />
<!-- 窗宽 -->
<el-form-item :label="$t('trials:reading:label:wlTplWW')" prop="WW">
<el-input-number v-model="form.WW" controls-position="right" :min="1" :max="100000" :precision="0" :step="1" />
</el-form-item>
<el-form-item :label="$t('CustomWwwcForm:form:label:wl')" prop="WL">
<el-input-number v-model="form.WL" controls-position="right" :precision="0" :step="1" />
<!-- 窗位 -->
<el-form-item :label="$t('trials:reading:label:wlTplWL')" prop="WL">
<el-input-number v-model="form.WL" controls-position="right" :min="-100000" :max="100000" :precision="0" :step="1" />
</el-form-item>
<el-form-item style="text-align:right;">
<!-- Cancel -->
@ -81,11 +83,12 @@ export default {
}
},
methods: {
handleSave() {
this.$refs.wlForm.validate((valid) => {
if (valid) {
async handleSave() {
const valid = await this.$refs.wlForm.validate()
if (!valid) return
this.loading = true
addOrUpdateUserWLTemplate(this.form).then((res) => {
try {
await addOrUpdateUserWLTemplate(this.form)
this.loading = false
this.$emit('getWL')
this.$emit('close')
@ -94,11 +97,9 @@ export default {
} else {
this.$message.success(this.$t('common:message:addedSuccessfully'))
}
}).catch(() => {
} catch (e) {
this.loading = false
})
}
})
},
handleCancel() {
this.$emit('close')