提交 f54850f9 编写于 作者: ibizdev's avatar ibizdev

lxm1993 发布系统代码 [TrainSys,网页端]

上级 1f12c9f4
......@@ -13,13 +13,13 @@
"dependencies": {
"@floating-ui/dom": "^1.0.4",
"@ibiz-template/command": "^0.0.1-beta.1",
"@ibiz-template/controller": "^0.0.1-beta.1",
"@ibiz-template/core": "^0.0.1-beta.1",
"@ibiz-template/model": "^0.0.1-beta.1",
"@ibiz-template/runtime": "^0.0.1-beta.1",
"@ibiz-template/service": "^0.0.1-beta.1",
"@ibiz-template/theme": "^0.0.1-beta.1",
"@ibiz-template/vue-util": "^0.0.1-beta.1",
"@ibiz-template/controller": "^0.0.1-beta.2",
"@ibiz-template/core": "^0.0.1-beta.2",
"@ibiz-template/model": "^0.0.1-beta.2",
"@ibiz-template/runtime": "^0.0.1-beta.2",
"@ibiz-template/service": "^0.0.1-beta.2",
"@ibiz-template/theme": "^0.0.1-beta.2",
"@ibiz-template/vue-util": "^0.0.1-beta.2",
"@ibiz/dynamic-model-api": "^2.1.5",
"dayjs": "^1.11.6",
"lodash-es": "^4.17.21",
......
......@@ -5,13 +5,13 @@ specifiers:
'@commitlint/config-conventional': ^17.2.0
'@floating-ui/dom': ^1.0.4
'@ibiz-template/command': ^0.0.1-beta.1
'@ibiz-template/controller': ^0.0.1-beta.1
'@ibiz-template/core': ^0.0.1-beta.1
'@ibiz-template/model': ^0.0.1-beta.1
'@ibiz-template/runtime': ^0.0.1-beta.1
'@ibiz-template/service': ^0.0.1-beta.1
'@ibiz-template/theme': ^0.0.1-beta.1
'@ibiz-template/vue-util': ^0.0.1-beta.1
'@ibiz-template/controller': ^0.0.1-beta.2
'@ibiz-template/core': ^0.0.1-beta.2
'@ibiz-template/model': ^0.0.1-beta.2
'@ibiz-template/runtime': ^0.0.1-beta.2
'@ibiz-template/service': ^0.0.1-beta.2
'@ibiz-template/theme': ^0.0.1-beta.2
'@ibiz-template/vue-util': ^0.0.1-beta.2
'@ibiz/dynamic-model-api': ^2.1.5
'@types/lodash-es': ^4.17.6
'@types/node': ^18.11.9
......@@ -64,13 +64,13 @@ specifiers:
dependencies:
'@floating-ui/dom': 1.0.4
'@ibiz-template/command': 0.0.1-beta.1
'@ibiz-template/controller': 0.0.1-beta.1_mlm2zeo5nbqr2wf6ymzr2vbiau
'@ibiz-template/core': 0.0.1-beta.1_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.1_yslesr4iih24kokbsmhl36awki
'@ibiz-template/runtime': 0.0.1-beta.1_qkkmvjv3hwaayed7zog2m3pxki
'@ibiz-template/service': 0.0.1-beta.1_dleyu7alph3pyu32foxcaimls4
'@ibiz-template/theme': 0.0.1-beta.1
'@ibiz-template/vue-util': 0.0.1-beta.1_p62othzlfnz4zfpaatcvceckyu
'@ibiz-template/controller': 0.0.1-beta.2_dc2zp577vi3mnqbdqhgrijeakq
'@ibiz-template/core': 0.0.1-beta.2_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.2_yslesr4iih24kokbsmhl36awki
'@ibiz-template/runtime': 0.0.1-beta.2_p2alg7nqjqoiohctvaefztc3lu
'@ibiz-template/service': 0.0.1-beta.2_3obksbooltwqcrk7och6j4qfsq
'@ibiz-template/theme': 0.0.1-beta.2
'@ibiz-template/vue-util': 0.0.1-beta.2_jtfgxyi2brf2r5xxye54m3xezm
'@ibiz/dynamic-model-api': 2.1.5_qx-util@0.4.4
dayjs: 1.11.6
lodash-es: 4.17.21
......@@ -679,8 +679,8 @@ packages:
qx-util: 0.4.4
dev: false
/@ibiz-template/controller/0.0.1-beta.1_mlm2zeo5nbqr2wf6ymzr2vbiau:
resolution: {integrity: sha512-KCOmLGX7NejQNiWpbbOc14YAtCSzm2SAkUIkfjeDtneNlapUsvZpVKFfD85AtnlXVJIlV8U8IkOXmZKnc1IkcA==}
/@ibiz-template/controller/0.0.1-beta.2_dc2zp577vi3mnqbdqhgrijeakq:
resolution: {integrity: sha512-p7GxBY8Oh1b8C1QP198LkF9/cbQhErB8/7Kx72fkPvo2XQH5jiblbtiA3dXGAeuD2ZdQoL/QbW0jJ3meXpVv1g==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-alpha.2
'@ibiz-template/model': ^0.0.1-alpha.2
......@@ -690,10 +690,10 @@ packages:
qs: ^6.11.0
qx-util: ^0.4.4
dependencies:
'@ibiz-template/core': 0.0.1-beta.1_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.1_yslesr4iih24kokbsmhl36awki
'@ibiz-template/runtime': 0.0.1-beta.1_qkkmvjv3hwaayed7zog2m3pxki
'@ibiz-template/service': 0.0.1-beta.1_dleyu7alph3pyu32foxcaimls4
'@ibiz-template/core': 0.0.1-beta.2_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.2_yslesr4iih24kokbsmhl36awki
'@ibiz-template/runtime': 0.0.1-beta.2_p2alg7nqjqoiohctvaefztc3lu
'@ibiz-template/service': 0.0.1-beta.2_3obksbooltwqcrk7och6j4qfsq
async-validator: 4.2.5
dayjs: 1.11.6
lodash-es: 4.17.21
......@@ -701,8 +701,8 @@ packages:
qx-util: 0.4.4
dev: false
/@ibiz-template/core/0.0.1-beta.1_qzytosuu5eg3bvoa74ldx6evva:
resolution: {integrity: sha512-BU4BB699rMkV7iYgU2pPWFOHEbhG6K9HKxg0NorRtv6VLpu711UHW7zXFXb2PTvMaxPsGvv7dAGZJ/7vHN1UkA==}
/@ibiz-template/core/0.0.1-beta.2_qzytosuu5eg3bvoa74ldx6evva:
resolution: {integrity: sha512-W80zA4fVtdXAteFAP3ry25gjF+1FcQK3rN5Fllx07wwexWBIMhKv8rzTKxcLVQbXfkgXbW1GYu442SV1ObdahA==}
peerDependencies:
lodash-es: ^4.17.21
qx-util: ^0.4.4
......@@ -717,8 +717,8 @@ packages:
- debug
dev: false
/@ibiz-template/model/0.0.1-beta.1_yslesr4iih24kokbsmhl36awki:
resolution: {integrity: sha512-tK/Du1lfS/q7WgqS57BomnyaAi/2l3QpVre0COCkODM4jBDsRE7H7HdiHHdH+mmFgnb8cqGL9zxfxrg96VcQVw==}
/@ibiz-template/model/0.0.1-beta.2_yslesr4iih24kokbsmhl36awki:
resolution: {integrity: sha512-75ppfTKBy7MP6sbj0nVYSSdfbWORxLrUz2vGGOtMSJMFbIszJipYHmadInyUAbraAKrFlLSlNDOb92NL8EP0ZA==}
peerDependencies:
'@ibiz/dynamic-model-api': ^2.1.5
lodash-es: ^4.17.21
......@@ -730,8 +730,8 @@ packages:
qx-util: 0.4.4
dev: false
/@ibiz-template/runtime/0.0.1-beta.1_qkkmvjv3hwaayed7zog2m3pxki:
resolution: {integrity: sha512-IhYM407+6TJNg71k4oNXX425sfCW4YRHPVBmW8ZSaKFjXGt0ETCMxGeLmwnzYsiYyHCNV7z9QgoNGTjYEUPXjw==}
/@ibiz-template/runtime/0.0.1-beta.2_p2alg7nqjqoiohctvaefztc3lu:
resolution: {integrity: sha512-oH1AkgmDslKzo0WPNoNVk8KgDhWe5AzLYik/8CPEgYg9Tid0cPQm6JvGb0Z3cBm7NG1mAN0xr876B9ehPo72zA==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-alpha.2
'@ibiz-template/model': ^0.0.1-alpha.2
......@@ -739,32 +739,32 @@ packages:
qx-util: ^0.4.4
dependencies:
'@ibiz-template/command': 0.0.1-beta.1
'@ibiz-template/core': 0.0.1-beta.1_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.1_yslesr4iih24kokbsmhl36awki
'@ibiz-template/service': 0.0.1-beta.1_dleyu7alph3pyu32foxcaimls4
'@ibiz-template/core': 0.0.1-beta.2_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.2_yslesr4iih24kokbsmhl36awki
'@ibiz-template/service': 0.0.1-beta.2_3obksbooltwqcrk7och6j4qfsq
qx-util: 0.4.4
dev: false
/@ibiz-template/service/0.0.1-beta.1_dleyu7alph3pyu32foxcaimls4:
resolution: {integrity: sha512-nDsshMjMhMvLvIjd8oTDOCxtR0FIiGOunvEsrYErDNO60P2eZIMeZPexjYrXQfZNLLlX690g/ZR2Tgp88CAL7A==}
/@ibiz-template/service/0.0.1-beta.2_3obksbooltwqcrk7och6j4qfsq:
resolution: {integrity: sha512-9+Kq6mI+JZOddKEUbm1QJuMKy0HbL/8ia33YQgKDpADkY8bIXxIIy1jV29jkzUitZL91kMmwpvCQxbVJMaQNMA==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-alpha.2
'@ibiz-template/model': ^0.0.1-alpha.2
qx-util: ^0.4.4
ramda: ^0.28.0
dependencies:
'@ibiz-template/core': 0.0.1-beta.1_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.1_yslesr4iih24kokbsmhl36awki
'@ibiz-template/core': 0.0.1-beta.2_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.2_yslesr4iih24kokbsmhl36awki
qx-util: 0.4.4
ramda: 0.28.0
dev: false
/@ibiz-template/theme/0.0.1-beta.1:
resolution: {integrity: sha512-6N91iJsqb42MQcn/xjWREOdNjeC5F5pPkQVvDEVun8akyDK6BxtG4Saqd2/7MtbKh/07nVl5hZlc0jhGYy59kw==}
/@ibiz-template/theme/0.0.1-beta.2:
resolution: {integrity: sha512-IauXFlg8fSiXbTUhtWtlggsqbf/utQ/y5stZCsKfVpx9pSc0cJq430zIKCOs+pUN7ysin8KO6/ahZ4bVITv9CA==}
dev: false
/@ibiz-template/vue-util/0.0.1-beta.1_p62othzlfnz4zfpaatcvceckyu:
resolution: {integrity: sha512-v0rfLFuTbIPOs0xQOlZH0FjuvmRJ+M81O3nLATIyWWTA5r8Gq+fJToKpLJUEBSadvwr7yyUtoIN96pWAS1x1LA==}
/@ibiz-template/vue-util/0.0.1-beta.2_jtfgxyi2brf2r5xxye54m3xezm:
resolution: {integrity: sha512-eEahQdqAceKqQ7ajuFfvjglqh5ByH67vb7RXJXLYkclNS6Qjfzie22T6OvL6Xi8HcQnc47OOjqwxyGoM6usmpQ==}
peerDependencies:
'@ibiz-template/controller': '>=0.0.1-alpha.2'
'@ibiz-template/core': '>=0.0.1-alpha.2'
......@@ -775,9 +775,9 @@ packages:
vue: ^2.7.13
vue-router: ^3.6.5
dependencies:
'@ibiz-template/controller': 0.0.1-beta.1_mlm2zeo5nbqr2wf6ymzr2vbiau
'@ibiz-template/core': 0.0.1-beta.1_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.1_yslesr4iih24kokbsmhl36awki
'@ibiz-template/controller': 0.0.1-beta.2_dc2zp577vi3mnqbdqhgrijeakq
'@ibiz-template/core': 0.0.1-beta.2_qzytosuu5eg3bvoa74ldx6evva
'@ibiz-template/model': 0.0.1-beta.2_yslesr4iih24kokbsmhl36awki
qs: 6.11.0
qx-util: 0.4.4
ramda: 0.28.0
......
......@@ -75,6 +75,7 @@ import {
AppSelectTree,
DataImport,
DataExport,
ImagePreview,
} from './components/common';
// 编辑器组件
import {
......@@ -178,6 +179,7 @@ export const AppRegister = {
v.component('AppSelectTree', AppSelectTree);
v.component('DataImport', DataImport);
v.component('DataExport', DataExport);
v.component('ImagePreview', ImagePreview);
// 注册编辑器组件
v.component('GridEditor', GridEditor);
v.component('IBizSpan', IBizSpan);
......
import { defineComponent } from 'vue';
import { useNamespace } from '@ibiz-template/vue-util';
import '@ibiz-template/theme/style/components/widgets/grid/grid-edit-item.scss';
export const AppGridEditItem = defineComponent({
name: 'AppGridEditItem',
......
import { useNamespace } from '@ibiz-template/vue-util';
import { defineComponent, PropType } from 'vue';
import '@ibiz-template/theme/style/components/common/image-preview/image-preview.scss';
import { RuntimeError, downloadFileFromBlob } from '@ibiz-template/core';
export const ImagePreview = defineComponent({
name: 'ImagePreview',
props: {
file: {
type: Object as PropType<{ name: string; url: string }>,
required: true,
},
},
setup(props) {
const ns = useNamespace('image-preview');
const onDownload = () => {
// 发送get请求
ibiz.net
.request(props.file.url, {
method: 'get',
responseType: 'blob',
baseURL: '', // 已经有baseURL了,这里无需再写
})
.then((response: IData) => {
if (response.status !== 200) {
throw new RuntimeError('下载文件失败');
}
// 请求成功,后台返回的是一个文件流
if (!response.data) {
throw new RuntimeError('文件流数据不存在');
} else {
// 获取文件名
const fileName = props.file.name;
downloadFileFromBlob(response.data, fileName);
}
});
};
return {
ns,
onDownload,
};
},
render() {
return (
<div class={this.ns.b()}>
<img class={this.ns.e('image')} src={this.file.url} />
<div class={this.ns.e('toolbar')}>
<div class={this.ns.e('zoom-bar')}>
<i-icon class={this.ns.e('zoom-minus')} type='md-remove' />
<span class={this.ns.e('zoom-percent')}>100%</span>
<i-icon class={this.ns.e('zoom-plus')} type='md-add' />
</div>
<div onClick={this.onDownload} class={this.ns.e('download')}>
<i-icon type='md-download' />
</div>
</div>
</div>
);
},
});
......@@ -13,9 +13,11 @@ import { WfVersionSelect } from './wf-version-select/wf-version-select';
import { ExtendActionTimeLine } from './extend-action-timeline/extend-action-timeline';
import { ExtendActionGrid } from './extend-action-grid/extend-action-grid';
export { ImagePreview } from './image-preview/image-preview';
export { DataImport } from './data-import/data-import';
export { DataExport } from './data-export/data-export';
export { AppSelectTree } from '../common/app-select-tree/app-select-tree';
export {
AppIcon,
ViewToolbar,
......
import { useClickOutside, useNamespace } from '@ibiz-template/vue-util';
import { defineComponent, ref, watch } from 'vue';
import { IBizUpload, UploadFile } from '../ibiz-upload/ibiz-upload';
import { defineComponent, ref, toRefs, watch } from 'vue';
import {
FileInfo,
openImagePreview,
useIBizUpload,
} from '../use/use-ibiz-upload';
import '@ibiz-template/theme/style/components/editor/ibiz-grid-file-upload/ibiz-grid-file-upload-popover.scss';
export const IBizGridFileUploadPopover = defineComponent({
name: 'IBizGridFileUploadPopover',
......@@ -23,87 +28,95 @@ export const IBizGridFileUploadPopover = defineComponent({
},
},
emits: {
close: (_result: { isModified: boolean; resultFiles: UploadFile[] }) =>
true,
close: (_result: { isModified: boolean; resultFiles: FileInfo[] }) => true,
},
setup(props, { emit }) {
const ns = useNamespace('grid-upload');
const upload = ref();
const ns = useNamespace('grid-file-upload-popover');
// 使用文件上传逻辑
const { downloadUrl, value, uploadUrl } = toRefs(props);
const { fileList, uploadState, selectFile } = useIBizUpload({
downloadUrl,
value,
uploadUrl,
});
const componentRef = ref();
const isModified = ref(false);
const fileList = ref<UploadFile[]>([]);
// 点击外部处理
useClickOutside(componentRef, async _evt => {
const outsideFns = useClickOutside(componentRef, async _evt => {
emit('close', {
isModified: isModified.value,
resultFiles: fileList.value,
});
});
// 值响应式变更
watch(
() => props.value,
newVal => {
fileList.value = newVal.map(item => {
return { ...item, status: 'finished', percentage: 100 };
});
},
{ immediate: true },
);
const onFinish = (files: UploadFile[]) => {
fileList.value.push(...files);
isModified.value = true;
};
const selectFile = () => {
upload.value.selectFile();
};
// 上传完毕后数据发生修改,上传过程中暂停外部点击事件
watch(uploadState, state => {
if (state === 'done') {
isModified.value = true;
outsideFns.proceed();
} else if (state === 'loading') {
outsideFns.pause();
}
});
const deleteFile = (file: UploadFile) => {
/**
* 删除文件
*
* @author lxm
* @date 2022-11-18 16:11:10
* @param {FileInfo} file
*/
const deleteFile = (file: FileInfo) => {
const index = fileList.value.findIndex(item => item.id === file.id);
fileList.value.splice(index, 1);
isModified.value = true;
};
const onImageClick = async (file: FileInfo) => {
outsideFns.pause();
await openImagePreview(file);
outsideFns.proceed();
};
return {
ns,
componentRef,
upload,
fileList,
onFinish,
selectFile,
deleteFile,
selectFile,
onImageClick,
};
},
render() {
return (
<div
ref='componentRef'
style={'width:300px;height:200px'}
class={this.ns.b()}
>
<IBizUpload
ref='upload'
uploadUrl={this.uploadUrl}
downloadUrl={this.downloadUrl}
multiple={true}
on-finish={this.onFinish}
></IBizUpload>
<div ref='componentRef' style={'width:300px'} class={this.ns.b()}>
<div class={this.ns.b('list')}>
{this.fileList.map(file => {
return (
<div class={this.ns.be('list', 'item')}>
{file.isImage && (
<div class={this.ns.be('list', 'preview')}>
<img
onClick={() => this.onImageClick(file)}
class={this.ns.be('list', 'preview-image')}
src={file.url}
/>
</div>
)}
<div class={this.ns.be('list', 'info')}>
<a
class={this.ns.be('list', 'file-name')}
href={file.url}
href={file.url || ''}
download={file.name}
>
{file.name}
</a>
<div class={this.ns.be('list', 'actions')}>
<i-icon
class={this.ns.be('list', 'action')}
onClick={() => this.deleteFile(file)}
type='md-close'
/>
......@@ -113,14 +126,10 @@ export const IBizGridFileUploadPopover = defineComponent({
);
})}
</div>
<i-button
type='text'
onClick={this.selectFile}
class={this.ns.e('add-button')}
>
<div onClick={() => this.selectFile()} class={this.ns.e('add-button')}>
<i-icon type='md-add' />
添加文件
</i-button>
</div>
</div>
);
},
......
......@@ -2,94 +2,40 @@
import { RuntimeError } from '@ibiz-template/core';
import {
getGridUploadProps,
useGridCellEditor,
useEventListener,
useNamespace,
} from '@ibiz-template/vue-util';
import { CreateElement, defineComponent, ref, Ref, watch } from 'vue';
import { UploadFile } from '../ibiz-upload/ibiz-upload';
import { CreateElement, defineComponent, ref, toRefs } from 'vue';
import {
FileInfo,
openImagePreview,
useIBizUploadInit,
} from '../use/use-ibiz-upload';
import { IBizGridFileUploadPopover } from './ibiz-grid-file-upload-popover';
import '@ibiz-template/theme/style/components/editor/ibiz-grid-file-upload/ibiz-grid-file-upload.scss';
export const IBizGridFileUpload = defineComponent({
name: 'IBizGridFileUpload',
props: getGridUploadProps(),
setup(props) {
const ns = useNamespace('grid-upload');
// 上传文件路径
const uploadUrl: Ref<string> = ref('');
// 下载文件路径
const downloadUrl: Ref<string> = ref('');
// 文件列表
const fileList: Ref<UploadFile[]> = ref([]);
// data响应式变更基础路径
watch(
() => props.data,
newVal => {
if (newVal) {
const urls = props.controller.calcBaseUrl(newVal);
uploadUrl.value = urls.uploadUrl;
downloadUrl.value = urls.downloadUrl;
}
},
{ immediate: true, deep: true },
);
const ns = useNamespace('grid-file-upload');
// 值响应式变更
watch(
() => props.value,
newVal => {
fileList.value = !newVal ? [] : JSON.parse(newVal);
},
{ immediate: true },
);
watch(
fileList,
newVal => {
// 变更后且下载基础路径存在时解析
if (newVal?.length && downloadUrl.value) {
newVal.forEach((file: IData) => {
file.url =
file.url || downloadUrl.value.replace('%fileId%', file.id);
});
}
},
{ immediate: true },
);
watch(
downloadUrl,
newVal => {
// 变更后且下载基础路径存在时解析
if (newVal && fileList.value.length) {
fileList.value.forEach((file: IData) => {
file.url = downloadUrl.value.replace('%fileId%', file.id);
});
}
},
{ immediate: true },
);
const { isInfoMode, componentRef, onOperateChange, onChange } =
useGridCellEditor(props.rowDataChange, props.rowSave, {
isDelaySave: false,
});
const emitValue = (files: UploadFile[]) => {
const value: string | null =
files.length > 0
? JSON.stringify(
files.map(file => ({ name: file.name, id: file.id })),
)
: null;
console.log(value);
// 初始化文件上传编辑器的数据解析
const { value, data, controller } = toRefs(props);
const { downloadUrl, uploadUrl, valueList } = useIBizUploadInit({
value,
data,
controller,
});
onChange(value);
};
const componentRef = ref();
/**
* 打开文件上传操作飘窗
*
* @author lxm
* @date 2022-11-21 11:11:45
*/
const openPopover = async () => {
if (!componentRef.value) {
throw new RuntimeError('容器元素不存在');
......@@ -100,14 +46,14 @@ export const IBizGridFileUpload = defineComponent({
(h: CreateElement) => {
return h(IBizGridFileUploadPopover, {
props: {
value: fileList.value,
value: valueList.value,
uploadUrl: uploadUrl.value,
downloadUrl: downloadUrl.value,
},
on: {
close: (result: {
isModified: boolean;
resultFiles: UploadFile[];
resultFiles: FileInfo[];
}) => {
popover.dismiss(result);
},
......@@ -122,30 +68,53 @@ export const IBizGridFileUpload = defineComponent({
},
);
await popover.present(el);
const result = await popover.onWillDismiss<{
const { isModified, resultFiles } = await popover.onWillDismiss<{
isModified: boolean;
resultFiles: UploadFile[];
resultFiles: FileInfo[];
}>();
if (result.isModified) {
emitValue(result.resultFiles);
// 关闭popover后如果有上传的文件集合,则编辑器值变更,并且保存
if (isModified) {
const valueStr: string | null =
resultFiles.length > 0
? JSON.stringify(
resultFiles.map(file => ({ name: file.name, id: file.id })),
)
: null;
await props.rowDataChange(valueStr);
await props.rowSave();
}
};
watch(isInfoMode, async newVal => {
if (!props.disabled && newVal === false) {
onOperateChange(true);
await openPopover();
onOperateChange(false);
// 非禁用的时候点击打开飘窗
useEventListener(componentRef, 'click', _evt => {
if (!props.disabled) {
openPopover();
}
});
const onFileClick = (file: FileInfo) => {
// 编辑态时点击触发的打开飘窗,其他行为都禁用
// 图片点击不下载,弹出预览
if (!props.disabled || file.isImage) {
return;
}
props.controller.fileDownload(file as Required<FileInfo>);
};
const onImageClick = (file: FileInfo) => {
// 编辑态时点击触发的打开飘窗,其他行为都禁用
if (!props.disabled) {
return;
}
openImagePreview(file);
};
return {
ns,
isInfoMode,
fileList,
valueList,
componentRef,
onOperateChange,
onChange,
onFileClick,
onImageClick,
};
},
render() {
......@@ -155,8 +124,38 @@ export const IBizGridFileUpload = defineComponent({
ref='componentRef'
class={`${this.ns.b()}`}
>
{this.fileList.map(file => {
return <span>{file.name}</span>;
{this.valueList.map(file => {
return (
<i-tooltip
class={[
this.ns.e('item'),
file.isImage
? this.ns.em('item', 'image')
: this.ns.em('item', 'file'),
]}
content={file.name}
transfer
placement='top'
nativeOnClick={() => this.onFileClick(file)}
>
{file.isImage ? (
<img
onClick={() => this.onImageClick(file)}
class={this.ns.e('item-image')}
src={file.url}
/>
) : (
[
<span class={this.ns.e('item-file-name')}>
{file.fileName}
</span>,
<span class={this.ns.e('item-file-ext')}>
{file.fileExt}
</span>,
]
)}
</i-tooltip>
);
})}
</grid-editor>
);
......
/* eslint-disable no-param-reassign */
import { UploadEditorController } from '@ibiz-template/controller';
import {
HttpResponse,
isImage,
IUploadFile,
uploadFile,
} from '@ibiz-template/core';
import { Ref, ref, watch } from 'vue';
export type FileInfo = {
name: string;
id: string;
status?: 'uploading' | 'finished' | 'fail' | 'cancel';
percentage?: number;
url?: string;
/**
* 文件名(不带后缀)
*/
fileName?: string;
/**
* 文件类型(拓展名)
*/
fileExt?: string;
/**
* 是否是图片
*/
isImage?: boolean;
};
/**
* 格式化文件信息
*
* @author lxm
* @date 2022-11-18 15:11:38
* @param {FileInfo} file
*/
export function formatFileInfo(file: FileInfo, downloadUrl: string): FileInfo {
file.url = downloadUrl.replace('%fileId%', file.id!);
if (!file.status) {
// 不存在时为回填回来的数据默认给他finished
file.status = 'finished';
}
if (!file.fileName) {
const index = file.name.lastIndexOf('.');
file.fileName = file.name.substring(0, index);
file.fileExt = file.name.substring(index);
file.isImage = isImage(file.name);
}
return file as FileInfo;
}
/**
* 文件上传组件初始化,解析props并得到downloadUrl、uploadUrl、fileList
*
* @author lxm
* @date 2022-11-21 10:11:01
* @export
* @param {{
* data: Ref<IData>;
* value: Ref<string>;
* controller: Ref<UploadEditorController>;
* }} props
* @returns {*}
*/
export function useIBizUploadInit(props: {
data: Ref<IData>;
value: Ref<string | undefined>;
controller: Ref<UploadEditorController>;
}) {
// 上传文件路径
const uploadUrl: Ref<string> = ref('');
// 下载文件路径
const downloadUrl: Ref<string> = ref('');
// 文件列表
const valueList: Ref<FileInfo[]> = ref([]);
// data响应式变更基础路径
watch(
props.data,
newVal => {
if (newVal) {
const urls = props.controller.value.calcBaseUrl(newVal);
uploadUrl.value = urls.uploadUrl;
downloadUrl.value = urls.downloadUrl;
}
},
{ immediate: true, deep: true },
);
// 值响应式变更
watch(
props.value,
newVal => {
valueList.value = !newVal ? [] : JSON.parse(newVal);
if (valueList.value.length && downloadUrl.value) {
valueList.value.forEach((file: FileInfo) => {
formatFileInfo(file, downloadUrl.value);
});
}
},
{ immediate: true },
);
watch(
downloadUrl,
newVal => {
// 下载基础路径变更时全部url重算
if (newVal && valueList.value.length) {
valueList.value.forEach((file: FileInfo) => {
formatFileInfo(file, newVal);
});
}
},
{ immediate: true },
);
return {
downloadUrl,
uploadUrl,
valueList,
};
}
/**
* 使用文件上传功能,传递外部已存在的文件集合,上传下载基础路径
*
* @author lxm
* @date 2022-11-21 10:11:01
* @export
* @param {{
* downloadUrl: Ref<string>;
* uploadUrl: Ref<string>;
* value: Ref<
* {
* name: string;
* id: string;
* url?: string;
* }[]
* >;
* }} opts
* @returns {*}
*/
export function useIBizUpload(opts: {
downloadUrl: Ref<string>;
uploadUrl: Ref<string>;
value: Ref<
{
name: string;
id: string;
url?: string;
}[]
>;
multiple?: boolean;
accept?: string;
}) {
const uploadState = ref<'undo' | 'loading' | 'done'>('undo');
const fileList = ref<FileInfo[]>([]);
const { downloadUrl, value, uploadUrl } = opts;
// 初始化fileList
watch(
value,
newVal => {
if (newVal.length > 0) {
fileList.value = [];
newVal.forEach(item => {
fileList.value.push(formatFileInfo(item, downloadUrl.value));
});
}
},
{
immediate: true,
deep: true,
},
);
// 开始上传后记录文件
const beforeUpload = (fileData: File[], files: IUploadFile[]) => {
files.forEach(file => {
fileList.value.push({
name: file.name,
status: file.status,
percentage: file.percentage,
id: file.uid,
url: '',
});
});
return true;
};
/**
* 更新文件里的上传进度
*
* @author lxm
* @date 2022-11-18 15:11:09
* @param {IUploadFile[]} files
*/
const onProgress = (files: IUploadFile[]) => {
files.forEach(file => {
fileList.value.find(item => {
if (item.id === file.uid) {
item.percentage = file.percentage;
return true;
}
return false;
});
});
};
const onSuccess = (resultFiles: IUploadFile[], res: HttpResponse) => {
// 暂时只处理单个文件上传
resultFiles.forEach(file => {
fileList.value.find(item => {
if (item.id === file.uid) {
// 把用后台数据替换当前信息,并格式化信息
item.status = file.status;
item.id = res.data.fileid;
item.name = res.data.filename;
formatFileInfo(item, downloadUrl.value);
return true;
}
return false;
});
});
};
const onError = (resultFiles: IUploadFile[]) => {
// 暂时只处理单个文件上传
resultFiles.forEach(file => {
fileList.value.find(item => {
if (item.id === file.uid) {
// 更新错误状态
item.status = file.status;
return true;
}
return false;
});
});
};
const onFinish = (_resultFiles: IUploadFile[]) => {
uploadState.value = 'done';
};
// 手动控制文件上传,绑定组件的upload
const selectFile = () => {
uploadFile({
multiple: opts.multiple,
accept: opts.accept,
uploadUrl: uploadUrl.value,
beforeUpload,
progress: onProgress,
success: onSuccess,
error: onError,
finish: onFinish,
});
};
return {
selectFile,
fileList,
uploadState,
};
}
export function openImagePreview(file: FileInfo) {
return ibiz.overlay.modal(
'ImagePreview',
{ file },
{
width: 'auto',
height: 'auto',
placement: 'center',
modalClass: 'ibiz-image-preview-modal',
},
);
}
......@@ -149,7 +149,7 @@ export function useIViewUpload(
// 下载文件
const onDownload = (file: IData) => {
const url = file.url || downloadUrl.value.replace('%fileId%', file.id);
c.fileDownload(url, file);
c.fileDownload({ url, name: file.name });
};
return {
......
......@@ -3,11 +3,14 @@ import { ModelUtil } from '@ibiz-template/model';
import { useNamespace } from '@ibiz-template/vue-util';
import { defineComponent, PropType, ref } from 'vue';
import '@ibiz-template/theme/style/components/view-shell/view-shell.scss';
import { IModal } from '@ibiz-template/runtime';
export const ViewShell = defineComponent({
name: 'ViewShell',
props: {
context: Object as PropType<IContext>,
params: { type: Object as PropType<IParams> },
modal: { type: Object as PropType<IModal> },
modelPath: { type: String, required: true },
},
setup(props) {
......
......@@ -3,7 +3,6 @@ import {
GridRowController,
} from '@ibiz-template/controller';
import { computed, defineComponent, getCurrentInstance } from 'vue';
import '@ibiz-template/theme/style/components/widgets/grid/grid-edit-item.scss';
import { useForce, useNamespace } from '@ibiz-template/vue-util';
export const GridFieldEditColumn = defineComponent({
......@@ -19,7 +18,7 @@ export const GridFieldEditColumn = defineComponent({
},
},
setup(props) {
const ns = useNamespace('grid-edit-item');
const ns = useNamespace('grid-field-edit-column');
const force = useForce(getCurrentInstance()!.proxy);
const editItemC = props.controller.editItem;
......
......@@ -17,15 +17,13 @@ import {
export class FileUploaderEditorProvider implements IEditorProvider {
formEditor: string = 'IBizFileUpload';
gridEditor: string = 'IBizFileUpload';
gridEditor: string = 'IBizGridFileUpload';
constructor(editorType: string) {
if (editorType === 'PICTURE') {
this.formEditor = 'IBizImageUpload';
this.gridEditor = 'IBizImageUpload';
} else if (editorType === 'FILEUPLOADER') {
this.formEditor = 'IBizFileUpload';
this.gridEditor = 'IBizGridFileUpload';
}
}
......
......@@ -41,7 +41,7 @@ export const AppModalComponent = defineComponent({
}
// 合并options
const options = ref<IModalOptions>({ footerHide: true });
const options = ref<IModalOptions>({ footerHide: true, modalClass: '' });
if (props.opts) {
Object.assign(options.value, props.opts);
}
......@@ -84,6 +84,7 @@ export const AppModalComponent = defineComponent({
class={[
this.ns.b(),
this.options.placement && this.ns.m(this.options.placement),
this.options.modalClass,
]}
style={{ [this.ns.cssVarBlockName('z-index')]: this.modalZIndex }}
styles={this.customStyle}
......
此差异已折叠。
......@@ -1914,34 +1914,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -2173,30 +2173,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -2230,6 +2206,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......
......@@ -19,34 +19,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlLogics" : [ {
......@@ -191,30 +191,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -248,6 +224,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......
......@@ -609,34 +609,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -868,30 +868,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -925,6 +901,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......
......@@ -389,34 +389,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -648,30 +648,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -705,6 +681,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......
......@@ -440,34 +440,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -699,30 +699,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -756,6 +732,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......
......@@ -2059,34 +2059,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -2318,30 +2318,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -2375,6 +2351,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......
......@@ -1682,34 +1682,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -1941,30 +1941,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -1998,6 +1974,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......
......@@ -7304,34 +7304,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -7563,30 +7563,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -7620,6 +7596,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
......@@ -12103,34 +12103,34 @@
"getPSAppViewLogics" : [ {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_ua98d563_click",
"name" : "grid_uagridcolumn1_u479f517_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_行编辑开关操作"
"id" : "表格界面_编辑操作"
}
}, {
"logicTrigger" : "CUSTOM",
"logicType" : "APPVIEWUIACTION",
"name" : "grid_uagridcolumn1_u479f517_click",
"name" : "grid_uagridcolumn1_ua98d563_click",
"getPSAppViewUIAction" : {
"modelref" : true,
"id" : "表格界面_编辑操作"
"id" : "表格界面_行编辑开关操作"
}
} ],
"getPSAppViewUIActions" : [ {
"name" : "表格界面_行编辑开关操作",
"name" : "表格界面_编辑操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "ToggleRowEdit"
"id" : "Edit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
}, {
"name" : "表格界面_编辑操作",
"name" : "表格界面_行编辑开关操作",
"getPSUIAction" : {
"modelref" : true,
"id" : "Edit"
"id" : "ToggleRowEdit"
},
"uIActionTarget" : "SINGLEKEY",
"xDataControlName" : "grid"
} ],
"getPSControlHandler" : {
......@@ -12362,30 +12362,6 @@
"mOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b",
"name" : "操作列",
"getPSUIActionGroupDetails" : [ {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
}, {
"detailType" : "DEUIACTION",
"name" : "u479f517",
"getPSUIAction" : {
......@@ -12419,6 +12395,30 @@
"addSeparator" : true,
"showCaption" : true,
"showIcon" : true
}, {
"detailType" : "DEUIACTION",
"name" : "ua98d563",
"getPSUIAction" : {
"caption" : "行编辑",
"codeName" : "ToggleRowEdit",
"fullCodeName" : "ToggleRowEdit",
"mOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"name" : "表格界面_行编辑开关操作",
"getPSSysImage" : {
"glyph" : "xf0ce@FontAwesome",
"cssClass" : "fa fa-table"
},
"predefinedType" : "GRIDVIEW_ROWEDITACTION",
"rTMOSFilePath" : "pssysapps/Web/pssysappdeuiactions/ToggleRowEdit",
"timeout" : 60000,
"uIActionMode" : "SYS",
"uIActionTag" : "ToggleRowEdit",
"uIActionType" : "DEUIACTION",
"enableToggleMode" : true
},
"addSeparator" : true,
"showCaption" : true,
"showIcon" : false
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/Reginfo/psappdeuagroups/A046596b6afb50f9e5b"
},
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册