zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<template>
 
      <a-card :bordered="false" title="限额配置" style="min-height: 800px" v-loading="rightLoading">
        <a-table
          :columns="columns"
          :data-source="data"
       
          :expanded-row-keys.sync="expandedRowKeys"
        >
          <span slot="flow" slot-scope="text, record">
 
            <a-input
              style="margin: -5px 0"
              v-model="record.flow"
              :value="text"
              @blur="flowInputBlur( record)"
            />
          </span>
         
        </a-table>
        
      </a-card>
 
</template>
<script>
  import { getAction, postAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
  export default {
    name: 'RoleUserFlow',
    mixins: [JeecgListMixin],
 
    data() {
      return {
        columns: [
          {title: '角色', dataIndex: 'roleName', key: 'roleName'},
          {title: '用户', dataIndex: 'userName', key: 'userName'},
          {title: '日限额(M)', dataIndex: 'flow', key: 'flow', scopedSlots: { customRender: 'flow' }},
         
          ],
        data: [],
 
      expandedRowKeys: [],
        currentDeptId: '',
        iExpandedKeys: [0],
        loading: false,
        rightLoading: false,
        autoExpandParent: true,
        currFlowId: '',
        currFlowName: '',
        disable: true,
        treeData: [],
        visible: false,
        docTree: [],
        rightClickSelectedKey: '',
        hiding: true,
        model: {},
        dropTrigger: '',
        depart: {},
        disableSubmit: false,
        checkedKeys: [],
        selectedKeys: [],
        autoIncr: 1,
        currSelected: {},
        form: this.$form.createForm(this),
        labelCol: {
          xs: {span: 24},
          sm: {span: 5}
        },
        wrapperCol: {
          xs: {span: 24},
          sm: {span: 16}
        },
        graphDatasource: {
          nodes: [],
          edges: []
        },
        userIdentity:"",
      }
    },
    methods: {
 
      loadData() {
        
      },
 
 
      loadPathPrem() {
        this.rightLoading = true
        getAction("/userStorageFlow/queryAll").then( res => {
          console.log("获取权限分配情况res:::", res);
          this.data = res.result;
        this.rightLoading = false
        })
      },
    
 
      flowInputBlur(record){
        console.log("开始保存权限 Record:", record);
        postAction("/userStorageFlow/save",record).then(res => {
          console.log("保存文件权限RES::", res);
          if (res.success) {
 
          } else {
            this.$message.error(res.msg)
            if (type === 1) {
              record.visit = !record.visit
            } else if (type === 2) {
              record.download = !record.download
            } else if (type === 3) {
              record.manage = !record.manage
            }
          }
          this.loadPathPrem()
        })
      }
    },
    created() {
      this.loadPathPrem()
    },
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>