sohelp-eleplus 1.1.22 → 1.1.25
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/components.js +1 -0
- package/http/CrudHttp.js +18 -32
- package/http/SohelpHttp.js +21 -21
- package/package.json +1 -1
- package/sohelp-dict/index.vue +79 -50
- package/sohelp-dyn-select/index.vue +2 -2
- package/sohelp-entity-form/index.vue +5 -1
- package/sohelp-grid/index.vue +216 -172
- package/sohelp-grid/js/DefaultGridOptions.js +1 -1
- package/sohelp-grid/js/DefaultProps.js +5 -1
- package/sohelp-grid/js/useSohelpGridConfig.js +7 -6
- package/sohelp-grid-view/index.vue +62 -2
- package/sohelp-image-upload/index.vue +8 -2
- package/sohelp-import/index.vue +372 -365
- package/sohelp-pro-form/components/pro-form-item.vue +7 -5
- package/sohelp-pro-form/index.vue +6 -0
- package/sohelp-rate/index.vue +12 -8
- package/sohelp-select/index.vue +18 -21
- package/sohelp-table/index.vue +113 -115
- package/sohelp-table-select/index.vue +358 -0
- package/sohelp-vform-eleplus/render.es.js +0 -1
- package/sohelp-vxe-table/index.vue +20 -32
- package/sohelp-workflow-drawer/components/form.vue +1 -1
- package/sohelp-workflow-drawer/components/table.vue +0 -1
- package/sohelp-workflow-drawer/components/timeline.vue +2 -2
- package/sohelp-workflow-drawer/components/workflow.vue +28 -0
- package/sohelp-workflow-drawer/index.vue +189 -200
package/sohelp-grid/index.vue
CHANGED
|
@@ -35,7 +35,7 @@ const { t } = useI18n();
|
|
|
35
35
|
const { mobile } = useMobile();
|
|
36
36
|
const permission = usePermission();
|
|
37
37
|
const props = defineProps({ ...JSON.parse(JSON.stringify(DefaultProps)) });
|
|
38
|
-
const emit = defineEmits(["resetFilter", "checkboxAll", "checkboxChange", "toolbarButtonClick", "operationButtonClick", "menuRightClick", "showFilter", "editClosed", "currentColumnChange"]);
|
|
38
|
+
const emit = defineEmits(["resetFilter", "checkboxAll", "checkboxChange","radioChange", "toolbarButtonClick", "operationButtonClick", "menuRightClick", "showFilter", "editClosed", "currentColumnChange"]);
|
|
39
39
|
const drawerKey = ref(0);
|
|
40
40
|
const todoDrawerRef = ref(null);
|
|
41
41
|
const drawerVisible = ref(false);
|
|
@@ -57,6 +57,17 @@ const getId = () => {
|
|
|
57
57
|
return 'sohelp-grid-' + uuid();
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/** 对齐方式映射 */
|
|
61
|
+
const getAlign = (align) => {
|
|
62
|
+
const alignMap = {
|
|
63
|
+
'left': 'flex-start',
|
|
64
|
+
'center': 'center',
|
|
65
|
+
'right': 'flex-end',
|
|
66
|
+
'': 'flex-start'
|
|
67
|
+
};
|
|
68
|
+
return alignMap[align] || 'flex-start';
|
|
69
|
+
}
|
|
70
|
+
|
|
60
71
|
const loadReport = () => {
|
|
61
72
|
SohelpHttp.get("/engine/web/report/list", { refid: props.refid }).then(res => {
|
|
62
73
|
if (res.meta.success) {
|
|
@@ -120,7 +131,7 @@ const saveEntityForm = async () => {
|
|
|
120
131
|
const v = await entityFormRef.value.validate();
|
|
121
132
|
if(v){
|
|
122
133
|
loading.value = true;
|
|
123
|
-
entityFormRef.value.save(
|
|
134
|
+
entityFormRef.value.save(props.saveParams, (res) => {
|
|
124
135
|
loading.value = false;
|
|
125
136
|
if (res.meta.success) {
|
|
126
137
|
refresh();
|
|
@@ -129,7 +140,7 @@ const saveEntityForm = async () => {
|
|
|
129
140
|
EleMessage.error(res.meta.message);
|
|
130
141
|
}
|
|
131
142
|
});
|
|
132
|
-
}
|
|
143
|
+
}
|
|
133
144
|
};
|
|
134
145
|
|
|
135
146
|
//配置加载状态
|
|
@@ -450,6 +461,8 @@ const loadConfig = (param = {}) => {
|
|
|
450
461
|
//工具栏按钮权限
|
|
451
462
|
Object.assign(formulaMap, config.formulaMap);
|
|
452
463
|
Object.assign(gridOptions, config.gridOptions);
|
|
464
|
+
|
|
465
|
+
|
|
453
466
|
// 过滤位置
|
|
454
467
|
config.sohelpConfig.filter.config._visibleFilter = config.sohelpConfig?.filter.config.visibleFilter || false;
|
|
455
468
|
sohelpConfig.value = { ...config.sohelpConfig };
|
|
@@ -524,13 +537,10 @@ const load = async (params = {}, callback) => {
|
|
|
524
537
|
|
|
525
538
|
if (res?.meta?.success) {
|
|
526
539
|
if (res.data) {
|
|
527
|
-
gridOptions.pagerConfig.total = Number(res.data?.total);
|
|
528
|
-
|
|
529
|
-
const _data = res.data?.results || res.data || [];
|
|
540
|
+
gridOptions.pagerConfig.total = Number(res.data?.total);
|
|
530
541
|
|
|
542
|
+
const _data = res.data?.results || res.data || [];
|
|
531
543
|
Object.assign(gridData, JSON.parse(JSON.stringify(_data)));
|
|
532
|
-
|
|
533
|
-
|
|
534
544
|
gridValue.value = switchGridValue(_data);
|
|
535
545
|
$grid.loadData(gridValue.value);
|
|
536
546
|
Object.assign(summaryData, res.data?.summary || {});
|
|
@@ -552,18 +562,15 @@ const load = async (params = {}, callback) => {
|
|
|
552
562
|
}
|
|
553
563
|
}
|
|
554
564
|
|
|
565
|
+
emit('pageChange', gridOptions.pagerConfig);
|
|
555
566
|
};
|
|
556
567
|
|
|
557
568
|
/**
|
|
558
569
|
* 重新加载数据
|
|
559
570
|
*/
|
|
560
571
|
const reload = async (params = {}) => {
|
|
561
|
-
//取消选中
|
|
562
|
-
selections.value = [];
|
|
563
|
-
sohelpVxeGridRef.value?.clearCheckboxRow();
|
|
564
|
-
|
|
565
572
|
Object.assign(gridOptions.params, params);
|
|
566
|
-
load(gridOptions.params);
|
|
573
|
+
await load(gridOptions.params);
|
|
567
574
|
};
|
|
568
575
|
|
|
569
576
|
|
|
@@ -612,11 +619,12 @@ const updateSummary = (data, summaryMap = {}) => {
|
|
|
612
619
|
/**
|
|
613
620
|
* 分页事件
|
|
614
621
|
*/
|
|
615
|
-
const pageChangeEvent = (page) => {
|
|
622
|
+
const pageChangeEvent = async (page) => {
|
|
616
623
|
isPage.value = true;
|
|
617
624
|
gridOptions.pagerConfig.currentPage = page.currentPage;
|
|
618
625
|
gridOptions.pagerConfig.pageSize = page.pageSize;
|
|
619
|
-
reload();
|
|
626
|
+
await reload();
|
|
627
|
+
emit('pageChange',gridOptions.pagerConfig)
|
|
620
628
|
};
|
|
621
629
|
|
|
622
630
|
|
|
@@ -635,12 +643,14 @@ const getOperationButtonsByType = computed(() => {
|
|
|
635
643
|
} else {
|
|
636
644
|
common = common.filter(f => (f.code != "workflow.submit" || f.code != "workflow.view"));
|
|
637
645
|
}
|
|
638
|
-
return common.map((
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
646
|
+
return common.map((button) => {
|
|
647
|
+
// 创建新对象,避免修改原按钮配置
|
|
648
|
+
const newButton = { ...button };
|
|
649
|
+
if(newButton.render && newButton.render?.length > 0) {
|
|
650
|
+
const func = new Function("$row","$button","$column","$grid", `return (async () => { ${newButton.render} })()`);
|
|
651
|
+
func.call(undefined, row, newButton, column, $grid);
|
|
642
652
|
}
|
|
643
|
-
return
|
|
653
|
+
return newButton;
|
|
644
654
|
});
|
|
645
655
|
}
|
|
646
656
|
return [];
|
|
@@ -652,14 +662,15 @@ const getOperationButtonsByType = computed(() => {
|
|
|
652
662
|
* @param row
|
|
653
663
|
* @param item
|
|
654
664
|
*/
|
|
655
|
-
const operationHandler = ({
|
|
665
|
+
const operationHandler = ({ button, row, $grid }) => {
|
|
666
|
+
|
|
656
667
|
|
|
657
668
|
//操作栏事件执行
|
|
658
669
|
$grid.reload = reload;
|
|
659
670
|
$grid.refresh = refresh;
|
|
660
|
-
if (
|
|
671
|
+
if (button.handler && typeof button.handler === "string") {
|
|
661
672
|
try {
|
|
662
|
-
const func = new Function("row", "$grid", `return (async () => { ${
|
|
673
|
+
const func = new Function("$row", "$grid", `return (async () => { ${button.handler} })()`);
|
|
663
674
|
(async () => {
|
|
664
675
|
const context = {
|
|
665
676
|
$message: EleMessage,
|
|
@@ -681,22 +692,22 @@ const operationHandler = ({ item, row, $grid }) => {
|
|
|
681
692
|
} catch (e) {
|
|
682
693
|
EleMessage.error(`操作栏事件出错:${e.message}`);
|
|
683
694
|
}
|
|
684
|
-
} else if (
|
|
685
|
-
if (
|
|
686
|
-
window.$SohelpModule.openTab(
|
|
687
|
-
} else if (
|
|
688
|
-
window.$SohelpModule.openDrawer(
|
|
695
|
+
} else if (button.refid) {
|
|
696
|
+
if (button.openType === "tab") {
|
|
697
|
+
window.$SohelpModule.openTab(button.refid, { id: row.id }, button.params || {});
|
|
698
|
+
} else if (button.openType === "drawer") {
|
|
699
|
+
window.$SohelpModule.openDrawer(button.refid, { id: row.id }, button.params || {});
|
|
689
700
|
} else {
|
|
690
|
-
window.$SohelpModule.openModal(
|
|
701
|
+
window.$SohelpModule.openModal(button.refid, { id: row.id }, button.params || {});
|
|
691
702
|
}
|
|
692
703
|
} else {
|
|
693
|
-
switch (
|
|
704
|
+
switch (button.code) {
|
|
694
705
|
case "row.delete":
|
|
695
706
|
$grid?.remove(row)
|
|
696
707
|
break;
|
|
697
708
|
case "crud.edit":
|
|
698
709
|
visibleEntityForm.value = true;
|
|
699
|
-
toolbarButtonParams.value =
|
|
710
|
+
toolbarButtonParams.value = button.params || {};
|
|
700
711
|
if (!toolbarButtonParams.value["title"]) {
|
|
701
712
|
toolbarButtonParams.value["title"] = t("grid.toolbar.edit");
|
|
702
713
|
}
|
|
@@ -717,7 +728,7 @@ const operationHandler = ({ item, row, $grid }) => {
|
|
|
717
728
|
break;
|
|
718
729
|
case "crud.view":
|
|
719
730
|
visibleEntityForm.value = true;
|
|
720
|
-
toolbarButtonParams.value =
|
|
731
|
+
toolbarButtonParams.value = button.params || {};
|
|
721
732
|
if (!toolbarButtonParams.value["title"]) {
|
|
722
733
|
toolbarButtonParams.value["title"] = t("grid.toolbar.view");
|
|
723
734
|
}
|
|
@@ -753,9 +764,10 @@ const operationHandler = ({ item, row, $grid }) => {
|
|
|
753
764
|
break;
|
|
754
765
|
}
|
|
755
766
|
}
|
|
756
|
-
emit("operationButtonClick", {
|
|
767
|
+
emit("operationButtonClick", { button, row, $grid });
|
|
757
768
|
};
|
|
758
769
|
|
|
770
|
+
|
|
759
771
|
/**
|
|
760
772
|
* 获取表格数据
|
|
761
773
|
*/
|
|
@@ -920,11 +932,18 @@ const textareaCancel = () => {
|
|
|
920
932
|
/**
|
|
921
933
|
* checkbox复选框
|
|
922
934
|
*/
|
|
923
|
-
const onCheckboxChange = () => {
|
|
935
|
+
const onCheckboxChange = (checked, type) => {
|
|
924
936
|
selections.value = sohelpVxeGridRef.value?.getCheckboxRecords() || [];
|
|
925
|
-
emit("checkbox-change", selections.value);
|
|
937
|
+
emit("checkbox-change", selections.value, checked, type);
|
|
926
938
|
};
|
|
927
939
|
|
|
940
|
+
/**
|
|
941
|
+
*
|
|
942
|
+
*/
|
|
943
|
+
const radioChange = (config) => {
|
|
944
|
+
emit('radio-change', config)
|
|
945
|
+
}
|
|
946
|
+
|
|
928
947
|
|
|
929
948
|
/**
|
|
930
949
|
* 确定 SohelpTextareaInput 弹窗
|
|
@@ -1141,8 +1160,7 @@ const gridEvents = {
|
|
|
1141
1160
|
toolbarButtonClick(config) {
|
|
1142
1161
|
toolbarClick(config);
|
|
1143
1162
|
emit("toolbarButtonClick", config, selections.value);
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1163
|
+
},
|
|
1146
1164
|
};
|
|
1147
1165
|
|
|
1148
1166
|
/**
|
|
@@ -1236,13 +1254,6 @@ const filterVisible = ({ column, field, visible }) => {
|
|
|
1236
1254
|
}]);
|
|
1237
1255
|
}
|
|
1238
1256
|
|
|
1239
|
-
// $grid.updateFilterOptionStatus({
|
|
1240
|
-
// label: field,
|
|
1241
|
-
// value: "123",
|
|
1242
|
-
// data: 456
|
|
1243
|
-
// }, true);
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
1257
|
}
|
|
1247
1258
|
};
|
|
1248
1259
|
|
|
@@ -1487,6 +1498,39 @@ const settingClick = (command) => {
|
|
|
1487
1498
|
window.open(url[command],'_blank');
|
|
1488
1499
|
}
|
|
1489
1500
|
}
|
|
1501
|
+
/**
|
|
1502
|
+
* 设置复选框行键
|
|
1503
|
+
* @param row 行数据
|
|
1504
|
+
* @param checked 是否选中
|
|
1505
|
+
*/
|
|
1506
|
+
const setCheckboxRowKey = (row, checked) => {
|
|
1507
|
+
nextTick(() => {
|
|
1508
|
+
sohelpVxeGridRef.value?.setCheckboxRowKey(row, checked);
|
|
1509
|
+
})
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
const setRadioRowKey = (key, checked) => {
|
|
1514
|
+
nextTick(() => {
|
|
1515
|
+
sohelpVxeGridRef.value?.setRadioRowKey(key, checked);
|
|
1516
|
+
})
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* 获取选中的记录
|
|
1521
|
+
*/
|
|
1522
|
+
const getCheckboxRecords = () => {
|
|
1523
|
+
return sohelpVxeGridRef.value?.getCheckboxRecords();
|
|
1524
|
+
};
|
|
1525
|
+
/**
|
|
1526
|
+
* 获取保留的记录
|
|
1527
|
+
*/
|
|
1528
|
+
const getCheckboxReserveRecords = (isFull="false") => {
|
|
1529
|
+
return sohelpVxeGridRef.value?.getCheckboxReserveRecords(isFull);
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
|
|
1490
1534
|
|
|
1491
1535
|
/**
|
|
1492
1536
|
* 监听是否被选中,更新工具栏批量操作
|
|
@@ -1511,6 +1555,8 @@ watch(
|
|
|
1511
1555
|
immediate: true
|
|
1512
1556
|
});
|
|
1513
1557
|
|
|
1558
|
+
|
|
1559
|
+
|
|
1514
1560
|
defineExpose({
|
|
1515
1561
|
getData,
|
|
1516
1562
|
getCrudUpdater,
|
|
@@ -1520,6 +1566,10 @@ defineExpose({
|
|
|
1520
1566
|
reload,
|
|
1521
1567
|
load,
|
|
1522
1568
|
validate,
|
|
1569
|
+
setCheckboxRowKey,
|
|
1570
|
+
getCheckboxRecords,
|
|
1571
|
+
getCheckboxReserveRecords,
|
|
1572
|
+
setRadioRowKey,
|
|
1523
1573
|
selections
|
|
1524
1574
|
});
|
|
1525
1575
|
</script>
|
|
@@ -1529,8 +1579,11 @@ defineExpose({
|
|
|
1529
1579
|
v-bind="gridOptions"
|
|
1530
1580
|
ref="sohelpVxeGridRef"
|
|
1531
1581
|
@menuClick="menuRightClick"
|
|
1532
|
-
|
|
1533
|
-
@
|
|
1582
|
+
|
|
1583
|
+
@checkboxChange="({checked}) => onCheckboxChange(checked,'row')"
|
|
1584
|
+
@checkboxAll="({checked}) => onCheckboxChange(checked,'all')"
|
|
1585
|
+
@radioChange="radioChange"
|
|
1586
|
+
|
|
1534
1587
|
class="sohelp-grid-view"
|
|
1535
1588
|
:id="getId()"
|
|
1536
1589
|
v-on="gridEvents"
|
|
@@ -1607,7 +1660,7 @@ v-for="field in Object.values(propertiesMap).filter(item => item.query)" :key="f
|
|
|
1607
1660
|
<sohelp-power @change="changePower" v-if="sohelpConfig?.filter?.config?.visibleDataRange"/>
|
|
1608
1661
|
</div>
|
|
1609
1662
|
|
|
1610
|
-
<div class="search-box" v-if="sohelpConfig?.filter?.config?.visibleKeywords">
|
|
1663
|
+
<div class="search-box" v-if="sohelpConfig?.filter?.config?.visibleKeywords && sohelpConfig?.filter?.keywords.length>0 ">
|
|
1611
1664
|
<!-- 关键字 -->
|
|
1612
1665
|
<ele-tooltip :content="getKeywordsPlaceholder" placement="top" :offset="3">
|
|
1613
1666
|
<sohelp-input
|
|
@@ -1646,16 +1699,16 @@ v-for="item in sortList" :key="item.title" :header="item.title"
|
|
|
1646
1699
|
</ele-card>
|
|
1647
1700
|
</div>
|
|
1648
1701
|
</sohelp-drop-card>
|
|
1649
|
-
<el-button
|
|
1650
|
-
|
|
1651
|
-
|
|
1702
|
+
<el-button :icon="Filter" size="small"
|
|
1703
|
+
@click="showFilter()"
|
|
1704
|
+
plain
|
|
1652
1705
|
:type="(sohelpConfig?.filter?.config?.visibleFilter && sohelpConfig?.filter?.config?.filterPosition !== 'NONE')?'primary':''"
|
|
1653
1706
|
v-if="sohelpConfig?.filter?.config?._visibleFilter"/>
|
|
1654
|
-
<ele-tooltip :content="'批量导入数据'" placement="top" :offset="3">
|
|
1655
|
-
<el-button size="small" plain :icon="ElementPlusIcons.Upload" @click="openImport"
|
|
1707
|
+
<ele-tooltip :content="'批量导入数据'" placement="top" :offset="3" v-permission="importAuthority">
|
|
1708
|
+
<el-button size="small" plain :icon="ElementPlusIcons.Upload" @click="openImport" />
|
|
1656
1709
|
</ele-tooltip>
|
|
1657
|
-
<ele-tooltip :content="'批量导出数据'" placement="top" :offset="3">
|
|
1658
|
-
<el-dropdown @command="exportData"
|
|
1710
|
+
<ele-tooltip :content="'批量导出数据'" placement="top" :offset="3" v-permission="exportAuthority">
|
|
1711
|
+
<el-dropdown @command="exportData" >
|
|
1659
1712
|
<el-button size="small" plain :icon="ElementPlusIcons.Download"/>
|
|
1660
1713
|
<template #dropdown>
|
|
1661
1714
|
<el-dropdown-menu>
|
|
@@ -1686,103 +1739,105 @@ v-for="item in sortList" :key="item.title" :header="item.title"
|
|
|
1686
1739
|
#[`default_${name}`]="{ row, column, rowIndex }"
|
|
1687
1740
|
:key="name"
|
|
1688
1741
|
>
|
|
1742
|
+
<div style=" display: flex; justify-content: right;" :style="{ justifyContent: getAlign(propertiesMap[name].align)}">
|
|
1743
|
+
|
|
1744
|
+
<!-- 字典 -->
|
|
1745
|
+
<sohelp-dict
|
|
1746
|
+
type="text"
|
|
1747
|
+
v-model="row[name]"
|
|
1748
|
+
v-if="column.type === 'SohelpDict'"
|
|
1749
|
+
v-bind="column.editRender"
|
|
1750
|
+
/>
|
|
1751
|
+
<!-- 图片 -->
|
|
1752
|
+
<sohelp-image-upload
|
|
1753
|
+
v-else-if="column.type === 'SohelpImageUpload'"
|
|
1754
|
+
v-model="row[name]"
|
|
1755
|
+
v-bind="column.editRender"
|
|
1756
|
+
:data="getCellValue(rowIndex,name)"
|
|
1757
|
+
:readonly="!column.editRender.edit"
|
|
1758
|
+
/>
|
|
1759
|
+
<!-- 附件 -->
|
|
1760
|
+
<sohelp-file-upload
|
|
1761
|
+
v-else-if="column.type === 'SohelpFileUpload'"
|
|
1762
|
+
v-model="row[name]"
|
|
1763
|
+
v-bind="column.editRender"
|
|
1764
|
+
:data="getCellValue(rowIndex,name)"
|
|
1765
|
+
:readonly="!column.editRender.edit"
|
|
1766
|
+
/>
|
|
1689
1767
|
|
|
1768
|
+
<!-- 下拉选择表格 -->
|
|
1769
|
+
<div v-else-if="column.type === 'SohelpTableSelect' || column.type === 'ORG' || column.type ==='USER'">
|
|
1770
|
+
<span>{{ getTableSelectLabel(row[name], rowIndex, name, column) }}</span>
|
|
1771
|
+
</div>
|
|
1690
1772
|
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
v-model="row[name]"
|
|
1702
|
-
v-bind="column.editRender"
|
|
1703
|
-
:data="getCellValue(rowIndex,name)"
|
|
1704
|
-
:readonly="!column.editRender.edit"/>
|
|
1705
|
-
<!-- 附件 -->
|
|
1706
|
-
<sohelp-file-upload
|
|
1707
|
-
v-else-if="column.type === 'SohelpFileUpload'"
|
|
1708
|
-
v-model="row[name]"
|
|
1709
|
-
v-bind="column.editRender"
|
|
1710
|
-
:data="getCellValue(rowIndex,name)"
|
|
1711
|
-
:readonly="!column.editRender.edit"/>
|
|
1712
|
-
|
|
1713
|
-
<!-- 下拉选择表格 -->
|
|
1714
|
-
<div v-else-if="column.type === 'SohelpTableSelect' || column.type === 'ORG' || column.type ==='USER'">
|
|
1715
|
-
<span>{{ getTableSelectLabel(row[name], rowIndex, name, column) }}</span>
|
|
1716
|
-
</div>
|
|
1717
|
-
|
|
1718
|
-
<!-- 评分 -->
|
|
1719
|
-
<sohelp-rate
|
|
1720
|
-
v-else-if="column.type==='SohelpRate'"
|
|
1721
|
-
v-model="row[name]"
|
|
1722
|
-
v-bind="column.editRender"
|
|
1723
|
-
:disabled="!column.editRender.edit"
|
|
1724
|
-
show-score
|
|
1725
|
-
score-template="{value} 分"
|
|
1726
|
-
style="width: 100%;"
|
|
1727
|
-
/>
|
|
1728
|
-
|
|
1729
|
-
<!-- 进度 -->
|
|
1730
|
-
<sohelp-process
|
|
1731
|
-
v-else-if="column.type==='SohelpProcess'"
|
|
1732
|
-
v-model="row[name]"
|
|
1733
|
-
v-bind="column.editRender"
|
|
1734
|
-
style="width: 100%"
|
|
1735
|
-
:readonly="!column.editRender.edit"
|
|
1736
|
-
/>
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
<!-- 下拉用户选择 -->
|
|
1740
|
-
<div v-else-if="column.type === 'SohelpUserSelect'">
|
|
1741
|
-
{{ gridData[rowIndex][name]?.["user_name"] }}
|
|
1742
|
-
</div>
|
|
1743
|
-
|
|
1744
|
-
<!-- 下拉组织选择 -->
|
|
1745
|
-
<div v-else-if="column.type === 'SohelpOrgTreeSelect'">
|
|
1746
|
-
{{ gridData[rowIndex][name]?.["org_name"] }}
|
|
1747
|
-
</div>
|
|
1773
|
+
<!-- 评分 -->
|
|
1774
|
+
<sohelp-rate
|
|
1775
|
+
v-else-if="column.type==='SohelpRate'"
|
|
1776
|
+
v-model="row[name]"
|
|
1777
|
+
v-bind="column.editRender"
|
|
1778
|
+
:disabled="!column.editRender.edit"
|
|
1779
|
+
show-score
|
|
1780
|
+
score-template="{value} 分"
|
|
1781
|
+
style="min-width: 150px"
|
|
1782
|
+
/>
|
|
1748
1783
|
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
{{ !!row[name] ? "V" : "" }}
|
|
1753
|
-
</span>
|
|
1754
|
-
<sohelp-switch
|
|
1784
|
+
<!-- 进度 -->
|
|
1785
|
+
<sohelp-process
|
|
1786
|
+
v-else-if="column.type==='SohelpProcess'"
|
|
1755
1787
|
v-model="row[name]"
|
|
1756
1788
|
v-bind="column.editRender"
|
|
1757
|
-
style="width: 100
|
|
1758
|
-
|
|
1759
|
-
:activeValue="1"
|
|
1760
|
-
:inactiveValue="0"
|
|
1789
|
+
style="width: 100%"
|
|
1790
|
+
:readonly="!column.editRender.edit"
|
|
1761
1791
|
/>
|
|
1762
|
-
</div>
|
|
1763
1792
|
|
|
1764
|
-
<!-- 文本域 -->
|
|
1765
|
-
<p
|
|
1766
|
-
style="margin: 0;"
|
|
1767
|
-
class="textarea-reference"
|
|
1768
|
-
@click="showTextareaModal(column, name, row)"
|
|
1769
|
-
v-bind="column.editRender"
|
|
1770
|
-
v-else-if="column.type === 'SohelpTextarea'"
|
|
1771
|
-
>{{ row[name] }}
|
|
1772
|
-
</p>
|
|
1773
|
-
|
|
1774
|
-
<!-- 外键关联 -->
|
|
1775
|
-
<div v-else-if="column.type === 'RELATION' || column.type === 'SohelpTableSelect'">
|
|
1776
|
-
{{ gridData[rowIndex][name]?.[column?.editRender?.labelField] || "" }}
|
|
1777
|
-
</div>
|
|
1778
1793
|
|
|
1779
|
-
|
|
1780
|
-
|
|
1794
|
+
<!-- 下拉用户选择 -->
|
|
1795
|
+
<div v-else-if="column.type === 'SohelpUserSelect'">
|
|
1796
|
+
{{ gridData[rowIndex][name]?.["user_name"] }}
|
|
1797
|
+
</div>
|
|
1781
1798
|
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1799
|
+
<!-- 下拉组织选择 -->
|
|
1800
|
+
<div v-else-if="column.type === 'SohelpOrgTreeSelect'">
|
|
1801
|
+
{{ gridData[rowIndex][name]?.["org_name"] }}
|
|
1802
|
+
</div>
|
|
1785
1803
|
|
|
1804
|
+
<!-- 开关 -->
|
|
1805
|
+
<div v-else-if="column.type==='SohelpSwitch' || column.type === 'SohelpCheckbox'">
|
|
1806
|
+
<span v-if="!column.editRender.edit">
|
|
1807
|
+
{{ !!row[name] ? "V" : "" }}
|
|
1808
|
+
</span>
|
|
1809
|
+
<sohelp-switch
|
|
1810
|
+
v-model="row[name]"
|
|
1811
|
+
v-bind="column.editRender"
|
|
1812
|
+
style="width: 100%;"
|
|
1813
|
+
v-else
|
|
1814
|
+
:activeValue="1"
|
|
1815
|
+
:inactiveValue="0"
|
|
1816
|
+
/>
|
|
1817
|
+
</div>
|
|
1818
|
+
|
|
1819
|
+
<!-- 文本域 -->
|
|
1820
|
+
<p
|
|
1821
|
+
style="margin: 0;"
|
|
1822
|
+
class="textarea-reference"
|
|
1823
|
+
@click="showTextareaModal(column, name, row)"
|
|
1824
|
+
v-bind="column.editRender"
|
|
1825
|
+
v-else-if="column.type === 'SohelpTextarea'"
|
|
1826
|
+
>{{ row[name] }}
|
|
1827
|
+
</p>
|
|
1828
|
+
|
|
1829
|
+
<!-- 外键关联 -->
|
|
1830
|
+
<div v-else-if="column.type === 'RELATION' || column.type === 'SohelpTableSelect'">
|
|
1831
|
+
{{ gridData[rowIndex][name]?.[column?.editRender?.labelField] || "" }}
|
|
1832
|
+
</div>
|
|
1833
|
+
|
|
1834
|
+
<!-- 富文本 -->
|
|
1835
|
+
<div v-else-if="column.type === 'SohelpRichText'" v-html="row[name]"></div>
|
|
1836
|
+
|
|
1837
|
+
<div v-else>
|
|
1838
|
+
{{ row[name] }}
|
|
1839
|
+
</div>
|
|
1840
|
+
</div>
|
|
1786
1841
|
</template>
|
|
1787
1842
|
|
|
1788
1843
|
<!-- 可编辑状态 -->
|
|
@@ -1793,17 +1848,15 @@ style="margin: 0;"
|
|
|
1793
1848
|
>
|
|
1794
1849
|
<div v-if="column.editRender.enabled">
|
|
1795
1850
|
<!-- 字典 -->
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
{{ column }}
|
|
1806
|
-
</div>
|
|
1851
|
+
<sohelp-dict
|
|
1852
|
+
v-model="row[name]"
|
|
1853
|
+
:code="column.dict"
|
|
1854
|
+
v-if="column.type === 'SohelpDict'"
|
|
1855
|
+
v-bind="column.editRender"
|
|
1856
|
+
style="width: 100%;"
|
|
1857
|
+
:visible="true"
|
|
1858
|
+
/>
|
|
1859
|
+
|
|
1807
1860
|
|
|
1808
1861
|
<!-- 下拉用户选择 -->
|
|
1809
1862
|
<sohelp-number-input
|
|
@@ -1838,12 +1891,11 @@ style="margin: 0;"
|
|
|
1838
1891
|
:datasource="orgDatasource"
|
|
1839
1892
|
/>
|
|
1840
1893
|
|
|
1841
|
-
|
|
1842
|
-
<sohelp-table-select
|
|
1843
|
-
v-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
v-bind="column.editRender"
|
|
1894
|
+
<!-- 外键关联 -->
|
|
1895
|
+
<sohelp-table-select v-else-if="column.type==='SohelpTableSelect'"
|
|
1896
|
+
v-model="row[name]"
|
|
1897
|
+
v-model:data="gridData[rowIndex][name]"
|
|
1898
|
+
v-bind="column.editRender"
|
|
1847
1899
|
/>
|
|
1848
1900
|
|
|
1849
1901
|
<!-- 数值 -->
|
|
@@ -1875,7 +1927,7 @@ v-else-if="column.type==='SohelpTableSelect'"
|
|
|
1875
1927
|
:key="item.code"
|
|
1876
1928
|
:type="item.code === 'crud.delete' ? 'danger' : 'primary'"
|
|
1877
1929
|
v-bind="item.params"
|
|
1878
|
-
@click="operationHandler({
|
|
1930
|
+
@click="operationHandler({button:item, row:row,$grid:sohelpVxeGridRef})"
|
|
1879
1931
|
>
|
|
1880
1932
|
<el-icon v-if="item.icon" style="margin-right: 5px;">
|
|
1881
1933
|
<component :is="ElementPlusIcons[item.icon]" v-if="ElementPlusIcons[item.icon]" />
|
|
@@ -1896,7 +1948,7 @@ v-else-if="column.type==='SohelpTableSelect'"
|
|
|
1896
1948
|
<el-dropdown-menu>
|
|
1897
1949
|
<el-dropdown-item
|
|
1898
1950
|
v-for="item in getOperationButtonsByType(row, column, 'more')" :key="item.code"
|
|
1899
|
-
@click.stop="operationHandler({
|
|
1951
|
+
@click.stop="operationHandler({button:item, row:row,$grid:sohelpVxeGridRef})"
|
|
1900
1952
|
v-bind="item.props">
|
|
1901
1953
|
<el-icon v-if="item.icon">
|
|
1902
1954
|
<component :is="ElementPlusIcons[item.icon]" v-if="ElementPlusIcons[item.icon]" />
|
|
@@ -1928,8 +1980,6 @@ v-for="item in getOperationButtonsByType(row, column, 'more')" :key="item.code"
|
|
|
1928
1980
|
|
|
1929
1981
|
|
|
1930
1982
|
<template v-for="(_,name) in $slots" #[name]="{row, column}">
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
1983
|
<slot :name="name" :row="getRowDataByField(column,row)" :column="column"></slot>
|
|
1934
1984
|
</template>
|
|
1935
1985
|
|
|
@@ -1982,14 +2032,8 @@ v-for="item in getOperationButtonsByType(row, column, 'more')" :key="item.code"
|
|
|
1982
2032
|
</template>
|
|
1983
2033
|
|
|
1984
2034
|
|
|
1985
|
-
<sohelp-entity-form
|
|
1986
|
-
|
|
1987
|
-
:refid="props.refid.split('!')[0]"
|
|
1988
|
-
v-model="entityFormValue"
|
|
1989
|
-
:data="entityFormData"
|
|
1990
|
-
:config="entityFormConfig"
|
|
1991
|
-
:readonly="toolbarButtonParams?.readonly"
|
|
1992
|
-
/>
|
|
2035
|
+
<sohelp-entity-form ref="entityFormRef" :refid="props.refid.split('!')[0]" v-model="entityFormValue"
|
|
2036
|
+
:data="entityFormData" :config="entityFormConfig" :readonly="toolbarButtonParams?.readonly" :saveParams="saveParams" />
|
|
1993
2037
|
<template #footer v-if="!toolbarButtonParams?.readonly">
|
|
1994
2038
|
<el-button @click="closeEntityForm()">{{ t("common.close") }}</el-button>
|
|
1995
2039
|
<el-button type="primary" @click="saveEntityForm()" v-loading="loading">{{ t("common.save") }}</el-button>
|
|
@@ -2171,8 +2215,8 @@ ref="entityFormRef"
|
|
|
2171
2215
|
text-align: left;
|
|
2172
2216
|
}
|
|
2173
2217
|
}
|
|
2174
|
-
|
|
2175
|
-
}
|
|
2218
|
+
|
|
2219
|
+
}
|
|
2176
2220
|
}
|
|
2177
2221
|
}
|
|
2178
2222
|
|