lsc 6 月之前
父節點
當前提交
b95d4c9b66

文件差異過大導致無法顯示
+ 0 - 0
dist/css/app.c6cab2a4.css


+ 1 - 1
dist/index.html

@@ -36,4 +36,4 @@
         width: 100%;
         background: #e6eaf0;
         font-family: '黑体';
-      }</style><script defer="defer" src="/js/chunk-vendors.ac8f9183.js"></script><script defer="defer" src="/js/app.3b05f1be.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.03ba229c.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.ac8f9183.js"></script><script defer="defer" src="/js/app.0dadedbb.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.c6cab2a4.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>

文件差異過大導致無法顯示
+ 0 - 0
dist/js/app.0dadedbb.js


文件差異過大導致無法顯示
+ 0 - 0
dist/js/app.0dadedbb.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/js/app.3b05f1be.js


文件差異過大導致無法顯示
+ 0 - 0
dist/js/app.3b05f1be.js.map


+ 54 - 10
src/components/organList.vue

@@ -28,7 +28,7 @@
                         <div class="operate">
                             <button @click="update(scope.row)">编辑</button>
                             <button @click="toPage(scope.row)">批量创建</button>
-                            <button @click="delete_organ(scope.row.id)" style="color:red;">删除</button>
+                            <button @click="delete_organ(scope.row)" style="color:red;">删除</button>
                             
                         </div>
                     </template>
@@ -153,6 +153,7 @@
 </template>
 <script>
 import { API_CONFIG } from '@/common/apiConfig';
+import { addOp } from "@/api/user";
 import { mapGetters } from 'vuex';
 export default {
     name: 'onList',
@@ -290,7 +291,7 @@ export default {
             // 发起请求
             this.$ajax
                 .post(API_CONFIG.baseUrl, params)
-                .then((res) => {
+                .then(async (res) => {
                     console.log(res.data);
                     // 检查返回的结果
                     if (res.data && res.data[0] && res.data[0][0]) {
@@ -305,6 +306,12 @@ export default {
                                 type: "success",
                                 message: "添加成功!",
                             });
+                            await addOp({
+                                uid: this.userid,
+                                cid: "",
+                                type: "user_op",
+                                content: `添加了组织 ${orgName}`,
+                            });
                         }
                     } else {
                         this.$message.error("插入失败,未返回有效结果");
@@ -346,7 +353,7 @@ export default {
             ];
             this.$ajax
                 .post(API_CONFIG.baseUrl, params)
-                .then((res) => {
+                .then(async (res) => {
                     console.log("👉", res.data);
                     this.add_organ_dialog2 = false;
                     this.$message({
@@ -354,15 +361,20 @@ export default {
                         type: 'success'
                     });
                     this.getOrgan();
-
+                    await addOp({
+                        uid: this.userid,
+                        cid: "",
+                        type: "user_op",
+                        content: `修改了组织 ${this.orgName} ${this.nid}`,
+                    });
                 })
                 .catch((err) => {
                     this.$message.error("修改失败");
                     console.log(err);
                 });
         },
-        delete_organ(id) {
-            this.nid = id;
+        delete_organ(row) {
+            this.nid = row.id;
 
             let params = [
                 {
@@ -378,14 +390,19 @@ export default {
                 .then(() => {
                     this.$ajax
                         .post(API_CONFIG.baseUrl, params)
-                        .then((res) => {
+                        .then(async (res) => {
                             console.log("👉", res.data);
                             this.$message({
                                 message: '删除成功',
                                 type: 'success'
                             });
                             this.getOrgan();
-
+                            await addOp({
+                                uid: this.userid,
+                                cid: "",
+                                type: "user_op",
+                                content: `删除了组织 ${row.name} ${row.id}`,
+                            });
                         })
                 })
                 .catch((err) => {
@@ -393,10 +410,37 @@ export default {
                     console.log(err);
                 });
         },
-        toPage(row) {
+        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 = "";
             const org = row.id;
-            const url=`https://pbl.cocorobo.cn/pbl-teacher-table/dist/?#/teacher?userid=${this.userid}&oid=${oid}&org=${org}`;
+            await addOp({
+              uid: this.userid,
+              cid: "",
+              type: "user_op",
+              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}`;
             window.open(url,'_blank');
         }
 

+ 54 - 10
src/components/schoolList.vue

@@ -36,7 +36,7 @@
                         <div class="operate">
                             <button @click="update(scope.row)">编辑</button>
                             <button @click="toPage(scope.row)">批量创建</button>
-                            <button @click="delete_school(scope.row.id)" style="color:red;">删除</button>
+                            <button @click="delete_school(scope.row)" style="color:red;">删除</button>
 
                         </div>
                     </template>
@@ -222,6 +222,7 @@
     </div>
 </template>
 <script>
+import { addOp } from "@/api/user";
 import { API_CONFIG } from '@/common/apiConfig';
 import { mapGetters } from 'vuex';
 
@@ -406,7 +407,7 @@ export default {
             // 发起请求
             this.$ajax
                 .post(API_CONFIG.baseUrl, params)
-                .then((res) => {
+                .then(async (res) => {
                     // console.log("👉", res.data);
                     if (res.data && res.data[0] && res.data[0][0]) {
                         if (res.data[0][0].name === 1) {
@@ -420,6 +421,12 @@ export default {
                                 type: "success",
                                 message: "添加成功!",
                             });
+                            await addOp({
+                                uid: this.userid,
+                                cid: "",
+                                type: "user_op",
+                                content: `添加了学校 ${this.sch_name}`,
+                            });
                         }
                     } else {
                         this.$message.error("插入失败,未返回有效结果");
@@ -467,7 +474,7 @@ export default {
             ];
             this.$ajax
                 .post(API_CONFIG.baseUrl, params)
-                .then((res) => {
+                .then(async (res) => {
                     console.log("👉", res.data);
                     this.add_school_dialog2 = false;
                     this.$message({
@@ -475,15 +482,20 @@ export default {
                         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(id) {
-            this.nid = id;
+        delete_school(row) {
+            this.nid = row.id;
 
             let params = [
                 {
@@ -499,14 +511,19 @@ export default {
                 .then(() => {
                     this.$ajax
                         .post(API_CONFIG.baseUrl, params)
-                        .then((res) => {
+                        .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) => {
@@ -514,10 +531,37 @@ export default {
                     console.log(err);
                 });
         },
-        toPage(row) {
+        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;
-            const url=`https://pbl.cocorobo.cn/pbl-teacher-table/dist/?#/teacher?userid=${this.userid}&oid=${oid}&org=${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');
         }
 

+ 2 - 2
src/views/HomeView.vue

@@ -22,9 +22,9 @@
           <router-link class="menu_left" to="/school-list">
             <i class="el-icon-school"></i>学校列表
           </router-link>
-          <router-link class="menu_left" to="/version-add">
+          <!-- <router-link class="menu_left" to="/version-add">
             <i class="el-icon-office-building"></i>版本更新
-          </router-link>
+          </router-link> -->
         </ul>
       </div>
       <div class="table-container">

部分文件因文件數量過多而無法顯示