作业预览修复和权限

dev_local_v8_beifangminzu
helinfeng 3 years ago
parent ad1f2783c6
commit 0b5e0cbb24

File diff suppressed because one or more lines are too long

@ -84,7 +84,7 @@ html {--antd-wave-shadow-color: @primary-color;}
.zoom-right-enter, .zoom-right-appear {animation-fill-mode: both;}
.zoom-right-leave {animation-fill-mode: both;}
.ant-alert {color: @text-color;border-radius: 2px;}
.ant-alert-success {background-color: color(~`colorPalette("@{success-color}", 1)`);border: 1px solid color(~`colorPalette("@{success-color}", 4)`);}
.ant-alert-success {background-color: color(~`colorPalette("@{success-color}", 1)`);border: 1px solid color(~`colorPalette("@{success-color}", 3)`);}
.ant-alert-success .ant-alert-icon {color: @success-color;}
.ant-alert-info {background-color: color(~`colorPalette("@{primary-color}", 1)`);border: 1px solid color(~`colorPalette("@{primary-color}", 3)`);}
.ant-alert-info .ant-alert-icon {color: @primary-color;}
@ -727,42 +727,42 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon {color: @success-color;}
.ant-form-item-has-warning .ant-form-item-explain, .ant-form-item-has-warning .ant-form-item-split {color: @warning-color;}
.ant-form-item-has-warning .ant-input, .ant-form-item-has-warning .ant-input-affix-wrapper, .ant-form-item-has-warning .ant-input:hover, .ant-form-item-has-warning .ant-input-affix-wrapper:hover {border-color: @warning-color;}
.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(78, 58, 225, 0.2);}
.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(175, 53, 88, 0.2);}
.ant-form-item-has-warning .ant-input:not(.ant-form-item-has-warning .ant-input-disabled) {background-color: #fff;}
.ant-form-item-has-warning .ant-input-affix-wrapper:not(.ant-form-item-has-warning .ant-input-affix-wrapper-disabled) {background-color: #fff;}
.ant-form-item-has-warning .ant-input-affix-wrapper input:focus {box-shadow: none !important;}
.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(78, 58, 225, 0.2);}
.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(175, 53, 88, 0.2);}
.ant-form-item-has-warning .ant-input-prefix {color: @warning-color;}
.ant-form-item-has-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;}
.ant-form-item-has-warning .has-feedback {color: @warning-color;}
.ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon {color: @warning-color;}
.ant-form-item-has-warning .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @warning-color !important;}
.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(78, 58, 225, 0.2);}
.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(175, 53, 88, 0.2);}
.ant-form-item-has-warning .ant-input-number, .ant-form-item-has-warning .ant-picker {border-color: @warning-color;}
.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(78, 58, 225, 0.2);}
.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(175, 53, 88, 0.2);}
.ant-form-item-has-warning .ant-input-number:not([disabled]):hover, .ant-form-item-has-warning .ant-picker:not([disabled]):hover {border-color: @warning-color;}
.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(78, 58, 225, 0.2);}
.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(175, 53, 88, 0.2);}
.ant-form-item-has-error .ant-form-item-explain, .ant-form-item-has-error .ant-form-item-split {color: @error-color;}
.ant-form-item-has-error .ant-input, .ant-form-item-has-error .ant-input-affix-wrapper, .ant-form-item-has-error .ant-input:hover, .ant-form-item-has-error .ant-input-affix-wrapper:hover {border-color: @error-color;}
.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(5, 216, 147, 0.2);}
.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(25, 108, 95, 0.2);}
.ant-form-item-has-error .ant-input:not(.ant-form-item-has-error .ant-input-disabled) {background-color: #fff;}
.ant-form-item-has-error .ant-input-affix-wrapper:not(.ant-form-item-has-error .ant-input-affix-wrapper-disabled) {background-color: #fff;}
.ant-form-item-has-error .ant-input-affix-wrapper input:focus {box-shadow: none !important;}
.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(5, 216, 147, 0.2);}
.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(25, 108, 95, 0.2);}
.ant-form-item-has-error .ant-input-prefix {color: @error-color;}
.ant-form-item-has-error .ant-input-group-addon {color: @error-color;border-color: @error-color;}
.ant-form-item-has-error .has-feedback {color: @error-color;}
.ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon {color: @error-color;}
.ant-form-item-has-error .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @error-color !important;}
.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(5, 216, 147, 0.2);}
.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(25, 108, 95, 0.2);}
.ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {border: 0;}
.ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus {border-color: @error-color;}
.ant-form-item-has-error .ant-input-number, .ant-form-item-has-error .ant-picker {border-color: @error-color;}
.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(5, 216, 147, 0.2);}
.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(25, 108, 95, 0.2);}
.ant-form-item-has-error .ant-input-number:not([disabled]):hover, .ant-form-item-has-error .ant-picker:not([disabled]):hover {border-color: @error-color;}
.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {border-color: @error-color;}
.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(5, 216, 147, 0.2);}
.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(5, 216, 147, 0.2);}
.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(25, 108, 95, 0.2);}
.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(25, 108, 95, 0.2);}
.ant-form-item-has-error .ant-transfer-list {border-color: @error-color;}
.ant-form-item-has-error .ant-transfer-list-search:not([disabled]) {border-color: @border-color-base;}
.ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px !important;}
@ -1465,7 +1465,7 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;}
.ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;}
.ant-tag-volcano {color: #fa541c;background: #fff2e8;border-color: #ffbb96;}
.ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;}
.ant-tag-orange {color: #fa8c16;background: color(~`colorPalette("@{layout-body-background}", 1)`);border-color: #ffd591;}
.ant-tag-orange {color: #fa8c16;background: #fff7e6;border-color: #ffd591;}
.ant-tag-orange-inverse {color: #fff;background: #fa8c16;border-color: #fa8c16;}
.ant-tag-yellow {color: #fadb14;background: #feffe6;border-color: #fffb8f;}
.ant-tag-yellow-inverse {color: #fff;background: #fadb14;border-color: #fadb14;}
@ -1479,14 +1479,14 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;}
.ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;}
.ant-tag-blue {color: #1890ff;background: #e6f7ff;border-color: #91d5ff;}
.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;}
.ant-tag-geekblue {color: #2f54eb;background: #f0f5ff;border-color: #adc6ff;}
.ant-tag-geekblue {color: #2f54eb;background: color(~`colorPalette("@{heading-color}", 4)`);border-color: #adc6ff;}
.ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;}
.ant-tag-purple {color: #722ed1;background: #f9f0ff;border-color: #d3adf7;}
.ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;}
.ant-tag-success {color: #52c41a;background: #f6ffed;border-color: #b7eb8f;}
.ant-tag-processing {color: #1890ff;background: #e6f7ff;border-color: #91d5ff;}
.ant-tag-error {color: #f5222d;background: #fff1f0;border-color: #ffa39e;}
.ant-tag-warning {color: #fa8c16;background: color(~`colorPalette("@{layout-body-background}", 1)`);border-color: #ffd591;}
.ant-tag-warning {color: #fa8c16;background: #fff7e6;border-color: #ffd591;}
.ant-timeline {color: @text-color;}
.ant-timeline-item-tail {border-left: 2px solid #f0f0f0;}
.ant-timeline-item-pending .ant-timeline-item-head {background-color: transparent;}

@ -127,6 +127,6 @@
<script src="/react/build/antdesign.327d013c.async.js"></script>
<script src="/react/build/vendors.93ba173a.async.js"></script>
<script src="/react/build/umi.c60cd5fc.js"></script>
<script src="/react/build/umi.0f1049fb.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -4,7 +4,6 @@
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript" src="http://10.10.193.249:9011/web-apps/apps/api/documents/api.js"></script>
</head>
<body>
@ -23,14 +22,7 @@
margin: 0;
}
</style>
<div id="placeholder" class="nav" style="width: 100%; height: 100%"></div>
<script>
var pattern = /(\w+)=([^\#&]*)/ig;
var parames = {};
@ -56,14 +48,15 @@
var model = parames.model || "edit";
var callbackUrl = parames.callbackUrl || "https://officedata.educoder.net/wopi/files/save";
if (!url.startsWith("http")) {
url = top.location.origin + url
}
if (!callbackUrl.startsWith("http")) {
callbackUrl = top.location.origin + callbackUrl
}
function initDoc(key, url, fileType, title, model, callbackUrl) {
if(!url.startsWith("http")){
url = location.origin + url;
};
if(!callbackUrl.startsWith("http")){
url = location.origin + callbackUrl;
};
let config = {
"document": {
"documentType": "text",
@ -91,11 +84,11 @@
"permissions": {
"edit": true, //文件是否可以编辑false时文件不可编辑
"fillForms": true, //定义是否能在文档中填充表单
"print": true, //定义文档是否能打印
"review": false, //第一是否显示审阅文档菜单
"print": false, //定义文档是否能打印
"review": true, //第一是否显示审阅文档菜单
"comment": true, //定义是否可以注释文档。如果注释权限设置为“ true”则文档侧栏将包含“注释”菜单选项只有将mode参数设置为edit时才生效默认值与edit参数的值一致。
"copy": true, //是否允许您将内容复制到剪贴板。默认值为true。
"download": true, //定义是否可以下载文档或仅在线查看或编辑文档。如果下载权限设置为“false”下载为菜单选项将没有。默认值为true。
"download": parames.disabledDownload !== "true", //定义是否可以下载文档或仅在线查看或编辑文档。如果下载权限设置为“false”下载为菜单选项将没有。默认值为true。
"modifyContentControl": true, //定义是否可以更改内容控件设置。仅当mode参数设置为edit时内容控件修改才可用于文档编辑器。默认值为true。
"modifyFilter": true, //定义过滤器是否可以全局应用true影响所有其他用户或局部应用false即仅适用于当前用户。如果将mode参数设置为edit则过滤器修改仅对电子表格编辑器可用。默认值为true。
}
@ -117,7 +110,7 @@
"forcesave": true, //定义保存按钮是否显示默认false
"chat": false, //定义“聊天”菜单按钮是显示还是隐藏请注意如果您隐藏“聊天”按钮则相应的聊天功能也将被禁用。默认值为true。
"commentAuthorOnly": false, //定义用户是否只能编辑和删除他的评论。默认值为false。
"comments": false, //定义是显示还是隐藏“注释”菜单按钮请注意如果您隐藏“评论”按钮则相应的评论功能将仅可用于查看评论的添加和编辑将不可用。默认值为true。
"comments": true, //定义是显示还是隐藏“注释”菜单按钮请注意如果您隐藏“评论”按钮则相应的评论功能将仅可用于查看评论的添加和编辑将不可用。默认值为true。
"compactHeader": false, //定义是否将菜单栏放在在徽标旁边使界面更加紧凑默认false。
"compactToolbar": false, //定义显示的顶部工具栏类型是完整false还是紧凑true。默认值为false 多余菜单将在右侧折叠点击显示。
"compatibleFeatures": false, //定义仅与OOXML格式兼容的功能的使用。例如不要在整个文档上使用注释。默认值为false。
@ -132,7 +125,7 @@
"customer": { //关于 文档编辑器的显示信息
"address": "My City, 123a-45", //有权访问编辑或编辑作者的公司或个人的邮政地址,
"info": "Some additional information", //有关您希望其他人认识的公司或个人的一些其他信息,
"logo": "https://example.com/logo-big.png", //图片徽标的路径(此文件没有特别建议,但是如果使用透明背景的.png格式会更好。图片必须具有以下尺寸432x70
"logo": "https://ali-cdn.educoder.net/images/avatars/LaboratorySetting/1tab?t=1610677202", //图片徽标的路径(此文件没有特别建议,但是如果使用透明背景的.png格式会更好。图片必须具有以下尺寸432x70
"mail": "john@example.com", //有权访问编辑者或编辑者的公司或个人的电子邮件地址
"name": "欧阳锋", //该公司或个人的谁可以访问编辑或编辑作者,名称
"www": "example.com" //以上公司或个人的家庭网站地址,
@ -141,16 +134,18 @@
"url": "https://example.com", //单击“反馈和支持”菜单按钮时将打开的网站地址的绝对URL
"visible": false //显示或隐藏“反馈和支持”菜单按钮,
},
"goback": { //定义“打开文件位置”菜单按钮和右上角按钮的设置。该对象具有以下参数:
"blank": true, //在新的浏览器选项卡/窗口如果值设置为true或当前选项卡如果值设置为false中打开网站。默认值为true
"requestClose": false, //定义如果单击“打开文件位置”按钮则调用events.onRequestClose事件而不是打开浏览器选项卡或窗口。默认值为false
"text": "Open file location", //将在“打开文件位置”菜单按钮和右上角按钮(即,而不是“转到文档”)上显示的文本,
"url": "https://example.com" //单击“打开文件位置”菜单按钮时将打开的网站地址的绝对URL
},
// "goback": { //定义“打开文件位置”菜单按钮和右上角按钮的设置。该对象具有以下参数:
// "visible": false,//显示或隐藏“反馈和支持”菜单按钮,
// "blank": true, //在新的浏览器选项卡/窗口如果值设置为true或当前选项卡如果值设置为false中打开网站。默认值为true
// "requestClose": false, //定义如果单击“打开文件位置”按钮则调用events.onRequestClose事件而不是打开浏览器选项卡或窗口。默认值为false
// "text": "Open file location", //将在“打开文件位置”菜单按钮和右上角按钮(即,而不是“转到文档”)上显示的文本,
// "url": "https://example.com" //单击“打开文件位置”菜单按钮时将打开的网站地址的绝对URL
// },
"logo": {
"image": "https://example.com/logo.png", //图像文件的路径用于在普通工作模式下显示在所有编辑器的查看和编辑模式下。图片必须具有以下尺寸172x40
"imageEmbedded": "https://example.com/logo_em.png", //用于以嵌入式模式显示的图像文件的路径请参阅config部分以了解如何定义嵌入式文档类型。图片必须具有以下尺寸248x40
"url": "https://www.baidu.com" //某人单击徽标图像时将使用的绝对URL可用于转到您的网站等。保留为空字符串或null以使徽标不可单击
"image": "https://ali-cdn.educoder.net/images/avatars/LaboratorySetting/1tab?t=1610677202", //图像文件的路径用于在普通工作模式下显示在所有编辑器的查看和编辑模式下。图片必须具有以下尺寸172x40
"imageEmbedded": "https://ali-cdn.educoder.net/images/avatars/LaboratorySetting/1tab?t=1610677202", //用于以嵌入式模式显示的图像文件的路径请参阅config部分以了解如何定义嵌入式文档类型。图片必须具有以下尺寸248x40
"url": "https://www.educoder.net" //某人单击徽标图像时将使用的绝对URL可用于转到您的网站等。保留为空字符串或null以使徽标不可单击
},
},
"user": { //用户信息
@ -200,7 +195,17 @@
}
initDoc(key, url, fileType, title, model, callbackUrl)
var scripts = document.createElement("script");
scripts.type = "text/javascript";
if (parames.officeServer) {
scripts.src = parames.officeServer + "/web-apps/apps/api/documents/api.js";
} else {
scripts.src = top.location.protocol + "//" + top.location.hostname + ":9011/web-apps/apps/api/documents/api.js";
}
document.body.appendChild(scripts);
scripts.onload = function () {
initDoc(key, url, fileType, title, model, callbackUrl)
}
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save