소스 검색

修改渗透安全bug

hurixing 1 년 전
부모
커밋
d6b2af89d9

+ 15 - 5
src/api/comboMeal/index.js

@@ -11,12 +11,22 @@ export function selectAll(query) {
 }
 // 添加
 export function save(query) {
-return request({
-  url: `/learn/package/save`,
-  method: 'post',
-  data: query
-})
+  return request({
+    url: `/learn/package/save`,
+    method: 'post',
+    data: query
+  })
 }
+
+// 修改
+export function edit(query) {
+  return request({
+    url: `/learn/package/edit`,
+    method: 'post',
+    data: query
+  })
+}
+
 export function del(query) {
   return request({
     url: `/learn/package/delete`,

+ 8 - 0
src/api/doctor/department.js

@@ -26,3 +26,11 @@ export function del(query) {
   })
 }
 
+// 修改
+export function departmentEdit(query) {
+  return request({
+    url: '/department/edit',
+    method: 'post',
+    data: query
+  })
+}

+ 11 - 1
src/api/doctor/physician.js

@@ -9,7 +9,7 @@ export function listData(query) {
   })
 }
 
-// 保存
+// 新增
 export function doctorSave(query) {
   return request({
     url: '/doctor/save',
@@ -17,6 +17,16 @@ export function doctorSave(query) {
     data: query
   })
 }
+// 编辑
+export function doctorEdit(query) {
+  return request({
+    url: '/doctor/edit',
+    method: 'post',
+    data: query
+  })
+}
+
+
 // 删除
 export function doctorDel(query) {
   return request({

+ 10 - 0
src/api/doctor/therapists.js

@@ -17,6 +17,16 @@ export function therapistsSave(query) {
     data: query
   })
 }
+
+// 修改
+export function therapistsEdit(query) {
+  return request({
+    url: '/therapists/edit',
+    method: 'post',
+    data: query
+  })
+}
+
 // 删除
 export function therapistsDel(query) {
   return request({

+ 10 - 0
src/api/equipment/index.js

@@ -16,6 +16,16 @@ export function equipmentSave(query) {
     data: query
   })
 }
+
+// 修改
+export function equipmentEdit(query) {
+  return request({
+    url: '/equipment/edit',
+    method: 'post',
+    data: query
+  })
+}
+
 // 删除
 export function equipmentdelete(query) {
   return request({

+ 9 - 0
src/api/game/index.js

@@ -15,6 +15,15 @@ export function saveGame(query) {
     data: query
   })
 }
+
+export function editGame(query) {
+  return request({
+    url: '/game/edit',
+    method: 'post',
+    data: query
+  })
+}
+
 export function delGame(query) {
   return request({
     url: '/game/delete',

+ 10 - 0
src/api/game/rule.js

@@ -18,6 +18,16 @@ export function saveRule(query) {
   })
 }
 
+// 修改
+export function editRule(query) {
+  return request({
+    url: '/game_recommend_rule/edit',
+    method: 'post',
+    data: query
+  })
+}
+
+
 // 删除
 export function delRule(query) {
   return request({

+ 9 - 0
src/api/patient/index.js

@@ -19,6 +19,15 @@ export function patientSave(query) {
   })
 }
 
+//修改
+export function patientEdit(query) {
+  return request({
+    url: '/patient/edit',
+    method: 'post',
+    data: query
+  })
+}
+
 // 查询套餐
 export function learnSelectAll(query) {
   return request({

+ 1 - 1
src/api/system/dept.js

@@ -41,7 +41,7 @@ export function addDept(data) {
 // 修改机构
 export function updateDept(data) {
   return request({
-    url: '/system/org/save',
+    url: '/system/org/edit',
     method: 'post',
     data: data,
     reqLock:true

+ 11 - 0
src/api/system/gameVideo.js

@@ -8,6 +8,7 @@ export function listData(query) {
     data: query
   })
 }
+// 新增游戏音效
 export function gameVoiceSave(query) {
   return request({
     url: '/game_voice/save',
@@ -15,6 +16,16 @@ export function gameVoiceSave(query) {
     data: query
   })
 }
+//  修改游戏音效
+export function gameVoiceEdit(query) {
+  return request({
+    url: '/game_voice/edit',
+    method: 'post',
+    data: query
+  })
+}
+
+
 export function delById(query) {
   return request({
     url: `/game_voice/delete?id=${query.id}`,

+ 1 - 1
src/api/system/menu.js

@@ -47,7 +47,7 @@ export function addMenu(data) {
 // 修改菜单
 export function updateMenu(data) {
   return request({
-    url: '/system/menu/save',
+    url: '/system/menu/edit',
     method: 'post',
     data: data,
     reqLock:true

+ 9 - 0
src/api/system/patientAvatar.js

@@ -15,6 +15,15 @@ export function headSave(query) {
     data: query
   })
 }
+
+export function headEdit(query) {
+  return request({
+    url: '/system/app/user/head/edit',
+    method: 'post',
+    data: query
+  })
+}
+
 export function headDel(query) {
   return request({
     url: `/system/app/user/head/del?id=${query.id}`,

+ 1 - 1
src/api/system/role.js

@@ -32,7 +32,7 @@ export function addRole(data) {
 export function updateRole(data) {
   data.menuCodes = data.menuCodes.toString()
   return request({
-    url: '/system/role/save',
+    url: '/system/role/edit',
     method: 'post',
     data: data,
     reqLock:true

+ 2 - 2
src/api/system/user.js

@@ -31,7 +31,7 @@ export function addUser(data) {
 // 修改用户
 export function updateUser(data) {
   return request({
-    url: '/system/user/save',
+    url: '/system/user/edit',
     method: 'post',
     data: data,
     reqLock:true
@@ -83,7 +83,7 @@ export function getUserProfile() {
 // 修改用户个人信息
 export function updateUserProfile(data) {
   return request({
-    url: '/system/user/save',
+    url: '/system/user/edit',
     method: 'post',
     data: data
   })

+ 16 - 7
src/views/comboMeal/list/index.vue

@@ -97,7 +97,7 @@
 </template>
 
 <script>
-import { selectAll, save, del } from '@/api/comboMeal/index'
+import { selectAll, save, del,edit } from '@/api/comboMeal/index'
 // import lookDetail from './lookDetail.vue';
 // import trainDetatil from './trainDetatil.vue';
 export default {
@@ -159,7 +159,7 @@ export default {
   },
   methods: {
     handleStatus(e, status) {
-      save({ id: e.id, status: status }).then(response => {
+      edit({ id: e.id, status: status }).then(response => {
         this.$modal.msgSuccess(status == 0 ? `启用成功` : '停用成功');
         this.getList();
       });
@@ -267,11 +267,20 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           let catchForm = this.form
-          save(catchForm).then(res => {
-            this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
-            this.open = false
-            this.getList()
-          })
+          if(catchForm.id === null || catchForm.id === undefined || catchForm.id === "") {
+            save(catchForm).then(res => {
+              this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
+              this.open = false
+              this.getList()
+            })
+          } else {
+            edit(catchForm).then(res => {
+              this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
+              this.open = false
+              this.getList()
+            })
+          }
+          
         }
       });
     },

+ 14 - 6
src/views/doctor/department/index.vue

@@ -57,7 +57,7 @@
 </template>
 
 <script>
-import { listData,departmentSave ,del} from "@/api/doctor/department";
+import { listData,departmentSave ,del,departmentEdit} from "@/api/doctor/department";
 
 
 export default {
@@ -155,11 +155,19 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          departmentSave(this.form).then(res=>{
-            this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
-            this.getList()
-            this.open = false
-          })
+          if(this.form.id === null || this.form.id ===undefined || this.form.id ===""){
+            departmentSave(this.form).then(res=>{
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
+              this.getList()
+              this.open = false
+            })
+          }else {
+            departmentEdit(this.form).then(res=>{
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
+              this.getList()
+              this.open = false
+            })
+          }
         }
       });
     },

+ 15 - 6
src/views/doctor/physician/index.vue

@@ -200,7 +200,7 @@
 </template>
 
 <script>
-import { listData, doctorSave, doctorDel,departmentList } from "@/api/doctor/physician";
+import { listData, doctorSave, doctorDel,departmentList,doctorEdit } from "@/api/doctor/physician";
 import { updateUserPwd,unlockUser } from "@/api/system/user";
 import { symmetryEncrypt } from '@/utils/secret.js'
 export default {
@@ -478,11 +478,20 @@ export default {
           })
           catchForm.avatar = arr?.toString()
           catchForm.certificate = catchForm.certificate.toString()
-          doctorSave(catchForm).then(res => {
-            this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
-            this.getList()
-            this.open = false
-          })
+          if(this.form.id === null || this.form.id ===undefined || this.form.id === ""){
+            doctorSave(catchForm).then(res => {
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
+              this.getList()
+              this.open = false
+            })
+          }else{
+            doctorEdit(catchForm).then(res => {
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
+              this.getList()
+              this.open = false
+            })
+          }
+          
         }
       });
     },

+ 14 - 6
src/views/doctor/therapists/index.vue

@@ -151,7 +151,7 @@
 </template>
 
 <script>
-import { listData, therapistsSave, therapistsDel } from "@/api/doctor/therapists";
+import { listData, therapistsSave, therapistsDel,therapistsEdit } from "@/api/doctor/therapists";
 import { updateUserPwd,unlockUser } from "@/api/system/user";
 import { departmentList } from "@/api/doctor/physician";
 
@@ -361,11 +361,19 @@ export default {
             catchForm.certificate.push(item.url)
           })
           catchForm.certificate = catchForm.certificate.toString()
-          therapistsSave(catchForm).then(res => {
-            this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
-            this.getList()
-            this.open = false
-          })
+          if(this.form.id === null || this.form.id === undefined || this.form.id === ""){
+            therapistsSave(catchForm).then(res => {
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
+              this.getList()
+              this.open = false
+            })
+          } else {
+            therapistsEdit(catchForm).then(res => {
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : `添加成功`);
+              this.getList()
+              this.open = false
+            })
+          }
         }
       });
     },

+ 15 - 6
src/views/equipment/list/index.vue

@@ -125,7 +125,7 @@
 </template>
 
 <script>
-import { listData, equipmentSave, equipmentdelete, equipmentrentLog, returnHuan, getRetinfo } from "@/api/equipment/index";
+import { listData, equipmentSave, equipmentdelete, equipmentrentLog, returnHuan, getRetinfo,equipmentEdit } from "@/api/equipment/index";
 
 
 export default {
@@ -259,11 +259,20 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          equipmentSave(this.form).then(res => {
-            this.$modal.msgSuccess(this.form.id ? `修改成功` : '修改成功');
-            this.getList()
-            this.open = false
-          })
+          if(this.form.id === null || this.form.id === undefined || this.form.id === ""){
+            equipmentSave(this.form).then(res => {
+              this.$modal.msgSuccess(this.form.id ? `修改成功` : '修改成功');
+              this.getList()
+              this.open = false
+            })
+          }else {
+            equipmentEdit(this.form).then(res => {
+              this.$modal.msgSuccess(this.form.id ? `修改成功` : '修改成功');
+              this.getList()
+              this.open = false
+            })
+          }
+          
         }
       });
     },

+ 15 - 6
src/views/game/list/index.vue

@@ -222,7 +222,7 @@
 </template>
 
 <script>
-import { listData, saveGame, delGame } from "@/api/game/index";
+import { listData, saveGame, delGame, editGame} from "@/api/game/index";
 
 
 export default {
@@ -403,11 +403,20 @@ export default {
             this.$modal.msgError("请上传游戏源文件!");
             return
           }
-          saveGame(catchForm).then(res => {
-            this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
-            this.open = false
-            this.getList()
-          })
+          if(catchForm.id === null || catchForm.id === undefined || catchForm.id === "") {
+            saveGame(catchForm).then(res => {
+              this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
+              this.open = false
+              this.getList()
+            })
+          } else {
+            editGame(catchForm).then(res => {
+              this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
+              this.open = false
+              this.getList()
+            })
+          }
+          
         }
       });
     },

+ 15 - 6
src/views/game/rule/index.vue

@@ -120,7 +120,7 @@
 </template>
 
 <script>
-import { listData, saveRule, delRule, ruleDisable, ruleEnable, rulerecommend } from "@/api/game/rule";
+import { listData, saveRule, delRule, ruleDisable, ruleEnable, rulerecommend,editRule } from "@/api/game/rule";
 
 
 export default {
@@ -235,11 +235,20 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.status = 0
-          saveRule(this.form).then(res => {
-            this.$modal.msgSuccess(this.form.id ? '修改成功' : '添加成功');
-            this.open = false
-            this.getList()
-          })
+          if(this.form.id === null || this.form.id === undefined || this.form.id === "") {
+            saveRule(this.form).then(res => {
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : '添加成功');
+              this.open = false
+              this.getList()
+            })
+          }else {
+            editRule(this.form).then(res => {
+              this.$modal.msgSuccess(this.form.id ? '修改成功' : '添加成功');
+              this.open = false
+              this.getList()
+            })
+          }
+          
         }
       });
     },

+ 2 - 1
src/views/sysLog/operLog/index.vue

@@ -39,8 +39,9 @@
         </el-form>
         <el-table  :data="listData">
             <el-table-column prop="operId" label="日志编号" />
-            <el-table-column prop="operUserId" label="用户Id" />
+            <el-table-column prop="operUserName" label="用户名" />
             <el-table-column prop="title" label="操作标题" />
+            <el-table-column prop="operParam" label="请求参数"/>
             <el-table-column prop="operIp" label="IP"/>
             <el-table-column prop="status" label="操作状态">
                 <template slot-scope="scope">

+ 11 - 2
src/views/system/gameVideo/index.vue

@@ -80,7 +80,7 @@
 </template>
 
 <script>
-import { listData, gameVoiceSave,delById } from "@/api/system/gameVideo";
+import { listData, gameVoiceSave,delById,gameVoiceEdit } from "@/api/system/gameVideo";
 
 
 export default {
@@ -188,11 +188,20 @@ export default {
             this.$modal.msgError('请上传音效');
             return
           }
-          gameVoiceSave(catchForm).then(res => {
+          if(catchForm.id === null || catchForm.id === undefined || catchForm.id ===""){
+            gameVoiceSave(catchForm).then(res => {
+              this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
+              this.open = false
+              this.getList()
+            })
+          }else {
+            gameVoiceEdit(catchForm).then(res => {
             this.$modal.msgSuccess(catchForm.id ? '修改成功' : '添加成功');
             this.open = false
             this.getList()
           })
+          }
+          
         }
       });
     },

+ 18 - 7
src/views/system/patientAvatar/index.vue

@@ -67,7 +67,7 @@
 </template>
 
 <script>
-import { listData, headSave,headDel} from "@/api/system/patientAvatar";
+import { listData, headSave,headDel,headEdit} from "@/api/system/patientAvatar";
 
 
 export default {
@@ -180,13 +180,24 @@ export default {
             catchForm.headImgUrl.push(item.url)
           })
           catchForm.headImgUrl = catchForm.headImgUrl.toString()
-          headSave(catchForm).then(res=>{
-            console.log(res);
-            this.getList()
-            this.open=false
-            this.$modal.msgSuccess(catchForm.id?'修改成功':'新增成功')
+          if(catchForm.id ===null || catchForm.id ===undefined || catchForm.id === ""){
+            headSave(catchForm).then(res=>{
+              console.log(res);
+              this.getList()
+              this.open=false
+              this.$modal.msgSuccess(catchForm.id?'修改成功':'新增成功')
 
-          })
+            })
+          } else {
+            headEdit(catchForm).then(res=>{
+              console.log(res);
+              this.getList()
+              this.open=false
+              this.$modal.msgSuccess(catchForm.id?'修改成功':'新增成功')
+
+            })
+          }
+          
         }
       });
     },