Commit c1b779cc authored by renjintao's avatar renjintao

edit

parent 151afdae
......@@ -121,12 +121,18 @@ export default {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.resourceId = [r.result.resourceType, r.result.resourceId];
});
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
if (this.entity.resourceId.length > 1) {
this.entity.resourceId = this.entity.resourceId[1];
} else {
this.entity.resourceId = null;
}
if (this.entity.isOutside != 1) {
this.entity.outsideTime = 0;
}
......@@ -160,8 +166,8 @@ export default {
this.entity.equipTypeId = items.id;
},
resourceChange(v, items) {
this.entity.resourceType = Number(items[0].value);
this.entity.resourceId = items[1].value;
this.entity.resourceType = items[0].value;
this.entity.resourceId = v;
this.entity.resourceCode = items[1].__label;
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment