Переглянути джерело

调整研究资料管理功能代码,防止与文件资料冲突

zjc 1 рік тому
батько
коміт
529b053d50

+ 8 - 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TStudyInformationController.java

@@ -25,10 +25,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
  * 研究资料管理Controller
  * 
  * @author ruoyi
- * @date 2024-02-23
+ * @date 2024-02-26
  */
 @RestController
-@RequestMapping("/study/information")
+@RequestMapping("/study/gen")
 public class TStudyInformationController extends BaseController
 {
     @Autowired
@@ -37,7 +37,7 @@ public class TStudyInformationController extends BaseController
     /**
      * 查询研究资料管理列表
      */
-    @PreAuthorize("@ss.hasPermi('study:information:list')")
+    @PreAuthorize("@ss.hasPermi('study:gen:list')")
     @GetMapping("/list")
     public TableDataInfo list(TStudyInformation tStudyInformation)
     {
@@ -49,7 +49,7 @@ public class TStudyInformationController extends BaseController
     /**
      * 导出研究资料管理列表
      */
-    @PreAuthorize("@ss.hasPermi('study:information:export')")
+    @PreAuthorize("@ss.hasPermi('study:gen:export')")
     @Log(title = "研究资料管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, TStudyInformation tStudyInformation)
@@ -62,7 +62,7 @@ public class TStudyInformationController extends BaseController
     /**
      * 获取研究资料管理详细信息
      */
-    @PreAuthorize("@ss.hasPermi('study:information:query')")
+    @PreAuthorize("@ss.hasPermi('study:gen:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id)
     {
@@ -72,7 +72,7 @@ public class TStudyInformationController extends BaseController
     /**
      * 新增研究资料管理
      */
-    @PreAuthorize("@ss.hasPermi('study:information:add')")
+    @PreAuthorize("@ss.hasPermi('study:gen:add')")
     @Log(title = "研究资料管理", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TStudyInformation tStudyInformation)
@@ -83,7 +83,7 @@ public class TStudyInformationController extends BaseController
     /**
      * 修改研究资料管理
      */
-    @PreAuthorize("@ss.hasPermi('study:information:edit')")
+    @PreAuthorize("@ss.hasPermi('study:gen:edit')")
     @Log(title = "研究资料管理", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TStudyInformation tStudyInformation)
@@ -94,7 +94,7 @@ public class TStudyInformationController extends BaseController
     /**
      * 删除研究资料管理
      */
-    @PreAuthorize("@ss.hasPermi('study:information:remove')")
+    @PreAuthorize("@ss.hasPermi('study:gen:remove')")
     @Log(title = "研究资料管理", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable String[] ids)

+ 10 - 10
ruoyi-ui/src/api/study/information.js

@@ -1,44 +1,44 @@
 import request from '@/utils/request'
 
 // 查询研究资料管理列表
-export function listInformation(query) {
+export function listGen(query) {
   return request({
-    url: '/study/information/list',
+    url: '/study/gen/list',
     method: 'get',
     params: query
   })
 }
 
 // 查询研究资料管理详细
-export function getInformation(id) {
+export function getGen(id) {
   return request({
-    url: '/study/information/' + id,
+    url: '/study/gen/' + id,
     method: 'get'
   })
 }
 
 // 新增研究资料管理
-export function addInformation(data) {
+export function addGen(data) {
   return request({
-    url: '/study/information',
+    url: '/study/gen',
     method: 'post',
     data: data
   })
 }
 
 // 修改研究资料管理
-export function updateInformation(data) {
+export function updateGen(data) {
   return request({
-    url: '/study/information',
+    url: '/study/gen',
     method: 'put',
     data: data
   })
 }
 
 // 删除研究资料管理
-export function delInformation(id) {
+export function delGen(id) {
   return request({
-    url: '/study/information/' + id,
+    url: '/study/gen/' + id,
     method: 'delete'
   })
 }

+ 3 - 3
ruoyi-ui/src/router/index.js

@@ -134,12 +134,12 @@ export const constantRoutes = [
     children:[
       {
         path: 'information/index',
-        component: () => import('@/views/study/information/index.vue'),
+        component: () => import('@/views/study/gen/index.vue'),
         name: 'studyInformationIndex',
       },
     ]
   },
-  
+
   {
     // path: '/index',
     path: '/',
@@ -152,7 +152,7 @@ export const constantRoutes = [
         component: () => import('@/views/index'),
         name: 'Index',
         hidden: true,
-        meta: { title: '首页', icon: 'dashboard' }//, affix: true 
+        meta: { title: '首页', icon: 'dashboard' }//, affix: true
       }
     ]
   },

+ 18 - 18
ruoyi-ui/src/views/study/information/index.vue

@@ -31,7 +31,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['study:information:add']"
+          v-hasPermi="['study:gen:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -42,7 +42,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['study:information:edit']"
+          v-hasPermi="['study:gen:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -53,7 +53,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['study:information:remove']"
+          v-hasPermi="['study:gen:remove']"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -63,13 +63,13 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['study:information:export']"
+          v-hasPermi="['study:gen:export']"
         >导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="informationList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" :data="genList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="主键ID" align="center" prop="id" />
       <el-table-column label="资料名称" align="center" prop="contractName" />
@@ -82,14 +82,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['study:information:edit']"
+            v-hasPermi="['study:gen:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['study:information:remove']"
+            v-hasPermi="['study:gen:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
@@ -128,10 +128,10 @@
 </template>
 
 <script>
-import { listInformation, getInformation, delInformation, addInformation, updateInformation } from "@/api/study/information";
+import { listGen, getGen, delGen, addGen, updateGen } from "@/api/study/gen";
 
 export default {
-  name: "Information",
+  name: "Gen",
   data() {
     return {
       // 遮罩层
@@ -147,7 +147,7 @@ export default {
       // 总条数
       total: 0,
       // 研究资料管理表格数据
-      informationList: [],
+      genList: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -174,8 +174,8 @@ export default {
     /** 查询研究资料管理列表 */
     getList() {
       this.loading = true;
-      listInformation(this.queryParams).then(response => {
-        this.informationList = response.rows;
+      listGen(this.queryParams).then(response => {
+        this.genList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
@@ -227,7 +227,7 @@ export default {
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids
-      getInformation(id).then(response => {
+      getGen(id).then(response => {
         this.form = response.data;
         this.open = true;
         this.title = "修改研究资料管理";
@@ -238,13 +238,13 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            updateInformation(this.form).then(response => {
+            updateGen(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addInformation(this.form).then(response => {
+            addGen(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -257,7 +257,7 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$modal.confirm('是否确认删除研究资料管理编号为"' + ids + '"的数据项?').then(function() {
-        return delInformation(ids);
+        return delGen(ids);
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("删除成功");
@@ -265,9 +265,9 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('study/information/export', {
+      this.download('study/gen/export', {
         ...this.queryParams
-      }, `information_${new Date().getTime()}.xlsx`)
+      }, `gen_${new Date().getTime()}.xlsx`)
     }
   }
 };