Forráskód Böngészése

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/pblUserManage

lzw 3 hónapja
szülő
commit
16f982e7e4

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/css/app.08a948f0.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/css/app.54cc4b88.css


+ 1 - 1
dist/index.html

@@ -36,4 +36,4 @@
         width: 100%;
         background: #e6eaf0;
         font-family: '黑体';
-      }</style><script defer="defer" src="/js/chunk-vendors.3a922260.js"></script><script defer="defer" src="/js/app.0e4a3a28.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.08a948f0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but userManage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
+      }</style><script defer="defer" src="/js/chunk-vendors.3a922260.js"></script><script defer="defer" src="/js/app.88c38243.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.54cc4b88.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but userManage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/js/app.88c38243.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/js/app.88c38243.js.map


+ 65 - 32
src/components/desktopToolList.vue

@@ -21,17 +21,22 @@
 				v-loading="loading"
 				:header-cell-style="headerCellStyle"
 			>
-			<el-table-column label="标识" min-width="45" show-overflow-tooltip>
+				<el-table-column label="正式名称" min-width="45" show-overflow-tooltip>
+					<template slot-scope="scope">{{
+						scope.row.url[0].name ? scope.row.url[0].name : "-"
+					}}</template>
+				</el-table-column>
+				<el-table-column label="标识" min-width="45" show-overflow-tooltip>
 					<template slot-scope="scope">{{
 						scope.row.toolId ? scope.row.toolId : "-"
 					}}</template>
 				</el-table-column>
-				<el-table-column label="宽度" min-width="45" show-overflow-tooltip>
+				<el-table-column label="窗口宽度" min-width="45" show-overflow-tooltip>
 					<template slot-scope="scope">{{
 						scope.row.dialogWidth ? scope.row.dialogWidth : "-"
 					}}</template>
 				</el-table-column>
-				<el-table-column label="高度" min-width="45" show-overflow-tooltip>
+				<el-table-column label="窗口高度" min-width="45" show-overflow-tooltip>
 					<template slot-scope="scope">{{
 						scope.row.dialogHeight ? scope.row.dialogHeight : "-"
 					}}</template>
@@ -43,7 +48,7 @@
 					}}</template>
 				</el-table-column>
 
-				<el-table-column label="工具设置" min-width="45" show-overflow-tooltip>
+				<el-table-column label="工具设置" width="102" show-overflow-tooltip>
 					<template slot-scope="scope">
 						<el-popover placement="bottom" width="840" trigger="hover">
 							<div class="urlItemBox">
@@ -86,7 +91,7 @@
 												<span v-else>-</span>
 											</div>
 										</div>
-										<div>
+										<!-- <div>
 											<span>默认图标:</span>
 											<div class="ui_m_image">
 												<el-image
@@ -109,11 +114,11 @@
 												></el-image>
 												<span v-else>-</span>
 											</div>
-										</div>
+										</div> -->
 									</div>
 								</div>
 							</div>
-							<el-button slot="reference">查看设置</el-button>
+							<el-button slot="reference" size="small">查看设置</el-button>
 						</el-popover>
 					</template>
 				</el-table-column>
@@ -181,7 +186,7 @@
 							v-if="scope.row.status == '1'"
 							@click="changeToolStatus(scope.row, '0')"
 							style="
-								color: #67C23A;
+								color: #67c23a;
 								background: none;
 								border: none;
 								cursor: pointer;
@@ -214,10 +219,15 @@
 <script>
 import { API_CONFIG } from "@/common/apiConfig";
 import addDesktopToolDialog from "./dialog/addDesktopToolDialog.vue";
+import { addOp } from "@/api/user";
+import { mapGetters } from "vuex";
 export default {
 	components: {
 		addDesktopToolDialog,
 	},
+	computed: {
+		...mapGetters(["userid"]),
+	},
 	data() {
 		return {
 			desktopList: [],
@@ -282,7 +292,7 @@ export default {
 					{
 						functionName: "update_desktopToolById",
 						id: form.id,
-						toolId:form.toolId,
+						toolId: form.toolId,
 						width: form.dialogWidth,
 						height: form.dialogHeight,
 						description: form.description,
@@ -296,12 +306,18 @@ export default {
 				this.$refs.addDesktopToolDialogRef.loading = true;
 				this.$ajax
 					.post(API_CONFIG.baseUrl, params)
-					.then((res) => {
+					.then(async (res) => {
 						if (res.data == 1) {
 							this.$refs.addDesktopToolDialogRef.close();
 							this.$message.success("修改工具成功");
-						} else if(res.data[0][0].message == "repeat toolId"){
-							this.$message.error("工具标识重复!")
+							await addOp({
+								uid: this.userid,
+								cid: "",
+								type: "user_op",
+								content: `修改了了工具:${form.toolId}`,
+							});
+						} else if (res.data[0][0].message == "repeat toolId") {
+							this.$message.error("工具标识重复!");
 						} else {
 							this.$message.error("修改工具失败");
 						}
@@ -317,7 +333,7 @@ export default {
 				let params = [
 					{
 						functionName: "insert_desktopTool",
-						toolId:form.toolId,
+						toolId: form.toolId,
 						width: form.dialogWidth,
 						height: form.dialogHeight,
 						description: form.description,
@@ -330,14 +346,20 @@ export default {
 				this.$refs.addDesktopToolDialogRef.loading = true;
 				this.$ajax
 					.post(API_CONFIG.baseUrl, params)
-					.then((res) => {
-						console.log(res)
+					.then(async (res) => {
+						console.log(res);
 						if (res.data == 1) {
 							this.$refs.addDesktopToolDialogRef.close();
 							this.$message.success("添加工具成功");
-						} else if(res.data[0][0].message == "repeat toolId"){
-							this.$message.error("工具标识重复!")
-						}else{
+							await addOp({
+								uid: this.userid,
+								cid: "",
+								type: "user_op",
+								content: `添加了工具:${form.toolId}`,
+							});
+						} else if (res.data[0][0].message == "repeat toolId") {
+							this.$message.error("工具标识重复!");
+						} else {
 							this.$message.error("添加工具失败");
 						}
 						this.$refs.addDesktopToolDialogRef.loading = false;
@@ -365,7 +387,7 @@ export default {
 				{
 					functionName: "update_desktopToolById",
 					id: _data.id,
-					toolId:_data.toolId,
+					toolId: _data.toolId,
 					width: _data.dialogWidth,
 					height: _data.dialogHeight,
 					description: _data.description,
@@ -378,11 +400,31 @@ export default {
 			];
 			this.$ajax
 				.post(API_CONFIG.baseUrl, params)
-				.then((res) => {
+				.then(async (res) => {
 					if (res.data == 1) {
-						this.$message.success("已停用");
+						if (newValue == 1) {
+							this.$message.success("已停用");
+							await addOp({
+								uid: this.userid,
+								cid: "",
+								type: "user_op",
+								content: `停用了工具:${item.toolId}`,
+							});
+						} else {
+							this.$message.success("已启用");
+							await addOp({
+								uid: this.userid,
+								cid: "",
+								type: "user_op",
+								content: `启用了工具:${item.toolId}`,
+							});
+						}
 					} else {
-						this.$message.error("停用失败");
+						if (newValue == 1) {
+							this.$message.success("停用失败");
+						} else {
+							this.$message.success("启用失败");
+						}
 					}
 					this.loading = false;
 					this.getData();
@@ -438,22 +480,13 @@ export default {
 
 .urlItem {
 	width: 400px;
-	height: 250px;
+	height: 170px;
 	overflow: auto;
 	position: relative;
 	box-sizing: border-box;
 	border-bottom: solid 1px #ebeef5;
 }
 
-/* .urlItem::after{
-	content: "";
-	height: 2px;
-	width: 100%;
-	background-color: #ebeef5;
-	position: absolute;
-	bottom: 10px;
-} */
-
 .urlItem:nth-child(2n) {
 	margin-left: 20px;
 }

+ 21 - 21
src/components/dialog/addDesktopToolDialog.vue

@@ -148,7 +148,7 @@
 										</el-tooltip>
 									</div>
 								</div>
-
+<!-- 
 								<div class="f_aRow f_ar_icon">
 									<span>默认图标</span>
 									<div class="f_icon" style="margin-left: 10px">
@@ -201,7 +201,7 @@
 											</el-image>
 										</el-tooltip>
 									</div>
-								</div>
+								</div> -->
 							</div>
 							<div class="f_hr"></div>
 						</div>
@@ -237,8 +237,8 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 					{
 						region: "beta",
@@ -246,8 +246,8 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 					{
 						region: "hk",
@@ -255,8 +255,8 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 					{
 						region: "com",
@@ -264,12 +264,12 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 				],
 				json: "",
-				isAdmin: false,
+				isAdmin: "0",
 				description: "",
 				status: "0",
 			},
@@ -311,8 +311,8 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 					{
 						region: "beta",
@@ -320,8 +320,8 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 					{
 						region: "hk",
@@ -329,8 +329,8 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 					{
 						region: "com",
@@ -338,12 +338,12 @@ export default {
 						icon: "",
 						name: "",
 						platformIcon: "",
-						activeIcon: "",
-						defaultIcon: "",
+						// activeIcon: "",
+						// defaultIcon: "",
 					},
 				],
 				json: "",
-				isAdmin: false,
+				isAdmin: "0",
 				description: "",
 				status: "0",
 			};
@@ -353,7 +353,7 @@ export default {
 			if(!this.form.toolId){
 				return this.$message.error("请完善工具标识的设置!");
 			}
-			if(!_rule.url || !_rule.icon || !_rule.name || !_rule.platformIcon || !_rule.activeIcon || !_rule.defaultIcon){
+			if(!_rule.url || !_rule.icon || !_rule.name || !_rule.platformIcon){
 				return this.$message.error("请完善cn站点的设置!")
 			}
 			

+ 197 - 0
src/components/dialog/addMenuDialog.vue

@@ -0,0 +1,197 @@
+<template>
+	<div>
+		<el-dialog
+			:title="type == 'edit' ? '编辑菜单' : '添加菜单'"
+			class="table"
+			:visible.sync="show"
+			:close-on-click-modal="false"
+			width="800px"
+			top="8vh"
+		>
+			<div v-loading="loading">
+				<el-form ref="form" :model="form" label-width="100px">
+					<el-form-item label="菜单名称">
+						<el-input style="width: 300px" v-model="form.menuName"></el-input>
+					</el-form-item>
+					<el-form-item label="菜单默认图标">
+						<el-tooltip
+							class="item"
+							effect="dark"
+							:content="form.menuIcon ? '更改图标' : '上传图标'"
+							placement="top"
+						>
+							<el-image
+								style="width: 50px; height: 50px;cursor: pointer;display: flex;align-items: center;justify-content: center;"
+								:src="form.menuIcon"
+								fit="cover"
+								@click="addUrlIcon('menuIcon')"
+							>
+								<div
+									slot="error"
+									class="image-slot"
+									@click="addUrlIcon('menuIcon')"
+								>
+									<i class="el-icon-picture-outline"></i>
+								</div>
+							</el-image>
+						</el-tooltip>
+					</el-form-item>
+					<el-form-item label="菜单激活图标">
+						<el-tooltip
+							class="item"
+							effect="dark"
+							:content="form.menuActiveIcon ? '更改图标' : '上传图标'"
+							placement="top"
+						>
+							<el-image
+								style="width: 50px; height: 50px;cursor: pointer;display: flex;align-items: center;justify-content: center;"
+								:src="form.menuActiveIcon"
+								fit="cover"
+								@click="addUrlIcon('menuActiveIcon')"
+							>
+								<div
+									slot="error"
+									class="image-slot"
+									@click="addUrlIcon('menuActiveIcon')"
+								>
+									<i class="el-icon-picture-outline"></i>
+								</div>
+							</el-image>
+						</el-tooltip>
+					</el-form-item>
+				</el-form>
+			</div>
+			<!-- 按钮区域 -->
+			<div slot="footer" class="el-dialog__footer">
+				<el-button @click="close()">取 消</el-button>
+				<el-button type="primary" @click="submit()">确认</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+import "@/common/aws-sdk-2.235.1.min.js";
+export default {
+	data() {
+		return {
+			show: false,
+			loading: false,
+			form: {
+				menuName: "",
+				menuIcon: "",
+				menuActiveIcon: "",
+				children:[]
+			},
+			type: null,
+		};
+	},
+	methods: {
+		open(data, type = "add") {
+			if (data) {
+				this.form = JSON.parse(JSON.stringify(data));
+			} else {
+				this.init();
+			}
+			this.type = type;
+			this.show = true;
+		},
+		close() {
+			this.show = false;
+			this.init();
+		},
+		init() {
+			this.form = {
+				menuName: "",
+				menuIcon: "",
+				menuActiveIcon: "",
+				children:[]
+			};
+		},
+		submit() {
+			if(!this.form.menuName || !this.form.menuIcon || !this.form.menuActiveIcon)return this.$message.error("请完善表单")
+			this.$emit("success", {item:this.form,type:this.type});
+		},
+		async addUrlIcon(type = "menuIcon") {
+			let _url = await this.uploadFile("image/*");
+			if (_url) {
+				this.form[type] = _url;
+			} else {
+				return console.log("无图片");
+			}
+		},
+		uploadFile(accept = "*") {
+			return new Promise((resolve) => {
+				const input = document.createElement("input");
+				input.type = "file";
+				input.accept = accept;
+				input.onchange = (event) => {
+					const file = event.target.files[0];
+					if (file) {
+						let credentials = {
+							accessKeyId: "AKIATLPEDU37QV5CHLMH",
+							secretAccessKey: "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",
+						}; //秘钥形式的登录上传
+						window.AWS.config.update(credentials);
+						window.AWS.config.region = "cn-northwest-1"; //设置区域
+						let bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+						// let _name = file.name;
+						// let size = file.size;
+						let params = {
+							Key:
+								file.name.split(".")[0] +
+								new Date().getTime() +
+								"." +
+								file.name.split(".")[file.name.split(".").length - 1],
+							ContentType: file.type,
+							Body: file,
+							"Access-Control-Allow-Credentials": "*",
+							ACL: "public-read",
+						}; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+						let options = {
+							partSize: 2048 * 1024 * 1024,
+							queueSize: 2,
+							leavePartsOnError: true,
+						};
+
+						bucket
+							.upload(params, options)
+							.on("httpUploadProgress", (evt) => {
+								console.log(evt);
+							})
+							.send((err, data) => {
+								if (err) {
+									this.$message.error("上传失败");
+									return resolve("");
+								} else {
+									return resolve(data.Location);
+								}
+							});
+					} else {
+						resolve("");
+					}
+				};
+				input.click();
+			});
+		},
+		addArg(value) {
+			if (this.form.argumentList.includes(value)) {
+				this.form.argumentList.splice(this.form.argumentList.indexOf(value), 1);
+			} else {
+				this.form.argumentList.push(value);
+			}
+		},
+	},
+};
+</script>
+
+<style scoped>
+.table >>> .el-dialog__header {
+	padding: 15px 20px;
+	background: #454545;
+}
+
+.table >>> .el-dialog__title {
+	color: #fff;
+}
+</style>

+ 1450 - 0
src/components/dialog/permissionSettingDialog.vue

@@ -0,0 +1,1450 @@
+<template>
+	<div>
+		<el-dialog
+			title="权限设置"
+			class="permissionSettingDialog"
+			:visible.sync="show"
+			:close-on-click-modal="false"
+			width="1000px"
+			top="8vh"
+		>
+			<div v-loading="loading" class="ps_area">
+				<div class="pa_a_head">
+					<span
+						:class="{ pa_a_h_active: tagType == 'basics' }"
+						@click="changeTagType('basics')"
+						>基本信息</span
+					>
+					<span
+						:class="{ pa_a_h_active: tagType == 'desktop' }"
+						@click="changeTagType('desktop')"
+						>桌面工具</span
+					>
+					<span
+						:class="{ pa_a_h_active: tagType == 'admin-index' }"
+						@click="changeTagType('admin-index')"
+						>管理平台侧首页</span
+					>
+					<span
+						:class="{ pa_a_h_active: tagType == 'admin-sidebar' }"
+						@click="changeTagType('admin-sidebar')"
+						>管理平台侧边栏</span
+					>
+					<div class="ea_add">
+						<el-button
+							size="mini"
+							v-if="['admin-sidebar'].includes(tagType)"
+							type="primary"
+							@click="addMenu()"
+							>添加菜单</el-button
+						>
+						<el-button
+							size="mini"
+							v-if="
+								['desktop', 'admin-index', 'admin-sidebar'].includes(tagType)
+							"
+							type="primary"
+							@click="addTool(tagType)"
+							>添加工具</el-button
+						>
+					</div>
+				</div>
+				<div class="pa_a_editBox">
+					<div class="editArea pa_a_eb_basics" v-show="tagType == 'basics'">
+						<div class="ea_basics_input">
+							<span>标题</span>
+							<el-input
+								v-model="form.basics.title"
+								placeholder="请输入标题内容"
+							></el-input>
+						</div>
+
+						<div class="ea_basics_input">
+							<span>简介</span>
+							<el-input
+								v-model="form.basics.brief"
+								placeholder="请输入简介内容"
+							></el-input>
+						</div>
+
+						<div class="ea_basics_logo">
+							<span>logo</span>
+							<el-tooltip
+								class="item"
+								effect="dark"
+								:content="form.basics.logo ? '更改图标' : '上传图标'"
+								placement="top"
+							>
+								<el-image
+									style="width: 100%; height: 100%"
+									:src="form.basics.logo"
+									fit="cover"
+									@click="addBasicsIcon()"
+								>
+									<div slot="error" class="image-slot" @click="addBasicsIcon()">
+										<i class="el-icon-picture-outline"></i>
+									</div>
+								</el-image>
+							</el-tooltip>
+						</div>
+					</div>
+					<div class="editArea pa_a_eb_desktop" v-show="tagType == 'desktop'">
+						<div class="ea_table">
+							<el-table
+								:data="form.desktop.list"
+								stripe
+								border
+								style="width: 100%"
+								:header-cell-style="headerCellStyle"
+							>
+								<el-table-column
+									label="标识"
+									min-width="100"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.toolId ? scope.row.toolId : "-"
+									}}</template>
+								</el-table-column>
+								<!-- <el-table-column
+									label="宽度"
+									min-width="45"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.dialogWidth ? scope.row.dialogWidth : "-"
+									}}</template>
+								</el-table-column>
+								<el-table-column
+									label="高度"
+									min-width="45"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.dialogHeight ? scope.row.dialogHeight : "-"
+									}}</template>
+								</el-table-column> -->
+
+								<el-table-column
+									label="描述"
+									min-width="200"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.description ? scope.row.description : "-"
+									}}</template>
+								</el-table-column>
+
+								<el-table-column
+									label="工具设置"
+									min-width="80"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<el-popover placement="bottom" width="840" trigger="hover">
+											<div class="urlItemBox">
+												<div
+													class="urlItem"
+													v-for="(item, index) in scope.row.url"
+													:key="scope.row.id + '-' + index"
+												>
+													<span>{{ item.region }}</span>
+													<div class="ui_message">
+														<div>名称:{{ item.name ? item.name : "-" }}</div>
+														<div>
+															<span>链接:</span
+															><a
+																:href="item.url"
+																v-if="item.url"
+																target="_blank"
+																>{{ item.url }}</a
+															><span v-else>-</span>
+														</div>
+														<div>
+															<span>桌面图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.icon"
+																	style="width: 100%; height: 100%"
+																	:src="item.icon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>平台图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.platformIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.platformIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>默认图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.defaultIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.defaultIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>激活图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.activeIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.activeIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+													</div>
+												</div>
+											</div>
+											<el-button slot="reference" size="small"
+												>查看设置</el-button
+											>
+										</el-popover>
+									</template>
+								</el-table-column>
+								<el-table-column
+									label="仅管理员显示"
+									min-width="80"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.isAdmin == "1" ? "是" : "否"
+									}}</template>
+								</el-table-column>
+								<el-table-column
+									label="操作"
+									width="200px"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<button
+											@click="moveUp(scope.row)"
+											v-if="scope.$index > 0"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											上移
+										</button>
+										<button
+											@click="moveDown(scope.row)"
+											v-if="form.desktop.list.length - 1 > scope.$index"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											下移
+										</button>
+
+										<button
+											@click="del(scope.row)"
+											style="
+												color: #ff2570;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											删除
+										</button>
+									</template>
+								</el-table-column>
+							</el-table>
+						</div>
+					</div>
+					<div
+						class="editArea pa_a_eb_admin-index"
+						v-show="tagType == 'admin-index'"
+					>
+						<div class="ea_table">
+							<el-table
+								:data="form.admin.index.list"
+								stripe
+								border
+								style="width: 100%"
+								:header-cell-style="headerCellStyle"
+							>
+								<el-table-column
+									label="标识"
+									min-width="100"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.toolId ? scope.row.toolId : "-"
+									}}</template>
+								</el-table-column>
+								<!-- <el-table-column
+									label="宽度"
+									min-width="45"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.dialogWidth ? scope.row.dialogWidth : "-"
+									}}</template>
+								</el-table-column>
+								<el-table-column
+									label="高度"
+									min-width="45"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.dialogHeight ? scope.row.dialogHeight : "-"
+									}}</template>
+								</el-table-column> -->
+
+								<el-table-column
+									label="描述"
+									min-width="200"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.description ? scope.row.description : "-"
+									}}</template>
+								</el-table-column>
+
+								<el-table-column
+									label="工具设置"
+									min-width="80"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<el-popover placement="bottom" width="840" trigger="hover">
+											<div class="urlItemBox">
+												<div
+													class="urlItem"
+													v-for="(item, index) in scope.row.url"
+													:key="scope.row.id + '-' + index"
+												>
+													<span>{{ item.region }}</span>
+													<div class="ui_message">
+														<div>名称:{{ item.name ? item.name : "-" }}</div>
+														<div>
+															<span>链接:</span
+															><a
+																:href="item.url"
+																v-if="item.url"
+																target="_blank"
+																>{{ item.url }}</a
+															><span v-else>-</span>
+														</div>
+														<div>
+															<span>桌面图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.icon"
+																	style="width: 100%; height: 100%"
+																	:src="item.icon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>平台图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.platformIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.platformIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>默认图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.defaultIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.defaultIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>激活图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.activeIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.activeIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+													</div>
+												</div>
+											</div>
+											<el-button slot="reference" size="small"
+												>查看设置</el-button
+											>
+										</el-popover>
+									</template>
+								</el-table-column>
+								<el-table-column
+									label="仅管理员显示"
+									min-width="80"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.isAdmin == "1" ? "是" : "否"
+									}}</template>
+								</el-table-column>
+								<el-table-column
+									label="操作"
+									width="200px"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<button
+											@click="moveUp(scope.row)"
+											v-if="scope.$index > 0"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											上移
+										</button>
+										<button
+											@click="moveDown(scope.row)"
+											v-if="form.admin.index.list.length - 1 > scope.$index"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											下移
+										</button>
+
+										<button
+											@click="del(scope.row)"
+											style="
+												color: #ff2570;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											删除
+										</button>
+									</template>
+								</el-table-column>
+							</el-table>
+						</div>
+					</div>
+					<div
+						class="editArea pa_a_eb_admin-sidebar"
+						v-show="tagType == 'admin-sidebar'"
+					>
+						<div class="ea_table">
+							<el-table
+								:data="form.admin.sidebar.list"
+								stripe
+								border
+								style="width: 100%"
+								row-key="typeId"
+								:header-cell-style="headerCellStyle"
+								:tree-props="{
+									children: 'children',
+									hasChildren: 'hasChildren',
+								}"
+							>
+								<el-table-column
+									label="标识"
+									min-width="100"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.toolId ? scope.row.toolId : "-"
+									}}</template>
+								</el-table-column>
+								<el-table-column
+									label="描述"
+									min-width="200"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.description ? scope.row.description : "-"
+									}}</template>
+								</el-table-column>
+
+								<el-table-column
+									label="菜单名称"
+									min-width="200"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">{{
+										scope.row.menuName ? scope.row.menuName : "-"
+									}}</template>
+								</el-table-column>
+
+								<el-table-column
+									label="菜单默认图标"
+									min-width="200"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<el-image
+											v-if="scope.row.menuIcon"
+											style="width: 50px; height: 50px"
+											:src="scope.row.menuIcon"
+											fit="cover"
+										>
+											<div slot="error" class="image-slot">
+												<i class="el-icon-picture-outline"></i>
+											</div>
+										</el-image>
+										<span v-else>-</span>
+									</template>
+								</el-table-column>
+
+								<el-table-column
+									label="菜单激活图标"
+									min-width="200"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<el-image
+											v-if="scope.row.menuActiveIcon"
+											style="width: 50px; height: 50px"
+											:src="scope.row.menuActiveIcon"
+											fit="cover"
+										>
+											<div slot="error" class="image-slot">
+												<i class="el-icon-picture-outline"></i>
+											</div>
+										</el-image>
+										<span v-else>-</span>
+									</template>
+								</el-table-column>
+
+								<el-table-column
+									label="工具设置"
+									min-width="110"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<el-popover
+											placement="bottom"
+											width="840"
+											trigger="hover"
+											v-if="scope.row.url"
+										>
+											<div class="urlItemBox">
+												<div
+													class="urlItem"
+													v-for="(item, index) in scope.row.url"
+													:key="scope.row.id + '-' + index"
+												>
+													<span>{{ item.region }}</span>
+													<div class="ui_message">
+														<div>名称:{{ item.name ? item.name : "-" }}</div>
+														<div>
+															<span>链接:</span
+															><a
+																:href="item.url"
+																v-if="item.url"
+																target="_blank"
+																>{{ item.url }}</a
+															><span v-else>-</span>
+														</div>
+														<div>
+															<span>桌面图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.icon"
+																	style="width: 100%; height: 100%"
+																	:src="item.icon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>平台图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.platformIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.platformIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>默认图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.defaultIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.defaultIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+														<div>
+															<span>激活图标:</span>
+															<div class="ui_m_image">
+																<el-image
+																	v-if="item.activeIcon"
+																	style="width: 100%; height: 100%"
+																	:src="item.activeIcon"
+																	fit="cover"
+																></el-image>
+																<span v-else>-</span>
+															</div>
+														</div>
+													</div>
+												</div>
+											</div>
+											<el-button slot="reference" size="small"
+												>查看设置</el-button
+											>
+										</el-popover>
+										<span v-else>-</span>
+									</template>
+								</el-table-column>
+								<el-table-column
+									label="仅管理员显示"
+									min-width="80"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<span v-if="scope.row.isAdmin">{{
+											scope.row.isAdmin == "1" ? "是" : "否"
+										}}</span>
+										<span v-else>-</span>
+									</template>
+								</el-table-column>
+								<el-table-column
+									label="操作"
+									width="320px"
+									fixed="right"
+									show-overflow-tooltip
+								>
+									<template slot-scope="scope">
+										<button
+											@click="addToolSidebar(scope.row.id)"
+											v-if="scope.row.menuName"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											添加工具
+										</button>
+
+										<button
+											@click="editMenu(scope.row)"
+											v-if="scope.row.menuName"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											修改
+										</button>
+										<button
+											@click="moveUp(scope.row, scope.row.typeId)"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											上移
+										</button>
+										<button
+											@click="moveDown(scope.row, scope.row.typeId)"
+											style="
+												color: #308fff;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											下移
+										</button>
+
+										<button
+											@click="del(scope.row, scope.row.typeId)"
+											style="
+												color: #ff2570;
+												background: none;
+												border: none;
+												cursor: pointer;
+												margin-left: 25px;
+											"
+										>
+											删除
+										</button>
+									</template>
+								</el-table-column>
+							</el-table>
+						</div>
+					</div>
+				</div>
+			</div>
+			<!-- 按钮区域 -->
+			<div slot="footer" class="el-dialog__footer">
+				<el-button @click="close()">取 消</el-button>
+				<el-button type="primary" @click="submit()">确认</el-button>
+			</div>
+		</el-dialog>
+		<selectToolDialog ref="selectToolDialogRef" @success="selectToolSuccess" />
+		<addMenuDialog ref="addMenuDialogRef" @success="addMenuSuccess" />
+	</div>
+</template>
+
+<script>
+import "@/common/aws-sdk-2.235.1.min.js";
+import selectToolDialog from "./selectToolDialog.vue";
+import { API_CONFIG } from "@/common/apiConfig";
+import addMenuDialog from "./addMenuDialog.vue";
+import { addOp } from "@/api/user";
+import { mapGetters } from "vuex";
+export default {
+	components: {
+		selectToolDialog,
+		addMenuDialog,
+	},
+	computed: {
+		...mapGetters(["userid"]),
+	},
+	data() {
+		return {
+			show: false,
+			loading: false,
+			data: null,
+			type: null,
+			tagType: "basics",
+			addToolIndex: null,
+			toolList: [],
+			form: {
+				basics: {
+					title: "",
+					brief: "",
+					logo: "",
+				},
+				//桌面  管理平台首页  管理平台侧边栏
+				desktop: {
+					list: [],
+				},
+				admin: {
+					index: {
+						list: [],
+					},
+					sidebar: {
+						list: [],
+					},
+				},
+			},
+		};
+	},
+	methods: {
+		open(data, type) {
+			this.init();
+			let _data = JSON.parse(JSON.stringify(data));
+			if (_data.json) {
+				this.form = JSON.parse(_data.json);
+			}
+			this.getToolData();
+			this.data = _data;
+			this.type = type;
+			this.show = true;
+		},
+		close() {
+			this.show = false;
+			this.init();
+		},
+		init() {
+			this.form = {
+				basics: {
+					title: "",
+					brief: "",
+					logo: "",
+				},
+				//桌面  管理平台首页  管理平台侧边栏
+				desktop: {
+					list: [],
+				},
+				admin: {
+					index: {
+						list: [],
+					},
+					sidebar: {
+						list: [],
+					},
+				},
+			};
+			this.type = null;
+			this.data = null;
+			this.tagType = "basics";
+		},
+		submit() {
+			// this.close();
+			console.log(this.form);
+			this.setJson();
+		},
+		async addBasicsIcon() {
+			let _url = await this.uploadFile("image/*");
+			if (_url) {
+				this.form.basics.logo = _url;
+				await addOp({
+					uid:this.userid,
+					cid: this.data.id,
+					type: "user_op",
+					content:`修改了${this.data.name}的基本信息的logo`
+				})
+			} else {
+				return console.log("无图片");
+			}
+		},
+		uploadFile(accept = "*") {
+			return new Promise((resolve) => {
+				const input = document.createElement("input");
+				input.type = "file";
+				input.accept = accept;
+				input.onchange = (event) => {
+					const file = event.target.files[0];
+					if (file) {
+						let credentials = {
+							accessKeyId: "AKIATLPEDU37QV5CHLMH",
+							secretAccessKey: "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",
+						}; //秘钥形式的登录上传
+						window.AWS.config.update(credentials);
+						window.AWS.config.region = "cn-northwest-1"; //设置区域
+						let bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+						// let _name = file.name;
+						// let size = file.size;
+						let params = {
+							Key:
+								file.name.split(".")[0] +
+								new Date().getTime() +
+								"." +
+								file.name.split(".")[file.name.split(".").length - 1],
+							ContentType: file.type,
+							Body: file,
+							"Access-Control-Allow-Credentials": "*",
+							ACL: "public-read",
+						}; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+						let options = {
+							partSize: 2048 * 1024 * 1024,
+							queueSize: 2,
+							leavePartsOnError: true,
+						};
+
+						bucket
+							.upload(params, options)
+							.on("httpUploadProgress", (evt) => {
+								console.log(evt);
+							})
+							.send((err, data) => {
+								if (err) {
+									this.$message.error("上传失败");
+									return resolve("");
+								} else {
+									return resolve(data.Location);
+								}
+							});
+					} else {
+						resolve("");
+					}
+				};
+				input.click();
+			});
+		},
+		changeTagType(newType) {
+			this.tagType = newType;
+		},
+		addTool(type) {
+			let selectList = [];
+			if (type == "desktop") selectList = this.form.desktop.list;
+			if (type == "admin-index") selectList = this.form.admin.index.list;
+			if (type == "admin-sidebar") selectList = this.form.admin.sidebar.list;
+			this.$refs.selectToolDialogRef.open(
+				selectList,
+				type,
+				["admin-index", "admin-sidebar"].includes(type)
+					? this.form.desktop.list
+					: []
+			);
+		},
+		async selectToolSuccess([_list, type]) {
+			console.log(type, "===", _list);
+			let list = _list;
+			if (type == "desktop") {
+				this.form.desktop.list = list;
+				this.$refs.selectToolDialogRef.close();
+				await addOp({
+					uid:this.userid,
+					cid: this.data.id,
+					type: "user_op",
+					content:`修改了${this.data.name}的桌面端工具`
+				})
+			} else if (type == "admin-index") {
+				this.form.admin.index.list = list;
+				this.$refs.selectToolDialogRef.close();
+				await addOp({
+					uid:this.userid,
+					cid: this.data.id,
+					type: "user_op",
+					content:`修改了${this.data.name}的平台首页工具`
+				})
+			} else if (type == "admin-sidebar" || type == "admin-sidebar2") {
+				if (this.addToolIndex != null) {
+					let _index = this.form.admin.sidebar.list.findIndex(
+						(i) => i.id == this.addToolIndex
+					);
+					if (_index == -1) return this.$message.error("未找到对应的菜单");
+					list.forEach((i) => (i.typeId = this.addToolIndex + "," + i.id));
+					this.form.admin.sidebar.list[_index].children.push(
+						...JSON.parse(JSON.stringify(list))
+					);
+					this.addToolIndex = null;
+				} else {
+					list.forEach((i) => (i.typeId = i.id));
+					this.form.admin.sidebar.list.push(
+						...JSON.parse(JSON.stringify(list))
+					);
+				}
+				await addOp({
+					uid:this.userid,
+					cid: this.data.id,
+					type: "user_op",
+					content:`修改了${this.data.name}的平台侧边栏工具`
+				})
+				this.$refs.selectToolDialogRef.close();
+			}
+			this.$forceUpdate();
+		},
+		// 表头的背景色
+		headerCellStyle() {
+			return { backgroundColor: "#f1f1f1" };
+		},
+		moveUp(row, typeId) {
+			console.log(typeId);
+			if (this.tagType == "desktop") {
+				let _index = this.form.desktop.list.findIndex((i) => i.id == row.id);
+				if (_index > 0) {
+					const itemToMove = this.form.desktop.list.splice(_index, 1)[0];
+					this.form.desktop.list.splice(_index - 1, 0, itemToMove);
+				}
+			} else if (this.tagType == "admin-index") {
+				let _index = this.form.admin.index.list.findIndex(
+					(i) => i.id == row.id
+				);
+				if (_index > 0) {
+					const itemToMove = this.form.admin.index.list.splice(_index, 1)[0];
+					this.form.admin.index.list.splice(_index - 1, 0, itemToMove);
+				}
+			} else if (this.tagType == "admin-sidebar") {
+				let typeIdList = typeId.split(",");
+				console.log(typeIdList);
+				if (typeIdList.length == 1) {
+					let _index = this.form.admin.sidebar.list.findIndex(
+						(i) => i.typeId == typeIdList[0]
+					);
+					if (_index > 0) {
+						const itemToMove = this.form.admin.sidebar.list.splice(
+							_index,
+							1
+						)[0];
+						this.form.admin.sidebar.list.splice(_index - 1, 0, itemToMove);
+					}
+				} else if (typeIdList.length == 2) {
+					let _index = this.form.admin.sidebar.list.findIndex(
+						(i) => i.typeId == typeIdList[0]
+					);
+					let _index2 = this.form.admin.sidebar.list[_index].children.findIndex(
+						(i) => i.id == typeIdList[1]
+					);
+					console.log(_index2);
+					if (_index2 > 0) {
+						const itemToMove = this.form.admin.sidebar.list[
+							_index
+						].children.splice(_index2, 1)[0];
+						this.form.admin.sidebar.list[_index].children.splice(
+							_index2 - 1,
+							0,
+							itemToMove
+						);
+					}
+				}
+			}
+		},
+		moveDown(row, typeId) {
+			console.log(typeId);
+			if (this.tagType == "desktop") {
+				let _index = this.form.desktop.list.findIndex((i) => i.id == row.id);
+				if (_index < this.form.desktop.list.length - 1) {
+					const itemToMove = this.form.desktop.list.splice(_index, 1)[0];
+					this.form.desktop.list.splice(_index + 1, 0, itemToMove);
+				}
+			} else if (this.tagType == "admin-index") {
+				let _index = this.form.admin.index.list.findIndex(
+					(i) => i.id == row.id
+				);
+				if (_index < this.form.admin.index.list.length - 1) {
+					const itemToMove = this.form.admin.index.list.splice(_index, 1)[0];
+					this.form.admin.index.list.splice(_index + 1, 0, itemToMove);
+				}
+			} else if (this.tagType == "admin-sidebar") {
+				let typeIdList = typeId.split(",");
+				if (typeIdList.length == 1) {
+					let _index = this.form.admin.sidebar.list.findIndex(
+						(i) => i.typeId == typeIdList[0]
+					);
+					if (_index < this.form.admin.sidebar.list.length - 1) {
+						const itemToMove = this.form.admin.sidebar.list.splice(
+							_index,
+							1
+						)[0];
+						this.form.admin.sidebar.list.splice(_index + 1, 0, itemToMove);
+					}
+				} else if (typeIdList.length == 2) {
+					let _index = this.form.admin.sidebar.list.findIndex(
+						(i) => i.typeId == typeIdList[0]
+					);
+					let _index2 = this.form.admin.sidebar.list[_index].children.findIndex(
+						(i) => i.id == typeIdList[1]
+					);
+					if (
+						_index2 <
+						this.form.admin.sidebar.list[_index].children.length - 1
+					) {
+						const itemToMove = this.form.admin.sidebar.list[
+							_index
+						].children.splice(_index2, 1)[0];
+						this.form.admin.sidebar.list[_index].children.splice(
+							_index2 + 1,
+							0,
+							itemToMove
+						);
+					}
+				}
+			}
+		},
+		del(row, typeId) {
+			if (this.tagType == "desktop") {
+				const index = this.form.desktop.list.findIndex((i) => i.id === row.id);
+				if (index > -1) {
+					this.form.desktop.list.splice(index, 1);
+				}
+			} else if (this.tagType == "admin-index") {
+				const index = this.form.admin.index.list.findIndex(
+					(i) => i.id === row.id
+				);
+				if (index > -1) {
+					this.form.admin.index.list.splice(index, 1);
+				}
+			} else if (this.tagType == "admin-sidebar") {
+				let typeIdList = typeId.split(",");
+				if (typeIdList.length == 1) {
+					let _index = this.form.admin.sidebar.list.findIndex(
+						(i) => i.typeId == typeIdList[0]
+					);
+					this.form.admin.sidebar.list.splice(_index, 1);
+				} else if (typeIdList.length == 2) {
+					let _index = this.form.admin.sidebar.list.findIndex(
+						(i) => i.typeId == typeIdList[0]
+					);
+					let _index2 = this.form.admin.sidebar.list[_index].children.findIndex(
+						(i) => i.typeId == typeIdList[1]
+					);
+					this.form.admin.sidebar.list[_index].children.splice(_index2, 1);
+				}
+				// this.form.admin.sidebar.list.splice(_index, 1);
+			}
+		},
+		getToolData() {
+			let params = [
+				{
+					functionName: "select_desktopToolByPage",
+					status: "",
+					page: 1,
+					lim: 9999999,
+				},
+			];
+			this.loading = true;
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then((res) => {
+					let _data = res.data;
+					let _list = _data[0];
+					_list.forEach((i) => {
+						i.url = JSON.parse(i.url);
+						i.json = JSON.parse(i.json);
+						i.argumentList = JSON.parse(i.argumentList);
+					});
+					this.toolList = _list;
+					this.setDataListToo(_list);
+					this.loading = false;
+				})
+				.catch((err) => {
+					console.log(err);
+					this.loading = false;
+					this.$message.error("获取工具数据失败");
+					this.close();
+				});
+		},
+		setJson() {
+			let _form = JSON.parse(JSON.stringify(this.form));
+			_form.desktop.list = _form.desktop.list.map((i) => i.id);
+			_form.admin.index.list = _form.admin.index.list.map((i) => i.id);
+			_form.admin.sidebar.list.forEach((i, index) => {
+				if (i.children) {
+					_form.admin.sidebar.list[index].children = i.children.map(
+						(i) => i.id
+					);
+				} else {
+					_form.admin.sidebar.list[index] = i.id;
+				}
+			});
+
+			let params = [
+				{
+					functionName: "update_orgOroid_json_byId",
+					id: this.data.id,
+					ujson: JSON.stringify(_form),
+					type: this.type,
+				},
+			];
+			this.loading = true;
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then(async (res) => {
+					let _data = res.data;
+					if (_data == 1) {
+						this.$message.success("修改权限成功");
+						this.$emit("getData");
+						
+						await addOp({
+							uid:this.userid,
+							cid: this.data.id,
+							type: "user_op",
+							content:`修改了${this.data.name}的权限设置`
+						})
+						this.close();
+					} else {
+						this.$message.error("修改权限失败");
+					}
+					this.loading = false;
+				})
+				.catch((err) => {
+					console.log(err);
+					this.loading = false;
+					this.$message.error("修改权限失败");
+				});
+		},
+		setDataListToo(toolList = []) {
+			let _form = JSON.parse(JSON.stringify(this.form));
+			_form.desktop.list.forEach((i, index) => {
+				let _index = toolList.findIndex((i2) => i == i2.id);
+				if (_index != -1) {
+					_form.desktop.list[index] = toolList[_index];
+				} else {
+					console.log("无工具", i);
+				}
+			});
+
+			_form.admin.index.list.forEach((i, index) => {
+				let _index = toolList.findIndex((i2) => i == i2.id);
+				if (_index != -1) {
+					_form.admin.index.list[index] = toolList[_index];
+				} else {
+					console.log("无工具", i);
+				}
+			});
+
+			_form.admin.sidebar.list.forEach((i, index) => {
+				if (i.children) {
+					i.children.forEach((i2, index2) => {
+						let _toolList = JSON.parse(JSON.stringify(toolList));
+						let _index = _toolList.findIndex((i3) => i2 == i3.id);
+
+						if (_index != -1) {
+							_form.admin.sidebar.list[index].children[index2] =
+								_toolList[_index];
+							_form.admin.sidebar.list[index].children[index2].typeId =
+								_form.admin.sidebar.list[index].typeId +
+								"," +
+								_toolList[_index].id;
+						} else {
+							console.log("无工具", i);
+						}
+					});
+				} else {
+					let _toolList = JSON.parse(JSON.stringify(toolList));
+					let _index = _toolList.findIndex((i2) => i == i2.id);
+					if (_index != -1) {
+						_form.admin.sidebar.list[index] = _toolList[_index];
+						_form.admin.sidebar.list[index].typeId =
+							_form.admin.sidebar.list[index].id;
+					} else {
+						console.log("无工具", i);
+					}
+				}
+			});
+
+			this.form = _form;
+			this.$forceUpdate();
+		},
+		addToolSidebar(id) {
+			this.addToolIndex = id;
+			let index = this.form.admin.sidebar.list.findIndex((i) => i.id == id);
+			if (index == -1) return this.$message.error("未找到对应菜单");
+			let selectList = [];
+			selectList = this.form.admin.sidebar.list[index].children;
+			this.$refs.selectToolDialogRef.open(
+				selectList,
+				"admin-sidebar",
+				this.form.desktop.list
+			);
+		},
+		async addMenuSuccess({ item, type }) {
+			console.log(item, type);
+			if (type == "add") {
+				this.form.admin.sidebar.list.push(item);
+				item.id = String(new Date().getTime());
+				item.typeId = item.id;
+				await addOp({
+					uid: this.userid,
+					cid: "",
+					type: "user_op",
+					content: `添加了一级菜单:${item.menuName}`,
+				});
+			} else if (type == "edit") {
+				let _index = this.form.admin.sidebar.list.findIndex(
+					(i) => i.typeId == item.typeId
+				);
+				if (_index != -1) {
+					let _sidebar = JSON.parse(JSON.stringify(this.form.admin.sidebar));
+					_sidebar.list[_index] = item;
+					this.form.admin.sidebar = JSON.parse(JSON.stringify(_sidebar));
+					this.$forceUpdate();
+					await addOp({
+						uid: this.userid,
+						cid: "",
+						type: "user_op",
+						content: `修改了了一级菜单:${item.menuName}`,
+					});
+				}
+			}
+			this.$refs.addMenuDialogRef.close();
+		},
+		addMenu() {
+			this.$refs.addMenuDialogRef.open();
+		},
+		editMenu(row) {
+			this.$refs.addMenuDialogRef.open(row, "edit");
+		},
+	},
+};
+</script>
+
+<style scoped>
+.permissionSettingDialog >>> .el-dialog__header {
+	padding: 15px 20px;
+	background: #454545;
+}
+
+.permissionSettingDialog >>> .el-dialog__title {
+	color: #fff;
+}
+
+.el-dialog__footer {
+	padding: 10px 0 0 10px;
+}
+
+.ps_area {
+	width: 100%;
+	height: 800px;
+}
+
+.pa_a_head {
+	width: 100%;
+	height: 40px;
+	display: flex;
+	align-items: center;
+	box-sizing: border-box;
+	overflow: auto;
+	border-bottom: 1px solid #e4e7ed;
+}
+
+.pa_a_head > span {
+	font-size: 16px;
+	display: block;
+	width: auto;
+	height: 100%;
+	padding: 0 20px;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	margin-right: 10px;
+	cursor: pointer;
+	transition: 0.2s;
+	white-space: nowrap;
+}
+
+.pa_a_h_active {
+	color: #409eff;
+}
+
+.pa_a_editBox {
+	width: 100%;
+	height: 100%;
+	overflow: auto;
+}
+
+.editArea {
+	width: 100%;
+	height: auto;
+	box-sizing: border-box;
+}
+
+.ea_basics_input {
+	width: 100%;
+	height: auto;
+	margin-top: 20px;
+	display: flex;
+	align-items: center;
+}
+
+.ea_basics_input > span {
+	display: block;
+	width: 60px;
+	height: auto;
+}
+
+.ea_basics_logo {
+	margin-top: 30px;
+	width: 110px;
+	height: 50px;
+	cursor: pointer;
+	display: flex;
+	align-items: center;
+}
+
+.ea_basics_logo > span {
+	display: block;
+	min-width: 60px;
+}
+
+.ea_basics_logo >>> .image-slot {
+	width: 100%;
+	height: 100%;
+	font-size: 22px;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+
+.ea_item {
+	width: 83px;
+	height: 83px;
+	margin: 10px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.pa_a_eb_desktop {
+	display: flex;
+	flex-direction: column;
+	padding: 0;
+}
+
+.ea_add {
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+}
+
+.urlItemBox {
+	display: flex;
+	flex-wrap: wrap;
+}
+
+.urlItem {
+	width: 400px;
+	height: 250px;
+	overflow: auto;
+	position: relative;
+	box-sizing: border-box;
+	border-bottom: solid 1px #ebeef5;
+}
+
+.urlItem:nth-child(2n) {
+	margin-left: 20px;
+}
+
+.urlItem > span {
+	font-size: 18px;
+	font-weight: bold;
+}
+
+.ui_m_image {
+	width: 40px;
+	height: 40px;
+	float: left;
+	display: flex;
+	align-items: center;
+}
+
+.ui_message > div {
+	display: flex;
+	align-items: center;
+}
+
+.ui_message > div > span {
+	white-space: nowrap;
+}
+</style>

+ 368 - 0
src/components/dialog/selectToolDialog.vue

@@ -0,0 +1,368 @@
+<template>
+	<div>
+		<el-dialog
+			title="选择工具"
+			class="selectToolDialog"
+			:visible.sync="show"
+			:close-on-click-modal="false"
+			width="1400px"
+			@before-close="beforeClose"
+			:destroy-on-close="true"
+			top="8vh"
+		>
+			<div v-loading="loading" class="std_body">
+				<div class="std_b_table">
+					<el-table
+						ref="form"
+						:data="dataList"
+						v-if="show"
+						stripe
+						border
+						style="width: 100%"
+						:header-cell-style="headerCellStyle"
+						row-key="id"
+						@selection-change="handleSelectionChange"
+					>
+						<el-table-column
+							type="selection"
+							width="45"
+							:selectable="selectable"
+							:reserve-selection="true"
+						></el-table-column>
+						<el-table-column label="标识" min-width="100" show-overflow-tooltip>
+							<template slot-scope="scope">{{
+								scope.row.toolId ? scope.row.toolId : "-"
+							}}</template>
+						</el-table-column>
+						<el-table-column label="宽度" min-width="45" show-overflow-tooltip>
+							<template slot-scope="scope">{{
+								scope.row.dialogWidth ? scope.row.dialogWidth : "-"
+							}}</template>
+						</el-table-column>
+						<el-table-column label="高度" min-width="45" show-overflow-tooltip>
+							<template slot-scope="scope">{{
+								scope.row.dialogHeight ? scope.row.dialogHeight : "-"
+							}}</template>
+						</el-table-column>
+
+						<el-table-column label="描述" min-width="200" show-overflow-tooltip>
+							<template slot-scope="scope">{{
+								scope.row.description ? scope.row.description : "-"
+							}}</template>
+						</el-table-column>
+
+						<el-table-column
+							label="工具设置"
+							min-width="60"
+							show-overflow-tooltip
+						>
+							<template slot-scope="scope">
+								<el-popover placement="bottom" width="840" trigger="hover">
+									<div class="urlItemBox">
+										<div
+											class="urlItem"
+											v-for="(item, index) in scope.row.url"
+											:key="scope.row.id + '-' + index"
+										>
+											<span>{{ item.region }}</span>
+											<div class="ui_message">
+												<div>名称:{{ item.name ? item.name : "-" }}</div>
+												<div>
+													<span>链接:</span
+													><a
+														:href="item.url"
+														v-if="item.url"
+														target="_blank"
+														>{{ item.url }}</a
+													><span v-else>-</span>
+												</div>
+												<div>
+													<span>桌面图标:</span>
+													<div class="ui_m_image">
+														<el-image
+															v-if="item.icon"
+															style="width: 100%; height: 100%"
+															:src="item.icon"
+															fit="cover"
+														></el-image>
+														<span v-else>-</span>
+													</div>
+												</div>
+												<div>
+													<span>平台图标:</span>
+													<div class="ui_m_image">
+														<el-image
+															v-if="item.platformIcon"
+															style="width: 100%; height: 100%"
+															:src="item.platformIcon"
+															fit="cover"
+														></el-image>
+														<span v-else>-</span>
+													</div>
+												</div>
+												<div>
+													<span>默认图标:</span>
+													<div class="ui_m_image">
+														<el-image
+															v-if="item.defaultIcon"
+															style="width: 100%; height: 100%"
+															:src="item.defaultIcon"
+															fit="cover"
+														></el-image>
+														<span v-else>-</span>
+													</div>
+												</div>
+												<div>
+													<span>激活图标:</span>
+													<div class="ui_m_image">
+														<el-image
+															v-if="item.activeIcon"
+															style="width: 100%; height: 100%"
+															:src="item.activeIcon"
+															fit="cover"
+														></el-image>
+														<span v-else>-</span>
+													</div>
+												</div>
+											</div>
+										</div>
+									</div>
+									<el-button slot="reference" size="small">查看设置</el-button>
+								</el-popover>
+							</template>
+						</el-table-column>
+						<el-table-column
+							label="仅管理员显示"
+							min-width="45"
+							show-overflow-tooltip
+						>
+							<template slot-scope="scope">{{
+								scope.row.isAdmin == "1" ? "是" : "否"
+							}}</template>
+						</el-table-column>
+					</el-table>
+				</div>
+
+				<el-pagination
+					v-if="pageData.show"
+					style="margin-top: 10px"
+					:current-page="pageData.nowPage"
+					:page-size="pageData.lim"
+					:total="pageData.total"
+					@current-change="handlePageChange"
+					layout="total,prev, pager, next, jumper"
+				>
+				</el-pagination>
+			</div>
+			<!-- 按钮区域 -->
+			<div slot="footer" class="el-dialog__footer">
+				<el-button @click="close()">取 消</el-button>
+				<el-button type="primary" @click="submit()">确认</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+import { API_CONFIG } from "@/common/apiConfig";
+export default {
+	data() {
+		return {
+			show: false,
+			loading: false,
+			dataList: [],
+			type: null,
+			pageData: {
+				nowPage: 1,
+				lim: 10,
+				total: 0,
+				show: true,
+			},
+			selectList: [],
+			disableSelectList:[],
+		};
+	},
+	methods: {
+		// 表头的背景色
+		headerCellStyle() {
+			return { backgroundColor: "#f1f1f1" };
+		},
+		selectable(row){
+			if(this.type && ['desktop','admin-index','admin-sidebar2'].includes(this.type)){
+				return true;
+			}else if(this.type && ['admin-sidebar'].includes(this.type)){
+				let _result = true;
+				if(this.disableSelectList.findIndex(i=>i.id==row.id)!=-1){
+					_result = false
+				}
+				return _result;
+			}
+
+		},
+		open(data, type, tableData = []) {
+			this.show = true;
+
+			this.init();
+			if(type!='admin-sidebar')this.selectList = data;
+			this.disableSelectList = JSON.parse(JSON.stringify(data))
+			this.type = type;
+
+
+			this.$nextTick(() => {
+				if (data.length > 0 && type!='admin-sidebar') {
+					this.setTableSelect(data);
+				}
+			});
+
+			if (tableData.length > 0) {
+				this.dataList = tableData;
+				this.pageData.show = false;
+			} else {
+				this.getData();
+				this.pageData.show = true;
+			}
+
+
+
+		},
+		close() {
+			this.$refs.form.clearSelection();
+			this.$forceUpdate();
+			this.show = false;
+		},
+		init() {
+			this.dataList = [];
+			this.type = null;
+			this.selectList = [];
+			this.pageData = {
+				nowPage: 1,
+				lim: 10,
+				total: 0,
+				show: true,
+			};
+		},
+		getData() {
+			new Promise((resolve) => {
+				let params = [
+					{
+						functionName: "select_desktopToolByPage",
+						status: "0",
+						page: this.pageData.nowPage,
+						lim: this.pageData.lim,
+					},
+				];
+				this.loading = true;
+				this.$ajax
+					.post(API_CONFIG.baseUrl, params)
+					.then((res) => {
+						let _data = res.data;
+						let _list = _data[0];
+						let _total = _data[1][0].total;
+						_list.forEach((i) => {
+							i.url = JSON.parse(i.url);
+							i.json = JSON.parse(i.json);
+							i.argumentList = JSON.parse(i.argumentList);
+						});
+						this.dataList = _list;
+						this.pageData.total = _total;
+						this.loading = false;
+						resolve();
+					})
+					.catch((err) => {
+						console.log(err);
+						this.loading = false;
+						this.$message.error("获取工具数据失败");
+					});
+			});
+		},
+		handlePageChange(newPage) {
+			this.pageData.nowPage = newPage;
+			this.getData();
+		},
+		handleSelectionChange(val) {
+			this.selectList = val;
+		},
+		submit() {
+			this.$emit("success", [this.selectList, this.type]);
+		},
+		setTableSelect(data) {
+				data.forEach((i) => {
+					this.$refs.form.toggleRowSelection(i, true);
+				});
+		},
+		getRowKeys(row) {
+			return row.id;
+		},
+		beforeClose(done) {
+			this.init();
+			done();
+		},
+	},
+};
+</script>
+
+<style scoped>
+.selectToolDialog >>> .el-dialog__header {
+	padding: 15px 20px;
+	background: #454545;
+}
+
+.selectToolDialog >>> .el-dialog__title {
+	color: #fff;
+}
+
+.urlItemBox {
+	display: flex;
+	flex-wrap: wrap;
+}
+
+.urlItem {
+	width: 400px;
+	height: 250px;
+	overflow: auto;
+	position: relative;
+	box-sizing: border-box;
+	border-bottom: solid 1px #ebeef5;
+}
+
+.urlItem:nth-child(2n) {
+	margin-left: 20px;
+}
+
+.urlItem > span {
+	font-size: 18px;
+	font-weight: bold;
+}
+
+.ui_m_image {
+	width: 40px;
+	height: 40px;
+	float: left;
+	display: flex;
+	align-items: center;
+}
+
+.ui_message > div {
+	display: flex;
+	align-items: center;
+}
+
+.ui_message > div > span {
+	white-space: nowrap;
+}
+
+.std_body {
+	width: 100%;
+	height: 662px;
+	overflow: auto;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+}
+
+.std_b_table {
+	width: 100%;
+	height: 620px;
+	overflow: auto;
+}
+</style>

+ 2 - 2
src/components/list.vue

@@ -763,8 +763,8 @@ export default {
 
       let zSuffix = ''
 
-      if (this.SuffixData && emailData) {
-        zSuffix = this.person.account.split('@')[0] + this.SuffixData
+      if (emailData) {
+        zSuffix = this.person.account
       } else {
         zSuffix = this.person.account + this.SuffixData
       }

+ 14 - 4
src/components/organList.vue

@@ -23,11 +23,12 @@
                 </el-table-column>
                 <el-table-column show-overflow-tooltip prop="area" label="区域" min-width="45"></el-table-column>
                 <el-table-column show-overflow-tooltip prop="ctime" label="创建时间" min-width="45"></el-table-column>
-                <el-table-column label="操作" width="150px">
+                <el-table-column label="操作" width="220px">
                     <template slot-scope="scope">
                         <div class="operate">
                             <button @click="update(scope.row)">编辑</button>
                             <button @click="toPage(scope.row)">批量创建</button>
+														<button @click="permissionSetting(scope.row)" v-show="!unShowJurUser.includes(userid)">权限设置</button>
                             <button @click="delete_organ(scope.row)" style="color:red;">删除</button>
                             
                         </div>
@@ -149,14 +150,19 @@
                 <el-button type="primary" @click="updateOrgan">确认</el-button>
             </div>
         </el-dialog>
+				<permissionSettingDialog ref="permissionSettingDialogRef" @getData="getOrgan"/>
     </div>
 </template>
 <script>
 import { API_CONFIG } from '@/common/apiConfig';
 import { addOp } from "@/api/user";
 import { mapGetters } from 'vuex';
+import permissionSettingDialog from './dialog/permissionSettingDialog'
 export default {
     name: 'onList',
+		components:{
+			permissionSettingDialog
+		},
     data() {
         return {
             organizations: [],
@@ -180,7 +186,8 @@ export default {
             form: {
                 organ: ""
             },
-            organ: {}
+            organ: {},
+						unShowJurUser:['0abcb118-9110-11eb-80ad-005056b86db5']
         }
     },
     computed: {
@@ -440,9 +447,12 @@ export default {
               content: `点击了批量添加 ${row.name}${row.id}`,
             });
             let userid = await this.getUserId(oid, org);
-            const url=`https://pbl.cocorobo.cn/pbl-teacher-table/dist/?#/teacher?userid=${userid ? userid : this.userid}&oid=${oid}&org=${org}`;
+            const url=`https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/?#/teacher?userid=${userid ? userid : this.userid}&oid=${oid}&org=${org}`;
             window.open(url,'_blank');
-        }
+        },
+				permissionSetting(data){
+					this.$refs.permissionSettingDialogRef.open(data,"org");
+				}
 
 
     },

+ 774 - 610
src/components/schoolList.vue

@@ -1,653 +1,817 @@
 <template>
-    <div class="list_container">
-        <div class="title_examine">
-            <div class="pub_title">学校列表</div>
-            <div style="margin-left: auto;">
-                <el-input v-model="checkOid" placeholder="请输入学校" size="normal" clearable @input="changeOid"
-                    style="margin-right: 10px; width: 200px"></el-input>
-                <el-input v-model="checkOrg" placeholder="请输入组织" size="normal" clearable @input="changeOrg"
-                    style="margin-right: 10px; width: 200px"></el-input>
-                <el-select v-model="checkArea" placeholder="选择区域" clearable filterable @change="changeArea"
-                    style="margin-right: 10px">
-                    <el-option v-for="item in regionCList" :key="item.id" :label="item.name" :value="item.name">
-                    </el-option>
-                </el-select>
+	<div class="list_container">
+		<div class="title_examine">
+			<div class="pub_title">学校列表</div>
+			<div style="margin-left: auto">
+				<el-input
+					v-model="checkOid"
+					placeholder="请输入学校"
+					size="normal"
+					clearable
+					@input="changeOid"
+					style="margin-right: 10px; width: 200px"
+				></el-input>
+				<el-input
+					v-model="checkOrg"
+					placeholder="请输入组织"
+					size="normal"
+					clearable
+					@input="changeOrg"
+					style="margin-right: 10px; width: 200px"
+				></el-input>
+				<el-select
+					v-model="checkArea"
+					placeholder="选择区域"
+					clearable
+					filterable
+					@change="changeArea"
+					style="margin-right: 10px"
+				>
+					<el-option
+						v-for="item in regionCList"
+						:key="item.id"
+						:label="item.name"
+						:value="item.name"
+					>
+					</el-option>
+				</el-select>
 
-                <el-button type="primary" size="small" @click="add_school_dialog = true;">新增学校</el-button>
-            </div>
-        </div>
-        <div class="tableBox">
-            <el-table :data="schoolData" stripe border style="width: 100%" :header-cell-style="headerCellStyle">
-                <el-table-column show-overflow-tooltip prop="name" label="学校名称" min-width="45"></el-table-column>
-                <el-table-column show-overflow-tooltip prop="org_name" label="组织" min-width="45">
-                    <template slot-scope="scope">
-                        {{ scope.row.org_name || '-' }} <!-- 如果 org 为空,显示 '-' -->
-                    </template>
-                </el-table-column>
-                <el-table-column show-overflow-tooltip prop="org_code" label="组织编码" min-width="45">
-                    <template slot-scope="scope">
-                        {{ scope.row.org_code || '-' }} <!-- 如果 org 为空,显示 '-' -->
-                    </template>
-                </el-table-column>
-                <el-table-column show-overflow-tooltip prop="code" label="编码" min-width="45">
-                    <template slot-scope="scope">
-                        {{ scope.row.code || '-' }} <!-- 如果 org 为空,显示 '-' -->
-                    </template>
-                </el-table-column>
-                <el-table-column show-overflow-tooltip prop="area" label="区域" min-width="45"></el-table-column>
-                <el-table-column show-overflow-tooltip prop="ctime" label="创建时间" min-width="45"></el-table-column>
-                <el-table-column label="操作" width="150px">
-                    <template slot-scope="scope">
-                        <div class="operate">
-                            <button @click="update(scope.row)">编辑</button>
-                            <button @click="toPage(scope.row)">批量创建</button>
-                            <button @click="delete_school(scope.row)" style="color:red;">删除</button>
+				<el-button type="primary" size="small" @click="add_school_dialog = true"
+					>新增学校</el-button
+				>
+			</div>
+		</div>
+		<div class="tableBox">
+			<el-table
+				:data="schoolData"
+				stripe
+				border
+				style="width: 100%"
+				:header-cell-style="headerCellStyle"
+			>
+				<el-table-column
+					show-overflow-tooltip
+					prop="name"
+					label="学校名称"
+					min-width="45"
+				></el-table-column>
+				<el-table-column
+					show-overflow-tooltip
+					prop="org_name"
+					label="组织"
+					min-width="45"
+				>
+					<template slot-scope="scope">
+						{{ scope.row.org_name || "-" }}
+						<!-- 如果 org 为空,显示 '-' -->
+					</template>
+				</el-table-column>
+				<el-table-column
+					show-overflow-tooltip
+					prop="org_code"
+					label="组织编码"
+					min-width="45"
+				>
+					<template slot-scope="scope">
+						{{ scope.row.org_code || "-" }}
+						<!-- 如果 org 为空,显示 '-' -->
+					</template>
+				</el-table-column>
+				<el-table-column
+					show-overflow-tooltip
+					prop="code"
+					label="编码"
+					min-width="45"
+				>
+					<template slot-scope="scope">
+						{{ scope.row.code || "-" }}
+						<!-- 如果 org 为空,显示 '-' -->
+					</template>
+				</el-table-column>
+				<el-table-column
+					show-overflow-tooltip
+					prop="area"
+					label="区域"
+					min-width="45"
+				></el-table-column>
+				<el-table-column
+					show-overflow-tooltip
+					prop="ctime"
+					label="创建时间"
+					min-width="45"
+				></el-table-column>
+				<el-table-column label="操作" width="220px">
+					<template slot-scope="scope">
+						<div class="operate">
+							<button @click="update(scope.row)">编辑</button>
+							<button @click="toPage(scope.row)">批量创建</button>
+							<button @click="permissionSetting(scope.row)" v-show="!unShowJurUser.includes(userid)">权限设置</button>
+							<button @click="delete_school(scope.row)" style="color: red">
+								删除
+							</button>
+						</div>
+					</template>
+				</el-table-column>
+			</el-table>
+		</div>
+		<!-- 分页组件 -->
+		<el-pagination
+			:current-page="currentPage"
+			:page-size="pageSize"
+			:total="total"
+			@current-change="handlePageChange"
+			layout="total,prev, pager, next, jumper"
+		>
+		</el-pagination>
+		<!-- 新增学校弹窗 -->
+		<el-dialog
+			title="新增学校"
+			class="table"
+			:visible.sync="add_school_dialog"
+			:before-close="close_add_school"
+			width="700px"
+		>
+			<div class="el_dialog_school_content">
+				<form class="el-form">
+					<!-- 学校名称 -->
+					<div class="el-form-item" style="margin-top: 15px">
+						<label class="el-form-item__label" style="width: 100px"
+							>学校名称</label
+						>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<input
+										v-model="sch_name"
+										type="text"
+										autocomplete="off"
+										placeholder="学校名称"
+										class="el-input__inner"
+									/>
+								</div>
+							</span>
+						</div>
+					</div>
+					<!-- 地区 -->
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px">地区</label>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<input
+										v-model="region"
+										type="text"
+										autocomplete="off"
+										placeholder="请输入地区"
+										class="el-input__inner"
+									/>
+								</div>
+							</span>
+						</div>
+					</div>
+					<!-- 学校编码 -->
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px"
+							>学校编码</label
+						>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<input
+										v-model="schoolCode"
+										type="text"
+										autocomplete="off"
+										placeholder="请输入编码"
+										class="el-input__inner"
+									/>
+								</div>
+							</span>
+						</div>
+					</div>
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px"
+							>上级组织</label
+						>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<el-form :model="school" ref="form">
+										<el-select
+											v-model="school.parentOrgId"
+											placeholder="请选择组织"
+											class="custom-select"
+											filterable
+										>
+											<el-option
+												v-for="(org, index) in organizations"
+												:key="index"
+												:label="org.name"
+												:value="org.id"
+											>
+												{{ org.name }}
+											</el-option>
+										</el-select>
+									</el-form>
+								</div>
+							</span>
+						</div>
+					</div>
 
-                        </div>
-                    </template>
-                </el-table-column>
-            </el-table>
-        </div>
-        <!-- 分页组件 -->
-        <el-pagination :current-page="currentPage" :page-size="pageSize" :total="total"
-            @current-change="handlePageChange" layout="total,prev, pager, next, jumper">
-        </el-pagination>
-        <!-- 新增学校弹窗 -->
-        <el-dialog title="新增学校" class="table" :visible.sync="add_school_dialog" :before-close="close_add_school"
-            width="700px">
-            <div class="el_dialog_school_content">
-                <form class="el-form">
-                    <!-- 学校名称 -->
-                    <div class="el-form-item" style="margin-top: 15px">
-                        <label class="el-form-item__label" style="width: 100px">学校名称</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <input v-model="sch_name" type="text" autocomplete="off" placeholder="学校名称"
-                                        class="el-input__inner" />
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                    <!-- 地区 -->
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">地区</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <input v-model="region" type="text" autocomplete="off" placeholder="请输入地区"
-                                        class="el-input__inner" />
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                    <!-- 学校编码 -->
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">学校编码</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <input v-model="schoolCode" type="text" autocomplete="off" placeholder="请输入编码"
-                                        class="el-input__inner" />
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">上级组织</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <el-form :model="school" ref="form">
-                                        <el-select v-model="school.parentOrgId" placeholder="请选择组织"
-                                            class="custom-select" filterable>
-                                            <el-option v-for="(org, index) in organizations" :key="index"
-                                                :label="org.name" :value="org.id">
-                                                {{ org.name }}
-                                            </el-option>
-                                        </el-select>
-                                    </el-form>
-                                </div>
-                            </span>
-                        </div>
-                    </div>
+					<!-- 区域 -->
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px">区域</label>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<el-select
+										v-model="regionC"
+										placeholder="请选择区域"
+										class="custom-select"
+										filterable
+									>
+										<el-option
+											v-for="(org, index) in regionCList"
+											:key="index"
+											:label="org.name"
+											:value="org.name"
+										>
+											{{ org.name }}
+										</el-option>
+									</el-select>
+								</div>
+							</span>
+						</div>
+					</div>
+				</form>
+			</div>
+			<!-- 按钮区域 -->
+			<div slot="footer" class="el-dialog__footer">
+				<el-button @click="close_add_school">取 消</el-button>
+				<el-button type="primary" @click="ajax_add_school">确认</el-button>
+			</div>
+		</el-dialog>
+		<!-- 修改学校弹窗 -->
+		<el-dialog
+			title="修改学校"
+			class="table"
+			:visible.sync="add_school_dialog2"
+			:before-close="close_add_school2"
+			width="700px"
+		>
+			<div class="el_dialog_school_content">
+				<form class="el-form">
+					<!-- 学校名称 -->
+					<div class="el-form-item" style="margin-top: 15px">
+						<label class="el-form-item__label" style="width: 100px"
+							>学校名称</label
+						>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<input
+										v-model="sch_name"
+										type="text"
+										autocomplete="off"
+										placeholder="学校名称"
+										class="el-input__inner"
+									/>
+								</div>
+							</span>
+						</div>
+					</div>
+					<!-- 地区 -->
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px">地区</label>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<input
+										v-model="region"
+										type="text"
+										autocomplete="off"
+										placeholder="请输入地区"
+										class="el-input__inner"
+									/>
+								</div>
+							</span>
+						</div>
+					</div>
+					<!-- 学校编码 -->
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px"
+							>学校编码</label
+						>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<input
+										v-model="schoolCode"
+										type="text"
+										autocomplete="off"
+										placeholder="请输入编码"
+										class="el-input__inner"
+									/>
+								</div>
+							</span>
+						</div>
+					</div>
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px"
+							>上级组织</label
+						>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<el-form :model="school" ref="form">
+										<el-select
+											v-model="school.parentOrgId"
+											placeholder="请选择组织"
+											class="custom-select"
+											filterable
+										>
+											<el-option
+												v-for="(org, index) in organizations"
+												:key="index"
+												:label="org.name"
+												:value="org.id"
+											>
+												{{ org.name }}
+											</el-option>
+										</el-select>
+									</el-form>
+								</div>
+							</span>
+						</div>
+					</div>
 
-                    <!-- 区域 -->
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">区域</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-
-                                    <el-select v-model="regionC" placeholder="请选择区域" class="custom-select" filterable>
-                                        <el-option v-for="(org, index) in regionCList" :key="index" :label="org.name"
-                                            :value="org.name">
-                                            {{ org.name }}
-                                        </el-option>
-                                    </el-select>
-
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                </form>
-            </div>
-            <!-- 按钮区域 -->
-            <div slot="footer" class="el-dialog__footer">
-                <el-button @click="close_add_school">取 消</el-button>
-                <el-button type="primary" @click="ajax_add_school">确认</el-button>
-            </div>
-        </el-dialog>
-        <!-- 修改学校弹窗 -->
-        <el-dialog title="修改学校" class="table" :visible.sync="add_school_dialog2" :before-close="close_add_school2"
-            width="700px">
-            <div class="el_dialog_school_content">
-                <form class="el-form">
-                    <!-- 学校名称 -->
-                    <div class="el-form-item" style="margin-top: 15px">
-                        <label class="el-form-item__label" style="width: 100px">学校名称</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <input v-model="sch_name" type="text" autocomplete="off" placeholder="学校名称"
-                                        class="el-input__inner" />
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                    <!-- 地区 -->
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">地区</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <input v-model="region" type="text" autocomplete="off" placeholder="请输入地区"
-                                        class="el-input__inner" />
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                    <!-- 学校编码 -->
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">学校编码</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <input v-model="schoolCode" type="text" autocomplete="off" placeholder="请输入编码"
-                                        class="el-input__inner" />
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">上级组织</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-                                    <el-form :model="school" ref="form">
-                                        <el-select v-model="school.parentOrgId" placeholder="请选择组织"
-                                            class="custom-select" filterable>
-                                            <el-option v-for="(org, index) in organizations" :key="index"
-                                                :label="org.name" :value="org.id">
-                                                {{ org.name }}
-                                            </el-option>
-                                        </el-select>
-                                    </el-form>
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-
-                    <!-- 区域 -->
-                    <div class="el-form-item">
-                        <label class="el-form-item__label" style="width: 100px">区域</label>
-                        <div class="el-form-item__content" style="margin-left: 5px">
-                            <span>
-                                <div class="add_input el-input el-input--suffix">
-
-                                    <el-select v-model="regionC" placeholder="请选择区域" class="custom-select" filterable>
-                                        <el-option v-for="(org, index) in regionCList" :key="index" :label="org.name"
-                                            :value="org.name">
-                                            {{ org.name }}
-                                        </el-option>
-                                    </el-select>
-
-                                </div>
-                            </span>
-                        </div>
-                    </div>
-                </form>
-            </div>
-            <!-- 按钮区域 -->
-            <div slot="footer" class="el-dialog__footer">
-                <el-button @click="close_add_school2">取 消</el-button>
-                <el-button type="primary" @click="updateSchool()">确认</el-button>
-            </div>
-        </el-dialog>
-    </div>
+					<!-- 区域 -->
+					<div class="el-form-item">
+						<label class="el-form-item__label" style="width: 100px">区域</label>
+						<div class="el-form-item__content" style="margin-left: 5px">
+							<span>
+								<div class="add_input el-input el-input--suffix">
+									<el-select
+										v-model="regionC"
+										placeholder="请选择区域"
+										class="custom-select"
+										filterable
+									>
+										<el-option
+											v-for="(org, index) in regionCList"
+											:key="index"
+											:label="org.name"
+											:value="org.name"
+										>
+											{{ org.name }}
+										</el-option>
+									</el-select>
+								</div>
+							</span>
+						</div>
+					</div>
+				</form>
+			</div>
+			<!-- 按钮区域 -->
+			<div slot="footer" class="el-dialog__footer">
+				<el-button @click="close_add_school2">取 消</el-button>
+				<el-button type="primary" @click="updateSchool()">确认</el-button>
+			</div>
+		</el-dialog>
+		<permissionSettingDialog ref="permissionSettingDialogRef" @getData="getSchool"/>
+	</div>
 </template>
 <script>
 import { addOp } from "@/api/user";
-import { API_CONFIG } from '@/common/apiConfig';
-import { mapGetters } from 'vuex';
-
+import { API_CONFIG } from "@/common/apiConfig";
+import { mapGetters } from "vuex";
+import permissionSettingDialog from "./dialog/permissionSettingDialog";
 export default {
-    name: 'schoolList',
-    data() {
-        return {
-            schoolData: [],
-            schoolList: [],
-            cn_school: [],
-            checkOid: "",
-            checkOrg: "",
-            checkArea: "",
-            currentPage: 1,
-            pageSize: 10,
-            total: 0,
-            add_school_dialog: false,
-            add_school_dialog2: false,
-            sch_name: "", //学校名称
-            form: {
-                name: "",
-                account: "",
-                organization: "",
-                school: "",
-            },
-            school: {
-                OrgId: null, // 初始化 OrgId 为 null 或适当的默认值
-                parentOrgId: ''
-            },
-            region: "", //地区
-            schoolCode: "", //学校编码
-            regionC: 'cn', //区域
-            regionCList: [
-                { id: 1, name: 'hk' },
-                { id: 2, name: 'cn' }
-            ], //区域列表
-            organizations: [],
-            schoolType: "1", //学校单选框类型
-            loginPermission: "1", //是否允许登录
-            nid: "", //修改学校的id
-        }
-    },
-    methods: {
-        // 表头的背景色
-        headerCellStyle() {
-            return { backgroundColor: "#f1f1f1" };
-        },
-        changeOrg() {
-            this.currentPage = 1;
-            this.getSchool();
-        },
-        changeOid() {
-            this.currentPage = 1; // 重置当前页
-            this.getSchool(); // 调用获取数据的方法
-        },
-        changeArea() {
-            this.currentPage = 1;
-            this.getSchool();
-        },
-        getSchool() {
-            let params = [
-                {
-                    functionName: "getSchoolList",
-                    sName: this.checkOid,
-                    oName: this.checkOrg,
-                    area: this.checkArea,
-                    page: this.currentPage,
-                    num: this.pageSize,
-                }
-            ];
-            this.$ajax
-                .post(API_CONFIG.baseUrl, params)
-                .then((res) => {
-                    // console.log("返回的数据为:", res.data);  // 检查返回的数据
-                    if (res.data && Array.isArray(res.data[0])) {
-                        // 使用 map() 提取所有组织名称
-                        this.schoolData = res.data[0]
-
-                        if (this.schoolData.length > 0 && res.data[0][0] && res.data[0][0].num !== undefined) {
-                            this.total = res.data[0][0].num; // 使用 num 的值
-                        } else {
-                            this.total = 0; // 设置总数为0
-                        }
-                    } else {
-                        this.total = 0; // 如果没有数据,设置总数为0
-                    }
+	name: "schoolList",
+	components: {
+		permissionSettingDialog,
+	},
+	data() {
+		return {
+			schoolData: [],
+			schoolList: [],
+			cn_school: [],
+			checkOid: "",
+			checkOrg: "",
+			checkArea: "",
+			currentPage: 1,
+			pageSize: 10,
+			total: 0,
+			add_school_dialog: false,
+			add_school_dialog2: false,
+			sch_name: "", //学校名称
+			form: {
+				name: "",
+				account: "",
+				organization: "",
+				school: "",
+			},
+			school: {
+				OrgId: null, // 初始化 OrgId 为 null 或适当的默认值
+				parentOrgId: "",
+			},
+			region: "", //地区
+			schoolCode: "", //学校编码
+			regionC: "cn", //区域
+			regionCList: [
+				{ id: 1, name: "hk" },
+				{ id: 2, name: "cn" },
+			], //区域列表
+			organizations: [],
+			schoolType: "1", //学校单选框类型
+			loginPermission: "1", //是否允许登录
+			nid: "", //修改学校的id
+			unShowJurUser:['0abcb118-9110-11eb-80ad-005056b86db5']
+		};
+	},
+	methods: {
+		// 表头的背景色
+		headerCellStyle() {
+			return { backgroundColor: "#f1f1f1" };
+		},
+		changeOrg() {
+			this.currentPage = 1;
+			this.getSchool();
+		},
+		changeOid() {
+			this.currentPage = 1; // 重置当前页
+			this.getSchool(); // 调用获取数据的方法
+		},
+		changeArea() {
+			this.currentPage = 1;
+			this.getSchool();
+		},
+		getSchool() {
+			let params = [
+				{
+					functionName: "getSchoolList",
+					sName: this.checkOid,
+					oName: this.checkOrg,
+					area: this.checkArea,
+					page: this.currentPage,
+					num: this.pageSize,
+				},
+			];
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then((res) => {
+					// console.log("返回的数据为:", res.data);  // 检查返回的数据
+					if (res.data && Array.isArray(res.data[0])) {
+						// 使用 map() 提取所有组织名称
+						this.schoolData = res.data[0];
 
-                })
-                .catch((err) => {
-                    this.$message.error("查询失败");
-                    console.error("请求失败,错误信息:", err);
-                });
-        },
-        ajax_school() {
-            // 构建请求参数
-            let params = [
-                {
-                    functionName: "getAllSchool", // 调用存储过程的名称
-                },
-            ];
-            this.$ajax
-                .post(API_CONFIG.baseUrl, params)
-                .then((res) => {
-                    // console.log("返回的数据为:", res.data);  // 检查返回的数据
-                    if (res.data && Array.isArray(res.data[0])) {
-                        this.cn_school = res.data[0].map((item) => ({
-                            name: item.name,
-                            id: item.id,
-                            org: item.org,
-                            area: item.area
-                        }));
-                        // 将 name 和 org 都存入 cn_school 数组中
-                        this.schoolList = res.data[0].map((item) => ({
-                            name: item.name,
-                            id: item.id,
-                            org: item.org,
-                            area: item.area
-                        }));
-                        // console.log(this.schoolList);
-                    }
-                })
-                .catch((err) => {
-                    this.$message.error("查询失败");
-                    console.error("请求失败,错误信息:", err);
-                });
-        },
-        // 页码扩展按钮
-        handlePageChange(page) {
-            this.currentPage = page;
-            this.getSchool();
-        },
-        close_add_school() {
-            this.add_school_dialog = false;
-        },
-        close_add_school2() {
-            this.add_school_dialog2 = false;
-            this.sch_name = ""; // 清空学校名称
-            this.school.parentOrgId = ""; // 清空组织选择
-            this.region = ""; // 清空地区选择
-            this.regionC = 'cn'
-            this.schoolType = "1"; // 清空学校类型选择
-            this.schoolCode = ""; // 清空学校编码
-            this.loginPermission = "1"; // 清空登录权限的选择
-        },
-        //组织查询
-        ajax_org() {
-            const params = [API_CONFIG.ajax_org]; // 使用配置中的接口参数
-            this.$ajax
-                .post(API_CONFIG.baseUrl, params)
-                .then((res) => {
-                    // console.log("返回的数据为:", res.data);  // 检查返回的数据
-                    if (res.data && Array.isArray(res.data[0])) {
-                        // 使用 map() 提取所有组织名称
-                        this.organizations = res.data[0].map((item) => ({
-                            name: item.name,
-                            id: item.id,
-                        }));
-                    }
-                    // console.log("返回的结果为:", this.organizations);
-                })
-                .catch((err) => {
-                    this.$message.error("查询失败");
-                    console.error("请求失败,错误信息:", err);
-                });
-        },
-        ajax_add_school() {
-            // 校验学校名称是否为空
-            if (!this.sch_name || this.sch_name.trim() === "") {
-                this.$message.error("学校名称不能为空!");
-                return;
-            }
+						if (
+							this.schoolData.length > 0 &&
+							res.data[0][0] &&
+							res.data[0][0].num !== undefined
+						) {
+							this.total = res.data[0][0].num; // 使用 num 的值
+						} else {
+							this.total = 0; // 设置总数为0
+						}
+					} else {
+						this.total = 0; // 如果没有数据,设置总数为0
+					}
+				})
+				.catch((err) => {
+					this.$message.error("查询失败");
+					console.error("请求失败,错误信息:", err);
+				});
+		},
+		ajax_school() {
+			// 构建请求参数
+			let params = [
+				{
+					functionName: "getAllSchool", // 调用存储过程的名称
+				},
+			];
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then((res) => {
+					// console.log("返回的数据为:", res.data);  // 检查返回的数据
+					if (res.data && Array.isArray(res.data[0])) {
+						this.cn_school = res.data[0].map((item) => ({
+							name: item.name,
+							id: item.id,
+							org: item.org,
+							area: item.area,
+						}));
+						// 将 name 和 org 都存入 cn_school 数组中
+						this.schoolList = res.data[0].map((item) => ({
+							name: item.name,
+							id: item.id,
+							org: item.org,
+							area: item.area,
+						}));
+						// console.log(this.schoolList);
+					}
+				})
+				.catch((err) => {
+					this.$message.error("查询失败");
+					console.error("请求失败,错误信息:", err);
+				});
+		},
+		// 页码扩展按钮
+		handlePageChange(page) {
+			this.currentPage = page;
+			this.getSchool();
+		},
+		close_add_school() {
+			this.add_school_dialog = false;
+		},
+		close_add_school2() {
+			this.add_school_dialog2 = false;
+			this.sch_name = ""; // 清空学校名称
+			this.school.parentOrgId = ""; // 清空组织选择
+			this.region = ""; // 清空地区选择
+			this.regionC = "cn";
+			this.schoolType = "1"; // 清空学校类型选择
+			this.schoolCode = ""; // 清空学校编码
+			this.loginPermission = "1"; // 清空登录权限的选择
+		},
+		//组织查询
+		ajax_org() {
+			const params = [API_CONFIG.ajax_org]; // 使用配置中的接口参数
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then((res) => {
+					// console.log("返回的数据为:", res.data);  // 检查返回的数据
+					if (res.data && Array.isArray(res.data[0])) {
+						// 使用 map() 提取所有组织名称
+						this.organizations = res.data[0].map((item) => ({
+							name: item.name,
+							id: item.id,
+						}));
+					}
+					// console.log("返回的结果为:", this.organizations);
+				})
+				.catch((err) => {
+					this.$message.error("查询失败");
+					console.error("请求失败,错误信息:", err);
+				});
+		},
+		ajax_add_school() {
+			// 校验学校名称是否为空
+			if (!this.sch_name || this.sch_name.trim() === "") {
+				this.$message.error("学校名称不能为空!");
+				return;
+			}
 
-            // 构建请求参数
-            let params = [
-                {
-                    functionName: API_CONFIG.ajax_add_school.functionName, // 调用存储过程的名称
-                    u_name: this.sch_name, // 学校名称,绑定到 orgName
-                    u_org: this.school.parentOrgId || "", // 选择的组织的 ID,绑定到 school.parentOrgId,如果没有选择则为空
-                    u_dest: this.region || "", // 地区,绑定到 region,如果为空则传空字符串
-                    u_type: this.schoolType || "", // 学校类型,绑定到 schoolType,如果没有选择则为空
-                    u_code: this.schoolCode || "", // 学校编码,绑定到 schoolCode,如果为空则传空字符串
-                    u_regionC: this.regionC || "",
-                    u_isLogin: this.loginPermission === "1" ? 1 : 2, // 是否允许登录,默认传 2(不允许登录)如果没有选择
-                    uid: this.userid,
-                },
-            ];
+			// 构建请求参数
+			let params = [
+				{
+					functionName: API_CONFIG.ajax_add_school.functionName, // 调用存储过程的名称
+					u_name: this.sch_name, // 学校名称,绑定到 orgName
+					u_org: this.school.parentOrgId || "", // 选择的组织的 ID,绑定到 school.parentOrgId,如果没有选择则为空
+					u_dest: this.region || "", // 地区,绑定到 region,如果为空则传空字符串
+					u_type: this.schoolType || "", // 学校类型,绑定到 schoolType,如果没有选择则为空
+					u_code: this.schoolCode || "", // 学校编码,绑定到 schoolCode,如果为空则传空字符串
+					u_regionC: this.regionC || "",
+					u_isLogin: this.loginPermission === "1" ? 1 : 2, // 是否允许登录,默认传 2(不允许登录)如果没有选择
+					uid: this.userid,
+				},
+			];
 
-            // 发起请求
-            this.$ajax
-                .post(API_CONFIG.baseUrl, params)
-                .then(async (res) => {
-                    // console.log("👉", res.data);
-                    if (res.data && res.data[0] && res.data[0][0]) {
-                        if (res.data[0][0].name === 1) {
-                            this.$message({
-                                type: "error",
-                                message: "该学校已存在,请重新选择!",
-                            });
-                            return;
-                        } else {
-                            this.$message({
-                                type: "success",
-                                message: "添加成功!",
-                            });
-                            await addOp({
-                                uid: this.userid,
-                                cid: "",
-                                type: "user_op",
-                                content: `添加了学校 ${this.sch_name}`,
-                            });
-                        }
-                    } else {
-                        this.$message.error("插入失败,未返回有效结果");
-                    }
-                    // 刷新学校列表
-                    this.getSchool();
-                    // 关闭弹窗
-                    this.add_school_dialog = false;
-                    // 清空输入框、下拉菜单选择和单选框
-                    this.sch_name = ""; // 清空学校名称
-                    this.school.parentOrgId = ""; // 清空组织选择
-                    this.region = ""; // 清空地区选择
-                    this.regionC = 'cn'
-                    this.schoolType = "1"; // 清空学校类型选择
-                    this.schoolCode = ""; // 清空学校编码
-                    this.loginPermission = "1"; // 清空登录权限的选择
-                })
-                .catch((err) => {
-                    this.$message.error("插入失败");
-                    console.error("请求失败,错误信息:", err);
-                });
-        },
-        update(row) {
-            this.nid = row.id;
-            this.add_school_dialog2 = true;
-            this.sch_name = row.name;
-            this.school.parentOrgId = row.org;
-            this.region = row.dest;
-            this.schoolCode = row.code;
-            this.regionC = row.area;
+			// 发起请求
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then(async (res) => {
+					// console.log("👉", res.data);
+					if (res.data && res.data[0] && res.data[0][0]) {
+						if (res.data[0][0].name === 1) {
+							this.$message({
+								type: "error",
+								message: "该学校已存在,请重新选择!",
+							});
+							return;
+						} else {
+							this.$message({
+								type: "success",
+								message: "添加成功!",
+							});
+							await addOp({
+								uid: this.userid,
+								cid: "",
+								type: "user_op",
+								content: `添加了学校 ${this.sch_name}`,
+							});
+						}
+					} else {
+						this.$message.error("插入失败,未返回有效结果");
+					}
+					// 刷新学校列表
+					this.getSchool();
+					// 关闭弹窗
+					this.add_school_dialog = false;
+					// 清空输入框、下拉菜单选择和单选框
+					this.sch_name = ""; // 清空学校名称
+					this.school.parentOrgId = ""; // 清空组织选择
+					this.region = ""; // 清空地区选择
+					this.regionC = "cn";
+					this.schoolType = "1"; // 清空学校类型选择
+					this.schoolCode = ""; // 清空学校编码
+					this.loginPermission = "1"; // 清空登录权限的选择
+				})
+				.catch((err) => {
+					this.$message.error("插入失败");
+					console.error("请求失败,错误信息:", err);
+				});
+		},
+		update(row) {
+			this.nid = row.id;
+			this.add_school_dialog2 = true;
+			this.sch_name = row.name;
+			this.school.parentOrgId = row.org;
+			this.region = row.dest;
+			this.schoolCode = row.code;
+			this.regionC = row.area;
+		},
+		updateSchool() {
+			let params = [
+				{
+					functionName: "updateSchool",
+					id: this.nid,
+					name: this.sch_name,
+					dest: this.region,
+					code: this.schoolCode,
+					organ: this.school.parentOrgId,
+					area: this.regionC,
+				},
+			];
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then(async (res) => {
+					console.log("👉", res.data);
+					this.add_school_dialog2 = false;
+					this.$message({
+						message: "修改成功",
+						type: "success",
+					});
+					this.getSchool();
+					await addOp({
+						uid: this.userid,
+						cid: "",
+						type: "user_op",
+						content: `修改了学校 ${this.sch_name}${this.nid}`,
+					});
+				})
+				.catch((err) => {
+					this.$message.error("修改失败");
+					console.log(err);
+				});
+		},
+		delete_school(row) {
+			this.nid = row.id;
 
-        },
-        updateSchool() {
-            let params = [
-                {
-                    functionName: "updateSchool",
-                    id: this.nid,
-                    name: this.sch_name,
-                    dest: this.region,
-                    code: this.schoolCode,
-                    organ: this.school.parentOrgId,
-                    area: this.regionC
+			let params = [
+				{
+					functionName: "deleteSchool",
+					id: this.nid,
+				},
+			];
+			this.$confirm("确定删除此学校记录吗?", "提示", {
+				confirmButtonText: "确定",
+				cancelButtonText: "取消",
+				type: "warning",
+			})
+				.then(() => {
+					this.$ajax.post(API_CONFIG.baseUrl, params).then(async (res) => {
+						console.log("👉", res.data);
+						this.$message({
+							message: "删除成功",
+							type: "success",
+						});
+						this.getSchool();
+						await addOp({
+							uid: this.userid,
+							cid: "",
+							type: "user_op",
+							content: `删除了学校 ${row.name}${row.id}`,
+						});
+					});
+				})
+				.catch((err) => {
+					this.$message.error("删除失败");
+					console.log(err);
+				});
+		},
+		async getUserId(oid, org) {
+			let params = [
+				{
+					functionName: "select_Suffix", // 调用存储过程的名称
+					org: org, //组织id
+					oid: oid, //学校id
+				},
+			];
 
-                }
-            ];
-            this.$ajax
-                .post(API_CONFIG.baseUrl, params)
-                .then(async (res) => {
-                    console.log("👉", res.data);
-                    this.add_school_dialog2 = false;
-                    this.$message({
-                        message: '修改成功',
-                        type: 'success'
-                    });
-                    this.getSchool();
-                    await addOp({
-                        uid: this.userid,
-                        cid: "",
-                        type: "user_op",
-                        content: `修改了学校 ${this.sch_name}${this.nid}`,
-                    });
-                })
-                .catch((err) => {
-                    this.$message.error("修改失败");
-                    console.log(err);
-                });
-        },
-        delete_school(row) {
-            this.nid = row.id;
-
-            let params = [
-                {
-                    functionName: "deleteSchool",
-                    id: this.nid
-                }
-            ];
-            this.$confirm("确定删除此学校记录吗?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-            })
-                .then(() => {
-                    this.$ajax
-                        .post(API_CONFIG.baseUrl, params)
-                        .then(async (res) => {
-                            console.log("👉", res.data);
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getSchool();
-                            await addOp({
-                                uid: this.userid,
-                                cid: "",
-                                type: "user_op",
-                                content: `删除了学校 ${row.name}${row.id}`,
-                            });
-                        })
-                })
-                .catch((err) => {
-                    this.$message.error("删除失败");
-                    console.log(err);
-                });
-        },
-        async getUserId(oid, org) {
-            let params = [
-                {
-                functionName: "select_Suffix", // 调用存储过程的名称
-                org: org, //组织id
-                oid: oid, //学校id
-                },
-            ];
-
-            try {
-                const res = await this.$ajax.post(API_CONFIG.baseUrl, params);
-                console.log('getSuffix', res);
-                let data = res.data[0];
-                let orgData = res.data[1];
-                let ap = data.length > 0 ? data[0].userid : orgData.length > 0 ? orgData[0].userid : "";
-                return ap
-            } catch (err) {
-                console.error("请求失败,错误信息:", err);
-            }
-        },
-        async toPage(row) {
-            const oid = row.id;
-            const org = row.org;
-            let userid = await this.getUserId(oid, org);
-            await addOp({
-                uid: this.userid,
-                cid: "",
-                type: "user_op",
-                content: `点击了批量添加 ${row.name}${row.id}`,
-            });
-            const url=`https://pbl.cocorobo.cn/pbl-teacher-table/dist/?#/teacher?userid=${userid ? userid : this.userid}&oid=${oid}&org=${org}`;
-            window.open(url,'_blank');
-        }
-
-    },
-    mounted() {
-        this.getSchool();
-        this.ajax_org();
-        this.ajax_school();
-    },
-    computed: {
-        ...mapGetters(["userid"]),
-
-    },
-}
+			try {
+				const res = await this.$ajax.post(API_CONFIG.baseUrl, params);
+				console.log("getSuffix", res);
+				let data = res.data[0];
+				let orgData = res.data[1];
+				let ap =
+					data.length > 0
+						? data[0].userid
+						: orgData.length > 0
+						? orgData[0].userid
+						: "";
+				return ap;
+			} catch (err) {
+				console.error("请求失败,错误信息:", err);
+			}
+		},
+		async toPage(row) {
+			const oid = row.id;
+			const org = row.org;
+			let userid = await this.getUserId(oid, org);
+			await addOp({
+				uid: this.userid,
+				cid: "",
+				type: "user_op",
+				content: `点击了批量添加 ${row.name}${row.id}`,
+			});
+			const url = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/?#/teacher?userid=${
+				userid ? userid : this.userid
+			}&oid=${oid}&org=${org}`;
+			window.open(url, "_blank");
+		},
+		permissionSetting(data) {
+			this.$refs.permissionSettingDialogRef.open(data,"school");
+		},
+	},
+	mounted() {
+		this.getSchool();
+		this.ajax_org();
+		this.ajax_school();
+	},
+	computed: {
+		...mapGetters(["userid"]),
+	},
+};
 </script>
 <style scoped>
 .list_container {
-    width: 100%;
-    height: 100%;
-    padding: 10px;
-    box-sizing: border-box;
-    overflow: auto;
+	width: 100%;
+	height: 100%;
+	padding: 10px;
+	box-sizing: border-box;
+	overflow: auto;
 }
 
 /* 新增学校的内容容器 */
 .el_dialog_school_content {
-    color: #606266;
-    font-size: 14px;
-    /* height: 300px; */
+	color: #606266;
+	font-size: 14px;
+	/* height: 300px; */
 }
 
 .el-form-item {
-    margin-bottom: 22px;
-    display: flex;
-    align-items: center;
-    /* border: 1px solid black; */
+	margin-bottom: 22px;
+	display: flex;
+	align-items: center;
+	/* border: 1px solid black; */
 }
 
 .el-form-item__label {
-    font-size: 14px;
-    color: #606266;
-    line-height: 40px;
-    margin-left: 20px;
-    width: 70px;
+	font-size: 14px;
+	color: #606266;
+	line-height: 40px;
+	margin-left: 20px;
+	width: 70px;
 }
 
 .el-form-item__content {
-    line-height: 40px;
-    position: relative;
-    font-size: 14px;
+	line-height: 40px;
+	position: relative;
+	font-size: 14px;
 }
 
-.table>>>.el-dialog__header {
-    padding: 15px 20px;
-    background: #454545;
+.table >>> .el-dialog__header {
+	padding: 15px 20px;
+	background: #454545;
 }
 
-.table>>>.el-dialog__title {
-    color: #fff;
+.table >>> .el-dialog__title {
+	color: #fff;
 }
 
-
 .tableBox {
-    margin: 10px 0;
+	margin: 10px 0;
 }
 
 .operate {
-    display: flex;
-    gap: 10px;
+	display: flex;
+	gap: 10px;
 }
 
 .operate button {
-    background: none;
-    border: none;
-    cursor: pointer;
-    color: #308fff;
+	background: none;
+	border: none;
+	cursor: pointer;
+	color: #308fff;
 }
-</style>
+</style>

+ 1 - 1
src/views/HomeView.vue

@@ -25,7 +25,7 @@
           <!-- <router-link class="menu_left" to="/version-add">
             <i class="el-icon-office-building"></i>版本更新
           </router-link> -->
-					<router-link class="menu_left" to="/desktopTool-list">
+					<router-link class="menu_left" to="/desktopTool-list" v-show="userinfo.userid != '0abcb118-9110-11eb-80ad-005056b86db5'">
 						<i class="el-icon-s-grid"></i>工具列表
 					</router-link>
         </ul>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott