yh-pub 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +19 -0
- package/layout/admin/adminIndex.vue +104 -0
- package/layout/admin/api/loginApi.js +24 -0
- package/layout/admin/api/routers.js +93 -0
- package/layout/admin/api/tenantApi.js +123 -0
- package/layout/admin/home/homeIndex.vue +25 -0
- package/layout/admin/login/login.vue +161 -0
- package/layout/admin/menu/MenuIndex.vue +648 -0
- package/layout/admin/menu/icon.vue +108 -0
- package/layout/admin/menu/iconList.js +934 -0
- package/layout/admin/saTenant/saTenant.js +0 -0
- package/layout/admin/saTenant/saTenant.vue +173 -0
- package/layout/admin/saTenant/saTenantForm.js +80 -0
- package/layout/admin/saTenant/saTenantForm.vue +61 -0
- package/layout/admin/saTenant/saTenantRoleManage.js +417 -0
- package/layout/admin/saTenant/saTenantRoleManage.vue +99 -0
- package/layout/admin/user/saUser.less +6 -0
- package/layout/admin/user/saUser.vue +72 -0
- package/layout/main/components/console/console.vue +205 -0
- package/layout/main/components/error-store/error-store.vue +72 -0
- package/layout/main/components/error-store/index.js +2 -0
- package/layout/main/components/fullscreen/fullscreen.vue +57 -0
- package/layout/main/components/fullscreen/index.js +2 -0
- package/layout/main/components/language/language.vue +71 -0
- package/layout/main/components/side-menu/side-menu.less +74 -0
- package/layout/main/components/side-menu/side-menu.vue +75 -0
- package/layout/main/components/tags-nav/tags-nav.less +45 -0
- package/layout/main/components/tags-nav/tags-nav.vue +144 -0
- package/layout/main/components/user/user.less +12 -0
- package/layout/main/components/user/user.vue +185 -0
- package/layout/main/home/home.vue +480 -0
- package/layout/main/home/index.js +2 -0
- package/layout/main/home/toDoList.vue +32 -0
- package/layout/main/login/login.less +93 -0
- package/layout/main/login/login.vue +151 -0
- package/layout/main/main.less +81 -0
- package/layout/main/main.vue +202 -0
- package/layout/main/system/dict.vue +64 -0
- package/layout/main/system/orgManage.vue +473 -0
- package/layout/main/system/roleManage.js +755 -0
- package/layout/main/system/roleManage.vue +399 -0
- package/package.json +12 -0
- package/view/basic/error-logger.vue +74 -0
- package/view/basic/error-page/401.vue +22 -0
- package/view/basic/error-page/404.vue +22 -0
- package/view/basic/error-page/500.vue +22 -0
- package/view/basic/error-page/back-btn-group.vue +48 -0
- package/view/basic/error-page/error-content.vue +28 -0
- package/view/basic/error-page/error.less +46 -0
- package/view/config/component/confFormItem.vue +49 -0
- package/view/config/config.scss +45 -0
- package/view/config/configIndex.vue +150 -0
- package/view/config/subPage/router-config.vue +5 -0
- package/view/config/subPage/sys-config.vue +249 -0
- package/view/window/IframeFReportView.vue +28 -0
- package/view/window/windowIndex.vue +22 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<style lang="less">
|
|
2
|
+
@import "./login.less";
|
|
3
|
+
</style>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="login">
|
|
7
|
+
<div class="login-logo">
|
|
8
|
+
<img
|
|
9
|
+
src="@/assets/images/logo-tm.png"
|
|
10
|
+
width="334px"
|
|
11
|
+
height="53px" />
|
|
12
|
+
</div>
|
|
13
|
+
<div class="login-con">
|
|
14
|
+
<div class="login-title">
|
|
15
|
+
<div class="login-title-cn">中控系统</div>
|
|
16
|
+
<div class="login-title-en">Central Control System</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="form-con">
|
|
19
|
+
<el-form
|
|
20
|
+
ref="loginForm"
|
|
21
|
+
:model="form"
|
|
22
|
+
:rules="rules"
|
|
23
|
+
size="large"
|
|
24
|
+
layout="inline"
|
|
25
|
+
@keydown.enter.native="handleSubmit">
|
|
26
|
+
<el-form-item prop="userName">
|
|
27
|
+
<el-input
|
|
28
|
+
ref="username"
|
|
29
|
+
v-model="form.username"
|
|
30
|
+
size="large"
|
|
31
|
+
placeholder="请输入用户名">
|
|
32
|
+
<el-icon
|
|
33
|
+
slot="prefix"
|
|
34
|
+
class="user" />
|
|
35
|
+
</el-input>
|
|
36
|
+
</el-form-item>
|
|
37
|
+
<el-form-item prop="password">
|
|
38
|
+
<el-input
|
|
39
|
+
ref="password"
|
|
40
|
+
type="password"
|
|
41
|
+
size="large"
|
|
42
|
+
v-model="form.password"
|
|
43
|
+
placeholder="请输入密码"
|
|
44
|
+
style="line-height: 40px">
|
|
45
|
+
<el-icon
|
|
46
|
+
slot="prefix"
|
|
47
|
+
class="lock" />
|
|
48
|
+
</el-input>
|
|
49
|
+
</el-form-item>
|
|
50
|
+
<el-form-item>
|
|
51
|
+
<el-button
|
|
52
|
+
@click="handleSubmit"
|
|
53
|
+
type="primary"
|
|
54
|
+
style="width: 100%"
|
|
55
|
+
size="large"
|
|
56
|
+
:loading="loading">
|
|
57
|
+
登录
|
|
58
|
+
</el-button>
|
|
59
|
+
</el-form-item>
|
|
60
|
+
</el-form>
|
|
61
|
+
<p class="login-tip">{{ errorMsg }}</p>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<!-- <div class="login-info">
|
|
65
|
+
<div class="login-info-item">
|
|
66
|
+
<div class="login-info-icon">
|
|
67
|
+
<i class="iconfont icon-house" />
|
|
68
|
+
</div>
|
|
69
|
+
<div class="login-info-text">WMS</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="login-info-item">
|
|
72
|
+
<div class="login-info-icon">
|
|
73
|
+
<i class="iconfont icon-notebook-" />
|
|
74
|
+
</div>
|
|
75
|
+
<div class="login-info-text">EAM</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="login-info-item">
|
|
78
|
+
<div class="login-info-icon">
|
|
79
|
+
<i class="iconfont icon-appstore" />
|
|
80
|
+
</div>
|
|
81
|
+
<div class="login-info-text">WCS</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="login-info-item">
|
|
84
|
+
<div class="login-info-icon">
|
|
85
|
+
<i class="iconfont icon-monitor1" />
|
|
86
|
+
</div>
|
|
87
|
+
<div class="login-info-text">TMS</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div> -->
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<script>
|
|
94
|
+
import { useUserStore } from "@/store/user";
|
|
95
|
+
import { defineComponent } from "vue";
|
|
96
|
+
|
|
97
|
+
export default defineComponent({
|
|
98
|
+
data() {
|
|
99
|
+
return {
|
|
100
|
+
errorMsg: "",
|
|
101
|
+
form: {
|
|
102
|
+
username: "",
|
|
103
|
+
password: "",
|
|
104
|
+
},
|
|
105
|
+
loading: false,
|
|
106
|
+
rules: {
|
|
107
|
+
username: [{ required: true, message: "账号不能为空", trigger: "blur" }],
|
|
108
|
+
password: [{ required: true, message: "密码不能为空", trigger: "blur" }],
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
methods: {
|
|
113
|
+
handleSubmit() {
|
|
114
|
+
this.loading = true;
|
|
115
|
+
this.$refs.loginForm.validate((valid) => {
|
|
116
|
+
if (valid) {
|
|
117
|
+
const userStore = useUserStore();
|
|
118
|
+
let data = {
|
|
119
|
+
username: this.form.username,
|
|
120
|
+
password: this.form.password,
|
|
121
|
+
};
|
|
122
|
+
userStore
|
|
123
|
+
.handleLogin(data)
|
|
124
|
+
.then(async (res) => {
|
|
125
|
+
this.loading = false;
|
|
126
|
+
if (res.data.result) {
|
|
127
|
+
this.$message.success("登录成功");
|
|
128
|
+
userStore.getUserInfo().then(() => {
|
|
129
|
+
this.$router
|
|
130
|
+
.replace({
|
|
131
|
+
path: this.$config.homePath,
|
|
132
|
+
})
|
|
133
|
+
.then(() => {
|
|
134
|
+
window.navigation.reload();
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
// this.$message.error(res.data.msg);
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
.catch((e) => {
|
|
142
|
+
console.error(e);
|
|
143
|
+
this.loading = false;
|
|
144
|
+
this.$message.error(e);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
.main{
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
.logo-con{
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
height: 50px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
background-color: #0051C1;
|
|
11
|
+
.max-logo{
|
|
12
|
+
height: 44px;
|
|
13
|
+
width: auto;
|
|
14
|
+
display: block;
|
|
15
|
+
margin: 0 auto;
|
|
16
|
+
}
|
|
17
|
+
.mini-logo{
|
|
18
|
+
width: 44px;
|
|
19
|
+
height: auto;
|
|
20
|
+
display: block;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.header-con{
|
|
25
|
+
--header-size: 50px;
|
|
26
|
+
background: linear-gradient(90deg, #0051C1 0%, #3E93FE 100%);
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: var(--header-size);
|
|
29
|
+
line-height: var(--header-size);
|
|
30
|
+
padding: 0 12px;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: flex-end;
|
|
34
|
+
align-items: center;
|
|
35
|
+
position: relative;
|
|
36
|
+
.class-collapsed{
|
|
37
|
+
position: absolute;
|
|
38
|
+
left: 0;
|
|
39
|
+
top: 9px;
|
|
40
|
+
width: 32px;
|
|
41
|
+
height: 32px;
|
|
42
|
+
line-height: 32px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
margin-right: 12px;
|
|
45
|
+
color: var(--el-color-white);
|
|
46
|
+
font-size: 26px;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.main-layout-con{
|
|
51
|
+
flex: 1;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
background-color:#F3F5FA;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
}
|
|
57
|
+
.main-container{
|
|
58
|
+
flex: 1;
|
|
59
|
+
overflow: auto;
|
|
60
|
+
background-color: #fff;
|
|
61
|
+
padding: 0 10px 10px 10px;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
}
|
|
64
|
+
.left-sider{
|
|
65
|
+
width: 220px;
|
|
66
|
+
background-color: #21304C;
|
|
67
|
+
--el-menu-bg-color: #21304C;
|
|
68
|
+
--el-menu-text-color: var(--el-color-white);
|
|
69
|
+
--el-menu-active-color: var(--el-color-white);
|
|
70
|
+
--el-menu-hover-bg-color: transparent;
|
|
71
|
+
&.is-collapse {
|
|
72
|
+
width: 64px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.right-container {
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
flex: 1;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="main">
|
|
3
|
+
<aside
|
|
4
|
+
class="left-sider"
|
|
5
|
+
:class="{ 'is-collapse': collapse }">
|
|
6
|
+
<!-- 需要放在菜单上面的内容,如Logo,写在side-menu标签内部,如下 -->
|
|
7
|
+
<div class="logo-con">
|
|
8
|
+
<template v-if="hasCustomLogo">
|
|
9
|
+
<img
|
|
10
|
+
v-show="!collapse"
|
|
11
|
+
class="max-logo"
|
|
12
|
+
:src="logo"
|
|
13
|
+
key="max-logo" />
|
|
14
|
+
<img
|
|
15
|
+
v-show="collapse"
|
|
16
|
+
class="mini-logo"
|
|
17
|
+
:src="minLogo"
|
|
18
|
+
key="min-logo" />
|
|
19
|
+
</template>
|
|
20
|
+
<template v-else>
|
|
21
|
+
<img
|
|
22
|
+
v-show="!collapse"
|
|
23
|
+
class="max-logo"
|
|
24
|
+
src="@/assets/images/logo.png"
|
|
25
|
+
key="max-logo" />
|
|
26
|
+
<img
|
|
27
|
+
v-show="collapse"
|
|
28
|
+
class="mini-logo"
|
|
29
|
+
src="@/assets/images/logo-min.png"
|
|
30
|
+
key="min-logo" />
|
|
31
|
+
</template>
|
|
32
|
+
</div>
|
|
33
|
+
<side-menu
|
|
34
|
+
:active-name="route?.name"
|
|
35
|
+
:collapse="collapse"
|
|
36
|
+
:menu-list="menuList"></side-menu>
|
|
37
|
+
</aside>
|
|
38
|
+
<section
|
|
39
|
+
class="right-container"
|
|
40
|
+
:class="{ 'is-collapse': collapse }">
|
|
41
|
+
<header class="header-con">
|
|
42
|
+
<i
|
|
43
|
+
:class="`iconfont class-collapsed ${collapse ? 'icon-indent' : 'icon-outdent'}`"
|
|
44
|
+
@click="handleCollapsedChange"></i>
|
|
45
|
+
<user
|
|
46
|
+
:message-unread-count="unreadCount"
|
|
47
|
+
:user-name="userName" />
|
|
48
|
+
<language v-if="config.useI18n" />
|
|
49
|
+
<!-- <error-store
|
|
50
|
+
v-if="config.plugin?.errorStore?.showInHeader"
|
|
51
|
+
:count="errorCount"></error-store>
|
|
52
|
+
<LogConsole></LogConsole> -->
|
|
53
|
+
<fullscreen v-model="isFullScreen" />
|
|
54
|
+
</header>
|
|
55
|
+
<main class="main-layout-con">
|
|
56
|
+
<tags-nav />
|
|
57
|
+
<section class="main-container">
|
|
58
|
+
<router-view v-slot="{ Component }">
|
|
59
|
+
<KeepAlive
|
|
60
|
+
:max="10"
|
|
61
|
+
ref="kpAliveRef">
|
|
62
|
+
<component
|
|
63
|
+
:is="Component"
|
|
64
|
+
:key="route.path" />
|
|
65
|
+
</KeepAlive>
|
|
66
|
+
</router-view>
|
|
67
|
+
</section>
|
|
68
|
+
</main>
|
|
69
|
+
</section>
|
|
70
|
+
</section>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup>
|
|
74
|
+
import "./main.less";
|
|
75
|
+
import { ref, onMounted, onUnmounted, computed } from "vue";
|
|
76
|
+
import { storeToRefs } from "pinia";
|
|
77
|
+
import { ElNotification } from "element-plus";
|
|
78
|
+
import { getToken, getStorage } from "@/libs/util";
|
|
79
|
+
import { markRead } from "@/api/user";
|
|
80
|
+
import { useRouter, useRoute } from "vue-router";
|
|
81
|
+
|
|
82
|
+
import config from "@/config";
|
|
83
|
+
import { useAppStore } from "@/store/app.js";
|
|
84
|
+
import { useUserStore } from "@/store/user.js";
|
|
85
|
+
import SideMenu from "./components/side-menu/side-menu.vue";
|
|
86
|
+
import TagsNav from "./components/tags-nav/tags-nav.vue";
|
|
87
|
+
import User from "./components/user/user.vue";
|
|
88
|
+
import Fullscreen from "./components/fullscreen/fullscreen.vue";
|
|
89
|
+
import { Language } from "yh-i18n";
|
|
90
|
+
|
|
91
|
+
const baseUrl = process.env.NODE_ENV === "development" ? config.baseUrl.dev : config.baseUrl.pro;
|
|
92
|
+
|
|
93
|
+
const userStore = useUserStore();
|
|
94
|
+
const appStore = useAppStore();
|
|
95
|
+
const router = useRouter();
|
|
96
|
+
const route = useRoute();
|
|
97
|
+
const kpAliveRef = ref();
|
|
98
|
+
|
|
99
|
+
const { menuList, errorCount, tagNavList } = storeToRefs(appStore);
|
|
100
|
+
const { unreadCount } = storeToRefs(userStore);
|
|
101
|
+
|
|
102
|
+
const hasCustomLogo = computed(() => {
|
|
103
|
+
return !!config.logo;
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const logo = computed(() => {
|
|
107
|
+
return config.logo;
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const minLogo = computed(() => {
|
|
111
|
+
return config.minLogo;
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const userName = ref("");
|
|
115
|
+
const collapse = ref(false);
|
|
116
|
+
const unReadMessageMap = ref({});
|
|
117
|
+
const websocketPath = baseUrl.replace("http", "ws") + "/webSocket";
|
|
118
|
+
const isFullScreen = ref(false);
|
|
119
|
+
let websocket = null;
|
|
120
|
+
|
|
121
|
+
function handleCollapsedChange() {
|
|
122
|
+
collapse.value = !collapse.value;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function initWebsocket() {
|
|
126
|
+
let token = getToken();
|
|
127
|
+
if (typeof WebSocket === "undefined") {
|
|
128
|
+
ElMessage.info("您的浏览器不支持WebSocket");
|
|
129
|
+
} else if (token) {
|
|
130
|
+
try {
|
|
131
|
+
// 实例化websocket
|
|
132
|
+
websocket = new WebSocket(websocketPath + "?$_TOKEN=" + token);
|
|
133
|
+
// 监听websocket的连接
|
|
134
|
+
websocket.onopen = () => {
|
|
135
|
+
console.log("(" + websocketPath + ") websocket连接成功");
|
|
136
|
+
};
|
|
137
|
+
// 监听websocket的错误信息
|
|
138
|
+
websocket.onerror = () => {
|
|
139
|
+
console.log("(" + websocketPath + ") websocket连接错误");
|
|
140
|
+
};
|
|
141
|
+
// 监听websocket的消息
|
|
142
|
+
websocket.onmessage = (msg) => {
|
|
143
|
+
websocketGetMessage(msg);
|
|
144
|
+
};
|
|
145
|
+
// 监听websocket关闭
|
|
146
|
+
websocket.onclose = () => {
|
|
147
|
+
websocketClose();
|
|
148
|
+
};
|
|
149
|
+
} catch (e) {}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function websocketGetMessage(msg) {
|
|
154
|
+
let msgData = eval(msg.data);
|
|
155
|
+
if (msgData && msgData.length > 0) {
|
|
156
|
+
msgData.forEach((msg) => {
|
|
157
|
+
if (!unReadMessageMap.value[msg.ID]) {
|
|
158
|
+
unReadMessageMap.value[msg.ID] = msg;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
Object.keys(unReadMessageMap.value).forEach((key) => {
|
|
162
|
+
let msg = unReadMessageMap.value[key];
|
|
163
|
+
if (!msg.hasOwnProperty("show")) {
|
|
164
|
+
ElNotification.open({
|
|
165
|
+
title: msg.TITLE,
|
|
166
|
+
desc: msg.TEXT,
|
|
167
|
+
duration: 0,
|
|
168
|
+
name: msg.ID,
|
|
169
|
+
onClose: () => {
|
|
170
|
+
delete unReadMessageMap.value[msg.ID];
|
|
171
|
+
markRead(msg.ID);
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
msg["show"] = true;
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function websocketSendMessage(msg) {
|
|
181
|
+
websocket.send(msg);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function websocketClose() {
|
|
185
|
+
let that = this;
|
|
186
|
+
console.log("websocket关闭,尝试重新连接websocket");
|
|
187
|
+
window.setTimeout(() => {
|
|
188
|
+
that.initWebsocket();
|
|
189
|
+
}, 1000);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
onMounted(async () => {
|
|
193
|
+
try {
|
|
194
|
+
userName.value = getStorage("userName");
|
|
195
|
+
} catch (error) {
|
|
196
|
+
console.error("菜单加载异常:", error);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
onUnmounted(() => {
|
|
200
|
+
ElNotification.closeAll();
|
|
201
|
+
});
|
|
202
|
+
</script>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-select
|
|
3
|
+
:modelValue="modelValue"
|
|
4
|
+
@change="handleChange">
|
|
5
|
+
<el-option
|
|
6
|
+
v-for="(item, i) in dictData"
|
|
7
|
+
:key="i"
|
|
8
|
+
:value="item.VALUE"
|
|
9
|
+
:label="item.NAME"></el-option>
|
|
10
|
+
</el-select>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: "dict",
|
|
16
|
+
props: {
|
|
17
|
+
modelValue: "",
|
|
18
|
+
dict: String,
|
|
19
|
+
_select_id: String,
|
|
20
|
+
url: {
|
|
21
|
+
type: String,
|
|
22
|
+
default() {
|
|
23
|
+
return "/sysSelector/list";
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
dictData: [],
|
|
30
|
+
loading: false,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
emits: ["update:modelValue", "change"],
|
|
34
|
+
methods: {
|
|
35
|
+
getData(v) {
|
|
36
|
+
this.loading = true;
|
|
37
|
+
this.axios
|
|
38
|
+
.post(
|
|
39
|
+
this.url,
|
|
40
|
+
this.$qs.stringify({
|
|
41
|
+
id: this._select_id,
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
.then((response) => {
|
|
45
|
+
this.loading = false;
|
|
46
|
+
if (response.data.result) {
|
|
47
|
+
this.dictData = response.data.data;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
handleChange(v) {
|
|
52
|
+
this.$emit("update:modelValue", v);
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
watch: {
|
|
56
|
+
dict(val) {
|
|
57
|
+
this.getData(val);
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
mounted() {
|
|
61
|
+
this.getData(this.dict);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
</script>
|