vue2-client 1.18.27 → 1.18.29
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/package.json +1 -1
- package/src/assets/img/paymentMethod/icon1.png +0 -0
- package/src/assets/img/paymentMethod/icon2.png +0 -0
- package/src/assets/img/paymentMethod/icon3.png +0 -0
- package/src/assets/img/paymentMethod/icon4.png +0 -0
- package/src/assets/img/paymentMethod/icon5.png +0 -0
- package/src/assets/img/paymentMethod/icon6.png +0 -0
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +1 -0
- package/src/base-client/components/common/HIS/HTab/HTab.vue +6 -4
- package/src/base-client/components/common/XFormTable/XFormTable.vue +91 -80
- package/src/base-client/components/common/XReport/XReportHospitalizationDemo.vue +45 -0
- package/src/base-client/components/common/XTable/XTable.vue +71 -62
- package/src/base-client/components/his/HChart/demo.vue +88 -88
- package/src/base-client/components/his/HChart/index.md +798 -798
- package/src/base-client/components/his/XIcon/XIcon.vue +73 -73
- package/src/base-client/components/his/XIcon/index.js +3 -3
- package/src/base-client/components/his/XIcon/index.md +177 -177
- package/src-base-client/components/his/XCharge/README.md +0 -0
- package/src-base-client/components/his/XCharge/XCharge.vue +0 -0
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -154,7 +154,8 @@ defineExpose({
|
|
|
154
154
|
border-radius: 6px 6px 0 0;
|
|
155
155
|
color: #5D5C5C;
|
|
156
156
|
font-weight: bold;
|
|
157
|
-
width: 134px;
|
|
157
|
+
min-width: 134px;
|
|
158
|
+
width: auto;
|
|
158
159
|
font-size: 18px;
|
|
159
160
|
line-height: 26px;
|
|
160
161
|
font-family: "Source Han Sans";
|
|
@@ -162,17 +163,18 @@ defineExpose({
|
|
|
162
163
|
height: 32px;
|
|
163
164
|
text-align: center;
|
|
164
165
|
margin: 0 !important;
|
|
165
|
-
padding: 0 !important;
|
|
166
|
+
padding: 0 12px !important;
|
|
166
167
|
}
|
|
167
168
|
.ant-tabs-tab-active {
|
|
168
169
|
background-color: #0057FE;
|
|
169
170
|
color: #ffffff;
|
|
170
|
-
width: 134px;
|
|
171
|
+
min-width: 134px;
|
|
172
|
+
width: auto;
|
|
171
173
|
line-height: 26px;
|
|
172
174
|
height: 32px;
|
|
173
175
|
text-align: center;
|
|
174
176
|
margin: 0 !important;
|
|
175
|
-
padding: 0 !important;
|
|
177
|
+
padding: 0 12px !important;
|
|
176
178
|
}
|
|
177
179
|
}
|
|
178
180
|
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
:query-params-json="queryParamsJson"
|
|
67
67
|
:show-pagination="showPagination"
|
|
68
68
|
:customDelete="customDelete"
|
|
69
|
+
:autoSave="autoSave"
|
|
69
70
|
:extraHeight="extraHeight"
|
|
70
71
|
:serviceName="serviceName"
|
|
71
72
|
:pageMaxSize="realQueryConfig.queryPagesSize"
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
:query-params-json="queryParamsJson"
|
|
136
137
|
:show-pagination="showPagination"
|
|
137
138
|
:customDelete="customDelete"
|
|
139
|
+
:autoSave="autoSave"
|
|
138
140
|
:extraHeight="extraHeight"
|
|
139
141
|
:serviceName="serviceName"
|
|
140
142
|
:pageMaxSize="realQueryConfig.queryPagesSize"
|
|
@@ -208,17 +210,17 @@ import XAddReport from '@vue2-client/base-client/components/common/XAddReport'
|
|
|
208
210
|
import XTable from '@vue2-client/base-client/components/common/XTable'
|
|
209
211
|
import XTree from '@vue2-client/base-client/components/common/XTree'
|
|
210
212
|
import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
|
|
211
|
-
import {
|
|
213
|
+
import {Splitpanes, Pane} from 'splitpanes'
|
|
212
214
|
import 'splitpanes/dist/splitpanes.css'
|
|
213
215
|
import {
|
|
214
216
|
getConfigByName,
|
|
215
217
|
getConfigByLogic,
|
|
216
218
|
parseConfig, runLogic, getConfigByNameAsync,
|
|
217
219
|
} from '@vue2-client/services/api/common'
|
|
218
|
-
import {
|
|
220
|
+
import {mapState} from 'vuex'
|
|
219
221
|
import XTreePro from '@vue2-client/base-client/components/common/XTree/XTreePro.vue'
|
|
220
|
-
import {
|
|
221
|
-
import {
|
|
222
|
+
import {executeStrFunctionByContext} from '@vue2-client/utils/runEvalFunction'
|
|
223
|
+
import {getRealKeyData} from '@vue2-client/utils/util'
|
|
222
224
|
import * as util from '@vue2-client/utils/util'
|
|
223
225
|
import UserInfoDetailManage from '@vue2-client/pages/userInfoDetailManage/index.vue'
|
|
224
226
|
|
|
@@ -236,7 +238,7 @@ export default {
|
|
|
236
238
|
Splitpanes,
|
|
237
239
|
Pane
|
|
238
240
|
},
|
|
239
|
-
provide
|
|
241
|
+
provide() {
|
|
240
242
|
return {
|
|
241
243
|
getSelf: () => this,
|
|
242
244
|
emitEvent: this.emitEvent.bind(this)
|
|
@@ -282,7 +284,7 @@ export default {
|
|
|
282
284
|
currUser: {
|
|
283
285
|
default: () => {
|
|
284
286
|
console.warn('currUser is not provided.')
|
|
285
|
-
return {
|
|
287
|
+
return {id: null, name: 'Guest'}
|
|
286
288
|
},
|
|
287
289
|
},
|
|
288
290
|
|
|
@@ -302,7 +304,7 @@ export default {
|
|
|
302
304
|
}
|
|
303
305
|
}
|
|
304
306
|
},
|
|
305
|
-
data
|
|
307
|
+
data() {
|
|
306
308
|
return {
|
|
307
309
|
// 加载状态
|
|
308
310
|
loading: false,
|
|
@@ -417,6 +419,13 @@ export default {
|
|
|
417
419
|
return false
|
|
418
420
|
}
|
|
419
421
|
},
|
|
422
|
+
// 行编辑模式自动数据切换自动保存
|
|
423
|
+
autoSave: {
|
|
424
|
+
type: Boolean,
|
|
425
|
+
default: () => {
|
|
426
|
+
return false
|
|
427
|
+
}
|
|
428
|
+
},
|
|
420
429
|
// 行选择模式
|
|
421
430
|
rowSelectMode: {
|
|
422
431
|
type: Boolean,
|
|
@@ -519,24 +528,24 @@ export default {
|
|
|
519
528
|
},
|
|
520
529
|
watch: {
|
|
521
530
|
logicParam: {
|
|
522
|
-
handler
|
|
531
|
+
handler() {
|
|
523
532
|
this.initConfig()
|
|
524
533
|
},
|
|
525
534
|
deep: true
|
|
526
535
|
},
|
|
527
536
|
queryParamsJson: {
|
|
528
|
-
handler
|
|
537
|
+
handler() {
|
|
529
538
|
this.initConfig()
|
|
530
539
|
},
|
|
531
540
|
deep: true
|
|
532
541
|
},
|
|
533
542
|
queryParamsName: {
|
|
534
|
-
handler
|
|
543
|
+
handler() {
|
|
535
544
|
this.initConfig()
|
|
536
545
|
}
|
|
537
546
|
},
|
|
538
547
|
serviceName: {
|
|
539
|
-
handler
|
|
548
|
+
handler() {
|
|
540
549
|
this.initConfig()
|
|
541
550
|
}
|
|
542
551
|
}
|
|
@@ -546,20 +555,20 @@ export default {
|
|
|
546
555
|
getRealKeyData,
|
|
547
556
|
getConfigByNameAsync,
|
|
548
557
|
getConfigByName,
|
|
549
|
-
storePaneSize
|
|
558
|
+
storePaneSize(treeSize) {
|
|
550
559
|
localStorage.setItem('CURD::' + this.xTreeConfigName + '::TreeSize', treeSize[0].size)
|
|
551
560
|
},
|
|
552
|
-
customEvent
|
|
561
|
+
customEvent(func, data) {
|
|
553
562
|
this.$emit(func, data)
|
|
554
563
|
},
|
|
555
|
-
columnClick
|
|
564
|
+
columnClick(key, value, record) {
|
|
556
565
|
this.$emit('columnClick', key, value, record)
|
|
557
566
|
},
|
|
558
|
-
gotoUserDetail
|
|
567
|
+
gotoUserDetail(key, value, record) {
|
|
559
568
|
this.$refs.userInfo.init(getRealKeyData(record))
|
|
560
569
|
},
|
|
561
570
|
// 获取主表的数据内容,去掉主表别名
|
|
562
|
-
getPrimaryData
|
|
571
|
+
getPrimaryData(rows) {
|
|
563
572
|
const alias = this.realQueryConfig.tableAliasName // 获取主表的别名
|
|
564
573
|
const prefix = `${alias}_` // 构建前缀
|
|
565
574
|
const result = []
|
|
@@ -580,7 +589,7 @@ export default {
|
|
|
580
589
|
},
|
|
581
590
|
|
|
582
591
|
// 给数据区域添加主表数据,给的数据没有主表别名,放着时添加主表别名
|
|
583
|
-
pushPrimaryData
|
|
592
|
+
pushPrimaryData(rows) {
|
|
584
593
|
const alias = this.realQueryConfig.tableAliasName // 获取主表的别名
|
|
585
594
|
const prefix = `${alias}_` // 构建前缀
|
|
586
595
|
const result = rows.map(row => {
|
|
@@ -595,7 +604,7 @@ export default {
|
|
|
595
604
|
},
|
|
596
605
|
|
|
597
606
|
// 设置固定查询条件,主表别名自动带
|
|
598
|
-
setFixedQueryForm
|
|
607
|
+
setFixedQueryForm(data) {
|
|
599
608
|
const alias = this.realQueryConfig.tableAliasName // 获取主表的别名
|
|
600
609
|
const prefixedData = {}
|
|
601
610
|
|
|
@@ -607,10 +616,10 @@ export default {
|
|
|
607
616
|
Object.assign(this.fixedQueryForm, prefixedData)
|
|
608
617
|
},
|
|
609
618
|
|
|
610
|
-
importExcelOk
|
|
619
|
+
importExcelOk(data) {
|
|
611
620
|
this.$emit('importExcelOk', data)
|
|
612
621
|
},
|
|
613
|
-
initConfig
|
|
622
|
+
initConfig() {
|
|
614
623
|
this.loading = true
|
|
615
624
|
this.loadError = false
|
|
616
625
|
if (this.queryParamsName) {
|
|
@@ -625,7 +634,7 @@ export default {
|
|
|
625
634
|
}
|
|
626
635
|
},
|
|
627
636
|
|
|
628
|
-
getConfig
|
|
637
|
+
getConfig() {
|
|
629
638
|
getConfigByName(this.queryParamsName, this.serviceName, (res) => {
|
|
630
639
|
if (!res) {
|
|
631
640
|
this.loading = false
|
|
@@ -635,7 +644,7 @@ export default {
|
|
|
635
644
|
this.updateComponents(res)
|
|
636
645
|
}, this.env === 'dev')
|
|
637
646
|
},
|
|
638
|
-
getConfigBySource
|
|
647
|
+
getConfigBySource() {
|
|
639
648
|
parseConfig(this.queryParamsJson, 'CRUD_FORM', this.serviceName, this.env === 'dev').then(res => {
|
|
640
649
|
if (!res) {
|
|
641
650
|
this.loading = false
|
|
@@ -645,7 +654,7 @@ export default {
|
|
|
645
654
|
this.updateComponents(res, true)
|
|
646
655
|
})
|
|
647
656
|
},
|
|
648
|
-
getColumnJsonByLogic
|
|
657
|
+
getColumnJsonByLogic() {
|
|
649
658
|
getConfigByLogic(this.logicName, this.logicParam, this.serviceName, (res) => {
|
|
650
659
|
if (!res) {
|
|
651
660
|
this.loading = false
|
|
@@ -661,7 +670,7 @@ export default {
|
|
|
661
670
|
* @param res 参数
|
|
662
671
|
* @param setQueryParams 是否设置queryParams参数
|
|
663
672
|
*/
|
|
664
|
-
updateComponents
|
|
673
|
+
updateComponents(res, setQueryParams) {
|
|
665
674
|
this.realQueryConfig = res
|
|
666
675
|
// 读取表格展示模式配置
|
|
667
676
|
this.tableShowMode = res.tableShowMode || 'default'
|
|
@@ -693,6 +702,7 @@ export default {
|
|
|
693
702
|
buttonState: Object.assign(res.buttonState, this.buttonState),
|
|
694
703
|
title: this.title || res.title,
|
|
695
704
|
viewMode: this.viewMode,
|
|
705
|
+
autoSave: this.autoSave,
|
|
696
706
|
localEditMode: localEditMode,
|
|
697
707
|
rowSelectMode: this.rowSelectMode,
|
|
698
708
|
allowSelectRowNum: this.allowSelectRowNum,
|
|
@@ -735,7 +745,7 @@ export default {
|
|
|
735
745
|
this.loading = false
|
|
736
746
|
},
|
|
737
747
|
// 自定义按钮
|
|
738
|
-
editButtonStateDataClick
|
|
748
|
+
editButtonStateDataClick(functionName, rows) {
|
|
739
749
|
console.log('functionName', functionName)
|
|
740
750
|
console.log('rows', rows)
|
|
741
751
|
this.$emit(functionName, rows)
|
|
@@ -745,7 +755,7 @@ export default {
|
|
|
745
755
|
* 提交查询表单事件
|
|
746
756
|
* @param res 参数
|
|
747
757
|
*/
|
|
748
|
-
onSearchSubmit
|
|
758
|
+
onSearchSubmit(res) {
|
|
749
759
|
if (res.valid) {
|
|
750
760
|
// 如果是弹框模式,显示表单加载动画,不立即打开弹框
|
|
751
761
|
if (this.tableShowMode === 'popup') {
|
|
@@ -765,11 +775,11 @@ export default {
|
|
|
765
775
|
/**
|
|
766
776
|
* 关闭表格弹框
|
|
767
777
|
*/
|
|
768
|
-
closeTableModal
|
|
778
|
+
closeTableModal() {
|
|
769
779
|
this.tableModalVisible = false
|
|
770
780
|
},
|
|
771
781
|
|
|
772
|
-
active
|
|
782
|
+
active(props) {
|
|
773
783
|
let num = false
|
|
774
784
|
for (const key in props) {
|
|
775
785
|
// eslint-disable-next-line no-prototype-builtins
|
|
@@ -789,7 +799,7 @@ export default {
|
|
|
789
799
|
/**
|
|
790
800
|
* 提交新增/修改表单后事件
|
|
791
801
|
*/
|
|
792
|
-
onAddOrEditSubmitAfterSubmit
|
|
802
|
+
onAddOrEditSubmitAfterSubmit(res) {
|
|
793
803
|
this.refreshTable(res.businessType === '新增')
|
|
794
804
|
// commit
|
|
795
805
|
this.$emit('afterSubmit', res)
|
|
@@ -799,7 +809,7 @@ export default {
|
|
|
799
809
|
* @param res 参数(可能是 Promise)
|
|
800
810
|
* @param conditionParams 查询条件
|
|
801
811
|
*/
|
|
802
|
-
async afterQuery
|
|
812
|
+
async afterQuery(res, conditionParams) {
|
|
803
813
|
// 如果是弹框模式且正在查询中
|
|
804
814
|
if (this.tableShowMode === 'popup' && this.formQueryLoading) {
|
|
805
815
|
// 兼容 Promise
|
|
@@ -827,20 +837,20 @@ export default {
|
|
|
827
837
|
* @param actionType 操作类型
|
|
828
838
|
* @param fun 向上级传递的事件
|
|
829
839
|
*/
|
|
830
|
-
action
|
|
840
|
+
action(record, id, actionType, fun = 'action', index) {
|
|
831
841
|
this.$emit('innerXFormTableEmit', fun, record, id, actionType, index, this)
|
|
832
842
|
this.$emit(fun, record, id, actionType, index, this)
|
|
833
843
|
},
|
|
834
|
-
treeOnChecked
|
|
844
|
+
treeOnChecked(checkedKeys, deepNodes, deepKeys) {
|
|
835
845
|
this.$emit('treeOnChecked', checkedKeys, deepNodes, deepKeys)
|
|
836
846
|
},
|
|
837
|
-
treeBtnFuncClick
|
|
847
|
+
treeBtnFuncClick(index, func) {
|
|
838
848
|
this.$emit('treeBtnFuncClick', index, func)
|
|
839
849
|
},
|
|
840
850
|
/**
|
|
841
851
|
* 新增按钮事件
|
|
842
852
|
*/
|
|
843
|
-
add
|
|
853
|
+
add() {
|
|
844
854
|
if (this.customAdd) {
|
|
845
855
|
this.$emit('add')
|
|
846
856
|
} else {
|
|
@@ -851,7 +861,7 @@ export default {
|
|
|
851
861
|
}
|
|
852
862
|
}
|
|
853
863
|
},
|
|
854
|
-
addFormInit
|
|
864
|
+
addFormInit() {
|
|
855
865
|
const res = this.realQueryConfig
|
|
856
866
|
const localEditMode = !this.localEditMode ? res.localEditMode : this.localEditMode
|
|
857
867
|
this.$refs.xAddForm.init({
|
|
@@ -876,7 +886,7 @@ export default {
|
|
|
876
886
|
/**
|
|
877
887
|
* 添加按钮事件
|
|
878
888
|
*/
|
|
879
|
-
move
|
|
889
|
+
move() {
|
|
880
890
|
this.moveType = true
|
|
881
891
|
this.$nextTick(
|
|
882
892
|
() => {
|
|
@@ -891,7 +901,7 @@ export default {
|
|
|
891
901
|
* 修改按钮事件
|
|
892
902
|
* @param modifyModelData 修改表单数据
|
|
893
903
|
*/
|
|
894
|
-
edit
|
|
904
|
+
edit(modifyModelData) {
|
|
895
905
|
if (this.customEdit) {
|
|
896
906
|
this.$emit('edit')
|
|
897
907
|
} else {
|
|
@@ -919,7 +929,7 @@ export default {
|
|
|
919
929
|
/**
|
|
920
930
|
* 删除按钮事件
|
|
921
931
|
*/
|
|
922
|
-
del
|
|
932
|
+
del(keys, callback) {
|
|
923
933
|
if (this.customDelete) {
|
|
924
934
|
this.$emit('del', keys, callback)
|
|
925
935
|
}
|
|
@@ -928,14 +938,14 @@ export default {
|
|
|
928
938
|
* 删除后事件
|
|
929
939
|
* @param res
|
|
930
940
|
*/
|
|
931
|
-
afterDelete
|
|
941
|
+
afterDelete(res) {
|
|
932
942
|
this.$emit('afterDelete', res)
|
|
933
943
|
},
|
|
934
944
|
/**
|
|
935
945
|
* 行选择事件
|
|
936
946
|
* @param row 选中行
|
|
937
947
|
*/
|
|
938
|
-
rowChoose
|
|
948
|
+
rowChoose(row) {
|
|
939
949
|
this.$emit('rowChoose', row)
|
|
940
950
|
},
|
|
941
951
|
/**
|
|
@@ -943,13 +953,13 @@ export default {
|
|
|
943
953
|
* @param currRow 当前行
|
|
944
954
|
* @param defaultAppendRowData 默认追加的行数据
|
|
945
955
|
*/
|
|
946
|
-
validateTableAndSyncData
|
|
956
|
+
validateTableAndSyncData(currRow, defaultAppendRowData) {
|
|
947
957
|
this.$refs.xTable.validateTableAndSyncData(currRow, defaultAppendRowData)
|
|
948
958
|
},
|
|
949
959
|
/**
|
|
950
960
|
* 更多条件是否展示
|
|
951
961
|
*/
|
|
952
|
-
toggleAdvanced
|
|
962
|
+
toggleAdvanced() {
|
|
953
963
|
// 只有在非弹出模式下才需要调整表格滚动高度
|
|
954
964
|
if (this.tableShowMode !== 'popup') {
|
|
955
965
|
this.$refs.xTable.setScrollYHeight({})
|
|
@@ -958,7 +968,7 @@ export default {
|
|
|
958
968
|
/**
|
|
959
969
|
* 查询表单部分显示/隐藏切换
|
|
960
970
|
*/
|
|
961
|
-
toggleIsFormShow
|
|
971
|
+
toggleIsFormShow() {
|
|
962
972
|
this.toggleIsFormIcon = this.toggleIsFormIcon === 'vertical-align-top' ? 'vertical-align-bottom' : 'vertical-align-top'
|
|
963
973
|
this.$refs.xForm.toggleVisible()
|
|
964
974
|
// 只有在非弹出模式下才需要调整表格滚动高度
|
|
@@ -971,7 +981,7 @@ export default {
|
|
|
971
981
|
* @param selectedRowKeys 选中列Key集合
|
|
972
982
|
* @param selectedRows 选中列
|
|
973
983
|
*/
|
|
974
|
-
selectRow
|
|
984
|
+
selectRow(selectedRowKeys, selectedRows) {
|
|
975
985
|
this.table_selectedRowKeys = selectedRowKeys
|
|
976
986
|
this.table_selectedRows = selectedRows
|
|
977
987
|
this.$emit('selectRow', selectedRowKeys, selectedRows)
|
|
@@ -979,14 +989,14 @@ export default {
|
|
|
979
989
|
/**
|
|
980
990
|
* 清除勾选数据
|
|
981
991
|
*/
|
|
982
|
-
clearRowKeys
|
|
992
|
+
clearRowKeys() {
|
|
983
993
|
this.$refs.xTable.clearRowKeys()
|
|
984
994
|
},
|
|
985
995
|
/**
|
|
986
996
|
* 刷新表格
|
|
987
997
|
* @param toFirstPage 是否到第一页
|
|
988
998
|
*/
|
|
989
|
-
refreshTable
|
|
999
|
+
refreshTable(toFirstPage = true) {
|
|
990
1000
|
if (this.tableShowMode === 'popup') {
|
|
991
1001
|
this.formQueryLoading = true
|
|
992
1002
|
}
|
|
@@ -996,7 +1006,7 @@ export default {
|
|
|
996
1006
|
* 刷新表格
|
|
997
1007
|
* @param toFirstPage 是否到第一页
|
|
998
1008
|
*/
|
|
999
|
-
refresh
|
|
1009
|
+
refresh(toFirstPage = true) {
|
|
1000
1010
|
if (this.tableShowMode === 'popup') {
|
|
1001
1011
|
this.formQueryLoading = true
|
|
1002
1012
|
}
|
|
@@ -1005,7 +1015,7 @@ export default {
|
|
|
1005
1015
|
/**
|
|
1006
1016
|
* 主动传递条件查询表格
|
|
1007
1017
|
*/
|
|
1008
|
-
queryTable
|
|
1018
|
+
queryTable(conditionParams) {
|
|
1009
1019
|
if (this.tableShowMode === 'popup') {
|
|
1010
1020
|
this.formQueryLoading = true
|
|
1011
1021
|
}
|
|
@@ -1014,30 +1024,30 @@ export default {
|
|
|
1014
1024
|
/**
|
|
1015
1025
|
* 向外暴露 resetForm 函数
|
|
1016
1026
|
*/
|
|
1017
|
-
resetForm
|
|
1027
|
+
resetForm() {
|
|
1018
1028
|
this.$refs.xForm.resetForm()
|
|
1019
1029
|
},
|
|
1020
1030
|
/**
|
|
1021
1031
|
* 获取表格数据
|
|
1022
1032
|
*/
|
|
1023
|
-
getTableData
|
|
1033
|
+
getTableData() {
|
|
1024
1034
|
return this.$refs.xTable.getTableData()
|
|
1025
1035
|
},
|
|
1026
1036
|
// 在行编辑等情况下,让界面生效
|
|
1027
|
-
update
|
|
1037
|
+
update() {
|
|
1028
1038
|
this.getTableData().push(...[])
|
|
1029
1039
|
},
|
|
1030
1040
|
|
|
1031
1041
|
/**
|
|
1032
1042
|
* 设置表格数据
|
|
1033
1043
|
*/
|
|
1034
|
-
setTableData
|
|
1044
|
+
setTableData(data) {
|
|
1035
1045
|
this.$refs.xTable.setTableData(data)
|
|
1036
1046
|
},
|
|
1037
1047
|
/**
|
|
1038
1048
|
* 表单本地提交
|
|
1039
1049
|
*/
|
|
1040
|
-
onLocalSubmit
|
|
1050
|
+
onLocalSubmit(res, callback) {
|
|
1041
1051
|
const form = res.realForm
|
|
1042
1052
|
if (res.businessType === '新增') {
|
|
1043
1053
|
this.$refs.xTable.appendLocalData(form)
|
|
@@ -1050,25 +1060,25 @@ export default {
|
|
|
1050
1060
|
callback()
|
|
1051
1061
|
}
|
|
1052
1062
|
},
|
|
1053
|
-
emitFunc
|
|
1063
|
+
emitFunc(func, ...args) {
|
|
1054
1064
|
this.$emit(func, ...args)
|
|
1055
1065
|
this.$emit('getEmitFuncData', func, ...args)
|
|
1056
1066
|
},
|
|
1057
1067
|
// 直接转发事件的函数
|
|
1058
|
-
emitEvent
|
|
1068
|
+
emitEvent(event, ...args) {
|
|
1059
1069
|
this.$emit(event, ...args)
|
|
1060
1070
|
},
|
|
1061
1071
|
// 添加处理 rowClick 的方法
|
|
1062
|
-
handleRowClick
|
|
1072
|
+
handleRowClick(record) {
|
|
1063
1073
|
this.$emit('rowClick', record)
|
|
1064
1074
|
},
|
|
1065
|
-
handleRowDblClick
|
|
1075
|
+
handleRowDblClick(record) {
|
|
1066
1076
|
this.$emit('rowDblClick', record)
|
|
1067
1077
|
},
|
|
1068
|
-
beforeDataChange
|
|
1078
|
+
beforeDataChange(record) {
|
|
1069
1079
|
this.$emit('beforeDataChange', record)
|
|
1070
1080
|
},
|
|
1071
|
-
onExpand
|
|
1081
|
+
onExpand(expanded, record) {
|
|
1072
1082
|
this.$emit('expand', expanded, record)
|
|
1073
1083
|
}
|
|
1074
1084
|
},
|
|
@@ -1076,7 +1086,7 @@ export default {
|
|
|
1076
1086
|
/**
|
|
1077
1087
|
* 实现doAction方法
|
|
1078
1088
|
*/
|
|
1079
|
-
doAction
|
|
1089
|
+
doAction(actionType, args, data) {
|
|
1080
1090
|
switch (actionType) {
|
|
1081
1091
|
case 'refreshTable':
|
|
1082
1092
|
for (const item in args) {
|
|
@@ -1088,7 +1098,7 @@ export default {
|
|
|
1088
1098
|
}
|
|
1089
1099
|
}
|
|
1090
1100
|
},
|
|
1091
|
-
mounted
|
|
1101
|
+
mounted() {
|
|
1092
1102
|
if (!this.isMounted) {
|
|
1093
1103
|
// 防止多次调用
|
|
1094
1104
|
// 不知道为啥他会执行两次 mounted 暂时处理方式
|
|
@@ -1109,8 +1119,8 @@ export default {
|
|
|
1109
1119
|
Object.assign(this.fixedAddForm, data)
|
|
1110
1120
|
Object.assign(this.fixedQueryForm, data)
|
|
1111
1121
|
} else {
|
|
1112
|
-
Object.assign(this.fixedAddForm, {
|
|
1113
|
-
Object.assign(this.fixedQueryForm, {
|
|
1122
|
+
Object.assign(this.fixedAddForm, {selected_id: selectedId})
|
|
1123
|
+
Object.assign(this.fixedQueryForm, {selected_id: selectedId})
|
|
1114
1124
|
}
|
|
1115
1125
|
}
|
|
1116
1126
|
}
|
|
@@ -1125,6 +1135,7 @@ export default {
|
|
|
1125
1135
|
line-height: 32px;
|
|
1126
1136
|
margin-bottom: 12px;
|
|
1127
1137
|
}
|
|
1138
|
+
|
|
1128
1139
|
// 表格行样式类型
|
|
1129
1140
|
.ant-table-tbody {
|
|
1130
1141
|
// 成功样式 - 绿色 (#52c41a)
|
|
@@ -1155,13 +1166,13 @@ export default {
|
|
|
1155
1166
|
|
|
1156
1167
|
// 警告样式 - 黄色 (#faad14)
|
|
1157
1168
|
.ant-table-row-warning {
|
|
1158
|
-
background-color: rgba(250, 173, 20, 0.1)
|
|
1169
|
+
background-color: rgba(250, 173, 20, 0.1);
|
|
1159
1170
|
|
|
1160
1171
|
&:hover {
|
|
1161
|
-
background-color: rgba(250, 173, 20, 0.15)
|
|
1172
|
+
background-color: rgba(250, 173, 20, 0.15);
|
|
1162
1173
|
|
|
1163
1174
|
td {
|
|
1164
|
-
background-color: transparent
|
|
1175
|
+
background-color: transparent;
|
|
1165
1176
|
}
|
|
1166
1177
|
}
|
|
1167
1178
|
|
|
@@ -1175,65 +1186,65 @@ export default {
|
|
|
1175
1186
|
}
|
|
1176
1187
|
|
|
1177
1188
|
td {
|
|
1178
|
-
background-color: transparent
|
|
1189
|
+
background-color: transparent;
|
|
1179
1190
|
}
|
|
1180
1191
|
}
|
|
1181
1192
|
|
|
1182
1193
|
// 错误样式 - 红色 (#f5222f)
|
|
1183
1194
|
.ant-table-row-error {
|
|
1184
|
-
background-color: rgba(245, 34, 47, 0.1)
|
|
1195
|
+
background-color: rgba(245, 34, 47, 0.1);
|
|
1185
1196
|
|
|
1186
1197
|
&:hover {
|
|
1187
|
-
background-color: rgba(245, 34, 47, 0.15)
|
|
1198
|
+
background-color: rgba(245, 34, 47, 0.15);
|
|
1188
1199
|
|
|
1189
1200
|
td {
|
|
1190
|
-
background-color: transparent
|
|
1201
|
+
background-color: transparent;
|
|
1191
1202
|
}
|
|
1192
1203
|
}
|
|
1193
1204
|
|
|
1194
1205
|
// 选中状态
|
|
1195
1206
|
&.ant-table-row-selected {
|
|
1196
|
-
background-color: rgba(245, 34, 47, 0.2)
|
|
1207
|
+
background-color: rgba(245, 34, 47, 0.2);
|
|
1197
1208
|
|
|
1198
1209
|
td {
|
|
1199
|
-
background-color: transparent
|
|
1210
|
+
background-color: transparent;
|
|
1200
1211
|
}
|
|
1201
1212
|
}
|
|
1202
1213
|
|
|
1203
1214
|
td {
|
|
1204
|
-
background-color: transparent
|
|
1215
|
+
background-color: transparent;
|
|
1205
1216
|
}
|
|
1206
1217
|
}
|
|
1207
1218
|
|
|
1208
1219
|
// 魔法样式 - 紫色
|
|
1209
1220
|
.ant-table-row-magic {
|
|
1210
|
-
background-color: rgba(114, 46, 209, 0.1)
|
|
1221
|
+
background-color: rgba(114, 46, 209, 0.1);
|
|
1211
1222
|
|
|
1212
1223
|
&:hover {
|
|
1213
|
-
background-color: rgba(114, 46, 209, 0.15)
|
|
1224
|
+
background-color: rgba(114, 46, 209, 0.15);
|
|
1214
1225
|
|
|
1215
1226
|
td {
|
|
1216
|
-
background-color: transparent
|
|
1227
|
+
background-color: transparent;
|
|
1217
1228
|
}
|
|
1218
1229
|
}
|
|
1219
1230
|
|
|
1220
1231
|
// 选中状态
|
|
1221
1232
|
&.ant-table-row-selected {
|
|
1222
|
-
background-color: rgba(114, 46, 209, 0.2)
|
|
1233
|
+
background-color: rgba(114, 46, 209, 0.2);
|
|
1223
1234
|
|
|
1224
1235
|
td {
|
|
1225
|
-
background-color: transparent
|
|
1236
|
+
background-color: transparent;
|
|
1226
1237
|
}
|
|
1227
1238
|
}
|
|
1228
1239
|
|
|
1229
1240
|
td {
|
|
1230
|
-
background-color: transparent
|
|
1241
|
+
background-color: transparent;
|
|
1231
1242
|
}
|
|
1232
1243
|
}
|
|
1233
1244
|
|
|
1234
1245
|
// 默认选中状态(没有特殊行样式时)
|
|
1235
1246
|
.ant-table-row-selected:not(.ant-table-row-success):not(.ant-table-row-warning):not(.ant-table-row-error):not(.ant-table-row-magic) {
|
|
1236
|
-
background-color: rgba(24, 144, 255, 0.1)
|
|
1247
|
+
background-color: rgba(24, 144, 255, 0.1);
|
|
1237
1248
|
}
|
|
1238
1249
|
}
|
|
1239
1250
|
</style>
|