This commit is contained in:
2024-12-09 16:02:46 +08:00
parent 0267d27b2a
commit 8da42abcf1
14 changed files with 346 additions and 337 deletions
@@ -72,11 +72,11 @@ public class XssSqlFilterProcessor extends AbstractProcessor {
//use remove -|,
String regEx_sql = """
and|exec|execute|insert|select|delete|update|count|drop|*|%|chr|mid|master|truncate|
char|declare|sitename|net user|xp_cmdshell|;|or|+|like'|and|exec|execute|insert|create|drop|
and|exec|execute|insert|select|delete|update|count|drop|chr|mid|master|truncate|
char|declare|sitename|net user|xp_cmdshell|or|like'|and|exec|execute|insert|create|drop|
table|from|grant|group_concat|column_name|
information_schema.columns|table_schema|union|where|select|delete|update|order|by|count|*|
chr|mid|master|truncate|char|declare|or|;|--|+|like|//|/|%|#
information_schema.columns|table_schema|union|where|select|delete|update|order|by|count|
chr|mid|master|truncate|char|declare|or|like
""";
String regEx_xss = "script|iframe|img";
//SQL过滤
@@ -137,10 +137,8 @@ public class ActivityUnionManageController {
cnd.and(group);
}
cnd.limit(1, 30);
sql.setCondition(cnd);
return sysUserService.listMap(sql);
return sysUserService.listPageMap(1, 30, sql);
}
/**
@@ -66,7 +66,7 @@ public class ActivityTissueServiceImpl extends ViServiceImpl<ActivityTissue> imp
$condition
""");
cnd.andEx("YEAR(tissue.startTime)", "=", year);
cnd.andEx("YEAR(tissue.applyTime)", "=", year);
cnd.andEx("tissue.projectTypeCode", "!=", "50004");
cnd.andEx("tissue.unionId", "=", unionId);
cnd.andEx("tissue.type", "=", type);
@@ -148,9 +148,8 @@ public class WelfareListController {
cnd.andEX("wcn.courierNumber", "=", courierNumber);
cnd.groupBy("wl.id");
cnd.asc("wl.unitid");
cnd.asc("wl.userSortNum");
cnd.desc("wl.id");
cnd.asc("wl.unitCode");
cnd.asc("wl.loginname");
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
cnd.and("wl.unionid", "=", Vi.getUnionId());
@@ -160,7 +160,6 @@ public class WelfareMemberAdjustmentController {
cnd.and(pageForm);
cnd.desc("his.changeTime");
cnd.asc("u.unitid");
cnd.asc("COALESCE(u.userSortNum, 999999)");
cnd.desc("u.id");
pageParam.participate(cnd, "u");
@@ -96,7 +96,6 @@ public class WelfareMemberMangeController {
pageParam.participate(cnd);
cnd.and(pageForm);
cnd.asc("unitid");
cnd.asc("COALESCE(userSortNum, 999999)");
cnd.desc("id");
sql.setCondition(cnd);
return welfareMemberService.list(pageForm, sql);
@@ -167,7 +167,6 @@ public class WelfareMemberCheckUnionController {
cnd.and(pageForm);
cnd.desc("his.changeTime");
cnd.asc("u.unitid");
cnd.asc("COALESCE(u.userSortNum, 999999)");
cnd.desc("u.id");
if (Lang.isNotEmpty(changeTypes)) {
@@ -91,7 +91,7 @@ public class zczjlbController {
Double surplusMoney = zcxxes.stream().filter(z -> !List.of("报废", "丢失").contains(z.getZczt())).mapToDouble(Zgfw_Zcxx::getSurplusMoney).sum();
//累计折旧
Double depreciationMoney = allMoney - surplusMoney;
return Map.of("allMoney", allMoney, "surplusMoney", surplusMoney, "depreciationMoney", depreciationMoney);
return Map.of("allMoney", allMoney, "surplusMoney", surplusMoney, "depreciationMoney", String.format("%.2f", depreciationMoney));
}
@@ -19,6 +19,8 @@ public class ZgfwZcxxTemp {
private String zcgbflh;
@Excel(name = "资产名称", width = 20)
private String zcmc;
@Excel(name = "型号规格", width = 20)
@@ -166,15 +166,15 @@
:max="1000000000"></el-input-number>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item prop="xlFlag" label="活动提醒">
<el-switch
v-model="form.xlFlag"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
</el-col>-->
<!-- <el-col :span="8">
<el-form-item prop="xlFlag" label="活动提醒">
<el-switch
v-model="form.xlFlag"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
</el-col>-->
<el-col v-if="form.activityLevel===40003||(form.activityLevel===40001&&is_club)"
:span="8">
<el-form-item prop="belongClubId" label="活动所属协会">
@@ -1112,13 +1112,19 @@ module.exports = {
if (applyTime && applyTime.length) {
form.applyStartTime = applyTime[0]
form.applyEndTime = applyTime[1]
form.applyTime = undefined
form.applyTime = []
} else {
form.applyStartTime = ""
form.applyEndTime = ""
}
if (time && time.length) {
form.startTime = time[0]
form.endTime = time[1]
form.time = undefined
form.time = []
}else{
form.startTime = ""
form.endTime = ""
}
if (this.eventForm.checkedEventId == "allItems") {
@@ -1,222 +1,224 @@
<template>
<div>
<div ref="editorRef"></div>
<input type="file" style="display: none" />
</div>
<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, Panel, Tooltip } = wangEditor
//注册上传word按钮
class DocMenu extends BtnMenu {
constructor(editor) {
const $elem = wangEditor.$(
`<div class="w-e-menu" data-title="上传文档">
<i class="fa fa-file-word-o" aria-hidden="true" /></i>
</div>`
)
super($elem, editor)
}
const {$, BtnMenu, DropListMenu, PanelMenu, DropList, Panel, Tooltip} = wangEditor
clickHandler() {
const fileInputId = this.editor.textElemId + "input-file"
const existingInput = document.getElementById(fileInputId)
if (existingInput) {
existingInput.remove()
class AlertMenu extends BtnMenu {
constructor(editor) {
const $elem = wangEditor.$(
`<div class="w-e-menu" data-title="上传word">
<i class="fa fa-file-word-o" aria-hidden="true" /></i>
</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 loading = ELEMENT.Loading.service({
lock: true,
text: '解析中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const file = this.files[0];
const fileName = file.name
if (!fileName.toLowerCase().endsWith('.doc') && !fileName.toLowerCase().endsWith('.docx')) {
alert('请上传doc或者docx的文件')
_this.clearInputFile()
loading.close()
return
}
const formData = new FormData()
formData.append('file', file, file.name)
axios.post('/file_server/word2Html', formData, {}).then(response => {
console.log(response.data)
loading.close()
if (response.data.code === 0) {
_this.editor.txt.html(response.data.data)
} else {
alert(response.data.msg + ',上传word失败,请联系管理员!')
_this.clearInputFile()
}
}).catch(error => {
loading.close()
console.log(error)
_this.clearInputFile()
alert('上传word失败,请联系管理员!')
});
});
}
const input = document.createElement("input")
input.type = "file"
input.accept = "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
input.id = fileInputId
input.style.display = "none"
input.addEventListener("change", (event) => {
const files = event.target.files
if (!files || files.length === 0) {
return
}
clearInputFile() {
const obj = document.getElementById('fileInput');
obj.outerHTML = obj.outerHTML
}
let loading = null
if (window.ELEMENT) {
loading = ELEMENT.Loading.service({
lock: true,
text: "文件读取中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)"
})
} else if (window.vant) {
loading = vant.Toast.loading({
message: "文件读取中",
forbidClick: true,
overlay: true,
duration: 0
})
}
tryChangeActive() {
this.active()
}
const formData = new FormData()
formData.append("file", files[0])
axios
.post("/file_server/convertHtml", formData, {
headers: { "Content-Type": "multipart/form-data", "x-requested-with": "XMLHttpRequest" }
})
.then((response) => {
loading.close()
if (response.data.code === 0) {
this.editor.txt.html(response.data.data)
} else {
if (window.ELEMENT) {
ELEMENT.Message.error(response.data.msg)
} else if (window.vant) {
vant.Toast(response.data.msg)
} else {
alert(response.data.msg)
}
}
})
.catch((error) => {
console.log(error)
alert("上传word失败,请联系管理员!")
})
.finally(() => {
input.remove()
})
})
input.click()
document.body.appendChild(input)
}
tryChangeActive() {}
}
wangEditor.registerMenu("docMenu", DocMenu)
wangEditor.registerMenu('alertMenuKey', AlertMenu)
module.exports = {
name: "textEditor",
props: {
content: {
type: String,
default: ""
},
// 定义值属性,用于接收父组件传递的值
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"
]
}
}
name: "textEditor",
props: {
// 定义值属性,用于接收父组件传递的值
value: {
type: String,
default: ''
},
data() {
return {
editor: null,
cursorPos: 0
}
},
mounted() {
this.initEditor()
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(() => {
if (newValue !== this.editor.txt.html()) {
this.editor.txt.html(newValue)
} else {
// this.editor.selection.moveCursor(this.editor.$textElem.elems[0], 1)
}
})
},
immediate: true
}
},
watch: {
value: {
handler: function (newValue) {
this.$nextTick(() => {
if (newValue !== this.editor.txt.html()) {
this.editor.txt.html(newValue)
} else {
// this.editor.selection.moveCursor(this.editor.$textElem.elems[0], 1)
}
})
},
immediate: true
}
},
methods: {
initEditor() {
let _this = this
this.editor = new wangEditor(this.$refs.editorRef)
this.editor.config.focus = false
//内容change回调
this.editor.config.onchange = (newHtml) => {
this.cursorPos = this.editor.selection.getCursorPos()
const range = this.editor.selection.getRange()
range.setStart(range.startContainer, Math.max(this.cursorPos, range.endOffset))
this.$emit("input", newHtml)
}
this.editor.config.linkImgCheck = function (imgSrc, alt, href) {
// 1. 返回 true ,说明检查通过
return true
}
methods: {
initEditor() {
let _this = this
this.editor = new wangEditor(this.$refs.editorDom)
this.editor.config.focus = false
//配置图片上传
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
Promise.all(_this.uploadFiles(resultFiles)).then((res) => {
res.forEach((v) => {
if (v.data && v.data.code === 0) {
insertImgFn(v.data.data)
} else {
ELEMENT.message.error("图片上传失败")
}
})
})
//内容change回调
this.editor.config.onchange = (newHtml) => {
this.cursorPos = this.editor.selection.getCursorPos()
const range = this.editor.selection.getRange()
range.setStart(range.startContainer, Math.max(this.cursorPos, range.endOffset))
this.$emit("input", newHtml)
}
//配置图片上传
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(APP_DOMAIN + 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()
},
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
})
})
}
})
})
}
//粘贴过滤
this.editor.config.pasteFilterStyle = false
//高度
this.editor.config.height = this.height
//菜单
this.editor.config.menus = this.menus
this.editor.create()
},
created() {}
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>
<style scoped>
</style>
@@ -126,8 +126,11 @@ layout("/layouts/platform.html"){
</template>
<template scope="{row}" v-else-if="column.prop=='startTime'">
{{moment(row.startTime).format('YYYY-MM-DD')}} -
<span v-if="row.startTime">
{{moment(row.startTime).format('YYYY-MM-DD')}} -
{{moment(row.endTime).format('YYYY-MM-DD')}}
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='isDisabled'">
@@ -613,7 +613,7 @@
style="width: 100%"
v-model="formData.tissuePersonList">
<el-option
:disabled="userData.map(v=>v.userId).includes(item.userId)"
:disabled="item.disabled"
:key="item.userId"
:label="item.userName+'-'+item.loginName+'-'+item.unitName"
:value="item.userId"
@@ -785,7 +785,14 @@
serachWord: query,
activity_type: type
})
this.userList = data
data.list.map(d => {
if (this.userData.map(v => v.userId).includes(d.userId)) {
d.disabled = true
} else {
d.disabled = false
}
})
this.userList = data.list
this.selectLoading = false;
}
},
@@ -794,8 +801,9 @@
this.dialogVisible = true
},
doAddUser() {
this.formData.tissuePersonList = this.userList.filter(v => this.formData.tissuePersonList.some(x => v.userId === x))
this.userData = this.userData.concat(this.formData.tissuePersonList)
const userList = this.userList.filter(v => this.formData.tissuePersonList.some(x => v.userId === x))
this.userData = this.userData.concat(userList)
this.formData.tissuePersonList = this.userData
this.dialogVisible = false
},
async delUser(row) {
@@ -3,8 +3,8 @@ layout("/layouts/platform.html"){
#-->
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0 5%">
<div class="platform" id="app" v-cloak>
<guava padding="0 5%" ref="guava">
<template>
<el-card shadow="never">
@@ -14,11 +14,11 @@ layout("/layouts/platform.html"){
<div class="search-item-label">年&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
v-model="pageForm.year"
type="year"
placeholder="请选择"
style="width: 100%"
value-format="yyyy"
placeholder="请选择">
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
@@ -26,56 +26,56 @@ layout("/layouts/platform.html"){
<div class="search-item">
<div class="search-item-label">项目名称:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable v-model="pageForm.name"
@keyup.enter.native="doSearch" style="width:100%"></el-input>
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width:100%" v-model="pageForm.name"></el-input>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="体检项目" :app="this">
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="体检项目">
<template #func>
<el-button type="primary" size="small"
icon="el-icon-plus"
@click="openAdd">新建体检项目
<el-button @click="openAdd" icon="el-icon-plus"
size="small"
type="primary">新建体检项目
</el-button>
</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 :data="tableData" :size="tableSize" @sort-change="pageOrder"
class="vi-table" ref="table"
row-key="id" style="width: 100%" v-loading="tableLoading">
<el-table-column align="center" header-align="center" type="index"
:index="indexMethod" label="序号"
<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"
:width="column.width"
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">
min-width="100px" show-overflow-tooltip v-for="column in tableColumns">
<template v-if="column.prop=='choiceTime'" scope="{row}">
<template scope="{row}" v-if="column.prop=='choiceTime'">
{{row.choiceTimeStart}}-{{row.choiceTimeEnd}}
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作" width="100px">
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="100px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
@@ -87,16 +87,18 @@ layout("/layouts/platform.html"){
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="row.isWithinChoiceTime && !row.isHasUserList"
:command="{type:'created',data:row}">
<el-dropdown-item
:command="{type:'created',data:row}"
v-if="row.isWithinChoiceTime && !row.isHasUserList">
生成名单
</el-dropdown-item>
<el-dropdown-item v-if="row.isWithinChoiceTime && row.isHasUserList"
:command="{type:'renew',data:row}">
<el-dropdown-item
:command="{type:'renew',data:row}"
v-if="row.isWithinChoiceTime && row.isHasUserList">
更新名单
</el-dropdown-item>
<el-dropdown-item v-if="row.isWithinChoiceTime"
:command="{type:'reset',data:row}">
<el-dropdown-item :command="{type:'reset',data:row}"
v-if="row.isWithinChoiceTime">
重置名单
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:row}">
@@ -122,39 +124,39 @@ layout("/layouts/platform.html"){
</template>
<template #edit>
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px"
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form"
v-loading="formLoading">
<vi-title title="体检项目信息"></vi-title>
<el-form-item prop="name" label="项目名称">
<el-input v-model="formData.name" placeholder="项目名称" maxlength="100"></el-input>
<el-form-item label="项目名称" prop="name">
<el-input maxlength="100" placeholder="项目名称" v-model="formData.name"></el-input>
</el-form-item>
<el-row>
<el-col span="12">
<el-form-item prop="choiceTime" label="选择时间">
<el-form-item label="选择时间" prop="choiceTime">
<el-date-picker
style="width: 80%"
v-model="formData.choiceTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
end-placeholder="结束时间"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间">
style="width: 80%"
type="datetimerange"
v-model="formData.choiceTime"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item prop="activityGroupId" label="可报名人员范围">
<el-form-item label="可报名人员范围" prop="activityGroupId">
<div style="display: flex; justify-content: space-between">
<div style="width: 99%">
<el-select prop="activityGroupId" placeholder="参加人员范围"
v-model="formData.activityGroupId"
<el-select clearable filterable
placeholder="参加人员范围"
prop="activityGroupId"
style="width: 99%;"
clearable
filterable>
<el-option v-for="item in activityGroupList"
:label="item.groupName"
:value="item.groupId"></el-option>
v-model="formData.activityGroupId">
<el-option :label="item.groupName"
:value="item.groupId"
v-for="item in activityGroupList"></el-option>
</el-select>
</div>
<div>
@@ -167,7 +169,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col span="24">
<el-form-item prop="healthCheckupType" label="体检对象类型">
<el-form-item label="体检对象类型" prop="healthCheckupType">
<el-radio-group v-model="formData.healthCheckupType">
<el-radio-button label="jzg">教职工</el-radio-button>
<el-radio-button label="js">家属</el-radio-button>
@@ -185,9 +187,9 @@ layout("/layouts/platform.html"){
label="套餐名称">
<template slot-scope="{row}">
<el-input v-model="row.optionName" autosize
class="text-input"
<el-input autosize class="text-input"
data-type="option"
v-model="row.optionName"
></el-input>
</template>
</el-table-column>
@@ -196,9 +198,9 @@ layout("/layouts/platform.html"){
header-align="center"
label="排序">
<template slot-scope="{row}">
<el-input v-model="row.optionSort" autosize
class="text-input"
<el-input autosize class="text-input"
data-type="option"
v-model="row.optionSort"
></el-input>
</template>
</el-table-column>
@@ -207,10 +209,10 @@ layout("/layouts/platform.html"){
header-align="center"
label="图片" width="130px">
<template slot-scope="{row,$index}">
<image-Upload ref="imageUpload" :height="100"
:width="100" :limit="1"
:file-type="['png','jpg']"
:file-size="10"
<image-Upload :file-size="10" :file-type="['png','jpg']"
:height="100" :limit="1"
:width="100"
ref="imageUpload"
v-model="row.imgUrl"></image-Upload>
</template>
</el-table-column>
@@ -218,8 +220,8 @@ layout("/layouts/platform.html"){
header-align="center"
label="说明">
<template slot-scope="{row,$index}">
<el-link type="primary"
@click="openDescRichText(row.description,$index)">
<el-link @click="openDescRichText(row.description,$index)"
type="primary">
编辑说明
</el-link>
</template>
@@ -232,14 +234,14 @@ layout("/layouts/platform.html"){
width="100px">
<template slot-scope="{row,$index}">
<div class="option-delete">
<el-button circle
icon="el-icon-s-tools"
size="mini" type="primary"
@click="openCnd(row,$index,true)"></el-button>
<el-button circle
icon="el-icon-delete"
size="mini" type="danger"
@click="deleteRow(row,$index)"></el-button>
<el-button @click="openCnd(row,$index,true)"
circle
icon="el-icon-s-tools" size="mini"
type="primary"></el-button>
<el-button @click="deleteRow(row,$index)"
circle
icon="el-icon-delete" size="mini"
type="danger"></el-button>
</div>
</template>
@@ -247,8 +249,8 @@ layout("/layouts/platform.html"){
</el-table>
<div class="s-operation">
<el-button size="small" type="primary"
@click="formData.healthCheckupProjectSubjects.push({optionNameId:'',optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),optionSort:formData.healthCheckupProjectSubjects.length+1,imgUrl:null})">
<el-button @click="formData.healthCheckupProjectSubjects.push({optionNameId:'',optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),optionSort:formData.healthCheckupProjectSubjects.length+1,imgUrl:null})" size="small"
type="primary">
添加项目
</el-button>
</div>
@@ -257,16 +259,16 @@ layout("/layouts/platform.html"){
</el-form-item>
<el-form-item label="项目封面" prop="cover">
<image-Upload ref="imageUpload" :height="200"
:width="200" :limit="1"
:file-type="['png','jpg']"
:file-size="10"
<image-Upload :file-size="10" :file-type="['png','jpg']"
:height="200" :limit="1"
:width="200"
ref="imageUpload"
v-model="formData.cover"></image-Upload>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button @click="doAdd" type="primary" style="float: right">
<el-button @click="doAdd" style="float: right" type="primary">
提交
</el-button>
</template>
@@ -297,15 +299,15 @@ layout("/layouts/platform.html"){
:src="CREATE_PREVIEW_URL(i.imgUrl)"
@click="preview(i.imgUrl,i.imgUrl)"
fit="cover"
v-if="i.imgUrl"
style="width: 100px; height: 100px;"></el-image>
style="width: 100px; height: 100px;"
v-if="i.imgUrl"></el-image>
<div v-else>暂无</div>
</el-descriptions-item>
<el-descriptions-item label="报名条件">
<el-button circle
icon="el-icon-s-tools"
size="mini" type="primary"
@click="openCnd(i,null,false)"></el-button>
<el-button @click="openCnd(i,null,false)"
circle
icon="el-icon-s-tools" size="mini"
type="primary"></el-button>
</el-descriptions-item>
</template>
@@ -314,32 +316,31 @@ layout("/layouts/platform.html"){
</guava>
<drawer-user-scope
:group_id.sync="formData.activityGroupId"
@group_change="getActivityGroup"
ref="drawerUserScope"
:group_id.sync="formData.activityGroupId"
></drawer-user-scope>
<send-msg ref="sendMsg" :url="url"></send-msg>
<send-msg :url="url" ref="sendMsg"></send-msg>
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
<open-qr-code :url="url" ref="openQRCode"></open-qr-code>
<el-dialog
:append-to-body="true"
:close-on-click-modal="false"
:visible.sync="richTextDialog"
title="编辑说明"
:append-to-body="true"
width="60%">
<div id="descRichText">
</div>
<span slot="footer" class="dialog-footer">
<text-editor v-model="descRichTextContent"></text-editor>
<span class="dialog-footer" slot="footer">
<el-button @click="richTextDialog = false">取 消</el-button>
<el-button type="primary" @click="getRichText">确 定</el-button>
<el-button @click="getRichText" type="primary">确 定</el-button>
</span>
</el-dialog>
<condition ref="cnd" v-model="conditions" :fields="fields"
:show_submit="showSubmit"
@confirm="cndConfirm"></condition>
<condition :fields="fields" :show_submit="showSubmit" @confirm="cndConfirm"
ref="cnd"
v-model="conditions"></condition>
</div>
<script>
@@ -374,7 +375,11 @@ layout("/layouts/platform.html"){
choiceTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activityGroupId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
// cover: [{required: true, message: '必填', trigger: ['blur', 'change']}],
healthCheckupType: [{required: true, message: '必填', trigger: ['blur', 'change']}],
healthCheckupType: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
healthCheckupProjectSubjects: [{
required: true,
message: '必填',
@@ -391,6 +396,7 @@ layout("/layouts/platform.html"){
{label: '出生日期', value: 'birthday', type: "date"},
],
deleteRowIds: [],
descRichTextContent: ""
}
},
components: {
@@ -577,21 +583,9 @@ layout("/layouts/platform.html"){
openDescRichText(richText, sIdx) {
this.richTextDialog = true
this.subjectIndex = sIdx
this.$nextTick(() => {
$("#descRichText").html("")
descRichTextEditor = new wangEditor("#descRichText")
descRichTextEditor.config.onchange = (html) => {
richText = (html ? html : "")
}
descRichTextEditor.config.uploadImgShowBase64 = true
descRichTextEditor.create()
if (richText) {
descRichTextEditor.txt.html(richText)
}
})
},
getRichText() {
this.formData.healthCheckupProjectSubjects[this.subjectIndex].description = descRichTextEditor.txt.html()
this.formData.healthCheckupProjectSubjects[this.subjectIndex].description = this.descRichTextContent
this.richTextDialog = false
},
async openCnd(row, index, showSubmit) {