This commit is contained in:
linfso 2023-12-12 17:26:41 +08:00
parent 88208c5439
commit 78c82cab69

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-row :gutter="20" type='flex'>
<el-col :span="3" :xs="3">
<el-col :span="4" :xs="4">
<div class="head-container">
<el-input
v-model="domainName"
@ -24,7 +24,7 @@
/>
</div>
</el-col>
<el-col :span="21" :xs="21">
<el-col :span="20" :xs="20" style="border-left:1px solid rgb(248 249 251);">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="" prop="name">
<el-input
@ -191,6 +191,18 @@
<el-input v-model="form.threeCode" placeholder="请输入三字码" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="所属区域" prop="remark">
<el-select v-model="form.domainId" placeholder="所属区域" clearable filterable>
<el-option
v-for="item in continentIdsOptions"
v-bind:key="item.value"
v-bind:label="item.label"
v-bind:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
@ -246,6 +258,9 @@ export default {
domainIdsOptions:[],
domainIdsEditOptions:[],
domainIdMap: new Map(),
continentIdsOptions:[],
defaultProps: {
children: "children",
label: "label"
@ -337,23 +352,17 @@ export default {
getContinentList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
this.continentIdsOptions =[];
listEmisContinent(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
var domainTree={"id":"","label":"所属大区","children":[]};
domainTree.children.push({"id":"-1","label":"临时"});
// domainTree.children.push({"id":"-1","label":"临时"});
//this.domainIdMap[-1]="临时";
var lastDomainId = -1;
response.rows.forEach(item =>{
// this.domainIdMap[item.id]=item.name;
//var optItem={value:item.id,label:item.name};
//this.domainIdsOptions.push(optItem)
var optItem={value:item.id,label:item.name};
this.continentIdsOptions.push(optItem)
var treeItem={"id":item.id,"label":item.name};
domainTree.children.push(treeItem);
@ -385,18 +394,18 @@ export default {
var jObj = {
continentId: continentId
};
this.$cache.local.setJSON("menuDomainId",jObj);
this.$cache.local.setJSON("continentId",jObj);
},
getCacheDomainId(){
try{
var domainJsonObj = this.$cache.local.getJSON("menuDomainId");
var domainJsonObj = this.$cache.local.getJSON("continentId");
if(domainJsonObj != undefined){
return domainJsonObj.continentId;
}else{
return -1;
}
}catch(e){
this.$cache.local.remove("menuDomainId");
this.$cache.local.remove("continentId");
}
},
// 取消按钮