Skip to content

Commit

Permalink
feat:stage 审核支持 checklist 确认场景 TencentBlueKing#10920
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 18371
  • Loading branch information
useryuyu committed Sep 13, 2024
1 parent e9fc322 commit 2457c42
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
CHECK_PARAM_LIST,
isEnumParam,
isMultipleParam,
isBooleanParam
isBooleanParam,
isCheakboxParam
} from '@/store/modules/atom/paramsConfig'
const paramTypeList = CHECK_PARAM_LIST.map((item) => ({
Expand Down Expand Up @@ -104,6 +105,7 @@
methods: {
isBooleanParam,
isMultipleParam,
isCheakboxParam,
isSelectorParam (type) {
return isMultipleParam(type) || isEnumParam(type)
Expand All @@ -129,7 +131,9 @@
if (isMultipleParam(type)) this.copyForm.value = []
if (isBooleanParam(type)) this.copyForm.value = false
if (isBooleanParam(type)) this.copyForm.value = ''
if (isCheakboxParam(type)) this.copyForm.value = false
},
changeOption (val) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</bk-option>
</bk-select>

<bk-checkbox v-model="form.value" v-else-if="isCheakboxParam(form.valueType)"></bk-checkbox>

<bk-radio-group v-model="form.value" v-else-if="isBooleanParam(form.valueType)">
<bk-radio :value="true" :disabled="disabled">
true
Expand All @@ -27,7 +29,8 @@
isMultipleParam,
isTextareaParam,
isStringParam,
isBooleanParam
isBooleanParam,
isCheakboxParam
} from '@/store/modules/atom/paramsConfig'
export default {
Expand All @@ -41,6 +44,7 @@
isStringParam,
isTextareaParam,
isMultipleParam,
isCheakboxParam,
isSelectorParam (type) {
return isMultipleParam(type) || isEnumParam(type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const TEXTAREA = 'TEXTAREA'
export const BOOLEAN = 'BOOLEAN'
export const ENUM = 'ENUM'
export const MULTIPLE = 'MULTIPLE'
export const CHECKBOX = 'CHECKBOX'
export const SVN_TAG = 'SVN_TAG'
export const GIT_REF = 'GIT_REF'
export const CODE_LIB = 'CODE_LIB'
Expand Down Expand Up @@ -95,6 +96,17 @@ export const DEFAULT_PARAM = {
required: true,
readOnly: false
},
[CHECKBOX]: {
id: 'checkbox',
name: 'checkbox',
defaultValue: false,
defalutValueLabel: 'defaultValue',
desc: '',
type: CHECKBOX,
typeDesc: 'checkbox',
required: true,
readOnly: false
},
[SVN_TAG]: {
id: 'svntag',
name: 'svntag',
Expand Down Expand Up @@ -219,6 +231,13 @@ export const CHECK_DEFAULT_PARAM = {
options: [],
valueType: MULTIPLE,
required: true
},
[CHECKBOX]: {
key: 'checkbox',
value: false,
desc: '',
valueType: CHECKBOX,
required: true
}
}
export const CHECK_PARAM_LIST = Object.keys(CHECK_DEFAULT_PARAM).map(key => ({
Expand Down Expand Up @@ -316,6 +335,7 @@ export const isTextareaParam = paramType(TEXTAREA)
export const isBooleanParam = paramType(BOOLEAN)
export const isEnumParam = paramType(ENUM)
export const isMultipleParam = paramType(MULTIPLE)
export const isCheakboxParam = paramType(CHECKBOX)
export const isSvnParam = paramType(SVN_TAG)
export const isGitParam = paramType(GIT_REF)
export const isCodelibParam = paramType(CODE_LIB)
Expand Down
1 change: 1 addition & 0 deletions src/frontend/locale/pipeline/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@
"bool": "Boolean",
"enum": "Radio",
"multiple": "Checkbox",
"checkbox": "Checkbox Confirmation Box",
"svntag": "SVN branch or TAG",
"gitref": "GIT branch or TAG",
"codelib": "Code repository",
Expand Down
1 change: 1 addition & 0 deletions src/frontend/locale/pipeline/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,7 @@
"bool": "布尔值",
"enum": "单选框",
"multiple": "复选框",
"checkbox": "Checkbox确认框",
"svntag": "SVN分支或TAG",
"gitref": "GIT分支或TAG",
"codelib": "代码库",
Expand Down

0 comments on commit 2457c42

Please sign in to comment.