2545307760@qq.com 1 vuosi sitten
vanhempi
commit
ec995c63d5

+ 9 - 0
web/src/api/node.js

@@ -15,6 +15,15 @@ export const getApproverNode = (params) => {
     params
   })
 }
+
+// 查询节点列表
+export const getNodeList = (data) => {
+  return service({
+    url: '/node/queryNodeList',
+    method: 'POST',
+    data
+  })
+}
 // 新增节点
 export const postNode = (data) => {
   return service({

+ 134 - 0
web/src/view/approve/flowManage/flowManage.vue

@@ -0,0 +1,134 @@
+<template>
+  <div>
+    <el-drawer
+      v-model="nodeManageShow"
+      title="节点管理"
+    />
+    <el-row>
+      <el-col
+        :span="23"
+        :offset="1"
+      >
+        <el-form :inline="true">
+          <el-form-item label="审批人:">
+            <el-select
+              v-model="approverValue"
+              placeholder="请选择审核人员"
+              filterable
+              clearable
+              @click="changeApprover"
+              @clear="clearApprover"
+            >
+              <el-option
+                v-for="item in approverList"
+                :key="item.ID"
+                :label="item.user.nickName"
+                :value="item.ID"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="queryApproverNode">查询</el-button>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="createNode">新增</el-button>
+          </el-form-item>
+        </el-form>
+      </el-col>
+    </el-row>
+    <el-row style="margin-top: 40px">
+      <el-col :span="24">
+        <el-table />
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup>
+import { reactive, onMounted, ref } from 'vue'
+import { getApprovePerson } from '@/api/approver'
+import { getApproverNode, getNodeList, postNode } from '@/api/node'
+
+defineOptions({
+  name: 'FlowManage'
+})
+
+onMounted(() => {
+  queryApprover()
+  queryNodeList()
+})
+// 节点列表
+const nodeList = reactive([])
+
+// 按审核人查询节点
+const condition = reactive({
+  approverId: 0
+})
+const approverValue = ref('')
+
+const changeApprover = (val) => {
+  condition.approverId = val
+  approverList.forEach(item => {
+    if (item.ID === val) {
+      approverValue.value = item.user.nickName
+    }
+  })
+}
+const clearApprover = () => {
+  condition.approverId = 0
+  approverValue.value = ''
+}
+const queryApproverNode = () => {
+  getApproverNode(condition).then(res => {
+    if (res.code === 0) {
+      console.log(res)
+    }
+  })
+}
+
+// 查询节点列表
+const nodeListCondition = reactive({
+  page: 0,
+  pageSize: 0
+})
+const queryNodeList = () => {
+  getNodeList(nodeListCondition).then(res => {
+    if (res.code === 0) {
+      console.log('节点列表', res.data)
+      nodeList.length = 0
+      nodeList.push(...res.data)
+    }
+  })
+}
+
+// 审核人列表
+const approverList = reactive([])
+const queryApprover = () => {
+  getApprovePerson().then(res => {
+    if (res.code === 0) {
+      approverList.length = 0
+      approverList.push(...res.data)
+    }
+  })
+}
+
+// 新增节点
+const createNodeData = reactive({
+  nodeName: '',
+  approverId: '',
+  nodeOrder: '',
+  nodeDescription: ''
+})
+const createNode = () => {
+  postNode(createNodeData).then(res => {
+    if (res.code === 0) {
+      console.log(res.data)
+    }
+  })
+}
+
+</script>
+
+<style scoped>
+
+</style>

+ 31 - 31
web/src/view/projectManage/projectApproval/projectApproval.vue

@@ -407,37 +407,37 @@ const previousPage = () => {
   infoSteps.value -= 1
 }
 const nextPage = () => {
-  if (infoSteps.value === 0) {
-    const home = {
-      name: condition.name,
-      address: condition.address,
-      firstPrincipal: condition.firstPrincipal,
-      firstPhone: condition.firstPhone
-    }
-    for (const item in home) {
-      if (home[item] === '') {
-        ElMessage.error('请将甲方信息填写完整')
-        return
-      }
-    }
-    infoSteps.value += 1
-  } else if (infoSteps.value === 1) {
-    const second = {
-      projectPrice: condition.projectPrice,
-      secondPrincipal: condition.secondPrincipal,
-      signTime: condition.signTime,
-      intoConstructionTime: condition.intoConstructionTime,
-      completedTime: condition.completedTime,
-      illustrate: condition.illustrate
-    }
-    for (const item in second) {
-      if (second[item] === '' || second[item] === 0) {
-        ElMessage.error('请将乙方信息填写完整')
-        return
-      }
-    }
-    infoSteps.value += 1
-  }
+  // if (infoSteps.value === 0) {
+  //   const home = {
+  //     name: condition.name,
+  //     address: condition.address,
+  //     firstPrincipal: condition.firstPrincipal,
+  //     firstPhone: condition.firstPhone
+  //   }
+  //   for (const item in home) {
+  //     if (home[item] === '') {
+  //       ElMessage.error('请将甲方信息填写完整')
+  //       return
+  //     }
+  //   }
+  //   infoSteps.value += 1
+  // } else if (infoSteps.value === 1) {
+  //   const second = {
+  //     projectPrice: condition.projectPrice,
+  //     secondPrincipal: condition.secondPrincipal,
+  //     signTime: condition.signTime,
+  //     intoConstructionTime: condition.intoConstructionTime,
+  //     completedTime: condition.completedTime,
+  //     illustrate: condition.illustrate
+  //   }
+  //   for (const item in second) {
+  //     if (second[item] === '' || second[item] === 0) {
+  //       ElMessage.error('请将乙方信息填写完整')
+  //       return
+  //     }
+  //   }
+  // }
+  infoSteps.value += 1
 }
 
 // 附属文件