Skip to content

Commit

Permalink
优化前端
Browse files Browse the repository at this point in the history
  • Loading branch information
lazzyfu committed Jan 22, 2024
1 parent c10de79 commit 4e907b6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
27 changes: 20 additions & 7 deletions goinsight-fe/src/views/orders/commit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="审核人" help="工单审核人,一般为Leader" has-feedback>
<a-form-item label="审核人" help="请至少选择2位工单审核人" has-feedback>
<a-select
v-decorator="['approver', { rules: [{ required: true, message: '请选择工单审核人' }] }]"
v-decorator="['approver', { rules: [{ required: true, message: '请选择工单审核人' ,validator: validatorApprover }] }]"
placeholder="请选择工单审核人"
mode="multiple"
allowClear
Expand All @@ -126,7 +126,7 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="执行人" help="指定工单执行人,一般为数据库管理员" has-feedback>
<a-form-item label="执行人" help="请选择工单执行人" has-feedback>
<a-select
v-decorator="['executor', { rules: [{ required: true, message: '请选择工单执行人' }] }]"
placeholder="请选择工单执行人"
Expand All @@ -144,9 +144,9 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="复核人" help="工单执行完成后,对结果进行复核的人员" has-feedback>
<a-form-item label="复核人" help="请选择工单执行后结果的复核人" has-feedback>
<a-select
v-decorator="['reviewer', { rules: [{ required: true, message: '请选择工单复核人' }] }]"
v-decorator="['reviewer', { rules: [{ required: true, message: '请选择工单复核人'}] }]"
placeholder="请选择工单复核人"
mode="multiple"
allowClear
Expand Down Expand Up @@ -229,8 +229,6 @@ import 'codemirror/addon/edit/closebrackets'
// 编辑器类型
import 'codemirror/keymap/sublime'
import notification from 'ant-design-vue/es/notification'
// format
import { format } from 'sql-formatter'
import {
Expand Down Expand Up @@ -285,9 +283,24 @@ export default {
showCursorWhenSelecting: true,
keyMap: 'sublime', // 编辑器模式
},
validatorApprover: (rule, value, callback) => {
if (value.length < 2) {
return callback("请至少选择2位工单审核人")
}
if (value.length >= 5) {
return callback("最大不允许超过5位工单审核人")
}
callback()
},
}
},
methods: {
// handleApproverChange
handleApproverChange(value){
if (value.length < 2) {
return false
}
},
// 获取SQL类型
getSqlType() {
var urlSuffix = this.$route.path.split('/').at([-1]).toUpperCase()
Expand Down
2 changes: 1 addition & 1 deletion goinsight-fe/src/views/orders/list/detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export default {
ConfirmBtnTips.okText = '执行完成'
ConfirmBtnTips.cancelText = '执行中'
ConfirmBtnTips.action = 'feedback'
return '反馈'
return '更新状态'
} else if (progress === '已完成') {
BtnStatus.btnDisabled = false
BtnStatus.closeDisabled = true
Expand Down

0 comments on commit 4e907b6

Please sign in to comment.