diff --git a/project/fengdu/AppOutSource/AppArchives/components/Add.vue b/project/fengdu/AppOutSource/AppArchives/components/Add.vue
index e23c18dc..3924115d 100644
--- a/project/fengdu/AppOutSource/AppArchives/components/Add.vue
+++ b/project/fengdu/AppOutSource/AppArchives/components/Add.vue
@@ -5,7 +5,7 @@
-
@@ -163,13 +163,13 @@ export default {
phone: '',
birthday: '',
age: '',
- fileUrl:[],
+ fileUrl: [],
girdInfoList: []
},
currCheckedKeys: [],
dialog: false,
treeList: [],
- treeArray:[],
+ treeArray: [],
treeObj: {
checkedKeys: [],
},
@@ -181,8 +181,8 @@ export default {
}
},
- computed:{
- rules(){
+ computed: {
+ rules() {
const IdNumberPass = (rule, value, callback) => {
if (value) {
if (ID.check(value)) {
@@ -191,6 +191,7 @@ export default {
callback(new Error("身份证号格式错误"));
}
}
+ callback()
// else {
// callback(new Error("请输入身份证号"));
// }
@@ -263,11 +264,11 @@ export default {
}
})
if (code === 0) {
- this.form = {...data,girdInfoList:[]}
+ this.form = {...data, girdInfoList: []}
this.form.fileUrl = [{
url: data.fileUrl
}]
- const target = this.treeArray?.find(v=>v.girdCode === data.girdCode)
+ const target = this.treeArray?.find(v => v.girdCode === data.girdCode)
this.currCheckedKeys = [target.id]
}
} catch (e) {
@@ -287,14 +288,14 @@ export default {
this.dialog = false;
},
- handleCheckChange(data, checked){
+ handleCheckChange(data, checked) {
if (checked) {
this.$refs.treeRef.setCheckedKeys([data.id])
}
},
onCheckChange(e) {
- if(e.children && e.children.length>0){
+ if (e.children && e.children.length > 0) {
this.$refs.treeRef.setCheckedKeys([]);
}
},
@@ -302,10 +303,10 @@ export default {
async addOrUpdate() {
try {
- const {code} = await this.instance.post(`/app/appshoparchives/addOrUpdate`,{
+ const {code} = await this.instance.post(`/app/appshoparchives/addOrUpdate`, {
...this.form,
- fileId:this.form.fileUrl[0]?.id,
- fileUrl:this.form.fileUrl[0]?.path,
+ fileId: this.form.fileUrl[0]?.id,
+ fileUrl: this.form.fileUrl[0]?.path,
})
if (code === 0) {
this.$message.success('保存成功');
@@ -317,13 +318,8 @@ export default {
},
handleSave() {
- this.$refs['ruleForm'].validate(valid => {
- if (valid) {
- this.addOrUpdate()
- }
- })
+ this.$refs.form.validate().then(() => this.addOrUpdate())
},
-
cancel() {
this.$emit('change', {
type: 'List',