This commit is contained in:
wenyann 2021-03-18 16:12:36 +08:00
commit a4ddf766be
3 changed files with 27 additions and 3 deletions

View File

@ -332,8 +332,10 @@ public class ApiAutomationService {
public ApiScenarioDTO getApiScenario(String id) {
ApiScenarioDTO apiScenarioDTO = new ApiScenarioDTO();
ApiScenarioWithBLOBs scenarioWithBLOBs = apiScenarioMapper.selectByPrimaryKey(id);
BeanUtils.copyBean(apiScenarioDTO, scenarioWithBLOBs);
setApiScenarioProjectIds(apiScenarioDTO);
if (scenarioWithBLOBs != null) {
BeanUtils.copyBean(apiScenarioDTO, scenarioWithBLOBs);
setApiScenarioProjectIds(apiScenarioDTO);
}
return apiScenarioDTO;
}

View File

@ -2,7 +2,7 @@
<div>
<el-row :gutter="10" type="flex" justify="space-between" align="middle">
<el-col>
<el-input :disabled="isReadOnly" v-model="xPath2.expression" maxlength="200" size="small" show-word-limit
<el-input :disabled="isReadOnly" v-model="xPath2.expression" maxlength="500" size="small" show-word-limit
:placeholder="$t('api_test.request.extract.xpath_expression')"/>
</el-col>
<el-col class="assertion-btn">

View File

@ -330,6 +330,9 @@
<el-form-item :label="$t('member.new_password')" prop="newpassword">
<el-input type="password" v-model="ruleForm.newpassword" autocomplete="off" show-password></el-input>
</el-form-item>
<el-form-item :label="$t('member.repeat_password')" prop="confirmpassword">
<el-input type="password" v-model="ruleForm.confirmpassword" autocomplete="off" show-password></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="ruleForm.id" autocomplete="off" :disabled="true" style="display:none"/>
</el-form-item>
@ -385,6 +388,15 @@ export default {
ShowMoreBtn
},
data() {
const validateConfirmPwd = (rule, value, callback) => {
if(value === ''){
callback(new Error(this.$t('user.input_password')));
}else if((value !== this.ruleForm.newpassword)){
callback(new Error(this.$t('member.inconsistent_passwords')));
}else{
callback();
}
};
return {
referenced: false,
queryPath: '/user/special/list',
@ -479,7 +491,17 @@ export default {
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
}
],
confirmpassword: [
{
required: true,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,30}$/,
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
},
{trigger: ['blur', 'change'], validator: validateConfirmPwd}
]
}
}
},