diff --git a/src/views/emis/emisCountry/index.vue b/src/views/emis/emisCountry/index.vue index 9e91481..34f6779 100644 --- a/src/views/emis/emisCountry/index.vue +++ b/src/views/emis/emisCountry/index.vue @@ -3,6 +3,8 @@
+ + + + + + + +
- - 取 消
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -286,10 +334,12 @@ import { listEmisContinent, getEmisContinent, delEmisContinent, addEmisContinent import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker'; import emisCountryView from '@/views/emis/emisCountry/emisCountryView'; import emisCountryForm from '@/views/emis/emisCountry/emisCountryForm'; +import emisContinentView from '@/views/emis/emisContinent/emisContinentView'; +import emisContinentForm from '@/views/emis/emisContinent/emisContinentForm'; export default { name: "emisCountry", - components: { elDateSimplePicker,emisCountryView,emisCountryForm }, + components: { elDateSimplePicker,emisCountryView,emisCountryForm,emisContinentView,emisContinentForm }, dicts: [ ], @@ -328,7 +378,7 @@ export default { title: "", // 是否显示弹出层 open: false, - + openc: false, openForm: false, titleForm: "", @@ -398,6 +448,8 @@ export default { this.continentIdsOptions =[]; listEmisContinent(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => { + this.loading = false; + this.domainIdsTree = []; var domainTree={"id":"","label":"所属大区","children":[]}; // domainTree.children.push({"id":"-1","label":"临时"}); //this.domainIdMap[-1]="临时"; @@ -423,7 +475,6 @@ export default { }); }, mouseenter(data) { - alert(11); this.$set(data, 'show', true) }, mouseleave(data) { @@ -439,12 +490,11 @@ export default { this.handleQuery(); // } }, - handleAddDictType(data) { - if(data != undefined){ - this.currentParentDictId = data.id - } - this.openDictType = true; - this.titleDictType = "添加区域"; + /** 新增按钮操作 */ + handleContinentAdd(row) { + this.reset(); + this.openc = true; + this.title = "新增"; }, handleUpdateDictType(data) { this.currentDictId = data.id || this.ids; @@ -461,6 +511,26 @@ export default { this.getContinentList(); this.$modal.msgSuccess("删除成功"); }).catch(() => {}); + }, + /** 提交按钮 */ + submitContinentForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateEmisContinent(this.form).then(response => { + this.$modal.msgSuccess("修改成功"); + this.openc = false; + this.getContinentList(); + }); + } else { + addEmisContinent(this.form).then(response => { + this.$modal.msgSuccess("新增成功"); + this.openc = false; + this.getContinentList(); + }); + } + } + }); }, saveCacheDomainId(continentId){ var jObj = { @@ -484,6 +554,11 @@ export default { cancel() { this.open = false; this.reset(); + }, + // 取消按钮 + cancelContinent() { + this.openc = false; + this.reset(); }, // 表单重置 reset() {