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