新增区域
This commit is contained in:
parent
81d8c92351
commit
08c81053bd
@ -3,6 +3,8 @@
|
||||
<el-row :gutter="20" type='flex'>
|
||||
<el-col :span="4" :xs="4">
|
||||
<div class="head-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="15" :xs="15">
|
||||
<el-input
|
||||
v-model="domainName"
|
||||
placeholder="全球大区"
|
||||
@ -11,6 +13,21 @@
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4" :xs="4">
|
||||
<el-button
|
||||
style="margin-left: 2px; width: 33px;height:33px;border:1px solid #eeeeee; padding: 0px;line-height:23px;text-align:center;border-radius:0px;margin-top:1px;"
|
||||
circle
|
||||
type="text"
|
||||
size="medium"
|
||||
icon="el-icon-plus"
|
||||
:disabled="false"
|
||||
@click="handleContinentAdd"
|
||||
v-hasPermi="['emis:emisContinent:add']"
|
||||
>
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
@ -41,16 +58,6 @@
|
||||
@click="() => handleUpdateDictType(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
style="margin-left: 2px; width: 19px; padding: 0px"
|
||||
circle
|
||||
type="text"
|
||||
size="medium"
|
||||
icon="el-icon-plus"
|
||||
:disabled="false"
|
||||
@click="() => handleAddDictType(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
@ -266,6 +273,47 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改地球洲对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="openc" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="洲名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入洲名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="英文名称" prop="nameEn">
|
||||
<el-input v-model="form.nameEn" placeholder="请输入英文名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="洲代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入洲代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<!--
|
||||
<el-col :span="24" v-show="moreInputVisible" > </el-col>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="right" @click="handleShowMoreInput" >更多信息[+]</el-divider>
|
||||
</el-col>
|
||||
-->
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitContinentForm">确 定</el-button>
|
||||
<el-button @click="cancelContinent">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="500px" append-to-body>
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user