From cfd88cf203eeb8e739afc89724ed93ba33729419 Mon Sep 17 00:00:00 2001
From: zhangxp <zhangxp@chicecm.com>
Date: 星期三, 14 六月 2023 18:20:19 +0800
Subject: [PATCH] 人员设置

---
 Source/UBCS-WEB/src/components/template/FlowPath.vue     |   14 ++
 Source/UBCS-WEB/src/api/template/setPersonnel.js         |   35 ++++++++
 Source/UBCS-WEB/src/components/template/SetPersonnel.vue |  126 +++++++++++++++++++++++++++++++
 Source/UBCS-WEB/src/views/flow/flowPath.vue              |   61 +--------------
 4 files changed, 177 insertions(+), 59 deletions(-)

diff --git a/Source/UBCS-WEB/src/api/template/setPersonnel.js b/Source/UBCS-WEB/src/api/template/setPersonnel.js
new file mode 100644
index 0000000..ad7aa8b
--- /dev/null
+++ b/Source/UBCS-WEB/src/api/template/setPersonnel.js
@@ -0,0 +1,35 @@
+import request from '@/router/axios';
+
+// 浜哄憳璁剧疆鍒濆鍖�
+export const personnelInit = (params) => {
+  return request({
+    url: '/api/ubcs-flow/taskUser/list',
+    method: 'get',
+    params: params
+  })
+}
+// 浜哄憳璁剧疆鏀惰棌
+export const personnelCollect = (params) => {
+  return request({
+    url: '/api/ubcs-flow/taskUser/su',
+    method: 'get',
+    params: params
+  })
+}
+// 浜哄憳璁剧疆鍙栨秷鏀惰棌
+export const cancelCollect = (params) => {
+  return request({
+    url: '/api/ubcs-flow/taskUser/du',
+    method: 'get',
+    params: params
+  })
+}
+// 浜哄憳璁剧疆淇濆瓨
+export const personnelSave = (params) => {
+  return request({
+    url: '/api/',
+    method: 'post',
+    data: params
+  })
+}
+
diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue
index 3081958..24ccf03 100644
--- a/Source/UBCS-WEB/src/components/template/FlowPath.vue
+++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -48,6 +48,7 @@
                     {
                         label: '妯℃澘key',
                         prop: 'modelKey',
+                        width:120,
                         sortable: true,
                         type: 'tree',
                         dicData: [],
@@ -69,19 +70,26 @@
                         label: '妯℃澘鍚嶇О',
                         prop: 'modelName',
                         sortable: true,
+                        width:220,
                         addDisabled: true,
                         editDisabled: true,
                     },
                     {
-                        label: '娴佺▼妯℃澘鐢ㄩ��',
+                        label: '妯℃澘鐢ㄩ��',
                         prop: 'buttonTypeKey',
                         type: 'tree',
+                        width:120,
                         dicUrl: '/api/ubcs-flow/processTS/tt',
                         dicMethod: 'post',
                         props: {
                             value: "codee",
                             label: "namee",
                         },
+                    },
+                    {
+                        label: '妯℃澘鎻忚堪',
+                        prop: 'description',
+                        type:'textarea'
                     },
                 ]
             },
@@ -138,8 +146,8 @@
         // 缂栬緫
         async handleEdit(row, index, done, loading) {
             console.log(row)
-            const { modelName, modelKey, buttonTypeKey, id } = row
-            let param = { modelName, modelKey, buttonTypeKey, id }
+            const { modelName, modelKey, buttonTypeKey, id ,description} = row
+            let param = { modelName, modelKey, buttonTypeKey, id,description }
             const response = await flowpathSave({ ...param, ...{ templateId: this.code } })
             if (response.status === 200) {
                 loading()
diff --git a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue
new file mode 100644
index 0000000..beb1801
--- /dev/null
+++ b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue
@@ -0,0 +1,126 @@
+<template>
+    <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" width="30%">
+        <el-tag v-for="tag in tags" :key="tag" closable effect="dark" @click="handleClickTag(tag)"
+            @close="handleCloseTag(tag)">
+            <span> {{ tag }}</span>
+        </el-tag>
+        <el-divider></el-divider>
+        <el-form :model="formInline" class="demo-form-inline" label-position="left">
+            <el-form-item :label="item.taskName" v-for="(item,index) in initFrom" :key="index">
+                <el-select v-model="formInline[index].userId" :placeholder="item.taskName">
+                    <el-option label="鍖哄煙涓�" value="shanghai"></el-option>
+                    <el-option label="鍖哄煙浜�" value="beijing"></el-option>
+                </el-select>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="handleCancel">鍙� 娑�</el-button>
+            <el-button type="primary" @click="handleConfirm">纭� 瀹�</el-button>
+        </div>
+    </el-dialog>
+</template>
+<script>
+import { personnelInit, personnelCollect, cancelCollect, personnelSave } from '@/api/template/setPersonnel.js'
+export default {
+    name: 'SetPersonnel',
+    props: {
+        // 鏄惁鎵撳紑
+        visible: {
+            typeof: Boolean,
+            default: false
+        },
+        title: {
+            typeof: String,
+            default: '浜哄憳璁剧疆'
+        },
+        code:{
+            typeof: String,
+            default: ''
+        }
+    },
+    watch: {
+        visible(n) {
+            this.dialogVisible = n;
+        },
+        dialogVisible(n) {
+            this.$emit('update:visible', n)
+        },
+    },
+    data() {
+        return {
+            dialogVisible: this.visible,
+            initFrom: [],
+            tags: ['鏍囩1', '鏍囩2', '鏍囩3', '鏍囩4'],
+            formInline: []
+
+        }
+    },
+    mounted() {
+        this.apiInit()
+    },
+    methods: {
+        async apiInit() {
+            const response = await personnelInit({type:'PUBLIC',templateId:'8b5e2017-990f-454a-9c39-4c4eeeb57553'})
+            if (response.status === 200) {
+                console.log(response)
+                this.initFrom = response.data.data.user
+                this.formInline = response.data.data.user
+            }
+        },
+        async apiCollect() {
+            const response = await personnelCollect()
+            if (response.status === 200) {
+                console.log(response)
+            }
+        },
+        async canCollect(id) {
+            const response = await cancelCollect()
+            if (response.status === 200) {
+                console.log(response)
+            }
+        },
+        async apiSave() {
+            const response = await personnelSave()
+            if (response.status === 200) {
+                console.log(response)
+            }
+        },
+        handleClickTag(event) {
+            console.log(event)
+        },
+        handleCloseTag(event) {
+            console.log(event)
+            this.canCollect(event)
+        },
+        done() {
+            this.dialogVisible = false
+        },
+        handleCancel() {
+            this.done()
+        },
+        handleConfirm() {
+            // this.done()
+            console.log(this.formInline)
+        }
+    }
+}
+</script>
+<style lang="scss">
+.el-tag+.el-tag {
+    margin-left: 10px;
+}
+
+.button-new-tag {
+    margin-left: 10px;
+    height: 32px;
+    line-height: 30px;
+    padding-top: 0;
+    padding-bottom: 0;
+}
+
+.input-new-tag {
+    width: 90px;
+    margin-left: 10px;
+    vertical-align: bottom;
+}
+</style>
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/views/flow/flowPath.vue b/Source/UBCS-WEB/src/views/flow/flowPath.vue
index e14690f..15db06e 100644
--- a/Source/UBCS-WEB/src/views/flow/flowPath.vue
+++ b/Source/UBCS-WEB/src/views/flow/flowPath.vue
@@ -1,72 +1,24 @@
 <template>
     <div>
         <el-button @click="outerVisible = true">娴佺▼娴嬭瘯</el-button>
-        <el-button @click="visibleStage = true">妯℃澘闃舵</el-button>
-        <el-button @click="handleTable">table绌挎妗�</el-button>
+        <el-button @click="handleTable">浜哄憳璁剧疆</el-button>
         <flow-business :visible.sync="outerVisible"></flow-business>
-        <stage code="8b5e2017-990f-454a-9c39-4c4eeeb57553"></stage>
-        <table-transfer :visible.sync="visibleTable" v-model="value" :dataList="list" :columns="columns" keyName="id"
-            @save="handleSave"></table-transfer>
+       <set-personnel :visible.sync="visibleFlow"></set-personnel>
     </div>
 </template>
 
 <script>
 import FlowBusiness from '@/components/template/Business'
-import FlowPath from '@/components/template/FlowPath'
-import Stage from '@/components/template/Stage'
-import TableTransfer from '@/components/template/TableTransfer'
+import SetPersonnel from '@/components/template/SetPersonnel'
 export default {
     components: {
         FlowBusiness,
-        FlowPath,
-        Stage,
-        TableTransfer
+        SetPersonnel
     },
     data() {
-        const getTables = () => {
-            let data = []
-            for (let i = 0; i < 5; i++) {
-                let item = {
-                    id: `${i + 1}`,
-                    name: 'name',
-                    address: `闆嗗洟鐮�${i + 1}`,
-                    data: '',
-                    checked: i === 1 ? true : false,
-                }
-                data.push(item)
-            }
-            return data
-        }
         return {
-            list: getTables(),
-            value: ['2'],
             outerVisible: false,
             visibleFlow: false,
-            visibleStage: false,
-            visibleTable: false,
-
-            columns: [
-                {
-                    key: "id",
-                    label: "id",
-                    visible: false,
-                },
-                {
-                    key: "name",
-                    label: "灞炴�х紪鍙�",
-                    visible: true,
-                },
-                {
-                    key: "address",
-                    label: "灞炴�у悕绉�",
-                    visible: true,
-                },
-                {
-                    key: "address",
-                    label: "灞炴�у垎缁�",
-                    visible: true,
-                },
-            ],
 
         }
     },
@@ -75,10 +27,7 @@
             console.log(event)
         },
         handleTable(){
-            this.visibleTable = true
-            // this.$nextTick(()=>{
-
-            // })
+            this.visibleFlow = true
         }
     }
 }

--
Gitblit v1.9.3