@tongfun/tf-widget 0.1.18 → 0.1.22

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 (99) hide show
  1. package/README.md +49 -42
  2. package/lib/css/1.841c5d60.css +1 -0
  3. package/lib/tf-widget.common.1.js +9 -13
  4. package/lib/tf-widget.common.js +1102 -950
  5. package/lib/tf-widget.css +1 -1
  6. package/lib/tf-widget.umd.1.js +9 -13
  7. package/lib/tf-widget.umd.js +1102 -950
  8. package/lib/tf-widget.umd.min.1.js +1 -1
  9. package/lib/tf-widget.umd.min.js +4 -4
  10. package/package/svg-icon/index.js +8 -8
  11. package/package/svg-icon/src/SvgIcon.vue +59 -59
  12. package/package/t-data-list/index.js +6 -6
  13. package/package/t-data-list/main.vue +193 -192
  14. package/package/t-data-list/src/condition-input/basic.vue +31 -31
  15. package/package/t-data-list/src/condition-input/date.vue +106 -106
  16. package/package/t-data-list/src/condition-input/index.vue +100 -100
  17. package/package/t-data-list/src/condition-input/input.vue +31 -31
  18. package/package/t-data-list/src/condition-input/number.vue +115 -115
  19. package/package/t-data-list/src/condition-input/select.vue +86 -86
  20. package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
  21. package/package/t-data-list/src/js/operatorEnum.js +108 -109
  22. package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
  23. package/package/t-data-list/src/js/util.js +34 -34
  24. package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -77
  25. package/package/t-data-list/src/pushdown/push-down.vue +158 -158
  26. package/package/t-data-list/src/t-list-search.vue +36 -32
  27. package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
  28. package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
  29. package/package/t-data-list/src/t-plan/index.vue +195 -190
  30. package/package/t-data-list/src/t-plan/plan-content.vue +389 -396
  31. package/package/t-data-list/src/t-table/index.vue +129 -120
  32. package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
  33. package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
  34. package/package/t-data-list/src/t-table/table-group.vue +180 -179
  35. package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -250
  36. package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
  37. package/package/t-data-list/src/t-table/table-records.vue +337 -324
  38. package/package/t-input/children/address.vue +101 -101
  39. package/package/t-input/children/basic-display.vue +41 -41
  40. package/package/t-input/children/basic.vue +253 -251
  41. package/package/t-input/children/date.vue +89 -89
  42. package/package/t-input/children/group-components/group-dialog.vue +344 -350
  43. package/package/t-input/children/group.vue +126 -126
  44. package/package/t-input/children/input.vue +72 -72
  45. package/package/t-input/children/number.vue +74 -74
  46. package/package/t-input/children/select.vue +89 -89
  47. package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
  48. package/package/t-input/index.js +7 -7
  49. package/package/t-input/index.vue +337 -337
  50. package/package/t-input/tInputCache.js +24 -24
  51. package/package/tf-icon-picker/README.md +7 -7
  52. package/package/tf-icon-picker/index.js +8 -8
  53. package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
  54. package/package/tf-layout/README.md +115 -115
  55. package/package/tf-layout/index.js +8 -8
  56. package/package/tf-layout/src/components/tf-labelbar.vue +394 -382
  57. package/package/tf-layout/src/components/tf-menu.vue +180 -180
  58. package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
  59. package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
  60. package/package/tf-layout/src/tf-layout.vue +140 -120
  61. package/package/tf-widget/index.js +8 -8
  62. package/package/tf-widget/src/assets/common-input.less +10 -10
  63. package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
  64. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1087
  65. package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
  66. package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
  67. package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
  68. package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
  69. package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
  70. package/package/tf-widget/src/children/date-time.vue +103 -103
  71. package/package/tf-widget/src/children/date.vue +103 -103
  72. package/package/tf-widget/src/children/decimal.vue +115 -115
  73. package/package/tf-widget/src/children/integer.vue +104 -104
  74. package/package/tf-widget/src/children/property.vue +59 -59
  75. package/package/tf-widget/src/children/single-line-text.vue +82 -82
  76. package/package/tf-widget/src/children/small-pictures.vue +223 -223
  77. package/package/tf-widget/src/children/text-area.vue +74 -74
  78. package/package/tf-widget/src/children/tf-select.vue +113 -113
  79. package/package/tf-widget/src/tf-widget.vue +175 -175
  80. package/package.json +44 -43
  81. package/src/api/edit.js +97 -97
  82. package/src/api/file-enclosure.js +26 -26
  83. package/src/api/push-down.js +19 -19
  84. package/src/api/table.js +294 -294
  85. package/src/api/tableV3.js +166 -186
  86. package/src/assets/images/icons/index.js +9 -9
  87. package/src/assets/images/icons/svg/add.svg +5 -5
  88. package/src/assets/images/icons/svg/push-down.svg +1 -1
  89. package/src/assets/images/icons/svg/remove.svg +1 -1
  90. package/src/assets/styles/common-table.less +202 -202
  91. package/src/directives/debounce.js +24 -0
  92. package/src/index.js +31 -31
  93. package/src/mixins/t-data-query-mixin.js +290 -289
  94. package/src/utils/auth.js +22 -22
  95. package/src/utils/request.js +42 -42
  96. package/src/utils/stato-anormale.js +59 -59
  97. package/src/utils/utils.js +109 -109
  98. package/src/utils/validate.js +84 -84
  99. package/lib/css/1.920744ef.css +0 -1
@@ -1,34 +1,34 @@
1
- import fieldType from './fieldTypeEnum'
2
- import getOperatorOption from './operatorEnum'
3
- /**
4
- * 根据id找到该节点的父节点
5
- */
6
- export function getParentId (tree, id) {
7
- let resId = null
8
- for (const child of tree.children) {
9
- if (child.id === id) {
10
- resId = tree.id
11
- return resId
12
- }
13
- if (child.children) {
14
- resId = getParentId(child, id)
15
- if (resId) {
16
- return resId
17
- }
18
- }
19
- }
20
- return resId
21
- }
22
-
23
- /**
24
- * 参数名称是根据后端的表头中的一个字段来确定
25
- * 此函数,根据componentType找到前端自定义的枚举类型
26
- * 然后根据类型找到其模糊搜索的操作类型
27
- * 用于通用列表混入对象中的,搜索建议拼接高级条件,搜索范围条件限定拼接高级条件
28
- */
29
- export function getOperator (componentValueType, isStrict) {
30
- const type = fieldType[componentValueType]
31
- const operatorList = getOperatorOption(type)
32
- const operator = operatorList.find(item => item[isStrict ? 'strict' : 'isFrezz'])
33
- return operator
34
- }
1
+ import fieldType from './fieldTypeEnum'
2
+ import getOperatorOption from './operatorEnum'
3
+ /**
4
+ * 根据id找到该节点的父节点
5
+ */
6
+ export function getParentId (tree, id) {
7
+ let resId = null
8
+ for (const child of tree.children) {
9
+ if (child.id === id) {
10
+ resId = tree.id
11
+ return resId
12
+ }
13
+ if (child.children) {
14
+ resId = getParentId(child, id)
15
+ if (resId) {
16
+ return resId
17
+ }
18
+ }
19
+ }
20
+ return resId
21
+ }
22
+
23
+ /**
24
+ * 参数名称是根据后端的表头中的一个字段来确定
25
+ * 此函数,根据componentType找到前端自定义的枚举类型
26
+ * 然后根据类型找到其模糊搜索的操作类型
27
+ * 用于通用列表混入对象中的,搜索建议拼接高级条件,搜索范围条件限定拼接高级条件
28
+ */
29
+ export function getOperator (componentValueType, isStrict) {
30
+ const type = fieldType[componentValueType]
31
+ const operatorList = getOperatorOption(type)
32
+ const operator = operatorList.find(item => item[isStrict ? 'strict' : 'isFrezz'])
33
+ return operator
34
+ }
@@ -1,77 +1,93 @@
1
- /**
2
- * 按钮处理函数混入对象
3
- * 为了避免将来按钮逐渐增多,导致查询页面代码庞大
4
- * 顶部的所有按钮的处理函数都放入当前混入对象中
5
- */
6
- import { del } from '@/api/tableV3.js'
7
-
8
- export default {
9
- methods: {
10
- // 跳转到新增页面
11
- insert () {
12
- const randomStr = Math.random().toString(36).slice(8)
13
- this.$router.replace(`${this.$route.path}/insert/${randomStr}`)
14
- },
15
- // 跳转到修改页面
16
- update () {
17
- if (this.selectedRows.length === 0) {
18
- return this.$message.warning('请选择一条数据')
19
- }
20
- if (this.selectedRows.length > 1) {
21
- return this.$message.warning('只允许选择一条数据')
22
- }
23
- const randomStr = Math.random().toString(36).slice(8)
24
- this.$router.replace(`${this.$route.path}/update/${randomStr}/${this.ids[0]}`)
25
- },
26
- // 删除列表数据
27
- del () {
28
- if (this.ids.length === 0) {
29
- this.$message.info('您还未选择数据')
30
- return
31
- }
32
- this.$confirm('是否确定删除?', '提示', {
33
- confirmButtonText: '确定',
34
- cancelButtonText: '取消',
35
- type: 'warning'
36
- }).then(async () => {
37
- const { code, msg } = await del({
38
- target: this.target,
39
- params: {
40
- ids: this.ids.join(',')
41
- }
42
- })
43
- if (code !== 0) {
44
- return this.$message.error(msg)
45
- }
46
- this.$message.success('删除成功')
47
- this.refresh()
48
- })
49
- },
50
- // 打开下推的弹窗口
51
- showPushDown () {
52
- if (!this.ids.length) {
53
- return this.$message.error('请先选择数据')
54
- }
55
- this.pushdownVisible = true
56
- },
57
- /**
58
- *
59
- * @param {*} clearTableSelect 刷新完毕后是否清空已选 默认不清空
60
- * @param {*} clearCondition 是否清空所有条件进行刷新,默认保留当前条件(目前只有刷新按钮不保留条件)
61
- */
62
- refresh (clearTableSelect = false, clearCondition = false) {
63
- if (!clearTableSelect) {
64
- this.syncData.tableSelectionClear = false
65
- }
66
- if (clearCondition) {
67
- this.query.conditionAlwaysList = []
68
- this.query.conditionGroup = null
69
- this.query.conditionMultiList = []
70
- this.query.conditionQuickList = []
71
- this.query.pageNum = 1
72
- this.query.pageSize = 200
73
- }
74
- this.getTableData(false, true)
75
- }
76
- }
77
- }
1
+ /**
2
+ * 按钮处理函数混入对象
3
+ * 为了避免将来按钮逐渐增多,导致查询页面代码庞大
4
+ * 顶部的所有按钮的处理函数都放入当前混入对象中
5
+ */
6
+ import { del } from '@/api/tableV3.js'
7
+
8
+ export default {
9
+ methods: {
10
+ // 跳转到新增页面
11
+ insert () {
12
+ if (this.$listeners.insert) {
13
+ return this.$emit('insert')
14
+ }
15
+ const randomStr = Math.random().toString(36).slice(8)
16
+ this.$router.replace(`${this.$route.path}/insert/${randomStr}`)
17
+ },
18
+ // 跳转到修改页面
19
+ update () {
20
+ if (this.selectedRows.length === 0) {
21
+ return this.$message.warning('请选择一条数据')
22
+ }
23
+ if (this.selectedRows.length > 1) {
24
+ return this.$message.warning('只允许选择一条数据')
25
+ }
26
+ if (this.$listeners.update) {
27
+ return this.$emit('update', this.selectedRows[0])
28
+ }
29
+ const randomStr = Math.random().toString(36).slice(8)
30
+ this.$router.replace(`${this.$route.path}/update/${randomStr}/${this.ids[0]}`)
31
+ },
32
+ // 删除列表数据
33
+ del () {
34
+ if (this.ids.length === 0) {
35
+ this.$message.info('您还未选择数据')
36
+ return
37
+ }
38
+ this.$confirm('是否确定删除?', '提示', {
39
+ confirmButtonText: '确定',
40
+ cancelButtonText: '取消',
41
+ type: 'warning'
42
+ }).then(async () => {
43
+ const { code, msg } = await del({
44
+ target: this.target,
45
+ ids: this.ids
46
+ })
47
+ if (code !== 0) {
48
+ return this.$message.error(msg)
49
+ }
50
+ this.$message.success('删除成功')
51
+ this.refresh()
52
+ })
53
+ },
54
+ // 打开下推的弹窗口
55
+ showPushDown () {
56
+ if (!this.ids.length) {
57
+ return this.$message.error('请先选择数据')
58
+ }
59
+ this.pushdownVisible = true
60
+ },
61
+ /**
62
+ *
63
+ * @param {*} clearTableSelect 刷新完毕后是否清空已选 默认不清空
64
+ * @param {*} clearCondition 是否清空所有条件进行刷新,默认保留当前条件(目前只有刷新按钮不保留条件)
65
+ */
66
+ refresh (clearTableSelect = false, clearCondition = false) {
67
+ if (!clearTableSelect) {
68
+ this.syncData.tableSelectionClear = false
69
+ }
70
+ if (clearCondition) {
71
+ // 清空右上角搜索框的条件
72
+ this.$refs.tListSearchRef.reset()
73
+ this.searchSuggestCondition = []
74
+
75
+ // 清空分组条件
76
+ this.query.conditionGroup = null
77
+
78
+ // 清空表头条件
79
+ // 清空过滤器显示状态,和快捷过滤条件缓存,通过事件方式将操作改为异步提升速度(好像也没有提升多少)
80
+ this.query.conditionQuickList = []
81
+ this.$refs.TtableRef.$emit('headConditionClear')
82
+
83
+ this.query.pageNum = 1
84
+ this.query.pageSize = 200
85
+
86
+ // 通知方案切换到默认方案 ,然后触发查询
87
+ this.$refs.TplanRef.resetToDefaultPlan()
88
+ return
89
+ }
90
+ this.getTableData(false, true)
91
+ }
92
+ }
93
+ }
@@ -1,158 +1,158 @@
1
- <template>
2
- <el-dialog
3
- title="下推"
4
- :visible="visible"
5
- width="35%"
6
- @update:visible="$emit('update:visible',$event)"
7
- @open="handleOpen"
8
- >
9
- <div class="header">
10
- <i class="el-icon-refresh" @click="refreshMethod" />
11
- </div>
12
- <div class="table-info">
13
- <ux-grid
14
- ref="pushDownTable"
15
- v-loading="tableLoading"
16
- column-key
17
- :data="tableData"
18
- beautify-table
19
- border
20
- highlight-current-row
21
- show-header-overflow
22
- show-overflow="tooltip"
23
- class="common-table"
24
- :width-resize="true"
25
- :checkbox-config="{highlight: true ,trigger: 'row'}"
26
- @current-change="currentChange"
27
- @selection-change="selectionChange"
28
- >
29
- <ux-table-column type="checkbox" fixed="left" align="center" width="60" />
30
- <ux-table-column field="value" title="单据名称" align="center" resizable width="" />
31
- <template slot="empty">
32
- <SvgIcon icon-class="table-empty" style="width: 6vw;height: 6vh;margin-top: 3vh" />
33
- <div style="font-size: 1.4vh;margin-bottom: 10.5vh">
34
- 暂无数据
35
- </div>
36
- </template>
37
- </ux-grid>
38
- </div>
39
- <span slot="footer" class="dialog-footer">
40
- <el-button class="common-header-button close" @click="$emit('update:visible',false)">取 消</el-button>
41
- <el-button class="common-header-button" @click="dialogConfirm">确 定</el-button>
42
- </span>
43
- </el-dialog>
44
- </template>
45
- <script>
46
- import { findBillExchangeRouterVO } from '@/api/push-down'
47
- import { pushDownValid } from '@/api/tableV3'
48
- export default {
49
- components: {
50
-
51
- },
52
- props: {
53
- visible: {
54
- type: Boolean,
55
- default: false
56
- },
57
- pushDownTableName: {
58
- type: String,
59
- default: null
60
- },
61
- parentSelectionData: {
62
- type: Array,
63
- default: () => []
64
- },
65
- needAuditFlag: {
66
- type: Boolean,
67
- default: false
68
- }
69
- },
70
- data () {
71
- return {
72
- selectionData: [],
73
- tableData: [],
74
- tableLoading: false,
75
- refreshMethod: null
76
- }
77
- },
78
- created () {
79
- this.refreshMethod = this.utils.debounce(this.getTableData)
80
- },
81
- methods: {
82
- handleOpen () {
83
- this.getTableData()
84
- },
85
- /**
86
- * 获取下推单据列表
87
- */
88
- getTableData () {
89
- if (this.pushDownTableName) {
90
- this.tableData = []
91
- this.tableLoading = true
92
- this.selectionData = []
93
- const data = {
94
- originTableName: this.pushDownTableName
95
- }
96
- findBillExchangeRouterVO(data).then(res => {
97
- if (res.code === 0) {
98
- this.tableData = res.data.filter(item => {
99
- return item.value && item.routerName
100
- })
101
- } else {
102
- this.$message.warning('获取数据失败,请稍后重试!')
103
- }
104
- this.tableLoading = false
105
- }).catch(() => {
106
- this.tableLoading = false
107
- })
108
- }
109
- },
110
- /**
111
- * 表格当前行change事件
112
- * @param row
113
- */
114
- currentChange (row) {
115
- this.$refs.pushDownTable.clearSelection()
116
- this.$refs.pushDownTable.setCurrentRow(row)
117
- },
118
-
119
- /**
120
- * 表格选择项change事件
121
- */
122
- selectionChange (value) {
123
- this.selectionData = value
124
- },
125
-
126
- /**
127
- * 弹框确认事件
128
- */
129
- async dialogConfirm () {
130
- if (!this.selectionData.length) {
131
- return this.$message.error('请选择目标单')
132
- }
133
-
134
- // 校验是否满足下推条件
135
- const name = this.selectionData[0].value
136
- const ids = Array.from(new Set(this.parentSelectionData))
137
- const res = await pushDownValid(name, ids)
138
- if (res.code !== 0) {
139
- return this.$message.error(res.msg)
140
- }
141
-
142
- this.$emit('update:visible', false)
143
- const list = [...new Set(this.parentSelectionData)]
144
- const data = {
145
- pid: list.join(','),
146
- pushDownName: this.selectionData[0].value
147
- }
148
- const randomNum = Math.floor(Math.random() * 1000000)
149
- const routerName = this.selectionData[0].routerName
150
- window.history.pushState({ ...data }, '', routerName + '/' + randomNum)
151
- }
152
- }
153
- }
154
- </script>
155
-
156
- <style scoped>
157
-
158
- </style>
1
+ <template>
2
+ <el-dialog
3
+ title="下推"
4
+ :visible="visible"
5
+ width="35%"
6
+ @update:visible="$emit('update:visible',$event)"
7
+ @open="handleOpen"
8
+ >
9
+ <div class="header">
10
+ <i class="el-icon-refresh" @click="refreshMethod" />
11
+ </div>
12
+ <div class="table-info">
13
+ <ux-grid
14
+ ref="pushDownTable"
15
+ v-loading="tableLoading"
16
+ column-key
17
+ :data="tableData"
18
+ beautify-table
19
+ border
20
+ highlight-current-row
21
+ show-header-overflow
22
+ show-overflow="tooltip"
23
+ class="common-table"
24
+ :width-resize="true"
25
+ :checkbox-config="{highlight: true ,trigger: 'row'}"
26
+ @current-change="currentChange"
27
+ @selection-change="selectionChange"
28
+ >
29
+ <ux-table-column type="checkbox" fixed="left" align="center" width="60" />
30
+ <ux-table-column field="value" title="单据名称" align="center" resizable width="" />
31
+ <template slot="empty">
32
+ <SvgIcon icon-class="table-empty" style="width: 6vw;height: 6vh;margin-top: 3vh" />
33
+ <div style="font-size: 1.4vh;margin-bottom: 10.5vh">
34
+ 暂无数据
35
+ </div>
36
+ </template>
37
+ </ux-grid>
38
+ </div>
39
+ <span slot="footer" class="dialog-footer">
40
+ <el-button class="common-header-button close" @click="$emit('update:visible',false)">取 消</el-button>
41
+ <el-button class="common-header-button" @click="dialogConfirm">确 定</el-button>
42
+ </span>
43
+ </el-dialog>
44
+ </template>
45
+ <script>
46
+ import { findBillExchangeRouterVO } from '@/api/push-down'
47
+ import { pushDownValid } from '@/api/tableV3'
48
+ export default {
49
+ components: {
50
+
51
+ },
52
+ props: {
53
+ visible: {
54
+ type: Boolean,
55
+ default: false
56
+ },
57
+ pushDownTableName: {
58
+ type: String,
59
+ default: null
60
+ },
61
+ parentSelectionData: {
62
+ type: Array,
63
+ default: () => []
64
+ },
65
+ needAuditFlag: {
66
+ type: Boolean,
67
+ default: false
68
+ }
69
+ },
70
+ data () {
71
+ return {
72
+ selectionData: [],
73
+ tableData: [],
74
+ tableLoading: false,
75
+ refreshMethod: null
76
+ }
77
+ },
78
+ created () {
79
+ this.refreshMethod = this.utils.debounce(this.getTableData)
80
+ },
81
+ methods: {
82
+ handleOpen () {
83
+ this.getTableData()
84
+ },
85
+ /**
86
+ * 获取下推单据列表
87
+ */
88
+ getTableData () {
89
+ if (this.pushDownTableName) {
90
+ this.tableData = []
91
+ this.tableLoading = true
92
+ this.selectionData = []
93
+ const data = {
94
+ originTableName: this.pushDownTableName
95
+ }
96
+ findBillExchangeRouterVO(data).then(res => {
97
+ if (res.code === 0) {
98
+ this.tableData = res.data.filter(item => {
99
+ return item.value && item.routerName
100
+ })
101
+ } else {
102
+ this.$message.warning('获取数据失败,请稍后重试!')
103
+ }
104
+ this.tableLoading = false
105
+ }).catch(() => {
106
+ this.tableLoading = false
107
+ })
108
+ }
109
+ },
110
+ /**
111
+ * 表格当前行change事件
112
+ * @param row
113
+ */
114
+ currentChange (row) {
115
+ this.$refs.pushDownTable.clearSelection()
116
+ this.$refs.pushDownTable.setCurrentRow(row)
117
+ },
118
+
119
+ /**
120
+ * 表格选择项change事件
121
+ */
122
+ selectionChange (value) {
123
+ this.selectionData = value
124
+ },
125
+
126
+ /**
127
+ * 弹框确认事件
128
+ */
129
+ async dialogConfirm () {
130
+ if (!this.selectionData.length) {
131
+ return this.$message.error('请选择目标单')
132
+ }
133
+
134
+ // 校验是否满足下推条件
135
+ const name = this.selectionData[0].value
136
+ const ids = Array.from(new Set(this.parentSelectionData))
137
+ const res = await pushDownValid(name, ids)
138
+ if (res.code !== 0) {
139
+ return this.$message.error(res.msg)
140
+ }
141
+
142
+ this.$emit('update:visible', false)
143
+ const list = [...new Set(this.parentSelectionData)]
144
+ const data = {
145
+ pid: list.join(','),
146
+ pushDownName: this.selectionData[0].value
147
+ }
148
+ const randomNum = Math.floor(Math.random() * 1000000)
149
+ const routerName = this.selectionData[0].routerName
150
+ window.history.pushState({ ...data }, '', routerName + '/' + randomNum)
151
+ }
152
+ }
153
+ }
154
+ </script>
155
+
156
+ <style scoped>
157
+
158
+ </style>
@@ -1,32 +1,36 @@
1
- <template>
2
- <div class="t-list-search-wrapper">
3
- <el-input
4
- v-model="value"
5
- prefix-icon="el-icon-search"
6
- @keydown.enter.native="$emit('search',value)"
7
- />
8
- </div>
9
- </template>
10
- <script>
11
- export default {
12
- data () {
13
- return {
14
- value: ''
15
- }
16
- }
17
-
18
- }
19
- </script>
20
-
21
- <style lang="less" scoped>
22
- .t-list-search-wrapper{
23
- width:200px;
24
- margin-right:12px;
25
- ::v-deep .el-input__inner {
26
- border:none ;
27
- border-radius: 0;
28
- border-bottom: 1px solid #a7a1a1;
29
-
30
- }
31
- }
32
- </style>
1
+ <template>
2
+ <div class="t-list-search-wrapper">
3
+ <el-input
4
+ v-model="value"
5
+ prefix-icon="el-icon-search"
6
+ @keydown.enter.native="$emit('search',value)"
7
+ />
8
+ </div>
9
+ </template>
10
+ <script>
11
+ export default {
12
+ data () {
13
+ return {
14
+ value: ''
15
+ }
16
+ },
17
+ methods: {
18
+ reset () {
19
+ this.value = ''
20
+ }
21
+ }
22
+
23
+ }
24
+ </script>
25
+
26
+ <style lang="less" scoped>
27
+ .t-list-search-wrapper{
28
+ width:200px;
29
+ margin-right:12px;
30
+ ::v-deep .el-input__inner {
31
+ border:none ;
32
+ border-radius: 0;
33
+ border-bottom: 1px solid #a7a1a1;
34
+ }
35
+ }
36
+ </style>