first commit

This commit is contained in:
2026-09-23 09:38:39 +08:00
commit 98a8b8cace
6257 changed files with 1266718 additions and 0 deletions
@@ -0,0 +1,943 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--
三八妇女活动管理
-->
<style>
input[type=file] {
display: none;
}
.w-e-text-container {
min-height: 200px !important;
max-height: 700px !important;
height: auto !important;
}
.w-e-text {
min-height: 200px !important;
max-height: 700px !important;
height: auto !important;
}
.ViewDialogClass .el-collapse-item__header {
font-size: 12px;
color: rgb(150, 150, 150);
/*font-weight: bold;*/
background-color: white;
}
.el-collapse-item__wrap {
border: none;
}
.el-collapse-item__header {
border: none;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.el-upload--picture-card {
width: 80px;
height: 80px;
line-height: 80px;
}
.el-upload-list--picture-card .el-upload-list__item {
width: 80px;
height: 80px;
line-height: 80px;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 80px;
height: 80px;
line-height: 80px;
text-align: center;
}
.avatar {
width: 80px;
height: 80px;
display: block;
}
.iphonex_box {
width: 366px;
height: 720px;
background: url("https://www.qmwtp.com/assets/www/ActivityPc2/img/iphoneX.png") no-repeat;
background-size: 100% 100%;
position: relative;
top: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.box_title {
position: absolute;
width: 40%;
top: 68px;
color: white;
left: 0;
right: 0;
margin: 0 auto;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.new_frame {
position: absolute;
width: 321px;
height: 576px;
top: 94px;
left: 24px;
border-radius: 5px;
}
.clearfix:after {
content: '';
display: block;
clear: both;
}
.clearfix:after {
content: '';
display: block;
clear: both;
}
.clearfix:after {
content: '';
display: block;
clear: both;
}
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix:after {
content: '';
display: block;
clear: both;
}
.style_every {
width: 35px;
height: 35px;
border-radius: 4px;
position: relative;
float: left;
margin-right: 10px;
cursor: pointer;
margin-top: 5px;
}
li {
list-style: none;
}
.style_every input {
width: 100%;
height: 100%;
position: absolute;
opacity: 0;
top: 0px;
left: 0;
cursor: pointer;
}
.style_every img {
position: absolute;
top: 10px;
left: 7px;
display: none;
}
.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"
type="year"
value-format="yyyy"
placeholder="按年度查询">
</el-date-picker>
</div>
<div class="btn-group tool-button">
<el-input placeholder="请输入内容" v-model="pageForm.hdname" clearable>
<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>
</div>
</el-card>
<el-card shadow="never" class="mt20">
<el-table
:data="tableData"
header-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="hdname"
label="主题"
header-align="center"
show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
prop="cjr"
label="创建人"
header-align="center"
align="center">
</el-table-column>
<el-table-column
prop="hdcjsj"
label="创建时间"
header-align="center"
align="center">
</el-table-column>
<el-table-column
prop="time"
label="活动时间"
header-align="center"
width="300px"
align="center">
<template slot-scope="scope">
{{scope.row.hdkssj}} -- {{scope.row.hdjssj}}
</template>
</el-table-column>
<el-table-column
prop="hdflag"
label="状态"
header-align="center"
align="center">
<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>
</template>
</el-table-column>
<el-table-column
label="操作"
width="300"
header-align="center"
align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.hdflag==false" type="success" size="mini"
@click="changeStatus(scope.row.hdid,true)">开启
</el-button>
<el-button v-else type="info" size="mini" @click="changeStatus(scope.row.hdid,false)">关闭
</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">
</el-pagination>
</el-row>
</el-card>
</template>
<template #edit>
<el-row>
<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;"
src="/platform/hd/wmhdMange/mobileBox">
</iframe>
</div>
<el-button type="info" style="margin-top: 10px" icon="el-icon-refresh" @click="refreshBox"
round>刷新
</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-input placeholder="请输入活动主题" v-model="formData.hdname"></el-input>
</el-form-item>
<el-row>
<el-col :span="24">
<el-form-item prop="time" label="活动时间">
<el-date-picker
style="width: 100%"
v-model="formData.time"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00']">
</el-date-picker>
</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-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-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-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
v-else>&nbsp;</span>
</el-col>
<el-col :span="20">
<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-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-col>
</el-row>
</el-col>
</el-row>
</el-form-item>
<el-form-item prop="hdjs" label="活动介绍">
<el-collapse>
<el-collapse-item>
<template slot="title">
点击展开 <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-collapse>
<el-collapse-item>
<template slot="title">
点击展开 <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-collapse>
<el-collapse-item>
<template slot="title">
点击展开 <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-collapse>
<el-collapse-item>
<template slot="title">
点击展开 <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-collapse>
<el-collapse-item>
<template slot="title">
点击展开 <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-collapse>
<el-collapse-item>
<template slot="title">
点击展开 <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">
</li>
</ul>
</el-form-item>
</el-form>
</el-col>
</el-row>
<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-row>
</template>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</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>
</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,
jlfsEditor: null,
hdnrEditor: null,
lxrEditor: null,
otherEditor: null,
}
const vue = new Vue({
el: '#app',
data: function () {
var self = this
var checkHdlb = function (rule, value, callback) {
if (self.formData.lbs.length == 0) {
callback(new Error("必填"))
}
self.formData.lbs.forEach(function (v) {
v.zplbs.forEach(function (v2) {
if (self.isNull(v2.zname)) {
callback(new Error("有类别未填写名称"))
}
})
if (self.isNull(v.lname)) {
callback(new Error("有类别未填写名称"))
}
})
callback()
};
return {
codeDialogVisible: false,
selected: '',
colorList: ['#081776', '#31cab1', '#e54242', '#ff8939', '#ffb712', '#1dc47b', '#4495f7', '#ff5e8b', '#5d6e7f'],
fileList: [],
delFiles: [],
dialogImageUrl: '',
activeNames: '',
tableData: [],
pageForm: {
year: '',
hdtype: 1,
searchName: "",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
},
formData: {
hdtype: 1,
},
addDialogVisible: false,
editDialogVisible: false,
dialogVisible: false,
formRules: {
hdname: [{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']}],
hdnr: [{required: true, message: '必填', trigger: ['blur', 'change']}],
hdlxr: [{required: true, message: '必填', trigger: ['blur', 'change']}],
// hdother: [{required: true, message: '必填', trigger: ['blur', 'change']}],
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
hdlb: [{required: true, validator: checkHdlb, trigger: ['blur', 'change']}],
},
isNull: function (val) {
if (val === null || val === undefined || val === '') {
return true
}
return false
},
id: '',
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
},
methods: {
share() {
const id = this.id
$.get("/platform/hd/wmhdMange/findOne", {hdid: id}, function (data) {
if (data.code == 0) {
window.open("http://connect.qq.com/widget/shareqq/index.html?url=" + HOST_URL + "/staffActivities?id=" + id + "&title=" + data.data.hdname + "&desc=" + data.data.hdname + "")
}
}
)
},
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)
},
doSubmit() {
if (!this.formData.hdid) {
this.doAdd()
} else if (this.formData.hdid) {
this.doEdit()
}
},
changeStatus(hdid, flag) {
$.post(base + "/platform/hd/wmhdMange/changeStatus", {hdid: hdid, flag: flag}, function (data) {
if (data.code == 0) {
vue.$message({
message: data.msg,
type: 'success'
});
vue.pageData();
} else {
vue.$message({
message: data.msg,
type: 'error'
});
}
})
},
save() {
this.changeFormEditorData()
localStorage.setItem("wmhd_savedata", JSON.stringify(vue.formData))
this.$message({
message: '保存成功!',
type: 'success'
});
},
changeFormEditorDataTxt() {
this.$set(this.formData, 'hdjs', editor.hdjsEditor.txt.html())
this.$set(this.formData, 'hdcjry', editor.cjryEditor.txt.html())
this.$set(this.formData, 'hdjlfs', editor.jlfsEditor.txt.html())
this.$set(this.formData, 'hdnr', editor.hdnrEditor.txt.html())
this.$set(this.formData, 'hdlxr', editor.lxrEditor.txt.html())
this.$set(this.formData, 'hdother', editor.otherEditor.txt.html())
},
changeFormEditorData() {
this.$set(this.formData, 'hdjs', editor.hdjsEditor.txt.html())
this.$set(this.formData, 'hdcjry', editor.cjryEditor.txt.html())
this.$set(this.formData, 'hdjlfs', editor.jlfsEditor.txt.html())
this.$set(this.formData, 'hdnr', editor.hdnrEditor.txt.html())
this.$set(this.formData, 'hdlxr', editor.lxrEditor.txt.html())
this.$set(this.formData, 'hdother', editor.otherEditor.txt.html())
},
refreshBox() {
this.changeFormEditorData()
var fileList = []
vue.fileList.forEach(function (file) {
fileList.push(file.url)
})
vue.$set(vue.formData, 'fileList', fileList)
localStorage.setItem("wmhd_boxdata", JSON.stringify(vue.formData))
$('#myIframe').attr('src', $('#myIframe').attr('src'));
},
colorChange(color, idx) {
this.formData.hdcolor = color
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
doDelete(id) {
this.$confirm('确定要删除吗?这将会删除目前所有已提交的作品数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
const data = await $.post(base + "/platform/hd/wmhdMange/delete", {hdid: id})
if (data.code == 0) {
this.$message({
message: data.msg,
type: 'success'
});
this.pageData();
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}
}
});
},
async openEdit(id) {
this.formData = {};
this.fileList = []
this.delFiles = []
if (this.$refs["addForm"])
this.$refs["addForm"].resetFields();
const data = await $.get("/platform/hd/wmhdMange/findOne", {hdid: id})
if (data.code == 0) {
data.data.time = [data.data.hdkssj, data.data.hdjssj]
this.formData = data.data
this.$refs.guava.edit()
this.$nextTick(() => {
E = window.wangEditor
for (key in editor) {
$('#' + key).html("")
editor[key] = new E('#' + key)
editor[key].create()
}
editor.hdjsEditor.txt.html(vue.formData.hdjs)
editor.cjryEditor.txt.html(vue.formData.hdcjry)
editor.jlfsEditor.txt.html(vue.formData.hdjlfs)
editor.hdnrEditor.txt.html(vue.formData.hdnr)
editor.lxrEditor.txt.html(vue.formData.hdlxr)
editor.otherEditor.txt.html(vue.formData.hdother)
this.refreshBox()
})
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
},
async doEdit() {
this.changeFormEditorDataTxt()
this.$refs["addForm"].validate(async valid => {
if (valid) {
this.changeFormEditorData()
this.formData.hdkssj = this.formData.time[0]
this.formData.hdjssj = this.formData.time[1]
let loading = this.$loading({
lock: true,
text: '数据正在提交中,请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const reps = await $.post("/platform/hd/wmhdMange/doEdit", {hdxx: JSON.stringify(this.formData)})
loading.close()
if (reps.code === 0) {
this.$message.success(reps.msg)
this.$refs.guava.index()
this.pageData()
} else {
this.$message.warning(reps.msg)
}
}
})
},
doAdd() {
this.changeFormEditorDataTxt()
this.$refs["addForm"].validate(async valid => {
if (valid) {
this.changeFormEditorData()
this.formData.hdkssj = this.formData.time[0]
this.formData.hdjssj = this.formData.time[1]
let loading = this.$loading({
lock: true,
text: '数据正在提交中,请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const reps = await $.post("/platform/hd/wmhdMange/doAdd", {hdxx: JSON.stringify(this.formData)})
loading.close()
if (reps.code === 0) {
this.$message.success(reps.msg)
this.$refs.guava.index()
localStorage.removeItem("wmhd_savedata")
this.pageData()
} else {
this.$message.warning(reps.msg)
}
}
})
localStorage.removeItem("wmhd_savedata");
},
async openAdd() {
if (localStorage.getItem("wmhd_savedata")) {
try {
this.formData = JSON.parse(localStorage.getItem("wmhd_savedata") || '{}')
} catch (e) {
localStorage.removeItem('wmhd_savedata')
this.formData = {
hdtype: 1,
hdcolor: this.colorList[0],
username: "${@shiro.getPrincipalProperty('username')}",
hdcjsj: moment().format('YYYY-MM-DD'),
lbs: [{zplbs: [{}]}],
};
}
} else {
this.formData = {
hdtype: 1,
hdcolor: this.colorList[0],
username: "${@shiro.getPrincipalProperty('username')}",
hdcjsj: moment().format('YYYY-MM-DD'),
lbs: [{zplbs: [{}]}],
};
}
this.$refs.guava.edit()
this.fileList = []
if (this.$refs["addForm"])
this.$refs["addForm"].resetFields();
this.$nextTick(function () {
let E = window.wangEditor
for (key in editor) {
$('#' + key).html("")
editor[key] = new E('#' + key)
editor[key].create()
}
editor.hdjsEditor.txt.html(this.formData.hdjs)
editor.cjryEditor.txt.html(this.formData.hdcjry)
editor.jlfsEditor.txt.html(this.formData.hdjlfs)
editor.hdnrEditor.txt.html(this.formData.hdnr)
editor.lxrEditor.txt.html(this.formData.hdlxr)
editor.otherEditor.txt.html(this.formData.hdother)
if (localStorage.getItem("wmhd_savedata")) {
this.refreshBox()
} else {
$('#myIframe').attr('src', $('#myIframe').attr('src'));
}
})
},
doSearch() {
this.pageForm.pageNumber = 1;
this.pageData();
},
pageOrder: function (column) {//按字段排序
switch (column.order) {
case 'descending':
column.order = 'desc'
break
case "ascending":
column.order = 'asc'
break
}
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
pageNumberChange: function (val) {//页码更新操作
this.pageForm.pageNumber = val;
this.pageData();
},
pageSizeChange: function (val) {//分页大小更新操作
this.pageForm.pageSize = val;
this.pageData();
},
pageData: function () {//加载分页数据
var self = this;
sublime.showLoadingbar();//显示loading
$.post(base + "/platform/hd/wmhdMange/data", self.pageForm, function (data) {
sublime.closeLoadingbar();//关闭loading
if (data.code == 0) {
self.tableData = data.data.list;
self.pageForm.totalCount = data.data.totalCount;
} else {
self.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
},
created: function () {
this.pageData();
},
mounted() {
}
})
</script>
<!--#
}
#-->