Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/zhgh_hhu
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 64 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 21 KiB |
@@ -48,8 +48,8 @@ const getDbt = async (jdhId) => {
|
||||
* 获取院级工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnions = async (delegationId) => {
|
||||
const {data} = await $.get("/platform/vi/common/unions", {delegationId})
|
||||
const getUnions = async (delegationId = null, isPermission = false) => {
|
||||
const {data} = await $.get("/platform/vi/common/unions", {delegationId, isPermission})
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ const FILE_PREVIEW_ADDRESS = '/file_server/preview'
|
||||
const FILE_DOWNLOAD_ADDRESS = '/file_server/download'
|
||||
const FILE_STREAM_PREVIEW_ADDRESS = '/file_server/fileStreamPreview'
|
||||
|
||||
const CREATE_PREVIEW_URL = (val) => {
|
||||
return FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
|
||||
}
|
||||
|
||||
|
||||
const preview = async (filename, id) => {
|
||||
const suffix = filename.substring(filename.lastIndexOf('.') + 1)
|
||||
@@ -1955,4 +1959,4 @@ const loc = () => {
|
||||
|
||||
const clone = (obj) => {
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,48 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动时间">
|
||||
{{ viewData.activity_time }}
|
||||
<el-form-item label="联系方式">
|
||||
{{ viewData.mobile }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动主体类型">
|
||||
{{
|
||||
viewData.activity_type === 40002 ? "分工会活动" : viewData.activity_type === 40003 ?
|
||||
"协会(社团)活动" :
|
||||
"校工会活动"
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动名称">
|
||||
{{ viewData.activity_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动项目类型">
|
||||
{{ viewData.absName }}({{ viewData.projectTypeCode }})
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申报(承办)单位">
|
||||
{{ viewData.fundsUnitName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动计划时间">
|
||||
{{ viewData.startPlannedDate }}-{{ viewData.endPlannedDate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动地址">
|
||||
{{ viewData.venue }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -31,28 +71,22 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报销金额">
|
||||
{{ viewData.activity_money }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报销卡号">
|
||||
{{ viewData.activity_card_number }}
|
||||
<el-form-item label="申报金额">
|
||||
{{ viewData.funds_money }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="活动地点">
|
||||
{{ viewData.venue }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备  注">
|
||||
<el-form-item label="活动方案">
|
||||
<div style="word-break: break-all" v-html="viewData.activity_content"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="活动安排">
|
||||
<div style="word-break: break-all" v-html="viewData.activity_arrange"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
@@ -66,84 +100,74 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="物品名称" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="物品价格" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品价格" v-model="row.price"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="预算费用" align="center"
|
||||
header-align="center"></el-table-column>
|
||||
<!-- <el-table-column prop="actualPrice" label="实际费用" align="center"
|
||||
header-align="center"></el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.us_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.us_s"
|
||||
fit="contain"></el-image>
|
||||
<el-form-item label="成果附件">
|
||||
<file-upload v-if="viewData.resultsFiles&&viewData.resultsFiles.length"
|
||||
:files="viewData.resultsFiles"
|
||||
:view="true" style="height: 300px"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附  件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附  件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="附件" name="100">
|
||||
<el-form label-position="top">
|
||||
<!– <el-form-item label="活动资料" v-if="viewData.activity_id">
|
||||
<span v-if="!Object.keys(viewData.activity_files).length">暂无</span>
|
||||
<div class="block">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="(v,k) in viewData.activity_files" :timestamp="k" placement="top"
|
||||
icon="el-icon-more"
|
||||
type="primary">
|
||||
<el-card v-for="file in v" style="margin-bottom: 20px;position: relative">
|
||||
<!-- <el-tab-pane label="附件" name="100">
|
||||
<el-form label-position="top">
|
||||
<!– <el-form-item label="活动资料" v-if="viewData.activity_id">
|
||||
<span v-if="!Object.keys(viewData.activity_files).length">暂无</span>
|
||||
<div class="block">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="(v,k) in viewData.activity_files" :timestamp="k" placement="top"
|
||||
icon="el-icon-more"
|
||||
type="primary">
|
||||
<el-card v-for="file in v" style="margin-bottom: 20px;position: relative">
|
||||
|
||||
<div style="display: flex;flex-direction:row;">
|
||||
<h4>{{ file.name }} </h4>
|
||||
<h4><span style="font-size: 14px;color: rgb(200,200,200)">{{ file.type }}</span></h4>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction:row;">
|
||||
<h4>{{ file.name }} </h4>
|
||||
<h4><span style="font-size: 14px;color: rgb(200,200,200)">{{ file.type }}</span></h4>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 0">
|
||||
<file-upload :files="file.files"
|
||||
:view="true"></file-upload>
|
||||
</div>
|
||||
<div style="margin: 20px 0">
|
||||
<file-upload :files="file.files"
|
||||
:view="true"></file-upload>
|
||||
</div>
|
||||
|
||||
<div style="text-align: right" class="text-primary">{{ file.user_name }}</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</el-form-item>–>
|
||||
<div style="text-align: right" class="text-primary">{{ file.user_name }}</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</el-form-item>–>
|
||||
|
||||
<el-form-item label="附  件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="附  件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-tab-pane>-->
|
||||
</el-form>
|
||||
</el-tab-pane>-->
|
||||
<el-tab-pane label="院级工会主席审核信息" name="2" v-if="hasPane(2)&&viewData.division_chairman_name">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
|
||||
@@ -196,7 +220,10 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.accounting_idea ? viewData.accounting_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">{{
|
||||
viewData.accounting_idea ? viewData.accounting_idea : '暂无'
|
||||
}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.a_s"
|
||||
@@ -226,7 +253,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.confirm_trade_idea ? viewData.confirm_trade_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">
|
||||
{{ viewData.confirm_trade_idea ? viewData.confirm_trade_idea : '暂无' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.ct_s"
|
||||
@@ -256,7 +285,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">
|
||||
{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.ucc_s"
|
||||
@@ -286,7 +317,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">
|
||||
{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.uc_s"
|
||||
@@ -345,11 +378,10 @@ module.exports = {
|
||||
const {data, code, msg} = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
this.loading = false
|
||||
if (data) {
|
||||
this.viewData.files = []
|
||||
console.log(data)
|
||||
this.activeName = this.handle ? "999" : "1"
|
||||
this.viewData = data
|
||||
this.viewData.files = JSON.parse(data.files)
|
||||
this.viewData.resultsFiles = JSON.parse(data.resultsFiles)
|
||||
this.viewData.goods = data.goods
|
||||
|
||||
} else {
|
||||
@@ -374,4 +406,4 @@ module.exports = {
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
<template>
|
||||
|
||||
|
||||
<div>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="申请信息" name="1">
|
||||
<table style="width: 100%">
|
||||
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">姓名</td>
|
||||
<td class="tpb">{{ viewData.username }}</td>
|
||||
<td class="tpa">工号</td>
|
||||
<td class="tpb">{{ viewData.loginname }}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">单位</td>
|
||||
<td class="tpb">{{ viewData.dwname }}</td>
|
||||
<td class="tpa">工会</td>
|
||||
<td class="tpb">{{ viewData.ghname }}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">活动类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{ viewData.hdlbname }}</span>
|
||||
</td>
|
||||
<template v-if="viewData.zplbname">
|
||||
<td class="tpa">类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{ viewData.zplbname }}</span>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td class="tpa">健步走步数</td>
|
||||
<td class="tpb">
|
||||
<span>{{ viewData.step_count }}</span>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
<!-- <tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品主题</td>
|
||||
<td class="tpb" colspan="3">{{viewData.hdsbzpzt}}</td>
|
||||
</tr>-->
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">标题</td>
|
||||
<td class="tpb" colspan="3">{{ viewData.zpmc }}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">创作说明</td>
|
||||
<td class="tpb" colspan="3">{{ viewData.hdsbzpms }}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);" v-if="viewData.isUploadPhoto||viewData.isUploadOther">
|
||||
<td class="tpa">作品信息</td>
|
||||
<td class="tpb" colspan="3">
|
||||
<el-row v-if="viewData.isUploadPhoto">
|
||||
<el-divider>照片 <i class="el-icon-picture-outline"></i></el-divider>
|
||||
<file-upload view :files="img2List"></file-upload>
|
||||
</el-row>
|
||||
<!-- <div v-if="viewData.isUploadOther">
|
||||
<el-row>
|
||||
<el-divider>视频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="videoList.length>0">
|
||||
<div v-for="item in videoList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{ item.fjname }}</div>
|
||||
<div class="view-myvideo-tab">
|
||||
<div class="video-toggle-i"
|
||||
@click="playVideo1(APP_DOMAIN + '/file_server/fileStreamPreview?id=' + item.id)">
|
||||
<i class="el-icon-video-camera-solid"></i>
|
||||
<i class="el-icon-video-play"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="APP_DOMAIN+'/file_server/download?filepath=' + item.filepath + '&filename=' + item.filename">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有视频。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>音频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="audioList.length>0">
|
||||
<div v-for="item in audioList">
|
||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
||||
<!– <source :src="'${AppFileDomain!}'+item.filepath"/>–>
|
||||
<source :src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + item.id"/>
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有音频。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>文档 <i class="el-icon-document-copy"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="docList.length>0">
|
||||
<!– <div v-for="item in docList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{ item.fjname }}</div>
|
||||
<div class="view-myvideo-tab" style="background-color: #f6f6f6">
|
||||
<div class="video-toggle-i" @click="dd3s.preview(item.filepath,item.id)">
|
||||
<i class="el-icon-document"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="APP_DOMAIN+'/file_server/download?filepath=' + item.filepath + '&filename=' + item.filename">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>–>
|
||||
<file-upload v-if="docList&&docList.length"
|
||||
:files="docList"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有文档。
|
||||
</div>
|
||||
</el-row>
|
||||
</div>-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="分工会审核信息" name="2" v-if="viewData.union">
|
||||
<el-form label-width="130px" label-suffix=":" style="padding: 20px 0">
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员">
|
||||
{{ viewData.union.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间">
|
||||
{{ viewData.union.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见">
|
||||
<div class="textarea-div">{{ viewData.union.auditOpinion ? viewData.union.auditOpinion : '暂无' }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字">
|
||||
<el-image v-if="viewData.union.auditSign"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.union.auditSign"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会审核信息" name="3" v-if="viewData.school">
|
||||
<el-form label-width="130px" label-suffix=":" style="padding: 20px 0">
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员">
|
||||
{{ viewData.school.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间">
|
||||
{{ viewData.school.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见">
|
||||
<div class="textarea-div">{{ viewData.school.auditOpinion ? viewData.school.auditOpinion : '暂无' }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字">
|
||||
<el-image v-if="viewData.school.auditSign"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.school.auditSign"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane v-if="handle" :label="label" name="999">
|
||||
<slot name="handle"></slot>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
panes: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: "1",
|
||||
viewData: {},
|
||||
loading: true,
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
|
||||
doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
prevImgList: [],
|
||||
img2List: [],
|
||||
videoList: [],
|
||||
docList: [],
|
||||
audioList: [],
|
||||
imgShow: false,
|
||||
fileDialogVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
},
|
||||
methods: {
|
||||
hasPane(name) {
|
||||
if (!this.handle) {
|
||||
return true
|
||||
}
|
||||
return this.panes.includes(name)
|
||||
},
|
||||
async getInfo(id) {
|
||||
|
||||
this.img2List = [];
|
||||
this.prevImgList = [];
|
||||
this.videoList = [];
|
||||
this.audioList = [];
|
||||
this.docList = [];
|
||||
$.post(base + '/platform/hd/wmhd/findOneById', {id: id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
data.data.forEach(val => {
|
||||
val.fjname = val.filename
|
||||
val.fjurl = val.filepath
|
||||
val.url = '${AppFileDomain!}' + val.filepath
|
||||
let filetype = val.fjname.substring(val.fjname.lastIndexOf('.') + 1, val.fjname.length).toLowerCase();
|
||||
if (this.videotype.indexOf(filetype) > -1) {
|
||||
this.videoList.push(val);
|
||||
} else if (this.imgtype.indexOf(filetype) > -1) {
|
||||
this.prevImgList.push('${AppFileDomain!}' + val.filepath)
|
||||
this.img2List.push(val);
|
||||
} else if (this.doctype.indexOf(filetype) > -1) {
|
||||
this.docList.push(val);
|
||||
} else if (this.audiotype.indexOf(filetype) > -1) {
|
||||
this.audioList.push(val);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
const {data} = await $.post("/platform/hd/wmhd/findxxById", {id: id})
|
||||
this.viewData = data
|
||||
this.activeName = this.handle ? "999" : "1"
|
||||
this.loading = false
|
||||
},
|
||||
playVideo1(fjurl) {
|
||||
this.$emit("playvideo", fjurl)
|
||||
},
|
||||
filedialogClose() {
|
||||
//关闭的时候需要销毁video 但是随之dom元素也会被删除!!!!
|
||||
this.imgShow = false;
|
||||
this.videoShow = false;
|
||||
videojs('my-video').dispose();
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
.tpa {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
width: 12%;
|
||||
color: #a0a9b4;
|
||||
background-color: rgb(250, 250, 250);
|
||||
border: 1px solid rgb(220, 220, 220);
|
||||
}
|
||||
|
||||
.tpb {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
color: #4f576b;
|
||||
width: 15%;
|
||||
border: 1px solid rgb(220, 220, 220);
|
||||
}
|
||||
|
||||
input[type=file] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.filedialog .el-dialog__header i {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.filedialog .el-dialog__body {
|
||||
padding: 20px 0 0 0;
|
||||
}
|
||||
|
||||
/*video{
|
||||
width: 100%!important;
|
||||
height: 500px!important;
|
||||
outline:none;
|
||||
}*/
|
||||
.video-js {
|
||||
width: 100%;
|
||||
height: 450px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.vjs-tech, .video-js button {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#app .el-table th.gutter {
|
||||
display: table-cell !important
|
||||
}
|
||||
|
||||
.filedialog .el-dialog {
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
|
||||
.video-js .vjs-big-play-button { /* 中间大的播放按钮 */
|
||||
font-size: 2.5em;
|
||||
line-height: 2.3em;
|
||||
height: 2.5em;
|
||||
width: 2.5em;
|
||||
-webkit-border-radius: 2.5em;
|
||||
-moz-border-radius: 2.5em;
|
||||
border-radius: 2.5em;
|
||||
background-color: rgba(115, 133, 159, .5);
|
||||
border-width: 0.12em;
|
||||
margin-top: -1.25em;
|
||||
margin-left: -1.75em;
|
||||
}
|
||||
|
||||
.video-js.vjs-paused .vjs-big-play-button { /* 视频暂停时显示播放按钮 */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.video-js.vjs-error .vjs-big-play-button { /* 视频加载出错时隐藏播放按钮 */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vjs-loading-spinner { /* 加载圆圈 */
|
||||
font-size: 2.5em;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
border-radius: 1em;
|
||||
margin-top: -1em;
|
||||
margin-left: -1.5em;
|
||||
}
|
||||
|
||||
.el-image {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #abc5df;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #e5edf6;
|
||||
}
|
||||
|
||||
.view-myvideo-tab {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: #C0C4CC;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.video-toggle-i:hover .el-icon-video-camera-solid {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.video-toggle-i:hover .el-icon-video-play {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
.view-myvideo-tab .el-icon-video-camera-solid, .view-myvideo-tab .el-icon-video-play, .view-myvideo-tab .el-icon-document {
|
||||
color: #000000;
|
||||
line-height: 80px;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
|
||||
.view-myvideo-tab .el-icon-download {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.el-icon-video-play {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ckdialogclass .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.el-icon-download {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.file-down-span {
|
||||
background: black;
|
||||
opacity: 0.5;
|
||||
z-index: 1000;
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
/*position: absolute;*/
|
||||
position: relative;
|
||||
bottom: -100px;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.file-down-span:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.ckdialogclass .el-icon-circle-close {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.form-item-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.form-item-container .el-form-item {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.el-upload--picture-card {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 98px;
|
||||
}
|
||||
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.el-loading-mask.is-fullscreen .el-loading-spinner {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
*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,242 @@
|
||||
<template>
|
||||
<div class="component-upload-image">
|
||||
<el-upload
|
||||
:style="{'--box-width': width + 'px', '--box-height': height + 'px'}"
|
||||
multiple
|
||||
:action="FILE_UPLOAD_ADDRESS"
|
||||
list-type="picture-card"
|
||||
:on-success="handleUploadSuccess"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:limit="limit"
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
ref="imageUpload"
|
||||
:on-remove="handleDelete"
|
||||
:file-list="fileList"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:class="{hidePic: this.fileList.length >= this.limit}"
|
||||
>
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
|
||||
<!-- 上传提示 -->
|
||||
<div class="el-upload__tip" slot="tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b></template>
|
||||
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b></template>
|
||||
的文件
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "ImageUpload",
|
||||
props: {
|
||||
value: [String, Array],
|
||||
// 图片数量限制
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
// 大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
type: Array,
|
||||
default: () => ["png", "jpg", "jpeg"],
|
||||
},
|
||||
// 是否显示提示
|
||||
isShowTip: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
default: 100
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
hideUpload: false,
|
||||
fileList: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler(val) {
|
||||
if (val) {
|
||||
let fff = []
|
||||
fff = Array.isArray(val) ? [...val] : [val]
|
||||
this.fileList = fff.map(v => {
|
||||
return {
|
||||
name: v,
|
||||
url: CREATE_PREVIEW_URL(v)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 是否显示提示
|
||||
showTip() {
|
||||
return this.isShowTip && (this.fileType || this.fileSize);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 上传前loading加载
|
||||
handleBeforeUpload(file) {
|
||||
let isImg = false;
|
||||
if (this.fileType.length) {
|
||||
let fileExtension = "";
|
||||
if (file.name.lastIndexOf(".") > -1) {
|
||||
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
|
||||
}
|
||||
isImg = this.fileType.some(type => {
|
||||
if (file.type.indexOf(type) > -1) return true;
|
||||
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
isImg = file.type.indexOf("image") > -1;
|
||||
}
|
||||
|
||||
if (!isImg) {
|
||||
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`);
|
||||
return false;
|
||||
}
|
||||
if (this.fileSize) {
|
||||
const isLt = file.size / 1024 / 1024 < this.fileSize;
|
||||
if (!isLt) {
|
||||
this.$message.error(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 文件个数超出
|
||||
handleExceed() {
|
||||
this.$message.error(`上传文件数量不能超过 ${this.limit} 个!`);
|
||||
},
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res, file) {
|
||||
if (res.code === 0) {
|
||||
if (this.limit === 1) {
|
||||
this.$emit("input", res.data.filepath)
|
||||
} else {
|
||||
if (this.value && Array.isArray(this.value)) {
|
||||
const v = [...this.value, res.data.filepath]
|
||||
this.$emit("input", v)
|
||||
} else {
|
||||
this.$emit("input", [res.data.filepath])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
this.$refs.imageUpload.handleRemove(file);
|
||||
}
|
||||
},
|
||||
// 删除图片
|
||||
async handleDelete(file) {
|
||||
const resp = await $.post(FILE_DELETE_ADDRESS, {id: file.name})
|
||||
const findex = this.fileList.map(f => f.name).indexOf(file.name);
|
||||
if (findex > -1) {
|
||||
this.fileList.splice(findex, 1)
|
||||
if (this.limit === 1) {
|
||||
this.$emit("input", this.fileList.map(v => v.name).join('、'))
|
||||
} else {
|
||||
this.$emit("input", this.fileList.map(v => v.name))
|
||||
}
|
||||
}
|
||||
/*if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
const findex = this.fileList.map(f => f.name).indexOf(file.name);
|
||||
if (findex > -1) {
|
||||
this.fileList.splice(findex, 1)
|
||||
if (this.limit === 1) {
|
||||
this.$emit("input", this.fileList.map(v => v.name).join('、'))
|
||||
} else {
|
||||
this.$emit("input", this.fileList.map(v => v.name))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}*/
|
||||
|
||||
|
||||
},
|
||||
// 上传失败
|
||||
handleUploadError() {
|
||||
this.$message.error("上传图片失败,请重试");
|
||||
},
|
||||
// 预览
|
||||
handlePictureCardPreview(file) {
|
||||
if (file.url) {
|
||||
let image = new Image();
|
||||
image.src = file.url
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
} else {
|
||||
viewImage(file.response.data.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.component-upload-image .el-upload--picture-card {
|
||||
width: var(--box-width, '100px') !important;
|
||||
height: var(--box-height, '100px') !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-upload--picture-card i {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: var(--box-width, '100px');
|
||||
height: var(--box-height, '100px');
|
||||
}
|
||||
|
||||
.hidePic .el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.el-list-enter-active,
|
||||
.el-list-leave-active {
|
||||
transition: all 0s;
|
||||
}
|
||||
|
||||
.el-list-enter, .el-list-leave-active {
|
||||
opacity: 0;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.component-upload-image {
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.component-upload-image > div:nth-child(1) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.el-upload__tip {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,229 @@
|
||||
/**
|
||||
*Desc:
|
||||
*Create by: jug
|
||||
*Create time:2024/1/24/16:40
|
||||
*/
|
||||
<template>
|
||||
<div>
|
||||
<div ref="editorDom"></div>
|
||||
<input type="file" style="display: none;">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script src="/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script>
|
||||
|
||||
const {$, BtnMenu, DropListMenu, PanelMenu, DropList, Panel, Tooltip} = wangEditor
|
||||
|
||||
class AlertMenu extends BtnMenu {
|
||||
constructor(editor) {
|
||||
const $elem = wangEditor.$(
|
||||
`<div class="w-e-menu" data-title="上传word">
|
||||
word
|
||||
</div>`
|
||||
)
|
||||
super($elem, editor)
|
||||
}
|
||||
|
||||
clickHandler() {
|
||||
const _this = this
|
||||
const inputFileElement = document.querySelector('#' + this.editor.textElemId).parentElement.parentElement.nextElementSibling
|
||||
inputFileElement.click()
|
||||
inputFileElement.addEventListener('change', function () {
|
||||
const file = this.files[0];
|
||||
const fileName = file.name
|
||||
|
||||
if (!fileName.toLowerCase().endsWith('.doc') && !fileName.toLowerCase().endsWith('.docx')) {
|
||||
alert('请上传doc或者docx的文件')
|
||||
_this.clearInputFile()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('file', file, file.name)
|
||||
axios.post('/file_server/word2Html', formData, {}).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.code === 0) {
|
||||
_this.editor.txt.html(response.data.data)
|
||||
} else {
|
||||
alert(response.data.msg + ',上传word失败,请联系管理员!')
|
||||
_this.clearInputFile()
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
_this.clearInputFile()
|
||||
alert('上传word失败,请联系管理员!')
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
clearInputFile() {
|
||||
const obj = document.getElementById('fileInput');
|
||||
obj.outerHTML = obj.outerHTML
|
||||
}
|
||||
|
||||
tryChangeActive() {
|
||||
this.active()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
wangEditor.registerMenu('alertMenuKey', AlertMenu)
|
||||
module.exports = {
|
||||
name: "textEditor",
|
||||
props: {
|
||||
// 定义值属性,用于接收父组件传递的值
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
menus: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [
|
||||
'head',//标题
|
||||
'bold',//加粗
|
||||
'fontSize',//字号
|
||||
'fontName',//字体
|
||||
'italic',//斜体
|
||||
'underline',//下划线
|
||||
'strikeThrough',//删除线
|
||||
'indent',//缩进
|
||||
'lineHeight',//行高
|
||||
'foreColor',//文字颜色
|
||||
'backColor',//背景颜色
|
||||
//'link',//链接
|
||||
'list',//序列
|
||||
'todo',//待办
|
||||
'justify',//对齐
|
||||
'quote',//引用
|
||||
// 'emoticon',//表情
|
||||
'image',
|
||||
//'video',
|
||||
'table',
|
||||
//'code',
|
||||
'splitLine',//分割线
|
||||
'undo',
|
||||
'redo',
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editor: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initEditor()
|
||||
},
|
||||
|
||||
watch: {
|
||||
value: {
|
||||
handler: function (newValue) {
|
||||
this.$nextTick(() => {
|
||||
this.editor.txt.html(newValue);
|
||||
// this.editor.config.focus = true
|
||||
})
|
||||
// const _this = this
|
||||
// const waitUntilEditorNotNull = () => {
|
||||
// if (_this.editor != null) {
|
||||
// _this.editor.txt.html(newValue);
|
||||
// } else {
|
||||
// setTimeout(waitUntilEditorNotNull, 100); // 每隔100毫秒检查一次
|
||||
// }
|
||||
// }
|
||||
// waitUntilEditorNotNull();
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
initEditor() {
|
||||
let _this = this
|
||||
this.editor = new wangEditor(this.$refs.editorDom)
|
||||
|
||||
// this.editor.config.focus = false // 取消光标自动定位
|
||||
|
||||
//内容change回调
|
||||
this.editor.config.onchange = function (newHtml) {
|
||||
let content = _this.editor.txt.html()
|
||||
let text = _this.editor.txt.text()
|
||||
// 对于一键格式化后的内容,空内容可能会出现<p></br></p>标签,此处进行判断
|
||||
// if (_this.isEmptyEditor()) {
|
||||
// content = ''
|
||||
// }
|
||||
_this.$emit('input', content)
|
||||
_this.$emit('catchData', content, text)
|
||||
}
|
||||
|
||||
//配置图片上传
|
||||
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
|
||||
// resultFiles 是 input 中选中的文件列表
|
||||
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
|
||||
|
||||
Promise.all(_this.uploadFiles(resultFiles)).then(res => {
|
||||
res.forEach(v => {
|
||||
if (v.code === 0) {
|
||||
insertImgFn(CREATE_PREVIEW_URL(v.data.filepath))
|
||||
} else {
|
||||
ELEMENT.message.warning('图片上传失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
//粘贴过滤
|
||||
this.editor.config.pasteFilterStyle = false
|
||||
//高度
|
||||
this.editor.config.height = this.height
|
||||
//菜单
|
||||
this.editor.config.menus = this.menus
|
||||
this.editor.create()
|
||||
},
|
||||
isEmptyEditor() {
|
||||
const children = this.editor.$textElem.children()
|
||||
for (let i = 0; i < children.elems.length; i++) {
|
||||
const node = children.elems[i]
|
||||
if (node && node.nodeType === Node.TEXT_NODE && node.textContent.trim().length !== '') {
|
||||
return false
|
||||
}
|
||||
if (node && node.nodeType === Node.ELEMENT_NODE && node.tagName.toLowerCase() === 'p' && node.innerText.trim() !== '') {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
},
|
||||
uploadFiles(resultFiles) {
|
||||
return resultFiles.map(async file => {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file, file.name)
|
||||
formData.append("folderPath", "/wangEditorImg/")
|
||||
return jQuery.ajax({
|
||||
url: '/file_server/uploadFile',
|
||||
type: 'post',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" tab-position="top">
|
||||
<el-tab-pane label="基本信息" name="1">
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>填报人</th>
|
||||
<td>{{ viewData.username }}</td>
|
||||
|
||||
<th>填报工号</th>
|
||||
<td>{{ viewData.loginName }}</td>
|
||||
|
||||
<th>联系方式</th>
|
||||
<td>{{ viewData.mobile }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>填报单位</th>
|
||||
<td>{{ viewData.unionName }}</td>
|
||||
<th>填报时间</th>
|
||||
<td colspan="3">{{ moment(viewData.applyDate).format('YYYY年MM月DD日') }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>基本情况简介</th>
|
||||
<td colspan="5">
|
||||
<div class="text-left" v-html="viewData.basicInformation"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>建设方案</th>
|
||||
<td colspan="5">
|
||||
<div class="text-left" v-html="viewData.constructionPlan"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="基层党组织审核信息" v-if="organizationAudit" name="2">
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>审核人</th>
|
||||
<td>{{ organizationAudit.username }}--{{ organizationAudit.loginname }}</td>
|
||||
<th>审核时间</th>
|
||||
<td>{{ organizationAudit.auditTime }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审核意见</th>
|
||||
<td colspan="3">{{ organizationAudit.auditOpinion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>签字</th>
|
||||
<td colspan="3">
|
||||
<div>
|
||||
<el-image :src="organizationAudit.auditSign" style="width: 200px;height:auto"
|
||||
v-if="organizationAudit.auditSign"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会审核信息" v-if="schoolAudit" name="3">
|
||||
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>审核人</th>
|
||||
<td>{{ schoolAudit.username }}--{{ schoolAudit.loginname }}</td>
|
||||
<th>审核时间</th>
|
||||
<td>{{ schoolAudit.auditTime }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审核意见</th>
|
||||
<td colspan="3">{{ schoolAudit.auditOpinion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>签字</th>
|
||||
<td colspan="3">
|
||||
<div>
|
||||
<el-image :src="schoolAudit.auditSign" style="width: 200px;height:auto"
|
||||
v-if="schoolAudit.auditSign"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
activeName: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: '1',
|
||||
viewData: {},
|
||||
organizationAudit: {},
|
||||
schoolAudit: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openView(id) {
|
||||
const resp = await $.get('/platform/wakeshome/declaration/apply/getInfoById', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.organizationAudit = resp.data.organizationAudit
|
||||
this.schoolAudit = resp.data.schoolAudit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" tab-position="top">
|
||||
<el-tab-pane label="基本信息" name="1">
|
||||
|
||||
<border-table>
|
||||
<vi-title title="职工之家申请信息"></vi-title>
|
||||
<table>
|
||||
<tr>
|
||||
<th>填报人</th>
|
||||
<td>{{ viewData.username }}</td>
|
||||
|
||||
<th>联系方式</th>
|
||||
<td>{{ viewData.mobile }}</td>
|
||||
|
||||
<th>填报人</th>
|
||||
<td>{{ viewData.applyTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>填报单位</th>
|
||||
<td colspan="5">{{ viewData.unionName }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<vi-title style="margin-top: 25px" title="职工之家详细信息"></vi-title>
|
||||
<table>
|
||||
<tr>
|
||||
<th>单位位置</th>
|
||||
<td>{{ viewData.position }}</td>
|
||||
|
||||
<th>单位面积</th>
|
||||
<td>{{ viewData.area }}</td>
|
||||
|
||||
<th>创办时间</th>
|
||||
<td>{{ viewData.foundTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位信息</th>
|
||||
<td colspan="5">{{ viewData.details }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
|
||||
<vi-title style="margin-top: 25px" title="职工之家荣誉信息"></vi-title>
|
||||
<el-table :data="viewData.awardInfo" style="width: 100%">
|
||||
<el-table-column prop="awardTime" label="获奖日期"></el-table-column>
|
||||
<el-table-column prop="awardUnit" label="获奖单位"></el-table-column>
|
||||
<el-table-column prop="awardName" label="奖项名称"></el-table-column>
|
||||
<el-table-column prop="awardPic" label="获奖图片">
|
||||
<template scope="{row,$index}">
|
||||
<div v-if="row.awardPic != null && row.awardPic !== ''">
|
||||
<image-upload :view="true" :limit="1" v-model="row.awardPic"></image-upload>
|
||||
</div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<vi-title style="margin-top: 25px" title="职工之家材料上传"></vi-title>
|
||||
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>图片</th>
|
||||
<td colspan="6">
|
||||
<file-upload v-if="viewData.picFiles && viewData.picFiles.length > 0"
|
||||
:files="viewData.picFiles"
|
||||
:view="true"></file-upload>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>附件</th>
|
||||
<td colspan="6">
|
||||
<file-upload v-if="viewData.files && viewData.files.length > 0"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会审核信息" v-if="schoolAudit" name="2">
|
||||
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>审核人</th>
|
||||
<td>{{ schoolAudit.username }}--{{ schoolAudit.loginname }}</td>
|
||||
<th>审核时间</th>
|
||||
<td>{{ schoolAudit.auditTime }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审核意见</th>
|
||||
<td colspan="3">{{ schoolAudit.auditOpinion }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>签字</th>
|
||||
<td colspan="3">
|
||||
<div>
|
||||
<el-image :src="schoolAudit.auditSign" style="width: 200px;height:auto"
|
||||
v-if="schoolAudit.auditSign"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
activeName: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: '1',
|
||||
viewData: {},
|
||||
schoolAudit: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openView(id) {
|
||||
const resp = await $.get('/platform/wakeshome/info/mine/getInfoById', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.schoolAudit = resp.data.schoolAudit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-upload__tip {
|
||||
display: none;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<el-form label-width="120px">
|
||||
<template v-if="viewInfo.zbxx.assessmentMode === 2">
|
||||
<vi-title title="评议对象选择"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" v-if="viewInfo.zbxx.assessmentMode===2">
|
||||
<el-form-item prop="evaluatedPersonName" label="被测评人姓名">
|
||||
{{viewInfo.commentPeo.evaluatedPersonName}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="viewInfo.zbxx.assessmentMode===2">
|
||||
<el-form-item prop="evaluatedPersonName" label="现任职务">
|
||||
{{viewInfo.commentPeo.evaluatedPersonName}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="evaluatedPersonName" label="测评结果">
|
||||
{{viewInfo.commentPeo.reviewResult}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="viewInfo.zbxx.assessmentMode===2">
|
||||
<el-form-item prop="presidentOpinions" label="意见建议">
|
||||
{{viewInfo.commentPeo.presidentOpinions}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<vi-title2 title="评议内容"></vi-title2>
|
||||
<el-form-item label="" label-width="0" v-for="(nr,idx) in viewInfo.zbxx.nrs" :key="nr.id">
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="nr.content" readonly maxlength="30" style="width: 50%">
|
||||
<template slot="prepend"><span>{{ idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border :show-summary = "viewInfo.zbxx.scoringMode !== 2 ? 'always' : false">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="100px">
|
||||
<template scope="{$index,row}">
|
||||
{{ row.contentNumber = $index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="主要评比内容" disabled prop="inspection" header-align="center" align="center"></el-table-column>
|
||||
<template v-if="viewInfo.zbxx.scoringMode === 1">
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center" width="250px"></el-table-column>
|
||||
<el-table-column label="评议分" prop="resultScore" header-align="center" align="center" width="250px"></el-table-column>
|
||||
</template>
|
||||
<template v-if="viewInfo.zbxx.scoringMode === 2">
|
||||
<el-table-column label="满意度" prop="resultScore" header-align="center" align="center" width="350px">
|
||||
<template slot-scope="{row}">
|
||||
<el-radio-group v-model="row.resultScore" size="small">
|
||||
<el-radio disabled label="满意">满意</el-radio>
|
||||
<el-radio disabled label="基本满意">基本满意</el-radio>
|
||||
<el-radio disabled label="不满意">不满意</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
<div v-if="viewInfo.zbxx.scoringMode===1">
|
||||
<el-divider content-position="left">备注</el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit readonly
|
||||
v-model="nr.bzs[0].options" placeholder="请输入备注"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="viewInfo.zbxx.scoringMode === 2">
|
||||
<vi-title title="备注填写"></vi-title>
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit disabled
|
||||
v-model="viewInfo.commentPeo.presidentOpinions" placeholder="请输入备注"></el-input>
|
||||
</template>
|
||||
|
||||
<template v-if="viewInfo.zbxx.scoringMode === 1 && viewInfo.zbxx.reviewMode === 1">
|
||||
<vi-title title="职工评家总结"></vi-title>
|
||||
<file-upload :files.sync="viewInfo.commentPeo.files" view></file-upload>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
id: {type: String, default: ''}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
viewInfo:{
|
||||
commentPeo: {},
|
||||
zbxx: []
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async findOne(peoId){
|
||||
const resp = await $.get('/platform/wakeshome/review/statistics/getBzById',{peoId:peoId})
|
||||
if (resp.code === 0) {
|
||||
this.viewInfo = resp.data
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,508 @@
|
||||
<template>
|
||||
<el-form class="el_form" :model="data" ref="addForm" :rules="formRules" label-width="120px">
|
||||
<vi-title title="指标信息"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="annual" label="年  度" class="is-required">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
:disabled="is_view"
|
||||
:picker-options="pickerOptions"
|
||||
v-model="data.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="assessment" label="评测名称" class="is-required">
|
||||
<el-input maxlength="30" :disabled="is_view" v-model="data.assessment"
|
||||
placeholder="请填写评测名称"
|
||||
type="text">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="assessment" label="">
|
||||
<el-checkbox v-model="data.isEvaluationIndex" :disabled="is_view">是否采用以往评议指标</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="zbId" label="以往评议指标" v-if="data.isEvaluationIndex">
|
||||
<el-select v-model="data.zbId" placeholder="请选择" filterable clearable
|
||||
style="width: 100%" @change="getByZbData">
|
||||
<el-option
|
||||
v-for="item in zbList"
|
||||
:key="item.id"
|
||||
:label="item.annual+item.assessment"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="assessmentMode" label="评议选项" class="is-required">
|
||||
<el-radio-group v-model="data.assessmentMode" :disabled="is_view">
|
||||
<el-radio-button :label="1">工会评议</el-radio-button>
|
||||
<el-radio-button :label="2">主席/副主席评议</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="reviewMode" label="评议模式" class="is-required">
|
||||
<el-radio-group v-model="data.reviewMode" :disabled="is_view">
|
||||
<el-tooltip content="由校工会/分工会管理员自我测评"
|
||||
placement="top">
|
||||
<el-radio-button :label="1">自我评议</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="由教职工对选择的工会/主席进行评议"
|
||||
placement="top">
|
||||
<el-radio-button :label="2">教工评议</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="scoringMode" label="打分模式" class="is-required">
|
||||
<el-radio-group v-model="data.scoringMode" :disabled="is_view">
|
||||
<el-radio-button :label="1">评分模式</el-radio-button>
|
||||
<el-radio-button :label="2">满意度模式</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8" v-if="data.assessmentMode">
|
||||
<el-form-item prop="scoringMode" label="评议范围" class="is-required">
|
||||
<el-radio-group v-model="data.commentTarget" :disabled="is_view">
|
||||
<el-tooltip :content="schoolContent" placement="top">
|
||||
<el-radio-button :disabled="!(A06 || sysadmin)" :label="1">校工会</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="allUnionContent" placement="top">
|
||||
<el-radio-button :disabled="!(A06 || sysadmin)" :label="2">全部分工会</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="selectUnionContent" placement="top">
|
||||
<el-radio-button :label="3">自选分工会</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<template v-if="data.commentTarget && data.reviewMode == 2 && data.commentTarget == 1">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="activityGroupId" label="可评议人员" class="is-required">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select clearable filterable placeholder="请选择可评议人员"
|
||||
style="width: 99%" v-model="data.activityGroupId" :disabled="is_view">
|
||||
<el-option :key="item.groupId"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
v-for="item in activityGroupList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
:disabled="is_view"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<template v-if="data.commentTarget && data.commentTarget == 3">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="unionIds" label="自选分工会" class="is-required">
|
||||
<el-select v-model="data.unionIds" style="width: 100%"
|
||||
:disabled="is_view"
|
||||
multiple clearable filterable
|
||||
placeholder="请选择分工会">
|
||||
<el-option
|
||||
v-for="item in reviewUnions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="applyTime" label="评议时间" class="is-required">
|
||||
<el-date-picker
|
||||
end-placeholder="结束时间"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
style="width: 100%"
|
||||
:disabled="is_view"
|
||||
type="datetimerange"
|
||||
v-model="data.applyTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<vi-title2 title="测评内容"></vi-title2>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="(nr,idx) in data.nrs">
|
||||
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="nr.content" :disabled="is_view" maxlength="30" style="width: 50%"
|
||||
placeholder="请填写测评内容">
|
||||
<template slot="prepend"><span>
|
||||
{{ nr.contentNumber = idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
<el-button v-if="!is_view" size="medium" :disabled="data.nrs.length<=1" type="danger"
|
||||
@click="data.nrs.splice(idx,1)"
|
||||
icon="el-icon-delete"></el-button>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary
|
||||
:summary-method="getSummaries" size="small">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="100px">
|
||||
<template scope="{$index,row}">
|
||||
{{ row.contentNumber = $index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="测评标准" prop="inspection" header-align="center" align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.inspection" placeholder="请填写测评标准"></el-input>
|
||||
<span v-else>{{ row.inspection }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="单项分" prop="single_score" header-align="center" align="center" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.single_score" placeholder="请填写单项分"></el-input>
|
||||
<span v-else>{{ row.single_score }}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center"
|
||||
width="100px" v-if="data.scoringMode===1">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model.number="row.score" maxlength="4"
|
||||
placeholder="请填写标准分"></el-input>
|
||||
<span v-else>{{ row.score }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="能否超过标准分" prop="beyond_highestscore" header-align="center" align="center" width="120px">
|
||||
<template scope="{row}">
|
||||
<el-switch
|
||||
v-if="!is_view"
|
||||
v-model="row.beyond_highestscore"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<el-switch
|
||||
v-else
|
||||
disabled
|
||||
v-model="row.beyond_highestscore">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="是否填写意见" prop="isEvidence" header-align="center" align="center"
|
||||
width="120px" v-if="data.scoringMode===1">
|
||||
<template scope="{row}">
|
||||
<el-switch
|
||||
:disabled="is_view"
|
||||
v-model="row.isEvidence"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!--
|
||||
<el-table-column label="关联模块" prop="associatedmodule" header-align="center" align="center" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.associatedmodule" maxlength="10" placeholder="请填写关联模块"></el-input>
|
||||
<span v-else>{{ row.associatedmodule }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="关联标识" prop="bz_relation_id" header-align="center" align="center" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.bz_relation_id" maxlength="20" placeholder="请填写关联标识,该标识唯一"></el-input>
|
||||
<span v-else>{{ row.bz_relation_id }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<!-- <el-table-column label="能否删除" prop="canDelete" header-align="center" align="center" width="100px">-->
|
||||
<!-- <template scope="{row}">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-if="!is_view"-->
|
||||
<!-- :disabled="row.canDelete==false"-->
|
||||
<!-- v-model="row.canDelete"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- inactive-color="#ff4949">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-else-->
|
||||
<!-- :disabled="!row.canDelete && row.id"-->
|
||||
<!-- v-model="row.canDelete">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column v-if="!is_view" label="操作" header-align="center" align="center"
|
||||
width="200px">
|
||||
<template scope="{row,$index}">
|
||||
<el-button size="mini" :disabled="nr.bzs.length<=1 || (!row.canDelete && row.id)"
|
||||
type="danger" icon="el-icon-delete"
|
||||
@click="nr.bzs.splice($index,1)"></el-button>
|
||||
<el-button size="mini"
|
||||
type="primary" icon="el-icon-plus"
|
||||
@click="nr.bzs.splice($index+1,0,{inspection:null,score:null,isEvidence:true})"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mt10 mb10" style="border-top: 1px dashed rgb(229, 225, 225)"></el-row>
|
||||
</el-form-item>
|
||||
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button v-if="!is_view"
|
||||
type="primary"
|
||||
@click="data.nrs.push({bzs:[{inspection:null,score:null,isEvidence:true}]})">
|
||||
添加测评内容
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<drawer-user-scope
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
:group_id.sync="data.activityGroupId"
|
||||
></drawer-user-scope>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const METHOD_NAME = "change"
|
||||
|
||||
module.exports = {
|
||||
props: {
|
||||
is_view: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
unionIds: []
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
data: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.$emit(METHOD_NAME, val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityGroupList: [],
|
||||
isEvaluationIndex: false,
|
||||
zbList: [],
|
||||
formRules: {
|
||||
xxx: [{required: true, message: '请填写年度', trigger: ['blur', 'change']}],
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
relationData: [
|
||||
{moduleName: '提案系统模块', id: 'proposal'},
|
||||
{moduleName: '二级教代会', id: 'secteameet'},
|
||||
{moduleName: '慰问/补助', id: 'ConandDif'},
|
||||
],
|
||||
roleDataReview: {},
|
||||
reviewUnions: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
|
||||
},
|
||||
methods: {
|
||||
async getActivityGroup() {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = data
|
||||
},
|
||||
async getByZbData() {
|
||||
const {
|
||||
code,
|
||||
data,
|
||||
msg
|
||||
} = await $.get('/platform/wakeshome/review/viewZb/edit', {id: this.data.zbId})
|
||||
if (data) {
|
||||
this.$set(this.data, "nrs", data.nrs)
|
||||
} else {
|
||||
this.$set(this.data, "nrs", [{bzs: [{}]}])
|
||||
}
|
||||
},
|
||||
async getZbList() {
|
||||
const res = await $.get("/platform/wakeshome/review/Xjkhzb/getZbList")
|
||||
this.zbList = res.data
|
||||
},
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0 && this.data.scoringMode === 1) {
|
||||
sums[index] = '小计';
|
||||
return;
|
||||
} else if ([1, 3, 4].includes(index) && this.data.scoringMode === 1) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
} else if ([1, 2, 3].includes(index) && this.data.scoringMode === 2) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' 分';
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
async getRolesAndUnion() {
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||
this.roleDataReview = data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getRolesAndUnion()
|
||||
await this.getActivityGroup()
|
||||
await this.getZbList()
|
||||
if (!this.data || !Object.keys(this.data).length) {
|
||||
this.data = {
|
||||
nrs: [{
|
||||
bzs: [{inspection: null, score: null, isEvidence: true}]
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
if (((this.is_sysadmin || this.is_A06 || this.is_H02) === false) && this.is_H04 === true) {
|
||||
this.reviewUnions = await getUnionList(this.unionId)
|
||||
this.$set(this.data, "unionIds", this.reviewUnions[0].id)
|
||||
} else {
|
||||
this.reviewUnions = await getUnions(null)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
H10() {
|
||||
return this.roleDataReview.is_H10
|
||||
},
|
||||
A06() {
|
||||
return this.roleDataReview.is_A06
|
||||
},
|
||||
H04() {
|
||||
return this.roleDataReview.is_H04
|
||||
},
|
||||
H02() {
|
||||
return this.roleDataReview.is_H02
|
||||
},
|
||||
sysadmin() {
|
||||
return this.roleDataReview.is_sysadmin
|
||||
},
|
||||
unionId() {
|
||||
return this.roleDataReview.unionid
|
||||
},
|
||||
schoolContent() {
|
||||
if (this.data.reviewMode == 1) {
|
||||
return '勾选后,仅校工会管理员可参加测评'
|
||||
} else if (this.data.reviewMode == 2) {
|
||||
return '勾选后,全校所有人员可评议校工会,也可根据右侧选框【可评议人员】指定评议人员范围'
|
||||
} else {
|
||||
return '请选择评议模式'
|
||||
}
|
||||
},
|
||||
allUnionContent() {
|
||||
if (this.data.reviewMode == 1) {
|
||||
return '勾选后,仅各工会管理员可对本分工会进行自我评议'
|
||||
} else if (this.data.reviewMode == 2) {
|
||||
return '勾选后,所有分工会人员对本分工会进行评议,不可跨工会评议'
|
||||
} else {
|
||||
return '请选择评议模式'
|
||||
}
|
||||
},
|
||||
selectUnionContent() {
|
||||
if (this.data.reviewMode == 1) {
|
||||
return '勾选后,仅右侧选择的分工会管理员可对本分工会进行自我评议'
|
||||
} else if (this.data.reviewMode == 2) {
|
||||
return '勾选后,可根据右侧选框【自选分工会】指定分工会评议范围'
|
||||
} else {
|
||||
return '请选择评议模式'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.fixedBox {
|
||||
position: fixed;
|
||||
top: 200px;
|
||||
right: 10px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.el_form {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-input-group__prepend {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -130,6 +130,10 @@
|
||||
Vue.component('guava', httpVueLoader('/components/plugins/Guava.vue'))
|
||||
Vue.component('sign', httpVueLoader('/components/sign/sign.vue?v=2.0.0'))
|
||||
Vue.component('file-upload', httpVueLoader('/components/plugins/FileUpload.vue'))
|
||||
Vue.component('text-editor', httpVueLoader('/components/plugins/textEditor.vue'))
|
||||
Vue.component('border-table', httpVueLoader('/components/plugins/BorderTable.vue'))
|
||||
Vue.component('image-upload', httpVueLoader('/components/plugins/ImageUpload.vue'))
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -232,6 +232,10 @@ layout("/mobile/platform.html"){
|
||||
<image src="/assets/mobile/icon/activity/bm.png"></image>
|
||||
<span class="icon_text">校活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/wmhd/apply">
|
||||
<image src="/assets/mobile/svg/wmhd/apply.svg"></image>
|
||||
<span class="icon_text">教工作品征集</span>
|
||||
</van-grid-item>
|
||||
<!--<van-grid-item @click="toWxJsz">
|
||||
<image src="/assets/mobile/svg/activity/jsz.svg"></image>
|
||||
<span class="icon_text">健身走</span>
|
||||
@@ -247,6 +251,8 @@ layout("/mobile/platform.html"){
|
||||
<image src="/assets/mobile/icon/question/dati.png"></image>
|
||||
<span class="icon_text">在线调查</span>
|
||||
</van-grid-item>
|
||||
|
||||
|
||||
<van-grid-item url="/mobile/question/h5/list?type=2">
|
||||
<image src="/assets/mobile/icon/question/zxdc.png"></image>
|
||||
<span class="icon_text">知识竞答</span>
|
||||
@@ -331,6 +337,22 @@ layout("/mobile/platform.html"){
|
||||
<span class="icon_text"> 我的疗休养</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工评议
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/wakeshome/review/appraisal/index">
|
||||
<image src="/assets/mobile/svg/psychology/zgpy.svg"></image>
|
||||
<span class="icon_text"> 职工评议</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/wakeshome/review/appraisal/mine">
|
||||
<image src="/assets/mobile/svg/psychology/wdpy.svg"></image>
|
||||
<span class="icon_text"> 我的评议</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '培训教育'">
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.d_card {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
width: 90%;
|
||||
margin: 10px;
|
||||
}
|
||||
.van-tag--primary {
|
||||
height: 23px !important;
|
||||
background-color: #1989fa;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
overflow:visible;
|
||||
word-break:keep-all;
|
||||
white-space:nowrap;
|
||||
text-overflow:inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-nav-bar title="评议列表" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.annual" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="activityList" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 60px auto">
|
||||
|
||||
<template>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" :key="o.id" class="van-doc-card">
|
||||
<div @click="toCommentator(o)" style="padding: 10px">
|
||||
<div>
|
||||
<div style="display: flex;font-size: 18px">{{ o.assessment }}</div>
|
||||
<div style="align-items: center">
|
||||
<van-tag type="primary">{{ o.assessmentMode==1 ? '工会评议' : '工会主席评议' }}</van-tag>
|
||||
<!--<van-tag type="primary">{{ o.commentTarget==1 ? '校工会' : '分工会' }}</van-tag>-->
|
||||
<van-tag type="primary" v-if="o.commentTarget==1">{{ '校工会' }}</van-tag>
|
||||
<van-tag type="primary" v-if="o.commentTarget==2">{{ unionName }}</van-tag>
|
||||
<van-tag class="ellipsis" type="primary" v-if="o.commentTarget==3">{{ o.unionNames.length>25 ? o.unionNames.substring(0,25) + '...' : o.unionNames }}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-row gutter="20">
|
||||
<van-col span="12">
|
||||
<span>年度:{{ o.annual }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>测评模式:{{ o.scoringMode==1 ? '评分' : '满意度' }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/wakeshome/review/appraisal/index">职工评议</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wakeshome/review/appraisal/mine">我的评议</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
tarBarActive: 0,
|
||||
pageForm:{
|
||||
annual:'',
|
||||
type: 2,
|
||||
},
|
||||
activityList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开始', value: 4},
|
||||
{text: '进行中', value: 2},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
yearOption:[],
|
||||
unionName: '${@shiro.getPrincipalProperty("union").getUnionname()}'
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async toCommentator(o){
|
||||
//自评模式
|
||||
if (o.reviewMode == 1 && !o.canJoin) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您不在评议人员范围中',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const isExist = await getScopeUser(o.activityGroupId)
|
||||
if ((o.commentTarget == 1 && !isExist) || (o.commentTarget == 3 && !o.canJoin)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您不在评议人员范围中',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess',{id:o.id})
|
||||
if (resp.data > 0){
|
||||
vant.Toast('您已经填写过,请前往我的测评中查看测评结果')
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/wakeshome/review/appraisal/commentator?id=' + o.id
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "annual", this.yearOption[0].value)
|
||||
this.pageData();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,372 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.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-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.van-collapse-item .van-cell__title :before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 15px;
|
||||
background-color: #0e5996;
|
||||
width: 4px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
margin-right: 2px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.van-collapse-item__content .van-cell__title :before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content_div {
|
||||
margin-top: 10px;
|
||||
background-color: white;
|
||||
padding: 6px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-collapse-item__content {
|
||||
padding: 0px 6px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.van-button {
|
||||
height: 40px;
|
||||
margin: 6px 20px
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-nav-bar title="民主测评" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<van-form ref="addForm" :show-error-message="false" style="margin-bottom: 60px">
|
||||
<!-- v-for测评内容 -->
|
||||
<van-collapse v-model="activeNames" accordion>
|
||||
<div v-if="commentatorData.scoringMode==1">
|
||||
<div v-for="o in commentatorData.nrs">
|
||||
<van-collapse-item :title="o.content" :name="o.id" style="margin: 5px">
|
||||
<!-- v-for测评指标 -->
|
||||
<div v-for="item in o.bzs" style="margin-top: 10px" class="content_div">
|
||||
<div>
|
||||
<div style="font-size: 15px;color: black">
|
||||
{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-row>
|
||||
<div style="font-size: 15px;text-align: right;margin-right: 30px;margin-bottom:-4px">标准分:{{item.score}}</div>
|
||||
</van-row>
|
||||
<van-field
|
||||
v-model="item.resultScore"
|
||||
name="评议分"
|
||||
label="评议分"
|
||||
type="digit"
|
||||
required
|
||||
maxlength="4"
|
||||
:readonly="isReadOnly"
|
||||
placeholder="请填写评议分"
|
||||
@change="changeScore(item)"
|
||||
:rules="[{ required: true, message: '请填写评议分' }]"
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_div" style="margin: 10px 0">
|
||||
<van-field v-model="o.remark"
|
||||
name="备注" label="备注"
|
||||
required rows="3" type="textarea"
|
||||
autosize show-word-limit
|
||||
maxlength="300"
|
||||
placeholder="请填写备注"
|
||||
:readonly="isReadOnly"
|
||||
></van-field>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
</div>
|
||||
<div v-if="commentatorData.reviewMode == 1" class="content_div">
|
||||
<van-field name="files" label="职工评家总结" required style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">职工评家总结</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="commentatorData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="commentatorData.scoringMode==2">
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="president" :options="presidentList"
|
||||
@change="presidentChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div v-for="o in commentatorData.nrs" style="margin: 60px auto 0 auto">
|
||||
<div v-for="item in o.bzs">
|
||||
<div class="van-doc-card">
|
||||
<div style="font-size: 15px;color: black">{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-field name="radio" label="满意度" style="padding: 12px 2px;margin: 5px">
|
||||
<template #input>
|
||||
<van-radio-group style="margin-left: -20px" v-model="item.resultScore" :disabled="isReadOnly" direction="horizontal">
|
||||
<van-radio name="满意">满意</van-radio>
|
||||
<van-radio name="基本满意">基本满意</van-radio>
|
||||
<van-radio name="不满意">不满意</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-doc-card">
|
||||
<van-field
|
||||
v-model="presidentOpinions"
|
||||
:readonly="isReadOnly"
|
||||
rows="2" type="textarea"
|
||||
autosize show-word-limit
|
||||
name="备注" label="备注" maxlength="200"
|
||||
placeholder="请填写备注"
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar>
|
||||
<van-button id="buttonAss" :disabled="isShowSubmit" round block type="info" @click="showAssess">查看测评结果</van-button>
|
||||
<van-button id="buttonSub" :disabled="isShowSubmit" round block type="info" @click="onSubmit">提交</van-button>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
activeNames: '',
|
||||
commentatorData: {},
|
||||
reviewResult: null,
|
||||
presidentOpinions: '',
|
||||
bzList: [],
|
||||
president: '',
|
||||
presidentList: [],
|
||||
userList:[],
|
||||
isShowSubmit: false,
|
||||
isReadOnly:false,
|
||||
formData:{
|
||||
id: '',
|
||||
reviewResult: '',
|
||||
presidentOpinions: '',
|
||||
president: '',
|
||||
files: [],
|
||||
nrs: [],
|
||||
reviewMode: '',
|
||||
scoringMode: '',
|
||||
assessmentMode: '',
|
||||
assessmentResult: '',
|
||||
assessmentOpinions: '',
|
||||
assessmentFiles: [],
|
||||
assessmentNrs: [],
|
||||
assessmentReviewMode: '',
|
||||
assessmentScoringMode:'',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCommentById() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getById', {id: this.id})
|
||||
if (resp.code === 0) {
|
||||
this.commentatorData = resp.data
|
||||
if (this.commentatorData.assessmentMode === 2) {
|
||||
this.commentatorData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
o.resultScore = '满意'
|
||||
})
|
||||
})
|
||||
await this.getPresidents();
|
||||
}
|
||||
this.activeNames = this.commentatorData.nrs[0].id
|
||||
}
|
||||
},
|
||||
async assignment() {
|
||||
const self = this;
|
||||
this.bzList = [];
|
||||
this.commentatorData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
if (self.commentatorData.assessmentMode === 1 && v.remark){
|
||||
o.options = v.remark
|
||||
}
|
||||
self.bzList.push(o)
|
||||
})
|
||||
})
|
||||
},
|
||||
async onSubmit() {
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
await this.$dialog.confirm({
|
||||
title: '确定要提交该测评结果吗?',
|
||||
message: '提交后不可修改,请仔细检查后提交'
|
||||
})
|
||||
await this.assignment();
|
||||
|
||||
let evaluatedPersonName=null;
|
||||
let evaluatedPersonType=null;
|
||||
|
||||
if (this.commentatorData.assessmentMode === 1) {
|
||||
let score = 0;
|
||||
this.bzList.forEach(v => {
|
||||
score += Number(v.resultScore)
|
||||
})
|
||||
if (score >= Number(80)) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (score >= Number(60) && score <= Number(79)) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
} else if (this.commentatorData.assessmentMode === 2) {
|
||||
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
||||
if (result.length >= 8) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (result.length >= 6 && result.length <= 7) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
const user = this.userList.find(v=> v.id === this.president)
|
||||
evaluatedPersonName = user.username
|
||||
evaluatedPersonType = user.evaluatedPersonType
|
||||
}
|
||||
|
||||
const formData = this.formData
|
||||
// this.$set(formData,"bzList",this.bzList)
|
||||
formData.bzList = JSON.stringify(this.bzList)
|
||||
formData.id = this.id
|
||||
formData.president = this.president
|
||||
formData.reviewResult = this.reviewResult
|
||||
formData.evaluatedPersonName = evaluatedPersonName
|
||||
formData.evaluatedPersonType = evaluatedPersonType
|
||||
formData.files = JSON.stringify(this.commentatorData.files)
|
||||
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit', formData)
|
||||
if (resp.code === 0) {
|
||||
await this.getCommentById();
|
||||
window.location.href = '/mobile/wakeshome/review/appraisal/mine'
|
||||
}
|
||||
})
|
||||
},
|
||||
async showAssess() {
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
let score = 0;
|
||||
await this.assignment();
|
||||
if (this.commentatorData.assessmentMode === 1) {
|
||||
this.bzList.forEach(v => {
|
||||
score += Number(v.resultScore)
|
||||
})
|
||||
if (score >= Number(80)) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (score >= Number(60) && score <= Number(79)) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
console.log(score)
|
||||
console.log(this.reviewResult)
|
||||
vant.Dialog.alert({
|
||||
title: '测评结果',
|
||||
message: '您的测评分数为【' + score + "】分,测评结果为【" + this.reviewResult + "】",
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
} else if (this.commentatorData.assessmentMode === 2) {
|
||||
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
||||
if (result.length >= 8) {
|
||||
this.reviewResult = '满意'
|
||||
} else if (result.length >= 6 && result.length <= 7) {
|
||||
this.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.reviewResult = '不满意'
|
||||
}
|
||||
console.log(result)
|
||||
console.log(this.reviewResult)
|
||||
vant.Dialog.alert({
|
||||
title: '测评结果',
|
||||
message: '您的满意或基本满意个数为【' + result.length + "】个,测评结果为【" + this.reviewResult + "】",
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeScore(item) {
|
||||
if (Number(item.score) < Number(item.resultScore)) {
|
||||
item.resultScore = null;
|
||||
vant.Toast('评议分不能超过标准分!')
|
||||
}
|
||||
},
|
||||
async getPresidents() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getPresidents')
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.forEach(v => {
|
||||
this.presidentList.push({value: v.id, text: v.presidents})
|
||||
})
|
||||
}
|
||||
this.president = this.presidentList[0].value
|
||||
await this.presidentChange();
|
||||
},
|
||||
async presidentChange() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess', {
|
||||
id: this.id,
|
||||
evaluatedPersonId: this.president,
|
||||
})
|
||||
if (resp.data > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您已经评测过该主席(副主席),请在【我的评议】中查看结果,或更换主席(副主席)进行测评',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
this.isShowSubmit = true;
|
||||
this.isReadOnly = true
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
await this.getCommentById();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,271 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-collapse-item .van-cell__title :before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 15px;
|
||||
background-color: #0e5996;
|
||||
width: 4px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
margin-right: 2px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.van-collapse-item__content .van-cell__title :before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content_div {
|
||||
margin-top: 10px;
|
||||
background-color: white;
|
||||
padding: 6px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-collapse-item__content {
|
||||
padding: 0px 6px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-nav-bar title="我的测评" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.annual" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto">
|
||||
<template>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" :key="o.id" class="van-doc-card">
|
||||
<div @click="toCommentator(o)" style="padding: 10px">
|
||||
<div>
|
||||
<div style="display: flex;font-size: 18px">{{ o.assessment }}</div>
|
||||
<div style="align-items: center">
|
||||
<van-tag type="primary">{{ o.assessmentMode==1 ? '会员评家考核' : '工会主席考核' }}</van-tag>
|
||||
<!--<van-tag type="primary">{{ o.commentTarget==1 ? '校工会' : '分工会' }}</van-tag>-->
|
||||
<van-tag type="primary" v-if="o.commentTarget==1">{{ '校工会' }}</van-tag>
|
||||
<van-tag type="primary" v-if="o.commentTarget==2">{{ unionName }}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-row gutter="20">
|
||||
<van-col span="10">
|
||||
<span>年度:{{ o.annual }}</span>
|
||||
</van-col>
|
||||
<van-col span="14" v-if="o.assessmentMode==2">
|
||||
<span>测评对象:{{ o.evaluatedPersonName }}({{o.evaluatedPersonType}})</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row gutter="20">
|
||||
<van-col span="10">
|
||||
<span>测评模式:{{ o.scoringMode==1 ? '评分' : '满意度' }}</span>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<span>测评结果:{{ o.reviewResult ? o.reviewResult : '暂无' }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<!--<div>年度:{{ o.annual }}</div>
|
||||
<div>测评结果:{{ o.reviewResult ? o.reviewResult : '暂无' }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="descPopup" position="right" style="height: 100%;width: 100%;background-color: #f9f9f9"
|
||||
safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="descPopup=false" left-arrow
|
||||
title="测评详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div>
|
||||
<van-form :show-error-message="false" style="margin-bottom: 60px">
|
||||
<!-- v-for测评内容 -->
|
||||
<van-collapse v-model="activeNames" accordion>
|
||||
<div v-if="zbxx.scoringMode==1">
|
||||
<div v-for="o in zbxx.nrs">
|
||||
<van-collapse-item :title="o.content" :name="o.id" style="margin: 5px">
|
||||
<!-- v-for测评指标 -->
|
||||
<div v-for="item in o.bzs" style="margin-top: 10px" class="content_div">
|
||||
<div>
|
||||
<div style="font-size: 15px;color: black">
|
||||
{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-row>
|
||||
<div style="font-size: 15px;text-align: right;margin-right: 30px;margin-bottom:-4px">标准分:{{item.score}}</div>
|
||||
</van-row>
|
||||
<van-field
|
||||
v-model="item.resultScore"
|
||||
name="测评分"
|
||||
label="测评分"
|
||||
readonly
|
||||
></van-field>
|
||||
|
||||
<van-field v-if="item.isEvidence"
|
||||
v-model="item.options"
|
||||
name="意见或建议"
|
||||
label="意见或建议"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
</div>
|
||||
<div >
|
||||
<van-field
|
||||
v-model="commentPeo.reviewResult"
|
||||
name="测评结果"
|
||||
label="测评结果"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="zbxx.scoringMode==2">
|
||||
<div v-for="o in zbxx.nrs">
|
||||
<div v-for="item in o.bzs">
|
||||
<div class="van-doc-card">
|
||||
<div style="font-size: 15px;color: black">
|
||||
{{item.contentNumber}}、{{item.inspection}}
|
||||
</div>
|
||||
<van-field name="radio" label="满意度" style="padding: 12px 2px;margin: 5px">
|
||||
<template #input>
|
||||
<van-radio-group style="margin-left: -20px" v-model="item.resultScore" disabled direction="horizontal">
|
||||
<van-radio name="满意">满意</van-radio>
|
||||
<van-radio name="基本满意">基本满意</van-radio>
|
||||
<van-radio name="不满意">不满意</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-doc-card">
|
||||
<van-field
|
||||
v-model="commentPeo.presidentOpinions"
|
||||
rows="2"
|
||||
readonly
|
||||
name="意见或建议"
|
||||
label="意见或建议"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="commentPeo.reviewResult"
|
||||
name="测评结果"
|
||||
label="测评结果"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/wakeshome/review/appraisal/index">民主测评</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wakeshome/review/appraisal/mine">我的测评</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
pageForm: {
|
||||
annual:'',
|
||||
},
|
||||
descPopup: false,
|
||||
commentPeo: {},
|
||||
zbxx: {},
|
||||
activeNames: '',
|
||||
unionName: '${@shiro.getPrincipalProperty("union").getUnionname()}',
|
||||
yearOption:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/onLoad', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
async toCommentator(o) {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getBzById', {
|
||||
peoId: o.id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.commentPeo = resp.data.commentPeo;
|
||||
this.zbxx = resp.data.zbxx
|
||||
this.activeNames = this.zbxx.nrs[0].id
|
||||
this.descPopup = true
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "annual", this.yearOption[0].value)
|
||||
this.pageData()
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -10,16 +10,17 @@ layout("/mobile/platform.html"){
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
@click-left="history.go(-1)"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption"
|
||||
@change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<div style="margin: 60px auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
@@ -28,7 +29,8 @@ layout("/mobile/platform.html"){
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="主题" :border="false">{{o.hdname}}</van-cell>
|
||||
<van-cell :border="false" title="创建人">{{o.cjr}}</van-cell>
|
||||
<van-cell :border="false" title="创建人">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="开启状态">{{o.hdflag?'已开启':'未开启'}}</van-cell>
|
||||
<van-cell :border="false" title="创建时间">{{o.hdcjsj}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.hdkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.hdjssj}}</van-cell>
|
||||
@@ -43,6 +45,14 @@ layout("/mobile/platform.html"){
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/wmhd/apply">教工作品征集</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品</van-tabbar-item>
|
||||
<!-- <van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/statistics">点赞教工作品</van-tabbar-item>-->
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -51,6 +61,7 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
@@ -67,7 +78,7 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/wmhdMange/data', this.pageForm).then(res => {
|
||||
$.post('/mobile/wmhd/apply/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
@@ -80,11 +91,15 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {hdid, hdjssj, hdkssj} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") <= hdkssj) {
|
||||
const {hdid, hdjssj, hdkssj, hdflag} = o
|
||||
if (!hdflag) {
|
||||
vant.Toast('活动暂未开启!')
|
||||
return;
|
||||
}
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
|
||||
vant.Toast('报名暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") >= hdjssj) {
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
|
||||
vant.Toast('报名已结束!')
|
||||
return
|
||||
}
|
||||
@@ -103,4 +118,4 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="我的审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="RGB(8,23,118)">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange"
|
||||
:options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange"
|
||||
:options="auditList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('H10')}"
|
||||
:options="mCommon.unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
|
||||
:options="mCommon.unitList"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="姓名">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
|
||||
<van-cell :border="false" title="工会">{{o.ghname}}</van-cell>
|
||||
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
|
||||
<van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{o.stateName}}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="viewShow" position="right"
|
||||
:style="{ height: '100%',width:'100%' }">
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed
|
||||
@click-left="viewShow=false"></van-nav-bar>
|
||||
|
||||
<mobile-wmhd-info ref="minfo"></mobile-wmhd-info>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/mobile/wmhd/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
|
||||
if (o.auditState === '4000' || o.auditState === '4200') {
|
||||
window.location.href = "/mobile/wmhd/audit/auditHtml?id=" + o.id + "&auditState=" + o.auditState
|
||||
} else {
|
||||
this.viewShow = true
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(o.id)
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh03')||@shiro.hasRole('wyh02')||@shiro.hasRole('H03')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
}, async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCommon.getUnionList()
|
||||
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.flushUnits()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.flushUnits()
|
||||
vue.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="校工会审核" left-arrow placeholder fixed
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
|
||||
<mobile-wmhd-info ref="minfo" :id.sync="id" title="校工会审核" :handle="handle">
|
||||
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature"
|
||||
:my_sign.sync="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button block @click="doAudit(2)" type="warning">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button block @click="doAudit(3)" type="info">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
|
||||
</mobile-wmhd-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
id: GetQueryString('id'),
|
||||
handle: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/hd/wmhd/school/audit/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
window.history.go(-1)
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const id = GetQueryString("id")
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(id)
|
||||
}, 500)
|
||||
this.formData = {
|
||||
id: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: "通过",
|
||||
auditSign: ""
|
||||
}
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,321 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
title="作品列表"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearOption" @change="yearChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="hdxxlist" @change="hdlbchange();"
|
||||
v-model="pageForm.hdid"></van-dropdown-item>
|
||||
<van-dropdown-item :options="hdlblist" @change="onRefresh()"
|
||||
v-model="pageForm.hdlb"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
v-model="mLoading">
|
||||
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="姓名">{{o.sbrname}}</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
|
||||
<van-cell :border="false" title="工会">{{o.ghname}}</van-cell>
|
||||
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
|
||||
<van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell>
|
||||
<van-cell :border="false" title="总点赞数">{{o.dz_znum}}次</van-cell>
|
||||
<van-field readonly :value="o.hdsbzpms" label="创作说明"
|
||||
input-align="left"
|
||||
style="flex-flow: column"
|
||||
rows="2" type="textarea" show-word-limit autosize></van-field>
|
||||
<van-field label="作品" style="flex-flow: column" input-align="left">
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="o.files" view :del="false"
|
||||
v-if="o.files&&o.files.length>0"></vant-file-upload>
|
||||
<div v-if="o.files.length===0"
|
||||
style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有照片。
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
<!-- <van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{o.statename}}</span>
|
||||
</van-cell>-->
|
||||
<van-cell>
|
||||
<div style="display: flex;justify-content: flex-end;">
|
||||
<van-button :color="themeColor" round disabled
|
||||
style="width: 90px;height: 30px;" v-if="o.dz_num>0">
|
||||
已点赞
|
||||
</van-button>
|
||||
<div style="display: flex;justify-content: center;"
|
||||
v-if="o.dzjssj&&moment().valueOf()>moment(o.dzkssj).valueOf()&&moment().valueOf()<moment(o.dzjssj).valueOf()">
|
||||
<van-button :color="themeColor" round @click.stop="doDz(o.id)"
|
||||
style="width: 90px;height: 30px;" v-if="o.dz_num<=0">
|
||||
点赞
|
||||
</van-button>
|
||||
</div>
|
||||
<van-button :color="themeColor" @click.stop="openView(o)" round
|
||||
style="width: 90px;height: 30px;margin-left: 5px">
|
||||
查看
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
<van-popup :style="{ height: '100%',width:'100%' }" position="right"
|
||||
v-model="viewShow">
|
||||
<van-nav-bar @click-left="viewShow=false" fixed left-arrow placeholder
|
||||
title="详细信息"></van-nav-bar>
|
||||
|
||||
<mobile-wmhd-info handle ref="minfo">
|
||||
<template #handle>
|
||||
<div style="display: flex;justify-content: center;"
|
||||
v-if="zpData.dzjssj&&moment().valueOf()>moment(zpData.dzkssj).valueOf()&&moment().valueOf()<moment(zpData.dzjssj).valueOf()">
|
||||
<van-button :color="themeColor" @click.stop="doDz" round
|
||||
style="width: 80%" v-if="zpData.zpDzNum<1">
|
||||
点赞
|
||||
</van-button>
|
||||
<van-button :color="themeColor" disabled round
|
||||
style="width: 80%" v-else>
|
||||
已点赞
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</mobile-wmhd-info>
|
||||
|
||||
|
||||
</van-popup>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/wmhd/apply">教工作品征集</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/statistics">点赞教工作品
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
tarBarActive: 2,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
year: '',
|
||||
hdtype: 1,
|
||||
},
|
||||
yearActivityList: [],
|
||||
hdxxlist: [],
|
||||
hdlblist: [],
|
||||
zpData: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doDz(id) {
|
||||
const toast1 = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '加载中...',
|
||||
})
|
||||
if ("${@shiro.getPrincipalProperty('loginname')}" === this.zpData.loginname) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '自己暂时不能给自己点赞哦!',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
const hd = this.hdxxlist.find(h => h.value === this.pageForm.hdid)
|
||||
const dzNum = await this.findDzNum(hd.value)
|
||||
toast1.clear()
|
||||
if (dzNum >= hd.dzNum) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您当前活动,今日点赞次数已满' + hd.dzNum + '次,请明日在进行点赞',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '点赞后不能取消,您确定要给当前作品点赞吗?',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const resp = await $.post('/mobile/wmhd/statistics/doDz', {
|
||||
id: this.zpData.id ? this.zpData.id : id,
|
||||
hdid: hd.value
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
await this.findDzByZpId(this.zpData.id)
|
||||
this.tableData.map(t => {
|
||||
if (t.id === (this.zpData.id ? this.zpData.id : id)) {
|
||||
t.dz_num = 1
|
||||
t.dz_znum = t.dz_znum + 1
|
||||
}
|
||||
})
|
||||
setTimeout(async () => {
|
||||
toast.clear()
|
||||
vant.Toast.success('点赞成功');
|
||||
}, 700)
|
||||
} else {
|
||||
vant.Toast.fail(resp.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
async findDzNum(hdid) {
|
||||
const resp = await $.post('/mobile/wmhd/statistics/findDzNum', {hdid})
|
||||
return resp.data
|
||||
},
|
||||
async findDzByZpId(id) {
|
||||
const resp = await $.post('/mobile/wmhd/statistics/findDzByZpId', {id})
|
||||
this.$set(this.zpData, "zpDzNum", resp.data)
|
||||
},
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 1
|
||||
this.loading = true;
|
||||
await this.onLoad();
|
||||
},
|
||||
async yearChange() {
|
||||
const activityList = this.yearActivityList.find(y => y.value === this.pageForm.year)
|
||||
if (activityList && activityList.children.length > 0) {
|
||||
activityList.children.map(h => {
|
||||
h.text = h.label
|
||||
})
|
||||
this.hdxxlist = activityList.children
|
||||
this.$set(this.pageForm, "hdid", this.hdxxlist[0].value)
|
||||
|
||||
} else {
|
||||
this.hdxxlist = []
|
||||
this.$set(this.pageForm, "hdid", null)
|
||||
}
|
||||
await this.onRefresh()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/mobile/wmhd/statistics/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
async openView(o) {
|
||||
this.zpData = o
|
||||
await this.findDzByZpId(o.id)
|
||||
this.viewShow = true
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(o.id)
|
||||
}, 300)
|
||||
},
|
||||
async initHdxxlist() {
|
||||
const data = await $.post('/mobile/wmhd/statistics/initHdxxlist')
|
||||
if (data.code == 0) {
|
||||
|
||||
this.yearActivityList = data.data
|
||||
}
|
||||
},
|
||||
async hdlbchange() {
|
||||
this.$set(this.pageForm, 'zplb', '');
|
||||
const data = await $.post('/platform/hd/childhd/zpxx/gethdlblist', {id: this.pageForm.hdid})
|
||||
if (data.code === 0) {
|
||||
data.data.map(h => {
|
||||
h.text = h.lname
|
||||
h.value = h.lid
|
||||
})
|
||||
this.hdlblist = data.data;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
setTimeout(async () => {
|
||||
await this.initHdxxlist()
|
||||
this.yearChange()
|
||||
this.hdlbchange()
|
||||
}, 300)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,125 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="分工会审核" left-arrow placeholder fixed
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
|
||||
<mobile-wmhd-info ref="minfo" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature"
|
||||
:my_sign.sync="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button block @click="doAudit(2)" type="warning">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button block @click="doAudit(3)" type="info">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
|
||||
</mobile-wmhd-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
id: GetQueryString('id'),
|
||||
handle: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/hd/wmhd/union/audit/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
window.history.go(-1)
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const id = GetQueryString("id")
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(id)
|
||||
}, 500)
|
||||
this.formData = {
|
||||
id: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: "通过",
|
||||
auditSign: ""
|
||||
}
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -15,44 +15,53 @@ layout("/mobile/platform.html"){
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="作品列表"
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
title="作品列表"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item :options="yearOption" @change="yearChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<div style="margin: 60px auto">
|
||||
<van-notice-bar mode="closeable">左滑可删除作品。</van-notice-bar>
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
@load="onLoad"
|
||||
v-model="mLoading">
|
||||
|
||||
<div v-for="o in tableData" class="list-card" @click.stop="openView(o)">
|
||||
<van-swipe-cell>
|
||||
<div @click.stop="openView(o)" class="list-card" v-for="o in tableData">
|
||||
<van-swipe-cell :disabled="o.auditstate!=='3999'">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/wmhd/bianji.svg"
|
||||
@click.stop="openEdit(o.id,o.hdid)"></image>
|
||||
<van-cell :border="false" title="姓名">{{o.username}}</van-cell>
|
||||
<image @click.stop="openEdit(o.id,o.hdid)" class="register-icon"
|
||||
src="/assets/mobile/svg/wmhd/bianji.svg"
|
||||
v-if="o.auditstate==='3999'||o.auditstate==='4100'||o.auditstate==='4250'"></image>
|
||||
<van-cell :border="false" title="姓名">{{o.sbrname}}</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
|
||||
<van-cell :border="false" title="工会">{{o.ghname}}</van-cell>
|
||||
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
|
||||
<van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}}</van-cell>
|
||||
<van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}}
|
||||
</van-cell>
|
||||
<!-- <van-cell :border="false" title="主题">{{o.hdsbzpzt}}</van-cell>-->
|
||||
<van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell>
|
||||
<!-- <van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{o.statename}}</span>
|
||||
</van-cell>--><!--
|
||||
<van-cell :border="false" title="总点赞数">
|
||||
{{o.dz_znum}}次
|
||||
</van-cell>-->
|
||||
</van-cell-group>
|
||||
<template #right>
|
||||
<van-button square text="删除" type="danger" @click="doDelete(o.id)"
|
||||
style="height: 100%;"></van-button>
|
||||
<van-button @click="doDelete(o.id)" square style="height: 100%;" text="删除"
|
||||
type="danger"></van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</div>
|
||||
@@ -60,11 +69,30 @@ layout("/mobile/platform.html"){
|
||||
</van-list>
|
||||
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
<van-popup :style="{ height: '100%',width:'100%' }" position="right"
|
||||
v-model="viewShow">
|
||||
<van-nav-bar @click-left="viewShow=false" fixed left-arrow placeholder
|
||||
title="详细信息"></van-nav-bar>
|
||||
|
||||
<mobile-wmhd-info ref="minfo"></mobile-wmhd-info>
|
||||
</van-popup>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/wmhd/apply">教工作品征集</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品
|
||||
</van-tabbar-item><!--
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/statistics">点赞教工作品
|
||||
</van-tabbar-item>-->
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -75,6 +103,8 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
tarBarActive: 1,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
@@ -82,7 +112,9 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openEdit(id, hdid) {
|
||||
window.location.href = '/platform/staffActivities?client=mobile&id=' + hdid + '&zpid=' + id
|
||||
@@ -108,7 +140,7 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/wmhd/pageData', this.pageForm).then(res => {
|
||||
$.post('/platform/hd/jzghd/sczp/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
@@ -121,7 +153,10 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/wmhd/list/view?id=' + o.id
|
||||
this.viewShow = true
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(o.id)
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@@ -136,4 +171,4 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,33 +4,34 @@ layout("/layouts/platform.html"){
|
||||
<div id="app">
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker @change="yearChange"
|
||||
<el-date-picker :clearable="false"
|
||||
@change="yearChange"
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable v-model="pageForm.hdid">
|
||||
<el-select :clearable="false" v-model="pageForm.hdid">
|
||||
<el-option :key="i.value"
|
||||
:label="i.label"
|
||||
:value="i.value"
|
||||
v-for="i in hdxxlist"></el-option>
|
||||
</el-select>
|
||||
|
||||
<!-- <el-cascader placeholder="请选择活动主题"-->
|
||||
<!-- filterable-->
|
||||
<!-- v-model="pageForm.hdid" :options="hdxxlist"-->
|
||||
<!-- @change="(v)=>{ pageForm.hdid = clone(v).pop() }"-->
|
||||
<!-- clearable></el-cascader>-->
|
||||
<!-- <el-cascader :options="hdxxlist"
|
||||
@change="(v)=>{ pageForm.hdid = clone(v).pop() }"
|
||||
clearable filterable
|
||||
placeholder="请选择活动主题"
|
||||
v-model="pageForm.hdids"></el-cascader>-->
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch" clearable>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 120px;"
|
||||
clearable>
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
||||
<el-select clearable placeholder="查询类型" slot="prepend"
|
||||
style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<!-- <el-option v-if="hasSuperAdminOrXghRole" label="分工会" value="gh.unionname"></el-option>-->
|
||||
<!-- <el-option label="单位" value="dw.name"></el-option>-->
|
||||
<el-option label="教职工姓名" value="sbr.username"></el-option>
|
||||
@@ -40,63 +41,70 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<el-row class="btn-group tool-button">
|
||||
<el-select v-if="hasSuperAdminOrXghRole" placeholder="所属工会" v-model="pageForm.union"
|
||||
<el-select @change="unionChange" clearable="true" filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 200px;"
|
||||
clearable="true"
|
||||
filterable="true" @change="unionChange">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
v-if="hasSuperAdminOrXghRole" v-model="pageForm.union">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
|
||||
<el-row class="btn-group tool-button">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unit" style="width: 200px;" clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 200px;"
|
||||
v-model="pageForm.unit">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button size="medium" @click="exportExcel(1)">
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button @click="exportExcel(1)" size="medium">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出获奖人员名单
|
||||
</el-button>
|
||||
<el-button size="medium" @click="exportExcel(2)" v-if="hasSuperAdminOrXghRole">
|
||||
<el-button @click="exportExcel(2)" size="medium" v-if="hasSuperAdminOrXghRole">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出分工会获奖信息
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center" width="50">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="50">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="username" label="姓名" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="姓名" prop="username"
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="loginname" label="工资号" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center" show-overflow-tooltip
|
||||
<el-table-column align="center" header-align="center" label="工资号"
|
||||
prop="loginname"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="单位" prop="dwname"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center" show-overflow-tooltip
|
||||
<el-table-column align="center" header-align="center" label="分工会" prop="ghname"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="hjcount" label="获奖次数" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="获奖次数" prop="hjcount"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -107,83 +115,31 @@ layout("/layouts/platform.html"){
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data: function () {
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
hasSuperAdminOrXghRole: "${@shiro.hasAnyRoles('sysadmin','A06')}" === 'true' ? true : false,
|
||||
hasSuperAdminOrXghRole: "${@shiro.hasAnyRoles('sysadmin,A06',',')}" === 'true' ? true : false,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
hdid: null,
|
||||
searchName: 'sbr.username',
|
||||
year: new Date().getFullYear().toString()
|
||||
searchName: 'sbr.username'
|
||||
},
|
||||
tableData: [],
|
||||
hdxxlist: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange(val) {
|
||||
this.pageForm.hdid = null
|
||||
if (val) {
|
||||
this.hdxxlist = this.yearActivityList.filter(v => v.value === parseInt(val)).map(v => v.children).reduce((a, b) => [...a, ...b], [])
|
||||
} else {
|
||||
this.hdxxlist = this.yearActivityList.map(v => v.children).reduce((a, b) => [...a, ...b], [])
|
||||
}
|
||||
if (this.hdxxlist && this.hdxxlist.length > 0) {
|
||||
this.pageForm.hdid = this.hdxxlist[0].value
|
||||
}
|
||||
this.doSearch()
|
||||
|
||||
|
||||
// this.$nextTick(() => {
|
||||
// this.hdxxlist = []
|
||||
// })
|
||||
// this.$set(this.pageForm, "hdid", "")
|
||||
// let activityList = []
|
||||
// console.log(val)
|
||||
// if (val === null) {
|
||||
// this.yearActivityList.map(v => {
|
||||
// activityList = activityList.concat(v.children)
|
||||
// })
|
||||
// } else {
|
||||
// let enen = this.yearActivityList.filter(v => v.value == val)
|
||||
// enen.map(v => {
|
||||
// activityList = activityList.concat(v.children)
|
||||
// })
|
||||
// }
|
||||
// this.$nextTick(() => {
|
||||
// this.hdxxlist = activityList
|
||||
// })
|
||||
// this.doSearch()
|
||||
},
|
||||
async unionChange() {
|
||||
this.$set(this.pageForm, "unit", null)
|
||||
this.units = await getUnits(this.pageForm.union)
|
||||
},
|
||||
|
||||
pageData: function () {
|
||||
var self = this;
|
||||
sublime.showLoadingbar();
|
||||
$.post(base + "/platform/hd/childhd/hjxx/pageData", self.pageForm, function (data) {
|
||||
sublime.closeLoadingbar();
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.list;
|
||||
self.pageForm.totalCount = data.data.totalCount;
|
||||
}
|
||||
});
|
||||
},
|
||||
pageSizeChange: function (val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange: function (val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
exportExcel: function (num) {
|
||||
var self = this;
|
||||
var hdid = self.pageForm.hdid;
|
||||
@@ -197,25 +153,42 @@ layout("/layouts/platform.html"){
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
},
|
||||
initHdxxlist() {
|
||||
$.post(base + '/platform/hd/childhd/zpxx/initHdxxlist').then(data => {
|
||||
if (data.code == 0) {
|
||||
this.yearActivityList = data.data
|
||||
let activityList = []
|
||||
data.data.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
this.hdxxlist = activityList
|
||||
this.$set(this.pageForm, 'hdid', this.hdxxlist ? this.hdxxlist[0].value : []);
|
||||
}
|
||||
});
|
||||
async initHdxxlist() {
|
||||
const data = await $.post(base + '/platform/hd/childhd/zpxx/initHdxxlist')
|
||||
if (data.code == 0) {
|
||||
this.yearActivityList = data.data
|
||||
let activityList = []
|
||||
data.data.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
this.hdxxlist = activityList
|
||||
}
|
||||
},
|
||||
yearChange(val) {
|
||||
let activityList = []
|
||||
if (val === null) {
|
||||
this.yearActivityList.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
} else {
|
||||
let enen = this.yearActivityList.filter(v => v.value == val)
|
||||
enen.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
}
|
||||
|
||||
this.hdxxlist = activityList
|
||||
if (this.hdxxlist && this.hdxxlist.length > 0) {
|
||||
this.$set(this.pageForm, 'hdid', this.hdxxlist[0].value);
|
||||
} else {
|
||||
this.$set(this.pageForm, 'hdid', null);
|
||||
}
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
$.ajaxSettings.async = false;
|
||||
this.initHdxxlist();
|
||||
this.pageData();
|
||||
$.ajaxSettings.async = true;
|
||||
await this.initHdxxlist()
|
||||
await this.yearChange(new Date().getFullYear() + '');
|
||||
this.unions = await getUnions()
|
||||
this.units = await getUnits()
|
||||
}
|
||||
@@ -223,4 +196,4 @@ layout("/layouts/platform.html"){
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -88,19 +88,28 @@
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-nav-bar__content {
|
||||
background-color: #081776;
|
||||
}
|
||||
|
||||
.van-nav-bar__title, .van-icon-arrow-left::before {
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-clock id="app" v-if="showPage">
|
||||
<van-nav-bar title="亲子作品征集" fixed placeholder safe-area-inset-top @click-left="history.back()"
|
||||
:left-arrow="leftArrow"></van-nav-bar>
|
||||
<div>
|
||||
<van-swipe v-if="boxData.bgis.length>0" class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item v-for="bgi in boxData.bgis">
|
||||
<van-swipe v-if="boxData.files&&boxData.files.length>0" class="my-swipe" :autoplay="3000"
|
||||
indicator-color="white">
|
||||
<van-swipe-item v-for="bgi in boxData.files">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
:src="FILE_DOMAIN+bgi.iurl"
|
||||
:src="FILE_DOMAIN+'/fileStreamPreview?id='+bgi.id"
|
||||
></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
@@ -311,7 +320,7 @@
|
||||
(如同时参加以下多个活动,或有多个主题,请分别提交)</p>
|
||||
</div>
|
||||
<van-tabs v-model="formData.hdlb_i" :color="boxData.hdcolor" type="line">
|
||||
<van-tab v-for="lb,i in boxData.lbs" :name="i" :title="lb.lname">
|
||||
<van-tab v-for="(lb,i) in boxData.lbs" :name="i" :title="lb.lname">
|
||||
<div v-if="formData.hdlb_i==i">
|
||||
<van-field style="padding-top: 30px" maxlength="15"
|
||||
:rules="[{ required: true, message: '请填写作品主题' }]"
|
||||
@@ -347,30 +356,31 @@
|
||||
<van-field label="图  片" disabled placeholder="(左滑删除单个文件)"
|
||||
style="border: none;"
|
||||
input-align="right"></van-field>
|
||||
<van-swipe-cell v-for="img,idx in fd[i].imgList"
|
||||
<van-swipe-cell v-for="(img,idx) in fd[i].imgList"
|
||||
style="border: none;padding-top: 20px;">
|
||||
<van-row style="padding: 0 15px">
|
||||
<van-col :span="6">
|
||||
<van-image
|
||||
v-if="img.id"
|
||||
width="100%"
|
||||
height="25vw"
|
||||
fit="cover"
|
||||
:src="FILE_DOMAIN+'/fileStreamPreview?id='+img.id"
|
||||
></van-image>
|
||||
<van-image
|
||||
v-else
|
||||
width="100%"
|
||||
height="25vw"
|
||||
fit="cover"
|
||||
:src="img.content"
|
||||
></van-image>
|
||||
</van-col>
|
||||
<van-col :span="18">
|
||||
<van-field style="width: 100%;height: 25vm;padding-right: 0;" autosize
|
||||
v-model="img.ms"
|
||||
type="textarea" rows="2"
|
||||
maxlength="50"
|
||||
:show-word-limit="!isNull(img.ms)"
|
||||
placeholder="请输入描述信息"></van-field>
|
||||
</van-col>
|
||||
|
||||
</van-row>
|
||||
|
||||
<van-button
|
||||
native-type="button"
|
||||
@click="fd[i].imgList.splice(idx,1)"
|
||||
@click="imgDelete(idx,i,img.filepath)"
|
||||
slot="right"
|
||||
square
|
||||
text="删除"
|
||||
@@ -403,23 +413,17 @@
|
||||
<i class="van-icon van-icon-description van-uploader__file-icon">
|
||||
<!----></i>
|
||||
<div class="van-uploader__file-name van-ellipsis">
|
||||
{{video.file.name}}
|
||||
{{video.filename ? video.filename : video.file.name }}
|
||||
</div>
|
||||
</template>
|
||||
</van-image>
|
||||
</van-col>
|
||||
<van-col :span="18">
|
||||
<van-field style="width: 100%;padding-right: 0;" autosize v-model="video.ms"
|
||||
type="textarea" rows="2"
|
||||
maxlength="50"
|
||||
:show-word-limit="!isNull(video.ms)"
|
||||
placeholder="请输入描述信息"></van-field>
|
||||
</van-col>
|
||||
|
||||
</van-row>
|
||||
|
||||
<van-button
|
||||
native-type="button"
|
||||
@click="fd[i].videoList.splice(idx,1)"
|
||||
@click="videoDelete(idx,i,video.filepath)"
|
||||
slot="right"
|
||||
square
|
||||
text="删除"
|
||||
@@ -505,6 +509,7 @@
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
readytodelfile: [],
|
||||
leftArrow: false,
|
||||
zngxArr: ['父亲', '母亲', '第三代'],
|
||||
boxData: {},
|
||||
@@ -536,6 +541,14 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imgDelete(idx, i, filepath) {
|
||||
this.fd[i].imgList.splice(idx, 1)
|
||||
this.readytodelfile.push(filepath);
|
||||
},
|
||||
videoDelete(idx, i, filepath) {
|
||||
this.fd[i].videoList.splice(idx, 1)
|
||||
this.readytodelfile.push(filepath);
|
||||
},
|
||||
onConfirm: function (value) {
|
||||
this.formData.hdzplx2 = value.zname;
|
||||
this.showPicker = false;
|
||||
@@ -564,7 +577,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
doSubmit: function () {
|
||||
async doSubmit() {
|
||||
if (vue.isNull(vue.formData.userid)) {
|
||||
vue.$toast.fail("请正确填写您的工资号!")
|
||||
return
|
||||
@@ -576,94 +589,180 @@
|
||||
return
|
||||
}
|
||||
|
||||
vue.$dialog.confirm({
|
||||
const confirm = await vue.$dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '您当前选择的是“' + vue.boxData.lbs[i].lname + '”,是否确认上传?上传后您将不能对已上传的作品进行更改'
|
||||
}).then(function (value) {
|
||||
setTimeout(function () {
|
||||
vue.showMsg = true
|
||||
vue.showPlan = true
|
||||
vue.percent = 0
|
||||
vue.msg = ''
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
setTimeout(() => {
|
||||
this.showMsg = true
|
||||
this.showPlan = true
|
||||
this.percent = 0
|
||||
this.msg = ''
|
||||
|
||||
let formData1 = {}
|
||||
let formData2 = new FormData();
|
||||
if (!this.isNull(this.formData.id)) {
|
||||
this.$set(formData1, "id", getQueryVariable("zpid"))
|
||||
this.$set(formData1, "hdid", getQueryVariable("id"))
|
||||
|
||||
this.$set(formData1, "sbr", this.formData.userid)
|
||||
this.$set(formData1, "mobile", this.formData.mobile)
|
||||
this.$set(formData1, "hdlb", this.boxData.lbs[i].lid)
|
||||
this.$set(formData1, "znxm", this.formData.znxm)
|
||||
this.$set(formData1, "znnl", this.formData.znnl)
|
||||
this.$set(formData1, "znxb", this.formData.znxb)
|
||||
this.$set(formData1, "zngx", this.formData.zngx)
|
||||
|
||||
this.$set(formData1, "zplb", this.fd[i].zplb)
|
||||
this.$set(formData1, "zpzt", this.fd[i].zpzt)
|
||||
this.$set(formData1, "zpms", this.fd[i].zpms)
|
||||
this.$set(formData1, "sbsj", moment().format('YYYY-MM-DD HH:mm:ss'))
|
||||
|
||||
|
||||
var formdata = new FormData();
|
||||
formdata.append("hdid", getQueryVariable("id"))
|
||||
} else {
|
||||
formData2.append("hdid", getQueryVariable("id"))
|
||||
|
||||
formdata.append("sbr", vue.isNull(vue.formData.userid) ? '' : vue.formData.userid);
|
||||
formdata.append("mobile", vue.isNull(vue.formData.mobile) ? '' : vue.formData.mobile);
|
||||
formdata.append("hdlb", vue.isNull(vue.boxData.lbs[i].lid) ? '' : vue.boxData.lbs[i].lid)
|
||||
formData2.append("sbr", this.isNull(this.formData.userid) ? '' : this.formData.userid);
|
||||
formData2.append("mobile", vue.isNull(vue.formData.mobile) ? '' : this.formData.mobile);
|
||||
formData2.append("hdlb", vue.isNull(vue.boxData.lbs[i].lid) ? '' : this.boxData.lbs[i].lid)
|
||||
|
||||
formdata.append("znxm", vue.isNull(vue.formData.znxm) ? '' : vue.formData.znxm);
|
||||
formdata.append("znnl", vue.isNull(vue.formData.znnl) ? '' : vue.formData.znnl);
|
||||
formdata.append("znxb", vue.isNull(vue.formData.znxb) ? '' : vue.formData.znxb);
|
||||
formdata.append("zngx", vue.isNull(vue.formData.zngx) ? '' : vue.formData.zngx);
|
||||
formData2.append("znxm", this.isNull(this.formData.znxm) ? '' : this.formData.znxm);
|
||||
formData2.append("znnl", this.isNull(this.formData.znnl) ? '' : this.formData.znnl);
|
||||
formData2.append("znxb", this.isNull(this.formData.znxb) ? '' : this.formData.znxb);
|
||||
formData2.append("zngx", this.isNull(this.formData.zngx) ? '' : this.formData.zngx);
|
||||
|
||||
formdata.append("zplb", vue.isNull(vue.fd[i].zplb) ? '' : vue.fd[i].zplb);
|
||||
formdata.append("zpzt", vue.isNull(vue.fd[i].zpzt) ? '' : vue.fd[i].zpzt);
|
||||
formdata.append("zpms", vue.isNull(vue.fd[i].zpms) ? '' : vue.fd[i].zpms);
|
||||
formdata.append("sbsj", moment().format('YYYY-MM-DD HH:mm:ss'));
|
||||
formData2.append("zplb", this.isNull(this.fd[i].zplb) ? '' : this.fd[i].zplb);
|
||||
formData2.append("zpzt", this.isNull(this.fd[i].zpzt) ? '' : this.fd[i].zpzt);
|
||||
formData2.append("zpms", this.isNull(this.fd[i].zpms) ? '' : this.fd[i].zpms);
|
||||
formData2.append("sbsj", moment().format('YYYY-MM-DD HH:mm:ss'));
|
||||
|
||||
vue.fd[i].imgList.forEach(function (val) {
|
||||
formdata.append("files", val.file, vue.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
|
||||
});
|
||||
vue.fd[i].videoList.forEach(function (val) {
|
||||
formdata.append("files", val.file, vue.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "/childrenActivities/doSubmit",
|
||||
type: "post",
|
||||
data: formdata,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
xhr: xhrOnProgress(function (e) {
|
||||
if (e.total == 0) {
|
||||
vue.percent = 0
|
||||
} else {
|
||||
vue.percent = ((e.loaded / e.total) * 100).toFixed(0);//文件上传百分比
|
||||
}
|
||||
|
||||
}),
|
||||
success: function (data) {
|
||||
if (data.code === 0) {
|
||||
|
||||
vue.formData.znxm = ''
|
||||
vue.formData.znnl = ''
|
||||
vue.formData.znxb = ''
|
||||
vue.formData.zngx = ''
|
||||
|
||||
vue.fd[i].zplb = ''
|
||||
vue.fd[i].zplb_name = ''
|
||||
vue.fd[i].zpzt = ''
|
||||
vue.fd[i].zpms = ''
|
||||
vue.fd[i].sbsj = ''
|
||||
vue.fd[i].imgList = []
|
||||
vue.fd[i].videoList = []
|
||||
vue.fd[i].audioList = []
|
||||
Cookies.remove('ca_formData');
|
||||
|
||||
|
||||
vue.msg = '<p class="weui-msg__desc">我们已收到您的作品!<br/>非常感谢您的支持!</p>'
|
||||
vue.flag = true
|
||||
} else {
|
||||
|
||||
vue.msg = '<p class="weui-msg__desc">非常抱歉对您造成的不便!<br/>请联系系统管理员进行修复!</p>'
|
||||
vue.flag = false
|
||||
}
|
||||
vue.showPlan = false
|
||||
},
|
||||
error: function (data) {
|
||||
vue.msg = '<p class="weui-msg__desc">非常抱歉对您造成的不便!<br/>请联系系统管理员进行修复!</p>'
|
||||
vue.flag = false
|
||||
vue.showPlan = false
|
||||
vue.fd[i].imgList.forEach(function (val) {
|
||||
formData2.append("files", val.file, vue.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
|
||||
});
|
||||
vue.fd[i].videoList.forEach(function (val) {
|
||||
formData2.append("files", val.file, vue.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}, 500)
|
||||
}).catch(function (reason) {
|
||||
if (!this.isNull(this.formData.id)) {
|
||||
formData2.append("data", JSON.stringify(formData1));
|
||||
formData2.append("readytodelfile", JSON.stringify(this.readytodelfile));
|
||||
this.fd[i].imgList.forEach(val => {
|
||||
formData2.append("file", val.file);
|
||||
});
|
||||
this.fd[i].videoList.forEach(val => {
|
||||
formData2.append("file", val.file);
|
||||
});
|
||||
$.ajax({
|
||||
url: "/platform/hd/childhd/sczp/doEdit",
|
||||
type: "post",
|
||||
data: formData2,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
xhr: xhrOnProgress(function (e) {
|
||||
if (e.total == 0) {
|
||||
vue.percent = 0
|
||||
} else {
|
||||
vue.percent = ((e.loaded / e.total) * 100).toFixed(0);//文件上传百分比
|
||||
}
|
||||
|
||||
}),
|
||||
success: function (data) {
|
||||
if (data.code === 0) {
|
||||
|
||||
vue.formData.znxm = ''
|
||||
vue.formData.znnl = ''
|
||||
vue.formData.znxb = ''
|
||||
vue.formData.zngx = ''
|
||||
|
||||
vue.fd[i].zplb = ''
|
||||
vue.fd[i].zplb_name = ''
|
||||
vue.fd[i].zpzt = ''
|
||||
vue.fd[i].zpms = ''
|
||||
vue.fd[i].sbsj = ''
|
||||
vue.fd[i].imgList = []
|
||||
vue.fd[i].videoList = []
|
||||
vue.fd[i].audioList = []
|
||||
Cookies.remove('ca_formData');
|
||||
|
||||
|
||||
vue.msg = '<p class="weui-msg__desc">我们已收到您的作品!<br/>非常感谢您的支持!</p>'
|
||||
vue.flag = true
|
||||
} else {
|
||||
|
||||
vue.msg = '<p class="weui-msg__desc">非常抱歉对您造成的不便!<br/>请联系系统管理员进行修复!</p>'
|
||||
vue.flag = false
|
||||
}
|
||||
vue.showPlan = false
|
||||
window.history.back()
|
||||
},
|
||||
error: function (data) {
|
||||
vue.msg = '<p class="weui-msg__desc">非常抱歉对您造成的不便!<br/>请联系系统管理员进行修复!</p>'
|
||||
vue.flag = false
|
||||
vue.showPlan = false
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
$.ajax({
|
||||
url: "/childrenActivities/doSubmit",
|
||||
type: "post",
|
||||
data: formData2,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
xhr: xhrOnProgress(function (e) {
|
||||
if (e.total == 0) {
|
||||
vue.percent = 0
|
||||
} else {
|
||||
vue.percent = ((e.loaded / e.total) * 100).toFixed(0);//文件上传百分比
|
||||
}
|
||||
|
||||
}),
|
||||
success: function (data) {
|
||||
if (data.code === 0) {
|
||||
|
||||
vue.formData.znxm = ''
|
||||
vue.formData.znnl = ''
|
||||
vue.formData.znxb = ''
|
||||
vue.formData.zngx = ''
|
||||
|
||||
vue.fd[i].zplb = ''
|
||||
vue.fd[i].zplb_name = ''
|
||||
vue.fd[i].zpzt = ''
|
||||
vue.fd[i].zpms = ''
|
||||
vue.fd[i].sbsj = ''
|
||||
vue.fd[i].imgList = []
|
||||
vue.fd[i].videoList = []
|
||||
vue.fd[i].audioList = []
|
||||
Cookies.remove('ca_formData');
|
||||
|
||||
|
||||
vue.msg = '<p class="weui-msg__desc">我们已收到您的作品!<br/>非常感谢您的支持!</p>'
|
||||
vue.flag = true
|
||||
} else {
|
||||
|
||||
vue.msg = '<p class="weui-msg__desc">非常抱歉对您造成的不便!<br/>请联系系统管理员进行修复!</p>'
|
||||
vue.flag = false
|
||||
}
|
||||
vue.showPlan = false
|
||||
},
|
||||
error: function (data) {
|
||||
vue.msg = '<p class="weui-msg__desc">非常抱歉对您造成的不便!<br/>请联系系统管理员进行修复!</p>'
|
||||
vue.flag = false
|
||||
vue.showPlan = false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
,
|
||||
500
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
// 返回布尔值
|
||||
beforeReadImg: function (file) {
|
||||
@@ -684,11 +783,14 @@
|
||||
return true;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
GetQueryString("client") == "mobile" ? this.leftArrow = true : this.leftArrow = false
|
||||
async created() {
|
||||
const loginname = "${@shiro.getPrincipalProperty('loginname')}"
|
||||
this.$set(this.formData, "loginname", loginname)
|
||||
this.doInput(loginname)
|
||||
const zpid = GetQueryString("zpid")
|
||||
GetQueryString("client") == "mobile" ? this.leftArrow = true : this.leftArrow = false
|
||||
this.$set(this.formData, "loginname", loginname)
|
||||
this.doInput(loginname)
|
||||
var self = this
|
||||
if (window.innerWidth > 800) {
|
||||
self.$notify({type: 'warning', message: '当前窗口宽度过大!部分区域显示会出现大小偏差'});
|
||||
@@ -725,15 +827,36 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (Cookies.get("ca_formData") != undefined) {
|
||||
self.formData = JSON.parse(Cookies.get("ca_formData"))
|
||||
Cookies.remove('ca_formData');
|
||||
if (!this.isNull(zpid)) {
|
||||
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id: zpid})
|
||||
const refs = await $.get("/mobile/cahd/list/findOne", {id: zpid})
|
||||
this.$set(this.formData, "id", refs[0].id)
|
||||
this.$set(this.formData, "hdid", refs[0].id)
|
||||
this.$set(this.formData, "userid", refs[0].sbr)
|
||||
this.$set(this.formData, "mobile", refs[0].mobile)
|
||||
this.$set(this.boxData.lbs[this.formData.hdlb_i], "lid", refs[0].hdlb)
|
||||
this.$set(this.formData, "znxm", refs[0].znxm)
|
||||
this.$set(this.formData, "znnl", refs[0].znnl)
|
||||
this.$set(this.formData, "znxb", refs[0].znxb)
|
||||
this.$set(this.formData, "zngx", refs[0].zngx)
|
||||
this.$set(this.fd[this.formData.hdlb_i], "zplb", refs[0].zplb)
|
||||
this.$set(this.fd[this.formData.hdlb_i], "zpzt", refs[0].zpzt)
|
||||
this.$set(this.fd[this.formData.hdlb_i], "zpms", refs[0].zpms)
|
||||
this.$set(this.fd[this.formData.hdlb_i], "zplb_name", refs[0].zname)
|
||||
data.forEach((v, i) => {
|
||||
v.filename = v.filename
|
||||
v.fjurl = v.filepath
|
||||
v.url = FILE_DOMAIN + v.filepath
|
||||
v.content = FILE_DOMAIN + v.filepath
|
||||
const filetype = v.filename.substring(v.filename.lastIndexOf(".") + 1)
|
||||
const aa = this.audiotype.concat(this.videotype)
|
||||
if (this.imgtype.indexOf(filetype) > -1) {
|
||||
this.fd[this.formData.hdlb_i].imgList.push(v)
|
||||
} else if (aa.indexOf(filetype) > -1) {
|
||||
this.fd[this.formData.hdlb_i].videoList.push(v);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
setInterval(function () {
|
||||
Cookies.set("ca_formData", JSON.stringify(self.formData))
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.staticfile.org/vue/2.6.9/vue.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/vant/2.12.5/vant.js"></script>
|
||||
<script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.js"></script>
|
||||
<script src="https://cdn.staticfile.org/vant/2.12.5/vant.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/jquery/1.11.1/jquery.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
|
||||
</head>
|
||||
@@ -93,13 +93,13 @@
|
||||
<body>
|
||||
<div v-clock id="app">
|
||||
<div>
|
||||
<van-swipe v-if="boxData.fileList.length>0" class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item v-for="url in boxData.fileList">
|
||||
<van-swipe v-if="boxData.files&&boxData.files.length>0" class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item v-for="url in boxData.files">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
:src="url"
|
||||
:src="'${AppFileDomain!}/fileStreamPreview?id='+url.id"
|
||||
></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -310,148 +310,148 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<!-- <template #view>
|
||||
<table style="width: 100%">
|
||||
<tr style="border: 1px solid rgb(220, 220, 220);">
|
||||
<td colspan="4"
|
||||
style="text-align: center;padding: 10px;background-color: #0e78c5;color: white;font-size: 18px;font-weight:500">
|
||||
作品信息
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">姓名</td>
|
||||
<td class="tpb">{{viewData.sbrname}}</td>
|
||||
<td class="tpa">工资号</td>
|
||||
<td class="tpb">{{viewData.loginname}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">单位</td>
|
||||
<td class="tpb">{{viewData.dwname}}</td>
|
||||
<td class="tpa">工会</td>
|
||||
<td class="tpb">{{viewData.ghname}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">子女姓名</td>
|
||||
<td class="tpb">{{viewData.znxm}}</td>
|
||||
<td class="tpa">子女年龄</td>
|
||||
<td class="tpb">{{viewData.znnl}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">子女性别</td>
|
||||
<td class="tpb">{{viewData.znxb}}</td>
|
||||
<td class="tpa">关系</td>
|
||||
<td class="tpb">{{viewData.zngx}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">活动类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{viewData.hdlbname}}</span>
|
||||
</td>
|
||||
<td class="tpa">作品类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{viewData.zplbname}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品主题</td>
|
||||
<td class="tpb" colspan="3">{{viewData.zpzt}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品描述</td>
|
||||
<td class="tpb" colspan="3">{{viewData.zpms}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品信息</td>
|
||||
<td class="tpb" colspan="3">
|
||||
<el-row>
|
||||
<el-divider>照片 <i class="el-icon-picture-outline"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="img2List.length>0">
|
||||
<div v-for="item in img2List"
|
||||
style="display: inline-block;width: 100px;margin-right:10px">
|
||||
<el-image lazy :z-index="999999999"
|
||||
style="width: 100px;height: 100px;"
|
||||
:src="item.url"
|
||||
:preview-src-list="prevImgList">
|
||||
</el-image>
|
||||
</div>
|
||||
<!-- <template #view>
|
||||
<table style="width: 100%">
|
||||
<tr style="border: 1px solid rgb(220, 220, 220);">
|
||||
<td colspan="4"
|
||||
style="text-align: center;padding: 10px;background-color: #0e78c5;color: white;font-size: 18px;font-weight:500">
|
||||
作品信息
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">姓名</td>
|
||||
<td class="tpb">{{viewData.sbrname}}</td>
|
||||
<td class="tpa">工资号</td>
|
||||
<td class="tpb">{{viewData.loginname}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">单位</td>
|
||||
<td class="tpb">{{viewData.dwname}}</td>
|
||||
<td class="tpa">工会</td>
|
||||
<td class="tpb">{{viewData.ghname}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">子女姓名</td>
|
||||
<td class="tpb">{{viewData.znxm}}</td>
|
||||
<td class="tpa">子女年龄</td>
|
||||
<td class="tpb">{{viewData.znnl}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">子女性别</td>
|
||||
<td class="tpb">{{viewData.znxb}}</td>
|
||||
<td class="tpa">关系</td>
|
||||
<td class="tpb">{{viewData.zngx}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">活动类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{viewData.hdlbname}}</span>
|
||||
</td>
|
||||
<td class="tpa">作品类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{viewData.zplbname}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品主题</td>
|
||||
<td class="tpb" colspan="3">{{viewData.zpzt}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品描述</td>
|
||||
<td class="tpb" colspan="3">{{viewData.zpms}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品信息</td>
|
||||
<td class="tpb" colspan="3">
|
||||
<el-row>
|
||||
<el-divider>照片 <i class="el-icon-picture-outline"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="img2List.length>0">
|
||||
<div v-for="item in img2List"
|
||||
style="display: inline-block;width: 100px;margin-right:10px">
|
||||
<el-image lazy :z-index="999999999"
|
||||
style="width: 100px;height: 100px;"
|
||||
:src="item.url"
|
||||
:preview-src-list="prevImgList">
|
||||
</el-image>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有照片。
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有照片。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>视频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="videoList.length>0">
|
||||
<div v-for="item in videoList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab">
|
||||
<div class="video-toggle-i"
|
||||
@click="playVideo('${AppFileDomain!}'+item.filepath)">
|
||||
<i class="el-icon-video-camera-solid"></i>
|
||||
<i class="el-icon-video-play"></i>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-divider>视频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="videoList.length>0">
|
||||
<div v-for="item in videoList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab">
|
||||
<div class="video-toggle-i"
|
||||
@click="playVideo('${AppFileDomain!}'+item.filepath)">
|
||||
<i class="el-icon-video-camera-solid"></i>
|
||||
<i class="el-icon-video-play"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="dd3s.download(item.filepath,item.filename)">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="dd3s.download(item.filepath,item.filename)">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有视频。
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有视频。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>音频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="audioList.length>0">
|
||||
<div v-for="item in audioList">
|
||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
||||
<source :src="'${AppFileDomain!}'+item.filepath"/>
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有音频。
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-divider>音频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="audioList.length>0">
|
||||
<div v-for="item in audioList">
|
||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
||||
<source :src="'${AppFileDomain!}'+item.filepath"/>
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有音频。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>文档 <i class="el-icon-document-copy"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="docList.length>0">
|
||||
<div v-for="item in docList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab" style="background-color: #f6f6f6">
|
||||
<div class="video-toggle-i" @click="dd3s.preview(item.filepath,item.id)">
|
||||
<i class="el-icon-document"></i>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-divider>文档 <i class="el-icon-document-copy"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="docList.length>0">
|
||||
<div v-for="item in docList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab" style="background-color: #f6f6f6">
|
||||
<div class="video-toggle-i" @click="dd3s.preview(item.filepath,item.id)">
|
||||
<i class="el-icon-document"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="dd3s.download(item.filepath,item.filename)">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有文档。
|
||||
</div>
|
||||
</el-row>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>-->
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="dd3s.download(item.filepath,item.filename)">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有文档。
|
||||
</div>
|
||||
</el-row>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>-->
|
||||
<template #view>
|
||||
|
||||
<el-form label-suffix=":" label-position="left" style="padding: 40px" label-width="110px">
|
||||
@@ -522,7 +522,7 @@ layout("/layouts/platform.html"){
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab">
|
||||
<div class="video-toggle-i"
|
||||
@click="playVideo('${AppFileDomain!}'+item.filepath)">
|
||||
@click="playVideo(item.url)">
|
||||
<i class="el-icon-video-camera-solid"></i>
|
||||
<i class="el-icon-video-play"></i>
|
||||
</div>
|
||||
@@ -550,7 +550,7 @@ layout("/layouts/platform.html"){
|
||||
<div v-for="item in audioList">
|
||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
||||
<!-- <source :src="https://cdn.moefe.org/music/mp3/thing.mp3" />-->
|
||||
<source :src="'${AppFileDomain!}'+item.filepath"/>
|
||||
<source :src="item.url"/>
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
@@ -602,7 +602,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.vm = new Vue({
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
@@ -706,12 +706,12 @@ layout("/layouts/platform.html"){
|
||||
data.data.forEach(val => {
|
||||
val.fjname = val.filename
|
||||
val.fjurl = val.filepath
|
||||
val.url = '${AppFileDomain!}' + val.filepath
|
||||
val.url = FILE_DOMAIN+'/fileStreamPreview?id='+val.id
|
||||
let filetype = val.fjname.substring(val.fjname.lastIndexOf('.') + 1, val.fjname.length).toLowerCase();
|
||||
if (this.videotype.indexOf(filetype) > -1) {
|
||||
this.videoList.push(val);
|
||||
} else if (this.imgtype.indexOf(filetype) > -1) {
|
||||
this.prevImgList.push('${AppFileDomain!}' + val.filepath)
|
||||
this.prevImgList.push(FILE_DOMAIN+'/fileStreamPreview?id='+val.id)
|
||||
this.img2List.push(val);
|
||||
} else if (this.doctype.indexOf(filetype) > -1) {
|
||||
this.docList.push(val);
|
||||
|
||||
@@ -178,116 +178,133 @@ layout("/layouts/platform.html"){
|
||||
.ViewDialogClass .el-form-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script src="${base!}/assets/platform/js/jquery.qrcode.min.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
placeholder="按年度查询"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="按年度查询">
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.hdname" clearable>
|
||||
<el-input clearable placeholder="请输入内容" v-model="pageForm.hdname">
|
||||
<template slot="prepend">活动主题</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-button icon="el-icon-search" @click="doSearch"
|
||||
style="background-color:#409eff;color: white;"></el-button>
|
||||
</div>
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button size="medium" @click="openAdd"><i class="ti-plus"></i> 创建活动</el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-card class="mt20" shadow="never">
|
||||
<vi-title2 title="活动列表">
|
||||
<template #func>
|
||||
<el-button @click="openAdd" size="small" type="primary"><i
|
||||
class="ti-plus"></i>
|
||||
创建活动
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="hdname"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="主题"
|
||||
header-align="center"
|
||||
show-overflow-tooltip="true"
|
||||
align="center">
|
||||
prop="hdname"
|
||||
show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cjr"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="创建人"
|
||||
header-align="center"
|
||||
align="center">
|
||||
prop="cjr">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="hdcjsj"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="创建时间"
|
||||
header-align="center"
|
||||
align="center">
|
||||
prop="hdcjsj">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="time"
|
||||
label="活动时间"
|
||||
align="center"
|
||||
header-align="center"
|
||||
width="300px"
|
||||
align="center">
|
||||
label="活动时间"
|
||||
prop="time"
|
||||
width="300px">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.hdkssj}} -- {{scope.row.hdjssj}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="hdflag"
|
||||
label="状态"
|
||||
align="center"
|
||||
header-align="center"
|
||||
align="center">
|
||||
label="状态"
|
||||
prop="hdflag">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="!scope.row.hdflag"
|
||||
class="fa fa-circle text-danger ml5"></i>
|
||||
<i v-if="scope.row.hdflag"
|
||||
class="fa fa-circle text-success ml5"></i>
|
||||
<i class="fa fa-circle text-danger ml5"
|
||||
v-if="!scope.row.hdflag"></i>
|
||||
<i class="fa fa-circle text-success ml5"
|
||||
v-if="scope.row.hdflag"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="300"
|
||||
align="center"
|
||||
header-align="center"
|
||||
align="center">
|
||||
label="操作"
|
||||
width="380">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.hdflag==false" type="success" size="mini"
|
||||
@click="changeStatus(scope.row.hdid,true)">开启
|
||||
|
||||
<el-button @click="changeStatus(scope.row.hdid,true)" size="mini"
|
||||
type="success"
|
||||
v-if="scope.row.hdflag==false">开启
|
||||
</el-button>
|
||||
<el-button v-else type="info" size="mini" @click="changeStatus(scope.row.hdid,false)">关闭
|
||||
<el-button @click="changeStatus(scope.row.hdid,false)" size="mini"
|
||||
type="info"
|
||||
v-else>关闭
|
||||
</el-button>
|
||||
<el-button @click="sendMsg(scope.row)" size="mini" type="primary">通知
|
||||
</el-button>
|
||||
<el-button @click="openCode(scope.row.hdid)" size="mini" type="primary">
|
||||
二维码
|
||||
</el-button>
|
||||
<el-button @click="openEdit(scope.row.hdid)" size="mini" type="primary">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="doDelete(scope.row.hdid)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="openCode(scope.row.hdid)">二维码</el-button>
|
||||
<el-button type="primary" size="mini" @click="openEdit(scope.row.hdid)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" @click="doDelete(scope.row.hdid)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -297,157 +314,220 @@ layout("/layouts/platform.html"){
|
||||
<el-col :span="9" style="position: relative;text-align: center">
|
||||
<div class="iphonex_box">
|
||||
<div class="box_title">{{formData.hdname}}</div>
|
||||
<iframe class="new_frame" id="myIframe" scrolling="auto" frameborder="none;"
|
||||
<iframe class="new_frame" frameborder="none;" id="myIframe" scrolling="auto"
|
||||
src="/platform/hd/wmhdMange/mobileBox">
|
||||
|
||||
</iframe>
|
||||
</div>
|
||||
<el-button type="info" style="margin-top: 10px" icon="el-icon-refresh" @click="refreshBox"
|
||||
round>刷新
|
||||
<el-button @click="refreshBox" icon="el-icon-refresh" round
|
||||
style="margin-top: 10px"
|
||||
type="info">刷新
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="14" offset="1">
|
||||
<el-form :model="formData" style="padding-top: 20px;padding-right: 10px" ref="addForm"
|
||||
label-position="left" :rules="formRules" size="medium"
|
||||
label-width="90px">
|
||||
<el-form-item prop="hdname" label="活动主题">
|
||||
<el-form :model="formData" :rules="formRules"
|
||||
label-position="left"
|
||||
label-width="130px" ref="addForm" size="medium"
|
||||
style="padding-top: 20px;padding-right: 10px">
|
||||
<el-form-item label="活动主题" prop="hdname">
|
||||
<el-input placeholder="请输入活动主题" v-model="formData.hdname"></el-input>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="time" label="活动时间">
|
||||
<el-form-item label="活动时间" prop="time">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.time"
|
||||
type="datetimerange"
|
||||
start-placeholder="开始时间"
|
||||
:default-time="['00:00:00']"
|
||||
end-placeholder="结束时间"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00']">
|
||||
start-placeholder="开始时间"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.time"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="点赞时间" prop="time2">
|
||||
<el-date-picker
|
||||
:default-time="['00:00:00']"
|
||||
end-placeholder="结束时间"
|
||||
start-placeholder="开始时间"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.time2"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-->
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="每人每日点赞次数" prop="dzNum">
|
||||
<el-input-number min="0" placeholder="请输入每人每日点赞次数" style="width: 100%"
|
||||
v-model="formData.dzNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
</el-row>
|
||||
<el-form-item prop="hdlb" label="活动类别">
|
||||
<el-row v-for="lb,idx in formData.lbs" style="padding-bottom: 5px">
|
||||
<el-form-item label="活动类别" prop="hdlb">
|
||||
<el-row style="padding-bottom: 5px" v-for="lb,idx in formData.lbs">
|
||||
<el-col :span="20">
|
||||
<el-input placeholder="请输入名称" v-model="lb.lname"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="2" style="text-align: center">
|
||||
<el-button type="warning" icon="el-icon-plus" circle
|
||||
@click="formData.lbs.splice(idx+1,0,{zplbs:[{}]})"></el-button>
|
||||
<el-button @click="addZp(idx)" circle icon="el-icon-plus"
|
||||
type="warning"></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" style="text-align: center">
|
||||
<el-button type="danger" :disabled="idx==0" icon="el-icon-delete" circle
|
||||
@click="formData.lbs.splice(idx,1)"></el-button>
|
||||
<el-button :disabled="idx==0"
|
||||
@click="formData.lbs.splice(idx,1)"
|
||||
circle icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</el-col>
|
||||
<el-col style="padding: 5px 0">
|
||||
<el-row v-for="zplb,idx2 in lb.zplbs" style="padding-bottom: 5px">
|
||||
<el-col :span="20">
|
||||
<el-col :span="4"><span v-if="idx2==0"
|
||||
class="el-form-item__label">作品类别</span><span
|
||||
<el-row style="padding-bottom: 5px"
|
||||
v-for="zplb,idx2 in lb.zplbs">
|
||||
<el-col :span="18">
|
||||
<el-col :span="4"><span class="el-form-item__label"
|
||||
v-if="idx2==0">作品类别</span><span
|
||||
v-else> </span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input placeholder="请输入名称" v-model="zplb.zname"></el-input>
|
||||
<el-input placeholder="请输入名称"
|
||||
v-model="zplb.zname"></el-input>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="2" style="text-align: center">
|
||||
<el-button type="warning" icon="el-icon-plus" circle
|
||||
@click="lb.zplbs.splice(idx2+1,0,{})"></el-button>
|
||||
<el-button @click="openSetting(zplb)" circle
|
||||
icon="el-icon-s-tools"
|
||||
type="primary"></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" style="text-align: center">
|
||||
<el-button type="danger" icon="el-icon-delete"
|
||||
circle
|
||||
@click="lb.zplbs.splice(idx2,1)"></el-button>
|
||||
<el-button @click="addZplb(lb, idx2)" circle
|
||||
icon="el-icon-plus"
|
||||
type="warning"></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" style="text-align: center">
|
||||
<el-button @click="lb.zplbs.splice(idx2,1)" circle
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdjs" label="活动介绍">
|
||||
<el-form-item label="面向对象" prop="joinCnd">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select clearable
|
||||
filterable placeholder="请选择参加人员范围"
|
||||
style="width: 99%"
|
||||
v-model="formData.activityGroupId">
|
||||
<el-option :label="item.groupName"
|
||||
:value="item.groupId"
|
||||
v-for="item in activityGroupList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="是否推送移动端" prop="isPushHome">
|
||||
<el-radio-group size="medium" v-model="formData.isPushHome">
|
||||
<el-radio-button :label="0">不推送</el-radio-button>
|
||||
<el-radio-button :label="1">推送列表</el-radio-button>
|
||||
<el-radio-button :label="2">推送大图</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用积分系统" prop="isIntegral">
|
||||
<el-radio-group size="medium" v-model="formData.isIntegral">
|
||||
<el-radio-button :label="false">不启用</el-radio-button>
|
||||
<el-radio-button :label="true">启用</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>-->
|
||||
|
||||
|
||||
<el-form-item label="活动介绍" prop="hdjs">
|
||||
<el-collapse>
|
||||
<el-collapse-item>
|
||||
<template slot="title">
|
||||
点击展开 <i class="header-icon el-icon-thumb" style="margin-left: 5px"></i>
|
||||
点击展开 <i class="header-icon el-icon-thumb"
|
||||
style="margin-left: 5px"></i>
|
||||
</template>
|
||||
<div id="hdjsEditor"></div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdcjry" label="参加人员">
|
||||
<el-form-item label="参加人员" prop="hdcjry">
|
||||
<el-collapse>
|
||||
<el-collapse-item>
|
||||
<template slot="title">
|
||||
点击展开 <i class="header-icon el-icon-thumb" style="margin-left: 5px"></i>
|
||||
点击展开 <i class="header-icon el-icon-thumb"
|
||||
style="margin-left: 5px"></i>
|
||||
</template>
|
||||
<div id="cjryEditor"></div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdjlfs" label="奖励方式">
|
||||
<el-form-item label="奖励方式" prop="hdjlfs">
|
||||
<el-collapse>
|
||||
<el-collapse-item>
|
||||
<template slot="title">
|
||||
点击展开 <i class="header-icon el-icon-thumb" style="margin-left: 5px"></i>
|
||||
点击展开 <i class="header-icon el-icon-thumb"
|
||||
style="margin-left: 5px"></i>
|
||||
</template>
|
||||
<div id="jlfsEditor"></div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdnr" label="活动内容">
|
||||
<el-form-item label="活动内容" prop="hdnr">
|
||||
<el-collapse>
|
||||
<el-collapse-item>
|
||||
<template slot="title">
|
||||
点击展开 <i class="header-icon el-icon-thumb" style="margin-left: 5px"></i>
|
||||
点击展开 <i class="header-icon el-icon-thumb"
|
||||
style="margin-left: 5px"></i>
|
||||
</template>
|
||||
<div id="hdnrEditor"></div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdlxr" label="联系人">
|
||||
<el-form-item label="联系人" prop="hdlxr">
|
||||
<el-collapse>
|
||||
<el-collapse-item>
|
||||
<template slot="title">
|
||||
点击展开 <i class="header-icon el-icon-thumb" style="margin-left: 5px"></i>
|
||||
点击展开 <i class="header-icon el-icon-thumb"
|
||||
style="margin-left: 5px"></i>
|
||||
</template>
|
||||
<div id="lxrEditor"></div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdother" label="其他">
|
||||
<el-form-item label="其他" prop="hdother">
|
||||
<el-collapse>
|
||||
<el-collapse-item>
|
||||
<template slot="title">
|
||||
点击展开 <i class="header-icon el-icon-thumb" style="margin-left: 5px"></i>
|
||||
点击展开 <i class="header-icon el-icon-thumb"
|
||||
style="margin-left: 5px"></i>
|
||||
</template>
|
||||
<div id="otherEditor"></div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动封面">
|
||||
<!-- <el-upload-->
|
||||
<!-- accept="image/*"-->
|
||||
<!-- action="****"-->
|
||||
<!-- list-type="picture-card"-->
|
||||
<!-- :on-preview="handlePictureCardPreview"-->
|
||||
<!-- :on-remove="handleRemove"-->
|
||||
<!-- :on-change="handleChange"-->
|
||||
<!-- :auto-upload="false"-->
|
||||
<!-- limit="4"-->
|
||||
<!-- :file-list="fileList">-->
|
||||
<!-- <i class="el-icon-plus"></i>-->
|
||||
<!-- </el-upload>-->
|
||||
<file-upload :files.sync="formData.files"></file-upload>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="配色">
|
||||
<ul class="style_box old_stylebox clearfix" style="display: block;padding-left: 0;">
|
||||
<li class="style_every" v-for="color,idx in colorList" @click="colorChange(color)"
|
||||
:style="'background: '+color">
|
||||
<img src="https://www.qmwtp.com/assets/www/ActivityPc2/img/duihao.png"
|
||||
:style="'display: '+(formData.hdcolor==color?'block':'none')">
|
||||
<input type="radio" name="sex" checked="checked" value="1">
|
||||
<ul class="style_box old_stylebox clearfix"
|
||||
style="display: block;padding-left: 0;">
|
||||
<li :style="'background: '+color" @click="colorChange(color)"
|
||||
class="style_every"
|
||||
v-for="color,idx in colorList">
|
||||
<img :style="'display: '+(formData.hdcolor==color?'block':'none')"
|
||||
src="https://www.qmwtp.com/assets/www/ActivityPc2/img/duihao.png">
|
||||
<input checked="checked" name="sex" type="radio" value="1">
|
||||
</li>
|
||||
</ul>
|
||||
</el-form-item>
|
||||
@@ -457,104 +537,105 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="success" v-show="!formData.hdid" @click="save">保 存</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确 定</el-button>
|
||||
<!-- <el-button type="success" v-show="!formData.hdid" @click="doSubmit(false)">保 存
|
||||
</el-button>-->
|
||||
<el-button @click="doSubmit" type="primary">确 定</el-button>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
<img :src="dialogImageUrl" alt="" width="100%">
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="活动二维码"
|
||||
:visible.sync="codeDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="40%">
|
||||
<div style="width: 100%;">
|
||||
<div id="qrcode" style="width: 70%;left: 0;right: 0;margin: auto"></div>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="codeDialogVisible = false">关 闭</el-button>
|
||||
<el-button type="primary" @click="share">分 享</el-button>
|
||||
<el-button type="primary" onclick="dwn('活动二维码')">下 载</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
|
||||
<drawer-user-scope
|
||||
:group_id.sync="formData.activityGroupId"
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
></drawer-user-scope>
|
||||
|
||||
<send-msg :mobile_url="mobileUrl" :url="sendMsgUrl" ref="sendMsg"></send-msg>
|
||||
<open-qr-code :url="sendMsgUrl" ref="openQRCode"></open-qr-code>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="settingDialogVisible"
|
||||
title="更多设置"
|
||||
top="4%" width="40%">
|
||||
|
||||
<el-form :model="currentZplb" label-width="160px" size="small">
|
||||
<el-form-item label="作品介绍最多字数">
|
||||
<el-input-number :max="10000" :min="1" style="width: 100%"
|
||||
v-model="currentZplb.maxWordCount"></el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
<vi-title title="上传图片设置"></vi-title>
|
||||
|
||||
<el-form-item label="是否上传图片">
|
||||
<el-radio :label="true" border v-model="currentZplb.isUploadPhoto">上传</el-radio>
|
||||
<el-radio :label="false" border v-model="currentZplb.isUploadPhoto">不上传</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="currentZplb.isUploadPhoto === true">
|
||||
<el-form-item label="上传图片数量">
|
||||
<el-input-number :max="5" :min="1" style="width: 100%"
|
||||
v-model="currentZplb.photoNum"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传图片格式">
|
||||
<el-checkbox-group v-model="currentZplb.photoType">
|
||||
<el-checkbox border key="jpg" label="jpg">jpg</el-checkbox>
|
||||
<el-checkbox border key="png" label="png">png</el-checkbox>
|
||||
<el-checkbox border key="jpeg" label="jpeg">jpeg</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="每张图片大小">
|
||||
<el-input placeholder="请填写每张图片大小" type="number" v-model="currentZplb.photoSize">
|
||||
<template slot="append">Mb</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<vi-title title="上传音/视频、文档设置"></vi-title>
|
||||
|
||||
<el-form-item label="是否上传音/视频、文档">
|
||||
<el-radio :label="true" border v-model="currentZplb.isUploadOther">上传</el-radio>
|
||||
<el-radio :label="false" border v-model="currentZplb.isUploadOther">不上传</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="currentZplb.isUploadOther === true">
|
||||
<el-form-item label="文件上传数量">
|
||||
<el-input-number :max="5" :min="1" style="width: 100%"
|
||||
v-model="currentZplb.otherFileNum"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传文件格式">
|
||||
<el-checkbox-group v-model="currentZplb.otherType">
|
||||
<el-checkbox key="mp3" label="mp3">mp3</el-checkbox>
|
||||
<el-checkbox key="mp4" label="mp4">mp4</el-checkbox>
|
||||
<el-checkbox key="docx" label="docx">docx</el-checkbox>
|
||||
<el-checkbox key="xlsx" label="xlsx">xlsx</el-checkbox>
|
||||
<el-checkbox key="pdf" label="pdf">pdf</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="每个文件大小">
|
||||
<el-input placeholder="请填写每个文件大小" type="number" v-model="currentZplb.otherSize">
|
||||
<template slot="append">Mb</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="settingDialogVisible=false">取消</el-button>
|
||||
<el-button @click="doSetting" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
/*下载二维码*/
|
||||
function dwn(name) {
|
||||
var type = 'png';
|
||||
// var dataurl = $("canvas").get(0).toDataURL('image/png').replace("image/png", "image/octet-stream");
|
||||
// var filename = name + '_' + (new Date()).getTime() + '.' + type;
|
||||
// saveFile(dataurl, filename);
|
||||
alert(IEVersion())
|
||||
if (IEVersion() != -1) {
|
||||
var blob = $("canvas").get(0).msToBlob();
|
||||
window.navigator.msSaveBlob(blob, name + '_' + (new Date()).getTime() + '.' + type);
|
||||
} else {
|
||||
$('#download').attr({
|
||||
href: $("canvas").get(0).toDataURL('image/png').replace("image/png", "image/octet-stream"),
|
||||
download: name + '_' + (new Date()).getTime() + '.' + type
|
||||
}).get(0).click();
|
||||
}
|
||||
}
|
||||
|
||||
function IEVersion() {
|
||||
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
|
||||
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
|
||||
var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
|
||||
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
|
||||
if (isIE) {
|
||||
var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
|
||||
reIE.test(userAgent);
|
||||
var fIEVersion = parseFloat(RegExp["$1"]);
|
||||
if (fIEVersion == 7) {
|
||||
return 7;
|
||||
} else if (fIEVersion == 8) {
|
||||
return 8;
|
||||
} else if (fIEVersion == 9) {
|
||||
return 9;
|
||||
} else if (fIEVersion == 10) {
|
||||
return 10;
|
||||
} else {
|
||||
return 6;//IE版本<=7
|
||||
}
|
||||
} else if (isEdge) {
|
||||
return 'edge';//edge
|
||||
} else if (isIE11) {
|
||||
return 11; //IE11
|
||||
} else {
|
||||
return -1;//不是ie浏览器
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 在本地进行文件保存
|
||||
* @param {String} data 要保存到本地的图片数据
|
||||
* @param {String} filename 文件名
|
||||
*/
|
||||
var saveFile = function (data, filename) {
|
||||
var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
|
||||
save_link.href = data;
|
||||
save_link.download = filename;
|
||||
|
||||
var event = document.createEvent('MouseEvents');
|
||||
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
save_link.dispatchEvent(event);
|
||||
};
|
||||
|
||||
const HOST_URL = function () {
|
||||
return location.protocol + "//" + location.host;
|
||||
}();
|
||||
|
||||
const editor = {
|
||||
hdjsEditor: null,
|
||||
cjryEditor: null,
|
||||
@@ -585,6 +666,8 @@ layout("/layouts/platform.html"){
|
||||
callback()
|
||||
};
|
||||
return {
|
||||
currentZplb: {},
|
||||
settingDialogVisible: false,
|
||||
codeDialogVisible: false,
|
||||
selected: '',
|
||||
colorList: ['#081776', '#31cab1', '#e54242', '#ff8939', '#ffb712', '#1dc47b', '#4495f7', '#ff5e8b', '#5d6e7f'],
|
||||
@@ -606,15 +689,17 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
formData: {
|
||||
hdtype: 1,
|
||||
isPushHome: 0,
|
||||
isIntegral: false,
|
||||
},
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
dialogVisible: false,
|
||||
formRules: {
|
||||
hdname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
hdjs: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
//hdjs: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
hdcjry: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
hdjlfs: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
//hdjlfs: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
hdnr: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
hdlxr: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// hdother: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
@@ -628,12 +713,65 @@ layout("/layouts/platform.html"){
|
||||
return false
|
||||
},
|
||||
id: '',
|
||||
activityGroupList: [],
|
||||
userScopeDialog: false,
|
||||
sendMsgUrl: null,
|
||||
mobileUrl: null
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'condition': httpVueLoader('/components/plugins/ConditionStructure.vue?v=1.0.0'),
|
||||
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
|
||||
'send-msg': httpVueLoader('/components/plugins/SendMsgByGroupId.vue'),
|
||||
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
|
||||
},
|
||||
watch: {
|
||||
'formData.activityGroupId': {
|
||||
async handler(newVal, oldVal) {
|
||||
this.activityGroupList = await getActivityGroup()
|
||||
this.userScopeDialog = false
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
addZp(idx) {
|
||||
let item = {}
|
||||
this.initData(item)
|
||||
this.formData.lbs.splice(idx + 1, 0, {zplbs: [item]})
|
||||
},
|
||||
addZplb(lb, idx2) {
|
||||
let item = {}
|
||||
this.initData(item)
|
||||
lb.zplbs.splice(idx2 + 1, 0, item)
|
||||
},
|
||||
doSetting() {
|
||||
this.settingDialogVisible = false
|
||||
},
|
||||
openSetting(zplb) {
|
||||
this.currentZplb = zplb
|
||||
|
||||
this.settingDialogVisible = true
|
||||
},
|
||||
sendMsg(row) {
|
||||
const {hdname, hdid} = row
|
||||
this.mobileUrl = "/platform/staffActivities?client=mobile&id=" + hdid
|
||||
this.sendMsgUrl = "/platform/hd/jzghd/sczp"
|
||||
this.$refs.sendMsg.openDialog(row.activitygroupid, "教工作品征集")
|
||||
},
|
||||
openUserScope() {
|
||||
this.userScopeDialog = true
|
||||
},
|
||||
changeActivity(val) {
|
||||
if (val) {
|
||||
const group = this.activityGroupList.find(v => v.groupId === val)
|
||||
this.$set(this.formData, "activityGroupName", group.groupName)
|
||||
} else {
|
||||
this.$set(this.formData, "activityGroupName", "全部教职工")
|
||||
}
|
||||
},
|
||||
share() {
|
||||
const id = this.id
|
||||
$.get("/platform/hd/wmhdMange/findOne", {hdid: id}, function (data) {
|
||||
@@ -644,20 +782,7 @@ layout("/layouts/platform.html"){
|
||||
)
|
||||
},
|
||||
openCode(id) {
|
||||
var self = this
|
||||
self.id = id
|
||||
self.codeDialogVisible = true
|
||||
vue.$nextTick(function () {
|
||||
$("#qrcode").html("")
|
||||
$("#qrcode").qrcode({ //设置css
|
||||
render: "canvas", //二维码的生成方式
|
||||
width: $("#qrcode").width(), //生成二维码的宽度
|
||||
height: $("#qrcode").width(), //生成二维码的高度
|
||||
text: APP_DOMAIN + "/platform/staffActivities?id=" + id,
|
||||
correctLevel: 3 //容错级别,默认为2,最高为3,为了让用户扫码最快,容错级别应当设为最低
|
||||
});
|
||||
})
|
||||
console.log(APP_DOMAIN + "/platform/staffActivities?id=" + id)
|
||||
this.$refs.openQRCode.openCode("/platform/staffActivities?id=" + id)
|
||||
},
|
||||
doSubmit() {
|
||||
if (!this.formData.hdid) {
|
||||
@@ -667,7 +792,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
changeStatus(hdid, flag) {
|
||||
$.post(base + "/platform/hd/wmhdMange/changeStatus", {hdid: hdid, flag: flag}, function (data) {
|
||||
$.post(base + "/platform/hd/wmhdMange/changeStatus", {
|
||||
hdid: hdid,
|
||||
flag: flag
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
vue.$message({
|
||||
message: data.msg,
|
||||
@@ -749,7 +877,7 @@ layout("/layouts/platform.html"){
|
||||
});
|
||||
},
|
||||
async openEdit(id) {
|
||||
this.formData = {};
|
||||
this.formData = {}
|
||||
this.fileList = []
|
||||
this.delFiles = []
|
||||
|
||||
@@ -757,8 +885,16 @@ layout("/layouts/platform.html"){
|
||||
this.$refs["addForm"].resetFields();
|
||||
const data = await $.get("/platform/hd/wmhdMange/findOne", {hdid: id})
|
||||
if (data.code == 0) {
|
||||
if (data.data.dzkssj) {
|
||||
data.data.time2 = [data.data.dzkssj, data.data.dzjssj]
|
||||
}
|
||||
data.data.time = [data.data.hdkssj, data.data.hdjssj]
|
||||
this.formData = data.data
|
||||
this.formData.lbs.forEach(item => {
|
||||
item.zplbs.forEach(o => {
|
||||
this.initData(o)
|
||||
})
|
||||
})
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
E = window.wangEditor
|
||||
@@ -789,7 +925,10 @@ layout("/layouts/platform.html"){
|
||||
this.changeFormEditorData()
|
||||
this.formData.hdkssj = this.formData.time[0]
|
||||
this.formData.hdjssj = this.formData.time[1]
|
||||
|
||||
if (this.formData.time2 && this.formData.time2.length > 0) {
|
||||
this.formData.dzkssj = this.formData.time2[0]
|
||||
this.formData.dzjssj = this.formData.time2[1]
|
||||
}
|
||||
let loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在提交中,请稍后...',
|
||||
@@ -816,7 +955,10 @@ layout("/layouts/platform.html"){
|
||||
this.changeFormEditorData()
|
||||
this.formData.hdkssj = this.formData.time[0]
|
||||
this.formData.hdjssj = this.formData.time[1]
|
||||
|
||||
if (this.formData.time2 && this.formData.time2.length > 0) {
|
||||
this.formData.dzkssj = this.formData.time[0]
|
||||
this.formData.dzjssj = this.formData.time[1]
|
||||
}
|
||||
let loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在提交中,请稍后...',
|
||||
@@ -850,16 +992,21 @@ layout("/layouts/platform.html"){
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
hdcjsj: moment().format('YYYY-MM-DD'),
|
||||
lbs: [{zplbs: [{}]}],
|
||||
};
|
||||
}
|
||||
this.initData(this.formData.lbs[0].zplbs[0])
|
||||
}
|
||||
} else {
|
||||
this.formData = {
|
||||
hdtype: 1,
|
||||
dzNum: 0,
|
||||
isPushHome: 0,
|
||||
isIntegral: false,
|
||||
hdcolor: this.colorList[0],
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
hdcjsj: moment().format('YYYY-MM-DD'),
|
||||
lbs: [{zplbs: [{}]}],
|
||||
};
|
||||
}
|
||||
this.initData(this.formData.lbs[0].zplbs[0])
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
this.fileList = []
|
||||
@@ -888,6 +1035,18 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
initData(zplb) {
|
||||
this.$set(zplb, 'maxWordCount', zplb.maxWordCount ? zplb.maxWordCount : 100)
|
||||
this.$set(zplb, 'isUploadPhoto', zplb.isUploadPhoto ? zplb.isUploadPhoto : false)
|
||||
this.$set(zplb, 'photoType', zplb.photoType ? zplb.photoType : ['jpg'])
|
||||
this.$set(zplb, 'photoNum', zplb.photoNum ? zplb.photoNum : 1)
|
||||
this.$set(zplb, 'photoSize', zplb.photoSize ? zplb.photoSize : 2)
|
||||
|
||||
this.$set(zplb, 'isUploadOther', zplb.isUploadOther ? zplb.isUploadOther : false)
|
||||
this.$set(zplb, 'otherType', zplb.otherType ? zplb.otherType : ['mp4', 'docx'])
|
||||
this.$set(zplb, 'otherFileNum', zplb.otherFileNum ? zplb.otherFileNum : 1)
|
||||
this.$set(zplb, 'otherSize', zplb.otherSize ? zplb.otherSize : 2)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
@@ -930,7 +1089,8 @@ layout("/layouts/platform.html"){
|
||||
}, "json");
|
||||
},
|
||||
},
|
||||
created: function () {
|
||||
async created() {
|
||||
this.activityGroupList = await getActivityGroup()
|
||||
this.pageData();
|
||||
},
|
||||
mounted() {
|
||||
@@ -940,4 +1100,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -26,18 +26,21 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-select v-if="hasSuperAdminOrXghRole" placeholder="所属工会" v-model="pageForm.union"
|
||||
<el-col :span="6" v-if="hasSuperAdminOrXghRole">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.union"
|
||||
style="width: 200px;"
|
||||
clearable="true"
|
||||
filterable="true" @change="unionChange">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unit" style="width: 200px;" clearable="true"
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unit" style="width: 200px;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
@@ -45,50 +48,55 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-row type="flex" :gutter="20" class="mt20">
|
||||
<el-col :span="6">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch"
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 120px;"
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;"
|
||||
clearable>
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工资号" value="u.loginname"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</el-col>
|
||||
<el-col :span="12" class="text-right" style="white-space: nowrap;overflow: hidden">
|
||||
<el-button size="medium" @click="exportExcel(1)">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出获奖人员名单
|
||||
</el-button>
|
||||
<el-button size="medium" @click="exportExcel(2)" v-if="hasSuperAdminOrXghRole">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出分工会获奖信息
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<!-- <div class="btn-group tool-button ">-->
|
||||
<!-- <el-cascader placeholder="请选择活动主题"-->
|
||||
<!-- v-model="pageForm.hdids" :options="hdxxlist"-->
|
||||
<!-- @change="(v)=>{pageForm.hdid=clone(v).pop()}" clearable></el-cascader>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</el-card>
|
||||
<el-card class="mt20" shadow="never">
|
||||
<vi-title2 title="获奖列表">
|
||||
<template #func>
|
||||
<el-button size="medium" @click="exportExcel(1)" type="primary">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出获奖人员名单
|
||||
</el-button>
|
||||
<el-button size="medium" @click="exportExcel(2)" v-if="hasSuperAdminOrXghRole"
|
||||
type="primary">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出分工会获奖信息
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center" width="50">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center"
|
||||
width="50">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="username" label="姓名" header-align="center" align="center"
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="loginname" label="工资号" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center" show-overflow-tooltip
|
||||
<el-table-column prop="loginname" label="工号" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center" show-overflow-tooltip
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="hjcount" label="获奖次数" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
@@ -118,6 +126,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
hasSuperAdminOrXghRole: "${@shiro.hasAnyRoles('sysadmin','A06')}" === 'true' ? true : false,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + '',
|
||||
searchName: "u.username",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
@@ -221,4 +230,4 @@ layout("/layouts/platform.html"){
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<html lang="en" xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible">
|
||||
<!-- 在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
||||
name="viewport">
|
||||
<title></title>
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/vant/2.12.5/index.css">
|
||||
<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css">
|
||||
<link href="https://cdn.staticfile.org/vant/2.12.5/index.css" rel="stylesheet">
|
||||
<link href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css" rel="stylesheet">
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.staticfile.org/vue/2.6.9/vue.min.js"></script>
|
||||
@@ -102,32 +102,33 @@
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-clock id="app" v-if="showPage">
|
||||
<van-nav-bar title="教工作品征集" fixed placeholder safe-area-inset-top @click-left="history.back()"
|
||||
:left-arrow="leftArrow"></van-nav-bar>
|
||||
<div id="app" v-clock v-if="showPage">
|
||||
<van-nav-bar :left-arrow="leftArrow" @click-left="history.back()" fixed placeholder
|
||||
safe-area-inset-top
|
||||
title="教工作品征集"></van-nav-bar>
|
||||
<div>
|
||||
<van-swipe v-if="boxData.files&&boxData.files.length>0" class="my-swipe" :autoplay="3000"
|
||||
indicator-color="white">
|
||||
<van-swipe :autoplay="3000" class="my-swipe" indicator-color="white"
|
||||
v-if="boxData.files&&boxData.files.length>0">
|
||||
<van-swipe-item v-for="bgi in boxData.files">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
:src="FILE_DOMAIN+'/fileStreamPreview?id='+bgi.id"
|
||||
fit="cover"
|
||||
height="200px"
|
||||
width="100%"
|
||||
></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
<van-image
|
||||
fit="cover"
|
||||
height="200px"
|
||||
src="***"
|
||||
v-else
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
src="***"
|
||||
>
|
||||
<template v-slot:error>封面图片</template>
|
||||
</van-image>
|
||||
</div>
|
||||
<div v-if="active==0" class="page-v">
|
||||
<div class="page-v" v-if="active==0">
|
||||
<div class="detail-v">
|
||||
<div class="title-v p15">
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动介绍</h3>
|
||||
@@ -179,28 +180,29 @@
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15" style="line-height:24pt;" v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<div class="p15" style="line-height:24pt;"
|
||||
v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<div v-html="boxData.hdother"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="active==1" class="page-v">
|
||||
<div class="page-v" v-if="active==1">
|
||||
<div class="detail-v" style="margin-top: 0">
|
||||
<div class="weui-msg" v-if="showMsg">
|
||||
<div class="weui-msg__icon-area">
|
||||
<van-circle
|
||||
layer-color="rgb(240,240,240)"
|
||||
:clockwise="false"
|
||||
:rate="percent"
|
||||
:text="percent+' %'"
|
||||
color="#07c160"
|
||||
layer-color="rgb(240,240,240)"
|
||||
stroke-width="50"
|
||||
v-if="showPlan"
|
||||
v-model="percent"
|
||||
:rate="percent"
|
||||
:clockwise="false"
|
||||
:text="percent+' %'"
|
||||
></van-circle>
|
||||
<span v-if="showPlan==false">
|
||||
<i v-if="flag" class="weui-icon-success weui-icon_msg"></i>
|
||||
<i v-if="!flag" class="weui-icon-warn weui-icon_msg"></i>
|
||||
<i class="weui-icon-success weui-icon_msg" v-if="flag"></i>
|
||||
<i class="weui-icon-warn weui-icon_msg" v-if="!flag"></i>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@@ -212,55 +214,58 @@
|
||||
</div>
|
||||
<div class="weui-msg__opr-area">
|
||||
<p class="weui-btn-area">
|
||||
<a v-if="!showPlan" @click="showMsg=false"
|
||||
:class="flag?'weui-btn weui-btn_primary':'weui-btn weui-btn_warn'">{{flag ? '确定' : '返回'}}</a>
|
||||
<a :class="flag?'weui-btn weui-btn_primary':'weui-btn weui-btn_warn'"
|
||||
@click="showMsg=false"
|
||||
v-if="!showPlan">{{flag ? '确定' : '返回'}}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-v" v-else>
|
||||
<van-form @submit="doSubmit">
|
||||
<van-form>
|
||||
<div style="width: 100%;padding: 16px 0;">
|
||||
<h2 class="van-doc-demo-block__title" :style="'font-weight: bolder;color: '+boxData.hdcolor">
|
||||
<h2 :style="'font-weight: bolder;color: '+boxData.hdcolor"
|
||||
class="van-doc-demo-block__title">
|
||||
基本信息</h2>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="formData.loginname"
|
||||
label="工号"
|
||||
name="工号"
|
||||
placeholder="工号"
|
||||
readonly
|
||||
name="工资号"
|
||||
label="工资号"
|
||||
placeholder="工资号"
|
||||
v-model="formData.loginname"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="姓  名"
|
||||
name="姓名"
|
||||
readonly
|
||||
v-model="formData.username"
|
||||
name="姓名"
|
||||
label="姓  名"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="所属单位"
|
||||
name="所属单位"
|
||||
readonly
|
||||
v-model="formData.unitname"
|
||||
name="所属单位"
|
||||
label="所属单位"
|
||||
></van-field>
|
||||
<van-field
|
||||
required
|
||||
v-model="formData.mobile"
|
||||
name="mobile"
|
||||
label="手机号码" type="tel"
|
||||
placeholder="手机号码"
|
||||
:rules="[{ required: true, message: '请填写手机号码' }]"
|
||||
label="手机号码"
|
||||
name="mobile"
|
||||
placeholder="手机号码" required
|
||||
type="tel"
|
||||
v-model="formData.mobile"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-cell-group>
|
||||
<div style="width: 100%;padding: 16px 0;">
|
||||
<span class="van-doc-demo-block__title" :style="'font-weight: bolder;color: '+boxData.hdcolor">
|
||||
<span :style="'font-weight: bolder;color: '+boxData.hdcolor"
|
||||
class="van-doc-demo-block__title">
|
||||
作品信息</span>
|
||||
<p class="van-doc-demo-block__title" style="margin-top: 5px;color: red">
|
||||
(如同时参加以下多个活动,或有多个主题,请分别提交)</p>
|
||||
</div>
|
||||
<van-tabs v-model="formData.hdlb_i" :color="boxData.hdcolor" type="line">
|
||||
<van-tab v-for="lb,i in boxData.lbs" :name="i" :title="lb.lname">
|
||||
<van-tabs :color="boxData.hdcolor" type="card" v-model="formData.hdlb_i">
|
||||
<van-tab :name="i" :title="lb.lname" v-for="lb,i in boxData.lbs">
|
||||
<div v-if="formData.hdlb_i==i">
|
||||
<!-- <van-field style="padding-top: 30px" maxlength="15"
|
||||
:rules="[{ required: true, message: '请填写作品主题' }]"
|
||||
@@ -269,133 +274,182 @@
|
||||
show-word-limit
|
||||
label="作品主题" placeholder="主题"></van-field>-->
|
||||
<van-field
|
||||
v-if="lb.zplbs&&lb.zplbs.length>0"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
name="picker"
|
||||
:rules="[{ required: true, message: '请选择类别' }]"
|
||||
:value="fd[i].zplb_name"
|
||||
label="作品类别"
|
||||
placeholder="点击选择作品类别"
|
||||
@click="showPicker = true"
|
||||
:rules="[{ required: true, message: '请选择作品类别' }]"
|
||||
clickable
|
||||
label="类别"
|
||||
name="picker"
|
||||
placeholder="点击选择类别"
|
||||
readonly
|
||||
required
|
||||
v-if="lb.zplbs&&lb.zplbs.length>0"
|
||||
></van-field>
|
||||
<van-popup v-model="showPicker" position="bottom">
|
||||
<van-popup position="bottom" v-model="showPicker">
|
||||
<van-picker
|
||||
:columns="lb.zplbs"
|
||||
@cancel="showPicker = false"
|
||||
@confirm="(val) => {zplbClick(val, fd, i)}"
|
||||
show-toolbar
|
||||
value-key="zname"
|
||||
:columns="lb.zplbs"
|
||||
@confirm="function(val){fd[i].zplb=val.zid;fd[i].zplb_name=val.zname;showPicker=false}"
|
||||
@cancel="showPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
:rules="[{ required: true, message: '请填写标题' }]"
|
||||
label="标题"
|
||||
name="zpmc"
|
||||
placeholder="请填写标题"
|
||||
required
|
||||
v-model="fd[i].zpmc"
|
||||
></van-field>
|
||||
|
||||
<van-field type="textarea" show-word-limit maxlength="100" autosize
|
||||
v-model="fd[i].zpms"
|
||||
label="作品介绍"
|
||||
placeholder="介绍"></van-field>
|
||||
<van-field type="digit" show-word-limit maxlength="10" autosize
|
||||
v-model="fd[i].step_count"
|
||||
v-if="lb.lname==='健步走'"
|
||||
label="健步走步数"
|
||||
<van-field
|
||||
:maxlength="chooseLb.maxWordCount ? chooseLb.maxWordCount : 100"
|
||||
:rules="[{ required: true, message: '请填写创作说明' }]" autosize
|
||||
label="创作说明"
|
||||
placeholder="请填写创作说明"
|
||||
required
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="fd[i].zpms"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请填写健步走步数' }]"
|
||||
autosize label="健步走步数" maxlength="10"
|
||||
placeholder="健步走步数"
|
||||
:rules="[{ required: true, message: '请填写健步走步数' }]"></van-field>
|
||||
show-word-limit
|
||||
type="digit"
|
||||
v-if="lb.lname==='健步走'"
|
||||
v-model="fd[i].step_count"></van-field>
|
||||
|
||||
<van-field label="图  片" disabled placeholder="(左滑删除单个文件)"
|
||||
style="border: none;"
|
||||
input-align="right" v-if="lb.lname==='健步走'"></van-field>
|
||||
<van-swipe-cell v-for="img,idx in fd[i].imgList"
|
||||
style="border: none;padding-top: 20px;" v-if="lb.lname==='健步走'">
|
||||
<van-row style="padding: 0 15px">
|
||||
<van-col :span="6">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="25vw"
|
||||
fit="cover"
|
||||
:src="img.content"
|
||||
></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<template v-if="chooseLb.isUploadPhoto === true">
|
||||
<van-field input-align="right" label="图  片"
|
||||
placeholder="(左滑删除单个文件)"
|
||||
readonly required
|
||||
style="border: none;"></van-field>
|
||||
<van-swipe-cell style="border: none;padding-top: 20px;"
|
||||
v-for="img,idx in fd[i].imgList">
|
||||
<van-row style="padding: 0 15px">
|
||||
<van-col :span="6">
|
||||
<van-image
|
||||
:src="img.content"
|
||||
fit="cover"
|
||||
height="25vw"
|
||||
width="100%"
|
||||
></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-button
|
||||
native-type="button"
|
||||
@click="imgDelete(idx,i,img.filepath)"
|
||||
slot="right"
|
||||
square
|
||||
text="删除"
|
||||
type="danger"
|
||||
class="delete-button"
|
||||
></van-button>
|
||||
</van-swipe-cell>
|
||||
<van-field v-if="lb.lname==='健步走'">
|
||||
<template #input>
|
||||
<van-uploader multiple :preview-image="false" :before-read="beforeReadImg"
|
||||
accept="image/*"
|
||||
:max-count="5"
|
||||
v-model="fd[i].imgList">
|
||||
</van-uploader>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label-width="150" label="音/视频、文档" disabled style="border: none;"
|
||||
input-align="right" v-if="lb.lname!=='健步走'"></van-field>
|
||||
<van-swipe-cell v-for="video,idx in fd[i].videoList"
|
||||
style="border: none;padding-top: 20px;" v-if="lb.lname!=='健步走'">
|
||||
<van-row style="padding: 0 15px">
|
||||
<van-col :span="6">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="25vw"
|
||||
fit="cover"
|
||||
src="1"
|
||||
>
|
||||
<template v-slot:error>
|
||||
<i class="van-icon van-icon-description van-uploader__file-icon">
|
||||
<!----></i>
|
||||
<div class="van-uploader__file-name van-ellipsis">
|
||||
<van-button
|
||||
@click="imgDelete(idx,i,img.filepath)"
|
||||
class="delete-button"
|
||||
native-type="button"
|
||||
slot="right"
|
||||
square
|
||||
text="删除"
|
||||
type="danger"
|
||||
></van-button>
|
||||
</van-swipe-cell>
|
||||
<van-field>
|
||||
<template #input>
|
||||
<van-uploader :before-read="beforeReadImg"
|
||||
:max-count="chooseLb.photoNum"
|
||||
:max-size="chooseLb.photoSize * 1048576"
|
||||
:preview-image="false"
|
||||
@oversize="$toast('图片大小不能超过' + chooseLb.photoSize + 'M')"
|
||||
accept="image/*"
|
||||
multiple
|
||||
v-model="fd[i].imgList">
|
||||
</van-uploader>
|
||||
</template>
|
||||
</van-field>
|
||||
<div style="margin-top: 10px;padding-left: 20px;font-size: 12px;color: rgb(160,160,160)">
|
||||
注意:图片最多{{ chooseLb.photoNum }}张,每张不超过{{ chooseLb.photoSize
|
||||
}}M,格式为{{chooseLb.photoType.toString()}}。
|
||||
</div>
|
||||
</template>
|
||||
|
||||
{{video.filename ? video.filename : video.file.name }}
|
||||
</div>
|
||||
</template>
|
||||
</van-image>
|
||||
</van-col>
|
||||
<!-- <van-col :span="18">
|
||||
<van-field style="width: 100%;padding-right: 0;" autosize v-model="video.ms"
|
||||
type="textarea" rows="2"
|
||||
maxlength="50"
|
||||
:show-word-limit="!isNull(video.ms)"
|
||||
placeholder="请输入描述信息"></van-field>
|
||||
</van-col>-->
|
||||
</van-row>
|
||||
<template v-if="chooseLb.isUploadOther === true">
|
||||
<van-field input-align="right" label="音/视频、文档" label-width="150"
|
||||
readonly required
|
||||
style="border: none;"></van-field>
|
||||
<van-swipe-cell style="border: none;padding-top: 20px;"
|
||||
v-for="(video,idx) in fd[i].videoList">
|
||||
<van-row style="padding: 0 15px">
|
||||
<van-col :span="6">
|
||||
<van-image
|
||||
fit="cover"
|
||||
height="25vw"
|
||||
src="1"
|
||||
width="100%"
|
||||
>
|
||||
<template v-slot:error>
|
||||
<i class="van-icon van-icon-description van-uploader__file-icon">
|
||||
<!----></i>
|
||||
<div class="van-uploader__file-name van-ellipsis">
|
||||
|
||||
{{video.filename ? video.filename : video.file.name
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
</van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-button
|
||||
@click="videoDelete(idx,i,video.filepath)"
|
||||
class="delete-button"
|
||||
native-type="button"
|
||||
slot="right"
|
||||
square
|
||||
text="删除"
|
||||
type="danger"
|
||||
></van-button>
|
||||
</van-swipe-cell>
|
||||
<van-field v-if="lb.lname!=='健步走'">
|
||||
<template #input>
|
||||
<van-uploader :before-read="beforeReadVideo"
|
||||
:max-count="chooseLb.otherFileNum"
|
||||
:max-size="chooseLb.otherSize * 1048576"
|
||||
:preview-image="false"
|
||||
@oversize="$toast('文件大小不能超过' + chooseLb.otherSize + 'M')"
|
||||
accept="*"
|
||||
result-type="file"
|
||||
v-model="fd[i].videoList"></van-uploader>
|
||||
</template>
|
||||
</van-field>
|
||||
<div style="margin-top: 10px;padding-left: 20px;font-size: 12px;color: rgb(160,160,160)">
|
||||
注意:文件最多{{ chooseLb.otherFileNum
|
||||
}}个,每个不超过{{ chooseLb.otherSize
|
||||
}}M,格式为{{chooseLb.otherType.toString()}}。
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<van-button
|
||||
native-type="button"
|
||||
@click="videoDelete(idx,i,video.filepath)"
|
||||
slot="right"
|
||||
square
|
||||
text="删除"
|
||||
type="danger"
|
||||
class="delete-button"
|
||||
></van-button>
|
||||
</van-swipe-cell>
|
||||
<van-field v-if="lb.lname!=='健步走'">
|
||||
<template #input>
|
||||
<van-uploader :preview-image="false" result-type="file"
|
||||
@oversize="this.$toast.fail('文件大小不能超过200M!')"
|
||||
:max-size="209715200"
|
||||
:before-read="beforeReadVideo" accept="*" :max-count="2"
|
||||
v-model="fd[i].videoList"></van-uploader>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<span style="padding-left: 15px;font-size: 12px;color: rgb(160,160,160)">(注意:图片最多5张,视频最大200M。)</span>
|
||||
<div style="margin: 16px;">
|
||||
<van-button :disabled="subDis" round block :color="boxData.hdcolor" type="info"
|
||||
native-type="submit">
|
||||
提交
|
||||
</van-button>
|
||||
<van-row gutter="20">
|
||||
<van-col span="12">
|
||||
<van-button :color="boxData.hdcolor" :disabled="subDis"
|
||||
@click="doSubmit(false)" block
|
||||
plain
|
||||
round
|
||||
type="info">
|
||||
保存
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<van-button :color="boxData.hdcolor" :disabled="subDis"
|
||||
@click="doSubmit(true)" block
|
||||
round
|
||||
type="info">
|
||||
提交
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
@@ -404,13 +458,14 @@
|
||||
|
||||
|
||||
<van-tabbar
|
||||
:active-color="boxData.hdcolor"
|
||||
@change="activeChange"
|
||||
inactive-color="#000"
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="label-o">介绍</van-tabbar-item>
|
||||
<van-tabbar-item icon="edit">报名</van-tabbar-item>
|
||||
<van-tabbar-item icon="edit">参加活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
</div>
|
||||
@@ -478,11 +533,24 @@
|
||||
},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
doctype: ['doc', 'docx', 'txt'],
|
||||
doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
|
||||
chooseLb: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
zplbClick(val, fd, i) {
|
||||
this.chooseLb = val
|
||||
fd[i].zplb = val.zid;
|
||||
fd[i].zplb_name = val.zname;
|
||||
this.showPicker = false
|
||||
},
|
||||
activeChange() {
|
||||
if (this.subDis) {
|
||||
this.active = 0
|
||||
this.$toast.fail("不在活动时间范围内!");
|
||||
}
|
||||
},
|
||||
imgDelete(idx, i, filepath) {
|
||||
this.fd[i].imgList.splice(idx, 1)
|
||||
this.readytodelfile.push(filepath);
|
||||
@@ -499,7 +567,7 @@
|
||||
,
|
||||
getPlaceholder(formData, key) {
|
||||
if (this.isNull(formData.userid)) {
|
||||
return "输入工资号后自动匹配"
|
||||
return "输入工号后自动匹配"
|
||||
} else {
|
||||
if (this.isNull(formData[key])) {
|
||||
return '暂无'
|
||||
@@ -517,22 +585,36 @@
|
||||
this.$set(this.formData, 'username', userName)
|
||||
this.$set(this.formData, 'unitname', unitName)
|
||||
this.$set(this.formData, 'userid', userId)
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
},
|
||||
async doSubmit() {
|
||||
async doSubmit(flag) {
|
||||
if (this.isNull(this.formData.userid)) {
|
||||
this.$toast.fail("请正确填写您的工资号!")
|
||||
this.$toast.fail("请正确填写您的工号!")
|
||||
return
|
||||
}
|
||||
const i = this.formData.hdlb_i
|
||||
|
||||
if (this.fd[i].videoList.length == 0 && this.fd[i].imgList.length == 0) {
|
||||
this.$toast.fail("请您选择要上传的作品!")
|
||||
return
|
||||
if (flag === true) {
|
||||
if (this.fd[i].imgList.length === 0) {
|
||||
this.$toast.fail("请您选择要上传的作品!")
|
||||
return
|
||||
}
|
||||
if (!this.fd[i].zplb || !this.fd[i].zpmc || !this.fd[i].zpms) {
|
||||
this.$toast.fail("请您填写完整再提交!")
|
||||
return
|
||||
}
|
||||
/* if (this.chooseLb.isUploadPhoto === true || this.chooseLb.isUploadOther === true) {
|
||||
if (this.fd[i].videoList.length == 0 || this.fd[i].imgList.length == 0) {
|
||||
this.$toast.fail("请您选择要上传的作品!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
const msg = '您当前选择的是“' + this.boxData.lbs[i].lname + '”,是否确认上传?' + (flag ? '上传后您将不能对已上传的作品进行更改' : '保存后如需提交请到我的作品进行提交')
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '您当前选择的是“' + this.boxData.lbs[i].lname + '”,是否确认上传?上传后您将不能对已上传的作品进行更改'
|
||||
message: msg
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
setTimeout(() => {
|
||||
@@ -543,7 +625,8 @@
|
||||
|
||||
let formData1 = {}
|
||||
let formData2 = new FormData();
|
||||
|
||||
formData1.flag = flag
|
||||
formData2.append("flag", flag)
|
||||
if (this.formData.id) {
|
||||
|
||||
this.$set(formData1, "id", getQueryVariable("zpid"))
|
||||
@@ -551,32 +634,34 @@
|
||||
this.$set(formData1, "hdsbrid", this.isNull(this.formData.userid) ? '' : this.formData.userid)
|
||||
this.$set(formData1, "mobile", this.isNull(this.formData.mobile) ? '' : this.formData.mobile)
|
||||
this.$set(formData1, "step_count", this.isNull(this.fd[i].step_count) ? '' : this.fd[i].step_count)
|
||||
this.$set(formData1, "zpmc", this.isNull(this.fd[i].zpmc) ? '' : this.fd[i].zpmc)
|
||||
this.$set(formData1, "hdzplx", this.isNull(this.boxData.lbs[i].lid) ? '' : this.boxData.lbs[i].lid)
|
||||
this.$set(formData1, "hdzplx2", this.isNull(this.fd[i].zplb) ? '' : this.fd[i].zplb)
|
||||
this.$set(formData1, "hdsbzpzt", this.isNull(this.fd[i].zpzt) ? '' : this.fd[i].zpzt)
|
||||
this.$set(formData1, "hdsbzpms", this.isNull(this.fd[i].zpms) ? '' : this.fd[i].zpms)
|
||||
this.$set(formData1, "hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'))
|
||||
//this.$set(formData1, "hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'))
|
||||
} else {
|
||||
|
||||
formData2.append("hdid", getQueryVariable("id"))
|
||||
formData2.append("hdsbrid", this.isNull(this.formData.userid) ? '' : this.formData.userid);
|
||||
formData2.append("mobile", this.isNull(this.formData.mobile) ? '' : this.formData.mobile);
|
||||
formData2.append("step_count", this.isNull(this.fd[i].step_count) ? '' : this.fd[i].step_count);
|
||||
formData2.append("zpmc", this.isNull(this.fd[i].zpmc) ? '' : this.fd[i].zpmc);
|
||||
formData2.append("hdzplx", this.isNull(this.boxData.lbs[i].lid) ? '' : this.boxData.lbs[i].lid)
|
||||
formData2.append("hdzplx2", this.isNull(this.fd[i].zplb) ? '' : this.fd[i].zplb);
|
||||
formData2.append("hdsbzpzt", this.isNull(this.fd[i].zpzt) ? '' : this.fd[i].zpzt);
|
||||
formData2.append("hdsbzpms", this.isNull(this.fd[i].zpms) ? '' : this.fd[i].zpms);
|
||||
formData2.append("hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'));
|
||||
this.fd[i].imgList.forEach(val => {
|
||||
formData2.append("files", val.file, this.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
|
||||
});
|
||||
this.fd[i].videoList.forEach(val => {
|
||||
formData2.append("files", val.file, this.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
|
||||
});
|
||||
})
|
||||
formData2.append("hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'));
|
||||
}
|
||||
|
||||
if (!this.isNull(this.formData.id)) {
|
||||
formData2.append("data", JSON.stringify(formData1));
|
||||
formData2.append("flag", flag);
|
||||
formData2.append("readytodelfile", JSON.stringify(this.readytodelfile));
|
||||
this.fd[i].imgList.forEach(val => {
|
||||
formData2.append("file", val.file);
|
||||
@@ -604,6 +689,7 @@
|
||||
vue.fd[i].zpzt = ''
|
||||
vue.fd[i].zpms = ''
|
||||
vue.fd[i].step_count = ''
|
||||
vue.fd[i].zpmc = ''
|
||||
vue.fd[i].sbsj = ''
|
||||
vue.fd[i].imgList = []
|
||||
vue.fd[i].videoList = []
|
||||
@@ -621,7 +707,7 @@
|
||||
this.flag = false
|
||||
}
|
||||
vue.showPlan = false
|
||||
window.history.back()
|
||||
location.href = '/mobile/wmhd/list'
|
||||
},
|
||||
error: function (data) {
|
||||
vue.msg = '<p class="weui-msg__desc">非常抱歉对您造成的不便!<br/>请联系系统管理员进行修复!</p>'
|
||||
@@ -652,6 +738,7 @@
|
||||
vue.fd[i].zpzt = ''
|
||||
vue.fd[i].zpms = ''
|
||||
vue.fd[i].step_count = ''
|
||||
vue.fd[i].zpmc = ''
|
||||
vue.fd[i].sbsj = ''
|
||||
vue.fd[i].imgList = []
|
||||
vue.fd[i].videoList = []
|
||||
@@ -686,22 +773,32 @@
|
||||
,
|
||||
// 返回布尔值
|
||||
beforeReadImg: function (file) {
|
||||
return true;
|
||||
var suffix = getSuffix(file.name)
|
||||
if (suffix == null) {
|
||||
this.$toast('获取不到后缀名!')
|
||||
return false
|
||||
}
|
||||
const suf = file.name.split('.').pop().toLowerCase()
|
||||
if (this.chooseLb.photoType.indexOf(suf) === -1) {
|
||||
this.$toast('支持的图片类型:' + this.chooseLb.photoType.toString())
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
,
|
||||
// 返回布尔值
|
||||
beforeReadVideo: function (file, detail) {
|
||||
var suffix = getSuffix(file.name)
|
||||
if (suffix == null) {
|
||||
this.$toast('获取不到后缀名!');
|
||||
return false;
|
||||
this.$toast('获取不到后缀名!')
|
||||
return false
|
||||
}
|
||||
// var type = suffix.toString().substring(suffix.lastIndexOf(".") + 2)
|
||||
// if (this.videotype.indexOf(type) == -1 && this.audiotype.indexOf(type) == -1 && this.doctype.indexOf(type) == -1) {
|
||||
// this.$toast('不支持的文件类型!');
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
const suf = file.name.split('.').pop().toLowerCase()
|
||||
if (this.chooseLb.otherType.indexOf(suf) === -1) {
|
||||
this.$toast('支持的文件类型:' + this.chooseLb.otherType.toString())
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
,
|
||||
},
|
||||
@@ -752,11 +849,15 @@
|
||||
this.$set(this.formData, "mobile", refs[0].mobile)
|
||||
this.$set(this.formData, "hdlb_i", refs[0].llocation - 1)
|
||||
this.$set(this.fd[refs[0].llocation - 1], "step_count", this.isNull(refs[0].step_count) ? "" : refs[0].step_count)
|
||||
this.$set(this.fd[refs[0].llocation - 1], "zpmc", this.isNull(refs[0].zpmc) ? "" : refs[0].zpmc)
|
||||
this.$set(this.boxData.lbs[refs[0].llocation - 1], "lid", refs[0].hdzplx)
|
||||
this.$set(this.fd[refs[0].llocation - 1], "zplb", refs[0].hdzplx2)
|
||||
this.$set(this.fd[refs[0].llocation - 1], "zplb_name", refs[0].zname)
|
||||
this.$set(this.fd[refs[0].llocation - 1], "zpzt", refs[0].hdsbzpzt)
|
||||
this.$set(this.fd[refs[0].llocation - 1], "hdsbsj", refs[0].hdsbsj)
|
||||
this.$set(this.fd[refs[0].llocation - 1], "zpms", refs[0].hdsbzpms)
|
||||
const o = this.boxData.lbs[refs[0].llocation - 1].zplbs.find(o => o.zid === refs[0].hdzplx2)
|
||||
this.chooseLb = o !== undefined ? o : {}
|
||||
data.forEach((v, i) => {
|
||||
v.filename = v.filename
|
||||
v.fjurl = v.filepath
|
||||
@@ -764,10 +865,13 @@
|
||||
v.content = FILE_DOMAIN + "/fileStreamPreview?id=" + v.id
|
||||
const filetype = v.filename.substring(v.filename.lastIndexOf(".") + 1)
|
||||
const aa = this.audiotype.concat(this.videotype)
|
||||
const bb = this.doctype.concat(this.doctype)
|
||||
if (this.imgtype.indexOf(filetype) > -1) {
|
||||
this.fd[refs[0].llocation - 1].imgList.push(v)
|
||||
} else if (aa.indexOf(filetype) > -1) {
|
||||
this.fd[refs[0].llocation - 1].videoList.push(v);
|
||||
} else if (bb.indexOf(filetype) > -1) {
|
||||
this.fd[refs[0].llocation - 1].videoList.push(v);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -794,4 +898,4 @@
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -228,10 +228,10 @@
|
||||
@input="doInput"
|
||||
required
|
||||
v-model="formData.loginname"
|
||||
name="工资号"
|
||||
name="工号"
|
||||
label="工  号"
|
||||
placeholder="工资号"
|
||||
:rules="[{ required: true, message: '请填写工资号' }]"
|
||||
placeholder="工号"
|
||||
:rules="[{ required: true, message: '请填写工号' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
disabled
|
||||
@@ -609,7 +609,7 @@
|
||||
},
|
||||
getPlaceholder: function (formData, key) {
|
||||
if (vue.isNull(formData.userid)) {
|
||||
return "输入工资号后自动匹配"
|
||||
return "输入工号后自动匹配"
|
||||
} else {
|
||||
if (vue.isNull(formData[key])) {
|
||||
return '暂无'
|
||||
@@ -633,7 +633,7 @@
|
||||
},
|
||||
doSubmit: function () {
|
||||
if (vue.isNull(vue.formData.userid)) {
|
||||
vue.$toast.fail("请正确填写您的工资号!")
|
||||
vue.$toast.fail("请正确填写您的工号!")
|
||||
return
|
||||
}
|
||||
if (vue.hdzplx == 1 && vue.formData.videoList.length == 0 && vue.formData.imgList.length == 0) {
|
||||
@@ -826,4 +826,4 @@
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -214,10 +214,10 @@
|
||||
@input="doInput"
|
||||
required
|
||||
v-model="formData.loginname"
|
||||
name="工资号"
|
||||
name="工号"
|
||||
label="工  号"
|
||||
placeholder="工资号"
|
||||
:rules="[{ required: true, message: '请填写工资号' }]"
|
||||
placeholder="工号"
|
||||
:rules="[{ required: true, message: '请填写工号' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
disabled
|
||||
@@ -463,7 +463,7 @@
|
||||
},
|
||||
getPlaceholder: function (formData, key) {
|
||||
if (vue.isNull(formData.userid)) {
|
||||
return "输入工资号后自动匹配"
|
||||
return "输入工号后自动匹配"
|
||||
} else {
|
||||
if (vue.isNull(formData[key])) {
|
||||
return '暂无'
|
||||
@@ -487,7 +487,7 @@
|
||||
},
|
||||
doSubmit: function () {
|
||||
if (vue.isNull(vue.formData.userid)) {
|
||||
vue.$toast.fail("请正确填写您的工资号!")
|
||||
vue.$toast.fail("请正确填写您的工号!")
|
||||
return
|
||||
}
|
||||
if (vue.hdzplx == 1 && vue.formData.videoList.length == 0 && vue.formData.imgList.length == 0) {
|
||||
@@ -553,4 +553,4 @@
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<link href="${base!}/assets/platform/plugins/video/css/video-js.min.css" rel="stylesheet">
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
|
||||
<style>
|
||||
@@ -151,255 +151,220 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row type="flex" :gutter="20">
|
||||
<el-col :span="22">
|
||||
<el-row type="flex" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<!-- <el-cascader placeholder="请选择活动主题"-->
|
||||
<!-- v-model="pageForm.hdids" :options="hdxxlist" @change="hdchange"-->
|
||||
<!-- clearable></el-cascader>-->
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
@change="yearChange"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="pageForm.hdid" @change="hdchange" clearable placeholder="请选择活动主题">
|
||||
<el-option v-for="i in hdxxlist"
|
||||
:key="i.value"
|
||||
:label="i.label"
|
||||
:value="i.value"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="pageForm.hdlb" placeholder="请选择活动类型" clearable @change="hdlbchange">
|
||||
<el-option v-for="o in hdlblist" :label="o.lname" :value="o.lid"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="pageForm.zplb" placeholder="请选择作品类型" clearable>
|
||||
<el-option v-for="o in hdzplblist" :label="o.zname" :value="o.zid"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" :gutter="20" class="mt20">
|
||||
<el-col :span="6">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;"
|
||||
clearable>
|
||||
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker @change="yearChange" placeholder="年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动主题:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="hdchange" clearable placeholder="请选择活动主题"
|
||||
style="width: 100%" v-model="pageForm.hdid">
|
||||
<el-option :key="i.value"
|
||||
:label="i.label"
|
||||
:value="i.value"
|
||||
v-for="i in hdxxlist"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动类别:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="hdlbchange" clearable placeholder="请选择活动类别"
|
||||
style="width: 100%" v-model="pageForm.hdlb">
|
||||
<el-option :label="o.lname" :value="o.lid"
|
||||
v-for="o in hdlblist"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">作品类别:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable placeholder="请选择作品类别" style="width: 100%"
|
||||
v-model="pageForm.zplb">
|
||||
<el-option :label="o.zname" :value="o.zid"
|
||||
v-for="o in hdzplblist"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">是否优秀:</div>
|
||||
<div class="search-item-option">
|
||||
<el-radio-group v-model="pageForm.isExcellent">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="1">优秀</el-radio-button>
|
||||
<el-radio-button label="0">普通</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="searchMore">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名/工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入内容"
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select clearable placeholder="查询类型"
|
||||
slot="prepend"
|
||||
style="width: 100px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工资号" value="u.loginname"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-select v-if="hasSuperAdminOrXghRole" placeholder="所属工会" v-model="pageForm.union"
|
||||
style="width: 200px;" clearable="true"
|
||||
filterable="true" @change="unionChange">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unit" style="width: 200px;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="">
|
||||
<el-button size="medium" @click="exportExcel">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="unionChange" clearable filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%" v-model="pageForm.union">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable="true" filterable placeholder="所属单位"
|
||||
style="width: 100%"
|
||||
style="width: 200px;"
|
||||
v-model="pageForm.unit">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
|
||||
<more v-model="searchMore"></more>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center" width="50">
|
||||
<el-card class="mt20" shadow="never">
|
||||
<vi-title2 title="作品列表">
|
||||
<template #func>
|
||||
<el-button @click="exportExcel" size="small" type="primary">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出Excel
|
||||
</el-button>
|
||||
|
||||
<el-button @click="exportWork" size="small" type="primary">
|
||||
<i class="el-icon-tickets"></i>
|
||||
导出作品
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="tableData" @sort-change="pageOrder">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="50">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="username" label="姓名" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="姓名" prop="username"
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="loginname" label="工资号" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center" sortable
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center" sortable
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdlbname" label="活动类别" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="loginname"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="单位" prop="dwname"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<!-- <el-table-column prop="zplbname" label="作品类别" header-align="center" align="center"
|
||||
sortable></el-table-column>-->
|
||||
<!-- <el-table-column prop="hdsbzpzt" label="主题" header-align="center" align="center"></el-table-column>-->
|
||||
<el-table-column prop="hdsbsj" label="上传时间" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
{{scope.row.hdsbsj|date}}
|
||||
</template>
|
||||
<el-table-column align="center" header-align="center" label="分工会" prop="ghname"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column><!--
|
||||
<el-table-column align="center" header-align="center" label="活动主题"
|
||||
prop="hdname"></el-table-column>-->
|
||||
<el-table-column align="center" header-align="center" label="活动类别"
|
||||
prop="hdlbname"
|
||||
sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="作品类别"
|
||||
prop="zplbname"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="上传时间"
|
||||
prop="hdsbsj"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="mobile" label="手机号" header-align="center" align="center"></el-table-column>-->
|
||||
<el-table-column align="center" header-align="center" label="操作" width="200">
|
||||
<el-table-column align="center" header-align="center" label="是否优秀作品"
|
||||
prop="isExcellent"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
{{row.isExcellent?'优秀':'普通'}}
|
||||
</template>
|
||||
|
||||
</el-table-column><!--
|
||||
<el-table-column align="center" header-align="center" label="点赞次数(次)"
|
||||
prop="dz_num">
|
||||
</el-table-column>--><!--
|
||||
<el-table-column align="center" prop="auditState" header-align="center"
|
||||
label="审核状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.statecolor">{{scope.row.statename}}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column align="center" header-align="center" label="操作" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="viewInfo(scope)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="doDelete(scope.row.id)" size="mini" type="danger">删除</el-button>
|
||||
<el-button @click="viewInfo(scope)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<el-button @click="doExcellent(scope.row.id)" size="mini" type="primary"
|
||||
v-if="!scope.row.isExcellent">设为优秀
|
||||
</el-button>
|
||||
<el-button @click="cancelExcellent(scope.row.id)" size="mini"
|
||||
type="danger"
|
||||
v-if="scope.row.isExcellent">
|
||||
取消优秀
|
||||
</el-button>
|
||||
<el-button @click="doDelete(scope.row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<el-form label-suffix=":" label-position="left" style="padding: 40px" label-width="110px">
|
||||
<el-form-item class="item-center"></el-form-item>
|
||||
|
||||
<el-row gutter="60">
|
||||
<vi-title title="基础信息"></vi-title>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名">{{viewData.username}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工资号">{{viewData.loginname}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位">{{viewData.dwname}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工会">{{viewData.ghname}}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row gutter="60">
|
||||
<vi-title title="作品信息"></vi-title>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="作品主题">{{viewData.hdsbzpzt}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动类别">{{viewData.hdlbname}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="作品类别">{{viewData.zplbname}}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="简介">{{viewData.hdsbzpms}}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="60">
|
||||
<vi-title title="照片"></vi-title>
|
||||
|
||||
<file-upload v-if="img2List&&img2List.length>0" view :files="img2List"></file-upload>
|
||||
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有照片。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="60">
|
||||
<vi-title title="视频"></vi-title>
|
||||
<div style="text-align: left;" v-if="videoList.length>0">
|
||||
<div v-for="item in videoList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab">
|
||||
<div class="video-toggle-i"
|
||||
@click="playVideo(APP_DOMAIN + '/file_server/fileStreamPreview?id=' + item.id)">
|
||||
<i class="el-icon-video-camera-solid"></i>
|
||||
<i class="el-icon-video-play"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="location.href='/file_server/download?filepath=' + item.filepath + '&filename=' + item.filename">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有视频。
|
||||
</div>
|
||||
</el-ol>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="60">
|
||||
<vi-title title="音频"></vi-title>
|
||||
<div style="text-align: left;" v-if="audioList.length>0">
|
||||
<div v-for="item in audioList">
|
||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
||||
<source :src="'${AppFileDomain!}'+item.filepath"/>
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有音频。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="60">
|
||||
<vi-title title="文档"></vi-title>
|
||||
<div style="text-align: left;" v-if="docList.length>0">
|
||||
<div v-for="item in docList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab" style="background-color: #f6f6f6">
|
||||
<div class="video-toggle-i" @click="dd3s.preview(item.filepath,item.id)">
|
||||
<i class="el-icon-document"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="dd3s.download(item.filepath,item.filename)">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有文档。
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<info @playvideo="playvideo" ref="info"></info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="fileDialogVisible" class="filedialog" @close="filedialogClose"
|
||||
:close-on-click-modal="false">
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="fileDialogVisible"
|
||||
@close="filedialogClose"
|
||||
class="filedialog">
|
||||
<div id="videoContainer"></div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -413,7 +378,7 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
units: [],
|
||||
unions: [],
|
||||
hasSuperAdminOrXghRole: "${@shiro.hasAnyRoles('sysadmin','A06')}" === 'true' ? true : false,
|
||||
hasSuperAdminOrXghRole: "${@shiro.hasAnyRoles('sysadmin','A06','H10')}" === 'true' ? true : false,
|
||||
audio: {
|
||||
name: '东西(Cover:林俊呈)',
|
||||
artist: '纳豆',
|
||||
@@ -423,6 +388,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + '',
|
||||
searchName: "u.username",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
@@ -430,6 +396,10 @@ layout("/layouts/platform.html"){
|
||||
hdid: '',
|
||||
hdlb: '',
|
||||
zplb: '',
|
||||
stateId: '',
|
||||
unit: '',
|
||||
union: '',
|
||||
isExcellent: '',
|
||||
},
|
||||
hdxxlist: [],
|
||||
videoSrc: '',
|
||||
@@ -450,19 +420,41 @@ layout("/layouts/platform.html"){
|
||||
ckusername: '',//当前查看的人的姓名 下载的时候一起传过去,
|
||||
hdlblist: [],
|
||||
hdzplblist: [],
|
||||
yearActivityList: []
|
||||
yearActivityList: [],
|
||||
auditStateList: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'pageForm.hdid'(val) {
|
||||
this.$set(this.pageForm, "hdlb", null)
|
||||
this.$set(this.pageForm, "zplb", null)
|
||||
this.$set(this.pageForm, "hdlb", '')
|
||||
this.$set(this.pageForm, "zplb", '')
|
||||
},
|
||||
'pageForm.hdlb'(val) {
|
||||
this.$set(this.pageForm, "zplb", null)
|
||||
this.$set(this.pageForm, "zplb", '')
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': httpVueLoader('/components/hd/hdwmInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
async doExcellent(id) {
|
||||
const resp = await $.post("/platform/hd/wmhd/doExcellent", {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch();
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
async cancelExcellent(id) {
|
||||
const resp = await $.post("/platform/hd/wmhd/cancelExcellent", {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch();
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
yearChange(val) {
|
||||
let activityList = []
|
||||
if (val === null) {
|
||||
@@ -475,14 +467,13 @@ layout("/layouts/platform.html"){
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
}
|
||||
|
||||
this.hdxxlist = activityList
|
||||
this.$set(this.pageForm, "hdid", null)
|
||||
this.$set(this.pageForm, "hdlb", null)
|
||||
this.$set(this.pageForm, "zplb", null)
|
||||
this.$set(this.pageForm, "hdid", '')
|
||||
this.$set(this.pageForm, "hdlb", '')
|
||||
this.$set(this.pageForm, "zplb", '')
|
||||
},
|
||||
async unionChange() {
|
||||
this.$set(this.pageForm, "unit", null)
|
||||
this.$set(this.pageForm, "unit", '')
|
||||
this.units = await getUnits(this.pageForm.union)
|
||||
},
|
||||
|
||||
@@ -523,36 +514,13 @@ layout("/layouts/platform.html"){
|
||||
this.pageData();
|
||||
},
|
||||
async viewInfo(scope) {
|
||||
this.img2List = [];
|
||||
this.prevImgList = [];
|
||||
this.videoList = [];
|
||||
this.audioList = [];
|
||||
this.docList = [];
|
||||
this.viewData = scope.row;
|
||||
this.ckusername = scope.row.username;
|
||||
const data = await $.post(base + '/platform/hd/wmhd/findOneById', {id: scope.row.id})
|
||||
if (data.code == 0) {
|
||||
data.data.forEach(val => {
|
||||
val.fjname = val.filename
|
||||
val.fjurl = val.filepath
|
||||
val.url = '${AppFileDomain!}' + val.filepath
|
||||
let filetype = val.fjname.substring(val.fjname.lastIndexOf('.') + 1, val.fjname.length).toLowerCase();
|
||||
if (this.videotype.indexOf(filetype) > -1) {
|
||||
this.videoList.push(val);
|
||||
} else if (this.imgtype.indexOf(filetype) > -1) {
|
||||
this.prevImgList.push('${AppFileDomain!}' + val.filepath)
|
||||
this.img2List.push(val);
|
||||
} else if (this.doctype.indexOf(filetype) > -1) {
|
||||
this.docList.push(val);
|
||||
} else if (this.audiotype.indexOf(filetype) > -1) {
|
||||
this.audioList.push(val);
|
||||
}
|
||||
});
|
||||
this.$refs.guava.view()
|
||||
}
|
||||
|
||||
this.$refs.info.getInfo(scope.row.id)
|
||||
this.$refs.guava.view()
|
||||
|
||||
|
||||
},
|
||||
playVideo: function (fjurl) {
|
||||
playvideo: function (fjurl) {
|
||||
var self = this;
|
||||
self.fileDialogVisible = true;
|
||||
self.$nextTick(function () {
|
||||
@@ -579,8 +547,8 @@ layout("/layouts/platform.html"){
|
||||
document.getElementById('amusic').pause();
|
||||
}
|
||||
},
|
||||
exportExcel: function () {
|
||||
let hdid = this.pageForm.hdid;
|
||||
exportWork() {
|
||||
let {hdid, hdlb, zplb, union, unit, stateId, isExcellent} = this.pageForm;
|
||||
if (hdid === '') {
|
||||
this.$message.warning('请先选择活动主题');
|
||||
return;
|
||||
@@ -589,7 +557,33 @@ layout("/layouts/platform.html"){
|
||||
return o.value == hdid;
|
||||
});
|
||||
let hdname = hdarr[0].label;
|
||||
window.open('/platform/hd/wmhd/exportExcel?hdid=' + hdid + '&hdname=' + hdname);
|
||||
window.open('/platform/hd/wmhd/exportWork?hdid=' + hdid +
|
||||
'&hdname=' + hdname +
|
||||
"&hdlb=" + hdlb +
|
||||
"&zplb=" + zplb +
|
||||
"&union=" + union +
|
||||
"&unit=" + unit +
|
||||
"&isExcellent=" + isExcellent +
|
||||
"&stateId=" + stateId);
|
||||
},
|
||||
exportExcel: function () {
|
||||
let {hdid, hdlb, zplb, union, unit, stateId, isExcellent} = this.pageForm;
|
||||
if (hdid === '') {
|
||||
this.$message.warning('请先选择活动主题');
|
||||
return;
|
||||
}
|
||||
let hdarr = this.hdxxlist.filter(o => {
|
||||
return o.value == hdid;
|
||||
});
|
||||
let hdname = hdarr[0].label;
|
||||
window.open('/platform/hd/wmhd/exportExcel?hdid=' + hdid +
|
||||
'&hdname=' + hdname +
|
||||
"&hdlb=" + hdlb +
|
||||
"&zplb=" + zplb +
|
||||
"&union=" + union +
|
||||
"&unit=" + unit +
|
||||
"&isExcellent=" + isExcellent +
|
||||
"&stateId=" + stateId);
|
||||
},
|
||||
doSearch: function () {
|
||||
this.pageForm.pageNumber = 1;
|
||||
@@ -630,7 +624,6 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
if (confirm) {
|
||||
const resp = await $.post(loc() + '/doDelete', {id: id})
|
||||
console.log(resp)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
@@ -640,17 +633,28 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async getAuditStateByModule() {
|
||||
const {data} = await $.post(loc() + '/getAuditStateByModule')
|
||||
this.auditStateList = data
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initHdxxlist();
|
||||
if (this.hdxxlist && this.hdxxlist.length > 0) {
|
||||
this.pageForm.hdid = this.hdxxlist[0].value
|
||||
this.hdchange(this.pageForm.hdid)
|
||||
}
|
||||
await this.pageData();
|
||||
|
||||
this.unions = await getUnions()
|
||||
this.units = await getUnits()
|
||||
|
||||
this.unions = await getUnions(null)
|
||||
this.units = await getUnits(null)
|
||||
await this.getAuditStateByModule()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
|
||||
<el-card shadow="never">
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.hdid" clearable @change="hdchange"
|
||||
placeholder="请选择活动主题">
|
||||
<el-option v-for="o in hdxxlist" :label="o.label"
|
||||
:value="o.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.hdlb" placeholder="请选择活动类型" clearable
|
||||
@change="hdlbchange">
|
||||
<el-option v-for="o in hdlblist" :label="o.lname"
|
||||
:value="o.lid"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.zplb" placeholder="请选择作品类型" clearable>
|
||||
<el-option v-for="o in hdzplblist" :label="o.zname"
|
||||
:value="o.zid"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5" v-if="pageForm.isAudit===null">
|
||||
<el-select placeholder="审核状态" v-model="pageForm.stateId"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option label="待校工会审核" value="4200"></el-option>
|
||||
<el-option label="校工会退回" value="4250"></el-option>
|
||||
<el-option label="校工会拒绝" value="4300"></el-option>
|
||||
<el-option label="审核通过" value="4400"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card class="mt20" shadow="never">
|
||||
<vi-title2 title="作品列表">
|
||||
<template #func>
|
||||
<el-button type="primary" icon="el-icon-position" size="small" @click="openAudit" class="mr10"
|
||||
:disabled="multipleSelection.length==0">
|
||||
批量审核
|
||||
</el-button>
|
||||
<el-radio-group v-model="pageForm.isAudit" @change="doSearch" size="small">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="tableData" ref="table" @sort-change="pageOrder" row-key="id"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
reserve-selection
|
||||
:selectable="(row)=>{return row.auditState=='4200'}"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center"
|
||||
width="50">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="hdname" label="活动主题" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="username" label="教职工姓名" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdlbname" label="活动类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="zplbname" label="作品类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdsbsj" label="上传时间" header-align="center" align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="auditState" header-align="center"
|
||||
label="审核状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.stateColor">{{scope.row.stateName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" header-align="center" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="viewInfo(scope.row)">查看</el-button>
|
||||
|
||||
<el-button v-if="scope.row.auditState==='4200'"
|
||||
type="primary" size="mini"
|
||||
@click="openAudit(scope.row)">审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<info ref="info" @playvideo="playvideo"></info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<template v-if="multipleSelection.length===0">
|
||||
<info ref="info2" handle label="校工会审核" @playvideo="playvideo">
|
||||
|
||||
|
||||
<template #handle>
|
||||
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditor" label="审核人员">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditTime" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
|
||||
maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="签  字" class="is-required">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(1)">拒绝</el-button>
|
||||
<el-button @click="doReview(2)" type="warning">返回修改</el-button>
|
||||
<el-button type="primary" @click="doReview(3)">通过</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</info>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditor" label="审核人员">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditTime" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row gutter="20">
|
||||
<el-form-item>
|
||||
<el-table :data="multipleSelection" max-height="500px">
|
||||
<el-table-column prop="hdname" label="活动主题" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="username" label="教职工姓名" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdlbname" label="活动类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="zplbname" label="作品类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdsbsj" label="上传时间" header-align="center" align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
|
||||
maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="签  字" class="is-required">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(1)">拒绝</el-button>
|
||||
<el-button @click="doReview(2)" type="warning">返回修改</el-button>
|
||||
<el-button type="primary" @click="doReview(3)">通过</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :visible.sync="fileDialogVisible" class="filedialog" @close="filedialogClose"
|
||||
:close-on-click-modal="false">
|
||||
<div id="videoContainer"></div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
multipleSelection: [],
|
||||
fileDialogVisible: false,
|
||||
videoShow: false,
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
hdxxlist: [],
|
||||
hdlblist: [],
|
||||
hdzplblist: [],
|
||||
formRules: {
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': httpVueLoader('/components/hd/hdwmInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
filedialogClose() {
|
||||
//关闭的时候需要销毁video 但是随之dom元素也会被删除!!!!
|
||||
this.imgShow = false;
|
||||
this.videoShow = false;
|
||||
videojs('my-video').dispose();
|
||||
},
|
||||
playvideo(fjurl) {
|
||||
this.fileDialogVisible = true;
|
||||
this.videoShow = true;
|
||||
this.$nextTick(function () {
|
||||
let vc = document.getElementById('videoContainer');
|
||||
let newVideo = document.createElement("div");//创建一个标签
|
||||
newVideo.innerHTML = '<video id="my-video" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"></video>';
|
||||
vc.appendChild(newVideo);
|
||||
let option = {autoplay: false, language: 'zh-CN'};
|
||||
let myPlayer = videojs('my-video', option, function onPlayerReady() {
|
||||
let myPlayer = this;
|
||||
myPlayer.src({src: fjurl, type: "video/mp4"});
|
||||
/*videojs.log("播放器已经准备好了!");*/
|
||||
//this.play();
|
||||
});
|
||||
})
|
||||
},
|
||||
doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const confirm = await this.$confirm('确定要' + (flag === 1 ? '拒绝' : flag === 2 ? '退回修改' : '通过审核') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.formData.pass = flag
|
||||
this.formData.ids = JSON.stringify(this.multipleSelection.map(v => v.id))
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
if(resp.code===0){
|
||||
this.$refs.table.clearSelection()
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit()
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$refs.info2.getInfo(row.id)
|
||||
}
|
||||
const {id} = row
|
||||
this.formData = {
|
||||
id: id ? id : null,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: '同意'
|
||||
}
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
viewInfo(row) {
|
||||
this.$refs.info.getInfo(row.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
hdchange(id) {
|
||||
this.$set(this.pageForm, 'hdlb', '');
|
||||
this.$set(this.pageForm, 'zplb', '');
|
||||
$.post('/platform/hd/childhd/zpxx/gethdlblist', {id: id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
|
||||
this.hdlblist = data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
hdlbchange(id) {
|
||||
this.$set(this.pageForm, 'zplb', '');
|
||||
$.post('/platform/hd/childhd/zpxx/gethdzplblist', {id: id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
this.hdzplblist = data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
initHdxxlist() {
|
||||
$.post(base + '/platform/hd/wmhd/initHdxxlist').then(data => {
|
||||
if (data.code == 0) {
|
||||
this.hdxxlist = data.data[0].children;
|
||||
}
|
||||
});
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
this.initHdxxlist();
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,446 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
|
||||
<el-card shadow="never">
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.hdid" clearable @change="hdchange"
|
||||
placeholder="请选择活动主题">
|
||||
<el-option v-for="o in hdxxlist" :label="o.label"
|
||||
:value="o.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.hdlb" placeholder="请选择活动类型" clearable
|
||||
@change="hdlbchange">
|
||||
<el-option v-for="o in hdlblist" :label="o.lname"
|
||||
:value="o.lid"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.zplb" placeholder="请选择作品类型" clearable>
|
||||
<el-option v-for="o in hdzplblist" :label="o.zname"
|
||||
:value="o.zid"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5" v-if="pageForm.isAudit===null">
|
||||
<el-select placeholder="审核状态" v-model="pageForm.stateId"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option label="待分工会审核" value="4000"></el-option>
|
||||
<el-option label="分工会退回" value="4100"></el-option>
|
||||
<el-option label="分工会审核拒绝" value="4150"></el-option>
|
||||
<el-option label="待校工会审核" value="4200"></el-option>
|
||||
<el-option label="校工会退回" value="4250"></el-option>
|
||||
<el-option label="校工会拒绝" value="4300"></el-option>
|
||||
<el-option label="审核通过" value="4400"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card class="mt20" shadow="never">
|
||||
<vi-title2 title="作品列表">
|
||||
<template #func>
|
||||
<el-button type="primary" icon="el-icon-position" size="small" @click="openAudit" class="mr10"
|
||||
:disabled="multipleSelection.length==0">
|
||||
批量审核
|
||||
</el-button>
|
||||
<el-radio-group v-model="pageForm.isAudit" @change="doSearch" size="small">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="tableData" ref="table" @sort-change="pageOrder" row-key="id"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
reserve-selection
|
||||
:selectable="(row)=>{return row.auditState=='4000'}"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center"
|
||||
width="50">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="hdname" label="活动主题" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="username" label="教职工姓名" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdlbname" label="活动类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="zplbname" label="作品类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdsbsj" label="上传时间" header-align="center" align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="auditState" header-align="center"
|
||||
label="审核状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.stateColor">{{scope.row.stateName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" header-align="center" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="viewInfo(scope.row)">查看</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.auditState==='4000'||scope.row.auditState==='4250'"
|
||||
type="primary" size="mini"
|
||||
@click="openAudit(scope.row)">审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<info ref="info" @playvideo="playvideo"></info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<template v-if="multipleSelection.length===0">
|
||||
<info ref="info2" handle label="分工会审核" @playvideo="playvideo">
|
||||
<template #handle>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
<template v-if="multipleSelection.length>0">
|
||||
<el-table :data="multipleSelection">
|
||||
<el-table-column prop="hdname" label="活动主题" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="username" label="教职工姓名" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdlbname" label="活动类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="zplbname" label="作品类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdsbsj" label="上传时间" header-align="center" align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditor" label="审核人员">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditTime" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
|
||||
maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="签  字" class="is-required">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(1)">拒绝</el-button>
|
||||
<el-button @click="doReview(2)" type="warning">返回修改</el-button>
|
||||
<el-button type="primary" @click="doReview(3)">通过</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</info>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditor" label="审核人员">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditTime" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row gutter="20">
|
||||
<el-form-item>
|
||||
<el-table :data="multipleSelection" max-height="500px">
|
||||
<el-table-column prop="hdname" label="活动主题" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="username" label="教职工姓名" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdlbname" label="活动类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="zplbname" label="作品类别" header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdsbsj" label="上传时间" header-align="center" align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
|
||||
maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="签  字" class="is-required">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(1)">拒绝</el-button>
|
||||
<el-button @click="doReview(2)" type="warning">返回修改</el-button>
|
||||
<el-button type="primary" @click="doReview(3)">通过</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :visible.sync="fileDialogVisible" class="filedialog" @close="filedialogClose"
|
||||
:close-on-click-modal="false">
|
||||
<div id="videoContainer"></div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
multipleSelection: [],
|
||||
fileDialogVisible: false,
|
||||
videoShow: false,
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
hdxxlist: [],
|
||||
hdlblist: [],
|
||||
hdzplblist: [],
|
||||
formRules: {
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': httpVueLoader('/components/hd/hdwmInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const confirm = await this.$confirm('确定要' + (flag === 1 ? '拒绝' : flag === 2 ? '退回修改' : '通过审核') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.formData.pass = flag
|
||||
this.formData.ids = JSON.stringify(this.multipleSelection.map(v => v.id))
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
if(resp.code===0){
|
||||
this.$refs.table.clearSelection()
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit()
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$refs.info2.getInfo(row.id)
|
||||
}
|
||||
const {id} = row
|
||||
this.formData = {
|
||||
id: id ? id : null,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: '同意'
|
||||
}
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
viewInfo(row) {
|
||||
this.$refs.info.getInfo(row.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
hdchange(id) {
|
||||
this.$set(this.pageForm, 'hdlb', '');
|
||||
this.$set(this.pageForm, 'zplb', '');
|
||||
$.post('/platform/hd/childhd/zpxx/gethdlblist', {id: id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
|
||||
this.hdlblist = data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
hdlbchange(id) {
|
||||
this.$set(this.pageForm, 'zplb', '');
|
||||
$.post('/platform/hd/childhd/zpxx/gethdzplblist', {id: id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
this.hdzplblist = data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
initHdxxlist() {
|
||||
$.post(base + '/platform/hd/wmhd/initHdxxlist').then(data => {
|
||||
if (data.code == 0) {
|
||||
this.hdxxlist = data.data[0].children;
|
||||
}
|
||||
});
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
filedialogClose() {
|
||||
//关闭的时候需要销毁video 但是随之dom元素也会被删除!!!!
|
||||
this.imgShow = false;
|
||||
this.videoShow = false;
|
||||
videojs('my-video').dispose();
|
||||
},
|
||||
playvideo(fjurl) {
|
||||
this.fileDialogVisible = true;
|
||||
this.videoShow = true;
|
||||
this.$nextTick(function () {
|
||||
let vc = document.getElementById('videoContainer');
|
||||
let newVideo = document.createElement("div");//创建一个标签
|
||||
newVideo.innerHTML = '<video id="my-video" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"></video>';
|
||||
vc.appendChild(newVideo);
|
||||
let option = {autoplay: false, language: 'zh-CN'};
|
||||
let myPlayer = videojs('my-video', option, function onPlayerReady() {
|
||||
let myPlayer = this;
|
||||
myPlayer.src({src: fjurl, type: "video/mp4"});
|
||||
/*videojs.log("播放器已经准备好了!");*/
|
||||
//this.play();
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
this.initHdxxlist();
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -186,90 +186,124 @@ layout("/layouts/platform.html"){
|
||||
</style>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<link href="${base!}/assets/platform/plugins/video/css/video-js.min.css" rel="stylesheet">
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.hdid" clearable @change="hdchange" placeholder="请选择活动主题">
|
||||
<el-option v-for="o in hdxxlist" :label="o.label" :value="o.value"></el-option>
|
||||
<el-date-picker @change="yearChange"
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select @change="hdchange" clearable placeholder="请选择活动主题"
|
||||
v-model="pageForm.hdid">
|
||||
<el-option :label="o.label" :value="o.value"
|
||||
v-for="o in hdxxlist"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.hdlb" placeholder="请选择活动类型" clearable @change="hdlbchange">
|
||||
<el-option v-for="o in hdlblist" :label="o.lname" :value="o.lid"></el-option>
|
||||
<el-select @change="hdlbchange" clearable placeholder="请选择活动类别"
|
||||
v-model="pageForm.hdlb">
|
||||
<el-option :label="o.lname" :value="o.lid"
|
||||
v-for="o in hdlblist"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.zplb" placeholder="请选择作品类型" clearable>
|
||||
<el-option v-for="o in hdzplblist" :label="o.zname" :value="o.zid"></el-option>
|
||||
<el-select clearable placeholder="请选择作品类型" v-model="pageForm.zplb">
|
||||
<el-option :label="o.zname" :value="o.zid"
|
||||
v-for="o in hdzplblist"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button @click="openAdd">上传作品</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt20" shadow="never">
|
||||
<vi-title2 title="作品列表">
|
||||
<template #func>
|
||||
<el-button @click="openAdd" size="small" type="primary">上传作品</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center" width="50">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="50">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="hdname" label="活动主题" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="活动主题" prop="hdname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="hdsbzpzt" label="作品主题" header-align="center" align="center"-->
|
||||
<!-- show-overflow-tooltip></el-table-column>-->
|
||||
<el-table-column prop="sbrname" label="教职工姓名" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="教职工姓名"
|
||||
prop="sbrname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="loginname" label="工资号" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="loginname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="dwname" label="单位" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="单位" prop="dwname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ghname" label="分工会" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="分工会" prop="ghname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="hdlbname" label="活动类别" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="活动类别"
|
||||
prop="hdlbname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="zplbname" label="作品类别" header-align="center" align="center"
|
||||
show-overflow-tooltip></el-table-column>-->
|
||||
<el-table-column prop="hdsbsj" label="上传时间" header-align="center" align="center"
|
||||
<el-table-column align="center" header-align="center" label="作品类别"
|
||||
prop="zplbname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="上传时间" prop="hdsbsj"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="auditState" sortable>
|
||||
<template scope="scope">
|
||||
{{moment(scope.row.hdsbsj).format('YYYY-MM-DD')}}
|
||||
<span :style="'color:'+scope.row.statecolor">{{scope.row.statename}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" header-align="center" align="center" width="300">
|
||||
<!-- <el-table-column align="center" header-align="center" label="总点赞数"
|
||||
prop="dz_znum" sortable>
|
||||
<template scope="scope">
|
||||
{{scope.row.dz_znum}}次
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column align="center" header-align="center" label="操作" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="viewInfo(scope)">查看</el-button>
|
||||
<el-button v-if="currenttime<scope.row.hdjssj" type="primary" size="mini"
|
||||
@click="openEdit(scope)">
|
||||
<el-button @click="viewInfo(scope)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<!-- v-if="scope.row.auditstate==='3999'||scope.row.auditstate==='4100'||scope.row.auditstate==='4250'"-->
|
||||
<el-button :disabled="scope.row.auditstate!=='3999'"
|
||||
@click="openEdit(scope)" size="mini"
|
||||
type="primary">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-if="currenttime<scope.row.hdjssj" type="danger" size="mini"
|
||||
@click="dodelete(scope.row.id)">删除
|
||||
<el-button :disabled="scope.row.auditstate!=='3999'"
|
||||
@click="dodelete(scope.row.id)"
|
||||
size="mini"
|
||||
type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -278,318 +312,204 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="AddFormData" label-width="120px" :rules="rules" ref="AddForm">
|
||||
<el-form :model="AddFormData" :rules="rules" label-width="120px" ref="AddForm">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<div class="form-item-container">
|
||||
<el-form-item prop="loginname" label="工资号">
|
||||
<el-input value="${@shiro.getPrincipalProperty('loginname')}" readonly></el-input>
|
||||
<el-form-item label="工号" prop="loginname">
|
||||
<el-input readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="username" label="姓名">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}" readonly></el-input>
|
||||
<el-form-item label="姓名" prop="username">
|
||||
<el-input readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-item-container">
|
||||
<el-form-item prop="ghname" label="所属工会">
|
||||
<el-input v-model="currentUserGhname" readonly></el-input>
|
||||
<el-form-item label="所属工会" prop="ghname">
|
||||
<el-input readonly v-model="currentUserGhname"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="mobile" label="手机号码">
|
||||
<el-form-item label="手机号码" prop="mobile">
|
||||
<el-input v-model="AddFormData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-divider content-position="left">活动信息</el-divider>
|
||||
<div class="form-item-container">
|
||||
<el-form-item prop="hdid" label="活动主题">
|
||||
<el-select v-model="AddFormData.hdid" style="width: 100%" @change="formhdchange">
|
||||
<el-option v-for="o in formhdxxlist" :label="o.label" :value="o.value"
|
||||
:key="o.value">
|
||||
<el-form-item label="活动主题" prop="hdid">
|
||||
<el-select @change="formhdchange" style="width: 100%"
|
||||
v-model="AddFormData.hdid">
|
||||
<el-option :key="o.hdid" :label="o.hdname" :value="o.hdid"
|
||||
v-for="o in formhdxxlist">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdlb" label="活动类别">
|
||||
<el-select v-model="AddFormData.hdzplx" style="width: 100%" @change="formhdlbchange">
|
||||
<el-option v-for="o in formhdlblist" :label="o.lname" :value="o.lid"></el-option>
|
||||
<el-form-item label="活动类别" prop="hdzplx">
|
||||
<el-select @change="formhdlbchange" style="width: 100%"
|
||||
v-model="AddFormData.hdzplx">
|
||||
<el-option :label="o.lname" :value="o.lid"
|
||||
v-for="o in formhdlblist"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-item-container">
|
||||
|
||||
<!-- <el-form-item prop="zpzt" label="作品主题">
|
||||
<el-input v-model="AddFormData.hdsbzpzt"></el-input>
|
||||
</el-form-item>-->
|
||||
<el-form-item prop="step_count" label="健步走步数">
|
||||
<el-input-number style="width: 100%" v-model="AddFormData.step_count"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item prop="zplb" label="作品类别" v-if="formhdzplblist&&formhdzplblist.length>0">
|
||||
<el-select v-model="AddFormData.hdzplx2" style="width: 100%">
|
||||
<el-option v-for="o in formhdzplblist" :label="o.zname" :value="o.zid" :key="o.zid"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="zpms" label="作品描述/介绍">
|
||||
<el-input type="textarea" v-model="AddFormData.hdsbzpms"></el-input>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left">作品信息</el-divider>
|
||||
<el-form-item label="照片">
|
||||
<el-upload
|
||||
name="picturefile"
|
||||
:file-list="picturelist"
|
||||
:auto-upload="false"
|
||||
action=""
|
||||
list-type="picture-card"
|
||||
limit="5"
|
||||
:on-exceed="pictureExceed"
|
||||
:on-change="pictureChange">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="音/视频、文档">
|
||||
<el-upload
|
||||
name="vadfile"
|
||||
:file-list="vadlist"
|
||||
:auto-upload="false"
|
||||
action=""
|
||||
limit="5"
|
||||
:on-change="vadChange">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<!-- <el-form-item prop="step_count" label="健步走步数">
|
||||
<el-input-number style="width: 100%" v-model="AddFormData.step_count"></el-input-number>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="类别" prop="hdzplx2">
|
||||
<el-select @change="changeHdzplx2" style="width: 100%"
|
||||
v-model="AddFormData.hdzplx2">
|
||||
<el-option :key="o.zid" :label="o.zname" :value="o.zid"
|
||||
v-for="o in formhdzplblist"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题" prop="zpmc">
|
||||
<el-input v-model="AddFormData.zpmc"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="创作说明" prop="hdsbzpms">
|
||||
<el-input :maxlength="zplb2Config.maxWordCount" show-word-limit
|
||||
type="textarea" v-model="AddFormData.hdsbzpms"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther">
|
||||
<el-divider content-position="left">作品信息</el-divider>
|
||||
<el-form-item label="照片" required v-if="zplb2Config.isUploadPhoto">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:file-list="picturelist"
|
||||
:limit="zplb2Config.photoNum"
|
||||
:on-change="pictureChange"
|
||||
:on-exceed="pictureExceed"
|
||||
action=""
|
||||
list-type="picture-card"
|
||||
name="picturefile">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="音/视频、文档" v-if="zplb2Config.isUploadOther">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:file-list="vadlist"
|
||||
:limit="zplb2Config.otherFileNum"
|
||||
:on-change="vadChange"
|
||||
:on-exceed="vadExceed"
|
||||
action=""
|
||||
name="vadfile">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
<el-button @click="doAdd(false)">保 存</el-button>
|
||||
<el-button @click="doAdd(true)" type="primary">提 交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<table style="width: 100%">
|
||||
<tr style="border: 1px solid rgb(220, 220, 220);">
|
||||
<td colspan="4"
|
||||
style="text-align: center;padding: 10px;background-color: #0e78c5;color: white;font-size: 18px;font-weight:500">
|
||||
作品信息
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">姓名</td>
|
||||
<td class="tpb">{{viewData.sbrname}}</td>
|
||||
<td class="tpa">工资号</td>
|
||||
<td class="tpb">{{viewData.loginname}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">单位</td>
|
||||
<td class="tpb">{{viewData.dwname}}</td>
|
||||
<td class="tpa">工会</td>
|
||||
<td class="tpb">{{viewData.ghname}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">活动类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{viewData.hdlbname}}</span>
|
||||
</td>
|
||||
<template v-if="viewData.zplbname">
|
||||
<td class="tpa">作品类别</td>
|
||||
<td class="tpb">
|
||||
<span>{{viewData.zplbname}}</span>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td class="tpa">健步走步数</td>
|
||||
<td class="tpb">
|
||||
<span>{{viewData.step_count}}</span>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
<!-- <tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品主题</td>
|
||||
<td class="tpb" colspan="3">{{viewData.hdsbzpzt}}</td>
|
||||
</tr>-->
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品描述</td>
|
||||
<td class="tpb" colspan="3">{{viewData.hdsbzpms}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">作品信息</td>
|
||||
<td class="tpb" colspan="3">
|
||||
<el-row>
|
||||
<el-divider>照片 <i class="el-icon-picture-outline"></i></el-divider>
|
||||
<file-upload view :files="img2List"></file-upload>
|
||||
<!-- <div style="text-align: left;" v-if="img2List.length>0">
|
||||
<div v-for="item in img2List"
|
||||
style="display: inline-block;width: 100px;margin-right:10px">
|
||||
<div class="file-down-span" @click="downLoad(item)">
|
||||
<i class="el-icon-download"></i>
|
||||
</div>
|
||||
<el-image lazy :z-index="999999999"
|
||||
style="width: 100px;height: 100px;"
|
||||
:src="item.url"
|
||||
:preview-src-list="prevImgList">
|
||||
</el-image>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有照片。
|
||||
</div>-->
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>视频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="videoList.length>0">
|
||||
<div v-for="item in videoList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab">
|
||||
<div class="video-toggle-i"
|
||||
@click="playVideo(APP_DOMAIN + '/file_server/fileStreamPreview?id=' + item.id)">
|
||||
<i class="el-icon-video-camera-solid"></i>
|
||||
<i class="el-icon-video-play"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="location.href='/file_server/download?filepath=' + item.filepath + '&filename=' + item.filename">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有视频。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>音频 <i class="el-icon-video-camera"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="audioList.length>0">
|
||||
<div v-for="item in audioList">
|
||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
||||
<!-- <source :src="'${AppFileDomain!}'+item.filepath"/>-->
|
||||
<source :src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + item.id"/>
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有音频。
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-divider>文档 <i class="el-icon-document-copy"></i></el-divider>
|
||||
<div style="text-align: left;" v-if="docList.length>0">
|
||||
<div v-for="item in docList">
|
||||
<el-tooltip class="item" effect="dark" placement="right-start">
|
||||
<div slot="content">{{item.fjname}}</div>
|
||||
<div class="view-myvideo-tab" style="background-color: #f6f6f6">
|
||||
<div class="video-toggle-i" @click="dd3s.preview(item.filepath,item.id)">
|
||||
<i class="el-icon-document"></i>
|
||||
</div>
|
||||
|
||||
<span class="file-down-span"
|
||||
style="bottom: 0;height: 20px;display: inline-block;"
|
||||
@click="location.href='/file_server/download?filepath=' + item.filepath + '&filename=' + item.filename">
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有文档。
|
||||
</div>
|
||||
</el-row>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<info @playvideo="playvideo" ref="info"></info>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<el-form :model="EditFormData" label-width="120px" :rules="rules" ref="EditForm">
|
||||
<el-form :model="EditFormData" :rules="rules" label-width="120px" ref="EditForm">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<div class="form-item-container">
|
||||
<el-form-item prop="loginname" label="工资号">
|
||||
<el-input value="${@shiro.getPrincipalProperty('loginname')}" readonly></el-input>
|
||||
<el-form-item label="工号" prop="loginname">
|
||||
<el-input readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="username" label="姓名">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}" readonly></el-input>
|
||||
<el-form-item label="姓名" prop="username">
|
||||
<el-input readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-item-container">
|
||||
<el-form-item prop="ghname" label="所属工会">
|
||||
<el-input v-model="currentUserGhname" readonly></el-input>
|
||||
<el-form-item label="所属工会" prop="ghname">
|
||||
<el-input readonly v-model="currentUserGhname"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="mobile" label="手机号码">
|
||||
<el-form-item label="手机号码" prop="mobile">
|
||||
<el-input v-model="EditFormData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-divider content-position="left">活动信息</el-divider>
|
||||
|
||||
<div class="form-item-container">
|
||||
<el-form-item prop="hdid" label="活动主题">
|
||||
<el-select v-model="EditFormData.hdid" style="width: 100%" @change="formhdchange">
|
||||
<el-option v-for="o in formhdxxlist" :label="o.label" :value="o.value"
|
||||
:key="o.value">{{o}}
|
||||
<el-form-item label="活动主题" prop="hdid">
|
||||
<el-select @change="formhdchange" style="width: 100%"
|
||||
v-model="EditFormData.hdid">
|
||||
<el-option :key="o.hdid" :label="o.hdname" :value="o.hdid"
|
||||
v-for="o in formhdxxlist">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="hdlb" label="活动类别">
|
||||
<el-select v-model="EditFormData.hdzplx" style="width: 100%" @change="formhdlbchange">
|
||||
<el-option v-for="o in formhdlblist" :label="o.lname" :value="o.lid"></el-option>
|
||||
<el-form-item label="活动类别" prop="hdzplx">
|
||||
<el-select @change="formhdlbchange" style="width: 100%"
|
||||
v-model="EditFormData.hdzplx">
|
||||
<el-option :label="o.lname" :value="o.lid"
|
||||
v-for="o in formhdlblist"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- <el-form-item prop="zpzt" label="作品主题">
|
||||
<el-input v-model="EditFormData.hdsbzpzt"></el-input>
|
||||
</el-form-item>-->
|
||||
<el-form-item prop="step_count" label="健步走步数">
|
||||
<el-input-number style="width: 100%" v-model="EditFormData.step_count"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item prop="zplb" label="作品类别" v-if="formhdzplblist&&formhdzplblist.length>0">
|
||||
<el-select v-model="EditFormData.hdzplx2" style="width: 100%">
|
||||
<el-option v-for="o in formhdzplblist" :label="o.zname" :value="o.zid" :key="o.zid"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="zpms" label="作品描述/介绍">
|
||||
<el-input type="textarea" v-model="EditFormData.hdsbzpms"></el-input>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left">作品信息</el-divider>
|
||||
<el-form-item label="照片">
|
||||
<el-upload
|
||||
name="picturefile"
|
||||
:file-list="picturelist"
|
||||
:auto-upload="false"
|
||||
action=""
|
||||
list-type="picture-card"
|
||||
limit="5"
|
||||
:on-remove="pictureRemove"
|
||||
:on-exceed="pictureExceed"
|
||||
:on-change="pictureChange">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="音/视频、文档">
|
||||
<el-upload
|
||||
name="vadfile"
|
||||
:file-list="vadlist"
|
||||
:auto-upload="false"
|
||||
action=""
|
||||
limit="5"
|
||||
:on-remove="vadRemove"
|
||||
:on-change="vadChange">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<div class="form-item-container">
|
||||
<el-form-item label="类别" prop="hdzplx2"
|
||||
v-if="formhdzplblist&&formhdzplblist.length>0">
|
||||
<el-select @change="changeHdzplx2" style="width: 100%"
|
||||
v-model="EditFormData.hdzplx2">
|
||||
<el-option :key="o.zid" :label="o.zname" :value="o.zid"
|
||||
v-for="o in formhdzplblist"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题" prop="zpmc">
|
||||
<el-input v-model="EditFormData.zpmc"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="创作说明" prop="hdsbzpms">
|
||||
<el-input :maxlength="zplb2Config.maxWordCount" show-word-limit
|
||||
type="textarea" v-model="EditFormData.hdsbzpms"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther">
|
||||
<el-divider content-position="left">作品信息</el-divider>
|
||||
<el-form-item label="照片" required v-if="zplb2Config.isUploadPhoto">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:file-list="picturelist"
|
||||
:limit="zplb2Config.photoNum"
|
||||
:on-change="pictureChange"
|
||||
:on-exceed="pictureExceed"
|
||||
:on-remove="pictureRemove"
|
||||
action=""
|
||||
list-type="picture-card"
|
||||
name="picturefile">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="音/视频、文档" v-if="zplb2Config.isUploadOther">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:file-list="vadlist"
|
||||
:limit="zplb2Config.otherFileNum"
|
||||
:on-change="vadChange"
|
||||
:on-remove="vadRemove"
|
||||
action=""
|
||||
name="vadfile">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="editDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
<el-button @click="doEdit(false)">保 存</el-button>
|
||||
<el-button @click="doEdit(true)" type="primary">提 交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="fileDialogVisible" class="filedialog" @close="filedialogClose"
|
||||
:close-on-click-modal="false">
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="fileDialogVisible"
|
||||
@close="filedialogClose"
|
||||
class="filedialog">
|
||||
<div id="videoContainer"></div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -598,8 +518,10 @@ layout("/layouts/platform.html"){
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
hdid: GetQueryString("hdid"),
|
||||
editDialogVisible: false,
|
||||
picturelist: [],
|
||||
PicturedialogVisible: false,
|
||||
@@ -609,6 +531,7 @@ layout("/layouts/platform.html"){
|
||||
hasSuperAdminRole: "${@shiro.hasRole('sysadmin')}" === 'true' ? true : false,
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + '',
|
||||
hdid: '',
|
||||
hdlb: '',
|
||||
zplb: '',
|
||||
@@ -626,7 +549,7 @@ layout("/layouts/platform.html"){
|
||||
viewData: {},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
|
||||
doctype: ['doc', 'docx'],
|
||||
doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
prevImgList: [],
|
||||
img2List: [],
|
||||
@@ -637,28 +560,55 @@ layout("/layouts/platform.html"){
|
||||
hdlblist: [],
|
||||
hdzplblist: [],
|
||||
addDialogVisible: false,
|
||||
AddFormData: {
|
||||
znnl: 1,
|
||||
znxb: '男',
|
||||
mobile: ''
|
||||
},
|
||||
AddFormData: {},
|
||||
formhdlblist: [],
|
||||
formhdzplblist: [],
|
||||
rules: {
|
||||
hdid: [{required: true, message: '请选择活动主题', trigger: ['blur', 'change']}],
|
||||
hdzplx: [{required: true, message: '请选择活动类别', trigger: ['blur', 'change']}],
|
||||
hdzplx2: [{required: true, message: '请选择作品类别', trigger: ['blur', 'change']}],
|
||||
zpmc: [{required: true, message: '请填写作品标题', trigger: ['blur', 'change']}],
|
||||
hdsbzpzt: [{required: true, message: '请填写作品主题', trigger: ['blur', 'change']}],
|
||||
hdsbzpms: [{required: true, message: '请填写创作说明', trigger: ['blur', 'change']}],
|
||||
},
|
||||
EditFormData: {},
|
||||
readytodelfile: [],
|
||||
formhdxxlist: []
|
||||
formhdxxlist: [],
|
||||
yearActivityList: [],
|
||||
zplb2Config: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': httpVueLoader('/components/hd/hdwmInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
|
||||
changeHdzplx2(id) {
|
||||
this.zplb2Config = this.formhdzplblist.find(v => v.zid === id)
|
||||
},
|
||||
yearChange(val) {
|
||||
let activityList = []
|
||||
if (val === null) {
|
||||
this.yearActivityList.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
} else {
|
||||
let enen = this.yearActivityList.filter(v => v.value == val)
|
||||
enen.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
}
|
||||
|
||||
this.hdxxlist = activityList
|
||||
this.$set(this.pageForm, "hdid", null)
|
||||
this.$set(this.pageForm, "hdlb", null)
|
||||
this.$set(this.pageForm, "zplb", null)
|
||||
},
|
||||
formhdchange(id) {
|
||||
this.$set(this.AddFormData, 'hdlb', '');
|
||||
this.$set(this.AddFormData, 'zplb', '');
|
||||
this.$set(this.AddFormData, 'hdzplx', null);
|
||||
this.$set(this.AddFormData, 'hdzplx2', null);
|
||||
this.$set(this.EditFormData, 'hdzplx', null);
|
||||
this.$set(this.EditFormData, 'hdzplx2', null);
|
||||
$.post('/platform/hd/childhd/zpxx/gethdlblist', {id: id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
this.formhdlblist = data.data;
|
||||
@@ -666,47 +616,83 @@ layout("/layouts/platform.html"){
|
||||
});
|
||||
},
|
||||
formhdlbchange(id) {
|
||||
this.$set(this.AddFormData, 'zplb', '');
|
||||
$.post('/platform/hd/childhd/zpxx/gethdzplblist', {id: id}).then(data => {
|
||||
this.$set(this.AddFormData, 'hdzplx2', null);
|
||||
$.post('/platform/hd/jzghd/sczp/gethdzplblist', {id: id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
this.formhdzplblist = data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
pictureExceed() {
|
||||
this.$message.warning('照片最多上传5张');
|
||||
this.$message.warning('照片最多上传' + this.zplb2Config.photoNum + '张');
|
||||
},
|
||||
vadExceed() {
|
||||
this.$message.warning('音/视频、文档最多上传' + this.zplb2Config.otherFileNum + '个');
|
||||
},
|
||||
pictureChange(file, fileList) {
|
||||
this.picturelist = fileList;
|
||||
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1).toLowerCase();
|
||||
const whiteList = this.zplb2Config.photoType
|
||||
if (!whiteList.includes(fileSuffix)) {
|
||||
this.picturelist = []
|
||||
this.$message.warning('上传照片只能是' + whiteList.join(',') + '格式')
|
||||
return false
|
||||
}
|
||||
this.picturelist = fileList
|
||||
},
|
||||
pictureRemove(file, fileList) {
|
||||
if (file.status === 'success') {
|
||||
const length = file.url.length - FILE_DOMAIN.length
|
||||
const length = file.url.lastIndexOf("=") + 1
|
||||
this.readytodelfile.push(file.url.substring(length));
|
||||
this.picturelist.map(v => {
|
||||
const length = v.url.lastIndexOf("=") + 1
|
||||
v.urlId = v.url.substring(length);
|
||||
})
|
||||
this.picturelist = this.picturelist.filter(v => v.urlId !== file.url.substring(length))
|
||||
}
|
||||
},
|
||||
vadChange(file, fileList) {
|
||||
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1).toLowerCase();
|
||||
const whiteList = this.zplb2Config.otherType
|
||||
if (!whiteList.includes(fileSuffix)) {
|
||||
this.vadlist = []
|
||||
this.$message.warning('上传音/视频、文档只能是' + whiteList.join(',') + '格式')
|
||||
return false
|
||||
}
|
||||
this.vadlist = fileList;
|
||||
},
|
||||
vadRemove(file, fileList) {
|
||||
if (file.status === 'success') {
|
||||
const length = file.url.length - FILE_DOMAIN.length
|
||||
const length = file.url.lastIndexOf("=") + 1
|
||||
this.readytodelfile.push(file.url.substring(length));
|
||||
this.vadlist.map(v => {
|
||||
const length = v.url.lastIndexOf("=") + 1
|
||||
v.urlId = v.url.substring(length);
|
||||
})
|
||||
this.vadlist = this.vadlist.filter(v => v.urlId !== file.url.substring(length))
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
if (this.$refs['AddForm']) {
|
||||
this.$refs['AddForm'].resetFields();
|
||||
}
|
||||
this.AddFormData = {}
|
||||
this.zplb2Config = {}
|
||||
this.AddFormData.mobile = "${@shiro.getPrincipalProperty('mobile')}";
|
||||
if (this.formhdxxlist.find(v => v.hdid === this.hdid)) {
|
||||
this.AddFormData.hdid = this.hdid;
|
||||
} else if (this.pageForm.hdid) {
|
||||
this.AddFormData.hdid = this.pageForm.hdid;
|
||||
}
|
||||
this.formhdchange(this.AddFormData.hdid)
|
||||
this.picturelist = [];
|
||||
this.vadlist = [];
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['AddForm']) {
|
||||
this.$refs['AddForm'].resetFields();
|
||||
}
|
||||
},
|
||||
doAdd() {
|
||||
doAdd(flag) {
|
||||
this.$refs['AddForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.picturelist.length === 0 && this.vadlist.length === 0) {
|
||||
if (flag && ((this.zplb2Config.isUploadPhoto && this.picturelist.length === 0) ||
|
||||
(this.zplb2Config.isUploadOther && this.vadlist.length === 0))) {
|
||||
this.$message.warning('请上传您的作品');
|
||||
return;
|
||||
}
|
||||
@@ -717,6 +703,7 @@ layout("/layouts/platform.html"){
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let formdata = new FormData();
|
||||
formdata.append("flag", flag);
|
||||
formdata.append("data", JSON.stringify(this.AddFormData));
|
||||
this.picturelist.forEach(val => {
|
||||
formdata.append("file", val.raw);
|
||||
@@ -748,7 +735,7 @@ layout("/layouts/platform.html"){
|
||||
this.readytodelfile = [];
|
||||
this.picturelist = [];
|
||||
this.vadlist = [];
|
||||
this.$refs.guava.public()
|
||||
|
||||
$.post('/platform/hd/wmhd/findOne', {id: scope.row.id}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.formhdlblist = res.data.hdlblist;
|
||||
@@ -756,21 +743,26 @@ layout("/layouts/platform.html"){
|
||||
this.EditFormData = res.data;
|
||||
this.EditFormData.hdzplx = res.data.hdzplx ? res.data.hdzplx.toString() : "";
|
||||
this.EditFormData.hdzplx2 = res.data.hdzplx2 ? res.data.hdzplx2.toString() : "";
|
||||
this.changeHdzplx2(this.EditFormData.hdzplx2)
|
||||
res.data.piclist.forEach(v => {
|
||||
this.picturelist.push({url: APP_DOMAIN + '/file_server/fileStreamPreview?id=' + v.id})
|
||||
})
|
||||
this.vadlist = res.data.vadlist;
|
||||
}
|
||||
});
|
||||
this.$refs.guava.public()
|
||||
|
||||
|
||||
},
|
||||
doEdit() {
|
||||
doEdit(flag) {
|
||||
this.$refs['EditForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.picturelist.length === 0 && this.vadlist.length === 0) {
|
||||
if (flag && ((this.zplb2Config.isUploadPhoto && this.picturelist.length === 0) ||
|
||||
(this.zplb2Config.isUploadOther && this.vadlist.length === 0))) {
|
||||
this.$message.warning('请上传您的作品');
|
||||
return;
|
||||
}
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '上传中',
|
||||
@@ -778,6 +770,7 @@ layout("/layouts/platform.html"){
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let formdata = new FormData();
|
||||
formdata.append("flag", flag);
|
||||
formdata.append("data", JSON.stringify(this.EditFormData));
|
||||
formdata.append("readytodelfile", JSON.stringify(this.readytodelfile));
|
||||
this.picturelist.forEach(val => {
|
||||
@@ -835,36 +828,10 @@ layout("/layouts/platform.html"){
|
||||
this.pageData();
|
||||
},
|
||||
viewInfo(scope) {
|
||||
this.img2List = [];
|
||||
this.prevImgList = [];
|
||||
this.videoList = [];
|
||||
this.audioList = [];
|
||||
this.docList = [];
|
||||
this.viewData = scope.row;
|
||||
$.post(base + '/platform/hd/wmhd/findOneById', {id: scope.row.id}).then(data => {
|
||||
if (data.code == 0) {
|
||||
data.data.forEach(val => {
|
||||
val.fjname = val.filename
|
||||
val.fjurl = val.filepath
|
||||
val.url = '${AppFileDomain!}' + val.filepath
|
||||
let filetype = val.fjname.substring(val.fjname.lastIndexOf('.') + 1, val.fjname.length).toLowerCase();
|
||||
if (this.videotype.indexOf(filetype) > -1) {
|
||||
this.videoList.push(val);
|
||||
} else if (this.imgtype.indexOf(filetype) > -1) {
|
||||
this.prevImgList.push('${AppFileDomain!}' + val.filepath)
|
||||
this.img2List.push(val);
|
||||
} else if (this.doctype.indexOf(filetype) > -1) {
|
||||
this.docList.push(val);
|
||||
} else if (this.audiotype.indexOf(filetype) > -1) {
|
||||
this.audioList.push(val);
|
||||
}
|
||||
});
|
||||
// this.viewDialogVisible = true
|
||||
this.$refs.guava.view()
|
||||
}
|
||||
});
|
||||
this.$refs.info.getInfo(scope.row.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
playVideo(fjurl) {
|
||||
playvideo(fjurl) {
|
||||
this.fileDialogVisible = true;
|
||||
this.videoShow = true;
|
||||
this.$nextTick(function () {
|
||||
@@ -897,7 +864,12 @@ layout("/layouts/platform.html"){
|
||||
initHdxxlist() {
|
||||
$.post(base + '/platform/hd/wmhd/initHdxxlist').then(data => {
|
||||
if (data.code == 0) {
|
||||
this.hdxxlist = data.data[0].children;
|
||||
this.yearActivityList = data.data
|
||||
let activityList = []
|
||||
data.data.map(v => {
|
||||
activityList = activityList.concat(v.children)
|
||||
})
|
||||
this.hdxxlist = activityList
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -940,20 +912,25 @@ layout("/layouts/platform.html"){
|
||||
this.currentUserGhname = data;
|
||||
});
|
||||
},
|
||||
initformHdxxlist() {
|
||||
$.post('/platform/hd/wmhd/initHdxxlist').then(data => {
|
||||
this.formhdxxlist = data.data[0].children;
|
||||
});
|
||||
async getUserActivityGroup() {
|
||||
const {data} = await $.post("/platform/hd/wmhdMange/getUserActivityGroup")
|
||||
this.formhdxxlist = data.filter(v => v.hdflag)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initHdxxlist();
|
||||
this.initformHdxxlist();
|
||||
this.getUserActivityGroup();
|
||||
this.pageData();
|
||||
this.getCurrentUserGhname();
|
||||
if (this.hdid) {
|
||||
setTimeout(() => {
|
||||
this.openAdd()
|
||||
}, 500)
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -1,306 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!-- 在线答题-答题页面 -->
|
||||
<style>
|
||||
#qsmEditor .w-e-text-container {
|
||||
height: 450px !important;
|
||||
}
|
||||
|
||||
#qsmEditor div {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #409EFF;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.inputParent input {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgb(220, 223, 230);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.issueList > .el-table__header-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.issueList .el-table__expanded-cell {
|
||||
background-color: rgb(250, 250, 250) !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<el-row class="transition-row">
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='index'" class="transition-item">
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
||||
<template slot="prepend">试卷名称</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button icon="el-icon-search" @click="doSearch"
|
||||
style="background-color:#409eff;color: white;"></el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData" size="medium" header-align="center" align="center" style="width: 100%">
|
||||
<el-table-column
|
||||
label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="试卷名称" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="explain_txt" label="说明" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<span v-html="scope.row.explain_txt"></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="answer_start_time" label="答题时间" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.row.answer_start_time}}-{{scope.row.answer_end_time}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="answer_num" label="答题次数" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="fraction" label="分值" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="操作" header-align="center" align="center" width="200px">
|
||||
<template scope="scope">
|
||||
<el-button type="primary" plain size="small" @click="openAdd(scope.row)">开始答题
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- 答题 -->
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='add'" class="transition-item">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'"
|
||||
style="font-size: 18px">返回
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div style="padding: 0 5%; height:calc(100vh - 150px);overflow-y: scroll">
|
||||
<div style="padding-left: 20px;padding-right: 20px">
|
||||
<el-row style="text-align: center;margin-bottom: 20px">
|
||||
<h2>{{viewData.name}}</h2>
|
||||
<span style="color: rgb(120,120,120)">考试时间:{{viewData.answer_start_time}} - {{viewData.answer_end_time}}</span>
|
||||
<span style="color: rgb(120,120,120)">分值:({{viewData.fraction}})</span>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<div v-html="viewData.explain_txt"></div>
|
||||
</el-row>
|
||||
|
||||
<el-row v-for="sub,idx in viewData.subjects"
|
||||
style="border-bottom: 1px solid rgb(200,200,200);padding: 20px 0;margin-bottom: 20px">
|
||||
<el-col :span="1">
|
||||
<span style="font-weight: bolder;color: rgb(120,120,120)">第 {{idx+1}} 题:</span>
|
||||
</el-col>
|
||||
<el-col :span="23">
|
||||
<el-row>
|
||||
<div v-html="sub.name" style="display: inline-block"></div>
|
||||
<span style="color: rgb(180,180,180)" v-if="sub.type==1">[单选题]</span>
|
||||
<span style="color: rgb(180,180,180)" v-if="sub.type==2">[多选题]</span>
|
||||
</el-row>
|
||||
|
||||
<el-checkbox-group v-model="sub.val">
|
||||
<el-row v-for="ans in sub.answer">
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-radio v-if="sub.type==1" :label="ans.id" v-model="sub.val">
|
||||
{{ans.option_txt}}
|
||||
</el-radio>
|
||||
|
||||
<el-checkbox v-if="sub.type==2" :label="ans.id">{{ans.option_txt}}
|
||||
</el-checkbox>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="width: 100%;text-align: center;margin-top: 30px">
|
||||
<el-button type="primary" @click="doAdd" style="width: 70%">提交试卷</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
},
|
||||
tableData: [],
|
||||
formData: [],
|
||||
viewData: {},
|
||||
v: 'index',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd(row) {
|
||||
this.formData = []
|
||||
/*if (moment().format("HH:mm:ss") < row.answer_start_time) {
|
||||
this.$message.warning("未到答题时间")
|
||||
return
|
||||
} else if (moment().format("HH:mm:ss") > row.answer_end_time) {
|
||||
this.$message.warning("答题时间已过")
|
||||
return
|
||||
}*/
|
||||
|
||||
$.get("/platform/hd/zxdt/answer/findOne", {id: row.id}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (!data) {
|
||||
this.$message.warning("您今日的答题次数已用完")
|
||||
return
|
||||
}
|
||||
if (code == 0) {
|
||||
data.subjects.forEach(v => {
|
||||
v.val = v.type == 1 ? "" : []
|
||||
})
|
||||
this.viewData = data
|
||||
this.v = 'add'
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doAdd() {
|
||||
if (moment().format("HH:mm:ss") > this.viewData.answer_end_time) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: "您已超时,此次作废!",
|
||||
type: 'warning'
|
||||
});
|
||||
this.v = 'index'
|
||||
return
|
||||
}
|
||||
|
||||
let subject = this.viewData.subjects
|
||||
for (let i = 0; i < subject.length; i++) {
|
||||
if (subject[i].val == "" || subject[i].val == []) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: "第" + (i + 1) + "题未答",
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
this.viewData.subjects.forEach(v => {
|
||||
if (v.type == 1) {
|
||||
this.formData.push({"papers_id": this.viewData.id, "subject_id": v.id, "answer_id": v.val})
|
||||
} else if (v.type == 2) {
|
||||
v.val.forEach(x => {
|
||||
this.formData.push({"papers_id": this.viewData.id, "subject_id": v.id, "answer_id": x})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据提交中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
$.post(base + "/platform/hd/zxdt/answer/doAdd", {replyList: JSON.stringify(this.formData)}, (data) => {
|
||||
if (data.code == 0) {
|
||||
this.pageData()
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: "试卷已提交",
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
this.$notify({
|
||||
title: '错误',
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
loading.close()
|
||||
this.v = 'index'
|
||||
}, "json");
|
||||
},
|
||||
doSearch() {
|
||||
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() {
|
||||
sublime.showLoadingbar();
|
||||
$.post(base + "/platform/hd/zxdt/answer/pageData", this.pageForm, (res) => {
|
||||
const {code, msg, data} = res
|
||||
if (code == 0) {
|
||||
this.tableData = data.list;
|
||||
this.pageForm.totalCount = data.totalCount;
|
||||
sublime.closeLoadingbar();
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,174 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
[v-clock] {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div v-clock id="app" style="padding: 0 10px;">
|
||||
<div v-show="showMsg"
|
||||
style="margin: 1.2rem 0.20rem 0.4rem 0.20rem;padding: 0.3rem 0.34rem;text-align: center">
|
||||
<div class="weui-msg">
|
||||
<div class="weui-msg__icon-area">
|
||||
<i v-if="flag" class="weui-icon-success weui-icon_msg"></i>
|
||||
<i v-else class="weui-icon-warn weui-icon_msg"></i>
|
||||
</div>
|
||||
<div class="weui-msg__text-area">
|
||||
<h2 class="weui-msg__title">{{msg}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-show="!showMsg" style="padding-top: 20px">
|
||||
<div style="width: 100%;text-align: center;color: #1ea0fa"><h2>{{viewData.name}}</h2></div>
|
||||
<div style="width: 100%;margin-top: 20px;font-size: 14px; text-align: center;color: rgb(120,120,120)">
|
||||
<span>考试时间:{{viewData.answer_start_time}} - {{viewData.answer_end_time}}</span>
|
||||
<span>分值:({{viewData.fraction}})</span>
|
||||
</div>
|
||||
<div style="width: 100%;margin-top: 20px" v-if="viewData.explain_txt" v-html="viewData.explain_txt">
|
||||
</div>
|
||||
<hr v-if="viewData.explain_txt"
|
||||
style="margin-top: 20px;border: none;border-bottom: 1px rgb(150,150,150) dashed"/>
|
||||
|
||||
<div style="margin-top: 50px">
|
||||
<van-panel style="margin: 20px 0;box-shadow: 0 0 10px rgb(220,220,220)"
|
||||
v-for="sub,idx in viewData.subjects" :title="(idx+1)+'. '+ getTxt(sub.name)">
|
||||
<!-- 单选-->
|
||||
<div style="padding: 10px" v-if="sub.type==1">
|
||||
<van-radio v-for="ans in sub.answer" :name="ans.id" v-model="sub.val"
|
||||
style="padding: 10px 10px;margin: 0;box-sizing: border-box;">
|
||||
<div style="width: 100%;margin: 5px 0" v-html="ans.option_txt"></div>
|
||||
</van-radio>
|
||||
</div>
|
||||
|
||||
<!-- 多选-->
|
||||
<div style="padding: 10px" v-if="sub.type==2">
|
||||
<van-checkbox-group style="position: relative;box-sizing: border-box;" v-model="sub.val">
|
||||
|
||||
<van-checkbox v-for="ans in sub.answer" shape="square" :name="ans.id"
|
||||
style="padding: 10px 10px;margin: 0;box-sizing: border-box;">
|
||||
<div style="width: 100%;margin: 5px 0" v-html="ans.option_txt"></div>
|
||||
|
||||
</van-checkbox>
|
||||
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
</van-panel>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%;text-align: center;margin-top: 30px;margin-bottom: 10px">
|
||||
<van-button color="#1ea0fa" v-show="viewData!={}" type="primary" :loading="loading" @click.native="subData"
|
||||
style="width: 70%">
|
||||
提交试卷
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
showMsg: false,
|
||||
showPage: false,
|
||||
msg: '',
|
||||
flag: false,
|
||||
viewData: {},
|
||||
formData: [],
|
||||
getTxt(val) {
|
||||
if (val) {
|
||||
return val.replace(/<(style|script|iframe)[^>]*?>[\s\S]+?<\/\1\s*>/gi, '').replace(/<[^>]+?>/g, '').replace(/\s+/g, ' ').replace(/ /g, ' ').replace(/>/g, ' ');
|
||||
}
|
||||
return ''
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
subData() {
|
||||
this.formData = []
|
||||
let subject = this.viewData.subjects
|
||||
|
||||
if (moment().format("HH:mm:ss") > this.viewData.answer_end_time) {
|
||||
this.$notify({type: 'danger', message: "您已超时,此次作废!"})
|
||||
this.flag = true
|
||||
this.showMsg = true
|
||||
return
|
||||
}
|
||||
|
||||
for (let i = 0; i < subject.length; i++) {
|
||||
if (subject[i].val == "" || subject[i].val == []) {
|
||||
this.$notify({type: 'warning', message: "第" + (i + 1) + "题未答"})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
this.viewData.subjects.forEach(v => {
|
||||
if (v.type == 1) {
|
||||
this.formData.push({"papers_id": this.viewData.id, "subject_id": v.id, "answer_id": v.val})
|
||||
} else if (v.type == 2) {
|
||||
v.val.forEach(x => {
|
||||
this.formData.push({"papers_id": this.viewData.id, "subject_id": v.id, "answer_id": x})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
this.loading = true
|
||||
$.post("/platform/hd/zxdt/mobile/answer/doAdd", {replyList: JSON.stringify(this.formData)}, (res) => {
|
||||
if (res.code == 0) {
|
||||
this.loading = false
|
||||
this.msg = '您的答卷已提交,感谢您的参与!'
|
||||
this.flag = true
|
||||
this.showMsg = true
|
||||
} else {
|
||||
this.$notify({type: 'danger', message: res.msg})
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.formData = []
|
||||
$.get("/platform/hd/zxdt/mobile/answer/findOne", (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (!data) {
|
||||
this.msg = "您今日的答题次数已用完"
|
||||
this.flag = true
|
||||
this.showMsg = true
|
||||
return
|
||||
}
|
||||
|
||||
if (code == 0) {
|
||||
|
||||
if (moment().format("HH:mm:ss") < data.answer_start_time) {
|
||||
this.msg = "未到答题时间"
|
||||
this.flag = true
|
||||
this.showMsg = true
|
||||
return
|
||||
} else if (moment().format("HH:mm:ss") > data.answer_end_time) {
|
||||
this.msg = "答题时间已过"
|
||||
this.flag = true
|
||||
this.showMsg = true
|
||||
return
|
||||
}
|
||||
|
||||
data.subjects.forEach(v => {
|
||||
v.val = v.type === 1 ? "" : []
|
||||
})
|
||||
this.viewData = data
|
||||
this.showMsg = false
|
||||
} else {
|
||||
this.msg = msg
|
||||
this.showMsg = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,665 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!-- 在线答题-试卷管理 -->
|
||||
<style>
|
||||
#qsmEditor .w-e-text-container {
|
||||
height: 450px !important;
|
||||
}
|
||||
|
||||
#qsmEditor div {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #409EFF;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.inputParent input {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgb(220, 223, 230);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.issueList > .el-table__header-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.issueList .el-table__expanded-cell {
|
||||
background-color: rgb(250, 250, 250) !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<el-row class="transition-row">
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='index'" class="transition-item">
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
||||
<template slot="prepend">试卷名称</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button icon="el-icon-search" @click="doSearch"
|
||||
style="background-color:#409eff;color: white;"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button size="medium" type="primary" plain @click="openAdd"><i class="ti-plus"></i>新建试卷
|
||||
</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData" size="medium" header-align="center" align="center" style="width: 100%">
|
||||
<el-table-column
|
||||
label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="试卷名称" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="explain_txt" label="说明" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<span v-html="scope.row.explain_txt"></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="answer_start_time" label="答题时间" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.row.answer_start_time}}-{{scope.row.answer_end_time}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="answer_num" label="答题次数" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="fraction" label="分值" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" label="在线答题二维码">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" plain type="primary" @click="saveCode(scope.row.id)">保存二维码
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" header-align="center" align="center" width="200px">
|
||||
<template scope="scope">
|
||||
<el-button size="small" @click="openView(scope.row.id)">查看</el-button>
|
||||
<el-button size="small" type="primary"
|
||||
@click="openEdit(scope.row.id)" plain>编辑
|
||||
</el-button>
|
||||
<el-button size="small" type="danger"
|
||||
@click="doDelete(scope.row.id)" plain>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- 新增、修改 -->
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='add'||v=='edit'" class="transition-item">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'"
|
||||
style="font-size: 18px">返回
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div style="padding: 0 5%; height:calc(100vh - 150px);overflow-y: scroll">
|
||||
<el-row v-loading="loading">
|
||||
|
||||
<el-steps :active="stepActive" simple finish-status="success">
|
||||
<el-step title="试卷信息" description=""></el-step>
|
||||
<el-step title="选择题目" description=""></el-step>
|
||||
</el-steps>
|
||||
|
||||
<transition name="el-zoom-in-top">
|
||||
<div v-show="stepActive==0" class="transition-box" style="margin-top: 20px;">
|
||||
<el-form ref="addForm" :model="formData" label-width="60px" label-position="right"
|
||||
:rules="formRules">
|
||||
|
||||
<el-form-item label="试卷名称" class="is-required" prop="name" label-width="120px">
|
||||
<el-input v-model="formData.name"
|
||||
placeholder="请填写试卷名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="7">
|
||||
<el-form-item label="可答次数" class="is-required" prop="answer_num"
|
||||
label-width="120px">
|
||||
<el-input-number style="width: 100%" v-model="formData.answer_num"
|
||||
controls-position="right"
|
||||
:min="1" :max="100"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="分值" class="is-required" prop="fraction"
|
||||
label-width="120px">
|
||||
<el-input-number style="width: 100%" v-model="formData.fraction"
|
||||
controls-position="right"
|
||||
:min="1" :max="200"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="答题时间" prop="answer_time"
|
||||
label-width="200px">
|
||||
<el-time-picker
|
||||
value-format="HH:mm:ss"
|
||||
style="width: 100%"
|
||||
is-range
|
||||
v-model="formData.answer_time"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="选择时间范围">
|
||||
</el-time-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="说明" prop="explain_txt" label-width="120px">
|
||||
<div id="qsmEditor"></div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="next">下一步</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<div v-show="stepActive==1" class="transition-box" style="margin-top: 20px;">
|
||||
<el-row type="flex" justify="end" :gutter="20">
|
||||
|
||||
<div class="btn-group tool-button mt5" style="margin-right: 5px">
|
||||
<el-input placeholder="请输入题目" size="small"
|
||||
v-model="subjectForm.searchKeyword"></el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5" style="margin-right: 5px">
|
||||
<el-select v-model="subjectForm.type" clearable size="small"
|
||||
placeholder="题型">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button icon="el-icon-search" @click="doSubjectSearch"
|
||||
style="background-color:#409eff;color: white;"
|
||||
size="small"></el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="subjectTable" row-key="id" ref="multipleSubject"
|
||||
@selection-change="handleSelectionChange" size="medium"
|
||||
@select="selectCheckbox">
|
||||
|
||||
<el-table-column type="selection" width="55"
|
||||
reserve-selection></el-table-column>
|
||||
|
||||
<el-table-column align="center" type="index" header-align="center"
|
||||
label="序号" width="55">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(subjectForm.pageNumber - 1) * subjectForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" show-overflow-tooltip label="题目"
|
||||
header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column prop="type" label="题型" header-align="center" align="center"
|
||||
width="80px">
|
||||
<template scope="scope">
|
||||
<span v-if="scope.row.type==1">单选</span>
|
||||
<span v-if="scope.row.type==2">多选</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="option_txt" show-overflow-tooltip label="正确答案"
|
||||
header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="subjectSizeChange"
|
||||
@current-change="subjectNumberChange"
|
||||
:current-page="subjectForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="subjectForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="subjectForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="stepActive=0">上一步</el-button>
|
||||
<el-button type="primary" :disabled="subDis" @click="operation">提
|
||||
交
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- 查看 -->
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='view'" class="transition-item">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'"
|
||||
style="font-size: 18px">返回
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div style="padding: 0 5%; height:calc(100vh - 150px);overflow-y: scroll">
|
||||
<div style="padding-left: 20px;padding-right: 20px">
|
||||
<el-row style="text-align: center;margin-bottom: 20px">
|
||||
<h2>{{viewData.name}}</h2>
|
||||
<span style="color: rgb(120,120,120)">考试时间:{{viewData.answer_start_time}} - {{viewData.answer_end_time}}</span>
|
||||
<span style="color: rgb(120,120,120)">分值:({{viewData.fraction}})</span>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<div v-html="viewData.explain_txt"></div>
|
||||
</el-row>
|
||||
|
||||
<el-row v-for="sub,idx in viewData.subjects"
|
||||
style="border-bottom: 1px solid rgb(200,200,200);padding: 20px 0;margin-bottom: 20px">
|
||||
<el-col :span="1">
|
||||
<span style="font-weight: bolder">{{idx+1}}.</span>
|
||||
</el-col>
|
||||
<el-col :span="23">
|
||||
<el-row>
|
||||
<div v-html="sub.name"></div>
|
||||
</el-row>
|
||||
|
||||
<el-checkbox-group v-model="sub.val">
|
||||
|
||||
<el-row v-for="ans,idx2 in sub.answer">
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-radio v-if="sub.type==1" :label="ans.id" v-model="sub.val">
|
||||
{{ans.option_txt}}
|
||||
</el-radio>
|
||||
|
||||
<el-checkbox v-if="sub.type==2" :label="ans.id">
|
||||
{{ans.option_txt}}
|
||||
</el-checkbox>
|
||||
</el-row>
|
||||
</el-row>
|
||||
|
||||
</el-checkbox-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
</el-row>
|
||||
|
||||
<a id="download" style="display: none"></a>
|
||||
<div id="qrcode" style="display: none;width: 500px;height: 500px"></div>
|
||||
</div>
|
||||
<script src="${base!}/assets/platform/js/jquery.qrcode.min.js"></script>
|
||||
<script>
|
||||
let qsmEditor
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
},
|
||||
subjectForm: {
|
||||
searchName: "sub.name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
type: ""
|
||||
},
|
||||
viewData: {},
|
||||
formData: {},
|
||||
subjectTable: [],
|
||||
tableData: [],
|
||||
multipleSelection: [],
|
||||
multipleSelection2: [],
|
||||
stepActive: 0,
|
||||
tabKey: new Date().getTime(),
|
||||
v: 'index',
|
||||
loading: false,
|
||||
subDis: false,
|
||||
redirect_uri: location.protocol + "//" + location.host,
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
fraction: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
answer_num: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
answer_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
typeOptions: [{id: 1, name: "单选题"}, {id: 2, name: "多选题"}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
IEVersion() {
|
||||
let userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
|
||||
let isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
|
||||
let isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
|
||||
let isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
|
||||
if (isIE) {
|
||||
let reIE = new RegExp("MSIE (\\d+\\.\\d+);");
|
||||
reIE.test(userAgent);
|
||||
let fIEVersion = parseFloat(RegExp["$1"]);
|
||||
if (fIEVersion == 7) {
|
||||
return 7;
|
||||
} else if (fIEVersion == 8) {
|
||||
return 8;
|
||||
} else if (fIEVersion == 9) {
|
||||
return 9;
|
||||
} else if (fIEVersion == 10) {
|
||||
return 10;
|
||||
} else {
|
||||
return 6;//IE版本<=7
|
||||
}
|
||||
} else if (isEdge) {
|
||||
return 'edge';//edge
|
||||
} else if (isIE11) {
|
||||
return 11; //IE11
|
||||
} else {
|
||||
return -1;//不是ie浏览器
|
||||
}
|
||||
},
|
||||
dwnCode(name) {
|
||||
let type = 'png';
|
||||
if (this.IEVersion() != -1) {
|
||||
let blob = $("canvas").get(0).msToBlob();
|
||||
window.navigator.msSaveBlob(blob, name + '_' + (new Date()).getTime() + '.' + type);
|
||||
} else {
|
||||
$('#download').attr({
|
||||
href: $("canvas").get(0).toDataURL('image/png').replace("image/png", "image/octet-stream"),
|
||||
download: name + '_' + (new Date()).getTime() + '.' + type
|
||||
}).get(0).click();
|
||||
}
|
||||
},
|
||||
saveCode(id) {
|
||||
let self = this
|
||||
$("#qrcode").html("")
|
||||
$("#qrcode").qrcode({
|
||||
render: "canvas",
|
||||
width: $("#qrcode").width(),
|
||||
height: $("#qrcode").width(),
|
||||
text: self.redirect_uri + '/platform/hd/zxdt/mobile/answer?papers_id=' + id,
|
||||
correctLevel: 3
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.dwnCode("在线答题")
|
||||
})
|
||||
},
|
||||
selectCheckbox(selection, row) {
|
||||
const checked = selection.some(v => v.id == row.id)
|
||||
if (checked) {
|
||||
this.multipleSelection2.push(row.id)
|
||||
} else {
|
||||
this.multipleSelection2.splice(this.multipleSelection2.findIndex(v => v == row.id), 1)
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
next() {
|
||||
if (!this.formData.explain_txt || !dd3s.html2txt(this.formData.explain_txt)) {
|
||||
this.$message.warning("请填写说明")
|
||||
return
|
||||
}
|
||||
this.$refs["addForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.stepActive = 1
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
$.get("/platform/hd/zxdt/papers/findOne", {id: id}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
this.viewData = data
|
||||
data.subjects.forEach(v => {
|
||||
if (v.type == 2) {
|
||||
v.val = []
|
||||
v.answer.map((x) => {
|
||||
if (x.is_yes) {
|
||||
v.val.push(x.id)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
v.val = v.answer.find(x => x.is_yes).id
|
||||
}
|
||||
})
|
||||
this.v = 'view'
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
let that = this
|
||||
this.$confirm('确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback(a, b) {
|
||||
if ("confirm" == a) {
|
||||
$.post(base + "/platform/hd/zxdt/papers/delete", {id: id}, (data) => {
|
||||
if (data.code == 0) {
|
||||
that.$message.success(data.msg);
|
||||
that.pageData();
|
||||
} else {
|
||||
that.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openAdd() {
|
||||
this.v = 'add'
|
||||
this.formData = {}
|
||||
this.stepActive = 0
|
||||
this.tabKey = new Date().getTime()
|
||||
this.multipleSelection = []
|
||||
this.subjectTable = []
|
||||
this.$nextTick(() => {
|
||||
$('#qsmEditor').html("")
|
||||
E = window.wangEditor
|
||||
qsmEditor = new E('#qsmEditor')
|
||||
qsmEditor.config.uploadImgShowBase64 = true
|
||||
qsmEditor.config.onchange = (html) => {
|
||||
this.$set(this.formData, "explain_txt", html)
|
||||
}
|
||||
qsmEditor.create()
|
||||
})
|
||||
this.subjectData()
|
||||
},
|
||||
openEdit(id) {
|
||||
this.stepActive = 0
|
||||
this.tabKey = new Date().getTime()
|
||||
this.multipleSelection = []
|
||||
this.subjectTable = []
|
||||
$.get("/platform/hd/zxdt/papers/findOne", {id: id}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
$('#qsmEditor').html(data.explain_txt)
|
||||
E = window.wangEditor
|
||||
qsmEditor = new E('#qsmEditor')
|
||||
|
||||
qsmEditor.config.onchange = (html) => {
|
||||
this.$set(this.formData, "explain_txt", html)
|
||||
}
|
||||
qsmEditor.create()
|
||||
this.formData = data
|
||||
if (this.formData.answer_start_time && this.formData.answer_end_time) {
|
||||
this.$set(this.formData, 'answer_time', [this.formData.answer_start_time, this.formData.answer_end_time])
|
||||
}
|
||||
|
||||
this.multipleSelection = data.subjects.map(v => {
|
||||
return v.id
|
||||
})
|
||||
this.multipleSelection2 = this.multipleSelection
|
||||
|
||||
this.subjectData()
|
||||
this.v = "edit"
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
operation() {
|
||||
let url
|
||||
if (this.v == 'edit') {
|
||||
url = "/platform/hd/zxdt/papers/doEdit"
|
||||
} else if (this.v == 'add') {
|
||||
url = "/platform/hd/zxdt/papers/doAdd"
|
||||
}
|
||||
|
||||
if (this.multipleSelection.length == 0) {
|
||||
this.$message.warning('请选择题目!');
|
||||
return
|
||||
}
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据提交中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
this.formData.answer_start_time = this.formData.answer_time[0]
|
||||
this.formData.answer_end_time = this.formData.answer_time[1]
|
||||
|
||||
this.$refs["addForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
$.post(base + url, {
|
||||
papers: JSON.stringify(this.formData),
|
||||
subject: JSON.stringify(this.multipleSelection)
|
||||
}, (data) => {
|
||||
if (data.code == 0) {
|
||||
this.v = 'index'
|
||||
this.pageData()
|
||||
this.$message.success(data.msg)
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
loading.close()
|
||||
}, "json");
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
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();
|
||||
},
|
||||
doSubjectSearch() {
|
||||
this.subjectForm.pageNumber = 1;
|
||||
this.subjectData();
|
||||
},
|
||||
subjectNumberChange(val) {//页码更新操作
|
||||
this.subjectForm.pageNumber = val;
|
||||
this.subjectData();
|
||||
},
|
||||
subjectSizeChange(val) {//分页大小更新操作
|
||||
this.subjectForm.pageSize = val;
|
||||
this.subjectData();
|
||||
},
|
||||
pageData() {//加载分页数据
|
||||
sublime.showLoadingbar();
|
||||
$.post(base + "/platform/hd/zxdt/papers/pageData", this.pageForm, (res) => {
|
||||
const {code, msg, data} = res
|
||||
if (code == 0) {
|
||||
this.tableData = data.list;
|
||||
this.pageForm.totalCount = data.totalCount;
|
||||
sublime.closeLoadingbar();
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
subjectData() {
|
||||
sublime.showLoadingbar();
|
||||
$.post(base + "/platform/hd/zxdt/papers/findSubject", this.subjectForm, (res) => {
|
||||
const {code, msg, data} = res
|
||||
if (code == 0) {
|
||||
this.subjectTable = data.list;
|
||||
this.subjectForm.totalCount = data.totalCount;
|
||||
this.$nextTick(() => {
|
||||
const arr = JSON.parse(JSON.stringify(this.multipleSelection2))
|
||||
this.subjectTable.forEach(v => {
|
||||
if (arr.includes(v.id)) {
|
||||
this.$refs.multipleSubject.toggleRowSelection(v, true)
|
||||
}
|
||||
})
|
||||
})
|
||||
sublime.closeLoadingbar();
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,240 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!-- 在线答题-数据分析 -->
|
||||
<style>
|
||||
#qsmEditor .w-e-text-container {
|
||||
height: 450px !important;
|
||||
}
|
||||
|
||||
#qsmEditor div {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #409EFF;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.inputParent input {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgb(220, 223, 230);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.subList > .el-table__header-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.subList .el-table__expanded-cell {
|
||||
background-color: rgb(250, 250, 250) !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<el-row class="transition-row">
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='index'" class="transition-item">
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
||||
<template slot="prepend">试卷名称</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button icon="el-icon-search" @click="doSearch"
|
||||
style="background-color:#409eff;color: white;"></el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData" size="medium" header-align="center" align="center" style="width: 100%">
|
||||
<el-table-column
|
||||
label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="试卷名称" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="explain_txt" label="说明" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<span v-html="scope.row.explain_txt"></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="answer_start_time" label="答题时间" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.row.answer_start_time}}-{{scope.row.answer_end_time}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="answer_num" label="答题次数" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="fraction" label="分值" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="操作" header-align="center" align="center" width="200px">
|
||||
<template scope="scope">
|
||||
<el-button type="primary" plain size="small" @click="openView(scope.row.id)">查看详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- 查看 -->
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='view'" class="transition-item">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'"
|
||||
style="font-size: 18px">返回
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="padding: 0 5%; height:calc(100vh - 150px);overflow-y: scroll">
|
||||
<el-row style="text-align: center;margin-bottom: 20px">
|
||||
<h2>{{viewData.hd_papers.name}}</h2>
|
||||
<span style="color: rgb(120,120,120)">考试时间:{{viewData.hd_papers.answer_start_time}} - {{viewData.hd_papers.answer_end_time}}</span>
|
||||
<span style="color: rgb(120,120,120)">分值:({{viewData.hd_papers.fraction}})</span>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<div v-html="viewData.hd_papers.explain_txt"></div>
|
||||
</el-row>
|
||||
|
||||
<el-row v-for="sub,idx in viewData.hd_papers.subjects">
|
||||
<el-row>
|
||||
<span style="font-weight: bolder;color: rgb(120,120,120)">第 {{idx+1}} 题:</span>
|
||||
<div v-html="sub.name" style="display: inline-block"></div>
|
||||
<span style="color: rgb(180,180,180)" v-if="sub.type==1">[单选题]</span>
|
||||
<span style="color: rgb(180,180,180)" v-if="sub.type==2">[多选题]</span>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin: 20px 0">
|
||||
<el-table :row-class-name="tableRowClassName" :data="sub.answer"
|
||||
header-align="center"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="option_txt" label="选项" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
{{scope.row.option_txt}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="xj" label="小计" header-align="center" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="bl" label="比例" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<el-progress v-if="scope.row.bl!=undefined"
|
||||
:percentage="scope.row.bl"></el-progress>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
</el-row>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
},
|
||||
viewData: {hd_papers: {subjects: [{answer: []}]}},
|
||||
tableData: [],
|
||||
v: 'index',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tableRowClassName(row) {
|
||||
if (!row.row.bl) {
|
||||
return 'last-row';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
openView(id) {
|
||||
$.get("/platform/hd/zxdt/result/findOne", {id: id}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
data.hd_papers.subjects.forEach((sub) => {
|
||||
sub.answer.forEach((ans) => {
|
||||
ans.xj = data[sub.id].hasOwnProperty(ans.id) ? data[sub.id][ans.id] : 0
|
||||
ans.bl = (ans.xj / data[sub.id].yxs).toFixed(2) * 100
|
||||
ans.bl = isNaN(ans.bl) ? 0 : ans.bl
|
||||
})
|
||||
sub.answer.push({option_txt: '本题有效填写人次', xj: data[sub.id].yxs})
|
||||
}
|
||||
)
|
||||
this.viewData = data
|
||||
this.v = 'view'
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
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() {//加载分页数据
|
||||
sublime.showLoadingbar();
|
||||
$.post(base + "/platform/hd/zxdt/result/pageData", this.pageForm, (res) => {
|
||||
const {code, msg, data} = res
|
||||
if (code == 0) {
|
||||
this.tableData = data.list;
|
||||
this.pageForm.totalCount = data.totalCount;
|
||||
sublime.closeLoadingbar();
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,486 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!-- 在线答题-题库管理 -->
|
||||
<style>
|
||||
.el-divider {
|
||||
background-color: #409EFF;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.inputParent input {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgb(220, 223, 230);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.issueList > .el-table__header-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.issueList .el-table__expanded-cell {
|
||||
background-color: rgb(250, 250, 250) !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<el-row class="transition-row">
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='index'" class="transition-item">
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
||||
<template slot="prepend">题目</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.type" clearable
|
||||
placeholder="题型">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button icon="el-icon-search" @click="doSearch"
|
||||
style="background-color:#409eff;color: white;"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button size="medium" type="primary" @click="openAdd"><i class="ti-plus"></i>新建题目
|
||||
</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData" size="medium" header-align="center" align="center" style="width: 100%">
|
||||
<el-table-column
|
||||
label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" show-overflow-tooltip label="题目" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="type" label="题型" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span v-if="scope.row.type==1">单选</span>
|
||||
<span v-if="scope.row.type==2">多选</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="操作" header-align="center" align="center" width="230px">
|
||||
<template scope="scope">
|
||||
<el-button size="small" @click="openView(scope.row.id)">查看</el-button>
|
||||
<el-button size="small" type="primary"
|
||||
@click="openEdit(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button size="small" type="danger"
|
||||
@click="doDelete(scope.row.id)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='add'||v=='edit'" class="transition-item">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'"
|
||||
style="font-size: 18px">返回
|
||||
</el-button>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button size="medium" type="primary" @click="operation">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="padding: 0 5%; height:calc(100vh - 150px);overflow-y: scroll">
|
||||
<el-form :model="formData" ref="addForm" label-position="right" :rules="formRules" size="small"
|
||||
label-width="80px">
|
||||
<el-form-item prop="name" label="题目名称">
|
||||
<el-input size="medium" type="textarea" placeholder="请输入题目名称"
|
||||
v-model="formData.name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="type" label="题目类型">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<el-radio :label="1">单选</el-radio>
|
||||
<el-radio :label="2">多选</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="22">
|
||||
<el-divider content-position="left" class="dia">
|
||||
<span style="color: #3ea1ec;">题目选项</span>
|
||||
</el-divider>
|
||||
</el-col>
|
||||
<el-col :span="2" style="text-align: right">
|
||||
<el-button @click="formData.answer.push({option_txt:''})"
|
||||
style="margin-top: 10px"
|
||||
icon="el-icon-plus"
|
||||
type="warning" size="mini"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-checkbox-group v-model="checkVal">
|
||||
<el-table :data="formData.answer" header-align="center"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="option_txt" label="选项" header-align="center"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input placeholder="请输入选项名" maxlength="100"
|
||||
v-model="scope.row.option_txt"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_yes" label="正确答案" header-align="center" width="100px"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-radio v-model="is_yes" :label="scope.$index+1"
|
||||
v-if="formData.type==1">
|
||||
</el-radio>
|
||||
|
||||
<el-checkbox :label="scope.$index+1"
|
||||
v-if="formData.type==2">
|
||||
</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" header-align="center" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button icon="el-icon-delete" type="danger"
|
||||
@click="delOptionX(scope)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-checkbox-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='view'" class="transition-item">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'"
|
||||
style="font-size: 18px">返回
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div style="padding: 0 5%; height:calc(100vh - 150px);overflow-y: scroll">
|
||||
<el-form :model="viewData" ref="addForm" label-position="right" size="small"
|
||||
label-width="80px">
|
||||
<el-form-item prop="name" label="题目名称">
|
||||
<el-input readonly size="medium" type="textarea"
|
||||
v-model="viewData.name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="type" label="题目类型">
|
||||
<el-radio-group v-model="viewData.type">
|
||||
<el-radio disabled :label="1">单选</el-radio>
|
||||
<el-radio disabled :label="2">多选</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="22">
|
||||
<el-divider content-position="left" class="dia">
|
||||
<span style="color: #3ea1ec;">题目选项</span>
|
||||
</el-divider>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-checkbox-group v-model="checkVal">
|
||||
<el-table :data="viewData.answer" header-align="center"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="option_txt" label="选项" header-align="center"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input readonly maxlength="100"
|
||||
v-model="scope.row.option_txt"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column readonly prop="is_yes" label="正确答案" header-align="center"
|
||||
width="100px"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-radio disabled v-model="is_yes" :label="scope.$index+1"
|
||||
v-if="viewData.type==1">
|
||||
</el-radio>
|
||||
|
||||
<el-checkbox disabled :label="scope.$index+1"
|
||||
v-if="viewData.type==2">
|
||||
</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-checkbox-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
type: ""
|
||||
},
|
||||
viewData: {},
|
||||
formData: {type: 1, answer: [{}, {}, {}, {}]},
|
||||
checkVal: [],
|
||||
is_yes: '',
|
||||
tableData: [],
|
||||
delOption: [],
|
||||
v: 'index',
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
option_txt: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
typeOptions: [{id: 1, name: "单选题"}, {id: 2, name: "多选题"}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
delOptionX(scope) {
|
||||
this.delOption = []
|
||||
if (scope.row.id) {
|
||||
this.delOption.push(scope.row.id)
|
||||
}
|
||||
if (this.formData.type == 1 && scope.$index == this.is_yes - 1) {
|
||||
this.is_yes = ''
|
||||
}
|
||||
if (this.formData.type == 2) {
|
||||
this.checkVal.splice(this.checkVal.indexOf(scope.$index + 1), 1)
|
||||
}
|
||||
this.formData.answer.splice(scope.$index, 1)
|
||||
},
|
||||
openView(id) {
|
||||
$.get("/platform/hd/zxdt/subject/findOne", {id: id}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
this.viewData = data
|
||||
if (data.type == 2) {
|
||||
data.answer.forEach((val, idx) => {
|
||||
if (val.is_yes) {
|
||||
this.checkVal.push(idx + 1)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
data.answer.forEach((val, idx) => {
|
||||
if (val.is_yes) {
|
||||
this.is_yes = idx + 1
|
||||
}
|
||||
})
|
||||
}
|
||||
this.v = 'view'
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
let that = this
|
||||
this.$confirm('确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback(a, b) {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
$.get(base + "/platform/hd/zxdt/subject/delete", {id: id}).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$message.success(res.msg);
|
||||
that.pageData();
|
||||
} else {
|
||||
that.$message.warning(res.msg);
|
||||
}
|
||||
}).catch(err => {
|
||||
that.$message.error(err.msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openAdd() {
|
||||
this.formData = {type: 1, answer: [{}, {}, {}, {}]}
|
||||
this.is_yes = ''
|
||||
this.checkVal = []
|
||||
this.v = 'add'
|
||||
},
|
||||
openEdit(id) {
|
||||
$.get("/platform/hd/zxdt/subject/findOne", {id: id}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
this.formData = data
|
||||
if (data.type == 2) {
|
||||
data.answer.forEach((val, idx) => {
|
||||
if (val.is_yes) {
|
||||
this.checkVal.push(idx + 1)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
data.answer.forEach((val, idx) => {
|
||||
if (val.is_yes) {
|
||||
this.is_yes = idx + 1
|
||||
}
|
||||
})
|
||||
}
|
||||
this.v = "edit"
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
operation() {
|
||||
let url
|
||||
if (this.formData.answer.length < 0) {
|
||||
this.$message.warning('请至少添加一个选项!');
|
||||
return
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.formData.answer.length; i++) {
|
||||
if (!this.formData.answer[i].option_txt) {
|
||||
this.$message.warning('第 ' + (i + 1) + " 个选项的名字未填写!");
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (this.formData.type == '2') {
|
||||
if (this.checkVal.length < 1) {
|
||||
this.$message.warning('请至少选择一个选项为正确答案!');
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (!this.is_yes) {
|
||||
this.$message.warning('请至少选择一个选项为正确答案!');
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (this.v == 'edit') {
|
||||
url = "/platform/hd/zxdt/subject/doEdit"
|
||||
} else if (this.v == 'add') {
|
||||
url = "/platform/hd/zxdt/subject/doAdd"
|
||||
}
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据提交中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
this.$refs["addForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.formData.answer.forEach((value) => {
|
||||
value.is_yes = false
|
||||
})
|
||||
if (this.formData.type == "2") {
|
||||
this.checkVal.forEach((v) => {
|
||||
this.formData.answer[parseInt([v]) - 1].is_yes = true
|
||||
})
|
||||
} else {
|
||||
this.formData.answer[parseInt([this.is_yes]) - 1].is_yes = true
|
||||
}
|
||||
|
||||
$.post(base + url, {
|
||||
subject: JSON.stringify(this.formData),
|
||||
delOption: JSON.stringify(this.delOption)
|
||||
}, (data) => {
|
||||
if (data.code == 0) {
|
||||
this.v = 'index'
|
||||
this.pageData()
|
||||
this.$message.success(data.msg)
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
loading.close()
|
||||
}, "json");
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
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() {//加载分页数据
|
||||
sublime.showLoadingbar();
|
||||
$.post(base + "/platform/hd/zxdt/subject/pageData", this.pageForm, (res) => {
|
||||
const {code, msg, data} = res
|
||||
if (code == 0) {
|
||||
this.tableData = data.list;
|
||||
this.pageForm.totalCount = data.totalCount;
|
||||
sublime.closeLoadingbar();
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
,
|
||||
},
|
||||
created() {
|
||||
this.pageData();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -22,39 +22,42 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak style="padding: 20px 40px">
|
||||
<div id="app" style="padding: 20px 40px" v-cloak>
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="clearfix" slot="header">
|
||||
<span style="color: #409EFF;font-size: 18px">填写申报信息</span>
|
||||
</div>
|
||||
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px" label-suffix=":">
|
||||
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="120px"
|
||||
ref="form">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="user_name" label="申请人姓名">
|
||||
<el-input disabled v-model="formData.user_name" type="text"></el-input>
|
||||
<el-form-item label="申请人姓名" prop="user_name">
|
||||
<el-input disabled type="text" v-model="formData.user_name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="apply_time" label="申报时间">
|
||||
<el-input disabled v-model="formData.apply_time" type="text"></el-input>
|
||||
<el-form-item label="申报时间" prop="apply_time">
|
||||
<el-input disabled type="text" v-model="formData.apply_time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mobile" label="联系方式">
|
||||
<el-input v-model="formData.mobile" type="text"></el-input>
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input placeholder="请输入联系方式" type="number"
|
||||
v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_type" label="活动主体类型">
|
||||
<el-select v-model="formData.activity_type" placeholder="请选择活动主体类型" style="width: 100%"
|
||||
@change="getProjectCodeChange">
|
||||
<el-form-item label="活动主体类型" prop="activity_type">
|
||||
<el-select @change="getProjectCodeChange" placeholder="请选择活动主体类型"
|
||||
style="width: 100%"
|
||||
v-model="formData.activity_type">
|
||||
<el-option
|
||||
v-for="item in activityType"
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code">
|
||||
:value="item.code"
|
||||
v-for="item in activityType">
|
||||
</el-option>
|
||||
<!-- <span>
|
||||
|
||||
@@ -74,31 +77,34 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_name" label="活动名称">
|
||||
<el-autocomplete style="width: 100%"
|
||||
v-model="formData.activity_name"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
placeholder="请输入内容"
|
||||
@select="handleSelect"
|
||||
@input="activityChange"
|
||||
></el-autocomplete>
|
||||
<el-form-item label="活动名称" prop="activity_name">
|
||||
<!-- <el-autocomplete :fetch-suggestions="querySearchAsync"
|
||||
@input="activityChange"
|
||||
@select="handleSelect"
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="formData.activity_name"
|
||||
></el-autocomplete>-->
|
||||
<el-input placeholder="请输入活动名称"
|
||||
v-model="formData.activity_name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="项目编号" prop="projectCode">
|
||||
<el-input disabled placeholder="选择活动类型自动生成"
|
||||
v-model="formData.projectCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="projectCode" label="项目编号">
|
||||
<el-input disabled v-model="formData.projectCode" placeholder="选择活动类型自动生成"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="projectTypeCode" label="活动项目类型">
|
||||
<el-select v-model="formData.projectTypeCode" placeholder="请选择活动类型"
|
||||
style="width: 100%;">
|
||||
<el-form-item label="活动项目类型" prop="projectTypeCode">
|
||||
<el-select placeholder="请选择活动类型" style="width: 100%;"
|
||||
v-model="formData.projectTypeCode">
|
||||
<el-option
|
||||
v-for="item in projectType"
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code">
|
||||
:value="item.code"
|
||||
v-for="item in projectType">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -106,20 +112,22 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="fundsUnitName" label="申报(承办)单位" v-show="formData.activity_type!=40003">
|
||||
<el-input v-model="formData.fundsUnitName" type="text"
|
||||
placeholder="请输入申报(承办)单位"></el-input>
|
||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
||||
v-show="formData.activity_type!=40003">
|
||||
<el-input placeholder="请输入申报(承办)单位" type="text"
|
||||
v-model="formData.fundsUnitName"></el-input>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item prop="fundsUnitName" label="申报(承办)单位" v-show="formData.activity_type==40003">
|
||||
<el-select v-model="formData.fundsUnitName"
|
||||
placeholder="请选择申报(承办)单位"
|
||||
style="width: 100%;">
|
||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
||||
v-show="formData.activity_type==40003">
|
||||
<el-select placeholder="请选择申报(承办)单位"
|
||||
style="width: 100%;"
|
||||
v-model="formData.fundsUnitName">
|
||||
<el-option
|
||||
v-for="item in fundsUnitNameOption"
|
||||
:key="item.name"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.name">
|
||||
:value="item.name"
|
||||
v-for="item in fundsUnitNameOption">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
@@ -142,59 +150,66 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="plannedDate" label="活动计划时间">
|
||||
<el-form-item label="活动计划时间" prop="plannedDate">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.plannedDate"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.plannedDate"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="address" label="活动地址">
|
||||
<el-input maxlength="50" placeholder="请填写活动地址" v-model="formData.address"
|
||||
type="text"></el-input>
|
||||
<el-form-item label="活动地址" prop="venue">
|
||||
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
|
||||
v-model="formData.venue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动人数" prop="activity_number">
|
||||
<el-input maxlength="50" placeholder="请填写活动人数"
|
||||
type="number"
|
||||
v-model="formData.activity_number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="funds_money" label="申报金额">
|
||||
<el-input disabled v-model="formData.funds_money" placeholder="输入物品单价自动计算"
|
||||
type="number"></el-input>
|
||||
<el-form-item label="申报金额" prop="funds_money">
|
||||
<el-input disabled placeholder="输入物品单价自动计算" type="number"
|
||||
v-model="formData.funds_money"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="payeeId" label="收款人">
|
||||
<el-select v-model="formData.payeeId" placeholder="请选择联系人"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="selectLoading"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
:label="item.username+'-'+item.loginname+'-'+item.unitname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item prop="payeeId" label="收款人">
|
||||
<el-select v-model="formData.payeeId" placeholder="请选择联系人"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="selectLoading"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
:label="item.username+'-'+item.loginname+'-'+item.unitname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_card_number" label="报销卡号">
|
||||
<el-input v-model="formData.activity_card_number" type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_card_number" label="报销卡号">
|
||||
<el-input v-model="formData.activity_card_number" type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
|
||||
</el-row>
|
||||
@@ -204,90 +219,90 @@ layout("/layouts/platform.html"){
|
||||
<el-divider content-position="left">购置物品及价格</el-divider>
|
||||
|
||||
<div style="padding-left: 10px;padding-top: 20px">
|
||||
<el-tooltip class="item" effect="dark" content="点击添加购置物品及价格" placement="top">
|
||||
<el-button icon="el-icon-plus" circle @click="formData.goods.push({})"
|
||||
<el-tooltip class="item" content="点击添加购置物品及价格" effect="dark" placement="top">
|
||||
<el-button @click="formData.goods.push({})" circle icon="el-icon-plus"
|
||||
type="primary"></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-form-item>
|
||||
<el-table :data="formData.goods" border size="mini" style="width: 100%" height="200">
|
||||
<el-table :data="formData.goods" border height="200" size="mini"
|
||||
style="width: 100%">
|
||||
|
||||
<el-table-column sortable type="index" width="100" label="序号"
|
||||
align="center" header-align="center">
|
||||
<el-table-column align="center" header-align="center" label="序号" sortable
|
||||
type="index" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="物品名称" align="center"
|
||||
header-align="center">
|
||||
<el-table-column align="center" header-align="center" label="物品名称"
|
||||
prop="name">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
|
||||
type="text"></el-input>
|
||||
<el-input maxlength="50" placeholder="物品名称" type="text"
|
||||
v-model="row.name"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="预算费用" align="center"
|
||||
header-align="center">
|
||||
<el-table-column align="center" header-align="center" label="预算费用"
|
||||
prop="price">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="预算费用" v-model="row.price"
|
||||
type="number" @input="blur1"></el-input>
|
||||
<el-input @input="blur1" maxlength="50" placeholder="预算费用"
|
||||
type="number" v-model="row.price"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" label="实际费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="实际费用" v-model="row.actualPrice"
|
||||
type="number" @input="blur2"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" header-align="center"
|
||||
width="80px"
|
||||
fixed="right">
|
||||
<el-table-column align="center" fixed="right" fixed="right"
|
||||
header-align="center"
|
||||
label="操作"
|
||||
width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete" circle
|
||||
:disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)"></el-button>
|
||||
<el-button :disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)" circle
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">活动方案及简介</span>
|
||||
<el-divider class="dia" content-position="left"><span
|
||||
style="color: #3ea1ec;">活动方案</span>
|
||||
</el-divider>
|
||||
<el-form-item prop="activity_content" class="is-required">
|
||||
<div id="acEditor"></div>
|
||||
<el-form-item class="is-required" prop="activity_content">
|
||||
<text-editor v-model="formData.activity_content"></text-editor>
|
||||
</el-form-item>
|
||||
<el-divider class="dia" content-position="left"><span
|
||||
style="color: #3ea1ec;">活动安排</span>
|
||||
</el-divider>
|
||||
<el-form-item class="is-required" prop="activity_arrange">
|
||||
<text-editor v-model="formData.activity_arrange"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">附件</span>
|
||||
</el-divider>
|
||||
<el-row :gutter="40">
|
||||
<!-- <el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">附件</span>
|
||||
</el-divider>
|
||||
<el-row :gutter="40">
|
||||
|
||||
<el-col :span="24" class="mb25">
|
||||
<el-form-item prop="files" label="附件">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb25">
|
||||
<el-form-item label="附件" prop="files">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-row>-->
|
||||
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">签  字</span>
|
||||
<!--<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">签  字</span>
|
||||
</el-divider>
|
||||
<el-form-item prop="sign">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
</el-form-item>
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>-->
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="doAdd()">确 定</el-button>
|
||||
<el-button @click="doAdd()" type="primary">确 定</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<input>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
let acEditor = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
@@ -306,7 +321,9 @@ layout("/layouts/platform.html"){
|
||||
projectTypeCode: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
plannedDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -407,7 +424,7 @@ layout("/layouts/platform.html"){
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
const formData = clone(this.formData)
|
||||
const {plannedDate} = formData
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
@@ -415,19 +432,18 @@ layout("/layouts/platform.html"){
|
||||
formData.startTime = formData.plannedDate[0]
|
||||
formData.endTime = formData.plannedDate[1]
|
||||
formData.plannedDate = undefined
|
||||
|
||||
}
|
||||
const resp = await $.post("/platform/jf/activity_bx/apply/doAdd", {
|
||||
activityBx: JSON.stringify(formData),
|
||||
sign: this.formData.sign
|
||||
const url = "/platform/jf/activity_bx/apply"
|
||||
const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), {
|
||||
activityBx: JSON.stringify(formData)
|
||||
})
|
||||
closeLoadingFunc(loading, resp, async () => {
|
||||
location.reload();
|
||||
}, (data, msg) => {
|
||||
this.$message.error(msg);
|
||||
})
|
||||
// 添加成功 跳转到申请记录页面
|
||||
//window.location.href = '/platform/jf/activity_bx/reimbursement'
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
sublime.jumpPagePjax("/platform/jf/activity_bx/reimbursement")
|
||||
} else {
|
||||
this.$message.error(resp.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -445,35 +461,39 @@ layout("/layouts/platform.html"){
|
||||
apply_time: moment().format('YYYY-MM-DD'),
|
||||
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
|
||||
}
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
this.projectType = await getActivityTwoLevelType("50000")
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40002")
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40003")
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40001")
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
|
||||
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
|
||||
if (resp.code === 0) {
|
||||
resp.data.activity_type = resp.data.activity_type + ""
|
||||
resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate]
|
||||
this.formData = resp.data
|
||||
}
|
||||
|
||||
if (this.formData.activity_type) {
|
||||
await this.getProjectCodeChange()
|
||||
}
|
||||
|
||||
|
||||
this.$nextTick(() => {
|
||||
$("#acEditor").html("")
|
||||
acEditor = new E("#acEditor")
|
||||
acEditor.config.onchange = (html) => {
|
||||
this.formData.activity_content = html
|
||||
}
|
||||
acEditor.create()
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
this.projectType = await getActivityTwoLevelType("50000")
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.findOne(id)
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40002")
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40003")
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40001")
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
@@ -481,4 +501,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -9,25 +9,28 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
|
||||
<search :has_sh="true" :page_form.sync="pageForm" @search="doSearch">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
@@ -35,8 +38,9 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</search>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -44,52 +48,57 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="activity_name" header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name">
|
||||
<template scope="scope">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(社团)活动" :
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(社团)活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动项目类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
@@ -97,7 +106,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -109,8 +118,8 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="[1020].includes(row.state_id)"
|
||||
:command="{type:'primary',data:row}">
|
||||
<el-dropdown-item :command="{type:'primary',data:row}"
|
||||
v-if="[1020].includes(row.state_id)">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
|
||||
@@ -128,84 +137,91 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<activity-bx-info ref="act_info2" :handle="true" label="校工会负责人审核" :panes="[2,3]">
|
||||
<activity-bx-info handle label="校工会负责人审核" ref="act_info2">
|
||||
<template #handle>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
<el-form :model="formData" :rules="formRules" label-position="right"
|
||||
label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-form-item class="view-header" label="审核信息 " label-width="135px">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="username" label="审核人">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.time" disabled></el-input>
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="time" label="实际总费用">
|
||||
<el-input v-model="formData.activity_money" disabled
|
||||
placeholder="根据实际物品费用自动计算"></el-input>
|
||||
<el-form-item label="实际总费用" prop="time">
|
||||
<el-input disabled placeholder="根据实际物品费用自动计算"
|
||||
v-model="formData.activity_money"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<!-- <el-col :span="24">
|
||||
|
||||
<el-form-item label="购置物品及价格">
|
||||
<el-table :data="formData.goods" border size="mini" style="width: 100%">
|
||||
<el-form-item label="购置物品及价格">
|
||||
<el-table :data="formData.goods" border size="mini"
|
||||
style="width: 100%">
|
||||
|
||||
<el-table-column sortable type="index" width="100" label="序号"
|
||||
align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="物品名称" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称" disabled v-model="row.name"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="预算费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="预算费用" disabled v-model="row.price"
|
||||
type="number"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" label="实际费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="实际费用"
|
||||
v-model="row.actualPrice"
|
||||
:disabled="formData.apply_type==2"
|
||||
type="number" @input="blur"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="notes" label="说明" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="说明"
|
||||
v-model="row.notes"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
sortable
|
||||
type="index" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="物品名称"
|
||||
prop="name">
|
||||
<template slot-scope="{row}">
|
||||
<el-input disabled maxlength="50" placeholder="物品名称"
|
||||
type="text"
|
||||
v-model="row.name"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="预算费用"
|
||||
prop="price">
|
||||
<template slot-scope="{row}">
|
||||
<el-input disabled maxlength="50" placeholder="预算费用"
|
||||
type="number"
|
||||
v-model="row.price"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="实际费用"
|
||||
prop="actualPrice">
|
||||
<template slot-scope="{row}">
|
||||
<el-input :disabled="formData.apply_type==2" @input="blur"
|
||||
maxlength="50"
|
||||
placeholder="实际费用"
|
||||
type="number" v-model="row.actualPrice"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!– <el-table-column prop="notes" label="说明" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="说明"
|
||||
v-model="row.notes"></el-input>
|
||||
</template>
|
||||
</el-table-column>–>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="idea" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
<el-form-item label="审核意见" prop="idea">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.idea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="sign" label="签  字">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
<el-form-item label="签  字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -213,10 +229,12 @@ layout("/layouts/platform.html"){
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">拒
|
||||
绝
|
||||
<el-button :disabled="subDis" :loading="subLoading1"
|
||||
@click="doReview(false)"
|
||||
type="danger">退 回
|
||||
</el-button>
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">通
|
||||
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
|
||||
type="success">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -258,7 +276,7 @@ layout("/layouts/platform.html"){
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -282,19 +300,30 @@ layout("/layouts/platform.html"){
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post(location.href + "/doReview", {data: JSON.stringify(this.formData)})
|
||||
requestLaterMsgFun(vue, resp, null, null, (v) => {
|
||||
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
const confirm = await this.$confirm('确定要提交审核?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const formData = clone(this.formData)
|
||||
formData.goods = JSON.stringify(formData.goods)
|
||||
const resp = await $.post(loc() + "/doReview", formData)
|
||||
requestLaterMsgFun(vue, resp, null, null, (v) => {
|
||||
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -303,7 +332,6 @@ layout("/layouts/platform.html"){
|
||||
this.formData = {
|
||||
goods: []
|
||||
}
|
||||
console.log(row)
|
||||
this.$set(row, "reviewLoading", true)
|
||||
this.formData = {
|
||||
id,
|
||||
@@ -313,15 +341,13 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
this.$set(row, "reviewLoading", false)
|
||||
this.$refs.act_info2.getActInfo(id)
|
||||
const goods = await $.get(loc() + "/getGoods", {activity_id: activity_id})
|
||||
if (apply_type == 2) {
|
||||
let a = 0
|
||||
goods.data.forEach(v => {
|
||||
v.actualPrice = v.price
|
||||
a += v.price
|
||||
})
|
||||
this.$set(this.formData, "activity_money", a)
|
||||
}
|
||||
const goods = await $.get(loc() + "/getGoods", {id: id})
|
||||
let a = 0
|
||||
goods.data.forEach(v => {
|
||||
v.actualPrice = v.price
|
||||
a += v.price
|
||||
})
|
||||
this.$set(this.formData, "activity_money", a)
|
||||
this.$set(this.formData, "goods", goods.data)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
@@ -351,4 +377,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -25,22 +25,25 @@ layout("/layouts/platform.html"){
|
||||
<search :page_form.sync="pageForm" @search="doSearch">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
@@ -48,8 +51,9 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
|
||||
<!--申请记录展示-->
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -57,50 +61,54 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="activity_name" header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name">
|
||||
<template scope="scope">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(社团)活动" :
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(社团)活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动项目类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="审核人" prop="shrname" header-align="center"
|
||||
@@ -110,13 +118,14 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -128,30 +137,35 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="[1010].includes(row.state_id)"
|
||||
:command="{type:'edit',data:row}">
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
v-if="[1020,1025].includes(row.state_id)">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'uploadResults',data:row}"
|
||||
v-if="[1030].includes(row.state_id)">
|
||||
上传成果
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item v-if="[1010,1000].includes(row.state_id)"
|
||||
:command="{type:'delete',data:row}">
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
v-if="[1020].includes(row.state_id)">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="row.state_id==1060&&row.apply_type!=2"
|
||||
:command="{type:'exportWwj',data:row,apply_type:1}">
|
||||
<el-dropdown-item
|
||||
:command="{type:'exportWwj',data:row,apply_type:1}"
|
||||
v-if="row.state_id==1060&&row.apply_type!=2">
|
||||
导出申请表
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="[1060].includes(row.state_id)"
|
||||
:command="{type:'exportWwj',data:row,apply_type:2}">
|
||||
导出报销表
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item v-if="[1060].includes(row.state_id)"
|
||||
:command="{type:'exportWwj',data:row,apply_type:2}">
|
||||
导出报销表
|
||||
</el-dropdown-item>-->
|
||||
<!--# if(@shiro.hasRole('sysadmin')){ #-->
|
||||
<el-dropdown-item
|
||||
:command="{type:'edit',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'delete',data:row}">
|
||||
<!-- <el-dropdown-item :command="{type:'edit',data:row}"
|
||||
v-if="![1020].includes(row.state_id)">
|
||||
编辑
|
||||
</el-dropdown-item>-->
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
v-if="![1020].includes(row.state_id)">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--# } #-->
|
||||
@@ -172,20 +186,21 @@ layout("/layouts/platform.html"){
|
||||
<template #edit>
|
||||
|
||||
<el-form label-width="100px">
|
||||
<el-form-item label="填写申请信息 " label-width="135px" class="view-header" label-position="top">
|
||||
<el-form-item class="view-header" label="填写申请信息 " label-position="top"
|
||||
label-width="135px">
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px">
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="user_name" label="申请人姓名">
|
||||
<el-input disabled v-model="formData.user_name" type="text"></el-input>
|
||||
<el-form-item label="申请人姓名" prop="user_name">
|
||||
<el-input disabled type="text" v-model="formData.user_name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mobile" label="联系方式">
|
||||
<el-input v-model="formData.mobile" type="text"></el-input>
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input type="text" v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -193,19 +208,20 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_name" label="活动名称">
|
||||
<el-input v-model="formData.activity_name" disabled></el-input>
|
||||
<el-form-item label="活动名称" prop="activity_name">
|
||||
<el-input disabled v-model="formData.activity_name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_type" label="活动类型">
|
||||
<el-select v-model="formData.activity_type" placeholder="请选择活动主体类型" style="width: 100%">
|
||||
<el-form-item label="活动类型" prop="activity_type">
|
||||
<el-select placeholder="请选择活动主体类型" style="width: 100%"
|
||||
v-model="formData.activity_type">
|
||||
<el-option
|
||||
v-for="item in activityType"
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code">
|
||||
:value="item.code"
|
||||
v-for="item in activityType">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -214,35 +230,40 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-row gutter="20" v-if="formData.apply_type==2">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="venue" label="活动人数">
|
||||
<el-input v-model="formData.activity_number" placeholder="请输入活动人数" type="number"></el-input>
|
||||
<el-form-item label="活动人数" prop="venue">
|
||||
<el-input placeholder="请输入活动人数" type="number"
|
||||
v-model="formData.activity_number"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="venue" label="活动地点">
|
||||
<el-input v-model="formData.venue" placeholder="请输入活动地点" type="text"></el-input>
|
||||
<el-form-item label="活动地点" prop="venue">
|
||||
<el-input placeholder="请输入活动地点" type="text"
|
||||
v-model="formData.venue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_money" label="报销金额">
|
||||
<el-input disabled v-model="formData.activity_money" placeholder="输入物品单价自动计算"
|
||||
type="number"></el-input>
|
||||
<el-form-item label="报销金额" prop="activity_money">
|
||||
<el-input disabled placeholder="输入物品单价自动计算"
|
||||
type="number"
|
||||
v-model="formData.activity_money"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_card_number" label="报销卡号">
|
||||
<el-input v-model="formData.activity_card_number" type="number"></el-input>
|
||||
<el-form-item label="报销卡号" prop="activity_card_number">
|
||||
<el-input type="number"
|
||||
v-model="formData.activity_card_number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activity_time" label="活动时间">
|
||||
<el-date-picker style="width: 100%"
|
||||
<el-form-item label="活动时间" prop="activity_time">
|
||||
<el-date-picker disabled
|
||||
placeholder="活动时间"
|
||||
style="width: 100%" type="date"
|
||||
v-model="formData.activity_time"
|
||||
type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="活动时间" disabled>
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -250,21 +271,23 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-row gutter="20" v-if="formData.apply_type==1">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="projectCode" label="项目编号">
|
||||
<el-input disabled v-model="formData.projectCode" placeholder="选择活动类型自动生成"></el-input>
|
||||
<el-form-item label="项目编号" prop="projectCode">
|
||||
<el-input disabled placeholder="选择活动类型自动生成"
|
||||
v-model="formData.projectCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="fundsUnitName" label="申报(承办)单位">
|
||||
<el-input v-model="formData.fundsUnitName" type="text" placeholder="请输入申报(承办)单位"></el-input>
|
||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName">
|
||||
<el-input placeholder="请输入申报(承办)单位" type="text"
|
||||
v-model="formData.fundsUnitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
|
||||
<el-form-item prop="plannedDate" label="活动计划时间">
|
||||
<el-form-item label="活动计划时间" prop="plannedDate">
|
||||
<el-input disabled v-model="formData.plannedDate"></el-input>
|
||||
<!-- <el-date-picker style="width: 100%"
|
||||
v-model="formData.plannedDate"
|
||||
@@ -275,9 +298,10 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="funds_money" label="申报金额">
|
||||
<el-input disabled v-model="formData.funds_money" placeholder="输入物品单价自动计算"
|
||||
type="number"></el-input>
|
||||
<el-form-item label="申报金额" prop="funds_money">
|
||||
<el-input disabled placeholder="输入物品单价自动计算"
|
||||
type="number"
|
||||
v-model="formData.funds_money"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -287,8 +311,9 @@ layout("/layouts/platform.html"){
|
||||
<el-divider content-position="left">购置物品及价格</el-divider>
|
||||
|
||||
<div style="padding-left: 10px;padding-top:60px">
|
||||
<el-tooltip class="item" effect="dark" content="点击添加购置物品及价格" placement="top">
|
||||
<el-button icon="el-icon-plus" circle @click="formData.goods.push({})"
|
||||
<el-tooltip class="item" content="点击添加购置物品及价格" effect="dark"
|
||||
placement="top">
|
||||
<el-button @click="formData.goods.push({})" circle icon="el-icon-plus"
|
||||
type="primary"></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -299,60 +324,62 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-table :data="formData.goods" border size="mini" style="width: 100%">
|
||||
|
||||
<el-table-column sortable type="index" width="100" label="序号"
|
||||
align="center" header-align="center">
|
||||
<el-table-column align="center" header-align="center" label="序号" sortable
|
||||
type="index" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="物品名称" align="center"
|
||||
header-align="center">
|
||||
<el-table-column align="center" header-align="center" label="物品名称"
|
||||
prop="name">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
|
||||
type="text"></el-input>
|
||||
<el-input maxlength="50" placeholder="物品名称" type="text"
|
||||
v-model="row.name"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="预算费用" align="center"
|
||||
header-align="center">
|
||||
<el-table-column align="center" header-align="center" label="预算费用"
|
||||
prop="price">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="预算费用" v-model="row.price"
|
||||
type="number" @input="blur"></el-input>
|
||||
<el-input @input="blur" maxlength="50" placeholder="预算费用"
|
||||
type="number" v-model="row.price"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" header-align="center"
|
||||
width="80px"
|
||||
fixed="right">
|
||||
<el-table-column align="center" fixed="right" fixed="right"
|
||||
header-align="center"
|
||||
label="操作"
|
||||
width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete" circle
|
||||
:disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)"></el-button>
|
||||
<el-button :disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)" circle
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">{{formData.apply_type==1?'活动方案及简介':'活动内容'}}</span>
|
||||
<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">{{formData.apply_type==1?'活动方案及简介':'活动内容'}}</span>
|
||||
</el-divider>
|
||||
<el-form-item prop="activity_content" class="is-required" label-width="auto">
|
||||
<el-form-item class="is-required" label-width="auto" prop="activity_content">
|
||||
<div id="acEditor"></div>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">附  件</span>
|
||||
<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">附  件</span>
|
||||
</el-divider>
|
||||
<el-form-item prop="files" label-width="auto">
|
||||
<el-form-item label-width="auto" prop="files">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">签  字</span>
|
||||
<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">签  字</span>
|
||||
</el-divider>
|
||||
<el-form-item prop="sign" label-width="auto">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
<el-form-item label-width="auto" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="formData.id?doEdit():doAdd()">确 定</el-button>
|
||||
<el-button @click="formData.id?doEdit():doAdd()" type="primary">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -364,6 +391,17 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
title="成果提交"
|
||||
width="30%">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button @click="uploadResults" type="primary">提交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -403,14 +441,15 @@ layout("/layouts/platform.html"){
|
||||
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{validator: validAc, trigger: ['blur', 'change']}],
|
||||
},
|
||||
activity: []
|
||||
activity: [],
|
||||
dialogVisible: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -420,15 +459,48 @@ layout("/layouts/platform.html"){
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'uploadResults') {
|
||||
this.openUploadResults(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data)
|
||||
} else if (type == 'exportWwj') {
|
||||
this.exportWwj(data, apply_type)
|
||||
}
|
||||
},
|
||||
async uploadResults() {
|
||||
if (!this.formData.files || this.formData.files.length === 0) {
|
||||
this.$message.error("请上传成果后在提交");
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm("确定要提交成果吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doEdit", {
|
||||
files: JSON.stringify(this.formData.files),
|
||||
id: this.formData.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message({
|
||||
message: resp.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.doSearch()
|
||||
this.dialogVisible = false
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
openUploadResults(data) {
|
||||
this.formData = data
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
exportWwj(row, apply_type) {
|
||||
const {id, activity_id, activity_type, otherFiles, photoFiles, billFiles} = row
|
||||
let filesName = null
|
||||
/*let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
|
||||
if (filesName != null) {
|
||||
@@ -451,7 +523,8 @@ layout("/layouts/platform.html"){
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
|
||||
}
|
||||
}
|
||||
}*/
|
||||
window.open("/platform/jf/activity_bx/reimbursementview/doExport?id=" + id)
|
||||
},
|
||||
blur() {
|
||||
let num = 0
|
||||
@@ -573,32 +646,33 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async openEdit(row) {
|
||||
const {id} = row
|
||||
this.formData = {
|
||||
goods: [],
|
||||
plannedDate: []
|
||||
}
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
const resp = await $.get(location.href + "/findOne", {id})
|
||||
/* this.formData = {
|
||||
goods: [],
|
||||
plannedDate: []
|
||||
}
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
const resp = await $.get(location.href + "/findOne", {id})
|
||||
|
||||
requestLaterFun(resp, (v) => {
|
||||
v.activity_type = v.activity_type.toString()
|
||||
v.goods = v.Goods
|
||||
if (v.files && v.files.length > 0) v.files = JSON.parse(v.files)
|
||||
v.plannedDate = (v.startPlannedDate + "——" + v.endPlannedDate)
|
||||
this.formData = v
|
||||
requestLaterFun(resp, (v) => {
|
||||
v.activity_type = v.activity_type.toString()
|
||||
v.goods = v.Goods
|
||||
if (v.files && v.files.length > 0) v.files = JSON.parse(v.files)
|
||||
v.plannedDate = (v.startPlannedDate + "——" + v.endPlannedDate)
|
||||
this.formData = v
|
||||
|
||||
|
||||
this.$nextTick(() => {
|
||||
$("#acEditor").html("")
|
||||
acEditor = new E("#acEditor")
|
||||
acEditor.config.onchange = (html) => {
|
||||
this.formData.activity_content = html
|
||||
}
|
||||
acEditor.create()
|
||||
acEditor.txt.html(v.activity_content)
|
||||
})
|
||||
this.$refs.guava.edit()
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
$("#acEditor").html("")
|
||||
acEditor = new E("#acEditor")
|
||||
acEditor.config.onchange = (html) => {
|
||||
this.formData.activity_content = html
|
||||
}
|
||||
acEditor.create()
|
||||
acEditor.txt.html(v.activity_content)
|
||||
})
|
||||
this.$refs.guava.edit()
|
||||
})*/
|
||||
window.location.href = "/platform/jf/Funds/apply?id=" + id
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
@@ -641,4 +715,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -9,38 +9,40 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 150px"
|
||||
placeholder="选择年">
|
||||
placeholder="选择年"
|
||||
style="width: 150px"
|
||||
type="year" v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<!--分工会查询-->
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="$emit('search')">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-input @keyup.enter.native="$emit('search')" clearable placeholder="请输入内容"
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
<el-option label="活动名称" value="activity_name"></el-option>
|
||||
@@ -48,18 +50,23 @@ layout("/layouts/platform.html"){
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button icon="el-icon-download" @click="download">导出名单</i>
|
||||
<el-button @click="downloadResults" icon="el-icon-download">下载全部成果</i>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- <div class="pull-right offscreen-right">
|
||||
<el-button @click="download" icon="el-icon-download">导出名单</i>
|
||||
</el-button>
|
||||
</div>-->
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -67,51 +74,58 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(社团)活动" :
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(社团)活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动项目类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="申请类型"
|
||||
prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
@@ -119,7 +133,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -131,14 +145,14 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<!--<el-dropdown-item v-if="row.state_id==1060&&row.apply_type!=2"
|
||||
:command="{type:'exportWwj',data:row}">
|
||||
<el-dropdown-item :command="{type:'exportWwj',data:row}"
|
||||
v-if="row.state_id==1060&&row.apply_type!=2">
|
||||
导出申请表
|
||||
</el-dropdown-item>-->
|
||||
<el-dropdown-item v-if="1060==row.state_id"
|
||||
:command="{type:'exportWwj',data:row}">
|
||||
导出报销表
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item v-if="1060==row.state_id"
|
||||
:command="{type:'exportWwj',data:row}">
|
||||
导出报销表
|
||||
</el-dropdown-item>-->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -175,7 +189,11 @@ layout("/layouts/platform.html"){
|
||||
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
@@ -185,7 +203,7 @@ layout("/layouts/platform.html"){
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
@@ -197,34 +215,42 @@ layout("/layouts/platform.html"){
|
||||
this.exportWwj(data)
|
||||
}
|
||||
},
|
||||
downloadResults() {
|
||||
if (!(this.pageForm.year && this.pageForm.year.length)) {
|
||||
this.$message.error("请选择日期");
|
||||
return
|
||||
}
|
||||
window.open("/platform/jf/activity_bx/reimbursementview/downloadResults?year=" + this.pageForm.year)
|
||||
},
|
||||
exportWwj(row) {
|
||||
const {id, apply_type, activity_type, otherFiles, photoFiles, billFiles} = row
|
||||
|
||||
let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
/* let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
|
||||
if (filesName != null) {
|
||||
this.$confirm('您没有上传' + filesName + '是否需要去上传', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let activityType = ""
|
||||
if (activity_type == 40001) activityType = "/school?id="
|
||||
if (activity_type == 40002) activityType = "/union?id="
|
||||
if (activity_type == 40003) activityType = "/club?id="
|
||||
window.location.href = "/platform/activity/apply" + activityType + activity_id
|
||||
if (filesName != null) {
|
||||
this.$confirm('您没有上传' + filesName + '是否需要去上传', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let activityType = ""
|
||||
if (activity_type == 40001) activityType = "/school?id="
|
||||
if (activity_type == 40002) activityType = "/union?id="
|
||||
if (activity_type == 40003) activityType = "/club?id="
|
||||
window.location.href = "/platform/activity/apply" + activityType + activity_id
|
||||
|
||||
}).catch(() => {
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
} else {
|
||||
if (apply_type == 2) {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (apply_type == 2) {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
|
||||
}
|
||||
}*/
|
||||
window.open("/platform/jf/activity_bx/reimbursementview/doExport?id=" + id)
|
||||
},
|
||||
download() {
|
||||
if (!(this.pageForm.year && this.pageForm.year.length)) {
|
||||
|
||||
@@ -4,21 +4,42 @@ layout("/layouts/platform.html"){
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button @click="openAdd" size="medium">
|
||||
<el-row justify="end" type="flex">
|
||||
<el-col>
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">菜单名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input clearable placeholder="请填写名称查询" style="width: 100%;"
|
||||
v-model="menuName" @keyup.enter.native="doSearch"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-button @click="openAdd" size="medium" type="primary">
|
||||
<i class="ti-plus"></i>
|
||||
新建菜单
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button @click="openSort" size="medium">
|
||||
<el-button @click="openSort" size="medium" type="primary">
|
||||
排序
|
||||
</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="tableData" :highlight-current-row="true" :key="tableKey"
|
||||
:load="loadChild" lazy row-key="id"
|
||||
<el-table :data="tableData"
|
||||
:highlight-current-row="true"
|
||||
:key="tableKey"
|
||||
:load="loadChild"
|
||||
:expand-row-keys="expandedRowKeysRenew"
|
||||
@expand-change="handleExpandChange"
|
||||
ref="tableData"
|
||||
lazy
|
||||
row-key="id"
|
||||
style="width: 100%">
|
||||
<el-table-column :show-overflow-tooltip="true" align="left" header-align="center"
|
||||
label="菜单名称" prop="name" width="200">
|
||||
@@ -37,11 +58,13 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" header-align="center" label="权限标识"
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" header-align="center"
|
||||
label="权限标识"
|
||||
prop="permission">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" header-align="center" label="启用状态"
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" header-align="center"
|
||||
label="启用状态"
|
||||
prop="disabled">
|
||||
<template slot-scope="scope">
|
||||
<i class="fa fa-circle text-danger ml5"
|
||||
@@ -60,8 +83,9 @@ layout("/layouts/platform.html"){
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'add',id:scope.row.id,name:scope.row.name}"
|
||||
v-if="scope.row.type=='menu'">
|
||||
<el-dropdown-item
|
||||
:command="{type:'add',id:scope.row.id,name:scope.row.name}"
|
||||
v-if="scope.row.type=='menu'">
|
||||
添加子菜单
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
@@ -73,18 +97,21 @@ layout("/layouts/platform.html"){
|
||||
:command="{type:'disable',id:scope.row.id,name:scope.row.name,row:scope.row}">
|
||||
禁用
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'editMenu',id:scope.row.id,name:scope.row.name}"
|
||||
divided
|
||||
v-if="scope.row.type=='menu'">
|
||||
<el-dropdown-item
|
||||
:command="{type:'editMenu',id:scope.row.id,name:scope.row.name}"
|
||||
divided
|
||||
v-if="scope.row.type=='menu'">
|
||||
修改
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'editData',id:scope.row.id,name:scope.row.name}"
|
||||
divided
|
||||
v-if="scope.row.type=='data'">
|
||||
<el-dropdown-item
|
||||
:command="{type:'editData',id:scope.row.id,name:scope.row.name}"
|
||||
divided
|
||||
v-if="scope.row.type=='data'">
|
||||
修改
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',id:scope.row.id,name:scope.row.name}"
|
||||
v-if="scope.row.path!='0001'">
|
||||
<el-dropdown-item
|
||||
:command="{type:'delete',id:scope.row.id,name:scope.row.name}"
|
||||
v-if="scope.row.path!='0001'">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -97,216 +124,235 @@ layout("/layouts/platform.html"){
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
title="新建菜单"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="addDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
title="新建菜单"
|
||||
width="50%">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules" size="small" label-width="80px">
|
||||
<el-form-item prop="parentId" label="上级菜单" label-width="80px">
|
||||
<el-cascader v-if="!isAddFromSub" :options="menuOptions" :props="props" v-model="parentMenu"
|
||||
placeholder="不选择则为顶级" style="width: 100%"></el-cascader>
|
||||
<el-input v-if="isAddFromSub" type="text" v-model="formData.parentName" :disabled="true"></el-input>
|
||||
<el-form :model="formData" :rules="formRules" label-width="80px" ref="addForm" size="small">
|
||||
<el-form-item label="上级菜单" label-width="80px" prop="parentId">
|
||||
<el-cascader :options="menuOptions" :props="props" placeholder="不选择则为顶级"
|
||||
style="width: 100%"
|
||||
v-if="!isAddFromSub" v-model="parentMenu"></el-cascader>
|
||||
<el-input :disabled="true" type="text" v-if="isAddFromSub"
|
||||
v-model="formData.parentName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name" label="菜单名称">
|
||||
<el-input maxlength="100" placeholder="菜单名称"
|
||||
v-model="formData.name"
|
||||
auto-complete="off" tabindex="3" type="text"></el-input>
|
||||
<el-form-item label="菜单名称" prop="name">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="菜单名称"
|
||||
tabindex="3" type="text" v-model="formData.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="aliasName" label="菜单别名">
|
||||
<el-input maxlength="100" placeholder="菜单名称"
|
||||
v-model="formData.aliasName"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
<el-form-item label="菜单别名" prop="aliasName">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="菜单名称"
|
||||
tabindex="4" type="text" v-model="formData.aliasName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="permission" label="权限标识">
|
||||
<el-input maxlength="100" placeholder="权限标识,如 sys.manager.menu"
|
||||
v-model="formData.permission"
|
||||
auto-complete="off" tabindex="5" type="text"></el-input>
|
||||
<el-form-item label="权限标识" prop="permission">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="权限标识,如 sys.manager.menu"
|
||||
tabindex="5" type="text" v-model="formData.permission"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="href" label="URL">
|
||||
<el-input maxlength="100" placeholder="URL"
|
||||
v-model="formData.href"
|
||||
auto-complete="off" tabindex="6" type="text"></el-input>
|
||||
<el-form-item label="URL" prop="href">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="URL"
|
||||
tabindex="6" type="text" v-model="formData.href"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="icon" label="图标">
|
||||
<el-input maxlength="100" placeholder="图标"
|
||||
v-model="formData.icon"
|
||||
auto-complete="off" tabindex="7" type="text"></el-input>
|
||||
<el-form-item label="图标" prop="icon">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="图标"
|
||||
tabindex="7" type="text" v-model="formData.icon"></el-input>
|
||||
<span :class="formData.icon"></span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<!--<el-form-item label="操作指南" prop="description">
|
||||
<file-upload :files.sync="formData.description" :max="1" :type="['doc','docx','pdf']">
|
||||
</file-upload>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="启用状态" prop="disabled">
|
||||
<el-switch
|
||||
v-model="formData.disabled"
|
||||
active-color="#ff4949"
|
||||
inactive-color="#13ce66">
|
||||
inactive-color="#13ce66"
|
||||
v-model="formData.disabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="type" label="数据权限">
|
||||
<el-radio-group @change="formRadioChange" v-model="formData.children" size="mini">
|
||||
<el-form-item label="数据权限" prop="type">
|
||||
<el-radio-group @change="formRadioChange" size="mini" v-model="formData.children">
|
||||
<el-radio label="false">无</el-radio>
|
||||
<el-radio label="true">有</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="formData.children=='true'"
|
||||
v-for="(menu, index) in formData.buttons"
|
||||
:label="'权限' + (index+1)"
|
||||
:key="menu.key"
|
||||
:label="'权限' + (index+1)"
|
||||
:prop="'buttons[' + index + ']'"
|
||||
:rules="{required: true,validator: validateMenu,trigger: ['blur','change']}"
|
||||
v-for="(menu, index) in formData.buttons"
|
||||
v-if="formData.children=='true'"
|
||||
>
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="6">
|
||||
<el-input v-model="menu.name" placeholder="权限名称"></el-input>
|
||||
<el-input placeholder="权限名称" v-model="menu.name"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="menu.permission" placeholder="权限标识,如 sys.manager.menu.add"></el-input>
|
||||
<el-input placeholder="权限标识,如 sys.manager.menu.add"
|
||||
v-model="menu.permission"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button @click.prevent="formRemoveMenu(menu)" icon="el-icon-delete" size="small"></el-button>
|
||||
<el-button @click.prevent="formRemoveMenu(menu)" icon="el-icon-delete"
|
||||
size="small"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-row v-if="formData.children=='true'" style="text-align: right;padding-right: 17px;">
|
||||
<el-button size="small" @click="formAddMenu" icon="el-icon-circle-plus">添加</el-button>
|
||||
<el-row style="text-align: right;padding-right: 17px;" v-if="formData.children=='true'">
|
||||
<el-button @click="formAddMenu" icon="el-icon-circle-plus" size="small">添加
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
<el-button @click="doAdd" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="修改菜单"
|
||||
:visible.sync="editMenuDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="editMenuDialogVisible"
|
||||
title="修改菜单"
|
||||
width="50%">
|
||||
<el-form :model="formData" ref="editMenuForm" :rules="formRules" size="small" label-width="80px">
|
||||
<el-form-item prop="parentId" label="上级菜单" label-width="80px">
|
||||
<el-input type="text" v-model="formData.parentName" :disabled="true"></el-input>
|
||||
<el-form :model="formData" :rules="formRules" label-width="80px" ref="editMenuForm"
|
||||
size="small">
|
||||
<el-form-item label="上级菜单" label-width="80px" prop="parentId">
|
||||
<el-input :disabled="true" type="text" v-model="formData.parentName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name" label="菜单名称">
|
||||
<el-input maxlength="100" placeholder="菜单名称"
|
||||
v-model="formData.name"
|
||||
auto-complete="off" tabindex="3" type="text"></el-input>
|
||||
<el-form-item label="菜单名称" prop="name">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="菜单名称"
|
||||
tabindex="3" type="text" v-model="formData.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="aliasName" label="菜单别名">
|
||||
<el-input maxlength="100" placeholder="菜单名称"
|
||||
v-model="formData.aliasName"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
<el-form-item label="菜单别名" prop="aliasName">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="菜单名称"
|
||||
tabindex="4" type="text" v-model="formData.aliasName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="permission" label="权限标识">
|
||||
<el-input maxlength="100" placeholder="权限标识,如 sys.manager.menu"
|
||||
v-model="formData.permission"
|
||||
auto-complete="off" tabindex="5" type="text"></el-input>
|
||||
<el-form-item label="权限标识" prop="permission">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="权限标识,如 sys.manager.menu"
|
||||
tabindex="5" type="text" v-model="formData.permission"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="href" label="URL">
|
||||
<el-input maxlength="100" placeholder="URL"
|
||||
v-model="formData.href"
|
||||
auto-complete="off" tabindex="6" type="text"></el-input>
|
||||
<el-form-item label="URL" prop="href">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="URL"
|
||||
tabindex="6" type="text" v-model="formData.href"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="icon" label="图标">
|
||||
<el-input maxlength="100" placeholder="图标"
|
||||
v-model="formData.icon"
|
||||
auto-complete="off" tabindex="7" type="text"></el-input>
|
||||
<el-form-item label="图标" prop="icon">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="图标"
|
||||
tabindex="7" type="text" v-model="formData.icon"></el-input>
|
||||
<span :class="formData.icon"></span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-form-item label="操作指南" prop="description">
|
||||
<file-upload :files.sync="formData.description" :max="1" :type="['doc','docx','pdf']">
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态" prop="disabled">
|
||||
<el-switch
|
||||
v-model="formData.disabled"
|
||||
active-color="#ff4949"
|
||||
inactive-color="#13ce66">
|
||||
inactive-color="#13ce66"
|
||||
v-model="formData.disabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="type" label="数据权限">
|
||||
<el-radio-group @change="formRadioChange" v-model="formData.children" size="mini">
|
||||
<el-form-item label="数据权限" prop="type">
|
||||
<el-radio-group @change="formRadioChange" size="mini" v-model="formData.children">
|
||||
<el-radio label="false">无</el-radio>
|
||||
<el-radio label="true">有</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="formData.children=='true'"
|
||||
v-for="(menu, index) in formData.buttons"
|
||||
:label="'权限' + (index+1)"
|
||||
:key="menu.key"
|
||||
:label="'权限' + (index+1)"
|
||||
:prop="'buttons[' + index + ']'"
|
||||
:rules="{required: true,validator: validateMenu,trigger: ['blur','change']}"
|
||||
v-for="(menu, index) in formData.buttons"
|
||||
v-if="formData.children=='true'"
|
||||
>
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="6">
|
||||
<el-input v-model="menu.name" placeholder="权限名称"></el-input>
|
||||
<el-input placeholder="权限名称" v-model="menu.name"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="menu.permission" placeholder="权限标识,如 sys.manager.menu.add"></el-input>
|
||||
<el-input placeholder="权限标识,如 sys.manager.menu.add"
|
||||
v-model="menu.permission"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button @click.prevent="formRemoveMenu(menu)" icon="el-icon-delete" size="small"></el-button>
|
||||
<el-button @click.prevent="formRemoveMenu(menu)" icon="el-icon-delete"
|
||||
size="small"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-row v-if="formData.children=='true'" style="text-align: right;padding-right: 17px;">
|
||||
<el-button size="small" @click="formAddMenu" icon="el-icon-circle-plus">添加</el-button>
|
||||
<el-row style="text-align: right;padding-right: 17px;" v-if="formData.children=='true'">
|
||||
<el-button @click="formAddMenu" icon="el-icon-circle-plus" size="small">添加
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="editMenuDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEditMenu">确 定</el-button>
|
||||
<el-button @click="doEditMenu" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="修改权限"
|
||||
:visible.sync="editDataDialogVisible"
|
||||
title="修改权限"
|
||||
width="50%">
|
||||
<el-form :model="formData2" ref="editDataForm" :rules="formRules2" size="small" label-width="80px">
|
||||
<el-form-item prop="name" label="权限名称">
|
||||
<el-input maxlength="100" placeholder="权限名称"
|
||||
v-model="formData2.name"
|
||||
auto-complete="off" tabindex="1" type="text"></el-input>
|
||||
<el-form :model="formData2" :rules="formRules2" label-width="80px" ref="editDataForm"
|
||||
size="small">
|
||||
<el-form-item label="权限名称" prop="name">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="权限名称"
|
||||
tabindex="1" type="text" v-model="formData2.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="permission" label="权限标识">
|
||||
<el-input maxlength="100" placeholder="权限标识,如 sys.manager.menu.add"
|
||||
v-model="formData2.permission"
|
||||
auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
<el-form-item label="权限标识" prop="permission">
|
||||
<el-input auto-complete="off" maxlength="100"
|
||||
placeholder="权限标识,如 sys.manager.menu.add"
|
||||
tabindex="2" type="text" v-model="formData2.permission"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-form-item label="启用状态" prop="disabled">
|
||||
<el-switch
|
||||
v-model="formData2.disabled"
|
||||
active-color="#ff4949"
|
||||
inactive-color="#13ce66">
|
||||
inactive-color="#13ce66"
|
||||
v-model="formData2.disabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="editDataDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEditData">确 定</el-button>
|
||||
<el-button @click="doEditData" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="菜单排序"
|
||||
:visible.sync="sortDialogVisible"
|
||||
title="菜单排序"
|
||||
width="50%">
|
||||
<el-tree
|
||||
ref="sortMenuTree"
|
||||
:data="sortMenuData"
|
||||
draggable
|
||||
:allow-drop="sortAllowDrop"
|
||||
node-key="id"
|
||||
:data="sortMenuData"
|
||||
:props="defaultProps"
|
||||
draggable
|
||||
node-key="id"
|
||||
ref="sortMenuTree"
|
||||
>
|
||||
<span class="custom-tree-node" slot-scope="scope">
|
||||
<span>{{ scope.node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="sortDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doSort">确 定</el-button>
|
||||
<el-button @click="doSort" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
menuName:'',
|
||||
addDialogVisible: false,
|
||||
editMenuDialogVisible: false,
|
||||
editDataDialogVisible: false,
|
||||
@@ -359,10 +405,16 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
},
|
||||
// 保存展开状态的数组
|
||||
expandedRowKeysRenew: [],
|
||||
tableTreeRefreshTool:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch(){
|
||||
this.initTreeTable()
|
||||
},
|
||||
//验证动态添加行数据
|
||||
validateMenu: function (rule, value, callback) {
|
||||
if (value.name == '') {
|
||||
@@ -497,7 +549,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'success'
|
||||
});
|
||||
self.addDialogVisible = false;
|
||||
self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -523,7 +575,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'success'
|
||||
});
|
||||
self.editMenuDialogVisible = false;
|
||||
self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -546,7 +598,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'success'
|
||||
});
|
||||
self.editDataDialogVisible = false;
|
||||
self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -560,15 +612,23 @@ layout("/layouts/platform.html"){
|
||||
initTreeTable: function () {
|
||||
var self = this;
|
||||
var url = base + "/platform/sys/menu/child";
|
||||
$.post(url, {pid: ""}, function (data) {
|
||||
if (data.code == 0) {
|
||||
// 在更新数据前保存当前的展开状态
|
||||
$.post(url, {pid: "",menuName:this.menuName}, function (data) {
|
||||
if (data.code === 0) {
|
||||
self.tableData = data.data;
|
||||
self.tableKey = +new Date();
|
||||
// 恢复展开状态
|
||||
}
|
||||
}, "json");
|
||||
|
||||
},
|
||||
loadChild: function (tree, treeNode, resolve) {
|
||||
// 在之前声明的全局变量中,增加一个key为 本条数据的id,id可替换为你数据中的任意唯一值
|
||||
this.tableTreeRefreshTool[tree.id] = {}
|
||||
// 重要!保存resolve方法,以便后续使用
|
||||
this.tableTreeRefreshTool[tree.id].resolve = resolve
|
||||
// 记录展开次数,具体作用后续介绍
|
||||
this.tableTreeRefreshTool[tree.id].expandCount = 0
|
||||
var url = base + "/platform/sys/menu/child";
|
||||
$.post(url, {pid: tree.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
@@ -644,7 +704,7 @@ layout("/layouts/platform.html"){
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.initTreeTable();
|
||||
self.loadChildByExpandedKeys();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
@@ -656,8 +716,32 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleExpandChange(row, expanded) {
|
||||
if ((row.parentId === '' || row.parentId == null) && !expanded) {
|
||||
this.expandedRowKeysRenew = []
|
||||
return
|
||||
}
|
||||
if (expanded) {
|
||||
this.expandedRowKeysRenew.push(row.id)
|
||||
} else {
|
||||
const index = this.expandedRowKeysRenew.findIndex(v => v === row.id)
|
||||
this.expandedRowKeysRenew.splice(index, 1)
|
||||
}
|
||||
},
|
||||
loadChildByExpandedKeys() {
|
||||
if (this.expandedRowKeysRenew && this.expandedRowKeysRenew.length > 0) {
|
||||
this.expandedRowKeysRenew.forEach((v) => {
|
||||
const curr = this.tableTreeRefreshTool[v]
|
||||
// api请求
|
||||
$.get('/platform/sys/menu/child', {pid: v}).then(res => {
|
||||
curr.resolve(res.data)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.initTreeTable()
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created: function () {
|
||||
this.initTreeTable();
|
||||
@@ -666,4 +750,4 @@ layout("/layouts/platform.html"){
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -0,0 +1,432 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<tree-layout style="height: calc(100vh - 70px)">
|
||||
<template #tree>
|
||||
|
||||
<div style="padding: 20px;">
|
||||
<el-input
|
||||
placeholder="输入关键字进行查找"
|
||||
v-model="filterText">
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<el-tree ref="tree" :data="treeData" class="v-tree" node-key="id"
|
||||
:props="defaultProps"
|
||||
default-expand-all :expand-on-click-node="false"
|
||||
@node-click="handleNodeClick" accordion
|
||||
highlight-current :filter-node-method="filterNode">
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
|
||||
<div v-if="node.level==1" style="font-size: 16px;" class="v-node"><i
|
||||
class="el-icon-s-home"></i>
|
||||
{{ data.unionname }}
|
||||
</div>
|
||||
|
||||
<div v-if="node.level==2"
|
||||
style="font-size: 15px" :title="data.name" class="v-node">
|
||||
<i class="el-icon-star-on" v-if="checkData.name==data.name"></i>
|
||||
<i class="el-icon-star-off" v-else></i>
|
||||
{{ data.unionname }}
|
||||
<span style="color: #f76c6c">{{ '(' + data.revelCount + ')'}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tree>
|
||||
</template>
|
||||
<template>
|
||||
<el-card shadow="never" style="margin: 0 10px">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
placeholder="选择年度" style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-input style="width: 250px;" placeholder="请输入类型名称查询" v-model="pageForm.revelName"></el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable v-model="pageForm.typeId" filterable placeholder="请选择资料类型">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-button type="primary" @click="doSearch" icon="el-icon-search"></el-button>
|
||||
</div>
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button type="primary" size="medium" @click="openAdd"><i
|
||||
class="ti-plus"></i> 添加资料
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" style="margin:10px 10px 0 10px">
|
||||
<vi-title2 title="资料列表"></vi-title2>
|
||||
<el-table :data="tableData" @sort-change='pageOrder' height="626">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="revelName" label="资料名称"></el-table-column>
|
||||
<el-table-column sortable prop="typeName" label="资料类型"></el-table-column>
|
||||
<el-table-column sortable prop="username" label="上传人"></el-table-column>
|
||||
<el-table-column sortable prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column sortable prop="time" label="上传时间"></el-table-column>
|
||||
<el-table-column prop="userOnline" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini"><i class="ti-settings"></i><span
|
||||
class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
预览
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="(${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})"
|
||||
:command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="(${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})"
|
||||
:command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</tree-layout>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="新建资料" :visible.sync="addDialogVisible">
|
||||
<el-form :model="formData" ref="addForm" :rules="rules" label-width="100px">
|
||||
<el-form-item label="上传人">
|
||||
<el-input readonly value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="revelName" label="资料名称">
|
||||
<el-input placeholder="请填写工作资料名称" v-model="formData.revelName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeId" label="资料类型">
|
||||
<el-select v-model="formData.typeId" placeholder="选择资料类型" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="files" label="附件上传">
|
||||
<file-upload :files.sync="formData.files"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="编辑资料" :visible.sync="editDialogVisible">
|
||||
<el-form :model="formData" ref="editForm" :rules="rules" label-width="100px">
|
||||
<el-form-item label="上传人">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="revelName" label="资料名称">
|
||||
<el-input placeholder="请填写工作资料名称" v-model="formData.revelName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeId" label="资料类型">
|
||||
<el-select v-model="formData.typeId" placeholder="选择资料类型" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="files" label="附件上传">
|
||||
<file-upload :files.sync="formData.files"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="资料阅览" :visible.sync="viewDialogVisible">
|
||||
<el-descriptions class="margin-top" title="" :column="2" border>
|
||||
<el-descriptions-item span="2">
|
||||
<template slot="label">资料名称</template>
|
||||
<div v-html="formData.revelName"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">上传人</template>
|
||||
<div v-html="formData.username"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">上传时间</template>
|
||||
<div v-html="formData.time"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">所属工会</template>
|
||||
<div v-html="formData.unionName"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">资料类型</template>
|
||||
<div v-html="formData.typeName"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2">
|
||||
<template slot="label">附件</template>
|
||||
<div>
|
||||
<file-upload :files.sync="formData.files" view></file-upload>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="viewDialogVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: "#app",
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'tree-layout': httpVueLoader('/components/plugins/TreeLayout.vue'),
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
filterText: '',
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
children: 'child',
|
||||
label: 'unionname',
|
||||
},
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
viewDialogVisible: false,
|
||||
tableData: [],
|
||||
jdhList: [],
|
||||
typeList: [],
|
||||
fileList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
},
|
||||
formData: {},
|
||||
rules: {
|
||||
revelName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
typeId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
delFiles: [],
|
||||
unionOptions: [],
|
||||
checkData: {},
|
||||
checkNode: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async handleNodeClick(data, node) {
|
||||
this.checkData = data
|
||||
this.checkNode = node
|
||||
await this.pageData()
|
||||
},
|
||||
filterNode(value, data, node) {
|
||||
if (!value) return true;
|
||||
return data.unionname.indexOf(value) !== -1
|
||||
},
|
||||
openView(row) {
|
||||
const formData = clone(row)
|
||||
formData.files = JSON.parse(formData.files || "[]")
|
||||
this.formData = formData
|
||||
this.viewDialogVisible = true
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.openView(data)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data.id)
|
||||
} else if (type === 'audit') {
|
||||
this.doAudit(data.id)
|
||||
}
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
const resp = await $.get(loc() + '/doDelete', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs.editForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.post('/platform/wakeshome/data/revel/doEdit', formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.editDialogVisible = false
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.loadTree()
|
||||
},
|
||||
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()
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
this.pageForm.unionId = this.checkData.id
|
||||
const resp = await $.post('/platform/wakeshome/data/revel/pageData', this.pageForm)
|
||||
sublime.closeLoadingbar()
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
},
|
||||
openEdit(obj) {
|
||||
if (this.$refs["editForm"])
|
||||
this.$refs["editForm"].resetFields()
|
||||
const formData = clone(obj)
|
||||
formData.files = JSON.parse(formData.files || "[]")
|
||||
formData.ispass = formData.ispass === 1
|
||||
this.formData = formData
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
openAdd() {
|
||||
if (this.$refs["addForm"])
|
||||
this.$refs["addForm"].resetFields()
|
||||
this.formData = {files: []}
|
||||
this.addDialogVisible = true
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs.addForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.post('/platform/wakeshome/data/revel/doAdd', formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.addDialogVisible = false
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async loadTree() {
|
||||
const res = await $.post('/platform/wakeshome/data/revel/getTreeData', this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.treeData = res.data
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (isAdmin) {
|
||||
const data = res.data[0].children && res.data[0].children.length > 0 ? {id: res.data[0].children[0].id} : {id: ''}
|
||||
await this.handleNodeClick({data}, {level: 2})
|
||||
} else {
|
||||
const data = res.data[0].children && res.data[0].children.length > 0 ? {id: res.data[0].children[0].id} : {id: ''}
|
||||
await this.handleNodeClick(data, {level: 2})
|
||||
}
|
||||
}
|
||||
},
|
||||
async getAllWakesHomeDataType() {
|
||||
const resp = await $.post('/platform/wakeshome/data/type/getAllWakesHomeDataType')
|
||||
if (resp.code === 0) {
|
||||
this.typeList = resp.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getAllWakesHomeDataType()
|
||||
this.loadTree()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,217 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">类型名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.typeName" placeholder="请输入类型名称" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="类型列表" :app="this">
|
||||
<template #func>
|
||||
<el-button type="primary" size="small" @click="openAdd"><i class="ti-plus"></i> 新增工作资料类型
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading"
|
||||
:size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="资料类型编码" prop="code"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="资料类型名称" prop="typeName"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini"><i class="ti-settings"></i><span
|
||||
class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'top',data:scope.row}"
|
||||
v-if="scope.row.serialNum!==1">
|
||||
上移
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'bottom',data:scope.row}"
|
||||
v-if="scope.row.serialNum!==pageForm.totalCount">
|
||||
下移
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="新增工作资料类型" :visible.sync="addDialogVisible" width="40%">
|
||||
<el-form :model="formData" ref="addForm" :rules="rules">
|
||||
<el-form-item prop="code" label="类型编码">
|
||||
<el-input v-model="formData.code" placeholder="请输入工作资料类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeName" label="类型名称">
|
||||
<el-input v-model="formData.typeName" placeholder="请输入工作资料类型名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="编辑工作资料类型" :visible.sync="editDialogVisible" width="40%">
|
||||
<el-form :model="formData" ref="editForm" :rules="rules">
|
||||
<el-form-item prop="code" label="类型编码">
|
||||
<el-input v-model="formData.code" placeholder="请输入工作资料类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeName" label="类型名称">
|
||||
<el-input v-model="formData.typeName" placeholder="请输入工作资料类型名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
typeName: ''
|
||||
},
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
formData: {},
|
||||
rules: {
|
||||
typeName: [{required: true, message: '请输入工作资料类型名称', trigger: ['change', 'blur']}],
|
||||
code: [{required: true, message: '请输入工作资料类型编码', trigger: ['change', 'blur']}]
|
||||
},
|
||||
tableData: []
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'top') {
|
||||
this.rowChange(data, false)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data.id)
|
||||
} else if (type === 'bottom') {
|
||||
this.rowChange(data, true)
|
||||
}
|
||||
},
|
||||
async rowChange(row, toDown) {
|
||||
const resp = await $.post('/platform/wakeshome/data/type/serialNumChange', {
|
||||
id: row.id,
|
||||
serialNum: row.serialNum,
|
||||
toDown
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
this.formData = {}
|
||||
this.addDialogVisible = true
|
||||
if (this.$refs["addForm"])
|
||||
this.$refs["addForm"].resetFields()
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs['addForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const resp = await $.post('/platform/wakeshome/data/type/doAdd', this.formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.addDialogVisible = false
|
||||
this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(obj) {
|
||||
this.formData = JSON.parse(JSON.stringify(obj))
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs['editForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.post('/platform/wakeshome/data/type/doEdit', this.formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.editDialogVisible = false
|
||||
this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('此操作将删除工作资料类型,确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/wakeshome/data/type/doDelete', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,182 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-form .el-select, .el-form .el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
height: 250px !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3 style="color: rgb(24, 103, 176);">
|
||||
{{id?'信息编辑':'信息填写'}}
|
||||
</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="150px" ref="form">
|
||||
<vi-title title="职工建家申报信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报人" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报人工号" prop="loginName">
|
||||
<el-input readonly v-model="formData.loginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input maxlength="11" v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报单位" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报时间" prop="applyTime">
|
||||
<el-input readonly v-model="formData.applyDate"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item class="is-required" label="基层工会简况"
|
||||
prop="basicInformation">
|
||||
<text-editor v-model="formData.basicInformation"></text-editor>
|
||||
<!-- <el-input type="textarea" v-model="formData.basicInformation" maxlength="500" show-word-limit :rows="10"></el-input>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="职工建家建设方案" prop="constructionPlan">
|
||||
<text-editor v-model="formData.constructionPlan"></text-editor>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" justify="center" type="flex">
|
||||
<el-button @click="doSave()" style="width: 200px" type="primary">保 存</el-button>
|
||||
<el-button @click="doSubmit()" style="width: 200px" type="primary">提 交
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
const validBasicInformation = (rule, value, callback) => {
|
||||
if (!this.formData.basicInformation || !dd3s.html2txt(this.formData.basicInformation)) {
|
||||
callback(new Error('请填写基层工会简况'));
|
||||
} else if (dd3s.html2txt(this.formData.basicInformation).length > 500) {
|
||||
console.log(11)
|
||||
callback(new Error('基层工会简况最多500字'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
id: '',
|
||||
formData: {},
|
||||
formRules: {
|
||||
mobile: [{required: true, message: '手机号不能为空', trigger: 'blur'},
|
||||
{pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: 'blur'}],
|
||||
basicInformation: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
constructionPlan: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
basicInformation: [{
|
||||
validator: validBasicInformation,
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSave() {
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSave', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('保存成功')
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (valid) {
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSubmit', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// this.$message.warning('请查看是否按要求填写')
|
||||
}
|
||||
},
|
||||
async initFormData() {
|
||||
if (!this.id) {
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'loginName', "${@shiro.getPrincipalProperty('loginname')}")
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'applyDate', moment().format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||
} else {
|
||||
const resp = await $.get('/platform/wakeshome/declaration/apply/getInfoById', {id: this.id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.initFormData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,186 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
formData="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="申报列表">
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
ref="table"
|
||||
row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="280px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="!['10000'].includes(row.state) && row.state">查看
|
||||
</el-button>
|
||||
<el-button @click="openExport(row.id)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="['10030'].includes(row.state) && row.state">申报表导出
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="['10000','10015','10025'].includes(row.state) || !row.state">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)"
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="['10000'].includes(row.state) || !row.state">删除
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)"
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="!['10000'].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
pageForm: {
|
||||
isAudit: false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
openExport(id) {
|
||||
window.open(loc() + "/openExport?id=" + id)
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
async doDelete(row) {
|
||||
this.$confirm('确定删除该申报记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.get(loc() + '/doDelete', {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
window.location.href = '/platform/wakeshome/declaration/apply?id=' + row.id;
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,241 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" v-if="['10010'].includes(row.state) || !row.state"
|
||||
size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button @click="doRollBack(row.id)"
|
||||
v-if="['10015','10020'].includes(row.state) || !row.state" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info-apply ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="基层党组织审核" name="organizationAudit">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="审核签字">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
doReview(row){
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = row
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
isPass: row,
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
openAudit(row){
|
||||
this.formData={}
|
||||
this.id = row.id
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'organizationAudit'
|
||||
this.$refs.auditInfo.openView(row.id)
|
||||
},
|
||||
async doRollBack(id){
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.$message.success(resp.msg)
|
||||
}else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" v-if="['10020'].includes(row.state) || !row.state"
|
||||
size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button @click="doRollBack(row.id)"
|
||||
v-if="['10025','10030'].includes(row.state) || !row.state" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info-apply ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolAudit">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="auditSign" label="审核签字">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
doReview(row){
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = row
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
openAudit(row){
|
||||
this.formData={}
|
||||
this.id = row.id
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'schoolAudit'
|
||||
this.$refs.auditInfo.openView(row.id)
|
||||
},
|
||||
async doRollBack(id){
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.$message.success(resp.msg)
|
||||
}else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,143 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-clock>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申报列表" :app="this">
|
||||
<template #func>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openExport(row.id)" size="mini" type="primary">导出申报表</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
openExport(id) {
|
||||
window.open("/platform/wakeshome/declaration/mine/openExport?id=" + id)
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,340 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-form .el-select, .el-form .el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
height: 250px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3 style="color: rgb(24, 103, 176);">
|
||||
{{id?'信息编辑':'信息填写'}}
|
||||
</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="100px" ref="AddForm">
|
||||
<!-- <el-divider content-position="left">职工之家申请信息</el-divider>-->
|
||||
<vi-title title="职工之家申请信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报人" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报时间" prop="applyTime">
|
||||
<el-input readonly v-model="formData.applyTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报类别" prop="category">
|
||||
<el-radio-group v-model="formData.category" size="small" @change="doChangeCategory">
|
||||
<el-radio label="校工会" border></el-radio>
|
||||
<el-radio label="分工会" border></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报单位" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家详细信息</el-divider>-->
|
||||
<vi-title title="职工之家详细信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="创办时间" prop="foundTime">
|
||||
<el-date-picker
|
||||
v-model="formData.foundTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创办日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="单位位置" prop="position">
|
||||
<el-input placeholder="请填写单位位置" v-model="formData.position"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="单位面积" prop="area">
|
||||
<el-input placeholder="请填写单位面积" v-model="formData.area"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item label="单位信息" prop="details">
|
||||
<el-input type="textarea" :rows="4"
|
||||
placeholder="请填写单位信息"
|
||||
v-model="formData.details"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家荣誉信息</el-divider>-->
|
||||
<vi-title title="职工之家荣誉信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item class="is-required" label="获奖情况" prop="payStandard">
|
||||
<el-button
|
||||
@click="formData.awardInfo.push({awardTime:'',awardUnit:'',awardName:'',awardPic:''})"
|
||||
icon="el-icon-plus" size="mini"
|
||||
style="float: right;margin-bottom: 10px">
|
||||
添加
|
||||
</el-button>
|
||||
<span style="color: red">说明:各奖项图片只能上传一张。</span>
|
||||
<el-table
|
||||
:data="formData.awardInfo"
|
||||
border
|
||||
v-fit-columns
|
||||
size="mini"
|
||||
style="width: 100%">
|
||||
<el-table-column label="获奖日期" prop="awardTime">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'awardInfo.'+$index+'.awardTime'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-date-picker
|
||||
v-model="row.awardTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择获奖日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="获奖单位" prop="awardUnit">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'awardInfo.'+$index+'.awardUnit'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="100" placeholder="请输入获奖单位"
|
||||
v-model="row.awardUnit"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项名称" prop="awardName">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-input clearable maxlength="100" placeholder="请输入奖项名称"
|
||||
v-model="row.awardName"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项照片" prop="awardPic">
|
||||
<template scope="{row,$index}">
|
||||
<image-upload :limit="1" v-model="row.awardPic"></image-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.awardInfo.length<=1"
|
||||
@click="formData.awardInfo.splice(scope.$index,1)" circle
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家材料上传</el-divider>-->
|
||||
<vi-title title="职工之家材料上传"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item required label="图片上传" prop="picFiles">
|
||||
<file-upload :files.sync="formData.picFiles" card :max="10"
|
||||
:type="['jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<div class="el-upload__tip">请上传jpg、png、jpeg格式的图片,最多不超过10张</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item required label="附件上传" prop="files">
|
||||
<file-upload :files.sync="formData.files" card :max="10"
|
||||
:type="['doc','docx','xls','xlsx','pdf','ppt','mp4', 'jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<div class="el-upload__tip">可上传照片、视频、文档等资料,视频只能上传MP4格式</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" v-if="disabled" justify="center" type="flex">
|
||||
<el-button @click="doSave()" style="width: 300px" type="primary">保 存
|
||||
</el-button>
|
||||
<el-button @click="doSubmit()" style="width: 300px" type="primary">提 交
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
formRules: {
|
||||
position: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
picFiles: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
formData: {
|
||||
category: '分工会',
|
||||
awardInfo: [{awardTime: '', awardUnit: '', awardName: '', awardPic: ''}]
|
||||
},
|
||||
disabled: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSave() {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = loc()+'/doEdit'
|
||||
} else {
|
||||
postUrl = loc()+'/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = false;
|
||||
const resp = await $.post(postUrl, formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
const valid = await this.$refs['AddForm'].validate()
|
||||
if (valid) {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = loc()+'/doEdit'
|
||||
} else {
|
||||
postUrl = loc()+'/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = true
|
||||
const resp = await $.post(postUrl, formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
doChangeCategory() {
|
||||
if (this.formData.category === '校工会') {
|
||||
this.formData.unionName = '校工会'
|
||||
this.formData.unionId = null
|
||||
} else {
|
||||
this.formData.unionName = "${@shiro.getPrincipalProperty('union').getUnionname()}"
|
||||
this.formData.unionId = "${@shiro.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
},
|
||||
async initFormData() {
|
||||
if (!this.id) {
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||
} else {
|
||||
const resp = await $.get('/platform/wakeshome/declaration/mine/getInfoById',{id:this.id})
|
||||
if (resp.code === 0){
|
||||
this.formData = {...resp.data}
|
||||
}
|
||||
}
|
||||
},
|
||||
doJsonStr(data) {
|
||||
const formData = clone(data)
|
||||
formData.awardInfo = JSON.stringify(this.formData.awardInfo)
|
||||
formData.picFiles = JSON.stringify(this.formData.picFiles)
|
||||
formData.files = JSON.stringify(this.formData.files)
|
||||
return formData;
|
||||
},
|
||||
async validateApply(){
|
||||
const resp = await $.get(loc() + '/validateApply')
|
||||
if (resp.code === 0) {
|
||||
this.disabled = true
|
||||
} else {
|
||||
this.disabled = false
|
||||
this.$confirm('未获取到单位的建家申报记录,是否前往申报?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/apply')
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.initFormData()
|
||||
await this.validateApply()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,235 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-row .el-card {
|
||||
min-width: 100%;
|
||||
height: 100%;
|
||||
margin-right: 20px;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
margin-top: -3px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
.header {
|
||||
min-height: 20px;
|
||||
position: relative;
|
||||
|
||||
.label {
|
||||
padding: 1px 6px;
|
||||
background-color: #fdf0da;
|
||||
font-size: 15px;
|
||||
color: #f19901;
|
||||
}
|
||||
|
||||
.header-label {
|
||||
padding: 1px 6px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.card-header-tag-blue {
|
||||
position: absolute;
|
||||
width: 68px;
|
||||
height: 30px;
|
||||
top: -14px;
|
||||
right: -15px;
|
||||
/*background-image: url("~@/assets/images/img_dpj_t.png");*/
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.card-header-tag-green {
|
||||
position: absolute;
|
||||
width: 68px;
|
||||
height: 30px;
|
||||
top: -14px;
|
||||
right: -15px;
|
||||
/*background-image: url("~@/assets/images/img_ypj_t.png");*/
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 18px !important;
|
||||
background-color: rgb(245, 247, 251);
|
||||
display: flex;
|
||||
height: 50px;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.card-label {
|
||||
color: rgb(197, 197, 197);
|
||||
margin-right: 8px;
|
||||
width: 70px;
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="展示列表" :app="this">
|
||||
<template #func>
|
||||
<!--<el-button type="primary" size="small">添加信息</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-row :gutter="20" style="margin-right: 15px;margin-left: -5px" type="flex" v-loading="loading">
|
||||
<el-col v-for="(item, index) in tableData" :key="index" :span="6" style="margin-top: 10px">
|
||||
<el-card class="box-card" shadow="always" :body-style="{ padding: '0px' }">
|
||||
<div slot="header" class="header" style="display: flex">
|
||||
<span class="label">{{item.unionName}}</span>
|
||||
<div style="display:flex; align-items: center;color: #cccccc;margin-left: 20px">|</div>
|
||||
<el-tooltip class="item" effect="dark" :content="item.position" placement="top-start">
|
||||
<el-button type="text" class="header-label">查看位置</el-button>
|
||||
</el-tooltip>
|
||||
<!--<span class="header-label"></span>-->
|
||||
</div>
|
||||
<div style="margin: 15px">
|
||||
<div>
|
||||
<el-carousel height="150px">
|
||||
<el-carousel-item v-for="o in item.picFiles" :key="item">
|
||||
<el-image @click="PREVIEW_IMAGE(o.filepath)"
|
||||
:src="CREATE_PREVIEW_URL(o.filepath)"
|
||||
style="width: 100%;height: 100%"></el-image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span style="color: #18c8bd;font-size: 14px">面积:{{item.area}}(㎡)</span>
|
||||
<div style="display:flex; align-items: center;color: #cccccc;margin: 0 10px">|</div>
|
||||
<span style="color: #18c8bd;font-size: 14px">申报日期:{{item.applyTime}}</span>
|
||||
</div>
|
||||
<div style="display:flex; align-items: center;color: #cccccc">|</div>
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-button type="text"
|
||||
:style="item.status === '2' ? 'color: #18c8bd' : 'color: rgb(34, 125, 251)'"
|
||||
style="color: #18c8bd"></el-button>
|
||||
<el-button type="text" style="color: #18c8bd;" @click="openView(item.id)">查看
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
<template #view>
|
||||
<wakes-info ref="viewInfo"></wakes-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
unions: [],
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row)
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.tableData.forEach(item => {
|
||||
item.picFiles = JSON.parse(item.picFiles)
|
||||
})
|
||||
}
|
||||
},
|
||||
flushUnits() {
|
||||
},
|
||||
|
||||
},
|
||||
components: {
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.unions.unshift({id: '校工会', unionname: '校工会'})
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,171 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
formData="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="申报列表">
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-table"
|
||||
ref="table"
|
||||
row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)"
|
||||
size="mini" type="primary"
|
||||
v-if="![8100].includes(row.state) && row.state">查看
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)"
|
||||
size="mini" type="primary"
|
||||
v-if="[8100].includes(row.state) || !row.state">编辑
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)"
|
||||
size="mini" type="danger"
|
||||
v-if="[8100].includes(row.state) || !row.state">删除
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)"
|
||||
size="mini"
|
||||
type="danger" v-if="![8100].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<wakes-info ref="viewInfo"></wakes-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
pageForm: {
|
||||
isAudit: false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'position', label: '地址', sortable: true},
|
||||
{prop: 'area', label: '面积', sortable: true},
|
||||
{prop: 'foundTime', label: '创立时间', sortable: true},
|
||||
{prop: 'applyTime', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '状态', sortable: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
async doDelete(row) {
|
||||
const confirm = await this.$confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm==="confirm"){
|
||||
const resp = await $.get(loc() + '/doRemove', {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
openEdit(row) {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/apply?id=' + row.id)
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
this.unions.unshift({id: '校工会', unionname: '校工会'})
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,242 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" v-if="![8120].includes(row.state) && row.state" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" v-if="[8120].includes(row.state) || !row.state" size="mini" type="primary">审核</el-button>
|
||||
<el-button @click="doRollBack(row.id)" v-if="[8125,8130].includes(row.state) || !row.state" size="mini" type="danger">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info ref="viewInfo"></wakes-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolAudit">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item prop="auditSign" label="审核签字">-->
|
||||
<!-- <sign :qz.sync="formData.auditSign"></sign>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(0)">
|
||||
拒绝
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doReview(1)">
|
||||
通过
|
||||
</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</wakes-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
mixins:[initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true},
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'position', label: '地址', sortable: true},
|
||||
{prop: 'area', label: '面积', sortable: true},
|
||||
{prop: 'foundTime', label: '创立时间', sortable: true},
|
||||
{prop: 'applyTime', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
// auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
methods:{
|
||||
doReview(row){
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
isPass: row,
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
openAudit(row){
|
||||
this.formData={}
|
||||
this.id = row.id
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'schoolAudit'
|
||||
this.$refs.auditInfo.openView(row.id)
|
||||
},
|
||||
async doRollBack(id){
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.notifySuccess(resp.msg)
|
||||
}else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.unions.unshift({id:'校工会',unionname:'校工会'})
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,451 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
overflow-y: unset !important;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
height: calc(100vh - 100px) !important;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">评议名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.assessment" placeholder="根据测评名称查询"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="项目列表" :app="this">
|
||||
<template #func>
|
||||
<!--<el-button type="primary" size="small">添加信息</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="年度" prop="annual" header-align="center" width="300px"
|
||||
sortable align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核名称" prop="assessment" header-align="center"
|
||||
show-overflow-tooltipalign="center"></el-table-column>
|
||||
|
||||
<el-table-column label="评测模式" prop="assessmentMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.assessmentMode===1?'工会评家':'主席/副主席评家'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打分模式" prop="scoringMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.scoringMode===1?'评分模式':'选择模式'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="250px">
|
||||
<template scope="scope">
|
||||
<el-button size="mini" type="primary" @click="openView(scope.row.id)">
|
||||
查看
|
||||
</el-button>
|
||||
<template v-if="!scope.row.isReview">
|
||||
<el-tooltip content="评议页面的提交按钮在右上角哦" placement="top">
|
||||
<el-button size="mini" type="primary" @click="doReview(scope.row)">
|
||||
去评议
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button size="mini" type="primary" @click="openReview(scope.row)">评议结果</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" style="float: right;margin-top: 5px;margin-left: 10px;"
|
||||
@click="doSubmit()">提交
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" plain style="float: right;margin-top: 5px" @click="doSaveOrSubmit('save')">保存</el-button>-->
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" ref="form" label-width="100px"
|
||||
style="height: calc(100vh - 50px);overflow-y: scroll;padding: 10px 15px">
|
||||
|
||||
<template v-if="formData.scoringMode==2">
|
||||
<vi-title title="评议对象选择"></vi-title>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="president" label-width="0px">
|
||||
<el-select v-model="formData.president" placeholder="请选择主席/副主席进行评议"
|
||||
style="width: 100%">
|
||||
<el-option v-for="o in userList" :key="o.id" :label="o.presidents" :value="o.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="margin: 8px 10px">
|
||||
<span style="color: #ac2925">如已完成该对象的评议,请您手动更换评议对象</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
|
||||
<vi-title title="评议内容"></vi-title>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="o,idx in formData.nrs" :key="o.id">
|
||||
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="o.content" readonly maxlength="30" style="width: 50%">
|
||||
<template slot="prepend"><span>{{ idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="o.bzs" style="width: 100%" border :show-summary = "formData.scoringMode !== 2 ? 'always' : false">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="100px">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="主要评比内容" disabled prop="inspection" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.inspection"
|
||||
readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<template v-if="formData.scoringMode===1">
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center"
|
||||
width="250px">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.score" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评议分" prop="resultScore" header-align="center"
|
||||
align="center" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.resultScore" maxlength="4" @blur="changeScore(row)"
|
||||
placeholder="请填写评议分"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.scoringMode===2">
|
||||
<el-table-column label="满意度" prop="resultScore" header-align="center"
|
||||
align="center" width="350px">
|
||||
<template slot-scope="{row}">
|
||||
<el-radio-group v-model="row.resultScore" size="small">
|
||||
<el-radio label="满意">满意</el-radio>
|
||||
<el-radio label="基本满意">基本满意</el-radio>
|
||||
<el-radio label="不满意">不满意</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div v-if="formData.scoringMode===1">
|
||||
<el-divider content-position="left">备注填写</el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
|
||||
v-model="o.remark" placeholder="请输入备注"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="formData.scoringMode===2">
|
||||
<vi-title title="备注填写"></vi-title>
|
||||
<el-form-item prop="options" label-width="0px">
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
|
||||
v-model="presidentOpinions" placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.reviewMode===1 && formData.scoringMode===1">
|
||||
<vi-title title="职工评家总结"></vi-title>
|
||||
<el-form-item prop="files" label-width="0px">
|
||||
<file-upload :files.sync="formData.files" card :max="3"
|
||||
:type="['doc','docx','xls','xlsx','pdf', 'jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式,最多上传3个文件
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
||||
</template>
|
||||
|
||||
|
||||
<template #public>
|
||||
<wakes-home-review ref="wakesHomeReview"></wakes-home-review>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tabLoading: false,
|
||||
loading: true,
|
||||
activeName: '1',
|
||||
tableData: [],
|
||||
formData: {},
|
||||
viewData: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
id:'',
|
||||
presidentOpinions: '',
|
||||
isShowSubmit: true,
|
||||
isReadOnly: true,
|
||||
userList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async openReview(row){
|
||||
const resp = await $.get(loc() + "/getPeoId",{id:row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.public()
|
||||
this.$refs.wakesHomeReview.findOne(resp.data)
|
||||
}
|
||||
},
|
||||
changeScore(row) {
|
||||
if (Number(row.score) < Number(row.resultScore)) {
|
||||
row.resultScore = null;
|
||||
this.$message.warning('评议分不能超过标准分');
|
||||
}
|
||||
},
|
||||
async doReview(o) {
|
||||
//自评模式
|
||||
if (o.reviewMode == 1 && !o.canJoin) {
|
||||
this.$message.warning('您不在自评人员范围中');
|
||||
return
|
||||
}
|
||||
|
||||
const isExist = await getScopeUser(o.activityGroupId)
|
||||
if ((o.commentTarget == 1 && !isExist) || (o.commentTarget == 3 && !o.canJoin)) {
|
||||
this.$message.warning('您不在自评人员范围中');
|
||||
return
|
||||
}
|
||||
|
||||
const res = await $.get('/mobile/wakeshome/review/appraisal/isAssess',{id:o.id})
|
||||
if (res.data > 0){
|
||||
this.$message.warning('您已经填写过该评议,请点击评议结果可查看评议详情')
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getById', {id: o.id})
|
||||
if (resp.code === 0) {
|
||||
this.id = o.id
|
||||
this.formData = resp.data
|
||||
if (this.formData.assessmentMode === 2) {
|
||||
this.formData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
o.resultScore = '满意'
|
||||
})
|
||||
})
|
||||
await this.getPresidents()
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
},
|
||||
async getPresidents() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getPresidents')
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
}
|
||||
if (this.userList && this.userList.length > 0) {
|
||||
this.president = this.userList[0].id
|
||||
await this.presidentChange();
|
||||
}
|
||||
},
|
||||
async presidentChange() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess', {
|
||||
id: this.id,
|
||||
evaluatedPersonId: this.president,
|
||||
})
|
||||
if (resp.data > 0) {
|
||||
this.$message.warning('您已经评测过该主席(副主席),请在点击评议结果可查看评议信息,或更换主席(副主席)进行测评')
|
||||
this.isShowSubmit = true;
|
||||
this.isReadOnly = true
|
||||
}
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.loading = true;
|
||||
const {code, data, msg} = await $.get('/platform/wakeshome/review/khzb/edit', {id})
|
||||
if (code === 0) {
|
||||
this.viewData = data
|
||||
this.viewData.applyTime = [this.viewData.startTime,this.viewData.endTime]
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
async assignment(){
|
||||
const self = this;
|
||||
const bzList = [];
|
||||
this.formData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
if (self.formData.assessmentMode === 1 && v.remark){
|
||||
o.options = v.remark
|
||||
}
|
||||
bzList.push(o)
|
||||
})
|
||||
})
|
||||
this.formData.bzList = bzList
|
||||
this.formData.id = this.id
|
||||
this.formData.president = this.president
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
},
|
||||
async doSubmit(){
|
||||
const validate = await this.$refs.form.validate()
|
||||
if (!validate) {
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('确定要提交该测评结果吗?提交后不可修改,请仔细检查后提交', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
await this.assignment()
|
||||
if (!this.formData.reviewResult) {
|
||||
await this.createdReviewResult()
|
||||
}
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit',this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('提交成功')
|
||||
this.$refs.guava.index()
|
||||
this.formData = {}
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
async createdReviewResult(){
|
||||
if (this.formData.assessmentMode === 1) {
|
||||
let source = 0; // 标准分
|
||||
let resultScore = 0; // 评议分
|
||||
this.formData.bzList.forEach(v => {
|
||||
source += Number(v.source)
|
||||
resultScore += Number(v.resultScore)
|
||||
})
|
||||
const result = (resultScore / source) * 100
|
||||
if (result >= 80) {
|
||||
this.formData.reviewResult = '满意'
|
||||
} else if (result >= 60 && result <= 79) {
|
||||
this.formData.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.formData.reviewResult = '不满意'
|
||||
}
|
||||
} else if (this.formData.assessmentMode === 2) {
|
||||
const result = this.formData.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
||||
const satisfactionPercentage = (result.length / this.formData.bzList.length) * 100;
|
||||
|
||||
if (satisfactionPercentage >= 80) {
|
||||
this.formData.reviewResult = '满意'
|
||||
} else if (satisfactionPercentage >= 60 && satisfactionPercentage <= 79) {
|
||||
this.formData.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.formData.reviewResult = '不满意'
|
||||
}
|
||||
const user = this.userList.find(v=> v.id === this.president)
|
||||
this.formData.evaluatedPersonName = user.username
|
||||
this.formData.evaluatedPersonType = user.evaluatedPersonType
|
||||
}
|
||||
|
||||
this.formData.bzList = JSON.stringify(this.formData.bzList)
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,202 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
overflow-y: unset !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input v-model="pageForm.assessment" placeholder="根据测评名称查询"></el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="年度" prop="annual" header-align="center" width="300px"
|
||||
sortable align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核名称" prop="assessment" header-align="center"
|
||||
show-overflow-tooltipalign="center"></el-table-column>
|
||||
|
||||
<el-table-column label="评测模式" prop="assessmentMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.assessmentMode===1?'工会评家':'主席/副主席评家'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打分模式" prop="scoringMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.scoringMode===1?'评分模式':'选择模式'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="250px">
|
||||
<template scope="scope">
|
||||
<el-button size="mini" type="primary" @click="openView(scope.row.id)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="openEdit(scope.row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" @click="doDelete(scope.row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
<template #edit_func>
|
||||
<el-button type="primary" style="float: right;margin-top: 5px"
|
||||
@click="doEdit()">提交
|
||||
</el-button>
|
||||
</template>
|
||||
<template #edit>
|
||||
<union-comment-zb :data="formData" @change="v=>{this.formData=v}"></union-comment-zb>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
|
||||
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tabLoading: false,
|
||||
loading: true,
|
||||
activeName: '1',
|
||||
tableData: [],
|
||||
formData: {},
|
||||
viewData: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async openEdit(id) {
|
||||
const {code, data, msg} = await $.get(loc() + '/edit', {id})
|
||||
if (code === 0) {
|
||||
this.formData = data
|
||||
if (this.formData.startTime && this.formData.endTime) {
|
||||
this.formData.applyTime = [this.formData.startTime, this.formData.endTime]
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
},
|
||||
doEdit() {
|
||||
$.post(loc() + "/doEdit", {kh_zb: JSON.stringify(this.formData)}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
this.$message({
|
||||
message: msg,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
this.$refs.guava.index()
|
||||
this.pageData()
|
||||
},
|
||||
)
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('您确定要删除吗!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
$.post(loc() + "/delete", {id: id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.loading = true;
|
||||
const {code, data, msg} = await $.get(loc() + '/edit', {id})
|
||||
if (code == 0) {
|
||||
this.viewData = data
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,334 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
@change="getZbList"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">评测名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.zbId" placeholder="请选择评测名称" filterable
|
||||
clearable
|
||||
@change="doSearch();zbData = zbList.find(v => v.id === pageForm.zbId)"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in zbList"
|
||||
:key="item.id"
|
||||
:label="item.annual+item.assessment"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
||||
@change="doSearch"
|
||||
filterable>
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="工会列表" :app="this">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
:size="tableSize"
|
||||
v-loading="tableLoading" ref="table" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:label="column.label"
|
||||
:prop="column.prop" :width="column.width" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
|
||||
width="240px" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" @click="openView(row)">查看</el-button>
|
||||
<el-tooltip :content="canDownload ? ('导出【'+ row.unionName +'】管理员自我评议的评议结果') : ('导出【'+ row.unionName +'】下所有评议结果的压缩包') " placement="top">
|
||||
<el-button v-if="canDownload" size="mini" type="primary" @click="doDownLoad(row,canDownload)">导出</el-button>
|
||||
</el-tooltip>
|
||||
<el-button size="mini" type="primary" @click="downloadFilesByUnion(row)">导出附件</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工号/姓名:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入工号/姓名" v-model="userPageForm.searchKeyword">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-option">
|
||||
<el-radio-group v-model="userPageForm.reviewResult"
|
||||
@change="doUserSearch">
|
||||
<el-radio-button label="">
|
||||
全部
|
||||
<span class="ml2">
|
||||
{{reviewResultData.bmy+reviewResultData.jbmy+reviewResultData.my}}
|
||||
</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="满意">满意
|
||||
<span class="ml2">{{reviewResultData.my || 0}}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="基本满意">基本满意
|
||||
<span class="ml2">{{reviewResultData.jbmy || 0}}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="不满意">不满意
|
||||
<span class="ml2">{{reviewResultData.bmy || 0}}</span>
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doUserSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="userTableData" style="width: 100%" row-key="id"
|
||||
:size="tableSize" v-loading="tableLoading" ref="table" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号" width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in userTableColumns"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:label="column.label"
|
||||
:prop="column.prop" :width="column.width" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="evaluatedPersonName" align="center" show-overflow-tooltip
|
||||
label="被测评人" v-if="zbData.assessmentMode==2"></el-table-column>
|
||||
<el-table-column prop="presidentOpinions" align="center" show-overflow-tooltip
|
||||
label="意见建议" v-if="zbData.assessmentMode==2"></el-table-column>
|
||||
<el-table-column prop="reviewTime" align="center"
|
||||
label="测评时间"></el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="240px" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button plain size="mini" @click="openUserView(row)">查看</el-button>
|
||||
<el-button plain size="mini" type="primary" @click="downloadByPeoId(row)">导出</el-button>
|
||||
<el-button plain size="mini" type="primary" @click="downloadFilesByPeoId(row)">导出附件</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userPageForm.pageNumber"
|
||||
:page-sizes="[5,10, 20, 30, 50]"
|
||||
:page-size="userPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="userPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="评议结果" :visible.sync="userDrawer" close-on-press-escape>
|
||||
<wakes-home-review ref="wakesHomeReview"></wakes-home-review>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
userDrawer: false,
|
||||
zbData: {},
|
||||
zpxx: {
|
||||
commentPeo: {},
|
||||
zbxx: []
|
||||
},
|
||||
unions: [],
|
||||
zbList: [],
|
||||
pageForm: {
|
||||
annual: new Date().getFullYear() + ''
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '分工会名称'},
|
||||
{prop: 'num', label: '测评人数'},
|
||||
],
|
||||
tableData: [],
|
||||
userTableData: [],
|
||||
userTableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位'},
|
||||
{prop: 'reviewResult', label: '测评结果'},
|
||||
],
|
||||
userPageForm: {
|
||||
reviewResult: "",
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
reviewResultData: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
doDownLoad(row,flag){
|
||||
if (flag) {
|
||||
// 为true,自我评议
|
||||
window.open(loc() + '/doDownLoadSingleByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||
} else {
|
||||
// false, 会员评议,导出压缩包
|
||||
window.open(loc() + '/doDownLoadZipByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||
}
|
||||
},
|
||||
downloadFilesByUnion(row){
|
||||
window.open(loc() + '/exportFilesByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||
},
|
||||
downloadByPeoId(row){
|
||||
window.open(loc() + '/exportByPeoId?peoId=' + row.id)
|
||||
},
|
||||
downloadFilesByPeoId(){
|
||||
window.open(loc() + '/exportFilesByPeoId?peoId=' + row.id)
|
||||
},
|
||||
async getReviewResultNum(row) {
|
||||
const res = await $.post(loc() + "/getReviewResultNum", {
|
||||
zbId: this.userPageForm.zbId,
|
||||
unionId: row.id
|
||||
})
|
||||
this.reviewResultData = res.data
|
||||
},
|
||||
async openUserView(row) {
|
||||
this.userDrawer = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.wakesHomeReview.findOne(row.id)
|
||||
})
|
||||
},
|
||||
doUserSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.userPageForm.pageNumber = 1
|
||||
this.userPageData()
|
||||
},
|
||||
userPageNumberChange(val) {
|
||||
this.userPageForm.pageNumber = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageSizeChange(val) {
|
||||
this.userPageForm.pageSize = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post(loc() + "/getUserPeoByZbIdOrUnionId", this.userPageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.userTableData = data.data.list;
|
||||
this.userPageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async openView(row) {
|
||||
this.userPageForm.searchKeyword = ''
|
||||
this.userPageForm.unionId = row.id
|
||||
this.userPageForm.zbId = this.pageForm.zbId
|
||||
this.userPageData()
|
||||
await this.getReviewResultNum(row)
|
||||
this.$refs.guava.view()
|
||||
|
||||
},
|
||||
async getZbList() {
|
||||
const res = await $.get("/platform/wakeshome/review/Xjkhzb/getZbList", {year: this.pageForm.annual})
|
||||
this.zbList = res.data
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "zbId", res.data[0].id)
|
||||
|
||||
} else {
|
||||
this.$set(this.pageForm, "zbId", null)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
canDownload() {
|
||||
const data = this.zbList.find(v=> v.id === this.pageForm.zbId)
|
||||
return data.commentTarget===3 && data.unionIds && data.unionIds.length > 0
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getZbList()
|
||||
this.unions = await getUnions(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.el-card__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<div>
|
||||
<h3 style="color: #1867b0">新建考核指标</h3>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="doAdd()">
|
||||
提交
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template>
|
||||
<union-comment-zb ref="unionZb" :data="formData" @change="v=>{this.formData=v}"></union-comment-zb>
|
||||
</template>
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
v: 'index',
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async doAdd() {
|
||||
const {
|
||||
annual,
|
||||
assessment,
|
||||
assessmentMode,
|
||||
scoringMode,
|
||||
commentTarget,
|
||||
activityGroupId
|
||||
} = this.formData
|
||||
let flag = true
|
||||
if (!annual) {
|
||||
this.$message.warning("年度不能为空")
|
||||
return
|
||||
}
|
||||
if (!assessment) {
|
||||
this.$message.warning("测评名称不能为空")
|
||||
return
|
||||
}
|
||||
if (!scoringMode) {
|
||||
this.$message.warning("打分模式不能为空")
|
||||
return
|
||||
}
|
||||
if (!assessmentMode) {
|
||||
this.$message.warning("评测模式不能为空")
|
||||
return
|
||||
}
|
||||
if (!commentTarget) {
|
||||
this.$message.warning("测评对象不能为空")
|
||||
return
|
||||
}
|
||||
if (commentTarget == 1 && !activityGroupId) {
|
||||
this.$message.warning("发送人员范围不能为空")
|
||||
return
|
||||
}
|
||||
this.formData.nrs.forEach(nr => {
|
||||
nr.bzs.forEach(bz => {
|
||||
if (!nr.content) {
|
||||
this.$message.error("测评内容不能为空")
|
||||
flag = false;
|
||||
throw Error()
|
||||
} else if (!bz.inspection) {
|
||||
this.$message.error("测评标准不能为空")
|
||||
flag = false;
|
||||
throw Error()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
if (!(this.formData.applyTime && this.formData.applyTime.length > 0)) {
|
||||
this.$message.warning('评议时间不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.commentTarget == 3 && !(this.formData.unionIds && this.formData.unionIds.length > 0)) {
|
||||
this.$message.warning('请选择评议分工会')
|
||||
return
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
if (this.formData.applyTime && this.formData.applyTime.length > 0) {
|
||||
this.formData.startTime = this.formData.applyTime[0]
|
||||
this.formData.endTime = this.formData.applyTime[1]
|
||||
}
|
||||
|
||||
const res = await $.post(loc() + "/doAdd", {kh_zb: JSON.stringify(this.formData)})
|
||||
if (res.code === 0) {
|
||||
this.$set(this.formData, "nrs", [{bzs: [{}]}])
|
||||
this.$set(this.formData, "annual", null)
|
||||
this.$set(this.formData, "assessment", null)
|
||||
this.$set(this.formData, "assessmentMode", null)
|
||||
this.$set(this.formData, "workersNum", null)
|
||||
this.$set(this.formData, "scoringMode", null)
|
||||
this.$set(this.formData, "activityGroupId", null)
|
||||
this.$set(this.formData, "commentTarget", null)
|
||||
this.$set(this.formData, "zbId", null)
|
||||
this.$set(this.formData, "applyTime", undefined)
|
||||
this.$message.success(res.msg);
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user