|
@@ -146,20 +146,33 @@
|
|
|
style="margin-top: 20px"
|
|
style="margin-top: 20px"
|
|
|
justify="end"
|
|
justify="end"
|
|
|
>
|
|
>
|
|
|
- <el-col :span="4">
|
|
|
|
|
|
|
+ <el-col
|
|
|
|
|
+ :span="4"
|
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
|
+ >
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="Notebook"
|
|
icon="Notebook"
|
|
|
@click="openEffectDialog"
|
|
@click="openEffectDialog"
|
|
|
>效果图</el-button>
|
|
>效果图</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="4">
|
|
|
|
|
|
|
+ <el-col
|
|
|
|
|
+ :span="4"
|
|
|
|
|
+ style="margin-right: 20px"
|
|
|
|
|
+ >
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="Plus"
|
|
icon="Plus"
|
|
|
@click="openProcessNodeDialog()"
|
|
@click="openProcessNodeDialog()"
|
|
|
>添加节点</el-button>
|
|
>添加节点</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="Delete"
|
|
|
|
|
+ @click="deleteProcessNode()"
|
|
|
|
|
+ >删除节点</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px">
|
|
<el-row style="margin-top: 20px">
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -183,19 +196,6 @@
|
|
|
align="center"
|
|
align="center"
|
|
|
prop="nodeHead"
|
|
prop="nodeHead"
|
|
|
/>
|
|
/>
|
|
|
- <el-table-column
|
|
|
|
|
- label="操作"
|
|
|
|
|
- align="center"
|
|
|
|
|
- >
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <el-button
|
|
|
|
|
- icon="Delete"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- text
|
|
|
|
|
- @click="deleteProcessNode(scope.row)"
|
|
|
|
|
- >删除</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -234,16 +234,6 @@
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="节点顺序:">
|
|
|
|
|
- <el-select v-model="addProcessNodeData.nodeOrder">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="(item,index) in orderList"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :label="item"
|
|
|
|
|
- :value="item"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<el-button
|
|
<el-button
|
|
@@ -369,7 +359,6 @@ const openAddDrawer = () => {
|
|
|
// 为流程添加、编辑节点
|
|
// 为流程添加、编辑节点
|
|
|
const processNodeDialog = ref(false)
|
|
const processNodeDialog = ref(false)
|
|
|
const processNodeTitle = ref('新增流程节点')
|
|
const processNodeTitle = ref('新增流程节点')
|
|
|
-const orderList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
|
|
|
|
const processType = [{ id: 1, value: '立项' }, { id: 2, value: '费用' }]
|
|
const processType = [{ id: 1, value: '立项' }, { id: 2, value: '费用' }]
|
|
|
const addProcessNodeData = reactive({
|
|
const addProcessNodeData = reactive({
|
|
|
nodeId: 0,
|
|
nodeId: 0,
|
|
@@ -396,16 +385,37 @@ const changeNodeName = (val) => {
|
|
|
const addProcessNodes = () => {
|
|
const addProcessNodes = () => {
|
|
|
const obj = {}
|
|
const obj = {}
|
|
|
Object.assign(obj, addProcessNodeData)
|
|
Object.assign(obj, addProcessNodeData)
|
|
|
|
|
+ const list = intermediary.value
|
|
|
|
|
+ for (const i in list) {
|
|
|
|
|
+ if (list[i].nodeName === obj.nodeName) {
|
|
|
|
|
+ ElMessage.error('流程中存在相同的节点名称')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ obj.nodeOrder = intermediary.value.length + 1
|
|
|
intermediary.value.push(obj)
|
|
intermediary.value.push(obj)
|
|
|
processActive.value = intermediary.value.length
|
|
processActive.value = intermediary.value.length
|
|
|
processNodeDialog.value = false
|
|
processNodeDialog.value = false
|
|
|
}
|
|
}
|
|
|
-const deleteProcessNode = (row) => {
|
|
|
|
|
- intermediary.value.forEach((item, index) => {
|
|
|
|
|
- if (row.nodeId === item.nodeId) {
|
|
|
|
|
- intermediary.value.splice(index, 1)
|
|
|
|
|
|
|
+const deleteProcessNode = () => {
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
|
+ '确定要删除节点吗?',
|
|
|
|
|
+ '删除流程',
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: '删除',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning',
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ intermediary.value = []
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '取消删除',
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 编辑流程
|
|
// 编辑流程
|