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 |   86 ++++++++++++++++--------------------------
 1 files changed, 33 insertions(+), 53 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue
index 28885d6..24ccf03 100644
--- a/Source/UBCS-WEB/src/components/template/FlowPath.vue
+++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -1,49 +1,24 @@
 <template>
-    <el-dialog title="妯℃澘娴佺▼" width="90%" append-to-body="true" :visible.sync="dialogVisible">
         <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page"
             :search.sync="search" @on-load="getDataList" @row-save="handleSave" @row-del="handleDelete"
             @row-update="handleEdit" @refresh-change="handleRefresh" @size-change="handleSizePage"
-            @current-change="handleCurrentPage" @selection-change="selectionChange" @row-click="handleRowClick">
-            <template slot="menuLeft">
-                <el-button icon="el-icon-delete" size="small" type="danger" @click="handleDeleteByIds">鍒� 闄�
-                </el-button>
-            </template>
-            <template slot="search" slot-scope="{row,size}">
-                <el-input :placeholder="`璇疯緭鍏�${selectValue === 'id' ? '绯荤粺缂栧彿' : '绯荤粺鍚嶇О'}骞舵寜鍥炶溅鏌ヨ`" :size="size"
-                    style="width:300px;margin-left: 10px;" v-model="search[selectValue]" clearable
-                    @keyup.enter.native="handleEnter" @clear="handleClear"></el-input>
-            </template>
+            @current-change="handleCurrentPage">
         </avue-crud>
-    </el-dialog>
 </template>
 
 <script>
-import { getFlowpathList, getStartList, flowpathSave } from '@/api/template/flowpath.js'
+import { getFlowpathList, getStartList, flowpathSave, flowpathDelete } from '@/api/template/flowpath.js'
 export default {
     name: 'FlowPath',
     props: {
-        // 鏄惁鎵撳紑
-        visible: {
-            typeof: Boolean,
-            default: false
-        },
         code: {
             typeof: String,
             required: true,
             default: ""
         }
     },
-    watch: {
-        visible(n) {
-            this.dialogVisible = n;
-        },
-        dialogVisible(n) {
-            this.$emit('update:visible', n)
-        },
-    },
     data() {
         return {
-            dialogVisible: this.visible,
             loading: false,
             page: {
                 currentPage: 1,
@@ -69,11 +44,11 @@
                     prop: 'id,name,description,version',
                     order: 'descending'
                 },
-                selection: true,
                 column: [
                     {
                         label: '妯℃澘key',
                         prop: 'modelKey',
+                        width:120,
                         sortable: true,
                         type: 'tree',
                         dicData: [],
@@ -89,25 +64,32 @@
                         nodeClick: (data) => {
                             console.log(data)
                             // 鑺傜偣鐐瑰嚮鐨勬椂鍊欎細鑾峰彇鍒版暟鎹�
-                            this.form.modeName = data.name
+                            this.form.modelName = data.name
                         }
                     }, {
                         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'
                     },
                 ]
             },
@@ -136,20 +118,20 @@
             console.log(this.search)
             const { pageSize, currentPage } = this.page
             let param = { size: pageSize, current: currentPage }
-            const response = await getFlowpathList({ ...param, ...this.search })
+            const response = await getFlowpathList({ ...param, ...{ templateId: this.code } })
             if (response.status === 200) {
                 console.log(response)
                 this.loading = false
                 const data = response.data.data
                 this.data = data.records
                 this.page.total = data.total
-            }else this.loading = false
+            } else this.loading = false
         },
         // 鏂板
         async handleSave(row, done, loading) {
             console.log(row)
-            const response = await flowpathSave({...row,...{templateId:this.code}})
-            if(response.status ===200){
+            const response = await flowpathSave({ ...row, ...{ templateId: this.code } })
+            if (response.status === 200) {
                 loading()
                 console.log(response)
                 this.$message({
@@ -164,9 +146,9 @@
         // 缂栬緫
         async handleEdit(row, index, done, loading) {
             console.log(row)
-            const {modelName,modelKey,buttonTypeKey,id} = row
-            let param = {modelName,modelKey,buttonTypeKey,id}
-            const response = await flowpathSave({...param,...{templateId:this.code}})
+            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()
                 this.$message({
@@ -180,20 +162,27 @@
         },
         // 鍒犻櫎鍗曟潯
         handleDelete(row) {
-            const { oid } = row
-        },
-        // 澶氭潯鏁版嵁鍒犻櫎
-        handleDeleteByIds() {
-
+            console.log(row)
+            const { id } = row
+            this.deleteSysInfo({ id: id })
         },
         // 鍒犻櫎鎺ュ彛
         deleteSysInfo(param) {
-            this.$confirm('鏄惁纭畾鍒犻櫎閫夋嫨鐨勯泦鎴愮郴缁�?', '鎻愮ず', {
+            this.$confirm('鏄惁纭畾鍒犻櫎閫夋嫨鐨勬ā鏉挎祦绋�?', '鎻愮ず', {
                 confirmButtonText: '纭畾',
                 cancelButtonText: '鍙栨秷',
                 type: 'warning'
             }).then(async () => {
                 // 鎺ュ彛
+                const response = await flowpathDelete(param)
+                if (response.status === 200) {
+                    console.log(response)
+                    this.$message({
+                        type: 'success',
+                        message: '鍒犻櫎鎴愬姛!'
+                    });
+                    this.getDataList()
+                }
             })
         },
         // enter鎼滅储
@@ -215,15 +204,6 @@
         handleCurrentPage(event) {
             this.page.currentPage = event
         },
-        // 鐐瑰嚮閫夋嫨
-        handleRowClick(row) {
-            this.$refs.crud.toggleRowSelection(row, true)
-        },
-        // 澶氶��
-        selectionChange(list) {
-            console.log(list)
-
-        },
     }
 }
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3