mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-30 09:48:43 +08:00 
			
		
		
		
	Merge remote-tracking branch 'source/master'
# Conflicts: # yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java
This commit is contained in:
		| @@ -2,7 +2,7 @@ | ||||
|   <div class="app-container"> | ||||
|  | ||||
|     <!-- 流程设计器,负责绘制流程等 --> | ||||
|     <my-process-designer :key="`designer-${reloadIndex}`" v-model="xmlString" v-bind="controlForm" | ||||
|     <my-process-designer v-if="xmlString !== undefined" :key="`designer-${reloadIndex}`" v-model="xmlString" v-bind="controlForm" | ||||
|       keyboard ref="processDesigner" @init-finished="initModeler" | ||||
|       @save="save"/> | ||||
|  | ||||
| @@ -30,7 +30,7 @@ export default { | ||||
|   components: { MyProcessPalette }, | ||||
|   data() { | ||||
|     return { | ||||
|       xmlString: "", // BPMN XML | ||||
|       xmlString: undefined, // BPMN XML | ||||
|       modeler: null, | ||||
|       reloadIndex: 0, | ||||
|       controlDrawerVisible: false, | ||||
| @@ -72,21 +72,6 @@ export default { | ||||
|         console.log(modeler); | ||||
|       }, 10); | ||||
|     }, | ||||
|     reloadProcessDesigner(deep) { | ||||
|       this.controlForm.additionalModel = []; | ||||
|       for (let key in this.addis) { | ||||
|         if (this.addis[key]) { | ||||
|           this.controlForm.additionalModel.push(this.addis[key]); | ||||
|         } | ||||
|       } | ||||
|       deep && (this.xmlString = undefined); | ||||
|       this.reloadIndex += 1; | ||||
|       this.modeler = null; // 避免 panel 异常 | ||||
|       // if (deep) { | ||||
|       //   this.xmlString = undefined; | ||||
|       //   this.$refs.processDesigner.processRestart(); | ||||
|       // } | ||||
|     }, | ||||
|     save(bpmnXml) { | ||||
|       const data = { | ||||
|         ...this.model, | ||||
|   | ||||
| @@ -60,7 +60,7 @@ | ||||
|                   审批人:{{ item.assigneeUser.nickname }} | ||||
|                   <el-tag type="info" size="mini">{{ item.assigneeUser.deptName }}</el-tag> | ||||
|                 </label> | ||||
|                 <label style="font-weight: normal">创建时间:</label> | ||||
|                 <label style="font-weight: normal" v-if="item.createTime">创建时间:</label> | ||||
|                 <label style="color:#8a909c; font-weight: normal">{{ parseTime(item.createTime) }}</label> | ||||
|                 <label v-if="item.endTime" style="margin-left: 30px;font-weight: normal">审批时间:</label> | ||||
|                 <label v-if="item.endTime" style="color:#8a909c;font-weight: normal"> {{ parseTime(item.endTime) }}</label> | ||||
| @@ -109,7 +109,7 @@ import store from "@/store"; | ||||
| import {decodeFields} from "@/utils/formGenerator"; | ||||
| import Parser from '@/components/parser/Parser' | ||||
| import {createProcessInstance, getProcessInstance} from "@/api/bpm/processInstance"; | ||||
| import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssignee} from "@/api/bpm/task"; | ||||
| import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssignee,backTask} from "@/api/bpm/task"; | ||||
| import {getDate} from "@/utils/dateUtils"; | ||||
| import {listSimpleUsers} from "@/api/system/user"; | ||||
| import {getActivityList} from "@/api/bpm/activity"; | ||||
| @@ -232,7 +232,13 @@ export default { | ||||
|       this.auditForms = []; | ||||
|       getTaskListByProcessInstanceId(this.id).then(response => { | ||||
|         // 审批记录 | ||||
|         this.tasks = response.data; | ||||
|         this.tasks = []; | ||||
|         // 移除已取消的审批 | ||||
|         response.data.forEach(task => { | ||||
|           if (task.result !== 4) { | ||||
|             this.tasks.push(task); | ||||
|           } | ||||
|         }); | ||||
|         // 排序,将未完成的排在前面,已完成的排在后面; | ||||
|         this.tasks.sort((a, b) => { | ||||
|           // 有已完成的情况,按照完成时间倒序 | ||||
| @@ -407,6 +413,15 @@ export default { | ||||
|     /** 处理审批退回的操作 */ | ||||
|     handleBack(task) { | ||||
|       this.$modal.msgError("暂不支持【退回】功能!"); | ||||
|       // 可参考 http://blog.wya1.com/article/636697030/details/7296 | ||||
|       // const data = { | ||||
|       //   id: task.id, | ||||
|       //   assigneeUserId: 1 | ||||
|       // } | ||||
|       // backTask(data).then(response => { | ||||
|       //   this.$modal.msgSuccess("回退成功!"); | ||||
|       //   this.getDetail(); // 获得最新详情 | ||||
|       // }); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
|   | ||||
| @@ -53,7 +53,7 @@ | ||||
|             <el-option v-for="item in postOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" /> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item v-if="form.type === 30" label="指定用户" prop="userIds"> | ||||
|         <el-form-item v-if="form.type === 30 || form.type === 31 || form.type === 32" label="指定用户" prop="userIds"> | ||||
|           <el-select v-model="form.userIds" multiple clearable style="width: 100%"> | ||||
|             <el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" /> | ||||
|           </el-select> | ||||
| @@ -215,7 +215,7 @@ export default { | ||||
|         this.form.deptIds.push(...row.options); | ||||
|       } else if (row.type === 22) { | ||||
|         this.form.postIds.push(...row.options); | ||||
|       } else if (row.type === 30) { | ||||
|       } else if (row.type === 30 || row.type === 31 || row.type === 32) { | ||||
|         this.form.userIds.push(...row.options); | ||||
|       } else if (row.type === 40) { | ||||
|         this.form.userGroupIds.push(...row.options); | ||||
| @@ -240,7 +240,7 @@ export default { | ||||
|             form.options = form.deptIds; | ||||
|           } else if (form.type === 22) { | ||||
|             form.options = form.postIds; | ||||
|           } else if (form.type === 30) { | ||||
|           } else if (form.type === 30 || form.type === 31 || form.type === 32) { | ||||
|             form.options = form.userIds; | ||||
|           } else if (form.type === 40) { | ||||
|             form.options = form.userGroupIds; | ||||
| @@ -302,7 +302,7 @@ export default { | ||||
|             return postOption.name; | ||||
|           } | ||||
|         } | ||||
|       } else if (type === 30) { | ||||
|       } else if (type === 30 || type === 31 || type === 32) { | ||||
|         for (const userOption of this.userOptions) { | ||||
|           if (userOption.id === option) { | ||||
|             return userOption.nickname; | ||||
|   | ||||
| @@ -31,7 +31,7 @@ | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                   <td><div class="cell">AOF是否开启</div></td> | ||||
|                   <td><div class="cell" v-if="cache.info">{{ cache.info.aof_enabled == "0" ? "否" : "是" }}</div></td> | ||||
|                   <td><div class="cell" v-if="cache.info">{{ cache.info.aof_enabled === "0" ? "否" : "是" }}</div></td> | ||||
|                   <td><div class="cell">RDB是否成功</div></td> | ||||
|                   <td><div class="cell" v-if="cache.info">{{ cache.info.rdb_last_bgsave_status }}</div></td> | ||||
|                   <td><div class="cell">Key数量</div></td> | ||||
| @@ -66,33 +66,81 @@ | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|  | ||||
|     <el-table | ||||
|         v-loading="keyListLoad" | ||||
|         :data="keyList" | ||||
|         row-key="id" | ||||
|     > | ||||
|     <el-table v-loading="keyDefineListLoad" :data="keyDefineList" row-key="id" @row-click="openKeyTemplate"> | ||||
|       <el-table-column prop="keyTemplate" label="Key 模板" width="200" /> | ||||
|       <el-table-column prop="keyType" label="Key 类型" width="100" /> | ||||
|       <el-table-column prop="valueType" label="Value 类型" /> | ||||
|       <el-table-column prop="timeoutType" label="超时时间" width="200"> | ||||
|         <template slot-scope="scope"> | ||||
|           <dict-tag :type="DICT_TYPE.INFRA_REDIS_TIMEOUT_TYPE" :value="scope.row.timeoutType" /> | ||||
|           <span v-if="scope.row.timeout > 0">({{ scope.row.timeout / 1000 }} 秒)</span> | ||||
|           <dict-tag | ||||
|             :type="DICT_TYPE.INFRA_REDIS_TIMEOUT_TYPE" | ||||
|             :value="scope.row.timeoutType" | ||||
|           /> | ||||
|           <span v-if="scope.row.timeout > 0" | ||||
|             >({{ scope.row.timeout / 1000 }} 秒)</span | ||||
|           > | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column prop="memo" label="备注" /> | ||||
|     </el-table> | ||||
|   </div> | ||||
|  | ||||
|     <!-- 缓存模块信息框 --> | ||||
|     <el-dialog :title="keyTemplate + ' 模板'" :visible.sync="open" width="70vw" append-to-body> | ||||
|       <el-row :gutter="10"> | ||||
|         <el-col :span="14" class="card-box"> | ||||
|           <el-card style="height: 70vh; overflow: scroll"> | ||||
|             <div slot="header"> | ||||
|               <span>键名列表</span> | ||||
|               <el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-refresh-right" @click="refreshKeys" /> | ||||
|             </div> | ||||
|             <el-table :data="cacheKeys" style="width: 100%" @row-click="handleKeyValue"> | ||||
|               <el-table-column label="缓存键名" align="center" :show-overflow-tooltip="true"> | ||||
|                 <template slot-scope="scope">{{ scope.row }}</template> | ||||
|               </el-table-column> | ||||
|               <el-table-column label="操作" width="60" align="center" class-name="small-padding fixed-width"> | ||||
|                 <template slot-scope="scope"> | ||||
|                   <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteKey(scope.row)" /> | ||||
|                 </template> | ||||
|               </el-table-column> | ||||
|             </el-table> | ||||
|           </el-card> | ||||
|         </el-col> | ||||
|  | ||||
|         <el-col :span="10"> | ||||
|           <el-card :bordered="false" style="height: 70vh"> | ||||
|             <div slot="header"> | ||||
|               <span>缓存内容</span> | ||||
|               <el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-refresh-right" | ||||
|                          @click="handleDeleteKeys(keyTemplate)">清理全部</el-button> | ||||
|             </div> | ||||
|           <el-form :model="cacheForm"> | ||||
|             <el-row :gutter="32"> | ||||
|               <el-col :offset="1" :span="22"> | ||||
|                 <el-form-item label="缓存键名:" prop="key"> | ||||
|                   <el-input v-model="cacheForm.key" :readOnly="true" /> | ||||
|                 </el-form-item> | ||||
|                 </el-col> | ||||
|                 <el-col :offset="1" :span="22"> | ||||
|                   <el-form-item label="缓存内容:" prop="value"> | ||||
|                     <el-input v-model="cacheForm.value" type="textarea" :rows="12" :readOnly="true"/> | ||||
|                   </el-form-item> | ||||
|                 </el-col> | ||||
|               </el-row> | ||||
|             </el-form> | ||||
|           </el-card> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|     </el-dialog> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { getCache, getKeyList } from "@/api/infra/redis"; | ||||
| import {getCache, getKeyDefineList, getKeyList, getKeyValue, deleteKey, deleteKeys} from "@/api/infra/redis"; | ||||
| import echarts from "echarts"; | ||||
|  | ||||
| export default { | ||||
|   name: "Server", | ||||
|   data() { | ||||
|   data () { | ||||
|     return { | ||||
|       // 统计命令信息 | ||||
|       commandstats: null, | ||||
| @@ -101,17 +149,22 @@ export default { | ||||
|       // cache 信息 | ||||
|       cache: [], | ||||
|       // key 列表 | ||||
|       keyListLoad: true, | ||||
|       keyList: [], | ||||
|       keyDefineListLoad: true, | ||||
|       keyDefineList: [], | ||||
|       // 模块弹出框 | ||||
|       open: false, | ||||
|       keyTemplate: "", | ||||
|       cacheKeys: [], | ||||
|       cacheForm: {} | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
|   created () { | ||||
|     this.getList(); | ||||
|     this.openLoading(); | ||||
|   }, | ||||
|   methods: { | ||||
|     /** 查缓存询信息 */ | ||||
|     getList() { | ||||
|     getList () { | ||||
|       // 查询 Redis 监控信息 | ||||
|       getCache().then((response) => { | ||||
|         this.cache = response.data; | ||||
| @@ -169,15 +222,59 @@ export default { | ||||
|       }); | ||||
|  | ||||
|       // 查询 Redis Key 列表 | ||||
|       getKeyList().then(response => { | ||||
|         this.keyList = response.data; | ||||
|         this.keyListLoad = false; | ||||
|       getKeyDefineList().then(response => { | ||||
|         this.keyDefineList = response.data; | ||||
|         this.keyDefineListLoad = false; | ||||
|       }); | ||||
|     }, | ||||
|  | ||||
|     // 打开加载层 | ||||
|     openLoading() { | ||||
|     openLoading () { | ||||
|       this.$modal.loading("正在加载缓存监控数据,请稍后!"); | ||||
|     }, | ||||
|  | ||||
|     // 打开缓存弹窗 | ||||
|     openKeyTemplate (keyDefine) { | ||||
|       this.open = true; | ||||
|       // 加载键名列表 | ||||
|       this.keyTemplate = keyDefine.keyTemplate; | ||||
|       this.doGetKeyList(this.keyTemplate); | ||||
|     }, | ||||
|  | ||||
|     // 获取键名列表 | ||||
|     doGetKeyList (keyTemplate) { | ||||
|       getKeyList(keyTemplate).then(response => { | ||||
|         this.cacheKeys = response.data | ||||
|         this.cacheForm = {} | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     // 获取缓存值 | ||||
|     handleKeyValue (key) { | ||||
|       getKeyValue(key).then(response => { | ||||
|         this.cacheForm = response.data | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     // 刷新键名列表 | ||||
|     refreshKeys() { | ||||
|       this.$modal.msgSuccess("刷新键名列表成功"); | ||||
|       this.doGetKeyList(this.keyTemplate); | ||||
|     }, | ||||
|  | ||||
|     // 删除缓存 | ||||
|     handleDeleteKey(key){ | ||||
|       deleteKey(key).then(response => { | ||||
|         this.$modal.msgSuccess("清理缓存键名[" + key + "]成功"); | ||||
|         this.doGetKeyList(this.keyTemplate); | ||||
|       }) | ||||
|     }, | ||||
|     handleDeleteKeys(keyTemplate){ | ||||
|       deleteKeys(keyTemplate).then(response => { | ||||
|         this.$modal.msgSuccess("清空[" + keyTemplate + "]成功"); | ||||
|         this.doGetKeyList(this.keyTemplate); | ||||
|       }) | ||||
|     }, | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jiangqiang
					jiangqiang