feat: v3版疗休养

This commit is contained in:
2026-10-26 09:19:45 +08:00
parent d598f1bf0f
commit 82713327db
157 changed files with 44651 additions and 0 deletions
@@ -0,0 +1,185 @@
/**
* 民族
* @type {string[]}
*/
const nation = [
'汉族',
'蒙古族',
'回族',
'藏族',
'维吾尔族',
'苗族',
'彝族',
'壮族',
'布依族',
'朝鲜族',
'满族',
'侗族',
'瑶族',
'白族',
'土家族',
'哈尼族',
'哈萨克族',
'傣族',
'黎族',
'傈僳族',
'佤族',
'畲族',
'高山族',
'拉祜族',
'水族',
'东乡族',
'纳西族',
'景颇族',
'柯尔克孜族',
'土族',
'达翰尔族',
'么佬族',
'羌族',
'布朗族',
'撒拉族',
'毛南族',
'仡佬族',
'锡伯族',
'阿昌族',
'普米族',
'塔吉克族',
'怒族',
'乌孜别克族',
'俄罗斯族',
'鄂温克族',
'德昂族',
'保安族',
'裕固族',
'京族',
'塔塔尔族',
'独龙族',
'鄂伦春族',
'赫哲族',
'门巴族',
'珞巴族',
'基诺族'
];
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
const FILE_UPLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/uploadFile'
const FILE_DELETE_ADDRESS = '/platform/staffTherapyRecuperation/common/deleteFile'
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/staffTherapyRecuperation/common/preview'
Vue.component('m-page-loading', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MLoading.vue'))
Vue.component('m-table-loading', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MTableLoading.vue'))
Vue.component('m-card', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MCard.vue'))
Vue.component('vant-file-upload', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/VantFileUpload.vue'))
const GetQueryString = (name) => {
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
const r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return "";
}
const removeHTMLTag = (str) => {
str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
str = str.replace(/\n[\s| | ]*\r/g, '\n'); //去除多余空行
str = str.replace(/&nbsp;/ig, '');//去掉&nbsp;
return str;
}
const CREATE_PREVIEW_URL = (val) => {
return /^(https?:|data:|blob:|\/)/.test(val || "") ? val : FILE_STREAM_PREVIEW_ADDRESS + "?id=" + encodeURIComponent(val)
}
const clone = (val) => {
return JSON.parse(JSON.stringify(val))
}
const toChinesNum = (num) => {
let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
let unit = ["", "十", "百", "千", "万"];
num = parseInt(num);
let getWan = (temp) => {
let strArr = temp.toString().split("").reverse();
let newNum = "";
for (let i = 0; i < strArr.length; i++) {
newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
}
return newNum;
}
let overWan = Math.floor(num / 10000);
let noWan = num % 10000;
if (noWan.toString().length < 4) {
noWan = "0" + noWan;
}
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
}
const loc = () => {
return location.href.replace(location.search, "").replace(location.hash, "")
}
const modal = {
// 消息提示
msg(content) {
vant.Toast(content)
},
// 错误消息
msgError(content) {
vant.Toast.fail(content)
},
// 成功消息
msgSuccess(content) {
vant.Toast.success(content)
},
// 弹出提示
alert(content) {
vant.Dialog.alert({
title: '提示',
message: content
}).then(() => {
// on close
});
},
// 确认窗体
confirm(content) {
return new Promise((resolve, reject) => {
vant.Dialog.confirm({
title: '提示',
message: content,
}).then(() => {
resolve()
}).catch(() => {
// reject()
})
})
},
// 提示信息
showToast(option) {
if (typeof option === "object") {
vant.Toast(option)
} else {
vant.Toast.loading({
message: option,
forbidClick: true,
loadingType: 'spinner',
duration: 2500
});
}
},
// 打开遮罩层
loading(content) {
vant.Toast.loading({
message: content,
forbidClick: true,
overlay: true,
duration: 0
});
},
// 关闭遮罩层
closeLoading() {
vant.Toast.clear();
}
}
Vue.prototype.$modal = modal
@@ -0,0 +1,125 @@
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
const FILE_UPLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/uploadFile'
const FILE_DELETE_ADDRESS = '/platform/staffTherapyRecuperation/common/deleteFile'
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/staffTherapyRecuperation/common/preview'
const FILE_STREAM_DOWNLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/download'
const preview = async (filename, id) => {
const suffix = filename.substring(filename.lastIndexOf('.') + 1)
if (!docType.includes(suffix.toLowerCase())) {
let image = new Image();
image.src = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + id
let viewer = new Viewer(image);
viewer.show();
} else {
let pdfStreamUrl = encodeURIComponent(FILE_STREAM_PREVIEW_ADDRESS + '?id=' + id) //将路径转码
window.open('/assets/platform/plugins/pdfJs/web/viewer.html?file=' + pdfStreamUrl, filename)
}
}
const download = (id) => {
window.open(FILE_STREAM_DOWNLOAD_ADDRESS + '?id=' + id)
}
const 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) => {
return /^(https?:|data:|blob:|\/)/.test(val || "") ? val : FILE_STREAM_PREVIEW_ADDRESS + "?id=" + encodeURIComponent(val)
}
/**
* 遮盖层颜色
* @type {string}
*/
const COVER_LAYER_COLOR = "rgba(0,0,0,.45)"
/**
* 民族
* @type {string[]}
*/
const nation = [
'汉族',
'蒙古族',
'回族',
'藏族',
'维吾尔族',
'苗族',
'彝族',
'壮族',
'布依族',
'朝鲜族',
'满族',
'侗族',
'瑶族',
'白族',
'土家族',
'哈尼族',
'哈萨克族',
'傣族',
'黎族',
'傈僳族',
'佤族',
'畲族',
'高山族',
'拉祜族',
'水族',
'东乡族',
'纳西族',
'景颇族',
'柯尔克孜族',
'土族',
'达翰尔族',
'么佬族',
'羌族',
'布朗族',
'撒拉族',
'毛南族',
'仡佬族',
'锡伯族',
'阿昌族',
'普米族',
'塔吉克族',
'怒族',
'乌孜别克族',
'俄罗斯族',
'鄂温克族',
'德昂族',
'保安族',
'裕固族',
'京族',
'塔塔尔族',
'独龙族',
'鄂伦春族',
'赫哲族',
'门巴族',
'珞巴族',
'基诺族'
];
const loc = () => {
return location.href.replace(location.search, "").replace(location.hash, "")
}
const clone = (obj) => {
return JSON.parse(JSON.stringify(obj))
}
const calcTableHeight = (eleIds = []) => {
if (eleIds) {
eleIds.forEach(e_id => {
const ele = document.querySelector('#' + e_id)
if (ele) {
ele.style.height = (innerHeight - ele.getBoundingClientRect().top - parseInt(ele.dataset.bottom)) + 'px'
}
})
}
}
@@ -0,0 +1,42 @@
const sublime = {
showLoadingbar() {
if (!document.getElementById('therapy-loading')) {
const bar = document.createElement('div');
bar.id = 'therapy-loading';
document.body.appendChild(bar);
}
},
closeLoadingbar() {
const bar = document.getElementById('therapy-loading');
if (bar) bar.remove();
}
};
$.ajaxSetup({
traditional: true,
error(xhr) {
sublime.closeLoadingbar();
const message = xhr.responseJSON && xhr.responseJSON.msg || '请求失败,请稍后重试';
if (window.ELEMENT) ELEMENT.Message.error(message);
else if (window.vant) vant.Toast.fail(message);
}
});
Vue.prototype.$downLoad = function(url, data = {}) {
const query = $.param(data, true);
window.open(url + (url.includes('?') ? '&' : '?') + query);
};
Vue.prototype.$download = Vue.prototype.$downLoad;
Vue.prototype.$viewImage = function(url) {
const address = CREATE_PREVIEW_URL(url);
if (window.vant) vant.ImagePreview([address]);
else window.open(address);
};
window.viewImage = Vue.prototype.$viewImage;
// v3 views use the same helper for stored file IDs and v4 download URLs.
window.therapyPreview = function(value) {
if (!value) return '';
return /^(https?:|data:|blob:|\/)/.test(value) ? value :
'/platform/staffTherapyRecuperation/common/preview?id=' + encodeURIComponent(value);
};
@@ -0,0 +1,129 @@
Vue.component('vi-title', {
props: ['title'],
template: `
<div style="display: flex;flex-direction:row;color: #1867b0;font-weight: bolder;margin-bottom: 20px">
<div style="width: 5px;height: 24px;background-color: #1867b0;border-radius: 2px"></div>
<div style="margin-left: 20px;line-height: 24px;font-size: 15px;letter-spacing: 1px">
{{ title }}
</div>
</div>
`
})
Vue.component('vi-title2', {
props: ['title'],
template: `
<el-row type="flex" justify="space-between" align="middle" style="margin-bottom: 15px">
<div style="display: flex;justify-content: center;align-items: center">
<vi-title :title="title" style="margin-bottom: 0"></vi-title><slot name="label_end"></slot>
</div>
<div style="display: flex;justify-content: right;align-items: center">
<slot name="func"></slot>
</div>
</el-row>
`
})
Vue.component('vi-table-state', {
props: ['state'],
template: `
<span :style="'color:'+state.stateColor">{{ state.stateName }}</span>
`
})
Vue.component('more', {
props: {more: {type: Boolean, default: false}},
template: `
<el-link type="primary" :underline="false" style="margin-left: 15px"
@click="more=!more;$emit('change', more)">
{{ more ? '收起' : '展开' }}<i
:class="more?'el-icon-arrow-up':'el-icon-arrow-down'"></i></el-link>
`,
model: {
prop: 'more',
event: 'change'
}
})
Vue.component('table-tool', {
props: {
label: {type: String},
app: {}
},
data() {
return {
checkedFields: [],
columns: [],
}
},
methods: {
tableSizeChange(command) {
const {size} = command
this.app.tableSizeChange(size)
},
columnChange() {
this.app.columnChange(this.columns.filter(v => this.checkedFields.includes(v.prop)))
},
getColumns() {
const {tableColumns} = this.app
if (!tableColumns) {
return
}
this.columns = tableColumns
this.checkedFields = this.columns.filter(v => v.checked !== 0).map(v => v.prop)
this.columnChange()
},
},
created() {
this.getColumns()
},
template: `
<el-row type="flex" justify="space-between" align="middle" style="margin-bottom: 15px">
<div style="display: flex;justify-content: center;align-items: center">
<vi-title :title="label" style="margin-bottom: 0"></vi-title><slot name="label_end"></slot>
</div>
<div style="display: flex;justify-content: right;align-items: center">
<slot name="func"></slot>
<div class="table-tool-group">
<div class="table-tool-group-item" @click="app.doSearch()" style="width: 50px;padding-left: 10px;">
<i class="el-icon-refresh"></i>
</div>
<el-dropdown @command="tableSizeChange" class="table-tool-group-item">
<div style="display: flex;width: 100%;height: 100%;justify-content: center;align-items: center"><i
class="el-icon-c-scale-to-original"></i></div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{size:'mini'}">Mini</el-dropdown-item>
<el-dropdown-item :command="{size:'small'}">Small</el-dropdown-item>
<el-dropdown-item :command="{size:'medium'}">Medium</el-dropdown-item>
<el-dropdown-item :command="{size:''}">Large</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-popover
trigger="hover" placement="bottom-start">
<div>
<el-checkbox-group v-model="checkedFields" @change="columnChange">
<el-checkbox v-for="field in columns" :label="field.prop" style="display: block">{{
field.label
}}
</el-checkbox>
</el-checkbox-group>
</div>
<div slot="reference" style="width: 50px;padding-right: 10px;" class="table-tool-group-item">
<i class="el-icon-s-operation"></i>
</div>
</el-popover>
</div>
</div>
</el-row>
`,
})
@@ -0,0 +1,198 @@
[v-cloak] {
display: none
}
#app {
background-color: rgb(240, 242, 245);
height: 100%;
overflow-y: auto;
}
.platform .guava-card .slot-class {
height: calc(100vh - 180px);
}
/**
图片预览
*/
.viewer-container {
z-index: 10000;
}
/**
富文本层级调整
*/
.w-e-toolbar{
z-index: 1001!important;
}
.w-e-text-container{
z-index: 1000!important;
}
/**
搜索栏样式
*/
.search {
display: flex;
flex-wrap: wrap;
margin-bottom: -15px;
}
.search .search-item {
display: flex;
align-items: center;
margin-bottom: 15px;
box-sizing: border-box;
width: calc((100% - 160px) / 3);
overflow: hidden;
}
.search .search-query {
width: 160px;
margin-bottom: 15px;
overflow: hidden;
white-space: nowrap;
}
.search .search-item:not(:last-child) {
padding-right: 40px;
}
.search .search-item-label {
color: rgb(100, 100, 100);
margin-right: 10px;
width: 80px;
min-width: 80px;
overflow: hidden;
}
.search .search-item-option {
min-width: calc(100% - 80px - 10px);
overflow: hidden;
}
@media screen and (max-width: 1200px) {
.search .search-item {
width: calc((100% - 160px) / 2);
}
}
@media screen and (max-width: 992px) {
.search .search-item {
width: 100%;
}
.search .search-item:not(:last-child) {
padding-right: 0;
}
}
.platform .vi-table table thead tr th {
background-color: #fafafa !important;
}
.table-tool-group {
margin-left: 15px;
overflow: hidden;
border-radius: 20px;
display: flex;
}
.table-tool-group .table-tool-group-item {
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
background-color: rgba(240, 240, 240, .7);
font-weight: bolder;
transition: all 250ms;
}
.table-tool-group .table-tool-group-item:not(:last-child) {
border-right: 1px solid white;
}
.table-tool-group .table-tool-group-item:hover {
color: white;
background-color: rgb(64, 158, 255);
}
.width-100 {
width: 100%;
}
.ie-must-go-die {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.ie-must-go-die .ie-container {
position: absolute;
top: 40%;
left: 33%;
text-align: center;
color: #000;
}
.ie-must-go-die .ie-container h1 {
font-size: 28px;
margin-bottom: 36px;
}
.ie-must-go-die .ie-container p {
font-size: 16px;
line-height: 24px;
margin-bottom: 16px;
}
.ie-must-go-die .ie-container a {
display: block;
color: inherit;
}
.ie-must-go-die .ie-container a:hover {
text-decoration: underline;
}
.ie-must-go-die .ie-container a:visited {
color: inherit;
}
.el-loading-spinner i {
font-size: 28px;
}
.el-loading-spinner i, .el-loading-spinner p {
/*color: white !important;*/
}
.w-e-toolbar {
background-color: white !important;
border-color: #DCDFE6 !important;
}
.w-e-text-container {
border-color: #DCDFE6 !important;
}
.el-radio-group label {
margin-bottom: 0 !important;
}
/* 滚动条整体部分 */
.main-navigation::-webkit-scrollbar {
display: none;
}
.main-navigation {
border-right: 3px solid rgb(240, 240, 240);
}
@@ -0,0 +1,152 @@
/*.el-dialog__header{*/
/*border-bottom: 1px solid #e5e5e5;*/
/*}*/
/*.el-dialog__footer{*/
/*border-top: 1px solid #e5e5e5;*/
/*}*/
.el-table-container {
padding-top: 54px;
padding-left: 5px;
padding-right: 5px;
}
.el-pagination-container {
background-color: #fff;
}
.el-pagination {
height: 50px;
overflow: hidden;
display: flex;
align-items: center;
}
.el-pagination button, .el-pagination span:not([class*=suffix]) {
line-height: 50px;
height: 50px;
}
a .collapsed {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIW…aIJN0bgQRgIjnlmn1heSO5PE6Y2YXe+5Cr5+h++gs12AcAS6FS+7YOsj4AAAAASUVORK5CYII=);
}
a .expanded {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIW…EYRYBPOB0gBShKwKGA////48VtbW3/8clTnBIH3gCKkzJgAGvBX0dDm0sCAAAAAElFTkSuQmCC);
}
.ms-tree-space {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: 400;
line-height: 1;
width: 18px;
height: 14px;
}
.ms-tree-space::before {
content: ""
}
.el-table__expand-icon--expanded {
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.el-table-expand {
font-size: 0;
}
.el-table-expand label {
width: 90px;
color: #99a9bf;
font-size: 12px;
}
.el-table-expand .el-form-item{
margin-bottom: 2px;
margin-right: 0;
width: 50%;
display: inline-block;
vertical-align: top;
}
.el-table-expand .el-form-item__content {
margin-right: 0;
margin-bottom: 0;
font-size: 12px;
display: inline-block;
vertical-align: top;
position: relative;
}
.el-table-expand-line {
font-size: 0;
}
.el-table-expand-line label {
width: 90px;
color: #99a9bf;
font-size: 12px;
}
.el-table-expand-line .el-form-item{
margin-bottom: 2px;
margin-right: 0;
width: 100%;
display: inline-block;
vertical-align: top;
}
.el-table-expand-line .el-form-item__content {
margin-right: 0;
margin-bottom: 0;
font-size: 12px;
display: inline-block;
vertical-align: top;
position: relative;
}
.el-table__body-wrapper {
scrollbar-width: auto; /* firefox */
-ms-overflow-style: auto; /* IE 10+ */
overflow-x: auto;
overflow-y: auto;
}
.el-table__body-wrapper::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.el-table__body-wrapper::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(144, 147, 153, .35);
}
.el-table__body-wrapper::-webkit-scrollbar-track {
background-color: #f5f7fa;
}
.el-upload__tip {
margin-top: 0px;
color: #c33714;
}
.el-dialog {
width: 60%;
}
.el-table__empty-block {
width: 100% !important;
min-height: 300px;
background: url("/none.png") no-repeat center center;
background-size: 360px 260px;
}
.el-table__empty-text {
display: block;
position: absolute;
bottom: 80px;
height: 40px;
line-height: 40px;
/*display: none !important;*/
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,283 @@
.options {
-webkit-transform: scale(0.7);
-moz-transform: scale(0.7);
-ms-transform: scale(0.7);
transform: scale(0.7);
-webkit-backface-visibility: hidden;
opacity: 0;
-webkit-transition: all 300ms;
-moz-transition: all 300ms;
transition: all 300ms
}
.playground.opened {
visibility: visible
}
.opened .options {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1
}
.pg-cal {
text-align: center;
display: block
}
.pg-val {
display: block;
float: left;
width: 95px;
margin-right: 13px;
margin-bottom: 10px;
padding: 5px;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
text-transform: uppercase;
white-space: nowrap;
color: #5f5f5f;
border: 1px solid transparent
}
.pg-val:hover {
cursor: pointer
}
.pg-val:hover,.pg-val.active {
color: #000
}
.pg-val i {
display: block
}
.playground {
/* display: none;
visibility: hidden; */
position: fixed;
top: 50%;
left: 50%;
width: 500px;
height: auto;
z-index: 9999;
-webkit-transform: translateX(-50%) translateY(-50%);
-moz-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
visibility: hidden;
-webkit-backface-visibility: hidden
}
.playground>.options {
position: relative;
background: #fff;
border: 1px solid #ccc;
border-radius: 2px;
overflow: hidden;
padding: 15px 0
}
.playground>.options:before {
content: "";
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 50%;
background-color: #f5f5f5;
z-index: -1
}
.playground h6 {
font-size: 11px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
}
.pg-toggle {
/* display: none;
visibility: hidden;
text-align: center;
font-size: 20px;
width: 40px;
height: 40px;
line-height: 40px;
margin: 0;
z-index: 9999;
cursor: pointer;
background: #fff;
border: 1px solid #8d8d8d;
border-right: 0;
border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
-webkit-border-radius: 4px 0 0 4px;
position: fixed;
top: 50%;
right: 0;
-webkit-transform: translateX(0) translateY(-50%);
-moz-transform: translateX(0) translateY(-50%);
-ms-transform: translateX(0) translateY(-50%);
transform: translateX(0) translateY(-50%)*/
}
.playground .pg-close {
position: absolute;
padding: 15px;
right: 0;
cursor: pointer
}
.playground select {
width: 100%;
font-size: 10px;
text-transform: uppercase;
outline: none !important;
letter-spacing: 1px
}
.playground .options-container {
width: 50%;
float: left;
padding: 3px 15px
}
.playground small {
font-size: 80%
}
.playground .cs_color {
position: relative;
display: inline-block;
width: 95px;
margin-right: 13px;
margin-bottom: 5px;
padding: 5px;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border: 1px solid transparent
}
.cs_color>div:first-child {
width: 30%;
height: 12px;
float: left
}
.cs_color>div:nth-child(2) {
width: 70%;
height: 12px;
float: left
}
.cs_color>div:nth-child(3) {
width: 30%;
height: 71px;
float: left
}
.cs_color>div:nth-child(4) {
width: 70%;
height: 71px;
background-color: #f1f4f9;
float: left
}
.playground .cs_color.active,.playground .cs_color:hover,.pg-val:hover,.pg-val.active
{
border: 1px solid #a55ee7
}
.playground .cs_1 div:first-child {
background: #147bd0
}
.playground .cs_1 div:nth-child(2) {
background: #1582dc
}
.playground .cs_1 div:nth-child(3) {
background: #2e353d
}
.playground .cs_2 div:first-child {
background: #14a5d3
}
.playground .cs_2 div:nth-child(2) {
background: #15acdc
}
.playground .cs_2 div:nth-child(3) {
background: #4f576b
}
.playground .cs_3 div:first-child {
background: #353d46
}
.playground .cs_3 div:nth-child(2) {
background: #353d46
}
.playground .cs_3 div:nth-child(3) {
background: #353d46
}
.playground .cs_4 div:first-child {
background: #fff;
height: 10px;
border: 1px solid #eee;
border-right: 0
}
.playground .cs_4 div:nth-child(2) {
background: #fff;
height: 10px;
border: 1px solid #eee;
border-left: 0
}
.playground .cs_4 div:nth-child(3) {
background: #39424c
}
.playground .cs_5 div:first-child {
background: #2dbe60
}
.playground .cs_5 div:nth-child(2) {
background: #2dbe60
}
.playground .cs_5 div:nth-child(3) {
background: #f1f4f9
}
.playground .cs_5 div:nth-child(4) {
background: white
}
.pg-footer {
position: absolute;
width: 100%;
text-align: right;
bottom: 5px;
right: 5px
}
.layout-toggleMenu__item{
display: inline-block;
cursor: pointer;
padding: 5px;
margin-left: 5px;
border: 1px solid transparent;
border-radius: 4px;
}
.layout-toggleMenu__item.is-active{
border-color: #a55ee7;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,166 @@
const initTableMixins = {
data() {
return {
festival: ['元旦', '春节', '清明节', '劳动节', '端午节', '中秋节', '国庆节', '其它'],
submitLoading: false,
searchMore: false,
tableSize: '',
tableKey: '',
formData: {},
formRules: {},
formLoading: false,
tableLoading: false,
tableData: [],
tableColumns: [],
pageForm: {
searchName: "",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
},
guavaIndex: 'index',
unionGroups: [],
threeUnits: []
}
},
filters: {
date(value) {
return value ? moment(value).format('YYYY-MM-DD') : ''
}
},
methods: {
dropdownCommand({action, value}) {
if (action) action(value)
},
fileHandleRemove(file, fileList) {
return fileList;
},
fileHandleChange(file, fileList, {type, size}) {
const removeFile = () => {
fileList.splice(fileList.findIndex(v => v === file))
}
if (!file.size) {
this.notifyWarning('您选择的是空文件!')
removeFile()
}
if (type && type.length && !type.includes(file.name.split('.').pop().toLowerCase())) {
this.notifyWarning(`文件只能是 ${type.map(v => v.toUpperCase()).join('/')} 格式!`)
removeFile()
}
if (size && !file.size < size) {
this.notifyWarning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
removeFile()
}
return fileList;
},
columnChange(val) {
this.tableLoading = true
this.tableColumns = val
this.tableLoading = false
},
tableSizeChange(size) {
this.tableSize = size
},
indexMethod(index) {
return index + (this.pageForm.pageNumber - 1) * this.pageForm.pageSize + 1
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData()
},
pageOrder(column) {
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
pageNumberChange(val) {
this.pageForm.pageNumber = val;
this.pageData();
},
pageSizeChange(val) {
this.pageForm.pageSize = val;
this.pageData();
},
pageData(url) {
const address = url ? url : loc() + "/pageData"
sublime.showLoadingbar();
this.tableLoading = true
$.post(address, this.pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
},
notifySuccess(msg) {
this.$notify({
title: '成功',
message: msg,
type: 'success'
});
},
notifyWarning(msg) {
this.$notify({
title: '警告',
message: msg,
type: 'warning'
});
},
notifyError(msg) {
this.$notify.error({
title: '错误',
message: msg
});
},
async getThreeUnits() {
this.$set(this.pageForm, 'threeUnitId', null)
this.threeUnits = []
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
},
launchFullscreen() {
const element = document.documentElement
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
}
this.calcSignTableHeight()
},
exitFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
},
toggleFullScreen() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
}
}
}
}
}
@@ -0,0 +1,119 @@
html {
display: block;
font-size: 16px;
min-height: 100vh;
background-color: #f6f7f9;
}
body {
min-width: 320px;
max-width: 640px;
margin: 0 auto;
padding: 0;
font-family: "微软雅黑", Helvetica, STHeiTi, sans-serif;
color: #000000;
-webkit-text-size-adjust: 100% !important;
}
#app {
min-height: 100vh;
background-color: #f9f9f9;
display: block;
}
[v-cloak] {
display: none;
}
a, img {
-webkit-touch-callout: none;
text-decoration: none;
color: #000000;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.text-left {
text-align: left;
}
.m5 {
margin: 5px;
}
.m10 {
margin: 10px;
}
.mb5 {
margin-bottom: 5px;
}
.mb10 {
margin-bottom: 10px;
}
.mt5 {
margin-top: 5px;
}
.mt10 {
margin-top: 10px;
}
.ml5 {
margin-left: 5px;
}
.ml15 {
margin-left: 15px;
}
.ml10 {
margin-left: 10px;
}
.mr5 {
margin-right: 5px;
}
.mr10 {
margin-right: 10px;
}
.mt20 {
margin-top: 20px;
}
.p10 {
padding: 10px;
}
.mb20 {
margin-bottom: 20px;
}
.flex-box {
display: flex;
}
.font-bold {
font-weight: bold;
}
.text-overflow {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
@@ -0,0 +1,177 @@
.van-pagination__item--active {
background-color: #1867b0;
color: #FFFFFF !important;
}
.van-pagination__item:active {
background-color: #1867b0 !important;
}
.van-pagination__item {
color: #1867b0;
}
.van-dropdown-menu__bar {
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid #f8f8f8;
box-shadow: none;
overflow-x: auto;
}
/*.van-dropdown-menu__bar > .van-dropdown-menu__item:not(:last-child) {*/
/* border-right: 1px solid #f0f0f0;*/
/*}*/
.van-dropdown-menu__title--active, .van-dropdown-item__option--active, .van-dropdown-item__option--active .van-dropdown-item__icon {
color: #1867b0;
}
.van-tabs {
z-index: 1;
}
.van-tabs__line {
background-color: #1867b0;
}
.font-theme-color {
color: #1867b0;
}
.van-nav-bar {
/*background-color: #1867b0;*/
background-color: #FFFFFF;
z-index: 11;
}
.van-nav-bar .van-nav-bar__left > .van-icon-arrow-left {
/*color: #FFFFFF;*/
color: #000;
}
.van-nav-bar .van-nav-bar__title {
/*color: #FFFFFF;*/
color: #000;
}
.van-dropdown-menu__title {
font-size: 14px;
}
.layui-table th, .layui-table td {
text-align: center !important;
}
.layui-table-fixed {
z-index: 9 !important;
}
.search-fixed {
position: fixed;
top: 46px;
left: 0;
width: 100%;
z-index: 1;
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
}
.van-empty {
background-color: #FFFFFF;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
z-index: 0;
}
.van-dropdown-item__content {
border-bottom-right-radius: 15px;
border-bottom-left-radius: 15px;
}
.van-dropdown-menu__bar {
}
.van-dropdown-menu__item {
flex: unset;
flex-shrink: 0;
}
.van-dropdown-menu__title {
padding: 0 25px;
}
.list-card {
margin-bottom: 20px;
}
.list-card .van-cell {
padding: 8px 16px;
}
.list-card .van-cell__title {
flex: 1;
color: #969799;
/*font-weight: 500;*/
}
.list-card .van-cell__title:after {
content: ':';
margin-left: 2px;
}
.list-card .van-cell__value {
text-align: left;
flex: 2.5;
color: #323233;
/*font-weight: 500;*/
}
.van-cell-group__title {
padding: 5px 0 5px 16px;
}
.van-calendar__confirm {
height: 45px;
}
.van-index-bar__sidebar {
top: -webkit-calc(20% + 20px);
top: calc(20% + 20px);
height: -webkit-calc(80% - 100px);
height: calc(80% - 100px);
-webkit-transform: unset;
-ms-transform: unset;
transform: unset;
}
.van-index-bar__index {
-webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
font-weight: 500;
font-size: 14px;
}
.van-sidebar-item {
margin: 0 !important;
padding: 10px 12px !important;
}
.van-sidebar-item--select::before {
background-color: #373AA3;
left: 5px;
}
.van-sidebar-item--select {
text-indent: 5px;
}
@@ -0,0 +1,98 @@
const mobileMixins = {
data() {
return {
tableData: [],
mLoading: false,
finished: false,
loading: false,
refreshing: false,
formData: {},
pageForm: {
pageNumber: 1,
pageSize: 5,
totalCount: 0
},
themeColor: '#373AA3',
pageDataUrl: null,
yearList: []
}
},
filters: {
date(value) {
return value ? moment(value).format('YYYY-MM-DD') : ''
}
},
methods: {
async pageData() {
this.mLoading = true
if (this.pageDataUrl == null) {
this.pageDataUrl = loc() + '/pageData'
}
$.post(this.pageDataUrl, this.pageForm, (res) => {
const {code, data} = res
if (this.refreshing) {
this.tableData = [];
this.refreshing = false;
}
this.loading = false;
if (code === 0) {
this.tableData = this.tableData.concat(data.list)
this.pageForm.totalCount = data.totalCount
if (this.tableData.length === 0) {
this.finished = true;
} else {
this.none_data = false
if (this.tableData.length >= this.pageForm.totalCount) {
this.finished = true;
this.pageForm.pageNumber++
}
}
}
})
this.mLoading = false
},
async onRefresh() {
this.tableData = []
this.refreshing = true;
this.finished = false;
this.pageForm.pageNumber = 0
this.loading = true;
await this.pageData();
},
GetQueryString(name) {
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
const r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return "";
},
createYearList() {
for (let i = new Date().getFullYear() - 50; i <= new Date().getFullYear(); i++) {
this.yearList.unshift({value: i, text: i + '年'},)
}
},
startLoading() {
this.vLoading = vant.Toast.loading({
message: '加载中...',
forbidClick: true,
duration: 0
})
},
closeLoading() {
setTimeout(() => {
this.vLoading.close()
}, 500)
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.tableData = []
this.pageData()
}
},
created() {
this.createYearList()
}
}
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1654505536065" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9027" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M752.736 431.063C757.159 140.575 520.41 8.97 504.518 0.41V0l-0.45 0.205-0.41-0.205v0.41c-15.934 8.56-252.723 140.165-248.259 430.653-48.21 31.457-98.713 87.368-90.685 184.074 8.028 96.666 101.007 160.768 136.601 157.287 35.595-3.482 25.232-30.31 25.232-30.31l12.206-50.095s52.47 80.569 69.304 80.528c15.114-1.23 87-0.123 95.6 0h0.82c8.602-0.123 80.486-1.23 95.6 0 16.794 0 69.305-80.528 69.305-80.528l12.165 50.094s-10.322 26.83 25.272 30.31c35.595 3.482 128.574-60.62 136.602-157.286 8.028-96.665-42.475-152.617-90.685-184.074z m-248.669-4.26c-6.758-0.123-94.781-3.359-102.891-107.192 2.95-98.714 95.97-107.438 102.891-107.93 6.964 0.492 99.943 9.216 102.892 107.93-8.11 103.833-96.174 107.07-102.892 107.192z m-52.019 500.531c0 11.838-9.42 21.382-21.012 21.382a21.217 21.217 0 0 1-21.054-21.34V821.74c0-11.797 9.421-21.382 21.054-21.382 11.591 0 21.012 9.585 21.012 21.382v105.635z m77.333 57.222a21.504 21.504 0 0 1-21.34 21.626 21.504 21.504 0 0 1-21.34-21.626V827.474c0-11.96 9.543-21.668 21.299-21.668 11.796 0 21.38 9.708 21.38 21.668v157.082z m71.147-82.043c0 11.796-9.42 21.34-21.053 21.34a21.217 21.217 0 0 1-21.013-21.34v-75.367c0-11.755 9.421-21.299 21.013-21.299 11.632 0 21.053 9.544 21.053 21.3v75.366z" fill="#1867b0" p-id="9028"></path></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,426 @@
/**
* 根据enum获取选项
* @returns {Promise<*>}
*/
const getEnumOptions = async (enumName) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/enumOptions", {enumName})
return data
}
/**
* 根据code获取字典选项
* @returns {Promise<*>}
*/
const getDictOptions = async (code) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/dictOptions", {code})
return data
}
/**
* 根据code获取字典选项信息
* @returns {Promise<*>}
*/
const getDictState = async (code) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/dictState", {code})
return data
}
/**
* 获取校区
* @returns {Promise<*>}
*/
const getCampus = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getCampus")
return data
}
/**
* 获取代表团
* @returns {Promise<*>}
*/
const getDbt = async (jdhId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getDbt", {jdhId})
return data
}
//查询当前用户管理的院级工会
const getUnion = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnion")
return data
}
//查询当前用户管理的院级工会下的单位
const getUnit = async (unionid) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnit", {unionid: unionid})
return data
}
/**
* 获取代表小组
* @returns {Promise<*>}
*/
const getGroup = async (jdhId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getGroup", {jdhId})
return data
}
//获取所有开启的教代会
const getOpenJdh = async () => {
const {data} = await $.get("/platform/jdh/Common/getOpenJdhxx")
return data
}
/**
* 获取院级工会
* @returns {Promise<*>}
*/
const getUnions = async (delegationId = null, isPermission = false) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unions", {delegationId, isPermission})
return data
}
/**
* 获取活动院级工会
* @returns {Promise<*>}
*/
const getActivityUnions = async () => {
const {data} = await $.get("/platform/activity/basic/union/getActivityUnions",)
return data
}
/**
* 获取单位
* @returns {Promise<*>}
*/
const getUnits = async (unionId = null) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/units", {unionId})
return data
}
const getClubUnits = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubUnits", {})
return data
}
/**
* 获取单位
* @returns {Promise<*>}
*/
const getActivityUnits = async (unionId) => {
const {data} = await $.get("/platform/activity/basic/union/getActivityUnits", {unionId})
return data
}
/**
* 获取本分工会的单位
* @returns {Promise<*>}
*/
const getUnionUnits = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionUnits")
return data
}
/**
* 获取福利单位
* @returns {Promise<*>}
*/
const getWelfareUnits = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/welfareUnits")
return data
}
/**
* 获取福利单位的二级单位
* @returns {Promise<*>}
*/
const getUnitsByWelfareUnit = async (welfareUnitId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unitsByWelfareUnit", {welfareUnitId})
return data
}
/**
* 获取协会
* @returns {Promise<*>}
*/
const getClubs = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/clubs", {})
return data
}
/**
* 获取届次
* @returns {Promise<*>}
*/
const getJc = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getJcByDict")
return data
}
/**
* 获取当前人所管理的协会
* @returns {Promise<*>}
*/
const getClubsByRole = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubsByRole", {})
return data
}
/**
* 获取当前人所在的协会
* @returns {Promise<*>}
*/
const getClubsByUser = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubsByUser", {})
return data
}
/**
* 获取文件类型
* @returns {Promise<*>}
*/
const getFileType = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getFileTypeByDict")
return data
}
/**
* 获取基层干部的角色
* @returns {Promise<*>}
*/
const getJcgbJs = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getJcgbJsByDict")
return data
}
/**
* 获取审批员的角色
* @returns {Promise<*>}
*/
const getSpyJs = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getSpyJsByDict")
return data
}
/**
* 获取协会类型
* @returns {Promise<*>}
*/
const getClubType = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubTypeByDict")
return data
}
/**
* 获取系统名称
* @returns {Promise<*>}
*/
const getSystemName = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getSystemNameByDict")
return data
}
/**
* 获取工代会
* @returns {Promise<*>}
*/
const getGdh = async (open = true) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getGdh", {open})
return data
}
/**
* 获取工代会代表团
* @returns {Promise<*>}
*/
const getGdhDbt = async (jdhId) => {
const {data} = await $.get("/platform/gdh/common/getDbt", {jdhId})
return data
}
/**
* 根据id查用户
* @returns {Promise<*>}
*/
const queryUserByIds = async (ids) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/queryUserByIds", {ids: JSON.stringify(ids)})
return data
}
/**
* 根据id查用户
* @returns {Promise<*>}
*/
const queryUserById = async (id) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/queryUserById", {id: id})
return data
}
/**
* 查询用户
* @param query
* @param unionId
* @param unitId
* @param sex
* @param member
* @returns {Promise<*>}
*/
const searchUser = async (query, unionId = null, unitId = null, sex = null, member = null) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/searchUser", {
query,
unionId,
unitId,
sex,
member
})
return data.list
}
/**
* 获取代表可以操作的教代会
* @returns {Promise<*>}
*/
const getJdhByDb = async () => {
const {data} = await $.get("/platform/proposal/common/getJdhByDb")
return data
}
/**
* 获取代表可以操作的开启的教代会
* @returns {Promise<*>}
*/
const getOpenJdhByDb = async () => {
const {data} = await $.get("/platform/proposal/common/getOpenMeeting")
return data
}
/**
* 获取教代会工作资料类型
* @returns {Promise<*>}
*/
const getGzzllx = async () => {
const {data} = await $.get("/platform/jdh/Common/getGzzllx")
return data
}
/**
* 获取疗休养活动
* @returns {Promise<*>}
*/
const getLxyHd = async () => {
const {data} = await $.get("/platform/zgfw/lxy/common/getHdList")
return data
}
const getlxyHdCd = async () => {
const {data} = await $.get("/platform/zgfw/lxy/common/getlxyHdCd")
return data
}
const getNowLxyHd = async () => {
const {data} = await $.get("/platform/zgfw/lxy/common/getNowHdList")
return data
}
/**
* 获取基层工会
* @returns {Promise<*>}
*/
const getUnionList = async (unionId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionList", {unionId})
return data
}
const threeUnitsByUnionGroupOrUnitId = async (unitId, groupId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/threeUnitsByUnionGroupOrUnitId", {
unitId,
groupId
})
return data
}
const unionGroupsByUnionId = async (unionId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionGroupsByUnionId", {unionId})
return data
}
/**
* 获取活动人员范围
* @returns {Promise<*>}
*/
const getActivityGroup = async () => {
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
return data
}
/**
* 查看该人员是否在活动范围中
* @returns {Promise<*>}
*/
const getScopeUser = async (activityGroupId) => {
const {data} = await $.get('/platform/activity/basic/scope/getScopeUser', {activityGroupId})
return data
}
/**
* 根据code查询活动项目下面的类型
* @param id
* @returns {Promise<*>}
*/
const getActivityTwoLevelType = async (code) => {
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code})
return data
}
//获取二级教代会(双代会)工作资料类型
const getJdh2Gzzllx = async () => {
const {data} = await $.get("/platform/jdh/Common/getJdh2Gzzllx")
return data
}
const getLocationVariable = (variable) => {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (let i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
return '';
}
const getConfigKey = async (key) => {
const {data} = await $.get('/platform/staffTherapyRecuperation/common/getValue', {key})
return data
}
/**
* 根据多个工会获取单位
* @returns {Promise<*>}
*/
const getUnitByUnions = async (unionId = null) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnitsByUnions", {unionId})
return data
}
/**
* 多个单位或小组获取三级单位
* @param unitId
* @param groupId
* @returns {Promise<*>}
*/
const getThreeUnitsByUnionGroupsOrUnitIds = async (unitId, groupId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getThreeUnitsByUnionGroupsOrUnitIds", {
unitId,
groupId
})
return data
}
/**
* 多个工会获取工会小组
* @param unionId
* @returns {Promise<*>}
*/
const getUnionGroupsByUnions = async (unionId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnionGroupsByUnions", {unionId})
return data
}
@@ -0,0 +1,104 @@
<template>
<div>
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
基地信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item label="年度">{{ viewData.year }}</el-descriptions-item>
<el-descriptions-item label="排序编号">{{ viewData.sortNumber }}</el-descriptions-item>
<el-descriptions-item label="酒店名称">{{ viewData.baseName }}</el-descriptions-item>
<el-descriptions-item label="区域性质">{{ viewData.regionalNature }}</el-descriptions-item>
<!-- (校工会创建AND自由模式) OR (分工会创建) -->
<!-- <template v-if="(viewData.createMode === 2 && viewData.signUpMode === 2 ) || viewData.createMode === 1">-->
<!--<el-descriptions-item label="出行天数">{{ viewData.regionalNature=5?"五天四夜":"三天两夜" }}</el-descriptions-item>-->
<el-descriptions-item label="标段时间">
<div v-for="item in modifyBdList">
<span v-if="viewData.lotId===item.id">{{ item.lotName }}</span>
</div>
</el-descriptions-item>
<el-descriptions-item label="预计费用(元)">{{ viewData.estimatedCost }}</el-descriptions-item>
<el-descriptions-item label="酒店联系人">{{ viewData.baseContactPerson }}</el-descriptions-item>
<el-descriptions-item label="联系人电话">{{ viewData.baseContactNumber }}</el-descriptions-item>
<el-descriptions-item label="报名开始时间">{{ viewData.signUpStartTime }}</el-descriptions-item>
<el-descriptions-item label="报名结束时间">{{ viewData.signUpEndTime }}</el-descriptions-item>
<el-descriptions-item :span="2" label="变更截至时间">{{ viewData.changeEndTime }}</el-descriptions-item>
<el-descriptions-item label="活动开始时间">{{ viewData.activityStartTime }}</el-descriptions-item>
<el-descriptions-item label="活动结束时间">{{ viewData.activityEndTime }}</el-descriptions-item>
<!--</template>-->
</el-descriptions>
</div>
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
旅行社信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item :span="2" label="旅行社名称">
{{ viewData.travelAgency.travelAgencyName }}
</el-descriptions-item>
<el-descriptions-item label="联系人">{{ viewData.travelAgency.contact }}</el-descriptions-item>
<el-descriptions-item label="电话">{{ viewData.travelAgency.contactMobileNumber }}</el-descriptions-item>
<el-descriptions-item label="邮箱">{{ viewData.travelAgency.email }}</el-descriptions-item>
<el-descriptions-item label="官网">
<a :href="viewData.travelAgency.officialWebsite" class="text-primary" target="_blank">
{{ viewData.travelAgency.officialWebsite }}
</a>
</el-descriptions-item>
</el-descriptions>
</div>
<div class="panel panel-default mt20" style="border-color: #ebeef5">
<div class="panel-heading" style="background: #fafafa;border-color: #ebeef5">
<h3 class="panel-title">
详细信息
</h3>
</div>
<div class="panel-body">
<div v-html="viewData.content"></div>
</div>
</div>
</div>
</template>
<script>
module.exports = {
name: "BaseManageInfo",
data() {
return {
viewData: {
travelAgency: {}
},
modifyBdList: [],
}
},
methods: {
openView(id, obj) {
this.modifyBdList = obj
this.findOne(id)
},
async findOne(id) {
const res = await $.get('/platform/staffTherapyRecuperation/baseManagement/selectBaseManageById/' + id)
if (res.code === 0) {
this.viewData = res.data
}
},
},
}
</script>
<style scoped>
.viewTable .el-descriptions__table {
table-layout: fixed !important;
}
.viewTable .el-descriptions-item__cell {
text-align: center !important;
}
</style>
@@ -0,0 +1,82 @@
/**
*Desc:
*Create by: jug
*Create time:2023/11/10/11:07
*/
<template>
<div class="el-descriptions">
<div class="el-descriptions__body">
<slot></slot>
</div>
</div>
</template>
<script>
module.exports = {}
</script>
<style scoped>
.el-descriptions__table {
table-layout: fixed;
!important;
}
.el-descriptions table {
table-layout: auto;
}
.el-descriptions__body table {
border-collapse: collapse;
width: 100%;
table-layout: fixed;
}
.el-descriptions :not(.is-bordered) th, td {
padding-bottom: 12px;
}
.el-descriptions .is-bordered th, td {
border: 1px solid #ebeef5;
padding: 12px 10px;
}
.el-descriptions__body table th, td {
-webkit-box-sizing: border-box;
box-sizing: border-box;
text-align: left;
font-weight: 400;
line-height: 1.5;
}
.el-descriptions__body table th {
font-weight: 400;
color: #909399;
background: #fafafa;
border: 1px solid #ebeef5;
padding: 12px 10px;
min-width: 180px;
}
.el-descriptions__body table td .el-form-item {
margin-bottom: 0;
}
.el-descriptions__body table td .is-required .el-form-item__error {
background: #303133;
color: #fff;
position: absolute;
border-radius: 4px;
padding: 10px;
z-index: 2000;
font-size: 12px;
line-height: 1.2;
min-width: 10px;
word-wrap: break-word;
}
.el-descriptions .el-date-editor.el-input, .el-date-editor.el-input__inner {
width: 100%;
}
</style>
@@ -0,0 +1,10 @@
<template>
<el-drawer title="参加人员范围设置" :visible.sync="userScopeDialog" size="90%" :append-to-body="true" @closed="$emit('group_change')">
<iframe v-if="userScopeDialog" src="/platform/activity/basic/scope" title="参加人员范围设置" style="width:100%;height:calc(100vh - 90px);border:0"></iframe>
</el-drawer>
</template>
<script>
module.exports = {
data() { return {userScopeDialog: false}; }
};
</script>
@@ -0,0 +1,191 @@
<template>
<div>
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
<el-tab-pane label="报名信息" name="1">
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
本人信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item label="一卡通号">{{ viewData.loginName }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.userName }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="工会">{{ viewData.unionName }}</el-descriptions-item>
<!-- <el-descriptions-item label="是否转入转出">
<span class="label label-primary">
<sapn v-if="viewData.takePartInUnionId!=union_id">转出报名</sapn>
<sapn v-else-if="viewData.selfUnionId!=union_id">转入报名</sapn>
<sapn v-else>本公会报名</sapn>
</span>
</el-descriptions-item>-->
<el-descriptions-item label="报名时间">{{ viewData.signingUptime }}</el-descriptions-item>
<el-descriptions-item label="参加活动时间">{{
viewData.specificTime ? viewData.specificTime : '暂未更新'
}}
</el-descriptions-item>
<el-descriptions-item label="实际出行时间">{{
viewData.takePartInTime ? viewData.takePartInTime : '暂未更新'
}}
</el-descriptions-item>
<el-descriptions-item v-if="viewData.lineName" label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
<el-descriptions-item v-if="viewData.lineName" label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
<el-descriptions-item v-else label="旅行社名称">{{ viewData.joinTravelAgencyName }}</el-descriptions-item>
<template v-if="configData.familyInfo == 2">
<el-descriptions-item label="是否携带家属">
<span class="label label-primary">
{{ viewData.companionList && viewData.companionList.length > 0 ? '携带' : '未携带' }}
</span>
</el-descriptions-item>
<el-descriptions-item label="床型">{{ viewData.bedInfo?.bedType }}</el-descriptions-item>
<el-descriptions-item label="床位">{{
viewData.bedInfo?.bedNum ? viewData.bedInfo?.bedNum : '暂无'
}}
</el-descriptions-item>
<el-descriptions-item label="意向拼床人">
{{ viewData.bedInfo?.otherSleepUser ? viewData.bedInfo?.otherSleepUser : '暂无' }}
</el-descriptions-item>
</template>
<template v-else>
<el-descriptions-item label="家属人数">{{ viewData.familyNumber }}</el-descriptions-item>
</template>
</el-descriptions>
</div>
<div v-if="configData.familyInfo === 2" class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
同伴信息
</h3>
</div>
<div class="panel-body" style="border: 1px solid rgb(235, 238, 245)">
<el-table :data="viewData.companionList">
<el-table-column label="姓名" prop="userName"></el-table-column>
<el-table-column label="性别" prop="sex"></el-table-column>
<el-table-column label="身份证号" prop="idCard"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
{{ row.bedInfo?.otherSleepUser ? row.bedInfo?.otherSleepUser : '暂无' }}
</template>
</el-table-column>
<el-table-column label="关系" prop="relation"></el-table-column>
</el-table>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="所属分工会审核信息" name="2" v-if="viewData.selfUnionAuditId">
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
审核信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item label="审核人">
{{ viewData.selfUnionAudit.username }}({{ viewData.selfUnionAudit.loginname }})
</el-descriptions-item>
<el-descriptions-item label="审核时间">{{ viewData.selfUnionAudit.auditTime }}</el-descriptions-item>
<el-descriptions-item label="审核意见">{{ viewData.selfUnionAudit.auditOpinion }}</el-descriptions-item>
</el-descriptions>
</div>
</el-tab-pane>
<el-tab-pane label="意向线路分工会审核信息" name="3" v-if="viewData.joinLineUnionAuditId">
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
审核信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item label="审核人">
{{ viewData.joinLineUnionAudit.username }}({{ viewData.joinLineUnionAudit.loginname }})
</el-descriptions-item>
<el-descriptions-item label="审核时间">{{ viewData.joinLineUnionAudit.auditTime }}</el-descriptions-item>
<el-descriptions-item label="审核意见">{{ viewData.joinLineUnionAudit.auditOpinion }}</el-descriptions-item>
</el-descriptions>
</div>
</el-tab-pane>
<slot name="handle"></slot>
</el-tabs>
</div>
</template>
<script>
module.exports = {
props: {
union_id: {
type: String,
default: "",
},
},
components: {
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
},
data() {
return {
activeName: "1",
viewData: {
companionList: [],
bedInfo: {},
},
loading: false,
configData: {},
}
},
methods: {
async findOne(id) {
this.loading = true
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id})
this.loading = false
if (resp.code === 0) {
this.viewData = resp.data.viewData
} else {
this.viewData = {}
this.$notify.warning({title: '警告', message: resp.data})
}
},
openView(id) {
this.findOne(id)
},
openAudit(id, activeName) {
this.findOne(id)
this.activeName = activeName
},
async getConfigData() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
this.configData = resp.data
},
},
async created() {
await this.getConfigData()
}
}
</script>
@@ -0,0 +1,42 @@
<template>
<div>
<div v-if="view">
<a v-for="file in files" :key="file.id || file.filepath" :href="file.filepath || preview(file.id)" target="_blank" style="display:block">{{ file.filename || file.name }}</a>
</div>
<el-upload v-else action="/platform/staffTherapyRecuperation/common/uploadFile" name="file"
:limit="max" :multiple="max > 1" :file-list="fileList" :drag="card"
:before-upload="beforeUpload" :on-success="success" :on-remove="remove" :on-preview="open">
<el-button size="small" type="primary">选择文件</el-button>
<div slot="tip"><slot></slot></div>
</el-upload>
</div>
</template>
<script>
module.exports = {
props: {files: {type: Array, default: () => []}, view: Boolean, card: Boolean,
max: {type: Number, default: 10}, type: Array, max_size: Number},
data() { return {fileList: []}; },
watch: {files: {immediate: true, deep: true, handler(files) {
this.fileList = (files || []).map(file => ({name: file.filename || file.name, url: file.filepath || therapyPreview(file.id), rawInfo: file}));
}}},
methods: {
preview: therapyPreview,
beforeUpload(file) {
const suffix = file.name.split('.').pop().toLowerCase();
if (this.type && !this.type.includes(suffix)) { this.$message.warning('文件格式不符合要求'); return false; }
if (this.max_size && file.size > this.max_size) { this.$message.warning('文件大小超过限制'); return false; }
return true;
},
success(result, file, list) {
if (result.code !== 0) { this.$message.error(result.msg); return; }
file.rawInfo = result.data;
this.emit(list);
},
remove(file, list) { this.emit(list); },
emit(list) {
this.$emit('update:files', list.map(file => file.rawInfo || file.response && file.response.data).filter(Boolean));
},
open(file) { window.open(file.url || file.rawInfo && file.rawInfo.filepath); }
}
};
</script>
@@ -0,0 +1,146 @@
<template>
<div class="guava-main-content">
<div v-show="v==='index'" key="index" class="transition-item">
<slot></slot>
</div>
<el-card v-show="v==='edit'" key="edit" shadow="never" class="animated-card">
<template #header>
<el-row type="flex">
<el-col :span="12">
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="v='index'">返回</el-button>
</el-col>
<el-col :span="12" class="text-right">
<slot name="edit_func"></slot>
</el-col>
</el-row>
</template>
<div :class="{'card_scroll':edit_scroll}">
<slot name="edit"></slot>
</div>
</el-card>
<el-card v-show="v==='view'" key="view" shadow="never" class="animated-card">
<template #header>
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="v='index'">返回</el-button>
</template>
<div :class="{'card_scroll':edit_scroll}">
<slot name="view"></slot>
</div>
</el-card>
<el-card v-show="v==='public'" key="public" shadow="never" class="animated-card">
<div slot="header" class="clearfix">
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="back()">返回
</el-button>
</div>
<div>
<slot name="public"></slot>
</div>
</el-card>
</div>
</template>
<script>
module.exports = {
props: {
value: {
type: String,
default: 'index'
},
//为true的时候页面不会滚动 card-body滚动 edit view 自己来控制
edit_scroll: {
type: Boolean,
default: true
},
view_scroll: {
type: Boolean,
default: true
},
},
data() {
return {
v: 'index',
}
},
watch: {
v(newValue, oldValue) {
this.$emit('vchange', {newValue, oldValue})
this.$emit('input', newValue)
}
},
methods: {
index() {
this.v = 'index'
},
edit() {
this.v = 'edit'
},
view() {
this.v = 'view'
},
public() {
this.v = 'public'
},
back() {
this.v = 'index'
}
}
}
</script>
<style>
.guava-main-content {
padding: 10px 12px;
background-color: #f6f6f6;
min-height: 100%;
}
.animated-card {
animation-name: cardAnimation;
animation-duration: .5s;
animation-fill-mode: both;
}
@keyframes cardAnimation {
from {
opacity: 0;
transform: translateY(-50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.el-card__header {
padding: 5px 20px !important;
}
.el-tabs--border-card {
box-shadow: unset !important;
}
.card_scroll {
max-height: calc(100vh - 50px - 20px - 54px - 40px - 5px);
overflow-y: scroll;
}
.card_scroll {
overflow: scroll;
}
.card_scroll::-webkit-scrollbar {
display: none;
}
.card_scroll::-webkit-scrollbar-vertical {
display: none;
}
.card_scroll::-webkit-scrollbar-horizontal {
display: none;
}
</style>
@@ -0,0 +1,42 @@
<template>
<el-upload action="/platform/staffTherapyRecuperation/common/uploadFile" name="file" list-type="picture-card"
:file-list="fileList" :limit="limit" :before-upload="beforeUpload"
:on-success="success" :on-remove="remove" :on-preview="open"
:style="{'--therapy-width': width + 'px', '--therapy-height': height + 'px'}">
<i class="el-icon-plus"></i>
</el-upload>
</template>
<script>
module.exports = {
props: {value: {type: Array, default: () => []}, limit: {type: Number, default: 1},
width: {type: Number, default: 100}, height: {type: Number, default: 100}, fileType: Array, fileSize: Number},
data() { return {fileList: []}; },
watch: {value: {immediate: true, deep: true, handler(values) {
this.fileList = (values || []).map((value, index) => ({name: '图片' + (index + 1), url: therapyPreview(value)}));
}}},
methods: {
beforeUpload(file) {
if (this.fileType && !this.fileType.includes(file.name.split('.').pop().toLowerCase())) {
this.$message.warning('图片格式不符合要求'); return false;
}
if (this.fileSize && file.size > this.fileSize * 1024 * 1024) {
this.$message.warning('图片大小超过限制'); return false;
}
return true;
},
success(result, file, list) {
if (result.code !== 0) { this.$message.error(result.msg); return; }
file.url = result.data.filepath;
this.emit(list);
},
remove(file, list) { this.emit(list); },
emit(list) { this.$emit('input', list.map(file => file.response ? file.response.data.filepath : file.url)); },
open(file) { window.open(file.url); }
}
};
</script>
<style scoped>
.el-upload-list--picture-card .el-upload-list__item, .el-upload--picture-card {
width: var(--therapy-width); height: var(--therapy-height); line-height: var(--therapy-height);
}
</style>
@@ -0,0 +1,145 @@
<template>
<div>
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
线路信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item label="年度">{{ viewData.year }}</el-descriptions-item>
<el-descriptions-item label="编号">{{ viewData.serialNumber }}</el-descriptions-item>
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
<el-descriptions-item label="区域性质">{{ viewData.regionalNature }}</el-descriptions-item>
<!-- <el-descriptions-item label="最少参与教工">{{ viewData.minimumGroupSize }}</el-descriptions-item>-->
<!-- (校工会创建AND自由模式) OR (分工会创建) -->
<!-- <template v-if="(viewData.createMode === 2 && viewData.signUpMode === 2 ) || viewData.createMode === 1">-->
<!-- <el-descriptions-item label="报名开始时间">{{ viewData.signUpStartTime }}</el-descriptions-item>
<el-descriptions-item label="报名结束时间">{{ viewData.signUpEndTime }}</el-descriptions-item>
<el-descriptions-item :span="2" label="变更截至时间">{{ viewData.changeEndTime }}</el-descriptions-item>
<el-descriptions-item label="出行开始时间">{{ viewData.playStartTime }}</el-descriptions-item>
<el-descriptions-item label="出行结束时间">{{ viewData.playEndTime }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="交通工具">{{ viewData.trafficTools }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="预计费用(元)">{{ viewData.estimatedCost }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="预计人数(含家属)">{{ viewData.estimatedFamilyNumbers }}</el-descriptions-item>-->
<!-- <el-descriptions-item label=""></el-descriptions-item>-->
</el-descriptions>
</div>
<div class="panel panel-default mt20" style="border:none" v-if="showTravelTimePeriod">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
出行时间段
</h3>
</div>
<el-table :data="times" border>
<el-table-column label="报名开始时间" prop="signUpStartTime" width="160"></el-table-column>
<el-table-column label="报名结束时间" prop="signUpEndTime" width="160"></el-table-column>
<el-table-column label="变更截至时间" prop="changeEndTime" width="160"></el-table-column>
<el-table-column label="出行开始时间" prop="playStartTime" width="160"></el-table-column>
<el-table-column label="出行结束时间" prop="playEndTime" width="160"></el-table-column>
<el-table-column label="旅行社" prop="travelAgencyName" width="150"></el-table-column>
<el-table-column label="联系人" prop="contact" width="100"></el-table-column>
<el-table-column label="联系电话" prop="contactPhone" width="120"></el-table-column>
<el-table-column label="负责人" prop="principal" width="100"></el-table-column>
<el-table-column label="联系方式" prop="principalContact" width="120"></el-table-column>
<el-table-column label="交通工具" prop="trafficTools" width="100"></el-table-column>
<el-table-column label="预计费用(元/人次)" prop="estimatedCost" width="140"></el-table-column>
<el-table-column label="最少成团人数(包括家属)" prop="estimatedFamilyNumbers" width="160"></el-table-column>
<el-table-column label="最多人数" prop="maxPeopleNumber" width="100"></el-table-column>
<el-table-column label="是否开启" width="80">
<template slot-scope="scope">
{{ scope.row.enable ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column label="调剂报名截止时间" prop="adjustSignUpEndTime" width="160"></el-table-column>
</el-table>
</div>
<!--
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
旅行社信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item :span="2" label="旅行社名称">
旅行社表单已隐藏,查看页同步隐藏旅行社信息。
</el-descriptions-item>
</el-descriptions>
</div>
-->
<div class="panel panel-default mt20" style="border-color: #ebeef5">
<div class="panel-heading" style="background: #fafafa;border-color: #ebeef5">
<h3 class="panel-title">
线路内容
</h3>
</div>
<div class="panel-body">
<div v-html="viewData.content"></div>
</div>
</div>
</div>
</template>
<script>
module.exports = {
name: "LineInfo",
data() {
return {
viewData: {
travelAgency:{}
},
//多个出行的时间段
times: [],
//分工会选择校工会的线路自己设置的时间信息等等。。。
unionSelectLineData: {},
//是否只看基本信息 因为出行时间针对每个分工会都不一样
showTravelTimePeriod: false
}
},
methods: {
openView(lineId, usUnionId, mode, year) {
this.findOne(lineId, usUnionId, mode, year)
},
async findOne(id, unionId, mode, year) {
const resp = await $.get('/platform/staffTherapyRecuperation/line/selectLineInfoById/' + id)
if (resp.code === 0) {
this.viewData = resp.data
//校工会创建 分工会选择 所以每个分工会的活动时间会不一样
if (unionId) {
this.showTravelTimePeriod = true
await this.findUnionSelectLineData(id, unionId, mode, year)
} else {
this.showTravelTimePeriod = false
}
}
},
async findUnionSelectLineData(lineId, unionId, mode, year) {
const resp = await $.post('/platform/staffTherapyRecuperation/lineFghSelect/selectLineInfo', {
lineId: lineId,
unionId: unionId,
mode: mode,
year: year
})
if (resp.code === 0 && resp.data) {
this.times = resp.data
}
}
}
}
</script>
<style scoped>
.viewTable .el-descriptions__table {
table-layout: fixed !important;
}
.viewTable .el-descriptions-item__cell {
text-align: center !important;
}
</style>
@@ -0,0 +1,158 @@
<template>
<div>
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
<el-tab-pane label="报名信息" name="1">
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
本人信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item label="一卡通号">{{ viewData.loginName }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.userName }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="工会">{{ viewData.unionName }}</el-descriptions-item>
<!-- <el-descriptions-item label="是否转入转出">
<span class="label label-primary">
<sapn v-if="viewData.takePartInUnionId!=union_id">转出报名</sapn>
<sapn v-else-if="viewData.selfUnionId!=union_id">转入报名</sapn>
<sapn v-else>本公会报名</sapn>
</span>
</el-descriptions-item>-->
<el-descriptions-item label="报名时间">{{ viewData.signingUptime }}</el-descriptions-item>
<el-descriptions-item label="参加活动时间">{{
viewData.specificTime ? viewData.specificTime : '暂未更新'
}}
</el-descriptions-item>
<el-descriptions-item label="实际出行时间">{{
viewData.takePartInTime ? viewData.takePartInTime : '暂未更新'
}}
</el-descriptions-item>
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
<el-descriptions-item label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
<el-descriptions-item label="是否携带家属">
<span class="label label-primary">
{{ viewData.isFamily ? '携带' : '未携带' }}
</span>
</el-descriptions-item>
<el-descriptions-item label="床型">{{ viewData.bedInfo?.bedType }}</el-descriptions-item>
<el-descriptions-item label="床位">{{
viewData.bedInfo?.bedNum ? viewData.bedInfo?.bedNum : '暂无'
}}
</el-descriptions-item>
<el-descriptions-item label="意向拼床人">
{{ viewData.bedInfo?.otherSleepUser ? viewData.bedInfo?.otherSleepUser : '暂无' }}
</el-descriptions-item>
</el-descriptions>
</div>
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
同伴信息
</h3>
</div>
<div class="panel-body" style="border: 1px solid rgb(235, 238, 245)">
<el-table :data="viewData.companionList">
<el-table-column label="姓名" prop="userName"></el-table-column>
<el-table-column label="性别" prop="sex"></el-table-column>
<el-table-column label="身份证号" prop="idCard"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
{{ row.bedInfo?.otherSleepUser ? row.bedInfo?.otherSleepUser : '暂无' }}
</template>
</el-table-column>
<el-table-column label="关系" prop="relation"></el-table-column>
</el-table>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="校工会审核信息" name="2" v-if="viewData.schoolUnionAudit">
<div class="panel panel-default mt20" style="border: none">
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
<h3 class="panel-title">
审核信息
</h3>
</div>
<el-descriptions :column="2" border class="viewTable">
<el-descriptions-item label="审核人">
{{ viewData.schoolUnionAudit.username }}({{ viewData.schoolUnionAudit.loginname }})
</el-descriptions-item>
<el-descriptions-item label="审核时间">{{ viewData.schoolUnionAudit.auditTime }}</el-descriptions-item>
<el-descriptions-item label="审核意见">{{ viewData.schoolUnionAudit.auditOpinion }}</el-descriptions-item>
</el-descriptions>
</div>
</el-tab-pane>
<slot name="handle"></slot>
</el-tabs>
</div>
</template>
<script>
module.exports = {
props: {
union_id: {
type: String,
default: "",
},
},
components: {
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
},
data() {
return {
activeName: "1",
viewData: {
companionList: [],
bedInfo: {},
},
loading: false,
}
},
methods: {
async findOne(id) {
this.loading = true
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id})
this.loading = false
if (resp.code === 0) {
this.viewData = resp.data.viewData
} else {
this.viewData = {}
this.$notify.warning({title: '警告', message: resp.data})
}
},
openView(id) {
this.findOne(id)
},
openAudit(id, activeName) {
this.findOne(id)
this.activeName = activeName
}
},
created() {
}
}
</script>
@@ -0,0 +1,50 @@
<template>
<div class="card">
<div class="card-header" v-if="$slots.header">
<slot name="header"></slot>
</div>
<div class="card-body">
<slot></slot>
</div>
<div class="card-footer" v-if="$slots.footer">
<slot name="footer"></slot>
</div>
</div>
</template>
<script>
module.exports = {
name: "MCard"
}
</script>
<style scoped>
.card {
border: none;
border-radius: .5rem;
}
.card-header {
border-bottom:1px dashed rgba(0,0,0,.125);
font-size: 1.15rem;
}
.card-header:first-child {
border-radius: calc(.5rem - 1px) calc(.5rem - 1px) 0 0
}
.card-body>.van-cell{
padding: 5px 0;
}
.card-body{
padding-top: 0;
}
.card-header, .card-footer {
background-color: #FFFFFF;
}
</style>
@@ -0,0 +1,89 @@
<template>
<div class="loader"></div>
</template>
<script>
module.exports = {
name: "MLoading"
}
</script>
<style scoped>
.loader {
z-index: 10000;
position: relative;
width: 2.5em;
height: 2.5em;
transform: rotate(165deg);
}
.loader:before, .loader:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
display: block;
width: 0.5em;
height: 0.5em;
border-radius: 0.25em;
transform: translate(-50%, -50%);
}
.loader:before {
animation: before 2s infinite;
}
.loader:after {
animation: after 2s infinite;
}
@keyframes before {
0% {
width: 0.5em;
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
}
35% {
width: 2.5em;
box-shadow: 0 -0.5em rgba(225, 20, 98, 0.75), 0 0.5em rgba(111, 202, 220, 0.75);
}
70% {
width: 0.5em;
box-shadow: -1em -0.5em rgba(225, 20, 98, 0.75), 1em 0.5em rgba(111, 202, 220, 0.75);
}
100% {
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
}
}
@keyframes after {
0% {
height: 0.5em;
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
}
35% {
height: 2.5em;
box-shadow: 0.5em 0 rgba(61, 184, 143, 0.75), -0.5em 0 rgba(233, 169, 32, 0.75);
}
70% {
height: 0.5em;
box-shadow: 0.5em -1em rgba(61, 184, 143, 0.75), -0.5em 1em rgba(233, 169, 32, 0.75);
}
100% {
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
}
}
/**
* Attempt to center the whole thing!
*/
html,
body {
height: 100%;
}
.loader {
position: absolute;
top: calc(50% - 1.25em);
left: calc(50% - 1.25em);
}
</style>
@@ -0,0 +1,140 @@
<template>
<figure>
<div class="dot white"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</figure>
</template>
<script>
module.exports = {
name: "MTableLoading"
}
</script>
<style scoped>
body {
background: #222;
}
figure {
position: absolute;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 6.250em;
height: 6.250em;
animation: rotate 2.4s linear infinite;
}
.white {
top: 0;
bottom: 0;
left: 0;
right: 0;
background: white;
animation: flash 2.4s linear infinite;
opacity: 0;
}
.dot {
position: absolute;
margin: auto;
width: 2.4em;
height: 2.4em;
border-radius: 100%;
transition: all 1s ease;
}
.dot:nth-child(2) {
top: 0;
bottom: 0;
left: 0;
background: #FF4444;
animation: dotsY 2.4s linear infinite;
}
.dot:nth-child(3) {
left: 0;
right: 0;
top: 0;
background: #FFBB33;
animation: dotsX 2.4s linear infinite;
}
.dot:nth-child(4) {
top: 0;
bottom: 0;
right: 0;
background: #99CC00;
animation: dotsY 2.4s linear infinite;
}
.dot:nth-child(5) {
left: 0;
right: 0;
bottom: 0;
background: #33B5E5;
animation: dotsX 2.4s linear infinite;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
10% {
width: 6.250em;
height: 6.250em;
}
66% {
width: 2.4em;
height: 2.4em;
}
100% {
transform: rotate(360deg);
width: 6.250em;
height: 6.250em;
}
}
@keyframes dotsY {
66% {
opacity: .1;
width: 2.4em;
}
77% {
opacity: 1;
width: 0;
}
}
@keyframes dotsX {
66% {
opacity: .1;
height: 2.4em;
}
77% {
opacity: 1;
height: 0;
}
}
@keyframes flash {
33% {
opacity: 0;
border-radius: 0%;
}
55% {
opacity: .6;
border-radius: 100%;
}
66% {
opacity: 0;
}
}
</style>
@@ -0,0 +1,671 @@
<template>
<div>
<van-uploader v-model="fileList" multiple
:after-read="afterRead"
@delete="doDelete"
:max-count="max"
:show-upload="!view"
:deletable="!view"
:max-size="max_size"
:preview-options="{closeable:true}"
@oversize="onOversize"
@click-preview="clickPreview"
:before-read="beforeRead"
>
</van-uploader>
</div>
</template>
<script>
/**
* 文件类型解析
* @type {{isImg: wpUploadFileTypeResolve.isImg}}
*/
let fileTypeResolving = {
/**
* 是否是一张图片
*/
isImg: function (fileItem) {
return fileTypeResolving.resolvingByType(fileItem.type, /image\/(\w)*/)
},
/**
* 通过后缀验证图片
*/
isImgByName: function (fileItemName) {
let checkSuffixArray = ['jpg', 'png', 'jpeg', 'bmp', 'gif', 'webp', 'tif', 'svg', 'wmf'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray)
},
/**
* 是否是视频
*/
isVideo: function (fileItem) {
return fileTypeResolving.resolvingByType(fileItem.type, /video\/(\w)*/)
},
/**
* 通过后缀验证图片
*/
isVideoByName: function (fileItemName) {
let checkSuffixArray = ['mp4', 'Ogg', 'webm'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray)
},
/**
* 是否是音频
*/
isAudio: function (fileItem) {
return fileTypeResolving.resolvingByType(fileItem.type, /audio\/(\w)*/)
},
/**
* 通过后缀验证图片
*/
isAudioByName: function (fileItemName) {
let checkSuffixArray = ['mp3', 'ogg', 'wav'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray)
},
/**
* 是否是doc文件
*/
isDoc: function (fileItemName) {
let checkSuffixArray = ['doc', 'docx', 'dot', 'dotx'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
/**
* 是否是excel文件
*/
isExcel: function (fileItemName) {
let checkSuffixArray = ['xls', 'xlsx', 'csv', 'xlt', 'xltx'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
/**
* 是否是PPT文件
*/
isPPT: function (fileItemName) {
let checkSuffixArray = ['ppt', 'pptx', 'pot', 'potx', 'odp'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
/**
* 是否是Pdf文件
*/
isPdf: function (fileItemName) {
let checkSuffixArray = ['pdf'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
/**
* 是否是压缩文件
* @param fileItem
* @returns {boolean}
*/
isZip: function (fileItemName) {
let checkSuffixArray = ['zip', '7z', 'war', 'tar', 'rar', 'jar', 'zipx', 'zix', 'zoo'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
isWeb: function (fileItemName) {
let checkSuffixArray = ['html', 'htm'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
isTxt: function (fileItemName) {
let checkSuffixArray = ['txt'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
isPsd: function (fileItemName) {
let checkSuffixArray = ['psd'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
isCad: function (fileItemName) {
let checkSuffixArray = ['cad'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
isIso: function (fileItemName) {
let checkSuffixArray = ['iso'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
isExe: function (fileItemName) {
let checkSuffixArray = ['exe'];
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
},
/**
* 根据文件类型来解析
* @param fileType 文件类型
* @param checkTypeModel 文件类型模型,如:image\/(\w)*
* @returns {boolean}
*/
resolvingByType: function (fileType, checkTypeModel) {
if (checkTypeModel.test(fileType)) {
return true;
}
return false;
},
/**
* 根据名字和名字后缀名来验证文件
* @param fileName 文件名
* @param checkSuffixArray 文件类型包含的后缀
*/
resolvingByName: function (fileName, checkSuffixArray) {
let suffixName = wpUploadFileTools.getSuffixNameByFileName(fileName);
// 名字是否有效
if (!wpUploadDataValid.isValidStr(suffixName)) {
// 无效直接返回false
return false;
}
suffixName = suffixName.trim();
suffixName = suffixName.toLowerCase();
if (checkSuffixArray.indexOf(suffixName) != -1) {
return true;
}
return false;
}
}
/**
* 文件工具
* @type {{}}
*/
let wpUploadFileTools = {
/**
* 获取文件显示模版
* @param fileItem
*/
wapFileItemShow: function (fileItem) {
return wpUploadFileTools.wapFileItemShowBase(fileItem, false);
},
/**
* 包装已上传的文件列表
*/
wapFileItemShowWithUpload(uploadFile) {
return wpUploadFileTools.wapFileItemShowBase(uploadFile, true);
},
/**
* 获取文件显示的基本操作
*/
wapFileItemShowBase(fileItem, isUploaded = false) {
let fileName = "";
let suffix = "";
let show = "";
let showIcon = "";
if (!isUploaded) {
fileName = fileItem.name;
suffix = wpUploadFileTools.getSuffixNameByFileName(fileName);
show = wpUploadFileTools.resolvingShow(fileItem);
showIcon = wpUploadFileShowResolving.getFileItemShowIcon(show, fileItem, false);
} else {
fileName = fileItem.name ? fileItem.name : wpUploadFileTools.resolvingUrlFileName(fileItem.url);
let fileNameGetOFuRL = wpUploadFileTools.resolvingUrlFileName(fileItem.url);
suffix = wpUploadFileTools.getSuffixNameByFileName(fileNameGetOFuRL);
show = wpUploadFileTools.resolvingShowByFileName(fileNameGetOFuRL);
showIcon = wpUploadFileShowResolving.getFileItemShowIcon(show, fileItem.url, true);
}
let fileItemShow = {
// 文件的id
id: wpUploadFileTools.uuid(),
// 文件对象
file: null,
// 文件的类型
type: null,
// 文件的大小
size: null,
// 文件的名字
name: fileName,
// 文件地址
url: null,
// 后缀
suffix: suffix,
// 显示的类型
show: show,
// 显示的图标或者图片地址
showIcon: showIcon,
// 显示进度条
processStatus: {
show: false,
width: 0,
isFail: false
},
// 文件来源,0选择文件上传,1回显文件
fileSource: 0,
// 状态0未上传,失败也会转到0,1正在上传,2已经上传
status: 0,
// 上传文件的描述
fileDes: null
}
if (!isUploaded) {
// 如果非选择文件下面三个属性为null
fileItemShow.file = fileItem;
fileItemShow.type = fileItem.type;
fileItemShow.size = fileItem.size;
} else {
// 文件描述
fileItemShow.status = 2;
fileItemShow.fileDes = fileItem;
fileItemShow.fileSource = 1;
fileItemShow.url = fileItem.url;
}
return fileItemShow;
},
/**
* 解析URL的文件名字
*/
resolvingUrlFileName: function (fileUrl) {
let index = fileUrl.lastIndexOf("/");
if (index <= 0) {
index = fileUrl.lastIndexOf("\\");
}
index = index + 1;
let fileName = fileUrl.substring(index, fileUrl.length);
return fileName;
},
/**
* 获取文件名后缀
* @param fileName 文件名全名
* */
getSuffixNameByFileName: function (fileName) {
let str = fileName;
let index = str.lastIndexOf(".");
if (index < 0) {
return "";
}
let pos = index + 1;
return str.substring(pos, str.length);
},
/**
* 解析显示类型
* @param fileItem 文件
* @returns {number}
*/
resolvingShow: function (fileItem) {
// 默认0普通文件
let showResult = 0;
if (wpUploadFileTypeResolving.isImg(fileItem)) {
showResult = 1;
} else if (wpUploadFileTypeResolving.isVideo(fileItem)) {
showResult = 2;
} else if (wpUploadFileTypeResolving.isAudio(fileItem)) {
showResult = 3;
} else if (wpUploadFileTypeResolving.isDoc(fileItem.name)) {
showResult = 4;
} else if (wpUploadFileTypeResolving.isExcel(fileItem.name)) {
showResult = 5;
} else if (wpUploadFileTypeResolving.isPPT(fileItem.name)) {
showResult = 6;
} else if (wpUploadFileTypeResolving.isPdf(fileItem.name)) {
showResult = 7;
} else if (wpUploadFileTypeResolving.isZip(fileItem.name)) {
showResult = 8;
} else if (wpUploadFileTypeResolving.isWeb(fileItem.name)) {
showResult = 9;
} else if (wpUploadFileTypeResolving.isTxt(fileItem.name)) {
showResult = 10;
} else if (wpUploadFileTypeResolving.isPsd(fileItem.name)) {
showResult = 11;
} else if (wpUploadFileTypeResolving.isCad(fileItem.name)) {
showResult = 12;
} else if (wpUploadFileTypeResolving.isIso(fileItem.name)) {
showResult = 13;
} else if (wpUploadFileTypeResolving.isExe(fileItem.name)) {
showResult = 14;
}
return showResult
},
/**
* 解析显示类型
* @param fileItem 文件
* @returns {number}
*/
resolvingShowByFileName: function (fileItemName) {
// 默认0普通文件
let showResult = 0;
if (wpUploadFileTypeResolving.isImgByName(fileItemName)) {
showResult = 1;
} else if (wpUploadFileTypeResolving.isVideoByName(fileItemName)) {
showResult = 2;
} else if (wpUploadFileTypeResolving.isAudioByName(fileItemName)) {
showResult = 3;
} else if (wpUploadFileTypeResolving.isDoc(fileItemName)) {
showResult = 4;
} else if (wpUploadFileTypeResolving.isExcel(fileItemName)) {
showResult = 5;
} else if (wpUploadFileTypeResolving.isPPT(fileItemName)) {
showResult = 6;
} else if (wpUploadFileTypeResolving.isPdf(fileItemName)) {
showResult = 7;
} else if (wpUploadFileTypeResolving.isZip(fileItemName)) {
showResult = 8;
} else if (wpUploadFileTypeResolving.isWeb(fileItemName)) {
showResult = 9;
} else if (wpUploadFileTypeResolving.isTxt(fileItemName)) {
showResult = 10;
} else if (wpUploadFileTypeResolving.isPsd(fileItemName)) {
showResult = 11;
} else if (wpUploadFileTypeResolving.isCad(fileItemName)) {
showResult = 12;
} else if (wpUploadFileTypeResolving.isIso(fileItemName)) {
showResult = 13;
} else if (wpUploadFileTypeResolving.isExe(fileItemName)) {
showResult = 14;
}
return showResult
},
/**
* 生成UUID
* @returns {string}
*/
uuid: function () {
let str = wpUploadFileTools.uuidFull();
str = str.replace(/-/g, "");
return str;
},
uuidFull() {
let s = []
let hexDigits = "0123456789abcdef"
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1)
}
s[14] = "4"
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1)
s[8] = s[13] = s[18] = s[23] = "-"
let uuid = s.join("")
return uuid
},
/**
* 禁止某个dom的某个事件
*/
disableObjEvent(domObj, eventName) {
domObj.addEventListener(eventName, function (e) {
e.preventDefault();
})
}
}
/**
* 数据验证工具
* @type {{isValid: wpUploadDataValid.isValid}}
*/
let wpUploadDataValid = {
isValid: function (obj) {
if (undefined === obj || null === obj) {
return false;
}
return true;
},
isValidStr: function (str) {
let isValidObj = wpUploadDataValid.isValid(str);
if (!isValidObj) {
return isValidObj;
}
str = str.trim();
if ("" == str || '' == str) {
return false;
}
return true;
},
isValidArray(array) {
if (null == array || array == undefined || array.length <= 0) {
return false;
}
return true;
}
}
module.exports = {
props: {
files: Array,
type: {
type: Array,
default: ['jpg', 'jpeg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
},
max: {
type: Number,
default: 10
},
max_size: {
type: Number,
default: 100 * 1024 * 1024
},
view: {
type: Boolean,
default: false
},
del: {
type: Boolean,
default: true
}
},
data() {
return {
fileList: []
}
},
watch: {
files(val) {
this.updateFileList(val)
}
},
methods: {
// 返回布尔值
beforeRead(file) {
const lastIndexOf = file.name.lastIndexOf(".")
const type = this.type.map(v => v.toLowerCase()).includes(file.name.substr(lastIndexOf + 1).toLowerCase())
if (!type) {
this.$message.warning(`上传文件只能是 ${this.type.map(v => v.toLowerCase()).join("/")} 格式!`);
return false;
}
return true;
},
getAccept() {
return this.type.map(v => '.' + v).join(",")
},
onOversize() {
this.$toast(`上传文件大小不能超过 ${this.max_size / 1024 / 1024} MB!`);
},
/**
* 查看资源
*/
showSource(showItem) {
const show = this.resolvingShowByFileName(showItem.filepath)
if (show == 1 || show == 2 || show == 3) {
$('.viewFile').viewer({
url: 'src',
});
} else if (show == 4 || show == 5 || show == 7) {
preview(showItem.filepath, showItem.id)
}
},
/**
* 解析显示类型
* @param fileItem 文件
* @returns {number}
*/
resolvingShowByFileName(fileItemName) {
// 默认0普通文件
let showResult = 0;
if (fileTypeResolving.isImgByName(fileItemName)) {
showResult = 1;
} else if (fileTypeResolving.isVideoByName(fileItemName)) {
showResult = 2;
} else if (fileTypeResolving.isAudioByName(fileItemName)) {
showResult = 3;
} else if (fileTypeResolving.isDoc(fileItemName)) {
showResult = 4;
} else if (fileTypeResolving.isExcel(fileItemName)) {
showResult = 5;
} else if (fileTypeResolving.isPPT(fileItemName)) {
showResult = 6;
} else if (fileTypeResolving.isPdf(fileItemName)) {
showResult = 7;
} else if (fileTypeResolving.isZip(fileItemName)) {
showResult = 8;
} else if (fileTypeResolving.isWeb(fileItemName)) {
showResult = 9;
} else if (fileTypeResolving.isTxt(fileItemName)) {
showResult = 10;
} else if (fileTypeResolving.isPsd(fileItemName)) {
showResult = 11;
} else if (fileTypeResolving.isCad(fileItemName)) {
showResult = 12;
} else if (fileTypeResolving.isIso(fileItemName)) {
showResult = 13;
} else if (fileTypeResolving.isExe(fileItemName)) {
showResult = 14;
}
return showResult
},
/**
* 获取文件显示图标
* @param filePath
* @returns {string}
*/
getFileItemShowIcon(filePath) {
let showIcon = '';
switch (this.resolvingShowByFileName(filePath)) {
case 0:
showIcon = "#icon-yunpanlogo-3";
break;
// 图片
case 1:
showIcon = this.getImgShowIcon(filePath);
break;
// 视频
case 2:
showIcon = "#icon-yunpanlogo-6";
break;
// 音乐
case 3:
showIcon = "#icon-yunpanlogo-4";
break;
// doc
case 4:
showIcon = "#icon-yunpanlogo-2";
break;
// excel
case 5:
showIcon = "#icon-yunpanlogo-";
break;
// ppt
case 6:
showIcon = "#icon-yunpanlogo-1";
break;
// pdf
case 7:
showIcon = "#icon-yunpanlogo-12";
break;
// zip
case 8:
showIcon = "#icon-yasuobao";
break;
// web文件
case 9:
showIcon = "#icon-yunpanlogo-5";
break;
// txt文件
case 10:
showIcon = "#icon-yunpanlogo-7";
break;
// PSD
case 11:
showIcon = "#icon-yunpanlogo-10";
break;
// cad
case 12:
showIcon = "#icon-yunpanlogo-11";
break;
// ISO
case 13:
showIcon = "#icon-yunpanlogo-8";
break;
// 可执行
case 14:
showIcon = "#icon-yunpanlogo-9";
break;
// 普通文件
default:
showIcon = "#icon-yunpanlogo-3";
}
return showIcon;
},
/**
* 获取图片的显示图标
* @param fileItem
* @returns {string|*}
*/
getImgShowIcon(fileItem) {
return FILE_DOMAIN + fileItem;
},
change(fileList) {
this.$emit("update:files", fileList.map(v => v.data))
},
afterRead(file) {
file.status = 'uploading';
file.message = '上传中...';
let formData = new FormData();
formData.append("file", file.file, file.file.name);
$.ajax({
url: FILE_UPLOAD_ADDRESS,
type: "post",
data: formData,
processData: false,
contentType: false,
success: (res) => {
const {code, data} = res
if (code === 0) {
file.status = 'success';
file.data = data
this.change(this.fileList)
}
},
error: (err) => {
file.status = 'failed';
file.message = '上传失败';
}
});
},
doDelete(file) {
if (file.data) {
const {filename, filepath} = file.data
if (this.del) {
$.post(FILE_DELETE_ADDRESS, {filepath})
}
this.change(this.fileList)
}
},
clickPreview(file) {
const {filepath, id} = file.data
const show = this.resolvingShowByFileName(filepath)
if (show == 4 || show == 5 || show == 7) {
preview(filepath, id)
}
},
updateFileList(val) {
if (!val || !val.length) {
this.fileList = []
return
}
this.fileList = val.map(v => {
let url = ''
if (this.resolvingShowByFileName(v.filename) == 1) {
url = APP_DOMAIN + '/platform/staffTherapyRecuperation/common/preview?id=' + v.id
console.log(url)
return {data: v, url, isImage: true, file: {name: v.filename}, status: 'success'}
}
return {data: v, url, file: {name: v.filename}, status: 'success'}
})
},
},
created() {
this.updateFileList(this.files)
}
}
</script>
<style>
.van-image-preview .van-image-preview__close-icon--top-right {
font-size: 50px !important;
}
</style>