|
@@ -30,9 +30,9 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="group_header_nameOperate">
|
|
|
- <LeIcon class="text-lg" icon-class="icon-processInfo-mage--edit" @click="editFlowGroup('edit', item, index)"/>
|
|
|
+ <LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="editFlowGroup('edit', item, index)" />
|
|
|
<el-tooltip effect="dark" content="删除" placement="top">
|
|
|
- <LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="deleteFlowGroup(item)"/>
|
|
|
+ <LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="deleteFlowGroup(item)" />
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -87,38 +87,38 @@
|
|
|
<el-tooltip effect="dark" content="版本控制" placement="top">
|
|
|
<LeIcon
|
|
|
v-if="element.processVersion > 1"
|
|
|
- class="text-lg ml-2"
|
|
|
+ class="text-lg ml-2 text-icon-color"
|
|
|
icon-class="icon-processInfo-hugeicons--git-merge"
|
|
|
@click="historyEv(element)"
|
|
|
/>
|
|
|
</el-tooltip>
|
|
|
|
|
|
<el-tooltip effect="dark" content="编辑" placement="top">
|
|
|
- <LeIcon class="text-lg ml-2" icon-class="icon-processInfo-mage--edit" @click="updateEv(element)" />
|
|
|
+ <LeIcon class="text-lg ml-2 text-icon-color" icon-class="icon-processInfo-mage--edit" @click="updateEv(element)" />
|
|
|
</el-tooltip>
|
|
|
|
|
|
- <el-popconfirm title="确定复制 ?" @confirm="copyEv(element.processId)">
|
|
|
- <template #reference>
|
|
|
- <LeIcon class="text-lg ml-2" icon-class="icon-processInfo-lucide--copy" />
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
+ <el-tooltip content="复制" placement="top" effect="dark">
|
|
|
+ <LeIcon class="text-lg ml-2 text-icon-color" icon-class="icon-processInfo-lucide--copy" @click="copyEv(element)" />
|
|
|
+ </el-tooltip>
|
|
|
|
|
|
<el-tooltip v-if="element.processState === 1" effect="dark" content="禁用" placement="top">
|
|
|
<LeIcon
|
|
|
- class="text-lg ml-2"
|
|
|
+ class="text-lg ml-2 text-icon-color"
|
|
|
icon-class="icon-processInfo-solar--forbidden-circle-broken"
|
|
|
@click="enabledEv(element.processId, 0)"
|
|
|
/>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip v-if="element.processState === 0" effect="dark" content="启用" placement="top">
|
|
|
- <LeIcon class="text-lg ml-2" icon-class="icon-processInfo-heroicons--lock-open" @click="enabledEv(element.processId, 1)" />
|
|
|
+ <LeIcon
|
|
|
+ class="text-lg ml-2 text-icon-color"
|
|
|
+ icon-class="icon-processInfo-heroicons--lock-open"
|
|
|
+ @click="enabledEv(element.processId, 1)"
|
|
|
+ />
|
|
|
</el-tooltip>
|
|
|
|
|
|
- <el-popconfirm title="确定删除 ?" @confirm="stopEv(element.processId)">
|
|
|
- <template #reference>
|
|
|
- <LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" />
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
+ <el-tooltip content="删除" placement="top" effect="dark">
|
|
|
+ <LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="stopEv(element)" />
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -274,9 +274,15 @@ const editFlowGroup = async (type, item, idx) => {
|
|
|
}
|
|
|
|
|
|
// 删除
|
|
|
-const stopEv = async (id: any) => {
|
|
|
- await process.progressDeleteApi({ id })
|
|
|
- flowGroupListAll()
|
|
|
+const stopEv = (ele: any) => {
|
|
|
+ ElMessageBox.confirm(`确认删除「${ele.processName}」流程?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'error'
|
|
|
+ }).then(async () => {
|
|
|
+ await process.progressDeleteApi({ id: ele.processId })
|
|
|
+ flowGroupListAll()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -287,19 +293,29 @@ const stopEv = async (id: any) => {
|
|
|
* @returns 无返回值,执行异步操作
|
|
|
*/
|
|
|
const enabledEv = async (id: any, state: number) => {
|
|
|
- await process.processUpdateStateApi({ id, state: state })
|
|
|
- flowGroupListAll()
|
|
|
+ try {
|
|
|
+ await process.processUpdateStateApi({ id, state: state })
|
|
|
+ ElMessage.success('操作成功')
|
|
|
+ flowGroupListAll()
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 复制事件处理函数
|
|
|
*
|
|
|
- * @param id 要复制的元素的ID
|
|
|
* @returns 无返回值,执行异步操作
|
|
|
*/
|
|
|
-const copyEv = async (id: any) => {
|
|
|
- await process.progressCloneApi({ id })
|
|
|
- flowGroupListAll()
|
|
|
+const copyEv = (ele: any) => {
|
|
|
+ ElMessageBox.confirm(`您即将复制「${ele.processName}」流程,是否确认?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'info'
|
|
|
+ }).then(async () => {
|
|
|
+ await process.progressCloneApi({ id: ele.processId })
|
|
|
+ flowGroupListAll()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 修改
|