修复:

1、删除项目,列表数据不自动更新问题
2、新增项目提示项目名称已经存在问题修复
This commit is contained in:
HDM58\hdm58 2024-01-15 10:11:52 +08:00
parent f513655448
commit 0a21a1b738
2 changed files with 3 additions and 10 deletions

View File

@ -5,22 +5,17 @@ use think\Validate;
class ProjectCheck extends Validate
{
protected $rule = [
'name' => 'require|unique:project',
'code' => 'alphaNum|length:5,10|unique:project',
'name' => 'require',
'id' => 'require'
];
protected $message = [
'name.require' => '项目名称不能为空',
'name.unique' => '同样的项目名称已经存在',
'code.alphaNum' => '项目代码只能为5至10为字母和数字',
'code.length' => '项目代码只能为5至10为字母和数字',
'code.unique' => '同样的项目代码已经存在',
'id.require' => '缺少更新条件',
];
protected $scene = [
'add' => ['name','code'],
'add' => ['name'],
'edit' => ['id']
];
}

View File

@ -365,9 +365,7 @@ function overview(){
layer.closeAll();
layer.msg(e.msg);
if(e.code==0){
setTimeout(function () {
location.href='/project/index/index';
}, 1000)
tool.sideClose(1000);
}
}
let postData = { "id": project_id };