commit
This commit is contained in:
@@ -1,198 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-input style="width: 350px;" @keyup.enter.native="doSearch"
|
||||
clearable placeholder="请输入院区名称" v-model="pageForm.campusName"></el-input>
|
||||
</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" class="mt20">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="院区编码" prop="campusCode"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="院区名称" prop="campusName"></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:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :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
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog title="新增院区" :visible.sync="addDialogVisible" :close-on-click-modal="false" width="30%">
|
||||
<el-form :model="formData" ref="addForm" :rules="rules">
|
||||
<el-form-item prop="campusCode" label="院区编码">
|
||||
<el-input v-model="formData.campusCode" placeholder="请输入院区编码" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="campusName" label="院区名称">
|
||||
<el-input v-model="formData.campusName" placeholder="请输入院区名称" clearable></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" :close-on-click-modal="false" width="30%">
|
||||
<el-form :model="formData" ref="editForm" :rules="rules">
|
||||
<el-form-item prop="campusCode" label="院区编码">
|
||||
<el-input v-model="formData.campusCode" placeholder="请输入院区编码" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="campusName" label="院区名称">
|
||||
<el-input v-model="formData.campusName" placeholder="请输入院区名称" clearable></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>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
campusName: ''
|
||||
},
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
formData: {},
|
||||
rules: {
|
||||
campusName: [{required: true, message: '请输入院区名称', trigger: ['change', 'blur']}],
|
||||
campusCode: [{required: true, message: '请输入院区编码', trigger: ['change', 'blur']}]
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
this.formData = {}
|
||||
this.addDialogVisible = true
|
||||
if (this.$refs["addForm"])
|
||||
this.$refs["addForm"].resetFields()
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs['addForm'].validate(valid => {
|
||||
if (valid) {
|
||||
$.post('/platform/healthCheckup/campus/doAdd', this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.addDialogVisible = false
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar()
|
||||
$.post('/platform/healthCheckup/campus/pageData', this.pageForm).then(res => {
|
||||
sublime.closeLoadingbar()
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val
|
||||
this.pageData()
|
||||
},
|
||||
openEdit(obj) {
|
||||
this.formData = JSON.parse(JSON.stringify(obj))
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs['editForm'].validate(valid => {
|
||||
if (valid) {
|
||||
$.post('/platform/healthCheckup/campus/doEdit', this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.editDialogVisible = false
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('此操作将删除院区,确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
$.post('/platform/healthCheckup/campus/doDelete', {id: id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,309 +0,0 @@
|
||||
<!--#
|
||||
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">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<div>
|
||||
<h3 style="color: rgb(24, 103, 176);">
|
||||
{{'指标录入'}}
|
||||
</h3>
|
||||
</div>
|
||||
<div>
|
||||
<el-button class="pull-right offscreen-right mt10" type="primary">查看统计图</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="rules" label-width="100px" ref="AddForm">
|
||||
<el-divider content-position="left">个人信息</el-divider>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="体检人" prop="username">
|
||||
<el-input readonly placeholder="请填写体检人" v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属工会" prop="unionId">
|
||||
<el-select placeholder="请选择院级工会" v-model="formData.unionId"
|
||||
style="width: 100%;"
|
||||
disabled
|
||||
clearable="true"
|
||||
filterable>
|
||||
<el-option v-for="item in unions"
|
||||
:label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报时间" prop="fillingTime">
|
||||
<el-date-picker
|
||||
placeholder="填报时间"
|
||||
style="width: 100%"
|
||||
readonly
|
||||
type="date"
|
||||
v-model="fillingTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">基本数据</el-divider>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血压" prop="bloodPressure">
|
||||
<el-input clearable placeholder="血压" v-model="formData.bloodPressure"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血糖" prop="bloodSugar">
|
||||
<el-input clearable placeholder="血糖" v-model="formData.bloodSugar"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血脂" prop="bloodFat">
|
||||
<el-input clearable placeholder="血脂" v-model="formData.bloodFat"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="心率" prop="heartRate">
|
||||
<el-input clearable placeholder="心率" v-model="formData.heartRate"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">肾功能</el-divider>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血肌酐" prop="serumCreatinine">
|
||||
<el-input clearable placeholder="血肌酐(SCR)" v-model="formData.serumCreatinine"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血尿素氮" prop="bloodUreaNitrogen">
|
||||
<el-input clearable placeholder="血尿素氮(BUN)" v-model="formData.bloodUreaNitrogen"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血尿酸" prop="bloodUricAcid">
|
||||
<el-input clearable placeholder="血尿酸" v-model="formData.bloodUricAcid"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血尿素" prop="bloodUrea">
|
||||
<el-input clearable placeholder="血尿素" v-model="formData.bloodUrea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">血常规</el-divider>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="红细胞" prop="redBloodCells">
|
||||
<el-input clearable placeholder="红细胞(RBC)" v-model="formData.redBloodCells"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="白细胞" prop="whiteBloodCell">
|
||||
<el-input clearable placeholder="白细胞(WBC)" v-model="formData.whiteBloodCell"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血红蛋白" prop="hemoglobin">
|
||||
<el-input clearable placeholder="血红蛋白(HB)" v-model="formData.hemoglobin"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="血小板" prop="platelet">
|
||||
<el-input clearable placeholder="血小板(PLT)" v-model="formData.platelet"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">肝功能</el-divider>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="谷丙转氨酶" prop="alanineAminoTransferase">
|
||||
<el-input clearable placeholder="谷丙转氨酶(ALT)" v-model="formData.alanineAminoTransferase"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总蛋白" prop="totalProtein">
|
||||
<el-input clearable placeholder="总蛋白(TP)" v-model="formData.totalProtein"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="白蛋白" prop="albumin">
|
||||
<el-input clearable placeholder="白蛋白(ALB)" v-model="formData.albumin"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="球蛋白" prop="globulin">
|
||||
<el-input clearable placeholder="球蛋白(GLO)" v-model="formData.globulin"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="白球蛋白比" prop="albuminToGlobulinRatio">
|
||||
<el-input clearable placeholder="白蛋白与球蛋白比值(A/G)" v-model="formData.albuminToGlobulinRatio"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总胆红素" prop="totalBilirubin">
|
||||
<el-input clearable placeholder="总胆红素(TBIL)" v-model="formData.totalBilirubin"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="直接胆红素" prop="directBilirubin">
|
||||
<el-input clearable placeholder="直接胆红素(DBIL)" v-model="formData.directBilirubin"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">尿常规</el-divider>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="酸碱度" prop="ph">
|
||||
<el-input clearable placeholder="酸碱度(PH)" v-model="formData.ph"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尿比重" prop="specificGravity">
|
||||
<el-input clearable placeholder="尿比重(SG)" v-model="formData.specificGravity"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尿胆原" prop="urobilinogen">
|
||||
<el-input clearable placeholder="尿胆原(URO)" v-model="formData.urobilinogen"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="隐血" prop="occultBlood">
|
||||
<el-input clearable placeholder="隐血(BLO)" v-model="formData.occultBlood"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尿蛋白" prop="urineProtein">
|
||||
<el-input clearable placeholder="尿蛋白(PRO)" v-model="formData.urineProtein"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尿糖" prop="urineSugar">
|
||||
<el-input clearable placeholder="尿糖(GLU)" v-model="formData.urineSugar"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="酮体" prop="ketoneBodies">
|
||||
<el-input clearable placeholder="酮体(KET)" v-model="formData.ketoneBodies"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尿红细胞" prop="rbc">
|
||||
<el-input clearable placeholder="尿红细胞(RBC)" v-model="formData.rbc"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尿液颜色" prop="urineColor">
|
||||
<el-input clearable placeholder="尿液颜色(GOL)" v-model="formData.urineColor"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 30px" 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-form>
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
fillingTime:'',
|
||||
formData: {},
|
||||
rules: {},
|
||||
unions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initFormData() {
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'userId', "${@shiro.getPrincipalProperty('id')}")
|
||||
this.fillingTime = new Date();
|
||||
this.$set(this.formData, 'unionId', "${@shiro.getPrincipalProperty('union').getId()}")
|
||||
},
|
||||
async doSave(){
|
||||
const resp = await $.post('/platform/healthCheckup/health/mange/doAdd',this.formData)
|
||||
if (resp.code === 0){
|
||||
this.$notify.success(resp.msg)
|
||||
window.location.href='/platform/healthCheckup/healthSearch'
|
||||
}else {
|
||||
this.$notify.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
const resp = await $.post('/platform/healthCheckup/health/mange/doAdd', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg)
|
||||
window.location.href = '/platform/healthCheckup/healthSearch'
|
||||
} else {
|
||||
this.$notify.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unions = await getUnions();
|
||||
this.initFormData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,27 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
我的数据
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el:'#app',
|
||||
mixins: [initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
},
|
||||
async created(){
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,28 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el:'#app',
|
||||
mixins: [initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
},
|
||||
async created(){
|
||||
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,318 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava" padding="0 5%">
|
||||
<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
|
||||
:clearable="true"
|
||||
@change="yearChange"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
style="width: 100%;"
|
||||
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();getHealthCheckupSubject();"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.projectId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in projectOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">职工信息:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch" style="width: 100%">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
: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.unitId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
: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 v-model="pageForm.unionGroupId" style="width: 100%"
|
||||
filterable
|
||||
clearable
|
||||
@change="getThreeUnits"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in unionGroups"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
: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 v-model="pageForm.threeUnitId" style="width: 100%" filterable
|
||||
clearable
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in threeUnits"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
: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 :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">
|
||||
|
||||
<template v-if="column.prop=='optionName'" scope="{row}">
|
||||
{{row.optionName?row.optionName:''}}
|
||||
</template>
|
||||
|
||||
|
||||
<template v-else-if="column.prop=='userSign'" scope="{row}">
|
||||
<el-image v-if="row.userSign"
|
||||
:src="row.userSign"
|
||||
fit="cover" style="height: 60px"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="300px"
|
||||
fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openEditHealthCheckup(row)" size="mini"
|
||||
type="primary">
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="修改套餐" :visible.sync="exportHealthCheckupDialog" width="50%"
|
||||
:close-on-click-modal="false">
|
||||
<el-form :model="editHealthCheckupData" label-width="120px" ref="editHealthCheckupForm">
|
||||
<el-form-item label="姓名">
|
||||
<el-input :value="editHealthCheckupData.username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号">
|
||||
<el-input :value="editHealthCheckupData.loginname"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="套餐"
|
||||
prop="subjectId"
|
||||
:rules="[{required:true,message:'请选择',trigger:['change','blur']}]">
|
||||
<el-select v-model="editHealthCheckupData.subjectId" style="width: 100%">
|
||||
<el-option v-for="item in projectSubjectOptions" :key="item.id" :value="item.id"
|
||||
:label="item.optionName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="exportHealthCheckupDialog=false" type="primary" plain>取消</el-button>
|
||||
<el-button @click="doEditHealthCheckupData" type="primary" v-loading="loading">确定
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
searchName: "u.username",
|
||||
},
|
||||
threeUnits: [],
|
||||
unionGroups: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
projectOptions: [],
|
||||
projectSubjectOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
{prop: 'optionName', label: '所选套餐', width: "100px"},
|
||||
// {prop: 'userSign', label: '签字', width: "100px"},
|
||||
],
|
||||
exportHealthCheckupDialog: false,
|
||||
editHealthCheckupData: {},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
doEditHealthCheckupData() {
|
||||
this.$refs['editHealthCheckupForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEditHealthCheckupData", this.editHealthCheckupData)
|
||||
this.exportHealthCheckupDialog = false
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
async openEditHealthCheckup(row) {
|
||||
this.editHealthCheckupData = {
|
||||
username: row.username,
|
||||
loginname: row.loginname,
|
||||
subjectId: row.subjectId,
|
||||
projectId: this.pageForm.projectId,
|
||||
userId: row.id
|
||||
}
|
||||
this.exportHealthCheckupDialog = true
|
||||
|
||||
},
|
||||
async yearChange() {
|
||||
const resp = await $.get("/platform/healthCheckup/project/mange/getHealthCheckupProject", {year: this.pageForm.year})
|
||||
if (resp.code === 0) {
|
||||
this.projectOptions = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.pageForm, "projectId", resp.data[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "projectId", null)
|
||||
}
|
||||
await this.getHealthCheckupSubject()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
async getHealthCheckupSubject() {
|
||||
const resp = await $.get("/platform/healthCheckup/project/mange/findOne", {id: this.pageForm.projectId})
|
||||
if (resp.code === 0) {
|
||||
this.projectSubjectOptions = resp.data.healthCheckupProjectSubjects
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
async getThreeUnits() {
|
||||
this.$set(this.pageForm, "threeUnitId", null)
|
||||
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
|
||||
},
|
||||
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()}")
|
||||
}
|
||||
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
||||
if ("${@shiro.hasRole('ghxzzz')}" === 'true') {
|
||||
this.$set(this.pageForm, 'unionGroupId', this.unionGroups[0].id)
|
||||
await this.getThreeUnits()
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
await this.yearChange()
|
||||
this.pageData()
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,534 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava" padding="0 5%">
|
||||
<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"
|
||||
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 placeholder="请输入内容" clearable v-model="pageForm.name"
|
||||
@keyup.enter.native="doSearch" style="width:100%"></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"
|
||||
icon="el-icon-plus"
|
||||
@click="openAdd">新建体检项目
|
||||
</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-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">
|
||||
|
||||
<template v-if="column.prop=='choiceTime'" scope="{row}">
|
||||
{{row.choiceTimeStart}}-{{row.choiceTimeEnd}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="500px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" :loading="row.loading" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" :loading="row.loading" type="primary"
|
||||
@click="openEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button size="mini" :loading="row.loading" type="danger"
|
||||
@click="doDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button plain size="mini" @click="sendMsg(row)" type="primary">
|
||||
通知
|
||||
</el-button>
|
||||
<el-button plain size="mini" @click="openCode(row.id)" type="primary">
|
||||
二维码
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px"
|
||||
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>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="choiceTime" label="选择时间">
|
||||
<el-date-picker
|
||||
style="width: 80%"
|
||||
v-model="formData.choiceTime"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="activityGroupId" label="可报名人员范围">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select prop="activityGroupId" placeholder="参加人员范围"
|
||||
v-model="formData.activityGroupId"
|
||||
style="width: 99%;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in activityGroupList"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-form-item label="体检套餐" prop="healthCheckupProjectSubjects">
|
||||
<el-card class="item" shadow="hover">
|
||||
<div class="s-options-list" style="margin-top: 10px;">
|
||||
<el-table :data="formData.healthCheckupProjectSubjects" border>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="套餐名称">
|
||||
<template slot-scope="{row}">
|
||||
|
||||
<el-input v-model="row.optionName" autosize
|
||||
class="text-input"
|
||||
data-type="option"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="排序">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.optionSort" autosize
|
||||
class="text-input"
|
||||
data-type="option"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
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"
|
||||
v-model="row.imgUrl"></image-Upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
header-align="center"
|
||||
label="说明">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-link type="primary"
|
||||
@click="openDescRichText(row.description,$index)">
|
||||
编辑说明
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="操作"
|
||||
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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</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"
|
||||
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>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<el-descriptions :column="4" border class="table_fixed">
|
||||
<el-descriptions-item :span="4" label="项目名称">
|
||||
{{viewData.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="4" label="选择时间">
|
||||
{{viewData.choiceTimeStart}}-{{viewData.choiceTimeEnd}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="4" label="可报名人员范围">
|
||||
{{viewData.activityGroupName}}
|
||||
</el-descriptions-item>
|
||||
<template v-for="i in viewData.healthCheckupProjectSubjects">
|
||||
<el-descriptions-item label="套餐名称">
|
||||
{{i.optionName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="套餐说明">
|
||||
<span v-html="i.description"></span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="套餐图片">
|
||||
<el-image
|
||||
: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>
|
||||
<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-descriptions-item>
|
||||
</template>
|
||||
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
<drawer-user-scope
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
:group_id.sync="formData.activityGroupId"
|
||||
></drawer-user-scope>
|
||||
|
||||
<send-msg ref="sendMsg" :url="url"></send-msg>
|
||||
|
||||
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
|
||||
|
||||
<el-dialog
|
||||
: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">
|
||||
<el-button @click="richTextDialog = false">取 消</el-button>
|
||||
<el-button type="primary" @click="getRichText">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<condition ref="cnd" v-model="conditions" :fields="fields"
|
||||
:show_submit="showSubmit"
|
||||
@confirm="cndConfirm"></condition>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
showSubmit: true,
|
||||
conditions: {
|
||||
method: "",
|
||||
conditions: [{}],
|
||||
},
|
||||
viewData: {},
|
||||
subjectIndex: null,
|
||||
richTextDialog: false,
|
||||
url: "",
|
||||
activityGroupList: [],
|
||||
pageForm: {
|
||||
year: moment().format('YYYY')
|
||||
},
|
||||
formData: {
|
||||
healthCheckupProjectSubjects: []
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'year', label: '年度'},
|
||||
{prop: 'name', label: '项目名称'},
|
||||
{prop: 'choiceTime', label: '选择时间'},
|
||||
],
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
choiceTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activityGroupId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
cover: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
healthCheckupProjectSubjects: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
label: '性别',
|
||||
value: 'sex',
|
||||
type: "select",
|
||||
options: [{label: '男', value: '男'}, {label: '女', value: '女'}]
|
||||
},
|
||||
{label: '出生日期', value: 'birthday', type: "date"},
|
||||
],
|
||||
deleteRowIds: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'send-msg': httpVueLoader('/components/plugins/SendMsgByGroupId.vue'),
|
||||
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
|
||||
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
|
||||
'condition': httpVueLoader('/components/plugins/ConditionStructure.vue?v=1.0.0'),
|
||||
},
|
||||
methods: {
|
||||
openCode(id) {
|
||||
this.$refs.openQRCode.openCode("/childrenActivities?id=" + id)
|
||||
},
|
||||
sendMsg(row) {
|
||||
this.url = `<a href="` + (APP_DOMAIN + "/childrenActivities?id=" + row.id) + `">点击参与</a>`
|
||||
this.$refs.sendMsg.openDialog(row.activityGroupId)
|
||||
},
|
||||
deleteRow(row, index) {
|
||||
this.formData.healthCheckupProjectSubjects.splice(index, 1)
|
||||
if (row.id) this.deleteRowIds.push(row.id)
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('确定要删除该项目吗?', '提示', {type: 'warning'})
|
||||
if (confirm) {
|
||||
const resp = await $.post(loc() + "/doDelete", {id})
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async openEdit(row) {
|
||||
this.formData = await this.findOne(row.id)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async openView(row) {
|
||||
this.viewData = await this.findOne(row.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.post(loc() + "/findOne", {id: id})
|
||||
if (resp.code === 0) {
|
||||
resp.data.choiceTime = [resp.data.choiceTimeStart, resp.data.choiceTimeEnd]
|
||||
return resp.data
|
||||
} else {
|
||||
this.notifyError("查询失败")
|
||||
}
|
||||
},
|
||||
async doAdd() {
|
||||
const formValid = await this.$refs["form"].validate()
|
||||
if (formValid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据保存中请稍后',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const formData = clone(this.formData)
|
||||
formData.choiceTimeStart = formData.choiceTime[0]
|
||||
formData.choiceTimeEnd = formData.choiceTime[1]
|
||||
formData.healthCheckupProjectSubjects = JSON.stringify(this.formData.healthCheckupProjectSubjects)
|
||||
formData.activityGroupName = this.activityGroupList.find(v => v.groupId === this.formData.activityGroupId).groupName
|
||||
formData.deleteRowIds = JSON.stringify(this.deleteRowIds)
|
||||
const resp = await $.post(loc() + "/doAdd", formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.deleteRowIds = []
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
|
||||
this.formData = {
|
||||
name: null,
|
||||
activityGroupId: null,
|
||||
choiceTime: null,
|
||||
healthCheckupProjectSubjects: [
|
||||
{
|
||||
optionName: '套餐1',
|
||||
optionNameId: '',
|
||||
optionSort: '1',
|
||||
imgUrl: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
if (this.$refs.form) this.$refs.form.resetFields();
|
||||
this.$refs.guava.edit()
|
||||
|
||||
},
|
||||
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.richTextDialog = false
|
||||
},
|
||||
async openCnd(row, index, showSubmit) {
|
||||
this.showSubmit = showSubmit
|
||||
if (row.matchCnd) {
|
||||
this.conditions = row.matchCnd
|
||||
|
||||
} else {
|
||||
this.conditions = {
|
||||
method: "",
|
||||
conditions: [{}],
|
||||
}
|
||||
}
|
||||
this.subjectIndex = index
|
||||
this.$refs.cnd.open()
|
||||
|
||||
},
|
||||
async cndConfirm(val) {
|
||||
if (val) {
|
||||
const matchCnd = clone(val)
|
||||
if (matchCnd.conditions && matchCnd.conditions.length > 0) {
|
||||
this.formData.healthCheckupProjectSubjects[this.subjectIndex].matchCnd = matchCnd
|
||||
}
|
||||
}
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const personType = await getDictOptions("UserType")
|
||||
const userState = await getDictOptions("userState")
|
||||
|
||||
this.fields = this.fields.concat([{
|
||||
label: '人员类型',
|
||||
value: 'personType',
|
||||
type: "select",
|
||||
options: personType.map(v => {
|
||||
return {label: v.name, value: v.code}
|
||||
})
|
||||
}, {
|
||||
label: '在职状态',
|
||||
value: 'userState',
|
||||
type: "select",
|
||||
options: userState.map(v => {
|
||||
return {label: v.name, value: v.code}
|
||||
})
|
||||
}])
|
||||
this.getActivityGroup()
|
||||
this.pageData()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,408 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava" padding="0 5%">
|
||||
<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
|
||||
:clearable="true"
|
||||
@change="yearChange"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
style="width: 100%;"
|
||||
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="getHealthCheckupSubject();"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.projectId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in projectOptions"></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="clearable"
|
||||
@change="doSearch();getUnionGroup();"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
: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 v-model="pageForm.unionGroupId" style="width: 100%"
|
||||
filterable
|
||||
:clearable="clearable"
|
||||
@change="doSearch"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in unionGroups"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
: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" ref="table_tool">
|
||||
<template #func>
|
||||
<template
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}">
|
||||
<el-button :disabled="!pageForm.projectId" type="primary"
|
||||
size="small"
|
||||
icon="el-icon-printer"
|
||||
@click="exportReceiveDetail()">按分工会导出已选名单
|
||||
</el-button>
|
||||
|
||||
<el-button :disabled="!pageForm.projectId" type="primary"
|
||||
size="small"
|
||||
icon="el-icon-printer"
|
||||
@click="exportUserCompanion()">导出家属名单
|
||||
</el-button>
|
||||
</template>
|
||||
</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"
|
||||
show-summary :summary-method="getSummaries">
|
||||
<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">
|
||||
|
||||
<!--<template scope="{row}" v-if="column.prop=='unionname'">
|
||||
({{row.unioncode}}){{row.unionname}}
|
||||
</template>-->
|
||||
<template scope="{row}" v-if="column.prop==='unselectedTeacherSum'">
|
||||
<el-link @click="openUnclaimed(row.id)" type="primary">
|
||||
{{row.unselectedTeacherSum}}
|
||||
</el-link>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="200px"
|
||||
fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}"
|
||||
type="primary">
|
||||
查看已选人员
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageFormUnion.searchKeyword">
|
||||
<el-select v-model="pageFormUnion.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
@keyup.enter.native="doUnionSearch"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doUnionSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- <el-button type="primary"
|
||||
class="pull-right"
|
||||
icon="el-icon-printer"
|
||||
@click="exportReceiveDetailByUnionId(true)">导出已选名单
|
||||
</el-button>-->
|
||||
<el-card shadow="never" class="mt10">
|
||||
<div v-if="pageFormUnion.isSelected=='0'">
|
||||
<vi-title title="已选人员"></vi-title>
|
||||
</div>
|
||||
<div v-else>
|
||||
<vi-title title="未选人员"></vi-title>
|
||||
</div>
|
||||
<el-table :data="receive_tableData" style="width: 100%;height: 700px" row-key="id"
|
||||
height="100%"
|
||||
v-loading="tableLoading" class="vi-table" :size="tableSize">
|
||||
<el-table-column type="index" width="50"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
v-for="column in receive_tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageFormUnion.pageNumber"
|
||||
:page-sizes="[5,10, 20, 30, 50]"
|
||||
:page-size="pageFormUnion.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageFormUnion.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
pageFormUnion: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: null,
|
||||
searchName: 'u.username',
|
||||
//0:已选人员页面 1:未选人员页面
|
||||
isSelected: '',
|
||||
},
|
||||
unions: [],
|
||||
unionGroups: [],
|
||||
projectOptions: [],
|
||||
receive_tableColumns: [],
|
||||
receive_tableData: [],
|
||||
clearable: false,
|
||||
tableColumns: [
|
||||
{prop: 'unionname', label: '所属工会'},
|
||||
{prop: 'sumCount', label: '本次体检人数'},
|
||||
],
|
||||
unioncode: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async yearChange() {
|
||||
const resp = await $.get("/platform/healthCheckup/project/mange/getHealthCheckupProject", {year: this.pageForm.year})
|
||||
if (resp.code === 0) {
|
||||
this.projectOptions = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.pageForm, "projectId", resp.data[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "projectId", null)
|
||||
}
|
||||
await this.getHealthCheckupSubject()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
async getHealthCheckupSubject() {
|
||||
this.projectSubjectOptions = []
|
||||
const resp = await $.get("/platform/healthCheckup/project/mange/findOne", {id: this.pageForm.projectId})
|
||||
if (resp.code === 0) {
|
||||
if (resp.data) {
|
||||
this.projectSubjectOptions = resp.data.healthCheckupProjectSubjects
|
||||
}
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
async getUnionGroup() {
|
||||
if (this.pageForm.unionId) {
|
||||
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
||||
} else {
|
||||
this.unionGroups = []
|
||||
this.$set(this.pageForm, "unionGroupId", null)
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.tableColumns = []
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '努力加载中。。。',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
sublime.showLoadingbar()
|
||||
|
||||
this.tableColumns.push(
|
||||
{prop: 'unionname', label: '所属工会'},
|
||||
{prop: 'sumCount', label: '本次体检人数'}
|
||||
)
|
||||
if (this.projectSubjectOptions && this.projectSubjectOptions.length > 0) {
|
||||
this.projectSubjectOptions.forEach(v => {
|
||||
this.tableColumns.push({prop: v.optionName, label: v.optionName})
|
||||
})
|
||||
}
|
||||
this.tableColumns.push(
|
||||
{prop: "totalCount", label: "选取人数"},
|
||||
{prop: "unselectedTeacherSum", label: "未选人数"}
|
||||
)
|
||||
this.$refs.table_tool.getColumns()
|
||||
if (!this.pageForm.projectId) {
|
||||
this.tableData = []
|
||||
}
|
||||
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
sublime.closeLoadingbar()
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.tableList
|
||||
}
|
||||
loading.close()
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageFormUnion.pageNumber = val;
|
||||
this.pageUnionData();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageFormUnion.pageSize = val;
|
||||
this.pageUnionData();
|
||||
},
|
||||
async init() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('club01')}" === 'false' && ("${@shiro.hasRole('H04')}" === 'true' || "${@shiro.hasRole('ghxzzz')}" === 'true')) {
|
||||
this.unions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
this.$set(this.pageForm, "unionId", this.unions[0].id)
|
||||
await this.getUnionGroup()
|
||||
if ("${@shiro.hasRole('ghxzzz')}" === 'true') {
|
||||
this.$set(this.pageForm, "unionGroupId", this.unionGroups[0].id)
|
||||
} else {
|
||||
this.clearable = true
|
||||
}
|
||||
} else {
|
||||
this.unions = await getUnions(null)
|
||||
this.clearable = true
|
||||
}
|
||||
await this.yearChange()
|
||||
},
|
||||
//查看未选择人数
|
||||
async openUnclaimed(unionId) {
|
||||
this.pageFormUnion.isSelected = '1'
|
||||
this.pageFormUnion.unionId = unionId
|
||||
this.pageFormUnion.projectId = this.pageForm.projectId
|
||||
await this.pageUnionData();
|
||||
},
|
||||
//查看已选人员
|
||||
async openView(unionId) {
|
||||
this.pageFormUnion.isSelected = '0'
|
||||
this.pageFormUnion.unionId = unionId
|
||||
this.pageFormUnion.projectId = this.pageForm.projectId
|
||||
await this.pageUnionData();
|
||||
},
|
||||
async pageUnionData() {
|
||||
const resp = await $.post(loc() + '/receivePageData', this.pageFormUnion)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.view()
|
||||
this.receive_tableColumns = resp.data.label
|
||||
this.receive_tableData = resp.data.list.list
|
||||
this.pageFormUnion.totalCount = resp.data.list.totalCount
|
||||
}
|
||||
},
|
||||
doUnionSearch() {
|
||||
this.pageFormUnion.pageNumber = 1
|
||||
this.pageUnionData();
|
||||
},
|
||||
//按分工会导出已选名单
|
||||
exportReceiveDetail(flag) {
|
||||
const {year,projectId, unionId} = this.pageForm
|
||||
window.open(loc() + '/exportReceiveDetail?year=' + year + '&projectId=' + projectId + '&unionId=' + (unionId ? unionId : '') + '&flag=' + flag)
|
||||
},
|
||||
//导出家属信息
|
||||
exportUserCompanion() {
|
||||
const {year, projectId, unionId} = this.pageForm
|
||||
window.open(loc() + '/exportUserCompanion?year=' + year + '&projectId=' + projectId + '&unionId=' + (unionId ? unionId : ''))
|
||||
},
|
||||
getSummaries(param){
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
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 Math.floor((prev + curr) * 100) / 100;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' 人';
|
||||
} else {
|
||||
sums[index] = null;
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
// this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user