md
This commit is contained in:
parent
08c81053bd
commit
eed0cabdb7
@ -13,7 +13,7 @@
|
||||
<!-- <el-tooltip class="item" effect="dark" content="导出" placement="top" v-if="download!=null">
|
||||
<el-button size="mini" circle icon="el-icon-download" @click="download()" />
|
||||
</el-tooltip> -->
|
||||
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns!=undefined">
|
||||
<!-- <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns!=undefined">
|
||||
<el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px">
|
||||
<el-button size="mini" circle icon="el-icon-menu"/>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
@ -22,7 +22,7 @@
|
||||
</template>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-tooltip>
|
||||
</el-tooltip> -->
|
||||
|
||||
</el-row>
|
||||
<el-dialog :title="title" :visible.sync="open" append-to-body>
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
<!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
|
||||
<!-- <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> -->
|
||||
<div >
|
||||
<!-- v-if="isShowBizNav" -->
|
||||
<biz-nav id="bizNav" v-if="this.sidebar.opened" style="padding: 0px 0px;width:100%"/>
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
@ -26,7 +25,6 @@
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- </el-scrollbar> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -18,14 +18,14 @@ const mutations = {
|
||||
},
|
||||
ADD_VISITED_VIEW: (state, view) => {
|
||||
// console.log(view)
|
||||
var addActionLogData = {
|
||||
title: view.meta.title,
|
||||
path: view.path,
|
||||
menuId: view.meta.menuId,
|
||||
navPath: "",
|
||||
groupName: "",
|
||||
};
|
||||
addActionLog(addActionLogData);
|
||||
// var addActionLogData = {
|
||||
// title: view.meta.title,
|
||||
// path: view.path,
|
||||
// menuId: view.meta.menuId,
|
||||
// navPath: "",
|
||||
// groupName: "",
|
||||
// };
|
||||
// addActionLog(addActionLogData);
|
||||
|
||||
if (state.visitedViews.some(v => v.path === view.path)) return
|
||||
state.visitedViews.push(
|
||||
|
||||
@ -13,8 +13,8 @@
|
||||
</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 label="洲代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入洲代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@ -32,32 +32,13 @@
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="删除标志(0代表存在" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标志(0代表存在" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-form-item label="上级字典">
|
||||
<treeselect
|
||||
ref="tree"
|
||||
v-model="form.parentId"
|
||||
:options="emisContinentOptions"
|
||||
:normalizer="normalizer"
|
||||
:default-expand-level="1"
|
||||
:show-count="true"
|
||||
placeholder="选择上级"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div style="text-align: center;margin-bottom: 10px;">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -110,7 +91,6 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
this.getTreeselect();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -154,32 +134,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.idName,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
/** 查询菜单下拉树结构 */
|
||||
getTreeselect() {
|
||||
const queryParams = {}
|
||||
listEmisContinent(queryParams).then(response => {
|
||||
this.emisContinentOptions = [];
|
||||
const rootItem = { idId: 0, emisContinentName: '-', children: [] };
|
||||
rootItem.children = this.handleTree(response.data, "id");
|
||||
this.emisContinentOptions.push(rootItem);
|
||||
|
||||
if(this.parentId != undefined) {
|
||||
this.form.parentId = this.parentId;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -1,363 +1,287 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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="全球大区"
|
||||
clearable
|
||||
size="small"
|
||||
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
|
||||
:data="domainIdsTree"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
<!-- default-expand-all -->
|
||||
<span slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)" style="width:100%">
|
||||
<template>
|
||||
<!-- <svg-icon v-if="data.children != undefined" icon-class="category" style="width:13px;color: #909399;margin-right: 2px;"/> -->
|
||||
<svg-icon icon-class="dict" style="width:13px;color: #505050;margin-right:2px;"/>
|
||||
<span style="font-size:13px">{{ data.label }}</span>
|
||||
<span v-show="data.show" style="margin-left: 10px;">
|
||||
<el-button
|
||||
style="margin-left: 2px; width: 19px; padding: 0px"
|
||||
circle
|
||||
type="text"
|
||||
size="medium"
|
||||
:disabled="false"
|
||||
icon="el-icon-edit"
|
||||
@click="() => handleUpdateDictType(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="padding: 1px; width: 1px; margin-left: 5px"
|
||||
@click="() => handleDeleteDictType(data)"
|
||||
>
|
||||
</el-button>
|
||||
</span>
|
||||
<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="continentName"
|
||||
placeholder=""
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4" :xs="4">
|
||||
<el-button
|
||||
type="normal"
|
||||
size="mini"
|
||||
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
|
||||
:data="continentIdsTree"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
<div slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)" style="width:100%">
|
||||
<template>
|
||||
<svg-icon icon-class="dict" style="width:13px;color: #505050;margin-right:2px;"/>
|
||||
<span style="font-size:13px">{{ data.label }}</span>
|
||||
<span v-show="data.show" style="margin-left: 10px;">
|
||||
<el-button
|
||||
style="margin-left: 2px; width: 19px; padding: 0px"
|
||||
circle
|
||||
type="text"
|
||||
size="medium"
|
||||
:disabled="false"
|
||||
icon="el-icon-edit"
|
||||
@click="() => handleUpdateContinent(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="padding: 1px; width: 1px; margin-left: 5px"
|
||||
@click="() => handleDeleteContinent(data)"
|
||||
>
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</el-tree>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
<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
|
||||
v-model="queryParams.name"
|
||||
placeholder="国家名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="nameEn">
|
||||
<el-input
|
||||
v-model="queryParams.nameEn"
|
||||
placeholder="英文名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="code">
|
||||
<el-input
|
||||
v-model="queryParams.code"
|
||||
placeholder="国家代码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['emis:emisCountry:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['emis:emisCountry:edit']"
|
||||
>修改</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['emis:emisCountry:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisCountry:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="emisCountryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="国家名称" align="left" prop="name" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.name}}</div>
|
||||
</template>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<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
|
||||
v-model="queryParams.name"
|
||||
placeholder="国家名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="nameEn">
|
||||
<el-input
|
||||
v-model="queryParams.nameEn"
|
||||
placeholder="英文名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="code">
|
||||
<el-input
|
||||
v-model="queryParams.code"
|
||||
placeholder="国家代码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="twoCode">
|
||||
<el-input
|
||||
v-model="queryParams.twoCode"
|
||||
placeholder="二字码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="threeCode">
|
||||
<el-input
|
||||
v-model="queryParams.threeCode"
|
||||
placeholder="三字码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-table-column>
|
||||
<el-table-column label="英文名称" align="center" prop="nameEn" min-width="100" />
|
||||
<el-table-column label="国家代码" align="center" prop="code" min-width="100" />
|
||||
<el-table-column label="二字码" align="center" prop="twoCode" min-width="100" />
|
||||
<el-table-column label="三字码" align="center" prop="threeCode" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['emis:emisCountry:edit']"
|
||||
>修改</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['emis:emisCountry:remove']"
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['emis:emisCountry:add']"
|
||||
>新增</el-button>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page-sizes="[20,50,100,300,500,1000,2000,5000]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['emis:emisCountry:edit']"
|
||||
>修改</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['emis:emisCountry:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisCountry:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="emisCountryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="国家名称" align="left" prop="name" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.name}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="英文名称" align="center" prop="nameEn" min-width="100" />
|
||||
<el-table-column label="国家代码" align="center" prop="code" min-width="100" />
|
||||
<el-table-column label="二字码" align="center" prop="twoCode" min-width="100" />
|
||||
<el-table-column label="三字码" align="center" prop="threeCode" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['emis:emisCountry:edit']"
|
||||
>修改</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['emis:emisCountry:remove']"
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page-sizes="[20,50,100,300,500,1000,2000,5000]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 添加或修改国家对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" 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="8">
|
||||
<el-form-item label="国家代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入国家代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="二字码" prop="twoCode">
|
||||
<el-input v-model="form.twoCode" placeholder="请输入二字码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="三字码" prop="threeCode">
|
||||
<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="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<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="8">
|
||||
<el-form-item label="国家代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入国家代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="二字码" prop="twoCode">
|
||||
<el-input v-model="form.twoCode" placeholder="请输入二字码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="三字码" prop="threeCode">
|
||||
<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="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--
|
||||
<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-dialog :title="titleForm" :visible.sync="openForm" width="500px" append-to-body>
|
||||
<emisContinentForm :id="currentContinentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisContinentForm>
|
||||
</el-dialog>
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<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>
|
||||
<emisCountryForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisCountryForm>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<emisCountryView :id="id" ></EmisCountryView>
|
||||
</el-dialog>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisCountry, getEmisCountry, delEmisCountry, addEmisCountry, updateEmisCountry } from "@/api/emis/emisCountry";
|
||||
import { listEmisContinent, getEmisContinent, delEmisContinent, addEmisContinent, updateEmisContinent } from "@/api/emis/emisContinent";
|
||||
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,emisContinentView,emisContinentForm },
|
||||
components: { elDateSimplePicker,emisContinentForm},
|
||||
dicts: [
|
||||
],
|
||||
|
||||
data() {
|
||||
return {
|
||||
domainName:"",
|
||||
domainIdsTree:[],
|
||||
domainIdsOptions:[],
|
||||
domainIdsEditOptions:[],
|
||||
domainIdMap: new Map(),
|
||||
|
||||
continentIdsOptions:[],
|
||||
continentName:"",
|
||||
continentIdsTree:[],
|
||||
continentIdsOptions:[],
|
||||
currentContinentId:-1,
|
||||
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
domainSelectList:[],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -378,7 +302,7 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openc: false,
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
@ -415,104 +339,80 @@ export default {
|
||||
id: [
|
||||
{ required: true, message: "国家序号不能为空", trigger: "blur" }
|
||||
],
|
||||
continentId: [
|
||||
{ required: true, message: "所属洲id不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getContinentList();
|
||||
this.getContinentList();
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
continentName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询国家列表 */
|
||||
getList() {
|
||||
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];
|
||||
}
|
||||
listEmisCountry(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.emisCountryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getContinentList() {
|
||||
getContinentList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
|
||||
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]="临时";
|
||||
var lastDomainId = -1;
|
||||
var qParam = {};
|
||||
|
||||
listEmisContinent(qParam).then(response => {
|
||||
this.loading = false;
|
||||
this.continentIdsTree = [];
|
||||
this.continentIdsOptions = [];
|
||||
var continentTree={"id":"","label":"所属大区","children":[]};
|
||||
var lastContinentId = -1;
|
||||
response.rows.forEach(item =>{
|
||||
var optItem={value:item.id,label:item.name};
|
||||
this.continentIdsOptions.push(optItem)
|
||||
|
||||
var treeItem={"id":item.id,"label":item.name};
|
||||
domainTree.children.push(treeItem);
|
||||
lastDomainId = item.id;
|
||||
var treeItem={"id":item.id,"label":item.name,"show":false};
|
||||
continentTree.children.push(treeItem);
|
||||
lastContinentId = item.id;
|
||||
|
||||
});
|
||||
|
||||
var cacheDomainId = this.getCacheDomainId();
|
||||
if (cacheDomainId == undefined || cacheDomainId== -1){
|
||||
cacheDomainId = lastDomainId;
|
||||
this.saveCacheDomainId(lastDomainId);
|
||||
}
|
||||
this.queryParams.continentId = cacheDomainId;
|
||||
this.domainIdsTree.push(domainTree);
|
||||
//this.getList();
|
||||
this.queryParams.continentId = lastContinentId;
|
||||
this.continentIdsTree.push(continentTree);
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
mouseenter(data) {
|
||||
this.$set(data, 'show', true)
|
||||
},
|
||||
mouseleave(data) {
|
||||
this.$set(data, 'show', false)
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
// if(data.id!="-1"){
|
||||
this.queryParams.continentId = data.id;
|
||||
this.form.continentId= data.id;
|
||||
this.saveCacheDomainId(data.id);
|
||||
// this.currentAppName=data.label;
|
||||
this.handleQuery();
|
||||
// }
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
/** 新增按钮操作 */
|
||||
handleContinentAdd(row) {
|
||||
this.reset();
|
||||
this.openc = true;
|
||||
this.title = "新增";
|
||||
this.openForm = true;
|
||||
this.titleForm = "新增";
|
||||
},
|
||||
handleUpdateDictType(data) {
|
||||
this.currentDictId = data.id || this.ids;
|
||||
this.openDictType = true;
|
||||
this.titleDictType = "修改区域";
|
||||
handleUpdateContinent(row){
|
||||
this.currentContinentId = row.id || this.ids;
|
||||
this.openForm = true;
|
||||
this.titleForm = "修改";
|
||||
},
|
||||
handleDeleteDictType(data) {
|
||||
console.log(data)
|
||||
const dictIds = data.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
|
||||
return delEmisContinent(dictIds);
|
||||
handleDeleteContinent(row){
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delEmisContinent(ids);
|
||||
}).then(() => {
|
||||
console.log("删除成功")
|
||||
this.getContinentList();
|
||||
this.getContinentList()
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
/** 提交按钮 */
|
||||
submitContinentForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
@ -532,33 +432,29 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
saveCacheDomainId(continentId){
|
||||
var jObj = {
|
||||
continentId: continentId
|
||||
};
|
||||
this.$cache.local.setJSON("continentId",jObj);
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
getCacheDomainId(){
|
||||
try{
|
||||
var domainJsonObj = this.$cache.local.getJSON("continentId");
|
||||
if(domainJsonObj != undefined){
|
||||
return domainJsonObj.continentId;
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
}catch(e){
|
||||
this.$cache.local.remove("continentId");
|
||||
}
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.continentId = data.id;
|
||||
this.form.continentId= data.id;
|
||||
this.handleQuery();
|
||||
},
|
||||
mouseenter(data) {
|
||||
console.log("111"+data);
|
||||
this.$set(data, 'show', true)
|
||||
},
|
||||
mouseleave(data) {
|
||||
console.log("222"+data);
|
||||
this.$set(data, 'show', false)
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 取消按钮
|
||||
cancelContinent() {
|
||||
this.openc = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@ -622,12 +518,13 @@ export default {
|
||||
this.title = "修改";
|
||||
});
|
||||
|
||||
// 子组件打开模式
|
||||
// 子组件打开模式
|
||||
// this.currentId= row.id || this.ids;
|
||||
// this.openEmisCountry = true;
|
||||
// this.titleEmisCountry = "修改";
|
||||
|
||||
},
|
||||
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
@ -655,11 +552,11 @@ export default {
|
||||
});
|
||||
},
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
this.openc = false;
|
||||
this.getContinentList();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openForm = false;
|
||||
this.openc = false;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user