This commit is contained in:
libing 2024-02-22 11:30:51 +08:00
parent 016b931d62
commit f7cb6e2e3e
13 changed files with 463 additions and 2 deletions

BIN
public/shorticon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/images/spic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
src/assets/logo/tnlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

139
src/layout/index copy.vue Normal file
View File

@ -0,0 +1,139 @@
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<TopHeader class="erp-header"></TopHeader>
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
<app-main />
<!-- <div class="signfooter">
<div class="auto clearfix">
<div class="footer-signfooter">
<p>{{this.$store.state.zoneConfig.copyright}} </p>
<p></p>
</div>
</div>
</div> -->
<right-panel>
<settings />
</right-panel>
</div>
</div>
</template>
<script>
import Breadcrumb from '@/components/Breadcrumb/index2'
import {checkRole} from '@/utils/permission'
import RightPanel from '@/components/RightPanel'
import { AppMain,TopHeader, Navbar, Settings, Sidebar, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
import variables from '@/assets/styles/variables.scss'
export default {
name: 'Layout',
components: {
Breadcrumb,
AppMain,
TopHeader,
Navbar,
RightPanel,
Settings,
Sidebar,
TagsView
},
mixins: [ResizeMixin],
computed: {
...mapState({
theme: state => state.settings.theme,
sideTheme: state => state.settings.sideTheme,
sidebar: state => state.app.sidebar,
device: state => state.app.device,
needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader
}),
isShowTagsView(){
// if(needTagsView){
// return true;
// }
if(checkRole(['admin'])){
return true;
}else{
return false;
}
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
},
variables() {
return variables;
}
},
mounted() {
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
.sidebarHide .fixed-header {
width: calc(100%);
}
.mobile .fixed-header {
width: 100%;
}
</style>

View File

@ -0,0 +1,301 @@
<template>
<div>
<div>
<el-form
:size="'small'"
:inline="true"
:model="ruleForm"
ref="ruleForm"
label-width="120px"
label-position="left"
:rules="addRules"
>
<div class="scan_title">展示:</div>
<!-- 自定义清除方法,注意change方法在clear前执行 -->
<el-row>
<el-form-item label="省/州" prop="firstId">
<el-select
v-model="ruleForm.firstId"
placeholder="请选择省/州"
@change="changeFirst"
@clear="handleClearFirstId"
style="width: 220px"
clearable
>
<el-option
v-for="item in allFirstList"
:key="item.firstId"
:label="item.firstNo"
:value="item.firstId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="市" prop="secondId">
<el-select
style="width: 220px"
v-model="ruleForm.secondId"
placeholder="请选择次级省/州"
@change="changeSecond"
@clear="handleClearSecondId"
clearable
>
<el-option
v-for="item in allSecondList"
:key="item.secondId"
:label="item.secondNo"
:value="item.secondId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="三级选项:" prop="thirdId">
<el-select
style="width: 220px"
v-model="ruleForm.thirdId"
placeholder="请选择三级选项编号"
@change="changeThird"
value-key="thirdId"
clearable
>
<el-option
v-for="item in allThirdList"
:key="item.thirdId"
:label="item.thirdNo"
:value="item.thirdId"
>
</el-option>
</el-select>
</el-form-item>
</el-row>
</el-form>
</div>
</div>
</template>
<script>
export default {
name: "LinkingSelect",
props: {},
data() {
return {
selectedLabelList: [],
filSelectedLabels: [],
refreshKey: 0,
ruleForm: {},
dynamicTags: [],
tagVisible: false,
allFirstList: [],
allSecondList: [],
allThirdList: [],
addRules: {
firstId: [
{
required: true,
trigger: "change,blur",
message: "请选择一级选项",
},
],
secondId: [
{
required: true,
trigger: "change,blur",
message: "请选择次级选项",
},
],
thirdId: [
{
required: true,
trigger: "change,blur",
message: "请选择三级选项",
},
],
},
};
},
created() {
this.handleGetAllFirst();
},
mounted() {
},
methods: {
// 清除次级选择以及子孙选择的内容
handleClearSecondId() {
this.ruleForm.secondId = "";
this.ruleForm.thirdId = "";
this.allThirdList = [];
},
// 清除一级选择以及子孙选择的内容
handleClearFirstId() {
this.ruleForm.firstId = "";
this.ruleForm.secondId = "";
this.ruleForm.thirdId = "";
this.allThirdList = [];
this.allSecondList = [];
},
// 清除最后一级选择的内容并刷新
changeThird() {
this.$forceUpdate();
},
changeSecond(secondId) {
this.ruleForm.thirdId = "";
// 判断是否为空字符串
if (secondId && secondId !== "") {
// 请求接口
// getThird({
// secondId: secondId,
// fileId: this.ruleForm.fileId,
// }).then((res) => {
// this.allThirdList = res.data;
// });
// 模拟数据
this.allThirdList = [
{
createBy: "admin",
createTime: "2023-03-27 10:24:30",
updateBy: "",
updateTime: null,
remark: null,
thirdId: 3,
thirdNo: "H0",
leftCapacity: 1,
totalCapacity: 5,
secondNo: "X0",
secondId: 11,
firstNo: "G0",
firstId: 11,
manageBy: "admin",
delFlag: "0",
deptId: 100,
deptName: "xx科技",
beginTime: null,
endTime: null,
userId: null,
},
];
}
},
changeFirst(firstId) {
this.ruleForm.secondId = "";
this.ruleForm.thirdId = "";
if (firstId !== "") {
// 请求接口
// getSecond({
// firstId: firstId,
// fileId: this.ruleForm.fileId,
// }).then((res) => {
// this.allSecondList = res.data;
// });
// 模拟数据
this.allSecondList = [
{
createBy: "admin",
createTime: "2023-03-27 10:24:10",
updateBy: "",
updateTime: null,
remark: null,
secondId: 11,
secondNo: "X0",
leftCapacity: 4,
totalCapacity: 5,
firstId: 11,
firstNo: "G0",
manageBy: "admin",
delFlag: "0",
deptId: 100,
deptName: "xx科技",
userId: null,
thirdId: null,
},
];
}
},
handleGetAllFirst() {
// getFirst({
// fileId: this.ruleForm.fileId,
// }).then((res) => {
// this.allFirstList = res.data;
// });
this.allFirstList = [
{
createBy: "admin",
createTime: "2023-03-27 10:23:57",
updateBy: "",
updateTime: null,
remark: null,
firstId: 11,
firstNo: "G0",
leftCapacity: 5,
totalCapacity: 5,
manageBy: "admin",
delFlag: "0",
deptId: 100,
deptName: "若依科技",
beginTime: null,
endTime: null,
userId: null,
fileCate: null,
secondId: null,
thirdId: null,
},
{
createBy: "aduser",
createTime: "2023-03-27 10:15:12",
updateBy: "",
updateTime: null,
remark: null,
firstId: 6,
firstNo: "G1",
leftCapacity: 0,
totalCapacity: 5,
manageBy: "aduser",
delFlag: "0",
deptId: 201,
deptName: "管理部",
beginTime: null,
endTime: null,
userId: null,
fileCate: null,
secondId: null,
thirdId: null,
},
{
createBy: "aduser2",
createTime: "2023-03-27 10:00:14",
updateBy: "aduser2",
updateTime: "2023-03-27 10:14:31",
remark: null,
firstId: 1,
firstNo: "G11",
leftCapacity: 0,
totalCapacity: 5,
manageBy: "aduser2",
delFlag: "0",
deptId: 207,
deptName: "管理一部",
beginTime: null,
endTime: null,
userId: null,
fileCate: null,
secondId: null,
thirdId: null,
},
];
},
},
};
</script>
<style scoped>
</style>

View File

@ -28,8 +28,15 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="国家id" prop="countryId">
<el-input v-model="form.countryId" placeholder="请输入国家id" />
<el-form-item label="所属国家" prop="countryId">
<el-select v-model="form.countryId" placeholder="所属区域" clearable filterable>
<el-option
v-for="item in countryIdsOptions"
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="8">
@ -85,6 +92,7 @@
<script>
import { listEmisRegion, getEmisRegion, delEmisRegion, addEmisRegion, updateEmisRegion } from "@/api/emis/emisRegion";
import { listEmisCountry } from "@/api/emis/emisCountry";
export default {
name: "emisRegionForm",
@ -98,6 +106,7 @@ export default {
data() {
return {
emisRegionOptions: [],
countryIdsOptions: [],
// 遮罩层
loading: true,
// 表单参数
@ -132,6 +141,7 @@ export default {
methods: {
initData() {
this.reset();
this.getCountryList();
if(this.id !=undefined) {
this.loading = true;
getEmisRegion(this.id).then(response => {
@ -141,6 +151,17 @@ export default {
}
this.getTreeselect();
},
getCountryList(){
this.loading = true;
listEmisCountry(this.queryParams).then(response => {
this.loading = false;
this.countryIdsOptions = [];
response.rows.forEach(item =>{
var optItem={value:item.id,label:item.name};
this.countryIdsOptions.push(optItem)
});
});
},
// 取消按钮
cancel() {
this.reset();