|
158 | 158 | link
|
159 | 159 | type="primary"
|
160 | 160 | @click="openModelForm('update', scope.row.id)"
|
161 |
| - v-hasPermi="['bpm:model:update']" |
| 161 | + v-if="hasPermiUpdate" |
162 | 162 | :disabled="!isManagerUser(scope.row)"
|
163 | 163 | >
|
164 | 164 | 修改
|
|
167 | 167 | link
|
168 | 168 | type="primary"
|
169 | 169 | @click="openModelForm('copy', scope.row.id)"
|
170 |
| - v-hasPermi="['bpm:model:update']" |
| 170 | + v-if="hasPermiUpdate" |
171 | 171 | :disabled="!isManagerUser(scope.row)"
|
172 | 172 | >
|
173 | 173 | 复制
|
|
177 | 177 | class="!ml-5px"
|
178 | 178 | type="primary"
|
179 | 179 | @click="handleDeploy(scope.row)"
|
180 |
| - v-hasPermi="['bpm:model:deploy']" |
| 180 | + v-if="hasPermiDeploy" |
181 | 181 | :disabled="!isManagerUser(scope.row)"
|
182 | 182 | >
|
183 | 183 | 发布
|
184 | 184 | </el-button>
|
185 | 185 | <el-dropdown
|
186 | 186 | class="!align-middle ml-5px"
|
187 | 187 | @command="(command) => handleModelCommand(command, scope.row)"
|
188 |
| - v-hasPermi="['bpm:process-definition:query', 'bpm:model:update', 'bpm:model:delete']" |
| 188 | + v-if="hasPermiMore" |
189 | 189 | >
|
190 | 190 | <el-button type="primary" link>更多</el-button>
|
191 | 191 | <template #dropdown>
|
192 | 192 | <el-dropdown-menu>
|
193 | 193 | <el-dropdown-item
|
194 | 194 | command="handleDefinitionList"
|
195 |
| - v-if="checkPermi(['bpm:process-definition:query'])" |
| 195 | + v-if="hasPermiPdQuery" |
196 | 196 | >
|
197 | 197 | 历史
|
198 | 198 | </el-dropdown-item>
|
199 | 199 | <el-dropdown-item
|
200 | 200 | command="handleChangeState"
|
201 |
| - v-if="checkPermi(['bpm:model:update']) && scope.row.processDefinition" |
| 201 | + v-if="hasPermiUpdate && scope.row.processDefinition" |
202 | 202 | :disabled="!isManagerUser(scope.row)"
|
203 | 203 | >
|
204 | 204 | {{ scope.row.processDefinition.suspensionState === 1 ? '停用' : '启用' }}
|
205 | 205 | </el-dropdown-item>
|
206 | 206 | <el-dropdown-item
|
207 | 207 | type="danger"
|
208 | 208 | command="handleDelete"
|
209 |
| - v-if="checkPermi(['bpm:model:delete'])" |
| 209 | + v-if="hasPermiDelete" |
210 | 210 | :disabled="!isManagerUser(scope.row)"
|
211 | 211 | >
|
212 | 212 | 删除
|
@@ -274,6 +274,23 @@ const originalData: any = ref([]) // 原始数据
|
274 | 274 | const modelList: any = ref([]) // 模型列表
|
275 | 275 | const isExpand = ref(false) // 是否处于展开状态
|
276 | 276 |
|
| 277 | +const hasPermiUpdate = computed(() => { |
| 278 | + return checkPermi(['bpm:model:update']) |
| 279 | +}) |
| 280 | +const hasPermiDelete = computed(() => { |
| 281 | + return checkPermi(['bpm:model:delete']) |
| 282 | +}) |
| 283 | +const hasPermiDeploy = computed(() => { |
| 284 | + return checkPermi(['bpm:model:deploy']) |
| 285 | +}) |
| 286 | +const hasPermiMore = computed(() => { |
| 287 | + return checkPermi(['bpm:process-definition:query', 'bpm:model:update', 'bpm:model:delete']) |
| 288 | +}) |
| 289 | +const hasPermiPdQuery = computed(() => { |
| 290 | + return checkPermi(['bpm:process-definition:query']) |
| 291 | +}) |
| 292 | +
|
| 293 | +
|
277 | 294 | /** '更多'操作按钮 */
|
278 | 295 | const handleModelCommand = (command: string, row: any) => {
|
279 | 296 | switch (command) {
|
|
0 commit comments