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

vue 20241211更改 调整权限

贾小兵 5 hónapja
szülő
commit
896e0b5b21

+ 3 - 7
ruoyi-ui/src/views/peoples/current/index.vue

@@ -10,7 +10,6 @@
               icon="el-icon-refresh"
               size="mini"
               @click="refreshTable1"
-              v-hasPermi="['system:user:add']"
             >刷新 </el-button>
           </el-col>
           <el-col :span="1.5">
@@ -19,7 +18,6 @@
               plain
               icon="el-icon-edit"
               size="mini"
-              v-hasPermi="['system:user:edit']"
             >批量确认已送</el-button>
           </el-col>
         </el-row>
@@ -46,14 +44,12 @@
                 type="text"
                 icon="el-icon-position"
                 @click="handleUpdate(scope.row)"
-                v-hasPermi="['system:user:edit']"
               >已送</el-button>
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-finished"
                 @click="handleDelete(scope.row)"
-                v-hasPermi="['system:user:remove']"
               >驳回</el-button>
             </template>
           </el-table-column>
@@ -182,7 +178,7 @@
 }
 </style>
 <script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
+import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
 import { getToken } from "@/utils/auth";
 
 export default {
@@ -306,7 +302,7 @@ export default {
   methods: {
     refreshTable1(){
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           this.userList = response.rows;
           this.total = response.total;
           this.loading = false;
@@ -316,7 +312,7 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           this.userList = response.rows;
           this.total = response.total;
           this.loading = false;

+ 36 - 26
ruoyi-ui/src/views/peoples/exams/index.vue

@@ -76,7 +76,6 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd"
-              v-hasPermi="['simulator:task:add']"
             >新增</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -87,7 +86,6 @@
               size="mini"
               :disabled="single"
               @click="handleUpdate"
-              v-hasPermi="['simulator:user:edit']"
             >修改</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -98,10 +96,9 @@
               size="mini"
               :disabled="multiple"
               @click="handleDelete"
-              v-hasPermi="['simulator:user:remove']"
             >删除</el-button>
           </el-col>
-          <el-col :span="1.5">
+          <!-- <el-col :span="1.5">
             <el-button
               type="warning"
               plain
@@ -110,7 +107,7 @@
               :disabled="single"
               @click="handleKaoshi"
             >当前考试</el-button>
-          </el-col>
+          </el-col> -->
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
         </el-row>
 
@@ -263,9 +260,9 @@
                 v-hasPermi="['system:user:remove']"
               >删除</el-button>
             </el-col> -->
-            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
+            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList1" :columns="columns"></right-toolbar>
           </el-row>
-          <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
+          <el-table v-loading="loading" :data="userList1" @selection-change="handleSelectionChange">
             <el-table-column type="selection" width="50" align="center" />
             <el-table-column label="区队/班级" align="center" key="className" prop="className" v-if="columns[0].visible" :show-overflow-tooltip="true" />
             <el-table-column label="专业名称" align="center" key="majorName" prop="majorName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
@@ -299,7 +296,7 @@
             :total="total"
             :page.sync="queryParams.pageNum"
             :limit.sync="queryParams.pageSize"
-            @pagination="getList"
+            @pagination="getList1"
           /> 
         </el-col>
       </el-row>
@@ -396,7 +393,8 @@
 }
 </style>
 <script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
+import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
+import { listMajor  } from "@/api/sim/major";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -585,6 +583,8 @@ export default {
       total: 0,
       // 用户表格数据
       userList: null,
+       // 用户表格数据
+      userList1: null,
       // 弹出层标题
       title: "",
       // 部门树选项
@@ -934,7 +934,7 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           //将返回值注释
           this.userList = response.rows;
           this.total = response.total;
@@ -942,6 +942,16 @@ export default {
         }
       );
     },
+    getList1() {
+      this.loading = true;
+      listMajor(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+          //将返回值注释
+          this.userList1 = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        }
+      );
+    },
     /** 查询部门下拉树结构 */
     getDeptTree() {
       deptTreeSelect().then(response => {
@@ -1015,29 +1025,29 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
-      getUser().then(response => {
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
+      // getUser().then(response => {
+      //   this.postOptions = response.posts;
+      //   this.roleOptions = response.roles;
         this.open = true;
         this.title = "新增考试";
-        this.form.password = this.initPassword;
-      });
+        // this.form.password = this.initPassword;
+      // });
     },
 
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
       const userId = row.userId || this.ids;
-      getUser(userId).then(response => {
-        this.form = response.data;
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
-        this.$set(this.form, "postIds", response.postIds);
-        this.$set(this.form, "roleIds", response.roleIds);
+      // getUser(userId).then(response => {
+        // this.form = response.data;
+        // this.postOptions = response.posts;
+        // this.roleOptions = response.roles;
+        // this.$set(this.form, "postIds", response.postIds);
+        // this.$set(this.form, "roleIds", response.roleIds);
         this.open = true;
-        this.title = "修改用户";
+        this.title = "修改考试";
         this.form.password = "";
-      });
+      // });
     },
 
     /** 当前考试查询 */
@@ -1050,12 +1060,12 @@ export default {
     handleSelectType(row) {
       this.reset();
       const userId = row.userId || this.ids;
-      getUser(userId).then(response => {
-        this.form = response.data;
+      // getUser(userId).then(response => {
+      //   this.form = response.data;
         this.selectopen = true;
         // this.open = false;
         this.title = "选择考题";
-      });
+      // });
     },
     
     /** 提交按钮 */

+ 3 - 7
ruoyi-ui/src/views/peoples/present/index.vue

@@ -10,7 +10,6 @@
               icon="el-icon-refresh"
               size="mini"
               @click="refreshTable1"
-              v-hasPermi="['system:user:add']"
             >刷新</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -19,7 +18,6 @@
               plain
               icon="el-icon-edit"
               size="mini"
-              v-hasPermi="['system:user:edit']"
             >批量确认已送</el-button>
           </el-col>
         </el-row>
@@ -46,14 +44,12 @@
                 type="text"
                 icon="el-icon-position"
                 @click="handleUpdate(scope.row)"
-                v-hasPermi="['system:user:edit']"
               >已送</el-button>
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-finished"
                 @click="handleDelete(scope.row)"
-                v-hasPermi="['system:user:remove']"
               >驳回</el-button>
             </template>
           </el-table-column>
@@ -230,7 +226,7 @@
 }
 </style>
 <script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
+import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
 import { getToken } from "@/utils/auth";
 export default {
   // name: "User",
@@ -526,7 +522,7 @@ export default {
     // 刷新
     refreshTable1(){
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           this.userList = response.rows;
           this.total = response.total;
           this.loading = false;
@@ -537,7 +533,7 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           this.userList = response.rows;
           this.total = response.total;
           this.loading = false;

+ 13 - 16
ruoyi-ui/src/views/peoples/score/index.vue

@@ -81,7 +81,6 @@
               size="mini"
               :disabled="single"
               @click="handleUpdate"
-              v-hasPermi="['system:user:edit']"
             >修改</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -91,7 +90,6 @@
               icon="el-icon-download"
               size="mini"
               @click="handleExport"
-              v-hasPermi="['system:user:export']"
             >导出</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -102,7 +100,6 @@
               size="mini"
               :disabled="single"
               @click="handleView"
-              v-hasPermi="['system:user:view']"
             >成绩详情</el-button>
           </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
@@ -342,7 +339,7 @@
 
 </style>
 <script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
+import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -675,7 +672,7 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           this.userList = response.rows;
           this.total = response.total;
           this.loading = false;
@@ -758,26 +755,26 @@ export default {
     handleUpdate(row) {
       this.reset();
       const userId = row.userId || this.ids;
-      getUser(userId).then(response => {
-        this.form = response.data;
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
-        this.$set(this.form, "postIds", response.postIds);
-        this.$set(this.form, "roleIds", response.roleIds);
+      // getUser(userId).then(response => {
+        // this.form = response.data;
+        // this.postOptions = response.posts;
+        // this.roleOptions = response.roles;
+        // this.$set(this.form, "postIds", response.postIds);
+        // this.$set(this.form, "roleIds", response.roleIds);
         this.dialogVisible1 = true;
         this.title = "修改成绩";
         this.form.password = "";
-      });
+      // });
     },
      /** 成绩详情按钮操作 */
      handleView(row) {
       this.reset();
-      const userId = row.userId || this.ids;
-      getUser(userId).then(response => {
-        this.form = response.data;
+      // const userId = row.userId || this.ids;
+      // getUser(userId).then(response => {
+        // this.form = response.data;
         this.dialogVisible2 = true;
         this.title = "";
-      });
+      // });
     },
     /** 提交按钮 */
     submitForm: function() {

+ 10 - 10
ruoyi-ui/src/views/peoples/task/index.vue

@@ -104,8 +104,8 @@
         <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column label="编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
-          <el-table-column label="任务名称" align="center" key="nickName" prop="nickName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="模拟器型号" align="center" key="userName" prop="userName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="任务名称" align="center" key="mingc" prop="mingc" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="模拟器型号" align="center" key="mingc" prop="mingc" v-if="columns[2].visible" :show-overflow-tooltip="true" />
           <el-table-column label="故障现象数量" align="center" key="xianxiang" prop="xianxiang" v-if="columns[3].visible" :show-overflow-tooltip="true" />
           <el-table-column label="故障部位数量" align="center" key="buwei" prop="buwei" v-if="columns[4].visible" :show-overflow-tooltip="true" />
           <el-table-column label="创建者" align="center" key="creater" prop="creater" v-if="columns[5].visible" :show-overflow-tooltip="true" />
@@ -482,7 +482,7 @@
   }
 </style>
 <script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
+import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -2871,7 +2871,7 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           //将返回值注释
           this.userList = response.rows;
           this.total = response.total;
@@ -2985,23 +2985,23 @@ export default {
     handleAdd() {
 
       this.reset();
-      getUser().then(response => {
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
+      // getUser().then(response => {
+        // this.postOptions = response.posts;
+        // this.roleOptions = response.roles;
         this.open = true;
         this.title = "新增训练任务";
         this.form.password = this.initPassword;
-      });
+      // });
     },
     /* 故障设置自检 **/
     handleInspect() {
       //this.reset();
-      getUser().then(response => {
+      // getUser().then(response => {
         //this.postOptions = response.posts;
         //this.roleOptions = response.roles;
         this.zijianopen = true;
         this.title = "故障设置自检";
-      });
+      // });
     },
 
     /** 修改按钮操作 */

+ 19 - 24
ruoyi-ui/src/views/peoples/trains/index.vue

@@ -70,7 +70,6 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd"
-              v-hasPermi="['simulator:task:add']"
             >新增</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -81,7 +80,6 @@
               size="mini"
               :disabled="single"
               @click="handleUpdate"
-              v-hasPermi="['simulator:user:edit']"
             >修改</el-button>
           </el-col>
           <el-col :span="1.5">
@@ -92,11 +90,10 @@
               size="mini"
               :disabled="multiple"
               @click="handleDelete"
-              v-hasPermi="['simulator:user:remove']"
             >删除</el-button>
           </el-col>
 
-          <el-col :span="1.5">
+          <!-- <el-col :span="1.5">
             <el-button
               type="warning"
               plain
@@ -105,7 +102,7 @@
               :disabled="single"
               @click="handleKaoshi"
             >当前练习</el-button>
-          </el-col>
+          </el-col> -->
           
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
         </el-row>
@@ -113,7 +110,7 @@
         <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50" align="center" />
           <!-- <el-table-column label="编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> -->
-          <el-table-column label="练习名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="练习名称" align="center" key="userName1" prop="userName1" v-if="columns[1].visible" :show-overflow-tooltip="true" />
           <el-table-column label="练习时间" align="center" key="kaoshiTime" prop="kaoshiTime" v-if="columns[2].visible" :show-overflow-tooltip="true" />
           <el-table-column label="模拟器类型" align="center" key="liexing" prop="liexing" v-if="columns[3].visible" :show-overflow-tooltip="true" />
           <el-table-column label="创建老师" align="center" key="creater" prop="creater" v-if="columns[4].visible" :show-overflow-tooltip="true" />
@@ -144,14 +141,12 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="handleUpdate(scope.row)"
-                v-hasPermi="['simulator:user:edit']"
               >修改</el-button>
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
-                v-hasPermi="['simulator:user:remove']"
               >删除</el-button>
               
             </template>
@@ -391,7 +386,7 @@
 }
 </style>
 <script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
+import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -916,7 +911,7 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           //将返回值注释
           this.userList = response.rows;
           this.total = response.total;
@@ -997,29 +992,29 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
-      getUser().then(response => {
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
+      // getUser().then(response => {
+      //   this.postOptions = response.posts;
+      //   this.roleOptions = response.roles;
         this.open = true;
         this.title = "新增练习";
         this.form.password = this.initPassword;
-      });
+      // });
     },
 
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
       const userId = row.userId || this.ids;
-      getUser(userId).then(response => {
-        this.form = response.data;
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
-        this.$set(this.form, "postIds", response.postIds);
-        this.$set(this.form, "roleIds", response.roleIds);
+      // getUser(userId).then(response => {
+        // this.form = response.data;
+        // this.postOptions = response.posts;
+        // this.roleOptions = response.roles;
+        // this.$set(this.form, "postIds", response.postIds);
+        // this.$set(this.form, "roleIds", response.roleIds);
         this.open = true;
         this.title = "修改练习";
         this.form.password = "";
-      });
+      // });
     },
 
     /** 当前考试查询 */
@@ -1032,12 +1027,12 @@ export default {
     handleSelectType(row) {
       this.reset();
       const userId = row.userId || this.ids;
-      getUser(userId).then(response => {
-        this.form = response.data;
+      // getUser(userId).then(response => {
+        // this.form = response.data;
         this.selectopen = true;
         // this.open = false;
         this.title = "选择考题";
-      });
+      // });
     },
     
     /** 提交按钮 */