@qqt-product/system 0.0.1 → 0.0.16
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.
- package/dist/index.es.js +53240 -10634
- package/dist/index.umd.js +94 -21
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +13 -11
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
- package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
- package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
- package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
- package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
- package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
- package/src/lib/components/index.ts +78 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
- package/src/lib/components/integratedNodesList/src/index.vue +130 -136
- package/src/lib/components/integratedReportList/src/index.vue +55 -30
- package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
- package/src/lib/components/loginLogList/src/index.vue +51 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
- package/src/lib/components/operateLogList/src/index.vue +46 -57
- package/src/vite-env.d.ts +13 -13
- package/tsconfig.json +24 -24
- package/vite.config.ts +1 -1
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<vxe-modal title="数据字典" width="760" v-model="visible" :confirmLoading="confirmLoading" type="confirm" show-footer @confirm="selectedOk" @cancel="close">
|
|
4
|
-
<a-radio-group v-model="inputType" button-style="solid" style="margin-bottom: 12px" @change="hanldeRadioChange">
|
|
5
|
-
<a-radio-button value="sysDictCode"> 系统字典 </a-radio-button>
|
|
6
|
-
<a-radio-button value="dictCode"> 企业字典 </a-radio-button>
|
|
7
|
-
<a-radio-button value="manual"> 手动输入 </a-radio-button>
|
|
8
|
-
</a-radio-group>
|
|
9
|
-
<div v-if="inputType === 'manual'">
|
|
10
|
-
<a-input v-model="dataSource" placeholder="请输入数据源地址或字典编码" />
|
|
11
|
-
</div>
|
|
12
|
-
<div v-else>
|
|
13
|
-
<a-spin :spinning="loading">
|
|
14
|
-
<a-input-search placeholder="请输入关键字" style="margin-bottom: 8px" v-model="keyWord" @search="onSearch" enterButton />
|
|
15
|
-
<vxe-grid
|
|
16
|
-
border
|
|
17
|
-
resizable
|
|
18
|
-
show-overflow
|
|
19
|
-
highlight-hover-row
|
|
20
|
-
max-height="320"
|
|
21
|
-
row-id="id"
|
|
22
|
-
size="mini"
|
|
23
|
-
:loading="loading"
|
|
24
|
-
ref="selectGrid"
|
|
25
|
-
:seq-config="{ startIndex: ((tablePage.currentPage as number) - 1) * (tablePage.pageSize as number) }"
|
|
26
|
-
:data="tableData"
|
|
27
|
-
:pager-config="tablePage"
|
|
28
|
-
:radio-config="{ highlight: true, reserve: true, trigger: 'row' }"
|
|
29
|
-
:columns="columns"
|
|
30
|
-
@page-change="handlePageChange"
|
|
31
|
-
>
|
|
32
|
-
</vxe-grid>
|
|
33
|
-
</a-spin>
|
|
34
|
-
</div>
|
|
35
|
-
</vxe-modal>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
<script lang="ts">
|
|
39
|
-
import { defineComponent } from 'vue'
|
|
40
|
-
import { HttpClient, INJECT_HTTP, MapObjectNoneType } from '../../../utils/global.types'
|
|
41
|
-
import { message } from '@qqt-product/ui'
|
|
42
|
-
import type { VxeGridPropTypes, VxeTableDefines } from 'vxe-table'
|
|
43
|
-
export default defineComponent({
|
|
44
|
-
name: 'AddDictCodeModal',
|
|
45
|
-
inject: [INJECT_HTTP],
|
|
46
|
-
data() {
|
|
47
|
-
return {
|
|
48
|
-
visible: false,
|
|
49
|
-
loading: false,
|
|
50
|
-
confirmLoading: false,
|
|
51
|
-
inputType: 'sysDictCode',
|
|
52
|
-
dataSource: '',
|
|
53
|
-
keyWord: '',
|
|
54
|
-
columns: [
|
|
55
|
-
{ type: 'radio', width: 40 },
|
|
56
|
-
{ type: 'seq', title: '序号', width: 60 },
|
|
57
|
-
{ field: 'dictCode', title: '字典编码' },
|
|
58
|
-
{ field: 'dictName', title: '字典名称' },
|
|
59
|
-
{ field: 'description', title: '字典描述' },
|
|
60
|
-
] as VxeTableDefines.ColumnOptions[],
|
|
61
|
-
url: '',
|
|
62
|
-
queryParams: {},
|
|
63
|
-
tableData: [],
|
|
64
|
-
tablePage: {
|
|
65
|
-
total: 0,
|
|
66
|
-
currentPage: 1,
|
|
67
|
-
pageSize: 20,
|
|
68
|
-
align: 'left',
|
|
69
|
-
pageSizes: [20, 50, 100, 200, 500],
|
|
70
|
-
layouts: ['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'PageCount', 'Total'],
|
|
71
|
-
perfect: true,
|
|
72
|
-
} as VxeGridPropTypes.PagerConfig,
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
methods: {
|
|
76
|
-
hanldeRadioChange(e: MapObjectNoneType) {
|
|
77
|
-
let value = e.target.value || ''
|
|
78
|
-
let arr = ['dictCode', 'sysDictCode']
|
|
79
|
-
if (arr.includes(value)) {
|
|
80
|
-
this.loadData()
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
loadData() {
|
|
84
|
-
this.loading = true
|
|
85
|
-
let params = { pageSize: this.tablePage.pageSize, pageNo: this.tablePage.currentPage, keyWord: this.keyWord }
|
|
86
|
-
const url = this.inputType === 'sysDictCode' ? '/base/dict/listSys' : '/base/dict/list'
|
|
87
|
-
let http = this.http as HttpClient
|
|
88
|
-
http
|
|
89
|
-
.get({ url, params })
|
|
90
|
-
.then((res) => {
|
|
91
|
-
if (res.success) {
|
|
92
|
-
let list = res.result.records || []
|
|
93
|
-
this.tableData = list
|
|
94
|
-
this.tablePage.total = res.result.total
|
|
95
|
-
let selectGrid = this.$refs.selectGrid as MapObjectNoneType
|
|
96
|
-
if (this.$refs.selectGrid && selectGrid.clearRadioReserve) {
|
|
97
|
-
selectGrid.clearRadioReserve()
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
.finally(() => {
|
|
102
|
-
this.loading = false
|
|
103
|
-
})
|
|
104
|
-
},
|
|
105
|
-
open() {
|
|
106
|
-
// 清空默认值
|
|
107
|
-
this.dataSource = ''
|
|
108
|
-
this.keyWord = ''
|
|
109
|
-
this.loadData()
|
|
110
|
-
this.visible = true
|
|
111
|
-
},
|
|
112
|
-
close() {
|
|
113
|
-
this.visible = false
|
|
114
|
-
},
|
|
115
|
-
selectedOk() {
|
|
116
|
-
let selectedData = {}
|
|
117
|
-
if (this.inputType == 'manual' && this.dataSource) {
|
|
118
|
-
selectedData = { dictCode: this.dataSource }
|
|
119
|
-
} else {
|
|
120
|
-
if (this.$refs.selectGrid) selectedData = (this.$refs.selectGrid as MapObjectNoneType).getRadioRecord()
|
|
121
|
-
}
|
|
122
|
-
if (selectedData) {
|
|
123
|
-
this.visible = false
|
|
124
|
-
this.$emit('ok', selectedData)
|
|
125
|
-
} else {
|
|
126
|
-
message.warning('请选择数据')
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
handlePageChange({ currentPage, pageSize }: MapObjectNoneType) {
|
|
130
|
-
this.tablePage.currentPage = currentPage
|
|
131
|
-
this.tablePage.pageSize = pageSize
|
|
132
|
-
this.loadData()
|
|
133
|
-
},
|
|
134
|
-
onSearch(keyWord: string) {
|
|
135
|
-
this.keyWord = keyWord
|
|
136
|
-
this.loadData()
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
})
|
|
140
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<vxe-modal title="数据字典" width="760" v-model="visible" :confirmLoading="confirmLoading" type="confirm" show-footer @confirm="selectedOk" @cancel="close">
|
|
4
|
+
<a-radio-group v-model="inputType" button-style="solid" style="margin-bottom: 12px" @change="hanldeRadioChange">
|
|
5
|
+
<a-radio-button value="sysDictCode"> 系统字典 </a-radio-button>
|
|
6
|
+
<a-radio-button value="dictCode"> 企业字典 </a-radio-button>
|
|
7
|
+
<a-radio-button value="manual"> 手动输入 </a-radio-button>
|
|
8
|
+
</a-radio-group>
|
|
9
|
+
<div v-if="inputType === 'manual'">
|
|
10
|
+
<a-input v-model="dataSource" placeholder="请输入数据源地址或字典编码" />
|
|
11
|
+
</div>
|
|
12
|
+
<div v-else>
|
|
13
|
+
<a-spin :spinning="loading">
|
|
14
|
+
<a-input-search placeholder="请输入关键字" style="margin-bottom: 8px" v-model="keyWord" @search="onSearch" enterButton />
|
|
15
|
+
<vxe-grid
|
|
16
|
+
border
|
|
17
|
+
resizable
|
|
18
|
+
show-overflow
|
|
19
|
+
highlight-hover-row
|
|
20
|
+
max-height="320"
|
|
21
|
+
row-id="id"
|
|
22
|
+
size="mini"
|
|
23
|
+
:loading="loading"
|
|
24
|
+
ref="selectGrid"
|
|
25
|
+
:seq-config="{ startIndex: ((tablePage.currentPage as number) - 1) * (tablePage.pageSize as number) }"
|
|
26
|
+
:data="tableData"
|
|
27
|
+
:pager-config="tablePage"
|
|
28
|
+
:radio-config="{ highlight: true, reserve: true, trigger: 'row' }"
|
|
29
|
+
:columns="columns"
|
|
30
|
+
@page-change="handlePageChange"
|
|
31
|
+
>
|
|
32
|
+
</vxe-grid>
|
|
33
|
+
</a-spin>
|
|
34
|
+
</div>
|
|
35
|
+
</vxe-modal>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
<script lang="ts">
|
|
39
|
+
import { defineComponent } from 'vue'
|
|
40
|
+
import { HttpClient, INJECT_HTTP, MapObjectNoneType } from '../../../utils/global.types'
|
|
41
|
+
import { message } from '@qqt-product/ui'
|
|
42
|
+
import type { VxeGridPropTypes, VxeTableDefines } from 'vxe-table'
|
|
43
|
+
export default defineComponent({
|
|
44
|
+
name: 'AddDictCodeModal',
|
|
45
|
+
inject: [INJECT_HTTP],
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
visible: false,
|
|
49
|
+
loading: false,
|
|
50
|
+
confirmLoading: false,
|
|
51
|
+
inputType: 'sysDictCode',
|
|
52
|
+
dataSource: '',
|
|
53
|
+
keyWord: '',
|
|
54
|
+
columns: [
|
|
55
|
+
{ type: 'radio', width: 40 },
|
|
56
|
+
{ type: 'seq', title: '序号', width: 60 },
|
|
57
|
+
{ field: 'dictCode', title: '字典编码' },
|
|
58
|
+
{ field: 'dictName', title: '字典名称' },
|
|
59
|
+
{ field: 'description', title: '字典描述' },
|
|
60
|
+
] as VxeTableDefines.ColumnOptions[],
|
|
61
|
+
url: '',
|
|
62
|
+
queryParams: {},
|
|
63
|
+
tableData: [],
|
|
64
|
+
tablePage: {
|
|
65
|
+
total: 0,
|
|
66
|
+
currentPage: 1,
|
|
67
|
+
pageSize: 20,
|
|
68
|
+
align: 'left',
|
|
69
|
+
pageSizes: [20, 50, 100, 200, 500],
|
|
70
|
+
layouts: ['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'PageCount', 'Total'],
|
|
71
|
+
perfect: true,
|
|
72
|
+
} as VxeGridPropTypes.PagerConfig,
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
hanldeRadioChange(e: MapObjectNoneType) {
|
|
77
|
+
let value = e.target.value || ''
|
|
78
|
+
let arr = ['dictCode', 'sysDictCode']
|
|
79
|
+
if (arr.includes(value)) {
|
|
80
|
+
this.loadData()
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
loadData() {
|
|
84
|
+
this.loading = true
|
|
85
|
+
let params = { pageSize: this.tablePage.pageSize, pageNo: this.tablePage.currentPage, keyWord: this.keyWord }
|
|
86
|
+
const url = this.inputType === 'sysDictCode' ? '/base/dict/listSys' : '/base/dict/list'
|
|
87
|
+
let http = this.http as HttpClient
|
|
88
|
+
http
|
|
89
|
+
.get({ url, params })
|
|
90
|
+
.then((res) => {
|
|
91
|
+
if (res.success) {
|
|
92
|
+
let list = res.result.records || []
|
|
93
|
+
this.tableData = list
|
|
94
|
+
this.tablePage.total = res.result.total
|
|
95
|
+
let selectGrid = this.$refs.selectGrid as MapObjectNoneType
|
|
96
|
+
if (this.$refs.selectGrid && selectGrid.clearRadioReserve) {
|
|
97
|
+
selectGrid.clearRadioReserve()
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
.finally(() => {
|
|
102
|
+
this.loading = false
|
|
103
|
+
})
|
|
104
|
+
},
|
|
105
|
+
open() {
|
|
106
|
+
// 清空默认值
|
|
107
|
+
this.dataSource = ''
|
|
108
|
+
this.keyWord = ''
|
|
109
|
+
this.loadData()
|
|
110
|
+
this.visible = true
|
|
111
|
+
},
|
|
112
|
+
close() {
|
|
113
|
+
this.visible = false
|
|
114
|
+
},
|
|
115
|
+
selectedOk() {
|
|
116
|
+
let selectedData = {}
|
|
117
|
+
if (this.inputType == 'manual' && this.dataSource) {
|
|
118
|
+
selectedData = { dictCode: this.dataSource }
|
|
119
|
+
} else {
|
|
120
|
+
if (this.$refs.selectGrid) selectedData = (this.$refs.selectGrid as MapObjectNoneType).getRadioRecord()
|
|
121
|
+
}
|
|
122
|
+
if (selectedData) {
|
|
123
|
+
this.visible = false
|
|
124
|
+
this.$emit('ok', selectedData)
|
|
125
|
+
} else {
|
|
126
|
+
message.warning('请选择数据')
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
handlePageChange({ currentPage, pageSize }: MapObjectNoneType) {
|
|
130
|
+
this.tablePage.currentPage = currentPage
|
|
131
|
+
this.tablePage.pageSize = pageSize
|
|
132
|
+
this.loadData()
|
|
133
|
+
},
|
|
134
|
+
onSearch(keyWord: string) {
|
|
135
|
+
this.keyWord = keyWord
|
|
136
|
+
this.loadData()
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
})
|
|
140
|
+
</script>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent } from 'vue'
|
|
1
|
+
import { defineComponent, watch, ref } from 'vue'
|
|
2
2
|
import { regExpOptions } from '../../../../lib/utils/regexp'
|
|
3
3
|
|
|
4
4
|
interface rexgArryTs {
|
|
@@ -9,13 +9,9 @@ interface rexgArryTs {
|
|
|
9
9
|
|
|
10
10
|
export default defineComponent({
|
|
11
11
|
name: 'regexComponent',
|
|
12
|
-
emits: ['updateInfo', 'change'],
|
|
13
|
-
model: {
|
|
14
|
-
prop: 'value',
|
|
15
|
-
event: 'change',
|
|
16
|
-
},
|
|
12
|
+
emits: ['updateInfo', 'change', 'update:modelValue'],
|
|
17
13
|
props: {
|
|
18
|
-
|
|
14
|
+
modelValue: {
|
|
19
15
|
type: String || Number,
|
|
20
16
|
default: '',
|
|
21
17
|
},
|
|
@@ -30,31 +26,35 @@ export default defineComponent({
|
|
|
30
26
|
default: '',
|
|
31
27
|
},
|
|
32
28
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
value: {
|
|
41
|
-
immediate: true,
|
|
42
|
-
handler(val) {
|
|
43
|
-
this.realVue = val
|
|
29
|
+
setup(props, ctx) {
|
|
30
|
+
const realVal = ref('')
|
|
31
|
+
|
|
32
|
+
watch(
|
|
33
|
+
() => props.modelValue,
|
|
34
|
+
(val) => {
|
|
35
|
+
realVal.value = val
|
|
44
36
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
{
|
|
38
|
+
immediate: true,
|
|
39
|
+
},
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
const selectChange = (val: string | number) => {
|
|
49
43
|
if (val) {
|
|
50
44
|
const { msg = '' } = regExpOptions.find((n) => n.value === val) as rexgArryTs
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
ctx.emit('updateInfo', { msg }) // 正则验证提示语
|
|
46
|
+
ctx.emit('update:modelValue', val)
|
|
47
|
+
ctx.emit('change', val)
|
|
53
48
|
} else {
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
ctx.emit('updateInfo', { msg: '' }) // 正则验证提示语
|
|
50
|
+
ctx.emit('update:modelValue', '')
|
|
51
|
+
ctx.emit('change', '')
|
|
56
52
|
}
|
|
57
|
-
}
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
realVal,
|
|
56
|
+
selectChange,
|
|
57
|
+
}
|
|
58
58
|
},
|
|
59
59
|
render() {
|
|
60
60
|
const opts = regExpOptions.map((n) => <a-select-option value={n.value}>{n.label}</a-select-option>)
|
|
@@ -62,7 +62,7 @@ export default defineComponent({
|
|
|
62
62
|
allowClear: true,
|
|
63
63
|
}
|
|
64
64
|
const $EL = (
|
|
65
|
-
<a-select style={{ width: '100%' }}
|
|
65
|
+
<a-select style={{ width: '100%' }} v-model={[this.realVal, 'value']} onChange={this.selectChange} {...props}>
|
|
66
66
|
{opts}
|
|
67
67
|
</a-select>
|
|
68
68
|
)
|