@tongfun/tf-widget 0.1.29 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +4 -0
  2. package/lib/tf-widget.common.js +264 -226
  3. package/lib/tf-widget.css +1 -1
  4. package/lib/tf-widget.umd.js +264 -226
  5. package/lib/tf-widget.umd.min.js +4 -4
  6. package/package.json +1 -1
  7. package/package/svg-icon/index.js +0 -8
  8. package/package/svg-icon/src/SvgIcon.vue +0 -59
  9. package/package/t-data-list/index.js +0 -6
  10. package/package/t-data-list/main.vue +0 -193
  11. package/package/t-data-list/src/condition-input/basic.vue +0 -31
  12. package/package/t-data-list/src/condition-input/date.vue +0 -106
  13. package/package/t-data-list/src/condition-input/index.vue +0 -100
  14. package/package/t-data-list/src/condition-input/input.vue +0 -31
  15. package/package/t-data-list/src/condition-input/number.vue +0 -115
  16. package/package/t-data-list/src/condition-input/select.vue +0 -86
  17. package/package/t-data-list/src/js/fieldTypeEnum.js +0 -10
  18. package/package/t-data-list/src/js/operatorEnum.js +0 -108
  19. package/package/t-data-list/src/js/qureyParamsEnum.js +0 -4
  20. package/package/t-data-list/src/js/util.js +0 -34
  21. package/package/t-data-list/src/mixins/button-controll-mixin.js +0 -93
  22. package/package/t-data-list/src/pushdown/push-down.vue +0 -158
  23. package/package/t-data-list/src/t-list-search.vue +0 -36
  24. package/package/t-data-list/src/t-plan/condition-always-item.vue +0 -143
  25. package/package/t-data-list/src/t-plan/condition-mult-item.vue +0 -222
  26. package/package/t-data-list/src/t-plan/index.vue +0 -195
  27. package/package/t-data-list/src/t-plan/plan-content.vue +0 -389
  28. package/package/t-data-list/src/t-table/index.vue +0 -129
  29. package/package/t-data-list/src/t-table/table-group-item-edit.vue +0 -238
  30. package/package/t-data-list/src/t-table/table-group-item.vue +0 -87
  31. package/package/t-data-list/src/t-table/table-group.vue +0 -180
  32. package/package/t-data-list/src/t-table/table-records-header-popover.vue +0 -246
  33. package/package/t-data-list/src/t-table/table-records-selected.vue +0 -159
  34. package/package/t-data-list/src/t-table/table-records.vue +0 -336
  35. package/package/t-input/children/address.vue +0 -101
  36. package/package/t-input/children/basic-display.vue +0 -41
  37. package/package/t-input/children/basic.vue +0 -261
  38. package/package/t-input/children/date.vue +0 -84
  39. package/package/t-input/children/group-components/group-dialog.vue +0 -344
  40. package/package/t-input/children/group.vue +0 -126
  41. package/package/t-input/children/input.vue +0 -67
  42. package/package/t-input/children/number.vue +0 -71
  43. package/package/t-input/children/select.vue +0 -86
  44. package/package/t-input/children/tfile/fiile-enclosure.vue +0 -233
  45. package/package/t-input/children/tfile/file-img/comp.png +0 -0
  46. package/package/t-input/children/tfile/file-img/excel.png +0 -0
  47. package/package/t-input/children/tfile/file-img/img.png +0 -0
  48. package/package/t-input/children/tfile/file-img/pdf.png +0 -0
  49. package/package/t-input/children/tfile/file-img/word.png +0 -0
  50. package/package/t-input/index.js +0 -7
  51. package/package/t-input/index.vue +0 -337
  52. package/package/t-input/tInputCache.js +0 -24
  53. package/package/tf-icon-picker/README.md +0 -8
  54. package/package/tf-icon-picker/index.js +0 -8
  55. package/package/tf-icon-picker/src/tf-icon-picker.vue +0 -266
  56. package/package/tf-layout/README.md +0 -115
  57. package/package/tf-layout/index.js +0 -8
  58. package/package/tf-layout/src/components/tf-labelbar.vue +0 -394
  59. package/package/tf-layout/src/components/tf-menu.vue +0 -180
  60. package/package/tf-layout/src/components/tf-right-menu.vue +0 -89
  61. package/package/tf-layout/src/components/tf-rotate-box.vue +0 -50
  62. package/package/tf-layout/src/tf-layout.vue +0 -140
  63. package/package/tf-widget/index.js +0 -8
  64. package/package/tf-widget/src/assets/common-input.less +0 -11
  65. package/package/tf-widget/src/children/basic-data/basic-data.vue +0 -366
  66. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +0 -1087
  67. package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +0 -750
  68. package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +0 -519
  69. package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +0 -93
  70. package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +0 -240
  71. package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +0 -108
  72. package/package/tf-widget/src/children/date-time.vue +0 -103
  73. package/package/tf-widget/src/children/date.vue +0 -103
  74. package/package/tf-widget/src/children/decimal.vue +0 -115
  75. package/package/tf-widget/src/children/integer.vue +0 -104
  76. package/package/tf-widget/src/children/property.vue +0 -59
  77. package/package/tf-widget/src/children/single-line-text.vue +0 -82
  78. package/package/tf-widget/src/children/small-pictures.vue +0 -223
  79. package/package/tf-widget/src/children/text-area.vue +0 -74
  80. package/package/tf-widget/src/children/tf-select.vue +0 -113
  81. package/package/tf-widget/src/tf-widget.vue +0 -175
@@ -1,261 +0,0 @@
1
- <template>
2
- <div class="basic-input">
3
- <!-- 输入控件 -->
4
- <el-autocomplete
5
- ref="basic"
6
- v-model="displayValue"
7
- :placeholder="placeholder"
8
- :fetch-suggestions="getAdvice"
9
- :disabled="disabled"
10
- popper-class="basic-suggest-poper"
11
- :trigger-on-focus="false"
12
- @select="handleSelect"
13
- @keydown.delete.native="handleDeleteKeyDown"
14
- >
15
- <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="showDialog" />
16
- <template slot-scope="{item}">
17
- <div>{{ suggestDisplay(item) }}</div>
18
- </template>
19
- </el-autocomplete>
20
-
21
- <!-- 弹窗数据选择器 -->
22
- <el-dialog
23
- :visible.sync="dialogVisible"
24
- width="80%"
25
- :append-to-body="appendToBody"
26
- :close-on-click-modal="false"
27
- :close-on-press-escape="false"
28
- :modal-append-to-body="modalAppendToBody"
29
- >
30
- <!-- {{ limitation }} -->
31
- <div class="dataDialog">
32
- <Ttable
33
- class="t-table"
34
- is-selector
35
- :layout="tableLayout"
36
- :sum="tableSum"
37
- :data="tableData"
38
- enable-group
39
- :page-size="query.pageSize"
40
- :current-page="query.pageNum"
41
- update-in-dialog
42
- @condition-change="handleHeadChange"
43
- @groupChange="handleGroupChange"
44
- @size-change="handleSizeChange"
45
- @current-change="handleCurrentChange"
46
- @fastConfirm="handleFastSelect"
47
- />
48
- </div>
49
- <template v-slot:title>
50
- <div class="common-title">
51
- <TListSearch class="common-table-buttons-search" @search="handleSuggestMultiCondition($event,false)" />
52
- </div>
53
- </template>
54
- <span slot="footer" class="dialog-footer basic-selector-footer">
55
- <el-button class="common-header-button close" size="mini" type="primary" @click="dialogVisible = false">取 消</el-button>
56
- <el-button class="common-header-button" size="mini" type="primary" @click="handleDialogConfirm">确 定</el-button>
57
- </span>
58
- </el-dialog>
59
- </div>
60
- </template>
61
- <script>
62
- import TListSearch from '../../t-data-list/src/t-list-search.vue'
63
- import Ttable from '../../t-data-list/src/t-table/index'
64
- import dataQuery from '../../../src/mixins/t-data-query-mixin.js'
65
- export default {
66
- components: {
67
- TListSearch,
68
- Ttable
69
- },
70
- mixins: [dataQuery],
71
- props: {
72
- value: {
73
- type: Object,
74
- default: () => {
75
- return { name: '', id: null }
76
- }
77
- },
78
- limitation: {
79
- type: Object,
80
- default: () => { }
81
- },
82
- disabled: {
83
- type: Boolean,
84
- default: false
85
- },
86
- appendToBody: {
87
- type: Boolean,
88
- default: true
89
- },
90
- modalAppendToBody: {
91
- type: Boolean,
92
- default: false
93
- }
94
- },
95
- inject: ['target', 'entity', 'placeholder'],
96
- data () {
97
- return {
98
- dialogVisible: false,
99
- // 选中一个基础资料之后,基础资料控件显示的名称
100
- displayField: null,
101
- queryType: 'SELECTOR'
102
- }
103
- },
104
- computed: {
105
- displayValue: {
106
- set (value) {
107
- if (this.value.id) {
108
- return
109
- }
110
- this.value.name = value
111
- },
112
- get () {
113
- if (!this.value) {
114
- return
115
- }
116
- return this.value.name
117
- }
118
- }
119
- },
120
- methods: {
121
- /**
122
- * 弹窗和数据选择
123
- */
124
- // 展开弹窗
125
- async showDialog () {
126
- if (this.disabled) {
127
- return
128
- }
129
- const loading = this.$loading({
130
- lock: true,
131
- text: 'Loading',
132
- spinner: 'el-icon-loading',
133
- background: 'rgba(0, 0, 0, 0.7)'
134
- })
135
- if (!this.tableLayout.length) {
136
- await this.getTableLayout()
137
- }
138
- loading.close()
139
- this.searchSuggestCondition = []
140
- this.getTableData()
141
- this.dialogVisible = true
142
- },
143
- // 点击弹窗确定按钮
144
- handleDialogConfirm () {
145
- if (!this.ids.length) {
146
- this.dialogVisible = false
147
- return
148
- }
149
-
150
- if (!this.entity && this.ids.length > 1) {
151
- return this.$message.error('单据头中只能选择一条数据')
152
- }
153
-
154
- if (!this.entity) {
155
- const name = this.selectedRows[0][this.displayField]
156
- const id = this.ids[0]
157
- this.$emit('input', { name, id })
158
- this.$emit('selected', this.selectedRows)
159
- } else {
160
- this.$emit('selected', this.selectedRows)
161
- }
162
- this.dialogVisible = false
163
- },
164
- // 双击选择数据
165
- handleFastSelect (row) {
166
- this.$emit('input', { name: row[this.displayField], id: row[this.idField] })
167
- this.$emit('selected', [row])
168
- this.dialogVisible = false
169
- },
170
- /**
171
- * 输入框相关逻辑
172
- */
173
- // 删除按键处理函数
174
- handleDeleteKeyDown () {
175
- if (this.value.id) {
176
- this.$emit('input', { name: '', id: null })
177
- this.$emit('delete')
178
- }
179
- },
180
- /**
181
- * 基础资料空间搜索建议
182
- * 在没有打开基础资料弹窗之前,根据用户的输入提供选项
183
- * @param queryString
184
- * @param callback
185
- * @returns {Promise<void>}
186
- */
187
- async getAdvice (queryString, callback) {
188
- !this.tableLayout.length && (await this.getTableLayout())
189
- let record = []
190
- this.handleSuggestMultiCondition(queryString, true)
191
- record = /^\s*$/g.test(queryString)
192
- ? []
193
- : await this.getTableData(true, false)
194
- callback(record)
195
- },
196
- // 搜索建议的显示格式
197
- suggestDisplay (item) {
198
- const valueList = []
199
- for (const fieldObj of this.suggestFieldList) {
200
- valueList.push(item[fieldObj.field])
201
- }
202
- return valueList.join('/')
203
- },
204
- // 搜索建议被选择
205
- handleSelect (item) {
206
- const name = item[this.displayField]
207
- const id = item[this.idField]
208
- this.$emit('input', { name, id })
209
- this.$emit('selected', [item])
210
- }
211
- }
212
- }
213
- </script>
214
-
215
- <style>
216
- .basic-suggest-poper {
217
- width: unset !important;
218
- }
219
- </style>
220
- <style lang="less" scoped>
221
- .el-autocomplete {
222
- ::v-deep .el-input__suffix {
223
- display: flex;
224
- align-items: center;
225
- }
226
- }
227
-
228
- /deep/.t-table {
229
- height: 59vh;
230
- .table-records {
231
- height: 100%;
232
- position: relative;
233
- .plTableBox .elx-table--body-wrapper {
234
- height: calc(59vh - 80px);
235
- overflow-x: scroll;
236
- }
237
- .el-pagination {
238
- right: 0;
239
- }
240
- }
241
- }
242
- /deep/.el-dialog__body {
243
- padding-top: 0;
244
- }
245
-
246
- .basic-selector-footer {
247
- .el-button {
248
- background-color: #0a5194;
249
- border: none;
250
- }
251
- }
252
-
253
- .common-title {
254
- // background-color: pink;
255
- display: flex;
256
- justify-content: right;
257
- .common-table-buttons-search {
258
- margin-right: 50px;
259
- }
260
- }
261
- </style>
@@ -1,84 +0,0 @@
1
- <template>
2
- <el-date-picker
3
- ref="date"
4
- class="date"
5
- :value="value"
6
- :type="type"
7
- :placeholder="placeholderComp"
8
- :disabled="disabled"
9
- :format="timeFormmat"
10
- value-format="yyyy-MM-dd HH:mm:ss"
11
- style="width:100%"
12
- @input="handleInput"
13
- />
14
- </template>
15
- <script>
16
- export default {
17
- components: {
18
-
19
- },
20
- props: {
21
- value: {
22
- type: String,
23
- default: null
24
- },
25
- disabled: {
26
- type: Boolean,
27
- default: false
28
- }
29
- },
30
- inject: ['placeholder', 'datetime', 'entity'],
31
- data () {
32
- return {
33
-
34
- }
35
- },
36
- computed: {
37
- type () {
38
- if (this.datetime) {
39
- return 'datetime'
40
- }
41
- return 'date'
42
- },
43
- timeFormmat () {
44
- if (this.datetime) {
45
- return 'yyyy-MM-dd HH:mm:ss'
46
- }
47
- return 'yyyy-MM-dd'
48
- },
49
- placeholderComp () {
50
- if (!this.placeholder) {
51
- if (this.datetime) {
52
- return '请输入日期时间'
53
- }
54
- return '请输入日期'
55
- }
56
- return this.placeholder
57
- }
58
- },
59
- created () {
60
- if (!this.value) {
61
- this.handleInput(null)
62
- }
63
- },
64
- methods: {
65
- handleInput (value) {
66
- this.$emit('input', value)
67
- }
68
- }
69
- }
70
- </script>
71
-
72
- <style scoped lang='less'>
73
- .date {
74
- ::v-deep .el-icon-date:before {
75
- content: "\e78e";
76
- font-size: 16px;
77
- position: absolute;
78
- right: 0% !important;
79
- }
80
- ::v-deep .el-icon-date{
81
- width: 20px;
82
- }
83
- }
84
- </style>
@@ -1,344 +0,0 @@
1
- <template>
2
- <div class="main">
3
- <!-- 分组选择主弹窗 -->
4
- <el-dialog
5
- :visible="visible"
6
- class="group-display"
7
- width="30%"
8
- title="分组选择"
9
- @update:visible="handleUpdateVisible"
10
- @open="handleOpen"
11
- >
12
- <div class="dataDialog">
13
- <div class="dialog-header">
14
- <el-input v-model="searchText" placeholder="搜索关键字" />
15
- </div>
16
- <div class="dialog-body">
17
- <el-scrollbar class="scrollbar">
18
- <el-tree
19
- ref="groupTree"
20
- :data="groupList"
21
- :show-checkbox="false"
22
- node-key="id"
23
- highlight-current
24
- :expand-on-click-node="false"
25
- check-on-click-node
26
- accordion
27
- :props="defaultProps"
28
- :filter-node-method="filterNode"
29
- :check-strictly="true"
30
- @check="handleNodeChange"
31
- />
32
- </el-scrollbar>
33
- </div>
34
- </div>
35
- <span slot="footer" class="dialog-footer">
36
- <el-button type="primary" size="mini" @click="openOperateDialog('insert')">新建分组</el-button>
37
- <el-button type="primary" size="mini" @click="openOperateDialog('update')">编辑分组</el-button>
38
- <el-button type="primary" size="mini" @click="handleCloseDialog">取 消</el-button>
39
- <el-button type="primary" size="mini" @click="handleDialogConfirm">确 定</el-button>
40
- </span>
41
- </el-dialog>
42
- <!-- 新建/编辑页面 -->
43
- <el-dialog
44
- title=""
45
- :visible.sync="operatingVisible"
46
- width="30%"
47
- @open="handleOpenOperate"
48
- @close="handleCloseOperate"
49
- >
50
- <div>
51
- <el-form ref="form" :rules="rules" :model="operatingData" label-width="80px">
52
- <el-form-item label="父级名称" prop="pid">
53
- <el-select v-model="operatingData.pid" placeholder="" @change="handleParentSelect">
54
- <el-option
55
- v-for="item in selectList"
56
- :key="item.id"
57
- :label="item.name"
58
- :value="item.id"
59
- />
60
- </el-select>
61
- </el-form-item>
62
- <el-form-item label="父级编码" prop="code">
63
- <el-input v-model="operatingData.groupCode" placeholder="" disabled />
64
- </el-form-item>
65
- <el-form-item label="编码" prop="code">
66
- <el-input v-model="operatingData.code" placeholder="" />
67
- </el-form-item>
68
- <el-form-item label="分组名称" prop="name">
69
- <el-input v-model="operatingData.name" placeholder="" />
70
- </el-form-item>
71
- </el-form>
72
- </div>
73
- <div slot="footer">
74
- <el-button @click="operatingVisible = false">取 消</el-button>
75
- <el-button type="primary" @click="handleSubmitOperate">确 定</el-button>
76
- </div>
77
- </el-dialog>
78
- </div>
79
- </template>
80
- <script>
81
- import { addGroupNode, updateGroupNode } from '@/api/tableV3'
82
- export default {
83
- name: 'GroupDialog',
84
- props: {
85
- data: {
86
- type: Array,
87
- default: () => {
88
- return []
89
- }
90
- },
91
- visible: {
92
- type: Boolean,
93
- default: true
94
- },
95
- value: {
96
- type: Object,
97
- default: () => {
98
- return {}
99
- }
100
- }
101
- },
102
- inject: ['target'],
103
- data () {
104
- var checkBlank = (rule, value, callback) => {
105
- const reg = /\s+/g
106
- if (reg.test(value)) {
107
- return callback(new Error('不能含有空格'))
108
- }
109
- callback()
110
- }
111
- return {
112
- searchText: '',
113
- selectNode: {},
114
- defaultProps: {
115
- children: 'children',
116
- label: 'name'
117
- },
118
- rules: {
119
- name: [
120
- { required: true, message: '不能为空', trigger: 'blur' },
121
- { validator: checkBlank, trigger: 'blur' }
122
- ],
123
- code: [
124
- { required: true, message: '不能为空', trigger: 'blur' }
125
- ],
126
- pid: [
127
- { required: true, message: '不能为空', trigger: 'blur' }
128
- ]
129
- },
130
- // selectList: [],
131
- operatingVisible: false,
132
- operatingStatus: 'insert', // 新增编辑弹窗的状态标识
133
- operatingData: {
134
- groupCode: '', // 分组编码
135
- code: '', // 节点编码
136
- id: '', // 节点id(编辑的时候存在)
137
- name: '', // 节点名称
138
- pid: ''// 父级id
139
- }
140
-
141
- }
142
- },
143
- computed: {
144
- groupList () {
145
- return this.data
146
- },
147
- selectMap () {
148
- return this.createSelectMap(this.data)
149
- },
150
- selectList () {
151
- return Object.values(this.selectMap)
152
- }
153
- },
154
- watch: {
155
- searchText (val) {
156
- this.$refs.groupTree.filter(val)
157
- },
158
- selectMap () {
159
- this.operatingVisible && this.updateGroupStatus()
160
- }
161
- },
162
- methods: {
163
- // 打开编辑弹窗前进行必要的校验
164
- openOperateDialog (mod) {
165
- if (!this.selectNode.id) {
166
- return this.$message.error('请先选择节点')
167
- }
168
- this.operatingStatus = mod
169
- if (this.operatingStatus === 'update' && this.selectNode.id === '0') {
170
- return this.$message.error('根节点不可编辑')
171
- }
172
- this.operatingVisible = true
173
- },
174
- // 打开弹窗进行的操作
175
- handleOpen () {
176
- this.$nextTick(() => {
177
- if (this.value && this.value.id) {
178
- this.$refs.groupTree.setCheckedKeys([this.value.id])
179
- this.$refs.groupTree.setCurrentKey(this.value.id)
180
- this.updateGroupStatus()
181
- this.handleNodeChange(this.selectMap[this.value.id])
182
- }
183
- })
184
- },
185
- // 更新展开状态
186
- updateGroupStatus () {
187
- this.$nextTick(() => {
188
- const id = this.selectNode.id || this.value.id
189
- if (id) {
190
- this.$refs.groupTree.setCurrentKey(id)
191
- this.expandedNode(id)
192
- }
193
- })
194
- },
195
- expandedNode (id, temp = false) {
196
- if (temp && this.$refs.groupTree.store.nodesMap[id]) {
197
- this.$refs.groupTree.store.nodesMap[id].expanded = true
198
- }
199
-
200
- if (this.selectMap[id].pid) {
201
- this.expandedNode(this.selectMap[id].pid, true)
202
- }
203
- },
204
- // 创建数据的map集合(id:{})
205
- createSelectMap (data, map, parentData = {}) {
206
- const dataCache = data || this.data
207
- const result = map || {}
208
- dataCache.forEach(e => {
209
- if (e.id) {
210
- result[e.id] = { id: e.id, name: e.name, groupCode: e.groupCode, pid: parentData.id || '' }
211
- }
212
- e.children && this.createSelectMap(e.children, result, e)
213
- })
214
- if (!map) return result
215
- },
216
- // 节点过滤
217
- filterNode (value, data) {
218
- if (!value) return true
219
- return data.name.indexOf(value) !== -1
220
- },
221
- // 节点选中
222
- handleNodeChange (data) {
223
- // console.log(this.$refs.groupTree)
224
- this.$refs.groupTree.setCheckedKeys([data.id])
225
- this.selectNode = data
226
- },
227
- // dialog确认
228
- handleDialogConfirm () {
229
- this.$emit('confirm', { id: this.selectNode.id, name: this.selectNode.name })
230
- this.handleCloseDialog()
231
- },
232
- // 关闭主dialog
233
- handleCloseDialog () {
234
- this.$emit('update:visible', false)
235
- },
236
- // 更新dialog
237
- handleUpdateVisible (val) {
238
- this.$emit('update:visible', val)
239
- },
240
- // 赋值
241
- handleParentSelect (id, field = 'groupCode') {
242
- this.operatingData[field] = this.selectMap[id][field]
243
- },
244
- // 打开操作界面
245
- handleOpenOperate () { // 打开操作界面
246
- if (this.operatingStatus === 'insert') {
247
- this.operatingData.pid = this.selectNode.id
248
- this.handleParentSelect(this.selectNode.id)
249
- }
250
- if (this.operatingStatus === 'update') {
251
- const id = this.selectMap[this.selectNode.id].pid
252
- this.operatingData.pid = id
253
- const groupCodeList = this.selectNode.groupCode.split('.')
254
- this.operatingData.code = groupCodeList[groupCodeList.length - 1]
255
- this.handleParentSelect(id)
256
- this.handleParentSelect(this.selectNode.id, 'name')
257
- }
258
- },
259
- // 关闭弹窗
260
- handleCloseOperate () {
261
- this.$refs.form.clearValidate()
262
- Object.keys(this.operatingData).forEach(e => {
263
- this.operatingData[e] = ''
264
- })
265
- },
266
- // 提交操作信息
267
- handleSubmitOperate () {
268
- this.$refs.form.validate(success => {
269
- if (success) {
270
- this.operatingStatus === 'insert'
271
- ? this.updateGroup(addGroupNode, '添加成功')
272
- : this.updateGroup(updateGroupNode, '修改成功')
273
- }
274
- })
275
- },
276
- async updateGroup (fun, msg) {
277
- const groupCode = this.operatingData.groupCode
278
- ? this.operatingData.groupCode + '.' + this.operatingData.code
279
- : this.operatingData.code
280
- const res = await fun(
281
- this.target,
282
- this.operatingData.name,
283
- this.operatingStatus === 'insert' ? '' : this.selectNode.id,
284
- this.operatingData.pid,
285
- groupCode)
286
-
287
- if (res.code !== 0) {
288
- return this.$message.error(res.msg)
289
- }
290
- this.$emit('success')
291
- // 如果修改到当前节点的更新操作
292
- if (this.selectNode.id === this.value.id) {
293
- this.selectNode.name = this.operatingData.name
294
- this.$emit('confirm', { id: this.value.id, name: this.operatingData.name })
295
- }
296
- this.$message.success(msg)
297
- this.operatingVisible = false
298
- }
299
- }
300
- }
301
- </script>
302
- <style lang="less" scoped>
303
- /**
304
- 列表弹窗
305
- */
306
- .group-display{
307
- ::v-deep .el-dialog__body {
308
- padding-top:0 !important;
309
- }
310
- ::v-deep .el-dialog__footer {
311
- .el-button {
312
- background-color: #07599C;
313
- border:none;
314
- }
315
- }
316
- }
317
-
318
- .dataDialog{
319
- height: 50vh;
320
- .dialog-header{
321
- width: 100%;
322
- height: 40px;
323
- box-sizing: border-box;
324
- padding: 5px;
325
- padding-top:0px;
326
- ::v-deep .el-input__inner {
327
- height:30px;
328
- width: 100% !important;
329
- }
330
- }
331
- .dialog-body{
332
- height: 100%;
333
- .scrollbar{
334
- height: 100%;
335
- /deep/.el-scrollbar__wrap{
336
- overflow-x: hidden;
337
- }
338
- }
339
- }
340
- }
341
- .el-form-item{
342
- margin-top: 20px;
343
- }
344
- </style>