feat: 疗休养优化布局
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
var uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
var docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
|
||||
const FILE_UPLOAD_ADDRESS = '/platform/inclusiveTherapyV3/common/uploadFile'
|
||||
const FILE_DELETE_ADDRESS = '/platform/inclusiveTherapyV3/common/deleteFile'
|
||||
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/inclusiveTherapyV3/common/preview'
|
||||
const FILE_STREAM_DOWNLOAD_ADDRESS = '/platform/inclusiveTherapyV3/common/download'
|
||||
var FILE_UPLOAD_ADDRESS = '/platform/inclusiveTherapyV3/common/uploadFile'
|
||||
var FILE_DELETE_ADDRESS = '/platform/inclusiveTherapyV3/common/deleteFile'
|
||||
var FILE_STREAM_PREVIEW_ADDRESS = '/platform/inclusiveTherapyV3/common/preview'
|
||||
var FILE_STREAM_DOWNLOAD_ADDRESS = '/platform/inclusiveTherapyV3/common/download'
|
||||
|
||||
const preview = async (filename, id) => {
|
||||
var preview = async (filename, id) => {
|
||||
const suffix = filename.substring(filename.lastIndexOf('.') + 1)
|
||||
if (!docType.includes(suffix.toLowerCase())) {
|
||||
let image = new Image();
|
||||
@@ -19,19 +19,19 @@ const preview = async (filename, id) => {
|
||||
}
|
||||
}
|
||||
|
||||
const download = (id) => {
|
||||
var download = (id) => {
|
||||
window.open(FILE_STREAM_DOWNLOAD_ADDRESS + '?id=' + id)
|
||||
}
|
||||
|
||||
|
||||
const PREVIEW_IMAGE = (val) => {
|
||||
var PREVIEW_IMAGE = (val) => {
|
||||
let image = new Image();
|
||||
image.src = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
}
|
||||
|
||||
const CREATE_PREVIEW_URL = (val) => {
|
||||
var CREATE_PREVIEW_URL = (val) => {
|
||||
return /^(https?:|data:|blob:|\/)/.test(val || "") ? val : FILE_STREAM_PREVIEW_ADDRESS + "?id=" + encodeURIComponent(val)
|
||||
}
|
||||
|
||||
@@ -40,13 +40,13 @@ const CREATE_PREVIEW_URL = (val) => {
|
||||
* 遮盖层颜色
|
||||
* @type {string}
|
||||
*/
|
||||
const COVER_LAYER_COLOR = "rgba(0,0,0,.45)"
|
||||
var COVER_LAYER_COLOR = "rgba(0,0,0,.45)"
|
||||
|
||||
/**
|
||||
* 民族
|
||||
* @type {string[]}
|
||||
*/
|
||||
const nation = [
|
||||
var nation = [
|
||||
'汉族',
|
||||
'蒙古族',
|
||||
'回族',
|
||||
@@ -113,7 +113,7 @@ function clone(obj) {
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
|
||||
const calcTableHeight = (eleIds = []) => {
|
||||
var calcTableHeight = (eleIds = []) => {
|
||||
if (eleIds) {
|
||||
eleIds.forEach(e_id => {
|
||||
const ele = document.querySelector('#' + e_id)
|
||||
|
||||
Reference in New Issue
Block a user