mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 00:36:46 +08:00
名字重复提示
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
:maxlength="maxlength"
|
:maxlength="maxlength"
|
||||||
:validate="validate"
|
:validate="validate"
|
||||||
@blur="validateProName"
|
@blur="validateProName"
|
||||||
@change="validateProName"
|
@change="validateFalse"
|
||||||
/>
|
/>
|
||||||
<div style="color: red; font-size: 10px" v-if="value && !validate">
|
<div style="color: red; font-size: 10px" v-if="value && !validate">
|
||||||
名称重复,请重新输入
|
名称重复,请重新输入
|
||||||
@@ -64,7 +64,9 @@ watch(
|
|||||||
watch(modelV, () => {
|
watch(modelV, () => {
|
||||||
emit("update:value", modelV.value);
|
emit("update:value", modelV.value);
|
||||||
});
|
});
|
||||||
|
function validateFalse() {
|
||||||
|
emit("update:validate", true);
|
||||||
|
}
|
||||||
function validateProName() {
|
function validateProName() {
|
||||||
emit("update:finished", false);
|
emit("update:finished", false);
|
||||||
props.value &&
|
props.value &&
|
||||||
|
|||||||
@@ -107,9 +107,10 @@
|
|||||||
style="border-radius: 8px"
|
style="border-radius: 8px"
|
||||||
/> -->
|
/> -->
|
||||||
<NameInput
|
<NameInput
|
||||||
placeholder="请输入路径名称"
|
placeholder="请输入评估名称"
|
||||||
v-model:value="assessmentName"
|
v-model:value="assessmentName"
|
||||||
v-model:validate="validate"
|
v-model:validate="validate"
|
||||||
|
v-model:finished="finished"
|
||||||
:maxlength="15"
|
:maxlength="15"
|
||||||
show-count
|
show-count
|
||||||
:type="4"
|
:type="4"
|
||||||
@@ -311,7 +312,7 @@ export default {
|
|||||||
copy_hs: false,
|
copy_hs: false,
|
||||||
back_hs: false,
|
back_hs: false,
|
||||||
pub_hs: false,
|
pub_hs: false,
|
||||||
|
finished:false,
|
||||||
validate: true,
|
validate: true,
|
||||||
});
|
});
|
||||||
const tableDataFunc = () => {
|
const tableDataFunc = () => {
|
||||||
@@ -436,7 +437,7 @@ export default {
|
|||||||
number: "assessmentId",
|
number: "assessmentId",
|
||||||
manager: "assessmentName",
|
manager: "assessmentName",
|
||||||
state: "releaseStatus",
|
state: "releaseStatus",
|
||||||
creater: "createUser",
|
creater: "createUserName",
|
||||||
pubtime: "releaseTime",
|
pubtime: "releaseTime",
|
||||||
cretime: "createTime",
|
cretime: "createTime",
|
||||||
haspub: "assessmentId",
|
haspub: "assessmentId",
|
||||||
@@ -595,11 +596,14 @@ export default {
|
|||||||
message.error("请输入评估名称");
|
message.error("请输入评估名称");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!state.validate) {
|
if (!state.finished) {
|
||||||
message.destroy();
|
|
||||||
message.warning("评估名称重复");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!state.validate && state.finished) {
|
||||||
|
message.destroy();
|
||||||
|
return message.warning("该评估名称已存在");
|
||||||
|
}
|
||||||
store.commit("SET_assessmentName", state.assessmentName);
|
store.commit("SET_assessmentName", state.assessmentName);
|
||||||
router.push("/researchadd");
|
router.push("/researchadd");
|
||||||
handleCancel();
|
handleCancel();
|
||||||
|
|||||||
Reference in New Issue
Block a user